@mcp-use/inspector 0.5.2-canary.4 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{chunk-VL2OQCWN-CL-KF1zl.js → chunk-VL2OQCWN-Dk6O4Sk7.js} +1 -1
- package/dist/client/assets/{embeddings-DvxdMZ8D.js → embeddings-Yd-6LLDc.js} +1 -1
- package/dist/client/assets/{index-CtBUmMWk.js → index-BY2VQcZu.js} +1 -1
- package/dist/client/assets/{index-DBbKhEjC.js → index-BfI09_Re.js} +1 -1
- package/dist/client/assets/{index-D-2s9JHA.js → index-CPMFJVEE.js} +1 -1
- package/dist/client/assets/{index-DWgtMr0D.js → index-DEqyh8hr.js} +4 -4
- package/dist/client/assets/{index-t9tKLsLk.js → index-DSj_EDTJ.js} +1 -1
- package/dist/client/assets/{index-EYRzsrKX.js → index-DmXcJzte.js} +1 -1
- package/dist/client/assets/{index-CVurY7p-.js → index-_hgOYkid.js} +1 -1
- package/dist/client/assets/{langfuse-C4HKZ3NL-CxkquRNv.js → langfuse-C4HKZ3NL-B_IaVRkH.js} +3 -3
- package/dist/client/assets/{winston-CKpVGekn.js → winston-p6BpkSbE.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/winston-
|
|
2
|
-
var l9=Object.defineProperty;var c9=(t,e,r)=>e in t?l9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var rp=(t,e,r)=>c9(t,typeof e!="symbol"?e+"":e,r);function u9(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in t)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function fc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Jye(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var Dv={exports:{}},hu={};var jk;function d9(){if(jk)return hu;jk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:t,type:n,key:l,ref:a!==void 0?a:null,props:s}}return hu.Fragment=e,hu.jsx=r,hu.jsxs=r,hu}var Uk;function f9(){return Uk||(Uk=1,Dv.exports=d9()),Dv.exports}var g=f9();const p9="modulepreload",m9=function(t){return"/inspector/"+t},Fk={},cs=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let d=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");a=d(r.map(f=>{if(f=m9(f),f in Fk)return;Fk[f]=!0;const m=f.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":p9,m||(v.as="script"),v.crossOrigin="",v.href=f,c&&v.setAttribute("nonce",c),document.head.appendChild(v),m)return new Promise((b,x)=>{v.addEventListener("load",b),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};var h9=Object.defineProperty,Tt=(t,e)=>h9(t,"name",{value:e,configurable:!0}),zk=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),vl={};async function e$(){if(typeof process<"u")try{const t=await cs(()=>import("./__vite-browser-external-DFygW7-s.js").then(r=>r.o),[]),e=await cs(()=>import("./path-C9FudP8b.js").then(r=>r.p),[]);return{fs:t.default,path:e.default}}catch{return{fs:null,path:null}}return{fs:null,path:null}}Tt(e$,"getNodeModules");var Pn=null;function t$(){if(typeof zk<"u")try{Pn=zk("winston")}catch{}}Tt(t$,"loadWinstonSync");async function r$(){return Pn||(Pn=await cs(()=>import("./winston-CKpVGekn.js").then(t=>t.w),__vite__mapDeps([0,1,2,3]))),Pn}Tt(r$,"getWinston");var d_="mcp-use";function Zp(){try{return typeof navigator<"u"&&navigator.userAgent?.includes("Cloudflare-Workers")||typeof globalThis.EdgeRuntime<"u"||typeof globalThis.Deno<"u"?!1:typeof process<"u"&&!0&&typeof __dirname<"u"}catch{return!1}}Tt(Zp,"isNodeJSEnvironment");var Hl,g9=(Hl=class{_level;name;constructor(e=d_,r="info"){this.name=e,this._level=r}shouldLog(e){const r=["error","warn","info","http","verbose","debug","silly"],n=r.indexOf(this._level);return r.indexOf(e)<=n}formatMessage(e,r){return`${new Date().toLocaleTimeString("en-US",{hour12:!1})} [${this.name}] ${e}: ${r}`}error(e){this.shouldLog("error")&&console.error(this.formatMessage("error",e))}warn(e){this.shouldLog("warn")&&console.warn(this.formatMessage("warn",e))}info(e){this.shouldLog("info")&&console.info(this.formatMessage("info",e))}debug(e){this.shouldLog("debug")&&console.debug(this.formatMessage("debug",e))}http(e){this.shouldLog("http")&&console.log(this.formatMessage("http",e))}verbose(e){this.shouldLog("verbose")&&console.log(this.formatMessage("verbose",e))}silly(e){this.shouldLog("silly")&&console.log(this.formatMessage("silly",e))}get level(){return this._level}set level(e){this._level=e}},Tt(Hl,"SimpleConsoleLogger"),Hl);function xp(t){switch((typeof process<"u"&&vl?t:void 0)?.trim()){case"2":return"debug";case"1":return"info";default:return"info"}}Tt(xp,"resolveLevel");var wi,n$=(wi=class{static get(e=d_){if(!Zp()){if(!this.simpleInstances[e]){const r=typeof process<"u"&&vl?.DEBUG||void 0;this.simpleInstances[e]=new g9(e,xp(r))}return this.simpleInstances[e]}if(!this.instances[e]){if(!Pn)throw new Error("Winston not loaded - call Logger.configure() first");const{createLogger:r,format:n}=Pn,{combine:a,timestamp:s,label:l,colorize:c,splat:d}=n;this.instances[e]=r({level:xp(vl.DEBUG),format:a(c(),d(),l({label:e}),s({format:"HH:mm:ss"}),this.getFormatter()),transports:[]})}return this.instances[e]}static getFormatter(){if(!Pn)throw new Error("Winston not loaded");const{format:e}=Pn,{printf:r}=e,n=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l}: ${c}`),a=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`),s=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`);switch(this.currentFormat){case"minimal":return n;case"detailed":return a;case"emoji":return s;default:return n}}static async configure(e={}){const{level:r,console:n=!0,file:a,format:s="minimal"}=e,l=typeof process<"u"&&vl?.DEBUG||void 0,c=r??xp(l);if(this.currentFormat=s,!Zp()){Object.values(this.simpleInstances).forEach(R=>{R.level=c});return}if(await r$(),!Pn)throw new Error("Failed to load winston");const d=this.get();d.level=c;const f=d;if(f.clear(),n&&f.add(new Pn.transports.Console),a){const{fs:R,path:w}=await e$();if(R&&w){const _=w.dirname(w.resolve(a));R.existsSync(_)||R.mkdirSync(_,{recursive:!0}),f.add(new Pn.transports.File({filename:a}))}}const{format:m}=Pn,{combine:h,timestamp:v,label:b,colorize:x,splat:S}=m;Object.values(this.instances).forEach(R=>{R&&"format"in R&&(R.level=c,R.format=h(x(),S(),b({label:d_}),v({format:"HH:mm:ss"}),this.getFormatter()))})}static setDebug(e){let r;e===2||e===!0?r="debug":r="info",Object.values(this.simpleInstances).forEach(n=>{n.level=r}),Object.values(this.instances).forEach(n=>{n&&(n.level=r)}),typeof process<"u"&&vl&&(vl.DEBUG=e?e===!0?"2":String(e):"0")}static setFormat(e){this.currentFormat=e,this.configure({format:e})}},Tt(wi,"Logger"),rp(wi,"instances",{}),rp(wi,"simpleInstances",{}),rp(wi,"currentFormat","minimal"),wi);Zp()&&(t$(),Pn&&n$.configure());var Ie=n$.get(),Ct;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const s={};for(const l of a)s[l]=l;return s},t.getValidEnumValues=a=>{const s=t.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),l={};for(const c of s)l[c]=a[c];return t.objectValues(l)},t.objectValues=a=>t.objectKeys(a).map(function(s){return a[s]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&s.push(l);return s},t.find=(a,s)=>{for(const l of a)if(s(l))return l},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,s=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(Ct||(Ct={}));var $k;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})($k||($k={}));const Fe=Ct.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vo=t=>{switch(typeof t){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return Number.isNaN(t)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(t)?Fe.array:t===null?Fe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Fe.promise:typeof Map<"u"&&t instanceof Map?Fe.map:typeof Set<"u"&&t instanceof Set?Fe.set:typeof Date<"u"&&t instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},Ce=Ct.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class na extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(s){return s.message},n={_errors:[]},a=s=>{for(const l of s.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)n._errors.push(r(l));else{let c=n,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(r(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return a(this),n}static assert(e){if(!(e instanceof na))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ct.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const s=a.path[0];r[s]=r[s]||[],r[s].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}na.create=t=>new na(t);const Yu=(t,e)=>{let r;switch(t.code){case Ce.invalid_type:t.received===Fe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Ce.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ct.jsonStringifyReplacer)}`;break;case Ce.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ct.joinValues(t.keys,", ")}`;break;case Ce.invalid_union:r="Invalid input";break;case Ce.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ct.joinValues(t.options)}`;break;case Ce.invalid_enum_value:r=`Invalid enum value. Expected ${Ct.joinValues(t.options)}, received '${t.received}'`;break;case Ce.invalid_arguments:r="Invalid function arguments";break;case Ce.invalid_return_type:r="Invalid function return type";break;case Ce.invalid_date:r="Invalid date";break;case Ce.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ct.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Ce.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Ce.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Ce.custom:r="Invalid input";break;case Ce.invalid_intersection_types:r="Intersection results could not be merged";break;case Ce.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Ce.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ct.assertNever(t)}return{message:r}};let v9=Yu;function f_(){return v9}const p_=t=>{const{data:e,path:r,errorMaps:n,issueData:a}=t,s=[...r,...a.path||[]],l={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let c="";const d=n.filter(f=>!!f).slice().reverse();for(const f of d)c=f(l,{data:e,defaultError:c}).message;return{...a,path:s,message:c}};function je(t,e){const r=f_(),n=p_({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Yu?void 0:Yu].filter(a=>!!a)});t.common.issues.push(n)}class un{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return tt;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const s=await a.key,l=await a.value;n.push({key:s,value:l})}return un.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:s,value:l}=a;if(s.status==="aborted"||l.status==="aborted")return tt;s.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(n[s.value]=l.value)}return{status:e.value,value:n}}}const tt=Object.freeze({status:"aborted"}),xu=t=>({status:"dirty",value:t}),_n=t=>({status:"valid",value:t}),Bk=t=>t.status==="aborted",qk=t=>t.status==="dirty",tc=t=>t.status==="valid",Xp=t=>typeof Promise<"u"&&t instanceof Promise;var Ye;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ye||(Ye={}));class Ba{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hk=(t,e)=>{if(tc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new na(t.common.issues);return this._error=r,this._error}}};function ut(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(l,c)=>{const{message:d}=t;return l.code==="invalid_enum_value"?{message:d??c.defaultError}:typeof c.data>"u"?{message:d??n??c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:d??r??c.defaultError}},description:a}}class wt{get description(){return this._def.description}_getType(e){return vo(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:vo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new un,ctx:{common:e.parent.common,data:e.data,parsedType:vo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Xp(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Hk(n,a)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return tc(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>tc(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await(Xp(a)?a:Promise.resolve(a));return Hk(n,s)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,s)=>{const l=e(a),c=()=>s.addIssue({code:Ce.custom,...n(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(c(),!1)):l?!0:(c(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new ys({schema:this,typeName:it.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ti.create(this,this._def)}nullable(){return Es.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ua.create(this)}promise(){return Qu.create(this,this._def)}or(e){return tm.create([this,e],this._def)}and(e){return rm.create(this,e,this._def)}transform(e){return new ys({...ut(this._def),schema:this,typeName:it.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new im({...ut(this._def),innerType:this,defaultValue:r,typeName:it.ZodDefault})}brand(){return new s$({typeName:it.ZodBranded,type:this,...ut(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new om({...ut(this._def),innerType:this,catchValue:r,typeName:it.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return qT.create(this,e)}readonly(){return sm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const b9=/^c[^\s-]{8,}$/i,y9=/^[0-9a-z]+$/,E9=/^[0-9A-HJKMNP-TV-Z]{26}$/i,S9=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,w9=/^[a-z0-9_-]{21}$/i,x9=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,T9=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Lv;const A9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,C9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,N9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,k9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,O9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,a$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",D9=new RegExp(`^${a$}$`);function i$(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function L9(t){return new RegExp(`^${i$(t)}$`)}function M9(t){let e=`${a$}T${i$(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function P9(t,e){return!!((e==="v4"||!e)&&A9.test(t)||(e==="v6"||!e)&&N9.test(t))}function j9(t,e){if(!x9.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function U9(t,e){return!!((e==="v4"||!e)&&C9.test(t)||(e==="v6"||!e)&&k9.test(t))}class _i extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Fe.string){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_type,expected:Fe.string,received:s.parsedType}),tt}const n=new un;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,c=e.data.length<s.value;(l||c)&&(a=this._getOrReturnCtx(e,a),l?je(a,{code:Ce.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&je(a,{code:Ce.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")T9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"email",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Lv||(Lv=new RegExp(R9,"u")),Lv.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"emoji",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")S9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"uuid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")w9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"nanoid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")b9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"cuid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")y9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"cuid2",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")E9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"ulid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),je(a,{validation:"url",code:Ce.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"regex",code:Ce.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?M9(s).test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?D9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?L9(s).test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?_9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"duration",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?P9(e.data,s.version)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"ip",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?j9(e.data,s.alg)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"jwt",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?U9(e.data,s.version)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"cidr",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?I9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"base64",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?O9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"base64url",code:Ce.invalid_string,message:s.message}),n.dirty()):Ct.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:Ce.invalid_string,...Ye.errToObj(n)})}_addCheck(e){return new _i({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ye.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ye.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ye.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ye.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Ye.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ye.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ye.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ye.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Ye.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Ye.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Ye.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ye.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Ye.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Ye.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Ye.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Ye.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Ye.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Ye.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Ye.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Ye.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Ye.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Ye.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Ye.errToObj(r)})}nonempty(e){return this.min(1,Ye.errToObj(e))}trim(){return new _i({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _i({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _i({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}_i.create=t=>new _i({checks:[],typeName:it.ZodString,coerce:t?.coerce??!1,...ut(t)});function F9(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,s=Number.parseInt(t.toFixed(a).replace(".","")),l=Number.parseInt(e.toFixed(a).replace(".",""));return s%l/10**a}class rc extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Fe.number){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_type,expected:Fe.number,received:s.parsedType}),tt}let n;const a=new un;for(const s of this._def.checks)s.kind==="int"?Ct.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?F9(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.not_finite,message:s.message}),a.dirty()):Ct.assertNever(s);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Ye.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Ye.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Ye.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Ye.toString(r))}setLimit(e,r,n,a){return new rc({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Ye.toString(a)}]})}_addCheck(e){return new rc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ye.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ye.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ye.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ye.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ye.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Ye.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Ye.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ye.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ye.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ct.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}rc.create=t=>new rc({checks:[],typeName:it.ZodNumber,coerce:t?.coerce||!1,...ut(t)});class Ku extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Fe.bigint)return this._getInvalidInput(e);let n;const a=new un;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):Ct.assertNever(s);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return je(r,{code:Ce.invalid_type,expected:Fe.bigint,received:r.parsedType}),tt}gte(e,r){return this.setLimit("min",e,!0,Ye.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Ye.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Ye.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Ye.toString(r))}setLimit(e,r,n,a){return new Ku({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Ye.toString(a)}]})}_addCheck(e){return new Ku({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ye.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ye.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ye.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ye.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Ye.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Ku.create=t=>new Ku({checks:[],typeName:it.ZodBigInt,coerce:t?.coerce??!1,...ut(t)});class m_ extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Fe.boolean){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.boolean,received:n.parsedType}),tt}return _n(e.data)}}m_.create=t=>new m_({typeName:it.ZodBoolean,coerce:t?.coerce||!1,...ut(t)});class Qp extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Fe.date){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_type,expected:Fe.date,received:s.parsedType}),tt}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_date}),tt}const n=new un;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ct.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Qp({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Ye.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Ye.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Qp.create=t=>new Qp({checks:[],coerce:t?.coerce||!1,typeName:it.ZodDate,...ut(t)});class Vk extends wt{_parse(e){if(this._getType(e)!==Fe.symbol){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.symbol,received:n.parsedType}),tt}return _n(e.data)}}Vk.create=t=>new Vk({typeName:it.ZodSymbol,...ut(t)});class Jp extends wt{_parse(e){if(this._getType(e)!==Fe.undefined){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.undefined,received:n.parsedType}),tt}return _n(e.data)}}Jp.create=t=>new Jp({typeName:it.ZodUndefined,...ut(t)});class em extends wt{_parse(e){if(this._getType(e)!==Fe.null){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.null,received:n.parsedType}),tt}return _n(e.data)}}em.create=t=>new em({typeName:it.ZodNull,...ut(t)});class Zu extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return _n(e.data)}}Zu.create=t=>new Zu({typeName:it.ZodAny,...ut(t)});class jl extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _n(e.data)}}jl.create=t=>new jl({typeName:it.ZodUnknown,...ut(t)});class xo extends wt{_parse(e){const r=this._getOrReturnCtx(e);return je(r,{code:Ce.invalid_type,expected:Fe.never,received:r.parsedType}),tt}}xo.create=t=>new xo({typeName:it.ZodNever,...ut(t)});class Gk extends wt{_parse(e){if(this._getType(e)!==Fe.undefined){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.void,received:n.parsedType}),tt}return _n(e.data)}}Gk.create=t=>new Gk({typeName:it.ZodVoid,...ut(t)});class Ua extends wt{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==Fe.array)return je(r,{code:Ce.invalid_type,expected:Fe.array,received:r.parsedType}),tt;if(a.exactLength!==null){const l=r.data.length>a.exactLength.value,c=r.data.length<a.exactLength.value;(l||c)&&(je(r,{code:l?Ce.too_big:Ce.too_small,minimum:c?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(je(r,{code:Ce.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(je(r,{code:Ce.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((l,c)=>a.type._parseAsync(new Ba(r,l,r.path,c)))).then(l=>un.mergeArray(n,l));const s=[...r.data].map((l,c)=>a.type._parseSync(new Ba(r,l,r.path,c)));return un.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Ua({...this._def,minLength:{value:e,message:Ye.toString(r)}})}max(e,r){return new Ua({...this._def,maxLength:{value:e,message:Ye.toString(r)}})}length(e,r){return new Ua({...this._def,exactLength:{value:e,message:Ye.toString(r)}})}nonempty(e){return this.min(1,e)}}Ua.create=(t,e)=>new Ua({type:t,minLength:null,maxLength:null,exactLength:null,typeName:it.ZodArray,...ut(e)});function bl(t){if(t instanceof Rr){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Ti.create(bl(n))}return new Rr({...t._def,shape:()=>e})}else return t instanceof Ua?new Ua({...t._def,type:bl(t.element)}):t instanceof Ti?Ti.create(bl(t.unwrap())):t instanceof Es?Es.create(bl(t.unwrap())):t instanceof Ai?Ai.create(t.items.map(e=>bl(e))):t}class Rr extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ct.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Fe.object){const f=this._getOrReturnCtx(e);return je(f,{code:Ce.invalid_type,expected:Fe.object,received:f.parsedType}),tt}const{status:n,ctx:a}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof xo&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||c.push(f);const d=[];for(const f of l){const m=s[f],h=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Ba(a,h,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof xo){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of c)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")c.length>0&&(je(a,{code:Ce.unrecognized_keys,keys:c}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of c){const h=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Ba(a,h,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const h=await m.key,v=await m.value;f.push({key:h,value:v,alwaysSet:m.alwaysSet})}return f}).then(f=>un.mergeObjectSync(n,f)):un.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return Ye.errToObj,new Rr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const a=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Ye.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new Rr({...this._def,unknownKeys:"strip"})}passthrough(){return new Rr({...this._def,unknownKeys:"passthrough"})}extend(e){return new Rr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Rr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:it.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Rr({...this._def,catchall:e})}pick(e){const r={};for(const n of Ct.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}omit(e){const r={};for(const n of Ct.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}deepPartial(){return bl(this)}partial(e){const r={};for(const n of Ct.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}return new Rr({...this._def,shape:()=>r})}required(e){const r={};for(const n of Ct.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Ti;)s=s._def.innerType;r[n]=s}return new Rr({...this._def,shape:()=>r})}keyof(){return o$(Ct.objectKeys(this.shape))}}Rr.create=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strip",catchall:xo.create(),typeName:it.ZodObject,...ut(e)});Rr.strictCreate=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strict",catchall:xo.create(),typeName:it.ZodObject,...ut(e)});Rr.lazycreate=(t,e)=>new Rr({shape:t,unknownKeys:"strip",catchall:xo.create(),typeName:it.ZodObject,...ut(e)});class tm extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(s){for(const c of s)if(c.result.status==="valid")return c.result;for(const c of s)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;const l=s.map(c=>new na(c.ctx.common.issues));return je(r,{code:Ce.invalid_union,unionErrors:l}),tt}if(r.common.async)return Promise.all(n.map(async s=>{const l={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:l}),ctx:l}})).then(a);{let s;const l=[];for(const d of n){const f={...r,common:{...r.common,issues:[]},parent:null},m=d._parseSync({data:r.data,path:r.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!s&&(s={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const c=l.map(d=>new na(d));return je(r,{code:Ce.invalid_union,unionErrors:c}),tt}}get options(){return this._def.options}}tm.create=(t,e)=>new tm({options:t,typeName:it.ZodUnion,...ut(e)});const yi=t=>t instanceof g_?yi(t.schema):t instanceof ys?yi(t.innerType()):t instanceof am?[t.value]:t instanceof bs?t.options:t instanceof v_?Ct.objectValues(t.enum):t instanceof im?yi(t._def.innerType):t instanceof Jp?[void 0]:t instanceof em?[null]:t instanceof Ti?[void 0,...yi(t.unwrap())]:t instanceof Es?[null,...yi(t.unwrap())]:t instanceof s$||t instanceof sm?yi(t.unwrap()):t instanceof om?yi(t._def.innerType):[];class BT extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.object)return je(r,{code:Ce.invalid_type,expected:Fe.object,received:r.parsedType}),tt;const n=this.discriminator,a=r.data[n],s=this.optionsMap.get(a);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(je(r,{code:Ce.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),tt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const a=new Map;for(const s of r){const l=yi(s.shape[e]);if(!l.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of l){if(a.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);a.set(c,s)}}return new BT({typeName:it.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...ut(n)})}}function h_(t,e){const r=vo(t),n=vo(e);if(t===e)return{valid:!0,data:t};if(r===Fe.object&&n===Fe.object){const a=Ct.objectKeys(e),s=Ct.objectKeys(t).filter(c=>a.indexOf(c)!==-1),l={...t,...e};for(const c of s){const d=h_(t[c],e[c]);if(!d.valid)return{valid:!1};l[c]=d.data}return{valid:!0,data:l}}else if(r===Fe.array&&n===Fe.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<t.length;s++){const l=t[s],c=e[s],d=h_(l,c);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return r===Fe.date&&n===Fe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class rm extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(s,l)=>{if(Bk(s)||Bk(l))return tt;const c=h_(s.value,l.value);return c.valid?((qk(s)||qk(l))&&r.dirty(),{status:r.value,value:c.data}):(je(n,{code:Ce.invalid_intersection_types}),tt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,l])=>a(s,l)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}rm.create=(t,e,r)=>new rm({left:t,right:e,typeName:it.ZodIntersection,...ut(r)});class Ai extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.array)return je(n,{code:Ce.invalid_type,expected:Fe.array,received:n.parsedType}),tt;if(n.data.length<this._def.items.length)return je(n,{code:Ce.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt;!this._def.rest&&n.data.length>this._def.items.length&&(je(n,{code:Ce.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Ba(n,l,n.path,c)):null}).filter(l=>!!l);return n.common.async?Promise.all(s).then(l=>un.mergeArray(r,l)):un.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Ai({...this._def,rest:e})}}Ai.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ai({items:t,typeName:it.ZodTuple,rest:null,...ut(e)})};class nm extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.object)return je(n,{code:Ce.invalid_type,expected:Fe.object,received:n.parsedType}),tt;const a=[],s=this._def.keyType,l=this._def.valueType;for(const c in n.data)a.push({key:s._parse(new Ba(n,c,n.path,c)),value:l._parse(new Ba(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?un.mergeObjectAsync(r,a):un.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof wt?new nm({keyType:e,valueType:r,typeName:it.ZodRecord,...ut(n)}):new nm({keyType:_i.create(),valueType:e,typeName:it.ZodRecord,...ut(r)})}}class Wk extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.map)return je(n,{code:Ce.invalid_type,expected:Fe.map,received:n.parsedType}),tt;const a=this._def.keyType,s=this._def.valueType,l=[...n.data.entries()].map(([c,d],f)=>({key:a._parse(new Ba(n,c,n.path,[f,"key"])),value:s._parse(new Ba(n,d,n.path,[f,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}})}else{const c=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}}}}Wk.create=(t,e,r)=>new Wk({valueType:e,keyType:t,typeName:it.ZodMap,...ut(r)});class Xu extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.set)return je(n,{code:Ce.invalid_type,expected:Fe.set,received:n.parsedType}),tt;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(je(n,{code:Ce.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(je(n,{code:Ce.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const s=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return tt;m.status==="dirty"&&r.dirty(),f.add(m.value)}return{status:r.value,value:f}}const c=[...n.data.values()].map((d,f)=>s._parse(new Ba(n,d,n.path,f)));return n.common.async?Promise.all(c).then(d=>l(d)):l(c)}min(e,r){return new Xu({...this._def,minSize:{value:e,message:Ye.toString(r)}})}max(e,r){return new Xu({...this._def,maxSize:{value:e,message:Ye.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Xu.create=(t,e)=>new Xu({valueType:t,minSize:null,maxSize:null,typeName:it.ZodSet,...ut(e)});class Pu extends wt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.function)return je(r,{code:Ce.invalid_type,expected:Fe.function,received:r.parsedType}),tt;function n(c,d){return p_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f_(),Yu].filter(f=>!!f),issueData:{code:Ce.invalid_arguments,argumentsError:d}})}function a(c,d){return p_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f_(),Yu].filter(f=>!!f),issueData:{code:Ce.invalid_return_type,returnTypeError:d}})}const s={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof Qu){const c=this;return _n(async function(...d){const f=new na([]),m=await c._def.args.parseAsync(d,s).catch(b=>{throw f.addIssue(n(d,b)),f}),h=await Reflect.apply(l,this,m);return await c._def.returns._def.type.parseAsync(h,s).catch(b=>{throw f.addIssue(a(h,b)),f})})}else{const c=this;return _n(function(...d){const f=c._def.args.safeParse(d,s);if(!f.success)throw new na([n(d,f.error)]);const m=Reflect.apply(l,this,f.data),h=c._def.returns.safeParse(m,s);if(!h.success)throw new na([a(m,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Pu({...this._def,args:Ai.create(e).rest(jl.create())})}returns(e){return new Pu({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new Pu({args:e||Ai.create([]).rest(jl.create()),returns:r||jl.create(),typeName:it.ZodFunction,...ut(n)})}}class g_ extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}g_.create=(t,e)=>new g_({getter:t,typeName:it.ZodLazy,...ut(e)});class am extends wt{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return je(r,{received:r.data,code:Ce.invalid_literal,expected:this._def.value}),tt}return{status:"valid",value:e.data}}get value(){return this._def.value}}am.create=(t,e)=>new am({value:t,typeName:it.ZodLiteral,...ut(e)});function o$(t,e){return new bs({values:t,typeName:it.ZodEnum,...ut(e)})}class bs extends wt{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return je(r,{expected:Ct.joinValues(n),received:r.parsedType,code:Ce.invalid_type}),tt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return je(r,{received:r.data,code:Ce.invalid_enum_value,options:n}),tt}return _n(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return bs.create(e,{...this._def,...r})}exclude(e,r=this._def){return bs.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}bs.create=o$;class v_ extends wt{_parse(e){const r=Ct.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Fe.string&&n.parsedType!==Fe.number){const a=Ct.objectValues(r);return je(n,{expected:Ct.joinValues(a),received:n.parsedType,code:Ce.invalid_type}),tt}if(this._cache||(this._cache=new Set(Ct.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=Ct.objectValues(r);return je(n,{received:n.data,code:Ce.invalid_enum_value,options:a}),tt}return _n(e.data)}get enum(){return this._def.values}}v_.create=(t,e)=>new v_({values:t,typeName:it.ZodNativeEnum,...ut(e)});class Qu extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.promise&&r.common.async===!1)return je(r,{code:Ce.invalid_type,expected:Fe.promise,received:r.parsedType}),tt;const n=r.parsedType===Fe.promise?r.data:Promise.resolve(r.data);return _n(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Qu.create=(t,e)=>new Qu({type:t,typeName:it.ZodPromise,...ut(e)});class ys extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===it.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:l=>{je(n,l),l.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const l=a.transform(n.data,s);if(n.common.async)return Promise.resolve(l).then(async c=>{if(r.value==="aborted")return tt;const d=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return d.status==="aborted"?tt:d.status==="dirty"||r.value==="dirty"?xu(d.value):d});{if(r.value==="aborted")return tt;const c=this._def.schema._parseSync({data:l,path:n.path,parent:n});return c.status==="aborted"?tt:c.status==="dirty"||r.value==="dirty"?xu(c.value):c}}if(a.type==="refinement"){const l=c=>{const d=a.refinement(c,s);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?tt:(c.status==="dirty"&&r.dirty(),l(c.value),{status:r.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?tt:(c.status==="dirty"&&r.dirty(),l(c.value).then(()=>({status:r.value,value:c.value}))))}if(a.type==="transform")if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!tc(l))return tt;const c=a.transform(l.value,s);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>tc(l)?Promise.resolve(a.transform(l.value,s)).then(c=>({status:r.value,value:c})):tt);Ct.assertNever(a)}}ys.create=(t,e,r)=>new ys({schema:t,typeName:it.ZodEffects,effect:e,...ut(r)});ys.createWithPreprocess=(t,e,r)=>new ys({schema:e,effect:{type:"preprocess",transform:t},typeName:it.ZodEffects,...ut(r)});class Ti extends wt{_parse(e){return this._getType(e)===Fe.undefined?_n(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ti.create=(t,e)=>new Ti({innerType:t,typeName:it.ZodOptional,...ut(e)});class Es extends wt{_parse(e){return this._getType(e)===Fe.null?_n(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Es.create=(t,e)=>new Es({innerType:t,typeName:it.ZodNullable,...ut(e)});class im extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===Fe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}im.create=(t,e)=>new im({innerType:t,typeName:it.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ut(e)});class om extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Xp(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}om.create=(t,e)=>new om({innerType:t,typeName:it.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ut(e)});class Yk extends wt{_parse(e){if(this._getType(e)!==Fe.nan){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.nan,received:n.parsedType}),tt}return{status:"valid",value:e.data}}}Yk.create=t=>new Yk({typeName:it.ZodNaN,...ut(t)});class s$ extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class qT extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?tt:s.status==="dirty"?(r.dirty(),xu(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?tt:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new qT({in:e,out:r,typeName:it.ZodPipeline})}}class sm extends wt{_parse(e){const r=this._def.innerType._parse(e),n=a=>(tc(a)&&(a.value=Object.freeze(a.value)),a);return Xp(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}sm.create=(t,e)=>new sm({innerType:t,typeName:it.ZodReadonly,...ut(e)});function Kk(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function z9(t,e={},r){return t?Zu.create().superRefine((n,a)=>{const s=t(n);if(s instanceof Promise)return s.then(l=>{if(!l){const c=Kk(e,n),d=c.fatal??r??!0;a.addIssue({code:"custom",...c,fatal:d})}});if(!s){const l=Kk(e,n),c=l.fatal??r??!0;a.addIssue({code:"custom",...l,fatal:c})}}):Zu.create()}var it;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(it||(it={}));const eEe=(t,e={message:`Input not instance of ${t.name}`})=>z9(r=>r instanceof t,e),me=_i.create,Ur=rc.create,Dr=m_.create,tEe=Jp.create,rEe=em.create,$9=Zu.create,yd=jl.create;xo.create;const Ve=Ua.create,De=Rr.create,dn=tm.create,B9=BT.create;rm.create;Ai.create;const Ed=nm.create,nEe=Pu.create,dt=am.create,Ci=bs.create,aEe=Qu.create,Re=Ti.create;Es.create;const q9=tt,Om="2025-06-18",H9=[Om,"2025-03-26","2024-11-05","2024-10-07"],Dm="2.0",l$=dn([me(),Ur().int()]),c$=me(),V9=De({progressToken:Re(l$)}).passthrough(),sa=De({_meta:Re(V9)}).passthrough(),Tn=De({method:me(),params:Re(sa)}),Sd=De({_meta:Re(De({}).passthrough())}).passthrough(),Ya=De({method:me(),params:Re(Sd)}),la=De({_meta:Re(De({}).passthrough())}).passthrough(),Lm=dn([me(),Ur().int()]),u$=De({jsonrpc:dt(Dm),id:Lm}).merge(Tn).strict(),d$=t=>u$.safeParse(t).success,f$=De({jsonrpc:dt(Dm)}).merge(Ya).strict(),G9=t=>f$.safeParse(t).success,p$=De({jsonrpc:dt(Dm),id:Lm,result:la}).strict(),b_=t=>p$.safeParse(t).success;var Oa;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError"})(Oa||(Oa={}));const m$=De({jsonrpc:dt(Dm),id:Lm,error:De({code:Ur().int(),message:me(),data:Re(yd())})}).strict(),W9=t=>m$.safeParse(t).success,_p=dn([u$,f$,p$,m$]),Cl=la.strict(),HT=Ya.extend({method:dt("notifications/cancelled"),params:Sd.extend({requestId:Lm,reason:me().optional()})}),Y9=De({src:me(),mimeType:Re(me()),sizes:Re(Ve(me()))}).passthrough(),wd=De({icons:Ve(Y9).optional()}).passthrough(),xd=De({name:me(),title:Re(me())}).passthrough(),h$=xd.extend({version:me(),websiteUrl:Re(me())}).merge(wd),K9=De({experimental:Re(De({}).passthrough()),sampling:Re(De({}).passthrough()),elicitation:Re(De({}).passthrough()),roots:Re(De({listChanged:Re(Dr())}).passthrough())}).passthrough(),Z9=Tn.extend({method:dt("initialize"),params:sa.extend({protocolVersion:me(),capabilities:K9,clientInfo:h$})}),X9=De({experimental:Re(De({}).passthrough()),logging:Re(De({}).passthrough()),completions:Re(De({}).passthrough()),prompts:Re(De({listChanged:Re(Dr())}).passthrough()),resources:Re(De({subscribe:Re(Dr()),listChanged:Re(Dr())}).passthrough()),tools:Re(De({listChanged:Re(Dr())}).passthrough())}).passthrough(),g$=la.extend({protocolVersion:me(),capabilities:X9,serverInfo:h$,instructions:Re(me())}),v$=Ya.extend({method:dt("notifications/initialized")}),Q9=t=>v$.safeParse(t).success,VT=Tn.extend({method:dt("ping")}),J9=De({progress:Ur(),total:Re(Ur()),message:Re(me())}).passthrough(),GT=Ya.extend({method:dt("notifications/progress"),params:Sd.merge(J9).extend({progressToken:l$})}),Mm=Tn.extend({params:sa.extend({cursor:Re(c$)}).optional()}),Pm=la.extend({nextCursor:Re(c$)}),b$=De({uri:me(),mimeType:Re(me()),_meta:Re(De({}).passthrough())}).passthrough(),y$=b$.extend({text:me()}),WT=me().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),E$=b$.extend({blob:WT}),S$=xd.extend({uri:me(),description:Re(me()),mimeType:Re(me()),_meta:Re(De({}).passthrough())}).merge(wd),e6=xd.extend({uriTemplate:me(),description:Re(me()),mimeType:Re(me()),_meta:Re(De({}).passthrough())}).merge(wd),t6=Mm.extend({method:dt("resources/list")}),w$=Pm.extend({resources:Ve(S$)}),r6=Mm.extend({method:dt("resources/templates/list")}),x$=Pm.extend({resourceTemplates:Ve(e6)}),n6=Tn.extend({method:dt("resources/read"),params:sa.extend({uri:me()})}),_$=la.extend({contents:Ve(dn([y$,E$]))}),a6=Ya.extend({method:dt("notifications/resources/list_changed")}),i6=Tn.extend({method:dt("resources/subscribe"),params:sa.extend({uri:me()})}),o6=Tn.extend({method:dt("resources/unsubscribe"),params:sa.extend({uri:me()})}),s6=Ya.extend({method:dt("notifications/resources/updated"),params:Sd.extend({uri:me()})}),l6=De({name:me(),description:Re(me()),required:Re(Dr())}).passthrough(),c6=xd.extend({description:Re(me()),arguments:Re(Ve(l6)),_meta:Re(De({}).passthrough())}).merge(wd),u6=Mm.extend({method:dt("prompts/list")}),T$=Pm.extend({prompts:Ve(c6)}),d6=Tn.extend({method:dt("prompts/get"),params:sa.extend({name:me(),arguments:Re(Ed(me()))})}),YT=De({type:dt("text"),text:me(),_meta:Re(De({}).passthrough())}).passthrough(),KT=De({type:dt("image"),data:WT,mimeType:me(),_meta:Re(De({}).passthrough())}).passthrough(),ZT=De({type:dt("audio"),data:WT,mimeType:me(),_meta:Re(De({}).passthrough())}).passthrough(),f6=De({type:dt("resource"),resource:dn([y$,E$]),_meta:Re(De({}).passthrough())}).passthrough(),p6=S$.extend({type:dt("resource_link")}),R$=dn([YT,KT,ZT,p6,f6]),m6=De({role:Ci(["user","assistant"]),content:R$}).passthrough(),A$=la.extend({description:Re(me()),messages:Ve(m6)}),h6=Ya.extend({method:dt("notifications/prompts/list_changed")}),g6=De({title:Re(me()),readOnlyHint:Re(Dr()),destructiveHint:Re(Dr()),idempotentHint:Re(Dr()),openWorldHint:Re(Dr())}).passthrough(),v6=xd.extend({description:Re(me()),inputSchema:De({type:dt("object"),properties:Re(De({}).passthrough()),required:Re(Ve(me()))}).passthrough(),outputSchema:Re(De({type:dt("object"),properties:Re(De({}).passthrough()),required:Re(Ve(me()))}).passthrough()),annotations:Re(g6),_meta:Re(De({}).passthrough())}).merge(wd),b6=Mm.extend({method:dt("tools/list")}),C$=Pm.extend({tools:Ve(v6)}),XT=la.extend({content:Ve(R$).default([]),structuredContent:De({}).passthrough().optional(),isError:Re(Dr())});XT.or(la.extend({toolResult:yd()}));const y6=Tn.extend({method:dt("tools/call"),params:sa.extend({name:me(),arguments:Re(Ed(yd()))})}),E6=Ya.extend({method:dt("notifications/tools/list_changed")}),N$=Ci(["debug","info","notice","warning","error","critical","alert","emergency"]),S6=Tn.extend({method:dt("logging/setLevel"),params:sa.extend({level:N$})}),w6=Ya.extend({method:dt("notifications/message"),params:Sd.extend({level:N$,logger:Re(me()),data:yd()})}),x6=De({name:me().optional()}).passthrough(),_6=De({hints:Re(Ve(x6)),costPriority:Re(Ur().min(0).max(1)),speedPriority:Re(Ur().min(0).max(1)),intelligencePriority:Re(Ur().min(0).max(1))}).passthrough(),T6=De({role:Ci(["user","assistant"]),content:dn([YT,KT,ZT])}).passthrough(),R6=Tn.extend({method:dt("sampling/createMessage"),params:sa.extend({messages:Ve(T6),systemPrompt:Re(me()),includeContext:Re(Ci(["none","thisServer","allServers"])),temperature:Re(Ur()),maxTokens:Ur().int(),stopSequences:Re(Ve(me())),metadata:Re(De({}).passthrough()),modelPreferences:Re(_6)})}),A6=la.extend({model:me(),stopReason:Re(Ci(["endTurn","stopSequence","maxTokens"]).or(me())),role:Ci(["user","assistant"]),content:B9("type",[YT,KT,ZT])}),C6=De({type:dt("boolean"),title:Re(me()),description:Re(me()),default:Re(Dr())}).passthrough(),N6=De({type:dt("string"),title:Re(me()),description:Re(me()),minLength:Re(Ur()),maxLength:Re(Ur()),format:Re(Ci(["email","uri","date","date-time"]))}).passthrough(),k6=De({type:Ci(["number","integer"]),title:Re(me()),description:Re(me()),minimum:Re(Ur()),maximum:Re(Ur())}).passthrough(),I6=De({type:dt("string"),title:Re(me()),description:Re(me()),enum:Ve(me()),enumNames:Re(Ve(me()))}).passthrough(),O6=dn([C6,N6,k6,I6]),D6=Tn.extend({method:dt("elicitation/create"),params:sa.extend({message:me(),requestedSchema:De({type:dt("object"),properties:Ed(me(),O6),required:Re(Ve(me()))}).passthrough()})}),L6=la.extend({action:Ci(["accept","decline","cancel"]),content:Re(Ed(me(),yd()))}),M6=De({type:dt("ref/resource"),uri:me()}).passthrough(),P6=De({type:dt("ref/prompt"),name:me()}).passthrough(),j6=Tn.extend({method:dt("completion/complete"),params:sa.extend({ref:dn([P6,M6]),argument:De({name:me(),value:me()}).passthrough(),context:Re(De({arguments:Re(Ed(me(),me()))}))})}),k$=la.extend({completion:De({values:Ve(me()).max(100),total:Re(Ur().int()),hasMore:Re(Dr())}).passthrough()}),U6=De({uri:me().startsWith("file://"),name:Re(me()),_meta:Re(De({}).passthrough())}).passthrough(),F6=Tn.extend({method:dt("roots/list")}),z6=la.extend({roots:Ve(U6)}),$6=Ya.extend({method:dt("notifications/roots/list_changed")});dn([VT,Z9,j6,S6,d6,u6,t6,r6,n6,i6,o6,y6,b6]);dn([HT,GT,v$,$6]);dn([Cl,A6,L6,z6]);dn([VT,R6,D6,F6]);dn([HT,GT,w6,s6,a6,E6,h6]);dn([Cl,g$,k$,A$,T$,w$,x$,_$,XT,C$]);class So extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}}const B6=6e4;class q6{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(HT,r=>{const n=this._requestHandlerAbortControllers.get(r.params.requestId);n?.abort(r.params.reason)}),this.setNotificationHandler(GT,r=>{this._onprogress(r)}),this.setRequestHandler(VT,r=>({}))}_setupTimeout(e,r,n,a,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:s,onTimeout:a})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new So(Oa.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,n,a;this._transport=e;const s=(r=this.transport)===null||r===void 0?void 0:r.onclose;this._transport.onclose=()=>{s?.(),this._onclose()};const l=(n=this.transport)===null||n===void 0?void 0:n.onerror;this._transport.onerror=d=>{l?.(d),this._onerror(d)};const c=(a=this._transport)===null||a===void 0?void 0:a.onmessage;this._transport.onmessage=(d,f)=>{c?.(d,f),b_(d)||W9(d)?this._onresponse(d):d$(d)?this._onrequest(d,f):G9(d)?this._onnotification(d):this._onerror(new Error(`Unknown message type: ${JSON.stringify(d)}`))},await this._transport.start()}_onclose(){var e;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,(e=this.onclose)===null||e===void 0||e.call(this);const n=new So(Oa.ConnectionClosed,"Connection closed");for(const a of r.values())a(n)}_onerror(e){var r;(r=this.onerror)===null||r===void 0||r.call(this,e)}_onnotification(e){var r;const n=(r=this._notificationHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,r){var n,a;const s=(n=this._requestHandlers.get(e.method))!==null&&n!==void 0?n:this.fallbackRequestHandler,l=this._transport;if(s===void 0){l?.send({jsonrpc:"2.0",id:e.id,error:{code:Oa.MethodNotFound,message:"Method not found"}}).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(e.id,c);const d={signal:c.signal,sessionId:l?.sessionId,_meta:(a=e.params)===null||a===void 0?void 0:a._meta,sendNotification:f=>this.notification(f,{relatedRequestId:e.id}),sendRequest:(f,m,h)=>this.request(f,m,{...h,relatedRequestId:e.id}),authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo};Promise.resolve().then(()=>s(e,d)).then(f=>{if(!c.signal.aborted)return l?.send({result:f,jsonrpc:"2.0",id:e.id})},f=>{var m;if(!c.signal.aborted)return l?.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(f.code)?f.code:Oa.InternalError,message:(m=f.message)!==null&&m!==void 0?m:"Internal error"}})}).catch(f=>this._onerror(new Error(`Failed to send response: ${f}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:r,...n}=e.params,a=Number(r),s=this._progressHandlers.get(a);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const l=this._responseHandlers.get(a),c=this._timeoutInfo.get(a);if(c&&l&&c.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){l(d);return}s(n)}_onresponse(e){const r=Number(e.id),n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),b_(e))n(e);else{const a=new So(e.error.code,e.error.message,e.error.data);n(a)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)===null||e===void 0?void 0:e.close())}request(e,r,n){const{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}=n??{};return new Promise((c,d)=>{var f,m,h,v,b,x;if(!this._transport){d(new Error("Not connected"));return}((f=this._options)===null||f===void 0?void 0:f.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),(m=n?.signal)===null||m===void 0||m.throwIfAborted();const S=this._requestMessageId++,R={...e,jsonrpc:"2.0",id:S};n?.onprogress&&(this._progressHandlers.set(S,n.onprogress),R.params={...e.params,_meta:{...((h=e.params)===null||h===void 0?void 0:h._meta)||{},progressToken:S}});const w=C=>{var k;this._responseHandlers.delete(S),this._progressHandlers.delete(S),this._cleanupTimeout(S),(k=this._transport)===null||k===void 0||k.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:S,reason:String(C)}},{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(N=>this._onerror(new Error(`Failed to send cancellation: ${N}`))),d(C)};this._responseHandlers.set(S,C=>{var k;if(!(!((k=n?.signal)===null||k===void 0)&&k.aborted)){if(C instanceof Error)return d(C);try{const N=r.parse(C.result);c(N)}catch(N){d(N)}}}),(v=n?.signal)===null||v===void 0||v.addEventListener("abort",()=>{var C;w((C=n?.signal)===null||C===void 0?void 0:C.reason)});const _=(b=n?.timeout)!==null&&b!==void 0?b:B6,A=()=>w(new So(Oa.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(S,_,n?.maxTotalTimeout,A,(x=n?.resetTimeoutOnProgress)!==null&&x!==void 0?x:!1),this._transport.send(R,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(C=>{this._cleanupTimeout(S),d(C)})})}async notification(e,r){var n,a;if(!this._transport)throw new Error("Not connected");if(this.assertNotificationCapability(e.method),((a=(n=this._options)===null||n===void 0?void 0:n.debouncedNotificationMethods)!==null&&a!==void 0?a:[]).includes(e.method)&&!e.params&&!r?.relatedRequestId){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var d;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;const f={...e,jsonrpc:"2.0"};(d=this._transport)===null||d===void 0||d.send(f,r).catch(m=>this._onerror(m))});return}const c={...e,jsonrpc:"2.0"};await this._transport.send(c,r)}setRequestHandler(e,r){const n=e.shape.method.value;this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(a,s)=>Promise.resolve(r(e.parse(a),s)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,n=>Promise.resolve(r(e.parse(n))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}function H6(t,e){return Object.entries(e).reduce((r,[n,a])=>(a&&typeof a=="object"?r[n]=r[n]?{...r[n],...a}:a:r[n]=a,r),{...t})}var _u={exports:{}};var V6=_u.exports,Zk;function G6(){return Zk||(Zk=1,(function(t,e){(function(r,n){n(e)})(V6,(function(r){function n(){for(var re=arguments.length,Y=Array(re),ae=0;ae<re;ae++)Y[ae]=arguments[ae];if(Y.length>1){Y[0]=Y[0].slice(0,-1);for(var ve=Y.length-1,pe=1;pe<ve;++pe)Y[pe]=Y[pe].slice(1,-1);return Y[ve]=Y[ve].slice(1),Y.join("")}else return Y[0]}function a(re){return"(?:"+re+")"}function s(re){return re===void 0?"undefined":re===null?"null":Object.prototype.toString.call(re).split(" ").pop().split("]").shift().toLowerCase()}function l(re){return re.toUpperCase()}function c(re){return re!=null?re instanceof Array?re:typeof re.length!="number"||re.split||re.setInterval||re.call?[re]:Array.prototype.slice.call(re):[]}function d(re,Y){var ae=re;if(Y)for(var ve in Y)ae[ve]=Y[ve];return ae}function f(re){var Y="[A-Za-z]",ae="[0-9]",ve=n(ae,"[A-Fa-f]"),pe=a(a("%[EFef]"+ve+"%"+ve+ve+"%"+ve+ve)+"|"+a("%[89A-Fa-f]"+ve+"%"+ve+ve)+"|"+a("%"+ve+ve)),Pe="[\\:\\/\\?\\#\\[\\]\\@]",Ue="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",pt=n(Pe,Ue),Ut=re?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",sr=re?"[\\uE000-\\uF8FF]":"[]",bt=n(Y,ae,"[\\-\\.\\_\\~]",Ut);a(Y+n(Y,ae,"[\\+\\-\\.]")+"*"),a(a(pe+"|"+n(bt,Ue,"[\\:]"))+"*");var Ft=a(a("25[0-5]")+"|"+a("2[0-4]"+ae)+"|"+a("1"+ae+ae)+"|"+a("0?[1-9]"+ae)+"|0?0?"+ae),Wt=a(Ft+"\\."+Ft+"\\."+Ft+"\\."+Ft),nt=a(ve+"{1,4}"),Dt=a(a(nt+"\\:"+nt)+"|"+Wt),Yt=a(a(nt+"\\:")+"{6}"+Dt),Pt=a("\\:\\:"+a(nt+"\\:")+"{5}"+Dt),on=a(a(nt)+"?\\:\\:"+a(nt+"\\:")+"{4}"+Dt),zt=a(a(a(nt+"\\:")+"{0,1}"+nt)+"?\\:\\:"+a(nt+"\\:")+"{3}"+Dt),Cn=a(a(a(nt+"\\:")+"{0,2}"+nt)+"?\\:\\:"+a(nt+"\\:")+"{2}"+Dt),Qa=a(a(a(nt+"\\:")+"{0,3}"+nt)+"?\\:\\:"+nt+"\\:"+Dt),sn=a(a(a(nt+"\\:")+"{0,4}"+nt)+"?\\:\\:"+Dt),Cr=a(a(a(nt+"\\:")+"{0,5}"+nt)+"?\\:\\:"+nt),Bn=a(a(a(nt+"\\:")+"{0,6}"+nt)+"?\\:\\:"),Ta=a([Yt,Pt,on,zt,Cn,Qa,sn,Cr,Bn].join("|")),qn=a(a(bt+"|"+pe)+"+");a("[vV]"+ve+"+\\."+n(bt,Ue,"[\\:]")+"+"),a(a(pe+"|"+n(bt,Ue))+"*");var Mo=a(pe+"|"+n(bt,Ue,"[\\:\\@]"));return a(a(pe+"|"+n(bt,Ue,"[\\@]"))+"+"),a(a(Mo+"|"+n("[\\/\\?]",sr))+"*"),{NOT_SCHEME:new RegExp(n("[^]",Y,ae,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",bt,Ue),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",bt,Ue),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",bt,Ue),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",bt,Ue),"g"),NOT_QUERY:new RegExp(n("[^\\%]",bt,Ue,"[\\:\\@\\/\\?]",sr),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",bt,Ue,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",bt,Ue),"g"),UNRESERVED:new RegExp(bt,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",bt,pt),"g"),PCT_ENCODED:new RegExp(pe,"g"),IPV4ADDRESS:new RegExp("^("+Wt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Ta+")"+a(a("\\%25|\\%(?!"+ve+"{2})")+"("+qn+")")+"?\\]?$")}}var m=f(!1),h=f(!0),v=(function(){function re(Y,ae){var ve=[],pe=!0,Pe=!1,Ue=void 0;try{for(var pt=Y[Symbol.iterator](),Ut;!(pe=(Ut=pt.next()).done)&&(ve.push(Ut.value),!(ae&&ve.length===ae));pe=!0);}catch(sr){Pe=!0,Ue=sr}finally{try{!pe&&pt.return&&pt.return()}finally{if(Pe)throw Ue}}return ve}return function(Y,ae){if(Array.isArray(Y))return Y;if(Symbol.iterator in Object(Y))return re(Y,ae);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),b=function(re){if(Array.isArray(re)){for(var Y=0,ae=Array(re.length);Y<re.length;Y++)ae[Y]=re[Y];return ae}else return Array.from(re)},x=2147483647,S=36,R=1,w=26,_=38,A=700,C=72,k=128,N="-",I=/^xn--/,O=/[^\0-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=S-R,V=Math.floor,X=String.fromCharCode;function Q(re){throw new RangeError(L[re])}function oe(re,Y){for(var ae=[],ve=re.length;ve--;)ae[ve]=Y(re[ve]);return ae}function U(re,Y){var ae=re.split("@"),ve="";ae.length>1&&(ve=ae[0]+"@",re=ae[1]),re=re.replace(M,".");var pe=re.split("."),Pe=oe(pe,Y).join(".");return ve+Pe}function W(re){for(var Y=[],ae=0,ve=re.length;ae<ve;){var pe=re.charCodeAt(ae++);if(pe>=55296&&pe<=56319&&ae<ve){var Pe=re.charCodeAt(ae++);(Pe&64512)==56320?Y.push(((pe&1023)<<10)+(Pe&1023)+65536):(Y.push(pe),ae--)}else Y.push(pe)}return Y}var H=function(Y){return String.fromCodePoint.apply(String,b(Y))},te=function(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:S},se=function(Y,ae){return Y+22+75*(Y<26)-((ae!=0)<<5)},B=function(Y,ae,ve){var pe=0;for(Y=ve?V(Y/A):Y>>1,Y+=V(Y/ae);Y>P*w>>1;pe+=S)Y=V(Y/P);return V(pe+(P+1)*Y/(Y+_))},q=function(Y){var ae=[],ve=Y.length,pe=0,Pe=k,Ue=C,pt=Y.lastIndexOf(N);pt<0&&(pt=0);for(var Ut=0;Ut<pt;++Ut)Y.charCodeAt(Ut)>=128&&Q("not-basic"),ae.push(Y.charCodeAt(Ut));for(var sr=pt>0?pt+1:0;sr<ve;){for(var bt=pe,Ft=1,Wt=S;;Wt+=S){sr>=ve&&Q("invalid-input");var nt=te(Y.charCodeAt(sr++));(nt>=S||nt>V((x-pe)/Ft))&&Q("overflow"),pe+=nt*Ft;var Dt=Wt<=Ue?R:Wt>=Ue+w?w:Wt-Ue;if(nt<Dt)break;var Yt=S-Dt;Ft>V(x/Yt)&&Q("overflow"),Ft*=Yt}var Pt=ae.length+1;Ue=B(pe-bt,Pt,bt==0),V(pe/Pt)>x-Pe&&Q("overflow"),Pe+=V(pe/Pt),pe%=Pt,ae.splice(pe++,0,Pe)}return String.fromCodePoint.apply(String,ae)},$=function(Y){var ae=[];Y=W(Y);var ve=Y.length,pe=k,Pe=0,Ue=C,pt=!0,Ut=!1,sr=void 0;try{for(var bt=Y[Symbol.iterator](),Ft;!(pt=(Ft=bt.next()).done);pt=!0){var Wt=Ft.value;Wt<128&&ae.push(X(Wt))}}catch(Fi){Ut=!0,sr=Fi}finally{try{!pt&&bt.return&&bt.return()}finally{if(Ut)throw sr}}var nt=ae.length,Dt=nt;for(nt&&ae.push(N);Dt<ve;){var Yt=x,Pt=!0,on=!1,zt=void 0;try{for(var Cn=Y[Symbol.iterator](),Qa;!(Pt=(Qa=Cn.next()).done);Pt=!0){var sn=Qa.value;sn>=pe&&sn<Yt&&(Yt=sn)}}catch(Fi){on=!0,zt=Fi}finally{try{!Pt&&Cn.return&&Cn.return()}finally{if(on)throw zt}}var Cr=Dt+1;Yt-pe>V((x-Pe)/Cr)&&Q("overflow"),Pe+=(Yt-pe)*Cr,pe=Yt;var Bn=!0,Ta=!1,qn=void 0;try{for(var Mo=Y[Symbol.iterator](),Po;!(Bn=(Po=Mo.next()).done);Bn=!0){var jo=Po.value;if(jo<pe&&++Pe>x&&Q("overflow"),jo==pe){for(var mn=Pe,zr=S;;zr+=S){var Uo=zr<=Ue?R:zr>=Ue+w?w:zr-Ue;if(mn<Uo)break;var Hd=mn-Uo,Os=S-Uo;ae.push(X(se(Uo+Hd%Os,0))),mn=V(Hd/Os)}ae.push(X(se(mn,0))),Ue=B(Pe,Cr,Dt==nt),Pe=0,++Dt}}}catch(Fi){Ta=!0,qn=Fi}finally{try{!Bn&&Mo.return&&Mo.return()}finally{if(Ta)throw qn}}++Pe,++pe}return ae.join("")},K=function(Y){return U(Y,function(ae){return I.test(ae)?q(ae.slice(4).toLowerCase()):ae})},J=function(Y){return U(Y,function(ae){return O.test(ae)?"xn--"+$(ae):ae})},z={version:"2.1.0",ucs2:{decode:W,encode:H},decode:q,encode:$,toASCII:J,toUnicode:K},j={};function Z(re){var Y=re.charCodeAt(0),ae=void 0;return Y<16?ae="%0"+Y.toString(16).toUpperCase():Y<128?ae="%"+Y.toString(16).toUpperCase():Y<2048?ae="%"+(Y>>6|192).toString(16).toUpperCase()+"%"+(Y&63|128).toString(16).toUpperCase():ae="%"+(Y>>12|224).toString(16).toUpperCase()+"%"+(Y>>6&63|128).toString(16).toUpperCase()+"%"+(Y&63|128).toString(16).toUpperCase(),ae}function ne(re){for(var Y="",ae=0,ve=re.length;ae<ve;){var pe=parseInt(re.substr(ae+1,2),16);if(pe<128)Y+=String.fromCharCode(pe),ae+=3;else if(pe>=194&&pe<224){if(ve-ae>=6){var Pe=parseInt(re.substr(ae+4,2),16);Y+=String.fromCharCode((pe&31)<<6|Pe&63)}else Y+=re.substr(ae,6);ae+=6}else if(pe>=224){if(ve-ae>=9){var Ue=parseInt(re.substr(ae+4,2),16),pt=parseInt(re.substr(ae+7,2),16);Y+=String.fromCharCode((pe&15)<<12|(Ue&63)<<6|pt&63)}else Y+=re.substr(ae,9);ae+=9}else Y+=re.substr(ae,3),ae+=3}return Y}function G(re,Y){function ae(ve){var pe=ne(ve);return pe.match(Y.UNRESERVED)?pe:ve}return re.scheme&&(re.scheme=String(re.scheme).replace(Y.PCT_ENCODED,ae).toLowerCase().replace(Y.NOT_SCHEME,"")),re.userinfo!==void 0&&(re.userinfo=String(re.userinfo).replace(Y.PCT_ENCODED,ae).replace(Y.NOT_USERINFO,Z).replace(Y.PCT_ENCODED,l)),re.host!==void 0&&(re.host=String(re.host).replace(Y.PCT_ENCODED,ae).toLowerCase().replace(Y.NOT_HOST,Z).replace(Y.PCT_ENCODED,l)),re.path!==void 0&&(re.path=String(re.path).replace(Y.PCT_ENCODED,ae).replace(re.scheme?Y.NOT_PATH:Y.NOT_PATH_NOSCHEME,Z).replace(Y.PCT_ENCODED,l)),re.query!==void 0&&(re.query=String(re.query).replace(Y.PCT_ENCODED,ae).replace(Y.NOT_QUERY,Z).replace(Y.PCT_ENCODED,l)),re.fragment!==void 0&&(re.fragment=String(re.fragment).replace(Y.PCT_ENCODED,ae).replace(Y.NOT_FRAGMENT,Z).replace(Y.PCT_ENCODED,l)),re}function ce(re){return re.replace(/^0*(.*)/,"$1")||"0"}function he(re,Y){var ae=re.match(Y.IPV4ADDRESS)||[],ve=v(ae,2),pe=ve[1];return pe?pe.split(".").map(ce).join("."):re}function _e(re,Y){var ae=re.match(Y.IPV6ADDRESS)||[],ve=v(ae,3),pe=ve[1],Pe=ve[2];if(pe){for(var Ue=pe.toLowerCase().split("::").reverse(),pt=v(Ue,2),Ut=pt[0],sr=pt[1],bt=sr?sr.split(":").map(ce):[],Ft=Ut.split(":").map(ce),Wt=Y.IPV4ADDRESS.test(Ft[Ft.length-1]),nt=Wt?7:8,Dt=Ft.length-nt,Yt=Array(nt),Pt=0;Pt<nt;++Pt)Yt[Pt]=bt[Pt]||Ft[Dt+Pt]||"";Wt&&(Yt[nt-1]=he(Yt[nt-1],Y));var on=Yt.reduce(function(Cr,Bn,Ta){if(!Bn||Bn==="0"){var qn=Cr[Cr.length-1];qn&&qn.index+qn.length===Ta?qn.length++:Cr.push({index:Ta,length:1})}return Cr},[]),zt=on.sort(function(Cr,Bn){return Bn.length-Cr.length})[0],Cn=void 0;if(zt&&zt.length>1){var Qa=Yt.slice(0,zt.index),sn=Yt.slice(zt.index+zt.length);Cn=Qa.join(":")+"::"+sn.join(":")}else Cn=Yt.join(":");return Pe&&(Cn+="%"+Pe),Cn}else return re}var ye=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Se="".match(/(){0}/)[1]===void 0;function Ne(re){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae={},ve=Y.iri!==!1?h:m;Y.reference==="suffix"&&(re=(Y.scheme?Y.scheme+":":"")+"//"+re);var pe=re.match(ye);if(pe){Se?(ae.scheme=pe[1],ae.userinfo=pe[3],ae.host=pe[4],ae.port=parseInt(pe[5],10),ae.path=pe[6]||"",ae.query=pe[7],ae.fragment=pe[8],isNaN(ae.port)&&(ae.port=pe[5])):(ae.scheme=pe[1]||void 0,ae.userinfo=re.indexOf("@")!==-1?pe[3]:void 0,ae.host=re.indexOf("//")!==-1?pe[4]:void 0,ae.port=parseInt(pe[5],10),ae.path=pe[6]||"",ae.query=re.indexOf("?")!==-1?pe[7]:void 0,ae.fragment=re.indexOf("#")!==-1?pe[8]:void 0,isNaN(ae.port)&&(ae.port=re.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?pe[4]:void 0)),ae.host&&(ae.host=_e(he(ae.host,ve),ve)),ae.scheme===void 0&&ae.userinfo===void 0&&ae.host===void 0&&ae.port===void 0&&!ae.path&&ae.query===void 0?ae.reference="same-document":ae.scheme===void 0?ae.reference="relative":ae.fragment===void 0?ae.reference="absolute":ae.reference="uri",Y.reference&&Y.reference!=="suffix"&&Y.reference!==ae.reference&&(ae.error=ae.error||"URI is not a "+Y.reference+" reference.");var Pe=j[(Y.scheme||ae.scheme||"").toLowerCase()];if(!Y.unicodeSupport&&(!Pe||!Pe.unicodeSupport)){if(ae.host&&(Y.domainHost||Pe&&Pe.domainHost))try{ae.host=z.toASCII(ae.host.replace(ve.PCT_ENCODED,ne).toLowerCase())}catch(Ue){ae.error=ae.error||"Host's domain name can not be converted to ASCII via punycode: "+Ue}G(ae,m)}else G(ae,ve);Pe&&Pe.parse&&Pe.parse(ae,Y)}else ae.error=ae.error||"URI can not be parsed.";return ae}function ge(re,Y){var ae=Y.iri!==!1?h:m,ve=[];return re.userinfo!==void 0&&(ve.push(re.userinfo),ve.push("@")),re.host!==void 0&&ve.push(_e(he(String(re.host),ae),ae).replace(ae.IPV6ADDRESS,function(pe,Pe,Ue){return"["+Pe+(Ue?"%25"+Ue:"")+"]"})),(typeof re.port=="number"||typeof re.port=="string")&&(ve.push(":"),ve.push(String(re.port))),ve.length?ve.join(""):void 0}var ke=/^\.\.?\//,Oe=/^\/\.(\/|$)/,Xe=/^\/\.\.(\/|$)/,ot=/^\/?(?:.|\n)*?(?=\/|$)/;function $e(re){for(var Y=[];re.length;)if(re.match(ke))re=re.replace(ke,"");else if(re.match(Oe))re=re.replace(Oe,"/");else if(re.match(Xe))re=re.replace(Xe,"/"),Y.pop();else if(re==="."||re==="..")re="";else{var ae=re.match(ot);if(ae){var ve=ae[0];re=re.slice(ve.length),Y.push(ve)}else throw new Error("Unexpected dot segment condition")}return Y.join("")}function We(re){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=Y.iri?h:m,ve=[],pe=j[(Y.scheme||re.scheme||"").toLowerCase()];if(pe&&pe.serialize&&pe.serialize(re,Y),re.host&&!ae.IPV6ADDRESS.test(re.host)){if(Y.domainHost||pe&&pe.domainHost)try{re.host=Y.iri?z.toUnicode(re.host):z.toASCII(re.host.replace(ae.PCT_ENCODED,ne).toLowerCase())}catch(pt){re.error=re.error||"Host's domain name can not be converted to "+(Y.iri?"Unicode":"ASCII")+" via punycode: "+pt}}G(re,ae),Y.reference!=="suffix"&&re.scheme&&(ve.push(re.scheme),ve.push(":"));var Pe=ge(re,Y);if(Pe!==void 0&&(Y.reference!=="suffix"&&ve.push("//"),ve.push(Pe),re.path&&re.path.charAt(0)!=="/"&&ve.push("/")),re.path!==void 0){var Ue=re.path;!Y.absolutePath&&(!pe||!pe.absolutePath)&&(Ue=$e(Ue)),Pe===void 0&&(Ue=Ue.replace(/^\/\//,"/%2F")),ve.push(Ue)}return re.query!==void 0&&(ve.push("?"),ve.push(re.query)),re.fragment!==void 0&&(ve.push("#"),ve.push(re.fragment)),ve.join("")}function Ae(re,Y){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ve=arguments[3],pe={};return ve||(re=Ne(We(re,ae),ae),Y=Ne(We(Y,ae),ae)),ae=ae||{},!ae.tolerant&&Y.scheme?(pe.scheme=Y.scheme,pe.userinfo=Y.userinfo,pe.host=Y.host,pe.port=Y.port,pe.path=$e(Y.path||""),pe.query=Y.query):(Y.userinfo!==void 0||Y.host!==void 0||Y.port!==void 0?(pe.userinfo=Y.userinfo,pe.host=Y.host,pe.port=Y.port,pe.path=$e(Y.path||""),pe.query=Y.query):(Y.path?(Y.path.charAt(0)==="/"?pe.path=$e(Y.path):((re.userinfo!==void 0||re.host!==void 0||re.port!==void 0)&&!re.path?pe.path="/"+Y.path:re.path?pe.path=re.path.slice(0,re.path.lastIndexOf("/")+1)+Y.path:pe.path=Y.path,pe.path=$e(pe.path)),pe.query=Y.query):(pe.path=re.path,Y.query!==void 0?pe.query=Y.query:pe.query=re.query),pe.userinfo=re.userinfo,pe.host=re.host,pe.port=re.port),pe.scheme=re.scheme),pe.fragment=Y.fragment,pe}function Le(re,Y,ae){var ve=d({scheme:"null"},ae);return We(Ae(Ne(re,ve),Ne(Y,ve),ve,!0),ve)}function Je(re,Y){return typeof re=="string"?re=We(Ne(re,Y),Y):s(re)==="object"&&(re=Ne(We(re,Y),Y)),re}function ft(re,Y,ae){return typeof re=="string"?re=We(Ne(re,ae),ae):s(re)==="object"&&(re=We(re,ae)),typeof Y=="string"?Y=We(Ne(Y,ae),ae):s(Y)==="object"&&(Y=We(Y,ae)),re===Y}function rt(re,Y){return re&&re.toString().replace(!Y||!Y.iri?m.ESCAPE:h.ESCAPE,Z)}function Rt(re,Y){return re&&re.toString().replace(!Y||!Y.iri?m.PCT_ENCODED:h.PCT_ENCODED,ne)}var Ot={scheme:"http",domainHost:!0,parse:function(Y,ae){return Y.host||(Y.error=Y.error||"HTTP URIs must have a host."),Y},serialize:function(Y,ae){var ve=String(Y.scheme).toLowerCase()==="https";return(Y.port===(ve?443:80)||Y.port==="")&&(Y.port=void 0),Y.path||(Y.path="/"),Y}},An={scheme:"https",domainHost:Ot.domainHost,parse:Ot.parse,serialize:Ot.serialize};function gr(re){return typeof re.secure=="boolean"?re.secure:String(re.scheme).toLowerCase()==="wss"}var ir={scheme:"ws",domainHost:!0,parse:function(Y,ae){var ve=Y;return ve.secure=gr(ve),ve.resourceName=(ve.path||"/")+(ve.query?"?"+ve.query:""),ve.path=void 0,ve.query=void 0,ve},serialize:function(Y,ae){if((Y.port===(gr(Y)?443:80)||Y.port==="")&&(Y.port=void 0),typeof Y.secure=="boolean"&&(Y.scheme=Y.secure?"wss":"ws",Y.secure=void 0),Y.resourceName){var ve=Y.resourceName.split("?"),pe=v(ve,2),Pe=pe[0],Ue=pe[1];Y.path=Pe&&Pe!=="/"?Pe:void 0,Y.query=Ue,Y.resourceName=void 0}return Y.fragment=void 0,Y}},Mt={scheme:"wss",domainHost:ir.domainHost,parse:ir.parse,serialize:ir.serialize},Zt={},dr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Sr="[0-9A-Fa-f]",zn=a(a("%[EFef]"+Sr+"%"+Sr+Sr+"%"+Sr+Sr)+"|"+a("%[89A-Fa-f]"+Sr+"%"+Sr+Sr)+"|"+a("%"+Sr+Sr)),or="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Gt="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",pn=n(Gt,'[\\"\\\\]'),ua="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",an=new RegExp(dr,"g"),Ke=new RegExp(zn,"g"),jt=new RegExp(n("[^]",or,"[\\.]",'[\\"]',pn),"g"),Qt=new RegExp(n("[^]",dr,ua),"g"),Lr=Qt;function $n(re){var Y=ne(re);return Y.match(an)?Y:re}var Xt={scheme:"mailto",parse:function(Y,ae){var ve=Y,pe=ve.to=ve.path?ve.path.split(","):[];if(ve.path=void 0,ve.query){for(var Pe=!1,Ue={},pt=ve.query.split("&"),Ut=0,sr=pt.length;Ut<sr;++Ut){var bt=pt[Ut].split("=");switch(bt[0]){case"to":for(var Ft=bt[1].split(","),Wt=0,nt=Ft.length;Wt<nt;++Wt)pe.push(Ft[Wt]);break;case"subject":ve.subject=Rt(bt[1],ae);break;case"body":ve.body=Rt(bt[1],ae);break;default:Pe=!0,Ue[Rt(bt[0],ae)]=Rt(bt[1],ae);break}}Pe&&(ve.headers=Ue)}ve.query=void 0;for(var Dt=0,Yt=pe.length;Dt<Yt;++Dt){var Pt=pe[Dt].split("@");if(Pt[0]=Rt(Pt[0]),ae.unicodeSupport)Pt[1]=Rt(Pt[1],ae).toLowerCase();else try{Pt[1]=z.toASCII(Rt(Pt[1],ae).toLowerCase())}catch(on){ve.error=ve.error||"Email address's domain name can not be converted to ASCII via punycode: "+on}pe[Dt]=Pt.join("@")}return ve},serialize:function(Y,ae){var ve=Y,pe=c(Y.to);if(pe){for(var Pe=0,Ue=pe.length;Pe<Ue;++Pe){var pt=String(pe[Pe]),Ut=pt.lastIndexOf("@"),sr=pt.slice(0,Ut).replace(Ke,$n).replace(Ke,l).replace(jt,Z),bt=pt.slice(Ut+1);try{bt=ae.iri?z.toUnicode(bt):z.toASCII(Rt(bt,ae).toLowerCase())}catch(Dt){ve.error=ve.error||"Email address's domain name can not be converted to "+(ae.iri?"Unicode":"ASCII")+" via punycode: "+Dt}pe[Pe]=sr+"@"+bt}ve.path=pe.join(",")}var Ft=Y.headers=Y.headers||{};Y.subject&&(Ft.subject=Y.subject),Y.body&&(Ft.body=Y.body);var Wt=[];for(var nt in Ft)Ft[nt]!==Zt[nt]&&Wt.push(nt.replace(Ke,$n).replace(Ke,l).replace(Qt,Z)+"="+Ft[nt].replace(Ke,$n).replace(Ke,l).replace(Lr,Z));return Wt.length&&(ve.query=Wt.join("&")),ve}},Zr=/^([^\:]+)\:(.*)/,_a={scheme:"urn",parse:function(Y,ae){var ve=Y.path&&Y.path.match(Zr),pe=Y;if(ve){var Pe=ae.scheme||pe.scheme||"urn",Ue=ve[1].toLowerCase(),pt=ve[2],Ut=Pe+":"+(ae.nid||Ue),sr=j[Ut];pe.nid=Ue,pe.nss=pt,pe.path=void 0,sr&&(pe=sr.parse(pe,ae))}else pe.error=pe.error||"URN can not be parsed.";return pe},serialize:function(Y,ae){var ve=ae.scheme||Y.scheme||"urn",pe=Y.nid,Pe=ve+":"+(ae.nid||pe),Ue=j[Pe];Ue&&(Y=Ue.serialize(Y,ae));var pt=Y,Ut=Y.nss;return pt.path=(pe||ae.nid)+":"+Ut,pt}},Xr=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Fr={scheme:"urn:uuid",parse:function(Y,ae){var ve=Y;return ve.uuid=ve.nss,ve.nss=void 0,!ae.tolerant&&(!ve.uuid||!ve.uuid.match(Xr))&&(ve.error=ve.error||"UUID is not valid."),ve},serialize:function(Y,ae){var ve=Y;return ve.nss=(Y.uuid||"").toLowerCase(),ve}};j[Ot.scheme]=Ot,j[An.scheme]=An,j[ir.scheme]=ir,j[Mt.scheme]=Mt,j[Xt.scheme]=Xt,j[_a.scheme]=_a,j[Fr.scheme]=Fr,r.SCHEMES=j,r.pctEncChar=Z,r.pctDecChars=ne,r.parse=Ne,r.removeDotSegments=$e,r.serialize=We,r.resolveComponents=Ae,r.resolve=Le,r.normalize=Je,r.equal=ft,r.escapeComponent=rt,r.unescapeComponent=Rt,Object.defineProperty(r,"__esModule",{value:!0})}))})(_u,_u.exports)),_u.exports}var Mv,Xk;function QT(){return Xk||(Xk=1,Mv=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var l=s[a];if(!t(e[l],r[l]))return!1}return!0}return e!==e&&r!==r}),Mv}var Pv,Qk;function W6(){return Qk||(Qk=1,Pv=function(e){for(var r=0,n=e.length,a=0,s;a<n;)r++,s=e.charCodeAt(a++),s>=55296&&s<=56319&&a<n&&(s=e.charCodeAt(a),(s&64512)==56320&&a++);return r}),Pv}var jv,Jk;function pc(){if(Jk)return jv;Jk=1,jv={copy:t,checkDataType:e,checkDataTypes:r,coerceToTypes:a,toHash:s,getProperty:d,escapeQuotes:f,equal:QT(),ucs2length:W6(),varOccurences:m,varReplace:h,schemaHasRules:v,schemaHasRulesExcept:b,schemaUnknownRules:x,toQuotedString:S,getPathExpr:R,getPath:w,getData:C,unescapeFragment:N,unescapeJsonPointer:M,escapeFragment:I,escapeJsonPointer:O};function t(L,P){P=P||{};for(var V in L)P[V]=L[V];return P}function e(L,P,V,X){var Q=X?" !== ":" === ",oe=X?" || ":" && ",U=X?"!":"",W=X?"":"!";switch(L){case"null":return P+Q+"null";case"array":return U+"Array.isArray("+P+")";case"object":return"("+U+P+oe+"typeof "+P+Q+'"object"'+oe+W+"Array.isArray("+P+"))";case"integer":return"(typeof "+P+Q+'"number"'+oe+W+"("+P+" % 1)"+oe+P+Q+P+(V?oe+U+"isFinite("+P+")":"")+")";case"number":return"(typeof "+P+Q+'"'+L+'"'+(V?oe+U+"isFinite("+P+")":"")+")";default:return"typeof "+P+Q+'"'+L+'"'}}function r(L,P,V){switch(L.length){case 1:return e(L[0],P,V,!0);default:var X="",Q=s(L);Q.array&&Q.object&&(X=Q.null?"(":"(!"+P+" || ",X+="typeof "+P+' !== "object")',delete Q.null,delete Q.array,delete Q.object),Q.number&&delete Q.integer;for(var oe in Q)X+=(X?" && ":"")+e(oe,P,V,!0);return X}}var n=s(["string","number","integer","boolean","null"]);function a(L,P){if(Array.isArray(P)){for(var V=[],X=0;X<P.length;X++){var Q=P[X];(n[Q]||L==="array"&&Q==="array")&&(V[V.length]=Q)}if(V.length)return V}else{if(n[P])return[P];if(L==="array"&&P==="array")return["array"]}}function s(L){for(var P={},V=0;V<L.length;V++)P[L[V]]=!0;return P}var l=/^[a-z$_][a-z$_0-9]*$/i,c=/'|\\/g;function d(L){return typeof L=="number"?"["+L+"]":l.test(L)?"."+L:"['"+f(L)+"']"}function f(L){return L.replace(c,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function m(L,P){P+="[^0-9]";var V=L.match(new RegExp(P,"g"));return V?V.length:0}function h(L,P,V){return P+="([^0-9])",V=V.replace(/\$/g,"$$$$"),L.replace(new RegExp(P,"g"),V+"$1")}function v(L,P){if(typeof L=="boolean")return!L;for(var V in L)if(P[V])return!0}function b(L,P,V){if(typeof L=="boolean")return!L&&V!="not";for(var X in L)if(X!=V&&P[X])return!0}function x(L,P){if(typeof L!="boolean"){for(var V in L)if(!P[V])return V}}function S(L){return"'"+f(L)+"'"}function R(L,P,V,X){var Q=V?"'/' + "+P+(X?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):X?"'[' + "+P+" + ']'":"'[\\'' + "+P+" + '\\']'";return k(L,Q)}function w(L,P,V){var X=S(V?"/"+O(P):d(P));return k(L,X)}var _=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C(L,P,V){var X,Q,oe,U;if(L==="")return"rootData";if(L[0]=="/"){if(!_.test(L))throw new Error("Invalid JSON-pointer: "+L);Q=L,oe="rootData"}else{if(U=L.match(A),!U)throw new Error("Invalid JSON-pointer: "+L);if(X=+U[1],Q=U[2],Q=="#"){if(X>=P)throw new Error("Cannot access property/index "+X+" levels up, current level is "+P);return V[P-X]}if(X>P)throw new Error("Cannot access data "+X+" levels up, current level is "+P);if(oe="data"+(P-X||""),!Q)return oe}for(var W=oe,H=Q.split("/"),te=0;te<H.length;te++){var se=H[te];se&&(oe+=d(M(se)),W+=" && "+oe)}return W}function k(L,P){return L=='""'?P:(L+" + "+P).replace(/([^\\])' \+ '/g,"$1")}function N(L){return M(decodeURIComponent(L))}function I(L){return encodeURIComponent(O(L))}function O(L){return L.replace(/~/g,"~0").replace(/\//g,"~1")}function M(L){return L.replace(/~1/g,"/").replace(/~0/g,"~")}return jv}var Uv,eI;function I$(){if(eI)return Uv;eI=1;var t=pc();Uv=e;function e(r){t.copy(r,this)}return Uv}var Fv={exports:{}},tI;function Y6(){if(tI)return Fv.exports;tI=1;var t=Fv.exports=function(n,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};e(a,l,c,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,a,s,l,c,d,f,m,h,v){if(l&&typeof l=="object"&&!Array.isArray(l)){a(l,c,d,f,m,h,v);for(var b in l){var x=l[b];if(Array.isArray(x)){if(b in t.arrayKeywords)for(var S=0;S<x.length;S++)e(n,a,s,x[S],c+"/"+b+"/"+S,d,c,b,l,S)}else if(b in t.propsKeywords){if(x&&typeof x=="object")for(var R in x)e(n,a,s,x[R],c+"/"+b+"/"+r(R),d,c,b,l,R)}else(b in t.keywords||n.allKeys&&!(b in t.skipKeywords))&&e(n,a,s,x,c+"/"+b,d,c,b,l)}s(l,c,d,f,m,h,v)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Fv.exports}var zv,rI;function JT(){if(rI)return zv;rI=1;var t=G6(),e=QT(),r=pc(),n=I$(),a=Y6();zv=s,s.normalizeId=w,s.fullPath=x,s.url=_,s.ids=A,s.inlineRef=h,s.schema=l;function s(C,k,N){var I=this._refs[N];if(typeof I=="string")if(this._refs[I])I=this._refs[I];else return s.call(this,C,k,I);if(I=I||this._schemas[N],I instanceof n)return h(I.schema,this._opts.inlineRefs)?I.schema:I.validate||this._compile(I);var O=l.call(this,k,N),M,L,P;return O&&(M=O.schema,k=O.root,P=O.baseId),M instanceof n?L=M.validate||C.call(this,M.schema,k,void 0,P):M!==void 0&&(L=h(M,this._opts.inlineRefs)?M:C.call(this,M,k,void 0,P)),L}function l(C,k){var N=t.parse(k),I=S(N),O=x(this._getId(C.schema));if(Object.keys(C.schema).length===0||I!==O){var M=w(I),L=this._refs[M];if(typeof L=="string")return c.call(this,C,L,N);if(L instanceof n)L.validate||this._compile(L),C=L;else if(L=this._schemas[M],L instanceof n){if(L.validate||this._compile(L),M==w(k))return{schema:L,root:C,baseId:O};C=L}else return;if(!C.schema)return;O=x(this._getId(C.schema))}return f.call(this,N,O,C.schema,C)}function c(C,k,N){var I=l.call(this,C,k);if(I){var O=I.schema,M=I.baseId;C=I.root;var L=this._getId(O);return L&&(M=_(M,L)),f.call(this,N,M,O,C)}}var d=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function f(C,k,N,I){if(C.fragment=C.fragment||"",C.fragment.slice(0,1)=="/"){for(var O=C.fragment.split("/"),M=1;M<O.length;M++){var L=O[M];if(L){if(L=r.unescapeFragment(L),N=N[L],N===void 0)break;var P;if(!d[L]&&(P=this._getId(N),P&&(k=_(k,P)),N.$ref)){var V=_(k,N.$ref),X=l.call(this,I,V);X&&(N=X.schema,I=X.root,k=X.baseId)}}}if(N!==void 0&&N!==I.schema)return{schema:N,root:I,baseId:k}}}var m=r.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function h(C,k){if(k===!1)return!1;if(k===void 0||k===!0)return v(C);if(k)return b(C)<=k}function v(C){var k;if(Array.isArray(C)){for(var N=0;N<C.length;N++)if(k=C[N],typeof k=="object"&&!v(k))return!1}else for(var I in C)if(I=="$ref"||(k=C[I],typeof k=="object"&&!v(k)))return!1;return!0}function b(C){var k=0,N;if(Array.isArray(C)){for(var I=0;I<C.length;I++)if(N=C[I],typeof N=="object"&&(k+=b(N)),k==1/0)return 1/0}else for(var O in C){if(O=="$ref")return 1/0;if(m[O])k++;else if(N=C[O],typeof N=="object"&&(k+=b(N)+1),k==1/0)return 1/0}return k}function x(C,k){k!==!1&&(C=w(C));var N=t.parse(C);return S(N)}function S(C){return t.serialize(C).split("#")[0]+"#"}var R=/#\/?$/;function w(C){return C?C.replace(R,""):""}function _(C,k){return k=w(k),t.resolve(C,k)}function A(C){var k=w(this._getId(C)),N={"":k},I={"":x(k,!1)},O={},M=this;return a(C,{allKeys:!0},function(L,P,V,X,Q,oe,U){if(P!==""){var W=M._getId(L),H=N[X],te=I[X]+"/"+Q;if(U!==void 0&&(te+="/"+(typeof U=="number"?U:r.escapeFragment(U))),typeof W=="string"){W=H=w(H?t.resolve(H,W):W);var se=M._refs[W];if(typeof se=="string"&&(se=M._refs[se]),se&&se.schema){if(!e(L,se.schema))throw new Error('id "'+W+'" resolves to more than one schema')}else if(W!=w(te))if(W[0]=="#"){if(O[W]&&!e(L,O[W]))throw new Error('id "'+W+'" resolves to more than one schema');O[W]=L}else M._refs[W]=te}N[P]=H,I[P]=te}}),O}return zv}var $v,nI;function eR(){if(nI)return $v;nI=1;var t=JT();$v={Validation:n(e),MissingRef:n(r)};function e(a){this.message="validation failed",this.errors=a,this.ajv=this.validation=!0}r.message=function(a,s){return"can't resolve reference "+s+" from id "+a};function r(a,s,l){this.message=l||r.message(a,s),this.missingRef=t.url(a,s),this.missingSchema=t.normalizeId(t.fullPath(this.missingRef))}function n(a){return a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a}return $v}var Bv,aI;function O$(){return aI||(aI=1,Bv=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&(function(s){return function(l){return function(c,d){var f={key:c,value:l[c]},m={key:d,value:l[d]};return s(f,m)}}})(e.cmp),a=[];return(function s(l){if(l&&l.toJSON&&typeof l.toJSON=="function"&&(l=l.toJSON()),l!==void 0){if(typeof l=="number")return isFinite(l)?""+l:"null";if(typeof l!="object")return JSON.stringify(l);var c,d;if(Array.isArray(l)){for(d="[",c=0;c<l.length;c++)c&&(d+=","),d+=s(l[c])||"null";return d+"]"}if(l===null)return"null";if(a.indexOf(l)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var f=a.push(l)-1,m=Object.keys(l).sort(n&&n(l));for(d="",c=0;c<m.length;c++){var h=m[c],v=s(l[h]);v&&(d&&(d+=","),d+=JSON.stringify(h)+":"+v)}return a.splice(f,1),"{"+d+"}"}})(t)}),Bv}var qv,iI;function D$(){return iI||(iI=1,qv=function(e,r,n){var a="",s=e.schema.$async===!0,l=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),c=e.self._getId(e.schema);if(e.opts.strictKeywords){var d=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(d){var f="unknown keyword: "+d;if(e.opts.strictKeywords==="log")e.logger.warn(f);else throw new Error(f)}}if(e.isTop&&(a+=" var validate = ",s&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",c&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" "+("/*# sourceURL="+c+" */")+" ")),typeof e.schema=="boolean"||!(l||e.schema.$ref)){var r="false schema",m=e.level,h=e.dataLevel,v=e.schema[r],b=e.schemaPath+e.util.getProperty(r),x=e.errSchemaPath+"/"+r,k=!e.opts.allErrors,O,S="data"+(h||""),C="valid"+m;if(e.schema===!1){e.isTop?k=!0:a+=" var "+C+" = false; ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?s?a+=" return data; ":a+=" validate.errors = null; return true; ":a+=" var "+C+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var _=e.isTop,m=e.level=0,h=e.dataLevel=0,S="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var A="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(A);else throw new Error(A)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{var m=e.level,h=e.dataLevel,S="data"+(h||"");if(c&&(e.baseId=e.resolve.url(e.baseId,c)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+m+" = errors;"}var C="valid"+m,k=!e.opts.allErrors,N="",I="",O,M=e.schema.type,L=Array.isArray(M);if(M&&e.opts.nullable&&e.schema.nullable===!0&&(L?M.indexOf("null")==-1&&(M=M.concat("null")):M!="null"&&(M=[M,"null"],L=!0)),L&&M.length==1&&(M=M[0],L=!1),e.schema.$ref&&l){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(l=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),M){if(e.opts.coerceTypes)var P=e.util.coerceToTypes(e.opts.coerceTypes,M);var V=e.RULES.types[M];if(P||L||V===!0||V&&!Oe(V)){var b=e.schemaPath+".type",x=e.errSchemaPath+"/type",b=e.schemaPath+".type",x=e.errSchemaPath+"/type",X=L?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[X](M,S,e.opts.strictNumbers,!0)+") { ",P){var Q="dataType"+m,oe="coerced"+m;a+=" var "+Q+" = typeof "+S+"; var "+oe+" = undefined; ",e.opts.coerceTypes=="array"&&(a+=" if ("+Q+" == 'object' && Array.isArray("+S+") && "+S+".length == 1) { "+S+" = "+S+"[0]; "+Q+" = typeof "+S+"; if ("+e.util.checkDataType(e.schema.type,S,e.opts.strictNumbers)+") "+oe+" = "+S+"; } "),a+=" if ("+oe+" !== undefined) ; ";var U=P;if(U)for(var W,H=-1,te=U.length-1;H<te;)W=U[H+=1],W=="string"?a+=" else if ("+Q+" == 'number' || "+Q+" == 'boolean') "+oe+" = '' + "+S+"; else if ("+S+" === null) "+oe+" = ''; ":W=="number"||W=="integer"?(a+=" else if ("+Q+" == 'boolean' || "+S+" === null || ("+Q+" == 'string' && "+S+" && "+S+" == +"+S+" ",W=="integer"&&(a+=" && !("+S+" % 1)"),a+=")) "+oe+" = +"+S+"; "):W=="boolean"?a+=" else if ("+S+" === 'false' || "+S+" === 0 || "+S+" === null) "+oe+" = false; else if ("+S+" === 'true' || "+S+" === 1) "+oe+" = true; ":W=="null"?a+=" else if ("+S+" === '' || "+S+" === 0 || "+S+" === false) "+oe+" = null; ":e.opts.coerceTypes=="array"&&W=="array"&&(a+=" else if ("+Q+" == 'string' || "+Q+" == 'number' || "+Q+" == 'boolean' || "+S+" == null) "+oe+" = ["+S+"]; ");a+=" else { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: { type: '",L?a+=""+M.join(","):a+=""+M,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",L?a+=""+M.join(","):a+=""+M,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+oe+" !== undefined) { ";var se=h?"data"+(h-1||""):"parentData",B=h?e.dataPathArr[h]:"parentDataProperty";a+=" "+S+" = "+oe+"; ",h||(a+="if ("+se+" !== undefined)"),a+=" "+se+"["+B+"] = "+oe+"; } "}else{var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: { type: '",L?a+=""+M.join(","):a+=""+M,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",L?a+=""+M.join(","):a+=""+M,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!l)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",k&&(a+=" } if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}");else{var q=e.RULES;if(q){for(var V,$=-1,K=q.length-1;$<K;)if(V=q[$+=1],Oe(V)){if(V.type&&(a+=" if ("+e.util.checkDataType(V.type,S,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(V.type=="object"&&e.schema.properties){var v=e.schema.properties,J=Object.keys(v),z=J;if(z)for(var j,Z=-1,ne=z.length-1;Z<ne;){j=z[Z+=1];var G=v[j];if(G.default!==void 0){var ce=S+e.util.getProperty(j);if(e.compositeRule){if(e.opts.strictDefaults){var A="default is ignored for: "+ce;if(e.opts.strictDefaults==="log")e.logger.warn(A);else throw new Error(A)}}else a+=" if ("+ce+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+ce+" === null || "+ce+" === '' "),a+=" ) "+ce+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(G.default)+" ":a+=" "+JSON.stringify(G.default)+" ",a+="; "}}}else if(V.type=="array"&&Array.isArray(e.schema.items)){var he=e.schema.items;if(he){for(var G,H=-1,_e=he.length-1;H<_e;)if(G=he[H+=1],G.default!==void 0){var ce=S+"["+H+"]";if(e.compositeRule){if(e.opts.strictDefaults){var A="default is ignored for: "+ce;if(e.opts.strictDefaults==="log")e.logger.warn(A);else throw new Error(A)}}else a+=" if ("+ce+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+ce+" === null || "+ce+" === '' "),a+=" ) "+ce+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(G.default)+" ":a+=" "+JSON.stringify(G.default)+" ",a+="; "}}}}var ye=V.rules;if(ye){for(var Se,Ne=-1,ge=ye.length-1;Ne<ge;)if(Se=ye[Ne+=1],Xe(Se)){var ke=Se.code(e,Se.keyword,V.type);ke&&(a+=" "+ke+" ",k&&(N+="}"))}}if(k&&(a+=" "+N+" ",N=""),V.type&&(a+=" } ",M&&M===V.type&&!P)){a+=" else { ";var b=e.schemaPath+".type",x=e.errSchemaPath+"/type",R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: { type: '",L?a+=""+M.join(","):a+=""+M,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",L?a+=""+M.join(","):a+=""+M,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}k&&(a+=" if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}")}}}k&&(a+=" "+I+" "),_?(s?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+C+" = errors === errs_"+m+";";function Oe($e){for(var We=$e.rules,Ae=0;Ae<We.length;Ae++)if(Xe(We[Ae]))return!0}function Xe($e){return e.schema[$e.keyword]!==void 0||$e.implements&&ot($e)}function ot($e){for(var We=$e.implements,Ae=0;Ae<We.length;Ae++)if(e.schema[We[Ae]]!==void 0)return!0}return a}),qv}var Hv,oI;function K6(){if(oI)return Hv;oI=1;var t=JT(),e=pc(),r=eR(),n=O$(),a=D$(),s=e.ucs2length,l=QT(),c=r.Validation;Hv=d;function d(w,_,A,C){var k=this,N=this._opts,I=[void 0],O={},M=[],L={},P=[],V={},X=[];_=_||{schema:w,refVal:I,refs:O};var Q=f.call(this,w,_,C),oe=this._compilations[Q.index];if(Q.compiling)return oe.callValidate=se;var U=this._formats,W=this.RULES;try{var H=B(w,_,A,C);oe.validate=H;var te=oe.callValidate;return te&&(te.schema=H.schema,te.errors=null,te.refs=H.refs,te.refVal=H.refVal,te.root=H.root,te.$async=H.$async,N.sourceCode&&(te.source=H.source)),H}finally{m.call(this,w,_,C)}function se(){var G=oe.validate,ce=G.apply(this,arguments);return se.errors=G.errors,ce}function B(G,ce,he,_e){var ye=!ce||ce&&ce.schema==G;if(ce.schema!=_.schema)return d.call(k,G,ce,he,_e);var Se=G.$async===!0,Ne=a({isTop:!0,schema:G,isRoot:ye,baseId:_e,root:ce,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:r.MissingRef,RULES:W,validate:a,util:e,resolve:t,resolveRef:q,usePattern:j,useDefault:Z,useCustomRule:ne,opts:N,formats:U,logger:k.logger,self:k});Ne=R(I,x)+R(M,v)+R(P,b)+R(X,S)+Ne,N.processCode&&(Ne=N.processCode(Ne,G));var ge;try{var ke=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",Ne);ge=ke(k,W,U,_,I,P,X,l,s,c),I[0]=ge}catch(Oe){throw k.logger.error("Error compiling schema, function code:",Ne),Oe}return ge.schema=G,ge.errors=null,ge.refs=O,ge.refVal=I,ge.root=ye?ge:ce,Se&&(ge.$async=!0),N.sourceCode===!0&&(ge.source={code:Ne,patterns:M,defaults:P}),ge}function q(G,ce,he){ce=t.url(G,ce);var _e=O[ce],ye,Se;if(_e!==void 0)return ye=I[_e],Se="refVal["+_e+"]",z(ye,Se);if(!he&&_.refs){var Ne=_.refs[ce];if(Ne!==void 0)return ye=_.refVal[Ne],Se=$(ce,ye),z(ye,Se)}Se=$(ce);var ge=t.call(k,B,_,ce);if(ge===void 0){var ke=A&&A[ce];ke&&(ge=t.inlineRef(ke,N.inlineRefs)?ke:d.call(k,ke,_,A,G))}if(ge===void 0)K(ce);else return J(ce,ge),z(ge,Se)}function $(G,ce){var he=I.length;return I[he]=ce,O[G]=he,"refVal"+he}function K(G){delete O[G]}function J(G,ce){var he=O[G];I[he]=ce}function z(G,ce){return typeof G=="object"||typeof G=="boolean"?{code:ce,schema:G,inline:!0}:{code:ce,$async:G&&!!G.$async}}function j(G){var ce=L[G];return ce===void 0&&(ce=L[G]=M.length,M[ce]=G),"pattern"+ce}function Z(G){switch(typeof G){case"boolean":case"number":return""+G;case"string":return e.toQuotedString(G);case"object":if(G===null)return"null";var ce=n(G),he=V[ce];return he===void 0&&(he=V[ce]=P.length,P[he]=G),"default"+he}}function ne(G,ce,he,_e){if(k._opts.validateSchema!==!1){var ye=G.definition.dependencies;if(ye&&!ye.every(function(We){return Object.prototype.hasOwnProperty.call(he,We)}))throw new Error("parent schema must have all required keywords: "+ye.join(","));var Se=G.definition.validateSchema;if(Se){var Ne=Se(ce);if(!Ne){var ge="keyword schema is invalid: "+k.errorsText(Se.errors);if(k._opts.validateSchema=="log")k.logger.error(ge);else throw new Error(ge)}}}var ke=G.definition.compile,Oe=G.definition.inline,Xe=G.definition.macro,ot;if(ke)ot=ke.call(k,ce,he,_e);else if(Xe)ot=Xe.call(k,ce,he,_e),N.validateSchema!==!1&&k.validateSchema(ot,!0);else if(Oe)ot=Oe.call(k,_e,G.keyword,ce,he);else if(ot=G.definition.validate,!ot)return;if(ot===void 0)throw new Error('custom keyword "'+G.keyword+'"failed to compile');var $e=X.length;return X[$e]=ot,{code:"customRule"+$e,validate:ot}}}function f(w,_,A){var C=h.call(this,w,_,A);return C>=0?{index:C,compiling:!0}:(C=this._compilations.length,this._compilations[C]={schema:w,root:_,baseId:A},{index:C,compiling:!1})}function m(w,_,A){var C=h.call(this,w,_,A);C>=0&&this._compilations.splice(C,1)}function h(w,_,A){for(var C=0;C<this._compilations.length;C++){var k=this._compilations[C];if(k.schema==w&&k.root==_&&k.baseId==A)return C}return-1}function v(w,_){return"var pattern"+w+" = new RegExp("+e.toQuotedString(_[w])+");"}function b(w){return"var default"+w+" = defaults["+w+"];"}function x(w,_){return _[w]===void 0?"":"var refVal"+w+" = refVal["+w+"];"}function S(w){return"var customRule"+w+" = customRules["+w+"];"}function R(w,_){if(!w.length)return"";for(var A="",C=0;C<w.length;C++)A+=_(C,w);return A}return Hv}var Vv={exports:{}},sI;function Z6(){if(sI)return Vv.exports;sI=1;var t=Vv.exports=function(){this._cache={}};return t.prototype.put=function(r,n){this._cache[r]=n},t.prototype.get=function(r){return this._cache[r]},t.prototype.del=function(r){delete this._cache[r]},t.prototype.clear=function(){this._cache={}},Vv.exports}var Gv,lI;function X6(){if(lI)return Gv;lI=1;var t=pc(),e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,a=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,s=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,f=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,m=/^(?:\/(?:[^~/]|~0|~1)*)*$/,h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,v=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Gv=b;function b(I){return I=I=="full"?"full":"fast",t.copy(b[I])}b.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:d,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:N,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v},b.full={date:S,time:R,"date-time":_,uri:C,"uri-reference":l,"uri-template":c,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:N,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v};function x(I){return I%4===0&&(I%100!==0||I%400===0)}function S(I){var O=I.match(e);if(!O)return!1;var M=+O[1],L=+O[2],P=+O[3];return L>=1&&L<=12&&P>=1&&P<=(L==2&&x(M)?29:r[L])}function R(I,O){var M=I.match(n);if(!M)return!1;var L=M[1],P=M[2],V=M[3],X=M[5];return(L<=23&&P<=59&&V<=59||L==23&&P==59&&V==60)&&(!O||X)}var w=/t|\s/i;function _(I){var O=I.split(w);return O.length==2&&S(O[0])&&R(O[1],!0)}var A=/\/|:/;function C(I){return A.test(I)&&s.test(I)}var k=/[^\\]\\Z/;function N(I){if(k.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}return Gv}var Wv,cI;function Q6(){return cI||(cI=1,Wv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.errSchemaPath+"/"+r,f=!e.opts.allErrors,m="data"+(l||""),h="valid"+s,v,b;if(c=="#"||c=="#/")e.isRoot?(v=e.async,b="validate"):(v=e.root.schema.$async===!0,b="root.refVal[0]");else{var x=e.resolveRef(e.baseId,c,e.isRoot);if(x===void 0){var S=e.MissingRefError.message(e.baseId,c);if(e.opts.missingRefs=="fail"){e.logger.error(S);var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&f?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f&&(a+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(S),f&&(a+=" if (true) { ");else throw new e.MissingRefError(e.baseId,c,S)}else if(x.inline){var _=e.util.copy(e);_.level++;var A="valid"+_.level;_.schema=x.schema,_.schemaPath="",_.errSchemaPath=c;var C=e.validate(_).replace(/validate\.schema/g,x.code);a+=" "+C+" ",f&&(a+=" if ("+A+") { ")}else v=x.$async===!0||e.async&&x.$async!==!1,b=x.code}if(b){var R=R||[];R.push(a),a="",e.opts.passContext?a+=" "+b+".call(this, ":a+=" "+b+"( ",a+=" "+m+", (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var k=l?"data"+(l-1||""):"parentData",N=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+k+" , "+N+", rootData) ";var I=a;if(a=R.pop(),v){if(!e.async)throw new Error("async schema referenced by sync schema");f&&(a+=" var "+h+"; "),a+=" try { await "+I+"; ",f&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",f&&(a+=" "+h+" = false; "),a+=" } ",f&&(a+=" if ("+h+") { ")}else a+=" if (!"+I+") { if (vErrors === null) vErrors = "+b+".errors; else vErrors = vErrors.concat("+b+".errors); errors = vErrors.length; } ",f&&(a+=" else { ")}return a}),Wv}var Yv,uI;function J6(){return uI||(uI=1,Yv=function(e,r,n){var a=" ",s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,f=e.util.copy(e),m="";f.level++;var h="valid"+f.level,v=f.baseId,b=!0,x=s;if(x)for(var S,R=-1,w=x.length-1;R<w;)S=x[R+=1],(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===!1:e.util.schemaHasRules(S,e.RULES.all))&&(b=!1,f.schema=S,f.schemaPath=l+"["+R+"]",f.errSchemaPath=c+"/"+R,a+=" "+e.validate(f)+" ",f.baseId=v,d&&(a+=" if ("+h+") { ",m+="}"));return d&&(b?a+=" if (true) { ":a+=" "+m.slice(0,-1)+" "),a}),Yv}var Kv,dI;function e8(){return dI||(dI=1,Kv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w=c.every(function(O){return e.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:e.util.schemaHasRules(O,e.RULES.all)});if(w){var _=x.baseId;a+=" var "+b+" = errors; var "+v+" = false; ";var A=e.compositeRule;e.compositeRule=x.compositeRule=!0;var C=c;if(C)for(var k,N=-1,I=C.length-1;N<I;)k=C[N+=1],x.schema=k,x.schemaPath=d+"["+N+"]",x.errSchemaPath=f+"/"+N,a+=" "+e.validate(x)+" ",x.baseId=_,a+=" "+v+" = "+v+" || "+R+"; if (!"+v+") { ",S+="}";e.compositeRule=x.compositeRule=A,a+=" "+S+" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else m&&(a+=" if (true) { ");return a}),Kv}var Zv,fI;function t8(){return fI||(fI=1,Zv=function(e,r,n){var a=" ",s=e.schema[r],l=e.errSchemaPath+"/"+r;e.opts.allErrors;var c=e.util.toQuotedString(s);return e.opts.$comment===!0?a+=" console.log("+c+");":typeof e.opts.$comment=="function"&&(a+=" self._opts.$comment("+c+", "+e.util.toQuotedString(l)+", validate.root.schema);"),a}),Zv}var Xv,pI;function r8(){return pI||(pI=1,Xv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data;b&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; "),b||(a+=" var schema"+s+" = validate.schema"+d+";"),a+="var "+v+" = equal("+h+", schema"+s+"); if (!"+v+") { ";var x=x||[];x.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValue: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=x.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),Xv}var Qv,mI;function n8(){return mI||(mI=1,Qv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w="i"+s,_=x.dataLevel=e.dataLevel+1,A="data"+_,C=e.baseId,k=e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all);if(a+="var "+b+" = errors;var "+v+";",k){var N=e.compositeRule;e.compositeRule=x.compositeRule=!0,x.schema=c,x.schemaPath=d,x.errSchemaPath=f,a+=" var "+R+" = false; for (var "+w+" = 0; "+w+" < "+h+".length; "+w+"++) { ",x.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0);var I=h+"["+w+"]";x.dataPathArr[_]=w;var O=e.validate(x);x.baseId=C,e.util.varOccurences(O,A)<2?a+=" "+e.util.varReplace(O,A,I)+" ":a+=" var "+A+" = "+I+"; "+O+" ",a+=" if ("+R+") break; } ",e.compositeRule=x.compositeRule=N,a+=" "+S+" if (!"+R+") {"}else a+=" if ("+h+".length == 0) {";var M=M||[];M.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var L=a;return a=M.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+L+"]); ":a+=" validate.errors = ["+L+"]; return false; ":a+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",k&&(a+=" errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}),Qv}var Jv,hI;function a8(){return hI||(hI=1,Jv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e),x="";b.level++;var S="valid"+b.level,R={},w={},_=e.opts.ownProperties;for(N in c)if(N!="__proto__"){var A=c[N],C=Array.isArray(A)?w:R;C[N]=A}a+="var "+v+" = errors;";var k=e.errorPath;a+="var missing"+s+";";for(var N in w)if(C=w[N],C.length){if(a+=" if ( "+h+e.util.getProperty(N)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(N)+"') "),m){a+=" && ( ";var I=C;if(I)for(var O,M=-1,L=I.length-1;M<L;){O=I[M+=1],M&&(a+=" || ");var P=e.util.getProperty(O),V=h+P;a+=" ( ( "+V+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:P)+") ) "}a+=")) { ";var X="missing"+s,Q="' + "+X+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,X,!0):k+" + "+X);var oe=oe||[];oe.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(N)+"', missingProperty: '"+Q+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",C.length==1?a+="property "+e.util.escapeQuotes(C[0]):a+="properties "+e.util.escapeQuotes(C.join(", ")),a+=" when property "+e.util.escapeQuotes(N)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var U=a;a=oe.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var W=C;if(W)for(var O,H=-1,te=W.length-1;H<te;){O=W[H+=1];var P=e.util.getProperty(O),Q=e.util.escapeQuotes(O),V=h+P;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,O,e.opts.jsonPointers)),a+=" if ( "+V+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(N)+"', missingProperty: '"+Q+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",C.length==1?a+="property "+e.util.escapeQuotes(C[0]):a+="properties "+e.util.escapeQuotes(C.join(", ")),a+=" when property "+e.util.escapeQuotes(N)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",m&&(x+="}",a+=" else { ")}e.errorPath=k;var se=b.baseId;for(var N in R){var A=R[N];(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===!1:e.util.schemaHasRules(A,e.RULES.all))&&(a+=" "+S+" = true; if ( "+h+e.util.getProperty(N)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(N)+"') "),a+=") { ",b.schema=A,b.schemaPath=d+e.util.getProperty(N),b.errSchemaPath=f+"/"+e.util.escapeFragment(N),a+=" "+e.validate(b)+" ",b.baseId=se,a+=" } ",m&&(a+=" if ("+S+") { ",x+="}"))}return m&&(a+=" "+x+" if ("+v+" == errors) {"),a}),Jv}var eb,gI;function i8(){return gI||(gI=1,eb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data;b&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var x="i"+s,S="schema"+s;b||(a+=" var "+S+" = validate.schema"+d+";"),a+="var "+v+";",b&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=""+v+" = false;for (var "+x+"=0; "+x+"<"+S+".length; "+x+"++) if (equal("+h+", "+S+"["+x+"])) { "+v+" = true; break; }",b&&(a+=" } "),a+=" if (!"+v+") { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValues: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),eb}var tb,vI;function o8(){return vI||(vI=1,tb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||"");if(e.opts.format===!1)return m&&(a+=" if (true) { "),a;var v=e.opts.$data&&c&&c.$data,b;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c;var x=e.opts.unknownFormats,S=Array.isArray(x);if(v){var R="format"+s,w="isObject"+s,_="formatType"+s;a+=" var "+R+" = formats["+b+"]; var "+w+" = typeof "+R+" == 'object' && !("+R+" instanceof RegExp) && "+R+".validate; var "+_+" = "+w+" && "+R+".type || 'string'; if ("+w+") { ",e.async&&(a+=" var async"+s+" = "+R+".async; "),a+=" "+R+" = "+R+".validate; } if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'string') || "),a+=" (",x!="ignore"&&(a+=" ("+b+" && !"+R+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+b+") == -1 "),a+=") || "),a+=" ("+R+" && "+_+" == '"+n+"' && !(typeof "+R+" == 'function' ? ",e.async?a+=" (async"+s+" ? await "+R+"("+h+") : "+R+"("+h+")) ":a+=" "+R+"("+h+") ",a+=" : "+R+".test("+h+"))))) {"}else{var R=e.formats[c];if(!R){if(x=="ignore")return e.logger.warn('unknown format "'+c+'" ignored in schema at path "'+e.errSchemaPath+'"'),m&&(a+=" if (true) { "),a;if(S&&x.indexOf(c)>=0)return m&&(a+=" if (true) { "),a;throw new Error('unknown format "'+c+'" is used in schema at path "'+e.errSchemaPath+'"')}var w=typeof R=="object"&&!(R instanceof RegExp)&&R.validate,_=w&&R.type||"string";if(w){var A=R.async===!0;R=R.validate}if(_!=n)return m&&(a+=" if (true) { "),a;if(A){if(!e.async)throw new Error("async format in sync schema");var C="formats"+e.util.getProperty(c)+".validate";a+=" if (!(await "+C+"("+h+"))) { "}else{a+=" if (! ";var C="formats"+e.util.getProperty(c);w&&(C+=".validate"),typeof R=="function"?a+=" "+C+"("+h+") ":a+=" "+C+".test("+h+") ",a+=") { "}}var k=k||[];k.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { format: ",v?a+=""+b:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match format "`,v?a+="' + "+b+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var N=a;return a=k.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+N+"]); ":a+=" validate.errors = ["+N+"]; return false; ":a+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),tb}var rb,bI;function s8(){return bI||(bI=1,rb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e);x.level++;var S="valid"+x.level,R=e.schema.then,w=e.schema.else,_=R!==void 0&&(e.opts.strictKeywords?typeof R=="object"&&Object.keys(R).length>0||R===!1:e.util.schemaHasRules(R,e.RULES.all)),A=w!==void 0&&(e.opts.strictKeywords?typeof w=="object"&&Object.keys(w).length>0||w===!1:e.util.schemaHasRules(w,e.RULES.all)),C=x.baseId;if(_||A){var k;x.createErrors=!1,x.schema=c,x.schemaPath=d,x.errSchemaPath=f,a+=" var "+b+" = errors; var "+v+" = true; ";var N=e.compositeRule;e.compositeRule=x.compositeRule=!0,a+=" "+e.validate(x)+" ",x.baseId=C,x.createErrors=!0,a+=" errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; } ",e.compositeRule=x.compositeRule=N,_?(a+=" if ("+S+") { ",x.schema=e.schema.then,x.schemaPath=e.schemaPath+".then",x.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(x)+" ",x.baseId=C,a+=" "+v+" = "+S+"; ",_&&A?(k="ifClause"+s,a+=" var "+k+" = 'then'; "):k="'then'",a+=" } ",A&&(a+=" else { ")):a+=" if (!"+S+") { ",A&&(x.schema=e.schema.else,x.schemaPath=e.schemaPath+".else",x.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(x)+" ",x.baseId=C,a+=" "+v+" = "+S+"; ",_&&A?(k="ifClause"+s,a+=" var "+k+" = 'else'; "):k="'else'",a+=" } "),a+=" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { failingKeyword: "+k+" } ",e.opts.messages!==!1&&(a+=` , message: 'should match "' + `+k+` + '" schema' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),rb}var nb,yI;function l8(){return yI||(yI=1,nb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w="i"+s,_=x.dataLevel=e.dataLevel+1,A="data"+_,C=e.baseId;if(a+="var "+b+" = errors;var "+v+";",Array.isArray(c)){var k=e.schema.additionalItems;if(k===!1){a+=" "+v+" = "+h+".length <= "+c.length+"; ";var N=f;f=e.errSchemaPath+"/additionalItems",a+=" if (!"+v+") { ";var I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+c.length+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+c.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var O=a;a=I.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",f=N,m&&(S+="}",a+=" else { ")}var M=c;if(M){for(var L,P=-1,V=M.length-1;P<V;)if(L=M[P+=1],e.opts.strictKeywords?typeof L=="object"&&Object.keys(L).length>0||L===!1:e.util.schemaHasRules(L,e.RULES.all)){a+=" "+R+" = true; if ("+h+".length > "+P+") { ";var X=h+"["+P+"]";x.schema=L,x.schemaPath=d+"["+P+"]",x.errSchemaPath=f+"/"+P,x.errorPath=e.util.getPathExpr(e.errorPath,P,e.opts.jsonPointers,!0),x.dataPathArr[_]=P;var Q=e.validate(x);x.baseId=C,e.util.varOccurences(Q,A)<2?a+=" "+e.util.varReplace(Q,A,X)+" ":a+=" var "+A+" = "+X+"; "+Q+" ",a+=" } ",m&&(a+=" if ("+R+") { ",S+="}")}}if(typeof k=="object"&&(e.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:e.util.schemaHasRules(k,e.RULES.all))){x.schema=k,x.schemaPath=e.schemaPath+".additionalItems",x.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+R+" = true; if ("+h+".length > "+c.length+") { for (var "+w+" = "+c.length+"; "+w+" < "+h+".length; "+w+"++) { ",x.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0);var X=h+"["+w+"]";x.dataPathArr[_]=w;var Q=e.validate(x);x.baseId=C,e.util.varOccurences(Q,A)<2?a+=" "+e.util.varReplace(Q,A,X)+" ":a+=" var "+A+" = "+X+"; "+Q+" ",m&&(a+=" if (!"+R+") break; "),a+=" } } ",m&&(a+=" if ("+R+") { ",S+="}")}}else if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){x.schema=c,x.schemaPath=d,x.errSchemaPath=f,a+=" for (var "+w+" = 0; "+w+" < "+h+".length; "+w+"++) { ",x.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0);var X=h+"["+w+"]";x.dataPathArr[_]=w;var Q=e.validate(x);x.baseId=C,e.util.varOccurences(Q,A)<2?a+=" "+e.util.varReplace(Q,A,X)+" ":a+=" var "+A+" = "+X+"; "+Q+" ",m&&(a+=" if (!"+R+") break; "),a+=" }"}return m&&(a+=" "+S+" if ("+b+" == errors) {"),a}),nb}var ab,EI;function SI(){return EI||(EI=1,ab=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,C,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c;var x=r=="maximum",S=x?"exclusiveMaximum":"exclusiveMinimum",R=e.schema[S],w=e.opts.$data&&R&&R.$data,_=x?"<":">",A=x?">":"<",C=void 0;if(!(v||typeof c=="number"||c===void 0))throw new Error(r+" must be number");if(!(w||R===void 0||typeof R=="number"||typeof R=="boolean"))throw new Error(S+" must be number or boolean");if(w){var k=e.util.getData(R.$data,l,e.dataPathArr),N="exclusive"+s,I="exclType"+s,O="exclIsNumber"+s,M="op"+s,L="' + "+M+" + '";a+=" var schemaExcl"+s+" = "+k+"; ",k="schemaExcl"+s,a+=" var "+N+"; var "+I+" = typeof "+k+"; if ("+I+" != 'boolean' && "+I+" != 'undefined' && "+I+" != 'number') { ";var C=S,P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(C||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" "+I+" == 'number' ? ( ("+N+" = "+b+" === undefined || "+k+" "+_+"= "+b+") ? "+h+" "+A+"= "+k+" : "+h+" "+A+" "+b+" ) : ( ("+N+" = "+k+" === true) ? "+h+" "+A+"= "+b+" : "+h+" "+A+" "+b+" ) || "+h+" !== "+h+") { var op"+s+" = "+N+" ? '"+_+"' : '"+_+"='; ",c===void 0&&(C=S,f=e.errSchemaPath+"/"+S,b=k,v=w)}else{var O=typeof R=="number",L=_;if(O&&v){var M="'"+L+"'";a+=" if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" ( "+b+" === undefined || "+R+" "+_+"= "+b+" ? "+h+" "+A+"= "+R+" : "+h+" "+A+" "+b+" ) || "+h+" !== "+h+") { "}else{O&&c===void 0?(N=!0,C=S,f=e.errSchemaPath+"/"+S,b=R,A+="="):(O&&(b=Math[x?"min":"max"](R,c)),R===(O?b:!0)?(N=!0,C=S,f=e.errSchemaPath+"/"+S,A+="="):(N=!1,L+="="));var M="'"+L+"'";a+=" if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" "+h+" "+A+" "+b+" || "+h+" !== "+h+") { "}}C=C||r;var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(C||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+M+", limit: "+b+", exclusive: "+N+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+L+" ",v?a+="' + "+b:a+=""+b+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;return a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),ab}var ib,wI;function xI(){return wI||(wI=1,ib=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var x=r=="maxItems"?">":"<";a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" "+h+".length "+x+" "+b+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxItems"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+b+" + '":a+=""+c,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),ib}var ob,_I;function TI(){return _I||(_I=1,ob=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var x=r=="maxLength"?">":"<";a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),e.opts.unicode===!1?a+=" "+h+".length ":a+=" ucs2length("+h+") ",a+=" "+x+" "+b+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be ",r=="maxLength"?a+="longer":a+="shorter",a+=" than ",v?a+="' + "+b+" + '":a+=""+c,a+=" characters' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),ob}var sb,RI;function AI(){return RI||(RI=1,sb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var x=r=="maxProperties"?">":"<";a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" Object.keys("+h+").length "+x+" "+b+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxProperties"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+b+" + '":a+=""+c,a+=" properties' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),sb}var lb,CI;function c8(){return CI||(CI=1,lb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");a+="var division"+s+";if (",v&&(a+=" "+b+" !== undefined && ( typeof "+b+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+b+", ",e.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":a+=" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",v&&(a+=" ) "),a+=" ) { ";var x=x||[];x.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { multipleOf: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",v?a+="' + "+b:a+=""+b+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=x.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),lb}var cb,NI;function u8(){return NI||(NI=1,cb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e);b.level++;var x="valid"+b.level;if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){b.schema=c,b.schemaPath=d,b.errSchemaPath=f,a+=" var "+v+" = errors; ";var S=e.compositeRule;e.compositeRule=b.compositeRule=!0,b.createErrors=!1;var R;b.opts.allErrors&&(R=b.opts.allErrors,b.opts.allErrors=!1),a+=" "+e.validate(b)+" ",b.createErrors=!0,R&&(b.opts.allErrors=R),e.compositeRule=b.compositeRule=S,a+=" if ("+x+") { ";var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var _=a;a=w.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+_+"]); ":a+=" validate.errors = ["+_+"]; return false; ":a+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+v+"; if (vErrors !== null) { if ("+v+") vErrors.length = "+v+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",m&&(a+=" if (false) { ");return a}),cb}var ub,kI;function d8(){return kI||(kI=1,ub=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w=x.baseId,_="prevValid"+s,A="passingSchemas"+s;a+="var "+b+" = errors , "+_+" = false , "+v+" = false , "+A+" = null; ";var C=e.compositeRule;e.compositeRule=x.compositeRule=!0;var k=c;if(k)for(var N,I=-1,O=k.length-1;I<O;)N=k[I+=1],(e.opts.strictKeywords?typeof N=="object"&&Object.keys(N).length>0||N===!1:e.util.schemaHasRules(N,e.RULES.all))?(x.schema=N,x.schemaPath=d+"["+I+"]",x.errSchemaPath=f+"/"+I,a+=" "+e.validate(x)+" ",x.baseId=w):a+=" var "+R+" = true; ",I&&(a+=" if ("+R+" && "+_+") { "+v+" = false; "+A+" = ["+A+", "+I+"]; } else { ",S+="}"),a+=" if ("+R+") { "+v+" = "+_+" = true; "+A+" = "+I+"; }";return e.compositeRule=x.compositeRule=C,a+=""+S+"if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { passingSchemas: "+A+" } ",e.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}),ub}var db,II;function f8(){return II||(II=1,db=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c;var x=v?"(new RegExp("+b+"))":e.usePattern(c);a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'string') || "),a+=" !"+x+".test("+h+") ) { ";var S=S||[];S.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { pattern: ",v?a+=""+b:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,v?a+="' + "+b+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var R=a;return a=S.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+R+"]); ":a+=" validate.errors = ["+R+"]; return false; ":a+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),db}var fb,OI;function p8(){return OI||(OI=1,fb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e),x="";b.level++;var S="valid"+b.level,R="key"+s,w="idx"+s,_=b.dataLevel=e.dataLevel+1,A="data"+_,C="dataProperties"+s,k=Object.keys(c||{}).filter(H),N=e.schema.patternProperties||{},I=Object.keys(N).filter(H),O=e.schema.additionalProperties,M=k.length||I.length,L=O===!1,P=typeof O=="object"&&Object.keys(O).length,V=e.opts.removeAdditional,X=L||P||V,Q=e.opts.ownProperties,oe=e.baseId,U=e.schema.required;if(U&&!(e.opts.$data&&U.$data)&&U.length<e.opts.loopRequired)var W=e.util.toHash(U);function H(ft){return ft!=="__proto__"}if(a+="var "+v+" = errors;var "+S+" = true;",Q&&(a+=" var "+C+" = undefined;"),X){if(Q?a+=" "+C+" = "+C+" || Object.keys("+h+"); for (var "+w+"=0; "+w+"<"+C+".length; "+w+"++) { var "+R+" = "+C+"["+w+"]; ":a+=" for (var "+R+" in "+h+") { ",M){if(a+=" var isAdditional"+s+" = !(false ",k.length)if(k.length>8)a+=" || validate.schema"+d+".hasOwnProperty("+R+") ";else{var te=k;if(te)for(var se,B=-1,q=te.length-1;B<q;)se=te[B+=1],a+=" || "+R+" == "+e.util.toQuotedString(se)+" "}if(I.length){var $=I;if($)for(var K,J=-1,z=$.length-1;J<z;)K=$[J+=1],a+=" || "+e.usePattern(K)+".test("+R+") "}a+=" ); if (isAdditional"+s+") { "}if(V=="all")a+=" delete "+h+"["+R+"]; ";else{var j=e.errorPath,Z="' + "+R+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers)),L)if(V)a+=" delete "+h+"["+R+"]; ";else{a+=" "+S+" = false; ";var ne=f;f=e.errSchemaPath+"/additionalProperties";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { additionalProperty: '"+Z+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var ce=a;a=G.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+ce+"]); ":a+=" validate.errors = ["+ce+"]; return false; ":a+=" var err = "+ce+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,m&&(a+=" break; ")}else if(P)if(V=="failing"){a+=" var "+v+" = errors; ";var he=e.compositeRule;e.compositeRule=b.compositeRule=!0,b.schema=O,b.schemaPath=e.schemaPath+".additionalProperties",b.errSchemaPath=e.errSchemaPath+"/additionalProperties",b.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var _e=h+"["+R+"]";b.dataPathArr[_]=R;var ye=e.validate(b);b.baseId=oe,e.util.varOccurences(ye,A)<2?a+=" "+e.util.varReplace(ye,A,_e)+" ":a+=" var "+A+" = "+_e+"; "+ye+" ",a+=" if (!"+S+") { errors = "+v+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"["+R+"]; } ",e.compositeRule=b.compositeRule=he}else{b.schema=O,b.schemaPath=e.schemaPath+".additionalProperties",b.errSchemaPath=e.errSchemaPath+"/additionalProperties",b.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var _e=h+"["+R+"]";b.dataPathArr[_]=R;var ye=e.validate(b);b.baseId=oe,e.util.varOccurences(ye,A)<2?a+=" "+e.util.varReplace(ye,A,_e)+" ":a+=" var "+A+" = "+_e+"; "+ye+" ",m&&(a+=" if (!"+S+") break; ")}e.errorPath=j}M&&(a+=" } "),a+=" } ",m&&(a+=" if ("+S+") { ",x+="}")}var Se=e.opts.useDefaults&&!e.compositeRule;if(k.length){var Ne=k;if(Ne)for(var se,ge=-1,ke=Ne.length-1;ge<ke;){se=Ne[ge+=1];var Oe=c[se];if(e.opts.strictKeywords?typeof Oe=="object"&&Object.keys(Oe).length>0||Oe===!1:e.util.schemaHasRules(Oe,e.RULES.all)){var Xe=e.util.getProperty(se),_e=h+Xe,ot=Se&&Oe.default!==void 0;b.schema=Oe,b.schemaPath=d+Xe,b.errSchemaPath=f+"/"+e.util.escapeFragment(se),b.errorPath=e.util.getPath(e.errorPath,se,e.opts.jsonPointers),b.dataPathArr[_]=e.util.toQuotedString(se);var ye=e.validate(b);if(b.baseId=oe,e.util.varOccurences(ye,A)<2){ye=e.util.varReplace(ye,A,_e);var $e=_e}else{var $e=A;a+=" var "+A+" = "+_e+"; "}if(ot)a+=" "+ye+" ";else{if(W&&W[se]){a+=" if ( "+$e+" === undefined ",Q&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(se)+"') "),a+=") { "+S+" = false; ";var j=e.errorPath,ne=f,We=e.util.escapeQuotes(se);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(j,se,e.opts.jsonPointers)),f=e.errSchemaPath+"/required";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+We+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+We+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var ce=a;a=G.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+ce+"]); ":a+=" validate.errors = ["+ce+"]; return false; ":a+=" var err = "+ce+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,e.errorPath=j,a+=" } else { "}else m?(a+=" if ( "+$e+" === undefined ",Q&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(se)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+$e+" !== undefined ",Q&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(se)+"') "),a+=" ) { ");a+=" "+ye+" } "}}m&&(a+=" if ("+S+") { ",x+="}")}}if(I.length){var Ae=I;if(Ae)for(var K,Le=-1,Je=Ae.length-1;Le<Je;){K=Ae[Le+=1];var Oe=N[K];if(e.opts.strictKeywords?typeof Oe=="object"&&Object.keys(Oe).length>0||Oe===!1:e.util.schemaHasRules(Oe,e.RULES.all)){b.schema=Oe,b.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(K),b.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(K),Q?a+=" "+C+" = "+C+" || Object.keys("+h+"); for (var "+w+"=0; "+w+"<"+C+".length; "+w+"++) { var "+R+" = "+C+"["+w+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" if ("+e.usePattern(K)+".test("+R+")) { ",b.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var _e=h+"["+R+"]";b.dataPathArr[_]=R;var ye=e.validate(b);b.baseId=oe,e.util.varOccurences(ye,A)<2?a+=" "+e.util.varReplace(ye,A,_e)+" ":a+=" var "+A+" = "+_e+"; "+ye+" ",m&&(a+=" if (!"+S+") break; "),a+=" } ",m&&(a+=" else "+S+" = true; "),a+=" } ",m&&(a+=" if ("+S+") { ",x+="}")}}}return m&&(a+=" "+x+" if ("+v+" == errors) {"),a}),fb}var pb,DI;function m8(){return DI||(DI=1,pb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e),x="";b.level++;var S="valid"+b.level;if(a+="var "+v+" = errors;",e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){b.schema=c,b.schemaPath=d,b.errSchemaPath=f;var R="key"+s,w="idx"+s,_="i"+s,A="' + "+R+" + '",C=b.dataLevel=e.dataLevel+1,k="data"+C,N="dataProperties"+s,I=e.opts.ownProperties,O=e.baseId;I&&(a+=" var "+N+" = undefined; "),I?a+=" "+N+" = "+N+" || Object.keys("+h+"); for (var "+w+"=0; "+w+"<"+N+".length; "+w+"++) { var "+R+" = "+N+"["+w+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" var startErrs"+s+" = errors; ";var M=R,L=e.compositeRule;e.compositeRule=b.compositeRule=!0;var P=e.validate(b);b.baseId=O,e.util.varOccurences(P,k)<2?a+=" "+e.util.varReplace(P,k,M)+" ":a+=" var "+k+" = "+M+"; "+P+" ",e.compositeRule=b.compositeRule=L,a+=" if (!"+S+") { for (var "+_+"=startErrs"+s+"; "+_+"<errors; "+_+"++) { vErrors["+_+"].propertyName = "+R+"; } var err = ",e.createErrors!==!1?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { propertyName: '"+A+"' } ",e.opts.messages!==!1&&(a+=" , message: 'property name \\'"+A+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),m&&(a+=" break; "),a+=" } }"}return m&&(a+=" "+x+" if ("+v+" == errors) {"),a}),pb}var mb,LI;function h8(){return LI||(LI=1,mb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data;b&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var x="schema"+s;if(!b)if(c.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var S=[],R=c;if(R)for(var w,_=-1,A=R.length-1;_<A;){w=R[_+=1];var C=e.schema.properties[w];C&&(e.opts.strictKeywords?typeof C=="object"&&Object.keys(C).length>0||C===!1:e.util.schemaHasRules(C,e.RULES.all))||(S[S.length]=w)}}else var S=c;if(b||S.length){var k=e.errorPath,N=b||S.length>=e.opts.loopRequired,I=e.opts.ownProperties;if(m)if(a+=" var missing"+s+"; ",N){b||(a+=" var "+x+" = validate.schema"+d+"; ");var O="i"+s,M="schema"+s+"["+O+"]",L="' + "+M+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,M,e.opts.jsonPointers)),a+=" var "+v+" = true; ",b&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+x+".length; "+O+"++) { "+v+" = "+h+"["+x+"["+O+"]] !== undefined ",I&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", "+x+"["+O+"]) "),a+="; if (!"+v+") break; } ",b&&(a+=" } "),a+=" if (!"+v+") { ";var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var X=S;if(X)for(var Q,O=-1,oe=X.length-1;O<oe;){Q=X[O+=1],O&&(a+=" || ");var U=e.util.getProperty(Q),W=h+U;a+=" ( ( "+W+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(Q)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?Q:U)+") ) "}a+=") { ";var M="missing"+s,L="' + "+M+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,M,!0):k+" + "+M);var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(N){b||(a+=" var "+x+" = validate.schema"+d+"; ");var O="i"+s,M="schema"+s+"["+O+"]",L="' + "+M+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,M,e.opts.jsonPointers)),b&&(a+=" if ("+x+" && !Array.isArray("+x+")) { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+x+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+x+".length; "+O+"++) { if ("+h+"["+x+"["+O+"]] === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", "+x+"["+O+"]) "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",b&&(a+=" } ")}else{var H=S;if(H)for(var Q,te=-1,se=H.length-1;te<se;){Q=H[te+=1];var U=e.util.getProperty(Q),L=e.util.escapeQuotes(Q),W=h+U;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,Q,e.opts.jsonPointers)),a+=" if ( "+W+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(Q)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=k}else m&&(a+=" if (true) {");return a}),mb}var hb,MI;function g8(){return MI||(MI=1,hb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data,x;if(b?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",x="schema"+s):x=c,(c||b)&&e.opts.uniqueItems!==!1){b&&(a+=" var "+v+"; if ("+x+" === false || "+x+" === undefined) "+v+" = true; else if (typeof "+x+" != 'boolean') "+v+" = false; else { "),a+=" var i = "+h+".length , "+v+" = true , j; if (i > 1) { ";var S=e.schema.items&&e.schema.items.type,R=Array.isArray(S);if(!S||S=="object"||S=="array"||R&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+v+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var w="checkDataType"+(R?"s":"");a+=" if ("+e.util[w](S,"item",e.opts.strictNumbers,!0)+") continue; ",R&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+v+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",b&&(a+=" } "),a+=" if (!"+v+") { ";var _=_||[];_.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",b?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;a=_.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+A+"]); ":a+=" validate.errors = ["+A+"]; return false; ":a+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),hb}var gb,PI;function v8(){return PI||(PI=1,gb={$ref:Q6(),allOf:J6(),anyOf:e8(),$comment:t8(),const:r8(),contains:n8(),dependencies:a8(),enum:i8(),format:o8(),if:s8(),items:l8(),maximum:SI(),minimum:SI(),maxItems:xI(),minItems:xI(),maxLength:TI(),minLength:TI(),maxProperties:AI(),minProperties:AI(),multipleOf:c8(),not:u8(),oneOf:d8(),pattern:f8(),properties:p8(),propertyNames:m8(),required:h8(),uniqueItems:g8(),validate:D$()}),gb}var vb,jI;function b8(){if(jI)return vb;jI=1;var t=v8(),e=pc().toHash;return vb=function(){var n=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],s=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],l=["number","integer","string","array","object","boolean","null"];return n.all=e(a),n.types=e(l),n.forEach(function(c){c.rules=c.rules.map(function(d){var f;if(typeof d=="object"){var m=Object.keys(d)[0];f=d[m],d=m,f.forEach(function(v){a.push(v),n.all[v]=!0})}a.push(d);var h=n.all[d]={keyword:d,code:t[d],implements:f};return h}),n.all.$comment={keyword:"$comment",code:t.$comment},c.type&&(n.types[c.type]=c)}),n.keywords=e(a.concat(s)),n.custom={},n},vb}var bb,UI;function y8(){if(UI)return bb;UI=1;var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return bb=function(e,r){for(var n=0;n<r.length;n++){e=JSON.parse(JSON.stringify(e));var a=r[n].split("/"),s=e,l;for(l=1;l<a.length;l++)s=s[a[l]];for(l=0;l<t.length;l++){var c=t[l],d=s[c];d&&(s[c]={anyOf:[d,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},bb}var yb,FI;function E8(){if(FI)return yb;FI=1;var t=eR().MissingRef;yb=e;function e(r,n,a){var s=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof n=="function"&&(a=n,n=void 0);var l=c(r).then(function(){var f=s._addSchema(r,void 0,n);return f.validate||d(f)});return a&&l.then(function(f){a(null,f)},a),l;function c(f){var m=f.$schema;return m&&!s.getSchema(m)?e.call(s,{$ref:m},!0):Promise.resolve()}function d(f){try{return s._compile(f)}catch(h){if(h instanceof t)return m(h);throw h}function m(h){var v=h.missingSchema;if(S(v))throw new Error("Schema "+v+" is loaded but "+h.missingRef+" cannot be resolved");var b=s._loadingSchemas[v];return b||(b=s._loadingSchemas[v]=s._opts.loadSchema(v),b.then(x,x)),b.then(function(R){if(!S(v))return c(R).then(function(){S(v)||s.addSchema(R,v,void 0,n)})}).then(function(){return d(f)});function x(){delete s._loadingSchemas[v]}function S(R){return s._refs[R]||s._schemas[R]}}}}return yb}var Eb,zI;function S8(){return zI||(zI=1,Eb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h,v="data"+(l||""),b="valid"+s,x="errs__"+s,S=e.opts.$data&&c&&c.$data,R;S?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",R="schema"+s):R=c;var w=this,_="definition"+s,A=w.definition,C="",k,N,I,O,M;if(S&&A.$data){M="keywordValidate"+s;var L=A.validateSchema;a+=" var "+_+" = RULES.custom['"+r+"'].definition; var "+M+" = "+_+".validate;"}else{if(O=e.useCustomRule(w,c,e.schema,e),!O)return;R="validate.schema"+d,M=O.code,k=A.compile,N=A.inline,I=A.macro}var P=M+".errors",V="i"+s,X="ruleErr"+s,Q=A.async;if(Q&&!e.async)throw new Error("async keyword in sync schema");if(N||I||(a+=""+P+" = null;"),a+="var "+x+" = errors;var "+b+";",S&&A.$data&&(C+="}",a+=" if ("+R+" === undefined) { "+b+" = true; } else { ",L&&(C+="}",a+=" "+b+" = "+_+".validateSchema("+R+"); if ("+b+") { ")),N)A.statements?a+=" "+O.validate+" ":a+=" "+b+" = "+O.validate+"; ";else if(I){var oe=e.util.copy(e),C="";oe.level++;var U="valid"+oe.level;oe.schema=O.validate,oe.schemaPath="";var W=e.compositeRule;e.compositeRule=oe.compositeRule=!0;var H=e.validate(oe).replace(/validate\.schema/g,M);e.compositeRule=oe.compositeRule=W,a+=" "+H}else{var te=te||[];te.push(a),a="",a+=" "+M+".call( ",e.opts.passContext?a+="this":a+="self",k||A.schema===!1?a+=" , "+v+" ":a+=" , "+R+" , "+v+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var se=l?"data"+(l-1||""):"parentData",B=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+se+" , "+B+" , rootData ) ";var q=a;a=te.pop(),A.errors===!1?(a+=" "+b+" = ",Q&&(a+="await "),a+=""+q+"; "):Q?(P="customErrors"+s,a+=" var "+P+" = null; try { "+b+" = await "+q+"; } catch (e) { "+b+" = false; if (e instanceof ValidationError) "+P+" = e.errors; else throw e; } "):a+=" "+P+" = null; "+b+" = "+q+"; "}if(A.modifying&&(a+=" if ("+se+") "+v+" = "+se+"["+B+"];"),a+=""+C,A.valid)m&&(a+=" if (true) { ");else{a+=" if ( ",A.valid===void 0?(a+=" !",I?a+=""+U:a+=""+b):a+=" "+!A.valid+" ",a+=") { ",h=w.keyword;var te=te||[];te.push(a),a="";var te=te||[];te.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+w.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+w.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var $=a;a=te.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+$+"]); ":a+=" validate.errors = ["+$+"]; return false; ":a+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var K=a;a=te.pop(),N?A.errors?A.errors!="full"&&(a+=" for (var "+V+"="+x+"; "+V+"<errors; "+V+"++) { var "+X+" = vErrors["+V+"]; if ("+X+".dataPath === undefined) "+X+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+X+".schemaPath === undefined) { "+X+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+X+".schema = "+R+"; "+X+".data = "+v+"; "),a+=" } "):A.errors===!1?a+=" "+K+" ":(a+=" if ("+x+" == errors) { "+K+" } else { for (var "+V+"="+x+"; "+V+"<errors; "+V+"++) { var "+X+" = vErrors["+V+"]; if ("+X+".dataPath === undefined) "+X+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+X+".schemaPath === undefined) { "+X+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+X+".schema = "+R+"; "+X+".data = "+v+"; "),a+=" } } "):I?(a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+w.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+w.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):A.errors===!1?a+=" "+K+" ":(a+=" if (Array.isArray("+P+")) { if (vErrors === null) vErrors = "+P+"; else vErrors = vErrors.concat("+P+"); errors = vErrors.length; for (var "+V+"="+x+"; "+V+"<errors; "+V+"++) { var "+X+" = vErrors["+V+"]; if ("+X+".dataPath === undefined) "+X+".dataPath = (dataPath || '') + "+e.errorPath+"; "+X+'.schemaPath = "'+f+'"; ',e.opts.verbose&&(a+=" "+X+".schema = "+R+"; "+X+".data = "+v+"; "),a+=" } } else { "+K+" } "),a+=" } ",m&&(a+=" else { ")}return a}),Eb}const w8="http://json-schema.org/draft-07/schema#",x8="http://json-schema.org/draft-07/schema#",_8="Core schema meta-schema",T8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},R8=["object","boolean"],A8={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},L$={$schema:w8,$id:x8,title:_8,definitions:T8,type:R8,properties:A8,default:!0};var Sb,$I;function C8(){if($I)return Sb;$I=1;var t=L$;return Sb={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:t.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:t.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Sb}var wb,BI;function N8(){if(BI)return wb;BI=1;var t=/^[a-z_$][a-z0-9_$-]*$/i,e=S8(),r=C8();wb={add:n,get:a,remove:s,validate:l};function n(c,d){var f=this.RULES;if(f.keywords[c])throw new Error("Keyword "+c+" is already defined");if(!t.test(c))throw new Error("Keyword "+c+" is not a valid identifier");if(d){this.validateKeyword(d,!0);var m=d.type;if(Array.isArray(m))for(var h=0;h<m.length;h++)b(c,m[h],d);else b(c,m,d);var v=d.metaSchema;v&&(d.$data&&this._opts.$data&&(v={anyOf:[v,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),d.validateSchema=this.compile(v,!0))}f.keywords[c]=f.all[c]=!0;function b(x,S,R){for(var w,_=0;_<f.length;_++){var A=f[_];if(A.type==S){w=A;break}}w||(w={type:S,rules:[]},f.push(w));var C={keyword:x,definition:R,custom:!0,code:e,implements:R.implements};w.rules.push(C),f.custom[x]=C}return this}function a(c){var d=this.RULES.custom[c];return d?d.definition:this.RULES.keywords[c]||!1}function s(c){var d=this.RULES;delete d.keywords[c],delete d.all[c],delete d.custom[c];for(var f=0;f<d.length;f++)for(var m=d[f].rules,h=0;h<m.length;h++)if(m[h].keyword==c){m.splice(h,1);break}return this}function l(c,d){l.errors=null;var f=this._validateKeyword=this._validateKeyword||this.compile(r,!0);if(f(c))return!0;if(l.errors=f.errors,d)throw new Error("custom keyword definition is invalid: "+this.errorsText(f.errors));return!1}return wb}const k8="http://json-schema.org/draft-07/schema#",I8="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",O8="Meta-schema for $data reference (JSON Schema extension proposal)",D8="object",L8=["$data"],M8={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},P8=!1,j8={$schema:k8,$id:I8,description:O8,type:D8,required:L8,properties:M8,additionalProperties:P8};var xb,qI;function U8(){if(qI)return xb;qI=1;var t=K6(),e=JT(),r=Z6(),n=I$(),a=O$(),s=X6(),l=b8(),c=y8(),d=pc();xb=x,x.prototype.validate=S,x.prototype.compile=R,x.prototype.addSchema=w,x.prototype.addMetaSchema=_,x.prototype.validateSchema=A,x.prototype.getSchema=k,x.prototype.removeSchema=O,x.prototype.addFormat=W,x.prototype.errorsText=U,x.prototype._addSchema=L,x.prototype._compile=P,x.prototype.compileAsync=E8();var f=N8();x.prototype.addKeyword=f.add,x.prototype.getKeyword=f.get,x.prototype.removeKeyword=f.remove,x.prototype.validateKeyword=f.validate;var m=eR();x.ValidationError=m.Validation,x.MissingRefError=m.MissingRef,x.$dataMetaSchema=c;var h="http://json-schema.org/draft-07/schema",v=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],b=["/properties"];function x(z){if(!(this instanceof x))return new x(z);z=this._opts=d.copy(z)||{},K(this),this._schemas={},this._refs={},this._fragments={},this._formats=s(z.format),this._cache=z.cache||new r,this._loadingSchemas={},this._compilations=[],this.RULES=l(),this._getId=V(z),z.loopRequired=z.loopRequired||1/0,z.errorDataPath=="property"&&(z._errorDataPathProperty=!0),z.serialize===void 0&&(z.serialize=a),this._metaOpts=$(this),z.formats&&se(this),z.keywords&&B(this),H(this),typeof z.meta=="object"&&this.addMetaSchema(z.meta),z.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),te(this)}function S(z,j){var Z;if(typeof z=="string"){if(Z=this.getSchema(z),!Z)throw new Error('no schema with key or ref "'+z+'"')}else{var ne=this._addSchema(z);Z=ne.validate||this._compile(ne)}var G=Z(j);return Z.$async!==!0&&(this.errors=Z.errors),G}function R(z,j){var Z=this._addSchema(z,void 0,j);return Z.validate||this._compile(Z)}function w(z,j,Z,ne){if(Array.isArray(z)){for(var G=0;G<z.length;G++)this.addSchema(z[G],void 0,Z,ne);return this}var ce=this._getId(z);if(ce!==void 0&&typeof ce!="string")throw new Error("schema id must be string");return j=e.normalizeId(j||ce),q(this,j),this._schemas[j]=this._addSchema(z,Z,ne,!0),this}function _(z,j,Z){return this.addSchema(z,j,Z,!0),this}function A(z,j){var Z=z.$schema;if(Z!==void 0&&typeof Z!="string")throw new Error("$schema must be a string");if(Z=Z||this._opts.defaultMeta||C(this),!Z)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var ne=this.validate(Z,z);if(!ne&&j){var G="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(G);else throw new Error(G)}return ne}function C(z){var j=z._opts.meta;return z._opts.defaultMeta=typeof j=="object"?z._getId(j)||j:z.getSchema(h)?h:void 0,z._opts.defaultMeta}function k(z){var j=I(this,z);switch(typeof j){case"object":return j.validate||this._compile(j);case"string":return this.getSchema(j);case"undefined":return N(this,z)}}function N(z,j){var Z=e.schema.call(z,{schema:{}},j);if(Z){var ne=Z.schema,G=Z.root,ce=Z.baseId,he=t.call(z,ne,G,void 0,ce);return z._fragments[j]=new n({ref:j,fragment:!0,schema:ne,root:G,baseId:ce,validate:he}),he}}function I(z,j){return j=e.normalizeId(j),z._schemas[j]||z._refs[j]||z._fragments[j]}function O(z){if(z instanceof RegExp)return M(this,this._schemas,z),M(this,this._refs,z),this;switch(typeof z){case"undefined":return M(this,this._schemas),M(this,this._refs),this._cache.clear(),this;case"string":var j=I(this,z);return j&&this._cache.del(j.cacheKey),delete this._schemas[z],delete this._refs[z],this;case"object":var Z=this._opts.serialize,ne=Z?Z(z):z;this._cache.del(ne);var G=this._getId(z);G&&(G=e.normalizeId(G),delete this._schemas[G],delete this._refs[G])}return this}function M(z,j,Z){for(var ne in j){var G=j[ne];!G.meta&&(!Z||Z.test(ne))&&(z._cache.del(G.cacheKey),delete j[ne])}}function L(z,j,Z,ne){if(typeof z!="object"&&typeof z!="boolean")throw new Error("schema should be object or boolean");var G=this._opts.serialize,ce=G?G(z):z,he=this._cache.get(ce);if(he)return he;ne=ne||this._opts.addUsedSchema!==!1;var _e=e.normalizeId(this._getId(z));_e&&ne&&q(this,_e);var ye=this._opts.validateSchema!==!1&&!j,Se;ye&&!(Se=_e&&_e==e.normalizeId(z.$schema))&&this.validateSchema(z,!0);var Ne=e.ids.call(this,z),ge=new n({id:_e,schema:z,localRefs:Ne,cacheKey:ce,meta:Z});return _e[0]!="#"&&ne&&(this._refs[_e]=ge),this._cache.put(ce,ge),ye&&Se&&this.validateSchema(z,!0),ge}function P(z,j){if(z.compiling)return z.validate=G,G.schema=z.schema,G.errors=null,G.root=j||G,z.schema.$async===!0&&(G.$async=!0),G;z.compiling=!0;var Z;z.meta&&(Z=this._opts,this._opts=this._metaOpts);var ne;try{ne=t.call(this,z.schema,j,z.localRefs)}catch(ce){throw delete z.validate,ce}finally{z.compiling=!1,z.meta&&(this._opts=Z)}return z.validate=ne,z.refs=ne.refs,z.refVal=ne.refVal,z.root=ne.root,ne;function G(){var ce=z.validate,he=ce.apply(this,arguments);return G.errors=ce.errors,he}}function V(z){switch(z.schemaId){case"auto":return oe;case"id":return X;default:return Q}}function X(z){return z.$id&&this.logger.warn("schema $id ignored",z.$id),z.id}function Q(z){return z.id&&this.logger.warn("schema id ignored",z.id),z.$id}function oe(z){if(z.$id&&z.id&&z.$id!=z.id)throw new Error("schema $id is different from id");return z.$id||z.id}function U(z,j){if(z=z||this.errors,!z)return"No errors";j=j||{};for(var Z=j.separator===void 0?", ":j.separator,ne=j.dataVar===void 0?"data":j.dataVar,G="",ce=0;ce<z.length;ce++){var he=z[ce];he&&(G+=ne+he.dataPath+" "+he.message+Z)}return G.slice(0,-Z.length)}function W(z,j){return typeof j=="string"&&(j=new RegExp(j)),this._formats[z]=j,this}function H(z){var j;if(z._opts.$data&&(j=j8,z.addMetaSchema(j,j.$id,!0)),z._opts.meta!==!1){var Z=L$;z._opts.$data&&(Z=c(Z,b)),z.addMetaSchema(Z,h,!0),z._refs["http://json-schema.org/schema"]=h}}function te(z){var j=z._opts.schemas;if(j)if(Array.isArray(j))z.addSchema(j);else for(var Z in j)z.addSchema(j[Z],Z)}function se(z){for(var j in z._opts.formats){var Z=z._opts.formats[j];z.addFormat(j,Z)}}function B(z){for(var j in z._opts.keywords){var Z=z._opts.keywords[j];z.addKeyword(j,Z)}}function q(z,j){if(z._schemas[j]||z._refs[j])throw new Error('schema with key or id "'+j+'" already exists')}function $(z){for(var j=d.copy(z._opts),Z=0;Z<v.length;Z++)delete j[v[Z]];return j}function K(z){var j=z._opts.logger;if(j===!1)z.logger={log:J,warn:J,error:J};else{if(j===void 0&&(j=console),!(typeof j=="object"&&j.log&&j.warn&&j.error))throw new Error("logger must implement log, warn and error methods");z.logger=j}}function J(){}return xb}var F8=U8();const z8=fc(F8);class HI extends q6{constructor(e,r){var n;super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=(n=r?.capabilities)!==null&&n!==void 0?n:{},this._ajv=new z8}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=H6(this._capabilities,e)}assertCapability(e,r){var n;if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n[e]))throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{const n=await this.request({method:"initialize",params:{protocolVersion:Om,capabilities:this._capabilities,clientInfo:this._clientInfo}},g$,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!H9.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"})}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,n,a,s,l;switch(e){case"logging/setLevel":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((a=this._serverCapabilities)===null||a===void 0)&&a.resources))throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(!((l=this._serverCapabilities)===null||l===void 0)&&l.completions))throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){var r;switch(e){case"notifications/roots/list_changed":if(!(!((r=this._capabilities.roots)===null||r===void 0)&&r.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break}}async ping(e){return this.request({method:"ping"},Cl,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},k$,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},Cl,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},A$,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},T$,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},w$,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},x$,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},_$,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},Cl,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},Cl,r)}async callTool(e,r=XT,n){const a=await this.request({method:"tools/call",params:e},r,n),s=this.getToolOutputValidator(e.name);if(s){if(!a.structuredContent&&!a.isError)throw new So(Oa.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(a.structuredContent)try{if(!s(a.structuredContent))throw new So(Oa.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(s.errors)}`)}catch(l){throw l instanceof So?l:new So(Oa.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return a}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(const r of e)if(r.outputSchema)try{const n=this._ajv.compile(r.outputSchema);this._cachedToolOutputValidators.set(r.name,n)}catch{}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){const n=await this.request({method:"tools/list",params:e},C$,r);return this.cacheToolOutputSchemas(n.tools),n}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}let tR;tR=globalThis.crypto;async function $8(t){return(await tR).getRandomValues(new Uint8Array(t))}async function B8(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let r="";const n=await $8(t);for(let a=0;a<t;a++){const s=n[a]%e.length;r+=e[s]}return r}async function q8(t){return await B8(t)}async function H8(t){const e=await(await tR).subtle.digest("SHA-256",new TextEncoder().encode(t));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function V8(t){if(t||(t=43),t<43||t>128)throw`Expected a length between 43 and 128. Received ${t}.`;const e=await q8(t),r=await H8(e);return{code_verifier:e,code_challenge:r}}const Pr=me().url().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:Ce.custom,message:"URL must be parseable",fatal:!0}),q9}).refine(t=>{const e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),G8=De({resource:me().url(),authorization_servers:Ve(Pr).optional(),jwks_uri:me().url().optional(),scopes_supported:Ve(me()).optional(),bearer_methods_supported:Ve(me()).optional(),resource_signing_alg_values_supported:Ve(me()).optional(),resource_name:me().optional(),resource_documentation:me().optional(),resource_policy_uri:me().url().optional(),resource_tos_uri:me().url().optional(),tls_client_certificate_bound_access_tokens:Dr().optional(),authorization_details_types_supported:Ve(me()).optional(),dpop_signing_alg_values_supported:Ve(me()).optional(),dpop_bound_access_tokens_required:Dr().optional()}).passthrough(),M$=De({issuer:me(),authorization_endpoint:Pr,token_endpoint:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ve(me()).optional(),response_types_supported:Ve(me()),response_modes_supported:Ve(me()).optional(),grant_types_supported:Ve(me()).optional(),token_endpoint_auth_methods_supported:Ve(me()).optional(),token_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),service_documentation:Pr.optional(),revocation_endpoint:Pr.optional(),revocation_endpoint_auth_methods_supported:Ve(me()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),introspection_endpoint:me().optional(),introspection_endpoint_auth_methods_supported:Ve(me()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),code_challenge_methods_supported:Ve(me()).optional()}).passthrough(),W8=De({issuer:me(),authorization_endpoint:Pr,token_endpoint:Pr,userinfo_endpoint:Pr.optional(),jwks_uri:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ve(me()).optional(),response_types_supported:Ve(me()),response_modes_supported:Ve(me()).optional(),grant_types_supported:Ve(me()).optional(),acr_values_supported:Ve(me()).optional(),subject_types_supported:Ve(me()),id_token_signing_alg_values_supported:Ve(me()),id_token_encryption_alg_values_supported:Ve(me()).optional(),id_token_encryption_enc_values_supported:Ve(me()).optional(),userinfo_signing_alg_values_supported:Ve(me()).optional(),userinfo_encryption_alg_values_supported:Ve(me()).optional(),userinfo_encryption_enc_values_supported:Ve(me()).optional(),request_object_signing_alg_values_supported:Ve(me()).optional(),request_object_encryption_alg_values_supported:Ve(me()).optional(),request_object_encryption_enc_values_supported:Ve(me()).optional(),token_endpoint_auth_methods_supported:Ve(me()).optional(),token_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),display_values_supported:Ve(me()).optional(),claim_types_supported:Ve(me()).optional(),claims_supported:Ve(me()).optional(),service_documentation:me().optional(),claims_locales_supported:Ve(me()).optional(),ui_locales_supported:Ve(me()).optional(),claims_parameter_supported:Dr().optional(),request_parameter_supported:Dr().optional(),request_uri_parameter_supported:Dr().optional(),require_request_uri_registration:Dr().optional(),op_policy_uri:Pr.optional(),op_tos_uri:Pr.optional()}).passthrough(),Y8=W8.merge(M$.pick({code_challenge_methods_supported:!0})),P$=De({access_token:me(),id_token:me().optional(),token_type:me(),expires_in:Ur().optional(),scope:me().optional(),refresh_token:me().optional()}).strip(),K8=De({error:me(),error_description:me().optional(),error_uri:me().optional()}),Z8=De({redirect_uris:Ve(Pr),token_endpoint_auth_method:me().optional(),grant_types:Ve(me()).optional(),response_types:Ve(me()).optional(),client_name:me().optional(),client_uri:Pr.optional(),logo_uri:Pr.optional(),scope:me().optional(),contacts:Ve(me()).optional(),tos_uri:Pr.optional(),policy_uri:me().optional(),jwks_uri:Pr.optional(),jwks:$9().optional(),software_id:me().optional(),software_version:me().optional(),software_statement:me().optional()}).strip(),X8=De({client_id:me(),client_secret:me().optional(),client_id_issued_at:Ur().optional(),client_secret_expires_at:Ur().optional()}).strip(),Q8=Z8.merge(X8);De({error:me(),error_description:me().optional()}).strip();De({token:me(),token_type_hint:me().optional()}).strip();function J8(t){const e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}function eW({requestedResource:t,configuredResource:e}){const r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length<n.pathname.length)return!1;const a=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/";return a.startsWith(s)}class Kr extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){const e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}}class y_ extends Kr{}y_.errorCode="invalid_request";class lm extends Kr{}lm.errorCode="invalid_client";class cm extends Kr{}cm.errorCode="invalid_grant";class um extends Kr{}um.errorCode="unauthorized_client";class E_ extends Kr{}E_.errorCode="unsupported_grant_type";class S_ extends Kr{}S_.errorCode="invalid_scope";class w_ extends Kr{}w_.errorCode="access_denied";class nc extends Kr{}nc.errorCode="server_error";class x_ extends Kr{}x_.errorCode="temporarily_unavailable";class __ extends Kr{}__.errorCode="unsupported_response_type";class T_ extends Kr{}T_.errorCode="unsupported_token_type";class R_ extends Kr{}R_.errorCode="invalid_token";class A_ extends Kr{}A_.errorCode="method_not_allowed";class C_ extends Kr{}C_.errorCode="too_many_requests";class N_ extends Kr{}N_.errorCode="invalid_client_metadata";class k_ extends Kr{}k_.errorCode="insufficient_scope";const tW={[y_.errorCode]:y_,[lm.errorCode]:lm,[cm.errorCode]:cm,[um.errorCode]:um,[E_.errorCode]:E_,[S_.errorCode]:S_,[w_.errorCode]:w_,[nc.errorCode]:nc,[x_.errorCode]:x_,[__.errorCode]:__,[T_.errorCode]:T_,[R_.errorCode]:R_,[A_.errorCode]:A_,[C_.errorCode]:C_,[N_.errorCode]:N_,[k_.errorCode]:k_};class Da extends Error{constructor(e){super(e??"Unauthorized")}}const _b="code",Tb="S256";function j$(t,e){const r=t.client_secret!==void 0;return e.length===0?r?"client_secret_post":"none":r&&e.includes("client_secret_basic")?"client_secret_basic":r&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":r?"client_secret_post":"none"}function U$(t,e,r,n){const{client_id:a,client_secret:s}=e;switch(t){case"client_secret_basic":rW(a,s,r);return;case"client_secret_post":nW(a,s,n);return;case"none":aW(a,n);return;default:throw new Error(`Unsupported client authentication method: ${t}`)}}function rW(t,e,r){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");const n=btoa(`${t}:${e}`);r.set("Authorization",`Basic ${n}`)}function nW(t,e,r){r.set("client_id",t),e&&r.set("client_secret",e)}function aW(t,e){e.set("client_id",t)}async function rR(t){const e=t instanceof Response?t.status:void 0,r=t instanceof Response?await t.text():t;try{const n=K8.parse(JSON.parse(r)),{error:a,error_description:s,error_uri:l}=n,c=tW[a]||nc;return new c(s||"",l)}catch(n){const a=`${e?`HTTP ${e}: `:""}Invalid OAuth error response: ${n}. Raw body: ${r}`;return new nc(a)}}async function ps(t,e){var r,n;try{return await Rb(t,e)}catch(a){if(a instanceof lm||a instanceof um)return await((r=t.invalidateCredentials)===null||r===void 0?void 0:r.call(t,"all")),await Rb(t,e);if(a instanceof cm)return await((n=t.invalidateCredentials)===null||n===void 0?void 0:n.call(t,"tokens")),await Rb(t,e);throw a}}async function Rb(t,{serverUrl:e,authorizationCode:r,scope:n,resourceMetadataUrl:a,fetchFn:s}){let l,c;try{l=await oW(e,{resourceMetadataUrl:a},s),l.authorization_servers&&l.authorization_servers.length>0&&(c=l.authorization_servers[0])}catch{}c||(c=e);const d=await iW(e,t,l),f=await dW(c,{fetchFn:s});let m=await Promise.resolve(t.clientInformation());if(!m){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await hW(c,{metadata:f,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(S),m=S}if(r!==void 0){const S=await t.codeVerifier(),R=await pW(c,{metadata:f,clientInformation:m,authorizationCode:r,codeVerifier:S,redirectUri:t.redirectUrl,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(R),"AUTHORIZED"}const h=await t.tokens();if(h?.refresh_token)try{const S=await mW(c,{metadata:f,clientInformation:m,refreshToken:h.refresh_token,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(S),"AUTHORIZED"}catch(S){if(!(!(S instanceof Kr)||S instanceof nc))throw S}const v=t.state?await t.state():void 0,{authorizationUrl:b,codeVerifier:x}=await fW(c,{metadata:f,clientInformation:m,state:v,redirectUrl:t.redirectUrl,scope:n||t.clientMetadata.scope,resource:d});return await t.saveCodeVerifier(x),await t.redirectToAuthorization(b),"REDIRECT"}async function iW(t,e,r){const n=J8(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!eW({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}function I_(t){const e=t.headers.get("WWW-Authenticate");if(!e)return;const[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return;const s=/resource_metadata="([^"]*)"/.exec(e);if(s)try{return new URL(s[1])}catch{return}}async function oW(t,e,r=fetch){const n=await cW(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return G8.parse(await n.json())}async function nR(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?nR(t,void 0,r):void 0;throw n}}function sW(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}async function VI(t,e,r=fetch){return await nR(t,{"MCP-Protocol-Version":e},r)}function lW(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}async function cW(t,e,r,n){var a,s;const l=new URL(t),c=(a=n?.protocolVersion)!==null&&a!==void 0?a:Om;let d;if(n?.metadataUrl)d=new URL(n.metadataUrl);else{const m=sW(e,l.pathname);d=new URL(m,(s=n?.metadataServerUrl)!==null&&s!==void 0?s:l),d.search=l.search}let f=await VI(d,c,r);if(!n?.metadataUrl&&lW(f,l.pathname)){const m=new URL(`/.well-known/${e}`,l);f=await VI(m,c,r)}return f}function uW(t){const e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let a=e.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${a}`,e.origin),type:"oidc"}),n.push({url:new URL(`${a}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}async function dW(t,{fetchFn:e=fetch,protocolVersion:r=Om}={}){const n={"MCP-Protocol-Version":r},a=uW(t);for(const{url:s,type:l}of a){const c=await nR(s,n,e);if(c){if(!c.ok){if(c.status>=400&&c.status<500)continue;throw new Error(`HTTP ${c.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return l==="oauth"?M$.parse(await c.json()):Y8.parse(await c.json())}}}async function fW(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:a,state:s,resource:l}){let c;if(e){if(c=new URL(e.authorization_endpoint),!e.response_types_supported.includes(_b))throw new Error(`Incompatible auth server: does not support response type ${_b}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(Tb))throw new Error(`Incompatible auth server: does not support code challenge method ${Tb}`)}else c=new URL("/authorize",t);const d=await V8(),f=d.code_verifier,m=d.code_challenge;return c.searchParams.set("response_type",_b),c.searchParams.set("client_id",r.client_id),c.searchParams.set("code_challenge",m),c.searchParams.set("code_challenge_method",Tb),c.searchParams.set("redirect_uri",String(n)),s&&c.searchParams.set("state",s),a&&c.searchParams.set("scope",a),a?.includes("offline_access")&&c.searchParams.append("prompt","consent"),l&&c.searchParams.set("resource",l.href),{authorizationUrl:c,codeVerifier:f}}async function pW(t,{metadata:e,clientInformation:r,authorizationCode:n,codeVerifier:a,redirectUri:s,resource:l,addClientAuthentication:c,fetchFn:d}){var f;const m="authorization_code",h=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t);if(e?.grant_types_supported&&!e.grant_types_supported.includes(m))throw new Error(`Incompatible auth server: does not support grant type ${m}`);const v=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),b=new URLSearchParams({grant_type:m,code:n,code_verifier:a,redirect_uri:String(s)});if(c)c(v,b,t,e);else{const S=(f=e?.token_endpoint_auth_methods_supported)!==null&&f!==void 0?f:[],R=j$(r,S);U$(R,r,v,b)}l&&b.set("resource",l.href);const x=await(d??fetch)(h,{method:"POST",headers:v,body:b});if(!x.ok)throw await rR(x);return P$.parse(await x.json())}async function mW(t,{metadata:e,clientInformation:r,refreshToken:n,resource:a,addClientAuthentication:s,fetchFn:l}){var c;const d="refresh_token";let f;if(e){if(f=new URL(e.token_endpoint),e.grant_types_supported&&!e.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`)}else f=new URL("/token",t);const m=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),h=new URLSearchParams({grant_type:d,refresh_token:n});if(s)s(m,h,t,e);else{const b=(c=e?.token_endpoint_auth_methods_supported)!==null&&c!==void 0?c:[],x=j$(r,b);U$(x,r,m,h)}a&&h.set("resource",a.href);const v=await(l??fetch)(f,{method:"POST",headers:m,body:h});if(!v.ok)throw await rR(v);return P$.parse({refresh_token:n,...await v.json()})}async function hW(t,{metadata:e,clientMetadata:r,fetchFn:n}){let a;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(e.registration_endpoint)}else a=new URL("/register",t);const s=await(n??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await rR(s);return Q8.parse(await s.json())}class GI extends Error{constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function Ab(t){}function F$(t){if(typeof t=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=Ab,onError:r=Ab,onRetry:n=Ab,onComment:a}=t;let s="",l=!0,c,d="",f="";function m(S){const R=l?S.replace(/^\xEF\xBB\xBF/,""):S,[w,_]=gW(`${s}${R}`);for(const A of w)h(A);s=_,l=!1}function h(S){if(S===""){b();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const R=S.indexOf(":");if(R!==-1){const w=S.slice(0,R),_=S[R+1]===" "?2:1,A=S.slice(R+_);v(w,A,S);return}v(S,"",S)}function v(S,R,w){switch(S){case"event":f=R;break;case"data":d=`${d}${R}
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/winston-p6BpkSbE.js","assets/__vite-browser-external-DFygW7-s.js","assets/index-DRz5BQNA.js","assets/path-C9FudP8b.js","assets/index-_hgOYkid.js","assets/index-DSj_EDTJ.js","assets/chunk-VL2OQCWN-Dk6O4Sk7.js","assets/embeddings-Yd-6LLDc.js","assets/index-DmXcJzte.js","assets/index-BY2VQcZu.js","assets/langfuse-C4HKZ3NL-B_IaVRkH.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var l9=Object.defineProperty;var c9=(t,e,r)=>e in t?l9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var rp=(t,e,r)=>c9(t,typeof e!="symbol"?e+"":e,r);function u9(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in t)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(t,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function fc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Jye(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){var a=!1;try{a=this instanceof n}catch{}return a?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var Dv={exports:{}},hu={};var jk;function d9(){if(jk)return hu;jk=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function r(n,a,s){var l=null;if(s!==void 0&&(l=""+s),a.key!==void 0&&(l=""+a.key),"key"in a){s={};for(var c in a)c!=="key"&&(s[c]=a[c])}else s=a;return a=s.ref,{$$typeof:t,type:n,key:l,ref:a!==void 0?a:null,props:s}}return hu.Fragment=e,hu.jsx=r,hu.jsxs=r,hu}var Uk;function f9(){return Uk||(Uk=1,Dv.exports=d9()),Dv.exports}var g=f9();const p9="modulepreload",m9=function(t){return"/inspector/"+t},Fk={},cs=function(e,r,n){let a=Promise.resolve();if(r&&r.length>0){let d=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");a=d(r.map(f=>{if(f=m9(f),f in Fk)return;Fk[f]=!0;const m=f.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const v=document.createElement("link");if(v.rel=m?"stylesheet":p9,m||(v.as="script"),v.crossOrigin="",v.href=f,c&&v.setAttribute("nonce",c),document.head.appendChild(v),m)return new Promise((b,x)=>{v.addEventListener("load",b),v.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return a.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};var h9=Object.defineProperty,Tt=(t,e)=>h9(t,"name",{value:e,configurable:!0}),zk=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')}),vl={};async function e$(){if(typeof process<"u")try{const t=await cs(()=>import("./__vite-browser-external-DFygW7-s.js").then(r=>r.o),[]),e=await cs(()=>import("./path-C9FudP8b.js").then(r=>r.p),[]);return{fs:t.default,path:e.default}}catch{return{fs:null,path:null}}return{fs:null,path:null}}Tt(e$,"getNodeModules");var Pn=null;function t$(){if(typeof zk<"u")try{Pn=zk("winston")}catch{}}Tt(t$,"loadWinstonSync");async function r$(){return Pn||(Pn=await cs(()=>import("./winston-p6BpkSbE.js").then(t=>t.w),__vite__mapDeps([0,1,2,3]))),Pn}Tt(r$,"getWinston");var d_="mcp-use";function Zp(){try{return typeof navigator<"u"&&navigator.userAgent?.includes("Cloudflare-Workers")||typeof globalThis.EdgeRuntime<"u"||typeof globalThis.Deno<"u"?!1:typeof process<"u"&&!0&&typeof __dirname<"u"}catch{return!1}}Tt(Zp,"isNodeJSEnvironment");var Hl,g9=(Hl=class{_level;name;constructor(e=d_,r="info"){this.name=e,this._level=r}shouldLog(e){const r=["error","warn","info","http","verbose","debug","silly"],n=r.indexOf(this._level);return r.indexOf(e)<=n}formatMessage(e,r){return`${new Date().toLocaleTimeString("en-US",{hour12:!1})} [${this.name}] ${e}: ${r}`}error(e){this.shouldLog("error")&&console.error(this.formatMessage("error",e))}warn(e){this.shouldLog("warn")&&console.warn(this.formatMessage("warn",e))}info(e){this.shouldLog("info")&&console.info(this.formatMessage("info",e))}debug(e){this.shouldLog("debug")&&console.debug(this.formatMessage("debug",e))}http(e){this.shouldLog("http")&&console.log(this.formatMessage("http",e))}verbose(e){this.shouldLog("verbose")&&console.log(this.formatMessage("verbose",e))}silly(e){this.shouldLog("silly")&&console.log(this.formatMessage("silly",e))}get level(){return this._level}set level(e){this._level=e}},Tt(Hl,"SimpleConsoleLogger"),Hl);function xp(t){switch((typeof process<"u"&&vl?t:void 0)?.trim()){case"2":return"debug";case"1":return"info";default:return"info"}}Tt(xp,"resolveLevel");var wi,n$=(wi=class{static get(e=d_){if(!Zp()){if(!this.simpleInstances[e]){const r=typeof process<"u"&&vl?.DEBUG||void 0;this.simpleInstances[e]=new g9(e,xp(r))}return this.simpleInstances[e]}if(!this.instances[e]){if(!Pn)throw new Error("Winston not loaded - call Logger.configure() first");const{createLogger:r,format:n}=Pn,{combine:a,timestamp:s,label:l,colorize:c,splat:d}=n;this.instances[e]=r({level:xp(vl.DEBUG),format:a(c(),d(),l({label:e}),s({format:"HH:mm:ss"}),this.getFormatter()),transports:[]})}return this.instances[e]}static getFormatter(){if(!Pn)throw new Error("Winston not loaded");const{format:e}=Pn,{printf:r}=e,n=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l}: ${c}`),a=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`),s=r(({level:l,message:c,label:d,timestamp:f})=>`${f} [${d}] ${l.toUpperCase()}: ${c}`);switch(this.currentFormat){case"minimal":return n;case"detailed":return a;case"emoji":return s;default:return n}}static async configure(e={}){const{level:r,console:n=!0,file:a,format:s="minimal"}=e,l=typeof process<"u"&&vl?.DEBUG||void 0,c=r??xp(l);if(this.currentFormat=s,!Zp()){Object.values(this.simpleInstances).forEach(R=>{R.level=c});return}if(await r$(),!Pn)throw new Error("Failed to load winston");const d=this.get();d.level=c;const f=d;if(f.clear(),n&&f.add(new Pn.transports.Console),a){const{fs:R,path:w}=await e$();if(R&&w){const _=w.dirname(w.resolve(a));R.existsSync(_)||R.mkdirSync(_,{recursive:!0}),f.add(new Pn.transports.File({filename:a}))}}const{format:m}=Pn,{combine:h,timestamp:v,label:b,colorize:x,splat:S}=m;Object.values(this.instances).forEach(R=>{R&&"format"in R&&(R.level=c,R.format=h(x(),S(),b({label:d_}),v({format:"HH:mm:ss"}),this.getFormatter()))})}static setDebug(e){let r;e===2||e===!0?r="debug":r="info",Object.values(this.simpleInstances).forEach(n=>{n.level=r}),Object.values(this.instances).forEach(n=>{n&&(n.level=r)}),typeof process<"u"&&vl&&(vl.DEBUG=e?e===!0?"2":String(e):"0")}static setFormat(e){this.currentFormat=e,this.configure({format:e})}},Tt(wi,"Logger"),rp(wi,"instances",{}),rp(wi,"simpleInstances",{}),rp(wi,"currentFormat","minimal"),wi);Zp()&&(t$(),Pn&&n$.configure());var Ie=n$.get(),Ct;(function(t){t.assertEqual=a=>{};function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const s={};for(const l of a)s[l]=l;return s},t.getValidEnumValues=a=>{const s=t.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),l={};for(const c of s)l[c]=a[c];return t.objectValues(l)},t.objectValues=a=>t.objectKeys(a).map(function(s){return a[s]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const l in a)Object.prototype.hasOwnProperty.call(a,l)&&s.push(l);return s},t.find=(a,s)=>{for(const l of a)if(s(l))return l},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function n(a,s=" | "){return a.map(l=>typeof l=="string"?`'${l}'`:l).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(Ct||(Ct={}));var $k;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})($k||($k={}));const Fe=Ct.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),vo=t=>{switch(typeof t){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return Number.isNaN(t)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(t)?Fe.array:t===null?Fe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Fe.promise:typeof Map<"u"&&t instanceof Map?Fe.map:typeof Set<"u"&&t instanceof Set?Fe.set:typeof Date<"u"&&t instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},Ce=Ct.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class na extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(s){return s.message},n={_errors:[]},a=s=>{for(const l of s.issues)if(l.code==="invalid_union")l.unionErrors.map(a);else if(l.code==="invalid_return_type")a(l.returnTypeError);else if(l.code==="invalid_arguments")a(l.argumentsError);else if(l.path.length===0)n._errors.push(r(l));else{let c=n,d=0;for(;d<l.path.length;){const f=l.path[d];d===l.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(r(l))):c[f]=c[f]||{_errors:[]},c=c[f],d++}}};return a(this),n}static assert(e){if(!(e instanceof na))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ct.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)if(a.path.length>0){const s=a.path[0];r[s]=r[s]||[],r[s].push(e(a))}else n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}na.create=t=>new na(t);const Yu=(t,e)=>{let r;switch(t.code){case Ce.invalid_type:t.received===Fe.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case Ce.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ct.jsonStringifyReplacer)}`;break;case Ce.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ct.joinValues(t.keys,", ")}`;break;case Ce.invalid_union:r="Invalid input";break;case Ce.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ct.joinValues(t.options)}`;break;case Ce.invalid_enum_value:r=`Invalid enum value. Expected ${Ct.joinValues(t.options)}, received '${t.received}'`;break;case Ce.invalid_arguments:r="Invalid function arguments";break;case Ce.invalid_return_type:r="Invalid function return type";break;case Ce.invalid_date:r="Invalid date";break;case Ce.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ct.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case Ce.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case Ce.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case Ce.custom:r="Invalid input";break;case Ce.invalid_intersection_types:r="Intersection results could not be merged";break;case Ce.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case Ce.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ct.assertNever(t)}return{message:r}};let v9=Yu;function f_(){return v9}const p_=t=>{const{data:e,path:r,errorMaps:n,issueData:a}=t,s=[...r,...a.path||[]],l={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let c="";const d=n.filter(f=>!!f).slice().reverse();for(const f of d)c=f(l,{data:e,defaultError:c}).message;return{...a,path:s,message:c}};function je(t,e){const r=f_(),n=p_({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===Yu?void 0:Yu].filter(a=>!!a)});t.common.issues.push(n)}class un{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return tt;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const s=await a.key,l=await a.value;n.push({key:s,value:l})}return un.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:s,value:l}=a;if(s.status==="aborted"||l.status==="aborted")return tt;s.status==="dirty"&&e.dirty(),l.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof l.value<"u"||a.alwaysSet)&&(n[s.value]=l.value)}return{status:e.value,value:n}}}const tt=Object.freeze({status:"aborted"}),xu=t=>({status:"dirty",value:t}),_n=t=>({status:"valid",value:t}),Bk=t=>t.status==="aborted",qk=t=>t.status==="dirty",tc=t=>t.status==="valid",Xp=t=>typeof Promise<"u"&&t instanceof Promise;var Ye;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ye||(Ye={}));class Ba{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hk=(t,e)=>{if(tc(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new na(t.common.issues);return this._error=r,this._error}}};function ut(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(l,c)=>{const{message:d}=t;return l.code==="invalid_enum_value"?{message:d??c.defaultError}:typeof c.data>"u"?{message:d??n??c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:d??r??c.defaultError}},description:a}}class wt{get description(){return this._def.description}_getType(e){return vo(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:vo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new un,ctx:{common:e.parent.common,data:e.data,parsedType:vo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Xp(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)},a=this._parseSync({data:e,path:n.path,parent:n});return Hk(n,a)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:r});return tc(n)?{value:n.value}:{issues:r.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(n=>tc(n)?{value:n.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:vo(e)},a=this._parse({data:e,path:n.path,parent:n}),s=await(Xp(a)?a:Promise.resolve(a));return Hk(n,s)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,s)=>{const l=e(a),c=()=>s.addIssue({code:Ce.custom,...n(a)});return typeof Promise<"u"&&l instanceof Promise?l.then(d=>d?!0:(c(),!1)):l?!0:(c(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new ys({schema:this,typeName:it.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return Ti.create(this,this._def)}nullable(){return Es.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ua.create(this)}promise(){return Qu.create(this,this._def)}or(e){return tm.create([this,e],this._def)}and(e){return rm.create(this,e,this._def)}transform(e){return new ys({...ut(this._def),schema:this,typeName:it.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new im({...ut(this._def),innerType:this,defaultValue:r,typeName:it.ZodDefault})}brand(){return new s$({typeName:it.ZodBranded,type:this,...ut(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new om({...ut(this._def),innerType:this,catchValue:r,typeName:it.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return qT.create(this,e)}readonly(){return sm.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const b9=/^c[^\s-]{8,}$/i,y9=/^[0-9a-z]+$/,E9=/^[0-9A-HJKMNP-TV-Z]{26}$/i,S9=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,w9=/^[a-z0-9_-]{21}$/i,x9=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,_9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,T9=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Lv;const A9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,C9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,N9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,k9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,O9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,a$="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",D9=new RegExp(`^${a$}$`);function i$(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function L9(t){return new RegExp(`^${i$(t)}$`)}function M9(t){let e=`${a$}T${i$(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function P9(t,e){return!!((e==="v4"||!e)&&A9.test(t)||(e==="v6"||!e)&&N9.test(t))}function j9(t,e){if(!x9.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function U9(t,e){return!!((e==="v4"||!e)&&C9.test(t)||(e==="v6"||!e)&&k9.test(t))}class _i extends wt{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Fe.string){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_type,expected:Fe.string,received:s.parsedType}),tt}const n=new un;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,c=e.data.length<s.value;(l||c)&&(a=this._getOrReturnCtx(e,a),l?je(a,{code:Ce.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&je(a,{code:Ce.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")T9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"email",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Lv||(Lv=new RegExp(R9,"u")),Lv.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"emoji",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")S9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"uuid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")w9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"nanoid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")b9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"cuid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")y9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"cuid2",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")E9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"ulid",code:Ce.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),je(a,{validation:"url",code:Ce.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"regex",code:Ce.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?M9(s).test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?D9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?L9(s).test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?_9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"duration",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?P9(e.data,s.version)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"ip",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="jwt"?j9(e.data,s.alg)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"jwt",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="cidr"?U9(e.data,s.version)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"cidr",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?I9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"base64",code:Ce.invalid_string,message:s.message}),n.dirty()):s.kind==="base64url"?O9.test(e.data)||(a=this._getOrReturnCtx(e,a),je(a,{validation:"base64url",code:Ce.invalid_string,message:s.message}),n.dirty()):Ct.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:Ce.invalid_string,...Ye.errToObj(n)})}_addCheck(e){return new _i({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ye.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ye.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ye.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ye.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Ye.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ye.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ye.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ye.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Ye.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Ye.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Ye.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ye.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Ye.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Ye.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...Ye.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...Ye.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Ye.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...Ye.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Ye.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Ye.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Ye.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Ye.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Ye.errToObj(r)})}nonempty(e){return this.min(1,Ye.errToObj(e))}trim(){return new _i({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _i({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _i({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}_i.create=t=>new _i({checks:[],typeName:it.ZodString,coerce:t?.coerce??!1,...ut(t)});function F9(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,s=Number.parseInt(t.toFixed(a).replace(".","")),l=Number.parseInt(e.toFixed(a).replace(".",""));return s%l/10**a}class rc extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Fe.number){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_type,expected:Fe.number,received:s.parsedType}),tt}let n;const a=new un;for(const s of this._def.checks)s.kind==="int"?Ct.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?F9(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.not_finite,message:s.message}),a.dirty()):Ct.assertNever(s);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Ye.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Ye.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Ye.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Ye.toString(r))}setLimit(e,r,n,a){return new rc({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Ye.toString(a)}]})}_addCheck(e){return new rc({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ye.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ye.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ye.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ye.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ye.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Ye.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Ye.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ye.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ye.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ct.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}rc.create=t=>new rc({checks:[],typeName:it.ZodNumber,coerce:t?.coerce||!1,...ut(t)});class Ku extends wt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==Fe.bigint)return this._getInvalidInput(e);let n;const a=new un;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),je(n,{code:Ce.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):Ct.assertNever(s);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return je(r,{code:Ce.invalid_type,expected:Fe.bigint,received:r.parsedType}),tt}gte(e,r){return this.setLimit("min",e,!0,Ye.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Ye.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Ye.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Ye.toString(r))}setLimit(e,r,n,a){return new Ku({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:Ye.toString(a)}]})}_addCheck(e){return new Ku({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ye.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ye.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ye.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ye.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Ye.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Ku.create=t=>new Ku({checks:[],typeName:it.ZodBigInt,coerce:t?.coerce??!1,...ut(t)});class m_ extends wt{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Fe.boolean){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.boolean,received:n.parsedType}),tt}return _n(e.data)}}m_.create=t=>new m_({typeName:it.ZodBoolean,coerce:t?.coerce||!1,...ut(t)});class Qp extends wt{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Fe.date){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_type,expected:Fe.date,received:s.parsedType}),tt}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return je(s,{code:Ce.invalid_date}),tt}const n=new un;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),je(a,{code:Ce.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Ct.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Qp({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Ye.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Ye.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}Qp.create=t=>new Qp({checks:[],coerce:t?.coerce||!1,typeName:it.ZodDate,...ut(t)});class Vk extends wt{_parse(e){if(this._getType(e)!==Fe.symbol){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.symbol,received:n.parsedType}),tt}return _n(e.data)}}Vk.create=t=>new Vk({typeName:it.ZodSymbol,...ut(t)});class Jp extends wt{_parse(e){if(this._getType(e)!==Fe.undefined){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.undefined,received:n.parsedType}),tt}return _n(e.data)}}Jp.create=t=>new Jp({typeName:it.ZodUndefined,...ut(t)});class em extends wt{_parse(e){if(this._getType(e)!==Fe.null){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.null,received:n.parsedType}),tt}return _n(e.data)}}em.create=t=>new em({typeName:it.ZodNull,...ut(t)});class Zu extends wt{constructor(){super(...arguments),this._any=!0}_parse(e){return _n(e.data)}}Zu.create=t=>new Zu({typeName:it.ZodAny,...ut(t)});class jl extends wt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _n(e.data)}}jl.create=t=>new jl({typeName:it.ZodUnknown,...ut(t)});class xo extends wt{_parse(e){const r=this._getOrReturnCtx(e);return je(r,{code:Ce.invalid_type,expected:Fe.never,received:r.parsedType}),tt}}xo.create=t=>new xo({typeName:it.ZodNever,...ut(t)});class Gk extends wt{_parse(e){if(this._getType(e)!==Fe.undefined){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.void,received:n.parsedType}),tt}return _n(e.data)}}Gk.create=t=>new Gk({typeName:it.ZodVoid,...ut(t)});class Ua extends wt{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==Fe.array)return je(r,{code:Ce.invalid_type,expected:Fe.array,received:r.parsedType}),tt;if(a.exactLength!==null){const l=r.data.length>a.exactLength.value,c=r.data.length<a.exactLength.value;(l||c)&&(je(r,{code:l?Ce.too_big:Ce.too_small,minimum:c?a.exactLength.value:void 0,maximum:l?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(je(r,{code:Ce.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(je(r,{code:Ce.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((l,c)=>a.type._parseAsync(new Ba(r,l,r.path,c)))).then(l=>un.mergeArray(n,l));const s=[...r.data].map((l,c)=>a.type._parseSync(new Ba(r,l,r.path,c)));return un.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new Ua({...this._def,minLength:{value:e,message:Ye.toString(r)}})}max(e,r){return new Ua({...this._def,maxLength:{value:e,message:Ye.toString(r)}})}length(e,r){return new Ua({...this._def,exactLength:{value:e,message:Ye.toString(r)}})}nonempty(e){return this.min(1,e)}}Ua.create=(t,e)=>new Ua({type:t,minLength:null,maxLength:null,exactLength:null,typeName:it.ZodArray,...ut(e)});function bl(t){if(t instanceof Rr){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=Ti.create(bl(n))}return new Rr({...t._def,shape:()=>e})}else return t instanceof Ua?new Ua({...t._def,type:bl(t.element)}):t instanceof Ti?Ti.create(bl(t.unwrap())):t instanceof Es?Es.create(bl(t.unwrap())):t instanceof Ai?Ai.create(t.items.map(e=>bl(e))):t}class Rr extends wt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=Ct.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==Fe.object){const f=this._getOrReturnCtx(e);return je(f,{code:Ce.invalid_type,expected:Fe.object,received:f.parsedType}),tt}const{status:n,ctx:a}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof xo&&this._def.unknownKeys==="strip"))for(const f in a.data)l.includes(f)||c.push(f);const d=[];for(const f of l){const m=s[f],h=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Ba(a,h,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof xo){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of c)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")c.length>0&&(je(a,{code:Ce.unrecognized_keys,keys:c}),n.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of c){const h=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Ba(a,h,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const h=await m.key,v=await m.value;f.push({key:h,value:v,alwaysSet:m.alwaysSet})}return f}).then(f=>un.mergeObjectSync(n,f)):un.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return Ye.errToObj,new Rr({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{const a=this._def.errorMap?.(r,n).message??n.defaultError;return r.code==="unrecognized_keys"?{message:Ye.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new Rr({...this._def,unknownKeys:"strip"})}passthrough(){return new Rr({...this._def,unknownKeys:"passthrough"})}extend(e){return new Rr({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Rr({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:it.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new Rr({...this._def,catchall:e})}pick(e){const r={};for(const n of Ct.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}omit(e){const r={};for(const n of Ct.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new Rr({...this._def,shape:()=>r})}deepPartial(){return bl(this)}partial(e){const r={};for(const n of Ct.objectKeys(this.shape)){const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}return new Rr({...this._def,shape:()=>r})}required(e){const r={};for(const n of Ct.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Ti;)s=s._def.innerType;r[n]=s}return new Rr({...this._def,shape:()=>r})}keyof(){return o$(Ct.objectKeys(this.shape))}}Rr.create=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strip",catchall:xo.create(),typeName:it.ZodObject,...ut(e)});Rr.strictCreate=(t,e)=>new Rr({shape:()=>t,unknownKeys:"strict",catchall:xo.create(),typeName:it.ZodObject,...ut(e)});Rr.lazycreate=(t,e)=>new Rr({shape:t,unknownKeys:"strip",catchall:xo.create(),typeName:it.ZodObject,...ut(e)});class tm extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(s){for(const c of s)if(c.result.status==="valid")return c.result;for(const c of s)if(c.result.status==="dirty")return r.common.issues.push(...c.ctx.common.issues),c.result;const l=s.map(c=>new na(c.ctx.common.issues));return je(r,{code:Ce.invalid_union,unionErrors:l}),tt}if(r.common.async)return Promise.all(n.map(async s=>{const l={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:l}),ctx:l}})).then(a);{let s;const l=[];for(const d of n){const f={...r,common:{...r.common,issues:[]},parent:null},m=d._parseSync({data:r.data,path:r.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!s&&(s={result:m,ctx:f}),f.common.issues.length&&l.push(f.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const c=l.map(d=>new na(d));return je(r,{code:Ce.invalid_union,unionErrors:c}),tt}}get options(){return this._def.options}}tm.create=(t,e)=>new tm({options:t,typeName:it.ZodUnion,...ut(e)});const yi=t=>t instanceof g_?yi(t.schema):t instanceof ys?yi(t.innerType()):t instanceof am?[t.value]:t instanceof bs?t.options:t instanceof v_?Ct.objectValues(t.enum):t instanceof im?yi(t._def.innerType):t instanceof Jp?[void 0]:t instanceof em?[null]:t instanceof Ti?[void 0,...yi(t.unwrap())]:t instanceof Es?[null,...yi(t.unwrap())]:t instanceof s$||t instanceof sm?yi(t.unwrap()):t instanceof om?yi(t._def.innerType):[];class BT extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.object)return je(r,{code:Ce.invalid_type,expected:Fe.object,received:r.parsedType}),tt;const n=this.discriminator,a=r.data[n],s=this.optionsMap.get(a);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(je(r,{code:Ce.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),tt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const a=new Map;for(const s of r){const l=yi(s.shape[e]);if(!l.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of l){if(a.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);a.set(c,s)}}return new BT({typeName:it.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...ut(n)})}}function h_(t,e){const r=vo(t),n=vo(e);if(t===e)return{valid:!0,data:t};if(r===Fe.object&&n===Fe.object){const a=Ct.objectKeys(e),s=Ct.objectKeys(t).filter(c=>a.indexOf(c)!==-1),l={...t,...e};for(const c of s){const d=h_(t[c],e[c]);if(!d.valid)return{valid:!1};l[c]=d.data}return{valid:!0,data:l}}else if(r===Fe.array&&n===Fe.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<t.length;s++){const l=t[s],c=e[s],d=h_(l,c);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return r===Fe.date&&n===Fe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class rm extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(s,l)=>{if(Bk(s)||Bk(l))return tt;const c=h_(s.value,l.value);return c.valid?((qk(s)||qk(l))&&r.dirty(),{status:r.value,value:c.data}):(je(n,{code:Ce.invalid_intersection_types}),tt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,l])=>a(s,l)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}rm.create=(t,e,r)=>new rm({left:t,right:e,typeName:it.ZodIntersection,...ut(r)});class Ai extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.array)return je(n,{code:Ce.invalid_type,expected:Fe.array,received:n.parsedType}),tt;if(n.data.length<this._def.items.length)return je(n,{code:Ce.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),tt;!this._def.rest&&n.data.length>this._def.items.length&&(je(n,{code:Ce.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...n.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Ba(n,l,n.path,c)):null}).filter(l=>!!l);return n.common.async?Promise.all(s).then(l=>un.mergeArray(r,l)):un.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new Ai({...this._def,rest:e})}}Ai.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ai({items:t,typeName:it.ZodTuple,rest:null,...ut(e)})};class nm extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.object)return je(n,{code:Ce.invalid_type,expected:Fe.object,received:n.parsedType}),tt;const a=[],s=this._def.keyType,l=this._def.valueType;for(const c in n.data)a.push({key:s._parse(new Ba(n,c,n.path,c)),value:l._parse(new Ba(n,n.data[c],n.path,c)),alwaysSet:c in n.data});return n.common.async?un.mergeObjectAsync(r,a):un.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof wt?new nm({keyType:e,valueType:r,typeName:it.ZodRecord,...ut(n)}):new nm({keyType:_i.create(),valueType:e,typeName:it.ZodRecord,...ut(r)})}}class Wk extends wt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.map)return je(n,{code:Ce.invalid_type,expected:Fe.map,received:n.parsedType}),tt;const a=this._def.keyType,s=this._def.valueType,l=[...n.data.entries()].map(([c,d],f)=>({key:a._parse(new Ba(n,c,n.path,[f,"key"])),value:s._parse(new Ba(n,d,n.path,[f,"value"]))}));if(n.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const d of l){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}})}else{const c=new Map;for(const d of l){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return tt;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),c.set(f.value,m.value)}return{status:r.value,value:c}}}}Wk.create=(t,e,r)=>new Wk({valueType:e,keyType:t,typeName:it.ZodMap,...ut(r)});class Xu extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.set)return je(n,{code:Ce.invalid_type,expected:Fe.set,received:n.parsedType}),tt;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(je(n,{code:Ce.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(je(n,{code:Ce.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const s=this._def.valueType;function l(d){const f=new Set;for(const m of d){if(m.status==="aborted")return tt;m.status==="dirty"&&r.dirty(),f.add(m.value)}return{status:r.value,value:f}}const c=[...n.data.values()].map((d,f)=>s._parse(new Ba(n,d,n.path,f)));return n.common.async?Promise.all(c).then(d=>l(d)):l(c)}min(e,r){return new Xu({...this._def,minSize:{value:e,message:Ye.toString(r)}})}max(e,r){return new Xu({...this._def,maxSize:{value:e,message:Ye.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Xu.create=(t,e)=>new Xu({valueType:t,minSize:null,maxSize:null,typeName:it.ZodSet,...ut(e)});class Pu extends wt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.function)return je(r,{code:Ce.invalid_type,expected:Fe.function,received:r.parsedType}),tt;function n(c,d){return p_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f_(),Yu].filter(f=>!!f),issueData:{code:Ce.invalid_arguments,argumentsError:d}})}function a(c,d){return p_({data:c,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,f_(),Yu].filter(f=>!!f),issueData:{code:Ce.invalid_return_type,returnTypeError:d}})}const s={errorMap:r.common.contextualErrorMap},l=r.data;if(this._def.returns instanceof Qu){const c=this;return _n(async function(...d){const f=new na([]),m=await c._def.args.parseAsync(d,s).catch(b=>{throw f.addIssue(n(d,b)),f}),h=await Reflect.apply(l,this,m);return await c._def.returns._def.type.parseAsync(h,s).catch(b=>{throw f.addIssue(a(h,b)),f})})}else{const c=this;return _n(function(...d){const f=c._def.args.safeParse(d,s);if(!f.success)throw new na([n(d,f.error)]);const m=Reflect.apply(l,this,f.data),h=c._def.returns.safeParse(m,s);if(!h.success)throw new na([a(m,h.error)]);return h.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Pu({...this._def,args:Ai.create(e).rest(jl.create())})}returns(e){return new Pu({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new Pu({args:e||Ai.create([]).rest(jl.create()),returns:r||jl.create(),typeName:it.ZodFunction,...ut(n)})}}class g_ extends wt{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}g_.create=(t,e)=>new g_({getter:t,typeName:it.ZodLazy,...ut(e)});class am extends wt{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return je(r,{received:r.data,code:Ce.invalid_literal,expected:this._def.value}),tt}return{status:"valid",value:e.data}}get value(){return this._def.value}}am.create=(t,e)=>new am({value:t,typeName:it.ZodLiteral,...ut(e)});function o$(t,e){return new bs({values:t,typeName:it.ZodEnum,...ut(e)})}class bs extends wt{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return je(r,{expected:Ct.joinValues(n),received:r.parsedType,code:Ce.invalid_type}),tt}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return je(r,{received:r.data,code:Ce.invalid_enum_value,options:n}),tt}return _n(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return bs.create(e,{...this._def,...r})}exclude(e,r=this._def){return bs.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}bs.create=o$;class v_ extends wt{_parse(e){const r=Ct.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Fe.string&&n.parsedType!==Fe.number){const a=Ct.objectValues(r);return je(n,{expected:Ct.joinValues(a),received:n.parsedType,code:Ce.invalid_type}),tt}if(this._cache||(this._cache=new Set(Ct.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=Ct.objectValues(r);return je(n,{received:n.data,code:Ce.invalid_enum_value,options:a}),tt}return _n(e.data)}get enum(){return this._def.values}}v_.create=(t,e)=>new v_({values:t,typeName:it.ZodNativeEnum,...ut(e)});class Qu extends wt{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.promise&&r.common.async===!1)return je(r,{code:Ce.invalid_type,expected:Fe.promise,received:r.parsedType}),tt;const n=r.parsedType===Fe.promise?r.data:Promise.resolve(r.data);return _n(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Qu.create=(t,e)=>new Qu({type:t,typeName:it.ZodPromise,...ut(e)});class ys extends wt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===it.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:l=>{je(n,l),l.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const l=a.transform(n.data,s);if(n.common.async)return Promise.resolve(l).then(async c=>{if(r.value==="aborted")return tt;const d=await this._def.schema._parseAsync({data:c,path:n.path,parent:n});return d.status==="aborted"?tt:d.status==="dirty"||r.value==="dirty"?xu(d.value):d});{if(r.value==="aborted")return tt;const c=this._def.schema._parseSync({data:l,path:n.path,parent:n});return c.status==="aborted"?tt:c.status==="dirty"||r.value==="dirty"?xu(c.value):c}}if(a.type==="refinement"){const l=c=>{const d=a.refinement(c,s);if(n.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(n.common.async===!1){const c=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return c.status==="aborted"?tt:(c.status==="dirty"&&r.dirty(),l(c.value),{status:r.value,value:c.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(c=>c.status==="aborted"?tt:(c.status==="dirty"&&r.dirty(),l(c.value).then(()=>({status:r.value,value:c.value}))))}if(a.type==="transform")if(n.common.async===!1){const l=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!tc(l))return tt;const c=a.transform(l.value,s);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:c}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(l=>tc(l)?Promise.resolve(a.transform(l.value,s)).then(c=>({status:r.value,value:c})):tt);Ct.assertNever(a)}}ys.create=(t,e,r)=>new ys({schema:t,typeName:it.ZodEffects,effect:e,...ut(r)});ys.createWithPreprocess=(t,e,r)=>new ys({schema:e,effect:{type:"preprocess",transform:t},typeName:it.ZodEffects,...ut(r)});class Ti extends wt{_parse(e){return this._getType(e)===Fe.undefined?_n(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ti.create=(t,e)=>new Ti({innerType:t,typeName:it.ZodOptional,...ut(e)});class Es extends wt{_parse(e){return this._getType(e)===Fe.null?_n(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Es.create=(t,e)=>new Es({innerType:t,typeName:it.ZodNullable,...ut(e)});class im extends wt{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===Fe.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}im.create=(t,e)=>new im({innerType:t,typeName:it.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ut(e)});class om extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Xp(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new na(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}om.create=(t,e)=>new om({innerType:t,typeName:it.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ut(e)});class Yk extends wt{_parse(e){if(this._getType(e)!==Fe.nan){const n=this._getOrReturnCtx(e);return je(n,{code:Ce.invalid_type,expected:Fe.nan,received:n.parsedType}),tt}return{status:"valid",value:e.data}}}Yk.create=t=>new Yk({typeName:it.ZodNaN,...ut(t)});class s$ extends wt{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class qT extends wt{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?tt:s.status==="dirty"?(r.dirty(),xu(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?tt:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new qT({in:e,out:r,typeName:it.ZodPipeline})}}class sm extends wt{_parse(e){const r=this._def.innerType._parse(e),n=a=>(tc(a)&&(a.value=Object.freeze(a.value)),a);return Xp(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}sm.create=(t,e)=>new sm({innerType:t,typeName:it.ZodReadonly,...ut(e)});function Kk(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function z9(t,e={},r){return t?Zu.create().superRefine((n,a)=>{const s=t(n);if(s instanceof Promise)return s.then(l=>{if(!l){const c=Kk(e,n),d=c.fatal??r??!0;a.addIssue({code:"custom",...c,fatal:d})}});if(!s){const l=Kk(e,n),c=l.fatal??r??!0;a.addIssue({code:"custom",...l,fatal:c})}}):Zu.create()}var it;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(it||(it={}));const eEe=(t,e={message:`Input not instance of ${t.name}`})=>z9(r=>r instanceof t,e),me=_i.create,Ur=rc.create,Dr=m_.create,tEe=Jp.create,rEe=em.create,$9=Zu.create,yd=jl.create;xo.create;const Ve=Ua.create,De=Rr.create,dn=tm.create,B9=BT.create;rm.create;Ai.create;const Ed=nm.create,nEe=Pu.create,dt=am.create,Ci=bs.create,aEe=Qu.create,Re=Ti.create;Es.create;const q9=tt,Om="2025-06-18",H9=[Om,"2025-03-26","2024-11-05","2024-10-07"],Dm="2.0",l$=dn([me(),Ur().int()]),c$=me(),V9=De({progressToken:Re(l$)}).passthrough(),sa=De({_meta:Re(V9)}).passthrough(),Tn=De({method:me(),params:Re(sa)}),Sd=De({_meta:Re(De({}).passthrough())}).passthrough(),Ya=De({method:me(),params:Re(Sd)}),la=De({_meta:Re(De({}).passthrough())}).passthrough(),Lm=dn([me(),Ur().int()]),u$=De({jsonrpc:dt(Dm),id:Lm}).merge(Tn).strict(),d$=t=>u$.safeParse(t).success,f$=De({jsonrpc:dt(Dm)}).merge(Ya).strict(),G9=t=>f$.safeParse(t).success,p$=De({jsonrpc:dt(Dm),id:Lm,result:la}).strict(),b_=t=>p$.safeParse(t).success;var Oa;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError"})(Oa||(Oa={}));const m$=De({jsonrpc:dt(Dm),id:Lm,error:De({code:Ur().int(),message:me(),data:Re(yd())})}).strict(),W9=t=>m$.safeParse(t).success,_p=dn([u$,f$,p$,m$]),Cl=la.strict(),HT=Ya.extend({method:dt("notifications/cancelled"),params:Sd.extend({requestId:Lm,reason:me().optional()})}),Y9=De({src:me(),mimeType:Re(me()),sizes:Re(Ve(me()))}).passthrough(),wd=De({icons:Ve(Y9).optional()}).passthrough(),xd=De({name:me(),title:Re(me())}).passthrough(),h$=xd.extend({version:me(),websiteUrl:Re(me())}).merge(wd),K9=De({experimental:Re(De({}).passthrough()),sampling:Re(De({}).passthrough()),elicitation:Re(De({}).passthrough()),roots:Re(De({listChanged:Re(Dr())}).passthrough())}).passthrough(),Z9=Tn.extend({method:dt("initialize"),params:sa.extend({protocolVersion:me(),capabilities:K9,clientInfo:h$})}),X9=De({experimental:Re(De({}).passthrough()),logging:Re(De({}).passthrough()),completions:Re(De({}).passthrough()),prompts:Re(De({listChanged:Re(Dr())}).passthrough()),resources:Re(De({subscribe:Re(Dr()),listChanged:Re(Dr())}).passthrough()),tools:Re(De({listChanged:Re(Dr())}).passthrough())}).passthrough(),g$=la.extend({protocolVersion:me(),capabilities:X9,serverInfo:h$,instructions:Re(me())}),v$=Ya.extend({method:dt("notifications/initialized")}),Q9=t=>v$.safeParse(t).success,VT=Tn.extend({method:dt("ping")}),J9=De({progress:Ur(),total:Re(Ur()),message:Re(me())}).passthrough(),GT=Ya.extend({method:dt("notifications/progress"),params:Sd.merge(J9).extend({progressToken:l$})}),Mm=Tn.extend({params:sa.extend({cursor:Re(c$)}).optional()}),Pm=la.extend({nextCursor:Re(c$)}),b$=De({uri:me(),mimeType:Re(me()),_meta:Re(De({}).passthrough())}).passthrough(),y$=b$.extend({text:me()}),WT=me().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),E$=b$.extend({blob:WT}),S$=xd.extend({uri:me(),description:Re(me()),mimeType:Re(me()),_meta:Re(De({}).passthrough())}).merge(wd),e6=xd.extend({uriTemplate:me(),description:Re(me()),mimeType:Re(me()),_meta:Re(De({}).passthrough())}).merge(wd),t6=Mm.extend({method:dt("resources/list")}),w$=Pm.extend({resources:Ve(S$)}),r6=Mm.extend({method:dt("resources/templates/list")}),x$=Pm.extend({resourceTemplates:Ve(e6)}),n6=Tn.extend({method:dt("resources/read"),params:sa.extend({uri:me()})}),_$=la.extend({contents:Ve(dn([y$,E$]))}),a6=Ya.extend({method:dt("notifications/resources/list_changed")}),i6=Tn.extend({method:dt("resources/subscribe"),params:sa.extend({uri:me()})}),o6=Tn.extend({method:dt("resources/unsubscribe"),params:sa.extend({uri:me()})}),s6=Ya.extend({method:dt("notifications/resources/updated"),params:Sd.extend({uri:me()})}),l6=De({name:me(),description:Re(me()),required:Re(Dr())}).passthrough(),c6=xd.extend({description:Re(me()),arguments:Re(Ve(l6)),_meta:Re(De({}).passthrough())}).merge(wd),u6=Mm.extend({method:dt("prompts/list")}),T$=Pm.extend({prompts:Ve(c6)}),d6=Tn.extend({method:dt("prompts/get"),params:sa.extend({name:me(),arguments:Re(Ed(me()))})}),YT=De({type:dt("text"),text:me(),_meta:Re(De({}).passthrough())}).passthrough(),KT=De({type:dt("image"),data:WT,mimeType:me(),_meta:Re(De({}).passthrough())}).passthrough(),ZT=De({type:dt("audio"),data:WT,mimeType:me(),_meta:Re(De({}).passthrough())}).passthrough(),f6=De({type:dt("resource"),resource:dn([y$,E$]),_meta:Re(De({}).passthrough())}).passthrough(),p6=S$.extend({type:dt("resource_link")}),R$=dn([YT,KT,ZT,p6,f6]),m6=De({role:Ci(["user","assistant"]),content:R$}).passthrough(),A$=la.extend({description:Re(me()),messages:Ve(m6)}),h6=Ya.extend({method:dt("notifications/prompts/list_changed")}),g6=De({title:Re(me()),readOnlyHint:Re(Dr()),destructiveHint:Re(Dr()),idempotentHint:Re(Dr()),openWorldHint:Re(Dr())}).passthrough(),v6=xd.extend({description:Re(me()),inputSchema:De({type:dt("object"),properties:Re(De({}).passthrough()),required:Re(Ve(me()))}).passthrough(),outputSchema:Re(De({type:dt("object"),properties:Re(De({}).passthrough()),required:Re(Ve(me()))}).passthrough()),annotations:Re(g6),_meta:Re(De({}).passthrough())}).merge(wd),b6=Mm.extend({method:dt("tools/list")}),C$=Pm.extend({tools:Ve(v6)}),XT=la.extend({content:Ve(R$).default([]),structuredContent:De({}).passthrough().optional(),isError:Re(Dr())});XT.or(la.extend({toolResult:yd()}));const y6=Tn.extend({method:dt("tools/call"),params:sa.extend({name:me(),arguments:Re(Ed(yd()))})}),E6=Ya.extend({method:dt("notifications/tools/list_changed")}),N$=Ci(["debug","info","notice","warning","error","critical","alert","emergency"]),S6=Tn.extend({method:dt("logging/setLevel"),params:sa.extend({level:N$})}),w6=Ya.extend({method:dt("notifications/message"),params:Sd.extend({level:N$,logger:Re(me()),data:yd()})}),x6=De({name:me().optional()}).passthrough(),_6=De({hints:Re(Ve(x6)),costPriority:Re(Ur().min(0).max(1)),speedPriority:Re(Ur().min(0).max(1)),intelligencePriority:Re(Ur().min(0).max(1))}).passthrough(),T6=De({role:Ci(["user","assistant"]),content:dn([YT,KT,ZT])}).passthrough(),R6=Tn.extend({method:dt("sampling/createMessage"),params:sa.extend({messages:Ve(T6),systemPrompt:Re(me()),includeContext:Re(Ci(["none","thisServer","allServers"])),temperature:Re(Ur()),maxTokens:Ur().int(),stopSequences:Re(Ve(me())),metadata:Re(De({}).passthrough()),modelPreferences:Re(_6)})}),A6=la.extend({model:me(),stopReason:Re(Ci(["endTurn","stopSequence","maxTokens"]).or(me())),role:Ci(["user","assistant"]),content:B9("type",[YT,KT,ZT])}),C6=De({type:dt("boolean"),title:Re(me()),description:Re(me()),default:Re(Dr())}).passthrough(),N6=De({type:dt("string"),title:Re(me()),description:Re(me()),minLength:Re(Ur()),maxLength:Re(Ur()),format:Re(Ci(["email","uri","date","date-time"]))}).passthrough(),k6=De({type:Ci(["number","integer"]),title:Re(me()),description:Re(me()),minimum:Re(Ur()),maximum:Re(Ur())}).passthrough(),I6=De({type:dt("string"),title:Re(me()),description:Re(me()),enum:Ve(me()),enumNames:Re(Ve(me()))}).passthrough(),O6=dn([C6,N6,k6,I6]),D6=Tn.extend({method:dt("elicitation/create"),params:sa.extend({message:me(),requestedSchema:De({type:dt("object"),properties:Ed(me(),O6),required:Re(Ve(me()))}).passthrough()})}),L6=la.extend({action:Ci(["accept","decline","cancel"]),content:Re(Ed(me(),yd()))}),M6=De({type:dt("ref/resource"),uri:me()}).passthrough(),P6=De({type:dt("ref/prompt"),name:me()}).passthrough(),j6=Tn.extend({method:dt("completion/complete"),params:sa.extend({ref:dn([P6,M6]),argument:De({name:me(),value:me()}).passthrough(),context:Re(De({arguments:Re(Ed(me(),me()))}))})}),k$=la.extend({completion:De({values:Ve(me()).max(100),total:Re(Ur().int()),hasMore:Re(Dr())}).passthrough()}),U6=De({uri:me().startsWith("file://"),name:Re(me()),_meta:Re(De({}).passthrough())}).passthrough(),F6=Tn.extend({method:dt("roots/list")}),z6=la.extend({roots:Ve(U6)}),$6=Ya.extend({method:dt("notifications/roots/list_changed")});dn([VT,Z9,j6,S6,d6,u6,t6,r6,n6,i6,o6,y6,b6]);dn([HT,GT,v$,$6]);dn([Cl,A6,L6,z6]);dn([VT,R6,D6,F6]);dn([HT,GT,w6,s6,a6,E6,h6]);dn([Cl,g$,k$,A$,T$,w$,x$,_$,XT,C$]);class So extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}}const B6=6e4;class q6{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this.setNotificationHandler(HT,r=>{const n=this._requestHandlerAbortControllers.get(r.params.requestId);n?.abort(r.params.reason)}),this.setNotificationHandler(GT,r=>{this._onprogress(r)}),this.setRequestHandler(VT,r=>({}))}_setupTimeout(e,r,n,a,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(a,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:s,onTimeout:a})}_resetTimeout(e){const r=this._timeoutInfo.get(e);if(!r)return!1;const n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),new So(Oa.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){const r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,n,a;this._transport=e;const s=(r=this.transport)===null||r===void 0?void 0:r.onclose;this._transport.onclose=()=>{s?.(),this._onclose()};const l=(n=this.transport)===null||n===void 0?void 0:n.onerror;this._transport.onerror=d=>{l?.(d),this._onerror(d)};const c=(a=this._transport)===null||a===void 0?void 0:a.onmessage;this._transport.onmessage=(d,f)=>{c?.(d,f),b_(d)||W9(d)?this._onresponse(d):d$(d)?this._onrequest(d,f):G9(d)?this._onnotification(d):this._onerror(new Error(`Unknown message type: ${JSON.stringify(d)}`))},await this._transport.start()}_onclose(){var e;const r=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear(),this._transport=void 0,(e=this.onclose)===null||e===void 0||e.call(this);const n=new So(Oa.ConnectionClosed,"Connection closed");for(const a of r.values())a(n)}_onerror(e){var r;(r=this.onerror)===null||r===void 0||r.call(this,e)}_onnotification(e){var r;const n=(r=this._notificationHandlers.get(e.method))!==null&&r!==void 0?r:this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,r){var n,a;const s=(n=this._requestHandlers.get(e.method))!==null&&n!==void 0?n:this.fallbackRequestHandler,l=this._transport;if(s===void 0){l?.send({jsonrpc:"2.0",id:e.id,error:{code:Oa.MethodNotFound,message:"Method not found"}}).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(e.id,c);const d={signal:c.signal,sessionId:l?.sessionId,_meta:(a=e.params)===null||a===void 0?void 0:a._meta,sendNotification:f=>this.notification(f,{relatedRequestId:e.id}),sendRequest:(f,m,h)=>this.request(f,m,{...h,relatedRequestId:e.id}),authInfo:r?.authInfo,requestId:e.id,requestInfo:r?.requestInfo};Promise.resolve().then(()=>s(e,d)).then(f=>{if(!c.signal.aborted)return l?.send({result:f,jsonrpc:"2.0",id:e.id})},f=>{var m;if(!c.signal.aborted)return l?.send({jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(f.code)?f.code:Oa.InternalError,message:(m=f.message)!==null&&m!==void 0?m:"Internal error"}})}).catch(f=>this._onerror(new Error(`Failed to send response: ${f}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:r,...n}=e.params,a=Number(r),s=this._progressHandlers.get(a);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const l=this._responseHandlers.get(a),c=this._timeoutInfo.get(a);if(c&&l&&c.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){l(d);return}s(n)}_onresponse(e){const r=Number(e.id),n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}if(this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),b_(e))n(e);else{const a=new So(e.error.code,e.error.message,e.error.data);n(a)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)===null||e===void 0?void 0:e.close())}request(e,r,n){const{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}=n??{};return new Promise((c,d)=>{var f,m,h,v,b,x;if(!this._transport){d(new Error("Not connected"));return}((f=this._options)===null||f===void 0?void 0:f.enforceStrictCapabilities)===!0&&this.assertCapabilityForMethod(e.method),(m=n?.signal)===null||m===void 0||m.throwIfAborted();const S=this._requestMessageId++,R={...e,jsonrpc:"2.0",id:S};n?.onprogress&&(this._progressHandlers.set(S,n.onprogress),R.params={...e.params,_meta:{...((h=e.params)===null||h===void 0?void 0:h._meta)||{},progressToken:S}});const w=C=>{var k;this._responseHandlers.delete(S),this._progressHandlers.delete(S),this._cleanupTimeout(S),(k=this._transport)===null||k===void 0||k.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:S,reason:String(C)}},{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(N=>this._onerror(new Error(`Failed to send cancellation: ${N}`))),d(C)};this._responseHandlers.set(S,C=>{var k;if(!(!((k=n?.signal)===null||k===void 0)&&k.aborted)){if(C instanceof Error)return d(C);try{const N=r.parse(C.result);c(N)}catch(N){d(N)}}}),(v=n?.signal)===null||v===void 0||v.addEventListener("abort",()=>{var C;w((C=n?.signal)===null||C===void 0?void 0:C.reason)});const _=(b=n?.timeout)!==null&&b!==void 0?b:B6,A=()=>w(new So(Oa.RequestTimeout,"Request timed out",{timeout:_}));this._setupTimeout(S,_,n?.maxTotalTimeout,A,(x=n?.resetTimeoutOnProgress)!==null&&x!==void 0?x:!1),this._transport.send(R,{relatedRequestId:a,resumptionToken:s,onresumptiontoken:l}).catch(C=>{this._cleanupTimeout(S),d(C)})})}async notification(e,r){var n,a;if(!this._transport)throw new Error("Not connected");if(this.assertNotificationCapability(e.method),((a=(n=this._options)===null||n===void 0?void 0:n.debouncedNotificationMethods)!==null&&a!==void 0?a:[]).includes(e.method)&&!e.params&&!r?.relatedRequestId){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var d;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;const f={...e,jsonrpc:"2.0"};(d=this._transport)===null||d===void 0||d.send(f,r).catch(m=>this._onerror(m))});return}const c={...e,jsonrpc:"2.0"};await this._transport.send(c,r)}setRequestHandler(e,r){const n=e.shape.method.value;this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(a,s)=>Promise.resolve(r(e.parse(a),s)))}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,r){this._notificationHandlers.set(e.shape.method.value,n=>Promise.resolve(r(e.parse(n))))}removeNotificationHandler(e){this._notificationHandlers.delete(e)}}function H6(t,e){return Object.entries(e).reduce((r,[n,a])=>(a&&typeof a=="object"?r[n]=r[n]?{...r[n],...a}:a:r[n]=a,r),{...t})}var _u={exports:{}};var V6=_u.exports,Zk;function G6(){return Zk||(Zk=1,(function(t,e){(function(r,n){n(e)})(V6,(function(r){function n(){for(var re=arguments.length,Y=Array(re),ae=0;ae<re;ae++)Y[ae]=arguments[ae];if(Y.length>1){Y[0]=Y[0].slice(0,-1);for(var ve=Y.length-1,pe=1;pe<ve;++pe)Y[pe]=Y[pe].slice(1,-1);return Y[ve]=Y[ve].slice(1),Y.join("")}else return Y[0]}function a(re){return"(?:"+re+")"}function s(re){return re===void 0?"undefined":re===null?"null":Object.prototype.toString.call(re).split(" ").pop().split("]").shift().toLowerCase()}function l(re){return re.toUpperCase()}function c(re){return re!=null?re instanceof Array?re:typeof re.length!="number"||re.split||re.setInterval||re.call?[re]:Array.prototype.slice.call(re):[]}function d(re,Y){var ae=re;if(Y)for(var ve in Y)ae[ve]=Y[ve];return ae}function f(re){var Y="[A-Za-z]",ae="[0-9]",ve=n(ae,"[A-Fa-f]"),pe=a(a("%[EFef]"+ve+"%"+ve+ve+"%"+ve+ve)+"|"+a("%[89A-Fa-f]"+ve+"%"+ve+ve)+"|"+a("%"+ve+ve)),Pe="[\\:\\/\\?\\#\\[\\]\\@]",Ue="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",pt=n(Pe,Ue),Ut=re?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",sr=re?"[\\uE000-\\uF8FF]":"[]",bt=n(Y,ae,"[\\-\\.\\_\\~]",Ut);a(Y+n(Y,ae,"[\\+\\-\\.]")+"*"),a(a(pe+"|"+n(bt,Ue,"[\\:]"))+"*");var Ft=a(a("25[0-5]")+"|"+a("2[0-4]"+ae)+"|"+a("1"+ae+ae)+"|"+a("0?[1-9]"+ae)+"|0?0?"+ae),Wt=a(Ft+"\\."+Ft+"\\."+Ft+"\\."+Ft),nt=a(ve+"{1,4}"),Dt=a(a(nt+"\\:"+nt)+"|"+Wt),Yt=a(a(nt+"\\:")+"{6}"+Dt),Pt=a("\\:\\:"+a(nt+"\\:")+"{5}"+Dt),on=a(a(nt)+"?\\:\\:"+a(nt+"\\:")+"{4}"+Dt),zt=a(a(a(nt+"\\:")+"{0,1}"+nt)+"?\\:\\:"+a(nt+"\\:")+"{3}"+Dt),Cn=a(a(a(nt+"\\:")+"{0,2}"+nt)+"?\\:\\:"+a(nt+"\\:")+"{2}"+Dt),Qa=a(a(a(nt+"\\:")+"{0,3}"+nt)+"?\\:\\:"+nt+"\\:"+Dt),sn=a(a(a(nt+"\\:")+"{0,4}"+nt)+"?\\:\\:"+Dt),Cr=a(a(a(nt+"\\:")+"{0,5}"+nt)+"?\\:\\:"+nt),Bn=a(a(a(nt+"\\:")+"{0,6}"+nt)+"?\\:\\:"),Ta=a([Yt,Pt,on,zt,Cn,Qa,sn,Cr,Bn].join("|")),qn=a(a(bt+"|"+pe)+"+");a("[vV]"+ve+"+\\."+n(bt,Ue,"[\\:]")+"+"),a(a(pe+"|"+n(bt,Ue))+"*");var Mo=a(pe+"|"+n(bt,Ue,"[\\:\\@]"));return a(a(pe+"|"+n(bt,Ue,"[\\@]"))+"+"),a(a(Mo+"|"+n("[\\/\\?]",sr))+"*"),{NOT_SCHEME:new RegExp(n("[^]",Y,ae,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",bt,Ue),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",bt,Ue),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",bt,Ue),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",bt,Ue),"g"),NOT_QUERY:new RegExp(n("[^\\%]",bt,Ue,"[\\:\\@\\/\\?]",sr),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",bt,Ue,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",bt,Ue),"g"),UNRESERVED:new RegExp(bt,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",bt,pt),"g"),PCT_ENCODED:new RegExp(pe,"g"),IPV4ADDRESS:new RegExp("^("+Wt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Ta+")"+a(a("\\%25|\\%(?!"+ve+"{2})")+"("+qn+")")+"?\\]?$")}}var m=f(!1),h=f(!0),v=(function(){function re(Y,ae){var ve=[],pe=!0,Pe=!1,Ue=void 0;try{for(var pt=Y[Symbol.iterator](),Ut;!(pe=(Ut=pt.next()).done)&&(ve.push(Ut.value),!(ae&&ve.length===ae));pe=!0);}catch(sr){Pe=!0,Ue=sr}finally{try{!pe&&pt.return&&pt.return()}finally{if(Pe)throw Ue}}return ve}return function(Y,ae){if(Array.isArray(Y))return Y;if(Symbol.iterator in Object(Y))return re(Y,ae);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),b=function(re){if(Array.isArray(re)){for(var Y=0,ae=Array(re.length);Y<re.length;Y++)ae[Y]=re[Y];return ae}else return Array.from(re)},x=2147483647,S=36,R=1,w=26,_=38,A=700,C=72,k=128,N="-",I=/^xn--/,O=/[^\0-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=S-R,V=Math.floor,X=String.fromCharCode;function Q(re){throw new RangeError(L[re])}function oe(re,Y){for(var ae=[],ve=re.length;ve--;)ae[ve]=Y(re[ve]);return ae}function U(re,Y){var ae=re.split("@"),ve="";ae.length>1&&(ve=ae[0]+"@",re=ae[1]),re=re.replace(M,".");var pe=re.split("."),Pe=oe(pe,Y).join(".");return ve+Pe}function W(re){for(var Y=[],ae=0,ve=re.length;ae<ve;){var pe=re.charCodeAt(ae++);if(pe>=55296&&pe<=56319&&ae<ve){var Pe=re.charCodeAt(ae++);(Pe&64512)==56320?Y.push(((pe&1023)<<10)+(Pe&1023)+65536):(Y.push(pe),ae--)}else Y.push(pe)}return Y}var H=function(Y){return String.fromCodePoint.apply(String,b(Y))},te=function(Y){return Y-48<10?Y-22:Y-65<26?Y-65:Y-97<26?Y-97:S},se=function(Y,ae){return Y+22+75*(Y<26)-((ae!=0)<<5)},B=function(Y,ae,ve){var pe=0;for(Y=ve?V(Y/A):Y>>1,Y+=V(Y/ae);Y>P*w>>1;pe+=S)Y=V(Y/P);return V(pe+(P+1)*Y/(Y+_))},q=function(Y){var ae=[],ve=Y.length,pe=0,Pe=k,Ue=C,pt=Y.lastIndexOf(N);pt<0&&(pt=0);for(var Ut=0;Ut<pt;++Ut)Y.charCodeAt(Ut)>=128&&Q("not-basic"),ae.push(Y.charCodeAt(Ut));for(var sr=pt>0?pt+1:0;sr<ve;){for(var bt=pe,Ft=1,Wt=S;;Wt+=S){sr>=ve&&Q("invalid-input");var nt=te(Y.charCodeAt(sr++));(nt>=S||nt>V((x-pe)/Ft))&&Q("overflow"),pe+=nt*Ft;var Dt=Wt<=Ue?R:Wt>=Ue+w?w:Wt-Ue;if(nt<Dt)break;var Yt=S-Dt;Ft>V(x/Yt)&&Q("overflow"),Ft*=Yt}var Pt=ae.length+1;Ue=B(pe-bt,Pt,bt==0),V(pe/Pt)>x-Pe&&Q("overflow"),Pe+=V(pe/Pt),pe%=Pt,ae.splice(pe++,0,Pe)}return String.fromCodePoint.apply(String,ae)},$=function(Y){var ae=[];Y=W(Y);var ve=Y.length,pe=k,Pe=0,Ue=C,pt=!0,Ut=!1,sr=void 0;try{for(var bt=Y[Symbol.iterator](),Ft;!(pt=(Ft=bt.next()).done);pt=!0){var Wt=Ft.value;Wt<128&&ae.push(X(Wt))}}catch(Fi){Ut=!0,sr=Fi}finally{try{!pt&&bt.return&&bt.return()}finally{if(Ut)throw sr}}var nt=ae.length,Dt=nt;for(nt&&ae.push(N);Dt<ve;){var Yt=x,Pt=!0,on=!1,zt=void 0;try{for(var Cn=Y[Symbol.iterator](),Qa;!(Pt=(Qa=Cn.next()).done);Pt=!0){var sn=Qa.value;sn>=pe&&sn<Yt&&(Yt=sn)}}catch(Fi){on=!0,zt=Fi}finally{try{!Pt&&Cn.return&&Cn.return()}finally{if(on)throw zt}}var Cr=Dt+1;Yt-pe>V((x-Pe)/Cr)&&Q("overflow"),Pe+=(Yt-pe)*Cr,pe=Yt;var Bn=!0,Ta=!1,qn=void 0;try{for(var Mo=Y[Symbol.iterator](),Po;!(Bn=(Po=Mo.next()).done);Bn=!0){var jo=Po.value;if(jo<pe&&++Pe>x&&Q("overflow"),jo==pe){for(var mn=Pe,zr=S;;zr+=S){var Uo=zr<=Ue?R:zr>=Ue+w?w:zr-Ue;if(mn<Uo)break;var Hd=mn-Uo,Os=S-Uo;ae.push(X(se(Uo+Hd%Os,0))),mn=V(Hd/Os)}ae.push(X(se(mn,0))),Ue=B(Pe,Cr,Dt==nt),Pe=0,++Dt}}}catch(Fi){Ta=!0,qn=Fi}finally{try{!Bn&&Mo.return&&Mo.return()}finally{if(Ta)throw qn}}++Pe,++pe}return ae.join("")},K=function(Y){return U(Y,function(ae){return I.test(ae)?q(ae.slice(4).toLowerCase()):ae})},J=function(Y){return U(Y,function(ae){return O.test(ae)?"xn--"+$(ae):ae})},z={version:"2.1.0",ucs2:{decode:W,encode:H},decode:q,encode:$,toASCII:J,toUnicode:K},j={};function Z(re){var Y=re.charCodeAt(0),ae=void 0;return Y<16?ae="%0"+Y.toString(16).toUpperCase():Y<128?ae="%"+Y.toString(16).toUpperCase():Y<2048?ae="%"+(Y>>6|192).toString(16).toUpperCase()+"%"+(Y&63|128).toString(16).toUpperCase():ae="%"+(Y>>12|224).toString(16).toUpperCase()+"%"+(Y>>6&63|128).toString(16).toUpperCase()+"%"+(Y&63|128).toString(16).toUpperCase(),ae}function ne(re){for(var Y="",ae=0,ve=re.length;ae<ve;){var pe=parseInt(re.substr(ae+1,2),16);if(pe<128)Y+=String.fromCharCode(pe),ae+=3;else if(pe>=194&&pe<224){if(ve-ae>=6){var Pe=parseInt(re.substr(ae+4,2),16);Y+=String.fromCharCode((pe&31)<<6|Pe&63)}else Y+=re.substr(ae,6);ae+=6}else if(pe>=224){if(ve-ae>=9){var Ue=parseInt(re.substr(ae+4,2),16),pt=parseInt(re.substr(ae+7,2),16);Y+=String.fromCharCode((pe&15)<<12|(Ue&63)<<6|pt&63)}else Y+=re.substr(ae,9);ae+=9}else Y+=re.substr(ae,3),ae+=3}return Y}function G(re,Y){function ae(ve){var pe=ne(ve);return pe.match(Y.UNRESERVED)?pe:ve}return re.scheme&&(re.scheme=String(re.scheme).replace(Y.PCT_ENCODED,ae).toLowerCase().replace(Y.NOT_SCHEME,"")),re.userinfo!==void 0&&(re.userinfo=String(re.userinfo).replace(Y.PCT_ENCODED,ae).replace(Y.NOT_USERINFO,Z).replace(Y.PCT_ENCODED,l)),re.host!==void 0&&(re.host=String(re.host).replace(Y.PCT_ENCODED,ae).toLowerCase().replace(Y.NOT_HOST,Z).replace(Y.PCT_ENCODED,l)),re.path!==void 0&&(re.path=String(re.path).replace(Y.PCT_ENCODED,ae).replace(re.scheme?Y.NOT_PATH:Y.NOT_PATH_NOSCHEME,Z).replace(Y.PCT_ENCODED,l)),re.query!==void 0&&(re.query=String(re.query).replace(Y.PCT_ENCODED,ae).replace(Y.NOT_QUERY,Z).replace(Y.PCT_ENCODED,l)),re.fragment!==void 0&&(re.fragment=String(re.fragment).replace(Y.PCT_ENCODED,ae).replace(Y.NOT_FRAGMENT,Z).replace(Y.PCT_ENCODED,l)),re}function ce(re){return re.replace(/^0*(.*)/,"$1")||"0"}function he(re,Y){var ae=re.match(Y.IPV4ADDRESS)||[],ve=v(ae,2),pe=ve[1];return pe?pe.split(".").map(ce).join("."):re}function _e(re,Y){var ae=re.match(Y.IPV6ADDRESS)||[],ve=v(ae,3),pe=ve[1],Pe=ve[2];if(pe){for(var Ue=pe.toLowerCase().split("::").reverse(),pt=v(Ue,2),Ut=pt[0],sr=pt[1],bt=sr?sr.split(":").map(ce):[],Ft=Ut.split(":").map(ce),Wt=Y.IPV4ADDRESS.test(Ft[Ft.length-1]),nt=Wt?7:8,Dt=Ft.length-nt,Yt=Array(nt),Pt=0;Pt<nt;++Pt)Yt[Pt]=bt[Pt]||Ft[Dt+Pt]||"";Wt&&(Yt[nt-1]=he(Yt[nt-1],Y));var on=Yt.reduce(function(Cr,Bn,Ta){if(!Bn||Bn==="0"){var qn=Cr[Cr.length-1];qn&&qn.index+qn.length===Ta?qn.length++:Cr.push({index:Ta,length:1})}return Cr},[]),zt=on.sort(function(Cr,Bn){return Bn.length-Cr.length})[0],Cn=void 0;if(zt&&zt.length>1){var Qa=Yt.slice(0,zt.index),sn=Yt.slice(zt.index+zt.length);Cn=Qa.join(":")+"::"+sn.join(":")}else Cn=Yt.join(":");return Pe&&(Cn+="%"+Pe),Cn}else return re}var ye=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Se="".match(/(){0}/)[1]===void 0;function Ne(re){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae={},ve=Y.iri!==!1?h:m;Y.reference==="suffix"&&(re=(Y.scheme?Y.scheme+":":"")+"//"+re);var pe=re.match(ye);if(pe){Se?(ae.scheme=pe[1],ae.userinfo=pe[3],ae.host=pe[4],ae.port=parseInt(pe[5],10),ae.path=pe[6]||"",ae.query=pe[7],ae.fragment=pe[8],isNaN(ae.port)&&(ae.port=pe[5])):(ae.scheme=pe[1]||void 0,ae.userinfo=re.indexOf("@")!==-1?pe[3]:void 0,ae.host=re.indexOf("//")!==-1?pe[4]:void 0,ae.port=parseInt(pe[5],10),ae.path=pe[6]||"",ae.query=re.indexOf("?")!==-1?pe[7]:void 0,ae.fragment=re.indexOf("#")!==-1?pe[8]:void 0,isNaN(ae.port)&&(ae.port=re.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?pe[4]:void 0)),ae.host&&(ae.host=_e(he(ae.host,ve),ve)),ae.scheme===void 0&&ae.userinfo===void 0&&ae.host===void 0&&ae.port===void 0&&!ae.path&&ae.query===void 0?ae.reference="same-document":ae.scheme===void 0?ae.reference="relative":ae.fragment===void 0?ae.reference="absolute":ae.reference="uri",Y.reference&&Y.reference!=="suffix"&&Y.reference!==ae.reference&&(ae.error=ae.error||"URI is not a "+Y.reference+" reference.");var Pe=j[(Y.scheme||ae.scheme||"").toLowerCase()];if(!Y.unicodeSupport&&(!Pe||!Pe.unicodeSupport)){if(ae.host&&(Y.domainHost||Pe&&Pe.domainHost))try{ae.host=z.toASCII(ae.host.replace(ve.PCT_ENCODED,ne).toLowerCase())}catch(Ue){ae.error=ae.error||"Host's domain name can not be converted to ASCII via punycode: "+Ue}G(ae,m)}else G(ae,ve);Pe&&Pe.parse&&Pe.parse(ae,Y)}else ae.error=ae.error||"URI can not be parsed.";return ae}function ge(re,Y){var ae=Y.iri!==!1?h:m,ve=[];return re.userinfo!==void 0&&(ve.push(re.userinfo),ve.push("@")),re.host!==void 0&&ve.push(_e(he(String(re.host),ae),ae).replace(ae.IPV6ADDRESS,function(pe,Pe,Ue){return"["+Pe+(Ue?"%25"+Ue:"")+"]"})),(typeof re.port=="number"||typeof re.port=="string")&&(ve.push(":"),ve.push(String(re.port))),ve.length?ve.join(""):void 0}var ke=/^\.\.?\//,Oe=/^\/\.(\/|$)/,Xe=/^\/\.\.(\/|$)/,ot=/^\/?(?:.|\n)*?(?=\/|$)/;function $e(re){for(var Y=[];re.length;)if(re.match(ke))re=re.replace(ke,"");else if(re.match(Oe))re=re.replace(Oe,"/");else if(re.match(Xe))re=re.replace(Xe,"/"),Y.pop();else if(re==="."||re==="..")re="";else{var ae=re.match(ot);if(ae){var ve=ae[0];re=re.slice(ve.length),Y.push(ve)}else throw new Error("Unexpected dot segment condition")}return Y.join("")}function We(re){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=Y.iri?h:m,ve=[],pe=j[(Y.scheme||re.scheme||"").toLowerCase()];if(pe&&pe.serialize&&pe.serialize(re,Y),re.host&&!ae.IPV6ADDRESS.test(re.host)){if(Y.domainHost||pe&&pe.domainHost)try{re.host=Y.iri?z.toUnicode(re.host):z.toASCII(re.host.replace(ae.PCT_ENCODED,ne).toLowerCase())}catch(pt){re.error=re.error||"Host's domain name can not be converted to "+(Y.iri?"Unicode":"ASCII")+" via punycode: "+pt}}G(re,ae),Y.reference!=="suffix"&&re.scheme&&(ve.push(re.scheme),ve.push(":"));var Pe=ge(re,Y);if(Pe!==void 0&&(Y.reference!=="suffix"&&ve.push("//"),ve.push(Pe),re.path&&re.path.charAt(0)!=="/"&&ve.push("/")),re.path!==void 0){var Ue=re.path;!Y.absolutePath&&(!pe||!pe.absolutePath)&&(Ue=$e(Ue)),Pe===void 0&&(Ue=Ue.replace(/^\/\//,"/%2F")),ve.push(Ue)}return re.query!==void 0&&(ve.push("?"),ve.push(re.query)),re.fragment!==void 0&&(ve.push("#"),ve.push(re.fragment)),ve.join("")}function Ae(re,Y){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ve=arguments[3],pe={};return ve||(re=Ne(We(re,ae),ae),Y=Ne(We(Y,ae),ae)),ae=ae||{},!ae.tolerant&&Y.scheme?(pe.scheme=Y.scheme,pe.userinfo=Y.userinfo,pe.host=Y.host,pe.port=Y.port,pe.path=$e(Y.path||""),pe.query=Y.query):(Y.userinfo!==void 0||Y.host!==void 0||Y.port!==void 0?(pe.userinfo=Y.userinfo,pe.host=Y.host,pe.port=Y.port,pe.path=$e(Y.path||""),pe.query=Y.query):(Y.path?(Y.path.charAt(0)==="/"?pe.path=$e(Y.path):((re.userinfo!==void 0||re.host!==void 0||re.port!==void 0)&&!re.path?pe.path="/"+Y.path:re.path?pe.path=re.path.slice(0,re.path.lastIndexOf("/")+1)+Y.path:pe.path=Y.path,pe.path=$e(pe.path)),pe.query=Y.query):(pe.path=re.path,Y.query!==void 0?pe.query=Y.query:pe.query=re.query),pe.userinfo=re.userinfo,pe.host=re.host,pe.port=re.port),pe.scheme=re.scheme),pe.fragment=Y.fragment,pe}function Le(re,Y,ae){var ve=d({scheme:"null"},ae);return We(Ae(Ne(re,ve),Ne(Y,ve),ve,!0),ve)}function Je(re,Y){return typeof re=="string"?re=We(Ne(re,Y),Y):s(re)==="object"&&(re=Ne(We(re,Y),Y)),re}function ft(re,Y,ae){return typeof re=="string"?re=We(Ne(re,ae),ae):s(re)==="object"&&(re=We(re,ae)),typeof Y=="string"?Y=We(Ne(Y,ae),ae):s(Y)==="object"&&(Y=We(Y,ae)),re===Y}function rt(re,Y){return re&&re.toString().replace(!Y||!Y.iri?m.ESCAPE:h.ESCAPE,Z)}function Rt(re,Y){return re&&re.toString().replace(!Y||!Y.iri?m.PCT_ENCODED:h.PCT_ENCODED,ne)}var Ot={scheme:"http",domainHost:!0,parse:function(Y,ae){return Y.host||(Y.error=Y.error||"HTTP URIs must have a host."),Y},serialize:function(Y,ae){var ve=String(Y.scheme).toLowerCase()==="https";return(Y.port===(ve?443:80)||Y.port==="")&&(Y.port=void 0),Y.path||(Y.path="/"),Y}},An={scheme:"https",domainHost:Ot.domainHost,parse:Ot.parse,serialize:Ot.serialize};function gr(re){return typeof re.secure=="boolean"?re.secure:String(re.scheme).toLowerCase()==="wss"}var ir={scheme:"ws",domainHost:!0,parse:function(Y,ae){var ve=Y;return ve.secure=gr(ve),ve.resourceName=(ve.path||"/")+(ve.query?"?"+ve.query:""),ve.path=void 0,ve.query=void 0,ve},serialize:function(Y,ae){if((Y.port===(gr(Y)?443:80)||Y.port==="")&&(Y.port=void 0),typeof Y.secure=="boolean"&&(Y.scheme=Y.secure?"wss":"ws",Y.secure=void 0),Y.resourceName){var ve=Y.resourceName.split("?"),pe=v(ve,2),Pe=pe[0],Ue=pe[1];Y.path=Pe&&Pe!=="/"?Pe:void 0,Y.query=Ue,Y.resourceName=void 0}return Y.fragment=void 0,Y}},Mt={scheme:"wss",domainHost:ir.domainHost,parse:ir.parse,serialize:ir.serialize},Zt={},dr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Sr="[0-9A-Fa-f]",zn=a(a("%[EFef]"+Sr+"%"+Sr+Sr+"%"+Sr+Sr)+"|"+a("%[89A-Fa-f]"+Sr+"%"+Sr+Sr)+"|"+a("%"+Sr+Sr)),or="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Gt="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",pn=n(Gt,'[\\"\\\\]'),ua="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",an=new RegExp(dr,"g"),Ke=new RegExp(zn,"g"),jt=new RegExp(n("[^]",or,"[\\.]",'[\\"]',pn),"g"),Qt=new RegExp(n("[^]",dr,ua),"g"),Lr=Qt;function $n(re){var Y=ne(re);return Y.match(an)?Y:re}var Xt={scheme:"mailto",parse:function(Y,ae){var ve=Y,pe=ve.to=ve.path?ve.path.split(","):[];if(ve.path=void 0,ve.query){for(var Pe=!1,Ue={},pt=ve.query.split("&"),Ut=0,sr=pt.length;Ut<sr;++Ut){var bt=pt[Ut].split("=");switch(bt[0]){case"to":for(var Ft=bt[1].split(","),Wt=0,nt=Ft.length;Wt<nt;++Wt)pe.push(Ft[Wt]);break;case"subject":ve.subject=Rt(bt[1],ae);break;case"body":ve.body=Rt(bt[1],ae);break;default:Pe=!0,Ue[Rt(bt[0],ae)]=Rt(bt[1],ae);break}}Pe&&(ve.headers=Ue)}ve.query=void 0;for(var Dt=0,Yt=pe.length;Dt<Yt;++Dt){var Pt=pe[Dt].split("@");if(Pt[0]=Rt(Pt[0]),ae.unicodeSupport)Pt[1]=Rt(Pt[1],ae).toLowerCase();else try{Pt[1]=z.toASCII(Rt(Pt[1],ae).toLowerCase())}catch(on){ve.error=ve.error||"Email address's domain name can not be converted to ASCII via punycode: "+on}pe[Dt]=Pt.join("@")}return ve},serialize:function(Y,ae){var ve=Y,pe=c(Y.to);if(pe){for(var Pe=0,Ue=pe.length;Pe<Ue;++Pe){var pt=String(pe[Pe]),Ut=pt.lastIndexOf("@"),sr=pt.slice(0,Ut).replace(Ke,$n).replace(Ke,l).replace(jt,Z),bt=pt.slice(Ut+1);try{bt=ae.iri?z.toUnicode(bt):z.toASCII(Rt(bt,ae).toLowerCase())}catch(Dt){ve.error=ve.error||"Email address's domain name can not be converted to "+(ae.iri?"Unicode":"ASCII")+" via punycode: "+Dt}pe[Pe]=sr+"@"+bt}ve.path=pe.join(",")}var Ft=Y.headers=Y.headers||{};Y.subject&&(Ft.subject=Y.subject),Y.body&&(Ft.body=Y.body);var Wt=[];for(var nt in Ft)Ft[nt]!==Zt[nt]&&Wt.push(nt.replace(Ke,$n).replace(Ke,l).replace(Qt,Z)+"="+Ft[nt].replace(Ke,$n).replace(Ke,l).replace(Lr,Z));return Wt.length&&(ve.query=Wt.join("&")),ve}},Zr=/^([^\:]+)\:(.*)/,_a={scheme:"urn",parse:function(Y,ae){var ve=Y.path&&Y.path.match(Zr),pe=Y;if(ve){var Pe=ae.scheme||pe.scheme||"urn",Ue=ve[1].toLowerCase(),pt=ve[2],Ut=Pe+":"+(ae.nid||Ue),sr=j[Ut];pe.nid=Ue,pe.nss=pt,pe.path=void 0,sr&&(pe=sr.parse(pe,ae))}else pe.error=pe.error||"URN can not be parsed.";return pe},serialize:function(Y,ae){var ve=ae.scheme||Y.scheme||"urn",pe=Y.nid,Pe=ve+":"+(ae.nid||pe),Ue=j[Pe];Ue&&(Y=Ue.serialize(Y,ae));var pt=Y,Ut=Y.nss;return pt.path=(pe||ae.nid)+":"+Ut,pt}},Xr=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Fr={scheme:"urn:uuid",parse:function(Y,ae){var ve=Y;return ve.uuid=ve.nss,ve.nss=void 0,!ae.tolerant&&(!ve.uuid||!ve.uuid.match(Xr))&&(ve.error=ve.error||"UUID is not valid."),ve},serialize:function(Y,ae){var ve=Y;return ve.nss=(Y.uuid||"").toLowerCase(),ve}};j[Ot.scheme]=Ot,j[An.scheme]=An,j[ir.scheme]=ir,j[Mt.scheme]=Mt,j[Xt.scheme]=Xt,j[_a.scheme]=_a,j[Fr.scheme]=Fr,r.SCHEMES=j,r.pctEncChar=Z,r.pctDecChars=ne,r.parse=Ne,r.removeDotSegments=$e,r.serialize=We,r.resolveComponents=Ae,r.resolve=Le,r.normalize=Je,r.equal=ft,r.escapeComponent=rt,r.unescapeComponent=Rt,Object.defineProperty(r,"__esModule",{value:!0})}))})(_u,_u.exports)),_u.exports}var Mv,Xk;function QT(){return Xk||(Xk=1,Mv=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var l=s[a];if(!t(e[l],r[l]))return!1}return!0}return e!==e&&r!==r}),Mv}var Pv,Qk;function W6(){return Qk||(Qk=1,Pv=function(e){for(var r=0,n=e.length,a=0,s;a<n;)r++,s=e.charCodeAt(a++),s>=55296&&s<=56319&&a<n&&(s=e.charCodeAt(a),(s&64512)==56320&&a++);return r}),Pv}var jv,Jk;function pc(){if(Jk)return jv;Jk=1,jv={copy:t,checkDataType:e,checkDataTypes:r,coerceToTypes:a,toHash:s,getProperty:d,escapeQuotes:f,equal:QT(),ucs2length:W6(),varOccurences:m,varReplace:h,schemaHasRules:v,schemaHasRulesExcept:b,schemaUnknownRules:x,toQuotedString:S,getPathExpr:R,getPath:w,getData:C,unescapeFragment:N,unescapeJsonPointer:M,escapeFragment:I,escapeJsonPointer:O};function t(L,P){P=P||{};for(var V in L)P[V]=L[V];return P}function e(L,P,V,X){var Q=X?" !== ":" === ",oe=X?" || ":" && ",U=X?"!":"",W=X?"":"!";switch(L){case"null":return P+Q+"null";case"array":return U+"Array.isArray("+P+")";case"object":return"("+U+P+oe+"typeof "+P+Q+'"object"'+oe+W+"Array.isArray("+P+"))";case"integer":return"(typeof "+P+Q+'"number"'+oe+W+"("+P+" % 1)"+oe+P+Q+P+(V?oe+U+"isFinite("+P+")":"")+")";case"number":return"(typeof "+P+Q+'"'+L+'"'+(V?oe+U+"isFinite("+P+")":"")+")";default:return"typeof "+P+Q+'"'+L+'"'}}function r(L,P,V){switch(L.length){case 1:return e(L[0],P,V,!0);default:var X="",Q=s(L);Q.array&&Q.object&&(X=Q.null?"(":"(!"+P+" || ",X+="typeof "+P+' !== "object")',delete Q.null,delete Q.array,delete Q.object),Q.number&&delete Q.integer;for(var oe in Q)X+=(X?" && ":"")+e(oe,P,V,!0);return X}}var n=s(["string","number","integer","boolean","null"]);function a(L,P){if(Array.isArray(P)){for(var V=[],X=0;X<P.length;X++){var Q=P[X];(n[Q]||L==="array"&&Q==="array")&&(V[V.length]=Q)}if(V.length)return V}else{if(n[P])return[P];if(L==="array"&&P==="array")return["array"]}}function s(L){for(var P={},V=0;V<L.length;V++)P[L[V]]=!0;return P}var l=/^[a-z$_][a-z$_0-9]*$/i,c=/'|\\/g;function d(L){return typeof L=="number"?"["+L+"]":l.test(L)?"."+L:"['"+f(L)+"']"}function f(L){return L.replace(c,"\\$&").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\f/g,"\\f").replace(/\t/g,"\\t")}function m(L,P){P+="[^0-9]";var V=L.match(new RegExp(P,"g"));return V?V.length:0}function h(L,P,V){return P+="([^0-9])",V=V.replace(/\$/g,"$$$$"),L.replace(new RegExp(P,"g"),V+"$1")}function v(L,P){if(typeof L=="boolean")return!L;for(var V in L)if(P[V])return!0}function b(L,P,V){if(typeof L=="boolean")return!L&&V!="not";for(var X in L)if(X!=V&&P[X])return!0}function x(L,P){if(typeof L!="boolean"){for(var V in L)if(!P[V])return V}}function S(L){return"'"+f(L)+"'"}function R(L,P,V,X){var Q=V?"'/' + "+P+(X?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):X?"'[' + "+P+" + ']'":"'[\\'' + "+P+" + '\\']'";return k(L,Q)}function w(L,P,V){var X=S(V?"/"+O(P):d(P));return k(L,X)}var _=/^\/(?:[^~]|~0|~1)*$/,A=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C(L,P,V){var X,Q,oe,U;if(L==="")return"rootData";if(L[0]=="/"){if(!_.test(L))throw new Error("Invalid JSON-pointer: "+L);Q=L,oe="rootData"}else{if(U=L.match(A),!U)throw new Error("Invalid JSON-pointer: "+L);if(X=+U[1],Q=U[2],Q=="#"){if(X>=P)throw new Error("Cannot access property/index "+X+" levels up, current level is "+P);return V[P-X]}if(X>P)throw new Error("Cannot access data "+X+" levels up, current level is "+P);if(oe="data"+(P-X||""),!Q)return oe}for(var W=oe,H=Q.split("/"),te=0;te<H.length;te++){var se=H[te];se&&(oe+=d(M(se)),W+=" && "+oe)}return W}function k(L,P){return L=='""'?P:(L+" + "+P).replace(/([^\\])' \+ '/g,"$1")}function N(L){return M(decodeURIComponent(L))}function I(L){return encodeURIComponent(O(L))}function O(L){return L.replace(/~/g,"~0").replace(/\//g,"~1")}function M(L){return L.replace(/~1/g,"/").replace(/~0/g,"~")}return jv}var Uv,eI;function I$(){if(eI)return Uv;eI=1;var t=pc();Uv=e;function e(r){t.copy(r,this)}return Uv}var Fv={exports:{}},tI;function Y6(){if(tI)return Fv.exports;tI=1;var t=Fv.exports=function(n,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var l=typeof s=="function"?s:s.pre||function(){},c=s.post||function(){};e(a,l,c,n,"",n)};t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function e(n,a,s,l,c,d,f,m,h,v){if(l&&typeof l=="object"&&!Array.isArray(l)){a(l,c,d,f,m,h,v);for(var b in l){var x=l[b];if(Array.isArray(x)){if(b in t.arrayKeywords)for(var S=0;S<x.length;S++)e(n,a,s,x[S],c+"/"+b+"/"+S,d,c,b,l,S)}else if(b in t.propsKeywords){if(x&&typeof x=="object")for(var R in x)e(n,a,s,x[R],c+"/"+b+"/"+r(R),d,c,b,l,R)}else(b in t.keywords||n.allKeys&&!(b in t.skipKeywords))&&e(n,a,s,x,c+"/"+b,d,c,b,l)}s(l,c,d,f,m,h,v)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Fv.exports}var zv,rI;function JT(){if(rI)return zv;rI=1;var t=G6(),e=QT(),r=pc(),n=I$(),a=Y6();zv=s,s.normalizeId=w,s.fullPath=x,s.url=_,s.ids=A,s.inlineRef=h,s.schema=l;function s(C,k,N){var I=this._refs[N];if(typeof I=="string")if(this._refs[I])I=this._refs[I];else return s.call(this,C,k,I);if(I=I||this._schemas[N],I instanceof n)return h(I.schema,this._opts.inlineRefs)?I.schema:I.validate||this._compile(I);var O=l.call(this,k,N),M,L,P;return O&&(M=O.schema,k=O.root,P=O.baseId),M instanceof n?L=M.validate||C.call(this,M.schema,k,void 0,P):M!==void 0&&(L=h(M,this._opts.inlineRefs)?M:C.call(this,M,k,void 0,P)),L}function l(C,k){var N=t.parse(k),I=S(N),O=x(this._getId(C.schema));if(Object.keys(C.schema).length===0||I!==O){var M=w(I),L=this._refs[M];if(typeof L=="string")return c.call(this,C,L,N);if(L instanceof n)L.validate||this._compile(L),C=L;else if(L=this._schemas[M],L instanceof n){if(L.validate||this._compile(L),M==w(k))return{schema:L,root:C,baseId:O};C=L}else return;if(!C.schema)return;O=x(this._getId(C.schema))}return f.call(this,N,O,C.schema,C)}function c(C,k,N){var I=l.call(this,C,k);if(I){var O=I.schema,M=I.baseId;C=I.root;var L=this._getId(O);return L&&(M=_(M,L)),f.call(this,N,M,O,C)}}var d=r.toHash(["properties","patternProperties","enum","dependencies","definitions"]);function f(C,k,N,I){if(C.fragment=C.fragment||"",C.fragment.slice(0,1)=="/"){for(var O=C.fragment.split("/"),M=1;M<O.length;M++){var L=O[M];if(L){if(L=r.unescapeFragment(L),N=N[L],N===void 0)break;var P;if(!d[L]&&(P=this._getId(N),P&&(k=_(k,P)),N.$ref)){var V=_(k,N.$ref),X=l.call(this,I,V);X&&(N=X.schema,I=X.root,k=X.baseId)}}}if(N!==void 0&&N!==I.schema)return{schema:N,root:I,baseId:k}}}var m=r.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]);function h(C,k){if(k===!1)return!1;if(k===void 0||k===!0)return v(C);if(k)return b(C)<=k}function v(C){var k;if(Array.isArray(C)){for(var N=0;N<C.length;N++)if(k=C[N],typeof k=="object"&&!v(k))return!1}else for(var I in C)if(I=="$ref"||(k=C[I],typeof k=="object"&&!v(k)))return!1;return!0}function b(C){var k=0,N;if(Array.isArray(C)){for(var I=0;I<C.length;I++)if(N=C[I],typeof N=="object"&&(k+=b(N)),k==1/0)return 1/0}else for(var O in C){if(O=="$ref")return 1/0;if(m[O])k++;else if(N=C[O],typeof N=="object"&&(k+=b(N)+1),k==1/0)return 1/0}return k}function x(C,k){k!==!1&&(C=w(C));var N=t.parse(C);return S(N)}function S(C){return t.serialize(C).split("#")[0]+"#"}var R=/#\/?$/;function w(C){return C?C.replace(R,""):""}function _(C,k){return k=w(k),t.resolve(C,k)}function A(C){var k=w(this._getId(C)),N={"":k},I={"":x(k,!1)},O={},M=this;return a(C,{allKeys:!0},function(L,P,V,X,Q,oe,U){if(P!==""){var W=M._getId(L),H=N[X],te=I[X]+"/"+Q;if(U!==void 0&&(te+="/"+(typeof U=="number"?U:r.escapeFragment(U))),typeof W=="string"){W=H=w(H?t.resolve(H,W):W);var se=M._refs[W];if(typeof se=="string"&&(se=M._refs[se]),se&&se.schema){if(!e(L,se.schema))throw new Error('id "'+W+'" resolves to more than one schema')}else if(W!=w(te))if(W[0]=="#"){if(O[W]&&!e(L,O[W]))throw new Error('id "'+W+'" resolves to more than one schema');O[W]=L}else M._refs[W]=te}N[P]=H,I[P]=te}}),O}return zv}var $v,nI;function eR(){if(nI)return $v;nI=1;var t=JT();$v={Validation:n(e),MissingRef:n(r)};function e(a){this.message="validation failed",this.errors=a,this.ajv=this.validation=!0}r.message=function(a,s){return"can't resolve reference "+s+" from id "+a};function r(a,s,l){this.message=l||r.message(a,s),this.missingRef=t.url(a,s),this.missingSchema=t.normalizeId(t.fullPath(this.missingRef))}function n(a){return a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a}return $v}var Bv,aI;function O$(){return aI||(aI=1,Bv=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=typeof e.cycles=="boolean"?e.cycles:!1,n=e.cmp&&(function(s){return function(l){return function(c,d){var f={key:c,value:l[c]},m={key:d,value:l[d]};return s(f,m)}}})(e.cmp),a=[];return(function s(l){if(l&&l.toJSON&&typeof l.toJSON=="function"&&(l=l.toJSON()),l!==void 0){if(typeof l=="number")return isFinite(l)?""+l:"null";if(typeof l!="object")return JSON.stringify(l);var c,d;if(Array.isArray(l)){for(d="[",c=0;c<l.length;c++)c&&(d+=","),d+=s(l[c])||"null";return d+"]"}if(l===null)return"null";if(a.indexOf(l)!==-1){if(r)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var f=a.push(l)-1,m=Object.keys(l).sort(n&&n(l));for(d="",c=0;c<m.length;c++){var h=m[c],v=s(l[h]);v&&(d&&(d+=","),d+=JSON.stringify(h)+":"+v)}return a.splice(f,1),"{"+d+"}"}})(t)}),Bv}var qv,iI;function D$(){return iI||(iI=1,qv=function(e,r,n){var a="",s=e.schema.$async===!0,l=e.util.schemaHasRulesExcept(e.schema,e.RULES.all,"$ref"),c=e.self._getId(e.schema);if(e.opts.strictKeywords){var d=e.util.schemaUnknownRules(e.schema,e.RULES.keywords);if(d){var f="unknown keyword: "+d;if(e.opts.strictKeywords==="log")e.logger.warn(f);else throw new Error(f)}}if(e.isTop&&(a+=" var validate = ",s&&(e.async=!0,a+="async "),a+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",c&&(e.opts.sourceCode||e.opts.processCode)&&(a+=" "+("/*# sourceURL="+c+" */")+" ")),typeof e.schema=="boolean"||!(l||e.schema.$ref)){var r="false schema",m=e.level,h=e.dataLevel,v=e.schema[r],b=e.schemaPath+e.util.getProperty(r),x=e.errSchemaPath+"/"+r,k=!e.opts.allErrors,O,S="data"+(h||""),C="valid"+m;if(e.schema===!1){e.isTop?k=!0:a+=" var "+C+" = false; ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"false schema")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'boolean schema is false' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else e.isTop?s?a+=" return data; ":a+=" validate.errors = null; return true; ":a+=" var "+C+" = true; ";return e.isTop&&(a+=" }; return validate; "),a}if(e.isTop){var _=e.isTop,m=e.level=0,h=e.dataLevel=0,S="data";if(e.rootId=e.resolve.fullPath(e.self._getId(e.root.schema)),e.baseId=e.baseId||e.rootId,delete e.isTop,e.dataPathArr=[""],e.schema.default!==void 0&&e.opts.useDefaults&&e.opts.strictDefaults){var A="default is ignored in the schema root";if(e.opts.strictDefaults==="log")e.logger.warn(A);else throw new Error(A)}a+=" var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data; "}else{var m=e.level,h=e.dataLevel,S="data"+(h||"");if(c&&(e.baseId=e.resolve.url(e.baseId,c)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+m+" = errors;"}var C="valid"+m,k=!e.opts.allErrors,N="",I="",O,M=e.schema.type,L=Array.isArray(M);if(M&&e.opts.nullable&&e.schema.nullable===!0&&(L?M.indexOf("null")==-1&&(M=M.concat("null")):M!="null"&&(M=[M,"null"],L=!0)),L&&M.length==1&&(M=M[0],L=!1),e.schema.$ref&&l){if(e.opts.extendRefs=="fail")throw new Error('$ref: validation keywords used in schema at path "'+e.errSchemaPath+'" (see option extendRefs)');e.opts.extendRefs!==!0&&(l=!1,e.logger.warn('$ref: keywords ignored in schema at path "'+e.errSchemaPath+'"'))}if(e.schema.$comment&&e.opts.$comment&&(a+=" "+e.RULES.all.$comment.code(e,"$comment")),M){if(e.opts.coerceTypes)var P=e.util.coerceToTypes(e.opts.coerceTypes,M);var V=e.RULES.types[M];if(P||L||V===!0||V&&!Oe(V)){var b=e.schemaPath+".type",x=e.errSchemaPath+"/type",b=e.schemaPath+".type",x=e.errSchemaPath+"/type",X=L?"checkDataTypes":"checkDataType";if(a+=" if ("+e.util[X](M,S,e.opts.strictNumbers,!0)+") { ",P){var Q="dataType"+m,oe="coerced"+m;a+=" var "+Q+" = typeof "+S+"; var "+oe+" = undefined; ",e.opts.coerceTypes=="array"&&(a+=" if ("+Q+" == 'object' && Array.isArray("+S+") && "+S+".length == 1) { "+S+" = "+S+"[0]; "+Q+" = typeof "+S+"; if ("+e.util.checkDataType(e.schema.type,S,e.opts.strictNumbers)+") "+oe+" = "+S+"; } "),a+=" if ("+oe+" !== undefined) ; ";var U=P;if(U)for(var W,H=-1,te=U.length-1;H<te;)W=U[H+=1],W=="string"?a+=" else if ("+Q+" == 'number' || "+Q+" == 'boolean') "+oe+" = '' + "+S+"; else if ("+S+" === null) "+oe+" = ''; ":W=="number"||W=="integer"?(a+=" else if ("+Q+" == 'boolean' || "+S+" === null || ("+Q+" == 'string' && "+S+" && "+S+" == +"+S+" ",W=="integer"&&(a+=" && !("+S+" % 1)"),a+=")) "+oe+" = +"+S+"; "):W=="boolean"?a+=" else if ("+S+" === 'false' || "+S+" === 0 || "+S+" === null) "+oe+" = false; else if ("+S+" === 'true' || "+S+" === 1) "+oe+" = true; ":W=="null"?a+=" else if ("+S+" === '' || "+S+" === 0 || "+S+" === false) "+oe+" = null; ":e.opts.coerceTypes=="array"&&W=="array"&&(a+=" else if ("+Q+" == 'string' || "+Q+" == 'number' || "+Q+" == 'boolean' || "+S+" == null) "+oe+" = ["+S+"]; ");a+=" else { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: { type: '",L?a+=""+M.join(","):a+=""+M,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",L?a+=""+M.join(","):a+=""+M,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } if ("+oe+" !== undefined) { ";var se=h?"data"+(h-1||""):"parentData",B=h?e.dataPathArr[h]:"parentDataProperty";a+=" "+S+" = "+oe+"; ",h||(a+="if ("+se+" !== undefined)"),a+=" "+se+"["+B+"] = "+oe+"; } "}else{var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: { type: '",L?a+=""+M.join(","):a+=""+M,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",L?a+=""+M.join(","):a+=""+M,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}a+=" } "}}if(e.schema.$ref&&!l)a+=" "+e.RULES.all.$ref.code(e,"$ref")+" ",k&&(a+=" } if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}");else{var q=e.RULES;if(q){for(var V,$=-1,K=q.length-1;$<K;)if(V=q[$+=1],Oe(V)){if(V.type&&(a+=" if ("+e.util.checkDataType(V.type,S,e.opts.strictNumbers)+") { "),e.opts.useDefaults){if(V.type=="object"&&e.schema.properties){var v=e.schema.properties,J=Object.keys(v),z=J;if(z)for(var j,Z=-1,ne=z.length-1;Z<ne;){j=z[Z+=1];var G=v[j];if(G.default!==void 0){var ce=S+e.util.getProperty(j);if(e.compositeRule){if(e.opts.strictDefaults){var A="default is ignored for: "+ce;if(e.opts.strictDefaults==="log")e.logger.warn(A);else throw new Error(A)}}else a+=" if ("+ce+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+ce+" === null || "+ce+" === '' "),a+=" ) "+ce+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(G.default)+" ":a+=" "+JSON.stringify(G.default)+" ",a+="; "}}}else if(V.type=="array"&&Array.isArray(e.schema.items)){var he=e.schema.items;if(he){for(var G,H=-1,_e=he.length-1;H<_e;)if(G=he[H+=1],G.default!==void 0){var ce=S+"["+H+"]";if(e.compositeRule){if(e.opts.strictDefaults){var A="default is ignored for: "+ce;if(e.opts.strictDefaults==="log")e.logger.warn(A);else throw new Error(A)}}else a+=" if ("+ce+" === undefined ",e.opts.useDefaults=="empty"&&(a+=" || "+ce+" === null || "+ce+" === '' "),a+=" ) "+ce+" = ",e.opts.useDefaults=="shared"?a+=" "+e.useDefault(G.default)+" ":a+=" "+JSON.stringify(G.default)+" ",a+="; "}}}}var ye=V.rules;if(ye){for(var Se,Ne=-1,ge=ye.length-1;Ne<ge;)if(Se=ye[Ne+=1],Xe(Se)){var ke=Se.code(e,Se.keyword,V.type);ke&&(a+=" "+ke+" ",k&&(N+="}"))}}if(k&&(a+=" "+N+" ",N=""),V.type&&(a+=" } ",M&&M===V.type&&!P)){a+=" else { ";var b=e.schemaPath+".type",x=e.errSchemaPath+"/type",R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(O||"type")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(x)+" , params: { type: '",L?a+=""+M.join(","):a+=""+M,a+="' } ",e.opts.messages!==!1&&(a+=" , message: 'should be ",L?a+=""+M.join(","):a+=""+M,a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+b+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+S+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&k?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}k&&(a+=" if (errors === ",_?a+="0":a+="errs_"+m,a+=") { ",I+="}")}}}k&&(a+=" "+I+" "),_?(s?(a+=" if (errors === 0) return data; ",a+=" else throw new ValidationError(vErrors); "):(a+=" validate.errors = vErrors; ",a+=" return errors === 0; "),a+=" }; return validate;"):a+=" var "+C+" = errors === errs_"+m+";";function Oe($e){for(var We=$e.rules,Ae=0;Ae<We.length;Ae++)if(Xe(We[Ae]))return!0}function Xe($e){return e.schema[$e.keyword]!==void 0||$e.implements&&ot($e)}function ot($e){for(var We=$e.implements,Ae=0;Ae<We.length;Ae++)if(e.schema[We[Ae]]!==void 0)return!0}return a}),qv}var Hv,oI;function K6(){if(oI)return Hv;oI=1;var t=JT(),e=pc(),r=eR(),n=O$(),a=D$(),s=e.ucs2length,l=QT(),c=r.Validation;Hv=d;function d(w,_,A,C){var k=this,N=this._opts,I=[void 0],O={},M=[],L={},P=[],V={},X=[];_=_||{schema:w,refVal:I,refs:O};var Q=f.call(this,w,_,C),oe=this._compilations[Q.index];if(Q.compiling)return oe.callValidate=se;var U=this._formats,W=this.RULES;try{var H=B(w,_,A,C);oe.validate=H;var te=oe.callValidate;return te&&(te.schema=H.schema,te.errors=null,te.refs=H.refs,te.refVal=H.refVal,te.root=H.root,te.$async=H.$async,N.sourceCode&&(te.source=H.source)),H}finally{m.call(this,w,_,C)}function se(){var G=oe.validate,ce=G.apply(this,arguments);return se.errors=G.errors,ce}function B(G,ce,he,_e){var ye=!ce||ce&&ce.schema==G;if(ce.schema!=_.schema)return d.call(k,G,ce,he,_e);var Se=G.$async===!0,Ne=a({isTop:!0,schema:G,isRoot:ye,baseId:_e,root:ce,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:r.MissingRef,RULES:W,validate:a,util:e,resolve:t,resolveRef:q,usePattern:j,useDefault:Z,useCustomRule:ne,opts:N,formats:U,logger:k.logger,self:k});Ne=R(I,x)+R(M,v)+R(P,b)+R(X,S)+Ne,N.processCode&&(Ne=N.processCode(Ne,G));var ge;try{var ke=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",Ne);ge=ke(k,W,U,_,I,P,X,l,s,c),I[0]=ge}catch(Oe){throw k.logger.error("Error compiling schema, function code:",Ne),Oe}return ge.schema=G,ge.errors=null,ge.refs=O,ge.refVal=I,ge.root=ye?ge:ce,Se&&(ge.$async=!0),N.sourceCode===!0&&(ge.source={code:Ne,patterns:M,defaults:P}),ge}function q(G,ce,he){ce=t.url(G,ce);var _e=O[ce],ye,Se;if(_e!==void 0)return ye=I[_e],Se="refVal["+_e+"]",z(ye,Se);if(!he&&_.refs){var Ne=_.refs[ce];if(Ne!==void 0)return ye=_.refVal[Ne],Se=$(ce,ye),z(ye,Se)}Se=$(ce);var ge=t.call(k,B,_,ce);if(ge===void 0){var ke=A&&A[ce];ke&&(ge=t.inlineRef(ke,N.inlineRefs)?ke:d.call(k,ke,_,A,G))}if(ge===void 0)K(ce);else return J(ce,ge),z(ge,Se)}function $(G,ce){var he=I.length;return I[he]=ce,O[G]=he,"refVal"+he}function K(G){delete O[G]}function J(G,ce){var he=O[G];I[he]=ce}function z(G,ce){return typeof G=="object"||typeof G=="boolean"?{code:ce,schema:G,inline:!0}:{code:ce,$async:G&&!!G.$async}}function j(G){var ce=L[G];return ce===void 0&&(ce=L[G]=M.length,M[ce]=G),"pattern"+ce}function Z(G){switch(typeof G){case"boolean":case"number":return""+G;case"string":return e.toQuotedString(G);case"object":if(G===null)return"null";var ce=n(G),he=V[ce];return he===void 0&&(he=V[ce]=P.length,P[he]=G),"default"+he}}function ne(G,ce,he,_e){if(k._opts.validateSchema!==!1){var ye=G.definition.dependencies;if(ye&&!ye.every(function(We){return Object.prototype.hasOwnProperty.call(he,We)}))throw new Error("parent schema must have all required keywords: "+ye.join(","));var Se=G.definition.validateSchema;if(Se){var Ne=Se(ce);if(!Ne){var ge="keyword schema is invalid: "+k.errorsText(Se.errors);if(k._opts.validateSchema=="log")k.logger.error(ge);else throw new Error(ge)}}}var ke=G.definition.compile,Oe=G.definition.inline,Xe=G.definition.macro,ot;if(ke)ot=ke.call(k,ce,he,_e);else if(Xe)ot=Xe.call(k,ce,he,_e),N.validateSchema!==!1&&k.validateSchema(ot,!0);else if(Oe)ot=Oe.call(k,_e,G.keyword,ce,he);else if(ot=G.definition.validate,!ot)return;if(ot===void 0)throw new Error('custom keyword "'+G.keyword+'"failed to compile');var $e=X.length;return X[$e]=ot,{code:"customRule"+$e,validate:ot}}}function f(w,_,A){var C=h.call(this,w,_,A);return C>=0?{index:C,compiling:!0}:(C=this._compilations.length,this._compilations[C]={schema:w,root:_,baseId:A},{index:C,compiling:!1})}function m(w,_,A){var C=h.call(this,w,_,A);C>=0&&this._compilations.splice(C,1)}function h(w,_,A){for(var C=0;C<this._compilations.length;C++){var k=this._compilations[C];if(k.schema==w&&k.root==_&&k.baseId==A)return C}return-1}function v(w,_){return"var pattern"+w+" = new RegExp("+e.toQuotedString(_[w])+");"}function b(w){return"var default"+w+" = defaults["+w+"];"}function x(w,_){return _[w]===void 0?"":"var refVal"+w+" = refVal["+w+"];"}function S(w){return"var customRule"+w+" = customRules["+w+"];"}function R(w,_){if(!w.length)return"";for(var A="",C=0;C<w.length;C++)A+=_(C,w);return A}return Hv}var Vv={exports:{}},sI;function Z6(){if(sI)return Vv.exports;sI=1;var t=Vv.exports=function(){this._cache={}};return t.prototype.put=function(r,n){this._cache[r]=n},t.prototype.get=function(r){return this._cache[r]},t.prototype.del=function(r){delete this._cache[r]},t.prototype.clear=function(){this._cache={}},Vv.exports}var Gv,lI;function X6(){if(lI)return Gv;lI=1;var t=pc(),e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31],n=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i,a=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,s=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,l=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,c=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,d=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,f=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,m=/^(?:\/(?:[^~/]|~0|~1)*)*$/,h=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,v=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;Gv=b;function b(I){return I=I=="full"?"full":"fast",t.copy(b[I])}b.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":c,url:d,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:N,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v},b.full={date:S,time:R,"date-time":_,uri:C,"uri-reference":l,"uri-template":c,url:d,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:a,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:N,uuid:f,"json-pointer":m,"json-pointer-uri-fragment":h,"relative-json-pointer":v};function x(I){return I%4===0&&(I%100!==0||I%400===0)}function S(I){var O=I.match(e);if(!O)return!1;var M=+O[1],L=+O[2],P=+O[3];return L>=1&&L<=12&&P>=1&&P<=(L==2&&x(M)?29:r[L])}function R(I,O){var M=I.match(n);if(!M)return!1;var L=M[1],P=M[2],V=M[3],X=M[5];return(L<=23&&P<=59&&V<=59||L==23&&P==59&&V==60)&&(!O||X)}var w=/t|\s/i;function _(I){var O=I.split(w);return O.length==2&&S(O[0])&&R(O[1],!0)}var A=/\/|:/;function C(I){return A.test(I)&&s.test(I)}var k=/[^\\]\\Z/;function N(I){if(k.test(I))return!1;try{return new RegExp(I),!0}catch{return!1}}return Gv}var Wv,cI;function Q6(){return cI||(cI=1,Wv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.errSchemaPath+"/"+r,f=!e.opts.allErrors,m="data"+(l||""),h="valid"+s,v,b;if(c=="#"||c=="#/")e.isRoot?(v=e.async,b="validate"):(v=e.root.schema.$async===!0,b="root.refVal[0]");else{var x=e.resolveRef(e.baseId,c,e.isRoot);if(x===void 0){var S=e.MissingRefError.message(e.baseId,c);if(e.opts.missingRefs=="fail"){e.logger.error(S);var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(d)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),a+=" } "):a+=" {} ";var w=a;a=R.pop(),!e.compositeRule&&f?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f&&(a+=" if (false) { ")}else if(e.opts.missingRefs=="ignore")e.logger.warn(S),f&&(a+=" if (true) { ");else throw new e.MissingRefError(e.baseId,c,S)}else if(x.inline){var _=e.util.copy(e);_.level++;var A="valid"+_.level;_.schema=x.schema,_.schemaPath="",_.errSchemaPath=c;var C=e.validate(_).replace(/validate\.schema/g,x.code);a+=" "+C+" ",f&&(a+=" if ("+A+") { ")}else v=x.$async===!0||e.async&&x.$async!==!1,b=x.code}if(b){var R=R||[];R.push(a),a="",e.opts.passContext?a+=" "+b+".call(this, ":a+=" "+b+"( ",a+=" "+m+", (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var k=l?"data"+(l-1||""):"parentData",N=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+k+" , "+N+", rootData) ";var I=a;if(a=R.pop(),v){if(!e.async)throw new Error("async schema referenced by sync schema");f&&(a+=" var "+h+"; "),a+=" try { await "+I+"; ",f&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",f&&(a+=" "+h+" = false; "),a+=" } ",f&&(a+=" if ("+h+") { ")}else a+=" if (!"+I+") { if (vErrors === null) vErrors = "+b+".errors; else vErrors = vErrors.concat("+b+".errors); errors = vErrors.length; } ",f&&(a+=" else { ")}return a}),Wv}var Yv,uI;function J6(){return uI||(uI=1,Yv=function(e,r,n){var a=" ",s=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,d=!e.opts.allErrors,f=e.util.copy(e),m="";f.level++;var h="valid"+f.level,v=f.baseId,b=!0,x=s;if(x)for(var S,R=-1,w=x.length-1;R<w;)S=x[R+=1],(e.opts.strictKeywords?typeof S=="object"&&Object.keys(S).length>0||S===!1:e.util.schemaHasRules(S,e.RULES.all))&&(b=!1,f.schema=S,f.schemaPath=l+"["+R+"]",f.errSchemaPath=c+"/"+R,a+=" "+e.validate(f)+" ",f.baseId=v,d&&(a+=" if ("+h+") { ",m+="}"));return d&&(b?a+=" if (true) { ":a+=" "+m.slice(0,-1)+" "),a}),Yv}var Kv,dI;function e8(){return dI||(dI=1,Kv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w=c.every(function(O){return e.opts.strictKeywords?typeof O=="object"&&Object.keys(O).length>0||O===!1:e.util.schemaHasRules(O,e.RULES.all)});if(w){var _=x.baseId;a+=" var "+b+" = errors; var "+v+" = false; ";var A=e.compositeRule;e.compositeRule=x.compositeRule=!0;var C=c;if(C)for(var k,N=-1,I=C.length-1;N<I;)k=C[N+=1],x.schema=k,x.schemaPath=d+"["+N+"]",x.errSchemaPath=f+"/"+N,a+=" "+e.validate(x)+" ",x.baseId=_,a+=" "+v+" = "+v+" || "+R+"; if (!"+v+") { ",S+="}";e.compositeRule=x.compositeRule=A,a+=" "+S+" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } else { errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else m&&(a+=" if (true) { ");return a}),Kv}var Zv,fI;function t8(){return fI||(fI=1,Zv=function(e,r,n){var a=" ",s=e.schema[r],l=e.errSchemaPath+"/"+r;e.opts.allErrors;var c=e.util.toQuotedString(s);return e.opts.$comment===!0?a+=" console.log("+c+");":typeof e.opts.$comment=="function"&&(a+=" self._opts.$comment("+c+", "+e.util.toQuotedString(l)+", validate.root.schema);"),a}),Zv}var Xv,pI;function r8(){return pI||(pI=1,Xv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data;b&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; "),b||(a+=" var schema"+s+" = validate.schema"+d+";"),a+="var "+v+" = equal("+h+", schema"+s+"); if (!"+v+") { ";var x=x||[];x.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValue: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to constant' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=x.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),Xv}var Qv,mI;function n8(){return mI||(mI=1,Qv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w="i"+s,_=x.dataLevel=e.dataLevel+1,A="data"+_,C=e.baseId,k=e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all);if(a+="var "+b+" = errors;var "+v+";",k){var N=e.compositeRule;e.compositeRule=x.compositeRule=!0,x.schema=c,x.schemaPath=d,x.errSchemaPath=f,a+=" var "+R+" = false; for (var "+w+" = 0; "+w+" < "+h+".length; "+w+"++) { ",x.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0);var I=h+"["+w+"]";x.dataPathArr[_]=w;var O=e.validate(x);x.baseId=C,e.util.varOccurences(O,A)<2?a+=" "+e.util.varReplace(O,A,I)+" ":a+=" var "+A+" = "+I+"; "+O+" ",a+=" if ("+R+") break; } ",e.compositeRule=x.compositeRule=N,a+=" "+S+" if (!"+R+") {"}else a+=" if ("+h+".length == 0) {";var M=M||[];M.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should contain a valid item' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var L=a;return a=M.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+L+"]); ":a+=" validate.errors = ["+L+"]; return false; ":a+=" var err = "+L+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { ",k&&(a+=" errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; } "),e.opts.allErrors&&(a+=" } "),a}),Qv}var Jv,hI;function a8(){return hI||(hI=1,Jv=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e),x="";b.level++;var S="valid"+b.level,R={},w={},_=e.opts.ownProperties;for(N in c)if(N!="__proto__"){var A=c[N],C=Array.isArray(A)?w:R;C[N]=A}a+="var "+v+" = errors;";var k=e.errorPath;a+="var missing"+s+";";for(var N in w)if(C=w[N],C.length){if(a+=" if ( "+h+e.util.getProperty(N)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(N)+"') "),m){a+=" && ( ";var I=C;if(I)for(var O,M=-1,L=I.length-1;M<L;){O=I[M+=1],M&&(a+=" || ");var P=e.util.getProperty(O),V=h+P;a+=" ( ( "+V+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?O:P)+") ) "}a+=")) { ";var X="missing"+s,Q="' + "+X+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,X,!0):k+" + "+X);var oe=oe||[];oe.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(N)+"', missingProperty: '"+Q+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",C.length==1?a+="property "+e.util.escapeQuotes(C[0]):a+="properties "+e.util.escapeQuotes(C.join(", ")),a+=" when property "+e.util.escapeQuotes(N)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var U=a;a=oe.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+U+"]); ":a+=" validate.errors = ["+U+"]; return false; ":a+=" var err = "+U+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "}else{a+=" ) { ";var W=C;if(W)for(var O,H=-1,te=W.length-1;H<te;){O=W[H+=1];var P=e.util.getProperty(O),Q=e.util.escapeQuotes(O),V=h+P;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,O,e.opts.jsonPointers)),a+=" if ( "+V+" === undefined ",_&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(O)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'dependencies' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { property: '"+e.util.escapeQuotes(N)+"', missingProperty: '"+Q+"', depsCount: "+C.length+", deps: '"+e.util.escapeQuotes(C.length==1?C[0]:C.join(", "))+"' } ",e.opts.messages!==!1&&(a+=" , message: 'should have ",C.length==1?a+="property "+e.util.escapeQuotes(C[0]):a+="properties "+e.util.escapeQuotes(C.join(", ")),a+=" when property "+e.util.escapeQuotes(N)+" is present' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}a+=" } ",m&&(x+="}",a+=" else { ")}e.errorPath=k;var se=b.baseId;for(var N in R){var A=R[N];(e.opts.strictKeywords?typeof A=="object"&&Object.keys(A).length>0||A===!1:e.util.schemaHasRules(A,e.RULES.all))&&(a+=" "+S+" = true; if ( "+h+e.util.getProperty(N)+" !== undefined ",_&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(N)+"') "),a+=") { ",b.schema=A,b.schemaPath=d+e.util.getProperty(N),b.errSchemaPath=f+"/"+e.util.escapeFragment(N),a+=" "+e.validate(b)+" ",b.baseId=se,a+=" } ",m&&(a+=" if ("+S+") { ",x+="}"))}return m&&(a+=" "+x+" if ("+v+" == errors) {"),a}),Jv}var eb,gI;function i8(){return gI||(gI=1,eb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data;b&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var x="i"+s,S="schema"+s;b||(a+=" var "+S+" = validate.schema"+d+";"),a+="var "+v+";",b&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=""+v+" = false;for (var "+x+"=0; "+x+"<"+S+".length; "+x+"++) if (equal("+h+", "+S+"["+x+"])) { "+v+" = true; break; }",b&&(a+=" } "),a+=" if (!"+v+") { ";var R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { allowedValues: schema"+s+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" }",m&&(a+=" else { "),a}),eb}var tb,vI;function o8(){return vI||(vI=1,tb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||"");if(e.opts.format===!1)return m&&(a+=" if (true) { "),a;var v=e.opts.$data&&c&&c.$data,b;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c;var x=e.opts.unknownFormats,S=Array.isArray(x);if(v){var R="format"+s,w="isObject"+s,_="formatType"+s;a+=" var "+R+" = formats["+b+"]; var "+w+" = typeof "+R+" == 'object' && !("+R+" instanceof RegExp) && "+R+".validate; var "+_+" = "+w+" && "+R+".type || 'string'; if ("+w+") { ",e.async&&(a+=" var async"+s+" = "+R+".async; "),a+=" "+R+" = "+R+".validate; } if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'string') || "),a+=" (",x!="ignore"&&(a+=" ("+b+" && !"+R+" ",S&&(a+=" && self._opts.unknownFormats.indexOf("+b+") == -1 "),a+=") || "),a+=" ("+R+" && "+_+" == '"+n+"' && !(typeof "+R+" == 'function' ? ",e.async?a+=" (async"+s+" ? await "+R+"("+h+") : "+R+"("+h+")) ":a+=" "+R+"("+h+") ",a+=" : "+R+".test("+h+"))))) {"}else{var R=e.formats[c];if(!R){if(x=="ignore")return e.logger.warn('unknown format "'+c+'" ignored in schema at path "'+e.errSchemaPath+'"'),m&&(a+=" if (true) { "),a;if(S&&x.indexOf(c)>=0)return m&&(a+=" if (true) { "),a;throw new Error('unknown format "'+c+'" is used in schema at path "'+e.errSchemaPath+'"')}var w=typeof R=="object"&&!(R instanceof RegExp)&&R.validate,_=w&&R.type||"string";if(w){var A=R.async===!0;R=R.validate}if(_!=n)return m&&(a+=" if (true) { "),a;if(A){if(!e.async)throw new Error("async format in sync schema");var C="formats"+e.util.getProperty(c)+".validate";a+=" if (!(await "+C+"("+h+"))) { "}else{a+=" if (! ";var C="formats"+e.util.getProperty(c);w&&(C+=".validate"),typeof R=="function"?a+=" "+C+"("+h+") ":a+=" "+C+".test("+h+") ",a+=") { "}}var k=k||[];k.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { format: ",v?a+=""+b:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match format "`,v?a+="' + "+b+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var N=a;return a=k.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+N+"]); ":a+=" validate.errors = ["+N+"]; return false; ":a+=" var err = "+N+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),tb}var rb,bI;function s8(){return bI||(bI=1,rb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e);x.level++;var S="valid"+x.level,R=e.schema.then,w=e.schema.else,_=R!==void 0&&(e.opts.strictKeywords?typeof R=="object"&&Object.keys(R).length>0||R===!1:e.util.schemaHasRules(R,e.RULES.all)),A=w!==void 0&&(e.opts.strictKeywords?typeof w=="object"&&Object.keys(w).length>0||w===!1:e.util.schemaHasRules(w,e.RULES.all)),C=x.baseId;if(_||A){var k;x.createErrors=!1,x.schema=c,x.schemaPath=d,x.errSchemaPath=f,a+=" var "+b+" = errors; var "+v+" = true; ";var N=e.compositeRule;e.compositeRule=x.compositeRule=!0,a+=" "+e.validate(x)+" ",x.baseId=C,x.createErrors=!0,a+=" errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; } ",e.compositeRule=x.compositeRule=N,_?(a+=" if ("+S+") { ",x.schema=e.schema.then,x.schemaPath=e.schemaPath+".then",x.errSchemaPath=e.errSchemaPath+"/then",a+=" "+e.validate(x)+" ",x.baseId=C,a+=" "+v+" = "+S+"; ",_&&A?(k="ifClause"+s,a+=" var "+k+" = 'then'; "):k="'then'",a+=" } ",A&&(a+=" else { ")):a+=" if (!"+S+") { ",A&&(x.schema=e.schema.else,x.schemaPath=e.schemaPath+".else",x.errSchemaPath=e.errSchemaPath+"/else",a+=" "+e.validate(x)+" ",x.baseId=C,a+=" "+v+" = "+S+"; ",_&&A?(k="ifClause"+s,a+=" var "+k+" = 'else'; "):k="'else'",a+=" } "),a+=" if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { failingKeyword: "+k+" } ",e.opts.messages!==!1&&(a+=` , message: 'should match "' + `+k+` + '" schema' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),rb}var nb,yI;function l8(){return yI||(yI=1,nb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w="i"+s,_=x.dataLevel=e.dataLevel+1,A="data"+_,C=e.baseId;if(a+="var "+b+" = errors;var "+v+";",Array.isArray(c)){var k=e.schema.additionalItems;if(k===!1){a+=" "+v+" = "+h+".length <= "+c.length+"; ";var N=f;f=e.errSchemaPath+"/additionalItems",a+=" if (!"+v+") { ";var I=I||[];I.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+c.length+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have more than "+c.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var O=a;a=I.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+O+"]); ":a+=" validate.errors = ["+O+"]; return false; ":a+=" var err = "+O+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",f=N,m&&(S+="}",a+=" else { ")}var M=c;if(M){for(var L,P=-1,V=M.length-1;P<V;)if(L=M[P+=1],e.opts.strictKeywords?typeof L=="object"&&Object.keys(L).length>0||L===!1:e.util.schemaHasRules(L,e.RULES.all)){a+=" "+R+" = true; if ("+h+".length > "+P+") { ";var X=h+"["+P+"]";x.schema=L,x.schemaPath=d+"["+P+"]",x.errSchemaPath=f+"/"+P,x.errorPath=e.util.getPathExpr(e.errorPath,P,e.opts.jsonPointers,!0),x.dataPathArr[_]=P;var Q=e.validate(x);x.baseId=C,e.util.varOccurences(Q,A)<2?a+=" "+e.util.varReplace(Q,A,X)+" ":a+=" var "+A+" = "+X+"; "+Q+" ",a+=" } ",m&&(a+=" if ("+R+") { ",S+="}")}}if(typeof k=="object"&&(e.opts.strictKeywords?typeof k=="object"&&Object.keys(k).length>0||k===!1:e.util.schemaHasRules(k,e.RULES.all))){x.schema=k,x.schemaPath=e.schemaPath+".additionalItems",x.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+R+" = true; if ("+h+".length > "+c.length+") { for (var "+w+" = "+c.length+"; "+w+" < "+h+".length; "+w+"++) { ",x.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0);var X=h+"["+w+"]";x.dataPathArr[_]=w;var Q=e.validate(x);x.baseId=C,e.util.varOccurences(Q,A)<2?a+=" "+e.util.varReplace(Q,A,X)+" ":a+=" var "+A+" = "+X+"; "+Q+" ",m&&(a+=" if (!"+R+") break; "),a+=" } } ",m&&(a+=" if ("+R+") { ",S+="}")}}else if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){x.schema=c,x.schemaPath=d,x.errSchemaPath=f,a+=" for (var "+w+" = 0; "+w+" < "+h+".length; "+w+"++) { ",x.errorPath=e.util.getPathExpr(e.errorPath,w,e.opts.jsonPointers,!0);var X=h+"["+w+"]";x.dataPathArr[_]=w;var Q=e.validate(x);x.baseId=C,e.util.varOccurences(Q,A)<2?a+=" "+e.util.varReplace(Q,A,X)+" ":a+=" var "+A+" = "+X+"; "+Q+" ",m&&(a+=" if (!"+R+") break; "),a+=" }"}return m&&(a+=" "+S+" if ("+b+" == errors) {"),a}),nb}var ab,EI;function SI(){return EI||(EI=1,ab=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,C,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c;var x=r=="maximum",S=x?"exclusiveMaximum":"exclusiveMinimum",R=e.schema[S],w=e.opts.$data&&R&&R.$data,_=x?"<":">",A=x?">":"<",C=void 0;if(!(v||typeof c=="number"||c===void 0))throw new Error(r+" must be number");if(!(w||R===void 0||typeof R=="number"||typeof R=="boolean"))throw new Error(S+" must be number or boolean");if(w){var k=e.util.getData(R.$data,l,e.dataPathArr),N="exclusive"+s,I="exclType"+s,O="exclIsNumber"+s,M="op"+s,L="' + "+M+" + '";a+=" var schemaExcl"+s+" = "+k+"; ",k="schemaExcl"+s,a+=" var "+N+"; var "+I+" = typeof "+k+"; if ("+I+" != 'boolean' && "+I+" != 'undefined' && "+I+" != 'number') { ";var C=S,P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(C||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: '"+S+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" "+I+" == 'number' ? ( ("+N+" = "+b+" === undefined || "+k+" "+_+"= "+b+") ? "+h+" "+A+"= "+k+" : "+h+" "+A+" "+b+" ) : ( ("+N+" = "+k+" === true) ? "+h+" "+A+"= "+b+" : "+h+" "+A+" "+b+" ) || "+h+" !== "+h+") { var op"+s+" = "+N+" ? '"+_+"' : '"+_+"='; ",c===void 0&&(C=S,f=e.errSchemaPath+"/"+S,b=k,v=w)}else{var O=typeof R=="number",L=_;if(O&&v){var M="'"+L+"'";a+=" if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" ( "+b+" === undefined || "+R+" "+_+"= "+b+" ? "+h+" "+A+"= "+R+" : "+h+" "+A+" "+b+" ) || "+h+" !== "+h+") { "}else{O&&c===void 0?(N=!0,C=S,f=e.errSchemaPath+"/"+S,b=R,A+="="):(O&&(b=Math[x?"min":"max"](R,c)),R===(O?b:!0)?(N=!0,C=S,f=e.errSchemaPath+"/"+S,A+="="):(N=!1,L+="="));var M="'"+L+"'";a+=" if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" "+h+" "+A+" "+b+" || "+h+" !== "+h+") { "}}C=C||r;var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(C||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { comparison: "+M+", limit: "+b+", exclusive: "+N+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be "+L+" ",v?a+="' + "+b:a+=""+b+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;return a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { "),a}),ab}var ib,wI;function xI(){return wI||(wI=1,ib=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var x=r=="maxItems"?">":"<";a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" "+h+".length "+x+" "+b+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxItems"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+b+" + '":a+=""+c,a+=" items' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),ib}var ob,_I;function TI(){return _I||(_I=1,ob=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var x=r=="maxLength"?">":"<";a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),e.opts.unicode===!1?a+=" "+h+".length ":a+=" ucs2length("+h+") ",a+=" "+x+" "+b+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be ",r=="maxLength"?a+="longer":a+="shorter",a+=" than ",v?a+="' + "+b+" + '":a+=""+c,a+=" characters' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),ob}var sb,RI;function AI(){return RI||(RI=1,sb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,S,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");var x=r=="maxProperties"?">":"<";a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'number') || "),a+=" Object.keys("+h+").length "+x+" "+b+") { ";var S=r,R=R||[];R.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(S||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { limit: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have ",r=="maxProperties"?a+="more":a+="fewer",a+=" than ",v?a+="' + "+b+" + '":a+=""+c,a+=" properties' "),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var w=a;return a=R.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+w+"]); ":a+=" validate.errors = ["+w+"]; return false; ":a+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),sb}var lb,CI;function c8(){return CI||(CI=1,lb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;if(v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c,!(v||typeof c=="number"))throw new Error(r+" must be number");a+="var division"+s+";if (",v&&(a+=" "+b+" !== undefined && ( typeof "+b+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+b+", ",e.opts.multipleOfPrecision?a+=" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":a+=" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",v&&(a+=" ) "),a+=" ) { ";var x=x||[];x.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { multipleOf: "+b+" } ",e.opts.messages!==!1&&(a+=" , message: 'should be multiple of ",v?a+="' + "+b:a+=""+b+"'"),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var S=a;return a=x.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+S+"]); ":a+=" validate.errors = ["+S+"]; return false; ":a+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),lb}var cb,NI;function u8(){return NI||(NI=1,cb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e);b.level++;var x="valid"+b.level;if(e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){b.schema=c,b.schemaPath=d,b.errSchemaPath=f,a+=" var "+v+" = errors; ";var S=e.compositeRule;e.compositeRule=b.compositeRule=!0,b.createErrors=!1;var R;b.opts.allErrors&&(R=b.opts.allErrors,b.opts.allErrors=!1),a+=" "+e.validate(b)+" ",b.createErrors=!0,R&&(b.opts.allErrors=R),e.compositeRule=b.compositeRule=S,a+=" if ("+x+") { ";var w=w||[];w.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var _=a;a=w.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+_+"]); ":a+=" validate.errors = ["+_+"]; return false; ":a+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+v+"; if (vErrors !== null) { if ("+v+") vErrors.length = "+v+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: {} ",e.opts.messages!==!1&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",m&&(a+=" if (false) { ");return a}),cb}var ub,kI;function d8(){return kI||(kI=1,ub=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b="errs__"+s,x=e.util.copy(e),S="";x.level++;var R="valid"+x.level,w=x.baseId,_="prevValid"+s,A="passingSchemas"+s;a+="var "+b+" = errors , "+_+" = false , "+v+" = false , "+A+" = null; ";var C=e.compositeRule;e.compositeRule=x.compositeRule=!0;var k=c;if(k)for(var N,I=-1,O=k.length-1;I<O;)N=k[I+=1],(e.opts.strictKeywords?typeof N=="object"&&Object.keys(N).length>0||N===!1:e.util.schemaHasRules(N,e.RULES.all))?(x.schema=N,x.schemaPath=d+"["+I+"]",x.errSchemaPath=f+"/"+I,a+=" "+e.validate(x)+" ",x.baseId=w):a+=" var "+R+" = true; ",I&&(a+=" if ("+R+" && "+_+") { "+v+" = false; "+A+" = ["+A+", "+I+"]; } else { ",S+="}"),a+=" if ("+R+") { "+v+" = "+_+" = true; "+A+" = "+I+"; }";return e.compositeRule=x.compositeRule=C,a+=""+S+"if (!"+v+") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { passingSchemas: "+A+" } ",e.opts.messages!==!1&&(a+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),a+="} else { errors = "+b+"; if (vErrors !== null) { if ("+b+") vErrors.length = "+b+"; else vErrors = null; }",e.opts.allErrors&&(a+=" } "),a}),ub}var db,II;function f8(){return II||(II=1,db=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v=e.opts.$data&&c&&c.$data,b;v?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",b="schema"+s):b=c;var x=v?"(new RegExp("+b+"))":e.usePattern(c);a+="if ( ",v&&(a+=" ("+b+" !== undefined && typeof "+b+" != 'string') || "),a+=" !"+x+".test("+h+") ) { ";var S=S||[];S.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { pattern: ",v?a+=""+b:a+=""+e.util.toQuotedString(c),a+=" } ",e.opts.messages!==!1&&(a+=` , message: 'should match pattern "`,v?a+="' + "+b+" + '":a+=""+e.util.escapeQuotes(c),a+=`"' `),e.opts.verbose&&(a+=" , schema: ",v?a+="validate.schema"+d:a+=""+e.util.toQuotedString(c),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var R=a;return a=S.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+R+"]); ":a+=" validate.errors = ["+R+"]; return false; ":a+=" var err = "+R+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",m&&(a+=" else { "),a}),db}var fb,OI;function p8(){return OI||(OI=1,fb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e),x="";b.level++;var S="valid"+b.level,R="key"+s,w="idx"+s,_=b.dataLevel=e.dataLevel+1,A="data"+_,C="dataProperties"+s,k=Object.keys(c||{}).filter(H),N=e.schema.patternProperties||{},I=Object.keys(N).filter(H),O=e.schema.additionalProperties,M=k.length||I.length,L=O===!1,P=typeof O=="object"&&Object.keys(O).length,V=e.opts.removeAdditional,X=L||P||V,Q=e.opts.ownProperties,oe=e.baseId,U=e.schema.required;if(U&&!(e.opts.$data&&U.$data)&&U.length<e.opts.loopRequired)var W=e.util.toHash(U);function H(ft){return ft!=="__proto__"}if(a+="var "+v+" = errors;var "+S+" = true;",Q&&(a+=" var "+C+" = undefined;"),X){if(Q?a+=" "+C+" = "+C+" || Object.keys("+h+"); for (var "+w+"=0; "+w+"<"+C+".length; "+w+"++) { var "+R+" = "+C+"["+w+"]; ":a+=" for (var "+R+" in "+h+") { ",M){if(a+=" var isAdditional"+s+" = !(false ",k.length)if(k.length>8)a+=" || validate.schema"+d+".hasOwnProperty("+R+") ";else{var te=k;if(te)for(var se,B=-1,q=te.length-1;B<q;)se=te[B+=1],a+=" || "+R+" == "+e.util.toQuotedString(se)+" "}if(I.length){var $=I;if($)for(var K,J=-1,z=$.length-1;J<z;)K=$[J+=1],a+=" || "+e.usePattern(K)+".test("+R+") "}a+=" ); if (isAdditional"+s+") { "}if(V=="all")a+=" delete "+h+"["+R+"]; ";else{var j=e.errorPath,Z="' + "+R+" + '";if(e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers)),L)if(V)a+=" delete "+h+"["+R+"]; ";else{a+=" "+S+" = false; ";var ne=f;f=e.errSchemaPath+"/additionalProperties";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'additionalProperties' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { additionalProperty: '"+Z+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is an invalid additional property":a+="should NOT have additional properties",a+="' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var ce=a;a=G.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+ce+"]); ":a+=" validate.errors = ["+ce+"]; return false; ":a+=" var err = "+ce+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,m&&(a+=" break; ")}else if(P)if(V=="failing"){a+=" var "+v+" = errors; ";var he=e.compositeRule;e.compositeRule=b.compositeRule=!0,b.schema=O,b.schemaPath=e.schemaPath+".additionalProperties",b.errSchemaPath=e.errSchemaPath+"/additionalProperties",b.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var _e=h+"["+R+"]";b.dataPathArr[_]=R;var ye=e.validate(b);b.baseId=oe,e.util.varOccurences(ye,A)<2?a+=" "+e.util.varReplace(ye,A,_e)+" ":a+=" var "+A+" = "+_e+"; "+ye+" ",a+=" if (!"+S+") { errors = "+v+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+h+"["+R+"]; } ",e.compositeRule=b.compositeRule=he}else{b.schema=O,b.schemaPath=e.schemaPath+".additionalProperties",b.errSchemaPath=e.errSchemaPath+"/additionalProperties",b.errorPath=e.opts._errorDataPathProperty?e.errorPath:e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var _e=h+"["+R+"]";b.dataPathArr[_]=R;var ye=e.validate(b);b.baseId=oe,e.util.varOccurences(ye,A)<2?a+=" "+e.util.varReplace(ye,A,_e)+" ":a+=" var "+A+" = "+_e+"; "+ye+" ",m&&(a+=" if (!"+S+") break; ")}e.errorPath=j}M&&(a+=" } "),a+=" } ",m&&(a+=" if ("+S+") { ",x+="}")}var Se=e.opts.useDefaults&&!e.compositeRule;if(k.length){var Ne=k;if(Ne)for(var se,ge=-1,ke=Ne.length-1;ge<ke;){se=Ne[ge+=1];var Oe=c[se];if(e.opts.strictKeywords?typeof Oe=="object"&&Object.keys(Oe).length>0||Oe===!1:e.util.schemaHasRules(Oe,e.RULES.all)){var Xe=e.util.getProperty(se),_e=h+Xe,ot=Se&&Oe.default!==void 0;b.schema=Oe,b.schemaPath=d+Xe,b.errSchemaPath=f+"/"+e.util.escapeFragment(se),b.errorPath=e.util.getPath(e.errorPath,se,e.opts.jsonPointers),b.dataPathArr[_]=e.util.toQuotedString(se);var ye=e.validate(b);if(b.baseId=oe,e.util.varOccurences(ye,A)<2){ye=e.util.varReplace(ye,A,_e);var $e=_e}else{var $e=A;a+=" var "+A+" = "+_e+"; "}if(ot)a+=" "+ye+" ";else{if(W&&W[se]){a+=" if ( "+$e+" === undefined ",Q&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(se)+"') "),a+=") { "+S+" = false; ";var j=e.errorPath,ne=f,We=e.util.escapeQuotes(se);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(j,se,e.opts.jsonPointers)),f=e.errSchemaPath+"/required";var G=G||[];G.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+We+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+We+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var ce=a;a=G.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+ce+"]); ":a+=" validate.errors = ["+ce+"]; return false; ":a+=" var err = "+ce+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",f=ne,e.errorPath=j,a+=" } else { "}else m?(a+=" if ( "+$e+" === undefined ",Q&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(se)+"') "),a+=") { "+S+" = true; } else { "):(a+=" if ("+$e+" !== undefined ",Q&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(se)+"') "),a+=" ) { ");a+=" "+ye+" } "}}m&&(a+=" if ("+S+") { ",x+="}")}}if(I.length){var Ae=I;if(Ae)for(var K,Le=-1,Je=Ae.length-1;Le<Je;){K=Ae[Le+=1];var Oe=N[K];if(e.opts.strictKeywords?typeof Oe=="object"&&Object.keys(Oe).length>0||Oe===!1:e.util.schemaHasRules(Oe,e.RULES.all)){b.schema=Oe,b.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(K),b.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(K),Q?a+=" "+C+" = "+C+" || Object.keys("+h+"); for (var "+w+"=0; "+w+"<"+C+".length; "+w+"++) { var "+R+" = "+C+"["+w+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" if ("+e.usePattern(K)+".test("+R+")) { ",b.errorPath=e.util.getPathExpr(e.errorPath,R,e.opts.jsonPointers);var _e=h+"["+R+"]";b.dataPathArr[_]=R;var ye=e.validate(b);b.baseId=oe,e.util.varOccurences(ye,A)<2?a+=" "+e.util.varReplace(ye,A,_e)+" ":a+=" var "+A+" = "+_e+"; "+ye+" ",m&&(a+=" if (!"+S+") break; "),a+=" } ",m&&(a+=" else "+S+" = true; "),a+=" } ",m&&(a+=" if ("+S+") { ",x+="}")}}}return m&&(a+=" "+x+" if ("+v+" == errors) {"),a}),fb}var pb,DI;function m8(){return DI||(DI=1,pb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="errs__"+s,b=e.util.copy(e),x="";b.level++;var S="valid"+b.level;if(a+="var "+v+" = errors;",e.opts.strictKeywords?typeof c=="object"&&Object.keys(c).length>0||c===!1:e.util.schemaHasRules(c,e.RULES.all)){b.schema=c,b.schemaPath=d,b.errSchemaPath=f;var R="key"+s,w="idx"+s,_="i"+s,A="' + "+R+" + '",C=b.dataLevel=e.dataLevel+1,k="data"+C,N="dataProperties"+s,I=e.opts.ownProperties,O=e.baseId;I&&(a+=" var "+N+" = undefined; "),I?a+=" "+N+" = "+N+" || Object.keys("+h+"); for (var "+w+"=0; "+w+"<"+N+".length; "+w+"++) { var "+R+" = "+N+"["+w+"]; ":a+=" for (var "+R+" in "+h+") { ",a+=" var startErrs"+s+" = errors; ";var M=R,L=e.compositeRule;e.compositeRule=b.compositeRule=!0;var P=e.validate(b);b.baseId=O,e.util.varOccurences(P,k)<2?a+=" "+e.util.varReplace(P,k,M)+" ":a+=" var "+k+" = "+M+"; "+P+" ",e.compositeRule=b.compositeRule=L,a+=" if (!"+S+") { for (var "+_+"=startErrs"+s+"; "+_+"<errors; "+_+"++) { vErrors["+_+"].propertyName = "+R+"; } var err = ",e.createErrors!==!1?(a+=" { keyword: 'propertyNames' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { propertyName: '"+A+"' } ",e.opts.messages!==!1&&(a+=" , message: 'property name \\'"+A+"\\' is invalid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; "),m&&(a+=" break; "),a+=" } }"}return m&&(a+=" "+x+" if ("+v+" == errors) {"),a}),pb}var mb,LI;function h8(){return LI||(LI=1,mb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data;b&&(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ");var x="schema"+s;if(!b)if(c.length<e.opts.loopRequired&&e.schema.properties&&Object.keys(e.schema.properties).length){var S=[],R=c;if(R)for(var w,_=-1,A=R.length-1;_<A;){w=R[_+=1];var C=e.schema.properties[w];C&&(e.opts.strictKeywords?typeof C=="object"&&Object.keys(C).length>0||C===!1:e.util.schemaHasRules(C,e.RULES.all))||(S[S.length]=w)}}else var S=c;if(b||S.length){var k=e.errorPath,N=b||S.length>=e.opts.loopRequired,I=e.opts.ownProperties;if(m)if(a+=" var missing"+s+"; ",N){b||(a+=" var "+x+" = validate.schema"+d+"; ");var O="i"+s,M="schema"+s+"["+O+"]",L="' + "+M+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,M,e.opts.jsonPointers)),a+=" var "+v+" = true; ",b&&(a+=" if (schema"+s+" === undefined) "+v+" = true; else if (!Array.isArray(schema"+s+")) "+v+" = false; else {"),a+=" for (var "+O+" = 0; "+O+" < "+x+".length; "+O+"++) { "+v+" = "+h+"["+x+"["+O+"]] !== undefined ",I&&(a+=" && Object.prototype.hasOwnProperty.call("+h+", "+x+"["+O+"]) "),a+="; if (!"+v+") break; } ",b&&(a+=" } "),a+=" if (!"+v+") { ";var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var X=S;if(X)for(var Q,O=-1,oe=X.length-1;O<oe;){Q=X[O+=1],O&&(a+=" || ");var U=e.util.getProperty(Q),W=h+U;a+=" ( ( "+W+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(Q)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?Q:U)+") ) "}a+=") { ";var M="missing"+s,L="' + "+M+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(k,M,!0):k+" + "+M);var P=P||[];P.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var V=a;a=P.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+V+"]); ":a+=" validate.errors = ["+V+"]; return false; ":a+=" var err = "+V+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(N){b||(a+=" var "+x+" = validate.schema"+d+"; ");var O="i"+s,M="schema"+s+"["+O+"]",L="' + "+M+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(k,M,e.opts.jsonPointers)),b&&(a+=" if ("+x+" && !Array.isArray("+x+")) { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+x+" !== undefined) { "),a+=" for (var "+O+" = 0; "+O+" < "+x+".length; "+O+"++) { if ("+h+"["+x+"["+O+"]] === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", "+x+"["+O+"]) "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",b&&(a+=" } ")}else{var H=S;if(H)for(var Q,te=-1,se=H.length-1;te<se;){Q=H[te+=1];var U=e.util.getProperty(Q),L=e.util.escapeQuotes(Q),W=h+U;e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(k,Q,e.opts.jsonPointers)),a+=" if ( "+W+" === undefined ",I&&(a+=" || ! Object.prototype.hasOwnProperty.call("+h+", '"+e.util.escapeQuotes(Q)+"') "),a+=") { var err = ",e.createErrors!==!1?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { missingProperty: '"+L+"' } ",e.opts.messages!==!1&&(a+=" , message: '",e.opts._errorDataPathProperty?a+="is a required property":a+="should have required property \\'"+L+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}e.errorPath=k}else m&&(a+=" if (true) {");return a}),mb}var hb,MI;function g8(){return MI||(MI=1,hb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h="data"+(l||""),v="valid"+s,b=e.opts.$data&&c&&c.$data,x;if(b?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",x="schema"+s):x=c,(c||b)&&e.opts.uniqueItems!==!1){b&&(a+=" var "+v+"; if ("+x+" === false || "+x+" === undefined) "+v+" = true; else if (typeof "+x+" != 'boolean') "+v+" = false; else { "),a+=" var i = "+h+".length , "+v+" = true , j; if (i > 1) { ";var S=e.schema.items&&e.schema.items.type,R=Array.isArray(S);if(!S||S=="object"||S=="array"||R&&(S.indexOf("object")>=0||S.indexOf("array")>=0))a+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+v+" = false; break outer; } } } ";else{a+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var w="checkDataType"+(R?"s":"");a+=" if ("+e.util[w](S,"item",e.opts.strictNumbers,!0)+") continue; ",R&&(a+=` if (typeof item == 'string') item = '"' + item; `),a+=" if (typeof itemIndices[item] == 'number') { "+v+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}a+=" } ",b&&(a+=" } "),a+=" if (!"+v+") { ";var _=_||[];_.push(a),a="",e.createErrors!==!1?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",b?a+="validate.schema"+d:a+=""+c,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;a=_.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+A+"]); ":a+=" validate.errors = ["+A+"]; return false; ":a+=" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",m&&(a+=" else { ")}else m&&(a+=" if (true) { ");return a}),hb}var gb,PI;function v8(){return PI||(PI=1,gb={$ref:Q6(),allOf:J6(),anyOf:e8(),$comment:t8(),const:r8(),contains:n8(),dependencies:a8(),enum:i8(),format:o8(),if:s8(),items:l8(),maximum:SI(),minimum:SI(),maxItems:xI(),minItems:xI(),maxLength:TI(),minLength:TI(),maxProperties:AI(),minProperties:AI(),multipleOf:c8(),not:u8(),oneOf:d8(),pattern:f8(),properties:p8(),propertyNames:m8(),required:h8(),uniqueItems:g8(),validate:D$()}),gb}var vb,jI;function b8(){if(jI)return vb;jI=1;var t=v8(),e=pc().toHash;return vb=function(){var n=[{type:"number",rules:[{maximum:["exclusiveMaximum"]},{minimum:["exclusiveMinimum"]},"multipleOf","format"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","items","contains","uniqueItems"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","propertyNames",{properties:["additionalProperties","patternProperties"]}]},{rules:["$ref","const","enum","not","anyOf","oneOf","allOf","if"]}],a=["type","$comment"],s=["$schema","$id","id","$data","$async","title","description","default","definitions","examples","readOnly","writeOnly","contentMediaType","contentEncoding","additionalItems","then","else"],l=["number","integer","string","array","object","boolean","null"];return n.all=e(a),n.types=e(l),n.forEach(function(c){c.rules=c.rules.map(function(d){var f;if(typeof d=="object"){var m=Object.keys(d)[0];f=d[m],d=m,f.forEach(function(v){a.push(v),n.all[v]=!0})}a.push(d);var h=n.all[d]={keyword:d,code:t[d],implements:f};return h}),n.all.$comment={keyword:"$comment",code:t.$comment},c.type&&(n.types[c.type]=c)}),n.keywords=e(a.concat(s)),n.custom={},n},vb}var bb,UI;function y8(){if(UI)return bb;UI=1;var t=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"];return bb=function(e,r){for(var n=0;n<r.length;n++){e=JSON.parse(JSON.stringify(e));var a=r[n].split("/"),s=e,l;for(l=1;l<a.length;l++)s=s[a[l]];for(l=0;l<t.length;l++){var c=t[l],d=s[c];d&&(s[c]={anyOf:[d,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]})}}return e},bb}var yb,FI;function E8(){if(FI)return yb;FI=1;var t=eR().MissingRef;yb=e;function e(r,n,a){var s=this;if(typeof this._opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");typeof n=="function"&&(a=n,n=void 0);var l=c(r).then(function(){var f=s._addSchema(r,void 0,n);return f.validate||d(f)});return a&&l.then(function(f){a(null,f)},a),l;function c(f){var m=f.$schema;return m&&!s.getSchema(m)?e.call(s,{$ref:m},!0):Promise.resolve()}function d(f){try{return s._compile(f)}catch(h){if(h instanceof t)return m(h);throw h}function m(h){var v=h.missingSchema;if(S(v))throw new Error("Schema "+v+" is loaded but "+h.missingRef+" cannot be resolved");var b=s._loadingSchemas[v];return b||(b=s._loadingSchemas[v]=s._opts.loadSchema(v),b.then(x,x)),b.then(function(R){if(!S(v))return c(R).then(function(){S(v)||s.addSchema(R,v,void 0,n)})}).then(function(){return d(f)});function x(){delete s._loadingSchemas[v]}function S(R){return s._refs[R]||s._schemas[R]}}}}return yb}var Eb,zI;function S8(){return zI||(zI=1,Eb=function(e,r,n){var a=" ",s=e.level,l=e.dataLevel,c=e.schema[r],d=e.schemaPath+e.util.getProperty(r),f=e.errSchemaPath+"/"+r,m=!e.opts.allErrors,h,v="data"+(l||""),b="valid"+s,x="errs__"+s,S=e.opts.$data&&c&&c.$data,R;S?(a+=" var schema"+s+" = "+e.util.getData(c.$data,l,e.dataPathArr)+"; ",R="schema"+s):R=c;var w=this,_="definition"+s,A=w.definition,C="",k,N,I,O,M;if(S&&A.$data){M="keywordValidate"+s;var L=A.validateSchema;a+=" var "+_+" = RULES.custom['"+r+"'].definition; var "+M+" = "+_+".validate;"}else{if(O=e.useCustomRule(w,c,e.schema,e),!O)return;R="validate.schema"+d,M=O.code,k=A.compile,N=A.inline,I=A.macro}var P=M+".errors",V="i"+s,X="ruleErr"+s,Q=A.async;if(Q&&!e.async)throw new Error("async keyword in sync schema");if(N||I||(a+=""+P+" = null;"),a+="var "+x+" = errors;var "+b+";",S&&A.$data&&(C+="}",a+=" if ("+R+" === undefined) { "+b+" = true; } else { ",L&&(C+="}",a+=" "+b+" = "+_+".validateSchema("+R+"); if ("+b+") { ")),N)A.statements?a+=" "+O.validate+" ":a+=" "+b+" = "+O.validate+"; ";else if(I){var oe=e.util.copy(e),C="";oe.level++;var U="valid"+oe.level;oe.schema=O.validate,oe.schemaPath="";var W=e.compositeRule;e.compositeRule=oe.compositeRule=!0;var H=e.validate(oe).replace(/validate\.schema/g,M);e.compositeRule=oe.compositeRule=W,a+=" "+H}else{var te=te||[];te.push(a),a="",a+=" "+M+".call( ",e.opts.passContext?a+="this":a+="self",k||A.schema===!1?a+=" , "+v+" ":a+=" , "+R+" , "+v+" , validate.schema"+e.schemaPath+" ",a+=" , (dataPath || '')",e.errorPath!='""'&&(a+=" + "+e.errorPath);var se=l?"data"+(l-1||""):"parentData",B=l?e.dataPathArr[l]:"parentDataProperty";a+=" , "+se+" , "+B+" , rootData ) ";var q=a;a=te.pop(),A.errors===!1?(a+=" "+b+" = ",Q&&(a+="await "),a+=""+q+"; "):Q?(P="customErrors"+s,a+=" var "+P+" = null; try { "+b+" = await "+q+"; } catch (e) { "+b+" = false; if (e instanceof ValidationError) "+P+" = e.errors; else throw e; } "):a+=" "+P+" = null; "+b+" = "+q+"; "}if(A.modifying&&(a+=" if ("+se+") "+v+" = "+se+"["+B+"];"),a+=""+C,A.valid)m&&(a+=" if (true) { ");else{a+=" if ( ",A.valid===void 0?(a+=" !",I?a+=""+U:a+=""+b):a+=" "+!A.valid+" ",a+=") { ",h=w.keyword;var te=te||[];te.push(a),a="";var te=te||[];te.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+w.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+w.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ";var $=a;a=te.pop(),!e.compositeRule&&m?e.async?a+=" throw new ValidationError(["+$+"]); ":a+=" validate.errors = ["+$+"]; return false; ":a+=" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var K=a;a=te.pop(),N?A.errors?A.errors!="full"&&(a+=" for (var "+V+"="+x+"; "+V+"<errors; "+V+"++) { var "+X+" = vErrors["+V+"]; if ("+X+".dataPath === undefined) "+X+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+X+".schemaPath === undefined) { "+X+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+X+".schema = "+R+"; "+X+".data = "+v+"; "),a+=" } "):A.errors===!1?a+=" "+K+" ":(a+=" if ("+x+" == errors) { "+K+" } else { for (var "+V+"="+x+"; "+V+"<errors; "+V+"++) { var "+X+" = vErrors["+V+"]; if ("+X+".dataPath === undefined) "+X+".dataPath = (dataPath || '') + "+e.errorPath+"; if ("+X+".schemaPath === undefined) { "+X+'.schemaPath = "'+f+'"; } ',e.opts.verbose&&(a+=" "+X+".schema = "+R+"; "+X+".data = "+v+"; "),a+=" } } "):I?(a+=" var err = ",e.createErrors!==!1?(a+=" { keyword: '"+(h||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(f)+" , params: { keyword: '"+w.keyword+"' } ",e.opts.messages!==!1&&(a+=` , message: 'should pass "`+w.keyword+`" keyword validation' `),e.opts.verbose&&(a+=" , schema: validate.schema"+d+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+v+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&m&&(e.async?a+=" throw new ValidationError(vErrors); ":a+=" validate.errors = vErrors; return false; ")):A.errors===!1?a+=" "+K+" ":(a+=" if (Array.isArray("+P+")) { if (vErrors === null) vErrors = "+P+"; else vErrors = vErrors.concat("+P+"); errors = vErrors.length; for (var "+V+"="+x+"; "+V+"<errors; "+V+"++) { var "+X+" = vErrors["+V+"]; if ("+X+".dataPath === undefined) "+X+".dataPath = (dataPath || '') + "+e.errorPath+"; "+X+'.schemaPath = "'+f+'"; ',e.opts.verbose&&(a+=" "+X+".schema = "+R+"; "+X+".data = "+v+"; "),a+=" } } else { "+K+" } "),a+=" } ",m&&(a+=" else { ")}return a}),Eb}const w8="http://json-schema.org/draft-07/schema#",x8="http://json-schema.org/draft-07/schema#",_8="Core schema meta-schema",T8={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},R8=["object","boolean"],A8={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},L$={$schema:w8,$id:x8,title:_8,definitions:T8,type:R8,properties:A8,default:!0};var Sb,$I;function C8(){if($I)return Sb;$I=1;var t=L$;return Sb={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:t.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:t.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Sb}var wb,BI;function N8(){if(BI)return wb;BI=1;var t=/^[a-z_$][a-z0-9_$-]*$/i,e=S8(),r=C8();wb={add:n,get:a,remove:s,validate:l};function n(c,d){var f=this.RULES;if(f.keywords[c])throw new Error("Keyword "+c+" is already defined");if(!t.test(c))throw new Error("Keyword "+c+" is not a valid identifier");if(d){this.validateKeyword(d,!0);var m=d.type;if(Array.isArray(m))for(var h=0;h<m.length;h++)b(c,m[h],d);else b(c,m,d);var v=d.metaSchema;v&&(d.$data&&this._opts.$data&&(v={anyOf:[v,{$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"}]}),d.validateSchema=this.compile(v,!0))}f.keywords[c]=f.all[c]=!0;function b(x,S,R){for(var w,_=0;_<f.length;_++){var A=f[_];if(A.type==S){w=A;break}}w||(w={type:S,rules:[]},f.push(w));var C={keyword:x,definition:R,custom:!0,code:e,implements:R.implements};w.rules.push(C),f.custom[x]=C}return this}function a(c){var d=this.RULES.custom[c];return d?d.definition:this.RULES.keywords[c]||!1}function s(c){var d=this.RULES;delete d.keywords[c],delete d.all[c],delete d.custom[c];for(var f=0;f<d.length;f++)for(var m=d[f].rules,h=0;h<m.length;h++)if(m[h].keyword==c){m.splice(h,1);break}return this}function l(c,d){l.errors=null;var f=this._validateKeyword=this._validateKeyword||this.compile(r,!0);if(f(c))return!0;if(l.errors=f.errors,d)throw new Error("custom keyword definition is invalid: "+this.errorsText(f.errors));return!1}return wb}const k8="http://json-schema.org/draft-07/schema#",I8="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",O8="Meta-schema for $data reference (JSON Schema extension proposal)",D8="object",L8=["$data"],M8={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},P8=!1,j8={$schema:k8,$id:I8,description:O8,type:D8,required:L8,properties:M8,additionalProperties:P8};var xb,qI;function U8(){if(qI)return xb;qI=1;var t=K6(),e=JT(),r=Z6(),n=I$(),a=O$(),s=X6(),l=b8(),c=y8(),d=pc();xb=x,x.prototype.validate=S,x.prototype.compile=R,x.prototype.addSchema=w,x.prototype.addMetaSchema=_,x.prototype.validateSchema=A,x.prototype.getSchema=k,x.prototype.removeSchema=O,x.prototype.addFormat=W,x.prototype.errorsText=U,x.prototype._addSchema=L,x.prototype._compile=P,x.prototype.compileAsync=E8();var f=N8();x.prototype.addKeyword=f.add,x.prototype.getKeyword=f.get,x.prototype.removeKeyword=f.remove,x.prototype.validateKeyword=f.validate;var m=eR();x.ValidationError=m.Validation,x.MissingRefError=m.MissingRef,x.$dataMetaSchema=c;var h="http://json-schema.org/draft-07/schema",v=["removeAdditional","useDefaults","coerceTypes","strictDefaults"],b=["/properties"];function x(z){if(!(this instanceof x))return new x(z);z=this._opts=d.copy(z)||{},K(this),this._schemas={},this._refs={},this._fragments={},this._formats=s(z.format),this._cache=z.cache||new r,this._loadingSchemas={},this._compilations=[],this.RULES=l(),this._getId=V(z),z.loopRequired=z.loopRequired||1/0,z.errorDataPath=="property"&&(z._errorDataPathProperty=!0),z.serialize===void 0&&(z.serialize=a),this._metaOpts=$(this),z.formats&&se(this),z.keywords&&B(this),H(this),typeof z.meta=="object"&&this.addMetaSchema(z.meta),z.nullable&&this.addKeyword("nullable",{metaSchema:{type:"boolean"}}),te(this)}function S(z,j){var Z;if(typeof z=="string"){if(Z=this.getSchema(z),!Z)throw new Error('no schema with key or ref "'+z+'"')}else{var ne=this._addSchema(z);Z=ne.validate||this._compile(ne)}var G=Z(j);return Z.$async!==!0&&(this.errors=Z.errors),G}function R(z,j){var Z=this._addSchema(z,void 0,j);return Z.validate||this._compile(Z)}function w(z,j,Z,ne){if(Array.isArray(z)){for(var G=0;G<z.length;G++)this.addSchema(z[G],void 0,Z,ne);return this}var ce=this._getId(z);if(ce!==void 0&&typeof ce!="string")throw new Error("schema id must be string");return j=e.normalizeId(j||ce),q(this,j),this._schemas[j]=this._addSchema(z,Z,ne,!0),this}function _(z,j,Z){return this.addSchema(z,j,Z,!0),this}function A(z,j){var Z=z.$schema;if(Z!==void 0&&typeof Z!="string")throw new Error("$schema must be a string");if(Z=Z||this._opts.defaultMeta||C(this),!Z)return this.logger.warn("meta-schema not available"),this.errors=null,!0;var ne=this.validate(Z,z);if(!ne&&j){var G="schema is invalid: "+this.errorsText();if(this._opts.validateSchema=="log")this.logger.error(G);else throw new Error(G)}return ne}function C(z){var j=z._opts.meta;return z._opts.defaultMeta=typeof j=="object"?z._getId(j)||j:z.getSchema(h)?h:void 0,z._opts.defaultMeta}function k(z){var j=I(this,z);switch(typeof j){case"object":return j.validate||this._compile(j);case"string":return this.getSchema(j);case"undefined":return N(this,z)}}function N(z,j){var Z=e.schema.call(z,{schema:{}},j);if(Z){var ne=Z.schema,G=Z.root,ce=Z.baseId,he=t.call(z,ne,G,void 0,ce);return z._fragments[j]=new n({ref:j,fragment:!0,schema:ne,root:G,baseId:ce,validate:he}),he}}function I(z,j){return j=e.normalizeId(j),z._schemas[j]||z._refs[j]||z._fragments[j]}function O(z){if(z instanceof RegExp)return M(this,this._schemas,z),M(this,this._refs,z),this;switch(typeof z){case"undefined":return M(this,this._schemas),M(this,this._refs),this._cache.clear(),this;case"string":var j=I(this,z);return j&&this._cache.del(j.cacheKey),delete this._schemas[z],delete this._refs[z],this;case"object":var Z=this._opts.serialize,ne=Z?Z(z):z;this._cache.del(ne);var G=this._getId(z);G&&(G=e.normalizeId(G),delete this._schemas[G],delete this._refs[G])}return this}function M(z,j,Z){for(var ne in j){var G=j[ne];!G.meta&&(!Z||Z.test(ne))&&(z._cache.del(G.cacheKey),delete j[ne])}}function L(z,j,Z,ne){if(typeof z!="object"&&typeof z!="boolean")throw new Error("schema should be object or boolean");var G=this._opts.serialize,ce=G?G(z):z,he=this._cache.get(ce);if(he)return he;ne=ne||this._opts.addUsedSchema!==!1;var _e=e.normalizeId(this._getId(z));_e&&ne&&q(this,_e);var ye=this._opts.validateSchema!==!1&&!j,Se;ye&&!(Se=_e&&_e==e.normalizeId(z.$schema))&&this.validateSchema(z,!0);var Ne=e.ids.call(this,z),ge=new n({id:_e,schema:z,localRefs:Ne,cacheKey:ce,meta:Z});return _e[0]!="#"&&ne&&(this._refs[_e]=ge),this._cache.put(ce,ge),ye&&Se&&this.validateSchema(z,!0),ge}function P(z,j){if(z.compiling)return z.validate=G,G.schema=z.schema,G.errors=null,G.root=j||G,z.schema.$async===!0&&(G.$async=!0),G;z.compiling=!0;var Z;z.meta&&(Z=this._opts,this._opts=this._metaOpts);var ne;try{ne=t.call(this,z.schema,j,z.localRefs)}catch(ce){throw delete z.validate,ce}finally{z.compiling=!1,z.meta&&(this._opts=Z)}return z.validate=ne,z.refs=ne.refs,z.refVal=ne.refVal,z.root=ne.root,ne;function G(){var ce=z.validate,he=ce.apply(this,arguments);return G.errors=ce.errors,he}}function V(z){switch(z.schemaId){case"auto":return oe;case"id":return X;default:return Q}}function X(z){return z.$id&&this.logger.warn("schema $id ignored",z.$id),z.id}function Q(z){return z.id&&this.logger.warn("schema id ignored",z.id),z.$id}function oe(z){if(z.$id&&z.id&&z.$id!=z.id)throw new Error("schema $id is different from id");return z.$id||z.id}function U(z,j){if(z=z||this.errors,!z)return"No errors";j=j||{};for(var Z=j.separator===void 0?", ":j.separator,ne=j.dataVar===void 0?"data":j.dataVar,G="",ce=0;ce<z.length;ce++){var he=z[ce];he&&(G+=ne+he.dataPath+" "+he.message+Z)}return G.slice(0,-Z.length)}function W(z,j){return typeof j=="string"&&(j=new RegExp(j)),this._formats[z]=j,this}function H(z){var j;if(z._opts.$data&&(j=j8,z.addMetaSchema(j,j.$id,!0)),z._opts.meta!==!1){var Z=L$;z._opts.$data&&(Z=c(Z,b)),z.addMetaSchema(Z,h,!0),z._refs["http://json-schema.org/schema"]=h}}function te(z){var j=z._opts.schemas;if(j)if(Array.isArray(j))z.addSchema(j);else for(var Z in j)z.addSchema(j[Z],Z)}function se(z){for(var j in z._opts.formats){var Z=z._opts.formats[j];z.addFormat(j,Z)}}function B(z){for(var j in z._opts.keywords){var Z=z._opts.keywords[j];z.addKeyword(j,Z)}}function q(z,j){if(z._schemas[j]||z._refs[j])throw new Error('schema with key or id "'+j+'" already exists')}function $(z){for(var j=d.copy(z._opts),Z=0;Z<v.length;Z++)delete j[v[Z]];return j}function K(z){var j=z._opts.logger;if(j===!1)z.logger={log:J,warn:J,error:J};else{if(j===void 0&&(j=console),!(typeof j=="object"&&j.log&&j.warn&&j.error))throw new Error("logger must implement log, warn and error methods");z.logger=j}}function J(){}return xb}var F8=U8();const z8=fc(F8);class HI extends q6{constructor(e,r){var n;super(r),this._clientInfo=e,this._cachedToolOutputValidators=new Map,this._capabilities=(n=r?.capabilities)!==null&&n!==void 0?n:{},this._ajv=new z8}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=H6(this._capabilities,e)}assertCapability(e,r){var n;if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n[e]))throw new Error(`Server does not support ${e} (required for ${r})`)}async connect(e,r){if(await super.connect(e),e.sessionId===void 0)try{const n=await this.request({method:"initialize",params:{protocolVersion:Om,capabilities:this._capabilities,clientInfo:this._clientInfo}},g$,r);if(n===void 0)throw new Error(`Server sent invalid initialize result: ${n}`);if(!H9.includes(n.protocolVersion))throw new Error(`Server's protocol version is not supported: ${n.protocolVersion}`);this._serverCapabilities=n.capabilities,this._serverVersion=n.serverInfo,e.setProtocolVersion&&e.setProtocolVersion(n.protocolVersion),this._instructions=n.instructions,await this.notification({method:"notifications/initialized"})}catch(n){throw this.close(),n}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(e){var r,n,a,s,l;switch(e){case"logging/setLevel":if(!(!((r=this._serverCapabilities)===null||r===void 0)&&r.logging))throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!(!((n=this._serverCapabilities)===null||n===void 0)&&n.prompts))throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!(!((a=this._serverCapabilities)===null||a===void 0)&&a.resources))throw new Error(`Server does not support resources (required for ${e})`);if(e==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${e})`);break;case"tools/call":case"tools/list":if(!(!((s=this._serverCapabilities)===null||s===void 0)&&s.tools))throw new Error(`Server does not support tools (required for ${e})`);break;case"completion/complete":if(!(!((l=this._serverCapabilities)===null||l===void 0)&&l.completions))throw new Error(`Server does not support completions (required for ${e})`);break}}assertNotificationCapability(e){var r;switch(e){case"notifications/roots/list_changed":if(!(!((r=this._capabilities.roots)===null||r===void 0)&&r.listChanged))throw new Error(`Client does not support roots list changed notifications (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${e})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${e})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${e})`);break}}async ping(e){return this.request({method:"ping"},Cl,e)}async complete(e,r){return this.request({method:"completion/complete",params:e},k$,r)}async setLoggingLevel(e,r){return this.request({method:"logging/setLevel",params:{level:e}},Cl,r)}async getPrompt(e,r){return this.request({method:"prompts/get",params:e},A$,r)}async listPrompts(e,r){return this.request({method:"prompts/list",params:e},T$,r)}async listResources(e,r){return this.request({method:"resources/list",params:e},w$,r)}async listResourceTemplates(e,r){return this.request({method:"resources/templates/list",params:e},x$,r)}async readResource(e,r){return this.request({method:"resources/read",params:e},_$,r)}async subscribeResource(e,r){return this.request({method:"resources/subscribe",params:e},Cl,r)}async unsubscribeResource(e,r){return this.request({method:"resources/unsubscribe",params:e},Cl,r)}async callTool(e,r=XT,n){const a=await this.request({method:"tools/call",params:e},r,n),s=this.getToolOutputValidator(e.name);if(s){if(!a.structuredContent&&!a.isError)throw new So(Oa.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(a.structuredContent)try{if(!s(a.structuredContent))throw new So(Oa.InvalidParams,`Structured content does not match the tool's output schema: ${this._ajv.errorsText(s.errors)}`)}catch(l){throw l instanceof So?l:new So(Oa.InvalidParams,`Failed to validate structured content: ${l instanceof Error?l.message:String(l)}`)}}return a}cacheToolOutputSchemas(e){this._cachedToolOutputValidators.clear();for(const r of e)if(r.outputSchema)try{const n=this._ajv.compile(r.outputSchema);this._cachedToolOutputValidators.set(r.name,n)}catch{}}getToolOutputValidator(e){return this._cachedToolOutputValidators.get(e)}async listTools(e,r){const n=await this.request({method:"tools/list",params:e},C$,r);return this.cacheToolOutputSchemas(n.tools),n}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}let tR;tR=globalThis.crypto;async function $8(t){return(await tR).getRandomValues(new Uint8Array(t))}async function B8(t){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";let r="";const n=await $8(t);for(let a=0;a<t;a++){const s=n[a]%e.length;r+=e[s]}return r}async function q8(t){return await B8(t)}async function H8(t){const e=await(await tR).subtle.digest("SHA-256",new TextEncoder().encode(t));return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function V8(t){if(t||(t=43),t<43||t>128)throw`Expected a length between 43 and 128. Received ${t}.`;const e=await q8(t),r=await H8(e);return{code_verifier:e,code_challenge:r}}const Pr=me().url().superRefine((t,e)=>{if(!URL.canParse(t))return e.addIssue({code:Ce.custom,message:"URL must be parseable",fatal:!0}),q9}).refine(t=>{const e=new URL(t);return e.protocol!=="javascript:"&&e.protocol!=="data:"&&e.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),G8=De({resource:me().url(),authorization_servers:Ve(Pr).optional(),jwks_uri:me().url().optional(),scopes_supported:Ve(me()).optional(),bearer_methods_supported:Ve(me()).optional(),resource_signing_alg_values_supported:Ve(me()).optional(),resource_name:me().optional(),resource_documentation:me().optional(),resource_policy_uri:me().url().optional(),resource_tos_uri:me().url().optional(),tls_client_certificate_bound_access_tokens:Dr().optional(),authorization_details_types_supported:Ve(me()).optional(),dpop_signing_alg_values_supported:Ve(me()).optional(),dpop_bound_access_tokens_required:Dr().optional()}).passthrough(),M$=De({issuer:me(),authorization_endpoint:Pr,token_endpoint:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ve(me()).optional(),response_types_supported:Ve(me()),response_modes_supported:Ve(me()).optional(),grant_types_supported:Ve(me()).optional(),token_endpoint_auth_methods_supported:Ve(me()).optional(),token_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),service_documentation:Pr.optional(),revocation_endpoint:Pr.optional(),revocation_endpoint_auth_methods_supported:Ve(me()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),introspection_endpoint:me().optional(),introspection_endpoint_auth_methods_supported:Ve(me()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),code_challenge_methods_supported:Ve(me()).optional()}).passthrough(),W8=De({issuer:me(),authorization_endpoint:Pr,token_endpoint:Pr,userinfo_endpoint:Pr.optional(),jwks_uri:Pr,registration_endpoint:Pr.optional(),scopes_supported:Ve(me()).optional(),response_types_supported:Ve(me()),response_modes_supported:Ve(me()).optional(),grant_types_supported:Ve(me()).optional(),acr_values_supported:Ve(me()).optional(),subject_types_supported:Ve(me()),id_token_signing_alg_values_supported:Ve(me()),id_token_encryption_alg_values_supported:Ve(me()).optional(),id_token_encryption_enc_values_supported:Ve(me()).optional(),userinfo_signing_alg_values_supported:Ve(me()).optional(),userinfo_encryption_alg_values_supported:Ve(me()).optional(),userinfo_encryption_enc_values_supported:Ve(me()).optional(),request_object_signing_alg_values_supported:Ve(me()).optional(),request_object_encryption_alg_values_supported:Ve(me()).optional(),request_object_encryption_enc_values_supported:Ve(me()).optional(),token_endpoint_auth_methods_supported:Ve(me()).optional(),token_endpoint_auth_signing_alg_values_supported:Ve(me()).optional(),display_values_supported:Ve(me()).optional(),claim_types_supported:Ve(me()).optional(),claims_supported:Ve(me()).optional(),service_documentation:me().optional(),claims_locales_supported:Ve(me()).optional(),ui_locales_supported:Ve(me()).optional(),claims_parameter_supported:Dr().optional(),request_parameter_supported:Dr().optional(),request_uri_parameter_supported:Dr().optional(),require_request_uri_registration:Dr().optional(),op_policy_uri:Pr.optional(),op_tos_uri:Pr.optional()}).passthrough(),Y8=W8.merge(M$.pick({code_challenge_methods_supported:!0})),P$=De({access_token:me(),id_token:me().optional(),token_type:me(),expires_in:Ur().optional(),scope:me().optional(),refresh_token:me().optional()}).strip(),K8=De({error:me(),error_description:me().optional(),error_uri:me().optional()}),Z8=De({redirect_uris:Ve(Pr),token_endpoint_auth_method:me().optional(),grant_types:Ve(me()).optional(),response_types:Ve(me()).optional(),client_name:me().optional(),client_uri:Pr.optional(),logo_uri:Pr.optional(),scope:me().optional(),contacts:Ve(me()).optional(),tos_uri:Pr.optional(),policy_uri:me().optional(),jwks_uri:Pr.optional(),jwks:$9().optional(),software_id:me().optional(),software_version:me().optional(),software_statement:me().optional()}).strip(),X8=De({client_id:me(),client_secret:me().optional(),client_id_issued_at:Ur().optional(),client_secret_expires_at:Ur().optional()}).strip(),Q8=Z8.merge(X8);De({error:me(),error_description:me().optional()}).strip();De({token:me(),token_type_hint:me().optional()}).strip();function J8(t){const e=typeof t=="string"?new URL(t):new URL(t.href);return e.hash="",e}function eW({requestedResource:t,configuredResource:e}){const r=typeof t=="string"?new URL(t):new URL(t.href),n=typeof e=="string"?new URL(e):new URL(e.href);if(r.origin!==n.origin||r.pathname.length<n.pathname.length)return!1;const a=r.pathname.endsWith("/")?r.pathname:r.pathname+"/",s=n.pathname.endsWith("/")?n.pathname:n.pathname+"/";return a.startsWith(s)}class Kr extends Error{constructor(e,r){super(e),this.errorUri=r,this.name=this.constructor.name}toResponseObject(){const e={error:this.errorCode,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}get errorCode(){return this.constructor.errorCode}}class y_ extends Kr{}y_.errorCode="invalid_request";class lm extends Kr{}lm.errorCode="invalid_client";class cm extends Kr{}cm.errorCode="invalid_grant";class um extends Kr{}um.errorCode="unauthorized_client";class E_ extends Kr{}E_.errorCode="unsupported_grant_type";class S_ extends Kr{}S_.errorCode="invalid_scope";class w_ extends Kr{}w_.errorCode="access_denied";class nc extends Kr{}nc.errorCode="server_error";class x_ extends Kr{}x_.errorCode="temporarily_unavailable";class __ extends Kr{}__.errorCode="unsupported_response_type";class T_ extends Kr{}T_.errorCode="unsupported_token_type";class R_ extends Kr{}R_.errorCode="invalid_token";class A_ extends Kr{}A_.errorCode="method_not_allowed";class C_ extends Kr{}C_.errorCode="too_many_requests";class N_ extends Kr{}N_.errorCode="invalid_client_metadata";class k_ extends Kr{}k_.errorCode="insufficient_scope";const tW={[y_.errorCode]:y_,[lm.errorCode]:lm,[cm.errorCode]:cm,[um.errorCode]:um,[E_.errorCode]:E_,[S_.errorCode]:S_,[w_.errorCode]:w_,[nc.errorCode]:nc,[x_.errorCode]:x_,[__.errorCode]:__,[T_.errorCode]:T_,[R_.errorCode]:R_,[A_.errorCode]:A_,[C_.errorCode]:C_,[N_.errorCode]:N_,[k_.errorCode]:k_};class Da extends Error{constructor(e){super(e??"Unauthorized")}}const _b="code",Tb="S256";function j$(t,e){const r=t.client_secret!==void 0;return e.length===0?r?"client_secret_post":"none":r&&e.includes("client_secret_basic")?"client_secret_basic":r&&e.includes("client_secret_post")?"client_secret_post":e.includes("none")?"none":r?"client_secret_post":"none"}function U$(t,e,r,n){const{client_id:a,client_secret:s}=e;switch(t){case"client_secret_basic":rW(a,s,r);return;case"client_secret_post":nW(a,s,n);return;case"none":aW(a,n);return;default:throw new Error(`Unsupported client authentication method: ${t}`)}}function rW(t,e,r){if(!e)throw new Error("client_secret_basic authentication requires a client_secret");const n=btoa(`${t}:${e}`);r.set("Authorization",`Basic ${n}`)}function nW(t,e,r){r.set("client_id",t),e&&r.set("client_secret",e)}function aW(t,e){e.set("client_id",t)}async function rR(t){const e=t instanceof Response?t.status:void 0,r=t instanceof Response?await t.text():t;try{const n=K8.parse(JSON.parse(r)),{error:a,error_description:s,error_uri:l}=n,c=tW[a]||nc;return new c(s||"",l)}catch(n){const a=`${e?`HTTP ${e}: `:""}Invalid OAuth error response: ${n}. Raw body: ${r}`;return new nc(a)}}async function ps(t,e){var r,n;try{return await Rb(t,e)}catch(a){if(a instanceof lm||a instanceof um)return await((r=t.invalidateCredentials)===null||r===void 0?void 0:r.call(t,"all")),await Rb(t,e);if(a instanceof cm)return await((n=t.invalidateCredentials)===null||n===void 0?void 0:n.call(t,"tokens")),await Rb(t,e);throw a}}async function Rb(t,{serverUrl:e,authorizationCode:r,scope:n,resourceMetadataUrl:a,fetchFn:s}){let l,c;try{l=await oW(e,{resourceMetadataUrl:a},s),l.authorization_servers&&l.authorization_servers.length>0&&(c=l.authorization_servers[0])}catch{}c||(c=e);const d=await iW(e,t,l),f=await dW(c,{fetchFn:s});let m=await Promise.resolve(t.clientInformation());if(!m){if(r!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");if(!t.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const S=await hW(c,{metadata:f,clientMetadata:t.clientMetadata,fetchFn:s});await t.saveClientInformation(S),m=S}if(r!==void 0){const S=await t.codeVerifier(),R=await pW(c,{metadata:f,clientInformation:m,authorizationCode:r,codeVerifier:S,redirectUri:t.redirectUrl,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(R),"AUTHORIZED"}const h=await t.tokens();if(h?.refresh_token)try{const S=await mW(c,{metadata:f,clientInformation:m,refreshToken:h.refresh_token,resource:d,addClientAuthentication:t.addClientAuthentication,fetchFn:s});return await t.saveTokens(S),"AUTHORIZED"}catch(S){if(!(!(S instanceof Kr)||S instanceof nc))throw S}const v=t.state?await t.state():void 0,{authorizationUrl:b,codeVerifier:x}=await fW(c,{metadata:f,clientInformation:m,state:v,redirectUrl:t.redirectUrl,scope:n||t.clientMetadata.scope,resource:d});return await t.saveCodeVerifier(x),await t.redirectToAuthorization(b),"REDIRECT"}async function iW(t,e,r){const n=J8(t);if(e.validateResourceURL)return await e.validateResourceURL(n,r?.resource);if(r){if(!eW({requestedResource:n,configuredResource:r.resource}))throw new Error(`Protected resource ${r.resource} does not match expected ${n} (or origin)`);return new URL(r.resource)}}function I_(t){const e=t.headers.get("WWW-Authenticate");if(!e)return;const[r,n]=e.split(" ");if(r.toLowerCase()!=="bearer"||!n)return;const s=/resource_metadata="([^"]*)"/.exec(e);if(s)try{return new URL(s[1])}catch{return}}async function oW(t,e,r=fetch){const n=await cW(t,"oauth-protected-resource",r,{protocolVersion:e?.protocolVersion,metadataUrl:e?.resourceMetadataUrl});if(!n||n.status===404)throw new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!n.ok)throw new Error(`HTTP ${n.status} trying to load well-known OAuth protected resource metadata.`);return G8.parse(await n.json())}async function nR(t,e,r=fetch){try{return await r(t,{headers:e})}catch(n){if(n instanceof TypeError)return e?nR(t,void 0,r):void 0;throw n}}function sW(t,e="",r={}){return e.endsWith("/")&&(e=e.slice(0,-1)),r.prependPathname?`${e}/.well-known/${t}`:`/.well-known/${t}${e}`}async function VI(t,e,r=fetch){return await nR(t,{"MCP-Protocol-Version":e},r)}function lW(t,e){return!t||t.status>=400&&t.status<500&&e!=="/"}async function cW(t,e,r,n){var a,s;const l=new URL(t),c=(a=n?.protocolVersion)!==null&&a!==void 0?a:Om;let d;if(n?.metadataUrl)d=new URL(n.metadataUrl);else{const m=sW(e,l.pathname);d=new URL(m,(s=n?.metadataServerUrl)!==null&&s!==void 0?s:l),d.search=l.search}let f=await VI(d,c,r);if(!n?.metadataUrl&&lW(f,l.pathname)){const m=new URL(`/.well-known/${e}`,l);f=await VI(m,c,r)}return f}function uW(t){const e=typeof t=="string"?new URL(t):t,r=e.pathname!=="/",n=[];if(!r)return n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/openid-configuration",e.origin),type:"oidc"}),n;let a=e.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),n.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,e.origin),type:"oauth"}),n.push({url:new URL("/.well-known/oauth-authorization-server",e.origin),type:"oauth"}),n.push({url:new URL(`/.well-known/openid-configuration${a}`,e.origin),type:"oidc"}),n.push({url:new URL(`${a}/.well-known/openid-configuration`,e.origin),type:"oidc"}),n}async function dW(t,{fetchFn:e=fetch,protocolVersion:r=Om}={}){const n={"MCP-Protocol-Version":r},a=uW(t);for(const{url:s,type:l}of a){const c=await nR(s,n,e);if(c){if(!c.ok){if(c.status>=400&&c.status<500)continue;throw new Error(`HTTP ${c.status} trying to load ${l==="oauth"?"OAuth":"OpenID provider"} metadata from ${s}`)}return l==="oauth"?M$.parse(await c.json()):Y8.parse(await c.json())}}}async function fW(t,{metadata:e,clientInformation:r,redirectUrl:n,scope:a,state:s,resource:l}){let c;if(e){if(c=new URL(e.authorization_endpoint),!e.response_types_supported.includes(_b))throw new Error(`Incompatible auth server: does not support response type ${_b}`);if(e.code_challenge_methods_supported&&!e.code_challenge_methods_supported.includes(Tb))throw new Error(`Incompatible auth server: does not support code challenge method ${Tb}`)}else c=new URL("/authorize",t);const d=await V8(),f=d.code_verifier,m=d.code_challenge;return c.searchParams.set("response_type",_b),c.searchParams.set("client_id",r.client_id),c.searchParams.set("code_challenge",m),c.searchParams.set("code_challenge_method",Tb),c.searchParams.set("redirect_uri",String(n)),s&&c.searchParams.set("state",s),a&&c.searchParams.set("scope",a),a?.includes("offline_access")&&c.searchParams.append("prompt","consent"),l&&c.searchParams.set("resource",l.href),{authorizationUrl:c,codeVerifier:f}}async function pW(t,{metadata:e,clientInformation:r,authorizationCode:n,codeVerifier:a,redirectUri:s,resource:l,addClientAuthentication:c,fetchFn:d}){var f;const m="authorization_code",h=e?.token_endpoint?new URL(e.token_endpoint):new URL("/token",t);if(e?.grant_types_supported&&!e.grant_types_supported.includes(m))throw new Error(`Incompatible auth server: does not support grant type ${m}`);const v=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"}),b=new URLSearchParams({grant_type:m,code:n,code_verifier:a,redirect_uri:String(s)});if(c)c(v,b,t,e);else{const S=(f=e?.token_endpoint_auth_methods_supported)!==null&&f!==void 0?f:[],R=j$(r,S);U$(R,r,v,b)}l&&b.set("resource",l.href);const x=await(d??fetch)(h,{method:"POST",headers:v,body:b});if(!x.ok)throw await rR(x);return P$.parse(await x.json())}async function mW(t,{metadata:e,clientInformation:r,refreshToken:n,resource:a,addClientAuthentication:s,fetchFn:l}){var c;const d="refresh_token";let f;if(e){if(f=new URL(e.token_endpoint),e.grant_types_supported&&!e.grant_types_supported.includes(d))throw new Error(`Incompatible auth server: does not support grant type ${d}`)}else f=new URL("/token",t);const m=new Headers({"Content-Type":"application/x-www-form-urlencoded"}),h=new URLSearchParams({grant_type:d,refresh_token:n});if(s)s(m,h,t,e);else{const b=(c=e?.token_endpoint_auth_methods_supported)!==null&&c!==void 0?c:[],x=j$(r,b);U$(x,r,m,h)}a&&h.set("resource",a.href);const v=await(l??fetch)(f,{method:"POST",headers:m,body:h});if(!v.ok)throw await rR(v);return P$.parse({refresh_token:n,...await v.json()})}async function hW(t,{metadata:e,clientMetadata:r,fetchFn:n}){let a;if(e){if(!e.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(e.registration_endpoint)}else a=new URL("/register",t);const s=await(n??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!s.ok)throw await rR(s);return Q8.parse(await s.json())}class GI extends Error{constructor(e,r){super(e),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}function Ab(t){}function F$(t){if(typeof t=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:e=Ab,onError:r=Ab,onRetry:n=Ab,onComment:a}=t;let s="",l=!0,c,d="",f="";function m(S){const R=l?S.replace(/^\xEF\xBB\xBF/,""):S,[w,_]=gW(`${s}${R}`);for(const A of w)h(A);s=_,l=!1}function h(S){if(S===""){b();return}if(S.startsWith(":")){a&&a(S.slice(S.startsWith(": ")?2:1));return}const R=S.indexOf(":");if(R!==-1){const w=S.slice(0,R),_=S[R+1]===" "?2:1,A=S.slice(R+_);v(w,A,S);return}v(S,"",S)}function v(S,R,w){switch(S){case"event":f=R;break;case"data":d=`${d}${R}
|
|
3
3
|
`;break;case"id":c=R.includes("\0")?void 0:R;break;case"retry":/^\d+$/.test(R)?n(parseInt(R,10)):r(new GI(`Invalid \`retry\` value: "${R}"`,{type:"invalid-retry",value:R,line:w}));break;default:r(new GI(`Unknown field "${S.length>20?`${S.slice(0,20)}…`:S}"`,{type:"unknown-field",field:S,value:R,line:w}));break}}function b(){d.length>0&&e({id:c,event:f||void 0,data:d.endsWith(`
|
|
4
4
|
`)?d.slice(0,-1):d}),c=void 0,d="",f=""}function x(S={}){s&&S.consume&&h(s),l=!0,c=void 0,d="",f="",s=""}return{feed:m,reset:x}}function gW(t){const e=[];let r="",n=0;for(;n<t.length;){const a=t.indexOf("\r",n),s=t.indexOf(`
|
|
5
5
|
`,n);let l=-1;if(a!==-1&&s!==-1?l=Math.min(a,s):a!==-1?a===t.length-1?l=-1:l=a:s!==-1&&(l=s),l===-1){r=t.slice(n);break}else{const c=t.slice(n,l);e.push(c),n=l+1,t[n-1]==="\r"&&t[n]===`
|
|
@@ -22,7 +22,7 @@ Error generating stack: `+p.message+`
|
|
|
22
22
|
`+p.stack}}var Oe=Object.prototype.hasOwnProperty,Xe=t.unstable_scheduleCallback,ot=t.unstable_cancelCallback,$e=t.unstable_shouldYield,We=t.unstable_requestPaint,Ae=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Je=t.unstable_ImmediatePriority,ft=t.unstable_UserBlockingPriority,rt=t.unstable_NormalPriority,Rt=t.unstable_LowPriority,Ot=t.unstable_IdlePriority,An=t.log,gr=t.unstable_setDisableYieldValue,ir=null,Mt=null;function Zt(i){if(typeof An=="function"&&gr(i),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(ir,i)}catch{}}var dr=Math.clz32?Math.clz32:or,Sr=Math.log,zn=Math.LN2;function or(i){return i>>>=0,i===0?32:31-(Sr(i)/zn|0)|0}var Gt=256,pn=262144,ua=4194304;function an(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Ke(i,o,u){var p=i.pendingLanes;if(p===0)return 0;var E=0,T=i.suspendedLanes,D=i.pingedLanes;i=i.warmLanes;var F=p&134217727;return F!==0?(p=F&~T,p!==0?E=an(p):(D&=F,D!==0?E=an(D):u||(u=F&~i,u!==0&&(E=an(u))))):(F=p&~T,F!==0?E=an(F):D!==0?E=an(D):u||(u=p&~i,u!==0&&(E=an(u)))),E===0?0:o!==0&&o!==E&&(o&T)===0&&(T=E&-E,u=o&-o,T>=u||T===32&&(u&4194048)!==0)?o:E}function jt(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Qt(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Lr(){var i=ua;return ua<<=1,(ua&62914560)===0&&(ua=4194304),i}function $n(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function Xt(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Zr(i,o,u,p,E,T){var D=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var F=i.entanglements,ee=i.expirationTimes,de=i.hiddenUpdates;for(u=D&~u;0<u;){var Ee=31-dr(u),xe=1<<Ee;F[Ee]=0,ee[Ee]=-1;var fe=de[Ee];if(fe!==null)for(de[Ee]=null,Ee=0;Ee<fe.length;Ee++){var be=fe[Ee];be!==null&&(be.lane&=-536870913)}u&=~xe}p!==0&&_a(i,p,0),T!==0&&E===0&&i.tag!==0&&(i.suspendedLanes|=T&~(D&~o))}function _a(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-dr(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function Xr(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-dr(u),E=1<<p;E&o|i[p]&o&&(i[p]|=o),u&=~E}}function Fr(i,o){var u=o&-o;return u=(u&42)!==0?1:re(u),(u&(i.suspendedLanes|o))!==0?0:u}function re(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Y(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ae(){var i=W.p;return i!==0?i:(i=window.event,i===void 0?32:kk(i.type))}function ve(i,o){var u=W.p;try{return W.p=i,o()}finally{W.p=u}}var pe=Math.random().toString(36).slice(2),Pe="__reactFiber$"+pe,Ue="__reactProps$"+pe,pt="__reactContainer$"+pe,Ut="__reactEvents$"+pe,sr="__reactListeners$"+pe,bt="__reactHandles$"+pe,Ft="__reactResources$"+pe,Wt="__reactMarker$"+pe;function nt(i){delete i[Pe],delete i[Ue],delete i[Ut],delete i[sr],delete i[bt]}function Dt(i){var o=i[Pe];if(o)return o;for(var u=i.parentNode;u;){if(o=u[pt]||u[Pe]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=mk(i);i!==null;){if(u=i[Pe])return u;i=mk(i)}return o}i=u,u=i.parentNode}return null}function Yt(i){if(i=i[Pe]||i[pt]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function Pt(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(n(33))}function on(i){var o=i[Ft];return o||(o=i[Ft]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function zt(i){i[Wt]=!0}var Cn=new Set,Qa={};function sn(i,o){Cr(i,o),Cr(i+"Capture",o)}function Cr(i,o){for(Qa[i]=o,i=0;i<o.length;i++)Cn.add(o[i])}var Bn=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]*$"),Ta={},qn={};function Mo(i){return Oe.call(qn,i)?!0:Oe.call(Ta,i)?!1:Bn.test(i)?qn[i]=!0:(Ta[i]=!0,!1)}function Po(i,o,u){if(Mo(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var p=o.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function jo(i,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+u)}}function mn(i,o,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+p)}}function zr(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Uo(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Hd(i,o,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var E=p.get,T=p.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(D){u=""+D,T.call(this,D)}}),Object.defineProperty(i,o,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(D){u=""+D},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Os(i){if(!i._valueTracker){var o=Uo(i)?"checked":"value";i._valueTracker=Hd(i,o,""+i[o])}}function Fi(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),p="";return i&&(p=Uo(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function Vd(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var rV=/[\n"\\]/g;function Hn(i){return i.replace(rV,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Ah(i,o,u,p,E,T,D,F){i.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?i.type=D:i.removeAttribute("type"),o!=null?D==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+zr(o)):i.value!==""+zr(o)&&(i.value=""+zr(o)):D!=="submit"&&D!=="reset"||i.removeAttribute("value"),o!=null?Ch(i,D,zr(o)):u!=null?Ch(i,D,zr(u)):p!=null&&i.removeAttribute("value"),E==null&&T!=null&&(i.defaultChecked=!!T),E!=null&&(i.checked=E&&typeof E!="function"&&typeof E!="symbol"),F!=null&&typeof F!="function"&&typeof F!="symbol"&&typeof F!="boolean"?i.name=""+zr(F):i.removeAttribute("name")}function eC(i,o,u,p,E,T,D,F){if(T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(i.type=T),o!=null||u!=null){if(!(T!=="submit"&&T!=="reset"||o!=null)){Os(i);return}u=u!=null?""+zr(u):"",o=o!=null?""+zr(o):u,F||o===i.value||(i.value=o),i.defaultValue=o}p=p??E,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=F?i.checked:!!p,i.defaultChecked=!!p,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(i.name=D),Os(i)}function Ch(i,o,u){o==="number"&&Vd(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function Ds(i,o,u,p){if(i=i.options,o){o={};for(var E=0;E<u.length;E++)o["$"+u[E]]=!0;for(u=0;u<i.length;u++)E=o.hasOwnProperty("$"+i[u].value),i[u].selected!==E&&(i[u].selected=E),E&&p&&(i[u].defaultSelected=!0)}else{for(u=""+zr(u),o=null,E=0;E<i.length;E++){if(i[E].value===u){i[E].selected=!0,p&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function tC(i,o,u){if(o!=null&&(o=""+zr(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+zr(u):""}function rC(i,o,u,p){if(o==null){if(p!=null){if(u!=null)throw Error(n(92));if(oe(p)){if(1<p.length)throw Error(n(93));p=p[0]}u=p}u==null&&(u=""),o=u}u=zr(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),Os(i)}function Ls(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var nV=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 nC(i,o,u){var p=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":p?i.setProperty(o,u):typeof u!="number"||u===0||nV.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function aC(i,o,u){if(o!=null&&typeof o!="object")throw Error(n(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||o!=null&&o.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var E in o)p=o[E],o.hasOwnProperty(E)&&u[E]!==p&&nC(i,E,p)}else for(var T in o)o.hasOwnProperty(T)&&nC(i,T,o[T])}function Nh(i){if(i.indexOf("-")===-1)return!1;switch(i){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 aV=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"]]),iV=/^[\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 Gd(i){return iV.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ja(){}var kh=null;function Ih(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ms=null,Ps=null;function iC(i){var o=Yt(i);if(o&&(i=o.stateNode)){var u=i[Ue]||null;e:switch(i=o.stateNode,o.type){case"input":if(Ah(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Hn(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var E=p[Ue]||null;if(!E)throw Error(n(90));Ah(p,E.value,E.defaultValue,E.defaultValue,E.checked,E.defaultChecked,E.type,E.name)}}for(o=0;o<u.length;o++)p=u[o],p.form===i.form&&Fi(p)}break e;case"textarea":tC(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&Ds(i,!!u.multiple,o,!1)}}}var Oh=!1;function oC(i,o,u){if(Oh)return i(o,u);Oh=!0;try{var p=i(o);return p}finally{if(Oh=!1,(Ms!==null||Ps!==null)&&(Lf(),Ms&&(o=Ms,i=Ps,Ps=Ms=null,iC(o),i)))for(o=0;o<i.length;o++)iC(i[o])}}function Cc(i,o){var u=i.stateNode;if(u===null)return null;var p=u[Ue]||null;if(p===null)return null;u=p[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var ei=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dh=!1;if(ei)try{var Nc={};Object.defineProperty(Nc,"passive",{get:function(){Dh=!0}}),window.addEventListener("test",Nc,Nc),window.removeEventListener("test",Nc,Nc)}catch{Dh=!1}var zi=null,Lh=null,Wd=null;function sC(){if(Wd)return Wd;var i,o=Lh,u=o.length,p,E="value"in zi?zi.value:zi.textContent,T=E.length;for(i=0;i<u&&o[i]===E[i];i++);var D=u-i;for(p=1;p<=D&&o[u-p]===E[T-p];p++);return Wd=E.slice(i,1<p?1-p:void 0)}function Yd(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function Kd(){return!0}function lC(){return!1}function hn(i){function o(u,p,E,T,D){this._reactName=u,this._targetInst=E,this.type=p,this.nativeEvent=T,this.target=D,this.currentTarget=null;for(var F in i)i.hasOwnProperty(F)&&(u=i[F],this[F]=u?u(T):T[F]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Kd:lC,this.isPropagationStopped=lC,this}return h(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Kd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Kd)},persist:function(){},isPersistent:Kd}),o}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zd=hn(Fo),kc=h({},Fo,{view:0,detail:0}),oV=hn(kc),Mh,Ph,Ic,Xd=h({},kc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uh,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Ic&&(Ic&&i.type==="mousemove"?(Mh=i.screenX-Ic.screenX,Ph=i.screenY-Ic.screenY):Ph=Mh=0,Ic=i),Mh)},movementY:function(i){return"movementY"in i?i.movementY:Ph}}),cC=hn(Xd),sV=h({},Xd,{dataTransfer:0}),lV=hn(sV),cV=h({},kc,{relatedTarget:0}),jh=hn(cV),uV=h({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),dV=hn(uV),fV=h({},Fo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),pV=hn(fV),mV=h({},Fo,{data:0}),uC=hn(mV),hV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gV={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"},vV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bV(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=vV[i])?!!o[i]:!1}function Uh(){return bV}var yV=h({},kc,{key:function(i){if(i.key){var o=hV[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Yd(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?gV[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uh,charCode:function(i){return i.type==="keypress"?Yd(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Yd(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),EV=hn(yV),SV=h({},Xd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dC=hn(SV),wV=h({},kc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uh}),xV=hn(wV),_V=h({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),TV=hn(_V),RV=h({},Xd,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),AV=hn(RV),CV=h({},Fo,{newState:0,oldState:0}),NV=hn(CV),kV=[9,13,27,32],Fh=ei&&"CompositionEvent"in window,Oc=null;ei&&"documentMode"in document&&(Oc=document.documentMode);var IV=ei&&"TextEvent"in window&&!Oc,fC=ei&&(!Fh||Oc&&8<Oc&&11>=Oc),pC=" ",mC=!1;function hC(i,o){switch(i){case"keyup":return kV.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gC(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var js=!1;function OV(i,o){switch(i){case"compositionend":return gC(o);case"keypress":return o.which!==32?null:(mC=!0,pC);case"textInput":return i=o.data,i===pC&&mC?null:i;default:return null}}function DV(i,o){if(js)return i==="compositionend"||!Fh&&hC(i,o)?(i=sC(),Wd=Lh=zi=null,js=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return fC&&o.locale!=="ko"?null:o.data;default:return null}}var LV={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 vC(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!LV[i.type]:o==="textarea"}function bC(i,o,u,p){Ms?Ps?Ps.push(p):Ps=[p]:Ms=p,o=$f(o,"onChange"),0<o.length&&(u=new Zd("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var Dc=null,Lc=null;function MV(i){ek(i,0)}function Qd(i){var o=Pt(i);if(Fi(o))return i}function yC(i,o){if(i==="change")return o}var EC=!1;if(ei){var zh;if(ei){var $h="oninput"in document;if(!$h){var SC=document.createElement("div");SC.setAttribute("oninput","return;"),$h=typeof SC.oninput=="function"}zh=$h}else zh=!1;EC=zh&&(!document.documentMode||9<document.documentMode)}function wC(){Dc&&(Dc.detachEvent("onpropertychange",xC),Lc=Dc=null)}function xC(i){if(i.propertyName==="value"&&Qd(Lc)){var o=[];bC(o,Lc,i,Ih(i)),oC(MV,o)}}function PV(i,o,u){i==="focusin"?(wC(),Dc=o,Lc=u,Dc.attachEvent("onpropertychange",xC)):i==="focusout"&&wC()}function jV(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Qd(Lc)}function UV(i,o){if(i==="click")return Qd(o)}function FV(i,o){if(i==="input"||i==="change")return Qd(o)}function zV(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Nn=typeof Object.is=="function"?Object.is:zV;function Mc(i,o){if(Nn(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),p=Object.keys(o);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var E=u[p];if(!Oe.call(o,E)||!Nn(i[E],o[E]))return!1}return!0}function _C(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function TC(i,o){var u=_C(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=o&&p>=o)return{node:u,offset:o-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=_C(u)}}function RC(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?RC(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function AC(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Vd(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=Vd(i.document)}return o}function Bh(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var $V=ei&&"documentMode"in document&&11>=document.documentMode,Us=null,qh=null,Pc=null,Hh=!1;function CC(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Hh||Us==null||Us!==Vd(p)||(p=Us,"selectionStart"in p&&Bh(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Pc&&Mc(Pc,p)||(Pc=p,p=$f(qh,"onSelect"),0<p.length&&(o=new Zd("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=Us)))}function zo(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var Fs={animationend:zo("Animation","AnimationEnd"),animationiteration:zo("Animation","AnimationIteration"),animationstart:zo("Animation","AnimationStart"),transitionrun:zo("Transition","TransitionRun"),transitionstart:zo("Transition","TransitionStart"),transitioncancel:zo("Transition","TransitionCancel"),transitionend:zo("Transition","TransitionEnd")},Vh={},NC={};ei&&(NC=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);function $o(i){if(Vh[i])return Vh[i];if(!Fs[i])return i;var o=Fs[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in NC)return Vh[i]=o[u];return i}var kC=$o("animationend"),IC=$o("animationiteration"),OC=$o("animationstart"),BV=$o("transitionrun"),qV=$o("transitionstart"),HV=$o("transitioncancel"),DC=$o("transitionend"),LC=new Map,Gh="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(" ");Gh.push("scrollEnd");function da(i,o){LC.set(i,o),sn(o,[i])}var Jd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Vn=[],zs=0,Wh=0;function ef(){for(var i=zs,o=Wh=zs=0;o<i;){var u=Vn[o];Vn[o++]=null;var p=Vn[o];Vn[o++]=null;var E=Vn[o];Vn[o++]=null;var T=Vn[o];if(Vn[o++]=null,p!==null&&E!==null){var D=p.pending;D===null?E.next=E:(E.next=D.next,D.next=E),p.pending=E}T!==0&&MC(u,E,T)}}function tf(i,o,u,p){Vn[zs++]=i,Vn[zs++]=o,Vn[zs++]=u,Vn[zs++]=p,Wh|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Yh(i,o,u,p){return tf(i,o,u,p),rf(i)}function Bo(i,o){return tf(i,null,null,o),rf(i)}function MC(i,o,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var E=!1,T=i.return;T!==null;)T.childLanes|=u,p=T.alternate,p!==null&&(p.childLanes|=u),T.tag===22&&(i=T.stateNode,i===null||i._visibility&1||(E=!0)),i=T,T=T.return;return i.tag===3?(T=i.stateNode,E&&o!==null&&(E=31-dr(u),i=T.hiddenUpdates,p=i[E],p===null?i[E]=[o]:p.push(o),o.lane=u|536870912),T):null}function rf(i){if(50<au)throw au=0,nv=null,Error(n(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var $s={};function VV(i,o,u,p){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kn(i,o,u,p){return new VV(i,o,u,p)}function Kh(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ti(i,o){var u=i.alternate;return u===null?(u=kn(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function PC(i,o){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,o=u.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function nf(i,o,u,p,E,T){var D=0;if(p=i,typeof i=="function")Kh(i)&&(D=1);else if(typeof i=="string")D=ZG(i,u,K.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case M:return i=kn(31,u,o,E),i.elementType=M,i.lanes=T,i;case S:return qo(u.children,E,T,o);case R:D=8,E|=24;break;case w:return i=kn(12,u,o,E|2),i.elementType=w,i.lanes=T,i;case k:return i=kn(13,u,o,E),i.elementType=k,i.lanes=T,i;case N:return i=kn(19,u,o,E),i.elementType=N,i.lanes=T,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:D=10;break e;case _:D=9;break e;case C:D=11;break e;case I:D=14;break e;case O:D=16,p=null;break e}D=29,u=Error(n(130,i===null?"null":typeof i,"")),p=null}return o=kn(D,u,o,E),o.elementType=i,o.type=p,o.lanes=T,o}function qo(i,o,u,p){return i=kn(7,i,p,o),i.lanes=u,i}function Zh(i,o,u){return i=kn(6,i,null,o),i.lanes=u,i}function jC(i){var o=kn(18,null,null,0);return o.stateNode=i,o}function Xh(i,o,u){return o=kn(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var UC=new WeakMap;function Gn(i,o){if(typeof i=="object"&&i!==null){var u=UC.get(i);return u!==void 0?u:(o={value:i,source:o,stack:ke(o)},UC.set(i,o),o)}return{value:i,source:o,stack:ke(o)}}var Bs=[],qs=0,af=null,jc=0,Wn=[],Yn=0,$i=null,Ra=1,Aa="";function ri(i,o){Bs[qs++]=jc,Bs[qs++]=af,af=i,jc=o}function FC(i,o,u){Wn[Yn++]=Ra,Wn[Yn++]=Aa,Wn[Yn++]=$i,$i=i;var p=Ra;i=Aa;var E=32-dr(p)-1;p&=~(1<<E),u+=1;var T=32-dr(o)+E;if(30<T){var D=E-E%5;T=(p&(1<<D)-1).toString(32),p>>=D,E-=D,Ra=1<<32-dr(o)+E|u<<E|p,Aa=T+i}else Ra=1<<T|u<<E|p,Aa=i}function Qh(i){i.return!==null&&(ri(i,1),FC(i,1,0))}function Jh(i){for(;i===af;)af=Bs[--qs],Bs[qs]=null,jc=Bs[--qs],Bs[qs]=null;for(;i===$i;)$i=Wn[--Yn],Wn[Yn]=null,Aa=Wn[--Yn],Wn[Yn]=null,Ra=Wn[--Yn],Wn[Yn]=null}function zC(i,o){Wn[Yn++]=Ra,Wn[Yn++]=Aa,Wn[Yn++]=$i,Ra=o.id,Aa=o.overflow,$i=i}var $r=null,Jt=null,At=!1,Bi=null,Kn=!1,eg=Error(n(519));function qi(i){var o=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Uc(Gn(o,i)),eg}function $C(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[Pe]=i,o[Ue]=p,u){case"dialog":Et("cancel",o),Et("close",o);break;case"iframe":case"object":case"embed":Et("load",o);break;case"video":case"audio":for(u=0;u<ou.length;u++)Et(ou[u],o);break;case"source":Et("error",o);break;case"img":case"image":case"link":Et("error",o),Et("load",o);break;case"details":Et("toggle",o);break;case"input":Et("invalid",o),eC(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Et("invalid",o);break;case"textarea":Et("invalid",o),rC(o,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||p.suppressHydrationWarning===!0||ak(o.textContent,u)?(p.popover!=null&&(Et("beforetoggle",o),Et("toggle",o)),p.onScroll!=null&&Et("scroll",o),p.onScrollEnd!=null&&Et("scrollend",o),p.onClick!=null&&(o.onclick=Ja),o=!0):o=!1,o||qi(i,!0)}function BC(i){for($r=i.return;$r;)switch($r.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:$r=$r.return}}function Hs(i){if(i!==$r)return!1;if(!At)return BC(i),At=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||bv(i.type,i.memoizedProps)),u=!u),u&&Jt&&qi(i),BC(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));Jt=pk(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));Jt=pk(i)}else o===27?(o=Jt,no(i.type)?(i=xv,xv=null,Jt=i):Jt=o):Jt=$r?Xn(i.stateNode.nextSibling):null;return!0}function Ho(){Jt=$r=null,At=!1}function tg(){var i=Bi;return i!==null&&(yn===null?yn=i:yn.push.apply(yn,i),Bi=null),i}function Uc(i){Bi===null?Bi=[i]:Bi.push(i)}var rg=B(null),Vo=null,ni=null;function Hi(i,o,u){$(rg,o._currentValue),o._currentValue=u}function ai(i){i._currentValue=rg.current,q(rg)}function ng(i,o,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),i===u)break;i=i.return}}function ag(i,o,u,p){var E=i.child;for(E!==null&&(E.return=i);E!==null;){var T=E.dependencies;if(T!==null){var D=E.child;T=T.firstContext;e:for(;T!==null;){var F=T;T=E;for(var ee=0;ee<o.length;ee++)if(F.context===o[ee]){T.lanes|=u,F=T.alternate,F!==null&&(F.lanes|=u),ng(T.return,u,i),p||(D=null);break e}T=F.next}}else if(E.tag===18){if(D=E.return,D===null)throw Error(n(341));D.lanes|=u,T=D.alternate,T!==null&&(T.lanes|=u),ng(D,u,i),D=null}else D=E.child;if(D!==null)D.return=E;else for(D=E;D!==null;){if(D===i){D=null;break}if(E=D.sibling,E!==null){E.return=D.return,D=E;break}D=D.return}E=D}}function Vs(i,o,u,p){i=null;for(var E=o,T=!1;E!==null;){if(!T){if((E.flags&524288)!==0)T=!0;else if((E.flags&262144)!==0)break}if(E.tag===10){var D=E.alternate;if(D===null)throw Error(n(387));if(D=D.memoizedProps,D!==null){var F=E.type;Nn(E.pendingProps.value,D.value)||(i!==null?i.push(F):i=[F])}}else if(E===j.current){if(D=E.alternate,D===null)throw Error(n(387));D.memoizedState.memoizedState!==E.memoizedState.memoizedState&&(i!==null?i.push(du):i=[du])}E=E.return}i!==null&&ag(o,i,u,p),o.flags|=262144}function of(i){for(i=i.firstContext;i!==null;){if(!Nn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Go(i){Vo=i,ni=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Br(i){return qC(Vo,i)}function sf(i,o){return Vo===null&&Go(i),qC(i,o)}function qC(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},ni===null){if(i===null)throw Error(n(308));ni=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else ni=ni.next=o;return u}var GV=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},WV=t.unstable_scheduleCallback,YV=t.unstable_NormalPriority,wr={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ig(){return{controller:new GV,data:new Map,refCount:0}}function Fc(i){i.refCount--,i.refCount===0&&WV(YV,function(){i.controller.abort()})}var zc=null,og=0,Gs=0,Ws=null;function KV(i,o){if(zc===null){var u=zc=[];og=0,Gs=cv(),Ws={status:"pending",value:void 0,then:function(p){u.push(p)}}}return og++,o.then(HC,HC),o}function HC(){if(--og===0&&zc!==null){Ws!==null&&(Ws.status="fulfilled");var i=zc;zc=null,Gs=0,Ws=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function ZV(i,o){var u=[],p={status:"pending",value:null,reason:null,then:function(E){u.push(E)}};return i.then(function(){p.status="fulfilled",p.value=o;for(var E=0;E<u.length;E++)(0,u[E])(o)},function(E){for(p.status="rejected",p.reason=E,E=0;E<u.length;E++)(0,u[E])(void 0)}),p}var VC=U.S;U.S=function(i,o){C1=Ae(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&KV(i,o),VC!==null&&VC(i,o)};var Wo=B(null);function sg(){var i=Wo.current;return i!==null?i:Kt.pooledCache}function lf(i,o){o===null?$(Wo,Wo.current):$(Wo,o.pool)}function GC(){var i=sg();return i===null?null:{parent:wr._currentValue,pool:i}}var Ys=Error(n(460)),lg=Error(n(474)),cf=Error(n(542)),uf={then:function(){}};function WC(i){return i=i.status,i==="fulfilled"||i==="rejected"}function YC(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ja,Ja),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,ZC(i),i;default:if(typeof o.status=="string")o.then(Ja,Ja);else{if(i=Kt,i!==null&&100<i.shellSuspendCounter)throw Error(n(482));i=o,i.status="pending",i.then(function(p){if(o.status==="pending"){var E=o;E.status="fulfilled",E.value=p}},function(p){if(o.status==="pending"){var E=o;E.status="rejected",E.reason=p}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,ZC(i),i}throw Ko=o,Ys}}function Yo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ko=u,Ys):u}}var Ko=null;function KC(){if(Ko===null)throw Error(n(459));var i=Ko;return Ko=null,i}function ZC(i){if(i===Ys||i===cf)throw Error(n(483))}var Ks=null,$c=0;function df(i){var o=$c;return $c+=1,Ks===null&&(Ks=[]),YC(Ks,i,o)}function Bc(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function ff(i,o){throw o.$$typeof===v?Error(n(525)):(i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function XC(i){function o(le,ie){if(i){var ue=le.deletions;ue===null?(le.deletions=[ie],le.flags|=16):ue.push(ie)}}function u(le,ie){if(!i)return null;for(;ie!==null;)o(le,ie),ie=ie.sibling;return null}function p(le){for(var ie=new Map;le!==null;)le.key!==null?ie.set(le.key,le):ie.set(le.index,le),le=le.sibling;return ie}function E(le,ie){return le=ti(le,ie),le.index=0,le.sibling=null,le}function T(le,ie,ue){return le.index=ue,i?(ue=le.alternate,ue!==null?(ue=ue.index,ue<ie?(le.flags|=67108866,ie):ue):(le.flags|=67108866,ie)):(le.flags|=1048576,ie)}function D(le){return i&&le.alternate===null&&(le.flags|=67108866),le}function F(le,ie,ue,we){return ie===null||ie.tag!==6?(ie=Zh(ue,le.mode,we),ie.return=le,ie):(ie=E(ie,ue),ie.return=le,ie)}function ee(le,ie,ue,we){var Ze=ue.type;return Ze===S?Ee(le,ie,ue.props.children,we,ue.key):ie!==null&&(ie.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===O&&Yo(Ze)===ie.type)?(ie=E(ie,ue.props),Bc(ie,ue),ie.return=le,ie):(ie=nf(ue.type,ue.key,ue.props,null,le.mode,we),Bc(ie,ue),ie.return=le,ie)}function de(le,ie,ue,we){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ue.containerInfo||ie.stateNode.implementation!==ue.implementation?(ie=Xh(ue,le.mode,we),ie.return=le,ie):(ie=E(ie,ue.children||[]),ie.return=le,ie)}function Ee(le,ie,ue,we,Ze){return ie===null||ie.tag!==7?(ie=qo(ue,le.mode,we,Ze),ie.return=le,ie):(ie=E(ie,ue),ie.return=le,ie)}function xe(le,ie,ue){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Zh(""+ie,le.mode,ue),ie.return=le,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return ue=nf(ie.type,ie.key,ie.props,null,le.mode,ue),Bc(ue,ie),ue.return=le,ue;case x:return ie=Xh(ie,le.mode,ue),ie.return=le,ie;case O:return ie=Yo(ie),xe(le,ie,ue)}if(oe(ie)||V(ie))return ie=qo(ie,le.mode,ue,null),ie.return=le,ie;if(typeof ie.then=="function")return xe(le,df(ie),ue);if(ie.$$typeof===A)return xe(le,sf(le,ie),ue);ff(le,ie)}return null}function fe(le,ie,ue,we){var Ze=ie!==null?ie.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Ze!==null?null:F(le,ie,""+ue,we);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case b:return ue.key===Ze?ee(le,ie,ue,we):null;case x:return ue.key===Ze?de(le,ie,ue,we):null;case O:return ue=Yo(ue),fe(le,ie,ue,we)}if(oe(ue)||V(ue))return Ze!==null?null:Ee(le,ie,ue,we,null);if(typeof ue.then=="function")return fe(le,ie,df(ue),we);if(ue.$$typeof===A)return fe(le,ie,sf(le,ue),we);ff(le,ue)}return null}function be(le,ie,ue,we,Ze){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return le=le.get(ue)||null,F(ie,le,""+we,Ze);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case b:return le=le.get(we.key===null?ue:we.key)||null,ee(ie,le,we,Ze);case x:return le=le.get(we.key===null?ue:we.key)||null,de(ie,le,we,Ze);case O:return we=Yo(we),be(le,ie,ue,we,Ze)}if(oe(we)||V(we))return le=le.get(ue)||null,Ee(ie,le,we,Ze,null);if(typeof we.then=="function")return be(le,ie,ue,df(we),Ze);if(we.$$typeof===A)return be(le,ie,ue,sf(ie,we),Ze);ff(ie,we)}return null}function Be(le,ie,ue,we){for(var Ze=null,kt=null,Ge=ie,mt=ie=0,_t=null;Ge!==null&&mt<ue.length;mt++){Ge.index>mt?(_t=Ge,Ge=null):_t=Ge.sibling;var It=fe(le,Ge,ue[mt],we);if(It===null){Ge===null&&(Ge=_t);break}i&&Ge&&It.alternate===null&&o(le,Ge),ie=T(It,ie,mt),kt===null?Ze=It:kt.sibling=It,kt=It,Ge=_t}if(mt===ue.length)return u(le,Ge),At&&ri(le,mt),Ze;if(Ge===null){for(;mt<ue.length;mt++)Ge=xe(le,ue[mt],we),Ge!==null&&(ie=T(Ge,ie,mt),kt===null?Ze=Ge:kt.sibling=Ge,kt=Ge);return At&&ri(le,mt),Ze}for(Ge=p(Ge);mt<ue.length;mt++)_t=be(Ge,le,mt,ue[mt],we),_t!==null&&(i&&_t.alternate!==null&&Ge.delete(_t.key===null?mt:_t.key),ie=T(_t,ie,mt),kt===null?Ze=_t:kt.sibling=_t,kt=_t);return i&&Ge.forEach(function(lo){return o(le,lo)}),At&&ri(le,mt),Ze}function Qe(le,ie,ue,we){if(ue==null)throw Error(n(151));for(var Ze=null,kt=null,Ge=ie,mt=ie=0,_t=null,It=ue.next();Ge!==null&&!It.done;mt++,It=ue.next()){Ge.index>mt?(_t=Ge,Ge=null):_t=Ge.sibling;var lo=fe(le,Ge,It.value,we);if(lo===null){Ge===null&&(Ge=_t);break}i&&Ge&&lo.alternate===null&&o(le,Ge),ie=T(lo,ie,mt),kt===null?Ze=lo:kt.sibling=lo,kt=lo,Ge=_t}if(It.done)return u(le,Ge),At&&ri(le,mt),Ze;if(Ge===null){for(;!It.done;mt++,It=ue.next())It=xe(le,It.value,we),It!==null&&(ie=T(It,ie,mt),kt===null?Ze=It:kt.sibling=It,kt=It);return At&&ri(le,mt),Ze}for(Ge=p(Ge);!It.done;mt++,It=ue.next())It=be(Ge,le,mt,It.value,we),It!==null&&(i&&It.alternate!==null&&Ge.delete(It.key===null?mt:It.key),ie=T(It,ie,mt),kt===null?Ze=It:kt.sibling=It,kt=It);return i&&Ge.forEach(function(s9){return o(le,s9)}),At&&ri(le,mt),Ze}function Vt(le,ie,ue,we){if(typeof ue=="object"&&ue!==null&&ue.type===S&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case b:e:{for(var Ze=ue.key;ie!==null;){if(ie.key===Ze){if(Ze=ue.type,Ze===S){if(ie.tag===7){u(le,ie.sibling),we=E(ie,ue.props.children),we.return=le,le=we;break e}}else if(ie.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===O&&Yo(Ze)===ie.type){u(le,ie.sibling),we=E(ie,ue.props),Bc(we,ue),we.return=le,le=we;break e}u(le,ie);break}else o(le,ie);ie=ie.sibling}ue.type===S?(we=qo(ue.props.children,le.mode,we,ue.key),we.return=le,le=we):(we=nf(ue.type,ue.key,ue.props,null,le.mode,we),Bc(we,ue),we.return=le,le=we)}return D(le);case x:e:{for(Ze=ue.key;ie!==null;){if(ie.key===Ze)if(ie.tag===4&&ie.stateNode.containerInfo===ue.containerInfo&&ie.stateNode.implementation===ue.implementation){u(le,ie.sibling),we=E(ie,ue.children||[]),we.return=le,le=we;break e}else{u(le,ie);break}else o(le,ie);ie=ie.sibling}we=Xh(ue,le.mode,we),we.return=le,le=we}return D(le);case O:return ue=Yo(ue),Vt(le,ie,ue,we)}if(oe(ue))return Be(le,ie,ue,we);if(V(ue)){if(Ze=V(ue),typeof Ze!="function")throw Error(n(150));return ue=Ze.call(ue),Qe(le,ie,ue,we)}if(typeof ue.then=="function")return Vt(le,ie,df(ue),we);if(ue.$$typeof===A)return Vt(le,ie,sf(le,ue),we);ff(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ie!==null&&ie.tag===6?(u(le,ie.sibling),we=E(ie,ue),we.return=le,le=we):(u(le,ie),we=Zh(ue,le.mode,we),we.return=le,le=we),D(le)):u(le,ie)}return function(le,ie,ue,we){try{$c=0;var Ze=Vt(le,ie,ue,we);return Ks=null,Ze}catch(Ge){if(Ge===Ys||Ge===cf)throw Ge;var kt=kn(29,Ge,null,le.mode);return kt.lanes=we,kt.return=le,kt}finally{}}}var Zo=XC(!0),QC=XC(!1),Vi=!1;function cg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ug(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Gi(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Wi(i,o,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(Lt&2)!==0){var E=p.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),p.pending=o,o=rf(i),MC(i,null,u),o}return tf(i,p,o,u),rf(i)}function qc(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Xr(i,u)}}function dg(i,o){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var E=null,T=null;if(u=u.firstBaseUpdate,u!==null){do{var D={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};T===null?E=T=D:T=T.next=D,u=u.next}while(u!==null);T===null?E=T=o:T=T.next=o}else E=T=o;u={baseState:p.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var fg=!1;function Hc(){if(fg){var i=Ws;if(i!==null)throw i}}function Vc(i,o,u,p){fg=!1;var E=i.updateQueue;Vi=!1;var T=E.firstBaseUpdate,D=E.lastBaseUpdate,F=E.shared.pending;if(F!==null){E.shared.pending=null;var ee=F,de=ee.next;ee.next=null,D===null?T=de:D.next=de,D=ee;var Ee=i.alternate;Ee!==null&&(Ee=Ee.updateQueue,F=Ee.lastBaseUpdate,F!==D&&(F===null?Ee.firstBaseUpdate=de:F.next=de,Ee.lastBaseUpdate=ee))}if(T!==null){var xe=E.baseState;D=0,Ee=de=ee=null,F=T;do{var fe=F.lane&-536870913,be=fe!==F.lane;if(be?(xt&fe)===fe:(p&fe)===fe){fe!==0&&fe===Gs&&(fg=!0),Ee!==null&&(Ee=Ee.next={lane:0,tag:F.tag,payload:F.payload,callback:null,next:null});e:{var Be=i,Qe=F;fe=o;var Vt=u;switch(Qe.tag){case 1:if(Be=Qe.payload,typeof Be=="function"){xe=Be.call(Vt,xe,fe);break e}xe=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=Qe.payload,fe=typeof Be=="function"?Be.call(Vt,xe,fe):Be,fe==null)break e;xe=h({},xe,fe);break e;case 2:Vi=!0}}fe=F.callback,fe!==null&&(i.flags|=64,be&&(i.flags|=8192),be=E.callbacks,be===null?E.callbacks=[fe]:be.push(fe))}else be={lane:fe,tag:F.tag,payload:F.payload,callback:F.callback,next:null},Ee===null?(de=Ee=be,ee=xe):Ee=Ee.next=be,D|=fe;if(F=F.next,F===null){if(F=E.shared.pending,F===null)break;be=F,F=be.next,be.next=null,E.lastBaseUpdate=be,E.shared.pending=null}}while(!0);Ee===null&&(ee=xe),E.baseState=ee,E.firstBaseUpdate=de,E.lastBaseUpdate=Ee,T===null&&(E.shared.lanes=0),Qi|=D,i.lanes=D,i.memoizedState=xe}}function JC(i,o){if(typeof i!="function")throw Error(n(191,i));i.call(o)}function eN(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)JC(u[i],o)}var Zs=B(null),pf=B(0);function tN(i,o){i=pi,$(pf,i),$(Zs,o),pi=i|o.baseLanes}function pg(){$(pf,pi),$(Zs,Zs.current)}function mg(){pi=pf.current,q(Zs),q(pf)}var In=B(null),Zn=null;function Yi(i){var o=i.alternate;$(vr,vr.current&1),$(In,i),Zn===null&&(o===null||Zs.current!==null||o.memoizedState!==null)&&(Zn=i)}function hg(i){$(vr,vr.current),$(In,i),Zn===null&&(Zn=i)}function rN(i){i.tag===22?($(vr,vr.current),$(In,i),Zn===null&&(Zn=i)):Ki()}function Ki(){$(vr,vr.current),$(In,In.current)}function On(i){q(In),Zn===i&&(Zn=null),q(vr)}var vr=B(0);function mf(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Sv(u)||wv(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var ii=0,ct=null,qt=null,xr=null,hf=!1,Xs=!1,Xo=!1,gf=0,Gc=0,Qs=null,XV=0;function fr(){throw Error(n(321))}function gg(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Nn(i[u],o[u]))return!1;return!0}function vg(i,o,u,p,E,T){return ii=T,ct=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,U.H=i===null||i.memoizedState===null?FN:Og,Xo=!1,T=u(p,E),Xo=!1,Xs&&(T=aN(o,u,p,E)),nN(i),T}function nN(i){U.H=Kc;var o=qt!==null&&qt.next!==null;if(ii=0,xr=qt=ct=null,hf=!1,Gc=0,Qs=null,o)throw Error(n(300));i===null||_r||(i=i.dependencies,i!==null&&of(i)&&(_r=!0))}function aN(i,o,u,p){ct=i;var E=0;do{if(Xs&&(Qs=null),Gc=0,Xs=!1,25<=E)throw Error(n(301));if(E+=1,xr=qt=null,i.updateQueue!=null){var T=i.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}U.H=zN,T=o(u,p)}while(Xs);return T}function QV(){var i=U.H,o=i.useState()[0];return o=typeof o.then=="function"?Wc(o):o,i=i.useState()[0],(qt!==null?qt.memoizedState:null)!==i&&(ct.flags|=1024),o}function bg(){var i=gf!==0;return gf=0,i}function yg(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Eg(i){if(hf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}hf=!1}ii=0,xr=qt=ct=null,Xs=!1,Gc=gf=0,Qs=null}function ln(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xr===null?ct.memoizedState=xr=i:xr=xr.next=i,xr}function br(){if(qt===null){var i=ct.alternate;i=i!==null?i.memoizedState:null}else i=qt.next;var o=xr===null?ct.memoizedState:xr.next;if(o!==null)xr=o,qt=i;else{if(i===null)throw ct.alternate===null?Error(n(467)):Error(n(310));qt=i,i={memoizedState:qt.memoizedState,baseState:qt.baseState,baseQueue:qt.baseQueue,queue:qt.queue,next:null},xr===null?ct.memoizedState=xr=i:xr=xr.next=i}return xr}function vf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wc(i){var o=Gc;return Gc+=1,Qs===null&&(Qs=[]),i=YC(Qs,i,o),o=ct,(xr===null?o.memoizedState:xr.next)===null&&(o=o.alternate,U.H=o===null||o.memoizedState===null?FN:Og),i}function bf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Wc(i);if(i.$$typeof===A)return Br(i)}throw Error(n(438,String(i)))}function Sg(i){var o=null,u=ct.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var p=ct.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(o={data:p.data.map(function(E){return E.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=vf(),ct.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),p=0;p<i;p++)u[p]=L;return o.index++,u}function oi(i,o){return typeof o=="function"?o(i):o}function yf(i){var o=br();return wg(o,qt,i)}function wg(i,o,u){var p=i.queue;if(p===null)throw Error(n(311));p.lastRenderedReducer=u;var E=i.baseQueue,T=p.pending;if(T!==null){if(E!==null){var D=E.next;E.next=T.next,T.next=D}o.baseQueue=E=T,p.pending=null}if(T=i.baseState,E===null)i.memoizedState=T;else{o=E.next;var F=D=null,ee=null,de=o,Ee=!1;do{var xe=de.lane&-536870913;if(xe!==de.lane?(xt&xe)===xe:(ii&xe)===xe){var fe=de.revertLane;if(fe===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),xe===Gs&&(Ee=!0);else if((ii&fe)===fe){de=de.next,fe===Gs&&(Ee=!0);continue}else xe={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},ee===null?(F=ee=xe,D=T):ee=ee.next=xe,ct.lanes|=fe,Qi|=fe;xe=de.action,Xo&&u(T,xe),T=de.hasEagerState?de.eagerState:u(T,xe)}else fe={lane:xe,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},ee===null?(F=ee=fe,D=T):ee=ee.next=fe,ct.lanes|=xe,Qi|=xe;de=de.next}while(de!==null&&de!==o);if(ee===null?D=T:ee.next=F,!Nn(T,i.memoizedState)&&(_r=!0,Ee&&(u=Ws,u!==null)))throw u;i.memoizedState=T,i.baseState=D,i.baseQueue=ee,p.lastRenderedState=T}return E===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function xg(i){var o=br(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=i;var p=u.dispatch,E=u.pending,T=o.memoizedState;if(E!==null){u.pending=null;var D=E=E.next;do T=i(T,D.action),D=D.next;while(D!==E);Nn(T,o.memoizedState)||(_r=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),u.lastRenderedState=T}return[T,p]}function iN(i,o,u){var p=ct,E=br(),T=At;if(T){if(u===void 0)throw Error(n(407));u=u()}else u=o();var D=!Nn((qt||E).memoizedState,u);if(D&&(E.memoizedState=u,_r=!0),E=E.queue,Rg(lN.bind(null,p,E,i),[i]),E.getSnapshot!==o||D||xr!==null&&xr.memoizedState.tag&1){if(p.flags|=2048,Js(9,{destroy:void 0},sN.bind(null,p,E,u,o),null),Kt===null)throw Error(n(349));T||(ii&127)!==0||oN(p,o,u)}return u}function oN(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=ct.updateQueue,o===null?(o=vf(),ct.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function sN(i,o,u,p){o.value=u,o.getSnapshot=p,cN(o)&&uN(i)}function lN(i,o,u){return u(function(){cN(o)&&uN(i)})}function cN(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Nn(i,u)}catch{return!0}}function uN(i){var o=Bo(i,2);o!==null&&En(o,i,2)}function _g(i){var o=ln();if(typeof i=="function"){var u=i;if(i=u(),Xo){Zt(!0);try{u()}finally{Zt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:i},o}function dN(i,o,u,p){return i.baseState=u,wg(i,qt,typeof p=="function"?p:oi)}function JV(i,o,u,p,E){if(wf(i))throw Error(n(485));if(i=o.action,i!==null){var T={payload:E,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){T.listeners.push(D)}};U.T!==null?u(!0):T.isTransition=!1,p(T),u=o.pending,u===null?(T.next=o.pending=T,fN(o,T)):(T.next=u.next,o.pending=u.next=T)}}function fN(i,o){var u=o.action,p=o.payload,E=i.state;if(o.isTransition){var T=U.T,D={};U.T=D;try{var F=u(E,p),ee=U.S;ee!==null&&ee(D,F),pN(i,o,F)}catch(de){Tg(i,o,de)}finally{T!==null&&D.types!==null&&(T.types=D.types),U.T=T}}else try{T=u(E,p),pN(i,o,T)}catch(de){Tg(i,o,de)}}function pN(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){mN(i,o,p)},function(p){return Tg(i,o,p)}):mN(i,o,u)}function mN(i,o,u){o.status="fulfilled",o.value=u,hN(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,fN(i,u)))}function Tg(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,hN(o),o=o.next;while(o!==p)}i.action=null}function hN(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function gN(i,o){return o}function vN(i,o){if(At){var u=Kt.formState;if(u!==null){e:{var p=ct;if(At){if(Jt){t:{for(var E=Jt,T=Kn;E.nodeType!==8;){if(!T){E=null;break t}if(E=Xn(E.nextSibling),E===null){E=null;break t}}T=E.data,E=T==="F!"||T==="F"?E:null}if(E){Jt=Xn(E.nextSibling),p=E.data==="F!";break e}}qi(p)}p=!1}p&&(o=u[0])}}return u=ln(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gN,lastRenderedState:o},u.queue=p,u=PN.bind(null,ct,p),p.dispatch=u,p=_g(!1),T=Ig.bind(null,ct,!1,p.queue),p=ln(),E={state:o,dispatch:null,action:i,pending:null},p.queue=E,u=JV.bind(null,ct,E,T,u),E.dispatch=u,p.memoizedState=i,[o,u,!1]}function bN(i){var o=br();return yN(o,qt,i)}function yN(i,o,u){if(o=wg(i,o,gN)[0],i=yf(oi)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=Wc(o)}catch(D){throw D===Ys?cf:D}else p=o;o=br();var E=o.queue,T=E.dispatch;return u!==o.memoizedState&&(ct.flags|=2048,Js(9,{destroy:void 0},eG.bind(null,E,u),null)),[p,T,i]}function eG(i,o){i.action=o}function EN(i){var o=br(),u=qt;if(u!==null)return yN(o,u,i);br(),o=o.memoizedState,u=br();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function Js(i,o,u,p){return i={tag:i,create:u,deps:p,inst:o,next:null},o=ct.updateQueue,o===null&&(o=vf(),ct.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,o.lastEffect=i),i}function SN(){return br().memoizedState}function Ef(i,o,u,p){var E=ln();ct.flags|=i,E.memoizedState=Js(1|o,{destroy:void 0},u,p===void 0?null:p)}function Sf(i,o,u,p){var E=br();p=p===void 0?null:p;var T=E.memoizedState.inst;qt!==null&&p!==null&&gg(p,qt.memoizedState.deps)?E.memoizedState=Js(o,T,u,p):(ct.flags|=i,E.memoizedState=Js(1|o,T,u,p))}function wN(i,o){Ef(8390656,8,i,o)}function Rg(i,o){Sf(2048,8,i,o)}function tG(i){ct.flags|=4;var o=ct.updateQueue;if(o===null)o=vf(),ct.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function xN(i){var o=br().memoizedState;return tG({ref:o,nextImpl:i}),function(){if((Lt&2)!==0)throw Error(n(440));return o.impl.apply(void 0,arguments)}}function _N(i,o){return Sf(4,2,i,o)}function TN(i,o){return Sf(4,4,i,o)}function RN(i,o){if(typeof o=="function"){i=i();var u=o(i);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function AN(i,o,u){u=u!=null?u.concat([i]):null,Sf(4,4,RN.bind(null,o,i),u)}function Ag(){}function CN(i,o){var u=br();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&gg(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function NN(i,o){var u=br();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&gg(o,p[1]))return p[0];if(p=i(),Xo){Zt(!0);try{i()}finally{Zt(!1)}}return u.memoizedState=[p,o],p}function Cg(i,o,u){return u===void 0||(ii&1073741824)!==0&&(xt&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=k1(),ct.lanes|=i,Qi|=i,u)}function kN(i,o,u,p){return Nn(u,o)?u:Zs.current!==null?(i=Cg(i,u,p),Nn(i,o)||(_r=!0),i):(ii&42)===0||(ii&1073741824)!==0&&(xt&261930)===0?(_r=!0,i.memoizedState=u):(i=k1(),ct.lanes|=i,Qi|=i,o)}function IN(i,o,u,p,E){var T=W.p;W.p=T!==0&&8>T?T:8;var D=U.T,F={};U.T=F,Ig(i,!1,o,u);try{var ee=E(),de=U.S;if(de!==null&&de(F,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var Ee=ZV(ee,p);Yc(i,o,Ee,Mn(i))}else Yc(i,o,p,Mn(i))}catch(xe){Yc(i,o,{then:function(){},status:"rejected",reason:xe},Mn())}finally{W.p=T,D!==null&&F.types!==null&&(D.types=F.types),U.T=D}}function rG(){}function Ng(i,o,u,p){if(i.tag!==5)throw Error(n(476));var E=ON(i).queue;IN(i,E,o,H,u===null?rG:function(){return DN(i),u(p)})}function ON(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:H},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function DN(i){var o=ON(i);o.next===null&&(o=i.alternate.memoizedState),Yc(i,o.next.queue,{},Mn())}function kg(){return Br(du)}function LN(){return br().memoizedState}function MN(){return br().memoizedState}function nG(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Mn();i=Gi(u);var p=Wi(o,i,u);p!==null&&(En(p,o,u),qc(p,o,u)),o={cache:ig()},i.payload=o;return}o=o.return}}function aG(i,o,u){var p=Mn();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},wf(i)?jN(o,u):(u=Yh(i,o,u,p),u!==null&&(En(u,i,p),UN(u,o,p)))}function PN(i,o,u){var p=Mn();Yc(i,o,u,p)}function Yc(i,o,u,p){var E={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(wf(i))jN(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var D=o.lastRenderedState,F=T(D,u);if(E.hasEagerState=!0,E.eagerState=F,Nn(F,D))return tf(i,o,E,0),Kt===null&&ef(),!1}catch{}finally{}if(u=Yh(i,o,E,p),u!==null)return En(u,i,p),UN(u,o,p),!0}return!1}function Ig(i,o,u,p){if(p={lane:2,revertLane:cv(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},wf(i)){if(o)throw Error(n(479))}else o=Yh(i,u,p,2),o!==null&&En(o,i,2)}function wf(i){var o=i.alternate;return i===ct||o!==null&&o===ct}function jN(i,o){Xs=hf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function UN(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,Xr(i,u)}}var Kc={readContext:Br,use:bf,useCallback:fr,useContext:fr,useEffect:fr,useImperativeHandle:fr,useLayoutEffect:fr,useInsertionEffect:fr,useMemo:fr,useReducer:fr,useRef:fr,useState:fr,useDebugValue:fr,useDeferredValue:fr,useTransition:fr,useSyncExternalStore:fr,useId:fr,useHostTransitionStatus:fr,useFormState:fr,useActionState:fr,useOptimistic:fr,useMemoCache:fr,useCacheRefresh:fr};Kc.useEffectEvent=fr;var FN={readContext:Br,use:bf,useCallback:function(i,o){return ln().memoizedState=[i,o===void 0?null:o],i},useContext:Br,useEffect:wN,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Ef(4194308,4,RN.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Ef(4194308,4,i,o)},useInsertionEffect:function(i,o){Ef(4,2,i,o)},useMemo:function(i,o){var u=ln();o=o===void 0?null:o;var p=i();if(Xo){Zt(!0);try{i()}finally{Zt(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=ln();if(u!==void 0){var E=u(o);if(Xo){Zt(!0);try{u(o)}finally{Zt(!1)}}}else E=o;return p.memoizedState=p.baseState=E,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:E},p.queue=i,i=i.dispatch=aG.bind(null,ct,i),[p.memoizedState,i]},useRef:function(i){var o=ln();return i={current:i},o.memoizedState=i},useState:function(i){i=_g(i);var o=i.queue,u=PN.bind(null,ct,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:Ag,useDeferredValue:function(i,o){var u=ln();return Cg(u,i,o)},useTransition:function(){var i=_g(!1);return i=IN.bind(null,ct,i.queue,!0,!1),ln().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=ct,E=ln();if(At){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),Kt===null)throw Error(n(349));(xt&127)!==0||oN(p,o,u)}E.memoizedState=u;var T={value:u,getSnapshot:o};return E.queue=T,wN(lN.bind(null,p,T,i),[i]),p.flags|=2048,Js(9,{destroy:void 0},sN.bind(null,p,T,u,o),null),u},useId:function(){var i=ln(),o=Kt.identifierPrefix;if(At){var u=Aa,p=Ra;u=(p&~(1<<32-dr(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=gf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=XV++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:kg,useFormState:vN,useActionState:vN,useOptimistic:function(i){var o=ln();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=Ig.bind(null,ct,!0,u),u.dispatch=o,[i,o]},useMemoCache:Sg,useCacheRefresh:function(){return ln().memoizedState=nG.bind(null,ct)},useEffectEvent:function(i){var o=ln(),u={impl:i};return o.memoizedState=u,function(){if((Lt&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},Og={readContext:Br,use:bf,useCallback:CN,useContext:Br,useEffect:Rg,useImperativeHandle:AN,useInsertionEffect:_N,useLayoutEffect:TN,useMemo:NN,useReducer:yf,useRef:SN,useState:function(){return yf(oi)},useDebugValue:Ag,useDeferredValue:function(i,o){var u=br();return kN(u,qt.memoizedState,i,o)},useTransition:function(){var i=yf(oi)[0],o=br().memoizedState;return[typeof i=="boolean"?i:Wc(i),o]},useSyncExternalStore:iN,useId:LN,useHostTransitionStatus:kg,useFormState:bN,useActionState:bN,useOptimistic:function(i,o){var u=br();return dN(u,qt,i,o)},useMemoCache:Sg,useCacheRefresh:MN};Og.useEffectEvent=xN;var zN={readContext:Br,use:bf,useCallback:CN,useContext:Br,useEffect:Rg,useImperativeHandle:AN,useInsertionEffect:_N,useLayoutEffect:TN,useMemo:NN,useReducer:xg,useRef:SN,useState:function(){return xg(oi)},useDebugValue:Ag,useDeferredValue:function(i,o){var u=br();return qt===null?Cg(u,i,o):kN(u,qt.memoizedState,i,o)},useTransition:function(){var i=xg(oi)[0],o=br().memoizedState;return[typeof i=="boolean"?i:Wc(i),o]},useSyncExternalStore:iN,useId:LN,useHostTransitionStatus:kg,useFormState:EN,useActionState:EN,useOptimistic:function(i,o){var u=br();return qt!==null?dN(u,qt,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Sg,useCacheRefresh:MN};zN.useEffectEvent=xN;function Dg(i,o,u,p){o=i.memoizedState,u=u(p,o),u=u==null?o:h({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var Lg={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=Mn(),E=Gi(p);E.payload=o,u!=null&&(E.callback=u),o=Wi(i,E,p),o!==null&&(En(o,i,p),qc(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=Mn(),E=Gi(p);E.tag=1,E.payload=o,u!=null&&(E.callback=u),o=Wi(i,E,p),o!==null&&(En(o,i,p),qc(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Mn(),p=Gi(u);p.tag=2,o!=null&&(p.callback=o),o=Wi(i,p,u),o!==null&&(En(o,i,u),qc(o,i,u))}};function $N(i,o,u,p,E,T,D){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,T,D):o.prototype&&o.prototype.isPureReactComponent?!Mc(u,p)||!Mc(E,T):!0}function BN(i,o,u,p){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,p),o.state!==i&&Lg.enqueueReplaceState(o,o.state,null)}function Qo(i,o){var u=o;if("ref"in o){u={};for(var p in o)p!=="ref"&&(u[p]=o[p])}if(i=i.defaultProps){u===o&&(u=h({},u));for(var E in i)u[E]===void 0&&(u[E]=i[E])}return u}function qN(i){Jd(i)}function HN(i){console.error(i)}function VN(i){Jd(i)}function xf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function GN(i,o,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(E){setTimeout(function(){throw E})}}function Mg(i,o,u){return u=Gi(u),u.tag=3,u.payload={element:null},u.callback=function(){xf(i,o)},u}function WN(i){return i=Gi(i),i.tag=3,i}function YN(i,o,u,p){var E=u.type.getDerivedStateFromError;if(typeof E=="function"){var T=p.value;i.payload=function(){return E(T)},i.callback=function(){GN(o,u,p)}}var D=u.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(i.callback=function(){GN(o,u,p),typeof E!="function"&&(Ji===null?Ji=new Set([this]):Ji.add(this));var F=p.stack;this.componentDidCatch(p.value,{componentStack:F!==null?F:""})})}function iG(i,o,u,p,E){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&Vs(o,u,E,!0),u=In.current,u!==null){switch(u.tag){case 31:case 13:return Zn===null?Mf():u.alternate===null&&pr===0&&(pr=3),u.flags&=-257,u.flags|=65536,u.lanes=E,p===uf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),ov(i,p,E)),!1;case 22:return u.flags|=65536,p===uf?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([p]):u.add(p)),ov(i,p,E)),!1}throw Error(n(435,u.tag))}return ov(i,p,E),Mf(),!1}if(At)return o=In.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=E,p!==eg&&(i=Error(n(422),{cause:p}),Uc(Gn(i,u)))):(p!==eg&&(o=Error(n(423),{cause:p}),Uc(Gn(o,u))),i=i.current.alternate,i.flags|=65536,E&=-E,i.lanes|=E,p=Gn(p,u),E=Mg(i.stateNode,p,E),dg(i,E),pr!==4&&(pr=2)),!1;var T=Error(n(520),{cause:p});if(T=Gn(T,u),nu===null?nu=[T]:nu.push(T),pr!==4&&(pr=2),o===null)return!0;p=Gn(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=E&-E,u.lanes|=i,i=Mg(u.stateNode,p,i),dg(u,i),!1;case 1:if(o=u.type,T=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ji===null||!Ji.has(T))))return u.flags|=65536,E&=-E,u.lanes|=E,E=WN(E),YN(E,i,u,p),dg(u,E),!1}u=u.return}while(u!==null);return!1}var Pg=Error(n(461)),_r=!1;function qr(i,o,u,p){o.child=i===null?QC(o,null,u,p):Zo(o,i.child,u,p)}function KN(i,o,u,p,E){u=u.render;var T=o.ref;if("ref"in p){var D={};for(var F in p)F!=="ref"&&(D[F]=p[F])}else D=p;return Go(o),p=vg(i,o,u,D,T,E),F=bg(),i!==null&&!_r?(yg(i,o,E),si(i,o,E)):(At&&F&&Qh(o),o.flags|=1,qr(i,o,p,E),o.child)}function ZN(i,o,u,p,E){if(i===null){var T=u.type;return typeof T=="function"&&!Kh(T)&&T.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=T,XN(i,o,T,p,E)):(i=nf(u.type,null,p,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,!Hg(i,E)){var D=T.memoizedProps;if(u=u.compare,u=u!==null?u:Mc,u(D,p)&&i.ref===o.ref)return si(i,o,E)}return o.flags|=1,i=ti(T,p),i.ref=o.ref,i.return=o,o.child=i}function XN(i,o,u,p,E){if(i!==null){var T=i.memoizedProps;if(Mc(T,p)&&i.ref===o.ref)if(_r=!1,o.pendingProps=p=T,Hg(i,E))(i.flags&131072)!==0&&(_r=!0);else return o.lanes=i.lanes,si(i,o,E)}return jg(i,o,u,p,E)}function QN(i,o,u,p){var E=p.children,T=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((o.flags&128)!==0){if(T=T!==null?T.baseLanes|u:u,i!==null){for(p=o.child=i.child,E=0;p!==null;)E=E|p.lanes|p.childLanes,p=p.sibling;p=E&~T}else p=0,o.child=null;return JN(i,o,T,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&lf(o,T!==null?T.cachePool:null),T!==null?tN(o,T):pg(),rN(o);else return p=o.lanes=536870912,JN(i,o,T!==null?T.baseLanes|u:u,u,p)}else T!==null?(lf(o,T.cachePool),tN(o,T),Ki(),o.memoizedState=null):(i!==null&&lf(o,null),pg(),Ki());return qr(i,o,E,u),o.child}function Zc(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function JN(i,o,u,p,E){var T=sg();return T=T===null?null:{parent:wr._currentValue,pool:T},o.memoizedState={baseLanes:u,cachePool:T},i!==null&&lf(o,null),pg(),rN(o),i!==null&&Vs(i,o,p,!0),o.childLanes=E,null}function _f(i,o){return o=Rf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function e1(i,o,u){return Zo(o,i.child,null,u),i=_f(o,o.pendingProps),i.flags|=2,On(o),o.memoizedState=null,i}function oG(i,o,u){var p=o.pendingProps,E=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(At){if(p.mode==="hidden")return i=_f(o,p),o.lanes=536870912,Zc(null,i);if(hg(o),(i=Jt)?(i=fk(i,Kn),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:$i!==null?{id:Ra,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},u=jC(i),u.return=o,o.child=u,$r=o,Jt=null)):i=null,i===null)throw qi(o);return o.lanes=536870912,null}return _f(o,p)}var T=i.memoizedState;if(T!==null){var D=T.dehydrated;if(hg(o),E)if(o.flags&256)o.flags&=-257,o=e1(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(n(558));else if(_r||Vs(i,o,u,!1),E=(u&i.childLanes)!==0,_r||E){if(p=Kt,p!==null&&(D=Fr(p,u),D!==0&&D!==T.retryLane))throw T.retryLane=D,Bo(i,D),En(p,i,D),Pg;Mf(),o=e1(i,o,u)}else i=T.treeContext,Jt=Xn(D.nextSibling),$r=o,At=!0,Bi=null,Kn=!1,i!==null&&zC(o,i),o=_f(o,p),o.flags|=4096;return o}return i=ti(i.child,{mode:p.mode,children:p.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Tf(i,o){var u=o.ref;if(u===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(n(284));(i===null||i.ref!==u)&&(o.flags|=4194816)}}function jg(i,o,u,p,E){return Go(o),u=vg(i,o,u,p,void 0,E),p=bg(),i!==null&&!_r?(yg(i,o,E),si(i,o,E)):(At&&p&&Qh(o),o.flags|=1,qr(i,o,u,E),o.child)}function t1(i,o,u,p,E,T){return Go(o),o.updateQueue=null,u=aN(o,p,u,E),nN(i),p=bg(),i!==null&&!_r?(yg(i,o,T),si(i,o,T)):(At&&p&&Qh(o),o.flags|=1,qr(i,o,u,T),o.child)}function r1(i,o,u,p,E){if(Go(o),o.stateNode===null){var T=$s,D=u.contextType;typeof D=="object"&&D!==null&&(T=Br(D)),T=new u(p,T),o.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=Lg,o.stateNode=T,T._reactInternals=o,T=o.stateNode,T.props=p,T.state=o.memoizedState,T.refs={},cg(o),D=u.contextType,T.context=typeof D=="object"&&D!==null?Br(D):$s,T.state=o.memoizedState,D=u.getDerivedStateFromProps,typeof D=="function"&&(Dg(o,u,D,p),T.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(D=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),D!==T.state&&Lg.enqueueReplaceState(T,T.state,null),Vc(o,p,T,E),Hc(),T.state=o.memoizedState),typeof T.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(i===null){T=o.stateNode;var F=o.memoizedProps,ee=Qo(u,F);T.props=ee;var de=T.context,Ee=u.contextType;D=$s,typeof Ee=="object"&&Ee!==null&&(D=Br(Ee));var xe=u.getDerivedStateFromProps;Ee=typeof xe=="function"||typeof T.getSnapshotBeforeUpdate=="function",F=o.pendingProps!==F,Ee||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(F||de!==D)&&BN(o,T,p,D),Vi=!1;var fe=o.memoizedState;T.state=fe,Vc(o,p,T,E),Hc(),de=o.memoizedState,F||fe!==de||Vi?(typeof xe=="function"&&(Dg(o,u,xe,p),de=o.memoizedState),(ee=Vi||$N(o,u,ee,p,fe,de,D))?(Ee||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(o.flags|=4194308)):(typeof T.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=de),T.props=p,T.state=de,T.context=D,p=ee):(typeof T.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{T=o.stateNode,ug(i,o),D=o.memoizedProps,Ee=Qo(u,D),T.props=Ee,xe=o.pendingProps,fe=T.context,de=u.contextType,ee=$s,typeof de=="object"&&de!==null&&(ee=Br(de)),F=u.getDerivedStateFromProps,(de=typeof F=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(D!==xe||fe!==ee)&&BN(o,T,p,ee),Vi=!1,fe=o.memoizedState,T.state=fe,Vc(o,p,T,E),Hc();var be=o.memoizedState;D!==xe||fe!==be||Vi||i!==null&&i.dependencies!==null&&of(i.dependencies)?(typeof F=="function"&&(Dg(o,u,F,p),be=o.memoizedState),(Ee=Vi||$N(o,u,Ee,p,fe,be,ee)||i!==null&&i.dependencies!==null&&of(i.dependencies))?(de||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(p,be,ee),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(p,be,ee)),typeof T.componentDidUpdate=="function"&&(o.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof T.componentDidUpdate!="function"||D===i.memoizedProps&&fe===i.memoizedState||(o.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&fe===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=be),T.props=p,T.state=be,T.context=ee,p=Ee):(typeof T.componentDidUpdate!="function"||D===i.memoizedProps&&fe===i.memoizedState||(o.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&fe===i.memoizedState||(o.flags|=1024),p=!1)}return T=p,Tf(i,o),p=(o.flags&128)!==0,T||p?(T=o.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:T.render(),o.flags|=1,i!==null&&p?(o.child=Zo(o,i.child,null,E),o.child=Zo(o,null,u,E)):qr(i,o,u,E),o.memoizedState=T.state,i=o.child):i=si(i,o,E),i}function n1(i,o,u,p){return Ho(),o.flags|=256,qr(i,o,u,p),o.child}var Ug={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fg(i){return{baseLanes:i,cachePool:GC()}}function zg(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Ln),i}function a1(i,o,u){var p=o.pendingProps,E=!1,T=(o.flags&128)!==0,D;if((D=T)||(D=i!==null&&i.memoizedState===null?!1:(vr.current&2)!==0),D&&(E=!0,o.flags&=-129),D=(o.flags&32)!==0,o.flags&=-33,i===null){if(At){if(E?Yi(o):Ki(),(i=Jt)?(i=fk(i,Kn),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:$i!==null?{id:Ra,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},u=jC(i),u.return=o,o.child=u,$r=o,Jt=null)):i=null,i===null)throw qi(o);return wv(i)?o.lanes=32:o.lanes=536870912,null}var F=p.children;return p=p.fallback,E?(Ki(),E=o.mode,F=Rf({mode:"hidden",children:F},E),p=qo(p,E,u,null),F.return=o,p.return=o,F.sibling=p,o.child=F,p=o.child,p.memoizedState=Fg(u),p.childLanes=zg(i,D,u),o.memoizedState=Ug,Zc(null,p)):(Yi(o),$g(o,F))}var ee=i.memoizedState;if(ee!==null&&(F=ee.dehydrated,F!==null)){if(T)o.flags&256?(Yi(o),o.flags&=-257,o=Bg(i,o,u)):o.memoizedState!==null?(Ki(),o.child=i.child,o.flags|=128,o=null):(Ki(),F=p.fallback,E=o.mode,p=Rf({mode:"visible",children:p.children},E),F=qo(F,E,u,null),F.flags|=2,p.return=o,F.return=o,p.sibling=F,o.child=p,Zo(o,i.child,null,u),p=o.child,p.memoizedState=Fg(u),p.childLanes=zg(i,D,u),o.memoizedState=Ug,o=Zc(null,p));else if(Yi(o),wv(F)){if(D=F.nextSibling&&F.nextSibling.dataset,D)var de=D.dgst;D=de,p=Error(n(419)),p.stack="",p.digest=D,Uc({value:p,source:null,stack:null}),o=Bg(i,o,u)}else if(_r||Vs(i,o,u,!1),D=(u&i.childLanes)!==0,_r||D){if(D=Kt,D!==null&&(p=Fr(D,u),p!==0&&p!==ee.retryLane))throw ee.retryLane=p,Bo(i,p),En(D,i,p),Pg;Sv(F)||Mf(),o=Bg(i,o,u)}else Sv(F)?(o.flags|=192,o.child=i.child,o=null):(i=ee.treeContext,Jt=Xn(F.nextSibling),$r=o,At=!0,Bi=null,Kn=!1,i!==null&&zC(o,i),o=$g(o,p.children),o.flags|=4096);return o}return E?(Ki(),F=p.fallback,E=o.mode,ee=i.child,de=ee.sibling,p=ti(ee,{mode:"hidden",children:p.children}),p.subtreeFlags=ee.subtreeFlags&65011712,de!==null?F=ti(de,F):(F=qo(F,E,u,null),F.flags|=2),F.return=o,p.return=o,p.sibling=F,o.child=p,Zc(null,p),p=o.child,F=i.child.memoizedState,F===null?F=Fg(u):(E=F.cachePool,E!==null?(ee=wr._currentValue,E=E.parent!==ee?{parent:ee,pool:ee}:E):E=GC(),F={baseLanes:F.baseLanes|u,cachePool:E}),p.memoizedState=F,p.childLanes=zg(i,D,u),o.memoizedState=Ug,Zc(i.child,p)):(Yi(o),u=i.child,i=u.sibling,u=ti(u,{mode:"visible",children:p.children}),u.return=o,u.sibling=null,i!==null&&(D=o.deletions,D===null?(o.deletions=[i],o.flags|=16):D.push(i)),o.child=u,o.memoizedState=null,u)}function $g(i,o){return o=Rf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Rf(i,o){return i=kn(22,i,null,o),i.lanes=0,i}function Bg(i,o,u){return Zo(o,i.child,null,u),i=$g(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function i1(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),ng(i.return,o,u)}function qg(i,o,u,p,E,T){var D=i.memoizedState;D===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:E,treeForkCount:T}:(D.isBackwards=o,D.rendering=null,D.renderingStartTime=0,D.last=p,D.tail=u,D.tailMode=E,D.treeForkCount=T)}function o1(i,o,u){var p=o.pendingProps,E=p.revealOrder,T=p.tail;p=p.children;var D=vr.current,F=(D&2)!==0;if(F?(D=D&1|2,o.flags|=128):D&=1,$(vr,D),qr(i,o,p,u),p=At?jc:0,!F&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&i1(i,u,o);else if(i.tag===19)i1(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(E){case"forwards":for(u=o.child,E=null;u!==null;)i=u.alternate,i!==null&&mf(i)===null&&(E=u),u=u.sibling;u=E,u===null?(E=o.child,o.child=null):(E=u.sibling,u.sibling=null),qg(o,!1,E,u,T,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&mf(i)===null){o.child=E;break}i=E.sibling,E.sibling=u,u=E,E=i}qg(o,!0,u,null,T,p);break;case"together":qg(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function si(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Qi|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(Vs(i,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,u=ti(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=ti(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function Hg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&of(i)))}function sG(i,o,u){switch(o.tag){case 3:Z(o,o.stateNode.containerInfo),Hi(o,wr,i.memoizedState.cache),Ho();break;case 27:case 5:G(o);break;case 4:Z(o,o.stateNode.containerInfo);break;case 10:Hi(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,hg(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Yi(o),o.flags|=128,null):(u&o.child.childLanes)!==0?a1(i,o,u):(Yi(o),i=si(i,o,u),i!==null?i.sibling:null);Yi(o);break;case 19:var E=(i.flags&128)!==0;if(p=(u&o.childLanes)!==0,p||(Vs(i,o,u,!1),p=(u&o.childLanes)!==0),E){if(p)return o1(i,o,u);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),$(vr,vr.current),p)break;return null;case 22:return o.lanes=0,QN(i,o,u,o.pendingProps);case 24:Hi(o,wr,i.memoizedState.cache)}return si(i,o,u)}function s1(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)_r=!0;else{if(!Hg(i,u)&&(o.flags&128)===0)return _r=!1,sG(i,o,u);_r=(i.flags&131072)!==0}else _r=!1,At&&(o.flags&1048576)!==0&&FC(o,jc,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=Yo(o.elementType),o.type=i,typeof i=="function")Kh(i)?(p=Qo(i,p),o.tag=1,o=r1(null,o,i,p,u)):(o.tag=0,o=jg(null,o,i,p,u));else{if(i!=null){var E=i.$$typeof;if(E===C){o.tag=11,o=KN(null,o,i,p,u);break e}else if(E===I){o.tag=14,o=ZN(null,o,i,p,u);break e}}throw o=Q(i)||i,Error(n(306,o,""))}}return o;case 0:return jg(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,E=Qo(p,o.pendingProps),r1(i,o,p,E,u);case 3:e:{if(Z(o,o.stateNode.containerInfo),i===null)throw Error(n(387));p=o.pendingProps;var T=o.memoizedState;E=T.element,ug(i,o),Vc(o,p,null,u);var D=o.memoizedState;if(p=D.cache,Hi(o,wr,p),p!==T.cache&&ag(o,[wr],u,!0),Hc(),p=D.element,T.isDehydrated)if(T={element:p,isDehydrated:!1,cache:D.cache},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){o=n1(i,o,p,u);break e}else if(p!==E){E=Gn(Error(n(424)),o),Uc(E),o=n1(i,o,p,u);break e}else{switch(i=o.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(Jt=Xn(i.firstChild),$r=o,At=!0,Bi=null,Kn=!0,u=QC(o,null,p,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Ho(),p===E){o=si(i,o,u);break e}qr(i,o,p,u)}o=o.child}return o;case 26:return Tf(i,o),i===null?(u=bk(o.type,null,o.pendingProps,null))?o.memoizedState=u:At||(u=o.type,i=o.pendingProps,p=Bf(z.current).createElement(u),p[Pe]=o,p[Ue]=i,Hr(p,u,i),zt(p),o.stateNode=p):o.memoizedState=bk(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return G(o),i===null&&At&&(p=o.stateNode=hk(o.type,o.pendingProps,z.current),$r=o,Kn=!0,E=Jt,no(o.type)?(xv=E,Jt=Xn(p.firstChild)):Jt=E),qr(i,o,o.pendingProps.children,u),Tf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&At&&((E=p=Jt)&&(p=jG(p,o.type,o.pendingProps,Kn),p!==null?(o.stateNode=p,$r=o,Jt=Xn(p.firstChild),Kn=!1,E=!0):E=!1),E||qi(o)),G(o),E=o.type,T=o.pendingProps,D=i!==null?i.memoizedProps:null,p=T.children,bv(E,T)?p=null:D!==null&&bv(E,D)&&(o.flags|=32),o.memoizedState!==null&&(E=vg(i,o,QV,null,null,u),du._currentValue=E),Tf(i,o),qr(i,o,p,u),o.child;case 6:return i===null&&At&&((i=u=Jt)&&(u=UG(u,o.pendingProps,Kn),u!==null?(o.stateNode=u,$r=o,Jt=null,i=!0):i=!1),i||qi(o)),null;case 13:return a1(i,o,u);case 4:return Z(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Zo(o,null,p,u):qr(i,o,p,u),o.child;case 11:return KN(i,o,o.type,o.pendingProps,u);case 7:return qr(i,o,o.pendingProps,u),o.child;case 8:return qr(i,o,o.pendingProps.children,u),o.child;case 12:return qr(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,Hi(o,o.type,p.value),qr(i,o,p.children,u),o.child;case 9:return E=o.type._context,p=o.pendingProps.children,Go(o),E=Br(E),p=p(E),o.flags|=1,qr(i,o,p,u),o.child;case 14:return ZN(i,o,o.type,o.pendingProps,u);case 15:return XN(i,o,o.type,o.pendingProps,u);case 19:return o1(i,o,u);case 31:return oG(i,o,u);case 22:return QN(i,o,u,o.pendingProps);case 24:return Go(o),p=Br(wr),i===null?(E=sg(),E===null&&(E=Kt,T=ig(),E.pooledCache=T,T.refCount++,T!==null&&(E.pooledCacheLanes|=u),E=T),o.memoizedState={parent:p,cache:E},cg(o),Hi(o,wr,E)):((i.lanes&u)!==0&&(ug(i,o),Vc(o,null,null,u),Hc()),E=i.memoizedState,T=o.memoizedState,E.parent!==p?(E={parent:p,cache:p},o.memoizedState=E,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=E),Hi(o,wr,p)):(p=T.cache,Hi(o,wr,p),p!==E.cache&&ag(o,[wr],u,!0))),qr(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(n(156,o.tag))}function li(i){i.flags|=4}function Vg(i,o,u,p,E){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(E&335544128)===E)if(i.stateNode.complete)i.flags|=8192;else if(L1())i.flags|=8192;else throw Ko=uf,lg}else i.flags&=-16777217}function l1(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!xk(o))if(L1())i.flags|=8192;else throw Ko=uf,lg}function Af(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Lr():536870912,i.lanes|=o,nl|=o)}function Xc(i,o){if(!At)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function er(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(o)for(var E=i.child;E!==null;)u|=E.lanes|E.childLanes,p|=E.subtreeFlags&65011712,p|=E.flags&65011712,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)u|=E.lanes|E.childLanes,p|=E.subtreeFlags,p|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=p,i.childLanes=u,o}function lG(i,o,u){var p=o.pendingProps;switch(Jh(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(o),null;case 1:return er(o),null;case 3:return u=o.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),ai(wr),ne(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Hs(o)?li(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,tg())),er(o),null;case 26:var E=o.type,T=o.memoizedState;return i===null?(li(o),T!==null?(er(o),l1(o,T)):(er(o),Vg(o,E,null,p,u))):T?T!==i.memoizedState?(li(o),er(o),l1(o,T)):(er(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&li(o),er(o),Vg(o,E,i,p,u)),null;case 27:if(ce(o),u=z.current,E=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&li(o);else{if(!p){if(o.stateNode===null)throw Error(n(166));return er(o),null}i=K.current,Hs(o)?$C(o):(i=hk(E,p,u),o.stateNode=i,li(o))}return er(o),null;case 5:if(ce(o),E=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&li(o);else{if(!p){if(o.stateNode===null)throw Error(n(166));return er(o),null}if(T=K.current,Hs(o))$C(o);else{var D=Bf(z.current);switch(T){case 1:T=D.createElementNS("http://www.w3.org/2000/svg",E);break;case 2:T=D.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;default:switch(E){case"svg":T=D.createElementNS("http://www.w3.org/2000/svg",E);break;case"math":T=D.createElementNS("http://www.w3.org/1998/Math/MathML",E);break;case"script":T=D.createElement("div"),T.innerHTML="<script><\/script>",T=T.removeChild(T.firstChild);break;case"select":T=typeof p.is=="string"?D.createElement("select",{is:p.is}):D.createElement("select"),p.multiple?T.multiple=!0:p.size&&(T.size=p.size);break;default:T=typeof p.is=="string"?D.createElement(E,{is:p.is}):D.createElement(E)}}T[Pe]=o,T[Ue]=p;e:for(D=o.child;D!==null;){if(D.tag===5||D.tag===6)T.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===o)break e;for(;D.sibling===null;){if(D.return===null||D.return===o)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}o.stateNode=T;e:switch(Hr(T,E,p),E){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&li(o)}}return er(o),Vg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==p&&li(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(n(166));if(i=z.current,Hs(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,E=$r,E!==null)switch(E.tag){case 27:case 5:p=E.memoizedProps}i[Pe]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||ak(i.nodeValue,u)),i||qi(o,!0)}else i=Bf(i).createTextNode(p),i[Pe]=o,o.stateNode=i}return er(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=Hs(o),u!==null){if(i===null){if(!p)throw Error(n(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(557));i[Pe]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;er(o),i=!1}else u=tg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(On(o),o):(On(o),null);if((o.flags&128)!==0)throw Error(n(558))}return er(o),null;case 13:if(p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(E=Hs(o),p!==null&&p.dehydrated!==null){if(i===null){if(!E)throw Error(n(318));if(E=o.memoizedState,E=E!==null?E.dehydrated:null,!E)throw Error(n(317));E[Pe]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;er(o),E=!1}else E=tg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=E),E=!0;if(!E)return o.flags&256?(On(o),o):(On(o),null)}return On(o),(o.flags&128)!==0?(o.lanes=u,o):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=o.child,E=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(E=p.alternate.memoizedState.cachePool.pool),T=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(T=p.memoizedState.cachePool.pool),T!==E&&(p.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),Af(o,o.updateQueue),er(o),null);case 4:return ne(),i===null&&pv(o.stateNode.containerInfo),er(o),null;case 10:return ai(o.type),er(o),null;case 19:if(q(vr),p=o.memoizedState,p===null)return er(o),null;if(E=(o.flags&128)!==0,T=p.rendering,T===null)if(E)Xc(p,!1);else{if(pr!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(T=mf(i),T!==null){for(o.flags|=128,Xc(p,!1),i=T.updateQueue,o.updateQueue=i,Af(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)PC(u,i),u=u.sibling;return $(vr,vr.current&1|2),At&&ri(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&Ae()>Of&&(o.flags|=128,E=!0,Xc(p,!1),o.lanes=4194304)}else{if(!E)if(i=mf(T),i!==null){if(o.flags|=128,E=!0,i=i.updateQueue,o.updateQueue=i,Af(o,i),Xc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!T.alternate&&!At)return er(o),null}else 2*Ae()-p.renderingStartTime>Of&&u!==536870912&&(o.flags|=128,E=!0,Xc(p,!1),o.lanes=4194304);p.isBackwards?(T.sibling=o.child,o.child=T):(i=p.last,i!==null?i.sibling=T:o.child=T,p.last=T)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=Ae(),i.sibling=null,u=vr.current,$(vr,E?u&1|2:u&1),At&&ri(o,p.treeForkCount),i):(er(o),null);case 22:case 23:return On(o),mg(),p=o.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(o.flags|=8192):p&&(o.flags|=8192),p?(u&536870912)!==0&&(o.flags&128)===0&&(er(o),o.subtreeFlags&6&&(o.flags|=8192)):er(o),u=o.updateQueue,u!==null&&Af(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==u&&(o.flags|=2048),i!==null&&q(Wo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),ai(wr),er(o),null;case 25:return null;case 30:return null}throw Error(n(156,o.tag))}function cG(i,o){switch(Jh(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return ai(wr),ne(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return ce(o),null;case 31:if(o.memoizedState!==null){if(On(o),o.alternate===null)throw Error(n(340));Ho()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(On(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ho()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return q(vr),null;case 4:return ne(),null;case 10:return ai(o.type),null;case 22:case 23:return On(o),mg(),i!==null&&q(Wo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return ai(wr),null;case 25:return null;default:return null}}function c1(i,o){switch(Jh(o),o.tag){case 3:ai(wr),ne();break;case 26:case 27:case 5:ce(o);break;case 4:ne();break;case 31:o.memoizedState!==null&&On(o);break;case 13:On(o);break;case 19:q(vr);break;case 10:ai(o.type);break;case 22:case 23:On(o),mg(),i!==null&&q(Wo);break;case 24:ai(wr)}}function Qc(i,o){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var E=p.next;u=E;do{if((u.tag&i)===i){p=void 0;var T=u.create,D=u.inst;p=T(),D.destroy=p}u=u.next}while(u!==E)}}catch(F){Bt(o,o.return,F)}}function Zi(i,o,u){try{var p=o.updateQueue,E=p!==null?p.lastEffect:null;if(E!==null){var T=E.next;p=T;do{if((p.tag&i)===i){var D=p.inst,F=D.destroy;if(F!==void 0){D.destroy=void 0,E=o;var ee=u,de=F;try{de()}catch(Ee){Bt(E,ee,Ee)}}}p=p.next}while(p!==T)}}catch(Ee){Bt(o,o.return,Ee)}}function u1(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{eN(o,u)}catch(p){Bt(i,i.return,p)}}}function d1(i,o,u){u.props=Qo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){Bt(i,o,p)}}function Jc(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(E){Bt(i,o,E)}}function Ca(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(E){Bt(i,o,E)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(E){Bt(i,o,E)}else u.current=null}function f1(i){var o=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(E){Bt(i,i.return,E)}}function Gg(i,o,u){try{var p=i.stateNode;IG(p,i.type,u,o),p[Ue]=o}catch(E){Bt(i,i.return,E)}}function p1(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&no(i.type)||i.tag===4}function Wg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||p1(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&no(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Yg(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Ja));else if(p!==4&&(p===27&&no(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(Yg(i,o,u),i=i.sibling;i!==null;)Yg(i,o,u),i=i.sibling}function Cf(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(p!==4&&(p===27&&no(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(Cf(i,o,u),i=i.sibling;i!==null;)Cf(i,o,u),i=i.sibling}function m1(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,E=o.attributes;E.length;)o.removeAttributeNode(E[0]);Hr(o,p,u),o[Pe]=i,o[Ue]=u}catch(T){Bt(i,i.return,T)}}var ci=!1,Tr=!1,Kg=!1,h1=typeof WeakSet=="function"?WeakSet:Set,Mr=null;function uG(i,o){if(i=i.containerInfo,gv=Kf,i=AC(i),Bh(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var E=p.anchorOffset,T=p.focusNode;p=p.focusOffset;try{u.nodeType,T.nodeType}catch{u=null;break e}var D=0,F=-1,ee=-1,de=0,Ee=0,xe=i,fe=null;t:for(;;){for(var be;xe!==u||E!==0&&xe.nodeType!==3||(F=D+E),xe!==T||p!==0&&xe.nodeType!==3||(ee=D+p),xe.nodeType===3&&(D+=xe.nodeValue.length),(be=xe.firstChild)!==null;)fe=xe,xe=be;for(;;){if(xe===i)break t;if(fe===u&&++de===E&&(F=D),fe===T&&++Ee===p&&(ee=D),(be=xe.nextSibling)!==null)break;xe=fe,fe=xe.parentNode}xe=be}u=F===-1||ee===-1?null:{start:F,end:ee}}else u=null}u=u||{start:0,end:0}}else u=null;for(vv={focusedElem:i,selectionRange:u},Kf=!1,Mr=o;Mr!==null;)if(o=Mr,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Mr=i;else for(;Mr!==null;){switch(o=Mr,T=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)E=i[u],E.ref.impl=E.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&T!==null){i=void 0,u=o,E=T.memoizedProps,T=T.memoizedState,p=u.stateNode;try{var Be=Qo(u.type,E);i=p.getSnapshotBeforeUpdate(Be,T),p.__reactInternalSnapshotBeforeUpdate=i}catch(Qe){Bt(u,u.return,Qe)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Ev(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Ev(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(n(163))}if(i=o.sibling,i!==null){i.return=o.return,Mr=i;break}Mr=o.return}}function g1(i,o,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:di(i,u),p&4&&Qc(5,u);break;case 1:if(di(i,u),p&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(D){Bt(u,u.return,D)}else{var E=Qo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(E,o,i.__reactInternalSnapshotBeforeUpdate)}catch(D){Bt(u,u.return,D)}}p&64&&u1(u),p&512&&Jc(u,u.return);break;case 3:if(di(i,u),p&64&&(i=u.updateQueue,i!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{eN(i,o)}catch(D){Bt(u,u.return,D)}}break;case 27:o===null&&p&4&&m1(u);case 26:case 5:di(i,u),o===null&&p&4&&f1(u),p&512&&Jc(u,u.return);break;case 12:di(i,u);break;case 31:di(i,u),p&4&&y1(i,u);break;case 13:di(i,u),p&4&&E1(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=yG.bind(null,u),FG(i,u))));break;case 22:if(p=u.memoizedState!==null||ci,!p){o=o!==null&&o.memoizedState!==null||Tr,E=ci;var T=Tr;ci=p,(Tr=o)&&!T?fi(i,u,(u.subtreeFlags&8772)!==0):di(i,u),ci=E,Tr=T}break;case 30:break;default:di(i,u)}}function v1(i){var o=i.alternate;o!==null&&(i.alternate=null,v1(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&nt(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var tr=null,gn=!1;function ui(i,o,u){for(u=u.child;u!==null;)b1(i,o,u),u=u.sibling}function b1(i,o,u){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(ir,u)}catch{}switch(u.tag){case 26:Tr||Ca(u,o),ui(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Tr||Ca(u,o);var p=tr,E=gn;no(u.type)&&(tr=u.stateNode,gn=!1),ui(i,o,u),lu(u.stateNode),tr=p,gn=E;break;case 5:Tr||Ca(u,o);case 6:if(p=tr,E=gn,tr=null,ui(i,o,u),tr=p,gn=E,tr!==null)if(gn)try{(tr.nodeType===9?tr.body:tr.nodeName==="HTML"?tr.ownerDocument.body:tr).removeChild(u.stateNode)}catch(T){Bt(u,o,T)}else try{tr.removeChild(u.stateNode)}catch(T){Bt(u,o,T)}break;case 18:tr!==null&&(gn?(i=tr,uk(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),dl(i)):uk(tr,u.stateNode));break;case 4:p=tr,E=gn,tr=u.stateNode.containerInfo,gn=!0,ui(i,o,u),tr=p,gn=E;break;case 0:case 11:case 14:case 15:Zi(2,u,o),Tr||Zi(4,u,o),ui(i,o,u);break;case 1:Tr||(Ca(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&d1(u,o,p)),ui(i,o,u);break;case 21:ui(i,o,u);break;case 22:Tr=(p=Tr)||u.memoizedState!==null,ui(i,o,u),Tr=p;break;default:ui(i,o,u)}}function y1(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{dl(i)}catch(u){Bt(o,o.return,u)}}}function E1(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{dl(i)}catch(u){Bt(o,o.return,u)}}function dG(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new h1),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new h1),o;default:throw Error(n(435,i.tag))}}function Nf(i,o){var u=dG(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var E=EG.bind(null,i,p);p.then(E,E)}})}function vn(i,o){var u=o.deletions;if(u!==null)for(var p=0;p<u.length;p++){var E=u[p],T=i,D=o,F=D;e:for(;F!==null;){switch(F.tag){case 27:if(no(F.type)){tr=F.stateNode,gn=!1;break e}break;case 5:tr=F.stateNode,gn=!1;break e;case 3:case 4:tr=F.stateNode.containerInfo,gn=!0;break e}F=F.return}if(tr===null)throw Error(n(160));b1(T,D,E),tr=null,gn=!1,T=E.alternate,T!==null&&(T.return=null),E.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)S1(o,i),o=o.sibling}var fa=null;function S1(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:vn(o,i),bn(i),p&4&&(Zi(3,i,i.return),Qc(3,i),Zi(5,i,i.return));break;case 1:vn(o,i),bn(i),p&512&&(Tr||u===null||Ca(u,u.return)),p&64&&ci&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var E=fa;if(vn(o,i),bn(i),p&512&&(Tr||u===null||Ca(u,u.return)),p&4){var T=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,E=E.ownerDocument||E;t:switch(p){case"title":T=E.getElementsByTagName("title")[0],(!T||T[Wt]||T[Pe]||T.namespaceURI==="http://www.w3.org/2000/svg"||T.hasAttribute("itemprop"))&&(T=E.createElement(p),E.head.insertBefore(T,E.querySelector("head > title"))),Hr(T,p,u),T[Pe]=i,zt(T),p=T;break e;case"link":var D=Sk("link","href",E).get(p+(u.href||""));if(D){for(var F=0;F<D.length;F++)if(T=D[F],T.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&T.getAttribute("rel")===(u.rel==null?null:u.rel)&&T.getAttribute("title")===(u.title==null?null:u.title)&&T.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){D.splice(F,1);break t}}T=E.createElement(p),Hr(T,p,u),E.head.appendChild(T);break;case"meta":if(D=Sk("meta","content",E).get(p+(u.content||""))){for(F=0;F<D.length;F++)if(T=D[F],T.getAttribute("content")===(u.content==null?null:""+u.content)&&T.getAttribute("name")===(u.name==null?null:u.name)&&T.getAttribute("property")===(u.property==null?null:u.property)&&T.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&T.getAttribute("charset")===(u.charSet==null?null:u.charSet)){D.splice(F,1);break t}}T=E.createElement(p),Hr(T,p,u),E.head.appendChild(T);break;default:throw Error(n(468,p))}T[Pe]=i,zt(T),p=T}i.stateNode=p}else wk(E,i.type,i.stateNode);else i.stateNode=Ek(E,p,i.memoizedProps);else T!==p?(T===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):T.count--,p===null?wk(E,i.type,i.stateNode):Ek(E,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Gg(i,i.memoizedProps,u.memoizedProps)}break;case 27:vn(o,i),bn(i),p&512&&(Tr||u===null||Ca(u,u.return)),u!==null&&p&4&&Gg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(vn(o,i),bn(i),p&512&&(Tr||u===null||Ca(u,u.return)),i.flags&32){E=i.stateNode;try{Ls(E,"")}catch(Be){Bt(i,i.return,Be)}}p&4&&i.stateNode!=null&&(E=i.memoizedProps,Gg(i,E,u!==null?u.memoizedProps:E)),p&1024&&(Kg=!0);break;case 6:if(vn(o,i),bn(i),p&4){if(i.stateNode===null)throw Error(n(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(Be){Bt(i,i.return,Be)}}break;case 3:if(Vf=null,E=fa,fa=qf(o.containerInfo),vn(o,i),fa=E,bn(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{dl(o.containerInfo)}catch(Be){Bt(i,i.return,Be)}Kg&&(Kg=!1,w1(i));break;case 4:p=fa,fa=qf(i.stateNode.containerInfo),vn(o,i),bn(i),fa=p;break;case 12:vn(o,i),bn(i);break;case 31:vn(o,i),bn(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Nf(i,p)));break;case 13:vn(o,i),bn(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(If=Ae()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Nf(i,p)));break;case 22:E=i.memoizedState!==null;var ee=u!==null&&u.memoizedState!==null,de=ci,Ee=Tr;if(ci=de||E,Tr=Ee||ee,vn(o,i),Tr=Ee,ci=de,bn(i),p&8192)e:for(o=i.stateNode,o._visibility=E?o._visibility&-2:o._visibility|1,E&&(u===null||ee||ci||Tr||Jo(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){ee=u=o;try{if(T=ee.stateNode,E)D=T.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{F=ee.stateNode;var xe=ee.memoizedProps.style,fe=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;F.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(Be){Bt(ee,ee.return,Be)}}}else if(o.tag===6){if(u===null){ee=o;try{ee.stateNode.nodeValue=E?"":ee.memoizedProps}catch(Be){Bt(ee,ee.return,Be)}}}else if(o.tag===18){if(u===null){ee=o;try{var be=ee.stateNode;E?dk(be,!0):dk(ee.stateNode,!1)}catch(Be){Bt(ee,ee.return,Be)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,Nf(i,u))));break;case 19:vn(o,i),bn(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,Nf(i,p)));break;case 30:break;case 21:break;default:vn(o,i),bn(i)}}function bn(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(p1(p)){u=p;break}p=p.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var E=u.stateNode,T=Wg(i);Cf(i,T,E);break;case 5:var D=u.stateNode;u.flags&32&&(Ls(D,""),u.flags&=-33);var F=Wg(i);Cf(i,F,D);break;case 3:case 4:var ee=u.stateNode.containerInfo,de=Wg(i);Yg(i,de,ee);break;default:throw Error(n(161))}}catch(Ee){Bt(i,i.return,Ee)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function w1(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;w1(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function di(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)g1(i,o.alternate,o),o=o.sibling}function Jo(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Zi(4,o,o.return),Jo(o);break;case 1:Ca(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&d1(o,o.return,u),Jo(o);break;case 27:lu(o.stateNode);case 26:case 5:Ca(o,o.return),Jo(o);break;case 22:o.memoizedState===null&&Jo(o);break;case 30:Jo(o);break;default:Jo(o)}i=i.sibling}}function fi(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,E=i,T=o,D=T.flags;switch(T.tag){case 0:case 11:case 15:fi(E,T,u),Qc(4,T);break;case 1:if(fi(E,T,u),p=T,E=p.stateNode,typeof E.componentDidMount=="function")try{E.componentDidMount()}catch(de){Bt(p,p.return,de)}if(p=T,E=p.updateQueue,E!==null){var F=p.stateNode;try{var ee=E.shared.hiddenCallbacks;if(ee!==null)for(E.shared.hiddenCallbacks=null,E=0;E<ee.length;E++)JC(ee[E],F)}catch(de){Bt(p,p.return,de)}}u&&D&64&&u1(T),Jc(T,T.return);break;case 27:m1(T);case 26:case 5:fi(E,T,u),u&&p===null&&D&4&&f1(T),Jc(T,T.return);break;case 12:fi(E,T,u);break;case 31:fi(E,T,u),u&&D&4&&y1(E,T);break;case 13:fi(E,T,u),u&&D&4&&E1(E,T);break;case 22:T.memoizedState===null&&fi(E,T,u),Jc(T,T.return);break;case 30:break;default:fi(E,T,u)}o=o.sibling}}function Zg(i,o){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&Fc(u))}function Xg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Fc(i))}function pa(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)x1(i,o,u,p),o=o.sibling}function x1(i,o,u,p){var E=o.flags;switch(o.tag){case 0:case 11:case 15:pa(i,o,u,p),E&2048&&Qc(9,o);break;case 1:pa(i,o,u,p);break;case 3:pa(i,o,u,p),E&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Fc(i)));break;case 12:if(E&2048){pa(i,o,u,p),i=o.stateNode;try{var T=o.memoizedProps,D=T.id,F=T.onPostCommit;typeof F=="function"&&F(D,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(ee){Bt(o,o.return,ee)}}else pa(i,o,u,p);break;case 31:pa(i,o,u,p);break;case 13:pa(i,o,u,p);break;case 23:break;case 22:T=o.stateNode,D=o.alternate,o.memoizedState!==null?T._visibility&2?pa(i,o,u,p):eu(i,o):T._visibility&2?pa(i,o,u,p):(T._visibility|=2,el(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),E&2048&&Zg(D,o);break;case 24:pa(i,o,u,p),E&2048&&Xg(o.alternate,o);break;default:pa(i,o,u,p)}}function el(i,o,u,p,E){for(E=E&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var T=i,D=o,F=u,ee=p,de=D.flags;switch(D.tag){case 0:case 11:case 15:el(T,D,F,ee,E),Qc(8,D);break;case 23:break;case 22:var Ee=D.stateNode;D.memoizedState!==null?Ee._visibility&2?el(T,D,F,ee,E):eu(T,D):(Ee._visibility|=2,el(T,D,F,ee,E)),E&&de&2048&&Zg(D.alternate,D);break;case 24:el(T,D,F,ee,E),E&&de&2048&&Xg(D.alternate,D);break;default:el(T,D,F,ee,E)}o=o.sibling}}function eu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,p=o,E=p.flags;switch(p.tag){case 22:eu(u,p),E&2048&&Zg(p.alternate,p);break;case 24:eu(u,p),E&2048&&Xg(p.alternate,p);break;default:eu(u,p)}o=o.sibling}}var tu=8192;function tl(i,o,u){if(i.subtreeFlags&tu)for(i=i.child;i!==null;)_1(i,o,u),i=i.sibling}function _1(i,o,u){switch(i.tag){case 26:tl(i,o,u),i.flags&tu&&i.memoizedState!==null&&XG(u,fa,i.memoizedState,i.memoizedProps);break;case 5:tl(i,o,u);break;case 3:case 4:var p=fa;fa=qf(i.stateNode.containerInfo),tl(i,o,u),fa=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=tu,tu=16777216,tl(i,o,u),tu=p):tl(i,o,u));break;default:tl(i,o,u)}}function T1(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function ru(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Mr=p,A1(p,i)}T1(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)R1(i),i=i.sibling}function R1(i){switch(i.tag){case 0:case 11:case 15:ru(i),i.flags&2048&&Zi(9,i,i.return);break;case 3:ru(i);break;case 12:ru(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,kf(i)):ru(i);break;default:ru(i)}}function kf(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Mr=p,A1(p,i)}T1(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Zi(8,o,o.return),kf(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,kf(o));break;default:kf(o)}i=i.sibling}}function A1(i,o){for(;Mr!==null;){var u=Mr;switch(u.tag){case 0:case 11:case 15:Zi(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Fc(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Mr=p;else e:for(u=i;Mr!==null;){p=Mr;var E=p.sibling,T=p.return;if(v1(p),p===u){Mr=null;break e}if(E!==null){E.return=T,Mr=E;break e}Mr=T}}}var fG={getCacheForType:function(i){var o=Br(wr),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return Br(wr).controller.signal}},pG=typeof WeakMap=="function"?WeakMap:Map,Lt=0,Kt=null,yt=null,xt=0,$t=0,Dn=null,Xi=!1,rl=!1,Qg=!1,pi=0,pr=0,Qi=0,es=0,Jg=0,Ln=0,nl=0,nu=null,yn=null,ev=!1,If=0,C1=0,Of=1/0,Df=null,Ji=null,Nr=0,eo=null,al=null,mi=0,tv=0,rv=null,N1=null,au=0,nv=null;function Mn(){return(Lt&2)!==0&&xt!==0?xt&-xt:U.T!==null?cv():ae()}function k1(){if(Ln===0)if((xt&536870912)===0||At){var i=pn;pn<<=1,(pn&3932160)===0&&(pn=262144),Ln=i}else Ln=536870912;return i=In.current,i!==null&&(i.flags|=32),Ln}function En(i,o,u){(i===Kt&&($t===2||$t===9)||i.cancelPendingCommit!==null)&&(il(i,0),to(i,xt,Ln,!1)),Xt(i,u),((Lt&2)===0||i!==Kt)&&(i===Kt&&((Lt&2)===0&&(es|=u),pr===4&&to(i,xt,Ln,!1)),Na(i))}function I1(i,o,u){if((Lt&6)!==0)throw Error(n(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||jt(i,o),E=p?gG(i,o):iv(i,o,!0),T=p;do{if(E===0){rl&&!p&&to(i,o,0,!1);break}else{if(u=i.current.alternate,T&&!mG(u)){E=iv(i,o,!1),T=!1;continue}if(E===2){if(T=o,i.errorRecoveryDisabledLanes&T)var D=0;else D=i.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){o=D;e:{var F=i;E=nu;var ee=F.current.memoizedState.isDehydrated;if(ee&&(il(F,D).flags|=256),D=iv(F,D,!1),D!==2){if(Qg&&!ee){F.errorRecoveryDisabledLanes|=T,es|=T,E=4;break e}T=yn,yn=E,T!==null&&(yn===null?yn=T:yn.push.apply(yn,T))}E=D}if(T=!1,E!==2)continue}}if(E===1){il(i,0),to(i,o,0,!0);break}e:{switch(p=i,T=E,T){case 0:case 1:throw Error(n(345));case 4:if((o&4194048)!==o)break;case 6:to(p,o,Ln,!Xi);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(n(329))}if((o&62914560)===o&&(E=If+300-Ae(),10<E)){if(to(p,o,Ln,!Xi),Ke(p,0,!0)!==0)break e;mi=o,p.timeoutHandle=lk(O1.bind(null,p,u,yn,Df,ev,o,Ln,es,nl,Xi,T,"Throttled",-0,0),E);break e}O1(p,u,yn,Df,ev,o,Ln,es,nl,Xi,T,null,-0,0)}}break}while(!0);Na(i)}function O1(i,o,u,p,E,T,D,F,ee,de,Ee,xe,fe,be){if(i.timeoutHandle=-1,xe=o.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ja},_1(o,T,xe);var Be=(T&62914560)===T?If-Ae():(T&4194048)===T?C1-Ae():0;if(Be=QG(xe,Be),Be!==null){mi=T,i.cancelPendingCommit=Be(z1.bind(null,i,o,T,u,p,E,D,F,ee,Ee,xe,null,fe,be)),to(i,T,D,!de);return}}z1(i,o,T,u,p,E,D,F,ee)}function mG(i){for(var o=i;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var E=u[p],T=E.getSnapshot;E=E.value;try{if(!Nn(T(),E))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function to(i,o,u,p){o&=~Jg,o&=~es,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var E=o;0<E;){var T=31-dr(E),D=1<<T;p[T]=-1,E&=~D}u!==0&&_a(i,u,o)}function Lf(){return(Lt&6)===0?(iu(0),!1):!0}function av(){if(yt!==null){if($t===0)var i=yt.return;else i=yt,ni=Vo=null,Eg(i),Ks=null,$c=0,i=yt;for(;i!==null;)c1(i.alternate,i),i=i.return;yt=null}}function il(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,LG(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),mi=0,av(),Kt=i,yt=u=ti(i.current,null),xt=o,$t=0,Dn=null,Xi=!1,rl=jt(i,o),Qg=!1,nl=Ln=Jg=es=Qi=pr=0,yn=nu=null,ev=!1,(o&8)!==0&&(o|=o&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=o;0<p;){var E=31-dr(p),T=1<<E;o|=i[E],p&=~T}return pi=o,ef(),u}function D1(i,o){ct=null,U.H=Kc,o===Ys||o===cf?(o=KC(),$t=3):o===lg?(o=KC(),$t=4):$t=o===Pg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Dn=o,yt===null&&(pr=1,xf(i,Gn(o,i.current)))}function L1(){var i=In.current;return i===null?!0:(xt&4194048)===xt?Zn===null:(xt&62914560)===xt||(xt&536870912)!==0?i===Zn:!1}function M1(){var i=U.H;return U.H=Kc,i===null?Kc:i}function P1(){var i=U.A;return U.A=fG,i}function Mf(){pr=4,Xi||(xt&4194048)!==xt&&In.current!==null||(rl=!0),(Qi&134217727)===0&&(es&134217727)===0||Kt===null||to(Kt,xt,Ln,!1)}function iv(i,o,u){var p=Lt;Lt|=2;var E=M1(),T=P1();(Kt!==i||xt!==o)&&(Df=null,il(i,o)),o=!1;var D=pr;e:do try{if($t!==0&&yt!==null){var F=yt,ee=Dn;switch($t){case 8:av(),D=6;break e;case 3:case 2:case 9:case 6:In.current===null&&(o=!0);var de=$t;if($t=0,Dn=null,ol(i,F,ee,de),u&&rl){D=0;break e}break;default:de=$t,$t=0,Dn=null,ol(i,F,ee,de)}}hG(),D=pr;break}catch(Ee){D1(i,Ee)}while(!0);return o&&i.shellSuspendCounter++,ni=Vo=null,Lt=p,U.H=E,U.A=T,yt===null&&(Kt=null,xt=0,ef()),D}function hG(){for(;yt!==null;)j1(yt)}function gG(i,o){var u=Lt;Lt|=2;var p=M1(),E=P1();Kt!==i||xt!==o?(Df=null,Of=Ae()+500,il(i,o)):rl=jt(i,o);e:do try{if($t!==0&&yt!==null){o=yt;var T=Dn;t:switch($t){case 1:$t=0,Dn=null,ol(i,o,T,1);break;case 2:case 9:if(WC(T)){$t=0,Dn=null,U1(o);break}o=function(){$t!==2&&$t!==9||Kt!==i||($t=7),Na(i)},T.then(o,o);break e;case 3:$t=7;break e;case 4:$t=5;break e;case 7:WC(T)?($t=0,Dn=null,U1(o)):($t=0,Dn=null,ol(i,o,T,7));break;case 5:var D=null;switch(yt.tag){case 26:D=yt.memoizedState;case 5:case 27:var F=yt;if(D?xk(D):F.stateNode.complete){$t=0,Dn=null;var ee=F.sibling;if(ee!==null)yt=ee;else{var de=F.return;de!==null?(yt=de,Pf(de)):yt=null}break t}}$t=0,Dn=null,ol(i,o,T,5);break;case 6:$t=0,Dn=null,ol(i,o,T,6);break;case 8:av(),pr=6;break e;default:throw Error(n(462))}}vG();break}catch(Ee){D1(i,Ee)}while(!0);return ni=Vo=null,U.H=p,U.A=E,Lt=u,yt!==null?0:(Kt=null,xt=0,ef(),pr)}function vG(){for(;yt!==null&&!$e();)j1(yt)}function j1(i){var o=s1(i.alternate,i,pi);i.memoizedProps=i.pendingProps,o===null?Pf(i):yt=o}function U1(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=t1(u,o,o.pendingProps,o.type,void 0,xt);break;case 11:o=t1(u,o,o.pendingProps,o.type.render,o.ref,xt);break;case 5:Eg(o);default:c1(u,o),o=yt=PC(o,pi),o=s1(u,o,pi)}i.memoizedProps=i.pendingProps,o===null?Pf(i):yt=o}function ol(i,o,u,p){ni=Vo=null,Eg(o),Ks=null,$c=0;var E=o.return;try{if(iG(i,E,o,u,xt)){pr=1,xf(i,Gn(u,i.current)),yt=null;return}}catch(T){if(E!==null)throw yt=E,T;pr=1,xf(i,Gn(u,i.current)),yt=null;return}o.flags&32768?(At||p===1?i=!0:rl||(xt&536870912)!==0?i=!1:(Xi=i=!0,(p===2||p===9||p===3||p===6)&&(p=In.current,p!==null&&p.tag===13&&(p.flags|=16384))),F1(o,i)):Pf(o)}function Pf(i){var o=i;do{if((o.flags&32768)!==0){F1(o,Xi);return}i=o.return;var u=lG(o.alternate,o,pi);if(u!==null){yt=u;return}if(o=o.sibling,o!==null){yt=o;return}yt=o=i}while(o!==null);pr===0&&(pr=5)}function F1(i,o){do{var u=cG(i.alternate,i);if(u!==null){u.flags&=32767,yt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){yt=i;return}yt=i=u}while(i!==null);pr=6,yt=null}function z1(i,o,u,p,E,T,D,F,ee){i.cancelPendingCommit=null;do jf();while(Nr!==0);if((Lt&6)!==0)throw Error(n(327));if(o!==null){if(o===i.current)throw Error(n(177));if(T=o.lanes|o.childLanes,T|=Wh,Zr(i,u,T,D,F,ee),i===Kt&&(yt=Kt=null,xt=0),al=o,eo=i,mi=u,tv=T,rv=E,N1=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,SG(rt,function(){return V1(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=U.T,U.T=null,E=W.p,W.p=2,D=Lt,Lt|=4;try{uG(i,o,u)}finally{Lt=D,W.p=E,U.T=p}}Nr=1,$1(),B1(),q1()}}function $1(){if(Nr===1){Nr=0;var i=eo,o=al,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=U.T,U.T=null;var p=W.p;W.p=2;var E=Lt;Lt|=4;try{S1(o,i);var T=vv,D=AC(i.containerInfo),F=T.focusedElem,ee=T.selectionRange;if(D!==F&&F&&F.ownerDocument&&RC(F.ownerDocument.documentElement,F)){if(ee!==null&&Bh(F)){var de=ee.start,Ee=ee.end;if(Ee===void 0&&(Ee=de),"selectionStart"in F)F.selectionStart=de,F.selectionEnd=Math.min(Ee,F.value.length);else{var xe=F.ownerDocument||document,fe=xe&&xe.defaultView||window;if(fe.getSelection){var be=fe.getSelection(),Be=F.textContent.length,Qe=Math.min(ee.start,Be),Vt=ee.end===void 0?Qe:Math.min(ee.end,Be);!be.extend&&Qe>Vt&&(D=Vt,Vt=Qe,Qe=D);var le=TC(F,Qe),ie=TC(F,Vt);if(le&&ie&&(be.rangeCount!==1||be.anchorNode!==le.node||be.anchorOffset!==le.offset||be.focusNode!==ie.node||be.focusOffset!==ie.offset)){var ue=xe.createRange();ue.setStart(le.node,le.offset),be.removeAllRanges(),Qe>Vt?(be.addRange(ue),be.extend(ie.node,ie.offset)):(ue.setEnd(ie.node,ie.offset),be.addRange(ue))}}}}for(xe=[],be=F;be=be.parentNode;)be.nodeType===1&&xe.push({element:be,left:be.scrollLeft,top:be.scrollTop});for(typeof F.focus=="function"&&F.focus(),F=0;F<xe.length;F++){var we=xe[F];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}Kf=!!gv,vv=gv=null}finally{Lt=E,W.p=p,U.T=u}}i.current=o,Nr=2}}function B1(){if(Nr===2){Nr=0;var i=eo,o=al,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=U.T,U.T=null;var p=W.p;W.p=2;var E=Lt;Lt|=4;try{g1(i,o.alternate,o)}finally{Lt=E,W.p=p,U.T=u}}Nr=3}}function q1(){if(Nr===4||Nr===3){Nr=0,We();var i=eo,o=al,u=mi,p=N1;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Nr=5:(Nr=0,al=eo=null,H1(i,i.pendingLanes));var E=i.pendingLanes;if(E===0&&(Ji=null),Y(u),o=o.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(ir,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=U.T,E=W.p,W.p=2,U.T=null;try{for(var T=i.onRecoverableError,D=0;D<p.length;D++){var F=p[D];T(F.value,{componentStack:F.stack})}}finally{U.T=o,W.p=E}}(mi&3)!==0&&jf(),Na(i),E=i.pendingLanes,(u&261930)!==0&&(E&42)!==0?i===nv?au++:(au=0,nv=i):au=0,iu(0)}}function H1(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,Fc(o)))}function jf(){return $1(),B1(),q1(),V1()}function V1(){if(Nr!==5)return!1;var i=eo,o=tv;tv=0;var u=Y(mi),p=U.T,E=W.p;try{W.p=32>u?32:u,U.T=null,u=rv,rv=null;var T=eo,D=mi;if(Nr=0,al=eo=null,mi=0,(Lt&6)!==0)throw Error(n(331));var F=Lt;if(Lt|=4,R1(T.current),x1(T,T.current,D,u),Lt=F,iu(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(ir,T)}catch{}return!0}finally{W.p=E,U.T=p,H1(i,o)}}function G1(i,o,u){o=Gn(u,o),o=Mg(i.stateNode,o,2),i=Wi(i,o,2),i!==null&&(Xt(i,2),Na(i))}function Bt(i,o,u){if(i.tag===3)G1(i,i,u);else for(;o!==null;){if(o.tag===3){G1(o,i,u);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Ji===null||!Ji.has(p))){i=Gn(u,i),u=WN(2),p=Wi(o,u,2),p!==null&&(YN(u,p,o,i),Xt(p,2),Na(p));break}}o=o.return}}function ov(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new pG;var E=new Set;p.set(o,E)}else E=p.get(o),E===void 0&&(E=new Set,p.set(o,E));E.has(u)||(Qg=!0,E.add(u),i=bG.bind(null,i,o,u),o.then(i,i))}function bG(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,Kt===i&&(xt&u)===u&&(pr===4||pr===3&&(xt&62914560)===xt&&300>Ae()-If?(Lt&2)===0&&il(i,0):Jg|=u,nl===xt&&(nl=0)),Na(i)}function W1(i,o){o===0&&(o=Lr()),i=Bo(i,o),i!==null&&(Xt(i,o),Na(i))}function yG(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),W1(i,u)}function EG(i,o){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,E=i.memoizedState;E!==null&&(u=E.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(n(314))}p!==null&&p.delete(o),W1(i,u)}function SG(i,o){return Xe(i,o)}var Uf=null,sl=null,sv=!1,Ff=!1,lv=!1,ro=0;function Na(i){i!==sl&&i.next===null&&(sl===null?Uf=sl=i:sl=sl.next=i),Ff=!0,sv||(sv=!0,xG())}function iu(i,o){if(!lv&&Ff){lv=!0;do for(var u=!1,p=Uf;p!==null;){if(i!==0){var E=p.pendingLanes;if(E===0)var T=0;else{var D=p.suspendedLanes,F=p.pingedLanes;T=(1<<31-dr(42|i)+1)-1,T&=E&~(D&~F),T=T&201326741?T&201326741|1:T?T|2:0}T!==0&&(u=!0,X1(p,T))}else T=xt,T=Ke(p,p===Kt?T:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(T&3)===0||jt(p,T)||(u=!0,X1(p,T));p=p.next}while(u);lv=!1}}function wG(){Y1()}function Y1(){Ff=sv=!1;var i=0;ro!==0&&DG()&&(i=ro);for(var o=Ae(),u=null,p=Uf;p!==null;){var E=p.next,T=K1(p,o);T===0?(p.next=null,u===null?Uf=E:u.next=E,E===null&&(sl=u)):(u=p,(i!==0||(T&3)!==0)&&(Ff=!0)),p=E}Nr!==0&&Nr!==5||iu(i),ro!==0&&(ro=0)}function K1(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes&-62914561;0<T;){var D=31-dr(T),F=1<<D,ee=E[D];ee===-1?((F&u)===0||(F&p)!==0)&&(E[D]=Qt(F,o)):ee<=o&&(i.expiredLanes|=F),T&=~F}if(o=Kt,u=xt,u=Ke(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&($t===2||$t===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&ot(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||jt(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&ot(p),Y(u)){case 2:case 8:u=ft;break;case 32:u=rt;break;case 268435456:u=Ot;break;default:u=rt}return p=Z1.bind(null,i),u=Xe(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&ot(p),i.callbackPriority=2,i.callbackNode=null,2}function Z1(i,o){if(Nr!==0&&Nr!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(jf()&&i.callbackNode!==u)return null;var p=xt;return p=Ke(i,i===Kt?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(I1(i,p,o),K1(i,Ae()),i.callbackNode!=null&&i.callbackNode===u?Z1.bind(null,i):null)}function X1(i,o){if(jf())return null;I1(i,o,!0)}function xG(){MG(function(){(Lt&6)!==0?Xe(Je,wG):Y1()})}function cv(){if(ro===0){var i=Gs;i===0&&(i=Gt,Gt<<=1,(Gt&261888)===0&&(Gt=256)),ro=i}return ro}function Q1(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Gd(""+i)}function J1(i,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,i.id&&u.setAttribute("form",i.id),o.parentNode.insertBefore(u,o),i=new FormData(i),u.parentNode.removeChild(u),i}function _G(i,o,u,p,E){if(o==="submit"&&u&&u.stateNode===E){var T=Q1((E[Ue]||null).action),D=p.submitter;D&&(o=(o=D[Ue]||null)?Q1(o.formAction):D.getAttribute("formAction"),o!==null&&(T=o,D=null));var F=new Zd("action","action",null,p,E);i.push({event:F,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ro!==0){var ee=D?J1(E,D):new FormData(E);Ng(u,{pending:!0,data:ee,method:E.method,action:T},null,ee)}}else typeof T=="function"&&(F.preventDefault(),ee=D?J1(E,D):new FormData(E),Ng(u,{pending:!0,data:ee,method:E.method,action:T},T,ee))},currentTarget:E}]})}}for(var uv=0;uv<Gh.length;uv++){var dv=Gh[uv],TG=dv.toLowerCase(),RG=dv[0].toUpperCase()+dv.slice(1);da(TG,"on"+RG)}da(kC,"onAnimationEnd"),da(IC,"onAnimationIteration"),da(OC,"onAnimationStart"),da("dblclick","onDoubleClick"),da("focusin","onFocus"),da("focusout","onBlur"),da(BV,"onTransitionRun"),da(qV,"onTransitionStart"),da(HV,"onTransitionCancel"),da(DC,"onTransitionEnd"),Cr("onMouseEnter",["mouseout","mouseover"]),Cr("onMouseLeave",["mouseout","mouseover"]),Cr("onPointerEnter",["pointerout","pointerover"]),Cr("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 ou="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(" "),AG=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function ek(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],E=p.event;p=p.listeners;e:{var T=void 0;if(o)for(var D=p.length-1;0<=D;D--){var F=p[D],ee=F.instance,de=F.currentTarget;if(F=F.listener,ee!==T&&E.isPropagationStopped())break e;T=F,E.currentTarget=de;try{T(E)}catch(Ee){Jd(Ee)}E.currentTarget=null,T=ee}else for(D=0;D<p.length;D++){if(F=p[D],ee=F.instance,de=F.currentTarget,F=F.listener,ee!==T&&E.isPropagationStopped())break e;T=F,E.currentTarget=de;try{T(E)}catch(Ee){Jd(Ee)}E.currentTarget=null,T=ee}}}}function Et(i,o){var u=o[Ut];u===void 0&&(u=o[Ut]=new Set);var p=i+"__bubble";u.has(p)||(tk(o,i,2,!1),u.add(p))}function fv(i,o,u){var p=0;o&&(p|=4),tk(u,i,p,o)}var zf="_reactListening"+Math.random().toString(36).slice(2);function pv(i){if(!i[zf]){i[zf]=!0,Cn.forEach(function(u){u!=="selectionchange"&&(AG.has(u)||fv(u,!1,i),fv(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[zf]||(o[zf]=!0,fv("selectionchange",!1,o))}}function tk(i,o,u,p){switch(kk(o)){case 2:var E=t9;break;case 8:E=r9;break;default:E=Cv}u=E.bind(null,o,u,i),E=void 0,!Dh||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),p?E!==void 0?i.addEventListener(o,u,{capture:!0,passive:E}):i.addEventListener(o,u,!0):E!==void 0?i.addEventListener(o,u,{passive:E}):i.addEventListener(o,u,!1)}function mv(i,o,u,p,E){var T=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var D=p.tag;if(D===3||D===4){var F=p.stateNode.containerInfo;if(F===E)break;if(D===4)for(D=p.return;D!==null;){var ee=D.tag;if((ee===3||ee===4)&&D.stateNode.containerInfo===E)return;D=D.return}for(;F!==null;){if(D=Dt(F),D===null)return;if(ee=D.tag,ee===5||ee===6||ee===26||ee===27){p=T=D;continue e}F=F.parentNode}}p=p.return}oC(function(){var de=T,Ee=Ih(u),xe=[];e:{var fe=LC.get(i);if(fe!==void 0){var be=Zd,Be=i;switch(i){case"keypress":if(Yd(u)===0)break e;case"keydown":case"keyup":be=EV;break;case"focusin":Be="focus",be=jh;break;case"focusout":Be="blur",be=jh;break;case"beforeblur":case"afterblur":be=jh;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=cC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=lV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=xV;break;case kC:case IC:case OC:be=dV;break;case DC:be=TV;break;case"scroll":case"scrollend":be=oV;break;case"wheel":be=AV;break;case"copy":case"cut":case"paste":be=pV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=dC;break;case"toggle":case"beforetoggle":be=NV}var Qe=(o&4)!==0,Vt=!Qe&&(i==="scroll"||i==="scrollend"),le=Qe?fe!==null?fe+"Capture":null:fe;Qe=[];for(var ie=de,ue;ie!==null;){var we=ie;if(ue=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||ue===null||le===null||(we=Cc(ie,le),we!=null&&Qe.push(su(ie,we,ue))),Vt)break;ie=ie.return}0<Qe.length&&(fe=new be(fe,Be,null,u,Ee),xe.push({event:fe,listeners:Qe}))}}if((o&7)===0){e:{if(fe=i==="mouseover"||i==="pointerover",be=i==="mouseout"||i==="pointerout",fe&&u!==kh&&(Be=u.relatedTarget||u.fromElement)&&(Dt(Be)||Be[pt]))break e;if((be||fe)&&(fe=Ee.window===Ee?Ee:(fe=Ee.ownerDocument)?fe.defaultView||fe.parentWindow:window,be?(Be=u.relatedTarget||u.toElement,be=de,Be=Be?Dt(Be):null,Be!==null&&(Vt=s(Be),Qe=Be.tag,Be!==Vt||Qe!==5&&Qe!==27&&Qe!==6)&&(Be=null)):(be=null,Be=de),be!==Be)){if(Qe=cC,we="onMouseLeave",le="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(Qe=dC,we="onPointerLeave",le="onPointerEnter",ie="pointer"),Vt=be==null?fe:Pt(be),ue=Be==null?fe:Pt(Be),fe=new Qe(we,ie+"leave",be,u,Ee),fe.target=Vt,fe.relatedTarget=ue,we=null,Dt(Ee)===de&&(Qe=new Qe(le,ie+"enter",Be,u,Ee),Qe.target=ue,Qe.relatedTarget=Vt,we=Qe),Vt=we,be&&Be)t:{for(Qe=CG,le=be,ie=Be,ue=0,we=le;we;we=Qe(we))ue++;we=0;for(var Ze=ie;Ze;Ze=Qe(Ze))we++;for(;0<ue-we;)le=Qe(le),ue--;for(;0<we-ue;)ie=Qe(ie),we--;for(;ue--;){if(le===ie||ie!==null&&le===ie.alternate){Qe=le;break t}le=Qe(le),ie=Qe(ie)}Qe=null}else Qe=null;be!==null&&rk(xe,fe,be,Qe,!1),Be!==null&&Vt!==null&&rk(xe,Vt,Be,Qe,!0)}}e:{if(fe=de?Pt(de):window,be=fe.nodeName&&fe.nodeName.toLowerCase(),be==="select"||be==="input"&&fe.type==="file")var kt=yC;else if(vC(fe))if(EC)kt=FV;else{kt=jV;var Ge=PV}else be=fe.nodeName,!be||be.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?de&&Nh(de.elementType)&&(kt=yC):kt=UV;if(kt&&(kt=kt(i,de))){bC(xe,kt,u,Ee);break e}Ge&&Ge(i,fe,de),i==="focusout"&&de&&fe.type==="number"&&de.memoizedProps.value!=null&&Ch(fe,"number",fe.value)}switch(Ge=de?Pt(de):window,i){case"focusin":(vC(Ge)||Ge.contentEditable==="true")&&(Us=Ge,qh=de,Pc=null);break;case"focusout":Pc=qh=Us=null;break;case"mousedown":Hh=!0;break;case"contextmenu":case"mouseup":case"dragend":Hh=!1,CC(xe,u,Ee);break;case"selectionchange":if($V)break;case"keydown":case"keyup":CC(xe,u,Ee)}var mt;if(Fh)e:{switch(i){case"compositionstart":var _t="onCompositionStart";break e;case"compositionend":_t="onCompositionEnd";break e;case"compositionupdate":_t="onCompositionUpdate";break e}_t=void 0}else js?hC(i,u)&&(_t="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(_t="onCompositionStart");_t&&(fC&&u.locale!=="ko"&&(js||_t!=="onCompositionStart"?_t==="onCompositionEnd"&&js&&(mt=sC()):(zi=Ee,Lh="value"in zi?zi.value:zi.textContent,js=!0)),Ge=$f(de,_t),0<Ge.length&&(_t=new uC(_t,i,null,u,Ee),xe.push({event:_t,listeners:Ge}),mt?_t.data=mt:(mt=gC(u),mt!==null&&(_t.data=mt)))),(mt=IV?OV(i,u):DV(i,u))&&(_t=$f(de,"onBeforeInput"),0<_t.length&&(Ge=new uC("onBeforeInput","beforeinput",null,u,Ee),xe.push({event:Ge,listeners:_t}),Ge.data=mt)),_G(xe,i,de,u,Ee)}ek(xe,o)})}function su(i,o,u){return{instance:i,listener:o,currentTarget:u}}function $f(i,o){for(var u=o+"Capture",p=[];i!==null;){var E=i,T=E.stateNode;if(E=E.tag,E!==5&&E!==26&&E!==27||T===null||(E=Cc(i,u),E!=null&&p.unshift(su(i,E,T)),E=Cc(i,o),E!=null&&p.push(su(i,E,T))),i.tag===3)return p;i=i.return}return[]}function CG(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function rk(i,o,u,p,E){for(var T=o._reactName,D=[];u!==null&&u!==p;){var F=u,ee=F.alternate,de=F.stateNode;if(F=F.tag,ee!==null&&ee===p)break;F!==5&&F!==26&&F!==27||de===null||(ee=de,E?(de=Cc(u,T),de!=null&&D.unshift(su(u,de,ee))):E||(de=Cc(u,T),de!=null&&D.push(su(u,de,ee)))),u=u.return}D.length!==0&&i.push({event:o,listeners:D})}var NG=/\r\n?/g,kG=/\u0000|\uFFFD/g;function nk(i){return(typeof i=="string"?i:""+i).replace(NG,`
|
|
23
23
|
`).replace(kG,"")}function ak(i,o){return o=nk(o),nk(i)===o}function Ht(i,o,u,p,E,T){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||Ls(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&Ls(i,""+p);break;case"className":jo(i,"class",p);break;case"tabIndex":jo(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":jo(i,u,p);break;case"style":aC(i,p,T);break;case"data":if(o!=="object"){jo(i,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Gd(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(u,"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 T=="function"&&(u==="formAction"?(o!=="input"&&Ht(i,o,"name",E.name,E,null),Ht(i,o,"formEncType",E.formEncType,E,null),Ht(i,o,"formMethod",E.formMethod,E,null),Ht(i,o,"formTarget",E.formTarget,E,null)):(Ht(i,o,"encType",E.encType,E,null),Ht(i,o,"method",E.method,E,null),Ht(i,o,"target",E.target,E,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Gd(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Ja);break;case"onScroll":p!=null&&Et("scroll",i);break;case"onScrollEnd":p!=null&&Et("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(u=p.__html,u!=null){if(E.children!=null)throw Error(n(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){i.removeAttribute("xlink:href");break}u=Gd(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""+p):i.removeAttribute(u);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":p&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":Et("beforetoggle",i),Et("toggle",i),Po(i,"popover",p);break;case"xlinkActuate":mn(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":mn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":mn(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":mn(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":mn(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":mn(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":mn(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":mn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":mn(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Po(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=aV.get(u)||u,Po(i,u,p))}}function hv(i,o,u,p,E,T){switch(u){case"style":aC(i,p,T);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(n(61));if(u=p.__html,u!=null){if(E.children!=null)throw Error(n(60));i.innerHTML=u}}break;case"children":typeof p=="string"?Ls(i,p):(typeof p=="number"||typeof p=="bigint")&&Ls(i,""+p);break;case"onScroll":p!=null&&Et("scroll",i);break;case"onScrollEnd":p!=null&&Et("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ja);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qa.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(E=u.endsWith("Capture"),o=u.slice(2,E?u.length-7:void 0),T=i[Ue]||null,T=T!=null?T[u]:null,typeof T=="function"&&i.removeEventListener(o,T,E),typeof p=="function")){typeof T!="function"&&T!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,p,E);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):Po(i,u,p)}}}function Hr(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Et("error",i),Et("load",i);var p=!1,E=!1,T;for(T in u)if(u.hasOwnProperty(T)){var D=u[T];if(D!=null)switch(T){case"src":p=!0;break;case"srcSet":E=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,o));default:Ht(i,o,T,D,u,null)}}E&&Ht(i,o,"srcSet",u.srcSet,u,null),p&&Ht(i,o,"src",u.src,u,null);return;case"input":Et("invalid",i);var F=T=D=E=null,ee=null,de=null;for(p in u)if(u.hasOwnProperty(p)){var Ee=u[p];if(Ee!=null)switch(p){case"name":E=Ee;break;case"type":D=Ee;break;case"checked":ee=Ee;break;case"defaultChecked":de=Ee;break;case"value":T=Ee;break;case"defaultValue":F=Ee;break;case"children":case"dangerouslySetInnerHTML":if(Ee!=null)throw Error(n(137,o));break;default:Ht(i,o,p,Ee,u,null)}}eC(i,T,F,ee,de,D,E,!1);return;case"select":Et("invalid",i),p=D=T=null;for(E in u)if(u.hasOwnProperty(E)&&(F=u[E],F!=null))switch(E){case"value":T=F;break;case"defaultValue":D=F;break;case"multiple":p=F;default:Ht(i,o,E,F,u,null)}o=T,u=D,i.multiple=!!p,o!=null?Ds(i,!!p,o,!1):u!=null&&Ds(i,!!p,u,!0);return;case"textarea":Et("invalid",i),T=E=p=null;for(D in u)if(u.hasOwnProperty(D)&&(F=u[D],F!=null))switch(D){case"value":p=F;break;case"defaultValue":E=F;break;case"children":T=F;break;case"dangerouslySetInnerHTML":if(F!=null)throw Error(n(91));break;default:Ht(i,o,D,F,u,null)}rC(i,p,E,T);return;case"option":for(ee in u)if(u.hasOwnProperty(ee)&&(p=u[ee],p!=null))switch(ee){case"selected":i.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:Ht(i,o,ee,p,u,null)}return;case"dialog":Et("beforetoggle",i),Et("toggle",i),Et("cancel",i),Et("close",i);break;case"iframe":case"object":Et("load",i);break;case"video":case"audio":for(p=0;p<ou.length;p++)Et(ou[p],i);break;case"image":Et("error",i),Et("load",i);break;case"details":Et("toggle",i);break;case"embed":case"source":case"link":Et("error",i),Et("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in u)if(u.hasOwnProperty(de)&&(p=u[de],p!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,o));default:Ht(i,o,de,p,u,null)}return;default:if(Nh(o)){for(Ee in u)u.hasOwnProperty(Ee)&&(p=u[Ee],p!==void 0&&hv(i,o,Ee,p,u,void 0));return}}for(F in u)u.hasOwnProperty(F)&&(p=u[F],p!=null&&Ht(i,o,F,p,u,null))}function IG(i,o,u,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var E=null,T=null,D=null,F=null,ee=null,de=null,Ee=null;for(be in u){var xe=u[be];if(u.hasOwnProperty(be)&&xe!=null)switch(be){case"checked":break;case"value":break;case"defaultValue":ee=xe;default:p.hasOwnProperty(be)||Ht(i,o,be,null,p,xe)}}for(var fe in p){var be=p[fe];if(xe=u[fe],p.hasOwnProperty(fe)&&(be!=null||xe!=null))switch(fe){case"type":T=be;break;case"name":E=be;break;case"checked":de=be;break;case"defaultChecked":Ee=be;break;case"value":D=be;break;case"defaultValue":F=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(n(137,o));break;default:be!==xe&&Ht(i,o,fe,be,p,xe)}}Ah(i,D,F,ee,de,Ee,T,E);return;case"select":be=D=F=fe=null;for(T in u)if(ee=u[T],u.hasOwnProperty(T)&&ee!=null)switch(T){case"value":break;case"multiple":be=ee;default:p.hasOwnProperty(T)||Ht(i,o,T,null,p,ee)}for(E in p)if(T=p[E],ee=u[E],p.hasOwnProperty(E)&&(T!=null||ee!=null))switch(E){case"value":fe=T;break;case"defaultValue":F=T;break;case"multiple":D=T;default:T!==ee&&Ht(i,o,E,T,p,ee)}o=F,u=D,p=be,fe!=null?Ds(i,!!u,fe,!1):!!p!=!!u&&(o!=null?Ds(i,!!u,o,!0):Ds(i,!!u,u?[]:"",!1));return;case"textarea":be=fe=null;for(F in u)if(E=u[F],u.hasOwnProperty(F)&&E!=null&&!p.hasOwnProperty(F))switch(F){case"value":break;case"children":break;default:Ht(i,o,F,null,p,E)}for(D in p)if(E=p[D],T=u[D],p.hasOwnProperty(D)&&(E!=null||T!=null))switch(D){case"value":fe=E;break;case"defaultValue":be=E;break;case"children":break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(n(91));break;default:E!==T&&Ht(i,o,D,E,p,T)}tC(i,fe,be);return;case"option":for(var Be in u)if(fe=u[Be],u.hasOwnProperty(Be)&&fe!=null&&!p.hasOwnProperty(Be))switch(Be){case"selected":i.selected=!1;break;default:Ht(i,o,Be,null,p,fe)}for(ee in p)if(fe=p[ee],be=u[ee],p.hasOwnProperty(ee)&&fe!==be&&(fe!=null||be!=null))switch(ee){case"selected":i.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:Ht(i,o,ee,fe,p,be)}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 Qe in u)fe=u[Qe],u.hasOwnProperty(Qe)&&fe!=null&&!p.hasOwnProperty(Qe)&&Ht(i,o,Qe,null,p,fe);for(de in p)if(fe=p[de],be=u[de],p.hasOwnProperty(de)&&fe!==be&&(fe!=null||be!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(n(137,o));break;default:Ht(i,o,de,fe,p,be)}return;default:if(Nh(o)){for(var Vt in u)fe=u[Vt],u.hasOwnProperty(Vt)&&fe!==void 0&&!p.hasOwnProperty(Vt)&&hv(i,o,Vt,void 0,p,fe);for(Ee in p)fe=p[Ee],be=u[Ee],!p.hasOwnProperty(Ee)||fe===be||fe===void 0&&be===void 0||hv(i,o,Ee,fe,p,be);return}}for(var le in u)fe=u[le],u.hasOwnProperty(le)&&fe!=null&&!p.hasOwnProperty(le)&&Ht(i,o,le,null,p,fe);for(xe in p)fe=p[xe],be=u[xe],!p.hasOwnProperty(xe)||fe===be||fe==null&&be==null||Ht(i,o,xe,fe,p,be)}function ik(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OG(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var E=u[p],T=E.transferSize,D=E.initiatorType,F=E.duration;if(T&&F&&ik(D)){for(D=0,F=E.responseEnd,p+=1;p<u.length;p++){var ee=u[p],de=ee.startTime;if(de>F)break;var Ee=ee.transferSize,xe=ee.initiatorType;Ee&&ik(xe)&&(ee=ee.responseEnd,D+=Ee*(ee<F?1:(F-de)/(ee-de)))}if(--p,o+=8*(T+D)/(E.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var gv=null,vv=null;function Bf(i){return i.nodeType===9?i:i.ownerDocument}function ok(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sk(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function bv(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var yv=null;function DG(){var i=window.event;return i&&i.type==="popstate"?i===yv?!1:(yv=i,!0):(yv=null,!1)}var lk=typeof setTimeout=="function"?setTimeout:void 0,LG=typeof clearTimeout=="function"?clearTimeout:void 0,ck=typeof Promise=="function"?Promise:void 0,MG=typeof queueMicrotask=="function"?queueMicrotask:typeof ck<"u"?function(i){return ck.resolve(null).then(i).catch(PG)}:lk;function PG(i){setTimeout(function(){throw i})}function no(i){return i==="head"}function uk(i,o){var u=o,p=0;do{var E=u.nextSibling;if(i.removeChild(u),E&&E.nodeType===8)if(u=E.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(E),dl(o);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")lu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,lu(u);for(var T=u.firstChild;T;){var D=T.nextSibling,F=T.nodeName;T[Wt]||F==="SCRIPT"||F==="STYLE"||F==="LINK"&&T.rel.toLowerCase()==="stylesheet"||u.removeChild(T),T=D}}else u==="body"&&lu(i.ownerDocument.body);u=E}while(u);dl(o)}function dk(i,o){var u=i;i=0;do{var p=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function Ev(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Ev(u),nt(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function jG(i,o,u,p){for(;i.nodeType===1;){var E=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[Wt])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(T=i.getAttribute("rel"),T==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(T!==E.rel||i.getAttribute("href")!==(E.href==null||E.href===""?null:E.href)||i.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin)||i.getAttribute("title")!==(E.title==null?null:E.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(T=i.getAttribute("src"),(T!==(E.src==null?null:E.src)||i.getAttribute("type")!==(E.type==null?null:E.type)||i.getAttribute("crossorigin")!==(E.crossOrigin==null?null:E.crossOrigin))&&T&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var T=E.name==null?null:""+E.name;if(E.type==="hidden"&&i.getAttribute("name")===T)return i}else return i;if(i=Xn(i.nextSibling),i===null)break}return null}function UG(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Xn(i.nextSibling),i===null))return null;return i}function fk(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=Xn(i.nextSibling),i===null))return null;return i}function Sv(i){return i.data==="$?"||i.data==="$~"}function wv(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function FG(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var p=function(){o(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function Xn(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var xv=null;function pk(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return Xn(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function mk(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return i;o--}else u!=="/$"&&u!=="/&"||o++}i=i.previousSibling}return null}function hk(i,o,u){switch(o=Bf(u),i){case"html":if(i=o.documentElement,!i)throw Error(n(452));return i;case"head":if(i=o.head,!i)throw Error(n(453));return i;case"body":if(i=o.body,!i)throw Error(n(454));return i;default:throw Error(n(451))}}function lu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);nt(i)}var Qn=new Map,gk=new Set;function qf(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var hi=W.d;W.d={f:zG,r:$G,D:BG,C:qG,L:HG,m:VG,X:WG,S:GG,M:YG};function zG(){var i=hi.f(),o=Lf();return i||o}function $G(i){var o=Yt(i);o!==null&&o.tag===5&&o.type==="form"?DN(o):hi.r(i)}var ll=typeof document>"u"?null:document;function vk(i,o,u){var p=ll;if(p&&typeof o=="string"&&o){var E=Hn(o);E='link[rel="'+i+'"][href="'+E+'"]',typeof u=="string"&&(E+='[crossorigin="'+u+'"]'),gk.has(E)||(gk.add(E),i={rel:i,crossOrigin:u,href:o},p.querySelector(E)===null&&(o=p.createElement("link"),Hr(o,"link",i),zt(o),p.head.appendChild(o)))}}function BG(i){hi.D(i),vk("dns-prefetch",i,null)}function qG(i,o){hi.C(i,o),vk("preconnect",i,o)}function HG(i,o,u){hi.L(i,o,u);var p=ll;if(p&&i&&o){var E='link[rel="preload"][as="'+Hn(o)+'"]';o==="image"&&u&&u.imageSrcSet?(E+='[imagesrcset="'+Hn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(E+='[imagesizes="'+Hn(u.imageSizes)+'"]')):E+='[href="'+Hn(i)+'"]';var T=E;switch(o){case"style":T=cl(i);break;case"script":T=ul(i)}Qn.has(T)||(i=h({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),Qn.set(T,i),p.querySelector(E)!==null||o==="style"&&p.querySelector(cu(T))||o==="script"&&p.querySelector(uu(T))||(o=p.createElement("link"),Hr(o,"link",i),zt(o),p.head.appendChild(o)))}}function VG(i,o){hi.m(i,o);var u=ll;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",E='link[rel="modulepreload"][as="'+Hn(p)+'"][href="'+Hn(i)+'"]',T=E;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":T=ul(i)}if(!Qn.has(T)&&(i=h({rel:"modulepreload",href:i},o),Qn.set(T,i),u.querySelector(E)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(uu(T)))return}p=u.createElement("link"),Hr(p,"link",i),zt(p),u.head.appendChild(p)}}}function GG(i,o,u){hi.S(i,o,u);var p=ll;if(p&&i){var E=on(p).hoistableStyles,T=cl(i);o=o||"default";var D=E.get(T);if(!D){var F={loading:0,preload:null};if(D=p.querySelector(cu(T)))F.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":o},u),(u=Qn.get(T))&&_v(i,u);var ee=D=p.createElement("link");zt(ee),Hr(ee,"link",i),ee._p=new Promise(function(de,Ee){ee.onload=de,ee.onerror=Ee}),ee.addEventListener("load",function(){F.loading|=1}),ee.addEventListener("error",function(){F.loading|=2}),F.loading|=4,Hf(D,o,p)}D={type:"stylesheet",instance:D,count:1,state:F},E.set(T,D)}}}function WG(i,o){hi.X(i,o);var u=ll;if(u&&i){var p=on(u).hoistableScripts,E=ul(i),T=p.get(E);T||(T=u.querySelector(uu(E)),T||(i=h({src:i,async:!0},o),(o=Qn.get(E))&&Tv(i,o),T=u.createElement("script"),zt(T),Hr(T,"link",i),u.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(E,T))}}function YG(i,o){hi.M(i,o);var u=ll;if(u&&i){var p=on(u).hoistableScripts,E=ul(i),T=p.get(E);T||(T=u.querySelector(uu(E)),T||(i=h({src:i,async:!0,type:"module"},o),(o=Qn.get(E))&&Tv(i,o),T=u.createElement("script"),zt(T),Hr(T,"link",i),u.head.appendChild(T)),T={type:"script",instance:T,count:1,state:null},p.set(E,T))}}function bk(i,o,u,p){var E=(E=z.current)?qf(E):null;if(!E)throw Error(n(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=cl(u.href),u=on(E).hoistableStyles,p=u.get(o),p||(p={type:"style",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=cl(u.href);var T=on(E).hoistableStyles,D=T.get(i);if(D||(E=E.ownerDocument||E,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},T.set(i,D),(T=E.querySelector(cu(i)))&&!T._p&&(D.instance=T,D.state.loading=5),Qn.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Qn.set(i,u),T||KG(E,i,u,D.state))),o&&p===null)throw Error(n(528,""));return D}if(o&&p!==null)throw Error(n(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=ul(u),u=on(E).hoistableScripts,p=u.get(o),p||(p={type:"script",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,i))}}function cl(i){return'href="'+Hn(i)+'"'}function cu(i){return'link[rel="stylesheet"]['+i+"]"}function yk(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function KG(i,o,u,p){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=i.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),Hr(o,"link",u),zt(o),i.head.appendChild(o))}function ul(i){return'[src="'+Hn(i)+'"]'}function uu(i){return"script[async]"+i}function Ek(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+Hn(u.href)+'"]');if(p)return o.instance=p,zt(p),p;var E=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),zt(p),Hr(p,"style",E),Hf(p,u.precedence,i),o.instance=p;case"stylesheet":E=cl(u.href);var T=i.querySelector(cu(E));if(T)return o.state.loading|=4,o.instance=T,zt(T),T;p=yk(u),(E=Qn.get(E))&&_v(p,E),T=(i.ownerDocument||i).createElement("link"),zt(T);var D=T;return D._p=new Promise(function(F,ee){D.onload=F,D.onerror=ee}),Hr(T,"link",p),o.state.loading|=4,Hf(T,u.precedence,i),o.instance=T;case"script":return T=ul(u.src),(E=i.querySelector(uu(T)))?(o.instance=E,zt(E),E):(p=u,(E=Qn.get(T))&&(p=h({},u),Tv(p,E)),i=i.ownerDocument||i,E=i.createElement("script"),zt(E),Hr(E,"link",p),i.head.appendChild(E),o.instance=E);case"void":return null;default:throw Error(n(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,Hf(p,u.precedence,i));return o.instance}function Hf(i,o,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),E=p.length?p[p.length-1]:null,T=E,D=0;D<p.length;D++){var F=p[D];if(F.dataset.precedence===o)T=F;else if(T!==E)break}T?T.parentNode.insertBefore(i,T.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function _v(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function Tv(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var Vf=null;function Sk(i,o,u){if(Vf===null){var p=new Map,E=Vf=new Map;E.set(u,p)}else E=Vf,p=E.get(u),p||(p=new Map,E.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),E=0;E<u.length;E++){var T=u[E];if(!(T[Wt]||T[Pe]||i==="link"&&T.getAttribute("rel")==="stylesheet")&&T.namespaceURI!=="http://www.w3.org/2000/svg"){var D=T.getAttribute(o)||"";D=i+D;var F=p.get(D);F?F.push(T):p.set(D,[T])}}return p}function wk(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function ZG(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return i=o.disabled,typeof o.precedence=="string"&&i==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function xk(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function XG(i,o,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var E=cl(p.href),T=o.querySelector(cu(E));if(T){o=T._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=Gf.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=T,zt(T);return}T=o.ownerDocument||o,p=yk(p),(E=Qn.get(E))&&_v(p,E),T=T.createElement("link"),zt(T);var D=T;D._p=new Promise(function(F,ee){D.onload=F,D.onerror=ee}),Hr(T,"link",p),u.instance=T}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Gf.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var Rv=0;function QG(i,o){return i.stylesheets&&i.count===0&&Yf(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&Yf(i,i.stylesheets),i.unsuspend){var T=i.unsuspend;i.unsuspend=null,T()}},6e4+o);0<i.imgBytes&&Rv===0&&(Rv=62500*OG());var E=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Yf(i,i.stylesheets),i.unsuspend)){var T=i.unsuspend;i.unsuspend=null,T()}},(i.imgBytes>Rv?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(E)}}:null}function Gf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yf(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Wf=null;function Yf(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Wf=new Map,o.forEach(JG,i),Wf=null,Gf.call(i))}function JG(i,o){if(!(o.state.loading&4)){var u=Wf.get(i);if(u)var p=u.get(null);else{u=new Map,Wf.set(i,u);for(var E=i.querySelectorAll("link[data-precedence],style[data-precedence]"),T=0;T<E.length;T++){var D=E[T];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(u.set(D.dataset.precedence,D),p=D)}p&&u.set(null,p)}E=o.instance,D=E.getAttribute("data-precedence"),T=u.get(D)||p,T===p&&u.set(null,E),u.set(D,E),this.count++,p=Gf.bind(this),E.addEventListener("load",p),E.addEventListener("error",p),T?T.parentNode.insertBefore(E,T.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(E,i.firstChild)),o.state.loading|=4}}var du={$$typeof:A,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function e9(i,o,u,p,E,T,D,F,ee){this.tag=1,this.containerInfo=i,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=$n(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$n(0),this.hiddenUpdates=$n(null),this.identifierPrefix=p,this.onUncaughtError=E,this.onCaughtError=T,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function _k(i,o,u,p,E,T,D,F,ee,de,Ee,xe){return i=new e9(i,o,u,D,ee,de,Ee,xe,F),o=1,T===!0&&(o|=24),T=kn(3,null,null,o),i.current=T,T.stateNode=i,o=ig(),o.refCount++,i.pooledCache=o,o.refCount++,T.memoizedState={element:p,isDehydrated:u,cache:o},cg(T),i}function Tk(i){return i?(i=$s,i):$s}function Rk(i,o,u,p,E,T){E=Tk(E),p.context===null?p.context=E:p.pendingContext=E,p=Gi(o),p.payload={element:u},T=T===void 0?null:T,T!==null&&(p.callback=T),u=Wi(i,p,o),u!==null&&(En(u,i,o),qc(u,i,o))}function Ak(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function Av(i,o){Ak(i,o),(i=i.alternate)&&Ak(i,o)}function Ck(i){if(i.tag===13||i.tag===31){var o=Bo(i,67108864);o!==null&&En(o,i,67108864),Av(i,67108864)}}function Nk(i){if(i.tag===13||i.tag===31){var o=Mn();o=re(o);var u=Bo(i,o);u!==null&&En(u,i,o),Av(i,o)}}var Kf=!0;function t9(i,o,u,p){var E=U.T;U.T=null;var T=W.p;try{W.p=2,Cv(i,o,u,p)}finally{W.p=T,U.T=E}}function r9(i,o,u,p){var E=U.T;U.T=null;var T=W.p;try{W.p=8,Cv(i,o,u,p)}finally{W.p=T,U.T=E}}function Cv(i,o,u,p){if(Kf){var E=Nv(p);if(E===null)mv(i,o,p,Zf,u),Ik(i,p);else if(a9(E,i,o,u,p))p.stopPropagation();else if(Ik(i,p),o&4&&-1<n9.indexOf(i)){for(;E!==null;){var T=Yt(E);if(T!==null)switch(T.tag){case 3:if(T=T.stateNode,T.current.memoizedState.isDehydrated){var D=an(T.pendingLanes);if(D!==0){var F=T;for(F.pendingLanes|=2,F.entangledLanes|=2;D;){var ee=1<<31-dr(D);F.entanglements[1]|=ee,D&=~ee}Na(T),(Lt&6)===0&&(Of=Ae()+500,iu(0))}}break;case 31:case 13:F=Bo(T,2),F!==null&&En(F,T,2),Lf(),Av(T,2)}if(T=Nv(p),T===null&&mv(i,o,p,Zf,u),T===E)break;E=T}E!==null&&p.stopPropagation()}else mv(i,o,p,null,u)}}function Nv(i){return i=Ih(i),kv(i)}var Zf=null;function kv(i){if(Zf=null,i=Dt(i),i!==null){var o=s(i);if(o===null)i=null;else{var u=o.tag;if(u===13){if(i=l(o),i!==null)return i;i=null}else if(u===31){if(i=c(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return Zf=i,null}function kk(i){switch(i){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(Le()){case Je:return 2;case ft:return 8;case rt:case Rt:return 32;case Ot:return 268435456;default:return 32}default:return 32}}var Iv=!1,ao=null,io=null,oo=null,fu=new Map,pu=new Map,so=[],n9="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 Ik(i,o){switch(i){case"focusin":case"focusout":ao=null;break;case"dragenter":case"dragleave":io=null;break;case"mouseover":case"mouseout":oo=null;break;case"pointerover":case"pointerout":fu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":pu.delete(o.pointerId)}}function mu(i,o,u,p,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:u,eventSystemFlags:p,nativeEvent:T,targetContainers:[E]},o!==null&&(o=Yt(o),o!==null&&Ck(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function a9(i,o,u,p,E){switch(o){case"focusin":return ao=mu(ao,i,o,u,p,E),!0;case"dragenter":return io=mu(io,i,o,u,p,E),!0;case"mouseover":return oo=mu(oo,i,o,u,p,E),!0;case"pointerover":var T=E.pointerId;return fu.set(T,mu(fu.get(T)||null,i,o,u,p,E)),!0;case"gotpointercapture":return T=E.pointerId,pu.set(T,mu(pu.get(T)||null,i,o,u,p,E)),!0}return!1}function Ok(i){var o=Dt(i.target);if(o!==null){var u=s(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){i.blockedOn=o,ve(i.priority,function(){Nk(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,ve(i.priority,function(){Nk(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Xf(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=Nv(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);kh=p,u.target.dispatchEvent(p),kh=null}else return o=Yt(u),o!==null&&Ck(o),i.blockedOn=u,!1;o.shift()}return!0}function Dk(i,o,u){Xf(i)&&u.delete(o)}function i9(){Iv=!1,ao!==null&&Xf(ao)&&(ao=null),io!==null&&Xf(io)&&(io=null),oo!==null&&Xf(oo)&&(oo=null),fu.forEach(Dk),pu.forEach(Dk)}function Qf(i,o){i.blockedOn===o&&(i.blockedOn=null,Iv||(Iv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,i9)))}var Jf=null;function Lk(i){Jf!==i&&(Jf=i,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Jf===i&&(Jf=null);for(var o=0;o<i.length;o+=3){var u=i[o],p=i[o+1],E=i[o+2];if(typeof p!="function"){if(kv(p||u)===null)continue;break}var T=Yt(u);T!==null&&(i.splice(o,3),o-=3,Ng(T,{pending:!0,data:E,method:u.method,action:p},p,E))}}))}function dl(i){function o(ee){return Qf(ee,i)}ao!==null&&Qf(ao,i),io!==null&&Qf(io,i),oo!==null&&Qf(oo,i),fu.forEach(o),pu.forEach(o);for(var u=0;u<so.length;u++){var p=so[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<so.length&&(u=so[0],u.blockedOn===null);)Ok(u),u.blockedOn===null&&so.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var E=u[p],T=u[p+1],D=E[Ue]||null;if(typeof T=="function")D||Lk(u);else if(D){var F=null;if(T&&T.hasAttribute("formAction")){if(E=T,D=T[Ue]||null)F=D.formAction;else if(kv(E)!==null)continue}else F=D.action;typeof F=="function"?u[p+1]=F:(u.splice(p,3),p-=3),Lk(u)}}}function Mk(){function i(T){T.canIntercept&&T.info==="react-transition"&&T.intercept({handler:function(){return new Promise(function(D){return E=D})},focusReset:"manual",scroll:"manual"})}function o(){E!==null&&(E(),E=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var T=navigation.currentEntry;T&&T.url!=null&&navigation.navigate(T.url,{state:T.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,E=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),E!==null&&(E(),E=null)}}}function Ov(i){this._internalRoot=i}ep.prototype.render=Ov.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));var u=o.current,p=Mn();Rk(u,p,i,o,null,null)},ep.prototype.unmount=Ov.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Rk(i.current,2,null,i,null,null),Lf(),o[pt]=null}};function ep(i){this._internalRoot=i}ep.prototype.unstable_scheduleHydration=function(i){if(i){var o=ae();i={blockedOn:null,target:i,priority:o};for(var u=0;u<so.length&&o!==0&&o<so[u].priority;u++);so.splice(u,0,i),u===0&&Ok(i)}};var Pk=e.version;if(Pk!=="19.2.0")throw Error(n(527,Pk,"19.2.0"));W.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=f(o),i=i!==null?m(i):null,i=i===null?null:i.stateNode,i};var o9={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tp.isDisabled&&tp.supportsFiber)try{ir=tp.inject(o9),Mt=tp}catch{}}return gu.createRoot=function(i,o){if(!a(i))throw Error(n(299));var u=!1,p="",E=qN,T=HN,D=VN;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(E=o.onUncaughtError),o.onCaughtError!==void 0&&(T=o.onCaughtError),o.onRecoverableError!==void 0&&(D=o.onRecoverableError)),o=_k(i,1,!1,null,null,u,p,null,E,T,D,Mk),i[pt]=o.current,pv(i),new Ov(o)},gu.hydrateRoot=function(i,o,u){if(!a(i))throw Error(n(299));var p=!1,E="",T=qN,D=HN,F=VN,ee=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(E=u.identifierPrefix),u.onUncaughtError!==void 0&&(T=u.onUncaughtError),u.onCaughtError!==void 0&&(D=u.onCaughtError),u.onRecoverableError!==void 0&&(F=u.onRecoverableError),u.formState!==void 0&&(ee=u.formState)),o=_k(i,1,!0,o,u??null,p,E,ee,T,D,F,Mk),o.context=Tk(null),u=o.current,p=Mn(),p=re(p),E=Gi(p),E.callback=null,Wi(u,E,p),u=p,o.current.lanes=u,Xt(o,u),Na(o),i[pt]=o.current,pv(i),new ep(o)},gu.version="19.2.0",gu}var lO;function ZW(){if(lO)return Ib.exports;lO=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Ib.exports=KW(),Ib.exports}var XW=ZW();const QW=fc(XW);var cO="popstate";function JW(t={}){function e(n,a){let{pathname:s,search:l,hash:c}=n.location;return B_("",{pathname:s,search:l,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Ju(a)}return t7(e,r,null,t)}function ur(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function qa(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function e7(){return Math.random().toString(36).substring(2,10)}function uO(t,e){return{usr:t.state,key:t.key,idx:e}}function B_(t,e,r=null,n){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?mc(e):e,state:r,key:e&&e.key||n||e7()}}function Ju({pathname:t="/",search:e="",hash:r=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function mc(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substring(r),t=t.substring(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substring(n),t=t.substring(0,n)),t&&(e.pathname=t)}return e}function t7(t,e,r,n={}){let{window:a=document.defaultView,v5Compat:s=!1}=n,l=a.history,c="POP",d=null,f=m();f==null&&(f=0,l.replaceState({...l.state,idx:f},""));function m(){return(l.state||{idx:null}).idx}function h(){c="POP";let R=m(),w=R==null?null:R-f;f=R,d&&d({action:c,location:S.location,delta:w})}function v(R,w){c="PUSH";let _=B_(S.location,R,w);f=m()+1;let A=uO(_,f),C=S.createHref(_);try{l.pushState(A,"",C)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(C)}s&&d&&d({action:c,location:S.location,delta:1})}function b(R,w){c="REPLACE";let _=B_(S.location,R,w);f=m();let A=uO(_,f),C=S.createHref(_);l.replaceState(A,"",C),s&&d&&d({action:c,location:S.location,delta:0})}function x(R){return r7(R)}let S={get action(){return c},get location(){return t(a,l)},listen(R){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(cO,h),d=R,()=>{a.removeEventListener(cO,h),d=null}},createHref(R){return e(a,R)},createURL:x,encodeLocation(R){let w=x(R);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:v,replace:b,go(R){return l.go(R)}};return S}function r7(t,e=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ur(r,"No window.location.(origin|href) available to create URL");let n=typeof t=="string"?t:Ju(t);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function H$(t,e,r="/"){return n7(t,e,r,!1)}function n7(t,e,r,n){let a=typeof e=="string"?mc(e):e,s=Ni(a.pathname||"/",r);if(s==null)return null;let l=V$(t);a7(l);let c=null;for(let d=0;c==null&&d<l.length;++d){let f=h7(s);c=p7(l[d],f,n)}return c}function V$(t,e=[],r=[],n="",a=!1){let s=(l,c,d=a,f)=>{let m={relativePath:f===void 0?l.path||"":f,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(n)&&d)return;ur(m.relativePath.startsWith(n),`Absolute route path "${m.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(n.length)}let h=Ri([n,m.relativePath]),v=r.concat(m);l.children&&l.children.length>0&&(ur(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),V$(l.children,e,v,h,d)),!(l.path==null&&!l.index)&&e.push({path:h,score:d7(h,l.index),routesMeta:v})};return t.forEach((l,c)=>{if(l.path===""||!l.path?.includes("?"))s(l,c);else for(let d of G$(l.path))s(l,c,!0,d)}),e}function G$(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let l=G$(n.join("/")),c=[];return c.push(...l.map(d=>d===""?s:[s,d].join("/"))),a&&c.push(...l),c.map(d=>t.startsWith("/")&&d===""?"/":d)}function a7(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:f7(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var i7=/^:[\w-]+$/,o7=3,s7=2,l7=1,c7=10,u7=-2,dO=t=>t==="*";function d7(t,e){let r=t.split("/"),n=r.length;return r.some(dO)&&(n+=u7),e&&(n+=s7),r.filter(a=>!dO(a)).reduce((a,s)=>a+(i7.test(s)?o7:s===""?l7:c7),n)}function f7(t,e){return t.length===e.length&&t.slice(0,-1).every((n,a)=>n===e[a])?t[t.length-1]-e[e.length-1]:0}function p7(t,e,r=!1){let{routesMeta:n}=t,a={},s="/",l=[];for(let c=0;c<n.length;++c){let d=n[c],f=c===n.length-1,m=s==="/"?e:e.slice(s.length)||"/",h=fm({path:d.relativePath,caseSensitive:d.caseSensitive,end:f},m),v=d.route;if(!h&&f&&r&&!n[n.length-1].route.index&&(h=fm({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},m)),!h)return null;Object.assign(a,h.params),l.push({params:a,pathname:Ri([s,h.pathname]),pathnameBase:y7(Ri([s,h.pathnameBase])),route:v}),h.pathnameBase!=="/"&&(s=Ri([s,h.pathnameBase]))}return l}function fm(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=m7(t.path,t.caseSensitive,t.end),a=e.match(r);if(!a)return null;let s=a[0],l=s.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((f,{paramName:m,isOptional:h},v)=>{if(m==="*"){let x=c[v]||"";l=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const b=c[v];return h&&!b?f[m]=void 0:f[m]=(b||"").replace(/%2F/g,"/"),f},{}),pathname:s,pathnameBase:l,pattern:t}}function m7(t,e=!1,r=!0){qa(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let n=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,d)=>(n.push({paramName:c,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(n.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}function h7(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return qa(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function Ni(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function g7(t,e="/"){let{pathname:r,search:n="",hash:a=""}=typeof t=="string"?mc(t):t;return{pathname:r?r.startsWith("/")?r:v7(r,e):e,search:E7(n),hash:S7(a)}}function v7(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Mb(t,e,r,n){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function b7(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function W$(t){let e=b7(t);return e.map((r,n)=>n===e.length-1?r.pathname:r.pathnameBase)}function Y$(t,e,r,n=!1){let a;typeof t=="string"?a=mc(t):(a={...t},ur(!a.pathname||!a.pathname.includes("?"),Mb("?","pathname","search",a)),ur(!a.pathname||!a.pathname.includes("#"),Mb("#","pathname","hash",a)),ur(!a.search||!a.search.includes("#"),Mb("#","search","hash",a)));let s=t===""||a.pathname==="",l=s?"/":a.pathname,c;if(l==null)c=r;else{let h=e.length-1;if(!n&&l.startsWith("..")){let v=l.split("/");for(;v[0]==="..";)v.shift(),h-=1;a.pathname=v.join("/")}c=h>=0?e[h]:"/"}let d=g7(a,c),f=l&&l!=="/"&&l.endsWith("/"),m=(s||l===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(f||m)&&(d.pathname+="/"),d}var Ri=t=>t.join("/").replace(/\/\/+/g,"/"),y7=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),E7=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,S7=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function w7(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var K$=["POST","PUT","PATCH","DELETE"];new Set(K$);var x7=["GET",...K$];new Set(x7);var hc=y.createContext(null);hc.displayName="DataRouter";var Fm=y.createContext(null);Fm.displayName="DataRouterState";y.createContext(!1);var Z$=y.createContext({isTransitioning:!1});Z$.displayName="ViewTransition";var _7=y.createContext(new Map);_7.displayName="Fetchers";var T7=y.createContext(null);T7.displayName="Await";var Ka=y.createContext(null);Ka.displayName="Navigation";var _d=y.createContext(null);_d.displayName="Location";var Pi=y.createContext({outlet:null,matches:[],isDataRoute:!1});Pi.displayName="Route";var lR=y.createContext(null);lR.displayName="RouteError";function R7(t,{relative:e}={}){ur(Td(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=y.useContext(Ka),{hash:a,pathname:s,search:l}=Rd(t,{relative:e}),c=s;return r!=="/"&&(c=s==="/"?r:Ri([r,s])),n.createHref({pathname:c,search:l,hash:a})}function Td(){return y.useContext(_d)!=null}function ji(){return ur(Td(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(_d).location}var X$="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Q$(t){y.useContext(Ka).static||y.useLayoutEffect(t)}function gc(){let{isDataRoute:t}=y.useContext(Pi);return t?F7():A7()}function A7(){ur(Td(),"useNavigate() may be used only in the context of a <Router> component.");let t=y.useContext(hc),{basename:e,navigator:r}=y.useContext(Ka),{matches:n}=y.useContext(Pi),{pathname:a}=ji(),s=JSON.stringify(W$(n)),l=y.useRef(!1);return Q$(()=>{l.current=!0}),y.useCallback((d,f={})=>{if(qa(l.current,X$),!l.current)return;if(typeof d=="number"){r.go(d);return}let m=Y$(d,JSON.parse(s),a,f.relative==="path");t==null&&e!=="/"&&(m.pathname=m.pathname==="/"?e:Ri([e,m.pathname])),(f.replace?r.replace:r.push)(m,f.state,f)},[e,r,s,a,t])}y.createContext(null);function Rd(t,{relative:e}={}){let{matches:r}=y.useContext(Pi),{pathname:n}=ji(),a=JSON.stringify(W$(r));return y.useMemo(()=>Y$(t,JSON.parse(a),n,e==="path"),[t,a,n,e])}function C7(t,e){return J$(t,e)}function J$(t,e,r,n,a){ur(Td(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=y.useContext(Ka),{matches:l}=y.useContext(Pi),c=l[l.length-1],d=c?c.params:{},f=c?c.pathname:"/",m=c?c.pathnameBase:"/",h=c&&c.route;{let _=h&&h.path||"";eB(f,!h||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${_}">) 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.
|
|
24
24
|
|
|
25
|
-
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let v=ji(),b;if(e){let _=typeof e=="string"?mc(e):e;ur(m==="/"||_.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${_.pathname}" was given in the \`location\` prop.`),b=_}else b=v;let x=b.pathname||"/",S=x;if(m!=="/"){let _=m.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let R=H$(t,{pathname:S});qa(h||R!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),qa(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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.`);let w=D7(R&&R.map(_=>Object.assign({},_,{params:Object.assign({},d,_.params),pathname:Ri([m,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Ri([m,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),l,r,n,a);return e&&w?y.createElement(_d.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},w):w}function N7(){let t=U7(),e=w7(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:s},"ErrorBoundary")," or"," ",y.createElement("code",{style:s},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:a},r):null,l)}var k7=y.createElement(N7,null),I7=class extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.unstable_onError?this.props.unstable_onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?y.createElement(Pi.Provider,{value:this.props.routeContext},y.createElement(lR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function O7({routeContext:t,match:e,children:r}){let n=y.useContext(hc);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),y.createElement(Pi.Provider,{value:t},r)}function D7(t,e=[],r=null,n=null,a=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let s=t,l=r?.errors;if(l!=null){let f=s.findIndex(m=>m.route.id&&l?.[m.route.id]!==void 0);ur(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,f+1))}let c=!1,d=-1;if(r)for(let f=0;f<s.length;f++){let m=s[f];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=f),m.route.id){let{loaderData:h,errors:v}=r,b=m.route.loader&&!h.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||b){c=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((f,m,h)=>{let v,b=!1,x=null,S=null;r&&(v=l&&m.route.id?l[m.route.id]:void 0,x=m.route.errorElement||k7,c&&(d<0&&h===0?(eB("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,S=null):d===h&&(b=!0,S=m.route.hydrateFallbackElement||null)));let R=e.concat(s.slice(0,h+1)),w=()=>{let _;return v?_=x:b?_=S:m.route.Component?_=y.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=f,y.createElement(O7,{match:m,routeContext:{outlet:f,matches:R,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||h===0)?y.createElement(I7,{location:r.location,revalidation:r.revalidation,component:x,error:v,children:w(),routeContext:{outlet:null,matches:R,isDataRoute:!0},unstable_onError:n}):w()},null)}function cR(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function L7(t){let e=y.useContext(hc);return ur(e,cR(t)),e}function M7(t){let e=y.useContext(Fm);return ur(e,cR(t)),e}function P7(t){let e=y.useContext(Pi);return ur(e,cR(t)),e}function uR(t){let e=P7(t),r=e.matches[e.matches.length-1];return ur(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function j7(){return uR("useRouteId")}function U7(){let t=y.useContext(lR),e=M7("useRouteError"),r=uR("useRouteError");return t!==void 0?t:e.errors?.[r]}function F7(){let{router:t}=L7("useNavigate"),e=uR("useNavigate"),r=y.useRef(!1);return Q$(()=>{r.current=!0}),y.useCallback(async(a,s={})=>{qa(r.current,X$),r.current&&(typeof a=="number"?t.navigate(a):await t.navigate(a,{fromRouteId:e,...s}))},[t,e])}var fO={};function eB(t,e,r){!e&&!fO[t]&&(fO[t]=!0,qa(!1,r))}y.memo(z7);function z7({routes:t,future:e,state:r,unstable_onError:n}){return J$(t,void 0,r,n,e)}function tB(t){ur(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function $7({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:a,static:s=!1}){ur(!Td(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:a,static:s,future:{}}),[l,a,s]);typeof r=="string"&&(r=mc(r));let{pathname:d="/",search:f="",hash:m="",state:h=null,key:v="default"}=r,b=y.useMemo(()=>{let x=Ni(d,l);return x==null?null:{location:{pathname:x,search:f,hash:m,state:h,key:v},navigationType:n}},[l,d,f,m,h,v,n]);return qa(b!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:y.createElement(Ka.Provider,{value:c},y.createElement(_d.Provider,{children:e,value:b}))}function B7({children:t,location:e}){return C7(q_(t),e)}function q_(t,e=[]){let r=[];return y.Children.forEach(t,(n,a)=>{if(!y.isValidElement(n))return;let s=[...e,a];if(n.type===y.Fragment){r.push.apply(r,q_(n.props.children,s));return}ur(n.type===tB,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ur(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=q_(n.props.children,s)),r.push(l)}),r}var Ap="get",Cp="application/x-www-form-urlencoded";function zm(t){return t!=null&&typeof t.tagName=="string"}function q7(t){return zm(t)&&t.tagName.toLowerCase()==="button"}function H7(t){return zm(t)&&t.tagName.toLowerCase()==="form"}function V7(t){return zm(t)&&t.tagName.toLowerCase()==="input"}function G7(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function W7(t,e){return t.button===0&&(!e||e==="_self")&&!G7(t)}var np=null;function Y7(){if(np===null)try{new FormData(document.createElement("form"),0),np=!1}catch{np=!0}return np}var K7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Pb(t){return t!=null&&!K7.has(t)?(qa(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cp}"`),null):t}function Z7(t,e){let r,n,a,s,l;if(H7(t)){let c=t.getAttribute("action");n=c?Ni(c,e):null,r=t.getAttribute("method")||Ap,a=Pb(t.getAttribute("enctype"))||Cp,s=new FormData(t)}else if(q7(t)||V7(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=t.getAttribute("formaction")||c.getAttribute("action");if(n=d?Ni(d,e):null,r=t.getAttribute("formmethod")||c.getAttribute("method")||Ap,a=Pb(t.getAttribute("formenctype"))||Pb(c.getAttribute("enctype"))||Cp,s=new FormData(c,t),!Y7()){let{name:f,type:m,value:h}=t;if(m==="image"){let v=f?`${f}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else f&&s.append(f,h)}}else{if(zm(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ap,n=null,a=Cp,l=t}return s&&a==="text/plain"&&(l=s,s=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dR(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function X7(t,e,r){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n.pathname==="/"?n.pathname=`_root.${r}`:e&&Ni(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Q7(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function J7(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function eY(t,e,r){let n=await Promise.all(t.map(async a=>{let s=e.routes[a.route.id];if(s){let l=await Q7(s,r);return l.links?l.links():[]}return[]}));return aY(n.flat(1).filter(J7).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function pO(t,e,r,n,a,s){let l=(d,f)=>r[f]?d.route.id!==r[f].route.id:!0,c=(d,f)=>r[f].pathname!==d.pathname||r[f].route.path?.endsWith("*")&&r[f].params["*"]!==d.params["*"];return s==="assets"?e.filter((d,f)=>l(d,f)||c(d,f)):s==="data"?e.filter((d,f)=>{let m=n.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||c(d,f))return!0;if(d.route.shouldRevalidate){let h=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function tY(t,e,{includeHydrateFallback:r}={}){return rY(t.map(n=>{let a=e.routes[n.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function rY(t){return[...new Set(t)]}function nY(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function aY(t,e){let r=new Set;return new Set(e),t.reduce((n,a)=>{let s=JSON.stringify(nY(a));return r.has(s)||(r.add(s),n.push({key:s,link:a})),n},[])}function rB(){let t=y.useContext(hc);return dR(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function iY(){let t=y.useContext(Fm);return dR(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var fR=y.createContext(void 0);fR.displayName="FrameworkContext";function nB(){let t=y.useContext(fR);return dR(t,"You must render this element inside a <HydratedRouter> element"),t}function oY(t,e){let r=y.useContext(fR),[n,a]=y.useState(!1),[s,l]=y.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:h}=e,v=y.useRef(null);y.useEffect(()=>{if(t==="render"&&l(!0),t==="viewport"){let S=w=>{w.forEach(_=>{l(_.isIntersecting)})},R=new IntersectionObserver(S,{threshold:.5});return v.current&&R.observe(v.current),()=>{R.disconnect()}}},[t]),y.useEffect(()=>{if(n){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[n]);let b=()=>{a(!0)},x=()=>{a(!1),l(!1)};return r?t!=="intent"?[s,v,{}]:[s,v,{onFocus:vu(c,b),onBlur:vu(d,x),onMouseEnter:vu(f,b),onMouseLeave:vu(m,x),onTouchStart:vu(h,b)}]:[!1,v,{}]}function vu(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function sY({page:t,...e}){let{router:r}=rB(),n=y.useMemo(()=>H$(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?y.createElement(cY,{page:t,matches:n,...e}):null}function lY(t){let{manifest:e,routeModules:r}=nB(),[n,a]=y.useState([]);return y.useEffect(()=>{let s=!1;return eY(t,e,r).then(l=>{s||a(l)}),()=>{s=!0}},[t,e,r]),n}function cY({page:t,matches:e,...r}){let n=ji(),{manifest:a,routeModules:s}=nB(),{basename:l}=rB(),{loaderData:c,matches:d}=iY(),f=y.useMemo(()=>pO(t,e,d,a,n,"data"),[t,e,d,a,n]),m=y.useMemo(()=>pO(t,e,d,a,n,"assets"),[t,e,d,a,n]),h=y.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let x=new Set,S=!1;if(e.forEach(w=>{let _=a.routes[w.route.id];!_||!_.hasLoader||(!f.some(A=>A.route.id===w.route.id)&&w.route.id in c&&s[w.route.id]?.shouldRevalidate||_.hasClientLoader?S=!0:x.add(w.route.id))}),x.size===0)return[];let R=X7(t,l,"data");return S&&x.size>0&&R.searchParams.set("_routes",e.filter(w=>x.has(w.route.id)).map(w=>w.route.id).join(",")),[R.pathname+R.search]},[l,c,n,a,f,e,t,s]),v=y.useMemo(()=>tY(m,a),[m,a]),b=lY(m);return y.createElement(y.Fragment,null,h.map(x=>y.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),v.map(x=>y.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),b.map(({key:x,link:S})=>y.createElement("link",{key:x,nonce:r.nonce,...S})))}function uY(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var aB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{aB&&(window.__reactRouterVersion="7.9.5")}catch{}function dY({basename:t,children:e,window:r}){let n=y.useRef();n.current==null&&(n.current=JW({window:r,v5Compat:!0}));let a=n.current,[s,l]=y.useState({action:a.action,location:a.location}),c=y.useCallback(d=>{y.startTransition(()=>l(d))},[l]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.createElement($7,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a})}var iB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oB=y.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:a,reloadDocument:s,replace:l,state:c,target:d,to:f,preventScrollReset:m,viewTransition:h,...v},b){let{basename:x}=y.useContext(Ka),S=typeof f=="string"&&iB.test(f),R,w=!1;if(typeof f=="string"&&S&&(R=f,aB))try{let M=new URL(window.location.href),L=f.startsWith("//")?new URL(M.protocol+f):new URL(f),P=Ni(L.pathname,x);L.origin===M.origin&&P!=null?f=P+L.search+L.hash:w=!0}catch{qa(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=R7(f,{relative:a}),[A,C,k]=oY(n,v),N=hY(f,{replace:l,state:c,target:d,preventScrollReset:m,relative:a,viewTransition:h});function I(M){e&&e(M),M.defaultPrevented||N(M)}let O=y.createElement("a",{...v,...k,href:R||_,onClick:w||s?e:I,ref:uY(b,C),target:d,"data-discover":!S&&r==="render"?"true":void 0});return A&&!S?y.createElement(y.Fragment,null,O,y.createElement(sY,{page:_})):O});oB.displayName="Link";var fY=y.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:a=!1,style:s,to:l,viewTransition:c,children:d,...f},m){let h=Rd(l,{relative:f.relative}),v=ji(),b=y.useContext(Fm),{navigator:x,basename:S}=y.useContext(Ka),R=b!=null&&EY(h)&&c===!0,w=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=v.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(_=_.toLowerCase(),A=A?A.toLowerCase():null,w=w.toLowerCase()),A&&S&&(A=Ni(A,S)||A);const C=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=_===w||!a&&_.startsWith(w)&&_.charAt(C)==="/",N=A!=null&&(A===w||!a&&A.startsWith(w)&&A.charAt(w.length)==="/"),I={isActive:k,isPending:N,isTransitioning:R},O=k?e:void 0,M;typeof n=="function"?M=n(I):M=[n,k?"active":null,N?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let L=typeof s=="function"?s(I):s;return y.createElement(oB,{...f,"aria-current":O,className:M,ref:m,style:L,to:l,viewTransition:c},typeof d=="function"?d(I):d)});fY.displayName="NavLink";var pY=y.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:a,state:s,method:l=Ap,action:c,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:h,...v},b)=>{let x=bY(),S=yY(c,{relative:f}),R=l.toLowerCase()==="get"?"get":"post",w=typeof c=="string"&&iB.test(c),_=A=>{if(d&&d(A),A.defaultPrevented)return;A.preventDefault();let C=A.nativeEvent.submitter,k=C?.getAttribute("formmethod")||l;x(C||A.currentTarget,{fetcherKey:e,method:k,navigate:r,replace:a,state:s,relative:f,preventScrollReset:m,viewTransition:h})};return y.createElement("form",{ref:b,method:R,action:S,onSubmit:n?d:_,...v,"data-discover":!w&&t==="render"?"true":void 0})});pY.displayName="Form";function mY(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sB(t){let e=y.useContext(hc);return ur(e,mY(t)),e}function hY(t,{target:e,replace:r,state:n,preventScrollReset:a,relative:s,viewTransition:l}={}){let c=gc(),d=ji(),f=Rd(t,{relative:s});return y.useCallback(m=>{if(W7(m,e)){m.preventDefault();let h=r!==void 0?r:Ju(d)===Ju(f);c(t,{replace:h,state:n,preventScrollReset:a,relative:s,viewTransition:l})}},[d,c,f,r,n,e,t,a,s,l])}var gY=0,vY=()=>`__${String(++gY)}__`;function bY(){let{router:t}=sB("useSubmit"),{basename:e}=y.useContext(Ka),r=j7();return y.useCallback(async(n,a={})=>{let{action:s,method:l,encType:c,formData:d,body:f}=Z7(n,e);if(a.navigate===!1){let m=a.fetcherKey||vY();await t.fetch(m,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,flushSync:a.flushSync})}else await t.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[t,e,r])}function yY(t,{relative:e}={}){let{basename:r}=y.useContext(Ka),n=y.useContext(Pi);ur(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),s={...Rd(t||".",{relative:e})},l=ji();if(t==null){s.search=l.search;let c=new URLSearchParams(s.search),d=c.getAll("index");if(d.some(m=>m==="")){c.delete("index"),d.filter(h=>h).forEach(h=>c.append("index",h));let m=c.toString();s.search=m?`?${m}`:""}}return(!t||t===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Ri([r,s.pathname])),Ju(s)}function EY(t,{relative:e}={}){let r=y.useContext(Z$);ur(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=sB("useViewTransitionState"),a=Rd(t,{relative:e});if(!r.isTransitioning)return!1;let s=Ni(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=Ni(r.nextLocation.pathname,n)||r.nextLocation.pathname;return fm(a.pathname,l)!=null||fm(a.pathname,s)!=null}var vc=q$();const lB=fc(vc);const SY=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wY=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),mO=t=>{const e=wY(t);return e.charAt(0).toUpperCase()+e.slice(1)},cB=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),xY=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var _Y={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 TY=y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:l,...c},d)=>y.createElement("svg",{ref:d,..._Y,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:cB("lucide",a),...!s&&!xY(c)&&{"aria-hidden":"true"},...c},[...l.map(([f,m])=>y.createElement(f,m)),...Array.isArray(s)?s:[s]]));const lt=(t,e)=>{const r=y.forwardRef(({className:n,...a},s)=>y.createElement(TY,{ref:s,iconNode:e,className:cB(`lucide-${SY(mO(t))}`,`lucide-${t}`,n),...a}));return r.displayName=mO(t),r};const RY=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],AY=lt("arrow-up",RY);const CY=[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]],NY=lt("brush",CY);const kY=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ki=lt("check",kY);const IY=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uB=lt("chevron-down",IY);const OY=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],DY=lt("chevron-up",OY);const LY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],MY=lt("circle-minus",LY);const PY=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ac=lt("clock",PY);const jY=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],UY=lt("code",jY);const FY=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],zY=lt("cog",FY);const $Y=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],BY=lt("command",$Y);const qY=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],aa=lt("copy",qY);const HY=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$m=lt("database",HY);const VY=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],dB=lt("download",VY);const GY=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],hO=lt("external-link",GY);const WY=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],YY=lt("eye-off",WY);const KY=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],gO=lt("eye",KY);const ZY=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],XY=lt("file-code",ZY);const QY=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],JY=lt("file-image",QY);const eK=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],pR=lt("file-text",eK);const tK=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],rK=lt("file",tK);const nK=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],aK=lt("folder-open",nK);const iK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],oK=lt("globe",iK);const sK=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],lK=lt("grip-vertical",sK);const cK=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],fB=lt("history",cK);const uK=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],pB=lt("key",uK);const dK=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bm=lt("loader-circle",dK);const fK=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],pK=lt("maximize",fK);const mK=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],hK=lt("message-circle",mK);const gK=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ed=lt("message-square",gK);const vK=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],vO=lt("monitor",vK);const bK=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],yK=lt("moon",bK);const EK=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],mB=lt("play",EK);const SK=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],hB=lt("plus",SK);const wK=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],xK=lt("rotate-ccw",wK);const _K=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],mR=lt("save",_K);const TK=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hR=lt("search",TK);const RK=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],AK=lt("send",RK);const CK=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],NK=lt("settings",CK);const kK=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],IK=lt("shield",kK);const OK=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M20 12h.01",key:"1ykeid"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M4 12h.01",key:"158zrr"}],["path",{d:"M17.657 6.343h.01",key:"31pqzk"}],["path",{d:"M17.657 17.657h.01",key:"jehnf4"}],["path",{d:"M6.343 17.657h.01",key:"gdk6ow"}],["path",{d:"M6.343 6.343h.01",key:"1uurf0"}]],DK=lt("sun-dim",OK);const LK=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],H_=lt("trash-2",LK);const MK=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ss=lt("wrench",MK);const PK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gR=lt("x",PK);const jK=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],td=lt("zap",jK);function UK(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const FK=t=>{switch(t){case"success":return BK;case"info":return HK;case"warning":return qK;case"error":return VK;default:return null}},zK=Array(12).fill(0),$K=({visible:t,className:e})=>Te.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},Te.createElement("div",{className:"sonner-spinner"},zK.map((r,n)=>Te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),BK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),qK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),HK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),VK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),WK=()=>{const[t,e]=Te.useState(document.hidden);return Te.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let V_=1;class YK{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...a}=e,s=typeof e?.id=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:V_++,l=this.toasts.find(d=>d.id===s),c=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...e,id:s,title:n}),{...d,...e,id:s,dismissible:c,title:n}):d):this.addToast({title:n,...a,dismissible:c,id:s}),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(e instanceof Function?e():e);let s=n!==void 0,l;const c=a.then(async f=>{if(l=["resolve",f],Te.isValidElement(f))s=!1,this.create({id:n,type:"default",message:f});else if(ZK(f)&&!f.ok){s=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description,x=typeof h=="object"&&!Te.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...x})}else if(f instanceof Error){s=!1;const h=typeof r.error=="function"?await r.error(f):r.error,v=typeof r.description=="function"?await r.description(f):r.description,x=typeof h=="object"&&!Te.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...x})}else if(r.success!==void 0){s=!1;const h=typeof r.success=="function"?await r.success(f):r.success,v=typeof r.description=="function"?await r.description(f):r.description,x=typeof h=="object"&&!Te.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:v,...x})}}).catch(async f=>{if(l=["reject",f],r.error!==void 0){s=!1;const m=typeof r.error=="function"?await r.error(f):r.error,h=typeof r.description=="function"?await r.description(f):r.description,b=typeof m=="object"&&!Te.isValidElement(m)?m:{message:m};this.create({id:n,type:"error",description:h,...b})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),d=()=>new Promise((f,m)=>c.then(()=>l[0]==="reject"?m(l[1]):f(l[1])).catch(m));return typeof n!="string"&&typeof n!="number"?{unwrap:d}:Object.assign(n,{unwrap:d})},this.custom=(e,r)=>{const n=r?.id||V_++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Sn=new YK,KK=(t,e)=>{const r=e?.id||V_++;return Sn.addToast({title:t,...e,id:r}),r},ZK=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",XK=KK,QK=()=>Sn.toasts,JK=()=>Sn.getActiveToasts(),Er=Object.assign(XK,{success:Sn.success,info:Sn.info,warning:Sn.warning,error:Sn.error,custom:Sn.custom,message:Sn.message,promise:Sn.promise,dismiss:Sn.dismiss,loading:Sn.loading},{getHistory:QK,getToasts:JK});UK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ap(t){return t.label!==void 0}const eZ=3,tZ="24px",rZ="16px",bO=4e3,nZ=356,aZ=14,iZ=45,oZ=200;function ka(...t){return t.filter(Boolean).join(" ")}function sZ(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const lZ=t=>{var e,r,n,a,s,l,c,d,f;const{invert:m,toast:h,unstyled:v,interacting:b,setHeights:x,visibleToasts:S,heights:R,index:w,toasts:_,expanded:A,removeToast:C,defaultRichColors:k,closeButton:N,style:I,cancelButtonStyle:O,actionButtonStyle:M,className:L="",descriptionClassName:P="",duration:V,position:X,gap:Q,expandByDefault:oe,classNames:U,icons:W,closeButtonAriaLabel:H="Close toast"}=t,[te,se]=Te.useState(null),[B,q]=Te.useState(null),[$,K]=Te.useState(!1),[J,z]=Te.useState(!1),[j,Z]=Te.useState(!1),[ne,G]=Te.useState(!1),[ce,he]=Te.useState(!1),[_e,ye]=Te.useState(0),[Se,Ne]=Te.useState(0),ge=Te.useRef(h.duration||V||bO),ke=Te.useRef(null),Oe=Te.useRef(null),Xe=w===0,ot=w+1<=S,$e=h.type,We=h.dismissible!==!1,Ae=h.className||"",Le=h.descriptionClassName||"",Je=Te.useMemo(()=>R.findIndex(Ke=>Ke.toastId===h.id)||0,[R,h.id]),ft=Te.useMemo(()=>{var Ke;return(Ke=h.closeButton)!=null?Ke:N},[h.closeButton,N]),rt=Te.useMemo(()=>h.duration||V||bO,[h.duration,V]),Rt=Te.useRef(0),Ot=Te.useRef(0),An=Te.useRef(0),gr=Te.useRef(null),[ir,Mt]=X.split("-"),Zt=Te.useMemo(()=>R.reduce((Ke,jt,Qt)=>Qt>=Je?Ke:Ke+jt.height,0),[R,Je]),dr=WK(),Sr=h.invert||m,zn=$e==="loading";Ot.current=Te.useMemo(()=>Je*Q+Zt,[Je,Zt]),Te.useEffect(()=>{ge.current=rt},[rt]),Te.useEffect(()=>{K(!0)},[]),Te.useEffect(()=>{const Ke=Oe.current;if(Ke){const jt=Ke.getBoundingClientRect().height;return Ne(jt),x(Qt=>[{toastId:h.id,height:jt,position:h.position},...Qt]),()=>x(Qt=>Qt.filter(Lr=>Lr.toastId!==h.id))}},[x,h.id]),Te.useLayoutEffect(()=>{if(!$)return;const Ke=Oe.current,jt=Ke.style.height;Ke.style.height="auto";const Qt=Ke.getBoundingClientRect().height;Ke.style.height=jt,Ne(Qt),x(Lr=>Lr.find(Xt=>Xt.toastId===h.id)?Lr.map(Xt=>Xt.toastId===h.id?{...Xt,height:Qt}:Xt):[{toastId:h.id,height:Qt,position:h.position},...Lr])},[$,h.title,h.description,x,h.id,h.jsx,h.action,h.cancel]);const or=Te.useCallback(()=>{z(!0),ye(Ot.current),x(Ke=>Ke.filter(jt=>jt.toastId!==h.id)),setTimeout(()=>{C(h)},oZ)},[h,C,x,Ot]);Te.useEffect(()=>{if(h.promise&&$e==="loading"||h.duration===1/0||h.type==="loading")return;let Ke;return A||b||dr?(()=>{if(An.current<Rt.current){const Lr=new Date().getTime()-Rt.current;ge.current=ge.current-Lr}An.current=new Date().getTime()})():(()=>{ge.current!==1/0&&(Rt.current=new Date().getTime(),Ke=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),or()},ge.current))})(),()=>clearTimeout(Ke)},[A,b,h,$e,dr,or]),Te.useEffect(()=>{h.delete&&(or(),h.onDismiss==null||h.onDismiss.call(h,h))},[or,h.delete]);function Gt(){var Ke;if(W?.loading){var jt;return Te.createElement("div",{className:ka(U?.loader,h==null||(jt=h.classNames)==null?void 0:jt.loader,"sonner-loader"),"data-visible":$e==="loading"},W.loading)}return Te.createElement($K,{className:ka(U?.loader,h==null||(Ke=h.classNames)==null?void 0:Ke.loader),visible:$e==="loading"})}const pn=h.icon||W?.[$e]||FK($e);var ua,an;return Te.createElement("li",{tabIndex:0,ref:Oe,className:ka(L,Ae,U?.toast,h==null||(e=h.classNames)==null?void 0:e.toast,U?.default,U?.[$e],h==null||(r=h.classNames)==null?void 0:r[$e]),"data-sonner-toast":"","data-rich-colors":(ua=h.richColors)!=null?ua:k,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":$,"data-promise":!!h.promise,"data-swiped":ce,"data-removed":J,"data-visible":ot,"data-y-position":ir,"data-x-position":Mt,"data-index":w,"data-front":Xe,"data-swiping":j,"data-dismissible":We,"data-type":$e,"data-invert":Sr,"data-swipe-out":ne,"data-swipe-direction":B,"data-expanded":!!(A||oe&&$),"data-testid":h.testId,style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${J?_e:Ot.current}px`,"--initial-height":oe?"auto":`${Se}px`,...I,...h.style},onDragEnd:()=>{Z(!1),se(null),gr.current=null},onPointerDown:Ke=>{Ke.button!==2&&(zn||!We||(ke.current=new Date,ye(Ot.current),Ke.target.setPointerCapture(Ke.pointerId),Ke.target.tagName!=="BUTTON"&&(Z(!0),gr.current={x:Ke.clientX,y:Ke.clientY})))},onPointerUp:()=>{var Ke,jt,Qt;if(ne||!We)return;gr.current=null;const Lr=Number(((Ke=Oe.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$n=Number(((jt=Oe.current)==null?void 0:jt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xt=new Date().getTime()-((Qt=ke.current)==null?void 0:Qt.getTime()),Zr=te==="x"?Lr:$n,_a=Math.abs(Zr)/Xt;if(Math.abs(Zr)>=iZ||_a>.11){ye(Ot.current),h.onDismiss==null||h.onDismiss.call(h,h),q(te==="x"?Lr>0?"right":"left":$n>0?"down":"up"),or(),G(!0);return}else{var Xr,Fr;(Xr=Oe.current)==null||Xr.style.setProperty("--swipe-amount-x","0px"),(Fr=Oe.current)==null||Fr.style.setProperty("--swipe-amount-y","0px")}he(!1),Z(!1),se(null)},onPointerMove:Ke=>{var jt,Qt,Lr;if(!gr.current||!We||((jt=window.getSelection())==null?void 0:jt.toString().length)>0)return;const Xt=Ke.clientY-gr.current.y,Zr=Ke.clientX-gr.current.x;var _a;const Xr=(_a=t.swipeDirections)!=null?_a:sZ(X);!te&&(Math.abs(Zr)>1||Math.abs(Xt)>1)&&se(Math.abs(Zr)>Math.abs(Xt)?"x":"y");let Fr={x:0,y:0};const re=Y=>1/(1.5+Math.abs(Y)/20);if(te==="y"){if(Xr.includes("top")||Xr.includes("bottom"))if(Xr.includes("top")&&Xt<0||Xr.includes("bottom")&&Xt>0)Fr.y=Xt;else{const Y=Xt*re(Xt);Fr.y=Math.abs(Y)<Math.abs(Xt)?Y:Xt}}else if(te==="x"&&(Xr.includes("left")||Xr.includes("right")))if(Xr.includes("left")&&Zr<0||Xr.includes("right")&&Zr>0)Fr.x=Zr;else{const Y=Zr*re(Zr);Fr.x=Math.abs(Y)<Math.abs(Zr)?Y:Zr}(Math.abs(Fr.x)>0||Math.abs(Fr.y)>0)&&he(!0),(Qt=Oe.current)==null||Qt.style.setProperty("--swipe-amount-x",`${Fr.x}px`),(Lr=Oe.current)==null||Lr.style.setProperty("--swipe-amount-y",`${Fr.y}px`)}},ft&&!h.jsx&&$e!=="loading"?Te.createElement("button",{"aria-label":H,"data-disabled":zn,"data-close-button":!0,onClick:zn||!We?()=>{}:()=>{or(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ka(U?.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(an=W?.close)!=null?an:GK):null,($e||h.icon||h.promise)&&h.icon!==null&&(W?.[$e]!==null||h.icon)?Te.createElement("div",{"data-icon":"",className:ka(U?.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Gt():null,h.type!=="loading"?pn:null):null,Te.createElement("div",{"data-content":"",className:ka(U?.content,h==null||(s=h.classNames)==null?void 0:s.content)},Te.createElement("div",{"data-title":"",className:ka(U?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Te.createElement("div",{"data-description":"",className:ka(P,Le,U?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),Te.isValidElement(h.cancel)?h.cancel:h.cancel&&ap(h.cancel)?Te.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:Ke=>{ap(h.cancel)&&We&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ke),or())},className:ka(U?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,Te.isValidElement(h.action)?h.action:h.action&&ap(h.action)?Te.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||M,onClick:Ke=>{ap(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ke),!Ke.defaultPrevented&&or())},className:ka(U?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function yO(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function cZ(t,e){const r={};return[t,e].forEach((n,a)=>{const s=a===1,l=s?"--mobile-offset":"--offset",c=s?rZ:tZ;function d(f){["top","right","bottom","left"].forEach(m=>{r[`${l}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof n=="number"||typeof n=="string"?d(n):typeof n=="object"?["top","right","bottom","left"].forEach(f=>{n[f]===void 0?r[`${l}-${f}`]=c:r[`${l}-${f}`]=typeof n[f]=="number"?`${n[f]}px`:n[f]}):d(c)}),r}const uZ=Te.forwardRef(function(e,r){const{id:n,invert:a,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:m,mobileOffset:h,theme:v="light",richColors:b,duration:x,style:S,visibleToasts:R=eZ,toastOptions:w,dir:_=yO(),gap:A=aZ,icons:C,containerAriaLabel:k="Notifications"}=e,[N,I]=Te.useState([]),O=Te.useMemo(()=>n?N.filter($=>$.toasterId===n):N.filter($=>!$.toasterId),[N,n]),M=Te.useMemo(()=>Array.from(new Set([s].concat(O.filter($=>$.position).map($=>$.position)))),[O,s]),[L,P]=Te.useState([]),[V,X]=Te.useState(!1),[Q,oe]=Te.useState(!1),[U,W]=Te.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=Te.useRef(null),te=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),se=Te.useRef(null),B=Te.useRef(!1),q=Te.useCallback($=>{I(K=>{var J;return(J=K.find(z=>z.id===$.id))!=null&&J.delete||Sn.dismiss($.id),K.filter(({id:z})=>z!==$.id)})},[]);return Te.useEffect(()=>Sn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{I(K=>K.map(J=>J.id===$.id?{...J,delete:!0}:J))});return}setTimeout(()=>{lB.flushSync(()=>{I(K=>{const J=K.findIndex(z=>z.id===$.id);return J!==-1?[...K.slice(0,J),{...K[J],...$},...K.slice(J+1)]:[$,...K]})})})}),[N]),Te.useEffect(()=>{if(v!=="system"){W(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:K})=>{W(K?"dark":"light")})}catch{$.addListener(({matches:J})=>{try{W(J?"dark":"light")}catch(z){console.error(z)}})}},[v]),Te.useEffect(()=>{N.length<=1&&X(!1)},[N]),Te.useEffect(()=>{const $=K=>{var J;if(l.every(Z=>K[Z]||K.code===Z)){var j;X(!0),(j=H.current)==null||j.focus()}K.code==="Escape"&&(document.activeElement===H.current||(J=H.current)!=null&&J.contains(document.activeElement))&&X(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[l]),Te.useEffect(()=>{if(H.current)return()=>{se.current&&(se.current.focus({preventScroll:!0}),se.current=null,B.current=!1)}},[H.current]),Te.createElement("section",{ref:r,"aria-label":`${k} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map(($,K)=>{var J;const[z,j]=$.split("-");return O.length?Te.createElement("ol",{key:$,dir:_==="auto"?yO():_,tabIndex:-1,ref:H,className:f,"data-sonner-toaster":!0,"data-sonner-theme":U,"data-y-position":z,"data-x-position":j,style:{"--front-toast-height":`${((J=L[0])==null?void 0:J.height)||0}px`,"--width":`${nZ}px`,"--gap":`${A}px`,...S,...cZ(m,h)},onBlur:Z=>{B.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(B.current=!1,se.current&&(se.current.focus({preventScroll:!0}),se.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||B.current||(B.current=!0,se.current=Z.relatedTarget)},onMouseEnter:()=>X(!0),onMouseMove:()=>X(!0),onMouseLeave:()=>{Q||X(!1)},onDragEnd:()=>X(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},O.filter(Z=>!Z.position&&K===0||Z.position===$).map((Z,ne)=>{var G,ce;return Te.createElement(lZ,{key:Z.id,icons:C,index:ne,toast:Z,defaultRichColors:b,duration:(G=w?.duration)!=null?G:x,className:w?.className,descriptionClassName:w?.descriptionClassName,invert:a,visibleToasts:R,closeButton:(ce=w?.closeButton)!=null?ce:d,interacting:Q,position:$,style:w?.style,unstyled:w?.unstyled,classNames:w?.classNames,cancelButtonStyle:w?.cancelButtonStyle,actionButtonStyle:w?.actionButtonStyle,closeButtonAriaLabel:w?.closeButtonAriaLabel,removeToast:q,toasts:O.filter(he=>he.position==Z.position),heights:L.filter(he=>he.position==Z.position),setHeights:P,expandByDefault:c,gap:A,expanded:V,swipeDirections:e.swipeDirections})})):null}))});function EO(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ha(...t){return e=>{let r=!1;const n=t.map(a=>{const s=EO(a,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():EO(t[a],null)}}}}function Nt(...t){return y.useCallback(Ha(...t),t)}var dZ=Symbol.for("react.lazy"),pm=jm[" use ".trim().toString()];function fZ(t){return typeof t=="object"&&t!==null&&"then"in t}function gB(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===dZ&&"_payload"in t&&fZ(t._payload)}function vB(t){const e=pZ(t),r=y.forwardRef((n,a)=>{let{children:s,...l}=n;gB(s)&&typeof pm=="function"&&(s=pm(s._payload));const c=y.Children.toArray(s),d=c.find(hZ);if(d){const f=d.props.children,m=c.map(h=>h===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}var bB=vB("Slot");function pZ(t){const e=y.forwardRef((r,n)=>{let{children:a,...s}=r;if(gB(a)&&typeof pm=="function"&&(a=pm(a._payload)),y.isValidElement(a)){const l=vZ(a),c=gZ(s,a.props);return a.type!==y.Fragment&&(c.ref=n?Ha(n,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var mZ=Symbol("radix.slottable");function hZ(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mZ}function gZ(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function vZ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function yB(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=yB(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function EB(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=yB(t))&&(n&&(n+=" "),n+=e);return n}const SO=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,wO=EB,SB=(t,e)=>r=>{var n;if(e?.variants==null)return wO(t,r?.class,r?.className);const{variants:a,defaultVariants:s}=e,l=Object.keys(a).map(f=>{const m=r?.[f],h=s?.[f];if(m===null)return null;const v=SO(m)||SO(h);return a[f][v]}),c=r&&Object.entries(r).reduce((f,m)=>{let[h,v]=m;return v===void 0||(f[h]=v),f},{}),d=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((f,m)=>{let{class:h,className:v,...b}=m;return Object.entries(b).every(x=>{let[S,R]=x;return Array.isArray(R)?R.includes({...s,...c}[S]):{...s,...c}[S]===R})?[...f,h,v]:f},[]);return wO(t,l,d,r?.class,r?.className)},bZ=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},yZ=(t,e)=>({classGroupId:t,validator:e}),wB=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),mm="-",xO=[],EZ="arbitrary..",SZ=t=>{const e=xZ(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return wZ(l);const c=l.split(mm),d=c[0]===""&&c.length>1?1:0;return xB(c,d,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=n[l],f=r[l];return d?f?bZ(f,d):d:f||xO}return r[l]||xO}}},xB=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],s=r.nextPart.get(a);if(s){const f=xB(t,e+1,s);if(f)return f}const l=r.validators;if(l===null)return;const c=e===0?t.join(mm):t.slice(e).join(mm),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(c))return m.classGroupId}},wZ=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?EZ+n:void 0})(),xZ=t=>{const{theme:e,classGroups:r}=t;return _Z(r,e)},_Z=(t,e)=>{const r=wB();for(const n in t){const a=t[n];vR(a,r,n,e)}return r},vR=(t,e,r,n)=>{const a=t.length;for(let s=0;s<a;s++){const l=t[s];TZ(l,e,r,n)}},TZ=(t,e,r,n)=>{if(typeof t=="string"){RZ(t,e,r);return}if(typeof t=="function"){AZ(t,e,r,n);return}CZ(t,e,r,n)},RZ=(t,e,r)=>{const n=t===""?e:_B(e,t);n.classGroupId=r},AZ=(t,e,r,n)=>{if(NZ(t)){vR(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(yZ(r,t))},CZ=(t,e,r,n)=>{const a=Object.entries(t),s=a.length;for(let l=0;l<s;l++){const[c,d]=a[l];vR(d,_B(e,c),r,n)}},_B=(t,e)=>{let r=t;const n=e.split(mm),a=n.length;for(let s=0;s<a;s++){const l=n[s];let c=r.nextPart.get(l);c||(c=wB(),r.nextPart.set(l,c)),r=c}return r},NZ=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,kZ=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const a=(s,l)=>{r[s]=l,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(s){let l=r[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return a(s,l),l},set(s,l){s in r?r[s]=l:a(s,l)}}},G_="!",_O=":",IZ=[],TO=(t,e,r,n,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),OZ=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=a=>{const s=[];let l=0,c=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const R=a[S];if(l===0&&c===0){if(R===_O){s.push(a.slice(d,S)),d=S+1;continue}if(R==="/"){f=S;continue}}R==="["?l++:R==="]"?l--:R==="("?c++:R===")"&&c--}const h=s.length===0?a:a.slice(d);let v=h,b=!1;h.endsWith(G_)?(v=h.slice(0,-1),b=!0):h.startsWith(G_)&&(v=h.slice(1),b=!0);const x=f&&f>d?f-d:void 0;return TO(s,b,v,x)};if(e){const a=e+_O,s=n;n=l=>l.startsWith(a)?s(l.slice(a.length)):TO(IZ,!1,l,void 0,!0)}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},DZ=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let a=[];for(let s=0;s<r.length;s++){const l=r[s],c=l[0]==="[",d=e.has(l);c||d?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(l)):a.push(l)}return a.length>0&&(a.sort(),n.push(...a)),n}},LZ=t=>({cache:kZ(t.cacheSize),parseClassName:OZ(t),sortModifiers:DZ(t),...SZ(t)}),MZ=/\s+/,PZ=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=e,l=[],c=t.trim().split(MZ);let d="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:h,modifiers:v,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:S}=r(m);if(h){d=m+(d.length>0?" "+d:d);continue}let R=!!S,w=n(R?x.substring(0,S):x);if(!w){if(!R){d=m+(d.length>0?" "+d:d);continue}if(w=n(x),!w){d=m+(d.length>0?" "+d:d);continue}R=!1}const _=v.length===0?"":v.length===1?v[0]:s(v).join(":"),A=b?_+G_:_,C=A+w;if(l.indexOf(C)>-1)continue;l.push(C);const k=a(w,R);for(let N=0;N<k.length;++N){const I=k[N];l.push(A+I)}d=m+(d.length>0?" "+d:d)}return d},jZ=(...t)=>{let e=0,r,n,a="";for(;e<t.length;)(r=t[e++])&&(n=TB(r))&&(a&&(a+=" "),a+=n);return a},TB=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=TB(t[n]))&&(r&&(r+=" "),r+=e);return r},UZ=(t,...e)=>{let r,n,a,s;const l=d=>{const f=e.reduce((m,h)=>h(m),t());return r=LZ(f),n=r.cache.get,a=r.cache.set,s=c,c(d)},c=d=>{const f=n(d);if(f)return f;const m=PZ(d,r);return a(d,m),m};return s=l,(...d)=>s(jZ(...d))},FZ=[],Ir=t=>{const e=r=>r[t]||FZ;return e.isThemeGetter=!0,e},RB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,AB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zZ=/^\d+\/\d+$/,$Z=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BZ=/\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$/,qZ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HZ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VZ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fl=t=>zZ.test(t),gt=t=>!!t&&!Number.isNaN(Number(t)),co=t=>!!t&&Number.isInteger(Number(t)),jb=t=>t.endsWith("%")&>(t.slice(0,-1)),gi=t=>$Z.test(t),GZ=()=>!0,WZ=t=>BZ.test(t)&&!qZ.test(t),CB=()=>!1,YZ=t=>HZ.test(t),KZ=t=>VZ.test(t),ZZ=t=>!qe(t)&&!He(t),XZ=t=>bc(t,IB,CB),qe=t=>RB.test(t),ts=t=>bc(t,OB,WZ),Ub=t=>bc(t,rX,gt),RO=t=>bc(t,NB,CB),QZ=t=>bc(t,kB,KZ),ip=t=>bc(t,DB,YZ),He=t=>AB.test(t),bu=t=>yc(t,OB),JZ=t=>yc(t,nX),AO=t=>yc(t,NB),eX=t=>yc(t,IB),tX=t=>yc(t,kB),op=t=>yc(t,DB,!0),bc=(t,e,r)=>{const n=RB.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},yc=(t,e,r=!1)=>{const n=AB.exec(t);return n?n[1]?e(n[1]):r:!1},NB=t=>t==="position"||t==="percentage",kB=t=>t==="image"||t==="url",IB=t=>t==="length"||t==="size"||t==="bg-size",OB=t=>t==="length",rX=t=>t==="number",nX=t=>t==="family-name",DB=t=>t==="shadow",aX=()=>{const t=Ir("color"),e=Ir("font"),r=Ir("text"),n=Ir("font-weight"),a=Ir("tracking"),s=Ir("leading"),l=Ir("breakpoint"),c=Ir("container"),d=Ir("spacing"),f=Ir("radius"),m=Ir("shadow"),h=Ir("inset-shadow"),v=Ir("text-shadow"),b=Ir("drop-shadow"),x=Ir("blur"),S=Ir("perspective"),R=Ir("aspect"),w=Ir("ease"),_=Ir("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),He,qe],N=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],O=()=>[He,qe,d],M=()=>[fl,"full","auto",...O()],L=()=>[co,"none","subgrid",He,qe],P=()=>["auto",{span:["full",co,He,qe]},co,He,qe],V=()=>[co,"auto",He,qe],X=()=>["auto","min","max","fr",He,qe],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...O()],W=()=>[fl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],H=()=>[t,He,qe],te=()=>[...C(),AO,RO,{position:[He,qe]}],se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",eX,XZ,{size:[He,qe]}],q=()=>[jb,bu,ts],$=()=>["","none","full",f,He,qe],K=()=>["",gt,bu,ts],J=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[gt,jb,AO,RO],Z=()=>["","none",x,He,qe],ne=()=>["none",gt,He,qe],G=()=>["none",gt,He,qe],ce=()=>[gt,He,qe],he=()=>[fl,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gi],breakpoint:[gi],color:[GZ],container:[gi],"drop-shadow":[gi],ease:["in","out","in-out"],font:[ZZ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gi],shadow:[gi],spacing:["px",gt],text:[gi],"text-shadow":[gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fl,qe,He,R]}],container:["container"],columns:[{columns:[gt,qe,He,c]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[co,"auto",He,qe]}],basis:[{basis:[fl,"full","auto",c,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[gt,fl,"auto","initial","none",qe]}],grow:[{grow:["",gt,He,qe]}],shrink:[{shrink:["",gt,He,qe]}],order:[{order:[co,"first","last","none",He,qe]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[c,"screen",...W()]}],"min-w":[{"min-w":[c,"screen","none",...W()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",r,bu,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,He,Ub]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jb,qe]}],"font-family":[{font:[JZ,qe,e]}],"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:[a,He,qe]}],"line-clamp":[{"line-clamp":[gt,"none",He,Ub]}],leading:[{leading:[s,...O()]}],"list-image":[{"list-image":["none",He,qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",He,qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[gt,"from-font","auto",He,ts]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[gt,"auto",He,qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He,qe]}],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",He,qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},co,He,qe],radial:["",He,qe],conic:[co,He,qe]},tX,QZ]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[gt,He,qe]}],"outline-w":[{outline:["",gt,bu,ts]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",m,op,ip]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",h,op,ip]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[gt,ts]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",v,op,ip]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[gt,He,qe]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],"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":[gt]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[He,qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[gt]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",He,qe]}],filter:[{filter:["","none",He,qe]}],blur:[{blur:Z()}],brightness:[{brightness:[gt,He,qe]}],contrast:[{contrast:[gt,He,qe]}],"drop-shadow":[{"drop-shadow":["","none",b,op,ip]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",gt,He,qe]}],"hue-rotate":[{"hue-rotate":[gt,He,qe]}],invert:[{invert:["",gt,He,qe]}],saturate:[{saturate:[gt,He,qe]}],sepia:[{sepia:["",gt,He,qe]}],"backdrop-filter":[{"backdrop-filter":["","none",He,qe]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[gt,He,qe]}],"backdrop-contrast":[{"backdrop-contrast":[gt,He,qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",gt,He,qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[gt,He,qe]}],"backdrop-invert":[{"backdrop-invert":["",gt,He,qe]}],"backdrop-opacity":[{"backdrop-opacity":[gt,He,qe]}],"backdrop-saturate":[{"backdrop-saturate":[gt,He,qe]}],"backdrop-sepia":[{"backdrop-sepia":["",gt,He,qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",He,qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[gt,"initial",He,qe]}],ease:[{ease:["linear","initial",w,He,qe]}],delay:[{delay:[gt,He,qe]}],animate:[{animate:["none",_,He,qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,He,qe]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[He,qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",He,qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",He,qe]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[gt,bu,ts,Ub]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},iX=UZ(aX);function Me(...t){return iX(EB(t))}const oX=SB("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Va({className:t,variant:e,asChild:r=!1,...n}){const a=r?bB:"span";return g.jsx(a,{"data-slot":"badge",className:Me(oX({variant:e}),t),...n})}const sX=SB("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-full gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-full px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function et({className:t,variant:e,size:r,asChild:n=!1,...a}){const s=n?bB:"button";return g.jsx(s,{"data-slot":"button",className:Me(sX({variant:e,size:r,className:t})),...a})}var lX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ui=lX.reduce((t,e)=>{const r=vB(`Primitive.${e}`),n=y.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),cX="Label",LB=y.forwardRef((t,e)=>g.jsx(Ui.label,{...t,ref:e,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));LB.displayName=cX;var uX=LB;function lr({className:t,...e}){return g.jsx(uX,{"data-slot":"label",className:Me("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function bR({message:t,className:e="",vertical:r,noBorder:n}){return g.jsx("div",{className:Me(`mt-2 rounded-md p-6 ${e}`,!n&&"border"),children:g.jsxs("p",{className:Me("text-sm text-muted-foreground flex items-center gap-4",r&&"flex-col"),children:[g.jsx("svg",{width:"40",height:"40",viewBox:"0 0 273 273",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",children:g.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:g.jsxs("g",{transform:"translate(5.320900, 5.320900)",fillRule:"nonzero",className:"stroke-black dark:stroke-white",strokeWidth:"4",children:[g.jsx("path",{d:"M49.953025,-2.10854389 C63.26892,-2.21867124 76.6185256,2.70621155 86.9019463,12.6653164 L86.9019463,12.6653164 L87.505627,13.2592944 C97.5154947,23.2654892 102.640454,36.3074513 102.880738,49.4222247 C103.08932,77.4533067 113.877287,105.391753 135.242867,126.757333 C156.613383,148.127849 184.559216,158.914875 212.568138,159.119313 L212.568138,159.119313 L213.212264,159.134159 C225.843948,159.517566 238.363557,164.434972 248.121998,173.886137 L248.121998,173.886137 L248.725621,174.480088 C258.982114,184.732164 264.11035,198.171134 264.11035,211.6101 C264.11035,225.04592 258.984514,238.481745 248.732867,248.732867 C238.592792,258.872942 225.336706,263.997882 212.046872,264.107794 C198.731075,264.21792 185.381569,259.293085 175.098248,249.334078 L175.098248,249.334078 L174.494602,248.740134 C163.75802,238.008189 158.640853,223.784027 159.143413,209.719372 C158.258245,182.640933 147.489786,155.83332 126.828333,135.171867 C106.351297,114.694831 79.8363505,103.934873 53.0237258,102.891841 L53.0237258,102.891841 L52.2811438,102.865674 C38.4791718,103.347421 24.5325234,98.4328111 13.8776628,88.1140866 L13.8776628,88.1140866 L13.2739843,87.5201168 C3.12895117,77.3789607 -1.9984796,64.1195994 -2.10841888,50.8264755 C-2.21854669,37.5105567 2.70635908,24.1609269 12.6655135,13.8774565 L12.6655135,13.8774565 L13.2594878,13.2737797 C23.4005926,3.12880025 36.659927,-1.99860507 49.953025,-2.10854389 Z"}),g.jsx("circle",{cx:"50",cy:"212.0001",r:"52.5"}),g.jsx("circle",{cx:"212.0001",cy:"50",r:"52.5"})]})})}),t]})})}function MB({className:t,color:e,children:r,grayscaled:n=!1}){const a=y.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[1]||"0")}return n?0:.2},[e,n]),s=y.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[0]||"0.5")}return n?.3:.4},[e,n]),l=y.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[2]||"0")}return Math.floor(Math.random()*360)},[e]),c=y.useMemo(()=>e||`oklch(${Math.min(s,1)} ${a} ${l})`,[l,a,s]),d=y.useMemo(()=>`oklch(${Math.min(s*2,1)} ${a} ${l})`,[l,a,s,e]),f=y.useMemo(()=>Math.floor(Math.random()*360),[l]),m=y.useMemo(()=>"1000%",[]);return g.jsx("section",{className:Me("relative w-full h-full overflow-hidden",t),style:{background:`${d}`},children:g.jsxs("div",{className:"isolate relative w-full h-full",children:[g.jsx("div",{className:"noise w-full h-full",style:{background:`linear-gradient(${f}deg, ${c}, transparent), url(https://grainy-gradients.vercel.app/noise.svg)`,filter:`contrast(120%) brightness(${m})`}}),r&&g.jsx("div",{className:"relative z-10 w-full h-full",children:r})]})})}function ze(t,e,{checkForDefaultPrevented:r=!0}={}){return function(a){if(t?.(a),r===!1||!a.defaultPrevented)return e?.(a)}}function dX(t,e){const r=y.createContext(e),n=s=>{const{children:l,...c}=s,d=y.useMemo(()=>c,Object.values(c));return g.jsx(r.Provider,{value:d,children:l})};n.displayName=t+"Provider";function a(s){const l=y.useContext(r);if(l)return l;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[n,a]}function Za(t,e=[]){let r=[];function n(s,l){const c=y.createContext(l),d=r.length;r=[...r,l];const f=h=>{const{scope:v,children:b,...x}=h,S=v?.[t]?.[d]||c,R=y.useMemo(()=>x,Object.values(x));return g.jsx(S.Provider,{value:R,children:b})};f.displayName=s+"Provider";function m(h,v){const b=v?.[t]?.[d]||c,x=y.useContext(b);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[f,m]}const a=()=>{const s=r.map(l=>y.createContext(l));return function(c){const d=c?.[t]||s;return y.useMemo(()=>({[`__scope${t}`]:{...c,[t]:d}}),[c,d])}};return a.scopeName=t,[n,fX(a,...e)]}function fX(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=n.reduce((c,{useScope:d,scopeName:f})=>{const h=d(s)[`__scope${f}`];return{...c,...h}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return r.scopeName=e.scopeName,r}var nn=globalThis?.document?y.useLayoutEffect:()=>{},pX=jm[" useInsertionEffect ".trim().toString()]||nn;function _o({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[a,s,l]=mX({defaultProp:e,onChange:r}),c=t!==void 0,d=c?t:a;{const m=y.useRef(t!==void 0);y.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,n])}const f=y.useCallback(m=>{if(c){const h=hX(m)?m(t):m;h!==t&&l.current?.(h)}else s(m)},[c,t,s,l]);return[d,f]}function mX({defaultProp:t,onChange:e}){const[r,n]=y.useState(t),a=y.useRef(r),s=y.useRef(e);return pX(()=>{s.current=e},[e]),y.useEffect(()=>{a.current!==r&&(s.current?.(r),a.current=r)},[r,a]),[r,n,s]}function hX(t){return typeof t=="function"}function PB(t){const e=y.useRef({value:t,previous:t});return y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function jB(t){const[e,r]=y.useState(void 0);return nn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=t.offsetWidth,c=t.offsetHeight;r({width:l,height:c})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function ws(t){const e=gX(t),r=y.forwardRef((n,a)=>{const{children:s,...l}=n,c=y.Children.toArray(s),d=c.find(bX);if(d){const f=d.props.children,m=c.map(h=>h===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}function gX(t){const e=y.forwardRef((r,n)=>{const{children:a,...s}=r;if(y.isValidElement(a)){const l=EX(a),c=yX(s,a.props);return a.type!==y.Fragment&&(c.ref=n?Ha(n,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var UB=Symbol("radix.slottable");function vX(t){const e=({children:r})=>g.jsx(g.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=UB,e}function bX(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===UB}function yX(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function EX(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var SX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vt=SX.reduce((t,e)=>{const r=ws(`Primitive.${e}`),n=y.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function FB(t,e){t&&vc.flushSync(()=>t.dispatchEvent(e))}var qm="Switch",[wX]=Za(qm),[xX,_X]=wX(qm),zB=y.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:s,required:l,disabled:c,value:d="on",onCheckedChange:f,form:m,...h}=t,[v,b]=y.useState(null),x=Nt(e,A=>b(A)),S=y.useRef(!1),R=v?m||!!v.closest("form"):!0,[w,_]=_o({prop:a,defaultProp:s??!1,onChange:f,caller:qm});return g.jsxs(xX,{scope:r,checked:w,disabled:c,children:[g.jsx(vt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":HB(w),"data-disabled":c?"":void 0,disabled:c,value:d,...h,ref:x,onClick:ze(t.onClick,A=>{_(C=>!C),R&&(S.current=A.isPropagationStopped(),S.current||A.stopPropagation())})}),R&&g.jsx(qB,{control:v,bubbles:!S.current,name:n,value:d,checked:w,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});zB.displayName=qm;var $B="SwitchThumb",BB=y.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,a=_X($B,r);return g.jsx(vt.span,{"data-state":HB(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:e})});BB.displayName=$B;var TX="SwitchBubbleInput",qB=y.forwardRef(({__scopeSwitch:t,control:e,checked:r,bubbles:n=!0,...a},s)=>{const l=y.useRef(null),c=Nt(l,s),d=PB(r),f=jB(e);return y.useEffect(()=>{const m=l.current;if(!m)return;const h=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(h,"checked").set;if(d!==r&&b){const x=new Event("click",{bubbles:n});b.call(m,r),m.dispatchEvent(x)}},[d,r,n]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qB.displayName=TX;function HB(t){return t?"checked":"unchecked"}var VB=zB,RX=BB;function yR({ref:t,className:e,...r}){return g.jsx(VB,{className:Me("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...r,ref:t,children:g.jsx(RX,{className:Me("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})}yR.displayName=VB.displayName;function Ga(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>(...r)=>e.current?.(...r),[])}function AX(t,e=globalThis?.document){const r=Ga(t);y.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var CX="DismissableLayer",W_="dismissableLayer.update",NX="dismissableLayer.pointerDownOutside",kX="dismissableLayer.focusOutside",CO,GB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ec=y.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,f=y.useContext(GB),[m,h]=y.useState(null),v=m?.ownerDocument??globalThis?.document,[,b]=y.useState({}),x=Nt(e,I=>h(I)),S=Array.from(f.layers),[R]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=S.indexOf(R),_=m?S.indexOf(m):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,C=_>=w,k=DX(I=>{const O=I.target,M=[...f.branches].some(L=>L.contains(O));!C||M||(a?.(I),l?.(I),I.defaultPrevented||c?.())},v),N=LX(I=>{const O=I.target;[...f.branches].some(L=>L.contains(O))||(s?.(I),l?.(I),I.defaultPrevented||c?.())},v);return AX(I=>{_===f.layers.size-1&&(n?.(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},v),y.useEffect(()=>{if(m)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(CO=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),NO(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=CO)}},[m,v,r,f]),y.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),NO())},[m,f]),y.useEffect(()=>{const I=()=>b({});return document.addEventListener(W_,I),()=>document.removeEventListener(W_,I)},[]),g.jsx(vt.div,{...d,ref:x,style:{pointerEvents:A?C?"auto":"none":void 0,...t.style},onFocusCapture:ze(t.onFocusCapture,N.onFocusCapture),onBlurCapture:ze(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ze(t.onPointerDownCapture,k.onPointerDownCapture)})});Ec.displayName=CX;var IX="DismissableLayerBranch",OX=y.forwardRef((t,e)=>{const r=y.useContext(GB),n=y.useRef(null),a=Nt(e,n);return y.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(vt.div,{...t,ref:a})});OX.displayName=IX;function DX(t,e=globalThis?.document){const r=Ga(t),n=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let d=function(){WB(NX,r,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",a.current),a.current=d,e.addEventListener("click",a.current,{once:!0})):d()}else e.removeEventListener("click",a.current);n.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",s),e.removeEventListener("click",a.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function LX(t,e=globalThis?.document){const r=Ga(t),n=y.useRef(!1);return y.useEffect(()=>{const a=s=>{s.target&&!n.current&&WB(kX,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function NO(){const t=new CustomEvent(W_);document.dispatchEvent(t)}function WB(t,e,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),n?FB(a,s):a.dispatchEvent(s)}var MX=jm[" useId ".trim().toString()]||(()=>{}),PX=0;function Yr(t){const[e,r]=y.useState(MX());return nn(()=>{r(n=>n??String(PX++))},[t]),t||(e?`radix-${e}`:"")}const jX=["top","right","bottom","left"],To=Math.min,Un=Math.max,hm=Math.round,sp=Math.floor,Fa=t=>({x:t,y:t}),UX={left:"right",right:"left",bottom:"top",top:"bottom"},FX={start:"end",end:"start"};function Y_(t,e,r){return Un(t,To(e,r))}function Ii(t,e){return typeof t=="function"?t(e):t}function Oi(t){return t.split("-")[0]}function Sc(t){return t.split("-")[1]}function ER(t){return t==="x"?"y":"x"}function SR(t){return t==="y"?"height":"width"}const zX=new Set(["top","bottom"]);function Ma(t){return zX.has(Oi(t))?"y":"x"}function wR(t){return ER(Ma(t))}function $X(t,e,r){r===void 0&&(r=!1);const n=Sc(t),a=wR(t),s=SR(a);let l=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(l=gm(l)),[l,gm(l)]}function BX(t){const e=gm(t);return[K_(t),e,K_(e)]}function K_(t){return t.replace(/start|end/g,e=>FX[e])}const kO=["left","right"],IO=["right","left"],qX=["top","bottom"],HX=["bottom","top"];function VX(t,e,r){switch(t){case"top":case"bottom":return r?e?IO:kO:e?kO:IO;case"left":case"right":return e?qX:HX;default:return[]}}function GX(t,e,r,n){const a=Sc(t);let s=VX(Oi(t),r==="start",n);return a&&(s=s.map(l=>l+"-"+a),e&&(s=s.concat(s.map(K_)))),s}function gm(t){return t.replace(/left|right|bottom|top/g,e=>UX[e])}function WX(t){return{top:0,right:0,bottom:0,left:0,...t}}function YB(t){return typeof t!="number"?WX(t):{top:t,right:t,bottom:t,left:t}}function vm(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function OO(t,e,r){let{reference:n,floating:a}=t;const s=Ma(e),l=wR(e),c=SR(l),d=Oi(e),f=s==="y",m=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,v=n[c]/2-a[c]/2;let b;switch(d){case"top":b={x:m,y:n.y-a.height};break;case"bottom":b={x:m,y:n.y+n.height};break;case"right":b={x:n.x+n.width,y:h};break;case"left":b={x:n.x-a.width,y:h};break;default:b={x:n.x,y:n.y}}switch(Sc(e)){case"start":b[l]-=v*(r&&f?-1:1);break;case"end":b[l]+=v*(r&&f?-1:1);break}return b}const YX=async(t,e,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:l}=r,c=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:h}=OO(f,n,d),v=n,b={},x=0;for(let S=0;S<c.length;S++){const{name:R,fn:w}=c[S],{x:_,y:A,data:C,reset:k}=await w({x:m,y:h,initialPlacement:n,placement:v,strategy:a,middlewareData:b,rects:f,platform:l,elements:{reference:t,floating:e}});m=_??m,h=A??h,b={...b,[R]:{...b[R],...C}},k&&x<=50&&(x++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(f=k.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:a}):k.rects),{x:m,y:h}=OO(f,v,d)),S=-1)}return{x:m,y:h,placement:v,strategy:a,middlewareData:b}};async function rd(t,e){var r;e===void 0&&(e={});const{x:n,y:a,platform:s,rects:l,elements:c,strategy:d}=t,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:v=!1,padding:b=0}=Ii(e,t),x=YB(b),R=c[v?h==="floating"?"reference":"floating":h],w=vm(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(R)))==null||r?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:d})),_=h==="floating"?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},k=vm(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:A,strategy:d}):_);return{top:(w.top-k.top+x.top)/C.y,bottom:(k.bottom-w.bottom+x.bottom)/C.y,left:(w.left-k.left+x.left)/C.x,right:(k.right-w.right+x.right)/C.x}}const KX=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:a,rects:s,platform:l,elements:c,middlewareData:d}=e,{element:f,padding:m=0}=Ii(t,e)||{};if(f==null)return{};const h=YB(m),v={x:r,y:n},b=wR(a),x=SR(b),S=await l.getDimensions(f),R=b==="y",w=R?"top":"left",_=R?"bottom":"right",A=R?"clientHeight":"clientWidth",C=s.reference[x]+s.reference[b]-v[b]-s.floating[x],k=v[b]-s.reference[b],N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let I=N?N[A]:0;(!I||!await(l.isElement==null?void 0:l.isElement(N)))&&(I=c.floating[A]||s.floating[x]);const O=C/2-k/2,M=I/2-S[x]/2-1,L=To(h[w],M),P=To(h[_],M),V=L,X=I-S[x]-P,Q=I/2-S[x]/2+O,oe=Y_(V,Q,X),U=!d.arrow&&Sc(a)!=null&&Q!==oe&&s.reference[x]/2-(Q<V?L:P)-S[x]/2<0,W=U?Q<V?Q-V:Q-X:0;return{[b]:v[b]+W,data:{[b]:oe,centerOffset:Q-oe-W,...U&&{alignmentOffset:W}},reset:U}}}),ZX=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:a,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...R}=Ii(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Oi(a),_=Ma(c),A=Oi(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(f.floating)),k=v||(A||!S?[gm(c)]:BX(c)),N=x!=="none";!v&&N&&k.push(...GX(c,S,x,C));const I=[c,...k],O=await rd(e,R),M=[];let L=((n=s.flip)==null?void 0:n.overflows)||[];if(m&&M.push(O[w]),h){const Q=$X(a,l,C);M.push(O[Q[0]],O[Q[1]])}if(L=[...L,{placement:a,overflows:M}],!M.every(Q=>Q<=0)){var P,V;const Q=(((P=s.flip)==null?void 0:P.index)||0)+1,oe=I[Q];if(oe&&(!(h==="alignment"?_!==Ma(oe):!1)||L.every(H=>Ma(H.placement)===_?H.overflows[0]>0:!0)))return{data:{index:Q,overflows:L},reset:{placement:oe}};let U=(V=L.filter(W=>W.overflows[0]<=0).sort((W,H)=>W.overflows[1]-H.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(b){case"bestFit":{var X;const W=(X=L.filter(H=>{if(N){const te=Ma(H.placement);return te===_||te==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(te=>te>0).reduce((te,se)=>te+se,0)]).sort((H,te)=>H[1]-te[1])[0])==null?void 0:X[0];W&&(U=W);break}case"initialPlacement":U=c;break}if(a!==U)return{reset:{placement:U}}}return{}}}};function DO(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function LO(t){return jX.some(e=>t[e]>=0)}const XX=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...a}=Ii(t,e);switch(n){case"referenceHidden":{const s=await rd(e,{...a,elementContext:"reference"}),l=DO(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:LO(l)}}}case"escaped":{const s=await rd(e,{...a,altBoundary:!0}),l=DO(s,r.floating);return{data:{escapedOffsets:l,escaped:LO(l)}}}default:return{}}}}},KB=new Set(["left","top"]);async function QX(t,e){const{placement:r,platform:n,elements:a}=t,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),l=Oi(r),c=Sc(r),d=Ma(r)==="y",f=KB.has(l)?-1:1,m=s&&d?-1:1,h=Ii(e,t);let{mainAxis:v,crossAxis:b,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof x=="number"&&(b=c==="end"?x*-1:x),d?{x:b*m,y:v*f}:{x:v*f,y:b*m}}const JX=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:a,y:s,placement:l,middlewareData:c}=e,d=await QX(e,t);return l===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:a+d.x,y:s+d.y,data:{...d,placement:l}}}}},eQ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:a}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:R=>{let{x:w,y:_}=R;return{x:w,y:_}}},...d}=Ii(t,e),f={x:r,y:n},m=await rd(e,d),h=Ma(Oi(a)),v=ER(h);let b=f[v],x=f[h];if(s){const R=v==="y"?"top":"left",w=v==="y"?"bottom":"right",_=b+m[R],A=b-m[w];b=Y_(_,b,A)}if(l){const R=h==="y"?"top":"left",w=h==="y"?"bottom":"right",_=x+m[R],A=x-m[w];x=Y_(_,x,A)}const S=c.fn({...e,[v]:b,[h]:x});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[v]:s,[h]:l}}}}}},tQ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:a,rects:s,middlewareData:l}=e,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Ii(t,e),m={x:r,y:n},h=Ma(a),v=ER(h);let b=m[v],x=m[h];const S=Ii(c,e),R=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const A=v==="y"?"height":"width",C=s.reference[v]-s.floating[A]+R.mainAxis,k=s.reference[v]+s.reference[A]-R.mainAxis;b<C?b=C:b>k&&(b=k)}if(f){var w,_;const A=v==="y"?"width":"height",C=KB.has(Oi(a)),k=s.reference[h]-s.floating[A]+(C&&((w=l.offset)==null?void 0:w[h])||0)+(C?0:R.crossAxis),N=s.reference[h]+s.reference[A]+(C?0:((_=l.offset)==null?void 0:_[h])||0)-(C?R.crossAxis:0);x<k?x=k:x>N&&(x=N)}return{[v]:b,[h]:x}}}},rQ=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:a,rects:s,platform:l,elements:c}=e,{apply:d=()=>{},...f}=Ii(t,e),m=await rd(e,f),h=Oi(a),v=Sc(a),b=Ma(a)==="y",{width:x,height:S}=s.floating;let R,w;h==="top"||h==="bottom"?(R=h,w=v===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(w=h,R=v==="end"?"top":"bottom");const _=S-m.top-m.bottom,A=x-m.left-m.right,C=To(S-m[R],_),k=To(x-m[w],A),N=!e.middlewareData.shift;let I=C,O=k;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(O=A),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(I=_),N&&!v){const L=Un(m.left,0),P=Un(m.right,0),V=Un(m.top,0),X=Un(m.bottom,0);b?O=x-2*(L!==0||P!==0?L+P:Un(m.left,m.right)):I=S-2*(V!==0||X!==0?V+X:Un(m.top,m.bottom))}await d({...e,availableWidth:O,availableHeight:I});const M=await l.getDimensions(c.floating);return x!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function Hm(){return typeof window<"u"}function wc(t){return ZB(t)?(t.nodeName||"").toLowerCase():"#document"}function Fn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xa(t){var e;return(e=(ZB(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ZB(t){return Hm()?t instanceof Node||t instanceof Fn(t).Node:!1}function Sa(t){return Hm()?t instanceof Element||t instanceof Fn(t).Element:!1}function Wa(t){return Hm()?t instanceof HTMLElement||t instanceof Fn(t).HTMLElement:!1}function MO(t){return!Hm()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fn(t).ShadowRoot}const nQ=new Set(["inline","contents"]);function Ad(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=wa(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!nQ.has(a)}const aQ=new Set(["table","td","th"]);function iQ(t){return aQ.has(wc(t))}const oQ=[":popover-open",":modal"];function Vm(t){return oQ.some(e=>{try{return t.matches(e)}catch{return!1}})}const sQ=["transform","translate","scale","rotate","perspective"],lQ=["transform","translate","scale","rotate","perspective","filter"],cQ=["paint","layout","strict","content"];function xR(t){const e=_R(),r=Sa(t)?wa(t):t;return sQ.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||lQ.some(n=>(r.willChange||"").includes(n))||cQ.some(n=>(r.contain||"").includes(n))}function uQ(t){let e=Ro(t);for(;Wa(e)&&!ic(e);){if(xR(e))return e;if(Vm(e))return null;e=Ro(e)}return null}function _R(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const dQ=new Set(["html","body","#document"]);function ic(t){return dQ.has(wc(t))}function wa(t){return Fn(t).getComputedStyle(t)}function Gm(t){return Sa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ro(t){if(wc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||MO(t)&&t.host||Xa(t);return MO(e)?e.host:e}function XB(t){const e=Ro(t);return ic(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wa(e)&&Ad(e)?e:XB(e)}function nd(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=XB(t),s=a===((n=t.ownerDocument)==null?void 0:n.body),l=Fn(a);if(s){const c=Z_(l);return e.concat(l,l.visualViewport||[],Ad(a)?a:[],c&&r?nd(c):[])}return e.concat(a,nd(a,[],r))}function Z_(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function QB(t){const e=wa(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=Wa(t),s=a?t.offsetWidth:r,l=a?t.offsetHeight:n,c=hm(r)!==s||hm(n)!==l;return c&&(r=s,n=l),{width:r,height:n,$:c}}function TR(t){return Sa(t)?t:t.contextElement}function Fl(t){const e=TR(t);if(!Wa(e))return Fa(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:s}=QB(e);let l=(s?hm(r.width):r.width)/n,c=(s?hm(r.height):r.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const fQ=Fa(0);function JB(t){const e=Fn(t);return!_R()||!e.visualViewport?fQ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pQ(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Fn(t)?!1:e}function xs(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const a=t.getBoundingClientRect(),s=TR(t);let l=Fa(1);e&&(n?Sa(n)&&(l=Fl(n)):l=Fl(t));const c=pQ(s,r,n)?JB(s):Fa(0);let d=(a.left+c.x)/l.x,f=(a.top+c.y)/l.y,m=a.width/l.x,h=a.height/l.y;if(s){const v=Fn(s),b=n&&Sa(n)?Fn(n):n;let x=v,S=Z_(x);for(;S&&n&&b!==x;){const R=Fl(S),w=S.getBoundingClientRect(),_=wa(S),A=w.left+(S.clientLeft+parseFloat(_.paddingLeft))*R.x,C=w.top+(S.clientTop+parseFloat(_.paddingTop))*R.y;d*=R.x,f*=R.y,m*=R.x,h*=R.y,d+=A,f+=C,x=Fn(S),S=Z_(x)}}return vm({width:m,height:h,x:d,y:f})}function Wm(t,e){const r=Gm(t).scrollLeft;return e?e.left+r:xs(Xa(t)).left+r}function e2(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Wm(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function mQ(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t;const s=a==="fixed",l=Xa(n),c=e?Vm(e.floating):!1;if(n===l||c&&s)return r;let d={scrollLeft:0,scrollTop:0},f=Fa(1);const m=Fa(0),h=Wa(n);if((h||!h&&!s)&&((wc(n)!=="body"||Ad(l))&&(d=Gm(n)),Wa(n))){const b=xs(n);f=Fl(n),m.x=b.x+n.clientLeft,m.y=b.y+n.clientTop}const v=l&&!h&&!s?e2(l,d):Fa(0);return{width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-d.scrollLeft*f.x+m.x+v.x,y:r.y*f.y-d.scrollTop*f.y+m.y+v.y}}function hQ(t){return Array.from(t.getClientRects())}function gQ(t){const e=Xa(t),r=Gm(t),n=t.ownerDocument.body,a=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Wm(t);const c=-r.scrollTop;return wa(n).direction==="rtl"&&(l+=Un(e.clientWidth,n.clientWidth)-a),{width:a,height:s,x:l,y:c}}const PO=25;function vQ(t,e){const r=Fn(t),n=Xa(t),a=r.visualViewport;let s=n.clientWidth,l=n.clientHeight,c=0,d=0;if(a){s=a.width,l=a.height;const m=_R();(!m||m&&e==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}const f=Wm(n);if(f<=0){const m=n.ownerDocument,h=m.body,v=getComputedStyle(h),b=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(n.clientWidth-h.clientWidth-b);x<=PO&&(s-=x)}else f<=PO&&(s+=f);return{width:s,height:l,x:c,y:d}}const bQ=new Set(["absolute","fixed"]);function yQ(t,e){const r=xs(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,s=Wa(t)?Fl(t):Fa(1),l=t.clientWidth*s.x,c=t.clientHeight*s.y,d=a*s.x,f=n*s.y;return{width:l,height:c,x:d,y:f}}function jO(t,e,r){let n;if(e==="viewport")n=vQ(t,r);else if(e==="document")n=gQ(Xa(t));else if(Sa(e))n=yQ(e,r);else{const a=JB(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return vm(n)}function t2(t,e){const r=Ro(t);return r===e||!Sa(r)||ic(r)?!1:wa(r).position==="fixed"||t2(r,e)}function EQ(t,e){const r=e.get(t);if(r)return r;let n=nd(t,[],!1).filter(c=>Sa(c)&&wc(c)!=="body"),a=null;const s=wa(t).position==="fixed";let l=s?Ro(t):t;for(;Sa(l)&&!ic(l);){const c=wa(l),d=xR(l);!d&&c.position==="fixed"&&(a=null),(s?!d&&!a:!d&&c.position==="static"&&!!a&&bQ.has(a.position)||Ad(l)&&!d&&t2(t,l))?n=n.filter(m=>m!==l):a=c,l=Ro(l)}return e.set(t,n),n}function SQ(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t;const l=[...r==="clippingAncestors"?Vm(e)?[]:EQ(e,this._c):[].concat(r),n],c=l[0],d=l.reduce((f,m)=>{const h=jO(e,m,a);return f.top=Un(h.top,f.top),f.right=To(h.right,f.right),f.bottom=To(h.bottom,f.bottom),f.left=Un(h.left,f.left),f},jO(e,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function wQ(t){const{width:e,height:r}=QB(t);return{width:e,height:r}}function xQ(t,e,r){const n=Wa(e),a=Xa(e),s=r==="fixed",l=xs(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const d=Fa(0);function f(){d.x=Wm(a)}if(n||!n&&!s)if((wc(e)!=="body"||Ad(a))&&(c=Gm(e)),n){const b=xs(e,!0,s,e);d.x=b.x+e.clientLeft,d.y=b.y+e.clientTop}else a&&f();s&&!n&&a&&f();const m=a&&!n&&!s?e2(a,c):Fa(0),h=l.left+c.scrollLeft-d.x-m.x,v=l.top+c.scrollTop-d.y-m.y;return{x:h,y:v,width:l.width,height:l.height}}function Fb(t){return wa(t).position==="static"}function UO(t,e){if(!Wa(t)||wa(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Xa(t)===r&&(r=r.ownerDocument.body),r}function r2(t,e){const r=Fn(t);if(Vm(t))return r;if(!Wa(t)){let a=Ro(t);for(;a&&!ic(a);){if(Sa(a)&&!Fb(a))return a;a=Ro(a)}return r}let n=UO(t,e);for(;n&&iQ(n)&&Fb(n);)n=UO(n,e);return n&&ic(n)&&Fb(n)&&!xR(n)?r:n||uQ(t)||r}const _Q=async function(t){const e=this.getOffsetParent||r2,r=this.getDimensions,n=await r(t.floating);return{reference:xQ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function TQ(t){return wa(t).direction==="rtl"}const RQ={convertOffsetParentRelativeRectToViewportRelativeRect:mQ,getDocumentElement:Xa,getClippingRect:SQ,getOffsetParent:r2,getElementRects:_Q,getClientRects:hQ,getDimensions:wQ,getScale:Fl,isElement:Sa,isRTL:TQ};function n2(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function AQ(t,e){let r=null,n;const a=Xa(t);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const f=t.getBoundingClientRect(),{left:m,top:h,width:v,height:b}=f;if(c||e(),!v||!b)return;const x=sp(h),S=sp(a.clientWidth-(m+v)),R=sp(a.clientHeight-(h+b)),w=sp(m),A={rootMargin:-x+"px "+-S+"px "+-R+"px "+-w+"px",threshold:Un(0,To(1,d))||1};let C=!0;function k(N){const I=N[0].intersectionRatio;if(I!==d){if(!C)return l();I?l(!1,I):n=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!n2(f,t.getBoundingClientRect())&&l(),C=!1}try{r=new IntersectionObserver(k,{...A,root:a.ownerDocument})}catch{r=new IntersectionObserver(k,A)}r.observe(t)}return l(!0),s}function CQ(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,f=TR(t),m=a||s?[...f?nd(f):[],...nd(e)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const h=f&&c?AQ(f,r):null;let v=-1,b=null;l&&(b=new ResizeObserver(w=>{let[_]=w;_&&_.target===f&&b&&(b.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(e)})),r()}),f&&!d&&b.observe(f),b.observe(e));let x,S=d?xs(t):null;d&&R();function R(){const w=xs(t);S&&!n2(S,w)&&r(),S=w,x=requestAnimationFrame(R)}return r(),()=>{var w;m.forEach(_=>{a&&_.removeEventListener("scroll",r),s&&_.removeEventListener("resize",r)}),h?.(),(w=b)==null||w.disconnect(),b=null,d&&cancelAnimationFrame(x)}}const NQ=JX,kQ=eQ,IQ=ZX,OQ=rQ,DQ=XX,FO=KX,LQ=tQ,MQ=(t,e,r)=>{const n=new Map,a={platform:RQ,...r},s={...a.platform,_c:n};return YX(t,e,{...a,platform:s})};var PQ=typeof document<"u",jQ=function(){},Np=PQ?y.useLayoutEffect:jQ;function bm(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,a;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!bm(t[n],e[n]))return!1;return!0}if(a=Object.keys(t),r=a.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&t.$$typeof)&&!bm(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function a2(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zO(t,e){const r=a2(t);return Math.round(e*r)/r}function zb(t){const e=y.useRef(t);return Np(()=>{e.current=t}),e}function UQ(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=t,[m,h]=y.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[v,b]=y.useState(n);bm(v,n)||b(n);const[x,S]=y.useState(null),[R,w]=y.useState(null),_=y.useCallback(H=>{H!==N.current&&(N.current=H,S(H))},[]),A=y.useCallback(H=>{H!==I.current&&(I.current=H,w(H))},[]),C=s||x,k=l||R,N=y.useRef(null),I=y.useRef(null),O=y.useRef(m),M=d!=null,L=zb(d),P=zb(a),V=zb(f),X=y.useCallback(()=>{if(!N.current||!I.current)return;const H={placement:e,strategy:r,middleware:v};P.current&&(H.platform=P.current),MQ(N.current,I.current,H).then(te=>{const se={...te,isPositioned:V.current!==!1};Q.current&&!bm(O.current,se)&&(O.current=se,vc.flushSync(()=>{h(se)}))})},[v,e,r,P,V]);Np(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,h(H=>({...H,isPositioned:!1})))},[f]);const Q=y.useRef(!1);Np(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Np(()=>{if(C&&(N.current=C),k&&(I.current=k),C&&k){if(L.current)return L.current(C,k,X);X()}},[C,k,X,L,M]);const oe=y.useMemo(()=>({reference:N,floating:I,setReference:_,setFloating:A}),[_,A]),U=y.useMemo(()=>({reference:C,floating:k}),[C,k]),W=y.useMemo(()=>{const H={position:r,left:0,top:0};if(!U.floating)return H;const te=zO(U.floating,m.x),se=zO(U.floating,m.y);return c?{...H,transform:"translate("+te+"px, "+se+"px)",...a2(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:te,top:se}},[r,c,U.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:X,refs:oe,elements:U,floatingStyles:W}),[m,X,oe,U,W])}const FQ=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:a}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?FO({element:n.current,padding:a}).fn(r):{}:n?FO({element:n,padding:a}).fn(r):{}}}},zQ=(t,e)=>({...NQ(t),options:[t,e]}),$Q=(t,e)=>({...kQ(t),options:[t,e]}),BQ=(t,e)=>({...LQ(t),options:[t,e]}),qQ=(t,e)=>({...IQ(t),options:[t,e]}),HQ=(t,e)=>({...OQ(t),options:[t,e]}),VQ=(t,e)=>({...DQ(t),options:[t,e]}),GQ=(t,e)=>({...FQ(t),options:[t,e]});var WQ="Arrow",i2=y.forwardRef((t,e)=>{const{children:r,width:n=10,height:a=5,...s}=t;return g.jsx(vt.svg,{...s,ref:e,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});i2.displayName=WQ;var YQ=i2,RR="Popper",[o2,ko]=Za(RR),[KQ,s2]=o2(RR),l2=t=>{const{__scopePopper:e,children:r}=t,[n,a]=y.useState(null);return g.jsx(KQ,{scope:e,anchor:n,onAnchorChange:a,children:r})};l2.displayName=RR;var c2="PopperAnchor",u2=y.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...a}=t,s=s2(c2,r),l=y.useRef(null),c=Nt(e,l),d=y.useRef(null);return y.useEffect(()=>{const f=d.current;d.current=n?.current||l.current,f!==d.current&&s.onAnchorChange(d.current)}),n?null:g.jsx(vt.div,{...a,ref:c})});u2.displayName=c2;var AR="PopperContent",[ZQ,XQ]=o2(AR),d2=y.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:x,...S}=t,R=s2(AR,r),[w,_]=y.useState(null),A=Nt(e,j=>_(j)),[C,k]=y.useState(null),N=jB(C),I=N?.width??0,O=N?.height??0,M=n+(s!=="center"?"-"+s:""),L=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},P=Array.isArray(f)?f:[f],V=P.length>0,X={padding:L,boundary:P.filter(JQ),altBoundary:V},{refs:Q,floatingStyles:oe,placement:U,isPositioned:W,middlewareData:H}=UQ({strategy:"fixed",placement:M,whileElementsMounted:(...j)=>CQ(...j,{animationFrame:b==="always"}),elements:{reference:R.anchor},middleware:[zQ({mainAxis:a+O,alignmentAxis:l}),d&&$Q({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?BQ():void 0,...X}),d&&qQ({...X}),HQ({...X,apply:({elements:j,rects:Z,availableWidth:ne,availableHeight:G})=>{const{width:ce,height:he}=Z.reference,_e=j.floating.style;_e.setProperty("--radix-popper-available-width",`${ne}px`),_e.setProperty("--radix-popper-available-height",`${G}px`),_e.setProperty("--radix-popper-anchor-width",`${ce}px`),_e.setProperty("--radix-popper-anchor-height",`${he}px`)}}),C&&GQ({element:C,padding:c}),eJ({arrowWidth:I,arrowHeight:O}),v&&VQ({strategy:"referenceHidden",...X})]}),[te,se]=m2(U),B=Ga(x);nn(()=>{W&&B?.()},[W,B]);const q=H.arrow?.x,$=H.arrow?.y,K=H.arrow?.centerOffset!==0,[J,z]=y.useState();return nn(()=>{w&&z(window.getComputedStyle(w).zIndex)},[w]),g.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:W?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(ZQ,{scope:r,placedSide:te,onArrowChange:k,arrowX:q,arrowY:$,shouldHideArrow:K,children:g.jsx(vt.div,{"data-side":te,"data-align":se,...S,ref:A,style:{...S.style,animation:W?void 0:"none"}})})})});d2.displayName=AR;var f2="PopperArrow",QQ={top:"bottom",right:"left",bottom:"top",left:"right"},p2=y.forwardRef(function(e,r){const{__scopePopper:n,...a}=e,s=XQ(f2,n),l=QQ[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(YQ,{...a,ref:r,style:{...a.style,display:"block"}})})});p2.displayName=f2;function JQ(t){return t!==null}var eJ=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:a}=e,l=a.arrow?.centerOffset!==0,c=l?0:t.arrowWidth,d=l?0:t.arrowHeight,[f,m]=m2(r),h={start:"0%",center:"50%",end:"100%"}[m],v=(a.arrow?.x??0)+c/2,b=(a.arrow?.y??0)+d/2;let x="",S="";return f==="bottom"?(x=l?h:`${v}px`,S=`${-d}px`):f==="top"?(x=l?h:`${v}px`,S=`${n.floating.height+d}px`):f==="right"?(x=`${-d}px`,S=l?h:`${b}px`):f==="left"&&(x=`${n.floating.width+d}px`,S=l?h:`${b}px`),{data:{x,y:S}}}});function m2(t){const[e,r="center"]=t.split("-");return[e,r]}var Ym=l2,Cd=u2,Km=d2,Zm=p2,tJ="Portal",xc=y.forwardRef((t,e)=>{const{container:r,...n}=t,[a,s]=y.useState(!1);nn(()=>s(!0),[]);const l=r||a&&globalThis?.document?.body;return l?lB.createPortal(g.jsx(vt.div,{...n,ref:e}),l):null});xc.displayName=tJ;function rJ(t,e){return y.useReducer((r,n)=>e[r][n]??r,t)}var ca=t=>{const{present:e,children:r}=t,n=nJ(e),a=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),s=Nt(n.ref,aJ(a));return typeof r=="function"||n.isPresent?y.cloneElement(a,{ref:s}):null};ca.displayName="Presence";function nJ(t){const[e,r]=y.useState(),n=y.useRef(null),a=y.useRef(t),s=y.useRef("none"),l=t?"mounted":"unmounted",[c,d]=rJ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=lp(n.current);s.current=c==="mounted"?f:"none"},[c]),nn(()=>{const f=n.current,m=a.current;if(m!==t){const v=s.current,b=lp(f);t?d("MOUNT"):b==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,d]),nn(()=>{if(e){let f;const m=e.ownerDocument.defaultView??window,h=b=>{const S=lp(n.current).includes(CSS.escape(b.animationName));if(b.target===e&&S&&(d("ANIMATION_END"),!a.current)){const R=e.style.animationFillMode;e.style.animationFillMode="forwards",f=m.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=R)})}},v=b=>{b.target===e&&(s.current=lp(n.current))};return e.addEventListener("animationstart",v),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{m.clearTimeout(f),e.removeEventListener("animationstart",v),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function lp(t){return t?.animationName||"none"}function aJ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var h2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),iJ="VisuallyHidden",g2=y.forwardRef((t,e)=>g.jsx(vt.span,{...t,ref:e,style:{...h2,...t.style}}));g2.displayName=iJ;var oJ=g2,[Xm]=Za("Tooltip",[ko]),Qm=ko(),v2="TooltipProvider",sJ=700,X_="tooltip.open",[lJ,CR]=Xm(v2),b2=t=>{const{__scopeTooltip:e,delayDuration:r=sJ,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=t,l=y.useRef(!0),c=y.useRef(!1),d=y.useRef(0);return y.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),g.jsx(lJ,{scope:e,isOpenDelayedRef:l,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(f=>{c.current=f},[]),disableHoverableContent:a,children:s})};b2.displayName=v2;var ad="Tooltip",[cJ,Nd]=Xm(ad),y2=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=CR(ad,t.__scopeTooltip),f=Qm(e),[m,h]=y.useState(null),v=Yr(),b=y.useRef(0),x=l??d.disableHoverableContent,S=c??d.delayDuration,R=y.useRef(!1),[w,_]=_o({prop:n,defaultProp:a??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(X_))):d.onClose(),s?.(I)},caller:ad}),A=y.useMemo(()=>w?R.current?"delayed-open":"instant-open":"closed",[w]),C=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,R.current=!1,_(!0)},[_]),k=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,_(!1)},[_]),N=y.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{R.current=!0,_(!0),b.current=0},S)},[S,_]);return y.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),g.jsx(Ym,{...f,children:g.jsx(cJ,{scope:e,contentId:v,open:w,stateAttribute:A,trigger:m,onTriggerChange:h,onTriggerEnter:y.useCallback(()=>{d.isOpenDelayedRef.current?N():C()},[d.isOpenDelayedRef,N,C]),onTriggerLeave:y.useCallback(()=>{x?k():(window.clearTimeout(b.current),b.current=0)},[k,x]),onOpen:C,onClose:k,disableHoverableContent:x,children:r})})};y2.displayName=ad;var Q_="TooltipTrigger",E2=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Nd(Q_,r),s=CR(Q_,r),l=Qm(r),c=y.useRef(null),d=Nt(e,c,a.onTriggerChange),f=y.useRef(!1),m=y.useRef(!1),h=y.useCallback(()=>f.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(Cd,{asChild:!0,...l,children:g.jsx(vt.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:d,onPointerMove:ze(t.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:ze(t.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:ze(t.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ze(t.onFocus,()=>{f.current||a.onOpen()}),onBlur:ze(t.onBlur,a.onClose),onClick:ze(t.onClick,a.onClose)})})});E2.displayName=Q_;var NR="TooltipPortal",[uJ,dJ]=Xm(NR,{forceMount:void 0}),S2=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:a}=t,s=Nd(NR,e);return g.jsx(uJ,{scope:e,forceMount:r,children:g.jsx(ca,{present:r||s.open,children:g.jsx(xc,{asChild:!0,container:a,children:n})})})};S2.displayName=NR;var oc="TooltipContent",w2=y.forwardRef((t,e)=>{const r=dJ(oc,t.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=t,l=Nd(oc,t.__scopeTooltip);return g.jsx(ca,{present:n||l.open,children:l.disableHoverableContent?g.jsx(x2,{side:a,...s,ref:e}):g.jsx(fJ,{side:a,...s,ref:e})})}),fJ=y.forwardRef((t,e)=>{const r=Nd(oc,t.__scopeTooltip),n=CR(oc,t.__scopeTooltip),a=y.useRef(null),s=Nt(e,a),[l,c]=y.useState(null),{trigger:d,onClose:f}=r,m=a.current,{onPointerInTransitChange:h}=n,v=y.useCallback(()=>{c(null),h(!1)},[h]),b=y.useCallback((x,S)=>{const R=x.currentTarget,w={x:x.clientX,y:x.clientY},_=gJ(w,R.getBoundingClientRect()),A=vJ(w,_),C=bJ(S.getBoundingClientRect()),k=EJ([...A,...C]);c(k),h(!0)},[h]);return y.useEffect(()=>()=>v(),[v]),y.useEffect(()=>{if(d&&m){const x=R=>b(R,m),S=R=>b(R,d);return d.addEventListener("pointerleave",x),m.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",x),m.removeEventListener("pointerleave",S)}}},[d,m,b,v]),y.useEffect(()=>{if(l){const x=S=>{const R=S.target,w={x:S.clientX,y:S.clientY},_=d?.contains(R)||m?.contains(R),A=!yJ(w,l);_?v():A&&(v(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[d,m,l,f,v]),g.jsx(x2,{...t,ref:s})}),[pJ,mJ]=Xm(ad,{isInside:!1}),hJ=vX("TooltipContent"),x2=y.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=t,d=Nd(oc,r),f=Qm(r),{onClose:m}=d;return y.useEffect(()=>(document.addEventListener(X_,m),()=>document.removeEventListener(X_,m)),[m]),y.useEffect(()=>{if(d.trigger){const h=v=>{v.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,m]),g.jsx(Ec,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:g.jsxs(Km,{"data-state":d.stateAttribute,...f,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(hJ,{children:n}),g.jsx(pJ,{scope:r,isInside:!0,children:g.jsx(oJ,{id:d.contentId,role:"tooltip",children:a||n})})]})})});w2.displayName=oc;var _2="TooltipArrow",T2=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Qm(r);return mJ(_2,r).isInside?null:g.jsx(Zm,{...a,...n,ref:e})});T2.displayName=_2;function gJ(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),a=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function vJ(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function bJ(t){const{top:e,right:r,bottom:n,left:a}=t;return[{x:a,y:e},{x:r,y:e},{x:r,y:n},{x:a,y:n}]}function yJ(t,e){const{x:r,y:n}=t;let a=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const c=e[s],d=e[l],f=c.x,m=c.y,h=d.x,v=d.y;m>n!=v>n&&r<(h-f)*(n-m)/(v-m)+f&&(a=!a)}return a}function EJ(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),SJ(e)}function SJ(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const a=t[n];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))e.pop();else break}e.push(a)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const a=t[n];for(;r.length>=2;){const s=r[r.length-1],l=r[r.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))r.pop();else break}r.push(a)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var wJ=b2,xJ=y2,_J=E2,TJ=S2,RJ=w2,AJ=T2;function R2({delayDuration:t=0,...e}){return g.jsx(wJ,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function Jr({...t}){return g.jsx(R2,{children:g.jsx(xJ,{"data-slot":"tooltip",...t})})}function en({...t}){return g.jsx(_J,{"data-slot":"tooltip-trigger",...t})}function tn({className:t,sideOffset:e=0,children:r,...n}){return g.jsx(TJ,{children:g.jsxs(RJ,{"data-slot":"tooltip-content",sideOffset:e,className:Me("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...n,children:[r,g.jsx(AJ,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}class CJ{name="mcp_inspector_open";properties;constructor(e){this.properties={server_url:e.serverUrl,connection_count:e.connectionCount}}}class $O{name="mcp_tool_execution";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId,success:e.success,duration:e.duration,error:e.error}}}class BO{name="mcp_resource_read";properties;constructor(e){this.properties={resource_uri:e.resourceUri,server_id:e.serverId,success:e.success,error:e.error}}}class qO{name="mcp_prompt_call";properties;constructor(e){this.properties={prompt_name:e.promptName,server_id:e.serverId,success:e.success,error:e.error}}}class HO{name="mcp_chat_message";properties;constructor(e){this.properties={server_id:e.serverId,provider:e.provider,model:e.model,message_count:e.messageCount,tool_calls_count:e.toolCallsCount,success:e.success,execution_mode:e.executionMode,duration:e.duration,error:e.error}}}class NJ{name="mcp_server_added";properties;constructor(e){this.properties={server_id:e.serverId,server_url:e.serverUrl,connection_type:e.connectionType,via_proxy:e.viaProxy}}}class kJ{name="mcp_server_removed";properties;constructor(e){this.properties={server_id:e.serverId}}}class IJ{name="mcp_command_palette_open";properties;constructor(e){this.properties={trigger:e.trigger}}}class OJ{name="mcp_tool_saved";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId}}}function $b(){try{return"0.5.2-canary.4"}catch{return"0.0.0"}}var DJ={};function Bb(){try{return typeof window<"u"&&typeof document<"u"}catch{return!1}}class VO{endpoint;timeout;constructor(e,r=3e3){this.endpoint=e,this.timeout=r}async logEvent(e){try{const r=new AbortController,n=setTimeout(()=>r.abort(),this.timeout),a=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:r.signal});if(clearTimeout(n),!a.ok)throw new Error(`HTTP error! status: ${a.status}`)}catch{}}}function uo(t){return`mcp_inspector_telemetry_${t}`}class jr{static instance=null;POSTHOG_PROXY_URL="/inspector/api/tel/posthog";SCARF_PROXY_URL="/inspector/api/tel/scarf";UNKNOWN_USER_ID="UNKNOWN_USER_ID";_currUserId=null;_posthogClient=null;_scarfClient=null;_source="inspector";constructor(){const e=Bb(),r=this.isTelemetryDisabled();if(this._source=this.getStoredSource()||"inspector",r)this._posthogClient=null,this._scarfClient=null;else if(!e)this._posthogClient=null,this._scarfClient=null;else{try{this._posthogClient=new VO(this.POSTHOG_PROXY_URL,3e3)}catch{this._posthogClient=null}try{this._scarfClient=new VO(this.SCARF_PROXY_URL,3e3)}catch{this._scarfClient=null}}}isTelemetryDisabled(){return typeof localStorage<"u"&&localStorage.getItem(uo("disabled"))==="true"||typeof process<"u"&&DJ?.MCP_USE_ANONYMIZED_TELEMETRY==="false"}getStoredSource(){return typeof localStorage<"u"?localStorage.getItem(uo("source")):null}static getInstance(){return jr.instance||(jr.instance=new jr),jr.instance}setSource(e){this._source=e,typeof localStorage<"u"&&localStorage.setItem(uo("source"),e)}getSource(){return this._source}get userId(){if(this._currUserId)return this._currUserId;if(!Bb())return this._currUserId=this.UNKNOWN_USER_ID,this._currUserId;try{const e=localStorage.getItem(uo("user_id"));if(e)this._currUserId=e;else{const r=this.generateUserId();localStorage.setItem(uo("user_id"),r),this._currUserId=r}this.trackPackageDownload({triggered_by:"user_id_property"}).catch(()=>{})}catch{this._currUserId=this.UNKNOWN_USER_ID}return this._currUserId}generateUserId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}async capture(e){if(!(!this._posthogClient&&!this._scarfClient)){if(this._posthogClient)try{const r={event:e.name,user_id:this.userId,properties:{...e.properties,mcp_use_version:$b(),language:"typescript",source:this._source,package:"inspector"}};await this._posthogClient.logEvent(r)}catch{}if(this._scarfClient)try{const r={};r.mcp_use_version=$b(),r.user_id=this.userId,r.event=e.name,r.language="typescript",r.source=this._source,r.package="inspector",await this._scarfClient.logEvent(r)}catch{}}}async trackPackageDownload(e){if(this._scarfClient&&Bb())try{const r=$b();let n=!1,a=!1;const s=localStorage.getItem(uo("download_version"));if(s?r>s&&(n=!0,a=!1,localStorage.setItem(uo("download_version"),r)):(n=!0,a=!0,localStorage.setItem(uo("download_version"),r)),n){const l={...e||{}};l.mcp_use_version=r,l.user_id=this.userId,l.event="package_download",l.first_download=a,l.language="typescript",l.source=this._source,l.package="inspector",await this._scarfClient.logEvent(l)}}catch{}}async trackInspectorOpen(e){const r=new CJ(e);await this.capture(r)}}const A2=y.createContext(void 0);function LJ({url:t,name:e,proxyConfig:r,transportType:n,onUpdate:a,onRemove:s}){const l=typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback";let c=t,d={};if(r?.proxyAddress){const v=new URL(r.proxyAddress),b=new URL(t);c=`${v.origin}${v.pathname}${b.pathname}${b.search}`,d["X-Target-URL"]=t}r?.customHeaders&&(d={...d,...r.customHeaders});const f=sR({url:c,callbackUrl:l,customHeaders:Object.keys(d).length>0?d:void 0,transportType:n||"http"}),m=y.useRef(a),h=y.useRef(null);return y.useEffect(()=>{m.current=a},[a]),y.useEffect(()=>{if(typeof queueMicrotask<"u")queueMicrotask(()=>{f.state==="ready"&&f.serverInfo&&console.log("[McpContext] Server info available:",f.serverInfo);const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},b=h.current;(!b||b.state!==v.state||b.error!==v.error||b.authUrl!==v.authUrl||b.name!==v.name||b.tools.length!==v.tools.length||b.resources.length!==v.resources.length||b.prompts.length!==v.prompts.length||b.serverInfo!==v.serverInfo||b.capabilities!==v.capabilities||!b.client)&&(h.current=v,m.current(v))});else{const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},b=h.current;(!b||b.state!==v.state||b.error!==v.error||b.authUrl!==v.authUrl||b.name!==v.name||b.tools.length!==v.tools.length||b.resources.length!==v.resources.length||b.prompts.length!==v.prompts.length||b.serverInfo!==v.serverInfo||b.capabilities!==v.capabilities||!b.client)&&(h.current=v,m.current(v))}},[t,e,f.state,f.tools,f.resources,f.prompts,f.error,f.authUrl,f.serverInfo,f.capabilities,f.client]),null}function MJ({children:t}){const[e,r]=y.useState([]),[n,a]=y.useState(new Map),[s,l]=y.useState(0),[c,d]=y.useState(!0),[f,m]=y.useState(new Set);y.useEffect(()=>{const C=localStorage.getItem("mcp-inspector-connections");if(C)try{const N=JSON.parse(C),I=Array.isArray(N)?N.filter(M=>M&&typeof M=="object"&&typeof M.id=="string"&&typeof M.url=="string"&&typeof M.name=="string").map(M=>(M.transportType||(M.transportType="http"),M)):[];(I.length!==N.length||I.some(M=>M.transportType==="http"&&!N.find(L=>L.id===M.id&&L.transportType)))&&(console.warn("Updated connections in localStorage with transport type migration"),localStorage.setItem("mcp-inspector-connections",JSON.stringify(I))),r(I)}catch(N){console.error("Failed to parse saved connections:",N),localStorage.removeItem("mcp-inspector-connections")}const k=localStorage.getItem("mcp-inspector-auto-connect");k!==null&&d(k==="true")},[]);const h=y.useCallback(C=>{a(k=>new Map(k).set(C.id,C)),l(k=>k+1),C.serverInfo?.name&&C.state==="ready"&&r(k=>{const N=k.find(I=>I.id===C.id);if(N&&N.name!==C.serverInfo.name){const I=k.map(O=>O.id===C.id?{...O,name:C.serverInfo.name}:O);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(I)),I}return k})},[]),v=y.useCallback((C,k,N,I)=>{const M={id:C,url:C,name:k||C,proxyConfig:N,transportType:I||"http"};r(L=>{if(L.some(V=>V.id===C))return L;const P=[...L,M];return localStorage.setItem("mcp-inspector-connections",JSON.stringify(P)),P})},[]),b=y.useCallback(C=>{jr.getInstance().capture(new kJ({serverId:C})).catch(()=>{}),r(N=>{const I=N.filter(O=>O.id!==C);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(I)),I}),a(N=>{const I=new Map(N),O=I.get(C);if(O){try{O.clearStorage()}catch(M){console.error("Failed to clear storage:",M)}I.delete(C)}return I})},[]),x=y.useCallback(C=>{const k=n.get(C);if(k)return k;const N=e.find(I=>I.id===C);if(N)return{id:N.id,url:N.url,name:N.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,listPrompts:async I=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}},[n,e]),S=y.useCallback(C=>{d(C),localStorage.setItem("mcp-inspector-auto-connect",String(C)),C||m(new Set)},[]),R=y.useCallback(C=>{m(k=>new Set(k).add(C))},[]),w=y.useCallback(C=>{m(k=>{const N=new Set(k);return N.delete(C),N}),a(k=>{const N=new Map(k),I=N.get(C);if(I){try{I.clearStorage()}catch(O){console.error("Failed to clear storage:",O)}N.delete(C)}return N})},[]),_=y.useMemo(()=>e.map(k=>{const N=n.get(k.id);return N||{id:k.id,url:k.url,name:k.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},listPrompts:async I=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}}),[n,e,s]),A=y.useMemo(()=>({connections:_,addConnection:v,removeConnection:b,getConnection:x,autoConnect:c,setAutoConnect:S,connectServer:R,disconnectServer:w}),[_,v,b,x,c,S,R,w]);return g.jsxs(A2,{value:A,children:[e.filter(C=>c||f.has(C.id)).map(C=>g.jsx(LJ,{url:C.url,name:C.name,proxyConfig:C.proxyConfig,transportType:C.transportType,onUpdate:h,onRemove:()=>b(C.id)},C.id)),t]})}function kR(){const t=y.use(A2);if(!t)throw new Error("useMcpContext must be used within McpProvider");return t}var qb="focusScope.autoFocusOnMount",Hb="focusScope.autoFocusOnUnmount",GO={bubbles:!1,cancelable:!0},PJ="FocusScope",kd=y.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=y.useState(null),f=Ga(a),m=Ga(s),h=y.useRef(null),v=Nt(e,S=>d(S)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let S=function(A){if(b.paused||!c)return;const C=A.target;c.contains(C)?h.current=C:po(h.current,{select:!0})},R=function(A){if(b.paused||!c)return;const C=A.relatedTarget;C!==null&&(c.contains(C)||po(h.current,{select:!0}))},w=function(A){if(document.activeElement===document.body)for(const k of A)k.removedNodes.length>0&&po(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",R);const _=new MutationObserver(w);return c&&_.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",R),_.disconnect()}}},[n,c,b.paused]),y.useEffect(()=>{if(c){YO.add(b);const S=document.activeElement;if(!c.contains(S)){const w=new CustomEvent(qb,GO);c.addEventListener(qb,f),c.dispatchEvent(w),w.defaultPrevented||(jJ(BJ(C2(c)),{select:!0}),document.activeElement===S&&po(c))}return()=>{c.removeEventListener(qb,f),setTimeout(()=>{const w=new CustomEvent(Hb,GO);c.addEventListener(Hb,m),c.dispatchEvent(w),w.defaultPrevented||po(S??document.body,{select:!0}),c.removeEventListener(Hb,m),YO.remove(b)},0)}}},[c,f,m,b]);const x=y.useCallback(S=>{if(!r&&!n||b.paused)return;const R=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(R&&w){const _=S.currentTarget,[A,C]=UJ(_);A&&C?!S.shiftKey&&w===C?(S.preventDefault(),r&&po(A,{select:!0})):S.shiftKey&&w===A&&(S.preventDefault(),r&&po(C,{select:!0})):w===_&&S.preventDefault()}},[r,n,b.paused]);return g.jsx(vt.div,{tabIndex:-1,...l,ref:v,onKeyDown:x})});kd.displayName=PJ;function jJ(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(po(n,{select:e}),document.activeElement!==r)return}function UJ(t){const e=C2(t),r=WO(e,t),n=WO(e.reverse(),t);return[r,n]}function C2(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function WO(t,e){for(const r of t)if(!FJ(r,{upTo:e}))return r}function FJ(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function zJ(t){return t instanceof HTMLInputElement&&"select"in t}function po(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&zJ(t)&&e&&t.select()}}var YO=$J();function $J(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=KO(t,e),t.unshift(e)},remove(e){t=KO(t,e),t[0]?.resume()}}}function KO(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function BJ(t){return t.filter(e=>e.tagName!=="A")}var Vb=0;function Jm(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ZO()),document.body.insertAdjacentElement("beforeend",t[1]??ZO()),Vb++,()=>{Vb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Vb--}},[])}function ZO(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var La=function(){return La=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},La.apply(this,arguments)};function N2(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function qJ(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,s;n<a;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}var kp="right-scroll-bar-position",Ip="width-before-scroll-bar",HJ="with-scroll-bars-hidden",VJ="--removed-body-scroll-bar-size";function Gb(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function GJ(t,e){var r=y.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=e,r.facade}var WJ=typeof window<"u"?y.useLayoutEffect:y.useEffect,XO=new WeakMap;function YJ(t,e){var r=GJ(null,function(n){return t.forEach(function(a){return Gb(a,n)})});return WJ(function(){var n=XO.get(r);if(n){var a=new Set(n),s=new Set(t),l=r.current;a.forEach(function(c){s.has(c)||Gb(c,null)}),s.forEach(function(c){a.has(c)||Gb(c,l)})}XO.set(r,t)},[t]),r}function KJ(t){return t}function ZJ(t,e){e===void 0&&(e=KJ);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var l=e(s,n);return r.push(l),function(){r=r.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(n=!0;r.length;){var l=r;r=[],l.forEach(s)}r={push:function(c){return s(c)},filter:function(){return r}}},assignMedium:function(s){n=!0;var l=[];if(r.length){var c=r;r=[],c.forEach(s),l=r}var d=function(){var m=l;l=[],m.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),r={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),r}}}};return a}function XJ(t){t===void 0&&(t={});var e=ZJ(null);return e.options=La({async:!0,ssr:!1},t),e}var k2=function(t){var e=t.sideCar,r=N2(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,La({},r))};k2.isSideCarExport=!0;function QJ(t,e){return t.useMedium(e),k2}var I2=XJ(),Wb=function(){},eh=y.forwardRef(function(t,e){var r=y.useRef(null),n=y.useState({onScrollCapture:Wb,onWheelCapture:Wb,onTouchMoveCapture:Wb}),a=n[0],s=n[1],l=t.forwardProps,c=t.children,d=t.className,f=t.removeScrollBar,m=t.enabled,h=t.shards,v=t.sideCar,b=t.noRelative,x=t.noIsolation,S=t.inert,R=t.allowPinchZoom,w=t.as,_=w===void 0?"div":w,A=t.gapMode,C=N2(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=v,N=YJ([r,e]),I=La(La({},C),a);return y.createElement(y.Fragment,null,m&&y.createElement(k,{sideCar:I2,removeScrollBar:f,shards:h,noRelative:b,noIsolation:x,inert:S,setCallbacks:s,allowPinchZoom:!!R,lockRef:r,gapMode:A}),l?y.cloneElement(y.Children.only(c),La(La({},I),{ref:N})):y.createElement(_,La({},I,{className:d,ref:N}),c))});eh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eh.classNames={fullWidth:Ip,zeroRight:kp};var JJ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eee(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=JJ();return e&&t.setAttribute("nonce",e),t}function tee(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function ree(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var nee=function(){var t=0,e=null;return{add:function(r){t==0&&(e=eee())&&(tee(e,r),ree(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},aee=function(){var t=nee();return function(e,r){y.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},O2=function(){var t=aee(),e=function(r){var n=r.styles,a=r.dynamic;return t(n,a),null};return e},iee={left:0,top:0,right:0,gap:0},Yb=function(t){return parseInt(t||"",10)||0},oee=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],a=e[t==="padding"?"paddingRight":"marginRight"];return[Yb(r),Yb(n),Yb(a)]},see=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return iee;var e=oee(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},lee=O2(),zl="data-scroll-locked",cee=function(t,e,r,n){var a=t.left,s=t.top,l=t.right,c=t.gap;return r===void 0&&(r="margin"),`
|
|
25
|
+
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let v=ji(),b;if(e){let _=typeof e=="string"?mc(e):e;ur(m==="/"||_.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${_.pathname}" was given in the \`location\` prop.`),b=_}else b=v;let x=b.pathname||"/",S=x;if(m!=="/"){let _=m.replace(/^\//,"").split("/");S="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let R=H$(t,{pathname:S});qa(h||R!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),qa(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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.`);let w=D7(R&&R.map(_=>Object.assign({},_,{params:Object.assign({},d,_.params),pathname:Ri([m,s.encodeLocation?s.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?m:Ri([m,s.encodeLocation?s.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),l,r,n,a);return e&&w?y.createElement(_d.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},w):w}function N7(){let t=U7(),e=w7(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",t),l=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:s},"ErrorBoundary")," or"," ",y.createElement("code",{style:s},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},e),r?y.createElement("pre",{style:a},r):null,l)}var k7=y.createElement(N7,null),I7=class extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.unstable_onError?this.props.unstable_onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?y.createElement(Pi.Provider,{value:this.props.routeContext},y.createElement(lR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function O7({routeContext:t,match:e,children:r}){let n=y.useContext(hc);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),y.createElement(Pi.Provider,{value:t},r)}function D7(t,e=[],r=null,n=null,a=null){if(t==null){if(!r)return null;if(r.errors)t=r.matches;else if(e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let s=t,l=r?.errors;if(l!=null){let f=s.findIndex(m=>m.route.id&&l?.[m.route.id]!==void 0);ur(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),s=s.slice(0,Math.min(s.length,f+1))}let c=!1,d=-1;if(r)for(let f=0;f<s.length;f++){let m=s[f];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(d=f),m.route.id){let{loaderData:h,errors:v}=r,b=m.route.loader&&!h.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||b){c=!0,d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((f,m,h)=>{let v,b=!1,x=null,S=null;r&&(v=l&&m.route.id?l[m.route.id]:void 0,x=m.route.errorElement||k7,c&&(d<0&&h===0?(eB("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,S=null):d===h&&(b=!0,S=m.route.hydrateFallbackElement||null)));let R=e.concat(s.slice(0,h+1)),w=()=>{let _;return v?_=x:b?_=S:m.route.Component?_=y.createElement(m.route.Component,null):m.route.element?_=m.route.element:_=f,y.createElement(O7,{match:m,routeContext:{outlet:f,matches:R,isDataRoute:r!=null},children:_})};return r&&(m.route.ErrorBoundary||m.route.errorElement||h===0)?y.createElement(I7,{location:r.location,revalidation:r.revalidation,component:x,error:v,children:w(),routeContext:{outlet:null,matches:R,isDataRoute:!0},unstable_onError:n}):w()},null)}function cR(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function L7(t){let e=y.useContext(hc);return ur(e,cR(t)),e}function M7(t){let e=y.useContext(Fm);return ur(e,cR(t)),e}function P7(t){let e=y.useContext(Pi);return ur(e,cR(t)),e}function uR(t){let e=P7(t),r=e.matches[e.matches.length-1];return ur(r.route.id,`${t} can only be used on routes that contain a unique "id"`),r.route.id}function j7(){return uR("useRouteId")}function U7(){let t=y.useContext(lR),e=M7("useRouteError"),r=uR("useRouteError");return t!==void 0?t:e.errors?.[r]}function F7(){let{router:t}=L7("useNavigate"),e=uR("useNavigate"),r=y.useRef(!1);return Q$(()=>{r.current=!0}),y.useCallback(async(a,s={})=>{qa(r.current,X$),r.current&&(typeof a=="number"?t.navigate(a):await t.navigate(a,{fromRouteId:e,...s}))},[t,e])}var fO={};function eB(t,e,r){!e&&!fO[t]&&(fO[t]=!0,qa(!1,r))}y.memo(z7);function z7({routes:t,future:e,state:r,unstable_onError:n}){return J$(t,void 0,r,n,e)}function tB(t){ur(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function $7({basename:t="/",children:e=null,location:r,navigationType:n="POP",navigator:a,static:s=!1}){ur(!Td(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:a,static:s,future:{}}),[l,a,s]);typeof r=="string"&&(r=mc(r));let{pathname:d="/",search:f="",hash:m="",state:h=null,key:v="default"}=r,b=y.useMemo(()=>{let x=Ni(d,l);return x==null?null:{location:{pathname:x,search:f,hash:m,state:h,key:v},navigationType:n}},[l,d,f,m,h,v,n]);return qa(b!=null,`<Router basename="${l}"> is not able to match the URL "${d}${f}${m}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:y.createElement(Ka.Provider,{value:c},y.createElement(_d.Provider,{children:e,value:b}))}function B7({children:t,location:e}){return C7(q_(t),e)}function q_(t,e=[]){let r=[];return y.Children.forEach(t,(n,a)=>{if(!y.isValidElement(n))return;let s=[...e,a];if(n.type===y.Fragment){r.push.apply(r,q_(n.props.children,s));return}ur(n.type===tB,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ur(!n.props.index||!n.props.children,"An index route cannot have child routes.");let l={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(l.children=q_(n.props.children,s)),r.push(l)}),r}var Ap="get",Cp="application/x-www-form-urlencoded";function zm(t){return t!=null&&typeof t.tagName=="string"}function q7(t){return zm(t)&&t.tagName.toLowerCase()==="button"}function H7(t){return zm(t)&&t.tagName.toLowerCase()==="form"}function V7(t){return zm(t)&&t.tagName.toLowerCase()==="input"}function G7(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function W7(t,e){return t.button===0&&(!e||e==="_self")&&!G7(t)}var np=null;function Y7(){if(np===null)try{new FormData(document.createElement("form"),0),np=!1}catch{np=!0}return np}var K7=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Pb(t){return t!=null&&!K7.has(t)?(qa(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cp}"`),null):t}function Z7(t,e){let r,n,a,s,l;if(H7(t)){let c=t.getAttribute("action");n=c?Ni(c,e):null,r=t.getAttribute("method")||Ap,a=Pb(t.getAttribute("enctype"))||Cp,s=new FormData(t)}else if(q7(t)||V7(t)&&(t.type==="submit"||t.type==="image")){let c=t.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=t.getAttribute("formaction")||c.getAttribute("action");if(n=d?Ni(d,e):null,r=t.getAttribute("formmethod")||c.getAttribute("method")||Ap,a=Pb(t.getAttribute("formenctype"))||Pb(c.getAttribute("enctype"))||Cp,s=new FormData(c,t),!Y7()){let{name:f,type:m,value:h}=t;if(m==="image"){let v=f?`${f}.`:"";s.append(`${v}x`,"0"),s.append(`${v}y`,"0")}else f&&s.append(f,h)}}else{if(zm(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ap,n=null,a=Cp,l=t}return s&&a==="text/plain"&&(l=s,s=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function dR(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function X7(t,e,r){let n=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return n.pathname==="/"?n.pathname=`_root.${r}`:e&&Ni(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Q7(t,e){if(t.id in e)return e[t.id];try{let r=await import(t.module);return e[t.id]=r,r}catch(r){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function J7(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function eY(t,e,r){let n=await Promise.all(t.map(async a=>{let s=e.routes[a.route.id];if(s){let l=await Q7(s,r);return l.links?l.links():[]}return[]}));return aY(n.flat(1).filter(J7).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function pO(t,e,r,n,a,s){let l=(d,f)=>r[f]?d.route.id!==r[f].route.id:!0,c=(d,f)=>r[f].pathname!==d.pathname||r[f].route.path?.endsWith("*")&&r[f].params["*"]!==d.params["*"];return s==="assets"?e.filter((d,f)=>l(d,f)||c(d,f)):s==="data"?e.filter((d,f)=>{let m=n.routes[d.route.id];if(!m||!m.hasLoader)return!1;if(l(d,f)||c(d,f))return!0;if(d.route.shouldRevalidate){let h=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function tY(t,e,{includeHydrateFallback:r}={}){return rY(t.map(n=>{let a=e.routes[n.route.id];if(!a)return[];let s=[a.module];return a.clientActionModule&&(s=s.concat(a.clientActionModule)),a.clientLoaderModule&&(s=s.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(s=s.concat(a.hydrateFallbackModule)),a.imports&&(s=s.concat(a.imports)),s}).flat(1))}function rY(t){return[...new Set(t)]}function nY(t){let e={},r=Object.keys(t).sort();for(let n of r)e[n]=t[n];return e}function aY(t,e){let r=new Set;return new Set(e),t.reduce((n,a)=>{let s=JSON.stringify(nY(a));return r.has(s)||(r.add(s),n.push({key:s,link:a})),n},[])}function rB(){let t=y.useContext(hc);return dR(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function iY(){let t=y.useContext(Fm);return dR(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var fR=y.createContext(void 0);fR.displayName="FrameworkContext";function nB(){let t=y.useContext(fR);return dR(t,"You must render this element inside a <HydratedRouter> element"),t}function oY(t,e){let r=y.useContext(fR),[n,a]=y.useState(!1),[s,l]=y.useState(!1),{onFocus:c,onBlur:d,onMouseEnter:f,onMouseLeave:m,onTouchStart:h}=e,v=y.useRef(null);y.useEffect(()=>{if(t==="render"&&l(!0),t==="viewport"){let S=w=>{w.forEach(_=>{l(_.isIntersecting)})},R=new IntersectionObserver(S,{threshold:.5});return v.current&&R.observe(v.current),()=>{R.disconnect()}}},[t]),y.useEffect(()=>{if(n){let S=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(S)}}},[n]);let b=()=>{a(!0)},x=()=>{a(!1),l(!1)};return r?t!=="intent"?[s,v,{}]:[s,v,{onFocus:vu(c,b),onBlur:vu(d,x),onMouseEnter:vu(f,b),onMouseLeave:vu(m,x),onTouchStart:vu(h,b)}]:[!1,v,{}]}function vu(t,e){return r=>{t&&t(r),r.defaultPrevented||e(r)}}function sY({page:t,...e}){let{router:r}=rB(),n=y.useMemo(()=>H$(r.routes,t,r.basename),[r.routes,t,r.basename]);return n?y.createElement(cY,{page:t,matches:n,...e}):null}function lY(t){let{manifest:e,routeModules:r}=nB(),[n,a]=y.useState([]);return y.useEffect(()=>{let s=!1;return eY(t,e,r).then(l=>{s||a(l)}),()=>{s=!0}},[t,e,r]),n}function cY({page:t,matches:e,...r}){let n=ji(),{manifest:a,routeModules:s}=nB(),{basename:l}=rB(),{loaderData:c,matches:d}=iY(),f=y.useMemo(()=>pO(t,e,d,a,n,"data"),[t,e,d,a,n]),m=y.useMemo(()=>pO(t,e,d,a,n,"assets"),[t,e,d,a,n]),h=y.useMemo(()=>{if(t===n.pathname+n.search+n.hash)return[];let x=new Set,S=!1;if(e.forEach(w=>{let _=a.routes[w.route.id];!_||!_.hasLoader||(!f.some(A=>A.route.id===w.route.id)&&w.route.id in c&&s[w.route.id]?.shouldRevalidate||_.hasClientLoader?S=!0:x.add(w.route.id))}),x.size===0)return[];let R=X7(t,l,"data");return S&&x.size>0&&R.searchParams.set("_routes",e.filter(w=>x.has(w.route.id)).map(w=>w.route.id).join(",")),[R.pathname+R.search]},[l,c,n,a,f,e,t,s]),v=y.useMemo(()=>tY(m,a),[m,a]),b=lY(m);return y.createElement(y.Fragment,null,h.map(x=>y.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...r})),v.map(x=>y.createElement("link",{key:x,rel:"modulepreload",href:x,...r})),b.map(({key:x,link:S})=>y.createElement("link",{key:x,nonce:r.nonce,...S})))}function uY(...t){return e=>{t.forEach(r=>{typeof r=="function"?r(e):r!=null&&(r.current=e)})}}var aB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{aB&&(window.__reactRouterVersion="7.9.5")}catch{}function dY({basename:t,children:e,window:r}){let n=y.useRef();n.current==null&&(n.current=JW({window:r,v5Compat:!0}));let a=n.current,[s,l]=y.useState({action:a.action,location:a.location}),c=y.useCallback(d=>{y.startTransition(()=>l(d))},[l]);return y.useLayoutEffect(()=>a.listen(c),[a,c]),y.createElement($7,{basename:t,children:e,location:s.location,navigationType:s.action,navigator:a})}var iB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oB=y.forwardRef(function({onClick:e,discover:r="render",prefetch:n="none",relative:a,reloadDocument:s,replace:l,state:c,target:d,to:f,preventScrollReset:m,viewTransition:h,...v},b){let{basename:x}=y.useContext(Ka),S=typeof f=="string"&&iB.test(f),R,w=!1;if(typeof f=="string"&&S&&(R=f,aB))try{let M=new URL(window.location.href),L=f.startsWith("//")?new URL(M.protocol+f):new URL(f),P=Ni(L.pathname,x);L.origin===M.origin&&P!=null?f=P+L.search+L.hash:w=!0}catch{qa(!1,`<Link to="${f}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=R7(f,{relative:a}),[A,C,k]=oY(n,v),N=hY(f,{replace:l,state:c,target:d,preventScrollReset:m,relative:a,viewTransition:h});function I(M){e&&e(M),M.defaultPrevented||N(M)}let O=y.createElement("a",{...v,...k,href:R||_,onClick:w||s?e:I,ref:uY(b,C),target:d,"data-discover":!S&&r==="render"?"true":void 0});return A&&!S?y.createElement(y.Fragment,null,O,y.createElement(sY,{page:_})):O});oB.displayName="Link";var fY=y.forwardRef(function({"aria-current":e="page",caseSensitive:r=!1,className:n="",end:a=!1,style:s,to:l,viewTransition:c,children:d,...f},m){let h=Rd(l,{relative:f.relative}),v=ji(),b=y.useContext(Fm),{navigator:x,basename:S}=y.useContext(Ka),R=b!=null&&EY(h)&&c===!0,w=x.encodeLocation?x.encodeLocation(h).pathname:h.pathname,_=v.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(_=_.toLowerCase(),A=A?A.toLowerCase():null,w=w.toLowerCase()),A&&S&&(A=Ni(A,S)||A);const C=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let k=_===w||!a&&_.startsWith(w)&&_.charAt(C)==="/",N=A!=null&&(A===w||!a&&A.startsWith(w)&&A.charAt(w.length)==="/"),I={isActive:k,isPending:N,isTransitioning:R},O=k?e:void 0,M;typeof n=="function"?M=n(I):M=[n,k?"active":null,N?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let L=typeof s=="function"?s(I):s;return y.createElement(oB,{...f,"aria-current":O,className:M,ref:m,style:L,to:l,viewTransition:c},typeof d=="function"?d(I):d)});fY.displayName="NavLink";var pY=y.forwardRef(({discover:t="render",fetcherKey:e,navigate:r,reloadDocument:n,replace:a,state:s,method:l=Ap,action:c,onSubmit:d,relative:f,preventScrollReset:m,viewTransition:h,...v},b)=>{let x=bY(),S=yY(c,{relative:f}),R=l.toLowerCase()==="get"?"get":"post",w=typeof c=="string"&&iB.test(c),_=A=>{if(d&&d(A),A.defaultPrevented)return;A.preventDefault();let C=A.nativeEvent.submitter,k=C?.getAttribute("formmethod")||l;x(C||A.currentTarget,{fetcherKey:e,method:k,navigate:r,replace:a,state:s,relative:f,preventScrollReset:m,viewTransition:h})};return y.createElement("form",{ref:b,method:R,action:S,onSubmit:n?d:_,...v,"data-discover":!w&&t==="render"?"true":void 0})});pY.displayName="Form";function mY(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sB(t){let e=y.useContext(hc);return ur(e,mY(t)),e}function hY(t,{target:e,replace:r,state:n,preventScrollReset:a,relative:s,viewTransition:l}={}){let c=gc(),d=ji(),f=Rd(t,{relative:s});return y.useCallback(m=>{if(W7(m,e)){m.preventDefault();let h=r!==void 0?r:Ju(d)===Ju(f);c(t,{replace:h,state:n,preventScrollReset:a,relative:s,viewTransition:l})}},[d,c,f,r,n,e,t,a,s,l])}var gY=0,vY=()=>`__${String(++gY)}__`;function bY(){let{router:t}=sB("useSubmit"),{basename:e}=y.useContext(Ka),r=j7();return y.useCallback(async(n,a={})=>{let{action:s,method:l,encType:c,formData:d,body:f}=Z7(n,e);if(a.navigate===!1){let m=a.fetcherKey||vY();await t.fetch(m,r,a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,flushSync:a.flushSync})}else await t.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:d,body:f,formMethod:a.method||l,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[t,e,r])}function yY(t,{relative:e}={}){let{basename:r}=y.useContext(Ka),n=y.useContext(Pi);ur(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),s={...Rd(t||".",{relative:e})},l=ji();if(t==null){s.search=l.search;let c=new URLSearchParams(s.search),d=c.getAll("index");if(d.some(m=>m==="")){c.delete("index"),d.filter(h=>h).forEach(h=>c.append("index",h));let m=c.toString();s.search=m?`?${m}`:""}}return(!t||t===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Ri([r,s.pathname])),Ju(s)}function EY(t,{relative:e}={}){let r=y.useContext(Z$);ur(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=sB("useViewTransitionState"),a=Rd(t,{relative:e});if(!r.isTransitioning)return!1;let s=Ni(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=Ni(r.nextLocation.pathname,n)||r.nextLocation.pathname;return fm(a.pathname,l)!=null||fm(a.pathname,s)!=null}var vc=q$();const lB=fc(vc);const SY=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wY=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),mO=t=>{const e=wY(t);return e.charAt(0).toUpperCase()+e.slice(1)},cB=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),xY=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var _Y={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 TY=y.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:s,iconNode:l,...c},d)=>y.createElement("svg",{ref:d,..._Y,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:cB("lucide",a),...!s&&!xY(c)&&{"aria-hidden":"true"},...c},[...l.map(([f,m])=>y.createElement(f,m)),...Array.isArray(s)?s:[s]]));const lt=(t,e)=>{const r=y.forwardRef(({className:n,...a},s)=>y.createElement(TY,{ref:s,iconNode:e,className:cB(`lucide-${SY(mO(t))}`,`lucide-${t}`,n),...a}));return r.displayName=mO(t),r};const RY=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],AY=lt("arrow-up",RY);const CY=[["path",{d:"m11 10 3 3",key:"fzmg1i"}],["path",{d:"M6.5 21A3.5 3.5 0 1 0 3 17.5a2.62 2.62 0 0 1-.708 1.792A1 1 0 0 0 3 21z",key:"p4q2r7"}],["path",{d:"M9.969 17.031 21.378 5.624a1 1 0 0 0-3.002-3.002L6.967 14.031",key:"wy6l02"}]],NY=lt("brush",CY);const kY=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ki=lt("check",kY);const IY=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uB=lt("chevron-down",IY);const OY=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],DY=lt("chevron-up",OY);const LY=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],MY=lt("circle-minus",LY);const PY=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ac=lt("clock",PY);const jY=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],UY=lt("code",jY);const FY=[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]],zY=lt("cog",FY);const $Y=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],BY=lt("command",$Y);const qY=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],aa=lt("copy",qY);const HY=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$m=lt("database",HY);const VY=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],dB=lt("download",VY);const GY=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],hO=lt("external-link",GY);const WY=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],YY=lt("eye-off",WY);const KY=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],gO=lt("eye",KY);const ZY=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],XY=lt("file-code",ZY);const QY=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]],JY=lt("file-image",QY);const eK=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],pR=lt("file-text",eK);const tK=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],rK=lt("file",tK);const nK=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],aK=lt("folder-open",nK);const iK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],oK=lt("globe",iK);const sK=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],lK=lt("grip-vertical",sK);const cK=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],fB=lt("history",cK);const uK=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],pB=lt("key",uK);const dK=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bm=lt("loader-circle",dK);const fK=[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]],pK=lt("maximize",fK);const mK=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],hK=lt("message-circle",mK);const gK=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],ed=lt("message-square",gK);const vK=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],vO=lt("monitor",vK);const bK=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],yK=lt("moon",bK);const EK=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],mB=lt("play",EK);const SK=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],hB=lt("plus",SK);const wK=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],xK=lt("rotate-ccw",wK);const _K=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],mR=lt("save",_K);const TK=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hR=lt("search",TK);const RK=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],AK=lt("send",RK);const CK=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],NK=lt("settings",CK);const kK=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],IK=lt("shield",kK);const OK=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 4h.01",key:"1ujb9j"}],["path",{d:"M20 12h.01",key:"1ykeid"}],["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M4 12h.01",key:"158zrr"}],["path",{d:"M17.657 6.343h.01",key:"31pqzk"}],["path",{d:"M17.657 17.657h.01",key:"jehnf4"}],["path",{d:"M6.343 17.657h.01",key:"gdk6ow"}],["path",{d:"M6.343 6.343h.01",key:"1uurf0"}]],DK=lt("sun-dim",OK);const LK=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],H_=lt("trash-2",LK);const MK=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ss=lt("wrench",MK);const PK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],gR=lt("x",PK);const jK=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],td=lt("zap",jK);function UK(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}const FK=t=>{switch(t){case"success":return BK;case"info":return HK;case"warning":return qK;case"error":return VK;default:return null}},zK=Array(12).fill(0),$K=({visible:t,className:e})=>Te.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},Te.createElement("div",{className:"sonner-spinner"},zK.map((r,n)=>Te.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),BK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),qK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),HK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),VK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Te.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GK=Te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Te.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Te.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),WK=()=>{const[t,e]=Te.useState(document.hidden);return Te.useEffect(()=>{const r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t};let V_=1;class YK{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;const{message:n,...a}=e,s=typeof e?.id=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:V_++,l=this.toasts.find(d=>d.id===s),c=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...e,id:s,title:n}),{...d,...e,id:s,dismissible:c,title:n}):d):this.addToast({title:n,...a,dismissible:c,id:s}),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:e,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(e instanceof Function?e():e);let s=n!==void 0,l;const c=a.then(async f=>{if(l=["resolve",f],Te.isValidElement(f))s=!1,this.create({id:n,type:"default",message:f});else if(ZK(f)&&!f.ok){s=!1;const h=typeof r.error=="function"?await r.error(`HTTP error! status: ${f.status}`):r.error,v=typeof r.description=="function"?await r.description(`HTTP error! status: ${f.status}`):r.description,x=typeof h=="object"&&!Te.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...x})}else if(f instanceof Error){s=!1;const h=typeof r.error=="function"?await r.error(f):r.error,v=typeof r.description=="function"?await r.description(f):r.description,x=typeof h=="object"&&!Te.isValidElement(h)?h:{message:h};this.create({id:n,type:"error",description:v,...x})}else if(r.success!==void 0){s=!1;const h=typeof r.success=="function"?await r.success(f):r.success,v=typeof r.description=="function"?await r.description(f):r.description,x=typeof h=="object"&&!Te.isValidElement(h)?h:{message:h};this.create({id:n,type:"success",description:v,...x})}}).catch(async f=>{if(l=["reject",f],r.error!==void 0){s=!1;const m=typeof r.error=="function"?await r.error(f):r.error,h=typeof r.description=="function"?await r.description(f):r.description,b=typeof m=="object"&&!Te.isValidElement(m)?m:{message:m};this.create({id:n,type:"error",description:h,...b})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),d=()=>new Promise((f,m)=>c.then(()=>l[0]==="reject"?m(l[1]):f(l[1])).catch(m));return typeof n!="string"&&typeof n!="number"?{unwrap:d}:Object.assign(n,{unwrap:d})},this.custom=(e,r)=>{const n=r?.id||V_++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Sn=new YK,KK=(t,e)=>{const r=e?.id||V_++;return Sn.addToast({title:t,...e,id:r}),r},ZK=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",XK=KK,QK=()=>Sn.toasts,JK=()=>Sn.getActiveToasts(),Er=Object.assign(XK,{success:Sn.success,info:Sn.info,warning:Sn.warning,error:Sn.error,custom:Sn.custom,message:Sn.message,promise:Sn.promise,dismiss:Sn.dismiss,loading:Sn.loading},{getHistory:QK,getToasts:JK});UK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ap(t){return t.label!==void 0}const eZ=3,tZ="24px",rZ="16px",bO=4e3,nZ=356,aZ=14,iZ=45,oZ=200;function ka(...t){return t.filter(Boolean).join(" ")}function sZ(t){const[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}const lZ=t=>{var e,r,n,a,s,l,c,d,f;const{invert:m,toast:h,unstyled:v,interacting:b,setHeights:x,visibleToasts:S,heights:R,index:w,toasts:_,expanded:A,removeToast:C,defaultRichColors:k,closeButton:N,style:I,cancelButtonStyle:O,actionButtonStyle:M,className:L="",descriptionClassName:P="",duration:V,position:X,gap:Q,expandByDefault:oe,classNames:U,icons:W,closeButtonAriaLabel:H="Close toast"}=t,[te,se]=Te.useState(null),[B,q]=Te.useState(null),[$,K]=Te.useState(!1),[J,z]=Te.useState(!1),[j,Z]=Te.useState(!1),[ne,G]=Te.useState(!1),[ce,he]=Te.useState(!1),[_e,ye]=Te.useState(0),[Se,Ne]=Te.useState(0),ge=Te.useRef(h.duration||V||bO),ke=Te.useRef(null),Oe=Te.useRef(null),Xe=w===0,ot=w+1<=S,$e=h.type,We=h.dismissible!==!1,Ae=h.className||"",Le=h.descriptionClassName||"",Je=Te.useMemo(()=>R.findIndex(Ke=>Ke.toastId===h.id)||0,[R,h.id]),ft=Te.useMemo(()=>{var Ke;return(Ke=h.closeButton)!=null?Ke:N},[h.closeButton,N]),rt=Te.useMemo(()=>h.duration||V||bO,[h.duration,V]),Rt=Te.useRef(0),Ot=Te.useRef(0),An=Te.useRef(0),gr=Te.useRef(null),[ir,Mt]=X.split("-"),Zt=Te.useMemo(()=>R.reduce((Ke,jt,Qt)=>Qt>=Je?Ke:Ke+jt.height,0),[R,Je]),dr=WK(),Sr=h.invert||m,zn=$e==="loading";Ot.current=Te.useMemo(()=>Je*Q+Zt,[Je,Zt]),Te.useEffect(()=>{ge.current=rt},[rt]),Te.useEffect(()=>{K(!0)},[]),Te.useEffect(()=>{const Ke=Oe.current;if(Ke){const jt=Ke.getBoundingClientRect().height;return Ne(jt),x(Qt=>[{toastId:h.id,height:jt,position:h.position},...Qt]),()=>x(Qt=>Qt.filter(Lr=>Lr.toastId!==h.id))}},[x,h.id]),Te.useLayoutEffect(()=>{if(!$)return;const Ke=Oe.current,jt=Ke.style.height;Ke.style.height="auto";const Qt=Ke.getBoundingClientRect().height;Ke.style.height=jt,Ne(Qt),x(Lr=>Lr.find(Xt=>Xt.toastId===h.id)?Lr.map(Xt=>Xt.toastId===h.id?{...Xt,height:Qt}:Xt):[{toastId:h.id,height:Qt,position:h.position},...Lr])},[$,h.title,h.description,x,h.id,h.jsx,h.action,h.cancel]);const or=Te.useCallback(()=>{z(!0),ye(Ot.current),x(Ke=>Ke.filter(jt=>jt.toastId!==h.id)),setTimeout(()=>{C(h)},oZ)},[h,C,x,Ot]);Te.useEffect(()=>{if(h.promise&&$e==="loading"||h.duration===1/0||h.type==="loading")return;let Ke;return A||b||dr?(()=>{if(An.current<Rt.current){const Lr=new Date().getTime()-Rt.current;ge.current=ge.current-Lr}An.current=new Date().getTime()})():(()=>{ge.current!==1/0&&(Rt.current=new Date().getTime(),Ke=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),or()},ge.current))})(),()=>clearTimeout(Ke)},[A,b,h,$e,dr,or]),Te.useEffect(()=>{h.delete&&(or(),h.onDismiss==null||h.onDismiss.call(h,h))},[or,h.delete]);function Gt(){var Ke;if(W?.loading){var jt;return Te.createElement("div",{className:ka(U?.loader,h==null||(jt=h.classNames)==null?void 0:jt.loader,"sonner-loader"),"data-visible":$e==="loading"},W.loading)}return Te.createElement($K,{className:ka(U?.loader,h==null||(Ke=h.classNames)==null?void 0:Ke.loader),visible:$e==="loading"})}const pn=h.icon||W?.[$e]||FK($e);var ua,an;return Te.createElement("li",{tabIndex:0,ref:Oe,className:ka(L,Ae,U?.toast,h==null||(e=h.classNames)==null?void 0:e.toast,U?.default,U?.[$e],h==null||(r=h.classNames)==null?void 0:r[$e]),"data-sonner-toast":"","data-rich-colors":(ua=h.richColors)!=null?ua:k,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":$,"data-promise":!!h.promise,"data-swiped":ce,"data-removed":J,"data-visible":ot,"data-y-position":ir,"data-x-position":Mt,"data-index":w,"data-front":Xe,"data-swiping":j,"data-dismissible":We,"data-type":$e,"data-invert":Sr,"data-swipe-out":ne,"data-swipe-direction":B,"data-expanded":!!(A||oe&&$),"data-testid":h.testId,style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${J?_e:Ot.current}px`,"--initial-height":oe?"auto":`${Se}px`,...I,...h.style},onDragEnd:()=>{Z(!1),se(null),gr.current=null},onPointerDown:Ke=>{Ke.button!==2&&(zn||!We||(ke.current=new Date,ye(Ot.current),Ke.target.setPointerCapture(Ke.pointerId),Ke.target.tagName!=="BUTTON"&&(Z(!0),gr.current={x:Ke.clientX,y:Ke.clientY})))},onPointerUp:()=>{var Ke,jt,Qt;if(ne||!We)return;gr.current=null;const Lr=Number(((Ke=Oe.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),$n=Number(((jt=Oe.current)==null?void 0:jt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xt=new Date().getTime()-((Qt=ke.current)==null?void 0:Qt.getTime()),Zr=te==="x"?Lr:$n,_a=Math.abs(Zr)/Xt;if(Math.abs(Zr)>=iZ||_a>.11){ye(Ot.current),h.onDismiss==null||h.onDismiss.call(h,h),q(te==="x"?Lr>0?"right":"left":$n>0?"down":"up"),or(),G(!0);return}else{var Xr,Fr;(Xr=Oe.current)==null||Xr.style.setProperty("--swipe-amount-x","0px"),(Fr=Oe.current)==null||Fr.style.setProperty("--swipe-amount-y","0px")}he(!1),Z(!1),se(null)},onPointerMove:Ke=>{var jt,Qt,Lr;if(!gr.current||!We||((jt=window.getSelection())==null?void 0:jt.toString().length)>0)return;const Xt=Ke.clientY-gr.current.y,Zr=Ke.clientX-gr.current.x;var _a;const Xr=(_a=t.swipeDirections)!=null?_a:sZ(X);!te&&(Math.abs(Zr)>1||Math.abs(Xt)>1)&&se(Math.abs(Zr)>Math.abs(Xt)?"x":"y");let Fr={x:0,y:0};const re=Y=>1/(1.5+Math.abs(Y)/20);if(te==="y"){if(Xr.includes("top")||Xr.includes("bottom"))if(Xr.includes("top")&&Xt<0||Xr.includes("bottom")&&Xt>0)Fr.y=Xt;else{const Y=Xt*re(Xt);Fr.y=Math.abs(Y)<Math.abs(Xt)?Y:Xt}}else if(te==="x"&&(Xr.includes("left")||Xr.includes("right")))if(Xr.includes("left")&&Zr<0||Xr.includes("right")&&Zr>0)Fr.x=Zr;else{const Y=Zr*re(Zr);Fr.x=Math.abs(Y)<Math.abs(Zr)?Y:Zr}(Math.abs(Fr.x)>0||Math.abs(Fr.y)>0)&&he(!0),(Qt=Oe.current)==null||Qt.style.setProperty("--swipe-amount-x",`${Fr.x}px`),(Lr=Oe.current)==null||Lr.style.setProperty("--swipe-amount-y",`${Fr.y}px`)}},ft&&!h.jsx&&$e!=="loading"?Te.createElement("button",{"aria-label":H,"data-disabled":zn,"data-close-button":!0,onClick:zn||!We?()=>{}:()=>{or(),h.onDismiss==null||h.onDismiss.call(h,h)},className:ka(U?.closeButton,h==null||(n=h.classNames)==null?void 0:n.closeButton)},(an=W?.close)!=null?an:GK):null,($e||h.icon||h.promise)&&h.icon!==null&&(W?.[$e]!==null||h.icon)?Te.createElement("div",{"data-icon":"",className:ka(U?.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Gt():null,h.type!=="loading"?pn:null):null,Te.createElement("div",{"data-content":"",className:ka(U?.content,h==null||(s=h.classNames)==null?void 0:s.content)},Te.createElement("div",{"data-title":"",className:ka(U?.title,h==null||(l=h.classNames)==null?void 0:l.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?Te.createElement("div",{"data-description":"",className:ka(P,Le,U?.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),Te.isValidElement(h.cancel)?h.cancel:h.cancel&&ap(h.cancel)?Te.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||O,onClick:Ke=>{ap(h.cancel)&&We&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Ke),or())},className:ka(U?.cancelButton,h==null||(d=h.classNames)==null?void 0:d.cancelButton)},h.cancel.label):null,Te.isValidElement(h.action)?h.action:h.action&&ap(h.action)?Te.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||M,onClick:Ke=>{ap(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Ke),!Ke.defaultPrevented&&or())},className:ka(U?.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.action.label):null)};function yO(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function cZ(t,e){const r={};return[t,e].forEach((n,a)=>{const s=a===1,l=s?"--mobile-offset":"--offset",c=s?rZ:tZ;function d(f){["top","right","bottom","left"].forEach(m=>{r[`${l}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof n=="number"||typeof n=="string"?d(n):typeof n=="object"?["top","right","bottom","left"].forEach(f=>{n[f]===void 0?r[`${l}-${f}`]=c:r[`${l}-${f}`]=typeof n[f]=="number"?`${n[f]}px`:n[f]}):d(c)}),r}const uZ=Te.forwardRef(function(e,r){const{id:n,invert:a,position:s="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:d,className:f,offset:m,mobileOffset:h,theme:v="light",richColors:b,duration:x,style:S,visibleToasts:R=eZ,toastOptions:w,dir:_=yO(),gap:A=aZ,icons:C,containerAriaLabel:k="Notifications"}=e,[N,I]=Te.useState([]),O=Te.useMemo(()=>n?N.filter($=>$.toasterId===n):N.filter($=>!$.toasterId),[N,n]),M=Te.useMemo(()=>Array.from(new Set([s].concat(O.filter($=>$.position).map($=>$.position)))),[O,s]),[L,P]=Te.useState([]),[V,X]=Te.useState(!1),[Q,oe]=Te.useState(!1),[U,W]=Te.useState(v!=="system"?v:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=Te.useRef(null),te=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),se=Te.useRef(null),B=Te.useRef(!1),q=Te.useCallback($=>{I(K=>{var J;return(J=K.find(z=>z.id===$.id))!=null&&J.delete||Sn.dismiss($.id),K.filter(({id:z})=>z!==$.id)})},[]);return Te.useEffect(()=>Sn.subscribe($=>{if($.dismiss){requestAnimationFrame(()=>{I(K=>K.map(J=>J.id===$.id?{...J,delete:!0}:J))});return}setTimeout(()=>{lB.flushSync(()=>{I(K=>{const J=K.findIndex(z=>z.id===$.id);return J!==-1?[...K.slice(0,J),{...K[J],...$},...K.slice(J+1)]:[$,...K]})})})}),[N]),Te.useEffect(()=>{if(v!=="system"){W(v);return}if(v==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?W("dark"):W("light")),typeof window>"u")return;const $=window.matchMedia("(prefers-color-scheme: dark)");try{$.addEventListener("change",({matches:K})=>{W(K?"dark":"light")})}catch{$.addListener(({matches:J})=>{try{W(J?"dark":"light")}catch(z){console.error(z)}})}},[v]),Te.useEffect(()=>{N.length<=1&&X(!1)},[N]),Te.useEffect(()=>{const $=K=>{var J;if(l.every(Z=>K[Z]||K.code===Z)){var j;X(!0),(j=H.current)==null||j.focus()}K.code==="Escape"&&(document.activeElement===H.current||(J=H.current)!=null&&J.contains(document.activeElement))&&X(!1)};return document.addEventListener("keydown",$),()=>document.removeEventListener("keydown",$)},[l]),Te.useEffect(()=>{if(H.current)return()=>{se.current&&(se.current.focus({preventScroll:!0}),se.current=null,B.current=!1)}},[H.current]),Te.createElement("section",{ref:r,"aria-label":`${k} ${te}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map(($,K)=>{var J;const[z,j]=$.split("-");return O.length?Te.createElement("ol",{key:$,dir:_==="auto"?yO():_,tabIndex:-1,ref:H,className:f,"data-sonner-toaster":!0,"data-sonner-theme":U,"data-y-position":z,"data-x-position":j,style:{"--front-toast-height":`${((J=L[0])==null?void 0:J.height)||0}px`,"--width":`${nZ}px`,"--gap":`${A}px`,...S,...cZ(m,h)},onBlur:Z=>{B.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(B.current=!1,se.current&&(se.current.focus({preventScroll:!0}),se.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||B.current||(B.current=!0,se.current=Z.relatedTarget)},onMouseEnter:()=>X(!0),onMouseMove:()=>X(!0),onMouseLeave:()=>{Q||X(!1)},onDragEnd:()=>X(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||oe(!0)},onPointerUp:()=>oe(!1)},O.filter(Z=>!Z.position&&K===0||Z.position===$).map((Z,ne)=>{var G,ce;return Te.createElement(lZ,{key:Z.id,icons:C,index:ne,toast:Z,defaultRichColors:b,duration:(G=w?.duration)!=null?G:x,className:w?.className,descriptionClassName:w?.descriptionClassName,invert:a,visibleToasts:R,closeButton:(ce=w?.closeButton)!=null?ce:d,interacting:Q,position:$,style:w?.style,unstyled:w?.unstyled,classNames:w?.classNames,cancelButtonStyle:w?.cancelButtonStyle,actionButtonStyle:w?.actionButtonStyle,closeButtonAriaLabel:w?.closeButtonAriaLabel,removeToast:q,toasts:O.filter(he=>he.position==Z.position),heights:L.filter(he=>he.position==Z.position),setHeights:P,expandByDefault:c,gap:A,expanded:V,swipeDirections:e.swipeDirections})})):null}))});function EO(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Ha(...t){return e=>{let r=!1;const n=t.map(a=>{const s=EO(a,e);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let a=0;a<n.length;a++){const s=n[a];typeof s=="function"?s():EO(t[a],null)}}}}function Nt(...t){return y.useCallback(Ha(...t),t)}var dZ=Symbol.for("react.lazy"),pm=jm[" use ".trim().toString()];function fZ(t){return typeof t=="object"&&t!==null&&"then"in t}function gB(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===dZ&&"_payload"in t&&fZ(t._payload)}function vB(t){const e=pZ(t),r=y.forwardRef((n,a)=>{let{children:s,...l}=n;gB(s)&&typeof pm=="function"&&(s=pm(s._payload));const c=y.Children.toArray(s),d=c.find(hZ);if(d){const f=d.props.children,m=c.map(h=>h===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}var bB=vB("Slot");function pZ(t){const e=y.forwardRef((r,n)=>{let{children:a,...s}=r;if(gB(a)&&typeof pm=="function"&&(a=pm(a._payload)),y.isValidElement(a)){const l=vZ(a),c=gZ(s,a.props);return a.type!==y.Fragment&&(c.ref=n?Ha(n,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var mZ=Symbol("radix.slottable");function hZ(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mZ}function gZ(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function vZ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function yB(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=yB(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function EB(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=yB(t))&&(n&&(n+=" "),n+=e);return n}const SO=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,wO=EB,SB=(t,e)=>r=>{var n;if(e?.variants==null)return wO(t,r?.class,r?.className);const{variants:a,defaultVariants:s}=e,l=Object.keys(a).map(f=>{const m=r?.[f],h=s?.[f];if(m===null)return null;const v=SO(m)||SO(h);return a[f][v]}),c=r&&Object.entries(r).reduce((f,m)=>{let[h,v]=m;return v===void 0||(f[h]=v),f},{}),d=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((f,m)=>{let{class:h,className:v,...b}=m;return Object.entries(b).every(x=>{let[S,R]=x;return Array.isArray(R)?R.includes({...s,...c}[S]):{...s,...c}[S]===R})?[...f,h,v]:f},[]);return wO(t,l,d,r?.class,r?.className)},bZ=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},yZ=(t,e)=>({classGroupId:t,validator:e}),wB=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),mm="-",xO=[],EZ="arbitrary..",SZ=t=>{const e=xZ(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return wZ(l);const c=l.split(mm),d=c[0]===""&&c.length>1?1:0;return xB(c,d,e)},getConflictingClassGroupIds:(l,c)=>{if(c){const d=n[l],f=r[l];return d?f?bZ(f,d):d:f||xO}return r[l]||xO}}},xB=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const a=t[e],s=r.nextPart.get(a);if(s){const f=xB(t,e+1,s);if(f)return f}const l=r.validators;if(l===null)return;const c=e===0?t.join(mm):t.slice(e).join(mm),d=l.length;for(let f=0;f<d;f++){const m=l[f];if(m.validator(c))return m.classGroupId}},wZ=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?EZ+n:void 0})(),xZ=t=>{const{theme:e,classGroups:r}=t;return _Z(r,e)},_Z=(t,e)=>{const r=wB();for(const n in t){const a=t[n];vR(a,r,n,e)}return r},vR=(t,e,r,n)=>{const a=t.length;for(let s=0;s<a;s++){const l=t[s];TZ(l,e,r,n)}},TZ=(t,e,r,n)=>{if(typeof t=="string"){RZ(t,e,r);return}if(typeof t=="function"){AZ(t,e,r,n);return}CZ(t,e,r,n)},RZ=(t,e,r)=>{const n=t===""?e:_B(e,t);n.classGroupId=r},AZ=(t,e,r,n)=>{if(NZ(t)){vR(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(yZ(r,t))},CZ=(t,e,r,n)=>{const a=Object.entries(t),s=a.length;for(let l=0;l<s;l++){const[c,d]=a[l];vR(d,_B(e,c),r,n)}},_B=(t,e)=>{let r=t;const n=e.split(mm),a=n.length;for(let s=0;s<a;s++){const l=n[s];let c=r.nextPart.get(l);c||(c=wB(),r.nextPart.set(l,c)),r=c}return r},NZ=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,kZ=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const a=(s,l)=>{r[s]=l,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(s){let l=r[s];if(l!==void 0)return l;if((l=n[s])!==void 0)return a(s,l),l},set(s,l){s in r?r[s]=l:a(s,l)}}},G_="!",_O=":",IZ=[],TO=(t,e,r,n,a)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:a}),OZ=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=a=>{const s=[];let l=0,c=0,d=0,f;const m=a.length;for(let S=0;S<m;S++){const R=a[S];if(l===0&&c===0){if(R===_O){s.push(a.slice(d,S)),d=S+1;continue}if(R==="/"){f=S;continue}}R==="["?l++:R==="]"?l--:R==="("?c++:R===")"&&c--}const h=s.length===0?a:a.slice(d);let v=h,b=!1;h.endsWith(G_)?(v=h.slice(0,-1),b=!0):h.startsWith(G_)&&(v=h.slice(1),b=!0);const x=f&&f>d?f-d:void 0;return TO(s,b,v,x)};if(e){const a=e+_O,s=n;n=l=>l.startsWith(a)?s(l.slice(a.length)):TO(IZ,!1,l,void 0,!0)}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},DZ=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let a=[];for(let s=0;s<r.length;s++){const l=r[s],c=l[0]==="[",d=e.has(l);c||d?(a.length>0&&(a.sort(),n.push(...a),a=[]),n.push(l)):a.push(l)}return a.length>0&&(a.sort(),n.push(...a)),n}},LZ=t=>({cache:kZ(t.cacheSize),parseClassName:OZ(t),sortModifiers:DZ(t),...SZ(t)}),MZ=/\s+/,PZ=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=e,l=[],c=t.trim().split(MZ);let d="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:h,modifiers:v,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:S}=r(m);if(h){d=m+(d.length>0?" "+d:d);continue}let R=!!S,w=n(R?x.substring(0,S):x);if(!w){if(!R){d=m+(d.length>0?" "+d:d);continue}if(w=n(x),!w){d=m+(d.length>0?" "+d:d);continue}R=!1}const _=v.length===0?"":v.length===1?v[0]:s(v).join(":"),A=b?_+G_:_,C=A+w;if(l.indexOf(C)>-1)continue;l.push(C);const k=a(w,R);for(let N=0;N<k.length;++N){const I=k[N];l.push(A+I)}d=m+(d.length>0?" "+d:d)}return d},jZ=(...t)=>{let e=0,r,n,a="";for(;e<t.length;)(r=t[e++])&&(n=TB(r))&&(a&&(a+=" "),a+=n);return a},TB=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=TB(t[n]))&&(r&&(r+=" "),r+=e);return r},UZ=(t,...e)=>{let r,n,a,s;const l=d=>{const f=e.reduce((m,h)=>h(m),t());return r=LZ(f),n=r.cache.get,a=r.cache.set,s=c,c(d)},c=d=>{const f=n(d);if(f)return f;const m=PZ(d,r);return a(d,m),m};return s=l,(...d)=>s(jZ(...d))},FZ=[],Ir=t=>{const e=r=>r[t]||FZ;return e.isThemeGetter=!0,e},RB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,AB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zZ=/^\d+\/\d+$/,$Z=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BZ=/\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$/,qZ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HZ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VZ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fl=t=>zZ.test(t),gt=t=>!!t&&!Number.isNaN(Number(t)),co=t=>!!t&&Number.isInteger(Number(t)),jb=t=>t.endsWith("%")&>(t.slice(0,-1)),gi=t=>$Z.test(t),GZ=()=>!0,WZ=t=>BZ.test(t)&&!qZ.test(t),CB=()=>!1,YZ=t=>HZ.test(t),KZ=t=>VZ.test(t),ZZ=t=>!qe(t)&&!He(t),XZ=t=>bc(t,IB,CB),qe=t=>RB.test(t),ts=t=>bc(t,OB,WZ),Ub=t=>bc(t,rX,gt),RO=t=>bc(t,NB,CB),QZ=t=>bc(t,kB,KZ),ip=t=>bc(t,DB,YZ),He=t=>AB.test(t),bu=t=>yc(t,OB),JZ=t=>yc(t,nX),AO=t=>yc(t,NB),eX=t=>yc(t,IB),tX=t=>yc(t,kB),op=t=>yc(t,DB,!0),bc=(t,e,r)=>{const n=RB.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},yc=(t,e,r=!1)=>{const n=AB.exec(t);return n?n[1]?e(n[1]):r:!1},NB=t=>t==="position"||t==="percentage",kB=t=>t==="image"||t==="url",IB=t=>t==="length"||t==="size"||t==="bg-size",OB=t=>t==="length",rX=t=>t==="number",nX=t=>t==="family-name",DB=t=>t==="shadow",aX=()=>{const t=Ir("color"),e=Ir("font"),r=Ir("text"),n=Ir("font-weight"),a=Ir("tracking"),s=Ir("leading"),l=Ir("breakpoint"),c=Ir("container"),d=Ir("spacing"),f=Ir("radius"),m=Ir("shadow"),h=Ir("inset-shadow"),v=Ir("text-shadow"),b=Ir("drop-shadow"),x=Ir("blur"),S=Ir("perspective"),R=Ir("aspect"),w=Ir("ease"),_=Ir("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...C(),He,qe],N=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],O=()=>[He,qe,d],M=()=>[fl,"full","auto",...O()],L=()=>[co,"none","subgrid",He,qe],P=()=>["auto",{span:["full",co,He,qe]},co,He,qe],V=()=>[co,"auto",He,qe],X=()=>["auto","min","max","fr",He,qe],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],oe=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...O()],W=()=>[fl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],H=()=>[t,He,qe],te=()=>[...C(),AO,RO,{position:[He,qe]}],se=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",eX,XZ,{size:[He,qe]}],q=()=>[jb,bu,ts],$=()=>["","none","full",f,He,qe],K=()=>["",gt,bu,ts],J=()=>["solid","dashed","dotted","double"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[gt,jb,AO,RO],Z=()=>["","none",x,He,qe],ne=()=>["none",gt,He,qe],G=()=>["none",gt,He,qe],ce=()=>[gt,He,qe],he=()=>[fl,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gi],breakpoint:[gi],color:[GZ],container:[gi],"drop-shadow":[gi],ease:["in","out","in-out"],font:[ZZ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gi],shadow:[gi],spacing:["px",gt],text:[gi],"text-shadow":[gi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fl,qe,He,R]}],container:["container"],columns:[{columns:[gt,qe,He,c]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:k()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[co,"auto",He,qe]}],basis:[{basis:[fl,"full","auto",c,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[gt,fl,"auto","initial","none",qe]}],grow:[{grow:["",gt,He,qe]}],shrink:[{shrink:["",gt,He,qe]}],order:[{order:[co,"first","last","none",He,qe]}],"grid-cols":[{"grid-cols":L()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":L()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...oe(),"normal"]}],"justify-self":[{"justify-self":["auto",...oe()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...oe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...oe(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...oe(),"baseline"]}],"place-self":[{"place-self":["auto",...oe()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[c,"screen",...W()]}],"min-w":[{"min-w":[c,"screen","none",...W()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",r,bu,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,He,Ub]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jb,qe]}],"font-family":[{font:[JZ,qe,e]}],"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:[a,He,qe]}],"line-clamp":[{"line-clamp":[gt,"none",He,Ub]}],leading:[{leading:[s,...O()]}],"list-image":[{"list-image":["none",He,qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",He,qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[gt,"from-font","auto",He,ts]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[gt,"auto",He,qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He,qe]}],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",He,qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},co,He,qe],radial:["",He,qe],conic:[co,He,qe]},tX,QZ]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[gt,He,qe]}],"outline-w":[{outline:["",gt,bu,ts]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",m,op,ip]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",h,op,ip]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[gt,ts]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",v,op,ip]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[gt,He,qe]}],"mix-blend":[{"mix-blend":[...z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":z()}],"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":[gt]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[He,qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":C()}],"mask-image-conic-pos":[{"mask-conic":[gt]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",He,qe]}],filter:[{filter:["","none",He,qe]}],blur:[{blur:Z()}],brightness:[{brightness:[gt,He,qe]}],contrast:[{contrast:[gt,He,qe]}],"drop-shadow":[{"drop-shadow":["","none",b,op,ip]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",gt,He,qe]}],"hue-rotate":[{"hue-rotate":[gt,He,qe]}],invert:[{invert:["",gt,He,qe]}],saturate:[{saturate:[gt,He,qe]}],sepia:[{sepia:["",gt,He,qe]}],"backdrop-filter":[{"backdrop-filter":["","none",He,qe]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[gt,He,qe]}],"backdrop-contrast":[{"backdrop-contrast":[gt,He,qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",gt,He,qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[gt,He,qe]}],"backdrop-invert":[{"backdrop-invert":["",gt,He,qe]}],"backdrop-opacity":[{"backdrop-opacity":[gt,He,qe]}],"backdrop-saturate":[{"backdrop-saturate":[gt,He,qe]}],"backdrop-sepia":[{"backdrop-sepia":["",gt,He,qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",He,qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[gt,"initial",He,qe]}],ease:[{ease:["linear","initial",w,He,qe]}],delay:[{delay:[gt,He,qe]}],animate:[{animate:["none",_,He,qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,He,qe]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[He,qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}],"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",He,qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",He,qe]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[gt,bu,ts,Ub]}],stroke:[{stroke:["none",...H()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},iX=UZ(aX);function Me(...t){return iX(EB(t))}const oX=SB("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Va({className:t,variant:e,asChild:r=!1,...n}){const a=r?bB:"span";return g.jsx(a,{"data-slot":"badge",className:Me(oX({variant:e}),t),...n})}const sX=SB("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-full gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-full px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function et({className:t,variant:e,size:r,asChild:n=!1,...a}){const s=n?bB:"button";return g.jsx(s,{"data-slot":"button",className:Me(sX({variant:e,size:r,className:t})),...a})}var lX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ui=lX.reduce((t,e)=>{const r=vB(`Primitive.${e}`),n=y.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{}),cX="Label",LB=y.forwardRef((t,e)=>g.jsx(Ui.label,{...t,ref:e,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));LB.displayName=cX;var uX=LB;function lr({className:t,...e}){return g.jsx(uX,{"data-slot":"label",className:Me("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function bR({message:t,className:e="",vertical:r,noBorder:n}){return g.jsx("div",{className:Me(`mt-2 rounded-md p-6 ${e}`,!n&&"border"),children:g.jsxs("p",{className:Me("text-sm text-muted-foreground flex items-center gap-4",r&&"flex-col"),children:[g.jsx("svg",{width:"40",height:"40",viewBox:"0 0 273 273",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",children:g.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:g.jsxs("g",{transform:"translate(5.320900, 5.320900)",fillRule:"nonzero",className:"stroke-black dark:stroke-white",strokeWidth:"4",children:[g.jsx("path",{d:"M49.953025,-2.10854389 C63.26892,-2.21867124 76.6185256,2.70621155 86.9019463,12.6653164 L86.9019463,12.6653164 L87.505627,13.2592944 C97.5154947,23.2654892 102.640454,36.3074513 102.880738,49.4222247 C103.08932,77.4533067 113.877287,105.391753 135.242867,126.757333 C156.613383,148.127849 184.559216,158.914875 212.568138,159.119313 L212.568138,159.119313 L213.212264,159.134159 C225.843948,159.517566 238.363557,164.434972 248.121998,173.886137 L248.121998,173.886137 L248.725621,174.480088 C258.982114,184.732164 264.11035,198.171134 264.11035,211.6101 C264.11035,225.04592 258.984514,238.481745 248.732867,248.732867 C238.592792,258.872942 225.336706,263.997882 212.046872,264.107794 C198.731075,264.21792 185.381569,259.293085 175.098248,249.334078 L175.098248,249.334078 L174.494602,248.740134 C163.75802,238.008189 158.640853,223.784027 159.143413,209.719372 C158.258245,182.640933 147.489786,155.83332 126.828333,135.171867 C106.351297,114.694831 79.8363505,103.934873 53.0237258,102.891841 L53.0237258,102.891841 L52.2811438,102.865674 C38.4791718,103.347421 24.5325234,98.4328111 13.8776628,88.1140866 L13.8776628,88.1140866 L13.2739843,87.5201168 C3.12895117,77.3789607 -1.9984796,64.1195994 -2.10841888,50.8264755 C-2.21854669,37.5105567 2.70635908,24.1609269 12.6655135,13.8774565 L12.6655135,13.8774565 L13.2594878,13.2737797 C23.4005926,3.12880025 36.659927,-1.99860507 49.953025,-2.10854389 Z"}),g.jsx("circle",{cx:"50",cy:"212.0001",r:"52.5"}),g.jsx("circle",{cx:"212.0001",cy:"50",r:"52.5"})]})})}),t]})})}function MB({className:t,color:e,children:r,grayscaled:n=!1}){const a=y.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[1]||"0")}return n?0:.2},[e,n]),s=y.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[0]||"0.5")}return n?.3:.4},[e,n]),l=y.useMemo(()=>{if(e){const h=e.split("(")[1].split(")")[0].trim().split(/\s+/);return Number.parseFloat(h[2]||"0")}return Math.floor(Math.random()*360)},[e]),c=y.useMemo(()=>e||`oklch(${Math.min(s,1)} ${a} ${l})`,[l,a,s]),d=y.useMemo(()=>`oklch(${Math.min(s*2,1)} ${a} ${l})`,[l,a,s,e]),f=y.useMemo(()=>Math.floor(Math.random()*360),[l]),m=y.useMemo(()=>"1000%",[]);return g.jsx("section",{className:Me("relative w-full h-full overflow-hidden",t),style:{background:`${d}`},children:g.jsxs("div",{className:"isolate relative w-full h-full",children:[g.jsx("div",{className:"noise w-full h-full",style:{background:`linear-gradient(${f}deg, ${c}, transparent), url(https://grainy-gradients.vercel.app/noise.svg)`,filter:`contrast(120%) brightness(${m})`}}),r&&g.jsx("div",{className:"relative z-10 w-full h-full",children:r})]})})}function ze(t,e,{checkForDefaultPrevented:r=!0}={}){return function(a){if(t?.(a),r===!1||!a.defaultPrevented)return e?.(a)}}function dX(t,e){const r=y.createContext(e),n=s=>{const{children:l,...c}=s,d=y.useMemo(()=>c,Object.values(c));return g.jsx(r.Provider,{value:d,children:l})};n.displayName=t+"Provider";function a(s){const l=y.useContext(r);if(l)return l;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[n,a]}function Za(t,e=[]){let r=[];function n(s,l){const c=y.createContext(l),d=r.length;r=[...r,l];const f=h=>{const{scope:v,children:b,...x}=h,S=v?.[t]?.[d]||c,R=y.useMemo(()=>x,Object.values(x));return g.jsx(S.Provider,{value:R,children:b})};f.displayName=s+"Provider";function m(h,v){const b=v?.[t]?.[d]||c,x=y.useContext(b);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${h}\` must be used within \`${s}\``)}return[f,m]}const a=()=>{const s=r.map(l=>y.createContext(l));return function(c){const d=c?.[t]||s;return y.useMemo(()=>({[`__scope${t}`]:{...c,[t]:d}}),[c,d])}};return a.scopeName=t,[n,fX(a,...e)]}function fX(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const l=n.reduce((c,{useScope:d,scopeName:f})=>{const h=d(s)[`__scope${f}`];return{...c,...h}},{});return y.useMemo(()=>({[`__scope${e.scopeName}`]:l}),[l])}};return r.scopeName=e.scopeName,r}var nn=globalThis?.document?y.useLayoutEffect:()=>{},pX=jm[" useInsertionEffect ".trim().toString()]||nn;function _o({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[a,s,l]=mX({defaultProp:e,onChange:r}),c=t!==void 0,d=c?t:a;{const m=y.useRef(t!==void 0);y.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,n])}const f=y.useCallback(m=>{if(c){const h=hX(m)?m(t):m;h!==t&&l.current?.(h)}else s(m)},[c,t,s,l]);return[d,f]}function mX({defaultProp:t,onChange:e}){const[r,n]=y.useState(t),a=y.useRef(r),s=y.useRef(e);return pX(()=>{s.current=e},[e]),y.useEffect(()=>{a.current!==r&&(s.current?.(r),a.current=r)},[r,a]),[r,n,s]}function hX(t){return typeof t=="function"}function PB(t){const e=y.useRef({value:t,previous:t});return y.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function jB(t){const[e,r]=y.useState(void 0);return nn(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const s=a[0];let l,c;if("borderBoxSize"in s){const d=s.borderBoxSize,f=Array.isArray(d)?d[0]:d;l=f.inlineSize,c=f.blockSize}else l=t.offsetWidth,c=t.offsetHeight;r({width:l,height:c})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}function ws(t){const e=gX(t),r=y.forwardRef((n,a)=>{const{children:s,...l}=n,c=y.Children.toArray(s),d=c.find(bX);if(d){const f=d.props.children,m=c.map(h=>h===d?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:h);return g.jsx(e,{...l,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return g.jsx(e,{...l,ref:a,children:s})});return r.displayName=`${t}.Slot`,r}function gX(t){const e=y.forwardRef((r,n)=>{const{children:a,...s}=r;if(y.isValidElement(a)){const l=EX(a),c=yX(s,a.props);return a.type!==y.Fragment&&(c.ref=n?Ha(n,l):l),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var UB=Symbol("radix.slottable");function vX(t){const e=({children:r})=>g.jsx(g.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=UB,e}function bX(t){return y.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===UB}function yX(t,e){const r={...e};for(const n in e){const a=t[n],s=e[n];/^on[A-Z]/.test(n)?a&&s?r[n]=(...c)=>{const d=s(...c);return a(...c),d}:a&&(r[n]=a):n==="style"?r[n]={...a,...s}:n==="className"&&(r[n]=[a,s].filter(Boolean).join(" "))}return{...t,...r}}function EX(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var SX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vt=SX.reduce((t,e)=>{const r=ws(`Primitive.${e}`),n=y.forwardRef((a,s)=>{const{asChild:l,...c}=a,d=l?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(d,{...c,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function FB(t,e){t&&vc.flushSync(()=>t.dispatchEvent(e))}var qm="Switch",[wX]=Za(qm),[xX,_X]=wX(qm),zB=y.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:a,defaultChecked:s,required:l,disabled:c,value:d="on",onCheckedChange:f,form:m,...h}=t,[v,b]=y.useState(null),x=Nt(e,A=>b(A)),S=y.useRef(!1),R=v?m||!!v.closest("form"):!0,[w,_]=_o({prop:a,defaultProp:s??!1,onChange:f,caller:qm});return g.jsxs(xX,{scope:r,checked:w,disabled:c,children:[g.jsx(vt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":HB(w),"data-disabled":c?"":void 0,disabled:c,value:d,...h,ref:x,onClick:ze(t.onClick,A=>{_(C=>!C),R&&(S.current=A.isPropagationStopped(),S.current||A.stopPropagation())})}),R&&g.jsx(qB,{control:v,bubbles:!S.current,name:n,value:d,checked:w,required:l,disabled:c,form:m,style:{transform:"translateX(-100%)"}})]})});zB.displayName=qm;var $B="SwitchThumb",BB=y.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,a=_X($B,r);return g.jsx(vt.span,{"data-state":HB(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:e})});BB.displayName=$B;var TX="SwitchBubbleInput",qB=y.forwardRef(({__scopeSwitch:t,control:e,checked:r,bubbles:n=!0,...a},s)=>{const l=y.useRef(null),c=Nt(l,s),d=PB(r),f=jB(e);return y.useEffect(()=>{const m=l.current;if(!m)return;const h=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(h,"checked").set;if(d!==r&&b){const x=new Event("click",{bubbles:n});b.call(m,r),m.dispatchEvent(x)}},[d,r,n]),g.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:c,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});qB.displayName=TX;function HB(t){return t?"checked":"unchecked"}var VB=zB,RX=BB;function yR({ref:t,className:e,...r}){return g.jsx(VB,{className:Me("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...r,ref:t,children:g.jsx(RX,{className:Me("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})})}yR.displayName=VB.displayName;function Ga(t){const e=y.useRef(t);return y.useEffect(()=>{e.current=t}),y.useMemo(()=>(...r)=>e.current?.(...r),[])}function AX(t,e=globalThis?.document){const r=Ga(t);y.useEffect(()=>{const n=a=>{a.key==="Escape"&&r(a)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var CX="DismissableLayer",W_="dismissableLayer.update",NX="dismissableLayer.pointerDownOutside",kX="dismissableLayer.focusOutside",CO,GB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ec=y.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...d}=t,f=y.useContext(GB),[m,h]=y.useState(null),v=m?.ownerDocument??globalThis?.document,[,b]=y.useState({}),x=Nt(e,I=>h(I)),S=Array.from(f.layers),[R]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=S.indexOf(R),_=m?S.indexOf(m):-1,A=f.layersWithOutsidePointerEventsDisabled.size>0,C=_>=w,k=DX(I=>{const O=I.target,M=[...f.branches].some(L=>L.contains(O));!C||M||(a?.(I),l?.(I),I.defaultPrevented||c?.())},v),N=LX(I=>{const O=I.target;[...f.branches].some(L=>L.contains(O))||(s?.(I),l?.(I),I.defaultPrevented||c?.())},v);return AX(I=>{_===f.layers.size-1&&(n?.(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},v),y.useEffect(()=>{if(m)return r&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(CO=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),NO(),()=>{r&&f.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=CO)}},[m,v,r,f]),y.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),NO())},[m,f]),y.useEffect(()=>{const I=()=>b({});return document.addEventListener(W_,I),()=>document.removeEventListener(W_,I)},[]),g.jsx(vt.div,{...d,ref:x,style:{pointerEvents:A?C?"auto":"none":void 0,...t.style},onFocusCapture:ze(t.onFocusCapture,N.onFocusCapture),onBlurCapture:ze(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ze(t.onPointerDownCapture,k.onPointerDownCapture)})});Ec.displayName=CX;var IX="DismissableLayerBranch",OX=y.forwardRef((t,e)=>{const r=y.useContext(GB),n=y.useRef(null),a=Nt(e,n);return y.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),g.jsx(vt.div,{...t,ref:a})});OX.displayName=IX;function DX(t,e=globalThis?.document){const r=Ga(t),n=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const s=c=>{if(c.target&&!n.current){let d=function(){WB(NX,r,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(e.removeEventListener("click",a.current),a.current=d,e.addEventListener("click",a.current,{once:!0})):d()}else e.removeEventListener("click",a.current);n.current=!1},l=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(l),e.removeEventListener("pointerdown",s),e.removeEventListener("click",a.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function LX(t,e=globalThis?.document){const r=Ga(t),n=y.useRef(!1);return y.useEffect(()=>{const a=s=>{s.target&&!n.current&&WB(kX,r,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function NO(){const t=new CustomEvent(W_);document.dispatchEvent(t)}function WB(t,e,r,{discrete:n}){const a=r.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&a.addEventListener(t,e,{once:!0}),n?FB(a,s):a.dispatchEvent(s)}var MX=jm[" useId ".trim().toString()]||(()=>{}),PX=0;function Yr(t){const[e,r]=y.useState(MX());return nn(()=>{r(n=>n??String(PX++))},[t]),t||(e?`radix-${e}`:"")}const jX=["top","right","bottom","left"],To=Math.min,Un=Math.max,hm=Math.round,sp=Math.floor,Fa=t=>({x:t,y:t}),UX={left:"right",right:"left",bottom:"top",top:"bottom"},FX={start:"end",end:"start"};function Y_(t,e,r){return Un(t,To(e,r))}function Ii(t,e){return typeof t=="function"?t(e):t}function Oi(t){return t.split("-")[0]}function Sc(t){return t.split("-")[1]}function ER(t){return t==="x"?"y":"x"}function SR(t){return t==="y"?"height":"width"}const zX=new Set(["top","bottom"]);function Ma(t){return zX.has(Oi(t))?"y":"x"}function wR(t){return ER(Ma(t))}function $X(t,e,r){r===void 0&&(r=!1);const n=Sc(t),a=wR(t),s=SR(a);let l=a==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(l=gm(l)),[l,gm(l)]}function BX(t){const e=gm(t);return[K_(t),e,K_(e)]}function K_(t){return t.replace(/start|end/g,e=>FX[e])}const kO=["left","right"],IO=["right","left"],qX=["top","bottom"],HX=["bottom","top"];function VX(t,e,r){switch(t){case"top":case"bottom":return r?e?IO:kO:e?kO:IO;case"left":case"right":return e?qX:HX;default:return[]}}function GX(t,e,r,n){const a=Sc(t);let s=VX(Oi(t),r==="start",n);return a&&(s=s.map(l=>l+"-"+a),e&&(s=s.concat(s.map(K_)))),s}function gm(t){return t.replace(/left|right|bottom|top/g,e=>UX[e])}function WX(t){return{top:0,right:0,bottom:0,left:0,...t}}function YB(t){return typeof t!="number"?WX(t):{top:t,right:t,bottom:t,left:t}}function vm(t){const{x:e,y:r,width:n,height:a}=t;return{width:n,height:a,top:r,left:e,right:e+n,bottom:r+a,x:e,y:r}}function OO(t,e,r){let{reference:n,floating:a}=t;const s=Ma(e),l=wR(e),c=SR(l),d=Oi(e),f=s==="y",m=n.x+n.width/2-a.width/2,h=n.y+n.height/2-a.height/2,v=n[c]/2-a[c]/2;let b;switch(d){case"top":b={x:m,y:n.y-a.height};break;case"bottom":b={x:m,y:n.y+n.height};break;case"right":b={x:n.x+n.width,y:h};break;case"left":b={x:n.x-a.width,y:h};break;default:b={x:n.x,y:n.y}}switch(Sc(e)){case"start":b[l]-=v*(r&&f?-1:1);break;case"end":b[l]+=v*(r&&f?-1:1);break}return b}const YX=async(t,e,r)=>{const{placement:n="bottom",strategy:a="absolute",middleware:s=[],platform:l}=r,c=s.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(e));let f=await l.getElementRects({reference:t,floating:e,strategy:a}),{x:m,y:h}=OO(f,n,d),v=n,b={},x=0;for(let S=0;S<c.length;S++){const{name:R,fn:w}=c[S],{x:_,y:A,data:C,reset:k}=await w({x:m,y:h,initialPlacement:n,placement:v,strategy:a,middlewareData:b,rects:f,platform:l,elements:{reference:t,floating:e}});m=_??m,h=A??h,b={...b,[R]:{...b[R],...C}},k&&x<=50&&(x++,typeof k=="object"&&(k.placement&&(v=k.placement),k.rects&&(f=k.rects===!0?await l.getElementRects({reference:t,floating:e,strategy:a}):k.rects),{x:m,y:h}=OO(f,v,d)),S=-1)}return{x:m,y:h,placement:v,strategy:a,middlewareData:b}};async function rd(t,e){var r;e===void 0&&(e={});const{x:n,y:a,platform:s,rects:l,elements:c,strategy:d}=t,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:h="floating",altBoundary:v=!1,padding:b=0}=Ii(e,t),x=YB(b),R=c[v?h==="floating"?"reference":"floating":h],w=vm(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(R)))==null||r?R:R.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:d})),_=h==="floating"?{x:n,y:a,width:l.floating.width,height:l.floating.height}:l.reference,A=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(A))?await(s.getScale==null?void 0:s.getScale(A))||{x:1,y:1}:{x:1,y:1},k=vm(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:_,offsetParent:A,strategy:d}):_);return{top:(w.top-k.top+x.top)/C.y,bottom:(k.bottom-w.bottom+x.bottom)/C.y,left:(w.left-k.left+x.left)/C.x,right:(k.right-w.right+x.right)/C.x}}const KX=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:a,rects:s,platform:l,elements:c,middlewareData:d}=e,{element:f,padding:m=0}=Ii(t,e)||{};if(f==null)return{};const h=YB(m),v={x:r,y:n},b=wR(a),x=SR(b),S=await l.getDimensions(f),R=b==="y",w=R?"top":"left",_=R?"bottom":"right",A=R?"clientHeight":"clientWidth",C=s.reference[x]+s.reference[b]-v[b]-s.floating[x],k=v[b]-s.reference[b],N=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let I=N?N[A]:0;(!I||!await(l.isElement==null?void 0:l.isElement(N)))&&(I=c.floating[A]||s.floating[x]);const O=C/2-k/2,M=I/2-S[x]/2-1,L=To(h[w],M),P=To(h[_],M),V=L,X=I-S[x]-P,Q=I/2-S[x]/2+O,oe=Y_(V,Q,X),U=!d.arrow&&Sc(a)!=null&&Q!==oe&&s.reference[x]/2-(Q<V?L:P)-S[x]/2<0,W=U?Q<V?Q-V:Q-X:0;return{[b]:v[b]+W,data:{[b]:oe,centerOffset:Q-oe-W,...U&&{alignmentOffset:W}},reset:U}}}),ZX=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:a,middlewareData:s,rects:l,initialPlacement:c,platform:d,elements:f}=e,{mainAxis:m=!0,crossAxis:h=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:S=!0,...R}=Ii(t,e);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const w=Oi(a),_=Ma(c),A=Oi(c)===c,C=await(d.isRTL==null?void 0:d.isRTL(f.floating)),k=v||(A||!S?[gm(c)]:BX(c)),N=x!=="none";!v&&N&&k.push(...GX(c,S,x,C));const I=[c,...k],O=await rd(e,R),M=[];let L=((n=s.flip)==null?void 0:n.overflows)||[];if(m&&M.push(O[w]),h){const Q=$X(a,l,C);M.push(O[Q[0]],O[Q[1]])}if(L=[...L,{placement:a,overflows:M}],!M.every(Q=>Q<=0)){var P,V;const Q=(((P=s.flip)==null?void 0:P.index)||0)+1,oe=I[Q];if(oe&&(!(h==="alignment"?_!==Ma(oe):!1)||L.every(H=>Ma(H.placement)===_?H.overflows[0]>0:!0)))return{data:{index:Q,overflows:L},reset:{placement:oe}};let U=(V=L.filter(W=>W.overflows[0]<=0).sort((W,H)=>W.overflows[1]-H.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(b){case"bestFit":{var X;const W=(X=L.filter(H=>{if(N){const te=Ma(H.placement);return te===_||te==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(te=>te>0).reduce((te,se)=>te+se,0)]).sort((H,te)=>H[1]-te[1])[0])==null?void 0:X[0];W&&(U=W);break}case"initialPlacement":U=c;break}if(a!==U)return{reset:{placement:U}}}return{}}}};function DO(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function LO(t){return jX.some(e=>t[e]>=0)}const XX=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...a}=Ii(t,e);switch(n){case"referenceHidden":{const s=await rd(e,{...a,elementContext:"reference"}),l=DO(s,r.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:LO(l)}}}case"escaped":{const s=await rd(e,{...a,altBoundary:!0}),l=DO(s,r.floating);return{data:{escapedOffsets:l,escaped:LO(l)}}}default:return{}}}}},KB=new Set(["left","top"]);async function QX(t,e){const{placement:r,platform:n,elements:a}=t,s=await(n.isRTL==null?void 0:n.isRTL(a.floating)),l=Oi(r),c=Sc(r),d=Ma(r)==="y",f=KB.has(l)?-1:1,m=s&&d?-1:1,h=Ii(e,t);let{mainAxis:v,crossAxis:b,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof x=="number"&&(b=c==="end"?x*-1:x),d?{x:b*m,y:v*f}:{x:v*f,y:b*m}}const JX=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:a,y:s,placement:l,middlewareData:c}=e,d=await QX(e,t);return l===((r=c.offset)==null?void 0:r.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:a+d.x,y:s+d.y,data:{...d,placement:l}}}}},eQ=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:a}=e,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:R=>{let{x:w,y:_}=R;return{x:w,y:_}}},...d}=Ii(t,e),f={x:r,y:n},m=await rd(e,d),h=Ma(Oi(a)),v=ER(h);let b=f[v],x=f[h];if(s){const R=v==="y"?"top":"left",w=v==="y"?"bottom":"right",_=b+m[R],A=b-m[w];b=Y_(_,b,A)}if(l){const R=h==="y"?"top":"left",w=h==="y"?"bottom":"right",_=x+m[R],A=x-m[w];x=Y_(_,x,A)}const S=c.fn({...e,[v]:b,[h]:x});return{...S,data:{x:S.x-r,y:S.y-n,enabled:{[v]:s,[h]:l}}}}}},tQ=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:a,rects:s,middlewareData:l}=e,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Ii(t,e),m={x:r,y:n},h=Ma(a),v=ER(h);let b=m[v],x=m[h];const S=Ii(c,e),R=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const A=v==="y"?"height":"width",C=s.reference[v]-s.floating[A]+R.mainAxis,k=s.reference[v]+s.reference[A]-R.mainAxis;b<C?b=C:b>k&&(b=k)}if(f){var w,_;const A=v==="y"?"width":"height",C=KB.has(Oi(a)),k=s.reference[h]-s.floating[A]+(C&&((w=l.offset)==null?void 0:w[h])||0)+(C?0:R.crossAxis),N=s.reference[h]+s.reference[A]+(C?0:((_=l.offset)==null?void 0:_[h])||0)-(C?R.crossAxis:0);x<k?x=k:x>N&&(x=N)}return{[v]:b,[h]:x}}}},rQ=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:a,rects:s,platform:l,elements:c}=e,{apply:d=()=>{},...f}=Ii(t,e),m=await rd(e,f),h=Oi(a),v=Sc(a),b=Ma(a)==="y",{width:x,height:S}=s.floating;let R,w;h==="top"||h==="bottom"?(R=h,w=v===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(w=h,R=v==="end"?"top":"bottom");const _=S-m.top-m.bottom,A=x-m.left-m.right,C=To(S-m[R],_),k=To(x-m[w],A),N=!e.middlewareData.shift;let I=C,O=k;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(O=A),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(I=_),N&&!v){const L=Un(m.left,0),P=Un(m.right,0),V=Un(m.top,0),X=Un(m.bottom,0);b?O=x-2*(L!==0||P!==0?L+P:Un(m.left,m.right)):I=S-2*(V!==0||X!==0?V+X:Un(m.top,m.bottom))}await d({...e,availableWidth:O,availableHeight:I});const M=await l.getDimensions(c.floating);return x!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function Hm(){return typeof window<"u"}function wc(t){return ZB(t)?(t.nodeName||"").toLowerCase():"#document"}function Fn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Xa(t){var e;return(e=(ZB(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function ZB(t){return Hm()?t instanceof Node||t instanceof Fn(t).Node:!1}function Sa(t){return Hm()?t instanceof Element||t instanceof Fn(t).Element:!1}function Wa(t){return Hm()?t instanceof HTMLElement||t instanceof Fn(t).HTMLElement:!1}function MO(t){return!Hm()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Fn(t).ShadowRoot}const nQ=new Set(["inline","contents"]);function Ad(t){const{overflow:e,overflowX:r,overflowY:n,display:a}=wa(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!nQ.has(a)}const aQ=new Set(["table","td","th"]);function iQ(t){return aQ.has(wc(t))}const oQ=[":popover-open",":modal"];function Vm(t){return oQ.some(e=>{try{return t.matches(e)}catch{return!1}})}const sQ=["transform","translate","scale","rotate","perspective"],lQ=["transform","translate","scale","rotate","perspective","filter"],cQ=["paint","layout","strict","content"];function xR(t){const e=_R(),r=Sa(t)?wa(t):t;return sQ.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||lQ.some(n=>(r.willChange||"").includes(n))||cQ.some(n=>(r.contain||"").includes(n))}function uQ(t){let e=Ro(t);for(;Wa(e)&&!ic(e);){if(xR(e))return e;if(Vm(e))return null;e=Ro(e)}return null}function _R(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const dQ=new Set(["html","body","#document"]);function ic(t){return dQ.has(wc(t))}function wa(t){return Fn(t).getComputedStyle(t)}function Gm(t){return Sa(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ro(t){if(wc(t)==="html")return t;const e=t.assignedSlot||t.parentNode||MO(t)&&t.host||Xa(t);return MO(e)?e.host:e}function XB(t){const e=Ro(t);return ic(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wa(e)&&Ad(e)?e:XB(e)}function nd(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const a=XB(t),s=a===((n=t.ownerDocument)==null?void 0:n.body),l=Fn(a);if(s){const c=Z_(l);return e.concat(l,l.visualViewport||[],Ad(a)?a:[],c&&r?nd(c):[])}return e.concat(a,nd(a,[],r))}function Z_(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function QB(t){const e=wa(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const a=Wa(t),s=a?t.offsetWidth:r,l=a?t.offsetHeight:n,c=hm(r)!==s||hm(n)!==l;return c&&(r=s,n=l),{width:r,height:n,$:c}}function TR(t){return Sa(t)?t:t.contextElement}function Fl(t){const e=TR(t);if(!Wa(e))return Fa(1);const r=e.getBoundingClientRect(),{width:n,height:a,$:s}=QB(e);let l=(s?hm(r.width):r.width)/n,c=(s?hm(r.height):r.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const fQ=Fa(0);function JB(t){const e=Fn(t);return!_R()||!e.visualViewport?fQ:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pQ(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Fn(t)?!1:e}function xs(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const a=t.getBoundingClientRect(),s=TR(t);let l=Fa(1);e&&(n?Sa(n)&&(l=Fl(n)):l=Fl(t));const c=pQ(s,r,n)?JB(s):Fa(0);let d=(a.left+c.x)/l.x,f=(a.top+c.y)/l.y,m=a.width/l.x,h=a.height/l.y;if(s){const v=Fn(s),b=n&&Sa(n)?Fn(n):n;let x=v,S=Z_(x);for(;S&&n&&b!==x;){const R=Fl(S),w=S.getBoundingClientRect(),_=wa(S),A=w.left+(S.clientLeft+parseFloat(_.paddingLeft))*R.x,C=w.top+(S.clientTop+parseFloat(_.paddingTop))*R.y;d*=R.x,f*=R.y,m*=R.x,h*=R.y,d+=A,f+=C,x=Fn(S),S=Z_(x)}}return vm({width:m,height:h,x:d,y:f})}function Wm(t,e){const r=Gm(t).scrollLeft;return e?e.left+r:xs(Xa(t)).left+r}function e2(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Wm(t,r),a=r.top+e.scrollTop;return{x:n,y:a}}function mQ(t){let{elements:e,rect:r,offsetParent:n,strategy:a}=t;const s=a==="fixed",l=Xa(n),c=e?Vm(e.floating):!1;if(n===l||c&&s)return r;let d={scrollLeft:0,scrollTop:0},f=Fa(1);const m=Fa(0),h=Wa(n);if((h||!h&&!s)&&((wc(n)!=="body"||Ad(l))&&(d=Gm(n)),Wa(n))){const b=xs(n);f=Fl(n),m.x=b.x+n.clientLeft,m.y=b.y+n.clientTop}const v=l&&!h&&!s?e2(l,d):Fa(0);return{width:r.width*f.x,height:r.height*f.y,x:r.x*f.x-d.scrollLeft*f.x+m.x+v.x,y:r.y*f.y-d.scrollTop*f.y+m.y+v.y}}function hQ(t){return Array.from(t.getClientRects())}function gQ(t){const e=Xa(t),r=Gm(t),n=t.ownerDocument.body,a=Un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let l=-r.scrollLeft+Wm(t);const c=-r.scrollTop;return wa(n).direction==="rtl"&&(l+=Un(e.clientWidth,n.clientWidth)-a),{width:a,height:s,x:l,y:c}}const PO=25;function vQ(t,e){const r=Fn(t),n=Xa(t),a=r.visualViewport;let s=n.clientWidth,l=n.clientHeight,c=0,d=0;if(a){s=a.width,l=a.height;const m=_R();(!m||m&&e==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}const f=Wm(n);if(f<=0){const m=n.ownerDocument,h=m.body,v=getComputedStyle(h),b=m.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(n.clientWidth-h.clientWidth-b);x<=PO&&(s-=x)}else f<=PO&&(s+=f);return{width:s,height:l,x:c,y:d}}const bQ=new Set(["absolute","fixed"]);function yQ(t,e){const r=xs(t,!0,e==="fixed"),n=r.top+t.clientTop,a=r.left+t.clientLeft,s=Wa(t)?Fl(t):Fa(1),l=t.clientWidth*s.x,c=t.clientHeight*s.y,d=a*s.x,f=n*s.y;return{width:l,height:c,x:d,y:f}}function jO(t,e,r){let n;if(e==="viewport")n=vQ(t,r);else if(e==="document")n=gQ(Xa(t));else if(Sa(e))n=yQ(e,r);else{const a=JB(t);n={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return vm(n)}function t2(t,e){const r=Ro(t);return r===e||!Sa(r)||ic(r)?!1:wa(r).position==="fixed"||t2(r,e)}function EQ(t,e){const r=e.get(t);if(r)return r;let n=nd(t,[],!1).filter(c=>Sa(c)&&wc(c)!=="body"),a=null;const s=wa(t).position==="fixed";let l=s?Ro(t):t;for(;Sa(l)&&!ic(l);){const c=wa(l),d=xR(l);!d&&c.position==="fixed"&&(a=null),(s?!d&&!a:!d&&c.position==="static"&&!!a&&bQ.has(a.position)||Ad(l)&&!d&&t2(t,l))?n=n.filter(m=>m!==l):a=c,l=Ro(l)}return e.set(t,n),n}function SQ(t){let{element:e,boundary:r,rootBoundary:n,strategy:a}=t;const l=[...r==="clippingAncestors"?Vm(e)?[]:EQ(e,this._c):[].concat(r),n],c=l[0],d=l.reduce((f,m)=>{const h=jO(e,m,a);return f.top=Un(h.top,f.top),f.right=To(h.right,f.right),f.bottom=To(h.bottom,f.bottom),f.left=Un(h.left,f.left),f},jO(e,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function wQ(t){const{width:e,height:r}=QB(t);return{width:e,height:r}}function xQ(t,e,r){const n=Wa(e),a=Xa(e),s=r==="fixed",l=xs(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const d=Fa(0);function f(){d.x=Wm(a)}if(n||!n&&!s)if((wc(e)!=="body"||Ad(a))&&(c=Gm(e)),n){const b=xs(e,!0,s,e);d.x=b.x+e.clientLeft,d.y=b.y+e.clientTop}else a&&f();s&&!n&&a&&f();const m=a&&!n&&!s?e2(a,c):Fa(0),h=l.left+c.scrollLeft-d.x-m.x,v=l.top+c.scrollTop-d.y-m.y;return{x:h,y:v,width:l.width,height:l.height}}function Fb(t){return wa(t).position==="static"}function UO(t,e){if(!Wa(t)||wa(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Xa(t)===r&&(r=r.ownerDocument.body),r}function r2(t,e){const r=Fn(t);if(Vm(t))return r;if(!Wa(t)){let a=Ro(t);for(;a&&!ic(a);){if(Sa(a)&&!Fb(a))return a;a=Ro(a)}return r}let n=UO(t,e);for(;n&&iQ(n)&&Fb(n);)n=UO(n,e);return n&&ic(n)&&Fb(n)&&!xR(n)?r:n||uQ(t)||r}const _Q=async function(t){const e=this.getOffsetParent||r2,r=this.getDimensions,n=await r(t.floating);return{reference:xQ(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function TQ(t){return wa(t).direction==="rtl"}const RQ={convertOffsetParentRelativeRectToViewportRelativeRect:mQ,getDocumentElement:Xa,getClippingRect:SQ,getOffsetParent:r2,getElementRects:_Q,getClientRects:hQ,getDimensions:wQ,getScale:Fl,isElement:Sa,isRTL:TQ};function n2(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function AQ(t,e){let r=null,n;const a=Xa(t);function s(){var c;clearTimeout(n),(c=r)==null||c.disconnect(),r=null}function l(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),s();const f=t.getBoundingClientRect(),{left:m,top:h,width:v,height:b}=f;if(c||e(),!v||!b)return;const x=sp(h),S=sp(a.clientWidth-(m+v)),R=sp(a.clientHeight-(h+b)),w=sp(m),A={rootMargin:-x+"px "+-S+"px "+-R+"px "+-w+"px",threshold:Un(0,To(1,d))||1};let C=!0;function k(N){const I=N[0].intersectionRatio;if(I!==d){if(!C)return l();I?l(!1,I):n=setTimeout(()=>{l(!1,1e-7)},1e3)}I===1&&!n2(f,t.getBoundingClientRect())&&l(),C=!1}try{r=new IntersectionObserver(k,{...A,root:a.ownerDocument})}catch{r=new IntersectionObserver(k,A)}r.observe(t)}return l(!0),s}function CQ(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,f=TR(t),m=a||s?[...f?nd(f):[],...nd(e)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",r,{passive:!0}),s&&w.addEventListener("resize",r)});const h=f&&c?AQ(f,r):null;let v=-1,b=null;l&&(b=new ResizeObserver(w=>{let[_]=w;_&&_.target===f&&b&&(b.unobserve(e),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var A;(A=b)==null||A.observe(e)})),r()}),f&&!d&&b.observe(f),b.observe(e));let x,S=d?xs(t):null;d&&R();function R(){const w=xs(t);S&&!n2(S,w)&&r(),S=w,x=requestAnimationFrame(R)}return r(),()=>{var w;m.forEach(_=>{a&&_.removeEventListener("scroll",r),s&&_.removeEventListener("resize",r)}),h?.(),(w=b)==null||w.disconnect(),b=null,d&&cancelAnimationFrame(x)}}const NQ=JX,kQ=eQ,IQ=ZX,OQ=rQ,DQ=XX,FO=KX,LQ=tQ,MQ=(t,e,r)=>{const n=new Map,a={platform:RQ,...r},s={...a.platform,_c:n};return YX(t,e,{...a,platform:s})};var PQ=typeof document<"u",jQ=function(){},Np=PQ?y.useLayoutEffect:jQ;function bm(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,a;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!bm(t[n],e[n]))return!1;return!0}if(a=Object.keys(t),r=a.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){const s=a[n];if(!(s==="_owner"&&t.$$typeof)&&!bm(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function a2(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zO(t,e){const r=a2(t);return Math.round(e*r)/r}function zb(t){const e=y.useRef(t);return Np(()=>{e.current=t}),e}function UQ(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:d,open:f}=t,[m,h]=y.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[v,b]=y.useState(n);bm(v,n)||b(n);const[x,S]=y.useState(null),[R,w]=y.useState(null),_=y.useCallback(H=>{H!==N.current&&(N.current=H,S(H))},[]),A=y.useCallback(H=>{H!==I.current&&(I.current=H,w(H))},[]),C=s||x,k=l||R,N=y.useRef(null),I=y.useRef(null),O=y.useRef(m),M=d!=null,L=zb(d),P=zb(a),V=zb(f),X=y.useCallback(()=>{if(!N.current||!I.current)return;const H={placement:e,strategy:r,middleware:v};P.current&&(H.platform=P.current),MQ(N.current,I.current,H).then(te=>{const se={...te,isPositioned:V.current!==!1};Q.current&&!bm(O.current,se)&&(O.current=se,vc.flushSync(()=>{h(se)}))})},[v,e,r,P,V]);Np(()=>{f===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,h(H=>({...H,isPositioned:!1})))},[f]);const Q=y.useRef(!1);Np(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Np(()=>{if(C&&(N.current=C),k&&(I.current=k),C&&k){if(L.current)return L.current(C,k,X);X()}},[C,k,X,L,M]);const oe=y.useMemo(()=>({reference:N,floating:I,setReference:_,setFloating:A}),[_,A]),U=y.useMemo(()=>({reference:C,floating:k}),[C,k]),W=y.useMemo(()=>{const H={position:r,left:0,top:0};if(!U.floating)return H;const te=zO(U.floating,m.x),se=zO(U.floating,m.y);return c?{...H,transform:"translate("+te+"px, "+se+"px)",...a2(U.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:te,top:se}},[r,c,U.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:X,refs:oe,elements:U,floatingStyles:W}),[m,X,oe,U,W])}const FQ=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:a}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?FO({element:n.current,padding:a}).fn(r):{}:n?FO({element:n,padding:a}).fn(r):{}}}},zQ=(t,e)=>({...NQ(t),options:[t,e]}),$Q=(t,e)=>({...kQ(t),options:[t,e]}),BQ=(t,e)=>({...LQ(t),options:[t,e]}),qQ=(t,e)=>({...IQ(t),options:[t,e]}),HQ=(t,e)=>({...OQ(t),options:[t,e]}),VQ=(t,e)=>({...DQ(t),options:[t,e]}),GQ=(t,e)=>({...FQ(t),options:[t,e]});var WQ="Arrow",i2=y.forwardRef((t,e)=>{const{children:r,width:n=10,height:a=5,...s}=t;return g.jsx(vt.svg,{...s,ref:e,width:n,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});i2.displayName=WQ;var YQ=i2,RR="Popper",[o2,ko]=Za(RR),[KQ,s2]=o2(RR),l2=t=>{const{__scopePopper:e,children:r}=t,[n,a]=y.useState(null);return g.jsx(KQ,{scope:e,anchor:n,onAnchorChange:a,children:r})};l2.displayName=RR;var c2="PopperAnchor",u2=y.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...a}=t,s=s2(c2,r),l=y.useRef(null),c=Nt(e,l),d=y.useRef(null);return y.useEffect(()=>{const f=d.current;d.current=n?.current||l.current,f!==d.current&&s.onAnchorChange(d.current)}),n?null:g.jsx(vt.div,{...a,ref:c})});u2.displayName=c2;var AR="PopperContent",[ZQ,XQ]=o2(AR),d2=y.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:h="partial",hideWhenDetached:v=!1,updatePositionStrategy:b="optimized",onPlaced:x,...S}=t,R=s2(AR,r),[w,_]=y.useState(null),A=Nt(e,j=>_(j)),[C,k]=y.useState(null),N=jB(C),I=N?.width??0,O=N?.height??0,M=n+(s!=="center"?"-"+s:""),L=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},P=Array.isArray(f)?f:[f],V=P.length>0,X={padding:L,boundary:P.filter(JQ),altBoundary:V},{refs:Q,floatingStyles:oe,placement:U,isPositioned:W,middlewareData:H}=UQ({strategy:"fixed",placement:M,whileElementsMounted:(...j)=>CQ(...j,{animationFrame:b==="always"}),elements:{reference:R.anchor},middleware:[zQ({mainAxis:a+O,alignmentAxis:l}),d&&$Q({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?BQ():void 0,...X}),d&&qQ({...X}),HQ({...X,apply:({elements:j,rects:Z,availableWidth:ne,availableHeight:G})=>{const{width:ce,height:he}=Z.reference,_e=j.floating.style;_e.setProperty("--radix-popper-available-width",`${ne}px`),_e.setProperty("--radix-popper-available-height",`${G}px`),_e.setProperty("--radix-popper-anchor-width",`${ce}px`),_e.setProperty("--radix-popper-anchor-height",`${he}px`)}}),C&&GQ({element:C,padding:c}),eJ({arrowWidth:I,arrowHeight:O}),v&&VQ({strategy:"referenceHidden",...X})]}),[te,se]=m2(U),B=Ga(x);nn(()=>{W&&B?.()},[W,B]);const q=H.arrow?.x,$=H.arrow?.y,K=H.arrow?.centerOffset!==0,[J,z]=y.useState();return nn(()=>{w&&z(window.getComputedStyle(w).zIndex)},[w]),g.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...oe,transform:W?oe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(ZQ,{scope:r,placedSide:te,onArrowChange:k,arrowX:q,arrowY:$,shouldHideArrow:K,children:g.jsx(vt.div,{"data-side":te,"data-align":se,...S,ref:A,style:{...S.style,animation:W?void 0:"none"}})})})});d2.displayName=AR;var f2="PopperArrow",QQ={top:"bottom",right:"left",bottom:"top",left:"right"},p2=y.forwardRef(function(e,r){const{__scopePopper:n,...a}=e,s=XQ(f2,n),l=QQ[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(YQ,{...a,ref:r,style:{...a.style,display:"block"}})})});p2.displayName=f2;function JQ(t){return t!==null}var eJ=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:a}=e,l=a.arrow?.centerOffset!==0,c=l?0:t.arrowWidth,d=l?0:t.arrowHeight,[f,m]=m2(r),h={start:"0%",center:"50%",end:"100%"}[m],v=(a.arrow?.x??0)+c/2,b=(a.arrow?.y??0)+d/2;let x="",S="";return f==="bottom"?(x=l?h:`${v}px`,S=`${-d}px`):f==="top"?(x=l?h:`${v}px`,S=`${n.floating.height+d}px`):f==="right"?(x=`${-d}px`,S=l?h:`${b}px`):f==="left"&&(x=`${n.floating.width+d}px`,S=l?h:`${b}px`),{data:{x,y:S}}}});function m2(t){const[e,r="center"]=t.split("-");return[e,r]}var Ym=l2,Cd=u2,Km=d2,Zm=p2,tJ="Portal",xc=y.forwardRef((t,e)=>{const{container:r,...n}=t,[a,s]=y.useState(!1);nn(()=>s(!0),[]);const l=r||a&&globalThis?.document?.body;return l?lB.createPortal(g.jsx(vt.div,{...n,ref:e}),l):null});xc.displayName=tJ;function rJ(t,e){return y.useReducer((r,n)=>e[r][n]??r,t)}var ca=t=>{const{present:e,children:r}=t,n=nJ(e),a=typeof r=="function"?r({present:n.isPresent}):y.Children.only(r),s=Nt(n.ref,aJ(a));return typeof r=="function"||n.isPresent?y.cloneElement(a,{ref:s}):null};ca.displayName="Presence";function nJ(t){const[e,r]=y.useState(),n=y.useRef(null),a=y.useRef(t),s=y.useRef("none"),l=t?"mounted":"unmounted",[c,d]=rJ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=lp(n.current);s.current=c==="mounted"?f:"none"},[c]),nn(()=>{const f=n.current,m=a.current;if(m!==t){const v=s.current,b=lp(f);t?d("MOUNT"):b==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&v!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,d]),nn(()=>{if(e){let f;const m=e.ownerDocument.defaultView??window,h=b=>{const S=lp(n.current).includes(CSS.escape(b.animationName));if(b.target===e&&S&&(d("ANIMATION_END"),!a.current)){const R=e.style.animationFillMode;e.style.animationFillMode="forwards",f=m.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=R)})}},v=b=>{b.target===e&&(s.current=lp(n.current))};return e.addEventListener("animationstart",v),e.addEventListener("animationcancel",h),e.addEventListener("animationend",h),()=>{m.clearTimeout(f),e.removeEventListener("animationstart",v),e.removeEventListener("animationcancel",h),e.removeEventListener("animationend",h)}}else d("ANIMATION_END")},[e,d]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(f=>{n.current=f?getComputedStyle(f):null,r(f)},[])}}function lp(t){return t?.animationName||"none"}function aJ(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var h2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),iJ="VisuallyHidden",g2=y.forwardRef((t,e)=>g.jsx(vt.span,{...t,ref:e,style:{...h2,...t.style}}));g2.displayName=iJ;var oJ=g2,[Xm]=Za("Tooltip",[ko]),Qm=ko(),v2="TooltipProvider",sJ=700,X_="tooltip.open",[lJ,CR]=Xm(v2),b2=t=>{const{__scopeTooltip:e,delayDuration:r=sJ,skipDelayDuration:n=300,disableHoverableContent:a=!1,children:s}=t,l=y.useRef(!0),c=y.useRef(!1),d=y.useRef(0);return y.useEffect(()=>{const f=d.current;return()=>window.clearTimeout(f)},[]),g.jsx(lJ,{scope:e,isOpenDelayedRef:l,delayDuration:r,onOpen:y.useCallback(()=>{window.clearTimeout(d.current),l.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(f=>{c.current=f},[]),disableHoverableContent:a,children:s})};b2.displayName=v2;var ad="Tooltip",[cJ,Nd]=Xm(ad),y2=t=>{const{__scopeTooltip:e,children:r,open:n,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,d=CR(ad,t.__scopeTooltip),f=Qm(e),[m,h]=y.useState(null),v=Yr(),b=y.useRef(0),x=l??d.disableHoverableContent,S=c??d.delayDuration,R=y.useRef(!1),[w,_]=_o({prop:n,defaultProp:a??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(X_))):d.onClose(),s?.(I)},caller:ad}),A=y.useMemo(()=>w?R.current?"delayed-open":"instant-open":"closed",[w]),C=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,R.current=!1,_(!0)},[_]),k=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,_(!1)},[_]),N=y.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{R.current=!0,_(!0),b.current=0},S)},[S,_]);return y.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),g.jsx(Ym,{...f,children:g.jsx(cJ,{scope:e,contentId:v,open:w,stateAttribute:A,trigger:m,onTriggerChange:h,onTriggerEnter:y.useCallback(()=>{d.isOpenDelayedRef.current?N():C()},[d.isOpenDelayedRef,N,C]),onTriggerLeave:y.useCallback(()=>{x?k():(window.clearTimeout(b.current),b.current=0)},[k,x]),onOpen:C,onClose:k,disableHoverableContent:x,children:r})})};y2.displayName=ad;var Q_="TooltipTrigger",E2=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Nd(Q_,r),s=CR(Q_,r),l=Qm(r),c=y.useRef(null),d=Nt(e,c,a.onTriggerChange),f=y.useRef(!1),m=y.useRef(!1),h=y.useCallback(()=>f.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(Cd,{asChild:!0,...l,children:g.jsx(vt.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...n,ref:d,onPointerMove:ze(t.onPointerMove,v=>{v.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:ze(t.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:ze(t.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ze(t.onFocus,()=>{f.current||a.onOpen()}),onBlur:ze(t.onBlur,a.onClose),onClick:ze(t.onClick,a.onClose)})})});E2.displayName=Q_;var NR="TooltipPortal",[uJ,dJ]=Xm(NR,{forceMount:void 0}),S2=t=>{const{__scopeTooltip:e,forceMount:r,children:n,container:a}=t,s=Nd(NR,e);return g.jsx(uJ,{scope:e,forceMount:r,children:g.jsx(ca,{present:r||s.open,children:g.jsx(xc,{asChild:!0,container:a,children:n})})})};S2.displayName=NR;var oc="TooltipContent",w2=y.forwardRef((t,e)=>{const r=dJ(oc,t.__scopeTooltip),{forceMount:n=r.forceMount,side:a="top",...s}=t,l=Nd(oc,t.__scopeTooltip);return g.jsx(ca,{present:n||l.open,children:l.disableHoverableContent?g.jsx(x2,{side:a,...s,ref:e}):g.jsx(fJ,{side:a,...s,ref:e})})}),fJ=y.forwardRef((t,e)=>{const r=Nd(oc,t.__scopeTooltip),n=CR(oc,t.__scopeTooltip),a=y.useRef(null),s=Nt(e,a),[l,c]=y.useState(null),{trigger:d,onClose:f}=r,m=a.current,{onPointerInTransitChange:h}=n,v=y.useCallback(()=>{c(null),h(!1)},[h]),b=y.useCallback((x,S)=>{const R=x.currentTarget,w={x:x.clientX,y:x.clientY},_=gJ(w,R.getBoundingClientRect()),A=vJ(w,_),C=bJ(S.getBoundingClientRect()),k=EJ([...A,...C]);c(k),h(!0)},[h]);return y.useEffect(()=>()=>v(),[v]),y.useEffect(()=>{if(d&&m){const x=R=>b(R,m),S=R=>b(R,d);return d.addEventListener("pointerleave",x),m.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",x),m.removeEventListener("pointerleave",S)}}},[d,m,b,v]),y.useEffect(()=>{if(l){const x=S=>{const R=S.target,w={x:S.clientX,y:S.clientY},_=d?.contains(R)||m?.contains(R),A=!yJ(w,l);_?v():A&&(v(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[d,m,l,f,v]),g.jsx(x2,{...t,ref:s})}),[pJ,mJ]=Xm(ad,{isInside:!1}),hJ=vX("TooltipContent"),x2=y.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:l,...c}=t,d=Nd(oc,r),f=Qm(r),{onClose:m}=d;return y.useEffect(()=>(document.addEventListener(X_,m),()=>document.removeEventListener(X_,m)),[m]),y.useEffect(()=>{if(d.trigger){const h=v=>{v.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[d.trigger,m]),g.jsx(Ec,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:g.jsxs(Km,{"data-state":d.stateAttribute,...f,...c,ref:e,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(hJ,{children:n}),g.jsx(pJ,{scope:r,isInside:!0,children:g.jsx(oJ,{id:d.contentId,role:"tooltip",children:a||n})})]})})});w2.displayName=oc;var _2="TooltipArrow",T2=y.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,a=Qm(r);return mJ(_2,r).isInside?null:g.jsx(Zm,{...a,...n,ref:e})});T2.displayName=_2;function gJ(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),a=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(r,n,a,s)){case s:return"left";case a:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function vJ(t,e,r=5){const n=[];switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function bJ(t){const{top:e,right:r,bottom:n,left:a}=t;return[{x:a,y:e},{x:r,y:e},{x:r,y:n},{x:a,y:n}]}function yJ(t,e){const{x:r,y:n}=t;let a=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const c=e[s],d=e[l],f=c.x,m=c.y,h=d.x,v=d.y;m>n!=v>n&&r<(h-f)*(n-m)/(v-m)+f&&(a=!a)}return a}function EJ(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),SJ(e)}function SJ(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const a=t[n];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))e.pop();else break}e.push(a)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const a=t[n];for(;r.length>=2;){const s=r[r.length-1],l=r[r.length-2];if((s.x-l.x)*(a.y-l.y)>=(s.y-l.y)*(a.x-l.x))r.pop();else break}r.push(a)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var wJ=b2,xJ=y2,_J=E2,TJ=S2,RJ=w2,AJ=T2;function R2({delayDuration:t=0,...e}){return g.jsx(wJ,{"data-slot":"tooltip-provider",delayDuration:t,...e})}function Jr({...t}){return g.jsx(R2,{children:g.jsx(xJ,{"data-slot":"tooltip",...t})})}function en({...t}){return g.jsx(_J,{"data-slot":"tooltip-trigger",...t})}function tn({className:t,sideOffset:e=0,children:r,...n}){return g.jsx(TJ,{children:g.jsxs(RJ,{"data-slot":"tooltip-content",sideOffset:e,className:Me("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...n,children:[r,g.jsx(AJ,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}class CJ{name="mcp_inspector_open";properties;constructor(e){this.properties={server_url:e.serverUrl,connection_count:e.connectionCount}}}class $O{name="mcp_tool_execution";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId,success:e.success,duration:e.duration,error:e.error}}}class BO{name="mcp_resource_read";properties;constructor(e){this.properties={resource_uri:e.resourceUri,server_id:e.serverId,success:e.success,error:e.error}}}class qO{name="mcp_prompt_call";properties;constructor(e){this.properties={prompt_name:e.promptName,server_id:e.serverId,success:e.success,error:e.error}}}class HO{name="mcp_chat_message";properties;constructor(e){this.properties={server_id:e.serverId,provider:e.provider,model:e.model,message_count:e.messageCount,tool_calls_count:e.toolCallsCount,success:e.success,execution_mode:e.executionMode,duration:e.duration,error:e.error}}}class NJ{name="mcp_server_added";properties;constructor(e){this.properties={server_id:e.serverId,server_url:e.serverUrl,connection_type:e.connectionType,via_proxy:e.viaProxy}}}class kJ{name="mcp_server_removed";properties;constructor(e){this.properties={server_id:e.serverId}}}class IJ{name="mcp_command_palette_open";properties;constructor(e){this.properties={trigger:e.trigger}}}class OJ{name="mcp_tool_saved";properties;constructor(e){this.properties={tool_name:e.toolName,server_id:e.serverId}}}function $b(){try{return"0.5.2"}catch{return"0.0.0"}}var DJ={};function Bb(){try{return typeof window<"u"&&typeof document<"u"}catch{return!1}}class VO{endpoint;timeout;constructor(e,r=3e3){this.endpoint=e,this.timeout=r}async logEvent(e){try{const r=new AbortController,n=setTimeout(()=>r.abort(),this.timeout),a=await fetch(this.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),signal:r.signal});if(clearTimeout(n),!a.ok)throw new Error(`HTTP error! status: ${a.status}`)}catch{}}}function uo(t){return`mcp_inspector_telemetry_${t}`}class jr{static instance=null;POSTHOG_PROXY_URL="/inspector/api/tel/posthog";SCARF_PROXY_URL="/inspector/api/tel/scarf";UNKNOWN_USER_ID="UNKNOWN_USER_ID";_currUserId=null;_posthogClient=null;_scarfClient=null;_source="inspector";constructor(){const e=Bb(),r=this.isTelemetryDisabled();if(this._source=this.getStoredSource()||"inspector",r)this._posthogClient=null,this._scarfClient=null;else if(!e)this._posthogClient=null,this._scarfClient=null;else{try{this._posthogClient=new VO(this.POSTHOG_PROXY_URL,3e3)}catch{this._posthogClient=null}try{this._scarfClient=new VO(this.SCARF_PROXY_URL,3e3)}catch{this._scarfClient=null}}}isTelemetryDisabled(){return typeof localStorage<"u"&&localStorage.getItem(uo("disabled"))==="true"||typeof process<"u"&&DJ?.MCP_USE_ANONYMIZED_TELEMETRY==="false"}getStoredSource(){return typeof localStorage<"u"?localStorage.getItem(uo("source")):null}static getInstance(){return jr.instance||(jr.instance=new jr),jr.instance}setSource(e){this._source=e,typeof localStorage<"u"&&localStorage.setItem(uo("source"),e)}getSource(){return this._source}get userId(){if(this._currUserId)return this._currUserId;if(!Bb())return this._currUserId=this.UNKNOWN_USER_ID,this._currUserId;try{const e=localStorage.getItem(uo("user_id"));if(e)this._currUserId=e;else{const r=this.generateUserId();localStorage.setItem(uo("user_id"),r),this._currUserId=r}this.trackPackageDownload({triggered_by:"user_id_property"}).catch(()=>{})}catch{this._currUserId=this.UNKNOWN_USER_ID}return this._currUserId}generateUserId(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}async capture(e){if(!(!this._posthogClient&&!this._scarfClient)){if(this._posthogClient)try{const r={event:e.name,user_id:this.userId,properties:{...e.properties,mcp_use_version:$b(),language:"typescript",source:this._source,package:"inspector"}};await this._posthogClient.logEvent(r)}catch{}if(this._scarfClient)try{const r={};r.mcp_use_version=$b(),r.user_id=this.userId,r.event=e.name,r.language="typescript",r.source=this._source,r.package="inspector",await this._scarfClient.logEvent(r)}catch{}}}async trackPackageDownload(e){if(this._scarfClient&&Bb())try{const r=$b();let n=!1,a=!1;const s=localStorage.getItem(uo("download_version"));if(s?r>s&&(n=!0,a=!1,localStorage.setItem(uo("download_version"),r)):(n=!0,a=!0,localStorage.setItem(uo("download_version"),r)),n){const l={...e||{}};l.mcp_use_version=r,l.user_id=this.userId,l.event="package_download",l.first_download=a,l.language="typescript",l.source=this._source,l.package="inspector",await this._scarfClient.logEvent(l)}}catch{}}async trackInspectorOpen(e){const r=new CJ(e);await this.capture(r)}}const A2=y.createContext(void 0);function LJ({url:t,name:e,proxyConfig:r,transportType:n,onUpdate:a,onRemove:s}){const l=typeof window<"u"?new URL("/inspector/oauth/callback",window.location.origin).toString():"/inspector/oauth/callback";let c=t,d={};if(r?.proxyAddress){const v=new URL(r.proxyAddress),b=new URL(t);c=`${v.origin}${v.pathname}${b.pathname}${b.search}`,d["X-Target-URL"]=t}r?.customHeaders&&(d={...d,...r.customHeaders});const f=sR({url:c,callbackUrl:l,customHeaders:Object.keys(d).length>0?d:void 0,transportType:n||"http"}),m=y.useRef(a),h=y.useRef(null);return y.useEffect(()=>{m.current=a},[a]),y.useEffect(()=>{if(typeof queueMicrotask<"u")queueMicrotask(()=>{f.state==="ready"&&f.serverInfo&&console.log("[McpContext] Server info available:",f.serverInfo);const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},b=h.current;(!b||b.state!==v.state||b.error!==v.error||b.authUrl!==v.authUrl||b.name!==v.name||b.tools.length!==v.tools.length||b.resources.length!==v.resources.length||b.prompts.length!==v.prompts.length||b.serverInfo!==v.serverInfo||b.capabilities!==v.capabilities||!b.client)&&(h.current=v,m.current(v))});else{const v={id:t,url:t,name:f.serverInfo?.name||e,state:f.state,tools:f.tools,resources:f.resources,prompts:f.prompts,error:f.error??null,authUrl:f.authUrl??null,customHeaders:d,serverInfo:f.serverInfo,capabilities:f.capabilities,callTool:f.callTool,readResource:f.readResource,listPrompts:f.listPrompts,getPrompt:f.getPrompt,authenticate:f.authenticate,retry:f.retry,clearStorage:f.clearStorage,client:f.client},b=h.current;(!b||b.state!==v.state||b.error!==v.error||b.authUrl!==v.authUrl||b.name!==v.name||b.tools.length!==v.tools.length||b.resources.length!==v.resources.length||b.prompts.length!==v.prompts.length||b.serverInfo!==v.serverInfo||b.capabilities!==v.capabilities||!b.client)&&(h.current=v,m.current(v))}},[t,e,f.state,f.tools,f.resources,f.prompts,f.error,f.authUrl,f.serverInfo,f.capabilities,f.client]),null}function MJ({children:t}){const[e,r]=y.useState([]),[n,a]=y.useState(new Map),[s,l]=y.useState(0),[c,d]=y.useState(!0),[f,m]=y.useState(new Set);y.useEffect(()=>{const C=localStorage.getItem("mcp-inspector-connections");if(C)try{const N=JSON.parse(C),I=Array.isArray(N)?N.filter(M=>M&&typeof M=="object"&&typeof M.id=="string"&&typeof M.url=="string"&&typeof M.name=="string").map(M=>(M.transportType||(M.transportType="http"),M)):[];(I.length!==N.length||I.some(M=>M.transportType==="http"&&!N.find(L=>L.id===M.id&&L.transportType)))&&(console.warn("Updated connections in localStorage with transport type migration"),localStorage.setItem("mcp-inspector-connections",JSON.stringify(I))),r(I)}catch(N){console.error("Failed to parse saved connections:",N),localStorage.removeItem("mcp-inspector-connections")}const k=localStorage.getItem("mcp-inspector-auto-connect");k!==null&&d(k==="true")},[]);const h=y.useCallback(C=>{a(k=>new Map(k).set(C.id,C)),l(k=>k+1),C.serverInfo?.name&&C.state==="ready"&&r(k=>{const N=k.find(I=>I.id===C.id);if(N&&N.name!==C.serverInfo.name){const I=k.map(O=>O.id===C.id?{...O,name:C.serverInfo.name}:O);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(I)),I}return k})},[]),v=y.useCallback((C,k,N,I)=>{const M={id:C,url:C,name:k||C,proxyConfig:N,transportType:I||"http"};r(L=>{if(L.some(V=>V.id===C))return L;const P=[...L,M];return localStorage.setItem("mcp-inspector-connections",JSON.stringify(P)),P})},[]),b=y.useCallback(C=>{jr.getInstance().capture(new kJ({serverId:C})).catch(()=>{}),r(N=>{const I=N.filter(O=>O.id!==C);return localStorage.setItem("mcp-inspector-connections",JSON.stringify(I)),I}),a(N=>{const I=new Map(N),O=I.get(C);if(O){try{O.clearStorage()}catch(M){console.error("Failed to clear storage:",M)}I.delete(C)}return I})},[]),x=y.useCallback(C=>{const k=n.get(C);if(k)return k;const N=e.find(I=>I.id===C);if(N)return{id:N.id,url:N.url,name:N.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,listPrompts:async I=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}},[n,e]),S=y.useCallback(C=>{d(C),localStorage.setItem("mcp-inspector-auto-connect",String(C)),C||m(new Set)},[]),R=y.useCallback(C=>{m(k=>new Set(k).add(C))},[]),w=y.useCallback(C=>{m(k=>{const N=new Set(k);return N.delete(C),N}),a(k=>{const N=new Map(k),I=N.get(C);if(I){try{I.clearStorage()}catch(O){console.error("Failed to clear storage:",O)}N.delete(C)}return N})},[]),_=y.useMemo(()=>e.map(k=>{const N=n.get(k.id);return N||{id:k.id,url:k.url,name:k.name,state:"disconnected",tools:[],resources:[],prompts:[],error:null,authUrl:null,callTool:async()=>{throw new Error("Not connected")},readResource:async()=>{throw new Error("Not connected")},listPrompts:async I=>{throw new Error("Not connected")},getPrompt:async()=>{throw new Error("Not connected")},authenticate:()=>{},retry:()=>{},clearStorage:()=>{},client:null}}),[n,e,s]),A=y.useMemo(()=>({connections:_,addConnection:v,removeConnection:b,getConnection:x,autoConnect:c,setAutoConnect:S,connectServer:R,disconnectServer:w}),[_,v,b,x,c,S,R,w]);return g.jsxs(A2,{value:A,children:[e.filter(C=>c||f.has(C.id)).map(C=>g.jsx(LJ,{url:C.url,name:C.name,proxyConfig:C.proxyConfig,transportType:C.transportType,onUpdate:h,onRemove:()=>b(C.id)},C.id)),t]})}function kR(){const t=y.use(A2);if(!t)throw new Error("useMcpContext must be used within McpProvider");return t}var qb="focusScope.autoFocusOnMount",Hb="focusScope.autoFocusOnUnmount",GO={bubbles:!1,cancelable:!0},PJ="FocusScope",kd=y.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=t,[c,d]=y.useState(null),f=Ga(a),m=Ga(s),h=y.useRef(null),v=Nt(e,S=>d(S)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(n){let S=function(A){if(b.paused||!c)return;const C=A.target;c.contains(C)?h.current=C:po(h.current,{select:!0})},R=function(A){if(b.paused||!c)return;const C=A.relatedTarget;C!==null&&(c.contains(C)||po(h.current,{select:!0}))},w=function(A){if(document.activeElement===document.body)for(const k of A)k.removedNodes.length>0&&po(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",R);const _=new MutationObserver(w);return c&&_.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",R),_.disconnect()}}},[n,c,b.paused]),y.useEffect(()=>{if(c){YO.add(b);const S=document.activeElement;if(!c.contains(S)){const w=new CustomEvent(qb,GO);c.addEventListener(qb,f),c.dispatchEvent(w),w.defaultPrevented||(jJ(BJ(C2(c)),{select:!0}),document.activeElement===S&&po(c))}return()=>{c.removeEventListener(qb,f),setTimeout(()=>{const w=new CustomEvent(Hb,GO);c.addEventListener(Hb,m),c.dispatchEvent(w),w.defaultPrevented||po(S??document.body,{select:!0}),c.removeEventListener(Hb,m),YO.remove(b)},0)}}},[c,f,m,b]);const x=y.useCallback(S=>{if(!r&&!n||b.paused)return;const R=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(R&&w){const _=S.currentTarget,[A,C]=UJ(_);A&&C?!S.shiftKey&&w===C?(S.preventDefault(),r&&po(A,{select:!0})):S.shiftKey&&w===A&&(S.preventDefault(),r&&po(C,{select:!0})):w===_&&S.preventDefault()}},[r,n,b.paused]);return g.jsx(vt.div,{tabIndex:-1,...l,ref:v,onKeyDown:x})});kd.displayName=PJ;function jJ(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(po(n,{select:e}),document.activeElement!==r)return}function UJ(t){const e=C2(t),r=WO(e,t),n=WO(e.reverse(),t);return[r,n]}function C2(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const a=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||a?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function WO(t,e){for(const r of t)if(!FJ(r,{upTo:e}))return r}function FJ(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function zJ(t){return t instanceof HTMLInputElement&&"select"in t}function po(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&zJ(t)&&e&&t.select()}}var YO=$J();function $J(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=KO(t,e),t.unshift(e)},remove(e){t=KO(t,e),t[0]?.resume()}}}function KO(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function BJ(t){return t.filter(e=>e.tagName!=="A")}var Vb=0;function Jm(){y.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??ZO()),document.body.insertAdjacentElement("beforeend",t[1]??ZO()),Vb++,()=>{Vb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Vb--}},[])}function ZO(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var La=function(){return La=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},La.apply(this,arguments)};function N2(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(t);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function qJ(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,s;n<a;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))}var kp="right-scroll-bar-position",Ip="width-before-scroll-bar",HJ="with-scroll-bars-hidden",VJ="--removed-body-scroll-bar-size";function Gb(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function GJ(t,e){var r=y.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var a=r.value;a!==n&&(r.value=n,r.callback(n,a))}}}})[0];return r.callback=e,r.facade}var WJ=typeof window<"u"?y.useLayoutEffect:y.useEffect,XO=new WeakMap;function YJ(t,e){var r=GJ(null,function(n){return t.forEach(function(a){return Gb(a,n)})});return WJ(function(){var n=XO.get(r);if(n){var a=new Set(n),s=new Set(t),l=r.current;a.forEach(function(c){s.has(c)||Gb(c,null)}),s.forEach(function(c){a.has(c)||Gb(c,l)})}XO.set(r,t)},[t]),r}function KJ(t){return t}function ZJ(t,e){e===void 0&&(e=KJ);var r=[],n=!1,a={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(s){var l=e(s,n);return r.push(l),function(){r=r.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(n=!0;r.length;){var l=r;r=[],l.forEach(s)}r={push:function(c){return s(c)},filter:function(){return r}}},assignMedium:function(s){n=!0;var l=[];if(r.length){var c=r;r=[],c.forEach(s),l=r}var d=function(){var m=l;l=[],m.forEach(s)},f=function(){return Promise.resolve().then(d)};f(),r={push:function(m){l.push(m),f()},filter:function(m){return l=l.filter(m),r}}}};return a}function XJ(t){t===void 0&&(t={});var e=ZJ(null);return e.options=La({async:!0,ssr:!1},t),e}var k2=function(t){var e=t.sideCar,r=N2(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return y.createElement(n,La({},r))};k2.isSideCarExport=!0;function QJ(t,e){return t.useMedium(e),k2}var I2=XJ(),Wb=function(){},eh=y.forwardRef(function(t,e){var r=y.useRef(null),n=y.useState({onScrollCapture:Wb,onWheelCapture:Wb,onTouchMoveCapture:Wb}),a=n[0],s=n[1],l=t.forwardProps,c=t.children,d=t.className,f=t.removeScrollBar,m=t.enabled,h=t.shards,v=t.sideCar,b=t.noRelative,x=t.noIsolation,S=t.inert,R=t.allowPinchZoom,w=t.as,_=w===void 0?"div":w,A=t.gapMode,C=N2(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=v,N=YJ([r,e]),I=La(La({},C),a);return y.createElement(y.Fragment,null,m&&y.createElement(k,{sideCar:I2,removeScrollBar:f,shards:h,noRelative:b,noIsolation:x,inert:S,setCallbacks:s,allowPinchZoom:!!R,lockRef:r,gapMode:A}),l?y.cloneElement(y.Children.only(c),La(La({},I),{ref:N})):y.createElement(_,La({},I,{className:d,ref:N}),c))});eh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};eh.classNames={fullWidth:Ip,zeroRight:kp};var JJ=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eee(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=JJ();return e&&t.setAttribute("nonce",e),t}function tee(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function ree(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var nee=function(){var t=0,e=null;return{add:function(r){t==0&&(e=eee())&&(tee(e,r),ree(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},aee=function(){var t=nee();return function(e,r){y.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},O2=function(){var t=aee(),e=function(r){var n=r.styles,a=r.dynamic;return t(n,a),null};return e},iee={left:0,top:0,right:0,gap:0},Yb=function(t){return parseInt(t||"",10)||0},oee=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],a=e[t==="padding"?"paddingRight":"marginRight"];return[Yb(r),Yb(n),Yb(a)]},see=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return iee;var e=oee(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},lee=O2(),zl="data-scroll-locked",cee=function(t,e,r,n){var a=t.left,s=t.top,l=t.right,c=t.gap;return r===void 0&&(r="margin"),`
|
|
26
26
|
.`.concat(HJ,` {
|
|
27
27
|
overflow: hidden `).concat(n,`;
|
|
28
28
|
padding-right: `).concat(c,"px ").concat(n,`;
|
|
@@ -1421,7 +1421,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1421
1421
|
<\/script>
|
|
1422
1422
|
</body>
|
|
1423
1423
|
</html>`,nH=1,Iz=2,aH=3,Oz=4,iH=5,Dz=Symbol.for("quilt.threads.serialize"),Cge=Symbol.for("quilt.threads.transferable");class Nge extends AbortController{constructor(...e){super();const r=e.find(n=>n.aborted);if(r)this.abort(r.reason);else{const n=s=>this.abort(s.target.reason),a={signal:this.signal};for(const s of e)s.addEventListener("abort",n,a)}}}class Lz extends Error{constructor(){super("You attempted to call a function on a closed thread.")}}let kge="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function oH(t=21){let e="",r=crypto.getRandomValues(new Uint8Array(t));for(let n=0;n<t;n++)e+=kge[63&r[n]];return e}var Iu,Tl,Ou,Wp,LT,sH;class Ige{constructor(){ya(this,LT),ya(this,Iu,new Map),ya(this,Tl,new Map),ya(this,Ou,new Map),ya(this,Wp,new WeakMap)}get(e){return nr(this,Tl).get(e)}release(e){const r=nr(this,Tl).get(e);return r&&(nr(this,Tl).delete(e),nr(this,Iu).delete(r)),!!r}serialize(e){let r=nr(this,Iu).get(e);return r==null&&(r=oH(),nr(this,Iu).set(e,r),nr(this,Tl).set(r,e)),r}deserialize(e,r){var n,a;let s=(n=nr(this,Ou).get(e))==null?void 0:n.deref();return s||(s=(...l)=>{if(!nr(this,Ou).has(e))throw new Error("You attempted to call a function that was already revoked.");return r.call((c,d,f)=>{r.messages.send([aH,c,e,d],f)},l)},(a=Wr(this,LT,sH).call(this,r))==null||a.register(s,e),nr(this,Ou).set(e,new WeakRef(s)),s)}}Iu=new WeakMap,Tl=new WeakMap,Ou=new WeakMap,Wp=new WeakMap,LT=new WeakSet,sH=function(t){let e=nr(this,Wp).get(t);if(!(typeof FinalizationRegistry>"u"))return e||(e=new FinalizationRegistry(r=>{t.messages.send([iH,r])}),nr(this,Wp).set(t,e)),e};function Oge(t){return t!=null&&(Symbol.asyncIterator in t||Symbol.iterator in t)&&typeof t.next=="function"}function Mz(t){if(t==null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e==null||e===Object.prototype}const a_="_@f",Pz="_@i";var Gu,Wu,ta,Yp,ho;class Dge{constructor(e){ya(this,ta),ya(this,Gu),ya(this,Wu),OT(this,Gu,e?.serialize),OT(this,Wu,e?.deserialize)}serialize(e,r,n){return Wr(this,ta,Yp).call(this,e,r,n)}deserialize(e,r){return Wr(this,ta,ho).call(this,e,r)}}Gu=new WeakMap,Wu=new WeakMap,ta=new WeakSet,Yp=function(t,e,r,n=new Map,a=!1){if(t==null)return t;if(n.has(t))return n.get(t);if(n.set(t,void 0),typeof t=="object"){if(nr(this,Gu)&&!a){const c=nr(this,Gu).call(this,t,d=>Wr(this,ta,Yp).call(this,d,e,r,n,!0),e,r);if(c!==void 0)return n.set(t,c),c}if(t[Cge])return r?.push(t),n.set(t,t),t;const s=c=>Wr(this,ta,Yp).call(this,c,e,r,n);if(typeof t[Dz]=="function"){const c=t[Dz]({serialize:s});return n.set(t,c),c}if(Array.isArray(t)){const c=t.map(d=>s(d));return n.set(t,c),c}if(t instanceof Map){const c=[...t.entries()].map(([f,m])=>[s(f),s(m)]),d=new Map(c);return n.set(t,d),d}if(t instanceof Set){const c=[...t].map(f=>s(f)),d=new Set(c);return n.set(t,d),d}const l=Oge(t);if(Mz(t)||l){const c={};for(const d of Object.keys(t))c[d]=s(t[d]);return l&&(c.next??(c.next=s(t.next.bind(t))),c.return??(c.return=s(t.return.bind(t))),c.throw??(c.throw=s(t.throw.bind(t))),c[Pz]=!0),n.set(t,c),c}}if(typeof t=="function"){const s=e.functions.serialize(t,e,r),l={[a_]:s};return n.set(t,l),l}return n.set(t,t),t},ho=function(t,e,r=!1){if(t==null)return t;if(typeof t=="object"){if(nr(this,Wu)&&!r){const a=nr(this,Wu).call(this,t,s=>Wr(this,ta,ho).call(this,s,e,!0),e);if(a!==void 0)return a}if(t==null)return t;if(Array.isArray(t))return t.map(a=>Wr(this,ta,ho).call(this,a,e));if(t instanceof Map)return new Map([...t].map(([a,s])=>[Wr(this,ta,ho).call(this,a,e),Wr(this,ta,ho).call(this,s,e)]));if(t instanceof Set)return new Set([...t].map(a=>Wr(this,ta,ho).call(this,a,e)));if(a_ in t)return e.functions.deserialize(t[a_],e);if(!Mz(t))return t;const n={};for(const a of Object.keys(t))a===Pz?n[Symbol.asyncIterator]=()=>n:n[a]=Wr(this,ta,ho).call(this,t[a],e);return n}return t};var Rl,fs,go,MT,lH,PT,cH;class Lge{constructor(e,{imports:r,exports:n,functions:a=new Ige,serialization:s=new Dge,signal:l}={}){ya(this,go),ya(this,Rl),ya(this,fs,new Map);var c,d,f,m;this.messages=e,OT(this,Rl,l?new Nge(l):new AbortController),this.exports=n??{},this.imports=Mge(Wr(this,go,lH).bind(this),r),this.functions=a,this.serialization=s,(d=(c=this.functions).start)==null||d.call(c,this),(m=(f=this.serialization).start)==null||m.call(f,this),this.signal.addEventListener("abort",()=>{for(const h of nr(this,fs).keys())Wr(this,go,PT).call(this,h,void 0,new Lz);nr(this,fs).clear()},{once:!0}),e.listen(async h=>{if(!(Array.isArray(h)&&typeof h[0]=="number"))return;const v=h;switch(v[0]){case nH:{const[,b,x,S]=v,R=this.exports[x]??(()=>{throw new Error(`No '${x}' method is exported from this thread`)});await Wr(this,go,MT).call(this,R,S,(w,_,A)=>{this.messages.send([Iz,b,w,_],A)});break}case aH:{const[,b,x,S]=v,R=this.functions.get(x,this)??Pge;await Wr(this,go,MT).call(this,R,S,(w,_,A)=>{this.messages.send([Oz,b,w,_],A)});break}case Iz:case Oz:{Wr(this,go,PT).call(this,...v.slice(1));break}case iH:{const b=v[1];this.functions.release(b,this);break}}},{signal:this.signal})}get signal(){return nr(this,Rl).signal}get closed(){return nr(this,Rl).signal.aborted}close(){nr(this,Rl).abort()}call(e,r){if(this.closed)return Promise.reject(new Lz);const n=[],a=this.serialization.serialize(r,this,n),s=oH(),l=Wr(this,go,cH).call(this,s);return e(s,a,n),l}}Rl=new WeakMap,fs=new WeakMap,go=new WeakSet,MT=async function(t,e,r){try{const n=this.functions.call?await this.functions.call(t,e,this):await t(...this.serialization.deserialize(e,this)),a=[],s=this.serialization.serialize(n,this,a);r(s,void 0,a)}catch(n){r(void 0,this.serialization.serialize(n,this))}},lH=function(t){return(...e)=>{try{if(typeof t!="string"&&typeof t!="number")throw new Error(`Can’t call a symbol method on a thread: ${t.toString()}`);return this.call((r,n,a)=>{this.messages.send([nH,r,t,n],a)},e)}catch(r){return Promise.reject(r)}}},PT=function(...t){const e=t[0],r=nr(this,fs).get(e);r&&(r(...t),nr(this,fs).delete(e))},cH=function(t){const e=new Promise((r,n)=>{nr(this,fs).set(t,(a,s,l)=>{l==null?r(this.serialization.deserialize(s,this)):n(this.serialization.deserialize(l,this))})});return Object.defineProperty(e,Symbol.asyncIterator,{async*value(){const r=await e;Object.defineProperty(r,Symbol.asyncIterator,{value:()=>r}),yield*r}}),e};function Mge(t,e){let r;if(e==null){if(typeof Proxy!="function")throw new Error("You must pass an array of callable methods in environments without Proxies.");const n=new Map;r=new Proxy({},{get(a,s){if(n.has(s))return n.get(s);const l=t(s);return n.set(s,l),l}})}else{r={};for(const n of e)Object.defineProperty(r,n,{value:t(n),writable:!1,configurable:!0,enumerable:!0})}return r}function Pge(){throw new Error("You attempted to call a function that is not stored. It may have already been released.")}const jge="quilt.threads.ping",jz="quilt.threads.pong";function Uge(t,{targetOrigin:e="*"}={}){let r=!1;const n=function(s,l){t.postMessage(s,e,l)},a=new Promise(s=>{const l=new AbortController;globalThis.window.addEventListener("message",c=>{c.source===t&&c.data===jz&&(r=!0,l.abort(),s())},{signal:l.signal}),l.signal.addEventListener("abort",()=>s(),{once:!0}),n(jge)});return{send(s,l){return r?n(s,l):a.then(()=>{if(r)return n(s,l)})},listen(s,{signal:l}){self.addEventListener("message",c=>{c.source===t&&c.data!==jz&&s(c.data)},{signal:l})}}}class Fge extends Lge{constructor(e,{targetOrigin:r="*",...n}={}){super(Uge(e.contentWindow,{targetOrigin:r}),n),this.iframe=e}}const uH=Te.forwardRef(({content:t,children:e,...r},n)=>g.jsx("span",{ref:n,...r,children:t||e}));uH.displayName="UIText";const dH=Te.forwardRef(({label:t,onPress:e,onClick:r,children:n,...a},s)=>g.jsx("button",{ref:s,onClick:l=>{e&&e(),r&&r(l)},style:{padding:"8px 16px",backgroundColor:"#007bff",color:"white",border:"none",borderRadius:"4px",cursor:"pointer"},...a,children:t||n}));dH.displayName="UIButton";const fH=Te.forwardRef(({direction:t="vertical",spacing:e="8",align:r="stretch",justify:n="flex-start",children:a,...s},l)=>g.jsx("div",{ref:l,style:{display:"flex",flexDirection:t==="horizontal"?"row":"column",gap:`${e}px`,alignItems:r,justifyContent:n},...s,children:a}));fH.displayName="UIStack";const pH=Te.forwardRef(({src:t,alt:e,width:r,height:n,children:a,...s},l)=>g.jsx("img",{ref:l,src:t,alt:e,width:r,height:n,style:{maxWidth:"100%",height:"auto",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.1)"},...s}));pH.displayName="UIImage";const $A={name:"basic",elements:[{tagName:"ui-text",component:uH,propMapping:{content:"content"},eventMapping:{}},{tagName:"ui-button",component:dH,propMapping:{label:"label"},eventMapping:{press:"onPress"}},{tagName:"ui-stack",component:fH,propMapping:{direction:"direction",spacing:"spacing",align:"align",justify:"justify"},eventMapping:{}},{tagName:"ui-image",component:pH,propMapping:{src:"src",alt:"alt",width:"width",height:"height"},eventMapping:{}}]},zge=({receiver:t})=>{const e=y.useRef(null);return y.useEffect(()=>{if(e.current)return t.connect(e.current),()=>{t.disconnect()}},[t]),g.jsx("div",{ref:e,"data-testid":"standard-dom-renderer-container"})},$ge=({resource:t,library:e,remoteElements:r=[],onUIAction:n})=>{const a=y.useRef(null),s=y.useRef(null),[l,c]=y.useState(null),d=y.useMemo(()=>(t.mimeType||"").includes("framework=react")?"react":"webcomponents",[t.mimeType]),f=`${e?.name}-${d}`,{receiver:m,components:h}=y.useMemo(()=>{switch(d){case"react":{const b=new bge,x=e||$A,S=new Map;return x&&x.elements.forEach(R=>{const w=_ge(R.component);S.set(R.tagName,w)}),{receiver:b,components:S}}case"webcomponents":default:return{receiver:new yge,components:null}}},[t,e,r]);y.useEffect(()=>{function b(x){var S;if(a.current&&x.source===a.current.contentWindow){const R=x.data;if(!R)return;(S=n?.(R))==null||S.catch(w=>{console.error("Error handling UI action result in RemoteDOMResourceRenderer:",w)})}}return window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[n]),y.useEffect(()=>{const b=s.current;return s.current=null,()=>{b?.close()}},[f]);const v=()=>{const b=a.current;if(!b||s.current)return;const x=new Fge(b);s.current=x;const{code:S,error:R}=cge(t);if(R){c(R);return}if(S&&m!=null&&m.connection){const w={code:S,remoteElements:r,useReactRenderer:d==="react",componentLibrary:e?.name};x.imports.render(w,m.connection).catch(_=>console.error("Error calling remote render:",_))}};return l?g.jsx("p",{className:"text-red-500",children:l}):g.jsxs(g.Fragment,{children:[g.jsx("iframe",{ref:a,srcDoc:Age,sandbox:"allow-scripts",style:{display:"none"},title:"Remote DOM Sandbox",onLoad:v},f),d==="react"&&h?g.jsx(Rge,{receiver:m,components:h}):g.jsx(zge,{receiver:m})]})};function Bge(t){var e;if(t.contentType)return t.contentType;if(t.mimeType==="text/html")return"rawHtml";if(t.mimeType==="text/uri-list")return"externalUrl";if((e=t.mimeType)!=null&&e.startsWith("application/vnd.mcp-ui.remote-dom"))return"remoteDom"}const BA=t=>{const{resource:e,onUIAction:r,supportedContentTypes:n,htmlProps:a,remoteDomProps:s}=t,l=Bge(e);if(n&&l&&!n.includes(l))return g.jsxs("p",{className:"text-red-500",children:["Unsupported content type: ",l,"."]});switch(l){case"rawHtml":case"externalUrl":return g.jsx(Xq,{resource:e,onUIAction:r,...a});case"remoteDom":return g.jsx($ge,{resource:e,onUIAction:r,library:s?.library||$A,...s});default:return g.jsx("p",{className:"text-red-500",children:"Unsupported resource type."})}};BA.displayName="UIResourceRenderer";const qge={tagName:"ui-button",remoteAttributes:["label"],remoteEvents:["click","press"]},Hge={tagName:"ui-text",remoteAttributes:["content"]},Vge={tagName:"ui-stack",remoteAttributes:["direction","spacing","align","justify"]},Gge={tagName:"ui-image",remoteAttributes:["src","alt","width","height"]},Wge=y.memo(({resource:t})=>{const e=async r=>(r.type==="tool"||r.type==="prompt"||(r.type==="link"?r.payload.url&&window.open(r.payload.url,"_blank"):r.type==="intent"||r.type),{status:"Action received"});return t.uri?.startsWith("ui://")?g.jsx("div",{className:"my-4 p-0 border h-[350px] rounded-2xl border-zinc-200 overflow-hidden bg-card",children:g.jsx(BA,{resource:t,onUIAction:e,htmlProps:{style:{maxWidth:"100%",height:"100%",overflow:"auto"},autoResizeIframe:!0,sandboxPermissions:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"}})}):null});function Uz({toolName:t,toolArgs:e,result:r,serverId:n,readResource:a}){const[s,l]=y.useState(null),c=y.useMemo(()=>{if(typeof r=="string")try{return JSON.parse(r)}catch(h){return console.error("[ToolResultRenderer] Failed to parse result:",h),r}return r},[r]),d=y.useMemo(()=>!!(c?.content&&Array.isArray(c.content)&&c.content.some(h=>h.type==="resource"&&h.resource?.uri?.startsWith("ui://")&&h.resource?.mimeType==="text/html+skybridge")),[c]),f=y.useMemo(()=>d&&c.content.find(v=>v.type==="resource"&&v.resource?.uri?.startsWith("ui://")&&v.resource?.mimeType==="text/html+skybridge")?.resource||null,[d,c]);if(y.useEffect(()=>{(()=>{f&&l(f)})()},[f]),d&&s&&n&&a)return g.jsx(PA,{componentUrl:s.uri,toolName:t,toolArgs:e,toolResult:c,serverId:n,readResource:a,noWrapper:!0,className:"my-4"});if(d&&!s)return g.jsx("div",{className:"my-4 p-4 bg-blue-50/30 dark:bg-blue-950/20 border border-blue-200/50 dark:border-blue-800/50 rounded-lg",children:g.jsx("p",{className:"text-sm text-blue-600 dark:text-blue-400",children:"Loading component..."})});const m=[];if(c?.content&&Array.isArray(c.content))for(const h of c.content)h.type==="resource"&&h.resource?.uri?.startsWith("ui://")&&h.resource?.mimeType!=="text/html+skybridge"&&m.push(h.resource);return m.length>0?g.jsx(g.Fragment,{children:m.map(h=>g.jsx(Wge,{resource:h},`${t}-mcp-ui-${h.uri}`))}):null}function Yge({content:t,timestamp:e}){return!t||t.length===0?null:g.jsx("div",{className:"flex items-start gap-3 justify-end group/user-message",children:g.jsxs("div",{className:"flex-1 min-w-0 flex flex-col items-end",children:[g.jsx("div",{className:"bg-zinc-200 dark:bg-zinc-800 text-primary rounded-3xl px-4 py-2 max-w-[80%] break-words",children:g.jsx("p",{className:"text-base leading-7 font-sans text-start break-words",children:t})}),e&&g.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:new Date(e).toLocaleTimeString()})]})})}const Kge=y.memo(({messages:t,isLoading:e,serverId:r,readResource:n})=>{const a=y.useRef(null);y.useEffect(()=>{t.length>0&&a.current&&a.current.scrollIntoView({behavior:e?"auto":"smooth",block:"start"})},[t.length,e]);const s=e&&(()=>{if(t.length===0)return!0;const c=t[t.length-1];if(c.role==="user")return!0;if(c.role==="assistant"){const d=typeof c.content=="string"?c.content:Array.isArray(c.content)?c.content.map(m=>typeof m=="string"?m:m.text||JSON.stringify(m)).join(""):JSON.stringify(c.content);return!(d&&d.trim().length>0)}return!1})(),l=c=>{if(!e)return!1;const d=t[t.length-1];return c.id===d.id&&d.role==="assistant"};return g.jsxs("div",{className:"space-y-6 max-w-3xl mx-auto px-2",children:[t.map(c=>{const d=typeof c.content=="string"?c.content:Array.isArray(c.content)?c.content.map(f=>typeof f=="string"?f:f.text||JSON.stringify(f)).join(""):JSON.stringify(c.content);return c.role==="user"?g.jsx(Yge,{content:d,timestamp:c.timestamp},c.id):c.role==="assistant"?g.jsx("div",{className:"space-y-4",children:c.parts&&c.parts.length>0?c.parts.map((f,m)=>{const h=f.type==="text"?`${c.id}-text-${m}-${f.text?.slice(0,20)}`:`${c.id}-tool-${f.toolInvocation?.toolName}-${m}`;return f.type==="text"?g.jsx(xz,{content:f.text||"",timestamp:m===c.parts.length-1?c.timestamp:void 0,_isStreaming:l(c)},h):f.type==="tool-invocation"&&f.toolInvocation?g.jsxs("div",{children:[g.jsx(_z,{toolName:f.toolInvocation.toolName,args:f.toolInvocation.args,result:f.toolInvocation.result,state:f.toolInvocation.result?"result":"call"}),f.toolInvocation.result&&g.jsx(Uz,{toolName:f.toolInvocation.toolName,toolArgs:f.toolInvocation.args,result:f.toolInvocation.result,serverId:r,readResource:n})]},h):null}):g.jsxs(g.Fragment,{children:[g.jsx(xz,{content:d,timestamp:c.timestamp,_isStreaming:l(c)}),c.toolCalls&&c.toolCalls.length>0&&g.jsx("div",{className:"space-y-2",children:c.toolCalls.map(f=>{const m=`${c.id}-${f.toolName}-${JSON.stringify(f.args).slice(0,50)}`;return g.jsxs("div",{children:[g.jsx(_z,{toolName:f.toolName,args:f.args,result:f.result,state:f.result?"result":"call"}),f.result&&g.jsx(Uz,{toolName:f.toolName,toolArgs:f.args,result:f.result,serverId:r,readResource:n})]},m)})})]})},c.id):null}),s&&g.jsx("div",{className:"flex items-start gap-3",children:g.jsx("div",{className:"flex-1",children:g.jsx("div",{className:"rounded-lg p-4 max-w-fit",children:g.jsx("div",{className:"flex items-center gap-2",children:g.jsx("span",{className:"text-sm",children:g.jsx(Zoe,{duration:2,spread:1,children:"Thinking..."})})})})})}),g.jsx("div",{ref:a})]})});function mH(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);e=(e<<5)-e+n,e=e&e}return Math.abs(e).toString(16)}function Zge({mcpServerUrl:t,llmConfig:e,authConfig:r,isConnected:n}){const[a,s]=y.useState([]),[l,c]=y.useState(!1),d=y.useCallback(async m=>{if(!m.trim()||!e||!n)return;const h={id:`user-${Date.now()}`,role:"user",content:m.trim(),timestamp:Date.now()};s(v=>[...v,h]),c(!0);try{let v=r;if(r?.type==="oauth")try{const C="mcp:auth",k=mH(t),N=`${C}_${k}_tokens`,I=localStorage.getItem(N);if(I){const O=JSON.parse(I);v={...r,oauthTokens:O}}else console.warn("No OAuth tokens found in localStorage for key:",N)}catch(C){console.warn("Failed to retrieve OAuth tokens:",C)}const b=await fetch("/inspector/api/chat/stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mcpServerUrl:t,llmConfig:e,authConfig:v,messages:[...a,h].map(C=>({role:C.role,content:C.content}))})});if(!b.ok)throw new Error(`HTTP error! status: ${b.status}`);const x=`assistant-${Date.now()}`;let S="";const R=[];s(C=>[...C,{id:x,role:"assistant",content:"",timestamp:Date.now(),parts:[]}]);const w=b.body?.getReader(),_=new TextDecoder;if(!w)throw new Error("No response body");let A="";for(;;){const{done:C,value:k}=await w.read();if(C)break;A+=_.decode(k,{stream:!0});const N=A.split(`
|
|
1424
|
-
`);A=N.pop()||"";for(const I of N)if(I.trim()&&I.startsWith("data: "))try{const O=JSON.parse(I.slice(6));if(console.log("[Client received event]",O.type,O.toolName||O.content?.slice?.(0,30)),O.type==="message")console.log("[Message started]",O.id);else if(O.type==="text"){S+=O.content;const M=R[R.length-1];M&&M.type==="text"?M.text=S:R.push({type:"text",text:S}),console.log("[Parts after text]",R.length,"parts, text length:",S.length),s(L=>L.map(P=>P.id===x?{...P,parts:[...R]}:P))}else if(O.type==="tool-call")S&&(S=""),R.push({type:"tool-invocation",toolInvocation:{toolName:O.toolName,args:O.args,state:"pending"}}),console.log("[Parts after tool-call]",R.length,"parts, tool:",O.toolName),s(M=>M.map(L=>L.id===x?{...L,parts:[...R]}:L));else if(O.type==="tool-result"){const M=R.find(L=>L.type==="tool-invocation"&&L.toolInvocation?.toolName===O.toolName&&!L.toolInvocation?.result);M&&M.toolInvocation?(M.toolInvocation.result=O.result,M.toolInvocation.state="result",console.log("[Parts after tool-result]",R.length,"parts, updated:",O.toolName),s(L=>L.map(P=>P.id===x?{...P,parts:[...R]}:P))):console.warn("[tool-result] Could not find matching tool part for",O.toolName)}else if(O.type==="done")console.log("[Done] Final parts:",R.length),s(M=>M.map(L=>L.id===x?{...L,parts:[...R],content:""}:L));else if(O.type==="error")throw new Error(O.message||"Streaming error")}catch(O){console.error("Failed to parse streaming event:",O,I)}}}catch(v){let b="Unknown error occurred";if(v instanceof Error){b=v.message;const S=v;S.status&&(b=`HTTP ${S.status}: ${b}`),(S.code===401||b.includes("401")||b.includes("Unauthorized"))&&(b="Authentication failed (401). Check your Authorization header in the connection settings.")}const x={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${b}`,timestamp:Date.now()};s(S=>[...S,x])}finally{c(!1)}},[e,n,t,a,r]),f=y.useCallback(()=>{s([])},[]);return{messages:a,isLoading:l,sendMessage:d,clearMessages:f}}function Xge({connection:t,llmConfig:e,isConnected:r,readResource:n}){const[a,s]=y.useState([]),[l,c]=y.useState(!1),d=y.useRef(null),f=y.useRef(null),m=y.useRef(null),h=y.useCallback(async b=>{if(!b.trim()||!e||!r)return;const x={id:`user-${Date.now()}`,role:"user",content:b.trim(),timestamp:Date.now()};s(w=>[...w,x]),c(!0),d.current=new AbortController;const S=Date.now();let R=0;try{const w=`assistant-${Date.now()}`;let _="";const A=[];if(s(C=>[...C,{id:w,role:"assistant",content:"",timestamp:Date.now(),parts:[]}]),!m.current||m.current.provider!==e.provider||m.current.model!==e.model||m.current.apiKey!==e.apiKey){let C;if(e.provider==="openai"){const{ChatOpenAI:k}=await cs(async()=>{const{ChatOpenAI:N}=await import("./index-CVurY7p-.js");return{ChatOpenAI:N}},__vite__mapDeps([4,5,6,2,7]));C=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="anthropic"){const{ChatAnthropic:k}=await cs(async()=>{const{ChatAnthropic:N}=await import("./index-EYRzsrKX.js");return{ChatAnthropic:N}},__vite__mapDeps([8,5,6,2]));C=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="google"){const{ChatGoogleGenerativeAI:k}=await cs(async()=>{const{ChatGoogleGenerativeAI:N}=await import("./index-CtBUmMWk.js");return{ChatGoogleGenerativeAI:N}},__vite__mapDeps([9,5,6,2,7]));C=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else throw new Error(`Unsupported LLM provider: ${e.provider}`);m.current={instance:C,provider:e.provider,model:e.model,apiKey:e.apiKey}}if(!f.current||f.current.llm!==m.current.instance){const{MCPAgent:C}=await cs(async()=>{const{MCPAgent:k}=await import("./langfuse-C4HKZ3NL-CxkquRNv.js").then(N=>N.c);return{MCPAgent:k}},__vite__mapDeps([10,6,2,1,3]));f.current=new C({llm:m.current.instance,client:t.client,memoryEnabled:!0,systemPrompt:"You are a helpful assistant with access to MCP tools, prompts, and resources. Help users interact with the MCP server."}),await f.current.initialize()}else console.log("[useChatMessagesClientSide] Reusing existing agent. History length:",f.current.conversationHistory?.length);for await(const C of f.current.streamEvents(b,10,!1,void 0)){if(d.current?.signal.aborted)break;if(C.event==="on_chat_model_stream"&&C.data?.chunk?.text){const k=C.data.chunk.text;if(typeof k=="string"&&k.length>0){_+=k;const N=A[A.length-1];N&&N.type==="text"?N.text=_:A.push({type:"text",text:_}),s(I=>I.map(O=>O.id===w?{...O,parts:[...A]}:O))}}else if(C.event==="on_tool_start"){_&&(_="");let k={};C.data?.input?k=C.data.input:C.data?.tool_input?k=C.data.tool_input:C.data&&(k=C.data),console.log("[useChatMessagesClientSide] on_tool_start:",{toolName:C.name,eventData:C.data,extractedArgs:k}),R++,A.push({type:"tool-invocation",toolInvocation:{toolName:C.name||"unknown",args:k,state:"pending"}}),s(N=>N.map(I=>I.id===w?{...I,parts:[...A]}:I))}else if(C.event==="on_tool_end"){const k=A.find(N=>N.type==="tool-invocation"&&N.toolInvocation?.toolName===C.name&&!N.toolInvocation?.result);if(console.log("[useChatMessagesClientSide] on_tool_end event:",{toolName:C.name,hasToolPart:!!k,output:C.data?.output}),k&&k.toolInvocation){let N=C.data?.output;if(N?.kwargs?.content&&typeof N.kwargs.content=="string")try{N=JSON.parse(N.kwargs.content)}catch(O){console.warn("[useChatMessagesClientSide] Failed to parse kwargs.content:",O),N=N.kwargs.content}else if(N?.content&&typeof N.content=="string")try{N=JSON.parse(N.content)}catch{N=N.content}k.toolInvocation.result=N,k.toolInvocation.state="result";const I=N?._meta?.["openai/outputTemplate"];if(console.log("[useChatMessagesClientSide] Tool result:",{toolName:C.name,hasMeta:!!N?._meta,hasStructuredContent:!!N?.structuredContent,appsSdkUri:I}),I&&typeof I=="string"&&n){console.log("[useChatMessagesClientSide] Detected Apps SDK component, fetching resource:",I);try{const O=await n(I);console.log("[useChatMessagesClientSide] Resource fetched:",O);const M=N?.structuredContent||null;if(O?.contents&&Array.isArray(O.contents)){const L=O.contents.map(V=>({type:"resource",resource:V}));console.log("[useChatMessagesClientSide] Created MCP resources:",L);const P={...N,content:[...N.content||[],...L],structuredContent:M};k.toolInvocation.result=P,console.log("[useChatMessagesClientSide] Updated result with resources")}else console.warn("[useChatMessagesClientSide] No contents in resourceData:",O)}catch(O){console.error("Failed to fetch Apps SDK resource:",O)}}s(O=>O.map(M=>M.id===w?{...M,parts:[...A]}:M))}}}s(C=>C.map(k=>k.id===w?{...k,parts:[...A],content:""}:k)),e&&jr.getInstance().capture(new HO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!0,executionMode:"client-side",duration:Date.now()-S})).catch(()=>{})}catch(w){console.error("Client-side agent error:",w);let _="Unknown error occurred";if(w instanceof Error){_=w.message;const C=w;C.status&&(_=`HTTP ${C.status}: ${_}`),(C.code===401||_.includes("401")||_.includes("Unauthorized"))&&(_="Authentication failed (401). Check your Authorization header in the connection settings.")}e&&jr.getInstance().capture(new HO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!1,executionMode:"client-side",duration:Date.now()-S,error:_})).catch(()=>{});const A={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${_}`,timestamp:Date.now()};s(C=>[...C,A])}finally{c(!1),d.current=null}},[t,e,r,a,n]),v=y.useCallback(()=>{s([]),f.current&&f.current.clearConversationHistory()},[]);return{messages:a,isLoading:l,sendMessage:h,clearMessages:v}}const Fz={openai:"gpt-4o",anthropic:"claude-haiku-4-5-20251001",google:"gemini-2.5-flash"};function Qge({mcpServerUrl:t}){const[e,r]=y.useState(null),[n,a]=y.useState(null),[s,l]=y.useState(!1),[c,d]=y.useState("openai"),[f,m]=y.useState(""),[h,v]=y.useState(Fz.openai),[b,x]=y.useState("none"),[S,R]=y.useState(""),[w,_]=y.useState(""),[A,C]=y.useState("");y.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-llm-config");if(I)try{const O=JSON.parse(I);r(O),d(O.provider),m(O.apiKey),v(O.model)}catch(O){console.error("Failed to load LLM config:",O)}},[]),y.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-auth-config");if(I)try{const O=JSON.parse(I);a(O),x(O.type),O.username&&R(O.username),O.password&&_(O.password),O.token&&C(O.token)}catch(O){console.error("Failed to load auth config:",O)}else try{const O="mcp:auth",M=mH(t),L=`${O}_${M}_tokens`;localStorage.getItem(L)&&(a({type:"oauth"}),x("oauth"))}catch(O){console.error("Failed to check for OAuth tokens:",O)}},[t]),y.useEffect(()=>{v(Fz[c])},[c]);const k=y.useCallback(()=>{if(!f.trim())return;const I={provider:c,apiKey:f,model:h},O={type:b,...b==="basic"&&{username:S.trim(),password:w.trim()},...b==="bearer"&&{token:A.trim()}};r(I),a(O),localStorage.setItem("mcp-inspector-llm-config",JSON.stringify(I)),localStorage.setItem("mcp-inspector-auth-config",JSON.stringify(O)),l(!1)},[c,f,h,b,S,w,A]),N=y.useCallback(()=>{r(null),a(null),m(""),R(""),_(""),C(""),x("none"),localStorage.removeItem("mcp-inspector-llm-config"),localStorage.removeItem("mcp-inspector-auth-config")},[]);return{llmConfig:e,authConfig:n,configDialogOpen:s,setConfigDialogOpen:l,tempProvider:c,setTempProvider:d,tempApiKey:f,setTempApiKey:m,tempModel:h,setTempModel:v,tempAuthType:b,saveLLMConfig:k,clearConfig:N}}function Jge({connection:t,isConnected:e,useClientSide:r=!0,readResource:n}){const[a,s]=y.useState(""),l=y.useRef(null),{llmConfig:c,authConfig:d,configDialogOpen:f,setConfigDialogOpen:m,tempProvider:h,setTempProvider:v,tempApiKey:b,setTempApiKey:x,tempModel:S,setTempModel:R,saveLLMConfig:w,clearConfig:_}=Qge({mcpServerUrl:t.url}),A={connection:t,llmConfig:c,isConnected:e,readResource:n},C=Zge({mcpServerUrl:t.url,llmConfig:c,authConfig:d,isConnected:e}),k=Xge(A),{messages:N,isLoading:I,sendMessage:O,clearMessages:M}=r?k:C;k4({onNewChat:M}),y.useEffect(()=>{c&&N.length===0&&l.current&&l.current.focus()},[c,N.length]),y.useEffect(()=>{!I&&N.length>0&&l.current&&l.current.focus()},[I,N.length]);const L=y.useCallback(()=>{a.trim()&&(O(a),s(""))},[a,O]),P=y.useCallback(X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),L())},[L]),V=y.useCallback(()=>{_(),M()},[_,M]);return c&&N.length===0?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"absolute top-4 right-4 z-10",children:g.jsx(Eq,{open:f,onOpenChange:m,tempProvider:h,tempModel:S,tempApiKey:b,onProviderChange:v,onModelChange:R,onApiKeyChange:x,onSave:w,onClear:V,showClearButton:!0,buttonLabel:"Change API Key"})}),g.jsx(Yoe,{mcpServerUrl:t.url,inputValue:a,isConnected:e,isLoading:I,textareaRef:l,llmConfig:c,onInputChange:s,onKeyDown:P,onSubmit:X=>{X.preventDefault(),L()},onConfigDialogOpenChange:m})]}):g.jsxs("div",{className:"flex flex-col h-full relative",children:[g.jsx(Voe,{llmConfig:c,hasMessages:N.length>0,configDialogOpen:f,onConfigDialogOpenChange:m,onClearChat:M,tempProvider:h,tempModel:S,tempApiKey:b,onProviderChange:v,onModelChange:R,onApiKeyChange:x,onSaveConfig:w,onClearConfig:V}),g.jsx("div",{className:"flex-1 overflow-y-auto p-4 pt-[100px]",children:c?g.jsx(Kge,{messages:N,isLoading:I,serverId:t.url,readResource:n}):g.jsx(Koe,{onConfigureClick:()=>m(!0)})}),c&&g.jsx(Goe,{inputValue:a,isConnected:e,isLoading:I,textareaRef:l,onInputChange:s,onKeyDown:P,onSendMessage:L})]})}const bh=y.createContext(null);bh.displayName="PanelGroupContext";const hr={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},qA=10,gs=y.useLayoutEffect,zz=jm.useId,eve=typeof zz=="function"?zz:()=>null;let tve=0;function HA(t=null){const e=eve(),r=y.useRef(t||e||null);return r.current===null&&(r.current=""+tve++),t??r.current}function hH({children:t,className:e="",collapsedSize:r,collapsible:n,defaultSize:a,forwardedRef:s,id:l,maxSize:c,minSize:d,onCollapse:f,onExpand:m,onResize:h,order:v,style:b,tagName:x="div",...S}){const R=y.useContext(bh);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:_,getPanelSize:A,getPanelStyle:C,groupId:k,isPanelCollapsed:N,reevaluatePanelConstraints:I,registerPanel:O,resizePanel:M,unregisterPanel:L}=R,P=HA(l),V=y.useRef({callbacks:{onCollapse:f,onExpand:m,onResize:h},constraints:{collapsedSize:r,collapsible:n,defaultSize:a,maxSize:c,minSize:d},id:P,idIsFromProps:l!==void 0,order:v});y.useRef({didLogMissingDefaultSizeWarning:!1}),gs(()=>{const{callbacks:Q,constraints:oe}=V.current,U={...oe};V.current.id=P,V.current.idIsFromProps=l!==void 0,V.current.order=v,Q.onCollapse=f,Q.onExpand=m,Q.onResize=h,oe.collapsedSize=r,oe.collapsible=n,oe.defaultSize=a,oe.maxSize=c,oe.minSize=d,(U.collapsedSize!==oe.collapsedSize||U.collapsible!==oe.collapsible||U.maxSize!==oe.maxSize||U.minSize!==oe.minSize)&&I(V.current,U)}),gs(()=>{const Q=V.current;return O(Q),()=>{L(Q)}},[v,P,O,L]),y.useImperativeHandle(s,()=>({collapse:()=>{w(V.current)},expand:Q=>{_(V.current,Q)},getId(){return P},getSize(){return A(V.current)},isCollapsed(){return N(V.current)},isExpanded(){return!N(V.current)},resize:Q=>{M(V.current,Q)}}),[w,_,A,N,P,M]);const X=C(V.current,a);return y.createElement(x,{...S,children:t,className:e,id:P,style:{...X,...b},[hr.groupId]:k,[hr.panel]:"",[hr.panelCollapsible]:n||void 0,[hr.panelId]:P,[hr.panelSize]:parseFloat(""+X.flexGrow).toFixed(1)})}const gH=y.forwardRef((t,e)=>y.createElement(hH,{...t,forwardedRef:e}));hH.displayName="Panel";gH.displayName="forwardRef(Panel)";let jT=null,Kp=-1,yo=null;function rve(t,e,r){const n=(e&SH)!==0,a=(e&wH)!==0,s=(e&xH)!==0,l=(e&_H)!==0;if(e){if(n)return s?"se-resize":l?"ne-resize":"e-resize";if(a)return s?"sw-resize":l?"nw-resize":"w-resize";if(s)return"s-resize";if(l)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function nve(){yo!==null&&(document.head.removeChild(yo),jT=null,yo=null,Kp=-1)}function i_(t,e,r){var n,a;const s=rve(t,e);if(jT!==s){if(jT=s,yo===null&&(yo=document.createElement("style"),document.head.appendChild(yo)),Kp>=0){var l;(l=yo.sheet)===null||l===void 0||l.removeRule(Kp)}Kp=(n=(a=yo.sheet)===null||a===void 0?void 0:a.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function vH(t){return t.type==="keydown"}function bH(t){return t.type.startsWith("pointer")}function yH(t){return t.type.startsWith("mouse")}function yh(t){if(bH(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(yH(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function ave(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ive(t,e,r){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function ove(t,e){if(t===e)throw new Error("Cannot compare node with itself");const r={a:qz(t),b:qz(e)};let n;for(;r.a.at(-1)===r.b.at(-1);)t=r.a.pop(),e=r.b.pop(),n=t;ht(n,"Stacking order can only be calculated for elements with a common ancestor");const a={a:Bz($z(r.a)),b:Bz($z(r.b))};if(a.a===a.b){const s=n.childNodes,l={a:r.a.at(-1),b:r.b.at(-1)};let c=s.length;for(;c--;){const d=s[c];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(a.a-a.b)}const sve=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function lve(t){var e;const r=getComputedStyle((e=EH(t))!==null&&e!==void 0?e:t).display;return r==="flex"||r==="inline-flex"}function cve(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||lve(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||sve.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function $z(t){let e=t.length;for(;e--;){const r=t[e];if(ht(r,"Missing node"),cve(r))return r}return null}function Bz(t){return t&&Number(getComputedStyle(t).zIndex)||0}function qz(t){const e=[];for(;t;)e.push(t),t=EH(t);return e}function EH(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const SH=1,wH=2,xH=4,_H=8,uve=ave()==="coarse";let Ea=[],Bl=!1,Eo=new Map,Eh=new Map;const pd=new Set;function dve(t,e,r,n,a){var s;const{ownerDocument:l}=e,c={direction:r,element:e,hitAreaMargins:n,setResizeHandlerState:a},d=(s=Eo.get(l))!==null&&s!==void 0?s:0;return Eo.set(l,d+1),pd.add(c),Cm(),function(){var m;Eh.delete(t),pd.delete(c);const h=(m=Eo.get(l))!==null&&m!==void 0?m:1;if(Eo.set(l,h-1),Cm(),h===1&&Eo.delete(l),Ea.includes(c)){const v=Ea.indexOf(c);v>=0&&Ea.splice(v,1),Sh(),a("up",!0,null)}}}function fve(t){const{target:e}=t,{x:r,y:n}=yh(t);Bl=!0,VA({target:e,x:r,y:n}),Cm(),Ea.length>0&&(Nm("down",t),Sh(),t.preventDefault(),TH(e)||t.stopImmediatePropagation())}function o_(t){const{x:e,y:r}=yh(t);if(Bl&&t.type!=="pointerleave"&&t.buttons===0&&(Bl=!1,Nm("up",t)),!Bl){const{target:n}=t;VA({target:n,x:e,y:r})}Nm("move",t),Sh(),Ea.length>0&&t.preventDefault()}function s_(t){const{target:e}=t,{x:r,y:n}=yh(t);Eh.clear(),Bl=!1,Ea.length>0&&(t.preventDefault(),TH(e)||t.stopImmediatePropagation()),Nm("up",t),VA({target:e,x:r,y:n}),Sh(),Cm()}function TH(t){let e=t;for(;e;){if(e.hasAttribute(hr.resizeHandle))return!0;e=e.parentElement}return!1}function VA({target:t,x:e,y:r}){Ea.splice(0);let n=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(n=t),pd.forEach(a=>{const{element:s,hitAreaMargins:l}=a,c=s.getBoundingClientRect(),{bottom:d,left:f,right:m,top:h}=c,v=uve?l.coarse:l.fine;if(e>=f-v&&e<=m+v&&r>=h-v&&r<=d+v){if(n!==null&&document.contains(n)&&s!==n&&!s.contains(n)&&!n.contains(s)&&ove(n,s)>0){let x=n,S=!1;for(;x&&!x.contains(s);){if(ive(x.getBoundingClientRect(),c)){S=!0;break}x=x.parentElement}if(S)return}Ea.push(a)}})}function l_(t,e){Eh.set(t,e)}function Sh(){let t=!1,e=!1;Ea.forEach(n=>{const{direction:a}=n;a==="horizontal"?t=!0:e=!0});let r=0;Eh.forEach(n=>{r|=n}),t&&e?i_("intersection",r):t?i_("horizontal",r):e?i_("vertical",r):nve()}let c_;function Cm(){var t;(t=c_)===null||t===void 0||t.abort(),c_=new AbortController;const e={capture:!0,signal:c_.signal};pd.size&&(Bl?(Ea.length>0&&Eo.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("contextmenu",s_,e),a.addEventListener("pointerleave",o_,e),a.addEventListener("pointermove",o_,e))}),Eo.forEach((r,n)=>{const{body:a}=n;a.addEventListener("pointerup",s_,e),a.addEventListener("pointercancel",s_,e)})):Eo.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("pointerdown",fve,e),a.addEventListener("pointermove",o_,e))}))}function Nm(t,e){pd.forEach(r=>{const{setResizeHandlerState:n}=r,a=Ea.includes(r);n(t,a,e)})}function pve(){const[t,e]=y.useState(0);return y.useCallback(()=>e(r=>r+1),[])}function ht(t,e){if(!t)throw console.error(e),Error(e)}function Cs(t,e,r=qA){return t.toFixed(r)===e.toFixed(r)?0:t>e?1:-1}function xi(t,e,r=qA){return Cs(t,e,r)===0}function jn(t,e,r){return Cs(t,e,r)===0}function mve(t,e,r){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){const a=t[n],s=e[n];if(!jn(a,s,r))return!1}return!0}function Pl({panelConstraints:t,panelIndex:e,size:r}){const n=t[e];ht(n!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:a=0,collapsible:s,maxSize:l=100,minSize:c=0}=n;if(Cs(r,c)<0)if(s){const d=(a+c)/2;Cs(r,d)<0?r=a:r=c}else r=c;return r=Math.min(l,r),r=parseFloat(r.toFixed(qA)),r}function Du({delta:t,initialLayout:e,panelConstraints:r,pivotIndices:n,prevLayout:a,trigger:s}){if(jn(t,0))return e;const l=[...e],[c,d]=n;ht(c!=null,"Invalid first pivot index"),ht(d!=null,"Invalid second pivot index");let f=0;if(s==="keyboard"){{const h=t<0?d:c,v=r[h];ht(v,`Panel constraints not found for index ${h}`);const{collapsedSize:b=0,collapsible:x,minSize:S=0}=v;if(x){const R=e[h];if(ht(R!=null,`Previous layout not found for panel index ${h}`),jn(R,b)){const w=S-R;Cs(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const h=t<0?c:d,v=r[h];ht(v,`No panel constraints found for index ${h}`);const{collapsedSize:b=0,collapsible:x,minSize:S=0}=v;if(x){const R=e[h];if(ht(R!=null,`Previous layout not found for panel index ${h}`),jn(R,S)){const w=R-b;Cs(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const h=t<0?1:-1;let v=t<0?d:c,b=0;for(;;){const S=e[v];ht(S!=null,`Previous layout not found for panel index ${v}`);const w=Pl({panelConstraints:r,panelIndex:v,size:100})-S;if(b+=w,v+=h,v<0||v>=r.length)break}const x=Math.min(Math.abs(t),Math.abs(b));t=t<0?0-x:x}{let v=t<0?c:d;for(;v>=0&&v<r.length;){const b=Math.abs(t)-Math.abs(f),x=e[v];ht(x!=null,`Previous layout not found for panel index ${v}`);const S=x-b,R=Pl({panelConstraints:r,panelIndex:v,size:S});if(!jn(x,R)&&(f+=x-R,l[v]=R,f.toFixed(3).localeCompare(Math.abs(t).toFixed(3),void 0,{numeric:!0})>=0))break;t<0?v--:v++}}if(mve(a,l))return a;{const h=t<0?d:c,v=e[h];ht(v!=null,`Previous layout not found for panel index ${h}`);const b=v+f,x=Pl({panelConstraints:r,panelIndex:h,size:b});if(l[h]=x,!jn(x,b)){let S=b-x,w=t<0?d:c;for(;w>=0&&w<r.length;){const _=l[w];ht(_!=null,`Previous layout not found for panel index ${w}`);const A=_+S,C=Pl({panelConstraints:r,panelIndex:w,size:A});if(jn(_,C)||(S-=C-_,l[w]=C),jn(S,0))break;t>0?w--:w++}}}const m=l.reduce((h,v)=>v+h,0);return jn(m,100)?l:a}function hve({layout:t,panelsArray:e,pivotIndices:r}){let n=0,a=100,s=0,l=0;const c=r[0];ht(c!=null,"No pivot index found"),e.forEach((h,v)=>{const{constraints:b}=h,{maxSize:x=100,minSize:S=0}=b;v===c?(n=S,a=x):(s+=S,l+=x)});const d=Math.min(a,100-s),f=Math.max(n,100-l),m=t[c];return{valueMax:d,valueMin:f,valueNow:m}}function md(t,e=document){return Array.from(e.querySelectorAll(`[${hr.resizeHandleId}][data-panel-group-id="${t}"]`))}function RH(t,e,r=document){const a=md(t,r).findIndex(s=>s.getAttribute(hr.resizeHandleId)===e);return a??null}function AH(t,e,r){const n=RH(t,e,r);return n!=null?[n,n+1]:[-1,-1]}function gve(t){return t instanceof HTMLElement?!0:typeof t=="object"&&t!==null&&"tagName"in t&&"getAttribute"in t}function CH(t,e=document){if(gve(e)&&e.dataset.panelGroupId==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function wh(t,e=document){const r=e.querySelector(`[${hr.resizeHandleId}="${t}"]`);return r||null}function vve(t,e,r,n=document){var a,s,l,c;const d=wh(e,n),f=md(t,n),m=d?f.indexOf(d):-1,h=(a=(s=r[m])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null,v=(l=(c=r[m+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[h,v]}function bve({committedValuesRef:t,eagerValuesRef:e,groupId:r,layout:n,panelDataArray:a,panelGroupElement:s,setLayout:l}){y.useRef({didWarnAboutMissingResizeHandle:!1}),gs(()=>{if(!s)return;const c=md(r,s);for(let d=0;d<a.length-1;d++){const{valueMax:f,valueMin:m,valueNow:h}=hve({layout:n,panelsArray:a,pivotIndices:[d,d+1]}),v=c[d];if(v!=null){const b=a[d];ht(b,`No panel data found for index "${d}"`),v.setAttribute("aria-controls",b.id),v.setAttribute("aria-valuemax",""+Math.round(f)),v.setAttribute("aria-valuemin",""+Math.round(m)),v.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{c.forEach((d,f)=>{d.removeAttribute("aria-controls"),d.removeAttribute("aria-valuemax"),d.removeAttribute("aria-valuemin"),d.removeAttribute("aria-valuenow")})}},[r,n,a,s]),y.useEffect(()=>{if(!s)return;const c=e.current;ht(c,"Eager values not found");const{panelDataArray:d}=c,f=CH(r,s);ht(f!=null,`No group found for id "${r}"`);const m=md(r,s);ht(m,`No resize handles found for group id "${r}"`);const h=m.map(v=>{const b=v.getAttribute(hr.resizeHandleId);ht(b,"Resize handle element has no handle id attribute");const[x,S]=vve(r,b,d,s);if(x==null||S==null)return()=>{};const R=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const _=d.findIndex(A=>A.id===x);if(_>=0){const A=d[_];ht(A,`No panel data found for index ${_}`);const C=n[_],{collapsedSize:k=0,collapsible:N,minSize:I=0}=A.constraints;if(C!=null&&N){const O=Du({delta:jn(C,k)?I-k:k-C,initialLayout:n,panelConstraints:d.map(M=>M.constraints),pivotIndices:AH(r,b,s),prevLayout:n,trigger:"keyboard"});n!==O&&l(O)}}break}}};return v.addEventListener("keydown",R),()=>{v.removeEventListener("keydown",R)}});return()=>{h.forEach(v=>v())}},[s,t,e,r,n,a,l])}function Hz(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function NH(t,e){const r=t==="horizontal",{x:n,y:a}=yh(e);return r?n:a}function yve(t,e,r,n,a){const s=r==="horizontal",l=wh(e,a);ht(l,`No resize handle element found for id "${e}"`);const c=l.getAttribute(hr.groupId);ht(c,"Resize handle element has no group id attribute");let{initialCursorPosition:d}=n;const f=NH(r,t),m=CH(c,a);ht(m,`No group element found for id "${c}"`);const h=m.getBoundingClientRect(),v=s?h.width:h.height;return(f-d)/v*100}function Eve(t,e,r,n,a,s){if(vH(t)){const l=r==="horizontal";let c=0;t.shiftKey?c=100:a!=null?c=a:c=10;let d=0;switch(t.key){case"ArrowDown":d=l?0:c;break;case"ArrowLeft":d=l?-c:0;break;case"ArrowRight":d=l?c:0;break;case"ArrowUp":d=l?0:-c;break;case"End":d=100;break;case"Home":d=-100;break}return d}else return n==null?0:yve(t,e,r,n,s)}function Sve({panelDataArray:t}){const e=Array(t.length),r=t.map(s=>s.constraints);let n=0,a=100;for(let s=0;s<t.length;s++){const l=r[s];ht(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;c!=null&&(n++,e[s]=c,a-=c)}for(let s=0;s<t.length;s++){const l=r[s];ht(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;if(c!=null)continue;const d=t.length-n,f=a/d;n++,e[s]=f,a-=f}return e}function gl(t,e,r){e.forEach((n,a)=>{const s=t[a];ht(s,`Panel data not found for index ${a}`);const{callbacks:l,constraints:c,id:d}=s,{collapsedSize:f=0,collapsible:m}=c,h=r[d];if(h==null||n!==h){r[d]=n;const{onCollapse:v,onExpand:b,onResize:x}=l;x&&x(n,h),m&&(v||b)&&(b&&(h==null||xi(h,f))&&!xi(n,f)&&b(),v&&(h==null||!xi(h,f))&&xi(n,f)&&v())}})}function wp(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=e[r])return!1;return!0}function wve({defaultSize:t,dragState:e,layout:r,panelData:n,panelIndex:a,precision:s=3}){const l=r[a];let c;return l==null?c=t!=null?t.toFixed(s):"1":n.length===1?c="1":c=l.toFixed(s),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function xve(t,e=10){let r=null;return(...a)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...a)},e)}}function Vz(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,r)=>{localStorage.setItem(e,r)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function kH(t){return`react-resizable-panels:${t}`}function IH(t){return t.map(e=>{const{constraints:r,id:n,idIsFromProps:a,order:s}=e;return a?n:s?`${s}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((e,r)=>e.localeCompare(r)).join(",")}function OH(t,e){try{const r=kH(t),n=e.getItem(r);if(n){const a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function _ve(t,e,r){var n,a;const s=(n=OH(t,r))!==null&&n!==void 0?n:{},l=IH(e);return(a=s[l])!==null&&a!==void 0?a:null}function Tve(t,e,r,n,a){var s;const l=kH(t),c=IH(e),d=(s=OH(t,a))!==null&&s!==void 0?s:{};d[c]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{a.setItem(l,JSON.stringify(d))}catch(f){console.error(f)}}function Gz({layout:t,panelConstraints:e}){const r=[...t],n=r.reduce((s,l)=>s+l,0);if(r.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${r.map(s=>`${s}%`).join(", ")}`);if(!jn(n,100)&&r.length>0)for(let s=0;s<e.length;s++){const l=r[s];ht(l!=null,`No layout data found for index ${s}`);const c=100/n*l;r[s]=c}let a=0;for(let s=0;s<e.length;s++){const l=r[s];ht(l!=null,`No layout data found for index ${s}`);const c=Pl({panelConstraints:e,panelIndex:s,size:l});l!=c&&(a+=l-c,r[s]=c)}if(!jn(a,0))for(let s=0;s<e.length;s++){const l=r[s];ht(l!=null,`No layout data found for index ${s}`);const c=l+a,d=Pl({panelConstraints:e,panelIndex:s,size:c});if(l!==d&&(a-=d-l,r[s]=d,jn(a,0)))break}return r}const Rve=100,Lu={getItem:t=>(Vz(Lu),Lu.getItem(t)),setItem:(t,e)=>{Vz(Lu),Lu.setItem(t,e)}},Wz={};function DH({autoSaveId:t=null,children:e,className:r="",direction:n,forwardedRef:a,id:s=null,onLayout:l=null,keyboardResizeBy:c=null,storage:d=Lu,style:f,tagName:m="div",...h}){const v=HA(s),b=y.useRef(null),[x,S]=y.useState(null),[R,w]=y.useState([]),_=pve(),A=y.useRef({}),C=y.useRef(new Map),k=y.useRef(0),N=y.useRef({autoSaveId:t,direction:n,dragState:x,id:v,keyboardResizeBy:c,onLayout:l,storage:d}),I=y.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});y.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),y.useImperativeHandle(a,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:$}=I.current;return $},setLayout:$=>{const{onLayout:K}=N.current,{layout:J,panelDataArray:z}=I.current,j=Gz({layout:$,panelConstraints:z.map(Z=>Z.constraints)});Hz(J,j)||(w(j),I.current.layout=j,K&&K(j),gl(z,j,A.current))}}),[]),gs(()=>{N.current.autoSaveId=t,N.current.direction=n,N.current.dragState=x,N.current.id=v,N.current.onLayout=l,N.current.storage=d}),bve({committedValuesRef:N,eagerValuesRef:I,groupId:v,layout:R,panelDataArray:I.current.panelDataArray,setLayout:w,panelGroupElement:b.current}),y.useEffect(()=>{const{panelDataArray:$}=I.current;if(t){if(R.length===0||R.length!==$.length)return;let K=Wz[t];K==null&&(K=xve(Tve,Rve),Wz[t]=K);const J=[...$],z=new Map(C.current);K(t,J,z,R,d)}},[t,R,d]),y.useEffect(()=>{});const O=y.useCallback($=>{const{onLayout:K}=N.current,{layout:J,panelDataArray:z}=I.current;if($.constraints.collapsible){const j=z.map(ce=>ce.constraints),{collapsedSize:Z=0,panelSize:ne,pivotIndices:G}=is(z,$,J);if(ht(ne!=null,`Panel size not found for panel "${$.id}"`),!xi(ne,Z)){C.current.set($.id,ne);const he=Al(z,$)===z.length-1?ne-Z:Z-ne,_e=Du({delta:he,initialLayout:J,panelConstraints:j,pivotIndices:G,prevLayout:J,trigger:"imperative-api"});wp(J,_e)||(w(_e),I.current.layout=_e,K&&K(_e),gl(z,_e,A.current))}}},[]),M=y.useCallback(($,K)=>{const{onLayout:J}=N.current,{layout:z,panelDataArray:j}=I.current;if($.constraints.collapsible){const Z=j.map(ye=>ye.constraints),{collapsedSize:ne=0,panelSize:G=0,minSize:ce=0,pivotIndices:he}=is(j,$,z),_e=K??ce;if(xi(G,ne)){const ye=C.current.get($.id),Se=ye!=null&&ye>=_e?ye:_e,ge=Al(j,$)===j.length-1?G-Se:Se-G,ke=Du({delta:ge,initialLayout:z,panelConstraints:Z,pivotIndices:he,prevLayout:z,trigger:"imperative-api"});wp(z,ke)||(w(ke),I.current.layout=ke,J&&J(ke),gl(j,ke,A.current))}}},[]),L=y.useCallback($=>{const{layout:K,panelDataArray:J}=I.current,{panelSize:z}=is(J,$,K);return ht(z!=null,`Panel size not found for panel "${$.id}"`),z},[]),P=y.useCallback(($,K)=>{const{panelDataArray:J}=I.current,z=Al(J,$);return wve({defaultSize:K,dragState:x,layout:R,panelData:J,panelIndex:z})},[x,R]),V=y.useCallback($=>{const{layout:K,panelDataArray:J}=I.current,{collapsedSize:z=0,collapsible:j,panelSize:Z}=is(J,$,K);return ht(Z!=null,`Panel size not found for panel "${$.id}"`),j===!0&&xi(Z,z)},[]),X=y.useCallback($=>{const{layout:K,panelDataArray:J}=I.current,{collapsedSize:z=0,collapsible:j,panelSize:Z}=is(J,$,K);return ht(Z!=null,`Panel size not found for panel "${$.id}"`),!j||Cs(Z,z)>0},[]),Q=y.useCallback($=>{const{panelDataArray:K}=I.current;K.push($),K.sort((J,z)=>{const j=J.order,Z=z.order;return j==null&&Z==null?0:j==null?-1:Z==null?1:j-Z}),I.current.panelDataArrayChanged=!0,_()},[_]);gs(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:$,onLayout:K,storage:J}=N.current,{layout:z,panelDataArray:j}=I.current;let Z=null;if($){const G=_ve($,j,J);G&&(C.current=new Map(Object.entries(G.expandToSizes)),Z=G.layout)}Z==null&&(Z=Sve({panelDataArray:j}));const ne=Gz({layout:Z,panelConstraints:j.map(G=>G.constraints)});Hz(z,ne)||(w(ne),I.current.layout=ne,K&&K(ne),gl(j,ne,A.current))}}),gs(()=>{const $=I.current;return()=>{$.layout=[]}},[]);const oe=y.useCallback($=>{let K=!1;const J=b.current;return J&&window.getComputedStyle(J,null).getPropertyValue("direction")==="rtl"&&(K=!0),function(j){j.preventDefault();const Z=b.current;if(!Z)return()=>null;const{direction:ne,dragState:G,id:ce,keyboardResizeBy:he,onLayout:_e}=N.current,{layout:ye,panelDataArray:Se}=I.current,{initialLayout:Ne}=G??{},ge=AH(ce,$,Z);let ke=Eve(j,$,ne,G,he,Z);const Oe=ne==="horizontal";Oe&&K&&(ke=-ke);const Xe=Se.map(We=>We.constraints),ot=Du({delta:ke,initialLayout:Ne??ye,panelConstraints:Xe,pivotIndices:ge,prevLayout:ye,trigger:vH(j)?"keyboard":"mouse-or-touch"}),$e=!wp(ye,ot);(bH(j)||yH(j))&&k.current!=ke&&(k.current=ke,!$e&&ke!==0?Oe?l_($,ke<0?SH:wH):l_($,ke<0?xH:_H):l_($,0)),$e&&(w(ot),I.current.layout=ot,_e&&_e(ot),gl(Se,ot,A.current))}},[]),U=y.useCallback(($,K)=>{const{onLayout:J}=N.current,{layout:z,panelDataArray:j}=I.current,Z=j.map(ye=>ye.constraints),{panelSize:ne,pivotIndices:G}=is(j,$,z);ht(ne!=null,`Panel size not found for panel "${$.id}"`);const he=Al(j,$)===j.length-1?ne-K:K-ne,_e=Du({delta:he,initialLayout:z,panelConstraints:Z,pivotIndices:G,prevLayout:z,trigger:"imperative-api"});wp(z,_e)||(w(_e),I.current.layout=_e,J&&J(_e),gl(j,_e,A.current))},[]),W=y.useCallback(($,K)=>{const{layout:J,panelDataArray:z}=I.current,{collapsedSize:j=0,collapsible:Z}=K,{collapsedSize:ne=0,collapsible:G,maxSize:ce=100,minSize:he=0}=$.constraints,{panelSize:_e}=is(z,$,J);_e!=null&&(Z&&G&&xi(_e,j)?xi(j,ne)||U($,ne):_e<he?U($,he):_e>ce&&U($,ce))},[U]),H=y.useCallback(($,K)=>{const{direction:J}=N.current,{layout:z}=I.current;if(!b.current)return;const j=wh($,b.current);ht(j,`Drag handle element not found for id "${$}"`);const Z=NH(J,K);S({dragHandleId:$,dragHandleRect:j.getBoundingClientRect(),initialCursorPosition:Z,initialLayout:z})},[]),te=y.useCallback(()=>{S(null)},[]),se=y.useCallback($=>{const{panelDataArray:K}=I.current,J=Al(K,$);J>=0&&(K.splice(J,1),delete A.current[$.id],I.current.panelDataArrayChanged=!0,_())},[_]),B=y.useMemo(()=>({collapsePanel:O,direction:n,dragState:x,expandPanel:M,getPanelSize:L,getPanelStyle:P,groupId:v,isPanelCollapsed:V,isPanelExpanded:X,reevaluatePanelConstraints:W,registerPanel:Q,registerResizeHandle:oe,resizePanel:U,startDragging:H,stopDragging:te,unregisterPanel:se,panelGroupElement:b.current}),[O,x,n,M,L,P,v,V,X,W,Q,oe,U,H,te,se]),q={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return y.createElement(bh.Provider,{value:B},y.createElement(m,{...h,children:e,className:r,id:s,ref:b,style:{...q,...f},[hr.group]:"",[hr.groupDirection]:n,[hr.groupId]:v}))}const LH=y.forwardRef((t,e)=>y.createElement(DH,{...t,forwardedRef:e}));DH.displayName="PanelGroup";LH.displayName="forwardRef(PanelGroup)";function Al(t,e){return t.findIndex(r=>r===e||r.id===e.id)}function is(t,e,r){const n=Al(t,e),s=n===t.length-1?[n-1,n]:[n,n+1],l=r[n];return{...e.constraints,panelSize:l,pivotIndices:s}}function Ave({disabled:t,handleId:e,resizeHandler:r,panelGroupElement:n}){y.useEffect(()=>{if(t||r==null||n==null)return;const a=wh(e,n);if(a==null)return;const s=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),r(l);break}case"F6":{l.preventDefault();const c=a.getAttribute(hr.groupId);ht(c,`No group element found for id "${c}"`);const d=md(c,n),f=RH(c,e,n);ht(f!==null,`No resize element found for id "${e}"`);const m=l.shiftKey?f>0?f-1:d.length-1:f+1<d.length?f+1:0;d[m].focus();break}}};return a.addEventListener("keydown",s),()=>{a.removeEventListener("keydown",s)}},[n,t,e,r])}function MH({children:t=null,className:e="",disabled:r=!1,hitAreaMargins:n,id:a,onBlur:s,onClick:l,onDragging:c,onFocus:d,onPointerDown:f,onPointerUp:m,style:h={},tabIndex:v=0,tagName:b="div",...x}){var S,R;const w=y.useRef(null),_=y.useRef({onClick:l,onDragging:c,onPointerDown:f,onPointerUp:m});y.useEffect(()=>{_.current.onClick=l,_.current.onDragging=c,_.current.onPointerDown=f,_.current.onPointerUp=m});const A=y.useContext(bh);if(A===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:k,registerResizeHandle:N,startDragging:I,stopDragging:O,panelGroupElement:M}=A,L=HA(a),[P,V]=y.useState("inactive"),[X,Q]=y.useState(!1),[oe,U]=y.useState(null),W=y.useRef({state:P});gs(()=>{W.current.state=P}),y.useEffect(()=>{if(r)U(null);else{const B=N(L);U(()=>B)}},[r,L,N]);const H=(S=n?.coarse)!==null&&S!==void 0?S:15,te=(R=n?.fine)!==null&&R!==void 0?R:5;y.useEffect(()=>{if(r||oe==null)return;const B=w.current;ht(B,"Element ref not attached");let q=!1;return dve(L,B,C,{coarse:H,fine:te},(K,J,z)=>{if(!J){V("inactive");return}switch(K){case"down":{V("drag"),q=!1,ht(z,'Expected event to be defined for "down" action'),I(L,z);const{onDragging:j,onPointerDown:Z}=_.current;j?.(!0),Z?.();break}case"move":{const{state:j}=W.current;q=!0,j!=="drag"&&V("hover"),ht(z,'Expected event to be defined for "move" action'),oe(z);break}case"up":{V("hover"),O();const{onClick:j,onDragging:Z,onPointerUp:ne}=_.current;Z?.(!1),ne?.(),q||j?.();break}}})},[H,C,r,te,N,L,oe,I,O]),Ave({disabled:r,handleId:L,resizeHandler:oe,panelGroupElement:M});const se={touchAction:"none",userSelect:"none"};return y.createElement(b,{...x,children:t,className:e,id:a,onBlur:()=>{Q(!1),s?.()},onFocus:()=>{Q(!0),d?.()},ref:w,role:"separator",style:{...se,...h},tabIndex:v,[hr.groupDirection]:C,[hr.groupId]:k,[hr.resizeHandle]:"",[hr.resizeHandleActive]:P==="drag"?"pointer":X?"keyboard":void 0,[hr.resizeHandleEnabled]:!r,[hr.resizeHandleId]:L,[hr.resizeHandleState]:P})}MH.displayName="PanelResizeHandle";function hd({className:t,...e}){return g.jsx(LH,{"data-slot":"resizable-panel-group",className:Me("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}function ja({...t}){return g.jsx(gH,{"data-slot":"resizable-panel",...t})}function gd({withHandle:t,className:e,...r}){return g.jsx(MH,{"data-slot":"resizable-handle",className:Me("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...r,children:t&&g.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:g.jsx(lK,{className:"size-2.5"})})})}function Fd({id:t,isSelected:e,isFocused:r,icon:n,title:a,description:s,metadata:l,onClick:c,className:d}){return g.jsx("button",{id:t,type:"button",onClick:c,className:Me("w-full text-left cursor-pointer p-4 border-b dark:border-zinc-700 hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors group",e&&"bg-zinc-50 dark:bg-zinc-800 border-l-4 border-l-zinc-500",r&&"ring-2 ring-zinc-500 dark:ring-zinc-400 ring-inset",d),children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("div",{className:"flex-shrink-0 mt-1",children:g.jsx("div",{className:Me("p-2.5 rounded-full transition-colors",e?"bg-zinc-500 dark:bg-zinc-100/80 text-zinc-100 dark:text-zinc-900":"bg-gray-100 dark:bg-zinc-700 text-gray-600 dark:text-gray-400 group-hover:bg-gray-200 dark:group-hover:bg-zinc-600"),children:n})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"flex items-center gap-2 mb-1",children:g.jsx("h3",{className:Me("font-medium truncate font-mono text-sm"),children:a})}),s&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 line-clamp-2",children:s})]})]})})}function PH({className:t,...e}){return g.jsx("kbd",{"data-slot":"kbd",className:Me("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),...e})}function jH({activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabTitle:n,secondaryTabTitle:a,primaryCount:s,secondaryCount:l,secondaryIcon:c,primaryIcon:d,searchPlaceholder:f="Search...",onSearchExpand:m,onSearchChange:h,onSearchBlur:v,onTabSwitch:b,searchInputRef:x,primaryTabName:S}){const R=t===S;return g.jsxs("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:[g.jsx("div",{className:"flex items-center gap-2 flex-1",children:e?g.jsx(Or,{ref:x,placeholder:f,value:r,onChange:w=>h(w.target.value),onBlur:v,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:R?n:a}),R&&g.jsxs(g.Fragment,{children:[g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:s}),g.jsxs(Jr,{children:[g.jsx(en,{asChild:!0,children:g.jsx(et,{variant:"ghost",size:"sm",onClick:m,className:"h-8 w-8 p-0",children:g.jsx(hR,{className:"h-4 w-4"})})}),g.jsxs(tn,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(PH,{children:"F"})]})]})]})]})}),g.jsxs(et,{variant:"ghost",size:"sm",onClick:b,className:"gap-2",children:[R?g.jsx(c,{}):g.jsx(d,{}),g.jsx("span",{children:R?a:n}),R&&l>0&&g.jsx(Va,{className:"bg-purple-500/20 text-purple-600 dark:text-purple-400 border-transparent",variant:"outline",children:l})]})]})}function Cve({prompts:t,selectedPrompt:e,onPromptSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ed,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No prompts available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Fd,{id:`prompt-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(ed,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.arguments&&a.arguments.length>0&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[a.arguments.length," args"]}),onClick:()=>r(a)},a.name))})}function Nve({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredPromptsCount:n,savedPromptsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(jH,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"prompts",secondaryTabName:"saved",primaryTabTitle:"Prompts",secondaryTabTitle:"History",primaryCount:n,secondaryCount:a,primaryIcon:ed,secondaryIcon:ac,searchPlaceholder:"Search prompts...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}function kve({savedPrompts:t,selectedPrompt:e,onLoadPrompt:r,onDeletePrompt:n,focusedIndex:a}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ac,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No history"}),g.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 mt-1",children:"Prompts you execute will appear here"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((s,l)=>g.jsx(Fd,{id:`saved-prompt-${s.id}`,isSelected:e?.id===s.id,isFocused:a===l,icon:g.jsx(ac,{className:"h-4 w-4"}),title:s.name,description:`${s.promptName} - ${new Date(s.savedAt).toLocaleString()}`,onClick:()=>r(s)},s.id))})}function Ive({selectedPrompt:t,promptArgs:e,onArgChange:r}){const n=t?.arguments||[];if(!(n.length>0))return g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No arguments required"});const s=l=>{const c=l.name,d=e[c],f=typeof d=="string"?d:JSON.stringify(d);return l.type==="boolean"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("input",{id:c,type:"checkbox",checked:!!d,onChange:m=>r(c,m.target.checked),className:"rounded","aria-label":`Toggle ${c}`}),g.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:l.description})]})]},c):l.type==="number"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,type:"number",value:Number(d)||0,onChange:m=>r(c,Number(m.target.value)),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):l.type==="array"||l.type==="object"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(dh,{id:c,value:f,onChange:m=>{try{const h=JSON.parse(m.target.value);r(c,h)}catch{r(c,m.target.value)}},placeholder:l.description||`Enter ${c} as JSON`,className:"font-mono text-sm min-h-[100px]"}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,value:f,onChange:m=>r(c,m.target.value),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c)};return g.jsx("div",{className:"space-y-4",children:n.map(l=>s(l))})}function Ove({selectedPrompt:t,promptArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(et,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Di,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(mB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(et,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(mR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx(Ive,{selectedPrompt:t,promptArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a prompt to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a prompt from the list to view its details and execute it"})]})}function Dve({results:t,copiedResult:e,onCopy:r}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((n,a)=>g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2 border-b border-gray-200 dark:border-zinc-600 pb-2",children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ac,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(n.timestamp).toLocaleTimeString()})]}),n.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(td,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n.duration,"ms"]})]}),g.jsx("div",{className:"flex gap-2 ml-auto",children:g.jsx(et,{variant:"ghost",size:"sm",onClick:()=>r(a,n.result),className:"h-6 px-2",children:e===a?g.jsx(ki,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})})]}),n.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:n.error})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:n.result,filename:`prompt-result-${n.promptName}-${Date.now()}.json`})})]},a))}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(bR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}const Yz="mcp-inspector-saved-prompts";function UH({ref:t,prompts:e,callPrompt:r,serverId:n,isConnected:a}){const[s,l]=y.useState(null),[c,d]=y.useState(null),{selectedPromptName:f,setSelectedPromptName:m}=Od(),[h,v]=y.useState({}),[b,x]=y.useState([]),[S,R]=y.useState(!1),[w,_]=y.useState(null),[A,C]=y.useState(""),[k,N]=y.useState("prompts"),[I,O]=y.useState([]),[M,L]=y.useState(!1),[P,V]=y.useState(""),[X,Q]=y.useState(!1),[oe,U]=y.useState(-1),W=y.useRef(null);y.useImperativeHandle(t,()=>({focusSearch:()=>{Q(!0),setTimeout(()=>{W.current&&W.current.focus()},0)},blurSearch:()=>{C(""),Q(!1),W.current&&W.current.blur()}})),y.useEffect(()=>{try{const Z=localStorage.getItem(Yz);if(Z){const ne=JSON.parse(Z);O(ne)}}catch(Z){console.error("[PromptsTab] Failed to load saved prompts:",Z)}},[]);const H=y.useCallback(Z=>{try{localStorage.setItem(Yz,JSON.stringify(Z))}catch(ne){console.error("[PromptsTab] Failed to save prompts:",ne)}},[]);y.useEffect(()=>{X&&W.current&&W.current.focus()},[X]);const te=y.useCallback(()=>{A.trim()||Q(!1)},[A]),se=y.useMemo(()=>{if(!A.trim())return e;const Z=A.toLowerCase();return e.filter(ne=>ne.name.toLowerCase().includes(Z)||ne.description?.toLowerCase().includes(Z))},[e,A]),B=y.useCallback(Z=>{l(Z);const ne={};Z.arguments&&Z.arguments.forEach(G=>{G.default!==void 0?ne[G.name]=G.default:G.type==="string"?ne[G.name]="":G.type==="number"?ne[G.name]=0:G.type==="boolean"?ne[G.name]=!1:G.type==="array"?ne[G.name]=[]:G.type==="object"&&(ne[G.name]={})}),v(ne)},[]),q=y.useCallback(Z=>{const ne=e.find(G=>G.name===Z.promptName);ne&&(l(ne),v(Z.args),d(Z))},[e]);y.useEffect(()=>{U(-1)},[A,k]),y.useEffect(()=>{const Z=ne=>{const G=ne.target;if(G.tagName==="INPUT"||G.tagName==="TEXTAREA"||G.contentEditable==="true"||ne.metaKey||ne.ctrlKey||ne.altKey)return;const he=k==="prompts"?se:I;if(ne.key==="ArrowDown")ne.preventDefault(),U(_e=>{const ye=_e+1;return ye>=he.length?0:ye});else if(ne.key==="ArrowUp")ne.preventDefault(),U(_e=>{const ye=_e-1;return ye<0?he.length-1:ye});else if(ne.key==="Enter"&&oe>=0)if(ne.preventDefault(),k==="prompts"){const _e=se[oe];_e&&B(_e)}else{const _e=I[oe];_e&&q(_e)}};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[oe,se,I,k,B,q]),y.useEffect(()=>{if(oe>=0){const Z=k==="prompts"?`prompt-${se[oe]?.name}`:`saved-prompt-${I[oe]?.id}`,ne=document.getElementById(Z);ne&&ne.scrollIntoView({behavior:"smooth",block:"nearest"})}},[oe,se,I,k]),y.useEffect(()=>{if(console.warn("[PromptsTab] Auto-selection effect triggered:",{selectedPromptName:f,promptsCount:e.length,currentSelectedPrompt:s?.name}),f&&e.length>0){const Z=e.find(ne=>ne.name===f);if(console.warn("[PromptsTab] Prompt lookup result:",{selectedPromptName:f,promptFound:!!Z,promptName:Z?.name,shouldSelect:Z&&s?.name!==Z.name}),Z&&s?.name!==Z.name){console.warn("[PromptsTab] Selecting prompt:",Z.name),m(null);const ne=setTimeout(()=>{B(Z);const G=document.getElementById(`prompt-${Z.name}`);G&&(console.warn("[PromptsTab] Scrolling to prompt element"),G.scrollIntoView({behavior:"smooth",block:"nearest"}))},100);return()=>clearTimeout(ne)}}},[f,e,s,B,m]);const $=y.useCallback((Z,ne)=>{v(G=>({...G,[Z]:ne}))},[]),K=y.useCallback(async()=>{if(!s||S)return;R(!0);const Z=Date.now();try{const ne=await r(s.name,h),G=Date.now()-Z;jr.getInstance().capture(new qO({promptName:s.name,serverId:n,success:!0})).catch(()=>{}),x(he=>[{promptName:s.name,args:h,result:ne,timestamp:Z,duration:G},...he])}catch(ne){jr.getInstance().capture(new qO({promptName:s.name,serverId:n,success:!1,error:ne instanceof Error?ne.message:"Unknown error"})).catch(()=>{});const ce={promptName:s.name,args:h,result:null,error:ne instanceof Error?ne.message:String(ne),timestamp:Z,duration:Date.now()-Z};x(he=>[ce,...he])}finally{R(!1)}},[s,h,S,r,n]),J=y.useCallback(async(Z,ne)=>{try{await navigator.clipboard.writeText(JSON.stringify(ne,null,2)),_(Z),setTimeout(()=>_(null),2e3)}catch(G){console.error("[PromptsTab] Failed to copy result:",G)}},[]),z=y.useCallback(()=>{s&&(V(""),L(!0))},[s]),j=y.useCallback(Z=>{H(I.filter(ne=>ne.id!==Z)),c?.id===Z&&d(null)},[I,H,c]);return g.jsxs(hd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:33,className:"flex flex-col h-full relative",children:[g.jsx(Nve,{activeTab:k,isSearchExpanded:X,searchQuery:A,filteredPromptsCount:se.length,savedPromptsCount:I.length,onSearchExpand:()=>Q(!0),onSearchChange:C,onSearchBlur:te,onTabSwitch:()=>N(k==="prompts"?"saved":"prompts"),searchInputRef:W}),k==="prompts"?g.jsx(Cve,{prompts:se,selectedPrompt:s,onPromptSelect:B,focusedIndex:oe}):g.jsx(kve,{savedPrompts:I,selectedPrompt:c,onLoadPrompt:q,onDeletePrompt:j,focusedIndex:oe})]}),g.jsx(gd,{withHandle:!0}),g.jsx(ja,{defaultSize:67,children:g.jsxs(hd,{direction:"vertical",children:[g.jsx(ja,{defaultSize:40,children:g.jsx(Ove,{selectedPrompt:s,promptArgs:h,isExecuting:S,isConnected:a,onArgChange:$,onExecute:K,onSave:z})}),g.jsx(gd,{withHandle:!0}),g.jsx(ja,{defaultSize:60,children:g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(Dve,{results:b,copiedResult:w,onCopy:J})})})]})})]})}UH.displayName="PromptsTab";function ql(t){if(!t?.mimeType)return!1;const e=t.mimeType.toLowerCase();return e==="text/html"||e==="text/html+skybridge"||e==="text/uri-list"||e.startsWith("application/vnd.mcp-ui.remote-dom")}function Lve(t){return{uri:t.uri,mimeType:t.mimeType,text:t.text,blob:t.blob}}function FH({resource:t,onUIAction:e,className:r}){const n=async s=>e?.(s),a=Lve(t);return g.jsx("div",{className:r,children:g.jsx(BA,{resource:a,onUIAction:n,htmlProps:{autoResizeIframe:{width:!0,height:!0},style:{width:"100%",minHeight:"200px"},sandboxPermissions:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"},remoteDomProps:{remoteElements:[Hge,qge,Vge,Gge],library:$A}})})}function Mve({result:t,isLoading:e,previewMode:r,serverId:n,readResource:a,onTogglePreview:s,onCopy:l,onDownload:c,onFullscreen:d,isCopied:f=!1}){let m=[],h;if(t?.resourceAnnotations&&(m=Object.keys(t.resourceAnnotations).filter(S=>S.startsWith("openai/")),h=t.resourceAnnotations["openai/outputTemplate"]),t?.result?.contents?.[0]?._meta){const S=t.result.contents[0]._meta,R=Object.keys(S).filter(w=>w.startsWith("openai/"));R.length>0&&(m=[...m,...R]),!h&&S["openai/outputTemplate"]&&(h=S["openai/outputTemplate"]),!h&&t.uri&&t.uri.startsWith("ui://widget/")&&(h=t.uri)}const v=!!(m.length>0&&h&&typeof h=="string"&&n&&a);if(e)return g.jsx("div",{className:"flex absolute left-0 top-0 items-center justify-center w-full h-full",children:g.jsx(Di,{className:"size-5"})});if(!t)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a resource to view its contents"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a resource from the list to see its data"})]});if(t.error)return g.jsx("div",{className:"p-4",children:g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:t.error})]})});const b=t?.result?.contents&&Array.isArray(t.result.contents)&&t.result.contents.some(S=>S.mimeType&&ql(S)),x=b?t.result.contents.filter(S=>S.mimeType&&ql(S)):[];return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"flex-shrink-0 px-4 py-3 border-b border-gray-200 dark:border-zinc-700 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ac,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(t.timestamp).toLocaleTimeString()})]}),(()=>{const S=t?.duration??t.result?.duration??t.result?.metrics?.durationMs;return S!==void 0?g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(td,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[S,"ms"]})]}):null})(),b&&g.jsx(Va,{variant:"outline",className:"text-xs bg-purple-50 dark:bg-purple-900/20 border-none border-purple-200 dark:border-purple-800/50 text-purple-600 dark:text-purple-400",children:"MCP UI"}),v&&g.jsx(Va,{variant:"outline",className:"text-xs bg-blue-50 dark:bg-blue-900/20 border-none border-blue-200 dark:border-blue-800/50 text-blue-600 dark:text-blue-400",children:"OpenAI Widget"})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[(b||v)&&g.jsxs(et,{variant:"ghost",size:"sm",onClick:s,className:r?"":"text-purple-600 dark:text-purple-400",children:[r?g.jsx(UY,{className:"h-4 w-4 mr-1"}):g.jsx(NY,{className:"h-4 w-4 mr-1"}),r?"JSON":v?"Component":"Preview"]}),g.jsx(et,{variant:"ghost",size:"sm",onClick:l,children:f?g.jsx(ki,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})}),g.jsx(et,{variant:"ghost",size:"sm",onClick:c,children:g.jsx(dB,{className:"h-4 w-4"})}),g.jsx(et,{variant:"ghost",size:"sm",onClick:d,children:g.jsx(pK,{className:"h-4 w-4"})})]})]}),g.jsx("div",{className:"flex-1 overflow-y-auto",children:v&&n&&a&&h?r?g.jsx("div",{className:"flex-1 h-full",children:g.jsx(PA,{componentUrl:h,toolName:t.uri,toolArgs:{},toolResult:t.result,serverId:n,readResource:a,className:"w-full h-full relative flex p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})}):b?r?g.jsxs("div",{className:"space-y-0 h-full",children:[x.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx("div",{className:"w-full h-full",children:g.jsx(FH,{resource:S,className:"w-full h-full"})})},`mcp-ui-${S.uri||`resource-${Date.now()}-${Math.random()}`}`)),(()=>{if(t.result.contents&&Array.isArray(t.result.contents)){const S=t.result.contents.filter(R=>!(R.mimeType&&ql(R)));if(S.length>0)return g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:S,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-non-ui-${Date.now()}.json`})})}return null})()]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})})})]})}function Pve(t,e){if(!t&&!e)return g.jsx(rK,{className:"h-5 w-5"});const r=(t||e||"").toLowerCase();return r.includes("image")?g.jsx(JY,{className:"h-5 w-5"}):r.includes("json")||r.includes("javascript")||r.includes("typescript")?g.jsx(XY,{className:"h-5 w-5"}):r.includes("html")||r.includes("xml")?g.jsx(oK,{className:"h-5 w-5"}):r.includes("database")||r.includes("sql")?g.jsx($m,{className:"h-5 w-5"}):g.jsx(pR,{className:"h-5 w-5"})}function jve({resources:t,selectedResource:e,onResourceSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx($m,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No resources available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>{const l=Pve(a.mimeType,a.uri),c=[a.description,a.mimeType&&g.jsx("span",{className:"font-mono",children:a.mimeType},"mime")].filter(Boolean);return g.jsx(Fd,{id:`resource-${a.uri}`,isSelected:e?.uri===a.uri,isFocused:n===s,icon:l,title:a.name,description:c.length>0?g.jsxs("span",{className:"flex flex-col gap-1",children:[a.description&&g.jsx("span",{children:a.description}),a.mimeType&&g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500 font-mono",children:a.mimeType})]}):void 0,onClick:()=>r(a)},a.uri)})})}function Uve({isSearchExpanded:t,searchQuery:e,filteredResourcesCount:r,onSearchExpand:n,onSearchChange:a,onSearchBlur:s,searchInputRef:l}){return g.jsx("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:g.jsx("div",{className:"flex items-center gap-2 flex-1",children:t?g.jsx(Or,{ref:l,placeholder:"Search resources...",value:e,onChange:c=>a(c.target.value),onBlur:s,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:"Resources"}),g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:r}),g.jsxs(Jr,{children:[g.jsx(en,{asChild:!0,children:g.jsx(et,{variant:"ghost",size:"sm",onClick:n,className:"h-8 w-8 p-0",children:g.jsx(hR,{className:"h-4 w-4"})})}),g.jsxs(tn,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(PH,{children:"F"})]})]})]})})})}function zH({ref:t,resources:e,readResource:r,serverId:n,isConnected:a}){const[s,l]=y.useState(null),{selectedResourceUri:c,setSelectedResourceUri:d}=Od(),[f,m]=y.useState(null),[h,v]=y.useState(!1),[b,x]=y.useState(""),[S]=y.useState("resources"),[R,w]=y.useState(!0),[_,A]=y.useState(!1),[C,k]=y.useState(-1),[N,I]=y.useState(!1),O=y.useRef(null),M=y.useRef(null);y.useImperativeHandle(t,()=>({focusSearch:()=>{A(!0),setTimeout(()=>{O.current&&O.current.focus()},0)},blurSearch:()=>{x(""),A(!1),O.current&&O.current.blur()}})),y.useEffect(()=>{_&&O.current&&O.current.focus()},[_]);const L=y.useCallback(()=>{b.trim()||A(!1)},[b]),P=y.useMemo(()=>{if(!b)return e;const U=b.toLowerCase();return e.filter(W=>W.name.toLowerCase().includes(U)||W.description?.toLowerCase().includes(U)||W.uri.toLowerCase().includes(U))},[e,b]),V=y.useCallback(async U=>{if(l(U),a){v(!0);const W=Date.now();try{const H=await r(U.uri);jr.getInstance().capture(new BO({resourceUri:U.uri,serverId:n,success:!0})).catch(()=>{}),m({uri:U.uri,result:H,timestamp:W,resourceAnnotations:U.annotations})}catch(H){jr.getInstance().capture(new BO({resourceUri:U.uri,serverId:n,success:!1,error:H instanceof Error?H.message:"Unknown error"})).catch(()=>{}),m({uri:U.uri,result:null,error:H instanceof Error?H.message:"Unknown error",timestamp:W,resourceAnnotations:U.annotations})}finally{v(!1)}}},[r,n,a]);y.useEffect(()=>{k(-1)},[b,S]),y.useEffect(()=>{const U=W=>{const H=W.target;if(H.tagName==="INPUT"||H.tagName==="TEXTAREA"||H.contentEditable==="true"||W.metaKey||W.ctrlKey||W.altKey)return;const se=P;if(W.key==="ArrowDown")W.preventDefault(),k(B=>{const q=B+1;return q>=se.length?0:q});else if(W.key==="ArrowUp")W.preventDefault(),k(B=>{const q=B-1;return q<0?se.length-1:q});else if(W.key==="Enter"&&C>=0){W.preventDefault();const B=P[C];B&&V(B)}};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[C,P,V]),y.useEffect(()=>{if(C>=0){const U=`resource-${P[C]?.uri}`,W=document.getElementById(U);W&&W.scrollIntoView({behavior:"smooth",block:"nearest"})}},[C,P]),y.useEffect(()=>{if(c&&e.length>0){const U=e.find(W=>W.uri===c);U&&s?.uri!==U.uri&&(d(null),setTimeout(()=>{V(U);const W=document.getElementById(`resource-${U.uri}`);W&&W.scrollIntoView({behavior:"smooth",block:"nearest"})},100))}},[c,e,s,V,d]);const X=y.useCallback(async()=>{if(f)try{await navigator.clipboard.writeText(JSON.stringify(f.result,null,2)),I(!0),setTimeout(()=>I(!1),2e3)}catch(U){console.error("[ResourcesTab] Failed to copy result:",U)}},[f]),Q=y.useCallback(()=>{if(f)try{const U=new globalThis.Blob([JSON.stringify(f.result,null,2)],{type:"application/json"}),W=URL.createObjectURL(U),H=document.createElement("a");H.href=W,H.download=`resource-${Date.now()}.json`,document.body.appendChild(H),H.click(),document.body.removeChild(H),URL.revokeObjectURL(W)}catch(U){console.error("[ResourcesTab] Failed to download result:",U)}},[f]),oe=y.useCallback(async()=>{if(M.current)try{document.fullscreenElement?await document.exitFullscreen():await M.current.requestFullscreen()}catch(U){console.error("[ResourcesTab] Failed to toggle fullscreen:",U)}},[]);return g.jsxs(hd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:25,children:[g.jsx(Uve,{activeTab:S,isSearchExpanded:_,searchQuery:b,filteredResourcesCount:P.length,onSearchExpand:()=>A(!0),onSearchChange:x,onSearchBlur:L,onTabSwitch:()=>{},searchInputRef:O}),g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(jve,{resources:P,selectedResource:s,onResourceSelect:V,focusedIndex:C})})]}),g.jsx(gd,{}),g.jsx(ja,{defaultSize:50,children:g.jsx("div",{ref:M,className:"h-full bg-white dark:bg-zinc-900",children:g.jsx(Mve,{result:f,isLoading:h,previewMode:R,serverId:n,readResource:r,onTogglePreview:()=>w(!R),onCopy:X,onDownload:Q,onFullscreen:oe,isCopied:N})})})]})}zH.displayName="ResourcesTab";function Fve({savedRequests:t,selectedRequest:e,onLoadRequest:r,onDeleteRequest:n,focusedIndex:a}){if(t.length===0)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx($m,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"No saved requests yet"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Execute a tool and click Save to store requests"})]});const s=(l,c)=>{l.stopPropagation(),c()};return g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((l,c)=>g.jsxs("div",{className:"relative group",children:[g.jsx(Fd,{id:`saved-${l.id}`,isSelected:e?.id===l.id,isFocused:a===c,icon:g.jsx(fB,{className:"h-4 w-4"}),title:l.name,description:l.toolName,metadata:g.jsx("div",{className:"flex flex-col gap-1",children:g.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:new Date(l.savedAt).toLocaleString()})}),onClick:()=>r(l)}),g.jsx("div",{className:"absolute top-1/2 right-2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-10",children:g.jsxs(Jr,{children:[g.jsx(en,{asChild:!0,children:g.jsx(et,{variant:"secondary",size:"sm",onClick:d=>s(d,()=>n(l.id)),className:"h-8 w-8 p-0",children:g.jsx(H_,{className:"h-4 w-4"})})}),g.jsx(tn,{children:g.jsx("p",{children:"Delete saved request"})})]})})]},l.id))})}function zve({isOpen:t,requestName:e,defaultPlaceholder:r,onRequestNameChange:n,onSave:a,onCancel:s}){return t?g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:s,children:g.jsxs("div",{className:"bg-white dark:bg-zinc-800 rounded-lg p-6 w-[400px] shadow-xl border border-gray-200 dark:border-zinc-700",onClick:l=>l.stopPropagation(),children:[g.jsx("h3",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-gray-100",children:"Save Request"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx(lr,{htmlFor:"request-name",children:"Request Name (optional)"}),g.jsx(Or,{id:"request-name",value:e,onChange:l=>n(l.target.value),placeholder:r,className:"mt-2",onKeyDown:l=>{l.key==="Enter"&&a()},autoFocus:!0})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(et,{variant:"outline",onClick:s,children:"Cancel"}),g.jsxs(et,{onClick:a,children:[g.jsx(mR,{className:"h-4 w-4 mr-2"}),"Save"]})]})]})]})}):null}function $ve({selectedTool:t,toolArgs:e,onArgChange:r}){const n=t?.inputSchema?.properties||{},a=t?.inputSchema?.required||[];return Object.keys(n).length>0?g.jsx("div",{className:"space-y-4",children:Object.entries(n).map(([l,c])=>{const d=c;d.required=a.includes(l);const f=e[l];let m="";return f!=null&&(typeof f=="string"?m=f:m=JSON.stringify(f,null)),d.type==="object"||d.type==="array"||typeof f=="object"&&f!==null?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(dh,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`,className:"min-h-[100px]"}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l)})}):g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No parameters required"})}function Bve({selectedTool:t,toolArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(et,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Di,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(mB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(et,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(mR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx($ve,{selectedTool:t,toolArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a tool to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a tool from the list to view its details and execute it"})]})}function qve({results:t,copiedResult:e,previewMode:r,serverId:n,readResource:a,onCopy:s,onTogglePreview:l}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((c,d)=>{const f=c.toolMeta?.["openai/outputTemplate"],m=!!(f&&typeof f=="string"&&c.appsSdkResource),h=f,v=c.result?.content||[],b=v.filter(S=>S.type==="resource"&&ql(S.resource)),x=b.length>0;return g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:`flex items-center gap-2 px-4 pt-2 ${x||m?"border-b border-gray-200 dark:border-zinc-600 pb-2":""}`,children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ac,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(td,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c.duration,"ms"]})]}),m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",h||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Component"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"Raw JSON"})]})]}),x&&!m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",b[0]?.resource?.uri||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Preview"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"JSON"})]})]}),g.jsx(et,{variant:"ghost",size:"sm",onClick:()=>s(d,c.result),className:"ml-auto",children:e===d?g.jsx(ki,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})]}),c.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:c.error})]}):(()=>{if(m){const S=c.appsSdkResource;return S.isLoading?g.jsx(g.Fragment,{}):S.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Resource Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:S.error})]}):r?g.jsx("div",{className:"flex-1",children:g.jsx(PA,{componentUrl:h,toolName:c.toolName,toolArgs:c.args,toolResult:c.result,resource:S.resourceData,serverId:n,readResource:a,className:"w-full h-full relative p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})}return x?r?g.jsxs("div",{className:"space-y-0 h-full",children:[b.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx(FH,{resource:S.resource,onUIAction:w=>{},className:"w-full h-full relative"})},R)),v.filter(S=>!(S.type==="resource"&&ql(S.resource))).length>0&&g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:v.filter(S=>!(S.type==="resource"&&ql(S.resource))),filename:`tool-result-${c.toolName}-non-ui-${Date.now()}.json`})})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})})()]},d)})}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(bR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}function Hve({tools:t,selectedTool:e,onToolSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(Ss,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No tools available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Fd,{id:`tool-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(Ss,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.inputSchema?.properties&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[Object.keys(a.inputSchema.properties).length," params"]}),onClick:()=>r(a)},a.name))})}function Vve({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredToolsCount:n,savedRequestsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(jH,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"tools",secondaryTabName:"saved",primaryTabTitle:"Tools",secondaryTabTitle:"Saved",primaryCount:n,secondaryCount:a,primaryIcon:Ss,secondaryIcon:$m,searchPlaceholder:"Search tools...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}const Kz="mcp-inspector-saved-requests";function $H({ref:t,tools:e,callTool:r,readResource:n,serverId:a,isConnected:s}){const[l,c]=y.useState(null),[d,f]=y.useState(null),{selectedToolName:m,setSelectedToolName:h}=Od(),[v,b]=y.useState({}),[x,S]=y.useState([]),[R,w]=y.useState(!1),[_,A]=y.useState(null),[C,k]=y.useState(""),[N,I]=y.useState("tools"),[O,M]=y.useState([]),[L,P]=y.useState(!1),[V,X]=y.useState(""),[Q,oe]=y.useState(!0),[U,W]=y.useState(!1),[H,te]=y.useState(-1),se=y.useRef(null);y.useImperativeHandle(t,()=>({focusSearch:()=>{W(!0),setTimeout(()=>{se.current&&se.current.focus()},0)},blurSearch:()=>{k(""),W(!1),se.current&&se.current.blur()}})),y.useEffect(()=>{try{const ye=localStorage.getItem(Kz);ye&&M(JSON.parse(ye))}catch(ye){console.error("[ToolsTab] Failed to load saved requests:",ye)}},[]);const B=y.useCallback(ye=>{try{localStorage.setItem(Kz,JSON.stringify(ye)),M(ye)}catch(Se){console.error("[ToolsTab] Failed to save requests:",Se)}},[]),q=y.useMemo(()=>{if(!C.trim())return e;const ye=C.toLowerCase();return e.filter(Se=>Se.name.toLowerCase().includes(ye)||Se.description?.toLowerCase().includes(ye))},[e,C]),$=y.useCallback(ye=>{c(ye);const Se={};ye.inputSchema?.properties&&Object.entries(ye.inputSchema.properties).forEach(([Ne,ge])=>{const ke=ge;ke.default!==void 0?Se[Ne]=ke.default:ke.type==="string"?Se[Ne]="":ke.type==="number"?Se[Ne]=0:ke.type==="boolean"?Se[Ne]=!1:ke.type==="array"?Se[Ne]=[]:ke.type==="object"&&(Se[Ne]={})}),b(Se)},[]),K=y.useCallback(ye=>{const Se=e.find(Ne=>Ne.name===ye.toolName);Se&&(c(Se),b(ye.args),f(ye))},[e]);y.useEffect(()=>{U&&se.current&&se.current.focus()},[U]);const J=y.useCallback(()=>{C.trim()||W(!1)},[C]);y.useEffect(()=>{N!=="tools"&&W(!1)},[N]),y.useEffect(()=>{te(-1)},[C,N]),y.useEffect(()=>{const ye=Se=>{const Ne=Se.target;if(Ne.tagName==="INPUT"||Ne.tagName==="TEXTAREA"||Ne.contentEditable==="true"||Se.metaKey||Se.ctrlKey||Se.altKey)return;const ke=N==="tools"?q:O;if(Se.key==="ArrowDown")Se.preventDefault(),te(Oe=>{const Xe=Oe+1;return Xe>=ke.length?0:Xe});else if(Se.key==="ArrowUp")Se.preventDefault(),te(Oe=>{const Xe=Oe-1;return Xe<0?ke.length-1:Xe});else if(Se.key==="Enter"&&H>=0)if(Se.preventDefault(),N==="tools"){const Oe=q[H];Oe&&$(Oe)}else{const Oe=O[H];Oe&&K(Oe)}};return document.addEventListener("keydown",ye),()=>document.removeEventListener("keydown",ye)},[H,q,O,N,$,K]),y.useEffect(()=>{if(H>=0){const ye=N==="tools"?`tool-${q[H]?.name}`:`saved-${O[H]?.id}`,Se=document.getElementById(ye);Se&&Se.scrollIntoView({behavior:"smooth",block:"nearest"})}},[H,q,O,N]),y.useEffect(()=>{if(m&&e.length>0){const ye=e.find(Se=>Se.name===m);if(ye&&l?.name!==ye.name){h(null);const Se=setTimeout(()=>{$(ye);const Ne=document.getElementById(`tool-${ye.name}`);Ne&&Ne.scrollIntoView({behavior:"smooth",block:"nearest"})},100);return()=>clearTimeout(Se)}}},[m,e,l,$,h]);const z=y.useCallback((ye,Se)=>{b(Ne=>{const ge={...Ne};if(l?.inputSchema?.properties?.[ye])if(l.inputSchema.properties[ye].type==="string")ge[ye]=Se;else try{ge[ye]=JSON.parse(Se)}catch{ge[ye]=Se}else try{ge[ye]=JSON.parse(Se)}catch{ge[ye]=Se}return ge})},[l]),j=y.useCallback(async()=>{if(!l||R)return;w(!0);const ye=Date.now();try{const Se=await r(l.name,v),Ne=Date.now()-ye;jr.getInstance().capture(new $O({toolName:l.name,serverId:a,success:!0,duration:Ne})).catch(()=>{});const ke=l?._meta||l?.metadata,Oe=ke?.["openai/outputTemplate"];let Xe;if(Oe&&typeof Oe=="string"){const ot={toolName:l.name,args:v,result:Se,timestamp:ye,duration:Ne,toolMeta:ke,appsSdkResource:{uri:Oe,resourceData:null,isLoading:!0}};S([ot]);try{const $e=await n(Oe);let We=null;if(Se?.structuredContent)We=Se.structuredContent;else if(Array.isArray(Se)&&Se[0]){const Ae=Se[0];Ae.output?.value?.structuredContent?We=Ae.output.value.structuredContent:Ae.structuredContent?We=Ae.structuredContent:Ae.output?.value&&(We=Ae.output.value)}We||(We=Se),Xe={uri:Oe,resourceData:{...$e,structuredContent:We},isLoading:!1}}catch($e){Xe={uri:Oe,resourceData:null,isLoading:!1,error:$e instanceof Error?$e.message:String($e)}}S($e=>$e.map((We,Ae)=>Ae===0?{...We,appsSdkResource:Xe}:We))}else S(ot=>[{toolName:l.name,args:v,result:Se,timestamp:ye,duration:Ne,toolMeta:ke},...ot])}catch(Se){const Ne=Date.now()-ye;jr.getInstance().capture(new $O({toolName:l.name,serverId:a,success:!1,duration:Ne,error:Se instanceof Error?Se.message:String(Se)})).catch(()=>{});const ke=l?._meta||l?.metadata,Oe={toolName:l.name,args:v,result:null,error:Se instanceof Error?Se.message:String(Se),timestamp:ye,duration:Ne,toolMeta:ke},Xe=ke?.["openai/outputTemplate"];S(Xe?[Oe]:ot=>[Oe,...ot])}finally{w(!1)}},[l,v,R,r,n,a]),Z=y.useCallback(async(ye,Se)=>{try{await navigator.clipboard.writeText(JSON.stringify(Se,null,2)),A(ye),setTimeout(()=>A(null),2e3)}catch(Ne){console.error("[ToolsTab] Failed to copy result:",Ne)}},[]),ne=y.useCallback(ye=>{S(Se=>Se.filter((Ne,ge)=>ge!==ye))},[]),G=y.useCallback(ye=>{const Se=x[ye];if(Se){const Ne=window.open("","_blank","width=800,height=600");Ne&&(Ne.document.write(`
|
|
1424
|
+
`);A=N.pop()||"";for(const I of N)if(I.trim()&&I.startsWith("data: "))try{const O=JSON.parse(I.slice(6));if(console.log("[Client received event]",O.type,O.toolName||O.content?.slice?.(0,30)),O.type==="message")console.log("[Message started]",O.id);else if(O.type==="text"){S+=O.content;const M=R[R.length-1];M&&M.type==="text"?M.text=S:R.push({type:"text",text:S}),console.log("[Parts after text]",R.length,"parts, text length:",S.length),s(L=>L.map(P=>P.id===x?{...P,parts:[...R]}:P))}else if(O.type==="tool-call")S&&(S=""),R.push({type:"tool-invocation",toolInvocation:{toolName:O.toolName,args:O.args,state:"pending"}}),console.log("[Parts after tool-call]",R.length,"parts, tool:",O.toolName),s(M=>M.map(L=>L.id===x?{...L,parts:[...R]}:L));else if(O.type==="tool-result"){const M=R.find(L=>L.type==="tool-invocation"&&L.toolInvocation?.toolName===O.toolName&&!L.toolInvocation?.result);M&&M.toolInvocation?(M.toolInvocation.result=O.result,M.toolInvocation.state="result",console.log("[Parts after tool-result]",R.length,"parts, updated:",O.toolName),s(L=>L.map(P=>P.id===x?{...P,parts:[...R]}:P))):console.warn("[tool-result] Could not find matching tool part for",O.toolName)}else if(O.type==="done")console.log("[Done] Final parts:",R.length),s(M=>M.map(L=>L.id===x?{...L,parts:[...R],content:""}:L));else if(O.type==="error")throw new Error(O.message||"Streaming error")}catch(O){console.error("Failed to parse streaming event:",O,I)}}}catch(v){let b="Unknown error occurred";if(v instanceof Error){b=v.message;const S=v;S.status&&(b=`HTTP ${S.status}: ${b}`),(S.code===401||b.includes("401")||b.includes("Unauthorized"))&&(b="Authentication failed (401). Check your Authorization header in the connection settings.")}const x={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${b}`,timestamp:Date.now()};s(S=>[...S,x])}finally{c(!1)}},[e,n,t,a,r]),f=y.useCallback(()=>{s([])},[]);return{messages:a,isLoading:l,sendMessage:d,clearMessages:f}}function Xge({connection:t,llmConfig:e,isConnected:r,readResource:n}){const[a,s]=y.useState([]),[l,c]=y.useState(!1),d=y.useRef(null),f=y.useRef(null),m=y.useRef(null),h=y.useCallback(async b=>{if(!b.trim()||!e||!r)return;const x={id:`user-${Date.now()}`,role:"user",content:b.trim(),timestamp:Date.now()};s(w=>[...w,x]),c(!0),d.current=new AbortController;const S=Date.now();let R=0;try{const w=`assistant-${Date.now()}`;let _="";const A=[];if(s(C=>[...C,{id:w,role:"assistant",content:"",timestamp:Date.now(),parts:[]}]),!m.current||m.current.provider!==e.provider||m.current.model!==e.model||m.current.apiKey!==e.apiKey){let C;if(e.provider==="openai"){const{ChatOpenAI:k}=await cs(async()=>{const{ChatOpenAI:N}=await import("./index-_hgOYkid.js");return{ChatOpenAI:N}},__vite__mapDeps([4,5,6,2,7]));C=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="anthropic"){const{ChatAnthropic:k}=await cs(async()=>{const{ChatAnthropic:N}=await import("./index-DmXcJzte.js");return{ChatAnthropic:N}},__vite__mapDeps([8,5,6,2]));C=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else if(e.provider==="google"){const{ChatGoogleGenerativeAI:k}=await cs(async()=>{const{ChatGoogleGenerativeAI:N}=await import("./index-BY2VQcZu.js");return{ChatGoogleGenerativeAI:N}},__vite__mapDeps([9,5,6,2,7]));C=new k({model:e.model,apiKey:e.apiKey,temperature:e.temperature??.7})}else throw new Error(`Unsupported LLM provider: ${e.provider}`);m.current={instance:C,provider:e.provider,model:e.model,apiKey:e.apiKey}}if(!f.current||f.current.llm!==m.current.instance){const{MCPAgent:C}=await cs(async()=>{const{MCPAgent:k}=await import("./langfuse-C4HKZ3NL-B_IaVRkH.js").then(N=>N.c);return{MCPAgent:k}},__vite__mapDeps([10,6,2,1,3]));f.current=new C({llm:m.current.instance,client:t.client,memoryEnabled:!0,systemPrompt:"You are a helpful assistant with access to MCP tools, prompts, and resources. Help users interact with the MCP server."}),await f.current.initialize()}else console.log("[useChatMessagesClientSide] Reusing existing agent. History length:",f.current.conversationHistory?.length);for await(const C of f.current.streamEvents(b,10,!1,void 0)){if(d.current?.signal.aborted)break;if(C.event==="on_chat_model_stream"&&C.data?.chunk?.text){const k=C.data.chunk.text;if(typeof k=="string"&&k.length>0){_+=k;const N=A[A.length-1];N&&N.type==="text"?N.text=_:A.push({type:"text",text:_}),s(I=>I.map(O=>O.id===w?{...O,parts:[...A]}:O))}}else if(C.event==="on_tool_start"){_&&(_="");let k={};C.data?.input?k=C.data.input:C.data?.tool_input?k=C.data.tool_input:C.data&&(k=C.data),console.log("[useChatMessagesClientSide] on_tool_start:",{toolName:C.name,eventData:C.data,extractedArgs:k}),R++,A.push({type:"tool-invocation",toolInvocation:{toolName:C.name||"unknown",args:k,state:"pending"}}),s(N=>N.map(I=>I.id===w?{...I,parts:[...A]}:I))}else if(C.event==="on_tool_end"){const k=A.find(N=>N.type==="tool-invocation"&&N.toolInvocation?.toolName===C.name&&!N.toolInvocation?.result);if(console.log("[useChatMessagesClientSide] on_tool_end event:",{toolName:C.name,hasToolPart:!!k,output:C.data?.output}),k&&k.toolInvocation){let N=C.data?.output;if(N?.kwargs?.content&&typeof N.kwargs.content=="string")try{N=JSON.parse(N.kwargs.content)}catch(O){console.warn("[useChatMessagesClientSide] Failed to parse kwargs.content:",O),N=N.kwargs.content}else if(N?.content&&typeof N.content=="string")try{N=JSON.parse(N.content)}catch{N=N.content}k.toolInvocation.result=N,k.toolInvocation.state="result";const I=N?._meta?.["openai/outputTemplate"];if(console.log("[useChatMessagesClientSide] Tool result:",{toolName:C.name,hasMeta:!!N?._meta,hasStructuredContent:!!N?.structuredContent,appsSdkUri:I}),I&&typeof I=="string"&&n){console.log("[useChatMessagesClientSide] Detected Apps SDK component, fetching resource:",I);try{const O=await n(I);console.log("[useChatMessagesClientSide] Resource fetched:",O);const M=N?.structuredContent||null;if(O?.contents&&Array.isArray(O.contents)){const L=O.contents.map(V=>({type:"resource",resource:V}));console.log("[useChatMessagesClientSide] Created MCP resources:",L);const P={...N,content:[...N.content||[],...L],structuredContent:M};k.toolInvocation.result=P,console.log("[useChatMessagesClientSide] Updated result with resources")}else console.warn("[useChatMessagesClientSide] No contents in resourceData:",O)}catch(O){console.error("Failed to fetch Apps SDK resource:",O)}}s(O=>O.map(M=>M.id===w?{...M,parts:[...A]}:M))}}}s(C=>C.map(k=>k.id===w?{...k,parts:[...A],content:""}:k)),e&&jr.getInstance().capture(new HO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!0,executionMode:"client-side",duration:Date.now()-S})).catch(()=>{})}catch(w){console.error("Client-side agent error:",w);let _="Unknown error occurred";if(w instanceof Error){_=w.message;const C=w;C.status&&(_=`HTTP ${C.status}: ${_}`),(C.code===401||_.includes("401")||_.includes("Unauthorized"))&&(_="Authentication failed (401). Check your Authorization header in the connection settings.")}e&&jr.getInstance().capture(new HO({serverId:t.url,provider:e.provider,model:e.model,messageCount:a.length+1,toolCallsCount:R,success:!1,executionMode:"client-side",duration:Date.now()-S,error:_})).catch(()=>{});const A={id:`error-${Date.now()}`,role:"assistant",content:`Error: ${_}`,timestamp:Date.now()};s(C=>[...C,A])}finally{c(!1),d.current=null}},[t,e,r,a,n]),v=y.useCallback(()=>{s([]),f.current&&f.current.clearConversationHistory()},[]);return{messages:a,isLoading:l,sendMessage:h,clearMessages:v}}const Fz={openai:"gpt-4o",anthropic:"claude-haiku-4-5-20251001",google:"gemini-2.5-flash"};function Qge({mcpServerUrl:t}){const[e,r]=y.useState(null),[n,a]=y.useState(null),[s,l]=y.useState(!1),[c,d]=y.useState("openai"),[f,m]=y.useState(""),[h,v]=y.useState(Fz.openai),[b,x]=y.useState("none"),[S,R]=y.useState(""),[w,_]=y.useState(""),[A,C]=y.useState("");y.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-llm-config");if(I)try{const O=JSON.parse(I);r(O),d(O.provider),m(O.apiKey),v(O.model)}catch(O){console.error("Failed to load LLM config:",O)}},[]),y.useEffect(()=>{const I=localStorage.getItem("mcp-inspector-auth-config");if(I)try{const O=JSON.parse(I);a(O),x(O.type),O.username&&R(O.username),O.password&&_(O.password),O.token&&C(O.token)}catch(O){console.error("Failed to load auth config:",O)}else try{const O="mcp:auth",M=mH(t),L=`${O}_${M}_tokens`;localStorage.getItem(L)&&(a({type:"oauth"}),x("oauth"))}catch(O){console.error("Failed to check for OAuth tokens:",O)}},[t]),y.useEffect(()=>{v(Fz[c])},[c]);const k=y.useCallback(()=>{if(!f.trim())return;const I={provider:c,apiKey:f,model:h},O={type:b,...b==="basic"&&{username:S.trim(),password:w.trim()},...b==="bearer"&&{token:A.trim()}};r(I),a(O),localStorage.setItem("mcp-inspector-llm-config",JSON.stringify(I)),localStorage.setItem("mcp-inspector-auth-config",JSON.stringify(O)),l(!1)},[c,f,h,b,S,w,A]),N=y.useCallback(()=>{r(null),a(null),m(""),R(""),_(""),C(""),x("none"),localStorage.removeItem("mcp-inspector-llm-config"),localStorage.removeItem("mcp-inspector-auth-config")},[]);return{llmConfig:e,authConfig:n,configDialogOpen:s,setConfigDialogOpen:l,tempProvider:c,setTempProvider:d,tempApiKey:f,setTempApiKey:m,tempModel:h,setTempModel:v,tempAuthType:b,saveLLMConfig:k,clearConfig:N}}function Jge({connection:t,isConnected:e,useClientSide:r=!0,readResource:n}){const[a,s]=y.useState(""),l=y.useRef(null),{llmConfig:c,authConfig:d,configDialogOpen:f,setConfigDialogOpen:m,tempProvider:h,setTempProvider:v,tempApiKey:b,setTempApiKey:x,tempModel:S,setTempModel:R,saveLLMConfig:w,clearConfig:_}=Qge({mcpServerUrl:t.url}),A={connection:t,llmConfig:c,isConnected:e,readResource:n},C=Zge({mcpServerUrl:t.url,llmConfig:c,authConfig:d,isConnected:e}),k=Xge(A),{messages:N,isLoading:I,sendMessage:O,clearMessages:M}=r?k:C;k4({onNewChat:M}),y.useEffect(()=>{c&&N.length===0&&l.current&&l.current.focus()},[c,N.length]),y.useEffect(()=>{!I&&N.length>0&&l.current&&l.current.focus()},[I,N.length]);const L=y.useCallback(()=>{a.trim()&&(O(a),s(""))},[a,O]),P=y.useCallback(X=>{X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),L())},[L]),V=y.useCallback(()=>{_(),M()},[_,M]);return c&&N.length===0?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"absolute top-4 right-4 z-10",children:g.jsx(Eq,{open:f,onOpenChange:m,tempProvider:h,tempModel:S,tempApiKey:b,onProviderChange:v,onModelChange:R,onApiKeyChange:x,onSave:w,onClear:V,showClearButton:!0,buttonLabel:"Change API Key"})}),g.jsx(Yoe,{mcpServerUrl:t.url,inputValue:a,isConnected:e,isLoading:I,textareaRef:l,llmConfig:c,onInputChange:s,onKeyDown:P,onSubmit:X=>{X.preventDefault(),L()},onConfigDialogOpenChange:m})]}):g.jsxs("div",{className:"flex flex-col h-full relative",children:[g.jsx(Voe,{llmConfig:c,hasMessages:N.length>0,configDialogOpen:f,onConfigDialogOpenChange:m,onClearChat:M,tempProvider:h,tempModel:S,tempApiKey:b,onProviderChange:v,onModelChange:R,onApiKeyChange:x,onSaveConfig:w,onClearConfig:V}),g.jsx("div",{className:"flex-1 overflow-y-auto p-4 pt-[100px]",children:c?g.jsx(Kge,{messages:N,isLoading:I,serverId:t.url,readResource:n}):g.jsx(Koe,{onConfigureClick:()=>m(!0)})}),c&&g.jsx(Goe,{inputValue:a,isConnected:e,isLoading:I,textareaRef:l,onInputChange:s,onKeyDown:P,onSendMessage:L})]})}const bh=y.createContext(null);bh.displayName="PanelGroupContext";const hr={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},qA=10,gs=y.useLayoutEffect,zz=jm.useId,eve=typeof zz=="function"?zz:()=>null;let tve=0;function HA(t=null){const e=eve(),r=y.useRef(t||e||null);return r.current===null&&(r.current=""+tve++),t??r.current}function hH({children:t,className:e="",collapsedSize:r,collapsible:n,defaultSize:a,forwardedRef:s,id:l,maxSize:c,minSize:d,onCollapse:f,onExpand:m,onResize:h,order:v,style:b,tagName:x="div",...S}){const R=y.useContext(bh);if(R===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:_,getPanelSize:A,getPanelStyle:C,groupId:k,isPanelCollapsed:N,reevaluatePanelConstraints:I,registerPanel:O,resizePanel:M,unregisterPanel:L}=R,P=HA(l),V=y.useRef({callbacks:{onCollapse:f,onExpand:m,onResize:h},constraints:{collapsedSize:r,collapsible:n,defaultSize:a,maxSize:c,minSize:d},id:P,idIsFromProps:l!==void 0,order:v});y.useRef({didLogMissingDefaultSizeWarning:!1}),gs(()=>{const{callbacks:Q,constraints:oe}=V.current,U={...oe};V.current.id=P,V.current.idIsFromProps=l!==void 0,V.current.order=v,Q.onCollapse=f,Q.onExpand=m,Q.onResize=h,oe.collapsedSize=r,oe.collapsible=n,oe.defaultSize=a,oe.maxSize=c,oe.minSize=d,(U.collapsedSize!==oe.collapsedSize||U.collapsible!==oe.collapsible||U.maxSize!==oe.maxSize||U.minSize!==oe.minSize)&&I(V.current,U)}),gs(()=>{const Q=V.current;return O(Q),()=>{L(Q)}},[v,P,O,L]),y.useImperativeHandle(s,()=>({collapse:()=>{w(V.current)},expand:Q=>{_(V.current,Q)},getId(){return P},getSize(){return A(V.current)},isCollapsed(){return N(V.current)},isExpanded(){return!N(V.current)},resize:Q=>{M(V.current,Q)}}),[w,_,A,N,P,M]);const X=C(V.current,a);return y.createElement(x,{...S,children:t,className:e,id:P,style:{...X,...b},[hr.groupId]:k,[hr.panel]:"",[hr.panelCollapsible]:n||void 0,[hr.panelId]:P,[hr.panelSize]:parseFloat(""+X.flexGrow).toFixed(1)})}const gH=y.forwardRef((t,e)=>y.createElement(hH,{...t,forwardedRef:e}));hH.displayName="Panel";gH.displayName="forwardRef(Panel)";let jT=null,Kp=-1,yo=null;function rve(t,e,r){const n=(e&SH)!==0,a=(e&wH)!==0,s=(e&xH)!==0,l=(e&_H)!==0;if(e){if(n)return s?"se-resize":l?"ne-resize":"e-resize";if(a)return s?"sw-resize":l?"nw-resize":"w-resize";if(s)return"s-resize";if(l)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function nve(){yo!==null&&(document.head.removeChild(yo),jT=null,yo=null,Kp=-1)}function i_(t,e,r){var n,a;const s=rve(t,e);if(jT!==s){if(jT=s,yo===null&&(yo=document.createElement("style"),document.head.appendChild(yo)),Kp>=0){var l;(l=yo.sheet)===null||l===void 0||l.removeRule(Kp)}Kp=(n=(a=yo.sheet)===null||a===void 0?void 0:a.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function vH(t){return t.type==="keydown"}function bH(t){return t.type.startsWith("pointer")}function yH(t){return t.type.startsWith("mouse")}function yh(t){if(bH(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(yH(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function ave(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function ive(t,e,r){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function ove(t,e){if(t===e)throw new Error("Cannot compare node with itself");const r={a:qz(t),b:qz(e)};let n;for(;r.a.at(-1)===r.b.at(-1);)t=r.a.pop(),e=r.b.pop(),n=t;ht(n,"Stacking order can only be calculated for elements with a common ancestor");const a={a:Bz($z(r.a)),b:Bz($z(r.b))};if(a.a===a.b){const s=n.childNodes,l={a:r.a.at(-1),b:r.b.at(-1)};let c=s.length;for(;c--;){const d=s[c];if(d===l.a)return 1;if(d===l.b)return-1}}return Math.sign(a.a-a.b)}const sve=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function lve(t){var e;const r=getComputedStyle((e=EH(t))!==null&&e!==void 0?e:t).display;return r==="flex"||r==="inline-flex"}function cve(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||lve(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||sve.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function $z(t){let e=t.length;for(;e--;){const r=t[e];if(ht(r,"Missing node"),cve(r))return r}return null}function Bz(t){return t&&Number(getComputedStyle(t).zIndex)||0}function qz(t){const e=[];for(;t;)e.push(t),t=EH(t);return e}function EH(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const SH=1,wH=2,xH=4,_H=8,uve=ave()==="coarse";let Ea=[],Bl=!1,Eo=new Map,Eh=new Map;const pd=new Set;function dve(t,e,r,n,a){var s;const{ownerDocument:l}=e,c={direction:r,element:e,hitAreaMargins:n,setResizeHandlerState:a},d=(s=Eo.get(l))!==null&&s!==void 0?s:0;return Eo.set(l,d+1),pd.add(c),Cm(),function(){var m;Eh.delete(t),pd.delete(c);const h=(m=Eo.get(l))!==null&&m!==void 0?m:1;if(Eo.set(l,h-1),Cm(),h===1&&Eo.delete(l),Ea.includes(c)){const v=Ea.indexOf(c);v>=0&&Ea.splice(v,1),Sh(),a("up",!0,null)}}}function fve(t){const{target:e}=t,{x:r,y:n}=yh(t);Bl=!0,VA({target:e,x:r,y:n}),Cm(),Ea.length>0&&(Nm("down",t),Sh(),t.preventDefault(),TH(e)||t.stopImmediatePropagation())}function o_(t){const{x:e,y:r}=yh(t);if(Bl&&t.type!=="pointerleave"&&t.buttons===0&&(Bl=!1,Nm("up",t)),!Bl){const{target:n}=t;VA({target:n,x:e,y:r})}Nm("move",t),Sh(),Ea.length>0&&t.preventDefault()}function s_(t){const{target:e}=t,{x:r,y:n}=yh(t);Eh.clear(),Bl=!1,Ea.length>0&&(t.preventDefault(),TH(e)||t.stopImmediatePropagation()),Nm("up",t),VA({target:e,x:r,y:n}),Sh(),Cm()}function TH(t){let e=t;for(;e;){if(e.hasAttribute(hr.resizeHandle))return!0;e=e.parentElement}return!1}function VA({target:t,x:e,y:r}){Ea.splice(0);let n=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(n=t),pd.forEach(a=>{const{element:s,hitAreaMargins:l}=a,c=s.getBoundingClientRect(),{bottom:d,left:f,right:m,top:h}=c,v=uve?l.coarse:l.fine;if(e>=f-v&&e<=m+v&&r>=h-v&&r<=d+v){if(n!==null&&document.contains(n)&&s!==n&&!s.contains(n)&&!n.contains(s)&&ove(n,s)>0){let x=n,S=!1;for(;x&&!x.contains(s);){if(ive(x.getBoundingClientRect(),c)){S=!0;break}x=x.parentElement}if(S)return}Ea.push(a)}})}function l_(t,e){Eh.set(t,e)}function Sh(){let t=!1,e=!1;Ea.forEach(n=>{const{direction:a}=n;a==="horizontal"?t=!0:e=!0});let r=0;Eh.forEach(n=>{r|=n}),t&&e?i_("intersection",r):t?i_("horizontal",r):e?i_("vertical",r):nve()}let c_;function Cm(){var t;(t=c_)===null||t===void 0||t.abort(),c_=new AbortController;const e={capture:!0,signal:c_.signal};pd.size&&(Bl?(Ea.length>0&&Eo.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("contextmenu",s_,e),a.addEventListener("pointerleave",o_,e),a.addEventListener("pointermove",o_,e))}),Eo.forEach((r,n)=>{const{body:a}=n;a.addEventListener("pointerup",s_,e),a.addEventListener("pointercancel",s_,e)})):Eo.forEach((r,n)=>{const{body:a}=n;r>0&&(a.addEventListener("pointerdown",fve,e),a.addEventListener("pointermove",o_,e))}))}function Nm(t,e){pd.forEach(r=>{const{setResizeHandlerState:n}=r,a=Ea.includes(r);n(t,a,e)})}function pve(){const[t,e]=y.useState(0);return y.useCallback(()=>e(r=>r+1),[])}function ht(t,e){if(!t)throw console.error(e),Error(e)}function Cs(t,e,r=qA){return t.toFixed(r)===e.toFixed(r)?0:t>e?1:-1}function xi(t,e,r=qA){return Cs(t,e,r)===0}function jn(t,e,r){return Cs(t,e,r)===0}function mve(t,e,r){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){const a=t[n],s=e[n];if(!jn(a,s,r))return!1}return!0}function Pl({panelConstraints:t,panelIndex:e,size:r}){const n=t[e];ht(n!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:a=0,collapsible:s,maxSize:l=100,minSize:c=0}=n;if(Cs(r,c)<0)if(s){const d=(a+c)/2;Cs(r,d)<0?r=a:r=c}else r=c;return r=Math.min(l,r),r=parseFloat(r.toFixed(qA)),r}function Du({delta:t,initialLayout:e,panelConstraints:r,pivotIndices:n,prevLayout:a,trigger:s}){if(jn(t,0))return e;const l=[...e],[c,d]=n;ht(c!=null,"Invalid first pivot index"),ht(d!=null,"Invalid second pivot index");let f=0;if(s==="keyboard"){{const h=t<0?d:c,v=r[h];ht(v,`Panel constraints not found for index ${h}`);const{collapsedSize:b=0,collapsible:x,minSize:S=0}=v;if(x){const R=e[h];if(ht(R!=null,`Previous layout not found for panel index ${h}`),jn(R,b)){const w=S-R;Cs(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const h=t<0?c:d,v=r[h];ht(v,`No panel constraints found for index ${h}`);const{collapsedSize:b=0,collapsible:x,minSize:S=0}=v;if(x){const R=e[h];if(ht(R!=null,`Previous layout not found for panel index ${h}`),jn(R,S)){const w=R-b;Cs(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const h=t<0?1:-1;let v=t<0?d:c,b=0;for(;;){const S=e[v];ht(S!=null,`Previous layout not found for panel index ${v}`);const w=Pl({panelConstraints:r,panelIndex:v,size:100})-S;if(b+=w,v+=h,v<0||v>=r.length)break}const x=Math.min(Math.abs(t),Math.abs(b));t=t<0?0-x:x}{let v=t<0?c:d;for(;v>=0&&v<r.length;){const b=Math.abs(t)-Math.abs(f),x=e[v];ht(x!=null,`Previous layout not found for panel index ${v}`);const S=x-b,R=Pl({panelConstraints:r,panelIndex:v,size:S});if(!jn(x,R)&&(f+=x-R,l[v]=R,f.toFixed(3).localeCompare(Math.abs(t).toFixed(3),void 0,{numeric:!0})>=0))break;t<0?v--:v++}}if(mve(a,l))return a;{const h=t<0?d:c,v=e[h];ht(v!=null,`Previous layout not found for panel index ${h}`);const b=v+f,x=Pl({panelConstraints:r,panelIndex:h,size:b});if(l[h]=x,!jn(x,b)){let S=b-x,w=t<0?d:c;for(;w>=0&&w<r.length;){const _=l[w];ht(_!=null,`Previous layout not found for panel index ${w}`);const A=_+S,C=Pl({panelConstraints:r,panelIndex:w,size:A});if(jn(_,C)||(S-=C-_,l[w]=C),jn(S,0))break;t>0?w--:w++}}}const m=l.reduce((h,v)=>v+h,0);return jn(m,100)?l:a}function hve({layout:t,panelsArray:e,pivotIndices:r}){let n=0,a=100,s=0,l=0;const c=r[0];ht(c!=null,"No pivot index found"),e.forEach((h,v)=>{const{constraints:b}=h,{maxSize:x=100,minSize:S=0}=b;v===c?(n=S,a=x):(s+=S,l+=x)});const d=Math.min(a,100-s),f=Math.max(n,100-l),m=t[c];return{valueMax:d,valueMin:f,valueNow:m}}function md(t,e=document){return Array.from(e.querySelectorAll(`[${hr.resizeHandleId}][data-panel-group-id="${t}"]`))}function RH(t,e,r=document){const a=md(t,r).findIndex(s=>s.getAttribute(hr.resizeHandleId)===e);return a??null}function AH(t,e,r){const n=RH(t,e,r);return n!=null?[n,n+1]:[-1,-1]}function gve(t){return t instanceof HTMLElement?!0:typeof t=="object"&&t!==null&&"tagName"in t&&"getAttribute"in t}function CH(t,e=document){if(gve(e)&&e.dataset.panelGroupId==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function wh(t,e=document){const r=e.querySelector(`[${hr.resizeHandleId}="${t}"]`);return r||null}function vve(t,e,r,n=document){var a,s,l,c;const d=wh(e,n),f=md(t,n),m=d?f.indexOf(d):-1,h=(a=(s=r[m])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null,v=(l=(c=r[m+1])===null||c===void 0?void 0:c.id)!==null&&l!==void 0?l:null;return[h,v]}function bve({committedValuesRef:t,eagerValuesRef:e,groupId:r,layout:n,panelDataArray:a,panelGroupElement:s,setLayout:l}){y.useRef({didWarnAboutMissingResizeHandle:!1}),gs(()=>{if(!s)return;const c=md(r,s);for(let d=0;d<a.length-1;d++){const{valueMax:f,valueMin:m,valueNow:h}=hve({layout:n,panelsArray:a,pivotIndices:[d,d+1]}),v=c[d];if(v!=null){const b=a[d];ht(b,`No panel data found for index "${d}"`),v.setAttribute("aria-controls",b.id),v.setAttribute("aria-valuemax",""+Math.round(f)),v.setAttribute("aria-valuemin",""+Math.round(m)),v.setAttribute("aria-valuenow",h!=null?""+Math.round(h):"")}}return()=>{c.forEach((d,f)=>{d.removeAttribute("aria-controls"),d.removeAttribute("aria-valuemax"),d.removeAttribute("aria-valuemin"),d.removeAttribute("aria-valuenow")})}},[r,n,a,s]),y.useEffect(()=>{if(!s)return;const c=e.current;ht(c,"Eager values not found");const{panelDataArray:d}=c,f=CH(r,s);ht(f!=null,`No group found for id "${r}"`);const m=md(r,s);ht(m,`No resize handles found for group id "${r}"`);const h=m.map(v=>{const b=v.getAttribute(hr.resizeHandleId);ht(b,"Resize handle element has no handle id attribute");const[x,S]=vve(r,b,d,s);if(x==null||S==null)return()=>{};const R=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const _=d.findIndex(A=>A.id===x);if(_>=0){const A=d[_];ht(A,`No panel data found for index ${_}`);const C=n[_],{collapsedSize:k=0,collapsible:N,minSize:I=0}=A.constraints;if(C!=null&&N){const O=Du({delta:jn(C,k)?I-k:k-C,initialLayout:n,panelConstraints:d.map(M=>M.constraints),pivotIndices:AH(r,b,s),prevLayout:n,trigger:"keyboard"});n!==O&&l(O)}}break}}};return v.addEventListener("keydown",R),()=>{v.removeEventListener("keydown",R)}});return()=>{h.forEach(v=>v())}},[s,t,e,r,n,a,l])}function Hz(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function NH(t,e){const r=t==="horizontal",{x:n,y:a}=yh(e);return r?n:a}function yve(t,e,r,n,a){const s=r==="horizontal",l=wh(e,a);ht(l,`No resize handle element found for id "${e}"`);const c=l.getAttribute(hr.groupId);ht(c,"Resize handle element has no group id attribute");let{initialCursorPosition:d}=n;const f=NH(r,t),m=CH(c,a);ht(m,`No group element found for id "${c}"`);const h=m.getBoundingClientRect(),v=s?h.width:h.height;return(f-d)/v*100}function Eve(t,e,r,n,a,s){if(vH(t)){const l=r==="horizontal";let c=0;t.shiftKey?c=100:a!=null?c=a:c=10;let d=0;switch(t.key){case"ArrowDown":d=l?0:c;break;case"ArrowLeft":d=l?-c:0;break;case"ArrowRight":d=l?c:0;break;case"ArrowUp":d=l?0:-c;break;case"End":d=100;break;case"Home":d=-100;break}return d}else return n==null?0:yve(t,e,r,n,s)}function Sve({panelDataArray:t}){const e=Array(t.length),r=t.map(s=>s.constraints);let n=0,a=100;for(let s=0;s<t.length;s++){const l=r[s];ht(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;c!=null&&(n++,e[s]=c,a-=c)}for(let s=0;s<t.length;s++){const l=r[s];ht(l,`Panel constraints not found for index ${s}`);const{defaultSize:c}=l;if(c!=null)continue;const d=t.length-n,f=a/d;n++,e[s]=f,a-=f}return e}function gl(t,e,r){e.forEach((n,a)=>{const s=t[a];ht(s,`Panel data not found for index ${a}`);const{callbacks:l,constraints:c,id:d}=s,{collapsedSize:f=0,collapsible:m}=c,h=r[d];if(h==null||n!==h){r[d]=n;const{onCollapse:v,onExpand:b,onResize:x}=l;x&&x(n,h),m&&(v||b)&&(b&&(h==null||xi(h,f))&&!xi(n,f)&&b(),v&&(h==null||!xi(h,f))&&xi(n,f)&&v())}})}function wp(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!=e[r])return!1;return!0}function wve({defaultSize:t,dragState:e,layout:r,panelData:n,panelIndex:a,precision:s=3}){const l=r[a];let c;return l==null?c=t!=null?t.toFixed(s):"1":n.length===1?c="1":c=l.toFixed(s),{flexBasis:0,flexGrow:c,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function xve(t,e=10){let r=null;return(...a)=>{r!==null&&clearTimeout(r),r=setTimeout(()=>{t(...a)},e)}}function Vz(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,r)=>{localStorage.setItem(e,r)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function kH(t){return`react-resizable-panels:${t}`}function IH(t){return t.map(e=>{const{constraints:r,id:n,idIsFromProps:a,order:s}=e;return a?n:s?`${s}:${JSON.stringify(r)}`:JSON.stringify(r)}).sort((e,r)=>e.localeCompare(r)).join(",")}function OH(t,e){try{const r=kH(t),n=e.getItem(r);if(n){const a=JSON.parse(n);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function _ve(t,e,r){var n,a;const s=(n=OH(t,r))!==null&&n!==void 0?n:{},l=IH(e);return(a=s[l])!==null&&a!==void 0?a:null}function Tve(t,e,r,n,a){var s;const l=kH(t),c=IH(e),d=(s=OH(t,a))!==null&&s!==void 0?s:{};d[c]={expandToSizes:Object.fromEntries(r.entries()),layout:n};try{a.setItem(l,JSON.stringify(d))}catch(f){console.error(f)}}function Gz({layout:t,panelConstraints:e}){const r=[...t],n=r.reduce((s,l)=>s+l,0);if(r.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${r.map(s=>`${s}%`).join(", ")}`);if(!jn(n,100)&&r.length>0)for(let s=0;s<e.length;s++){const l=r[s];ht(l!=null,`No layout data found for index ${s}`);const c=100/n*l;r[s]=c}let a=0;for(let s=0;s<e.length;s++){const l=r[s];ht(l!=null,`No layout data found for index ${s}`);const c=Pl({panelConstraints:e,panelIndex:s,size:l});l!=c&&(a+=l-c,r[s]=c)}if(!jn(a,0))for(let s=0;s<e.length;s++){const l=r[s];ht(l!=null,`No layout data found for index ${s}`);const c=l+a,d=Pl({panelConstraints:e,panelIndex:s,size:c});if(l!==d&&(a-=d-l,r[s]=d,jn(a,0)))break}return r}const Rve=100,Lu={getItem:t=>(Vz(Lu),Lu.getItem(t)),setItem:(t,e)=>{Vz(Lu),Lu.setItem(t,e)}},Wz={};function DH({autoSaveId:t=null,children:e,className:r="",direction:n,forwardedRef:a,id:s=null,onLayout:l=null,keyboardResizeBy:c=null,storage:d=Lu,style:f,tagName:m="div",...h}){const v=HA(s),b=y.useRef(null),[x,S]=y.useState(null),[R,w]=y.useState([]),_=pve(),A=y.useRef({}),C=y.useRef(new Map),k=y.useRef(0),N=y.useRef({autoSaveId:t,direction:n,dragState:x,id:v,keyboardResizeBy:c,onLayout:l,storage:d}),I=y.useRef({layout:R,panelDataArray:[],panelDataArrayChanged:!1});y.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),y.useImperativeHandle(a,()=>({getId:()=>N.current.id,getLayout:()=>{const{layout:$}=I.current;return $},setLayout:$=>{const{onLayout:K}=N.current,{layout:J,panelDataArray:z}=I.current,j=Gz({layout:$,panelConstraints:z.map(Z=>Z.constraints)});Hz(J,j)||(w(j),I.current.layout=j,K&&K(j),gl(z,j,A.current))}}),[]),gs(()=>{N.current.autoSaveId=t,N.current.direction=n,N.current.dragState=x,N.current.id=v,N.current.onLayout=l,N.current.storage=d}),bve({committedValuesRef:N,eagerValuesRef:I,groupId:v,layout:R,panelDataArray:I.current.panelDataArray,setLayout:w,panelGroupElement:b.current}),y.useEffect(()=>{const{panelDataArray:$}=I.current;if(t){if(R.length===0||R.length!==$.length)return;let K=Wz[t];K==null&&(K=xve(Tve,Rve),Wz[t]=K);const J=[...$],z=new Map(C.current);K(t,J,z,R,d)}},[t,R,d]),y.useEffect(()=>{});const O=y.useCallback($=>{const{onLayout:K}=N.current,{layout:J,panelDataArray:z}=I.current;if($.constraints.collapsible){const j=z.map(ce=>ce.constraints),{collapsedSize:Z=0,panelSize:ne,pivotIndices:G}=is(z,$,J);if(ht(ne!=null,`Panel size not found for panel "${$.id}"`),!xi(ne,Z)){C.current.set($.id,ne);const he=Al(z,$)===z.length-1?ne-Z:Z-ne,_e=Du({delta:he,initialLayout:J,panelConstraints:j,pivotIndices:G,prevLayout:J,trigger:"imperative-api"});wp(J,_e)||(w(_e),I.current.layout=_e,K&&K(_e),gl(z,_e,A.current))}}},[]),M=y.useCallback(($,K)=>{const{onLayout:J}=N.current,{layout:z,panelDataArray:j}=I.current;if($.constraints.collapsible){const Z=j.map(ye=>ye.constraints),{collapsedSize:ne=0,panelSize:G=0,minSize:ce=0,pivotIndices:he}=is(j,$,z),_e=K??ce;if(xi(G,ne)){const ye=C.current.get($.id),Se=ye!=null&&ye>=_e?ye:_e,ge=Al(j,$)===j.length-1?G-Se:Se-G,ke=Du({delta:ge,initialLayout:z,panelConstraints:Z,pivotIndices:he,prevLayout:z,trigger:"imperative-api"});wp(z,ke)||(w(ke),I.current.layout=ke,J&&J(ke),gl(j,ke,A.current))}}},[]),L=y.useCallback($=>{const{layout:K,panelDataArray:J}=I.current,{panelSize:z}=is(J,$,K);return ht(z!=null,`Panel size not found for panel "${$.id}"`),z},[]),P=y.useCallback(($,K)=>{const{panelDataArray:J}=I.current,z=Al(J,$);return wve({defaultSize:K,dragState:x,layout:R,panelData:J,panelIndex:z})},[x,R]),V=y.useCallback($=>{const{layout:K,panelDataArray:J}=I.current,{collapsedSize:z=0,collapsible:j,panelSize:Z}=is(J,$,K);return ht(Z!=null,`Panel size not found for panel "${$.id}"`),j===!0&&xi(Z,z)},[]),X=y.useCallback($=>{const{layout:K,panelDataArray:J}=I.current,{collapsedSize:z=0,collapsible:j,panelSize:Z}=is(J,$,K);return ht(Z!=null,`Panel size not found for panel "${$.id}"`),!j||Cs(Z,z)>0},[]),Q=y.useCallback($=>{const{panelDataArray:K}=I.current;K.push($),K.sort((J,z)=>{const j=J.order,Z=z.order;return j==null&&Z==null?0:j==null?-1:Z==null?1:j-Z}),I.current.panelDataArrayChanged=!0,_()},[_]);gs(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:$,onLayout:K,storage:J}=N.current,{layout:z,panelDataArray:j}=I.current;let Z=null;if($){const G=_ve($,j,J);G&&(C.current=new Map(Object.entries(G.expandToSizes)),Z=G.layout)}Z==null&&(Z=Sve({panelDataArray:j}));const ne=Gz({layout:Z,panelConstraints:j.map(G=>G.constraints)});Hz(z,ne)||(w(ne),I.current.layout=ne,K&&K(ne),gl(j,ne,A.current))}}),gs(()=>{const $=I.current;return()=>{$.layout=[]}},[]);const oe=y.useCallback($=>{let K=!1;const J=b.current;return J&&window.getComputedStyle(J,null).getPropertyValue("direction")==="rtl"&&(K=!0),function(j){j.preventDefault();const Z=b.current;if(!Z)return()=>null;const{direction:ne,dragState:G,id:ce,keyboardResizeBy:he,onLayout:_e}=N.current,{layout:ye,panelDataArray:Se}=I.current,{initialLayout:Ne}=G??{},ge=AH(ce,$,Z);let ke=Eve(j,$,ne,G,he,Z);const Oe=ne==="horizontal";Oe&&K&&(ke=-ke);const Xe=Se.map(We=>We.constraints),ot=Du({delta:ke,initialLayout:Ne??ye,panelConstraints:Xe,pivotIndices:ge,prevLayout:ye,trigger:vH(j)?"keyboard":"mouse-or-touch"}),$e=!wp(ye,ot);(bH(j)||yH(j))&&k.current!=ke&&(k.current=ke,!$e&&ke!==0?Oe?l_($,ke<0?SH:wH):l_($,ke<0?xH:_H):l_($,0)),$e&&(w(ot),I.current.layout=ot,_e&&_e(ot),gl(Se,ot,A.current))}},[]),U=y.useCallback(($,K)=>{const{onLayout:J}=N.current,{layout:z,panelDataArray:j}=I.current,Z=j.map(ye=>ye.constraints),{panelSize:ne,pivotIndices:G}=is(j,$,z);ht(ne!=null,`Panel size not found for panel "${$.id}"`);const he=Al(j,$)===j.length-1?ne-K:K-ne,_e=Du({delta:he,initialLayout:z,panelConstraints:Z,pivotIndices:G,prevLayout:z,trigger:"imperative-api"});wp(z,_e)||(w(_e),I.current.layout=_e,J&&J(_e),gl(j,_e,A.current))},[]),W=y.useCallback(($,K)=>{const{layout:J,panelDataArray:z}=I.current,{collapsedSize:j=0,collapsible:Z}=K,{collapsedSize:ne=0,collapsible:G,maxSize:ce=100,minSize:he=0}=$.constraints,{panelSize:_e}=is(z,$,J);_e!=null&&(Z&&G&&xi(_e,j)?xi(j,ne)||U($,ne):_e<he?U($,he):_e>ce&&U($,ce))},[U]),H=y.useCallback(($,K)=>{const{direction:J}=N.current,{layout:z}=I.current;if(!b.current)return;const j=wh($,b.current);ht(j,`Drag handle element not found for id "${$}"`);const Z=NH(J,K);S({dragHandleId:$,dragHandleRect:j.getBoundingClientRect(),initialCursorPosition:Z,initialLayout:z})},[]),te=y.useCallback(()=>{S(null)},[]),se=y.useCallback($=>{const{panelDataArray:K}=I.current,J=Al(K,$);J>=0&&(K.splice(J,1),delete A.current[$.id],I.current.panelDataArrayChanged=!0,_())},[_]),B=y.useMemo(()=>({collapsePanel:O,direction:n,dragState:x,expandPanel:M,getPanelSize:L,getPanelStyle:P,groupId:v,isPanelCollapsed:V,isPanelExpanded:X,reevaluatePanelConstraints:W,registerPanel:Q,registerResizeHandle:oe,resizePanel:U,startDragging:H,stopDragging:te,unregisterPanel:se,panelGroupElement:b.current}),[O,x,n,M,L,P,v,V,X,W,Q,oe,U,H,te,se]),q={display:"flex",flexDirection:n==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return y.createElement(bh.Provider,{value:B},y.createElement(m,{...h,children:e,className:r,id:s,ref:b,style:{...q,...f},[hr.group]:"",[hr.groupDirection]:n,[hr.groupId]:v}))}const LH=y.forwardRef((t,e)=>y.createElement(DH,{...t,forwardedRef:e}));DH.displayName="PanelGroup";LH.displayName="forwardRef(PanelGroup)";function Al(t,e){return t.findIndex(r=>r===e||r.id===e.id)}function is(t,e,r){const n=Al(t,e),s=n===t.length-1?[n-1,n]:[n,n+1],l=r[n];return{...e.constraints,panelSize:l,pivotIndices:s}}function Ave({disabled:t,handleId:e,resizeHandler:r,panelGroupElement:n}){y.useEffect(()=>{if(t||r==null||n==null)return;const a=wh(e,n);if(a==null)return;const s=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),r(l);break}case"F6":{l.preventDefault();const c=a.getAttribute(hr.groupId);ht(c,`No group element found for id "${c}"`);const d=md(c,n),f=RH(c,e,n);ht(f!==null,`No resize element found for id "${e}"`);const m=l.shiftKey?f>0?f-1:d.length-1:f+1<d.length?f+1:0;d[m].focus();break}}};return a.addEventListener("keydown",s),()=>{a.removeEventListener("keydown",s)}},[n,t,e,r])}function MH({children:t=null,className:e="",disabled:r=!1,hitAreaMargins:n,id:a,onBlur:s,onClick:l,onDragging:c,onFocus:d,onPointerDown:f,onPointerUp:m,style:h={},tabIndex:v=0,tagName:b="div",...x}){var S,R;const w=y.useRef(null),_=y.useRef({onClick:l,onDragging:c,onPointerDown:f,onPointerUp:m});y.useEffect(()=>{_.current.onClick=l,_.current.onDragging=c,_.current.onPointerDown=f,_.current.onPointerUp=m});const A=y.useContext(bh);if(A===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:C,groupId:k,registerResizeHandle:N,startDragging:I,stopDragging:O,panelGroupElement:M}=A,L=HA(a),[P,V]=y.useState("inactive"),[X,Q]=y.useState(!1),[oe,U]=y.useState(null),W=y.useRef({state:P});gs(()=>{W.current.state=P}),y.useEffect(()=>{if(r)U(null);else{const B=N(L);U(()=>B)}},[r,L,N]);const H=(S=n?.coarse)!==null&&S!==void 0?S:15,te=(R=n?.fine)!==null&&R!==void 0?R:5;y.useEffect(()=>{if(r||oe==null)return;const B=w.current;ht(B,"Element ref not attached");let q=!1;return dve(L,B,C,{coarse:H,fine:te},(K,J,z)=>{if(!J){V("inactive");return}switch(K){case"down":{V("drag"),q=!1,ht(z,'Expected event to be defined for "down" action'),I(L,z);const{onDragging:j,onPointerDown:Z}=_.current;j?.(!0),Z?.();break}case"move":{const{state:j}=W.current;q=!0,j!=="drag"&&V("hover"),ht(z,'Expected event to be defined for "move" action'),oe(z);break}case"up":{V("hover"),O();const{onClick:j,onDragging:Z,onPointerUp:ne}=_.current;Z?.(!1),ne?.(),q||j?.();break}}})},[H,C,r,te,N,L,oe,I,O]),Ave({disabled:r,handleId:L,resizeHandler:oe,panelGroupElement:M});const se={touchAction:"none",userSelect:"none"};return y.createElement(b,{...x,children:t,className:e,id:a,onBlur:()=>{Q(!1),s?.()},onFocus:()=>{Q(!0),d?.()},ref:w,role:"separator",style:{...se,...h},tabIndex:v,[hr.groupDirection]:C,[hr.groupId]:k,[hr.resizeHandle]:"",[hr.resizeHandleActive]:P==="drag"?"pointer":X?"keyboard":void 0,[hr.resizeHandleEnabled]:!r,[hr.resizeHandleId]:L,[hr.resizeHandleState]:P})}MH.displayName="PanelResizeHandle";function hd({className:t,...e}){return g.jsx(LH,{"data-slot":"resizable-panel-group",className:Me("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...e})}function ja({...t}){return g.jsx(gH,{"data-slot":"resizable-panel",...t})}function gd({withHandle:t,className:e,...r}){return g.jsx(MH,{"data-slot":"resizable-handle",className:Me("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",e),...r,children:t&&g.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:g.jsx(lK,{className:"size-2.5"})})})}function Fd({id:t,isSelected:e,isFocused:r,icon:n,title:a,description:s,metadata:l,onClick:c,className:d}){return g.jsx("button",{id:t,type:"button",onClick:c,className:Me("w-full text-left cursor-pointer p-4 border-b dark:border-zinc-700 hover:bg-gray-50 dark:hover:bg-zinc-800/50 transition-colors group",e&&"bg-zinc-50 dark:bg-zinc-800 border-l-4 border-l-zinc-500",r&&"ring-2 ring-zinc-500 dark:ring-zinc-400 ring-inset",d),children:g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("div",{className:"flex-shrink-0 mt-1",children:g.jsx("div",{className:Me("p-2.5 rounded-full transition-colors",e?"bg-zinc-500 dark:bg-zinc-100/80 text-zinc-100 dark:text-zinc-900":"bg-gray-100 dark:bg-zinc-700 text-gray-600 dark:text-gray-400 group-hover:bg-gray-200 dark:group-hover:bg-zinc-600"),children:n})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"flex items-center gap-2 mb-1",children:g.jsx("h3",{className:Me("font-medium truncate font-mono text-sm"),children:a})}),s&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 line-clamp-2",children:s})]})]})})}function PH({className:t,...e}){return g.jsx("kbd",{"data-slot":"kbd",className:Me("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",t),...e})}function jH({activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabTitle:n,secondaryTabTitle:a,primaryCount:s,secondaryCount:l,secondaryIcon:c,primaryIcon:d,searchPlaceholder:f="Search...",onSearchExpand:m,onSearchChange:h,onSearchBlur:v,onTabSwitch:b,searchInputRef:x,primaryTabName:S}){const R=t===S;return g.jsxs("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:[g.jsx("div",{className:"flex items-center gap-2 flex-1",children:e?g.jsx(Or,{ref:x,placeholder:f,value:r,onChange:w=>h(w.target.value),onBlur:v,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:R?n:a}),R&&g.jsxs(g.Fragment,{children:[g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:s}),g.jsxs(Jr,{children:[g.jsx(en,{asChild:!0,children:g.jsx(et,{variant:"ghost",size:"sm",onClick:m,className:"h-8 w-8 p-0",children:g.jsx(hR,{className:"h-4 w-4"})})}),g.jsxs(tn,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(PH,{children:"F"})]})]})]})]})}),g.jsxs(et,{variant:"ghost",size:"sm",onClick:b,className:"gap-2",children:[R?g.jsx(c,{}):g.jsx(d,{}),g.jsx("span",{children:R?a:n}),R&&l>0&&g.jsx(Va,{className:"bg-purple-500/20 text-purple-600 dark:text-purple-400 border-transparent",variant:"outline",children:l})]})]})}function Cve({prompts:t,selectedPrompt:e,onPromptSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ed,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No prompts available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Fd,{id:`prompt-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(ed,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.arguments&&a.arguments.length>0&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[a.arguments.length," args"]}),onClick:()=>r(a)},a.name))})}function Nve({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredPromptsCount:n,savedPromptsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(jH,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"prompts",secondaryTabName:"saved",primaryTabTitle:"Prompts",secondaryTabTitle:"History",primaryCount:n,secondaryCount:a,primaryIcon:ed,secondaryIcon:ac,searchPlaceholder:"Search prompts...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}function kve({savedPrompts:t,selectedPrompt:e,onLoadPrompt:r,onDeletePrompt:n,focusedIndex:a}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(ac,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No history"}),g.jsx("p",{className:"text-sm text-gray-400 dark:text-gray-500 mt-1",children:"Prompts you execute will appear here"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((s,l)=>g.jsx(Fd,{id:`saved-prompt-${s.id}`,isSelected:e?.id===s.id,isFocused:a===l,icon:g.jsx(ac,{className:"h-4 w-4"}),title:s.name,description:`${s.promptName} - ${new Date(s.savedAt).toLocaleString()}`,onClick:()=>r(s)},s.id))})}function Ive({selectedPrompt:t,promptArgs:e,onArgChange:r}){const n=t?.arguments||[];if(!(n.length>0))return g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No arguments required"});const s=l=>{const c=l.name,d=e[c],f=typeof d=="string"?d:JSON.stringify(d);return l.type==="boolean"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsxs("div",{className:"flex items-center space-x-2",children:[g.jsx("input",{id:c,type:"checkbox",checked:!!d,onChange:m=>r(c,m.target.checked),className:"rounded","aria-label":`Toggle ${c}`}),g.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:l.description})]})]},c):l.type==="number"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,type:"number",value:Number(d)||0,onChange:m=>r(c,Number(m.target.value)),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):l.type==="array"||l.type==="object"?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(dh,{id:c,value:f,onChange:m=>{try{const h=JSON.parse(m.target.value);r(c,h)}catch{r(c,m.target.value)}},placeholder:l.description||`Enter ${c} as JSON`,className:"font-mono text-sm min-h-[100px]"}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:c,className:"text-sm font-medium",children:[c,l.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:c,value:f,onChange:m=>r(c,m.target.value),placeholder:l.description||`Enter ${c}`}),l.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:l.description})]},c)};return g.jsx("div",{className:"space-y-4",children:n.map(l=>s(l))})}function Ove({selectedPrompt:t,promptArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(et,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Di,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(mB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(et,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(mR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx(Ive,{selectedPrompt:t,promptArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a prompt to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a prompt from the list to view its details and execute it"})]})}function Dve({results:t,copiedResult:e,onCopy:r}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((n,a)=>g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center gap-2 px-4 pt-2 border-b border-gray-200 dark:border-zinc-600 pb-2",children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ac,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(n.timestamp).toLocaleTimeString()})]}),n.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(td,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[n.duration,"ms"]})]}),g.jsx("div",{className:"flex gap-2 ml-auto",children:g.jsx(et,{variant:"ghost",size:"sm",onClick:()=>r(a,n.result),className:"h-6 px-2",children:e===a?g.jsx(ki,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})})]}),n.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:n.error})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:n.result,filename:`prompt-result-${n.promptName}-${Date.now()}.json`})})]},a))}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(bR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}const Yz="mcp-inspector-saved-prompts";function UH({ref:t,prompts:e,callPrompt:r,serverId:n,isConnected:a}){const[s,l]=y.useState(null),[c,d]=y.useState(null),{selectedPromptName:f,setSelectedPromptName:m}=Od(),[h,v]=y.useState({}),[b,x]=y.useState([]),[S,R]=y.useState(!1),[w,_]=y.useState(null),[A,C]=y.useState(""),[k,N]=y.useState("prompts"),[I,O]=y.useState([]),[M,L]=y.useState(!1),[P,V]=y.useState(""),[X,Q]=y.useState(!1),[oe,U]=y.useState(-1),W=y.useRef(null);y.useImperativeHandle(t,()=>({focusSearch:()=>{Q(!0),setTimeout(()=>{W.current&&W.current.focus()},0)},blurSearch:()=>{C(""),Q(!1),W.current&&W.current.blur()}})),y.useEffect(()=>{try{const Z=localStorage.getItem(Yz);if(Z){const ne=JSON.parse(Z);O(ne)}}catch(Z){console.error("[PromptsTab] Failed to load saved prompts:",Z)}},[]);const H=y.useCallback(Z=>{try{localStorage.setItem(Yz,JSON.stringify(Z))}catch(ne){console.error("[PromptsTab] Failed to save prompts:",ne)}},[]);y.useEffect(()=>{X&&W.current&&W.current.focus()},[X]);const te=y.useCallback(()=>{A.trim()||Q(!1)},[A]),se=y.useMemo(()=>{if(!A.trim())return e;const Z=A.toLowerCase();return e.filter(ne=>ne.name.toLowerCase().includes(Z)||ne.description?.toLowerCase().includes(Z))},[e,A]),B=y.useCallback(Z=>{l(Z);const ne={};Z.arguments&&Z.arguments.forEach(G=>{G.default!==void 0?ne[G.name]=G.default:G.type==="string"?ne[G.name]="":G.type==="number"?ne[G.name]=0:G.type==="boolean"?ne[G.name]=!1:G.type==="array"?ne[G.name]=[]:G.type==="object"&&(ne[G.name]={})}),v(ne)},[]),q=y.useCallback(Z=>{const ne=e.find(G=>G.name===Z.promptName);ne&&(l(ne),v(Z.args),d(Z))},[e]);y.useEffect(()=>{U(-1)},[A,k]),y.useEffect(()=>{const Z=ne=>{const G=ne.target;if(G.tagName==="INPUT"||G.tagName==="TEXTAREA"||G.contentEditable==="true"||ne.metaKey||ne.ctrlKey||ne.altKey)return;const he=k==="prompts"?se:I;if(ne.key==="ArrowDown")ne.preventDefault(),U(_e=>{const ye=_e+1;return ye>=he.length?0:ye});else if(ne.key==="ArrowUp")ne.preventDefault(),U(_e=>{const ye=_e-1;return ye<0?he.length-1:ye});else if(ne.key==="Enter"&&oe>=0)if(ne.preventDefault(),k==="prompts"){const _e=se[oe];_e&&B(_e)}else{const _e=I[oe];_e&&q(_e)}};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[oe,se,I,k,B,q]),y.useEffect(()=>{if(oe>=0){const Z=k==="prompts"?`prompt-${se[oe]?.name}`:`saved-prompt-${I[oe]?.id}`,ne=document.getElementById(Z);ne&&ne.scrollIntoView({behavior:"smooth",block:"nearest"})}},[oe,se,I,k]),y.useEffect(()=>{if(console.warn("[PromptsTab] Auto-selection effect triggered:",{selectedPromptName:f,promptsCount:e.length,currentSelectedPrompt:s?.name}),f&&e.length>0){const Z=e.find(ne=>ne.name===f);if(console.warn("[PromptsTab] Prompt lookup result:",{selectedPromptName:f,promptFound:!!Z,promptName:Z?.name,shouldSelect:Z&&s?.name!==Z.name}),Z&&s?.name!==Z.name){console.warn("[PromptsTab] Selecting prompt:",Z.name),m(null);const ne=setTimeout(()=>{B(Z);const G=document.getElementById(`prompt-${Z.name}`);G&&(console.warn("[PromptsTab] Scrolling to prompt element"),G.scrollIntoView({behavior:"smooth",block:"nearest"}))},100);return()=>clearTimeout(ne)}}},[f,e,s,B,m]);const $=y.useCallback((Z,ne)=>{v(G=>({...G,[Z]:ne}))},[]),K=y.useCallback(async()=>{if(!s||S)return;R(!0);const Z=Date.now();try{const ne=await r(s.name,h),G=Date.now()-Z;jr.getInstance().capture(new qO({promptName:s.name,serverId:n,success:!0})).catch(()=>{}),x(he=>[{promptName:s.name,args:h,result:ne,timestamp:Z,duration:G},...he])}catch(ne){jr.getInstance().capture(new qO({promptName:s.name,serverId:n,success:!1,error:ne instanceof Error?ne.message:"Unknown error"})).catch(()=>{});const ce={promptName:s.name,args:h,result:null,error:ne instanceof Error?ne.message:String(ne),timestamp:Z,duration:Date.now()-Z};x(he=>[ce,...he])}finally{R(!1)}},[s,h,S,r,n]),J=y.useCallback(async(Z,ne)=>{try{await navigator.clipboard.writeText(JSON.stringify(ne,null,2)),_(Z),setTimeout(()=>_(null),2e3)}catch(G){console.error("[PromptsTab] Failed to copy result:",G)}},[]),z=y.useCallback(()=>{s&&(V(""),L(!0))},[s]),j=y.useCallback(Z=>{H(I.filter(ne=>ne.id!==Z)),c?.id===Z&&d(null)},[I,H,c]);return g.jsxs(hd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:33,className:"flex flex-col h-full relative",children:[g.jsx(Nve,{activeTab:k,isSearchExpanded:X,searchQuery:A,filteredPromptsCount:se.length,savedPromptsCount:I.length,onSearchExpand:()=>Q(!0),onSearchChange:C,onSearchBlur:te,onTabSwitch:()=>N(k==="prompts"?"saved":"prompts"),searchInputRef:W}),k==="prompts"?g.jsx(Cve,{prompts:se,selectedPrompt:s,onPromptSelect:B,focusedIndex:oe}):g.jsx(kve,{savedPrompts:I,selectedPrompt:c,onLoadPrompt:q,onDeletePrompt:j,focusedIndex:oe})]}),g.jsx(gd,{withHandle:!0}),g.jsx(ja,{defaultSize:67,children:g.jsxs(hd,{direction:"vertical",children:[g.jsx(ja,{defaultSize:40,children:g.jsx(Ove,{selectedPrompt:s,promptArgs:h,isExecuting:S,isConnected:a,onArgChange:$,onExecute:K,onSave:z})}),g.jsx(gd,{withHandle:!0}),g.jsx(ja,{defaultSize:60,children:g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(Dve,{results:b,copiedResult:w,onCopy:J})})})]})})]})}UH.displayName="PromptsTab";function ql(t){if(!t?.mimeType)return!1;const e=t.mimeType.toLowerCase();return e==="text/html"||e==="text/html+skybridge"||e==="text/uri-list"||e.startsWith("application/vnd.mcp-ui.remote-dom")}function Lve(t){return{uri:t.uri,mimeType:t.mimeType,text:t.text,blob:t.blob}}function FH({resource:t,onUIAction:e,className:r}){const n=async s=>e?.(s),a=Lve(t);return g.jsx("div",{className:r,children:g.jsx(BA,{resource:a,onUIAction:n,htmlProps:{autoResizeIframe:{width:!0,height:!0},style:{width:"100%",minHeight:"200px"},sandboxPermissions:"allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox"},remoteDomProps:{remoteElements:[Hge,qge,Vge,Gge],library:$A}})})}function Mve({result:t,isLoading:e,previewMode:r,serverId:n,readResource:a,onTogglePreview:s,onCopy:l,onDownload:c,onFullscreen:d,isCopied:f=!1}){let m=[],h;if(t?.resourceAnnotations&&(m=Object.keys(t.resourceAnnotations).filter(S=>S.startsWith("openai/")),h=t.resourceAnnotations["openai/outputTemplate"]),t?.result?.contents?.[0]?._meta){const S=t.result.contents[0]._meta,R=Object.keys(S).filter(w=>w.startsWith("openai/"));R.length>0&&(m=[...m,...R]),!h&&S["openai/outputTemplate"]&&(h=S["openai/outputTemplate"]),!h&&t.uri&&t.uri.startsWith("ui://widget/")&&(h=t.uri)}const v=!!(m.length>0&&h&&typeof h=="string"&&n&&a);if(e)return g.jsx("div",{className:"flex absolute left-0 top-0 items-center justify-center w-full h-full",children:g.jsx(Di,{className:"size-5"})});if(!t)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a resource to view its contents"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a resource from the list to see its data"})]});if(t.error)return g.jsx("div",{className:"p-4",children:g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:t.error})]})});const b=t?.result?.contents&&Array.isArray(t.result.contents)&&t.result.contents.some(S=>S.mimeType&&ql(S)),x=b?t.result.contents.filter(S=>S.mimeType&&ql(S)):[];return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"flex-shrink-0 px-4 py-3 border-b border-gray-200 dark:border-zinc-700 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ac,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(t.timestamp).toLocaleTimeString()})]}),(()=>{const S=t?.duration??t.result?.duration??t.result?.metrics?.durationMs;return S!==void 0?g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(td,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[S,"ms"]})]}):null})(),b&&g.jsx(Va,{variant:"outline",className:"text-xs bg-purple-50 dark:bg-purple-900/20 border-none border-purple-200 dark:border-purple-800/50 text-purple-600 dark:text-purple-400",children:"MCP UI"}),v&&g.jsx(Va,{variant:"outline",className:"text-xs bg-blue-50 dark:bg-blue-900/20 border-none border-blue-200 dark:border-blue-800/50 text-blue-600 dark:text-blue-400",children:"OpenAI Widget"})]}),g.jsxs("div",{className:"flex items-center gap-1",children:[(b||v)&&g.jsxs(et,{variant:"ghost",size:"sm",onClick:s,className:r?"":"text-purple-600 dark:text-purple-400",children:[r?g.jsx(UY,{className:"h-4 w-4 mr-1"}):g.jsx(NY,{className:"h-4 w-4 mr-1"}),r?"JSON":v?"Component":"Preview"]}),g.jsx(et,{variant:"ghost",size:"sm",onClick:l,children:f?g.jsx(ki,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})}),g.jsx(et,{variant:"ghost",size:"sm",onClick:c,children:g.jsx(dB,{className:"h-4 w-4"})}),g.jsx(et,{variant:"ghost",size:"sm",onClick:d,children:g.jsx(pK,{className:"h-4 w-4"})})]})]}),g.jsx("div",{className:"flex-1 overflow-y-auto",children:v&&n&&a&&h?r?g.jsx("div",{className:"flex-1 h-full",children:g.jsx(PA,{componentUrl:h,toolName:t.uri,toolArgs:{},toolResult:t.result,serverId:n,readResource:a,className:"w-full h-full relative flex p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})}):b?r?g.jsxs("div",{className:"space-y-0 h-full",children:[x.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx("div",{className:"w-full h-full",children:g.jsx(FH,{resource:S,className:"w-full h-full"})})},`mcp-ui-${S.uri||`resource-${Date.now()}-${Math.random()}`}`)),(()=>{if(t.result.contents&&Array.isArray(t.result.contents)){const S=t.result.contents.filter(R=>!(R.mimeType&&ql(R)));if(S.length>0)return g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:S,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-non-ui-${Date.now()}.json`})})}return null})()]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:t.result,filename:`resource-${t.uri.replace(/[^a-zA-Z0-9]/g,"-")}-${Date.now()}.json`})})})]})}function Pve(t,e){if(!t&&!e)return g.jsx(rK,{className:"h-5 w-5"});const r=(t||e||"").toLowerCase();return r.includes("image")?g.jsx(JY,{className:"h-5 w-5"}):r.includes("json")||r.includes("javascript")||r.includes("typescript")?g.jsx(XY,{className:"h-5 w-5"}):r.includes("html")||r.includes("xml")?g.jsx(oK,{className:"h-5 w-5"}):r.includes("database")||r.includes("sql")?g.jsx($m,{className:"h-5 w-5"}):g.jsx(pR,{className:"h-5 w-5"})}function jve({resources:t,selectedResource:e,onResourceSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx($m,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No resources available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>{const l=Pve(a.mimeType,a.uri),c=[a.description,a.mimeType&&g.jsx("span",{className:"font-mono",children:a.mimeType},"mime")].filter(Boolean);return g.jsx(Fd,{id:`resource-${a.uri}`,isSelected:e?.uri===a.uri,isFocused:n===s,icon:l,title:a.name,description:c.length>0?g.jsxs("span",{className:"flex flex-col gap-1",children:[a.description&&g.jsx("span",{children:a.description}),a.mimeType&&g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-500 font-mono",children:a.mimeType})]}):void 0,onClick:()=>r(a)},a.uri)})})}function Uve({isSearchExpanded:t,searchQuery:e,filteredResourcesCount:r,onSearchExpand:n,onSearchChange:a,onSearchBlur:s,searchInputRef:l}){return g.jsx("div",{className:"flex items-center justify-between p-4 py-3 border-r dark:border-zinc-700",children:g.jsx("div",{className:"flex items-center gap-2 flex-1",children:t?g.jsx(Or,{ref:l,placeholder:"Search resources...",value:e,onChange:c=>a(c.target.value),onBlur:s,className:"h-8 border-gray-300 dark:border-zinc-600"}):g.jsxs(g.Fragment,{children:[g.jsx("h2",{className:"text-lg font-medium text-gray-900 dark:text-gray-100",children:"Resources"}),g.jsx(Va,{className:"bg-zinc-500/20 text-zinc-600 dark:text-zinc-400 border-transparent",variant:"outline",children:r}),g.jsxs(Jr,{children:[g.jsx(en,{asChild:!0,children:g.jsx(et,{variant:"ghost",size:"sm",onClick:n,className:"h-8 w-8 p-0",children:g.jsx(hR,{className:"h-4 w-4"})})}),g.jsxs(tn,{side:"bottom",className:"flex gap-2",children:["Search",g.jsx(PH,{children:"F"})]})]})]})})})}function zH({ref:t,resources:e,readResource:r,serverId:n,isConnected:a}){const[s,l]=y.useState(null),{selectedResourceUri:c,setSelectedResourceUri:d}=Od(),[f,m]=y.useState(null),[h,v]=y.useState(!1),[b,x]=y.useState(""),[S]=y.useState("resources"),[R,w]=y.useState(!0),[_,A]=y.useState(!1),[C,k]=y.useState(-1),[N,I]=y.useState(!1),O=y.useRef(null),M=y.useRef(null);y.useImperativeHandle(t,()=>({focusSearch:()=>{A(!0),setTimeout(()=>{O.current&&O.current.focus()},0)},blurSearch:()=>{x(""),A(!1),O.current&&O.current.blur()}})),y.useEffect(()=>{_&&O.current&&O.current.focus()},[_]);const L=y.useCallback(()=>{b.trim()||A(!1)},[b]),P=y.useMemo(()=>{if(!b)return e;const U=b.toLowerCase();return e.filter(W=>W.name.toLowerCase().includes(U)||W.description?.toLowerCase().includes(U)||W.uri.toLowerCase().includes(U))},[e,b]),V=y.useCallback(async U=>{if(l(U),a){v(!0);const W=Date.now();try{const H=await r(U.uri);jr.getInstance().capture(new BO({resourceUri:U.uri,serverId:n,success:!0})).catch(()=>{}),m({uri:U.uri,result:H,timestamp:W,resourceAnnotations:U.annotations})}catch(H){jr.getInstance().capture(new BO({resourceUri:U.uri,serverId:n,success:!1,error:H instanceof Error?H.message:"Unknown error"})).catch(()=>{}),m({uri:U.uri,result:null,error:H instanceof Error?H.message:"Unknown error",timestamp:W,resourceAnnotations:U.annotations})}finally{v(!1)}}},[r,n,a]);y.useEffect(()=>{k(-1)},[b,S]),y.useEffect(()=>{const U=W=>{const H=W.target;if(H.tagName==="INPUT"||H.tagName==="TEXTAREA"||H.contentEditable==="true"||W.metaKey||W.ctrlKey||W.altKey)return;const se=P;if(W.key==="ArrowDown")W.preventDefault(),k(B=>{const q=B+1;return q>=se.length?0:q});else if(W.key==="ArrowUp")W.preventDefault(),k(B=>{const q=B-1;return q<0?se.length-1:q});else if(W.key==="Enter"&&C>=0){W.preventDefault();const B=P[C];B&&V(B)}};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[C,P,V]),y.useEffect(()=>{if(C>=0){const U=`resource-${P[C]?.uri}`,W=document.getElementById(U);W&&W.scrollIntoView({behavior:"smooth",block:"nearest"})}},[C,P]),y.useEffect(()=>{if(c&&e.length>0){const U=e.find(W=>W.uri===c);U&&s?.uri!==U.uri&&(d(null),setTimeout(()=>{V(U);const W=document.getElementById(`resource-${U.uri}`);W&&W.scrollIntoView({behavior:"smooth",block:"nearest"})},100))}},[c,e,s,V,d]);const X=y.useCallback(async()=>{if(f)try{await navigator.clipboard.writeText(JSON.stringify(f.result,null,2)),I(!0),setTimeout(()=>I(!1),2e3)}catch(U){console.error("[ResourcesTab] Failed to copy result:",U)}},[f]),Q=y.useCallback(()=>{if(f)try{const U=new globalThis.Blob([JSON.stringify(f.result,null,2)],{type:"application/json"}),W=URL.createObjectURL(U),H=document.createElement("a");H.href=W,H.download=`resource-${Date.now()}.json`,document.body.appendChild(H),H.click(),document.body.removeChild(H),URL.revokeObjectURL(W)}catch(U){console.error("[ResourcesTab] Failed to download result:",U)}},[f]),oe=y.useCallback(async()=>{if(M.current)try{document.fullscreenElement?await document.exitFullscreen():await M.current.requestFullscreen()}catch(U){console.error("[ResourcesTab] Failed to toggle fullscreen:",U)}},[]);return g.jsxs(hd,{direction:"horizontal",className:"h-full",children:[g.jsxs(ja,{defaultSize:25,children:[g.jsx(Uve,{activeTab:S,isSearchExpanded:_,searchQuery:b,filteredResourcesCount:P.length,onSearchExpand:()=>A(!0),onSearchChange:x,onSearchBlur:L,onTabSwitch:()=>{},searchInputRef:O}),g.jsx("div",{className:"flex flex-col h-full",children:g.jsx(jve,{resources:P,selectedResource:s,onResourceSelect:V,focusedIndex:C})})]}),g.jsx(gd,{}),g.jsx(ja,{defaultSize:50,children:g.jsx("div",{ref:M,className:"h-full bg-white dark:bg-zinc-900",children:g.jsx(Mve,{result:f,isLoading:h,previewMode:R,serverId:n,readResource:r,onTogglePreview:()=>w(!R),onCopy:X,onDownload:Q,onFullscreen:oe,isCopied:N})})})]})}zH.displayName="ResourcesTab";function Fve({savedRequests:t,selectedRequest:e,onLoadRequest:r,onDeleteRequest:n,focusedIndex:a}){if(t.length===0)return g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx($m,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"No saved requests yet"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Execute a tool and click Save to store requests"})]});const s=(l,c)=>{l.stopPropagation(),c()};return g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((l,c)=>g.jsxs("div",{className:"relative group",children:[g.jsx(Fd,{id:`saved-${l.id}`,isSelected:e?.id===l.id,isFocused:a===c,icon:g.jsx(fB,{className:"h-4 w-4"}),title:l.name,description:l.toolName,metadata:g.jsx("div",{className:"flex flex-col gap-1",children:g.jsx("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:new Date(l.savedAt).toLocaleString()})}),onClick:()=>r(l)}),g.jsx("div",{className:"absolute top-1/2 right-2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-10",children:g.jsxs(Jr,{children:[g.jsx(en,{asChild:!0,children:g.jsx(et,{variant:"secondary",size:"sm",onClick:d=>s(d,()=>n(l.id)),className:"h-8 w-8 p-0",children:g.jsx(H_,{className:"h-4 w-4"})})}),g.jsx(tn,{children:g.jsx("p",{children:"Delete saved request"})})]})})]},l.id))})}function zve({isOpen:t,requestName:e,defaultPlaceholder:r,onRequestNameChange:n,onSave:a,onCancel:s}){return t?g.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:s,children:g.jsxs("div",{className:"bg-white dark:bg-zinc-800 rounded-lg p-6 w-[400px] shadow-xl border border-gray-200 dark:border-zinc-700",onClick:l=>l.stopPropagation(),children:[g.jsx("h3",{className:"text-lg font-semibold mb-4 text-gray-900 dark:text-gray-100",children:"Save Request"}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{children:[g.jsx(lr,{htmlFor:"request-name",children:"Request Name (optional)"}),g.jsx(Or,{id:"request-name",value:e,onChange:l=>n(l.target.value),placeholder:r,className:"mt-2",onKeyDown:l=>{l.key==="Enter"&&a()},autoFocus:!0})]}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(et,{variant:"outline",onClick:s,children:"Cancel"}),g.jsxs(et,{onClick:a,children:[g.jsx(mR,{className:"h-4 w-4 mr-2"}),"Save"]})]})]})]})}):null}function $ve({selectedTool:t,toolArgs:e,onArgChange:r}){const n=t?.inputSchema?.properties||{},a=t?.inputSchema?.required||[];return Object.keys(n).length>0?g.jsx("div",{className:"space-y-4",children:Object.entries(n).map(([l,c])=>{const d=c;d.required=a.includes(l);const f=e[l];let m="";return f!=null&&(typeof f=="string"?m=f:m=JSON.stringify(f,null)),d.type==="object"||d.type==="array"||typeof f=="object"&&f!==null?g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(dh,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`,className:"min-h-[100px]"}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l):g.jsxs("div",{className:"space-y-2",children:[g.jsxs(lr,{htmlFor:l,className:"text-sm font-medium",children:[l,d?.required&&g.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),g.jsx(Or,{id:l,value:m,onChange:h=>r(l,h.target.value),placeholder:d?.description||`Enter ${l}`}),d?.description&&g.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:d.description})]},l)})}):g.jsx("div",{className:"flex items-center justify-center h-32 text-gray-500 dark:text-gray-400 text-sm",children:"No parameters required"})}function Bve({selectedTool:t,toolArgs:e,isExecuting:r,isConnected:n,onArgChange:a,onExecute:s,onSave:l}){return t?g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex-shrink-0 p-6 pt-3 pb-4 pr-3",children:g.jsxs("div",{children:[g.jsxs("div",{className:"flex items-center justify-between mb-0",children:[g.jsx("h3",{className:"text-lg font-semibold mb-2",children:t.name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(et,{onClick:s,disabled:r||!n,children:r?g.jsxs(g.Fragment,{children:[g.jsx(Di,{className:"mr-2"}),"Executing..."]}):g.jsxs(g.Fragment,{children:[g.jsx(mB,{className:"h-4 w-4 mr-2"}),"Execute"]})}),g.jsxs(et,{variant:"outline",onClick:l,disabled:r,className:"gap-2",children:[g.jsx(mR,{className:"h-4 w-4"}),"Save"]})]})]}),t.description&&g.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 leading-relaxed",children:t.description})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 pb-4 pr-3",children:g.jsx($ve,{selectedTool:t,toolArgs:e,onArgChange:a})})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx("p",{className:"text-gray-500 dark:text-gray-400 mb-2",children:"Select a tool to get started"}),g.jsx("p",{className:"text-xs text-gray-400 dark:text-gray-500",children:"Choose a tool from the list to view its details and execute it"})]})}function qve({results:t,copiedResult:e,previewMode:r,serverId:n,readResource:a,onCopy:s,onTogglePreview:l}){return g.jsx("div",{className:"flex flex-col h-full bg-white dark:bg-black border-t dark:border-zinc-700",children:g.jsx("div",{className:"flex-1 overflow-y-auto h-full",children:t.length>0?g.jsx("div",{className:"space-y-4 flex-1 h-full",children:t.map((c,d)=>{const f=c.toolMeta?.["openai/outputTemplate"],m=!!(f&&typeof f=="string"&&c.appsSdkResource),h=f,v=c.result?.content||[],b=v.filter(S=>S.type==="resource"&&ql(S.resource)),x=b.length>0;return g.jsxs("div",{className:"space-y-0 flex-1 h-full flex flex-col",children:[g.jsxs("div",{className:`flex items-center gap-2 px-4 pt-2 ${x||m?"border-b border-gray-200 dark:border-zinc-600 pb-2":""}`,children:[g.jsx("h3",{className:"text-sm font-medium",children:"Response"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(ac,{className:"h-3 w-3 text-gray-400"}),g.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:new Date(c.timestamp).toLocaleTimeString()})]}),c.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(td,{className:"h-3 w-3 text-gray-400"}),g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[c.duration,"ms"]})]}),m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",h||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Component"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"Raw JSON"})]})]}),x&&!m&&g.jsxs("div",{className:"flex items-center gap-4 ml-4",children:[g.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:["URI: ",b[0]?.resource?.uri||"No URI"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-black dark:text-white":"text-zinc-500 dark:text-zinc-400"}`,children:"Preview"}),g.jsx("span",{className:"text-xs text-zinc-400",children:"|"}),g.jsx("button",{onClick:()=>l(),className:`text-xs font-medium ${r?"text-zinc-500 dark:text-zinc-400":"text-black dark:text-white"}`,children:"JSON"})]})]}),g.jsx(et,{variant:"ghost",size:"sm",onClick:()=>s(d,c.result),className:"ml-auto",children:e===d?g.jsx(ki,{className:"h-4 w-4"}):g.jsx(aa,{className:"h-4 w-4"})})]}),c.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:c.error})]}):(()=>{if(m){const S=c.appsSdkResource;return S.isLoading?g.jsx(g.Fragment,{}):S.error?g.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded p-3 mx-4",children:[g.jsx("p",{className:"text-red-800 dark:text-red-300 font-medium",children:"Resource Error:"}),g.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:S.error})]}):r?g.jsx("div",{className:"flex-1",children:g.jsx(PA,{componentUrl:h,toolName:c.toolName,toolArgs:c.args,toolResult:c.result,resource:S.resourceData,serverId:n,readResource:a,className:"w-full h-full relative p-4"})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})}return x?r?g.jsxs("div",{className:"space-y-0 h-full",children:[b.map((S,R)=>g.jsx("div",{className:"mx-0 size-full",children:g.jsx(FH,{resource:S.resource,onUIAction:w=>{},className:"w-full h-full relative"})},R)),v.filter(S=>!(S.type==="resource"&&ql(S.resource))).length>0&&g.jsx("div",{className:"px-4",children:g.jsx(Pa,{data:v.filter(S=>!(S.type==="resource"&&ql(S.resource))),filename:`tool-result-${c.toolName}-non-ui-${Date.now()}.json`})})]}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-mcp-ui-${Date.now()}.json`})}):g.jsx("div",{className:"px-4 pt-4",children:g.jsx(Pa,{data:c.result,filename:`tool-result-${c.toolName}-${Date.now()}.json`})})})()]},d)})}):g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-center",children:g.jsx(bR,{vertical:!0,noBorder:!0,message:"No Results yet"})})})})})}function Hve({tools:t,selectedTool:e,onToolSelect:r,focusedIndex:n}){return t.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 text-center",children:[g.jsx(Ss,{className:"h-12 w-12 text-gray-400 dark:text-gray-600 mb-3"}),g.jsx("p",{className:"text-gray-500 dark:text-gray-400",children:"No tools available"})]}):g.jsx("div",{className:"overflow-y-auto flex-1 border-r dark:border-zinc-700 overscroll-contain",children:t.map((a,s)=>g.jsx(Fd,{id:`tool-${a.name}`,isSelected:e?.name===a.name,isFocused:n===s,icon:g.jsx(Ss,{className:"h-4 w-4"}),title:a.name,description:a.description,metadata:a.inputSchema?.properties&&g.jsxs(Va,{variant:"outline",className:"text-xs border-gray-300 dark:border-zinc-600 text-gray-600 dark:text-gray-400",children:[Object.keys(a.inputSchema.properties).length," params"]}),onClick:()=>r(a)},a.name))})}function Vve({activeTab:t,isSearchExpanded:e,searchQuery:r,filteredToolsCount:n,savedRequestsCount:a,onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f}){return g.jsx(jH,{activeTab:t,isSearchExpanded:e,searchQuery:r,primaryTabName:"tools",secondaryTabName:"saved",primaryTabTitle:"Tools",secondaryTabTitle:"Saved",primaryCount:n,secondaryCount:a,primaryIcon:Ss,secondaryIcon:$m,searchPlaceholder:"Search tools...",onSearchExpand:s,onSearchChange:l,onSearchBlur:c,onTabSwitch:d,searchInputRef:f})}const Kz="mcp-inspector-saved-requests";function $H({ref:t,tools:e,callTool:r,readResource:n,serverId:a,isConnected:s}){const[l,c]=y.useState(null),[d,f]=y.useState(null),{selectedToolName:m,setSelectedToolName:h}=Od(),[v,b]=y.useState({}),[x,S]=y.useState([]),[R,w]=y.useState(!1),[_,A]=y.useState(null),[C,k]=y.useState(""),[N,I]=y.useState("tools"),[O,M]=y.useState([]),[L,P]=y.useState(!1),[V,X]=y.useState(""),[Q,oe]=y.useState(!0),[U,W]=y.useState(!1),[H,te]=y.useState(-1),se=y.useRef(null);y.useImperativeHandle(t,()=>({focusSearch:()=>{W(!0),setTimeout(()=>{se.current&&se.current.focus()},0)},blurSearch:()=>{k(""),W(!1),se.current&&se.current.blur()}})),y.useEffect(()=>{try{const ye=localStorage.getItem(Kz);ye&&M(JSON.parse(ye))}catch(ye){console.error("[ToolsTab] Failed to load saved requests:",ye)}},[]);const B=y.useCallback(ye=>{try{localStorage.setItem(Kz,JSON.stringify(ye)),M(ye)}catch(Se){console.error("[ToolsTab] Failed to save requests:",Se)}},[]),q=y.useMemo(()=>{if(!C.trim())return e;const ye=C.toLowerCase();return e.filter(Se=>Se.name.toLowerCase().includes(ye)||Se.description?.toLowerCase().includes(ye))},[e,C]),$=y.useCallback(ye=>{c(ye);const Se={};ye.inputSchema?.properties&&Object.entries(ye.inputSchema.properties).forEach(([Ne,ge])=>{const ke=ge;ke.default!==void 0?Se[Ne]=ke.default:ke.type==="string"?Se[Ne]="":ke.type==="number"?Se[Ne]=0:ke.type==="boolean"?Se[Ne]=!1:ke.type==="array"?Se[Ne]=[]:ke.type==="object"&&(Se[Ne]={})}),b(Se)},[]),K=y.useCallback(ye=>{const Se=e.find(Ne=>Ne.name===ye.toolName);Se&&(c(Se),b(ye.args),f(ye))},[e]);y.useEffect(()=>{U&&se.current&&se.current.focus()},[U]);const J=y.useCallback(()=>{C.trim()||W(!1)},[C]);y.useEffect(()=>{N!=="tools"&&W(!1)},[N]),y.useEffect(()=>{te(-1)},[C,N]),y.useEffect(()=>{const ye=Se=>{const Ne=Se.target;if(Ne.tagName==="INPUT"||Ne.tagName==="TEXTAREA"||Ne.contentEditable==="true"||Se.metaKey||Se.ctrlKey||Se.altKey)return;const ke=N==="tools"?q:O;if(Se.key==="ArrowDown")Se.preventDefault(),te(Oe=>{const Xe=Oe+1;return Xe>=ke.length?0:Xe});else if(Se.key==="ArrowUp")Se.preventDefault(),te(Oe=>{const Xe=Oe-1;return Xe<0?ke.length-1:Xe});else if(Se.key==="Enter"&&H>=0)if(Se.preventDefault(),N==="tools"){const Oe=q[H];Oe&&$(Oe)}else{const Oe=O[H];Oe&&K(Oe)}};return document.addEventListener("keydown",ye),()=>document.removeEventListener("keydown",ye)},[H,q,O,N,$,K]),y.useEffect(()=>{if(H>=0){const ye=N==="tools"?`tool-${q[H]?.name}`:`saved-${O[H]?.id}`,Se=document.getElementById(ye);Se&&Se.scrollIntoView({behavior:"smooth",block:"nearest"})}},[H,q,O,N]),y.useEffect(()=>{if(m&&e.length>0){const ye=e.find(Se=>Se.name===m);if(ye&&l?.name!==ye.name){h(null);const Se=setTimeout(()=>{$(ye);const Ne=document.getElementById(`tool-${ye.name}`);Ne&&Ne.scrollIntoView({behavior:"smooth",block:"nearest"})},100);return()=>clearTimeout(Se)}}},[m,e,l,$,h]);const z=y.useCallback((ye,Se)=>{b(Ne=>{const ge={...Ne};if(l?.inputSchema?.properties?.[ye])if(l.inputSchema.properties[ye].type==="string")ge[ye]=Se;else try{ge[ye]=JSON.parse(Se)}catch{ge[ye]=Se}else try{ge[ye]=JSON.parse(Se)}catch{ge[ye]=Se}return ge})},[l]),j=y.useCallback(async()=>{if(!l||R)return;w(!0);const ye=Date.now();try{const Se=await r(l.name,v),Ne=Date.now()-ye;jr.getInstance().capture(new $O({toolName:l.name,serverId:a,success:!0,duration:Ne})).catch(()=>{});const ke=l?._meta||l?.metadata,Oe=ke?.["openai/outputTemplate"];let Xe;if(Oe&&typeof Oe=="string"){const ot={toolName:l.name,args:v,result:Se,timestamp:ye,duration:Ne,toolMeta:ke,appsSdkResource:{uri:Oe,resourceData:null,isLoading:!0}};S([ot]);try{const $e=await n(Oe);let We=null;if(Se?.structuredContent)We=Se.structuredContent;else if(Array.isArray(Se)&&Se[0]){const Ae=Se[0];Ae.output?.value?.structuredContent?We=Ae.output.value.structuredContent:Ae.structuredContent?We=Ae.structuredContent:Ae.output?.value&&(We=Ae.output.value)}We||(We=Se),Xe={uri:Oe,resourceData:{...$e,structuredContent:We},isLoading:!1}}catch($e){Xe={uri:Oe,resourceData:null,isLoading:!1,error:$e instanceof Error?$e.message:String($e)}}S($e=>$e.map((We,Ae)=>Ae===0?{...We,appsSdkResource:Xe}:We))}else S(ot=>[{toolName:l.name,args:v,result:Se,timestamp:ye,duration:Ne,toolMeta:ke},...ot])}catch(Se){const Ne=Date.now()-ye;jr.getInstance().capture(new $O({toolName:l.name,serverId:a,success:!1,duration:Ne,error:Se instanceof Error?Se.message:String(Se)})).catch(()=>{});const ke=l?._meta||l?.metadata,Oe={toolName:l.name,args:v,result:null,error:Se instanceof Error?Se.message:String(Se),timestamp:ye,duration:Ne,toolMeta:ke},Xe=ke?.["openai/outputTemplate"];S(Xe?[Oe]:ot=>[Oe,...ot])}finally{w(!1)}},[l,v,R,r,n,a]),Z=y.useCallback(async(ye,Se)=>{try{await navigator.clipboard.writeText(JSON.stringify(Se,null,2)),A(ye),setTimeout(()=>A(null),2e3)}catch(Ne){console.error("[ToolsTab] Failed to copy result:",Ne)}},[]),ne=y.useCallback(ye=>{S(Se=>Se.filter((Ne,ge)=>ge!==ye))},[]),G=y.useCallback(ye=>{const Se=x[ye];if(Se){const Ne=window.open("","_blank","width=800,height=600");Ne&&(Ne.document.write(`
|
|
1425
1425
|
<html>
|
|
1426
1426
|
<head>
|
|
1427
1427
|
<title>${Se.toolName} Result</title>
|