mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
4187 lines
1.8 MiB
4187 lines
1.8 MiB
import{r as T,R as et,a as ez,b as tz,c as _Y,d as q_,e as SC,u as B_,L as PR,N as BE,O as nz,f as $Y,g as Hm,h as NY,i as DY,j as ns,B as PY}from"./react-v1TLhXpT.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function s(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=s(u);fetch(u.href,h)}})();var MR={exports:{}},ob={};var jM;function MY(){if(jM)return ob;jM=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(o,u,h){var m=null;if(h!==void 0&&(m=""+h),u.key!==void 0&&(m=""+u.key),"key"in u){h={};for(var g in u)g!=="key"&&(h[g]=u[g])}else h=u;return u=h.ref,{$$typeof:e,type:o,key:m,ref:u!==void 0?u:null,props:h}}return ob.Fragment=r,ob.jsx=s,ob.jsxs=s,ob}var CM;function IY(){return CM||(CM=1,MR.exports=MY()),MR.exports}var c=IY(),zY=(e,r,s,o,u,h,m,g)=>{let b=document.documentElement,w=["light","dark"];function E(R){(Array.isArray(e)?e:[e]).forEach(M=>{let I=M==="class",F=I&&h?u.map(H=>h[H]||H):u;I?(b.classList.remove(...F),b.classList.add(h&&h[R]?h[R]:R)):b.setAttribute(M,R)}),A(R)}function A(R){g&&w.includes(R)&&(b.style.colorScheme=R)}function k(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(o)E(o);else try{let R=localStorage.getItem(r)||s,M=m&&R==="system"?k():R;E(M)}catch{}},AM=["light","dark"],rz="(prefers-color-scheme: dark)",LY=typeof window>"u",U_=T.createContext(void 0),FY={setTheme:e=>{},themes:[]},K_=()=>{var e;return(e=T.useContext(U_))!=null?e:FY},qY=e=>T.useContext(U_)?T.createElement(T.Fragment,null,e.children):T.createElement(UY,{...e}),BY=["light","dark"],UY=({forcedTheme:e,disableTransitionOnChange:r=!1,enableSystem:s=!0,enableColorScheme:o=!0,storageKey:u="theme",themes:h=BY,defaultTheme:m=s?"system":"light",attribute:g="data-theme",value:b,children:w,nonce:E,scriptProps:A})=>{let[k,R]=T.useState(()=>VY(u,m)),[M,I]=T.useState(()=>k==="system"?IR():k),F=b?Object.values(b):h,H=T.useCallback(W=>{let ae=W;if(!ae)return;W==="system"&&s&&(ae=IR());let Q=b?b[ae]:ae,te=r?HY(E):null,de=document.documentElement,je=we=>{we==="class"?(de.classList.remove(...F),Q&&de.classList.add(Q)):we.startsWith("data-")&&(Q?de.setAttribute(we,Q):de.removeAttribute(we))};if(Array.isArray(g)?g.forEach(je):je(g),o){let we=AM.includes(m)?m:null,ie=AM.includes(ae)?ae:we;de.style.colorScheme=ie}te?.()},[E]),V=T.useCallback(W=>{let ae=typeof W=="function"?W(k):W;R(ae);try{localStorage.setItem(u,ae)}catch{}},[k]),K=T.useCallback(W=>{let ae=IR(W);I(ae),k==="system"&&s&&!e&&H("system")},[k,e]);T.useEffect(()=>{let W=window.matchMedia(rz);return W.addListener(K),K(W),()=>W.removeListener(K)},[K]),T.useEffect(()=>{let W=ae=>{ae.key===u&&(ae.newValue?R(ae.newValue):V(m))};return window.addEventListener("storage",W),()=>window.removeEventListener("storage",W)},[V]),T.useEffect(()=>{H(e??k)},[e,k]);let z=T.useMemo(()=>({theme:k,setTheme:V,forcedTheme:e,resolvedTheme:k==="system"?M:k,themes:s?[...h,"system"]:h,systemTheme:s?M:void 0}),[k,V,e,M,s,h]);return T.createElement(U_.Provider,{value:z},T.createElement(KY,{forcedTheme:e,storageKey:u,attribute:g,enableSystem:s,enableColorScheme:o,defaultTheme:m,value:b,themes:h,nonce:E,scriptProps:A}),w)},KY=T.memo(({forcedTheme:e,storageKey:r,attribute:s,enableSystem:o,enableColorScheme:u,defaultTheme:h,value:m,themes:g,nonce:b,scriptProps:w})=>{let E=JSON.stringify([s,r,h,e,g,m,o,u]).slice(1,-1);return T.createElement("script",{...w,suppressHydrationWarning:!0,nonce:typeof window>"u"?b:"",dangerouslySetInnerHTML:{__html:`(${zY.toString()})(${E})`}})}),VY=(e,r)=>{if(LY)return;let s;try{s=localStorage.getItem(e)||void 0}catch{}return s||r},HY=e=>{let r=document.createElement("style");return e&&r.setAttribute("nonce",e),r.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(r)},1)}},IR=e=>(e||(e=window.matchMedia(rz)),e.matches?"dark":"light");function GY({children:e,defaultTheme:r="system",storageKey:s="vite-ui-theme"}){return c.jsx(qY,{attribute:"class",defaultTheme:r,enableSystem:!0,storageKey:s,disableTransitionOnChange:!0,children:e})}var kg=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},XY={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)},YY=class{#e=XY;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,r){return this.#e.setTimeout(e,r)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,r){return this.#e.setInterval(e,r)}clearInterval(e){this.#e.clearInterval(e)}},Sp=new YY;function ZY(e){setTimeout(e,0)}var Rp=typeof window>"u"||"Deno"in globalThis;function Ui(){}function JY(e,r){return typeof e=="function"?e(r):e}function NT(e){return typeof e=="number"&&e>=0&&e!==1/0}function sz(e,r){return Math.max(e+(r||0)-Date.now(),0)}function qd(e,r){return typeof e=="function"?e(r):e}function oo(e,r){return typeof e=="function"?e(r):e}function OM(e,r){const{type:s="all",exact:o,fetchStatus:u,predicate:h,queryKey:m,stale:g}=e;if(m){if(o){if(r.queryHash!==V_(m,r.options))return!1}else if(!Kb(r.queryKey,m))return!1}if(s!=="all"){const b=r.isActive();if(s==="active"&&!b||s==="inactive"&&b)return!1}return!(typeof g=="boolean"&&r.isStale()!==g||u&&u!==r.state.fetchStatus||h&&!h(r))}function kM(e,r){const{exact:s,status:o,predicate:u,mutationKey:h}=e;if(h){if(!r.options.mutationKey)return!1;if(s){if(Tp(r.options.mutationKey)!==Tp(h))return!1}else if(!Kb(r.options.mutationKey,h))return!1}return!(o&&r.state.status!==o||u&&!u(r))}function V_(e,r){return(r?.queryKeyHashFn||Tp)(e)}function Tp(e){return JSON.stringify(e,(r,s)=>DT(s)?Object.keys(s).sort().reduce((o,u)=>(o[u]=s[u],o),{}):s)}function Kb(e,r){return e===r?!0:typeof e!=typeof r?!1:e&&r&&typeof e=="object"&&typeof r=="object"?Object.keys(r).every(s=>Kb(e[s],r[s])):!1}var WY=Object.prototype.hasOwnProperty;function iz(e,r){if(e===r)return e;const s=RM(e)&&RM(r);if(!s&&!(DT(e)&&DT(r)))return r;const u=(s?e:Object.keys(e)).length,h=s?r:Object.keys(r),m=h.length,g=s?new Array(m):{};let b=0;for(let w=0;w<m;w++){const E=s?w:h[w],A=e[E],k=r[E];if(A===k){g[E]=A,(s?w<u:WY.call(e,E))&&b++;continue}if(A===null||k===null||typeof A!="object"||typeof k!="object"){g[E]=k;continue}const R=iz(A,k);g[E]=R,R===A&&b++}return u===m&&b===u?e:g}function $j(e,r){if(!r||Object.keys(e).length!==Object.keys(r).length)return!1;for(const s in e)if(e[s]!==r[s])return!1;return!0}function RM(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function DT(e){if(!TM(e))return!1;const r=e.constructor;if(r===void 0)return!0;const s=r.prototype;return!(!TM(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function TM(e){return Object.prototype.toString.call(e)==="[object Object]"}function QY(e){return new Promise(r=>{Sp.setTimeout(r,e)})}function PT(e,r,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,r):s.structuralSharing!==!1?iz(e,r):r}function eZ(e,r,s=0){const o=[...e,r];return s&&o.length>s?o.slice(1):o}function tZ(e,r,s=0){const o=[r,...e];return s&&o.length>s?o.slice(0,-1):o}var H_=Symbol();function az(e,r){return!e.queryFn&&r?.initialPromise?()=>r.initialPromise:!e.queryFn||e.queryFn===H_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function G_(e,r){return typeof e=="function"?e(...r):!!e}function nZ(e,r,s){let o=!1,u;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(u??=r(),o||(o=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),e}var rZ=class extends kg{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Rp&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},X_=new rZ;function MT(){let e,r;const s=new Promise((u,h)=>{e=u,r=h});s.status="pending",s.catch(()=>{});function o(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{o({status:"fulfilled",value:u}),e(u)},s.reject=u=>{o({status:"rejected",reason:u}),r(u)},s}var sZ=ZY;function iZ(){let e=[],r=0,s=g=>{g()},o=g=>{g()},u=sZ;const h=g=>{r?e.push(g):u(()=>{s(g)})},m=()=>{const g=e;e=[],g.length&&u(()=>{o(()=>{g.forEach(b=>{s(b)})})})};return{batch:g=>{let b;r++;try{b=g()}finally{r--,r||m()}return b},batchCalls:g=>(...b)=>{h(()=>{g(...b)})},schedule:h,setNotifyFunction:g=>{s=g},setBatchNotifyFunction:g=>{o=g},setScheduler:g=>{u=g}}}var As=iZ(),aZ=class extends kg{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Rp&&window.addEventListener){const r=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(s=>{s(e)}))}isOnline(){return this.#e}},Nj=new aZ;function oZ(e){return Math.min(1e3*2**e,3e4)}function oz(e){return(e??"online")==="online"?Nj.isOnline():!0}var IT=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function lz(e){let r=!1,s=0,o;const u=MT(),h=()=>u.status!=="pending",m=I=>{if(!h()){const F=new IT(I);k(F),e.onCancel?.(F)}},g=()=>{r=!0},b=()=>{r=!1},w=()=>X_.isFocused()&&(e.networkMode==="always"||Nj.isOnline())&&e.canRun(),E=()=>oz(e.networkMode)&&e.canRun(),A=I=>{h()||(o?.(),u.resolve(I))},k=I=>{h()||(o?.(),u.reject(I))},R=()=>new Promise(I=>{o=F=>{(h()||w())&&I(F)},e.onPause?.()}).then(()=>{o=void 0,h()||e.onContinue?.()}),M=()=>{if(h())return;let I;const F=s===0?e.initialPromise:void 0;try{I=F??e.fn()}catch(H){I=Promise.reject(H)}Promise.resolve(I).then(A).catch(H=>{if(h())return;const V=e.retry??(Rp?0:3),K=e.retryDelay??oZ,z=typeof K=="function"?K(s,H):K,W=V===!0||typeof V=="number"&&s<V||typeof V=="function"&&V(s,H);if(r||!W){k(H);return}s++,e.onFail?.(s,H),QY(z).then(()=>w()?void 0:R()).then(()=>{r?k(H):M()})})};return{promise:u,status:()=>u.status,cancel:m,continue:()=>(o?.(),u),cancelRetry:g,continueRetry:b,canStart:E,start:()=>(E()?M():R().then(M),u)}}var cz=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),NT(this.gcTime)&&(this.#e=Sp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rp?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Sp.clearTimeout(this.#e),this.#e=void 0)}},lZ=class extends cz{#e;#t;#n;#s;#r;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#n=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=$M(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=$M(this.options);r.data!==void 0&&(this.setState(_M(r.data,r.dataUpdatedAt)),this.#e=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,r){const s=PT(this.state.data,e,this.options);return this.#i({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(e,r){this.#i({type:"setState",state:e,setStateOptions:r})}cancel(e){const r=this.#r?.promise;return this.#r?.cancel(e),r?r.then(Ui).catch(Ui):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>oo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===H_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>qd(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!sz(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(r=>r.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(r=>r.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,r){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const g=this.observers.find(b=>b.options.queryFn);g&&this.setOptions(g.options)}const s=new AbortController,o=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},u=()=>{const g=az(this.options,r),w=(()=>{const E={client:this.#s,queryKey:this.queryKey,meta:this.meta};return o(E),E})();return this.#o=!1,this.options.persister?this.options.persister(g,w,this):g(w)},m=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:u};return o(g),g})();this.options.behavior?.onFetch(m,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==m.fetchOptions?.meta)&&this.#i({type:"fetch",meta:m.fetchOptions?.meta}),this.#r=lz({initialPromise:r?.initialPromise,fn:m.fetchFn,onCancel:g=>{g instanceof IT&&g.revert&&this.setState({...this.#t,fetchStatus:"idle"}),s.abort()},onFail:(g,b)=>{this.#i({type:"failed",failureCount:g,error:b})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0});try{const g=await this.#r.start();if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),this.#n.config.onSuccess?.(g,this),this.#n.config.onSettled?.(g,this.state.error,this),g}catch(g){if(g instanceof IT){if(g.silent)return this.#r.promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw this.#i({type:"error",error:g}),this.#n.config.onError?.(g,this),this.#n.config.onSettled?.(this.state.data,g,this),g}finally{this.scheduleGc()}}#i(e){const r=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...uz(s.data,this.options),fetchMeta:e.meta??null};case"success":const o={...s,..._M(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?o:void 0,o;case"error":const u=e.error;return{...s,error:u,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=r(this.state),As.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function uz(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:oz(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _M(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function $M(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,s=r!==void 0,o=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var cZ=class extends kg{constructor(e,r){super(),this.options=r,this.#e=e,this.#i=null,this.#o=MT(),this.bindMethods(),this.setOptions(r)}#e;#t=void 0;#n=void 0;#s=void 0;#r;#a;#o;#i;#m;#h;#p;#c;#u;#l;#f=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),NM(this.#t,this.options)?this.#d():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const r=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof oo(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!$j(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const o=this.hasListeners();o&&DM(this.#t,s,this.options,r)&&this.#d(),this.updateResult(),o&&(this.#t!==s||oo(this.options.enabled,this.#t)!==oo(r.enabled,this.#t)||qd(this.options.staleTime,this.#t)!==qd(r.staleTime,this.#t))&&this.#g();const u=this.#y();o&&(this.#t!==s||oo(this.options.enabled,this.#t)!==oo(r.enabled,this.#t)||u!==this.#l)&&this.#v(u)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),s=this.createResult(r,e);return dZ(this,s)&&(this.#s=s,this.#a=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#s}trackResult(e,r){return new Proxy(e,{get:(s,o)=>(this.trackProp(o),r?.(o),o==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,o))})}trackProp(e){this.#f.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,r);return s.fetch().then(()=>this.createResult(s,r))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#d(e){this.#S();let r=this.#t.fetch(this.options,e);return e?.throwOnError||(r=r.catch(Ui)),r}#g(){this.#b();const e=qd(this.options.staleTime,this.#t);if(Rp||this.#s.isStale||!NT(e))return;const s=sz(this.#s.dataUpdatedAt,e)+1;this.#c=Sp.setTimeout(()=>{this.#s.isStale||this.updateResult()},s)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#w(),this.#l=e,!(Rp||oo(this.options.enabled,this.#t)===!1||!NT(this.#l)||this.#l===0)&&(this.#u=Sp.setInterval(()=>{(this.options.refetchIntervalInBackground||X_.isFocused())&&this.#d()},this.#l))}#x(){this.#g(),this.#v(this.#y())}#b(){this.#c&&(Sp.clearTimeout(this.#c),this.#c=void 0)}#w(){this.#u&&(Sp.clearInterval(this.#u),this.#u=void 0)}createResult(e,r){const s=this.#t,o=this.options,u=this.#s,h=this.#r,m=this.#a,b=e!==s?e.state:this.#n,{state:w}=e;let E={...w},A=!1,k;if(r._optimisticResults){const te=this.hasListeners(),de=!te&&NM(e,r),je=te&&DM(e,s,r,o);(de||je)&&(E={...E,...uz(w.data,e.options)}),r._optimisticResults==="isRestoring"&&(E.fetchStatus="idle")}let{error:R,errorUpdatedAt:M,status:I}=E;k=E.data;let F=!1;if(r.placeholderData!==void 0&&k===void 0&&I==="pending"){let te;u?.isPlaceholderData&&r.placeholderData===m?.placeholderData?(te=u.data,F=!0):te=typeof r.placeholderData=="function"?r.placeholderData(this.#p?.state.data,this.#p):r.placeholderData,te!==void 0&&(I="success",k=PT(u?.data,te,r),A=!0)}if(r.select&&k!==void 0&&!F)if(u&&k===h?.data&&r.select===this.#m)k=this.#h;else try{this.#m=r.select,k=r.select(k),k=PT(u?.data,k,r),this.#h=k,this.#i=null}catch(te){this.#i=te}this.#i&&(R=this.#i,k=this.#h,M=Date.now(),I="error");const H=E.fetchStatus==="fetching",V=I==="pending",K=I==="error",z=V&&H,W=k!==void 0,Q={status:I,fetchStatus:E.fetchStatus,isPending:V,isSuccess:I==="success",isError:K,isInitialLoading:z,isLoading:z,data:k,dataUpdatedAt:E.dataUpdatedAt,error:R,errorUpdatedAt:M,failureCount:E.fetchFailureCount,failureReason:E.fetchFailureReason,errorUpdateCount:E.errorUpdateCount,isFetched:E.dataUpdateCount>0||E.errorUpdateCount>0,isFetchedAfterMount:E.dataUpdateCount>b.dataUpdateCount||E.errorUpdateCount>b.errorUpdateCount,isFetching:H,isRefetching:H&&!V,isLoadingError:K&&!W,isPaused:E.fetchStatus==="paused",isPlaceholderData:A,isRefetchError:K&&W,isStale:Y_(e,r),refetch:this.refetch,promise:this.#o,isEnabled:oo(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const te=we=>{Q.status==="error"?we.reject(Q.error):Q.data!==void 0&&we.resolve(Q.data)},de=()=>{const we=this.#o=Q.promise=MT();te(we)},je=this.#o;switch(je.status){case"pending":e.queryHash===s.queryHash&&te(je);break;case"fulfilled":(Q.status==="error"||Q.data!==je.value)&&de();break;case"rejected":(Q.status!=="error"||Q.error!==je.reason)&&de();break}}return Q}updateResult(){const e=this.#s,r=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#p=this.#t),$j(r,e))return;this.#s=r;const s=()=>{if(!e)return!0;const{notifyOnChangeProps:o}=this.options,u=typeof o=="function"?o():o;if(u==="all"||!u&&!this.#f.size)return!0;const h=new Set(u??this.#f);return this.options.throwOnError&&h.add("error"),Object.keys(this.#s).some(m=>{const g=m;return this.#s[g]!==e[g]&&h.has(g)})};this.#E({listeners:s()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const r=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#E(e){As.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function uZ(e,r){return oo(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&r.retryOnMount===!1)}function NM(e,r){return uZ(e,r)||e.state.data!==void 0&&zT(e,r,r.refetchOnMount)}function zT(e,r,s){if(oo(r.enabled,e)!==!1&&qd(r.staleTime,e)!=="static"){const o=typeof s=="function"?s(e):s;return o==="always"||o!==!1&&Y_(e,r)}return!1}function DM(e,r,s,o){return(e!==r||oo(o.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Y_(e,s)}function Y_(e,r){return oo(r.enabled,e)!==!1&&e.isStaleByTime(qd(r.staleTime,e))}function dZ(e,r){return!$j(e.getCurrentResult(),r)}function PM(e){return{onFetch:(r,s)=>{const o=r.options,u=r.fetchOptions?.meta?.fetchMore?.direction,h=r.state.data?.pages||[],m=r.state.data?.pageParams||[];let g={pages:[],pageParams:[]},b=0;const w=async()=>{let E=!1;const A=M=>{nZ(M,()=>r.signal,()=>E=!0)},k=az(r.options,r.fetchOptions),R=async(M,I,F)=>{if(E)return Promise.reject();if(I==null&&M.pages.length)return Promise.resolve(M);const V=(()=>{const ae={client:r.client,queryKey:r.queryKey,pageParam:I,direction:F?"backward":"forward",meta:r.options.meta};return A(ae),ae})(),K=await k(V),{maxPages:z}=r.options,W=F?tZ:eZ;return{pages:W(M.pages,K,z),pageParams:W(M.pageParams,I,z)}};if(u&&h.length){const M=u==="backward",I=M?hZ:MM,F={pages:h,pageParams:m},H=I(o,F);g=await R(F,H,M)}else{const M=e??h.length;do{const I=b===0?m[0]??o.initialPageParam:MM(o,g);if(b>0&&I==null)break;g=await R(g,I),b++}while(b<M)}return g};r.options.persister?r.fetchFn=()=>r.options.persister?.(w,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=w}}}function MM(e,{pages:r,pageParams:s}){const o=r.length-1;return r.length>0?e.getNextPageParam(r[o],r,s[o],s):void 0}function hZ(e,{pages:r,pageParams:s}){return r.length>0?e.getPreviousPageParam?.(r[0],r,s[0],s):void 0}var pZ=class extends cz{#e;#t;#n;#s;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||dz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(r=>r!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const r=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=lz({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(h,m)=>{this.#r({type:"failed",failureCount:h,error:m})},onPause:()=>{this.#r({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const o=this.state.status==="pending",u=!this.#s.canStart();try{if(o)r();else{this.#r({type:"pending",variables:e,isPaused:u}),await this.#n.config.onMutate?.(e,this,s);const m=await this.options.onMutate?.(e,s);m!==this.state.context&&this.#r({type:"pending",context:m,variables:e,isPaused:u})}const h=await this.#s.start();return await this.#n.config.onSuccess?.(h,e,this.state.context,this,s),await this.options.onSuccess?.(h,e,this.state.context,s),await this.#n.config.onSettled?.(h,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(h,null,e,this.state.context,s),this.#r({type:"success",data:h}),h}catch(h){try{await this.#n.config.onError?.(h,e,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onError?.(h,e,this.state.context,s)}catch(m){Promise.reject(m)}try{await this.#n.config.onSettled?.(void 0,h,this.state.variables,this.state.context,this,s)}catch(m){Promise.reject(m)}try{await this.options.onSettled?.(void 0,h,e,this.state.context,s)}catch(m){Promise.reject(m)}throw this.#r({type:"error",error:h}),h}finally{this.#n.runNext(this)}}#r(e){const r=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),As.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function dz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fZ=class extends kg{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,r,s){const o=new pZ({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(r),state:s});return this.add(o),o}add(e){this.#e.add(e);const r=UE(e);if(typeof r=="string"){const s=this.#t.get(r);s?s.push(e):this.#t.set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const r=UE(e);if(typeof r=="string"){const s=this.#t.get(r);if(s)if(s.length>1){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}else s[0]===e&&this.#t.delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=UE(e);if(typeof r=="string"){const o=this.#t.get(r)?.find(u=>u.state.status==="pending");return!o||o===e}else return!0}runNext(e){const r=UE(e);return typeof r=="string"?this.#t.get(r)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){As.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const r={exact:!0,...e};return this.getAll().find(s=>kM(r,s))}findAll(e={}){return this.getAll().filter(r=>kM(e,r))}notify(e){As.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return As.batch(()=>Promise.all(e.map(r=>r.continue().catch(Ui))))}};function UE(e){return e.options.scope?.id}var mZ=class extends kg{#e;#t=void 0;#n;#s;constructor(r,s){super(),this.#e=r,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){const s=this.options;this.options=this.#e.defaultMutationOptions(r),$j(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Tp(s.mutationKey)!==Tp(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(r){this.#r(),this.#a(r)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(r,s){return this.#s=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(r)}#r(){const r=this.#n?.state??dz();this.#t={...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset}}#a(r){As.batch(()=>{if(this.#s&&this.hasListeners()){const s=this.#t.variables,o=this.#t.context,u={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(r?.type==="success"){try{this.#s.onSuccess?.(r.data,s,o,u)}catch(h){Promise.reject(h)}try{this.#s.onSettled?.(r.data,null,s,o,u)}catch(h){Promise.reject(h)}}else if(r?.type==="error"){try{this.#s.onError?.(r.error,s,o,u)}catch(h){Promise.reject(h)}try{this.#s.onSettled?.(void 0,r.error,s,o,u)}catch(h){Promise.reject(h)}}}this.listeners.forEach(s=>{s(this.#t)})})}},gZ=class extends kg{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,r,s){const o=r.queryKey,u=r.queryHash??V_(o,r);let h=this.get(u);return h||(h=new lZ({client:e,queryKey:o,queryHash:u,options:e.defaultQueryOptions(r),state:s,defaultOptions:e.getQueryDefaults(o)}),this.add(h)),h}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=this.#e.get(e.queryHash);r&&(e.destroy(),r===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){As.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const r={exact:!0,...e};return this.getAll().find(s=>OM(r,s))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(s=>OM(e,s)):r}notify(e){As.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){As.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){As.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},yZ=class{#e;#t;#n;#s;#r;#a;#o;#i;constructor(e={}){this.#e=e.queryCache||new gZ,this.#t=e.mutationCache||new fZ,this.#n=e.defaultOptions||{},this.#s=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=X_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Nj.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),s=this.#e.build(this,r),o=s.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(qd(r.staleTime,s))&&this.prefetchQuery(r),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:r,state:s})=>{const o=s.data;return[r,o]})}setQueryData(e,r,s){const o=this.defaultQueryOptions({queryKey:e}),h=this.#e.get(o.queryHash)?.state.data,m=JY(r,h);if(m!==void 0)return this.#e.build(this,o).setData(m,{...s,manual:!0})}setQueriesData(e,r,s){return As.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,r,s)]))}getQueryState(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state}removeQueries(e){const r=this.#e;As.batch(()=>{r.findAll(e).forEach(s=>{r.remove(s)})})}resetQueries(e,r){const s=this.#e;return As.batch(()=>(s.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},r)))}cancelQueries(e,r={}){const s={revert:!0,...r},o=As.batch(()=>this.#e.findAll(e).map(u=>u.cancel(s)));return Promise.all(o).then(Ui).catch(Ui)}invalidateQueries(e,r={}){return As.batch(()=>(this.#e.findAll(e).forEach(s=>{s.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},r)))}refetchQueries(e,r={}){const s={...r,cancelRefetch:r.cancelRefetch??!0},o=As.batch(()=>this.#e.findAll(e).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let h=u.fetch(void 0,s);return s.throwOnError||(h=h.catch(Ui)),u.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(o).then(Ui)}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const s=this.#e.build(this,r);return s.isStaleByTime(qd(r.staleTime,s))?s.fetch(r):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ui).catch(Ui)}fetchInfiniteQuery(e){return e.behavior=PM(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ui).catch(Ui)}ensureInfiniteQueryData(e){return e.behavior=PM(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Nj.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,r){this.#s.set(Tp(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...this.#s.values()],s={};return r.forEach(o=>{Kb(e,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(e,r){this.#r.set(Tp(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...this.#r.values()],s={};return r.forEach(o=>{Kb(e,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const r={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=V_(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===H_&&(r.enabled=!1),r}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},hz=T.createContext(void 0),Ms=e=>{const r=T.useContext(hz);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},vZ=({client:e,children:r})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),c.jsx(hz.Provider,{value:e,children:r})),pz=T.createContext(!1),xZ=()=>T.useContext(pz);pz.Provider;function bZ(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var wZ=T.createContext(bZ()),SZ=()=>T.useContext(wZ),EZ=(e,r,s)=>{const o=s?.state.error&&typeof e.throwOnError=="function"?G_(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(r.isReset()||(e.retryOnMount=!1))},jZ=e=>{T.useEffect(()=>{e.clearReset()},[e])},CZ=({result:e,errorResetBoundary:r,throwOnError:s,query:o,suspense:u})=>e.isError&&!r.isReset()&&!e.isFetching&&o&&(u&&e.data===void 0||G_(s,[e.error,o])),AZ=e=>{if(e.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),o=e.staleTime;e.staleTime=typeof o=="function"?(...u)=>s(o(...u)):s(o),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},OZ=(e,r)=>e.isLoading&&e.isFetching&&!r,kZ=(e,r)=>e?.suspense&&r.isPending,IM=(e,r,s)=>r.fetchOptimistic(e).catch(()=>{s.clearReset()});function RZ(e,r,s){const o=xZ(),u=SZ(),h=Ms(),m=h.defaultQueryOptions(e);h.getDefaultOptions().queries?._experimental_beforeQuery?.(m);const g=h.getQueryCache().get(m.queryHash);m._optimisticResults=o?"isRestoring":"optimistic",AZ(m),EZ(m,u,g),jZ(u);const b=!h.getQueryCache().get(m.queryHash),[w]=T.useState(()=>new r(h,m)),E=w.getOptimisticResult(m),A=!o&&e.subscribed!==!1;if(T.useSyncExternalStore(T.useCallback(k=>{const R=A?w.subscribe(As.batchCalls(k)):Ui;return w.updateResult(),R},[w,A]),()=>w.getCurrentResult(),()=>w.getCurrentResult()),T.useEffect(()=>{w.setOptions(m)},[m,w]),kZ(m,E))throw IM(m,w,u);if(CZ({result:E,errorResetBoundary:u,throwOnError:m.throwOnError,query:g,suspense:m.suspense}))throw E.error;return h.getDefaultOptions().queries?._experimental_afterQuery?.(m,E),m.experimental_prefetchInRender&&!Rp&&OZ(E,o)&&(b?IM(m,w,u):g?.promise)?.catch(Ui).finally(()=>{w.updateResult()}),m.notifyOnChangeProps?E:w.trackResult(E)}function Un(e,r){return RZ(e,cZ)}function Wt(e,r){const s=Ms(),[o]=T.useState(()=>new mZ(s,e));T.useEffect(()=>{o.setOptions(e)},[o,e]);const u=T.useSyncExternalStore(T.useCallback(m=>o.subscribe(As.batchCalls(m)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),h=T.useCallback((m,g)=>{o.mutate(m,g).catch(Ui)},[o]);if(u.error&&G_(o.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:h,mutateAsync:u.mutate}}const TZ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_Z=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,s,o)=>o?o.toUpperCase():s.toLowerCase()),zM=e=>{const r=_Z(e);return r.charAt(0).toUpperCase()+r.slice(1)},fz=(...e)=>e.filter((r,s,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===s).join(" ").trim(),$Z=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var NZ={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 DZ=T.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:u="",children:h,iconNode:m,...g},b)=>T.createElement("svg",{ref:b,...NZ,width:r,height:r,stroke:e,strokeWidth:o?Number(s)*24/Number(r):s,className:fz("lucide",u),...!h&&!$Z(g)&&{"aria-hidden":"true"},...g},[...m.map(([w,E])=>T.createElement(w,E)),...Array.isArray(h)?h:[h]]));const ln=(e,r)=>{const s=T.forwardRef(({className:o,...u},h)=>T.createElement(DZ,{ref:h,iconNode:r,className:fz(`lucide-${TZ(zM(e))}`,`lucide-${e}`,o),...u}));return s.displayName=zM(e),s};const PZ=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],MZ=ln("boxes",PZ);const IZ=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],mz=ln("building-2",IZ);const zZ=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],gz=ln("check",zZ);const LZ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yz=ln("chevron-down",LZ);const FZ=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qZ=ln("chevron-right",FZ);const BZ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],UZ=ln("chevron-up",BZ);const KZ=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],VZ=ln("chevrons-up-down",KZ);const HZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Dj=ln("circle-alert",HZ);const GZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],EC=ln("circle-check",GZ);const XZ=[["path",{d:"M22 2 2 22",key:"y4kqgn"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Rg=ln("circle-slash-2",XZ);const YZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],ZZ=ln("circle",YZ);const JZ=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],WZ=ln("clipboard",JZ);const QZ=[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1uwlt4"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z",key:"10291m"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z",key:"1tqoq1"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z",key:"1x6lto"}]],eJ=ln("component",QZ);const tJ=[["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"}]],nJ=ln("download",tJ);const rJ=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],sJ=ln("earth",rJ);const iJ=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Z_=ln("ellipsis",iJ);const aJ=[["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"}]],oJ=ln("external-link",aJ);const lJ=[["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"}]],LT=ln("eye",lJ);const cJ=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],uJ=ln("file-code-corner",cJ);const dJ=[["path",{d:"M10.65 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v10.1",key:"1a2hbp"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 15 1 1",key:"1h4vmv"}],["path",{d:"m11 14-4.586 4.586",key:"maylof"}],["circle",{cx:"5",cy:"20",r:"2",key:"860zyv"}]],hJ=ln("file-key",dJ);const pJ=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],fJ=ln("git-commit-horizontal",pJ);const mJ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],vz=ln("info",mJ);const gJ=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],yJ=ln("key-round",gJ);const vJ=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],KE=ln("link",vJ);const xJ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ys=ln("loader-circle",xJ);const bJ=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],wJ=ln("lock-keyhole",bJ);const SJ=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],EJ=ln("map-pin",SJ);const jJ=[["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"}]],CJ=ln("monitor",jJ);const AJ=[["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"}]],OJ=ln("moon",AJ);const kJ=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],RJ=ln("network",kJ);const TJ=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],_J=ln("octagon-x",TJ);const $J=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],NJ=ln("panel-left",$J);const DJ=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],uc=ln("pencil",DJ);const PJ=[["path",{d:"m14 13-8.381 8.38a1 1 0 0 1-3.001-3L11 9.999",key:"1lw9ds"}],["path",{d:"M15.973 4.027A13 13 0 0 0 5.902 2.373c-1.398.342-1.092 2.158.277 2.601a19.9 19.9 0 0 1 5.822 3.024",key:"ffj4ej"}],["path",{d:"M16.001 11.999a19.9 19.9 0 0 1 3.024 5.824c.444 1.369 2.26 1.676 2.603.278A13 13 0 0 0 20 8.069",key:"8tj4zw"}],["path",{d:"M18.352 3.352a1.205 1.205 0 0 0-1.704 0l-5.296 5.296a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l5.296-5.296a1.205 1.205 0 0 0 0-1.704z",key:"hh6h97"}]],MJ=ln("pickaxe",PJ);const IJ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],qa=ln("plus",IJ);const zJ=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],LJ=ln("refresh-cw",zJ);const FJ=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],va=ln("search",FJ);const qJ=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],J_=ln("server",qJ);const BJ=[["path",{d:"M3 3h.01",key:"159qn6"}],["path",{d:"M7 5h.01",key:"1hq22a"}],["path",{d:"M11 7h.01",key:"1osv80"}],["path",{d:"M3 7h.01",key:"1xzrh3"}],["path",{d:"M7 9h.01",key:"19b3jx"}],["path",{d:"M3 11h.01",key:"1eifu7"}],["rect",{width:"4",height:"4",x:"15",y:"5",key:"mri9e4"}],["path",{d:"m19 9 2 2v10c0 .6-.4 1-1 1h-6c-.6 0-1-.4-1-1V11l2-2",key:"aib6hk"}],["path",{d:"m13 14 8-2",key:"1d7bmk"}],["path",{d:"m13 19 8-2",key:"1y2vml"}]],UJ=ln("spray-can",BJ);const KJ=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],VJ=ln("sun",KJ);const HJ=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],jC=ln("tags",HJ);const GJ=[["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"}]],wg=ln("trash-2",GJ);const XJ=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Pj=ln("triangle-alert",XJ);const YJ=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],ZJ=ln("user-round",YJ);const JJ=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],xz=ln("users",JJ);const WJ=[["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"}]],LM=ln("wrench",WJ);const QJ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],W_=ln("x",QJ);function eW(e){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",r.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}const tW=e=>{switch(e){case"success":return sW;case"info":return aW;case"warning":return iW;case"error":return oW;default:return null}},nW=Array(12).fill(0),rW=({visible:e,className:r})=>et.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":e},et.createElement("div",{className:"sonner-spinner"},nW.map((s,o)=>et.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${o}`})))),sW=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},et.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"})),iW=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},et.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"})),aW=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},et.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"})),oW=et.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},et.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"})),lW=et.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"},et.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),et.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),cW=()=>{const[e,r]=et.useState(document.hidden);return et.useEffect(()=>{const s=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",s),()=>window.removeEventListener("visibilitychange",s)},[]),e};let FT=1;class uW{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const s=this.subscribers.indexOf(r);this.subscribers.splice(s,1)}),this.publish=r=>{this.subscribers.forEach(s=>s(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var s;const{message:o,...u}=r,h=typeof r?.id=="number"||((s=r.id)==null?void 0:s.length)>0?r.id:FT++,m=this.toasts.find(b=>b.id===h),g=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(h)&&this.dismissedToasts.delete(h),m?this.toasts=this.toasts.map(b=>b.id===h?(this.publish({...b,...r,id:h,title:o}),{...b,...r,id:h,dismissible:g,title:o}):b):this.addToast({title:o,...u,dismissible:g,id:h}),h},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(s=>s({id:r,dismiss:!0})))):this.toasts.forEach(s=>{this.subscribers.forEach(o=>o({id:s.id,dismiss:!0}))}),r),this.message=(r,s)=>this.create({...s,message:r}),this.error=(r,s)=>this.create({...s,message:r,type:"error"}),this.success=(r,s)=>this.create({...s,type:"success",message:r}),this.info=(r,s)=>this.create({...s,type:"info",message:r}),this.warning=(r,s)=>this.create({...s,type:"warning",message:r}),this.loading=(r,s)=>this.create({...s,type:"loading",message:r}),this.promise=(r,s)=>{if(!s)return;let o;s.loading!==void 0&&(o=this.create({...s,promise:r,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));const u=Promise.resolve(r instanceof Function?r():r);let h=o!==void 0,m;const g=u.then(async w=>{if(m=["resolve",w],et.isValidElement(w))h=!1,this.create({id:o,type:"default",message:w});else if(hW(w)&&!w.ok){h=!1;const A=typeof s.error=="function"?await s.error(`HTTP error! status: ${w.status}`):s.error,k=typeof s.description=="function"?await s.description(`HTTP error! status: ${w.status}`):s.description,M=typeof A=="object"&&!et.isValidElement(A)?A:{message:A};this.create({id:o,type:"error",description:k,...M})}else if(w instanceof Error){h=!1;const A=typeof s.error=="function"?await s.error(w):s.error,k=typeof s.description=="function"?await s.description(w):s.description,M=typeof A=="object"&&!et.isValidElement(A)?A:{message:A};this.create({id:o,type:"error",description:k,...M})}else if(s.success!==void 0){h=!1;const A=typeof s.success=="function"?await s.success(w):s.success,k=typeof s.description=="function"?await s.description(w):s.description,M=typeof A=="object"&&!et.isValidElement(A)?A:{message:A};this.create({id:o,type:"success",description:k,...M})}}).catch(async w=>{if(m=["reject",w],s.error!==void 0){h=!1;const E=typeof s.error=="function"?await s.error(w):s.error,A=typeof s.description=="function"?await s.description(w):s.description,R=typeof E=="object"&&!et.isValidElement(E)?E:{message:E};this.create({id:o,type:"error",description:A,...R})}}).finally(()=>{h&&(this.dismiss(o),o=void 0),s.finally==null||s.finally.call(s)}),b=()=>new Promise((w,E)=>g.then(()=>m[0]==="reject"?E(m[1]):w(m[1])).catch(E));return typeof o!="string"&&typeof o!="number"?{unwrap:b}:Object.assign(o,{unwrap:b})},this.custom=(r,s)=>{const o=s?.id||FT++;return this.create({jsx:r(o),id:o,...s}),o},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const fa=new uW,dW=(e,r)=>{const s=r?.id||FT++;return fa.addToast({title:e,...r,id:s}),s},hW=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",pW=dW,fW=()=>fa.toasts,mW=()=>fa.getActiveToasts(),Ge=Object.assign(pW,{success:fa.success,info:fa.info,warning:fa.warning,error:fa.error,custom:fa.custom,message:fa.message,promise:fa.promise,dismiss:fa.dismiss,loading:fa.loading},{getHistory:fW,getToasts:mW});eW("[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 VE(e){return e.label!==void 0}const gW=3,yW="24px",vW="16px",FM=4e3,xW=356,bW=14,wW=45,SW=200;function tc(...e){return e.filter(Boolean).join(" ")}function EW(e){const[r,s]=e.split("-"),o=[];return r&&o.push(r),s&&o.push(s),o}const jW=e=>{var r,s,o,u,h,m,g,b,w;const{invert:E,toast:A,unstyled:k,interacting:R,setHeights:M,visibleToasts:I,heights:F,index:H,toasts:V,expanded:K,removeToast:z,defaultRichColors:W,closeButton:ae,style:Q,cancelButtonStyle:te,actionButtonStyle:de,className:je="",descriptionClassName:we="",duration:ie,position:Se,gap:Ae,expandByDefault:He,classNames:ue,icons:ne,closeButtonAriaLabel:ce="Close toast"}=e,[$e,me]=et.useState(null),[Xe,Oe]=et.useState(null),[Te,Ke]=et.useState(!1),[se,Ne]=et.useState(!1),[Fe,at]=et.useState(!1),[gt,Ot]=et.useState(!1),[Lt,Rt]=et.useState(!1),[Ft,qe]=et.useState(0),[Bt,kt]=et.useState(0),G=et.useRef(A.duration||ie||FM),On=et.useRef(null),mn=et.useRef(null),Oi=H===0,ge=H+1<=I,Me=A.type,_=A.dismissible!==!1,q=A.className||"",X=A.descriptionClassName||"",oe=et.useMemo(()=>F.findIndex(qt=>qt.toastId===A.id)||0,[F,A.id]),ve=et.useMemo(()=>{var qt;return(qt=A.closeButton)!=null?qt:ae},[A.closeButton,ae]),Re=et.useMemo(()=>A.duration||ie||FM,[A.duration,ie]),Je=et.useRef(0),Tt=et.useRef(0),fe=et.useRef(0),Ut=et.useRef(null),[nn,Gt]=Se.split("-"),ss=et.useMemo(()=>F.reduce((qt,xr,Yr)=>Yr>=oe?qt:qt+xr.height,0),[F,oe]),is=cW(),Yi=A.invert||E,dl=Me==="loading";Tt.current=et.useMemo(()=>oe*Ae+ss,[oe,ss]),et.useEffect(()=>{G.current=Re},[Re]),et.useEffect(()=>{Ke(!0)},[]),et.useEffect(()=>{const qt=mn.current;if(qt){const xr=qt.getBoundingClientRect().height;return kt(xr),M(Yr=>[{toastId:A.id,height:xr,position:A.position},...Yr]),()=>M(Yr=>Yr.filter(Rs=>Rs.toastId!==A.id))}},[M,A.id]),et.useLayoutEffect(()=>{if(!Te)return;const qt=mn.current,xr=qt.style.height;qt.style.height="auto";const Yr=qt.getBoundingClientRect().height;qt.style.height=xr,kt(Yr),M(Rs=>Rs.find(Er=>Er.toastId===A.id)?Rs.map(Er=>Er.toastId===A.id?{...Er,height:Yr}:Er):[{toastId:A.id,height:Yr,position:A.position},...Rs])},[Te,A.title,A.description,M,A.id,A.jsx,A.action,A.cancel]);const ki=et.useCallback(()=>{Ne(!0),qe(Tt.current),M(qt=>qt.filter(xr=>xr.toastId!==A.id)),setTimeout(()=>{z(A)},SW)},[A,z,M,Tt]);et.useEffect(()=>{if(A.promise&&Me==="loading"||A.duration===1/0||A.type==="loading")return;let qt;return K||R||is?(()=>{if(fe.current<Je.current){const Rs=new Date().getTime()-Je.current;G.current=G.current-Rs}fe.current=new Date().getTime()})():G.current!==1/0&&(Je.current=new Date().getTime(),qt=setTimeout(()=>{A.onAutoClose==null||A.onAutoClose.call(A,A),ki()},G.current)),()=>clearTimeout(qt)},[K,R,A,Me,is,ki]),et.useEffect(()=>{A.delete&&(ki(),A.onDismiss==null||A.onDismiss.call(A,A))},[ki,A.delete]);function pc(){var qt;if(ne?.loading){var xr;return et.createElement("div",{className:tc(ue?.loader,A==null||(xr=A.classNames)==null?void 0:xr.loader,"sonner-loader"),"data-visible":Me==="loading"},ne.loading)}return et.createElement(rW,{className:tc(ue?.loader,A==null||(qt=A.classNames)==null?void 0:qt.loader),visible:Me==="loading"})}const wu=A.icon||ne?.[Me]||tW(Me);var fc,ba;return et.createElement("li",{tabIndex:0,ref:mn,className:tc(je,q,ue?.toast,A==null||(r=A.classNames)==null?void 0:r.toast,ue?.default,ue?.[Me],A==null||(s=A.classNames)==null?void 0:s[Me]),"data-sonner-toast":"","data-rich-colors":(fc=A.richColors)!=null?fc:W,"data-styled":!(A.jsx||A.unstyled||k),"data-mounted":Te,"data-promise":!!A.promise,"data-swiped":Lt,"data-removed":se,"data-visible":ge,"data-y-position":nn,"data-x-position":Gt,"data-index":H,"data-front":Oi,"data-swiping":Fe,"data-dismissible":_,"data-type":Me,"data-invert":Yi,"data-swipe-out":gt,"data-swipe-direction":Xe,"data-expanded":!!(K||He&&Te),"data-testid":A.testId,style:{"--index":H,"--toasts-before":H,"--z-index":V.length-H,"--offset":`${se?Ft:Tt.current}px`,"--initial-height":He?"auto":`${Bt}px`,...Q,...A.style},onDragEnd:()=>{at(!1),me(null),Ut.current=null},onPointerDown:qt=>{qt.button!==2&&(dl||!_||(On.current=new Date,qe(Tt.current),qt.target.setPointerCapture(qt.pointerId),qt.target.tagName!=="BUTTON"&&(at(!0),Ut.current={x:qt.clientX,y:qt.clientY})))},onPointerUp:()=>{var qt,xr,Yr;if(gt||!_)return;Ut.current=null;const Rs=Number(((qt=mn.current)==null?void 0:qt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Pn=Number(((xr=mn.current)==null?void 0:xr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Er=new Date().getTime()-((Yr=On.current)==null?void 0:Yr.getTime()),ti=$e==="x"?Rs:Pn,hl=Math.abs(ti)/Er;if(Math.abs(ti)>=wW||hl>.11){qe(Tt.current),A.onDismiss==null||A.onDismiss.call(A,A),Oe($e==="x"?Rs>0?"right":"left":Pn>0?"down":"up"),ki(),Ot(!0);return}else{var xs,ni;(xs=mn.current)==null||xs.style.setProperty("--swipe-amount-x","0px"),(ni=mn.current)==null||ni.style.setProperty("--swipe-amount-y","0px")}Rt(!1),at(!1),me(null)},onPointerMove:qt=>{var xr,Yr,Rs;if(!Ut.current||!_||((xr=window.getSelection())==null?void 0:xr.toString().length)>0)return;const Er=qt.clientY-Ut.current.y,ti=qt.clientX-Ut.current.x;var hl;const xs=(hl=e.swipeDirections)!=null?hl:EW(Se);!$e&&(Math.abs(ti)>1||Math.abs(Er)>1)&&me(Math.abs(ti)>Math.abs(Er)?"x":"y");let ni={x:0,y:0};const Su=wa=>1/(1.5+Math.abs(wa)/20);if($e==="y"){if(xs.includes("top")||xs.includes("bottom"))if(xs.includes("top")&&Er<0||xs.includes("bottom")&&Er>0)ni.y=Er;else{const wa=Er*Su(Er);ni.y=Math.abs(wa)<Math.abs(Er)?wa:Er}}else if($e==="x"&&(xs.includes("left")||xs.includes("right")))if(xs.includes("left")&&ti<0||xs.includes("right")&&ti>0)ni.x=ti;else{const wa=ti*Su(ti);ni.x=Math.abs(wa)<Math.abs(ti)?wa:ti}(Math.abs(ni.x)>0||Math.abs(ni.y)>0)&&Rt(!0),(Yr=mn.current)==null||Yr.style.setProperty("--swipe-amount-x",`${ni.x}px`),(Rs=mn.current)==null||Rs.style.setProperty("--swipe-amount-y",`${ni.y}px`)}},ve&&!A.jsx&&Me!=="loading"?et.createElement("button",{"aria-label":ce,"data-disabled":dl,"data-close-button":!0,onClick:dl||!_?()=>{}:()=>{ki(),A.onDismiss==null||A.onDismiss.call(A,A)},className:tc(ue?.closeButton,A==null||(o=A.classNames)==null?void 0:o.closeButton)},(ba=ne?.close)!=null?ba:lW):null,(Me||A.icon||A.promise)&&A.icon!==null&&(ne?.[Me]!==null||A.icon)?et.createElement("div",{"data-icon":"",className:tc(ue?.icon,A==null||(u=A.classNames)==null?void 0:u.icon)},A.promise||A.type==="loading"&&!A.icon?A.icon||pc():null,A.type!=="loading"?wu:null):null,et.createElement("div",{"data-content":"",className:tc(ue?.content,A==null||(h=A.classNames)==null?void 0:h.content)},et.createElement("div",{"data-title":"",className:tc(ue?.title,A==null||(m=A.classNames)==null?void 0:m.title)},A.jsx?A.jsx:typeof A.title=="function"?A.title():A.title),A.description?et.createElement("div",{"data-description":"",className:tc(we,X,ue?.description,A==null||(g=A.classNames)==null?void 0:g.description)},typeof A.description=="function"?A.description():A.description):null),et.isValidElement(A.cancel)?A.cancel:A.cancel&&VE(A.cancel)?et.createElement("button",{"data-button":!0,"data-cancel":!0,style:A.cancelButtonStyle||te,onClick:qt=>{VE(A.cancel)&&_&&(A.cancel.onClick==null||A.cancel.onClick.call(A.cancel,qt),ki())},className:tc(ue?.cancelButton,A==null||(b=A.classNames)==null?void 0:b.cancelButton)},A.cancel.label):null,et.isValidElement(A.action)?A.action:A.action&&VE(A.action)?et.createElement("button",{"data-button":!0,"data-action":!0,style:A.actionButtonStyle||de,onClick:qt=>{VE(A.action)&&(A.action.onClick==null||A.action.onClick.call(A.action,qt),!qt.defaultPrevented&&ki())},className:tc(ue?.actionButton,A==null||(w=A.classNames)==null?void 0:w.actionButton)},A.action.label):null)};function qM(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function CW(e,r){const s={};return[e,r].forEach((o,u)=>{const h=u===1,m=h?"--mobile-offset":"--offset",g=h?vW:yW;function b(w){["top","right","bottom","left"].forEach(E=>{s[`${m}-${E}`]=typeof w=="number"?`${w}px`:w})}typeof o=="number"||typeof o=="string"?b(o):typeof o=="object"?["top","right","bottom","left"].forEach(w=>{o[w]===void 0?s[`${m}-${w}`]=g:s[`${m}-${w}`]=typeof o[w]=="number"?`${o[w]}px`:o[w]}):b(g)}),s}const AW=et.forwardRef(function(r,s){const{id:o,invert:u,position:h="bottom-right",hotkey:m=["altKey","KeyT"],expand:g,closeButton:b,className:w,offset:E,mobileOffset:A,theme:k="light",richColors:R,duration:M,style:I,visibleToasts:F=gW,toastOptions:H,dir:V=qM(),gap:K=bW,icons:z,containerAriaLabel:W="Notifications"}=r,[ae,Q]=et.useState([]),te=et.useMemo(()=>o?ae.filter(Te=>Te.toasterId===o):ae.filter(Te=>!Te.toasterId),[ae,o]),de=et.useMemo(()=>Array.from(new Set([h].concat(te.filter(Te=>Te.position).map(Te=>Te.position)))),[te,h]),[je,we]=et.useState([]),[ie,Se]=et.useState(!1),[Ae,He]=et.useState(!1),[ue,ne]=et.useState(k!=="system"?k:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ce=et.useRef(null),$e=m.join("+").replace(/Key/g,"").replace(/Digit/g,""),me=et.useRef(null),Xe=et.useRef(!1),Oe=et.useCallback(Te=>{Q(Ke=>{var se;return(se=Ke.find(Ne=>Ne.id===Te.id))!=null&&se.delete||fa.dismiss(Te.id),Ke.filter(({id:Ne})=>Ne!==Te.id)})},[]);return et.useEffect(()=>fa.subscribe(Te=>{if(Te.dismiss){requestAnimationFrame(()=>{Q(Ke=>Ke.map(se=>se.id===Te.id?{...se,delete:!0}:se))});return}setTimeout(()=>{ez.flushSync(()=>{Q(Ke=>{const se=Ke.findIndex(Ne=>Ne.id===Te.id);return se!==-1?[...Ke.slice(0,se),{...Ke[se],...Te},...Ke.slice(se+1)]:[Te,...Ke]})})})}),[ae]),et.useEffect(()=>{if(k!=="system"){ne(k);return}if(k==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ne("dark"):ne("light")),typeof window>"u")return;const Te=window.matchMedia("(prefers-color-scheme: dark)");try{Te.addEventListener("change",({matches:Ke})=>{ne(Ke?"dark":"light")})}catch{Te.addListener(({matches:se})=>{try{ne(se?"dark":"light")}catch(Ne){console.error(Ne)}})}},[k]),et.useEffect(()=>{ae.length<=1&&Se(!1)},[ae]),et.useEffect(()=>{const Te=Ke=>{var se;if(m.every(at=>Ke[at]||Ke.code===at)){var Fe;Se(!0),(Fe=ce.current)==null||Fe.focus()}Ke.code==="Escape"&&(document.activeElement===ce.current||(se=ce.current)!=null&&se.contains(document.activeElement))&&Se(!1)};return document.addEventListener("keydown",Te),()=>document.removeEventListener("keydown",Te)},[m]),et.useEffect(()=>{if(ce.current)return()=>{me.current&&(me.current.focus({preventScroll:!0}),me.current=null,Xe.current=!1)}},[ce.current]),et.createElement("section",{ref:s,"aria-label":`${W} ${$e}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},de.map((Te,Ke)=>{var se;const[Ne,Fe]=Te.split("-");return te.length?et.createElement("ol",{key:Te,dir:V==="auto"?qM():V,tabIndex:-1,ref:ce,className:w,"data-sonner-toaster":!0,"data-sonner-theme":ue,"data-y-position":Ne,"data-x-position":Fe,style:{"--front-toast-height":`${((se=je[0])==null?void 0:se.height)||0}px`,"--width":`${xW}px`,"--gap":`${K}px`,...I,...CW(E,A)},onBlur:at=>{Xe.current&&!at.currentTarget.contains(at.relatedTarget)&&(Xe.current=!1,me.current&&(me.current.focus({preventScroll:!0}),me.current=null))},onFocus:at=>{at.target instanceof HTMLElement&&at.target.dataset.dismissible==="false"||Xe.current||(Xe.current=!0,me.current=at.relatedTarget)},onMouseEnter:()=>Se(!0),onMouseMove:()=>Se(!0),onMouseLeave:()=>{Ae||Se(!1)},onDragEnd:()=>Se(!1),onPointerDown:at=>{at.target instanceof HTMLElement&&at.target.dataset.dismissible==="false"||He(!0)},onPointerUp:()=>He(!1)},te.filter(at=>!at.position&&Ke===0||at.position===Te).map((at,gt)=>{var Ot,Lt;return et.createElement(jW,{key:at.id,icons:z,index:gt,toast:at,defaultRichColors:R,duration:(Ot=H?.duration)!=null?Ot:M,className:H?.className,descriptionClassName:H?.descriptionClassName,invert:u,visibleToasts:F,closeButton:(Lt=H?.closeButton)!=null?Lt:b,interacting:Ae,position:Te,style:H?.style,unstyled:H?.unstyled,classNames:H?.classNames,cancelButtonStyle:H?.cancelButtonStyle,actionButtonStyle:H?.actionButtonStyle,closeButtonAriaLabel:H?.closeButtonAriaLabel,removeToast:Oe,toasts:te.filter(Rt=>Rt.position==at.position),heights:je.filter(Rt=>Rt.position==at.position),setHeights:we,expandByDefault:g,gap:K,expanded:ie,swipeDirections:r.swipeDirections})})):null}))}),OW=({...e})=>{const{theme:r="system"}=K_();return c.jsx(AW,{theme:r,className:"toaster group",icons:{success:c.jsx(EC,{className:"size-4"}),info:c.jsx(vz,{className:"size-4"}),warning:c.jsx(Pj,{className:"size-4"}),error:c.jsx(_J,{className:"size-4"}),loading:c.jsx(ys,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},kW=new yZ,RW=({children:e})=>c.jsx(vZ,{client:kW,children:c.jsxs(GY,{defaultTheme:"system",storageKey:"dragon-theme",children:[e,c.jsx(OW,{richColors:!0,expand:!0,position:"top-center"})]})});var zR={exports:{}},lb={},LR={exports:{}},FR={};var BM;function TW(){return BM||(BM=1,(function(e){function r(ue,ne){var ce=ue.length;ue.push(ne);e:for(;0<ce;){var $e=ce-1>>>1,me=ue[$e];if(0<u(me,ne))ue[$e]=ne,ue[ce]=me,ce=$e;else break e}}function s(ue){return ue.length===0?null:ue[0]}function o(ue){if(ue.length===0)return null;var ne=ue[0],ce=ue.pop();if(ce!==ne){ue[0]=ce;e:for(var $e=0,me=ue.length,Xe=me>>>1;$e<Xe;){var Oe=2*($e+1)-1,Te=ue[Oe],Ke=Oe+1,se=ue[Ke];if(0>u(Te,ce))Ke<me&&0>u(se,Te)?(ue[$e]=se,ue[Ke]=ce,$e=Ke):(ue[$e]=Te,ue[Oe]=ce,$e=Oe);else if(Ke<me&&0>u(se,ce))ue[$e]=se,ue[Ke]=ce,$e=Ke;else break e}}return ne}function u(ue,ne){var ce=ue.sortIndex-ne.sortIndex;return ce!==0?ce:ue.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var m=Date,g=m.now();e.unstable_now=function(){return m.now()-g}}var b=[],w=[],E=1,A=null,k=3,R=!1,M=!1,I=!1,F=!1,H=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,K=typeof setImmediate<"u"?setImmediate:null;function z(ue){for(var ne=s(w);ne!==null;){if(ne.callback===null)o(w);else if(ne.startTime<=ue)o(w),ne.sortIndex=ne.expirationTime,r(b,ne);else break;ne=s(w)}}function W(ue){if(I=!1,z(ue),!M)if(s(b)!==null)M=!0,ae||(ae=!0,ie());else{var ne=s(w);ne!==null&&He(W,ne.startTime-ue)}}var ae=!1,Q=-1,te=5,de=-1;function je(){return F?!0:!(e.unstable_now()-de<te)}function we(){if(F=!1,ae){var ue=e.unstable_now();de=ue;var ne=!0;try{e:{M=!1,I&&(I=!1,V(Q),Q=-1),R=!0;var ce=k;try{t:{for(z(ue),A=s(b);A!==null&&!(A.expirationTime>ue&&je());){var $e=A.callback;if(typeof $e=="function"){A.callback=null,k=A.priorityLevel;var me=$e(A.expirationTime<=ue);if(ue=e.unstable_now(),typeof me=="function"){A.callback=me,z(ue),ne=!0;break t}A===s(b)&&o(b),z(ue)}else o(b);A=s(b)}if(A!==null)ne=!0;else{var Xe=s(w);Xe!==null&&He(W,Xe.startTime-ue),ne=!1}}break e}finally{A=null,k=ce,R=!1}ne=void 0}}finally{ne?ie():ae=!1}}}var ie;if(typeof K=="function")ie=function(){K(we)};else if(typeof MessageChannel<"u"){var Se=new MessageChannel,Ae=Se.port2;Se.port1.onmessage=we,ie=function(){Ae.postMessage(null)}}else ie=function(){H(we,0)};function He(ue,ne){Q=H(function(){ue(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(ue){ue.callback=null},e.unstable_forceFrameRate=function(ue){0>ue||125<ue?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<ue?Math.floor(1e3/ue):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(ue){switch(k){case 1:case 2:case 3:var ne=3;break;default:ne=k}var ce=k;k=ne;try{return ue()}finally{k=ce}},e.unstable_requestPaint=function(){F=!0},e.unstable_runWithPriority=function(ue,ne){switch(ue){case 1:case 2:case 3:case 4:case 5:break;default:ue=3}var ce=k;k=ue;try{return ne()}finally{k=ce}},e.unstable_scheduleCallback=function(ue,ne,ce){var $e=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?$e+ce:$e):ce=$e,ue){case 1:var me=-1;break;case 2:me=250;break;case 5:me=1073741823;break;case 4:me=1e4;break;default:me=5e3}return me=ce+me,ue={id:E++,callback:ne,priorityLevel:ue,startTime:ce,expirationTime:me,sortIndex:-1},ce>$e?(ue.sortIndex=ce,r(w,ue),s(b)===null&&ue===s(w)&&(I?(V(Q),Q=-1):I=!0,He(W,ce-$e))):(ue.sortIndex=me,r(b,ue),M||R||(M=!0,ae||(ae=!0,ie()))),ue},e.unstable_shouldYield=je,e.unstable_wrapCallback=function(ue){var ne=k;return function(){var ce=k;k=ne;try{return ue.apply(this,arguments)}finally{k=ce}}}})(FR)),FR}var UM;function _W(){return UM||(UM=1,LR.exports=TW()),LR.exports}var KM;function $W(){if(KM)return lb;KM=1;var e=_W(),r=tz(),s=_Y();function o(a){var d="https://react.dev/errors/"+a;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)d+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+a+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function h(a){var d=a,f=a;if(a.alternate)for(;d.return;)d=d.return;else{a=d;do d=a,(d.flags&4098)!==0&&(f=d.return),a=d.return;while(a)}return d.tag===3?f:null}function m(a){if(a.tag===13){var d=a.memoizedState;if(d===null&&(a=a.alternate,a!==null&&(d=a.memoizedState)),d!==null)return d.dehydrated}return null}function g(a){if(a.tag===31){var d=a.memoizedState;if(d===null&&(a=a.alternate,a!==null&&(d=a.memoizedState)),d!==null)return d.dehydrated}return null}function b(a){if(h(a)!==a)throw Error(o(188))}function w(a){var d=a.alternate;if(!d){if(d=h(a),d===null)throw Error(o(188));return d!==a?null:a}for(var f=a,y=d;;){var j=f.return;if(j===null)break;var O=j.alternate;if(O===null){if(y=j.return,y!==null){f=y;continue}break}if(j.child===O.child){for(O=j.child;O;){if(O===f)return b(j),a;if(O===y)return b(j),d;O=O.sibling}throw Error(o(188))}if(f.return!==y.return)f=j,y=O;else{for(var B=!1,ee=j.child;ee;){if(ee===f){B=!0,f=j,y=O;break}if(ee===y){B=!0,y=j,f=O;break}ee=ee.sibling}if(!B){for(ee=O.child;ee;){if(ee===f){B=!0,f=O,y=j;break}if(ee===y){B=!0,y=O,f=j;break}ee=ee.sibling}if(!B)throw Error(o(189))}}if(f.alternate!==y)throw Error(o(190))}if(f.tag!==3)throw Error(o(188));return f.stateNode.current===f?a:d}function E(a){var d=a.tag;if(d===5||d===26||d===27||d===6)return a;for(a=a.child;a!==null;){if(d=E(a),d!==null)return d;a=a.sibling}return null}var A=Object.assign,k=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),K=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),je=Symbol.for("react.memo_cache_sentinel"),we=Symbol.iterator;function ie(a){return a===null||typeof a!="object"?null:(a=we&&a[we]||a["@@iterator"],typeof a=="function"?a:null)}var Se=Symbol.for("react.client.reference");function Ae(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===Se?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case I:return"Fragment";case H:return"Profiler";case F:return"StrictMode";case W:return"Suspense";case ae:return"SuspenseList";case de:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case M:return"Portal";case K:return a.displayName||"Context";case V:return(a._context.displayName||"Context")+".Consumer";case z:var d=a.render;return a=a.displayName,a||(a=d.displayName||d.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case Q:return d=a.displayName||null,d!==null?d:Ae(a.type)||"Memo";case te:d=a._payload,a=a._init;try{return Ae(a(d))}catch{}}return null}var He=Array.isArray,ue=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},$e=[],me=-1;function Xe(a){return{current:a}}function Oe(a){0>me||(a.current=$e[me],$e[me]=null,me--)}function Te(a,d){me++,$e[me]=a.current,a.current=d}var Ke=Xe(null),se=Xe(null),Ne=Xe(null),Fe=Xe(null);function at(a,d){switch(Te(Ne,d),Te(se,a),Te(Ke,null),d.nodeType){case 9:case 11:a=(a=d.documentElement)&&(a=a.namespaceURI)?vd(a):0;break;default:if(a=d.tagName,d=d.namespaceURI)d=vd(d),a=Vh(d,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Oe(Ke),Te(Ke,a)}function gt(){Oe(Ke),Oe(se),Oe(Ne)}function Ot(a){a.memoizedState!==null&&Te(Fe,a);var d=Ke.current,f=Vh(d,a.type);d!==f&&(Te(se,a),Te(Ke,f))}function Lt(a){se.current===a&&(Oe(Ke),Oe(se)),Fe.current===a&&(Oe(Fe),Sd._currentValue=ce)}var Rt,Ft;function qe(a){if(Rt===void 0)try{throw Error()}catch(f){var d=f.stack.trim().match(/\n( *(at )?)/);Rt=d&&d[1]||"",Ft=-1<f.stack.indexOf(`
|
||
at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||
`+Rt+a+Ft}var Bt=!1;function kt(a,d){if(!a||Bt)return"";Bt=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(d){var rt=function(){throw Error()};if(Object.defineProperty(rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(rt,[])}catch(Ye){var Ve=Ye}Reflect.construct(a,[],rt)}else{try{rt.call()}catch(Ye){Ve=Ye}a.call(rt.prototype)}}else{try{throw Error()}catch(Ye){Ve=Ye}(rt=a())&&typeof rt.catch=="function"&&rt.catch(function(){})}}catch(Ye){if(Ye&&Ve&&typeof Ye.stack=="string")return[Ye.stack,Ve.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var j=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");j&&j.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=y.DetermineComponentFrameRoot(),B=O[0],ee=O[1];if(B&&ee){var be=B.split(`
|
||
`),Ue=ee.split(`
|
||
`);for(j=y=0;y<be.length&&!be[y].includes("DetermineComponentFrameRoot");)y++;for(;j<Ue.length&&!Ue[j].includes("DetermineComponentFrameRoot");)j++;if(y===be.length||j===Ue.length)for(y=be.length-1,j=Ue.length-1;1<=y&&0<=j&&be[y]!==Ue[j];)j--;for(;1<=y&&0<=j;y--,j--)if(be[y]!==Ue[j]){if(y!==1||j!==1)do if(y--,j--,0>j||be[y]!==Ue[j]){var We=`
|
||
`+be[y].replace(" at new "," at ");return a.displayName&&We.includes("<anonymous>")&&(We=We.replace("<anonymous>",a.displayName)),We}while(1<=y&&0<=j);break}}}finally{Bt=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?qe(f):""}function G(a,d){switch(a.tag){case 26:case 27:case 5:return qe(a.type);case 16:return qe("Lazy");case 13:return a.child!==d&&d!==null?qe("Suspense Fallback"):qe("Suspense");case 19:return qe("SuspenseList");case 0:case 15:return kt(a.type,!1);case 11:return kt(a.type.render,!1);case 1:return kt(a.type,!0);case 31:return qe("Activity");default:return""}}function On(a){try{var d="",f=null;do d+=G(a,f),f=a,a=a.return;while(a);return d}catch(y){return`
|
||
Error generating stack: `+y.message+`
|
||
`+y.stack}}var mn=Object.prototype.hasOwnProperty,Oi=e.unstable_scheduleCallback,ge=e.unstable_cancelCallback,Me=e.unstable_shouldYield,_=e.unstable_requestPaint,q=e.unstable_now,X=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,ve=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,Je=e.unstable_LowPriority,Tt=e.unstable_IdlePriority,fe=e.log,Ut=e.unstable_setDisableYieldValue,nn=null,Gt=null;function ss(a){if(typeof fe=="function"&&Ut(a),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(nn,a)}catch{}}var is=Math.clz32?Math.clz32:ki,Yi=Math.log,dl=Math.LN2;function ki(a){return a>>>=0,a===0?32:31-(Yi(a)/dl|0)|0}var pc=256,wu=262144,fc=4194304;function ba(a){var d=a&42;if(d!==0)return d;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function qt(a,d,f){var y=a.pendingLanes;if(y===0)return 0;var j=0,O=a.suspendedLanes,B=a.pingedLanes;a=a.warmLanes;var ee=y&134217727;return ee!==0?(y=ee&~O,y!==0?j=ba(y):(B&=ee,B!==0?j=ba(B):f||(f=ee&~a,f!==0&&(j=ba(f))))):(ee=y&~O,ee!==0?j=ba(ee):B!==0?j=ba(B):f||(f=y&~a,f!==0&&(j=ba(f)))),j===0?0:d!==0&&d!==j&&(d&O)===0&&(O=j&-j,f=d&-d,O>=f||O===32&&(f&4194048)!==0)?d:j}function xr(a,d){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&d)===0}function Yr(a,d){switch(a){case 1:case 2:case 4:case 8:case 64:return d+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 d+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 Rs(){var a=fc;return fc<<=1,(fc&62914560)===0&&(fc=4194304),a}function Pn(a){for(var d=[],f=0;31>f;f++)d.push(a);return d}function Er(a,d){a.pendingLanes|=d,d!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function ti(a,d,f,y,j,O){var B=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var ee=a.entanglements,be=a.expirationTimes,Ue=a.hiddenUpdates;for(f=B&~f;0<f;){var We=31-is(f),rt=1<<We;ee[We]=0,be[We]=-1;var Ve=Ue[We];if(Ve!==null)for(Ue[We]=null,We=0;We<Ve.length;We++){var Ye=Ve[We];Ye!==null&&(Ye.lane&=-536870913)}f&=~rt}y!==0&&hl(a,y,0),O!==0&&j===0&&a.tag!==0&&(a.suspendedLanes|=O&~(B&~d))}function hl(a,d,f){a.pendingLanes|=d,a.suspendedLanes&=~d;var y=31-is(d);a.entangledLanes|=d,a.entanglements[y]=a.entanglements[y]|1073741824|f&261930}function xs(a,d){var f=a.entangledLanes|=d;for(a=a.entanglements;f;){var y=31-is(f),j=1<<y;j&d|a[y]&d&&(a[y]|=d),f&=~j}}function ni(a,d){var f=d&-d;return f=(f&42)!==0?1:Su(f),(f&(a.suspendedLanes|d))!==0?0:f}function Su(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function wa(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Eu(){var a=ne.p;return a!==0?a:(a=window.event,a===void 0?32:YS(a.type))}function Ug(a,d){var f=ne.p;try{return ne.p=a,d()}finally{ne.p=f}}var Sa=Math.random().toString(36).slice(2),as="__reactFiber$"+Sa,zs="__reactProps$"+Sa,pl="__reactContainer$"+Sa,Yt="__reactEvents$"+Sa,Dt="__reactListeners$"+Sa,cA="__reactHandles$"+Sa,Kg="__reactResources$"+Sa,Zi="__reactMarker$"+Sa;function rh(a){delete a[as],delete a[zs],delete a[Yt],delete a[Dt],delete a[cA]}function mc(a){var d=a[as];if(d)return d;for(var f=a.parentNode;f;){if(d=f[pl]||f[as]){if(f=d.alternate,d.child!==null||f!==null&&f.child!==null)for(a=DS(a);a!==null;){if(f=a[as])return f;a=DS(a)}return d}a=f,f=a.parentNode}return null}function gc(a){if(a=a[as]||a[pl]){var d=a.tag;if(d===5||d===6||d===13||d===31||d===26||d===27||d===3)return a}return null}function Ji(a){var d=a.tag;if(d===5||d===26||d===27||d===6)return a.stateNode;throw Error(o(33))}function fl(a){var d=a[Kg];return d||(d=a[Kg]={hoistableStyles:new Map,hoistableScripts:new Map}),d}function Zr(a){a[Zi]=!0}var yt=new Set,jw={};function sr(a,d){Ri(a,d),Ri(a+"Capture",d)}function Ri(a,d){for(jw[a]=d,a=0;a<d.length;a++)yt.add(d[a])}var ju=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]*$"),Cu={},Au={};function Vg(a){return mn.call(Au,a)?!0:mn.call(Cu,a)?!1:ju.test(a)?Au[a]=!0:(Cu[a]=!0,!1)}function yc(a,d,f){if(Vg(d))if(f===null)a.removeAttribute(d);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(d);return;case"boolean":var y=d.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){a.removeAttribute(d);return}}a.setAttribute(d,""+f)}}function ml(a,d,f){if(f===null)a.removeAttribute(d);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(d);return}a.setAttribute(d,""+f)}}function Ea(a,d,f,y){if(y===null)a.removeAttribute(f);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(d,f,""+y)}}function ri(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function vc(a){var d=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(d==="checkbox"||d==="radio")}function sh(a,d,f){var y=Object.getOwnPropertyDescriptor(a.constructor.prototype,d);if(!a.hasOwnProperty(d)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var j=y.get,O=y.set;return Object.defineProperty(a,d,{configurable:!0,get:function(){return j.call(this)},set:function(B){f=""+B,O.call(this,B)}}),Object.defineProperty(a,d,{enumerable:y.enumerable}),{getValue:function(){return f},setValue:function(B){f=""+B},stopTracking:function(){a._valueTracker=null,delete a[d]}}}}function mo(a){if(!a._valueTracker){var d=vc(a)?"checked":"value";a._valueTracker=sh(a,d,""+a[d])}}function Ou(a){if(!a)return!1;var d=a._valueTracker;if(!d)return!0;var f=d.getValue(),y="";return a&&(y=vc(a)?a.checked?"true":"false":a.value),a=y,a!==f?(d.setValue(a),!0):!1}function gl(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var ih=/[\n"\\]/g;function si(a){return a.replace(ih,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function qp(a,d,f,y,j,O,B,ee){a.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?a.type=B:a.removeAttribute("type"),d!=null?B==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+ri(d)):a.value!==""+ri(d)&&(a.value=""+ri(d)):B!=="submit"&&B!=="reset"||a.removeAttribute("value"),d!=null?Bp(a,B,ri(d)):f!=null?Bp(a,B,ri(f)):y!=null&&a.removeAttribute("value"),j==null&&O!=null&&(a.defaultChecked=!!O),j!=null&&(a.checked=j&&typeof j!="function"&&typeof j!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?a.name=""+ri(ee):a.removeAttribute("name")}function Hg(a,d,f,y,j,O,B,ee){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(a.type=O),d!=null||f!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){mo(a);return}f=f!=null?""+ri(f):"",d=d!=null?""+ri(d):f,ee||d===a.value||(a.value=d),a.defaultValue=d}y=y??j,y=typeof y!="function"&&typeof y!="symbol"&&!!y,a.checked=ee?a.checked:!!y,a.defaultChecked=!!y,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(a.name=B),mo(a)}function Bp(a,d,f){d==="number"&&gl(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function ku(a,d,f,y){if(a=a.options,d){d={};for(var j=0;j<f.length;j++)d["$"+f[j]]=!0;for(f=0;f<a.length;f++)j=d.hasOwnProperty("$"+a[f].value),a[f].selected!==j&&(a[f].selected=j),j&&y&&(a[f].defaultSelected=!0)}else{for(f=""+ri(f),d=null,j=0;j<a.length;j++){if(a[j].value===f){a[j].selected=!0,y&&(a[j].defaultSelected=!0);return}d!==null||a[j].disabled||(d=a[j])}d!==null&&(d.selected=!0)}}function Cw(a,d,f){if(d!=null&&(d=""+ri(d),d!==a.value&&(a.value=d),f==null)){a.defaultValue!==d&&(a.defaultValue=d);return}a.defaultValue=f!=null?""+ri(f):""}function Aw(a,d,f,y){if(d==null){if(y!=null){if(f!=null)throw Error(o(92));if(He(y)){if(1<y.length)throw Error(o(93));y=y[0]}f=y}f==null&&(f=""),d=f}f=ri(d),a.defaultValue=f,y=a.textContent,y===f&&y!==""&&y!==null&&(a.value=y),mo(a)}function Ru(a,d){if(d){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=d;return}}a.textContent=d}var uA=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 Ow(a,d,f){var y=d.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?y?a.setProperty(d,""):d==="float"?a.cssFloat="":a[d]="":y?a.setProperty(d,f):typeof f!="number"||f===0||uA.has(d)?d==="float"?a.cssFloat=f:a[d]=(""+f).trim():a[d]=f+"px"}function kw(a,d,f){if(d!=null&&typeof d!="object")throw Error(o(62));if(a=a.style,f!=null){for(var y in f)!f.hasOwnProperty(y)||d!=null&&d.hasOwnProperty(y)||(y.indexOf("--")===0?a.setProperty(y,""):y==="float"?a.cssFloat="":a[y]="");for(var j in d)y=d[j],d.hasOwnProperty(j)&&f[j]!==y&&Ow(a,j,y)}else for(var O in d)d.hasOwnProperty(O)&&Ow(a,O,d[O])}function ah(a){if(a.indexOf("-")===-1)return!1;switch(a){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 Rw=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"]]),Gg=/^[\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 oh(a){return Gg.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ja(){}var os=null;function Xg(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Tu=null,xc=null;function Yg(a){var d=gc(a);if(d&&(a=d.stateNode)){var f=a[zs]||null;e:switch(a=d.stateNode,d.type){case"input":if(qp(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),d=f.name,f.type==="radio"&&d!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+si(""+d)+'"][type="radio"]'),d=0;d<f.length;d++){var y=f[d];if(y!==a&&y.form===a.form){var j=y[zs]||null;if(!j)throw Error(o(90));qp(y,j.value,j.defaultValue,j.defaultValue,j.checked,j.defaultChecked,j.type,j.name)}}for(d=0;d<f.length;d++)y=f[d],y.form===a.form&&Ou(y)}break e;case"textarea":Cw(a,f.value,f.defaultValue);break e;case"select":d=f.value,d!=null&&ku(a,!!f.multiple,d,!1)}}}var Up=!1;function Kp(a,d,f){if(Up)return a(d,f);Up=!0;try{var y=a(d);return y}finally{if(Up=!1,(Tu!==null||xc!==null)&&(qf(),Tu&&(d=Tu,a=xc,xc=Tu=null,Yg(d),a)))for(d=0;d<a.length;d++)Yg(a[d])}}function _u(a,d){var f=a.stateNode;if(f===null)return null;var y=f[zs]||null;if(y===null)return null;f=y[d];e:switch(d){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(o(231,d,typeof f));return f}var ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vp=!1;if(ar)try{var go={};Object.defineProperty(go,"passive",{get:function(){Vp=!0}}),window.addEventListener("test",go,go),window.removeEventListener("test",go,go)}catch{Vp=!1}var Rr=null,lh=null,$u=null;function Tw(){if($u)return $u;var a,d=lh,f=d.length,y,j="value"in Rr?Rr.value:Rr.textContent,O=j.length;for(a=0;a<f&&d[a]===j[a];a++);var B=f-a;for(y=1;y<=B&&d[f-y]===j[O-y];y++);return $u=j.slice(a,1<y?1-y:void 0)}function Hp(a){var d=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&d===13&&(a=13)):a=d,a===10&&(a=13),32<=a||a===13?a:0}function Gp(){return!0}function ls(){return!1}function Ls(a){function d(f,y,j,O,B){this._reactName=f,this._targetInst=j,this.type=y,this.nativeEvent=O,this.target=B,this.currentTarget=null;for(var ee in a)a.hasOwnProperty(ee)&&(f=a[ee],this[ee]=f?f(O):O[ee]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?Gp:ls,this.isPropagationStopped=ls,this}return A(d.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Gp)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Gp)},persist:function(){},isPersistent:Gp}),d}var yo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ch=Ls(yo),Nu=A({},yo,{view:0,detail:0}),_w=Ls(Nu),Xp,Yp,Du,uh=A({},Nu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qg,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Du&&(Du&&a.type==="mousemove"?(Xp=a.screenX-Du.screenX,Yp=a.screenY-Du.screenY):Yp=Xp=0,Du=a),Xp)},movementY:function(a){return"movementY"in a?a.movementY:Yp}}),$w=Ls(uh),dA=A({},uh,{dataTransfer:0}),Nw=Ls(dA),hA=A({},Nu,{relatedTarget:0}),Zg=Ls(hA),Dw=A({},yo,{animationName:0,elapsedTime:0,pseudoElement:0}),Pw=Ls(Dw),Mw=A({},yo,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Iw=Ls(Mw),zw=A({},yo,{data:0}),Jg=Ls(zw),Lw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wg={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"},Fw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pA(a){var d=this.nativeEvent;return d.getModifierState?d.getModifierState(a):(a=Fw[a])?!!d[a]:!1}function Qg(){return pA}var qw=A({},Nu,{key:function(a){if(a.key){var d=Lw[a.key]||a.key;if(d!=="Unidentified")return d}return a.type==="keypress"?(a=Hp(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Wg[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qg,charCode:function(a){return a.type==="keypress"?Hp(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Hp(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),fA=Ls(qw),Bw=A({},uh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Uw=Ls(Bw),Kw=A({},Nu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qg}),ey=Ls(Kw),yl=A({},yo,{propertyName:0,elapsedTime:0,pseudoElement:0}),mA=Ls(yl),gA=A({},uh,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),yA=Ls(gA),Vw=A({},yo,{newState:0,oldState:0}),Hw=Ls(Vw),Gw=[9,13,27,32],Wi=ar&&"CompositionEvent"in window,Ca=null;ar&&"documentMode"in document&&(Ca=document.documentMode);var ii=ar&&"TextEvent"in window&&!Ca,bc=ar&&(!Wi||Ca&&8<Ca&&11>=Ca),Xw=" ",ty=!1;function Yw(a,d){switch(a){case"keyup":return Gw.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ny(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var wc=!1;function Pu(a,d){switch(a){case"compositionend":return ny(d);case"keypress":return d.which!==32?null:(ty=!0,Xw);case"textInput":return a=d.data,a===Xw&&ty?null:a;default:return null}}function vA(a,d){if(wc)return a==="compositionend"||!Wi&&Yw(a,d)?(a=Tw(),$u=lh=Rr=null,wc=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1<d.char.length)return d.char;if(d.which)return String.fromCharCode(d.which)}return null;case"compositionend":return bc&&d.locale!=="ko"?null:d.data;default:return null}}var Zw={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 Vt(a){var d=a&&a.nodeName&&a.nodeName.toLowerCase();return d==="input"?!!Zw[a.type]:d==="textarea"}function dh(a,d,f,y){Tu?xc?xc.push(y):xc=[y]:Tu=y,d=Wf(d,"onChange"),0<d.length&&(f=new ch("onChange","change",null,f,y),a.push({event:f,listeners:d}))}var Mu=null,Qi=null;function Jw(a){OS(a,0)}function vo(a){var d=Ji(a);if(Ou(d))return a}function Zp(a,d){if(a==="change")return d}var Dr=!1;if(ar){var Iu;if(ar){var hh="oninput"in document;if(!hh){var ry=document.createElement("div");ry.setAttribute("oninput","return;"),hh=typeof ry.oninput=="function"}Iu=hh}else Iu=!1;Dr=Iu&&(!document.documentMode||9<document.documentMode)}function Ww(){Mu&&(Mu.detachEvent("onpropertychange",Qw),Qi=Mu=null)}function Qw(a){if(a.propertyName==="value"&&vo(Qi)){var d=[];dh(d,Qi,a,Xg(a)),Kp(Jw,d)}}function zu(a,d,f){a==="focusin"?(Ww(),Mu=d,Qi=f,Mu.attachEvent("onpropertychange",Qw)):a==="focusout"&&Ww()}function xA(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return vo(Qi)}function e0(a,d){if(a==="click")return vo(d)}function bA(a,d){if(a==="input"||a==="change")return vo(d)}function wA(a,d){return a===d&&(a!==0||1/a===1/d)||a!==a&&d!==d}var ai=typeof Object.is=="function"?Object.is:wA;function Lu(a,d){if(ai(a,d))return!0;if(typeof a!="object"||a===null||typeof d!="object"||d===null)return!1;var f=Object.keys(a),y=Object.keys(d);if(f.length!==y.length)return!1;for(y=0;y<f.length;y++){var j=f[y];if(!mn.call(d,j)||!ai(a[j],d[j]))return!1}return!0}function t0(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function n0(a,d){var f=t0(a);a=0;for(var y;f;){if(f.nodeType===3){if(y=a+f.textContent.length,a<=d&&y>=d)return{node:f,offset:d-a};a=y}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=t0(f)}}function r0(a,d){return a&&d?a===d?!0:a&&a.nodeType===3?!1:d&&d.nodeType===3?r0(a,d.parentNode):"contains"in a?a.contains(d):a.compareDocumentPosition?!!(a.compareDocumentPosition(d)&16):!1:!1}function s0(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var d=gl(a.document);d instanceof a.HTMLIFrameElement;){try{var f=typeof d.contentWindow.location.href=="string"}catch{f=!1}if(f)a=d.contentWindow;else break;d=gl(a.document)}return d}function sy(a){var d=a&&a.nodeName&&a.nodeName.toLowerCase();return d&&(d==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||d==="textarea"||a.contentEditable==="true")}var i0=ar&&"documentMode"in document&&11>=document.documentMode,vl=null,Fu=null,xo=null,Jp=!1;function iy(a,d,f){var y=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;Jp||vl==null||vl!==gl(y)||(y=vl,"selectionStart"in y&&sy(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),xo&&Lu(xo,y)||(xo=y,y=Wf(Fu,"onSelect"),0<y.length&&(d=new ch("onSelect","select",null,d,f),a.push({event:d,listeners:y}),d.target=vl)))}function Aa(a,d){var f={};return f[a.toLowerCase()]=d.toLowerCase(),f["Webkit"+a]="webkit"+d,f["Moz"+a]="moz"+d,f}var Sc={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionrun:Aa("Transition","TransitionRun"),transitionstart:Aa("Transition","TransitionStart"),transitioncancel:Aa("Transition","TransitionCancel"),transitionend:Aa("Transition","TransitionEnd")},ay={},oy={};ar&&(oy=document.createElement("div").style,"AnimationEvent"in window||(delete Sc.animationend.animation,delete Sc.animationiteration.animation,delete Sc.animationstart.animation),"TransitionEvent"in window||delete Sc.transitionend.transition);function xl(a){if(ay[a])return ay[a];if(!Sc[a])return a;var d=Sc[a],f;for(f in d)if(d.hasOwnProperty(f)&&f in oy)return ay[a]=d[f];return a}var ly=xl("animationend"),cy=xl("animationiteration"),uy=xl("animationstart"),bo=xl("transitionrun"),SA=xl("transitionstart"),dy=xl("transitioncancel"),Wp=xl("transitionend"),a0=new Map,hy="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(" ");hy.push("scrollEnd");function Oa(a,d){a0.set(a,d),sr(d,[a])}var Ec=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var d=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(d))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},ea=[],qu=0,py=0;function Qp(){for(var a=qu,d=py=qu=0;d<a;){var f=ea[d];ea[d++]=null;var y=ea[d];ea[d++]=null;var j=ea[d];ea[d++]=null;var O=ea[d];if(ea[d++]=null,y!==null&&j!==null){var B=y.pending;B===null?j.next=j:(j.next=B.next,B.next=j),y.pending=j}O!==0&&o0(f,j,O)}}function ef(a,d,f,y){ea[qu++]=a,ea[qu++]=d,ea[qu++]=f,ea[qu++]=y,py|=y,a.lanes|=y,a=a.alternate,a!==null&&(a.lanes|=y)}function fy(a,d,f,y){return ef(a,d,f,y),tf(a)}function jc(a,d){return ef(a,null,null,d),tf(a)}function o0(a,d,f){a.lanes|=f;var y=a.alternate;y!==null&&(y.lanes|=f);for(var j=!1,O=a.return;O!==null;)O.childLanes|=f,y=O.alternate,y!==null&&(y.childLanes|=f),O.tag===22&&(a=O.stateNode,a===null||a._visibility&1||(j=!0)),a=O,O=O.return;return a.tag===3?(O=a.stateNode,j&&d!==null&&(j=31-is(f),a=O.hiddenUpdates,y=a[j],y===null?a[j]=[d]:y.push(d),d.lane=f|536870912),O):null}function tf(a){if(50<zh)throw zh=0,Av=null,Error(o(185));for(var d=a.return;d!==null;)a=d,d=a.return;return a.tag===3?a.stateNode:null}var Bu={};function Uu(a,d,f,y){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=d,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oi(a,d,f,y){return new Uu(a,d,f,y)}function nf(a){return a=a.prototype,!(!a||!a.isReactComponent)}function li(a,d){var f=a.alternate;return f===null?(f=oi(a.tag,d,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=d,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,d=a.dependencies,f.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function my(a,d){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=d,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,d=f.dependencies,a.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),a}function Ku(a,d,f,y,j,O){var B=0;if(y=a,typeof a=="function")nf(a)&&(B=1);else if(typeof a=="string")B=JA(a,f,Ke.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case de:return a=oi(31,f,d,j),a.elementType=de,a.lanes=O,a;case I:return bl(f.children,j,O,d);case F:B=8,j|=24;break;case H:return a=oi(12,f,d,j|2),a.elementType=H,a.lanes=O,a;case W:return a=oi(13,f,d,j),a.elementType=W,a.lanes=O,a;case ae:return a=oi(19,f,d,j),a.elementType=ae,a.lanes=O,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case K:B=10;break e;case V:B=9;break e;case z:B=11;break e;case Q:B=14;break e;case te:B=16,y=null;break e}B=29,f=Error(o(130,a===null?"null":typeof a,"")),y=null}return d=oi(B,f,d,j),d.elementType=a,d.type=y,d.lanes=O,d}function bl(a,d,f,y){return a=oi(7,a,y,d),a.lanes=f,a}function Vu(a,d,f){return a=oi(6,a,null,d),a.lanes=f,a}function l0(a){var d=oi(18,null,null,0);return d.stateNode=a,d}function gy(a,d,f){return d=oi(4,a.children!==null?a.children:[],a.key,d),d.lanes=f,d.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},d}var rf=new WeakMap;function ci(a,d){if(typeof a=="object"&&a!==null){var f=rf.get(a);return f!==void 0?f:(d={value:a,source:d,stack:On(d)},rf.set(a,d),d)}return{value:a,source:d,stack:On(d)}}var cs=[],wl=0,Ba=null,Hu=0,ui=[],Ti=0,wo=null,Kn=1,Ua="";function di(a,d){cs[wl++]=Hu,cs[wl++]=Ba,Ba=a,Hu=d}function c0(a,d,f){ui[Ti++]=Kn,ui[Ti++]=Ua,ui[Ti++]=wo,wo=a;var y=Kn;a=Ua;var j=32-is(y)-1;y&=~(1<<j),f+=1;var O=32-is(d)+j;if(30<O){var B=j-j%5;O=(y&(1<<B)-1).toString(32),y>>=B,j-=B,Kn=1<<32-is(d)+j|f<<j|y,Ua=O+a}else Kn=1<<O|f<<j|y,Ua=a}function Cc(a){a.return!==null&&(di(a,1),c0(a,1,0))}function So(a){for(;a===Ba;)Ba=cs[--wl],cs[wl]=null,Hu=cs[--wl],cs[wl]=null;for(;a===wo;)wo=ui[--Ti],ui[Ti]=null,Ua=ui[--Ti],ui[Ti]=null,Kn=ui[--Ti],ui[Ti]=null}function Eo(a,d){ui[Ti++]=Kn,ui[Ti++]=Ua,ui[Ti++]=wo,Kn=d.id,Ua=d.overflow,wo=a}var qr=null,gr=null,xn=!1,Sl=null,hi=!1,yy=Error(o(519));function El(a){var d=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ph(ci(d,a)),yy}function sf(a){var d=a.stateNode,f=a.type,y=a.memoizedProps;switch(d[as]=a,d[zs]=y,f){case"dialog":jn("cancel",d),jn("close",d);break;case"iframe":case"object":case"embed":jn("load",d);break;case"video":case"audio":for(f=0;f<yd.length;f++)jn(yd[f],d);break;case"source":jn("error",d);break;case"img":case"image":case"link":jn("error",d),jn("load",d);break;case"details":jn("toggle",d);break;case"input":jn("invalid",d),Hg(d,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":jn("invalid",d);break;case"textarea":jn("invalid",d),Aw(d,y.value,y.defaultValue,y.children)}f=y.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||d.textContent===""+f||y.suppressHydrationWarning===!0||Uh(d.textContent,f)?(y.popover!=null&&(jn("beforetoggle",d),jn("toggle",d)),y.onScroll!=null&&jn("scroll",d),y.onScrollEnd!=null&&jn("scrollend",d),y.onClick!=null&&(d.onclick=ja),d=!0):d=!1,d||El(a,!0)}function af(a){for(qr=a.return;qr;)switch(qr.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:qr=qr.return}}function Gu(a){if(a!==qr)return!1;if(!xn)return af(a),xn=!0,!1;var d=a.tag,f;if((f=d!==3&&d!==27)&&((f=d===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||Kv(a.type,a.memoizedProps)),f=!f),f&&gr&&El(a),af(a),d===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));gr=Zv(a)}else if(d===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));gr=Zv(a)}else d===27?(d=gr,ql(a.type)?(a=Yv,Yv=null,gr=a):gr=d):gr=qr?vi(a.stateNode.nextSibling):null;return!0}function Ka(){gr=qr=null,xn=!1}function vy(){var a=Sl;return a!==null&&(yi===null?yi=a:yi.push.apply(yi,a),Sl=null),a}function ph(a){Sl===null?Sl=[a]:Sl.push(a)}var Ac=Xe(null),Oc=null,Va=null;function jo(a,d,f){Te(Ac,d._currentValue),d._currentValue=f}function pi(a){a._currentValue=Ac.current,Oe(Ac)}function xy(a,d,f){for(;a!==null;){var y=a.alternate;if((a.childLanes&d)!==d?(a.childLanes|=d,y!==null&&(y.childLanes|=d)):y!==null&&(y.childLanes&d)!==d&&(y.childLanes|=d),a===f)break;a=a.return}}function Fn(a,d,f,y){var j=a.child;for(j!==null&&(j.return=a);j!==null;){var O=j.dependencies;if(O!==null){var B=j.child;O=O.firstContext;e:for(;O!==null;){var ee=O;O=j;for(var be=0;be<d.length;be++)if(ee.context===d[be]){O.lanes|=f,ee=O.alternate,ee!==null&&(ee.lanes|=f),xy(O.return,f,a),y||(B=null);break e}O=ee.next}}else if(j.tag===18){if(B=j.return,B===null)throw Error(o(341));B.lanes|=f,O=B.alternate,O!==null&&(O.lanes|=f),xy(B,f,a),B=null}else B=j.child;if(B!==null)B.return=j;else for(B=j;B!==null;){if(B===a){B=null;break}if(j=B.sibling,j!==null){j.return=B.return,B=j;break}B=B.return}j=B}}function kc(a,d,f,y){a=null;for(var j=d,O=!1;j!==null;){if(!O){if((j.flags&524288)!==0)O=!0;else if((j.flags&262144)!==0)break}if(j.tag===10){var B=j.alternate;if(B===null)throw Error(o(387));if(B=B.memoizedProps,B!==null){var ee=j.type;ai(j.pendingProps.value,B.value)||(a!==null?a.push(ee):a=[ee])}}else if(j===Fe.current){if(B=j.alternate,B===null)throw Error(o(387));B.memoizedState.memoizedState!==j.memoizedState.memoizedState&&(a!==null?a.push(Sd):a=[Sd])}j=j.return}a!==null&&Fn(d,a,f,y),d.flags|=262144}function Rc(a){for(a=a.firstContext;a!==null;){if(!ai(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function jl(a){Oc=a,Va=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Jr(a){return by(Oc,a)}function Xu(a,d){return Oc===null&&jl(a),by(a,d)}function by(a,d){var f=d._currentValue;if(d={context:d,memoizedValue:f,next:null},Va===null){if(a===null)throw Error(o(308));Va=d,a.dependencies={lanes:0,firstContext:d},a.flags|=524288}else Va=Va.next=d;return f}var fh=typeof AbortController<"u"?AbortController:function(){var a=[],d=this.signal={aborted:!1,addEventListener:function(f,y){a.push(y)}};this.abort=function(){d.aborted=!0,a.forEach(function(f){return f()})}},u0=e.unstable_scheduleCallback,Tc=e.unstable_NormalPriority,Pr={$$typeof:K,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function of(){return{controller:new fh,data:new Map,refCount:0}}function Yu(a){a.refCount--,a.refCount===0&&u0(Tc,function(){a.controller.abort()})}var Cl=null,Zu=0,Al=0,Ha=null;function _i(a,d){if(Cl===null){var f=Cl=[];Zu=0,Al=zv(),Ha={status:"pending",value:void 0,then:function(y){f.push(y)}}}return Zu++,d.then(ta,ta),d}function ta(){if(--Zu===0&&Cl!==null){Ha!==null&&(Ha.status="fulfilled");var a=Cl;Cl=null,Al=0,Ha=null;for(var d=0;d<a.length;d++)(0,a[d])()}}function lf(a,d){var f=[],y={status:"pending",value:null,reason:null,then:function(j){f.push(j)}};return a.then(function(){y.status="fulfilled",y.value=d;for(var j=0;j<f.length;j++)(0,f[j])(d)},function(j){for(y.status="rejected",y.reason=j,j=0;j<f.length;j++)(0,f[j])(void 0)}),y}var d0=ue.S;ue.S=function(a,d){lS=q(),typeof d=="object"&&d!==null&&typeof d.then=="function"&&_i(a,d),d0!==null&&d0(a,d)};var Ol=Xe(null);function cf(){var a=Ol.current;return a!==null?a:lr.pooledCache}function mh(a,d){d===null?Te(Ol,Ol.current):Te(Ol,d.pool)}function uf(){var a=cf();return a===null?null:{parent:Pr._currentValue,pool:a}}var _c=Error(o(460)),df=Error(o(474)),Ju=Error(o(542)),hf={then:function(){}};function na(a){return a=a.status,a==="fulfilled"||a==="rejected"}function wy(a,d,f){switch(f=a[f],f===void 0?a.push(d):f!==d&&(d.then(ja,ja),d=f),d.status){case"fulfilled":return d.value;case"rejected":throw a=d.reason,h0(a),a;default:if(typeof d.status=="string")d.then(ja,ja);else{if(a=lr,a!==null&&100<a.shellSuspendCounter)throw Error(o(482));a=d,a.status="pending",a.then(function(y){if(d.status==="pending"){var j=d;j.status="fulfilled",j.value=y}},function(y){if(d.status==="pending"){var j=d;j.status="rejected",j.reason=y}})}switch(d.status){case"fulfilled":return d.value;case"rejected":throw a=d.reason,h0(a),a}throw Nc=d,_c}}function $c(a){try{var d=a._init;return d(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Nc=f,_c):f}}var Nc=null;function pf(){if(Nc===null)throw Error(o(459));var a=Nc;return Nc=null,a}function h0(a){if(a===_c||a===Ju)throw Error(o(483))}var Wu=null,Dc=0;function Qu(a){var d=Dc;return Dc+=1,Wu===null&&(Wu=[]),wy(Wu,a,d)}function Ts(a,d){d=d.props.ref,a.ref=d!==void 0?d:null}function ed(a,d){throw d.$$typeof===k?Error(o(525)):(a=Object.prototype.toString.call(d),Error(o(31,a==="[object Object]"?"object with keys {"+Object.keys(d).join(", ")+"}":a)))}function Co(a){function d(De,Ce){if(a){var Ie=De.deletions;Ie===null?(De.deletions=[Ce],De.flags|=16):Ie.push(Ce)}}function f(De,Ce){if(!a)return null;for(;Ce!==null;)d(De,Ce),Ce=Ce.sibling;return null}function y(De){for(var Ce=new Map;De!==null;)De.key!==null?Ce.set(De.key,De):Ce.set(De.index,De),De=De.sibling;return Ce}function j(De,Ce){return De=li(De,Ce),De.index=0,De.sibling=null,De}function O(De,Ce,Ie){return De.index=Ie,a?(Ie=De.alternate,Ie!==null?(Ie=Ie.index,Ie<Ce?(De.flags|=67108866,Ce):Ie):(De.flags|=67108866,Ce)):(De.flags|=1048576,Ce)}function B(De){return a&&De.alternate===null&&(De.flags|=67108866),De}function ee(De,Ce,Ie,nt){return Ce===null||Ce.tag!==6?(Ce=Vu(Ie,De.mode,nt),Ce.return=De,Ce):(Ce=j(Ce,Ie),Ce.return=De,Ce)}function be(De,Ce,Ie,nt){var Ht=Ie.type;return Ht===I?We(De,Ce,Ie.props.children,nt,Ie.key):Ce!==null&&(Ce.elementType===Ht||typeof Ht=="object"&&Ht!==null&&Ht.$$typeof===te&&$c(Ht)===Ce.type)?(Ce=j(Ce,Ie.props),Ts(Ce,Ie),Ce.return=De,Ce):(Ce=Ku(Ie.type,Ie.key,Ie.props,null,De.mode,nt),Ts(Ce,Ie),Ce.return=De,Ce)}function Ue(De,Ce,Ie,nt){return Ce===null||Ce.tag!==4||Ce.stateNode.containerInfo!==Ie.containerInfo||Ce.stateNode.implementation!==Ie.implementation?(Ce=gy(Ie,De.mode,nt),Ce.return=De,Ce):(Ce=j(Ce,Ie.children||[]),Ce.return=De,Ce)}function We(De,Ce,Ie,nt,Ht){return Ce===null||Ce.tag!==7?(Ce=bl(Ie,De.mode,nt,Ht),Ce.return=De,Ce):(Ce=j(Ce,Ie),Ce.return=De,Ce)}function rt(De,Ce,Ie){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return Ce=Vu(""+Ce,De.mode,Ie),Ce.return=De,Ce;if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case R:return Ie=Ku(Ce.type,Ce.key,Ce.props,null,De.mode,Ie),Ts(Ie,Ce),Ie.return=De,Ie;case M:return Ce=gy(Ce,De.mode,Ie),Ce.return=De,Ce;case te:return Ce=$c(Ce),rt(De,Ce,Ie)}if(He(Ce)||ie(Ce))return Ce=bl(Ce,De.mode,Ie,null),Ce.return=De,Ce;if(typeof Ce.then=="function")return rt(De,Qu(Ce),Ie);if(Ce.$$typeof===K)return rt(De,Xu(De,Ce),Ie);ed(De,Ce)}return null}function Ve(De,Ce,Ie,nt){var Ht=Ce!==null?Ce.key:null;if(typeof Ie=="string"&&Ie!==""||typeof Ie=="number"||typeof Ie=="bigint")return Ht!==null?null:ee(De,Ce,""+Ie,nt);if(typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case R:return Ie.key===Ht?be(De,Ce,Ie,nt):null;case M:return Ie.key===Ht?Ue(De,Ce,Ie,nt):null;case te:return Ie=$c(Ie),Ve(De,Ce,Ie,nt)}if(He(Ie)||ie(Ie))return Ht!==null?null:We(De,Ce,Ie,nt,null);if(typeof Ie.then=="function")return Ve(De,Ce,Qu(Ie),nt);if(Ie.$$typeof===K)return Ve(De,Ce,Xu(De,Ie),nt);ed(De,Ie)}return null}function Ye(De,Ce,Ie,nt,Ht){if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return De=De.get(Ie)||null,ee(Ce,De,""+nt,Ht);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case R:return De=De.get(nt.key===null?Ie:nt.key)||null,be(Ce,De,nt,Ht);case M:return De=De.get(nt.key===null?Ie:nt.key)||null,Ue(Ce,De,nt,Ht);case te:return nt=$c(nt),Ye(De,Ce,Ie,nt,Ht)}if(He(nt)||ie(nt))return De=De.get(Ie)||null,We(Ce,De,nt,Ht,null);if(typeof nt.then=="function")return Ye(De,Ce,Ie,Qu(nt),Ht);if(nt.$$typeof===K)return Ye(De,Ce,Ie,Xu(Ce,nt),Ht);ed(Ce,nt)}return null}function Pt(De,Ce,Ie,nt){for(var Ht=null,vn=null,Mt=Ce,an=Ce=0,En=null;Mt!==null&&an<Ie.length;an++){Mt.index>an?(En=Mt,Mt=null):En=Mt.sibling;var Rn=Ve(De,Mt,Ie[an],nt);if(Rn===null){Mt===null&&(Mt=En);break}a&&Mt&&Rn.alternate===null&&d(De,Mt),Ce=O(Rn,Ce,an),vn===null?Ht=Rn:vn.sibling=Rn,vn=Rn,Mt=En}if(an===Ie.length)return f(De,Mt),xn&&di(De,an),Ht;if(Mt===null){for(;an<Ie.length;an++)Mt=rt(De,Ie[an],nt),Mt!==null&&(Ce=O(Mt,Ce,an),vn===null?Ht=Mt:vn.sibling=Mt,vn=Mt);return xn&&di(De,an),Ht}for(Mt=y(Mt);an<Ie.length;an++)En=Ye(Mt,De,an,Ie[an],nt),En!==null&&(a&&En.alternate!==null&&Mt.delete(En.key===null?an:En.key),Ce=O(En,Ce,an),vn===null?Ht=En:vn.sibling=En,vn=En);return a&&Mt.forEach(function(Hl){return d(De,Hl)}),xn&&di(De,an),Ht}function Zt(De,Ce,Ie,nt){if(Ie==null)throw Error(o(151));for(var Ht=null,vn=null,Mt=Ce,an=Ce=0,En=null,Rn=Ie.next();Mt!==null&&!Rn.done;an++,Rn=Ie.next()){Mt.index>an?(En=Mt,Mt=null):En=Mt.sibling;var Hl=Ve(De,Mt,Rn.value,nt);if(Hl===null){Mt===null&&(Mt=En);break}a&&Mt&&Hl.alternate===null&&d(De,Mt),Ce=O(Hl,Ce,an),vn===null?Ht=Hl:vn.sibling=Hl,vn=Hl,Mt=En}if(Rn.done)return f(De,Mt),xn&&di(De,an),Ht;if(Mt===null){for(;!Rn.done;an++,Rn=Ie.next())Rn=rt(De,Rn.value,nt),Rn!==null&&(Ce=O(Rn,Ce,an),vn===null?Ht=Rn:vn.sibling=Rn,vn=Rn);return xn&&di(De,an),Ht}for(Mt=y(Mt);!Rn.done;an++,Rn=Ie.next())Rn=Ye(Mt,De,an,Rn.value,nt),Rn!==null&&(a&&Rn.alternate!==null&&Mt.delete(Rn.key===null?an:Rn.key),Ce=O(Rn,Ce,an),vn===null?Ht=Rn:vn.sibling=Rn,vn=Rn);return a&&Mt.forEach(function(WS){return d(De,WS)}),xn&&di(De,an),Ht}function Qn(De,Ce,Ie,nt){if(typeof Ie=="object"&&Ie!==null&&Ie.type===I&&Ie.key===null&&(Ie=Ie.props.children),typeof Ie=="object"&&Ie!==null){switch(Ie.$$typeof){case R:e:{for(var Ht=Ie.key;Ce!==null;){if(Ce.key===Ht){if(Ht=Ie.type,Ht===I){if(Ce.tag===7){f(De,Ce.sibling),nt=j(Ce,Ie.props.children),nt.return=De,De=nt;break e}}else if(Ce.elementType===Ht||typeof Ht=="object"&&Ht!==null&&Ht.$$typeof===te&&$c(Ht)===Ce.type){f(De,Ce.sibling),nt=j(Ce,Ie.props),Ts(nt,Ie),nt.return=De,De=nt;break e}f(De,Ce);break}else d(De,Ce);Ce=Ce.sibling}Ie.type===I?(nt=bl(Ie.props.children,De.mode,nt,Ie.key),nt.return=De,De=nt):(nt=Ku(Ie.type,Ie.key,Ie.props,null,De.mode,nt),Ts(nt,Ie),nt.return=De,De=nt)}return B(De);case M:e:{for(Ht=Ie.key;Ce!==null;){if(Ce.key===Ht)if(Ce.tag===4&&Ce.stateNode.containerInfo===Ie.containerInfo&&Ce.stateNode.implementation===Ie.implementation){f(De,Ce.sibling),nt=j(Ce,Ie.children||[]),nt.return=De,De=nt;break e}else{f(De,Ce);break}else d(De,Ce);Ce=Ce.sibling}nt=gy(Ie,De.mode,nt),nt.return=De,De=nt}return B(De);case te:return Ie=$c(Ie),Qn(De,Ce,Ie,nt)}if(He(Ie))return Pt(De,Ce,Ie,nt);if(ie(Ie)){if(Ht=ie(Ie),typeof Ht!="function")throw Error(o(150));return Ie=Ht.call(Ie),Zt(De,Ce,Ie,nt)}if(typeof Ie.then=="function")return Qn(De,Ce,Qu(Ie),nt);if(Ie.$$typeof===K)return Qn(De,Ce,Xu(De,Ie),nt);ed(De,Ie)}return typeof Ie=="string"&&Ie!==""||typeof Ie=="number"||typeof Ie=="bigint"?(Ie=""+Ie,Ce!==null&&Ce.tag===6?(f(De,Ce.sibling),nt=j(Ce,Ie),nt.return=De,De=nt):(f(De,Ce),nt=Vu(Ie,De.mode,nt),nt.return=De,De=nt),B(De)):f(De,Ce)}return function(De,Ce,Ie,nt){try{Dc=0;var Ht=Qn(De,Ce,Ie,nt);return Wu=null,Ht}catch(Mt){if(Mt===_c||Mt===Ju)throw Mt;var vn=oi(29,Mt,null,De.mode);return vn.lanes=nt,vn.return=De,vn}}}var Pc=Co(!0),gh=Co(!1),fi=!1;function ff(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mf(a,d){a=a.updateQueue,d.updateQueue===a&&(d.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ao(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function kl(a,d,f){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,(Hn&2)!==0){var j=y.pending;return j===null?d.next=d:(d.next=j.next,j.next=d),y.pending=d,d=tf(a),o0(a,null,f),d}return ef(a,y,d,f),tf(a)}function ra(a,d,f){if(d=d.updateQueue,d!==null&&(d=d.shared,(f&4194048)!==0)){var y=d.lanes;y&=a.pendingLanes,f|=y,d.lanes=f,xs(a,f)}}function td(a,d){var f=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,f===y)){var j=null,O=null;if(f=f.firstBaseUpdate,f!==null){do{var B={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};O===null?j=O=B:O=O.next=B,f=f.next}while(f!==null);O===null?j=O=d:O=O.next=d}else j=O=d;f={baseState:y.baseState,firstBaseUpdate:j,lastBaseUpdate:O,shared:y.shared,callbacks:y.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=d:a.next=d,f.lastBaseUpdate=d}var Mc=!1;function yh(){if(Mc){var a=Ha;if(a!==null)throw a}}function vh(a,d,f,y){Mc=!1;var j=a.updateQueue;fi=!1;var O=j.firstBaseUpdate,B=j.lastBaseUpdate,ee=j.shared.pending;if(ee!==null){j.shared.pending=null;var be=ee,Ue=be.next;be.next=null,B===null?O=Ue:B.next=Ue,B=be;var We=a.alternate;We!==null&&(We=We.updateQueue,ee=We.lastBaseUpdate,ee!==B&&(ee===null?We.firstBaseUpdate=Ue:ee.next=Ue,We.lastBaseUpdate=be))}if(O!==null){var rt=j.baseState;B=0,We=Ue=be=null,ee=O;do{var Ve=ee.lane&-536870913,Ye=Ve!==ee.lane;if(Ye?(kn&Ve)===Ve:(y&Ve)===Ve){Ve!==0&&Ve===Al&&(Mc=!0),We!==null&&(We=We.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var Pt=a,Zt=ee;Ve=d;var Qn=f;switch(Zt.tag){case 1:if(Pt=Zt.payload,typeof Pt=="function"){rt=Pt.call(Qn,rt,Ve);break e}rt=Pt;break e;case 3:Pt.flags=Pt.flags&-65537|128;case 0:if(Pt=Zt.payload,Ve=typeof Pt=="function"?Pt.call(Qn,rt,Ve):Pt,Ve==null)break e;rt=A({},rt,Ve);break e;case 2:fi=!0}}Ve=ee.callback,Ve!==null&&(a.flags|=64,Ye&&(a.flags|=8192),Ye=j.callbacks,Ye===null?j.callbacks=[Ve]:Ye.push(Ve))}else Ye={lane:Ve,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},We===null?(Ue=We=Ye,be=rt):We=We.next=Ye,B|=Ve;if(ee=ee.next,ee===null){if(ee=j.shared.pending,ee===null)break;Ye=ee,ee=Ye.next,Ye.next=null,j.lastBaseUpdate=Ye,j.shared.pending=null}}while(!0);We===null&&(be=rt),j.baseState=be,j.firstBaseUpdate=Ue,j.lastBaseUpdate=We,O===null&&(j.shared.lanes=0),Wa|=B,a.lanes=B,a.memoizedState=rt}}function gf(a,d){if(typeof a!="function")throw Error(o(191,a));a.call(d)}function p0(a,d){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)gf(f[a],d)}var nd=Xe(null),rd=Xe(0);function f0(a,d){a=Po,Te(rd,a),Te(nd,d),Po=a|d.baseLanes}function Sy(){Te(rd,Po),Te(nd,nd.current)}function sd(){Po=rd.current,Oe(nd),Oe(rd)}var $i=Xe(null),sa=null;function ia(a){var d=a.alternate;Te(jr,jr.current&1),Te($i,a),sa===null&&(d===null||nd.current!==null||d.memoizedState!==null)&&(sa=a)}function Ey(a){Te(jr,jr.current),Te($i,a),sa===null&&(sa=a)}function ka(a){a.tag===22?(Te(jr,jr.current),Te($i,a),sa===null&&(sa=a)):Ga()}function Ga(){Te(jr,jr.current),Te($i,$i.current)}function Fs(a){Oe($i),sa===a&&(sa=null),Oe(jr)}var jr=Xe(0);function yf(a){for(var d=a;d!==null;){if(d.tag===13){var f=d.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||rm(f)||sm(f)))return d}else if(d.tag===19&&(d.memoizedProps.revealOrder==="forwards"||d.memoizedProps.revealOrder==="backwards"||d.memoizedProps.revealOrder==="unstable_legacy-backwards"||d.memoizedProps.revealOrder==="together")){if((d.flags&128)!==0)return d}else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===a)break;for(;d.sibling===null;){if(d.return===null||d.return===a)return null;d=d.return}d.sibling.return=d.return,d=d.sibling}return null}var Xa=0,rn=null,Vn=null,Mr=null,xh=!1,Ic=!1,Oo=!1,bh=0,id=0,zc=null,m0=0;function Cr(){throw Error(o(321))}function jy(a,d){if(d===null)return!1;for(var f=0;f<d.length&&f<a.length;f++)if(!ai(a[f],d[f]))return!1;return!0}function Cy(a,d,f,y,j,O){return Xa=O,rn=d,d.memoizedState=null,d.updateQueue=null,d.lanes=0,ue.H=a===null||a.memoizedState===null?N0:Ef,Oo=!1,O=f(y,j),Oo=!1,Ic&&(O=Oy(d,f,y,j)),Ay(a),O}function Ay(a){ue.H=Ah;var d=Vn!==null&&Vn.next!==null;if(Xa=0,Mr=Vn=rn=null,xh=!1,id=0,zc=null,d)throw Error(o(300));a===null||Br||(a=a.dependencies,a!==null&&Rc(a)&&(Br=!0))}function Oy(a,d,f,y){rn=a;var j=0;do{if(Ic&&(zc=null),id=0,Ic=!1,25<=j)throw Error(o(301));if(j+=1,Mr=Vn=null,a.updateQueue!=null){var O=a.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}ue.H=D0,O=d(f,y)}while(Ic);return O}function EA(){var a=ue.H,d=a.useState()[0];return d=typeof d.then=="function"?wh(d):d,a=a.useState()[0],(Vn!==null?Vn.memoizedState:null)!==a&&(rn.flags|=1024),d}function ky(){var a=bh!==0;return bh=0,a}function Ry(a,d,f){d.updateQueue=a.updateQueue,d.flags&=-2053,a.lanes&=~f}function Ty(a){if(xh){for(a=a.memoizedState;a!==null;){var d=a.queue;d!==null&&(d.pending=null),a=a.next}xh=!1}Xa=0,Mr=Vn=rn=null,Ic=!1,id=bh=0,zc=null}function _s(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mr===null?rn.memoizedState=Mr=a:Mr=Mr.next=a,Mr}function Ir(){if(Vn===null){var a=rn.alternate;a=a!==null?a.memoizedState:null}else a=Vn.next;var d=Mr===null?rn.memoizedState:Mr.next;if(d!==null)Mr=d,Vn=a;else{if(a===null)throw rn.alternate===null?Error(o(467)):Error(o(310));Vn=a,a={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},Mr===null?rn.memoizedState=Mr=a:Mr=Mr.next=a}return Mr}function ad(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wh(a){var d=id;return id+=1,zc===null&&(zc=[]),a=wy(zc,a,d),d=rn,(Mr===null?d.memoizedState:Mr.next)===null&&(d=d.alternate,ue.H=d===null||d.memoizedState===null?N0:Ef),a}function vf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return wh(a);if(a.$$typeof===K)return Jr(a)}throw Error(o(438,String(a)))}function _y(a){var d=null,f=rn.updateQueue;if(f!==null&&(d=f.memoCache),d==null){var y=rn.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(d={data:y.data.map(function(j){return j.slice()}),index:0})))}if(d==null&&(d={data:[],index:0}),f===null&&(f=ad(),rn.updateQueue=f),f.memoCache=d,f=d.data[d.index],f===void 0)for(f=d.data[d.index]=Array(a),y=0;y<a;y++)f[y]=je;return d.index++,f}function aa(a,d){return typeof d=="function"?d(a):d}function xf(a){var d=Ir();return $y(d,Vn,a)}function $y(a,d,f){var y=a.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=f;var j=a.baseQueue,O=y.pending;if(O!==null){if(j!==null){var B=j.next;j.next=O.next,O.next=B}d.baseQueue=j=O,y.pending=null}if(O=a.baseState,j===null)a.memoizedState=O;else{d=j.next;var ee=B=null,be=null,Ue=d,We=!1;do{var rt=Ue.lane&-536870913;if(rt!==Ue.lane?(kn&rt)===rt:(Xa&rt)===rt){var Ve=Ue.revertLane;if(Ve===0)be!==null&&(be=be.next={lane:0,revertLane:0,gesture:null,action:Ue.action,hasEagerState:Ue.hasEagerState,eagerState:Ue.eagerState,next:null}),rt===Al&&(We=!0);else if((Xa&Ve)===Ve){Ue=Ue.next,Ve===Al&&(We=!0);continue}else rt={lane:0,revertLane:Ue.revertLane,gesture:null,action:Ue.action,hasEagerState:Ue.hasEagerState,eagerState:Ue.eagerState,next:null},be===null?(ee=be=rt,B=O):be=be.next=rt,rn.lanes|=Ve,Wa|=Ve;rt=Ue.action,Oo&&f(O,rt),O=Ue.hasEagerState?Ue.eagerState:f(O,rt)}else Ve={lane:rt,revertLane:Ue.revertLane,gesture:Ue.gesture,action:Ue.action,hasEagerState:Ue.hasEagerState,eagerState:Ue.eagerState,next:null},be===null?(ee=be=Ve,B=O):be=be.next=Ve,rn.lanes|=rt,Wa|=rt;Ue=Ue.next}while(Ue!==null&&Ue!==d);if(be===null?B=O:be.next=ee,!ai(O,a.memoizedState)&&(Br=!0,We&&(f=Ha,f!==null)))throw f;a.memoizedState=O,a.baseState=B,a.baseQueue=be,y.lastRenderedState=O}return j===null&&(y.lanes=0),[a.memoizedState,y.dispatch]}function Sh(a){var d=Ir(),f=d.queue;if(f===null)throw Error(o(311));f.lastRenderedReducer=a;var y=f.dispatch,j=f.pending,O=d.memoizedState;if(j!==null){f.pending=null;var B=j=j.next;do O=a(O,B.action),B=B.next;while(B!==j);ai(O,d.memoizedState)||(Br=!0),d.memoizedState=O,d.baseQueue===null&&(d.baseState=O),f.lastRenderedState=O}return[O,y]}function Ny(a,d,f){var y=rn,j=Ir(),O=xn;if(O){if(f===void 0)throw Error(o(407));f=f()}else f=d();var B=!ai((Vn||j).memoizedState,f);if(B&&(j.memoizedState=f,Br=!0),j=j.queue,Vy(g0.bind(null,y,j,a),[a]),j.getSnapshot!==d||B||Mr!==null&&Mr.memoizedState.tag&1){if(y.flags|=2048,od(9,{destroy:void 0},Py.bind(null,y,j,f,d),null),lr===null)throw Error(o(349));O||(Xa&127)!==0||Dy(y,d,f)}return f}function Dy(a,d,f){a.flags|=16384,a={getSnapshot:d,value:f},d=rn.updateQueue,d===null?(d=ad(),rn.updateQueue=d,d.stores=[a]):(f=d.stores,f===null?d.stores=[a]:f.push(a))}function Py(a,d,f,y){d.value=f,d.getSnapshot=y,My(d)&&Iy(a)}function g0(a,d,f){return f(function(){My(d)&&Iy(a)})}function My(a){var d=a.getSnapshot;a=a.value;try{var f=d();return!ai(a,f)}catch{return!0}}function Iy(a){var d=jc(a,2);d!==null&&Ns(d,a,2)}function zy(a){var d=_s();if(typeof a=="function"){var f=a;if(a=f(),Oo){ss(!0);try{f()}finally{ss(!1)}}}return d.memoizedState=d.baseState=a,d.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:a},d}function y0(a,d,f,y){return a.baseState=f,$y(a,Vn,typeof y=="function"?y:aa)}function v0(a,d,f,y,j){if(Sf(a))throw Error(o(485));if(a=d.action,a!==null){var O={payload:j,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){O.listeners.push(B)}};ue.T!==null?f(!0):O.isTransition=!1,y(O),f=d.pending,f===null?(O.next=d.pending=O,Ly(d,O)):(O.next=f.next,d.pending=f.next=O)}}function Ly(a,d){var f=d.action,y=d.payload,j=a.state;if(d.isTransition){var O=ue.T,B={};ue.T=B;try{var ee=f(j,y),be=ue.S;be!==null&&be(B,ee),Fy(a,d,ee)}catch(Ue){By(a,d,Ue)}finally{O!==null&&B.types!==null&&(O.types=B.types),ue.T=O}}else try{O=f(j,y),Fy(a,d,O)}catch(Ue){By(a,d,Ue)}}function Fy(a,d,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(y){qy(a,d,y)},function(y){return By(a,d,y)}):qy(a,d,f)}function qy(a,d,f){d.status="fulfilled",d.value=f,x0(d),a.state=f,d=a.pending,d!==null&&(f=d.next,f===d?a.pending=null:(f=f.next,d.next=f,Ly(a,f)))}function By(a,d,f){var y=a.pending;if(a.pending=null,y!==null){y=y.next;do d.status="rejected",d.reason=f,x0(d),d=d.next;while(d!==y)}a.action=null}function x0(a){a=a.listeners;for(var d=0;d<a.length;d++)(0,a[d])()}function Uy(a,d){return d}function b0(a,d){if(xn){var f=lr.formState;if(f!==null){e:{var y=rn;if(xn){if(gr){t:{for(var j=gr,O=hi;j.nodeType!==8;){if(!O){j=null;break t}if(j=vi(j.nextSibling),j===null){j=null;break t}}O=j.data,j=O==="F!"||O==="F"?j:null}if(j){gr=vi(j.nextSibling),y=j.data==="F!";break e}}El(y)}y=!1}y&&(d=f[0])}}return f=_s(),f.memoizedState=f.baseState=d,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uy,lastRenderedState:d},f.queue=y,f=T0.bind(null,rn,y),y.dispatch=f,y=zy(!1),O=ev.bind(null,rn,!1,y.queue),y=_s(),j={state:d,dispatch:null,action:a,pending:null},y.queue=j,f=v0.bind(null,rn,j,O,f),j.dispatch=f,y.memoizedState=a,[d,f,!1]}function w0(a){var d=Ir();return Ya(d,Vn,a)}function Ya(a,d,f){if(d=$y(a,d,Uy)[0],a=xf(aa)[0],typeof d=="object"&&d!==null&&typeof d.then=="function")try{var y=wh(d)}catch(B){throw B===_c?Ju:B}else y=d;d=Ir();var j=d.queue,O=j.dispatch;return f!==d.memoizedState&&(rn.flags|=2048,od(9,{destroy:void 0},jA.bind(null,j,f),null)),[y,O,a]}function jA(a,d){a.action=d}function S0(a){var d=Ir(),f=Vn;if(f!==null)return Ya(d,f,a);Ir(),d=d.memoizedState,f=Ir();var y=f.queue.dispatch;return f.memoizedState=a,[d,y,!1]}function od(a,d,f,y){return a={tag:a,create:f,deps:y,inst:d,next:null},d=rn.updateQueue,d===null&&(d=ad(),rn.updateQueue=d),f=d.lastEffect,f===null?d.lastEffect=a.next=a:(y=f.next,f.next=a,a.next=y,d.lastEffect=a),a}function E0(){return Ir().memoizedState}function Eh(a,d,f,y){var j=_s();rn.flags|=a,j.memoizedState=od(1|d,{destroy:void 0},f,y===void 0?null:y)}function bf(a,d,f,y){var j=Ir();y=y===void 0?null:y;var O=j.memoizedState.inst;Vn!==null&&y!==null&&jy(y,Vn.memoizedState.deps)?j.memoizedState=od(d,O,f,y):(rn.flags|=a,j.memoizedState=od(1|d,O,f,y))}function Ky(a,d){Eh(8390656,8,a,d)}function Vy(a,d){bf(2048,8,a,d)}function CA(a){rn.flags|=4;var d=rn.updateQueue;if(d===null)d=ad(),rn.updateQueue=d,d.events=[a];else{var f=d.events;f===null?d.events=[a]:f.push(a)}}function j0(a){var d=Ir().memoizedState;return CA({ref:d,nextImpl:a}),function(){if((Hn&2)!==0)throw Error(o(440));return d.impl.apply(void 0,arguments)}}function Lc(a,d){return bf(4,2,a,d)}function wf(a,d){return bf(4,4,a,d)}function C0(a,d){if(typeof d=="function"){a=a();var f=d(a);return function(){typeof f=="function"?f():d(null)}}if(d!=null)return a=a(),d.current=a,function(){d.current=null}}function Za(a,d,f){f=f!=null?f.concat([a]):null,bf(4,4,C0.bind(null,d,a),f)}function Hy(){}function Gy(a,d){var f=Ir();d=d===void 0?null:d;var y=f.memoizedState;return d!==null&&jy(d,y[1])?y[0]:(f.memoizedState=[a,d],a)}function Xy(a,d){var f=Ir();d=d===void 0?null:d;var y=f.memoizedState;if(d!==null&&jy(d,y[1]))return y[0];if(y=a(),Oo){ss(!0);try{a()}finally{ss(!1)}}return f.memoizedState=[y,d],y}function Yy(a,d,f){return f===void 0||(Xa&1073741824)!==0&&(kn&261930)===0?a.memoizedState=d:(a.memoizedState=f,a=Ov(),rn.lanes|=a,Wa|=a,f)}function A0(a,d,f,y){return ai(f,d)?f:nd.current!==null?(a=Yy(a,f,y),ai(a,d)||(Br=!0),a):(Xa&42)===0||(Xa&1073741824)!==0&&(kn&261930)===0?(Br=!0,a.memoizedState=f):(a=Ov(),rn.lanes|=a,Wa|=a,d)}function O0(a,d,f,y,j){var O=ne.p;ne.p=O!==0&&8>O?O:8;var B=ue.T,ee={};ue.T=ee,ev(a,!1,d,f);try{var be=j(),Ue=ue.S;if(Ue!==null&&Ue(ee,be),be!==null&&typeof be=="object"&&typeof be.then=="function"){var We=lf(be,y);Ch(a,d,We,Pi(a))}else Ch(a,d,y,Pi(a))}catch(rt){Ch(a,d,{then:function(){},status:"rejected",reason:rt},Pi())}finally{ne.p=O,B!==null&&ee.types!==null&&(B.types=ee.types),ue.T=B}}function AA(){}function Zy(a,d,f,y){if(a.tag!==5)throw Error(o(476));var j=Jy(a).queue;O0(a,j,d,ce,f===null?AA:function(){return Wy(a),f(y)})}function Jy(a){var d=a.memoizedState;if(d!==null)return d;d={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:ce},next:null};var f={};return d.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:f},next:null},a.memoizedState=d,a=a.alternate,a!==null&&(a.memoizedState=d),d}function Wy(a){var d=Jy(a);d.next===null&&(d=a.alternate.memoizedState),Ch(a,d.next.queue,{},Pi())}function jh(){return Jr(Sd)}function k0(){return Ir().memoizedState}function Qy(){return Ir().memoizedState}function OA(a){for(var d=a.return;d!==null;){switch(d.tag){case 24:case 3:var f=Pi();a=Ao(f);var y=kl(d,a,f);y!==null&&(Ns(y,d,f),ra(y,d,f)),d={cache:of()},a.payload=d;return}d=d.return}}function R0(a,d,f){var y=Pi();f={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Sf(a)?_0(d,f):(f=fy(a,d,f,y),f!==null&&(Ns(f,a,y),$0(f,d,y)))}function T0(a,d,f){var y=Pi();Ch(a,d,f,y)}function Ch(a,d,f,y){var j={lane:y,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Sf(a))_0(d,j);else{var O=a.alternate;if(a.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var B=d.lastRenderedState,ee=O(B,f);if(j.hasEagerState=!0,j.eagerState=ee,ai(ee,B))return ef(a,d,j,0),lr===null&&Qp(),!1}catch{}if(f=fy(a,d,j,y),f!==null)return Ns(f,a,y),$0(f,d,y),!0}return!1}function ev(a,d,f,y){if(y={lane:2,revertLane:zv(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Sf(a)){if(d)throw Error(o(479))}else d=fy(a,f,y,2),d!==null&&Ns(d,a,2)}function Sf(a){var d=a.alternate;return a===rn||d!==null&&d===rn}function _0(a,d){Ic=xh=!0;var f=a.pending;f===null?d.next=d:(d.next=f.next,f.next=d),a.pending=d}function $0(a,d,f){if((f&4194048)!==0){var y=d.lanes;y&=a.pendingLanes,f|=y,d.lanes=f,xs(a,f)}}var Ah={readContext:Jr,use:vf,useCallback:Cr,useContext:Cr,useEffect:Cr,useImperativeHandle:Cr,useLayoutEffect:Cr,useInsertionEffect:Cr,useMemo:Cr,useReducer:Cr,useRef:Cr,useState:Cr,useDebugValue:Cr,useDeferredValue:Cr,useTransition:Cr,useSyncExternalStore:Cr,useId:Cr,useHostTransitionStatus:Cr,useFormState:Cr,useActionState:Cr,useOptimistic:Cr,useMemoCache:Cr,useCacheRefresh:Cr};Ah.useEffectEvent=Cr;var N0={readContext:Jr,use:vf,useCallback:function(a,d){return _s().memoizedState=[a,d===void 0?null:d],a},useContext:Jr,useEffect:Ky,useImperativeHandle:function(a,d,f){f=f!=null?f.concat([a]):null,Eh(4194308,4,C0.bind(null,d,a),f)},useLayoutEffect:function(a,d){return Eh(4194308,4,a,d)},useInsertionEffect:function(a,d){Eh(4,2,a,d)},useMemo:function(a,d){var f=_s();d=d===void 0?null:d;var y=a();if(Oo){ss(!0);try{a()}finally{ss(!1)}}return f.memoizedState=[y,d],y},useReducer:function(a,d,f){var y=_s();if(f!==void 0){var j=f(d);if(Oo){ss(!0);try{f(d)}finally{ss(!1)}}}else j=d;return y.memoizedState=y.baseState=j,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:j},y.queue=a,a=a.dispatch=R0.bind(null,rn,a),[y.memoizedState,a]},useRef:function(a){var d=_s();return a={current:a},d.memoizedState=a},useState:function(a){a=zy(a);var d=a.queue,f=T0.bind(null,rn,d);return d.dispatch=f,[a.memoizedState,f]},useDebugValue:Hy,useDeferredValue:function(a,d){var f=_s();return Yy(f,a,d)},useTransition:function(){var a=zy(!1);return a=O0.bind(null,rn,a.queue,!0,!1),_s().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,d,f){var y=rn,j=_s();if(xn){if(f===void 0)throw Error(o(407));f=f()}else{if(f=d(),lr===null)throw Error(o(349));(kn&127)!==0||Dy(y,d,f)}j.memoizedState=f;var O={value:f,getSnapshot:d};return j.queue=O,Ky(g0.bind(null,y,O,a),[a]),y.flags|=2048,od(9,{destroy:void 0},Py.bind(null,y,O,f,d),null),f},useId:function(){var a=_s(),d=lr.identifierPrefix;if(xn){var f=Ua,y=Kn;f=(y&~(1<<32-is(y)-1)).toString(32)+f,d="_"+d+"R_"+f,f=bh++,0<f&&(d+="H"+f.toString(32)),d+="_"}else f=m0++,d="_"+d+"r_"+f.toString(32)+"_";return a.memoizedState=d},useHostTransitionStatus:jh,useFormState:b0,useActionState:b0,useOptimistic:function(a){var d=_s();d.memoizedState=d.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return d.queue=f,d=ev.bind(null,rn,!0,f),f.dispatch=d,[a,d]},useMemoCache:_y,useCacheRefresh:function(){return _s().memoizedState=OA.bind(null,rn)},useEffectEvent:function(a){var d=_s(),f={impl:a};return d.memoizedState=f,function(){if((Hn&2)!==0)throw Error(o(440));return f.impl.apply(void 0,arguments)}}},Ef={readContext:Jr,use:vf,useCallback:Gy,useContext:Jr,useEffect:Vy,useImperativeHandle:Za,useInsertionEffect:Lc,useLayoutEffect:wf,useMemo:Xy,useReducer:xf,useRef:E0,useState:function(){return xf(aa)},useDebugValue:Hy,useDeferredValue:function(a,d){var f=Ir();return A0(f,Vn.memoizedState,a,d)},useTransition:function(){var a=xf(aa)[0],d=Ir().memoizedState;return[typeof a=="boolean"?a:wh(a),d]},useSyncExternalStore:Ny,useId:k0,useHostTransitionStatus:jh,useFormState:w0,useActionState:w0,useOptimistic:function(a,d){var f=Ir();return y0(f,Vn,a,d)},useMemoCache:_y,useCacheRefresh:Qy};Ef.useEffectEvent=j0;var D0={readContext:Jr,use:vf,useCallback:Gy,useContext:Jr,useEffect:Vy,useImperativeHandle:Za,useInsertionEffect:Lc,useLayoutEffect:wf,useMemo:Xy,useReducer:Sh,useRef:E0,useState:function(){return Sh(aa)},useDebugValue:Hy,useDeferredValue:function(a,d){var f=Ir();return Vn===null?Yy(f,a,d):A0(f,Vn.memoizedState,a,d)},useTransition:function(){var a=Sh(aa)[0],d=Ir().memoizedState;return[typeof a=="boolean"?a:wh(a),d]},useSyncExternalStore:Ny,useId:k0,useHostTransitionStatus:jh,useFormState:S0,useActionState:S0,useOptimistic:function(a,d){var f=Ir();return Vn!==null?y0(f,Vn,a,d):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:_y,useCacheRefresh:Qy};D0.useEffectEvent=j0;function tv(a,d,f,y){d=a.memoizedState,f=f(y,d),f=f==null?d:A({},d,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var nv={enqueueSetState:function(a,d,f){a=a._reactInternals;var y=Pi(),j=Ao(y);j.payload=d,f!=null&&(j.callback=f),d=kl(a,j,y),d!==null&&(Ns(d,a,y),ra(d,a,y))},enqueueReplaceState:function(a,d,f){a=a._reactInternals;var y=Pi(),j=Ao(y);j.tag=1,j.payload=d,f!=null&&(j.callback=f),d=kl(a,j,y),d!==null&&(Ns(d,a,y),ra(d,a,y))},enqueueForceUpdate:function(a,d){a=a._reactInternals;var f=Pi(),y=Ao(f);y.tag=2,d!=null&&(y.callback=d),d=kl(a,y,f),d!==null&&(Ns(d,a,f),ra(d,a,f))}};function ld(a,d,f,y,j,O,B){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,O,B):d.prototype&&d.prototype.isPureReactComponent?!Lu(f,y)||!Lu(j,O):!0}function P0(a,d,f,y){a=d.state,typeof d.componentWillReceiveProps=="function"&&d.componentWillReceiveProps(f,y),typeof d.UNSAFE_componentWillReceiveProps=="function"&&d.UNSAFE_componentWillReceiveProps(f,y),d.state!==a&&nv.enqueueReplaceState(d,d.state,null)}function Fc(a,d){var f=d;if("ref"in d){f={};for(var y in d)y!=="ref"&&(f[y]=d[y])}if(a=a.defaultProps){f===d&&(f=A({},f));for(var j in a)f[j]===void 0&&(f[j]=a[j])}return f}function M0(a){Ec(a)}function I0(a){console.error(a)}function z0(a){Ec(a)}function jf(a,d){try{var f=a.onUncaughtError;f(d.value,{componentStack:d.stack})}catch(y){setTimeout(function(){throw y})}}function L0(a,d,f){try{var y=a.onCaughtError;y(f.value,{componentStack:f.stack,errorBoundary:d.tag===1?d.stateNode:null})}catch(j){setTimeout(function(){throw j})}}function rv(a,d,f){return f=Ao(f),f.tag=3,f.payload={element:null},f.callback=function(){jf(a,d)},f}function sv(a){return a=Ao(a),a.tag=3,a}function Rl(a,d,f,y){var j=f.type.getDerivedStateFromError;if(typeof j=="function"){var O=y.value;a.payload=function(){return j(O)},a.callback=function(){L0(d,f,y)}}var B=f.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(a.callback=function(){L0(d,f,y),typeof j!="function"&&(Il===null?Il=new Set([this]):Il.add(this));var ee=y.stack;this.componentDidCatch(y.value,{componentStack:ee!==null?ee:""})})}function F0(a,d,f,y,j){if(f.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(d=f.alternate,d!==null&&kc(d,f,j,!0),f=$i.current,f!==null){switch(f.tag){case 31:case 13:return sa===null?Bf():f.alternate===null&&Ar===0&&(Ar=3),f.flags&=-257,f.flags|=65536,f.lanes=j,y===hf?f.flags|=16384:(d=f.updateQueue,d===null?f.updateQueue=new Set([y]):d.add(y),$v(a,y,j)),!1;case 22:return f.flags|=65536,y===hf?f.flags|=16384:(d=f.updateQueue,d===null?(d={transitions:null,markerInstances:null,retryQueue:new Set([y])},f.updateQueue=d):(f=d.retryQueue,f===null?d.retryQueue=new Set([y]):f.add(y)),$v(a,y,j)),!1}throw Error(o(435,f.tag))}return $v(a,y,j),Bf(),!1}if(xn)return d=$i.current,d!==null?((d.flags&65536)===0&&(d.flags|=256),d.flags|=65536,d.lanes=j,y!==yy&&(a=Error(o(422),{cause:y}),ph(ci(a,f)))):(y!==yy&&(d=Error(o(423),{cause:y}),ph(ci(d,f))),a=a.current.alternate,a.flags|=65536,j&=-j,a.lanes|=j,y=ci(y,f),j=rv(a.stateNode,y,j),td(a,j),Ar!==4&&(Ar=2)),!1;var O=Error(o(520),{cause:y});if(O=ci(O,f),Ph===null?Ph=[O]:Ph.push(O),Ar!==4&&(Ar=2),d===null)return!0;y=ci(y,f),f=d;do{switch(f.tag){case 3:return f.flags|=65536,a=j&-j,f.lanes|=a,a=rv(f.stateNode,y,a),td(f,a),!1;case 1:if(d=f.type,O=f.stateNode,(f.flags&128)===0&&(typeof d.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(Il===null||!Il.has(O))))return f.flags|=65536,j&=-j,f.lanes|=j,j=sv(j),Rl(j,a,f,y),td(f,j),!1}f=f.return}while(f!==null);return!1}var iv=Error(o(461)),Br=!1;function bs(a,d,f,y){d.child=a===null?gh(d,null,f,y):Pc(d,a.child,f,y)}function Tl(a,d,f,y,j){f=f.render;var O=d.ref;if("ref"in y){var B={};for(var ee in y)ee!=="ref"&&(B[ee]=y[ee])}else B=y;return jl(d),y=Cy(a,d,f,B,O,j),ee=ky(),a!==null&&!Br?(Ry(a,d,j),Ro(a,d,j)):(xn&&ee&&Cc(d),d.flags|=1,bs(a,d,y,j),d.child)}function q0(a,d,f,y,j){if(a===null){var O=f.type;return typeof O=="function"&&!nf(O)&&O.defaultProps===void 0&&f.compare===null?(d.tag=15,d.type=O,B0(a,d,O,y,j)):(a=Ku(f.type,null,y,d,d.mode,j),a.ref=d.ref,a.return=d,d.child=a)}if(O=a.child,!Rf(a,j)){var B=O.memoizedProps;if(f=f.compare,f=f!==null?f:Lu,f(B,y)&&a.ref===d.ref)return Ro(a,d,j)}return d.flags|=1,a=li(O,y),a.ref=d.ref,a.return=d,d.child=a}function B0(a,d,f,y,j){if(a!==null){var O=a.memoizedProps;if(Lu(O,y)&&a.ref===d.ref)if(Br=!1,d.pendingProps=y=O,Rf(a,j))(a.flags&131072)!==0&&(Br=!0);else return d.lanes=a.lanes,Ro(a,d,j)}return ov(a,d,f,y,j)}function U0(a,d,f,y){var j=y.children,O=a!==null?a.memoizedState:null;if(a===null&&d.stateNode===null&&(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((d.flags&128)!==0){if(O=O!==null?O.baseLanes|f:f,a!==null){for(y=d.child=a.child,j=0;y!==null;)j=j|y.lanes|y.childLanes,y=y.sibling;y=j&~O}else y=0,d.child=null;return av(a,d,O,f,y)}if((f&536870912)!==0)d.memoizedState={baseLanes:0,cachePool:null},a!==null&&mh(d,O!==null?O.cachePool:null),O!==null?f0(d,O):Sy(),ka(d);else return y=d.lanes=536870912,av(a,d,O!==null?O.baseLanes|f:f,f,y)}else O!==null?(mh(d,O.cachePool),f0(d,O),Ga(),d.memoizedState=null):(a!==null&&mh(d,null),Sy(),Ga());return bs(a,d,j,f),d.child}function _l(a,d){return a!==null&&a.tag===22||d.stateNode!==null||(d.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.sibling}function av(a,d,f,y,j){var O=cf();return O=O===null?null:{parent:Pr._currentValue,pool:O},d.memoizedState={baseLanes:f,cachePool:O},a!==null&&mh(d,null),Sy(),ka(d),a!==null&&kc(a,d,y,!0),d.childLanes=j,null}function Cf(a,d){return d=kf({mode:d.mode,children:d.children},a.mode),d.ref=a.ref,a.child=d,d.return=a,d}function Af(a,d,f){return Pc(d,a.child,null,f),a=Cf(d,d.pendingProps),a.flags|=2,Fs(d),d.memoizedState=null,a}function kA(a,d,f){var y=d.pendingProps,j=(d.flags&128)!==0;if(d.flags&=-129,a===null){if(xn){if(y.mode==="hidden")return a=Cf(d,y),d.lanes=536870912,_l(null,a);if(Ey(d),(a=gr)?(a=Bl(a,hi),a=a!==null&&a.data==="&"?a:null,a!==null&&(d.memoizedState={dehydrated:a,treeContext:wo!==null?{id:Kn,overflow:Ua}:null,retryLane:536870912,hydrationErrors:null},f=l0(a),f.return=d,d.child=f,qr=d,gr=null)):a=null,a===null)throw El(d);return d.lanes=536870912,null}return Cf(d,y)}var O=a.memoizedState;if(O!==null){var B=O.dehydrated;if(Ey(d),j)if(d.flags&256)d.flags&=-257,d=Af(a,d,f);else if(d.memoizedState!==null)d.child=a.child,d.flags|=128,d=null;else throw Error(o(558));else if(Br||kc(a,d,f,!1),j=(f&a.childLanes)!==0,Br||j){if(y=lr,y!==null&&(B=ni(y,f),B!==0&&B!==O.retryLane))throw O.retryLane=B,jc(a,B),Ns(y,a,B),iv;Bf(),d=Af(a,d,f)}else a=O.treeContext,gr=vi(B.nextSibling),qr=d,xn=!0,Sl=null,hi=!1,a!==null&&Eo(d,a),d=Cf(d,y),d.flags|=4096;return d}return a=li(a.child,{mode:y.mode,children:y.children}),a.ref=d.ref,d.child=a,a.return=d,a}function Of(a,d){var f=d.ref;if(f===null)a!==null&&a.ref!==null&&(d.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(o(284));(a===null||a.ref!==f)&&(d.flags|=4194816)}}function ov(a,d,f,y,j){return jl(d),f=Cy(a,d,f,y,void 0,j),y=ky(),a!==null&&!Br?(Ry(a,d,j),Ro(a,d,j)):(xn&&y&&Cc(d),d.flags|=1,bs(a,d,f,j),d.child)}function ko(a,d,f,y,j,O){return jl(d),d.updateQueue=null,f=Oy(d,y,f,j),Ay(a),y=ky(),a!==null&&!Br?(Ry(a,d,O),Ro(a,d,O)):(xn&&y&&Cc(d),d.flags|=1,bs(a,d,f,O),d.child)}function cd(a,d,f,y,j){if(jl(d),d.stateNode===null){var O=Bu,B=f.contextType;typeof B=="object"&&B!==null&&(O=Jr(B)),O=new f(y,O),d.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=nv,d.stateNode=O,O._reactInternals=d,O=d.stateNode,O.props=y,O.state=d.memoizedState,O.refs={},ff(d),B=f.contextType,O.context=typeof B=="object"&&B!==null?Jr(B):Bu,O.state=d.memoizedState,B=f.getDerivedStateFromProps,typeof B=="function"&&(tv(d,f,B,y),O.state=d.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(B=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),B!==O.state&&nv.enqueueReplaceState(O,O.state,null),vh(d,y,O,j),yh(),O.state=d.memoizedState),typeof O.componentDidMount=="function"&&(d.flags|=4194308),y=!0}else if(a===null){O=d.stateNode;var ee=d.memoizedProps,be=Fc(f,ee);O.props=be;var Ue=O.context,We=f.contextType;B=Bu,typeof We=="object"&&We!==null&&(B=Jr(We));var rt=f.getDerivedStateFromProps;We=typeof rt=="function"||typeof O.getSnapshotBeforeUpdate=="function",ee=d.pendingProps!==ee,We||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(ee||Ue!==B)&&P0(d,O,y,B),fi=!1;var Ve=d.memoizedState;O.state=Ve,vh(d,y,O,j),yh(),Ue=d.memoizedState,ee||Ve!==Ue||fi?(typeof rt=="function"&&(tv(d,f,rt,y),Ue=d.memoizedState),(be=fi||ld(d,f,be,y,Ve,Ue,B))?(We||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(d.flags|=4194308)):(typeof O.componentDidMount=="function"&&(d.flags|=4194308),d.memoizedProps=y,d.memoizedState=Ue),O.props=y,O.state=Ue,O.context=B,y=be):(typeof O.componentDidMount=="function"&&(d.flags|=4194308),y=!1)}else{O=d.stateNode,mf(a,d),B=d.memoizedProps,We=Fc(f,B),O.props=We,rt=d.pendingProps,Ve=O.context,Ue=f.contextType,be=Bu,typeof Ue=="object"&&Ue!==null&&(be=Jr(Ue)),ee=f.getDerivedStateFromProps,(Ue=typeof ee=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(B!==rt||Ve!==be)&&P0(d,O,y,be),fi=!1,Ve=d.memoizedState,O.state=Ve,vh(d,y,O,j),yh();var Ye=d.memoizedState;B!==rt||Ve!==Ye||fi||a!==null&&a.dependencies!==null&&Rc(a.dependencies)?(typeof ee=="function"&&(tv(d,f,ee,y),Ye=d.memoizedState),(We=fi||ld(d,f,We,y,Ve,Ye,be)||a!==null&&a.dependencies!==null&&Rc(a.dependencies))?(Ue||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(y,Ye,be),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(y,Ye,be)),typeof O.componentDidUpdate=="function"&&(d.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(d.flags|=1024)):(typeof O.componentDidUpdate!="function"||B===a.memoizedProps&&Ve===a.memoizedState||(d.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ve===a.memoizedState||(d.flags|=1024),d.memoizedProps=y,d.memoizedState=Ye),O.props=y,O.state=Ye,O.context=be,y=We):(typeof O.componentDidUpdate!="function"||B===a.memoizedProps&&Ve===a.memoizedState||(d.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===a.memoizedProps&&Ve===a.memoizedState||(d.flags|=1024),y=!1)}return O=y,Of(a,d),y=(d.flags&128)!==0,O||y?(O=d.stateNode,f=y&&typeof f.getDerivedStateFromError!="function"?null:O.render(),d.flags|=1,a!==null&&y?(d.child=Pc(d,a.child,null,j),d.child=Pc(d,null,f,j)):bs(a,d,f,j),d.memoizedState=O.state,a=d.child):a=Ro(a,d,j),a}function K0(a,d,f,y){return Ka(),d.flags|=256,bs(a,d,f,y),d.child}var lv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cv(a){return{baseLanes:a,cachePool:uf()}}function uv(a,d,f){return a=a!==null?a.childLanes&~f:0,d&&(a|=$s),a}function V0(a,d,f){var y=d.pendingProps,j=!1,O=(d.flags&128)!==0,B;if((B=O)||(B=a!==null&&a.memoizedState===null?!1:(jr.current&2)!==0),B&&(j=!0,d.flags&=-129),B=(d.flags&32)!==0,d.flags&=-33,a===null){if(xn){if(j?ia(d):Ga(),(a=gr)?(a=Bl(a,hi),a=a!==null&&a.data!=="&"?a:null,a!==null&&(d.memoizedState={dehydrated:a,treeContext:wo!==null?{id:Kn,overflow:Ua}:null,retryLane:536870912,hydrationErrors:null},f=l0(a),f.return=d,d.child=f,qr=d,gr=null)):a=null,a===null)throw El(d);return sm(a)?d.lanes=32:d.lanes=536870912,null}var ee=y.children;return y=y.fallback,j?(Ga(),j=d.mode,ee=kf({mode:"hidden",children:ee},j),y=bl(y,j,f,null),ee.return=d,y.return=d,ee.sibling=y,d.child=ee,y=d.child,y.memoizedState=cv(f),y.childLanes=uv(a,B,f),d.memoizedState=lv,_l(null,y)):(ia(d),$l(d,ee))}var be=a.memoizedState;if(be!==null&&(ee=be.dehydrated,ee!==null)){if(O)d.flags&256?(ia(d),d.flags&=-257,d=Nl(a,d,f)):d.memoizedState!==null?(Ga(),d.child=a.child,d.flags|=128,d=null):(Ga(),ee=y.fallback,j=d.mode,y=kf({mode:"visible",children:y.children},j),ee=bl(ee,j,f,null),ee.flags|=2,y.return=d,ee.return=d,y.sibling=ee,d.child=y,Pc(d,a.child,null,f),y=d.child,y.memoizedState=cv(f),y.childLanes=uv(a,B,f),d.memoizedState=lv,d=_l(null,y));else if(ia(d),sm(ee)){if(B=ee.nextSibling&&ee.nextSibling.dataset,B)var Ue=B.dgst;B=Ue,y=Error(o(419)),y.stack="",y.digest=B,ph({value:y,source:null,stack:null}),d=Nl(a,d,f)}else if(Br||kc(a,d,f,!1),B=(f&a.childLanes)!==0,Br||B){if(B=lr,B!==null&&(y=ni(B,f),y!==0&&y!==be.retryLane))throw be.retryLane=y,jc(a,y),Ns(B,a,y),iv;rm(ee)||Bf(),d=Nl(a,d,f)}else rm(ee)?(d.flags|=192,d.child=a.child,d=null):(a=be.treeContext,gr=vi(ee.nextSibling),qr=d,xn=!0,Sl=null,hi=!1,a!==null&&Eo(d,a),d=$l(d,y.children),d.flags|=4096);return d}return j?(Ga(),ee=y.fallback,j=d.mode,be=a.child,Ue=be.sibling,y=li(be,{mode:"hidden",children:y.children}),y.subtreeFlags=be.subtreeFlags&65011712,Ue!==null?ee=li(Ue,ee):(ee=bl(ee,j,f,null),ee.flags|=2),ee.return=d,y.return=d,y.sibling=ee,d.child=y,_l(null,y),y=d.child,ee=a.child.memoizedState,ee===null?ee=cv(f):(j=ee.cachePool,j!==null?(be=Pr._currentValue,j=j.parent!==be?{parent:be,pool:be}:j):j=uf(),ee={baseLanes:ee.baseLanes|f,cachePool:j}),y.memoizedState=ee,y.childLanes=uv(a,B,f),d.memoizedState=lv,_l(a.child,y)):(ia(d),f=a.child,a=f.sibling,f=li(f,{mode:"visible",children:y.children}),f.return=d,f.sibling=null,a!==null&&(B=d.deletions,B===null?(d.deletions=[a],d.flags|=16):B.push(a)),d.child=f,d.memoizedState=null,f)}function $l(a,d){return d=kf({mode:"visible",children:d},a.mode),d.return=a,a.child=d}function kf(a,d){return a=oi(22,a,null,d),a.lanes=0,a}function Nl(a,d,f){return Pc(d,a.child,null,f),a=$l(d,d.pendingProps.children),a.flags|=2,d.memoizedState=null,a}function dv(a,d,f){a.lanes|=d;var y=a.alternate;y!==null&&(y.lanes|=d),xy(a.return,d,f)}function hv(a,d,f,y,j,O){var B=a.memoizedState;B===null?a.memoizedState={isBackwards:d,rendering:null,renderingStartTime:0,last:y,tail:f,tailMode:j,treeForkCount:O}:(B.isBackwards=d,B.rendering=null,B.renderingStartTime=0,B.last=y,B.tail=f,B.tailMode=j,B.treeForkCount=O)}function Oh(a,d,f){var y=d.pendingProps,j=y.revealOrder,O=y.tail;y=y.children;var B=jr.current,ee=(B&2)!==0;if(ee?(B=B&1|2,d.flags|=128):B&=1,Te(jr,B),bs(a,d,y,f),y=xn?Hu:0,!ee&&a!==null&&(a.flags&128)!==0)e:for(a=d.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&dv(a,f,d);else if(a.tag===19)dv(a,f,d);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===d)break e;for(;a.sibling===null;){if(a.return===null||a.return===d)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(j){case"forwards":for(f=d.child,j=null;f!==null;)a=f.alternate,a!==null&&yf(a)===null&&(j=f),f=f.sibling;f=j,f===null?(j=d.child,d.child=null):(j=f.sibling,f.sibling=null),hv(d,!1,j,f,O,y);break;case"backwards":case"unstable_legacy-backwards":for(f=null,j=d.child,d.child=null;j!==null;){if(a=j.alternate,a!==null&&yf(a)===null){d.child=j;break}a=j.sibling,j.sibling=f,f=j,j=a}hv(d,!0,f,null,O,y);break;case"together":hv(d,!1,null,null,void 0,y);break;default:d.memoizedState=null}return d.child}function Ro(a,d,f){if(a!==null&&(d.dependencies=a.dependencies),Wa|=d.lanes,(f&d.childLanes)===0)if(a!==null){if(kc(a,d,f,!1),(f&d.childLanes)===0)return null}else return null;if(a!==null&&d.child!==a.child)throw Error(o(153));if(d.child!==null){for(a=d.child,f=li(a,a.pendingProps),d.child=f,f.return=d;a.sibling!==null;)a=a.sibling,f=f.sibling=li(a,a.pendingProps),f.return=d;f.sibling=null}return d.child}function Rf(a,d){return(a.lanes&d)!==0?!0:(a=a.dependencies,!!(a!==null&&Rc(a)))}function pv(a,d,f){switch(d.tag){case 3:at(d,d.stateNode.containerInfo),jo(d,Pr,a.memoizedState.cache),Ka();break;case 27:case 5:Ot(d);break;case 4:at(d,d.stateNode.containerInfo);break;case 10:jo(d,d.type,d.memoizedProps.value);break;case 31:if(d.memoizedState!==null)return d.flags|=128,Ey(d),null;break;case 13:var y=d.memoizedState;if(y!==null)return y.dehydrated!==null?(ia(d),d.flags|=128,null):(f&d.child.childLanes)!==0?V0(a,d,f):(ia(d),a=Ro(a,d,f),a!==null?a.sibling:null);ia(d);break;case 19:var j=(a.flags&128)!==0;if(y=(f&d.childLanes)!==0,y||(kc(a,d,f,!1),y=(f&d.childLanes)!==0),j){if(y)return Oh(a,d,f);d.flags|=128}if(j=d.memoizedState,j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),Te(jr,jr.current),y)break;return null;case 22:return d.lanes=0,U0(a,d,f,d.pendingProps);case 24:jo(d,Pr,a.memoizedState.cache)}return Ro(a,d,f)}function H0(a,d,f){if(a!==null)if(a.memoizedProps!==d.pendingProps)Br=!0;else{if(!Rf(a,f)&&(d.flags&128)===0)return Br=!1,pv(a,d,f);Br=(a.flags&131072)!==0}else Br=!1,xn&&(d.flags&1048576)!==0&&c0(d,Hu,d.index);switch(d.lanes=0,d.tag){case 16:e:{var y=d.pendingProps;if(a=$c(d.elementType),d.type=a,typeof a=="function")nf(a)?(y=Fc(a,y),d.tag=1,d=cd(null,d,a,y,f)):(d.tag=0,d=ov(null,d,a,y,f));else{if(a!=null){var j=a.$$typeof;if(j===z){d.tag=11,d=Tl(null,d,a,y,f);break e}else if(j===Q){d.tag=14,d=q0(null,d,a,y,f);break e}}throw d=Ae(a)||a,Error(o(306,d,""))}}return d;case 0:return ov(a,d,d.type,d.pendingProps,f);case 1:return y=d.type,j=Fc(y,d.pendingProps),cd(a,d,y,j,f);case 3:e:{if(at(d,d.stateNode.containerInfo),a===null)throw Error(o(387));y=d.pendingProps;var O=d.memoizedState;j=O.element,mf(a,d),vh(d,y,null,f);var B=d.memoizedState;if(y=B.cache,jo(d,Pr,y),y!==O.cache&&Fn(d,[Pr],f,!0),yh(),y=B.element,O.isDehydrated)if(O={element:y,isDehydrated:!1,cache:B.cache},d.updateQueue.baseState=O,d.memoizedState=O,d.flags&256){d=K0(a,d,y,f);break e}else if(y!==j){j=ci(Error(o(424)),d),ph(j),d=K0(a,d,y,f);break e}else for(a=d.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,gr=vi(a.firstChild),qr=d,xn=!0,Sl=null,hi=!0,f=gh(d,null,y,f),d.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling;else{if(Ka(),y===j){d=Ro(a,d,f);break e}bs(a,d,y,f)}d=d.child}return d;case 26:return Of(a,d),a===null?(f=zS(d.type,null,d.pendingProps,null))?d.memoizedState=f:xn||(f=d.type,a=d.pendingProps,y=Vc(Ne.current).createElement(f),y[as]=d,y[zs]=a,ws(y,f,a),Zr(y),d.stateNode=y):d.memoizedState=zS(d.type,a.memoizedProps,d.pendingProps,a.memoizedState),null;case 27:return Ot(d),a===null&&xn&&(y=d.stateNode=Jv(d.type,d.pendingProps,Ne.current),qr=d,hi=!0,j=gr,ql(d.type)?(Yv=j,gr=vi(y.firstChild)):gr=j),bs(a,d,d.pendingProps.children,f),Of(a,d),a===null&&(d.flags|=4194304),d.child;case 5:return a===null&&xn&&((j=y=gr)&&(y=to(y,d.type,d.pendingProps,hi),y!==null?(d.stateNode=y,qr=d,gr=vi(y.firstChild),hi=!1,j=!0):j=!1),j||El(d)),Ot(d),j=d.type,O=d.pendingProps,B=a!==null?a.memoizedProps:null,y=O.children,Kv(j,O)?y=null:B!==null&&Kv(j,B)&&(d.flags|=32),d.memoizedState!==null&&(j=Cy(a,d,EA,null,null,f),Sd._currentValue=j),Of(a,d),bs(a,d,y,f),d.child;case 6:return a===null&&xn&&((a=f=gr)&&(f=xd(f,d.pendingProps,hi),f!==null?(d.stateNode=f,qr=d,gr=null,a=!0):a=!1),a||El(d)),null;case 13:return V0(a,d,f);case 4:return at(d,d.stateNode.containerInfo),y=d.pendingProps,a===null?d.child=Pc(d,null,y,f):bs(a,d,y,f),d.child;case 11:return Tl(a,d,d.type,d.pendingProps,f);case 7:return bs(a,d,d.pendingProps,f),d.child;case 8:return bs(a,d,d.pendingProps.children,f),d.child;case 12:return bs(a,d,d.pendingProps.children,f),d.child;case 10:return y=d.pendingProps,jo(d,d.type,y.value),bs(a,d,y.children,f),d.child;case 9:return j=d.type._context,y=d.pendingProps.children,jl(d),j=Jr(j),y=y(j),d.flags|=1,bs(a,d,y,f),d.child;case 14:return q0(a,d,d.type,d.pendingProps,f);case 15:return B0(a,d,d.type,d.pendingProps,f);case 19:return Oh(a,d,f);case 31:return kA(a,d,f);case 22:return U0(a,d,f,d.pendingProps);case 24:return jl(d),y=Jr(Pr),a===null?(j=cf(),j===null&&(j=lr,O=of(),j.pooledCache=O,O.refCount++,O!==null&&(j.pooledCacheLanes|=f),j=O),d.memoizedState={parent:y,cache:j},ff(d),jo(d,Pr,j)):((a.lanes&f)!==0&&(mf(a,d),vh(d,null,null,f),yh()),j=a.memoizedState,O=d.memoizedState,j.parent!==y?(j={parent:y,cache:y},d.memoizedState=j,d.lanes===0&&(d.memoizedState=d.updateQueue.baseState=j),jo(d,Pr,y)):(y=O.cache,jo(d,Pr,y),y!==j.cache&&Fn(d,[Pr],f,!0))),bs(a,d,d.pendingProps.children,f),d.child;case 29:throw d.pendingProps}throw Error(o(156,d.tag))}function To(a){a.flags|=4}function fv(a,d,f,y,j){if((d=(a.mode&32)!==0)&&(d=!1),d){if(a.flags|=16777216,(j&335544128)===j)if(a.stateNode.complete)a.flags|=8192;else if(Rv())a.flags|=8192;else throw Nc=hf,df}else a.flags&=-16777217}function G0(a,d){if(d.type!=="stylesheet"||(d.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!KS(d))if(Rv())a.flags|=8192;else throw Nc=hf,df}function Tf(a,d){d!==null&&(a.flags|=4),a.flags&16384&&(d=a.tag!==22?Rs():536870912,a.lanes|=d,Ml|=d)}function ud(a,d){if(!xn)switch(a.tailMode){case"hidden":d=a.tail;for(var f=null;d!==null;)d.alternate!==null&&(f=d),d=d.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var y=null;f!==null;)f.alternate!==null&&(y=f),f=f.sibling;y===null?d||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function or(a){var d=a.alternate!==null&&a.alternate.child===a.child,f=0,y=0;if(d)for(var j=a.child;j!==null;)f|=j.lanes|j.childLanes,y|=j.subtreeFlags&65011712,y|=j.flags&65011712,j.return=a,j=j.sibling;else for(j=a.child;j!==null;)f|=j.lanes|j.childLanes,y|=j.subtreeFlags,y|=j.flags,j.return=a,j=j.sibling;return a.subtreeFlags|=y,a.childLanes=f,d}function RA(a,d,f){var y=d.pendingProps;switch(So(d),d.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return or(d),null;case 1:return or(d),null;case 3:return f=d.stateNode,y=null,a!==null&&(y=a.memoizedState.cache),d.memoizedState.cache!==y&&(d.flags|=2048),pi(Pr),gt(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Gu(d)?To(d):a===null||a.memoizedState.isDehydrated&&(d.flags&256)===0||(d.flags|=1024,vy())),or(d),null;case 26:var j=d.type,O=d.memoizedState;return a===null?(To(d),O!==null?(or(d),G0(d,O)):(or(d),fv(d,j,null,y,f))):O?O!==a.memoizedState?(To(d),or(d),G0(d,O)):(or(d),d.flags&=-16777217):(a=a.memoizedProps,a!==y&&To(d),or(d),fv(d,j,a,y,f)),null;case 27:if(Lt(d),f=Ne.current,j=d.type,a!==null&&d.stateNode!=null)a.memoizedProps!==y&&To(d);else{if(!y){if(d.stateNode===null)throw Error(o(166));return or(d),null}a=Ke.current,Gu(d)?sf(d):(a=Jv(j,y,f),d.stateNode=a,To(d))}return or(d),null;case 5:if(Lt(d),j=d.type,a!==null&&d.stateNode!=null)a.memoizedProps!==y&&To(d);else{if(!y){if(d.stateNode===null)throw Error(o(166));return or(d),null}if(O=Ke.current,Gu(d))sf(d);else{var B=Vc(Ne.current);switch(O){case 1:O=B.createElementNS("http://www.w3.org/2000/svg",j);break;case 2:O=B.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;default:switch(j){case"svg":O=B.createElementNS("http://www.w3.org/2000/svg",j);break;case"math":O=B.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;case"script":O=B.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof y.is=="string"?B.createElement("select",{is:y.is}):B.createElement("select"),y.multiple?O.multiple=!0:y.size&&(O.size=y.size);break;default:O=typeof y.is=="string"?B.createElement(j,{is:y.is}):B.createElement(j)}}O[as]=d,O[zs]=y;e:for(B=d.child;B!==null;){if(B.tag===5||B.tag===6)O.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===d)break e;for(;B.sibling===null;){if(B.return===null||B.return===d)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}d.stateNode=O;e:switch(ws(O,j,y),j){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&To(d)}}return or(d),fv(d,d.type,a===null?null:a.memoizedProps,d.pendingProps,f),null;case 6:if(a&&d.stateNode!=null)a.memoizedProps!==y&&To(d);else{if(typeof y!="string"&&d.stateNode===null)throw Error(o(166));if(a=Ne.current,Gu(d)){if(a=d.stateNode,f=d.memoizedProps,y=null,j=qr,j!==null)switch(j.tag){case 27:case 5:y=j.memoizedProps}a[as]=d,a=!!(a.nodeValue===f||y!==null&&y.suppressHydrationWarning===!0||Uh(a.nodeValue,f)),a||El(d,!0)}else a=Vc(a).createTextNode(y),a[as]=d,d.stateNode=a}return or(d),null;case 31:if(f=d.memoizedState,a===null||a.memoizedState!==null){if(y=Gu(d),f!==null){if(a===null){if(!y)throw Error(o(318));if(a=d.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(557));a[as]=d}else Ka(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;or(d),a=!1}else f=vy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return d.flags&256?(Fs(d),d):(Fs(d),null);if((d.flags&128)!==0)throw Error(o(558))}return or(d),null;case 13:if(y=d.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(j=Gu(d),y!==null&&y.dehydrated!==null){if(a===null){if(!j)throw Error(o(318));if(j=d.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(o(317));j[as]=d}else Ka(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;or(d),j=!1}else j=vy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=j),j=!0;if(!j)return d.flags&256?(Fs(d),d):(Fs(d),null)}return Fs(d),(d.flags&128)!==0?(d.lanes=f,d):(f=y!==null,a=a!==null&&a.memoizedState!==null,f&&(y=d.child,j=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(j=y.alternate.memoizedState.cachePool.pool),O=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(O=y.memoizedState.cachePool.pool),O!==j&&(y.flags|=2048)),f!==a&&f&&(d.child.flags|=8192),Tf(d,d.updateQueue),or(d),null);case 4:return gt(),a===null&&Jf(d.stateNode.containerInfo),or(d),null;case 10:return pi(d.type),or(d),null;case 19:if(Oe(jr),y=d.memoizedState,y===null)return or(d),null;if(j=(d.flags&128)!==0,O=y.rendering,O===null)if(j)ud(y,!1);else{if(Ar!==0||a!==null&&(a.flags&128)!==0)for(a=d.child;a!==null;){if(O=yf(a),O!==null){for(d.flags|=128,ud(y,!1),a=O.updateQueue,d.updateQueue=a,Tf(d,a),d.subtreeFlags=0,a=f,f=d.child;f!==null;)my(f,a),f=f.sibling;return Te(jr,jr.current&1|2),xn&&di(d,y.treeForkCount),d.child}a=a.sibling}y.tail!==null&&q()>If&&(d.flags|=128,j=!0,ud(y,!1),d.lanes=4194304)}else{if(!j)if(a=yf(O),a!==null){if(d.flags|=128,j=!0,a=a.updateQueue,d.updateQueue=a,Tf(d,a),ud(y,!0),y.tail===null&&y.tailMode==="hidden"&&!O.alternate&&!xn)return or(d),null}else 2*q()-y.renderingStartTime>If&&f!==536870912&&(d.flags|=128,j=!0,ud(y,!1),d.lanes=4194304);y.isBackwards?(O.sibling=d.child,d.child=O):(a=y.last,a!==null?a.sibling=O:d.child=O,y.last=O)}return y.tail!==null?(a=y.tail,y.rendering=a,y.tail=a.sibling,y.renderingStartTime=q(),a.sibling=null,f=jr.current,Te(jr,j?f&1|2:f&1),xn&&di(d,y.treeForkCount),a):(or(d),null);case 22:case 23:return Fs(d),sd(),y=d.memoizedState!==null,a!==null?a.memoizedState!==null!==y&&(d.flags|=8192):y&&(d.flags|=8192),y?(f&536870912)!==0&&(d.flags&128)===0&&(or(d),d.subtreeFlags&6&&(d.flags|=8192)):or(d),f=d.updateQueue,f!==null&&Tf(d,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),y=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(y=d.memoizedState.cachePool.pool),y!==f&&(d.flags|=2048),a!==null&&Oe(Ol),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),d.memoizedState.cache!==f&&(d.flags|=2048),pi(Pr),or(d),null;case 25:return null;case 30:return null}throw Error(o(156,d.tag))}function mv(a,d){switch(So(d),d.tag){case 1:return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 3:return pi(Pr),gt(),a=d.flags,(a&65536)!==0&&(a&128)===0?(d.flags=a&-65537|128,d):null;case 26:case 27:case 5:return Lt(d),null;case 31:if(d.memoizedState!==null){if(Fs(d),d.alternate===null)throw Error(o(340));Ka()}return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 13:if(Fs(d),a=d.memoizedState,a!==null&&a.dehydrated!==null){if(d.alternate===null)throw Error(o(340));Ka()}return a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 19:return Oe(jr),null;case 4:return gt(),null;case 10:return pi(d.type),null;case 22:case 23:return Fs(d),sd(),a!==null&&Oe(Ol),a=d.flags,a&65536?(d.flags=a&-65537|128,d):null;case 24:return pi(Pr),null;case 25:return null;default:return null}}function X0(a,d){switch(So(d),d.tag){case 3:pi(Pr),gt();break;case 26:case 27:case 5:Lt(d);break;case 4:gt();break;case 31:d.memoizedState!==null&&Fs(d);break;case 13:Fs(d);break;case 19:Oe(jr);break;case 10:pi(d.type);break;case 22:case 23:Fs(d),sd(),a!==null&&Oe(Ol);break;case 24:pi(Pr)}}function kh(a,d){try{var f=d.updateQueue,y=f!==null?f.lastEffect:null;if(y!==null){var j=y.next;f=j;do{if((f.tag&a)===a){y=void 0;var O=f.create,B=f.inst;y=O(),B.destroy=y}f=f.next}while(f!==j)}}catch(ee){Xn(d,d.return,ee)}}function Dl(a,d,f){try{var y=d.updateQueue,j=y!==null?y.lastEffect:null;if(j!==null){var O=j.next;y=O;do{if((y.tag&a)===a){var B=y.inst,ee=B.destroy;if(ee!==void 0){B.destroy=void 0,j=d;var be=f,Ue=ee;try{Ue()}catch(We){Xn(j,be,We)}}}y=y.next}while(y!==O)}}catch(We){Xn(d,d.return,We)}}function Y0(a){var d=a.updateQueue;if(d!==null){var f=a.stateNode;try{p0(d,f)}catch(y){Xn(a,a.return,y)}}}function Z0(a,d,f){f.props=Fc(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(y){Xn(a,d,y)}}function Rh(a,d){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var y=a.stateNode;break;case 30:y=a.stateNode;break;default:y=a.stateNode}typeof f=="function"?a.refCleanup=f(y):f.current=y}}catch(j){Xn(a,d,j)}}function Ja(a,d){var f=a.ref,y=a.refCleanup;if(f!==null)if(typeof y=="function")try{y()}catch(j){Xn(a,d,j)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(j){Xn(a,d,j)}else f.current=null}function J0(a){var d=a.type,f=a.memoizedProps,y=a.stateNode;try{e:switch(d){case"button":case"input":case"select":case"textarea":f.autoFocus&&y.focus();break e;case"img":f.src?y.src=f.src:f.srcSet&&(y.srcset=f.srcSet)}}catch(j){Xn(a,a.return,j)}}function Th(a,d,f){try{var y=a.stateNode;qA(y,a.type,f,d),y[zs]=d}catch(j){Xn(a,a.return,j)}}function gv(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&ql(a.type)||a.tag===4}function yv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||gv(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&ql(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function vv(a,d,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,d?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,d):(d=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,d.appendChild(a),f=f._reactRootContainer,f!=null||d.onclick!==null||(d.onclick=ja));else if(y!==4&&(y===27&&ql(a.type)&&(f=a.stateNode,d=null),a=a.child,a!==null))for(vv(a,d,f),a=a.sibling;a!==null;)vv(a,d,f),a=a.sibling}function _f(a,d,f){var y=a.tag;if(y===5||y===6)a=a.stateNode,d?f.insertBefore(a,d):f.appendChild(a);else if(y!==4&&(y===27&&ql(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(_f(a,d,f),a=a.sibling;a!==null;)_f(a,d,f),a=a.sibling}function $f(a){var d=a.stateNode,f=a.memoizedProps;try{for(var y=a.type,j=d.attributes;j.length;)d.removeAttributeNode(j[0]);ws(d,y,f),d[as]=a,d[zs]=f}catch(O){Xn(a,a.return,O)}}var _o=!1,Ur=!1,xv=!1,W0=typeof WeakSet=="function"?WeakSet:Set,us=null;function Q0(a,d){if(a=a.containerInfo,Qf=dm,a=s0(a),sy(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var y=f.getSelection&&f.getSelection();if(y&&y.rangeCount!==0){f=y.anchorNode;var j=y.anchorOffset,O=y.focusNode;y=y.focusOffset;try{f.nodeType,O.nodeType}catch{f=null;break e}var B=0,ee=-1,be=-1,Ue=0,We=0,rt=a,Ve=null;t:for(;;){for(var Ye;rt!==f||j!==0&&rt.nodeType!==3||(ee=B+j),rt!==O||y!==0&&rt.nodeType!==3||(be=B+y),rt.nodeType===3&&(B+=rt.nodeValue.length),(Ye=rt.firstChild)!==null;)Ve=rt,rt=Ye;for(;;){if(rt===a)break t;if(Ve===f&&++Ue===j&&(ee=B),Ve===O&&++We===y&&(be=B),(Ye=rt.nextSibling)!==null)break;rt=Ve,Ve=rt.parentNode}rt=Ye}f=ee===-1||be===-1?null:{start:ee,end:be}}else f=null}f=f||{start:0,end:0}}else f=null;for(em={focusedElem:a,selectionRange:f},dm=!1,us=d;us!==null;)if(d=us,a=d.child,(d.subtreeFlags&1028)!==0&&a!==null)a.return=d,us=a;else for(;us!==null;){switch(d=us,O=d.alternate,a=d.flags,d.tag){case 0:if((a&4)!==0&&(a=d.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)j=a[f],j.ref.impl=j.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&O!==null){a=void 0,f=d,j=O.memoizedProps,O=O.memoizedState,y=f.stateNode;try{var Pt=Fc(f.type,j);a=y.getSnapshotBeforeUpdate(Pt,O),y.__reactInternalSnapshotBeforeUpdate=a}catch(Zt){Xn(f,f.return,Zt)}}break;case 3:if((a&1024)!==0){if(a=d.stateNode.containerInfo,f=a.nodeType,f===9)Xv(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Xv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(o(163))}if(a=d.sibling,a!==null){a.return=d.return,us=a;break}us=d.return}}function eS(a,d,f){var y=f.flags;switch(f.tag){case 0:case 11:case 15:$o(a,f),y&4&&kh(5,f);break;case 1:if($o(a,f),y&4)if(a=f.stateNode,d===null)try{a.componentDidMount()}catch(B){Xn(f,f.return,B)}else{var j=Fc(f.type,d.memoizedProps);d=d.memoizedState;try{a.componentDidUpdate(j,d,a.__reactInternalSnapshotBeforeUpdate)}catch(B){Xn(f,f.return,B)}}y&64&&Y0(f),y&512&&Rh(f,f.return);break;case 3:if($o(a,f),y&64&&(a=f.updateQueue,a!==null)){if(d=null,f.child!==null)switch(f.child.tag){case 27:case 5:d=f.child.stateNode;break;case 1:d=f.child.stateNode}try{p0(a,d)}catch(B){Xn(f,f.return,B)}}break;case 27:d===null&&y&4&&$f(f);case 26:case 5:$o(a,f),d===null&&y&4&&J0(f),y&512&&Rh(f,f.return);break;case 12:$o(a,f);break;case 31:$o(a,f),y&4&&nS(a,f);break;case 13:$o(a,f),y&4&&rS(a,f),y&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=MA.bind(null,f),NS(a,f))));break;case 22:if(y=f.memoizedState!==null||_o,!y){d=d!==null&&d.memoizedState!==null||Ur,j=_o;var O=Ur;_o=y,(Ur=d)&&!O?No(a,f,(f.subtreeFlags&8772)!==0):$o(a,f),_o=j,Ur=O}break;case 30:break;default:$o(a,f)}}function tS(a){var d=a.alternate;d!==null&&(a.alternate=null,tS(d)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(d=a.stateNode,d!==null&&rh(d)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var br=null,mi=!1;function Ra(a,d,f){for(f=f.child;f!==null;)Nf(a,d,f),f=f.sibling}function Nf(a,d,f){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(nn,f)}catch{}switch(f.tag){case 26:Ur||Ja(f,d),Ra(a,d,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:Ur||Ja(f,d);var y=br,j=mi;ql(f.type)&&(br=f.stateNode,mi=!1),Ra(a,d,f),Hh(f.stateNode),br=y,mi=j;break;case 5:Ur||Ja(f,d);case 6:if(y=br,j=mi,br=null,Ra(a,d,f),br=y,mi=j,br!==null)if(mi)try{(br.nodeType===9?br.body:br.nodeName==="HTML"?br.ownerDocument.body:br).removeChild(f.stateNode)}catch(O){Xn(f,d,O)}else try{br.removeChild(f.stateNode)}catch(O){Xn(f,d,O)}break;case 18:br!==null&&(mi?(a=br,$S(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),xi(a)):$S(br,f.stateNode));break;case 4:y=br,j=mi,br=f.stateNode.containerInfo,mi=!0,Ra(a,d,f),br=y,mi=j;break;case 0:case 11:case 14:case 15:Dl(2,f,d),Ur||Dl(4,f,d),Ra(a,d,f);break;case 1:Ur||(Ja(f,d),y=f.stateNode,typeof y.componentWillUnmount=="function"&&Z0(f,d,y)),Ra(a,d,f);break;case 21:Ra(a,d,f);break;case 22:Ur=(y=Ur)||f.memoizedState!==null,Ra(a,d,f),Ur=y;break;default:Ra(a,d,f)}}function nS(a,d){if(d.memoizedState===null&&(a=d.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{xi(a)}catch(f){Xn(d,d.return,f)}}}function rS(a,d){if(d.memoizedState===null&&(a=d.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{xi(a)}catch(f){Xn(d,d.return,f)}}function TA(a){switch(a.tag){case 31:case 13:case 19:var d=a.stateNode;return d===null&&(d=a.stateNode=new W0),d;case 22:return a=a.stateNode,d=a._retryCache,d===null&&(d=a._retryCache=new W0),d;default:throw Error(o(435,a.tag))}}function _h(a,d){var f=TA(a);d.forEach(function(y){if(!f.has(y)){f.add(y);var j=IA.bind(null,a,y);y.then(j,j)}})}function qs(a,d){var f=d.deletions;if(f!==null)for(var y=0;y<f.length;y++){var j=f[y],O=a,B=d,ee=B;e:for(;ee!==null;){switch(ee.tag){case 27:if(ql(ee.type)){br=ee.stateNode,mi=!1;break e}break;case 5:br=ee.stateNode,mi=!1;break e;case 3:case 4:br=ee.stateNode.containerInfo,mi=!0;break e}ee=ee.return}if(br===null)throw Error(o(160));Nf(O,B,j),br=null,mi=!1,O=j.alternate,O!==null&&(O.return=null),j.return=null}if(d.subtreeFlags&13886)for(d=d.child;d!==null;)sS(d,a),d=d.sibling}var Ni=null;function sS(a,d){var f=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:qs(d,a),gi(a),y&4&&(Dl(3,a,a.return),kh(3,a),Dl(5,a,a.return));break;case 1:qs(d,a),gi(a),y&512&&(Ur||f===null||Ja(f,f.return)),y&64&&_o&&(a=a.updateQueue,a!==null&&(y=a.callbacks,y!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?y:f.concat(y))));break;case 26:var j=Ni;if(qs(d,a),gi(a),y&512&&(Ur||f===null||Ja(f,f.return)),y&4){var O=f!==null?f.memoizedState:null;if(y=a.memoizedState,f===null)if(y===null)if(a.stateNode===null){e:{y=a.type,f=a.memoizedProps,j=j.ownerDocument||j;t:switch(y){case"title":O=j.getElementsByTagName("title")[0],(!O||O[Zi]||O[as]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=j.createElement(y),j.head.insertBefore(O,j.querySelector("head > title"))),ws(O,y,f),O[as]=a,Zr(O),y=O;break e;case"link":var B=BS("link","href",j).get(y+(f.href||""));if(B){for(var ee=0;ee<B.length;ee++)if(O=B[ee],O.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&O.getAttribute("rel")===(f.rel==null?null:f.rel)&&O.getAttribute("title")===(f.title==null?null:f.title)&&O.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){B.splice(ee,1);break t}}O=j.createElement(y),ws(O,y,f),j.head.appendChild(O);break;case"meta":if(B=BS("meta","content",j).get(y+(f.content||""))){for(ee=0;ee<B.length;ee++)if(O=B[ee],O.getAttribute("content")===(f.content==null?null:""+f.content)&&O.getAttribute("name")===(f.name==null?null:f.name)&&O.getAttribute("property")===(f.property==null?null:f.property)&&O.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&O.getAttribute("charset")===(f.charSet==null?null:f.charSet)){B.splice(ee,1);break t}}O=j.createElement(y),ws(O,y,f),j.head.appendChild(O);break;default:throw Error(o(468,y))}O[as]=a,Zr(O),y=O}a.stateNode=y}else US(j,a.type,a.stateNode);else a.stateNode=qS(j,y,a.memoizedProps);else O!==y?(O===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):O.count--,y===null?US(j,a.type,a.stateNode):qS(j,y,a.memoizedProps)):y===null&&a.stateNode!==null&&Th(a,a.memoizedProps,f.memoizedProps)}break;case 27:qs(d,a),gi(a),y&512&&(Ur||f===null||Ja(f,f.return)),f!==null&&y&4&&Th(a,a.memoizedProps,f.memoizedProps);break;case 5:if(qs(d,a),gi(a),y&512&&(Ur||f===null||Ja(f,f.return)),a.flags&32){j=a.stateNode;try{Ru(j,"")}catch(Pt){Xn(a,a.return,Pt)}}y&4&&a.stateNode!=null&&(j=a.memoizedProps,Th(a,j,f!==null?f.memoizedProps:j)),y&1024&&(xv=!0);break;case 6:if(qs(d,a),gi(a),y&4){if(a.stateNode===null)throw Error(o(162));y=a.memoizedProps,f=a.stateNode;try{f.nodeValue=y}catch(Pt){Xn(a,a.return,Pt)}}break;case 3:if(om=null,j=Ni,Ni=im(d.containerInfo),qs(d,a),Ni=j,gi(a),y&4&&f!==null&&f.memoizedState.isDehydrated)try{xi(d.containerInfo)}catch(Pt){Xn(a,a.return,Pt)}xv&&(xv=!1,bv(a));break;case 4:y=Ni,Ni=im(a.stateNode.containerInfo),qs(d,a),gi(a),Ni=y;break;case 12:qs(d,a),gi(a);break;case 31:qs(d,a),gi(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,_h(a,y)));break;case 13:qs(d,a),gi(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Mh=q()),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,_h(a,y)));break;case 22:j=a.memoizedState!==null;var be=f!==null&&f.memoizedState!==null,Ue=_o,We=Ur;if(_o=Ue||j,Ur=We||be,qs(d,a),Ur=We,_o=Ue,gi(a),y&8192)e:for(d=a.stateNode,d._visibility=j?d._visibility&-2:d._visibility|1,j&&(f===null||be||_o||Ur||qc(a)),f=null,d=a;;){if(d.tag===5||d.tag===26){if(f===null){be=f=d;try{if(O=be.stateNode,j)B=O.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{ee=be.stateNode;var rt=be.memoizedProps.style,Ve=rt!=null&&rt.hasOwnProperty("display")?rt.display:null;ee.style.display=Ve==null||typeof Ve=="boolean"?"":(""+Ve).trim()}}catch(Pt){Xn(be,be.return,Pt)}}}else if(d.tag===6){if(f===null){be=d;try{be.stateNode.nodeValue=j?"":be.memoizedProps}catch(Pt){Xn(be,be.return,Pt)}}}else if(d.tag===18){if(f===null){be=d;try{var Ye=be.stateNode;j?nm(Ye,!0):nm(be.stateNode,!1)}catch(Pt){Xn(be,be.return,Pt)}}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===a)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===a)break e;for(;d.sibling===null;){if(d.return===null||d.return===a)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}y&4&&(y=a.updateQueue,y!==null&&(f=y.retryQueue,f!==null&&(y.retryQueue=null,_h(a,f))));break;case 19:qs(d,a),gi(a),y&4&&(y=a.updateQueue,y!==null&&(a.updateQueue=null,_h(a,y)));break;case 30:break;case 21:break;default:qs(d,a),gi(a)}}function gi(a){var d=a.flags;if(d&2){try{for(var f,y=a.return;y!==null;){if(gv(y)){f=y;break}y=y.return}if(f==null)throw Error(o(160));switch(f.tag){case 27:var j=f.stateNode,O=yv(a);_f(a,O,j);break;case 5:var B=f.stateNode;f.flags&32&&(Ru(B,""),f.flags&=-33);var ee=yv(a);_f(a,ee,B);break;case 3:case 4:var be=f.stateNode.containerInfo,Ue=yv(a);vv(a,Ue,be);break;default:throw Error(o(161))}}catch(We){Xn(a,a.return,We)}a.flags&=-3}d&4096&&(a.flags&=-4097)}function bv(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var d=a;bv(d),d.tag===5&&d.flags&1024&&d.stateNode.reset(),a=a.sibling}}function $o(a,d){if(d.subtreeFlags&8772)for(d=d.child;d!==null;)eS(a,d.alternate,d),d=d.sibling}function qc(a){for(a=a.child;a!==null;){var d=a;switch(d.tag){case 0:case 11:case 14:case 15:Dl(4,d,d.return),qc(d);break;case 1:Ja(d,d.return);var f=d.stateNode;typeof f.componentWillUnmount=="function"&&Z0(d,d.return,f),qc(d);break;case 27:Hh(d.stateNode);case 26:case 5:Ja(d,d.return),qc(d);break;case 22:d.memoizedState===null&&qc(d);break;case 30:qc(d);break;default:qc(d)}a=a.sibling}}function No(a,d,f){for(f=f&&(d.subtreeFlags&8772)!==0,d=d.child;d!==null;){var y=d.alternate,j=a,O=d,B=O.flags;switch(O.tag){case 0:case 11:case 15:No(j,O,f),kh(4,O);break;case 1:if(No(j,O,f),y=O,j=y.stateNode,typeof j.componentDidMount=="function")try{j.componentDidMount()}catch(Ue){Xn(y,y.return,Ue)}if(y=O,j=y.updateQueue,j!==null){var ee=y.stateNode;try{var be=j.shared.hiddenCallbacks;if(be!==null)for(j.shared.hiddenCallbacks=null,j=0;j<be.length;j++)gf(be[j],ee)}catch(Ue){Xn(y,y.return,Ue)}}f&&B&64&&Y0(O),Rh(O,O.return);break;case 27:$f(O);case 26:case 5:No(j,O,f),f&&y===null&&B&4&&J0(O),Rh(O,O.return);break;case 12:No(j,O,f);break;case 31:No(j,O,f),f&&B&4&&nS(j,O);break;case 13:No(j,O,f),f&&B&4&&rS(j,O);break;case 22:O.memoizedState===null&&No(j,O,f),Rh(O,O.return);break;case 30:break;default:No(j,O,f)}d=d.sibling}}function wv(a,d){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(a=d.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&Yu(f))}function Sv(a,d){a=null,d.alternate!==null&&(a=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==a&&(d.refCount++,a!=null&&Yu(a))}function Ta(a,d,f,y){if(d.subtreeFlags&10256)for(d=d.child;d!==null;)Ev(a,d,f,y),d=d.sibling}function Ev(a,d,f,y){var j=d.flags;switch(d.tag){case 0:case 11:case 15:Ta(a,d,f,y),j&2048&&kh(9,d);break;case 1:Ta(a,d,f,y);break;case 3:Ta(a,d,f,y),j&2048&&(a=null,d.alternate!==null&&(a=d.alternate.memoizedState.cache),d=d.memoizedState.cache,d!==a&&(d.refCount++,a!=null&&Yu(a)));break;case 12:if(j&2048){Ta(a,d,f,y),a=d.stateNode;try{var O=d.memoizedProps,B=O.id,ee=O.onPostCommit;typeof ee=="function"&&ee(B,d.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(be){Xn(d,d.return,be)}}else Ta(a,d,f,y);break;case 31:Ta(a,d,f,y);break;case 13:Ta(a,d,f,y);break;case 23:break;case 22:O=d.stateNode,B=d.alternate,d.memoizedState!==null?O._visibility&2?Ta(a,d,f,y):$h(a,d):O._visibility&2?Ta(a,d,f,y):(O._visibility|=2,dd(a,d,f,y,(d.subtreeFlags&10256)!==0||!1)),j&2048&&wv(B,d);break;case 24:Ta(a,d,f,y),j&2048&&Sv(d.alternate,d);break;default:Ta(a,d,f,y)}}function dd(a,d,f,y,j){for(j=j&&((d.subtreeFlags&10256)!==0||!1),d=d.child;d!==null;){var O=a,B=d,ee=f,be=y,Ue=B.flags;switch(B.tag){case 0:case 11:case 15:dd(O,B,ee,be,j),kh(8,B);break;case 23:break;case 22:var We=B.stateNode;B.memoizedState!==null?We._visibility&2?dd(O,B,ee,be,j):$h(O,B):(We._visibility|=2,dd(O,B,ee,be,j)),j&&Ue&2048&&wv(B.alternate,B);break;case 24:dd(O,B,ee,be,j),j&&Ue&2048&&Sv(B.alternate,B);break;default:dd(O,B,ee,be,j)}d=d.sibling}}function $h(a,d){if(d.subtreeFlags&10256)for(d=d.child;d!==null;){var f=a,y=d,j=y.flags;switch(y.tag){case 22:$h(f,y),j&2048&&wv(y.alternate,y);break;case 24:$h(f,y),j&2048&&Sv(y.alternate,y);break;default:$h(f,y)}d=d.sibling}}var Nh=8192;function Bc(a,d,f){if(a.subtreeFlags&Nh)for(a=a.child;a!==null;)jv(a,d,f),a=a.sibling}function jv(a,d,f){switch(a.tag){case 26:Bc(a,d,f),a.flags&Nh&&a.memoizedState!==null&&VS(f,Ni,a.memoizedState,a.memoizedProps);break;case 5:Bc(a,d,f);break;case 3:case 4:var y=Ni;Ni=im(a.stateNode.containerInfo),Bc(a,d,f),Ni=y;break;case 22:a.memoizedState===null&&(y=a.alternate,y!==null&&y.memoizedState!==null?(y=Nh,Nh=16777216,Bc(a,d,f),Nh=y):Bc(a,d,f));break;default:Bc(a,d,f)}}function iS(a){var d=a.alternate;if(d!==null&&(a=d.child,a!==null)){d.child=null;do d=a.sibling,a.sibling=null,a=d;while(a!==null)}}function Dh(a){var d=a.deletions;if((a.flags&16)!==0){if(d!==null)for(var f=0;f<d.length;f++){var y=d[f];us=y,oS(y,a)}iS(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)aS(a),a=a.sibling}function aS(a){switch(a.tag){case 0:case 11:case 15:Dh(a),a.flags&2048&&Dl(9,a,a.return);break;case 3:Dh(a);break;case 12:Dh(a);break;case 22:var d=a.stateNode;a.memoizedState!==null&&d._visibility&2&&(a.return===null||a.return.tag!==13)?(d._visibility&=-3,Df(a)):Dh(a);break;default:Dh(a)}}function Df(a){var d=a.deletions;if((a.flags&16)!==0){if(d!==null)for(var f=0;f<d.length;f++){var y=d[f];us=y,oS(y,a)}iS(a)}for(a=a.child;a!==null;){switch(d=a,d.tag){case 0:case 11:case 15:Dl(8,d,d.return),Df(d);break;case 22:f=d.stateNode,f._visibility&2&&(f._visibility&=-3,Df(d));break;default:Df(d)}a=a.sibling}}function oS(a,d){for(;us!==null;){var f=us;switch(f.tag){case 0:case 11:case 15:Dl(8,f,d);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var y=f.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:Yu(f.memoizedState.cache)}if(y=f.child,y!==null)y.return=f,us=y;else e:for(f=a;us!==null;){y=us;var j=y.sibling,O=y.return;if(tS(y),y===f){us=null;break e}if(j!==null){j.return=O,us=j;break e}us=O}}}var _A={getCacheForType:function(a){var d=Jr(Pr),f=d.data.get(a);return f===void 0&&(f=a(),d.data.set(a,f)),f},cacheSignal:function(){return Jr(Pr).controller.signal}},$A=typeof WeakMap=="function"?WeakMap:Map,Hn=0,lr=null,yn=null,kn=0,Jn=0,Di=null,Do=!1,hd=!1,Cv=!1,Po=0,Ar=0,Wa=0,Pl=0,Pf=0,$s=0,Ml=0,Ph=null,yi=null,Mf=!1,Mh=0,lS=0,If=1/0,Ih=null,Il=null,Wr=0,zl=null,pd=null,Mo=0,zf=0,Lf=null,Uc=null,zh=0,Av=null;function Pi(){return(Hn&2)!==0&&kn!==0?kn&-kn:ue.T!==null?zv():Eu()}function Ov(){if($s===0)if((kn&536870912)===0||xn){var a=wu;wu<<=1,(wu&3932160)===0&&(wu=262144),$s=a}else $s=536870912;return a=$i.current,a!==null&&(a.flags|=32),$s}function Ns(a,d,f){(a===lr&&(Jn===2||Jn===9)||a.cancelPendingCommit!==null)&&(Fl(a,0),Ll(a,kn,$s,!1)),Er(a,f),((Hn&2)===0||a!==lr)&&(a===lr&&((Hn&2)===0&&(Pl|=f),Ar===4&&Ll(a,kn,$s,!1)),Qa(a))}function cS(a,d,f){if((Hn&6)!==0)throw Error(o(327));var y=!f&&(d&127)===0&&(d&a.expiredLanes)===0||xr(a,d),j=y?DA(a,d):Uf(a,d,!0),O=y;do{if(j===0){hd&&!y&&Ll(a,d,0,!1);break}else{if(f=a.current.alternate,O&&!Ff(f)){j=Uf(a,d,!1),O=!1;continue}if(j===2){if(O=d,a.errorRecoveryDisabledLanes&O)var B=0;else B=a.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){d=B;e:{var ee=a;j=Ph;var be=ee.current.memoizedState.isDehydrated;if(be&&(Fl(ee,B).flags|=256),B=Uf(ee,B,!1),B!==2){if(Cv&&!be){ee.errorRecoveryDisabledLanes|=O,Pl|=O,j=4;break e}O=yi,yi=j,O!==null&&(yi===null?yi=O:yi.push.apply(yi,O))}j=B}if(O=!1,j!==2)continue}}if(j===1){Fl(a,0),Ll(a,d,0,!0);break}e:{switch(y=a,O=j,O){case 0:case 1:throw Error(o(345));case 4:if((d&4194048)!==d)break;case 6:Ll(y,d,$s,!Do);break e;case 2:yi=null;break;case 3:case 5:break;default:throw Error(o(329))}if((d&62914560)===d&&(j=Mh+300-q(),10<j)){if(Ll(y,d,$s,!Do),qt(y,0,!0)!==0)break e;Mo=d,y.timeoutHandle=Vv(uS.bind(null,y,f,yi,Ih,Mf,d,$s,Pl,Ml,Do,O,"Throttled",-0,0),j);break e}uS(y,f,yi,Ih,Mf,d,$s,Pl,Ml,Do,O,null,-0,0)}}break}while(!0);Qa(a)}function uS(a,d,f,y,j,O,B,ee,be,Ue,We,rt,Ve,Ye){if(a.timeoutHandle=-1,rt=d.subtreeFlags,rt&8192||(rt&16785408)===16785408){rt={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ja},jv(d,O,rt);var Pt=(O&62914560)===O?Mh-q():(O&4194048)===O?lS-q():0;if(Pt=WA(rt,Pt),Pt!==null){Mo=O,a.cancelPendingCommit=Pt(gS.bind(null,a,d,O,f,y,j,B,ee,be,We,rt,null,Ve,Ye)),Ll(a,O,B,!Ue);return}}gS(a,d,O,f,y,j,B,ee,be)}function Ff(a){for(var d=a;;){var f=d.tag;if((f===0||f===11||f===15)&&d.flags&16384&&(f=d.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var y=0;y<f.length;y++){var j=f[y],O=j.getSnapshot;j=j.value;try{if(!ai(O(),j))return!1}catch{return!1}}if(f=d.child,d.subtreeFlags&16384&&f!==null)f.return=d,d=f;else{if(d===a)break;for(;d.sibling===null;){if(d.return===null||d.return===a)return!0;d=d.return}d.sibling.return=d.return,d=d.sibling}}return!0}function Ll(a,d,f,y){d&=~Pf,d&=~Pl,a.suspendedLanes|=d,a.pingedLanes&=~d,y&&(a.warmLanes|=d),y=a.expirationTimes;for(var j=d;0<j;){var O=31-is(j),B=1<<O;y[O]=-1,j&=~B}f!==0&&hl(a,f,d)}function qf(){return(Hn&6)===0?(md(0),!1):!0}function kv(){if(yn!==null){if(Jn===0)var a=yn.return;else a=yn,Va=Oc=null,Ty(a),Wu=null,Dc=0,a=yn;for(;a!==null;)X0(a.alternate,a),a=a.return;yn=null}}function Fl(a,d){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,KA(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),Mo=0,kv(),lr=a,yn=f=li(a.current,null),kn=d,Jn=0,Di=null,Do=!1,hd=xr(a,d),Cv=!1,Ml=$s=Pf=Pl=Wa=Ar=0,yi=Ph=null,Mf=!1,(d&8)!==0&&(d|=d&32);var y=a.entangledLanes;if(y!==0)for(a=a.entanglements,y&=d;0<y;){var j=31-is(y),O=1<<j;d|=a[j],y&=~O}return Po=d,Qp(),f}function dS(a,d){rn=null,ue.H=Ah,d===_c||d===Ju?(d=pf(),Jn=3):d===df?(d=pf(),Jn=4):Jn=d===iv?8:d!==null&&typeof d=="object"&&typeof d.then=="function"?6:1,Di=d,yn===null&&(Ar=1,jf(a,ci(d,a.current)))}function Rv(){var a=$i.current;return a===null?!0:(kn&4194048)===kn?sa===null:(kn&62914560)===kn||(kn&536870912)!==0?a===sa:!1}function hS(){var a=ue.H;return ue.H=Ah,a===null?Ah:a}function pS(){var a=ue.A;return ue.A=_A,a}function Bf(){Ar=4,Do||(kn&4194048)!==kn&&$i.current!==null||(hd=!0),(Wa&134217727)===0&&(Pl&134217727)===0||lr===null||Ll(lr,kn,$s,!1)}function Uf(a,d,f){var y=Hn;Hn|=2;var j=hS(),O=pS();(lr!==a||kn!==d)&&(Ih=null,Fl(a,d)),d=!1;var B=Ar;e:do try{if(Jn!==0&&yn!==null){var ee=yn,be=Di;switch(Jn){case 8:kv(),B=6;break e;case 3:case 2:case 9:case 6:$i.current===null&&(d=!0);var Ue=Jn;if(Jn=0,Di=null,fd(a,ee,be,Ue),f&&hd){B=0;break e}break;default:Ue=Jn,Jn=0,Di=null,fd(a,ee,be,Ue)}}NA(),B=Ar;break}catch(We){dS(a,We)}while(!0);return d&&a.shellSuspendCounter++,Va=Oc=null,Hn=y,ue.H=j,ue.A=O,yn===null&&(lr=null,kn=0,Qp()),B}function NA(){for(;yn!==null;)fS(yn)}function DA(a,d){var f=Hn;Hn|=2;var y=hS(),j=pS();lr!==a||kn!==d?(Ih=null,If=q()+500,Fl(a,d)):hd=xr(a,d);e:do try{if(Jn!==0&&yn!==null){d=yn;var O=Di;t:switch(Jn){case 1:Jn=0,Di=null,fd(a,d,O,1);break;case 2:case 9:if(na(O)){Jn=0,Di=null,mS(d);break}d=function(){Jn!==2&&Jn!==9||lr!==a||(Jn=7),Qa(a)},O.then(d,d);break e;case 3:Jn=7;break e;case 4:Jn=5;break e;case 7:na(O)?(Jn=0,Di=null,mS(d)):(Jn=0,Di=null,fd(a,d,O,7));break;case 5:var B=null;switch(yn.tag){case 26:B=yn.memoizedState;case 5:case 27:var ee=yn;if(B?KS(B):ee.stateNode.complete){Jn=0,Di=null;var be=ee.sibling;if(be!==null)yn=be;else{var Ue=ee.return;Ue!==null?(yn=Ue,Kf(Ue)):yn=null}break t}}Jn=0,Di=null,fd(a,d,O,5);break;case 6:Jn=0,Di=null,fd(a,d,O,6);break;case 8:kv(),Ar=6;break e;default:throw Error(o(462))}}PA();break}catch(We){dS(a,We)}while(!0);return Va=Oc=null,ue.H=y,ue.A=j,Hn=f,yn!==null?0:(lr=null,kn=0,Qp(),Ar)}function PA(){for(;yn!==null&&!Me();)fS(yn)}function fS(a){var d=H0(a.alternate,a,Po);a.memoizedProps=a.pendingProps,d===null?Kf(a):yn=d}function mS(a){var d=a,f=d.alternate;switch(d.tag){case 15:case 0:d=ko(f,d,d.pendingProps,d.type,void 0,kn);break;case 11:d=ko(f,d,d.pendingProps,d.type.render,d.ref,kn);break;case 5:Ty(d);default:X0(f,d),d=yn=my(d,Po),d=H0(f,d,Po)}a.memoizedProps=a.pendingProps,d===null?Kf(a):yn=d}function fd(a,d,f,y){Va=Oc=null,Ty(d),Wu=null,Dc=0;var j=d.return;try{if(F0(a,j,d,f,kn)){Ar=1,jf(a,ci(f,a.current)),yn=null;return}}catch(O){if(j!==null)throw yn=j,O;Ar=1,jf(a,ci(f,a.current)),yn=null;return}d.flags&32768?(xn||y===1?a=!0:hd||(kn&536870912)!==0?a=!1:(Do=a=!0,(y===2||y===9||y===3||y===6)&&(y=$i.current,y!==null&&y.tag===13&&(y.flags|=16384))),Tv(d,a)):Kf(d)}function Kf(a){var d=a;do{if((d.flags&32768)!==0){Tv(d,Do);return}a=d.return;var f=RA(d.alternate,d,Po);if(f!==null){yn=f;return}if(d=d.sibling,d!==null){yn=d;return}yn=d=a}while(d!==null);Ar===0&&(Ar=5)}function Tv(a,d){do{var f=mv(a.alternate,a);if(f!==null){f.flags&=32767,yn=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!d&&(a=a.sibling,a!==null)){yn=a;return}yn=a=f}while(a!==null);Ar=6,yn=null}function gS(a,d,f,y,j,O,B,ee,be){a.cancelPendingCommit=null;do Vf();while(Wr!==0);if((Hn&6)!==0)throw Error(o(327));if(d!==null){if(d===a.current)throw Error(o(177));if(O=d.lanes|d.childLanes,O|=py,ti(a,f,O,B,ee,be),a===lr&&(yn=lr=null,kn=0),pd=d,zl=a,Mo=f,zf=O,Lf=j,Uc=y,(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,Dv(Re,function(){return _v(),null})):(a.callbackNode=null,a.callbackPriority=0),y=(d.flags&13878)!==0,(d.subtreeFlags&13878)!==0||y){y=ue.T,ue.T=null,j=ne.p,ne.p=2,B=Hn,Hn|=4;try{Q0(a,d,f)}finally{Hn=B,ne.p=j,ue.T=y}}Wr=1,yS(),vS(),xS()}}function yS(){if(Wr===1){Wr=0;var a=zl,d=pd,f=(d.flags&13878)!==0;if((d.subtreeFlags&13878)!==0||f){f=ue.T,ue.T=null;var y=ne.p;ne.p=2;var j=Hn;Hn|=4;try{sS(d,a);var O=em,B=s0(a.containerInfo),ee=O.focusedElem,be=O.selectionRange;if(B!==ee&&ee&&ee.ownerDocument&&r0(ee.ownerDocument.documentElement,ee)){if(be!==null&&sy(ee)){var Ue=be.start,We=be.end;if(We===void 0&&(We=Ue),"selectionStart"in ee)ee.selectionStart=Ue,ee.selectionEnd=Math.min(We,ee.value.length);else{var rt=ee.ownerDocument||document,Ve=rt&&rt.defaultView||window;if(Ve.getSelection){var Ye=Ve.getSelection(),Pt=ee.textContent.length,Zt=Math.min(be.start,Pt),Qn=be.end===void 0?Zt:Math.min(be.end,Pt);!Ye.extend&&Zt>Qn&&(B=Qn,Qn=Zt,Zt=B);var De=n0(ee,Zt),Ce=n0(ee,Qn);if(De&&Ce&&(Ye.rangeCount!==1||Ye.anchorNode!==De.node||Ye.anchorOffset!==De.offset||Ye.focusNode!==Ce.node||Ye.focusOffset!==Ce.offset)){var Ie=rt.createRange();Ie.setStart(De.node,De.offset),Ye.removeAllRanges(),Zt>Qn?(Ye.addRange(Ie),Ye.extend(Ce.node,Ce.offset)):(Ie.setEnd(Ce.node,Ce.offset),Ye.addRange(Ie))}}}}for(rt=[],Ye=ee;Ye=Ye.parentNode;)Ye.nodeType===1&&rt.push({element:Ye,left:Ye.scrollLeft,top:Ye.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;ee<rt.length;ee++){var nt=rt[ee];nt.element.scrollLeft=nt.left,nt.element.scrollTop=nt.top}}dm=!!Qf,em=Qf=null}finally{Hn=j,ne.p=y,ue.T=f}}a.current=d,Wr=2}}function vS(){if(Wr===2){Wr=0;var a=zl,d=pd,f=(d.flags&8772)!==0;if((d.subtreeFlags&8772)!==0||f){f=ue.T,ue.T=null;var y=ne.p;ne.p=2;var j=Hn;Hn|=4;try{eS(a,d.alternate,d)}finally{Hn=j,ne.p=y,ue.T=f}}Wr=3}}function xS(){if(Wr===4||Wr===3){Wr=0,_();var a=zl,d=pd,f=Mo,y=Uc;(d.subtreeFlags&10256)!==0||(d.flags&10256)!==0?Wr=5:(Wr=0,pd=zl=null,bS(a,a.pendingLanes));var j=a.pendingLanes;if(j===0&&(Il=null),wa(f),d=d.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(nn,d,void 0,(d.current.flags&128)===128)}catch{}if(y!==null){d=ue.T,j=ne.p,ne.p=2,ue.T=null;try{for(var O=a.onRecoverableError,B=0;B<y.length;B++){var ee=y[B];O(ee.value,{componentStack:ee.stack})}}finally{ue.T=d,ne.p=j}}(Mo&3)!==0&&Vf(),Qa(a),j=a.pendingLanes,(f&261930)!==0&&(j&42)!==0?a===Av?zh++:(zh=0,Av=a):zh=0,md(0)}}function bS(a,d){(a.pooledCacheLanes&=d)===0&&(d=a.pooledCache,d!=null&&(a.pooledCache=null,Yu(d)))}function Vf(){return yS(),vS(),xS(),_v()}function _v(){if(Wr!==5)return!1;var a=zl,d=zf;zf=0;var f=wa(Mo),y=ue.T,j=ne.p;try{ne.p=32>f?32:f,ue.T=null,f=Lf,Lf=null;var O=zl,B=Mo;if(Wr=0,pd=zl=null,Mo=0,(Hn&6)!==0)throw Error(o(331));var ee=Hn;if(Hn|=4,aS(O.current),Ev(O,O.current,B,f),Hn=ee,md(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(nn,O)}catch{}return!0}finally{ne.p=j,ue.T=y,bS(a,d)}}function wS(a,d,f){d=ci(f,d),d=rv(a.stateNode,d,2),a=kl(a,d,2),a!==null&&(Er(a,2),Qa(a))}function Xn(a,d,f){if(a.tag===3)wS(a,a,f);else for(;d!==null;){if(d.tag===3){wS(d,a,f);break}else if(d.tag===1){var y=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Il===null||!Il.has(y))){a=ci(f,a),f=sv(2),y=kl(d,f,2),y!==null&&(Rl(f,y,d,a),Er(y,2),Qa(y));break}}d=d.return}}function $v(a,d,f){var y=a.pingCache;if(y===null){y=a.pingCache=new $A;var j=new Set;y.set(d,j)}else j=y.get(d),j===void 0&&(j=new Set,y.set(d,j));j.has(f)||(Cv=!0,j.add(f),a=Hf.bind(null,a,d,f),d.then(a,a))}function Hf(a,d,f){var y=a.pingCache;y!==null&&y.delete(d),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,lr===a&&(kn&f)===f&&(Ar===4||Ar===3&&(kn&62914560)===kn&&300>q()-Mh?(Hn&2)===0&&Fl(a,0):Pf|=f,Ml===kn&&(Ml=0)),Qa(a)}function Nv(a,d){d===0&&(d=Rs()),a=jc(a,d),a!==null&&(Er(a,d),Qa(a))}function MA(a){var d=a.memoizedState,f=0;d!==null&&(f=d.retryLane),Nv(a,f)}function IA(a,d){var f=0;switch(a.tag){case 31:case 13:var y=a.stateNode,j=a.memoizedState;j!==null&&(f=j.retryLane);break;case 19:y=a.stateNode;break;case 22:y=a.stateNode._retryCache;break;default:throw Error(o(314))}y!==null&&y.delete(d),Nv(a,f)}function Dv(a,d){return Oi(a,d)}var Gf=null,Kc=null,Pv=!1,Xf=!1,Mv=!1,_a=0;function Qa(a){a!==Kc&&a.next===null&&(Kc===null?Gf=Kc=a:Kc=Kc.next=a),Xf=!0,Pv||(Pv=!0,zA())}function md(a,d){if(!Mv&&Xf){Mv=!0;do for(var f=!1,y=Gf;y!==null;){if(a!==0){var j=y.pendingLanes;if(j===0)var O=0;else{var B=y.suspendedLanes,ee=y.pingedLanes;O=(1<<31-is(42|a)+1)-1,O&=j&~(B&~ee),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(f=!0,jS(y,O))}else O=kn,O=qt(y,y===lr?O:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(O&3)===0||xr(y,O)||(f=!0,jS(y,O));y=y.next}while(f);Mv=!1}}function Iv(){Yf()}function Yf(){Xf=Pv=!1;var a=0;_a!==0&&UA()&&(a=_a);for(var d=q(),f=null,y=Gf;y!==null;){var j=y.next,O=SS(y,d);O===0?(y.next=null,f===null?Gf=j:f.next=j,j===null&&(Kc=f)):(f=y,(a!==0||(O&3)!==0)&&(Xf=!0)),y=j}Wr!==0&&Wr!==5||md(a),_a!==0&&(_a=0)}function SS(a,d){for(var f=a.suspendedLanes,y=a.pingedLanes,j=a.expirationTimes,O=a.pendingLanes&-62914561;0<O;){var B=31-is(O),ee=1<<B,be=j[B];be===-1?((ee&f)===0||(ee&y)!==0)&&(j[B]=Yr(ee,d)):be<=d&&(a.expiredLanes|=ee),O&=~ee}if(d=lr,f=kn,f=qt(a,a===d?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y=a.callbackNode,f===0||a===d&&(Jn===2||Jn===9)||a.cancelPendingCommit!==null)return y!==null&&y!==null&&ge(y),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||xr(a,f)){if(d=f&-f,d===a.callbackPriority)return d;switch(y!==null&&ge(y),wa(f)){case 2:case 8:f=ve;break;case 32:f=Re;break;case 268435456:f=Tt;break;default:f=Re}return y=ES.bind(null,a),f=Oi(f,y),a.callbackPriority=d,a.callbackNode=f,d}return y!==null&&y!==null&&ge(y),a.callbackPriority=2,a.callbackNode=null,2}function ES(a,d){if(Wr!==0&&Wr!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(Vf()&&a.callbackNode!==f)return null;var y=kn;return y=qt(a,a===lr?y:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),y===0?null:(cS(a,y,d),SS(a,q()),a.callbackNode!=null&&a.callbackNode===f?ES.bind(null,a):null)}function jS(a,d){if(Vf())return null;cS(a,d,!0)}function zA(){Hv(function(){(Hn&6)!==0?Oi(oe,Iv):Yf()})}function zv(){if(_a===0){var a=Al;a===0&&(a=pc,pc<<=1,(pc&261888)===0&&(pc=256)),_a=a}return _a}function Lh(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:oh(""+a)}function CS(a,d){var f=d.ownerDocument.createElement("input");return f.name=d.name,f.value=d.value,a.id&&f.setAttribute("form",a.id),d.parentNode.insertBefore(f,d),a=new FormData(a),f.parentNode.removeChild(f),a}function gd(a,d,f,y,j){if(d==="submit"&&f&&f.stateNode===j){var O=Lh((j[zs]||null).action),B=y.submitter;B&&(d=(d=B[zs]||null)?Lh(d.formAction):B.getAttribute("formAction"),d!==null&&(O=d,B=null));var ee=new ch("action","action",null,y,j);a.push({event:ee,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(_a!==0){var be=B?CS(j,B):new FormData(j);Zy(f,{pending:!0,data:be,method:j.method,action:O},null,be)}}else typeof O=="function"&&(ee.preventDefault(),be=B?CS(j,B):new FormData(j),Zy(f,{pending:!0,data:be,method:j.method,action:O},O,be))},currentTarget:j}]})}}for(var Fh=0;Fh<hy.length;Fh++){var Lv=hy[Fh],LA=Lv.toLowerCase(),FA=Lv[0].toUpperCase()+Lv.slice(1);Oa(LA,"on"+FA)}Oa(ly,"onAnimationEnd"),Oa(cy,"onAnimationIteration"),Oa(uy,"onAnimationStart"),Oa("dblclick","onDoubleClick"),Oa("focusin","onFocus"),Oa("focusout","onBlur"),Oa(bo,"onTransitionRun"),Oa(SA,"onTransitionStart"),Oa(dy,"onTransitionCancel"),Oa(Wp,"onTransitionEnd"),Ri("onMouseEnter",["mouseout","mouseover"]),Ri("onMouseLeave",["mouseout","mouseover"]),Ri("onPointerEnter",["pointerout","pointerover"]),Ri("onPointerLeave",["pointerout","pointerover"]),sr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),sr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),sr("onBeforeInput",["compositionend","keypress","textInput","paste"]),sr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),sr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yd="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(" "),AS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yd));function OS(a,d){d=(d&4)!==0;for(var f=0;f<a.length;f++){var y=a[f],j=y.event;y=y.listeners;e:{var O=void 0;if(d)for(var B=y.length-1;0<=B;B--){var ee=y[B],be=ee.instance,Ue=ee.currentTarget;if(ee=ee.listener,be!==O&&j.isPropagationStopped())break e;O=ee,j.currentTarget=Ue;try{O(j)}catch(We){Ec(We)}j.currentTarget=null,O=be}else for(B=0;B<y.length;B++){if(ee=y[B],be=ee.instance,Ue=ee.currentTarget,ee=ee.listener,be!==O&&j.isPropagationStopped())break e;O=ee,j.currentTarget=Ue;try{O(j)}catch(We){Ec(We)}j.currentTarget=null,O=be}}}}function jn(a,d){var f=d[Yt];f===void 0&&(f=d[Yt]=new Set);var y=a+"__bubble";f.has(y)||(kS(d,a,2,!1),f.add(y))}function Zf(a,d,f){var y=0;d&&(y|=4),kS(f,a,y,d)}var qh="_reactListening"+Math.random().toString(36).slice(2);function Jf(a){if(!a[qh]){a[qh]=!0,yt.forEach(function(f){f!=="selectionchange"&&(AS.has(f)||Zf(f,!1,a),Zf(f,!0,a))});var d=a.nodeType===9?a:a.ownerDocument;d===null||d[qh]||(d[qh]=!0,Zf("selectionchange",!1,d))}}function kS(a,d,f,y){switch(YS(d)){case 2:var j=eO;break;case 8:j=tO;break;default:j=ix}f=j.bind(null,d,f,a),j=void 0,!Vp||d!=="touchstart"&&d!=="touchmove"&&d!=="wheel"||(j=!0),y?j!==void 0?a.addEventListener(d,f,{capture:!0,passive:j}):a.addEventListener(d,f,!0):j!==void 0?a.addEventListener(d,f,{passive:j}):a.addEventListener(d,f,!1)}function Fv(a,d,f,y,j){var O=y;if((d&1)===0&&(d&2)===0&&y!==null)e:for(;;){if(y===null)return;var B=y.tag;if(B===3||B===4){var ee=y.stateNode.containerInfo;if(ee===j)break;if(B===4)for(B=y.return;B!==null;){var be=B.tag;if((be===3||be===4)&&B.stateNode.containerInfo===j)return;B=B.return}for(;ee!==null;){if(B=mc(ee),B===null)return;if(be=B.tag,be===5||be===6||be===26||be===27){y=O=B;continue e}ee=ee.parentNode}}y=y.return}Kp(function(){var Ue=O,We=Xg(f),rt=[];e:{var Ve=a0.get(a);if(Ve!==void 0){var Ye=ch,Pt=a;switch(a){case"keypress":if(Hp(f)===0)break e;case"keydown":case"keyup":Ye=fA;break;case"focusin":Pt="focus",Ye=Zg;break;case"focusout":Pt="blur",Ye=Zg;break;case"beforeblur":case"afterblur":Ye=Zg;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ye=$w;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ye=Nw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ye=ey;break;case ly:case cy:case uy:Ye=Pw;break;case Wp:Ye=mA;break;case"scroll":case"scrollend":Ye=_w;break;case"wheel":Ye=yA;break;case"copy":case"cut":case"paste":Ye=Iw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ye=Uw;break;case"toggle":case"beforetoggle":Ye=Hw}var Zt=(d&4)!==0,Qn=!Zt&&(a==="scroll"||a==="scrollend"),De=Zt?Ve!==null?Ve+"Capture":null:Ve;Zt=[];for(var Ce=Ue,Ie;Ce!==null;){var nt=Ce;if(Ie=nt.stateNode,nt=nt.tag,nt!==5&&nt!==26&&nt!==27||Ie===null||De===null||(nt=_u(Ce,De),nt!=null&&Zt.push(Bh(Ce,nt,Ie))),Qn)break;Ce=Ce.return}0<Zt.length&&(Ve=new Ye(Ve,Pt,null,f,We),rt.push({event:Ve,listeners:Zt}))}}if((d&7)===0){e:{if(Ve=a==="mouseover"||a==="pointerover",Ye=a==="mouseout"||a==="pointerout",Ve&&f!==os&&(Pt=f.relatedTarget||f.fromElement)&&(mc(Pt)||Pt[pl]))break e;if((Ye||Ve)&&(Ve=We.window===We?We:(Ve=We.ownerDocument)?Ve.defaultView||Ve.parentWindow:window,Ye?(Pt=f.relatedTarget||f.toElement,Ye=Ue,Pt=Pt?mc(Pt):null,Pt!==null&&(Qn=h(Pt),Zt=Pt.tag,Pt!==Qn||Zt!==5&&Zt!==27&&Zt!==6)&&(Pt=null)):(Ye=null,Pt=Ue),Ye!==Pt)){if(Zt=$w,nt="onMouseLeave",De="onMouseEnter",Ce="mouse",(a==="pointerout"||a==="pointerover")&&(Zt=Uw,nt="onPointerLeave",De="onPointerEnter",Ce="pointer"),Qn=Ye==null?Ve:Ji(Ye),Ie=Pt==null?Ve:Ji(Pt),Ve=new Zt(nt,Ce+"leave",Ye,f,We),Ve.target=Qn,Ve.relatedTarget=Ie,nt=null,mc(We)===Ue&&(Zt=new Zt(De,Ce+"enter",Pt,f,We),Zt.target=Ie,Zt.relatedTarget=Qn,nt=Zt),Qn=nt,Ye&&Pt)t:{for(Zt=RS,De=Ye,Ce=Pt,Ie=0,nt=De;nt;nt=Zt(nt))Ie++;nt=0;for(var Ht=Ce;Ht;Ht=Zt(Ht))nt++;for(;0<Ie-nt;)De=Zt(De),Ie--;for(;0<nt-Ie;)Ce=Zt(Ce),nt--;for(;Ie--;){if(De===Ce||Ce!==null&&De===Ce.alternate){Zt=De;break t}De=Zt(De),Ce=Zt(Ce)}Zt=null}else Zt=null;Ye!==null&&qv(rt,Ve,Ye,Zt,!1),Pt!==null&&Qn!==null&&qv(rt,Qn,Pt,Zt,!0)}}e:{if(Ve=Ue?Ji(Ue):window,Ye=Ve.nodeName&&Ve.nodeName.toLowerCase(),Ye==="select"||Ye==="input"&&Ve.type==="file")var vn=Zp;else if(Vt(Ve))if(Dr)vn=bA;else{vn=xA;var Mt=zu}else Ye=Ve.nodeName,!Ye||Ye.toLowerCase()!=="input"||Ve.type!=="checkbox"&&Ve.type!=="radio"?Ue&&ah(Ue.elementType)&&(vn=Zp):vn=e0;if(vn&&(vn=vn(a,Ue))){dh(rt,vn,f,We);break e}Mt&&Mt(a,Ve,Ue),a==="focusout"&&Ue&&Ve.type==="number"&&Ue.memoizedProps.value!=null&&Bp(Ve,"number",Ve.value)}switch(Mt=Ue?Ji(Ue):window,a){case"focusin":(Vt(Mt)||Mt.contentEditable==="true")&&(vl=Mt,Fu=Ue,xo=null);break;case"focusout":xo=Fu=vl=null;break;case"mousedown":Jp=!0;break;case"contextmenu":case"mouseup":case"dragend":Jp=!1,iy(rt,f,We);break;case"selectionchange":if(i0)break;case"keydown":case"keyup":iy(rt,f,We)}var an;if(Wi)e:{switch(a){case"compositionstart":var En="onCompositionStart";break e;case"compositionend":En="onCompositionEnd";break e;case"compositionupdate":En="onCompositionUpdate";break e}En=void 0}else wc?Yw(a,f)&&(En="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(En="onCompositionStart");En&&(bc&&f.locale!=="ko"&&(wc||En!=="onCompositionStart"?En==="onCompositionEnd"&&wc&&(an=Tw()):(Rr=We,lh="value"in Rr?Rr.value:Rr.textContent,wc=!0)),Mt=Wf(Ue,En),0<Mt.length&&(En=new Jg(En,a,null,f,We),rt.push({event:En,listeners:Mt}),an?En.data=an:(an=ny(f),an!==null&&(En.data=an)))),(an=ii?Pu(a,f):vA(a,f))&&(En=Wf(Ue,"onBeforeInput"),0<En.length&&(Mt=new Jg("onBeforeInput","beforeinput",null,f,We),rt.push({event:Mt,listeners:En}),Mt.data=an)),gd(rt,a,Ue,f,We)}OS(rt,d)})}function Bh(a,d,f){return{instance:a,listener:d,currentTarget:f}}function Wf(a,d){for(var f=d+"Capture",y=[];a!==null;){var j=a,O=j.stateNode;if(j=j.tag,j!==5&&j!==26&&j!==27||O===null||(j=_u(a,f),j!=null&&y.unshift(Bh(a,j,O)),j=_u(a,d),j!=null&&y.push(Bh(a,j,O))),a.tag===3)return y;a=a.return}return[]}function RS(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function qv(a,d,f,y,j){for(var O=d._reactName,B=[];f!==null&&f!==y;){var ee=f,be=ee.alternate,Ue=ee.stateNode;if(ee=ee.tag,be!==null&&be===y)break;ee!==5&&ee!==26&&ee!==27||Ue===null||(be=Ue,j?(Ue=_u(f,O),Ue!=null&&B.unshift(Bh(f,Ue,be))):j||(Ue=_u(f,O),Ue!=null&&B.push(Bh(f,Ue,be)))),f=f.return}B.length!==0&&a.push({event:d,listeners:B})}var eo=/\r\n?/g,TS=/\u0000|\uFFFD/g;function Bv(a){return(typeof a=="string"?a:""+a).replace(eo,`
|
||
`).replace(TS,"")}function Uh(a,d){return d=Bv(d),Bv(a)===d}function Mn(a,d,f,y,j,O){switch(f){case"children":typeof y=="string"?d==="body"||d==="textarea"&&y===""||Ru(a,y):(typeof y=="number"||typeof y=="bigint")&&d!=="body"&&Ru(a,""+y);break;case"className":ml(a,"class",y);break;case"tabIndex":ml(a,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":ml(a,f,y);break;case"style":kw(a,y,O);break;case"data":if(d!=="object"){ml(a,"data",y);break}case"src":case"href":if(y===""&&(d!=="a"||f!=="href")){a.removeAttribute(f);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=oh(""+y),a.setAttribute(f,y);break;case"action":case"formAction":if(typeof y=="function"){a.setAttribute(f,"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 O=="function"&&(f==="formAction"?(d!=="input"&&Mn(a,d,"name",j.name,j,null),Mn(a,d,"formEncType",j.formEncType,j,null),Mn(a,d,"formMethod",j.formMethod,j,null),Mn(a,d,"formTarget",j.formTarget,j,null)):(Mn(a,d,"encType",j.encType,j,null),Mn(a,d,"method",j.method,j,null),Mn(a,d,"target",j.target,j,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){a.removeAttribute(f);break}y=oh(""+y),a.setAttribute(f,y);break;case"onClick":y!=null&&(a.onclick=ja);break;case"onScroll":y!=null&&jn("scroll",a);break;case"onScrollEnd":y!=null&&jn("scrollend",a);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(o(61));if(f=y.__html,f!=null){if(j.children!=null)throw Error(o(60));a.innerHTML=f}}break;case"multiple":a.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":a.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){a.removeAttribute("xlink:href");break}f=oh(""+y),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""+y):a.removeAttribute(f);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":y&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":y===!0?a.setAttribute(f,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?a.setAttribute(f,y):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?a.setAttribute(f,y):a.removeAttribute(f);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?a.removeAttribute(f):a.setAttribute(f,y);break;case"popover":jn("beforetoggle",a),jn("toggle",a),yc(a,"popover",y);break;case"xlinkActuate":Ea(a,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Ea(a,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Ea(a,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Ea(a,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Ea(a,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Ea(a,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Ea(a,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Ea(a,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Ea(a,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":yc(a,"is",y);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=Rw.get(f)||f,yc(a,f,y))}}function Kh(a,d,f,y,j,O){switch(f){case"style":kw(a,y,O);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(o(61));if(f=y.__html,f!=null){if(j.children!=null)throw Error(o(60));a.innerHTML=f}}break;case"children":typeof y=="string"?Ru(a,y):(typeof y=="number"||typeof y=="bigint")&&Ru(a,""+y);break;case"onScroll":y!=null&&jn("scroll",a);break;case"onScrollEnd":y!=null&&jn("scrollend",a);break;case"onClick":y!=null&&(a.onclick=ja);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jw.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(j=f.endsWith("Capture"),d=f.slice(2,j?f.length-7:void 0),O=a[zs]||null,O=O!=null?O[f]:null,typeof O=="function"&&a.removeEventListener(d,O,j),typeof y=="function")){typeof O!="function"&&O!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(d,y,j);break e}f in a?a[f]=y:y===!0?a.setAttribute(f,""):yc(a,f,y)}}}function ws(a,d,f){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":jn("error",a),jn("load",a);var y=!1,j=!1,O;for(O in f)if(f.hasOwnProperty(O)){var B=f[O];if(B!=null)switch(O){case"src":y=!0;break;case"srcSet":j=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,d));default:Mn(a,d,O,B,f,null)}}j&&Mn(a,d,"srcSet",f.srcSet,f,null),y&&Mn(a,d,"src",f.src,f,null);return;case"input":jn("invalid",a);var ee=O=B=j=null,be=null,Ue=null;for(y in f)if(f.hasOwnProperty(y)){var We=f[y];if(We!=null)switch(y){case"name":j=We;break;case"type":B=We;break;case"checked":be=We;break;case"defaultChecked":Ue=We;break;case"value":O=We;break;case"defaultValue":ee=We;break;case"children":case"dangerouslySetInnerHTML":if(We!=null)throw Error(o(137,d));break;default:Mn(a,d,y,We,f,null)}}Hg(a,O,ee,be,Ue,B,j,!1);return;case"select":jn("invalid",a),y=B=O=null;for(j in f)if(f.hasOwnProperty(j)&&(ee=f[j],ee!=null))switch(j){case"value":O=ee;break;case"defaultValue":B=ee;break;case"multiple":y=ee;default:Mn(a,d,j,ee,f,null)}d=O,f=B,a.multiple=!!y,d!=null?ku(a,!!y,d,!1):f!=null&&ku(a,!!y,f,!0);return;case"textarea":jn("invalid",a),O=j=y=null;for(B in f)if(f.hasOwnProperty(B)&&(ee=f[B],ee!=null))switch(B){case"value":y=ee;break;case"defaultValue":j=ee;break;case"children":O=ee;break;case"dangerouslySetInnerHTML":if(ee!=null)throw Error(o(91));break;default:Mn(a,d,B,ee,f,null)}Aw(a,y,j,O);return;case"option":for(be in f)f.hasOwnProperty(be)&&(y=f[be],y!=null)&&(be==="selected"?a.selected=y&&typeof y!="function"&&typeof y!="symbol":Mn(a,d,be,y,f,null));return;case"dialog":jn("beforetoggle",a),jn("toggle",a),jn("cancel",a),jn("close",a);break;case"iframe":case"object":jn("load",a);break;case"video":case"audio":for(y=0;y<yd.length;y++)jn(yd[y],a);break;case"image":jn("error",a),jn("load",a);break;case"details":jn("toggle",a);break;case"embed":case"source":case"link":jn("error",a),jn("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Ue in f)if(f.hasOwnProperty(Ue)&&(y=f[Ue],y!=null))switch(Ue){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,d));default:Mn(a,d,Ue,y,f,null)}return;default:if(ah(d)){for(We in f)f.hasOwnProperty(We)&&(y=f[We],y!==void 0&&Kh(a,d,We,y,f,void 0));return}}for(ee in f)f.hasOwnProperty(ee)&&(y=f[ee],y!=null&&Mn(a,d,ee,y,f,null))}function qA(a,d,f,y){switch(d){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var j=null,O=null,B=null,ee=null,be=null,Ue=null,We=null;for(Ye in f){var rt=f[Ye];if(f.hasOwnProperty(Ye)&&rt!=null)switch(Ye){case"checked":break;case"value":break;case"defaultValue":be=rt;default:y.hasOwnProperty(Ye)||Mn(a,d,Ye,null,y,rt)}}for(var Ve in y){var Ye=y[Ve];if(rt=f[Ve],y.hasOwnProperty(Ve)&&(Ye!=null||rt!=null))switch(Ve){case"type":O=Ye;break;case"name":j=Ye;break;case"checked":Ue=Ye;break;case"defaultChecked":We=Ye;break;case"value":B=Ye;break;case"defaultValue":ee=Ye;break;case"children":case"dangerouslySetInnerHTML":if(Ye!=null)throw Error(o(137,d));break;default:Ye!==rt&&Mn(a,d,Ve,Ye,y,rt)}}qp(a,B,ee,be,Ue,We,O,j);return;case"select":Ye=B=ee=Ve=null;for(O in f)if(be=f[O],f.hasOwnProperty(O)&&be!=null)switch(O){case"value":break;case"multiple":Ye=be;default:y.hasOwnProperty(O)||Mn(a,d,O,null,y,be)}for(j in y)if(O=y[j],be=f[j],y.hasOwnProperty(j)&&(O!=null||be!=null))switch(j){case"value":Ve=O;break;case"defaultValue":ee=O;break;case"multiple":B=O;default:O!==be&&Mn(a,d,j,O,y,be)}d=ee,f=B,y=Ye,Ve!=null?ku(a,!!f,Ve,!1):!!y!=!!f&&(d!=null?ku(a,!!f,d,!0):ku(a,!!f,f?[]:"",!1));return;case"textarea":Ye=Ve=null;for(ee in f)if(j=f[ee],f.hasOwnProperty(ee)&&j!=null&&!y.hasOwnProperty(ee))switch(ee){case"value":break;case"children":break;default:Mn(a,d,ee,null,y,j)}for(B in y)if(j=y[B],O=f[B],y.hasOwnProperty(B)&&(j!=null||O!=null))switch(B){case"value":Ve=j;break;case"defaultValue":Ye=j;break;case"children":break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(o(91));break;default:j!==O&&Mn(a,d,B,j,y,O)}Cw(a,Ve,Ye);return;case"option":for(var Pt in f)Ve=f[Pt],f.hasOwnProperty(Pt)&&Ve!=null&&!y.hasOwnProperty(Pt)&&(Pt==="selected"?a.selected=!1:Mn(a,d,Pt,null,y,Ve));for(be in y)Ve=y[be],Ye=f[be],y.hasOwnProperty(be)&&Ve!==Ye&&(Ve!=null||Ye!=null)&&(be==="selected"?a.selected=Ve&&typeof Ve!="function"&&typeof Ve!="symbol":Mn(a,d,be,Ve,y,Ye));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 Zt in f)Ve=f[Zt],f.hasOwnProperty(Zt)&&Ve!=null&&!y.hasOwnProperty(Zt)&&Mn(a,d,Zt,null,y,Ve);for(Ue in y)if(Ve=y[Ue],Ye=f[Ue],y.hasOwnProperty(Ue)&&Ve!==Ye&&(Ve!=null||Ye!=null))switch(Ue){case"children":case"dangerouslySetInnerHTML":if(Ve!=null)throw Error(o(137,d));break;default:Mn(a,d,Ue,Ve,y,Ye)}return;default:if(ah(d)){for(var Qn in f)Ve=f[Qn],f.hasOwnProperty(Qn)&&Ve!==void 0&&!y.hasOwnProperty(Qn)&&Kh(a,d,Qn,void 0,y,Ve);for(We in y)Ve=y[We],Ye=f[We],!y.hasOwnProperty(We)||Ve===Ye||Ve===void 0&&Ye===void 0||Kh(a,d,We,Ve,y,Ye);return}}for(var De in f)Ve=f[De],f.hasOwnProperty(De)&&Ve!=null&&!y.hasOwnProperty(De)&&Mn(a,d,De,null,y,Ve);for(rt in y)Ve=y[rt],Ye=f[rt],!y.hasOwnProperty(rt)||Ve===Ye||Ve==null&&Ye==null||Mn(a,d,rt,Ve,y,Ye)}function Uv(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function BA(){if(typeof performance.getEntriesByType=="function"){for(var a=0,d=0,f=performance.getEntriesByType("resource"),y=0;y<f.length;y++){var j=f[y],O=j.transferSize,B=j.initiatorType,ee=j.duration;if(O&&ee&&Uv(B)){for(B=0,ee=j.responseEnd,y+=1;y<f.length;y++){var be=f[y],Ue=be.startTime;if(Ue>ee)break;var We=be.transferSize,rt=be.initiatorType;We&&Uv(rt)&&(be=be.responseEnd,B+=We*(be<ee?1:(ee-Ue)/(be-Ue)))}if(--y,d+=8*(O+B)/(j.duration/1e3),a++,10<a)break}}if(0<a)return d/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Qf=null,em=null;function Vc(a){return a.nodeType===9?a:a.ownerDocument}function vd(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Vh(a,d){if(a===0)switch(d){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&d==="foreignObject"?0:a}function Kv(a,d){return a==="textarea"||a==="noscript"||typeof d.children=="string"||typeof d.children=="number"||typeof d.children=="bigint"||typeof d.dangerouslySetInnerHTML=="object"&&d.dangerouslySetInnerHTML!==null&&d.dangerouslySetInnerHTML.__html!=null}var tm=null;function UA(){var a=window.event;return a&&a.type==="popstate"?a===tm?!1:(tm=a,!0):(tm=null,!1)}var Vv=typeof setTimeout=="function"?setTimeout:void 0,KA=typeof clearTimeout=="function"?clearTimeout:void 0,_S=typeof Promise=="function"?Promise:void 0,Hv=typeof queueMicrotask=="function"?queueMicrotask:typeof _S<"u"?function(a){return _S.resolve(null).then(a).catch(Gv)}:Vv;function Gv(a){setTimeout(function(){throw a})}function ql(a){return a==="head"}function $S(a,d){var f=d,y=0;do{var j=f.nextSibling;if(a.removeChild(f),j&&j.nodeType===8)if(f=j.data,f==="/$"||f==="/&"){if(y===0){a.removeChild(j),xi(d);return}y--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")y++;else if(f==="html")Hh(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,Hh(f);for(var O=f.firstChild;O;){var B=O.nextSibling,ee=O.nodeName;O[Zi]||ee==="SCRIPT"||ee==="STYLE"||ee==="LINK"&&O.rel.toLowerCase()==="stylesheet"||f.removeChild(O),O=B}}else f==="body"&&Hh(a.ownerDocument.body);f=j}while(f);xi(d)}function nm(a,d){var f=a;a=0;do{var y=f.nextSibling;if(f.nodeType===1?d?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(d?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),y&&y.nodeType===8)if(f=y.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=y}while(f)}function Xv(a){var d=a.firstChild;for(d&&d.nodeType===10&&(d=d.nextSibling);d;){var f=d;switch(d=d.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Xv(f),rh(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function to(a,d,f,y){for(;a.nodeType===1;){var j=f;if(a.nodeName.toLowerCase()!==d.toLowerCase()){if(!y&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(y){if(!a[Zi])switch(d){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(O=a.getAttribute("rel"),O==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(O!==j.rel||a.getAttribute("href")!==(j.href==null||j.href===""?null:j.href)||a.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin)||a.getAttribute("title")!==(j.title==null?null:j.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(O=a.getAttribute("src"),(O!==(j.src==null?null:j.src)||a.getAttribute("type")!==(j.type==null?null:j.type)||a.getAttribute("crossorigin")!==(j.crossOrigin==null?null:j.crossOrigin))&&O&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(d==="input"&&a.type==="hidden"){var O=j.name==null?null:""+j.name;if(j.type==="hidden"&&a.getAttribute("name")===O)return a}else return a;if(a=vi(a.nextSibling),a===null)break}return null}function xd(a,d,f){if(d==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=vi(a.nextSibling),a===null))return null;return a}function Bl(a,d){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!d||(a=vi(a.nextSibling),a===null))return null;return a}function rm(a){return a.data==="$?"||a.data==="$~"}function sm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function NS(a,d){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=d;else if(a.data!=="$?"||f.readyState!=="loading")d();else{var y=function(){d(),f.removeEventListener("DOMContentLoaded",y)};f.addEventListener("DOMContentLoaded",y),a._reactRetry=y}}function vi(a){for(;a!=null;a=a.nextSibling){var d=a.nodeType;if(d===1||d===3)break;if(d===8){if(d=a.data,d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"||d==="F!"||d==="F")break;if(d==="/$"||d==="/&")return null}}return a}var Yv=null;function Zv(a){a=a.nextSibling;for(var d=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(d===0)return vi(a.nextSibling);d--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||d++}a=a.nextSibling}return null}function DS(a){a=a.previousSibling;for(var d=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(d===0)return a;d--}else f!=="/$"&&f!=="/&"||d++}a=a.previousSibling}return null}function Jv(a,d,f){switch(d=Vc(f),a){case"html":if(a=d.documentElement,!a)throw Error(o(452));return a;case"head":if(a=d.head,!a)throw Error(o(453));return a;case"body":if(a=d.body,!a)throw Error(o(454));return a;default:throw Error(o(451))}}function Hh(a){for(var d=a.attributes;d.length;)a.removeAttributeNode(d[0]);rh(a)}var oa=new Map,Wv=new Set;function im(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Io=ne.d;ne.d={f:VA,r:HA,D:Qv,C:MS,L:GA,m:IS,X:YA,S:XA,M:ZA};function VA(){var a=Io.f(),d=qf();return a||d}function HA(a){var d=gc(a);d!==null&&d.tag===5&&d.type==="form"?Wy(d):Io.r(a)}var Hc=typeof document>"u"?null:document;function PS(a,d,f){var y=Hc;if(y&&typeof d=="string"&&d){var j=si(d);j='link[rel="'+a+'"][href="'+j+'"]',typeof f=="string"&&(j+='[crossorigin="'+f+'"]'),Wv.has(j)||(Wv.add(j),a={rel:a,crossOrigin:f,href:d},y.querySelector(j)===null&&(d=y.createElement("link"),ws(d,"link",a),Zr(d),y.head.appendChild(d)))}}function Qv(a){Io.D(a),PS("dns-prefetch",a,null)}function MS(a,d){Io.C(a,d),PS("preconnect",a,d)}function GA(a,d,f){Io.L(a,d,f);var y=Hc;if(y&&a&&d){var j='link[rel="preload"][as="'+si(d)+'"]';d==="image"&&f&&f.imageSrcSet?(j+='[imagesrcset="'+si(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(j+='[imagesizes="'+si(f.imageSizes)+'"]')):j+='[href="'+si(a)+'"]';var O=j;switch(d){case"style":O=bd(a);break;case"script":O=Ul(a)}oa.has(O)||(a=A({rel:"preload",href:d==="image"&&f&&f.imageSrcSet?void 0:a,as:d},f),oa.set(O,a),y.querySelector(j)!==null||d==="style"&&y.querySelector(Gh(O))||d==="script"&&y.querySelector(Xh(O))||(d=y.createElement("link"),ws(d,"link",a),Zr(d),y.head.appendChild(d)))}}function IS(a,d){Io.m(a,d);var f=Hc;if(f&&a){var y=d&&typeof d.as=="string"?d.as:"script",j='link[rel="modulepreload"][as="'+si(y)+'"][href="'+si(a)+'"]',O=j;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Ul(a)}if(!oa.has(O)&&(a=A({rel:"modulepreload",href:a},d),oa.set(O,a),f.querySelector(j)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Xh(O)))return}y=f.createElement("link"),ws(y,"link",a),Zr(y),f.head.appendChild(y)}}}function XA(a,d,f){Io.S(a,d,f);var y=Hc;if(y&&a){var j=fl(y).hoistableStyles,O=bd(a);d=d||"default";var B=j.get(O);if(!B){var ee={loading:0,preload:null};if(B=y.querySelector(Gh(O)))ee.loading=5;else{a=A({rel:"stylesheet",href:a,"data-precedence":d},f),(f=oa.get(O))&&ex(a,f);var be=B=y.createElement("link");Zr(be),ws(be,"link",a),be._p=new Promise(function(Ue,We){be.onload=Ue,be.onerror=We}),be.addEventListener("load",function(){ee.loading|=1}),be.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,am(B,d,y)}B={type:"stylesheet",instance:B,count:1,state:ee},j.set(O,B)}}}function YA(a,d){Io.X(a,d);var f=Hc;if(f&&a){var y=fl(f).hoistableScripts,j=Ul(a),O=y.get(j);O||(O=f.querySelector(Xh(j)),O||(a=A({src:a,async:!0},d),(d=oa.get(j))&&tx(a,d),O=f.createElement("script"),Zr(O),ws(O,"link",a),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(j,O))}}function ZA(a,d){Io.M(a,d);var f=Hc;if(f&&a){var y=fl(f).hoistableScripts,j=Ul(a),O=y.get(j);O||(O=f.querySelector(Xh(j)),O||(a=A({src:a,async:!0,type:"module"},d),(d=oa.get(j))&&tx(a,d),O=f.createElement("script"),Zr(O),ws(O,"link",a),f.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(j,O))}}function zS(a,d,f,y){var j=(j=Ne.current)?im(j):null;if(!j)throw Error(o(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(d=bd(f.href),f=fl(j).hoistableStyles,y=f.get(d),y||(y={type:"style",instance:null,count:0,state:null},f.set(d,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=bd(f.href);var O=fl(j).hoistableStyles,B=O.get(a);if(B||(j=j.ownerDocument||j,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(a,B),(O=j.querySelector(Gh(a)))&&!O._p&&(B.instance=O,B.state.loading=5),oa.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},oa.set(a,f),O||FS(j,a,f,B.state))),d&&y===null)throw Error(o(528,""));return B}if(d&&y!==null)throw Error(o(529,""));return null;case"script":return d=f.async,f=f.src,typeof f=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=Ul(f),f=fl(j).hoistableScripts,y=f.get(d),y||(y={type:"script",instance:null,count:0,state:null},f.set(d,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,a))}}function bd(a){return'href="'+si(a)+'"'}function Gh(a){return'link[rel="stylesheet"]['+a+"]"}function LS(a){return A({},a,{"data-precedence":a.precedence,precedence:null})}function FS(a,d,f,y){a.querySelector('link[rel="preload"][as="style"]['+d+"]")?y.loading=1:(d=a.createElement("link"),y.preload=d,d.addEventListener("load",function(){return y.loading|=1}),d.addEventListener("error",function(){return y.loading|=2}),ws(d,"link",f),Zr(d),a.head.appendChild(d))}function Ul(a){return'[src="'+si(a)+'"]'}function Xh(a){return"script[async]"+a}function qS(a,d,f){if(d.count++,d.instance===null)switch(d.type){case"style":var y=a.querySelector('style[data-href~="'+si(f.href)+'"]');if(y)return d.instance=y,Zr(y),y;var j=A({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return y=(a.ownerDocument||a).createElement("style"),Zr(y),ws(y,"style",j),am(y,f.precedence,a),d.instance=y;case"stylesheet":j=bd(f.href);var O=a.querySelector(Gh(j));if(O)return d.state.loading|=4,d.instance=O,Zr(O),O;y=LS(f),(j=oa.get(j))&&ex(y,j),O=(a.ownerDocument||a).createElement("link"),Zr(O);var B=O;return B._p=new Promise(function(ee,be){B.onload=ee,B.onerror=be}),ws(O,"link",y),d.state.loading|=4,am(O,f.precedence,a),d.instance=O;case"script":return O=Ul(f.src),(j=a.querySelector(Xh(O)))?(d.instance=j,Zr(j),j):(y=f,(j=oa.get(O))&&(y=A({},f),tx(y,j)),a=a.ownerDocument||a,j=a.createElement("script"),Zr(j),ws(j,"link",y),a.head.appendChild(j),d.instance=j);case"void":return null;default:throw Error(o(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(y=d.instance,d.state.loading|=4,am(y,f.precedence,a));return d.instance}function am(a,d,f){for(var y=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),j=y.length?y[y.length-1]:null,O=j,B=0;B<y.length;B++){var ee=y[B];if(ee.dataset.precedence===d)O=ee;else if(O!==j)break}O?O.parentNode.insertBefore(a,O.nextSibling):(d=f.nodeType===9?f.head:f,d.insertBefore(a,d.firstChild))}function ex(a,d){a.crossOrigin==null&&(a.crossOrigin=d.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=d.referrerPolicy),a.title==null&&(a.title=d.title)}function tx(a,d){a.crossOrigin==null&&(a.crossOrigin=d.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=d.referrerPolicy),a.integrity==null&&(a.integrity=d.integrity)}var om=null;function BS(a,d,f){if(om===null){var y=new Map,j=om=new Map;j.set(f,y)}else j=om,y=j.get(f),y||(y=new Map,j.set(f,y));if(y.has(a))return y;for(y.set(a,null),f=f.getElementsByTagName(a),j=0;j<f.length;j++){var O=f[j];if(!(O[Zi]||O[as]||a==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var B=O.getAttribute(d)||"";B=a+B;var ee=y.get(B);ee?ee.push(O):y.set(B,[O])}}return y}function US(a,d,f){a=a.ownerDocument||a,a.head.insertBefore(f,d==="title"?a.querySelector("head > title"):null)}function JA(a,d,f){if(f===1||d.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;return d.rel==="stylesheet"?(a=d.disabled,typeof d.precedence=="string"&&a==null):!0;case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function KS(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function VS(a,d,f,y){if(f.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var j=bd(y.href),O=d.querySelector(Gh(j));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(a.count++,a=Gc.bind(a),d.then(a,a)),f.state.loading|=4,f.instance=O,Zr(O);return}O=d.ownerDocument||d,y=LS(y),(j=oa.get(j))&&ex(y,j),O=O.createElement("link"),Zr(O);var B=O;B._p=new Promise(function(ee,be){B.onload=ee,B.onerror=be}),ws(O,"link",y),f.instance=O}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,d),(d=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=Gc.bind(a),d.addEventListener("load",f),d.addEventListener("error",f))}}var lm=0;function WA(a,d){return a.stylesheets&&a.count===0&&cm(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var y=setTimeout(function(){if(a.stylesheets&&cm(a,a.stylesheets),a.unsuspend){var O=a.unsuspend;a.unsuspend=null,O()}},6e4+d);0<a.imgBytes&&lm===0&&(lm=62500*BA());var j=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&cm(a,a.stylesheets),a.unsuspend)){var O=a.unsuspend;a.unsuspend=null,O()}},(a.imgBytes>lm?50:800)+d);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(y),clearTimeout(j)}}:null}function Gc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cm(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var wd=null;function cm(a,d){a.stylesheets=null,a.unsuspend!==null&&(a.count++,wd=new Map,d.forEach(HS,a),wd=null,Gc.call(a))}function HS(a,d){if(!(d.state.loading&4)){var f=wd.get(a);if(f)var y=f.get(null);else{f=new Map,wd.set(a,f);for(var j=a.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<j.length;O++){var B=j[O];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(f.set(B.dataset.precedence,B),y=B)}y&&f.set(null,y)}j=d.instance,B=j.getAttribute("data-precedence"),O=f.get(B)||y,O===y&&f.set(null,j),f.set(B,j),this.count++,y=Gc.bind(this),j.addEventListener("load",y),j.addEventListener("error",y),O?O.parentNode.insertBefore(j,O.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(j,a.firstChild)),d.state.loading|=4}}var Sd={$$typeof:K,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function QA(a,d,f,y,j,O,B,ee,be){this.tag=1,this.containerInfo=a,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=Pn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pn(0),this.hiddenUpdates=Pn(null),this.identifierPrefix=y,this.onUncaughtError=j,this.onCaughtError=O,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=be,this.incompleteTransitions=new Map}function nx(a,d,f,y,j,O,B,ee,be,Ue,We,rt){return a=new QA(a,d,f,B,be,Ue,We,rt,ee),d=1,O===!0&&(d|=24),O=oi(3,null,null,d),a.current=O,O.stateNode=a,d=of(),d.refCount++,a.pooledCache=d,d.refCount++,O.memoizedState={element:y,isDehydrated:f,cache:d},ff(O),a}function rx(a){return a?(a=Bu,a):Bu}function GS(a,d,f,y,j,O){j=rx(j),y.context===null?y.context=j:y.pendingContext=j,y=Ao(d),y.payload={element:f},O=O===void 0?null:O,O!==null&&(y.callback=O),f=kl(a,y,d),f!==null&&(Ns(f,a,d),ra(f,a,d))}function Yh(a,d){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<d?f:d}}function sx(a,d){Yh(a,d),(a=a.alternate)&&Yh(a,d)}function XS(a){if(a.tag===13||a.tag===31){var d=jc(a,67108864);d!==null&&Ns(d,a,67108864),sx(a,67108864)}}function um(a){if(a.tag===13||a.tag===31){var d=Pi();d=Su(d);var f=jc(a,d);f!==null&&Ns(f,a,d),sx(a,d)}}var dm=!0;function eO(a,d,f,y){var j=ue.T;ue.T=null;var O=ne.p;try{ne.p=2,ix(a,d,f,y)}finally{ne.p=O,ue.T=j}}function tO(a,d,f,y){var j=ue.T;ue.T=null;var O=ne.p;try{ne.p=8,ix(a,d,f,y)}finally{ne.p=O,ue.T=j}}function ix(a,d,f,y){if(dm){var j=hm(y);if(j===null)Fv(a,d,y,pm,f),ZS(a,y);else if(lx(j,a,d,f,y))y.stopPropagation();else if(ZS(a,y),d&4&&-1<nO.indexOf(a)){for(;j!==null;){var O=gc(j);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var B=ba(O.pendingLanes);if(B!==0){var ee=O;for(ee.pendingLanes|=2,ee.entangledLanes|=2;B;){var be=1<<31-is(B);ee.entanglements[1]|=be,B&=~be}Qa(O),(Hn&6)===0&&(If=q()+500,md(0))}}break;case 31:case 13:ee=jc(O,2),ee!==null&&Ns(ee,O,2),qf(),sx(O,2)}if(O=hm(y),O===null&&Fv(a,d,y,pm,f),O===j)break;j=O}j!==null&&y.stopPropagation()}else Fv(a,d,y,null,f)}}function hm(a){return a=Xg(a),ax(a)}var pm=null;function ax(a){if(pm=null,a=mc(a),a!==null){var d=h(a);if(d===null)a=null;else{var f=d.tag;if(f===13){if(a=m(d),a!==null)return a;a=null}else if(f===31){if(a=g(d),a!==null)return a;a=null}else if(f===3){if(d.stateNode.current.memoizedState.isDehydrated)return d.tag===3?d.stateNode.containerInfo:null;a=null}else d!==a&&(a=null)}}return pm=a,null}function YS(a){switch(a){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(X()){case oe:return 2;case ve:return 8;case Re:case Je:return 32;case Tt:return 268435456;default:return 32}default:return 32}}var ox=!1,zo=null,Kl=null,Lo=null,Zh=new Map,Jh=new Map,Vl=[],nO="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 ZS(a,d){switch(a){case"focusin":case"focusout":zo=null;break;case"dragenter":case"dragleave":Kl=null;break;case"mouseover":case"mouseout":Lo=null;break;case"pointerover":case"pointerout":Zh.delete(d.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jh.delete(d.pointerId)}}function Ed(a,d,f,y,j,O){return a===null||a.nativeEvent!==O?(a={blockedOn:d,domEventName:f,eventSystemFlags:y,nativeEvent:O,targetContainers:[j]},d!==null&&(d=gc(d),d!==null&&XS(d)),a):(a.eventSystemFlags|=y,d=a.targetContainers,j!==null&&d.indexOf(j)===-1&&d.push(j),a)}function lx(a,d,f,y,j){switch(d){case"focusin":return zo=Ed(zo,a,d,f,y,j),!0;case"dragenter":return Kl=Ed(Kl,a,d,f,y,j),!0;case"mouseover":return Lo=Ed(Lo,a,d,f,y,j),!0;case"pointerover":var O=j.pointerId;return Zh.set(O,Ed(Zh.get(O)||null,a,d,f,y,j)),!0;case"gotpointercapture":return O=j.pointerId,Jh.set(O,Ed(Jh.get(O)||null,a,d,f,y,j)),!0}return!1}function JS(a){var d=mc(a.target);if(d!==null){var f=h(d);if(f!==null){if(d=f.tag,d===13){if(d=m(f),d!==null){a.blockedOn=d,Ug(a.priority,function(){um(f)});return}}else if(d===31){if(d=g(f),d!==null){a.blockedOn=d,Ug(a.priority,function(){um(f)});return}}else if(d===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function fm(a){if(a.blockedOn!==null)return!1;for(var d=a.targetContainers;0<d.length;){var f=hm(a.nativeEvent);if(f===null){f=a.nativeEvent;var y=new f.constructor(f.type,f);os=y,f.target.dispatchEvent(y),os=null}else return d=gc(f),d!==null&&XS(d),a.blockedOn=f,!1;d.shift()}return!0}function wr(a,d,f){fm(a)&&f.delete(d)}function $a(){ox=!1,zo!==null&&fm(zo)&&(zo=null),Kl!==null&&fm(Kl)&&(Kl=null),Lo!==null&&fm(Lo)&&(Lo=null),Zh.forEach(wr),Jh.forEach(wr)}function Kr(a,d){a.blockedOn===d&&(a.blockedOn=null,ox||(ox=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$a)))}var jd=null;function mm(a){jd!==a&&(jd=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){jd===a&&(jd=null);for(var d=0;d<a.length;d+=3){var f=a[d],y=a[d+1],j=a[d+2];if(typeof y!="function"){if(ax(y||f)===null)continue;break}var O=gc(f);O!==null&&(a.splice(d,3),d-=3,Zy(O,{pending:!0,data:j,method:f.method,action:y},y,j))}}))}function xi(a){function d(be){return Kr(be,a)}zo!==null&&Kr(zo,a),Kl!==null&&Kr(Kl,a),Lo!==null&&Kr(Lo,a),Zh.forEach(d),Jh.forEach(d);for(var f=0;f<Vl.length;f++){var y=Vl[f];y.blockedOn===a&&(y.blockedOn=null)}for(;0<Vl.length&&(f=Vl[0],f.blockedOn===null);)JS(f),f.blockedOn===null&&Vl.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(y=0;y<f.length;y+=3){var j=f[y],O=f[y+1],B=j[zs]||null;if(typeof O=="function")B||mm(f);else if(B){var ee=null;if(O&&O.hasAttribute("formAction")){if(j=O,B=O[zs]||null)ee=B.formAction;else if(ax(j)!==null)continue}else ee=B.action;typeof ee=="function"?f[y+1]=ee:(f.splice(y,3),y-=3),mm(f)}}}function yr(){function a(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(B){return j=B})},focusReset:"manual",scroll:"manual"})}function d(){j!==null&&(j(),j=null),y||setTimeout(f,20)}function f(){if(!y&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,j=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",d),navigation.addEventListener("navigateerror",d),setTimeout(f,100),function(){y=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",d),navigation.removeEventListener("navigateerror",d),j!==null&&(j(),j=null)}}}function qn(a){this._internalRoot=a}en.prototype.render=qn.prototype.render=function(a){var d=this._internalRoot;if(d===null)throw Error(o(409));var f=d.current,y=Pi();GS(f,y,a,d,null,null)},en.prototype.unmount=qn.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var d=a.containerInfo;GS(a.current,2,null,a,null,null),qf(),d[pl]=null}};function en(a){this._internalRoot=a}en.prototype.unstable_scheduleHydration=function(a){if(a){var d=Eu();a={blockedOn:null,target:a,priority:d};for(var f=0;f<Vl.length&&d!==0&&d<Vl[f].priority;f++);Vl.splice(f,0,a),f===0&&JS(a)}};var Wh=r.version;if(Wh!=="19.2.3")throw Error(o(527,Wh,"19.2.3"));ne.findDOMNode=function(a){var d=a._reactInternals;if(d===void 0)throw typeof a.render=="function"?Error(o(188)):(a=Object.keys(a).join(","),Error(o(268,a)));return a=w(d),a=a!==null?E(a):null,a=a===null?null:a.stateNode,a};var cx={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wn.isDisabled&&Wn.supportsFiber)try{nn=Wn.inject(cx),Gt=Wn}catch{}}return lb.createRoot=function(a,d){if(!u(a))throw Error(o(299));var f=!1,y="",j=M0,O=I0,B=z0;return d!=null&&(d.unstable_strictMode===!0&&(f=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(j=d.onUncaughtError),d.onCaughtError!==void 0&&(O=d.onCaughtError),d.onRecoverableError!==void 0&&(B=d.onRecoverableError)),d=nx(a,1,!1,null,null,f,y,null,j,O,B,yr),a[pl]=d.current,Jf(a),new qn(d)},lb.hydrateRoot=function(a,d,f){if(!u(a))throw Error(o(299));var y=!1,j="",O=M0,B=I0,ee=z0,be=null;return f!=null&&(f.unstable_strictMode===!0&&(y=!0),f.identifierPrefix!==void 0&&(j=f.identifierPrefix),f.onUncaughtError!==void 0&&(O=f.onUncaughtError),f.onCaughtError!==void 0&&(B=f.onCaughtError),f.onRecoverableError!==void 0&&(ee=f.onRecoverableError),f.formState!==void 0&&(be=f.formState)),d=nx(a,1,!0,d,f??null,y,j,be,O,B,ee,yr),d.context=rx(null),f=d.current,y=Pi(),y=Su(y),j=Ao(y),j.callback=null,kl(f,j,y),f=y,d.current.lanes=f,Er(d,f),Qa(d),a[pl]=d.current,Jf(a),new en(d)},lb.version="19.2.3",lb}var VM;function NW(){if(VM)return zR.exports;VM=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),zR.exports=$W(),zR.exports}var DW=NW();const Mj="autoglue.tokens",qT="autoglue.auth-change";let nc=BT();function BT(){try{const e=localStorage.getItem(Mj);return e?JSON.parse(e):null}catch{return null}}function PW(e){e?localStorage.setItem(Mj,JSON.stringify(e)):localStorage.removeItem(Mj)}function MW(e){window.dispatchEvent(new CustomEvent(qT,{detail:e}))}const Xs={get(){return nc},set(e){nc=e,PW(e),MW(e)},reload(){return nc=BT(),nc},isAuthed(){return!!nc?.access_token},getAccessToken(){return nc?.access_token??null},isExpired(e=Math.floor(Date.now()/1e3)){const r=HM(nc?.access_token);return r!==null?e>=r:!0},willExpireSoon(e=60,r=Math.floor(Date.now()/1e3)){const s=HM(nc?.access_token);return s!==null?s-r<=e:!0},logout(){Xs.set(null)},subscribe(e){const r=o=>e(o.detail??null),s=o=>{o.key===Mj&&(nc=BT(),e(nc))};return window.addEventListener(qT,r),window.addEventListener("storage",s),()=>{window.removeEventListener(qT,r),window.removeEventListener("storage",s)}}};function HM(e){if(!e)return null;const r=e.split(".");if(r.length<2)return null;try{const s=JSON.parse(atob(IW(r[1])));return(typeof s?.exp=="number"?s.exp:null)??null}catch{return null}}function IW(e){return e.replace(/-/g,"+").replace(/_/g,"/")+"==".slice((2-e.length*3%4)%4)}const UT="autoglue.org";let HE=localStorage.getItem(UT);const rl={get(){return HE},set(e){HE=e,localStorage.setItem(UT,e),window.dispatchEvent(new CustomEvent("autoglue:org-change",{detail:e}))},subscribe(e){const r=o=>e(o.detail??null),s=o=>{o.key===UT&&(HE=o.newValue,e(HE))};return window.addEventListener("autoglue:org-change",r),window.addEventListener("storage",s),()=>{window.removeEventListener("autoglue:org-change",r),window.removeEventListener("storage",s)}}},zW="https://autoglue.glueopshosted.com/api/v1".replace(/\/+$/,"");class bz{constructor(r={}){this.configuration=r}set config(r){this.configuration=r}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:zW}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||wz}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){const r=this.configuration.apiKey;if(r)return typeof r=="function"?r:()=>r}get accessToken(){const r=this.configuration.accessToken;if(r)return typeof r=="function"?r:async()=>r}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}}const LW=new bz;class ks{constructor(r=LW){this.configuration=r,this.middleware=r.middleware}static jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");middleware;withMiddleware(...r){const s=this.clone();return s.middleware=s.middleware.concat(...r),s}withPreMiddleware(...r){const s=r.map(o=>({pre:o}));return this.withMiddleware(...s)}withPostMiddleware(...r){const s=r.map(o=>({post:o}));return this.withMiddleware(...s)}isJsonMime(r){return r?ks.jsonRegex.test(r):!1}async request(r,s){const{url:o,init:u}=await this.createFetchParams(r,s),h=await this.fetchApi(o,u);if(h&&h.status>=200&&h.status<300)return h;throw new BW(h,"Response returned an error code")}async createFetchParams(r,s){let o=this.configuration.basePath+r.path;r.query!==void 0&&Object.keys(r.query).length!==0&&(o+="?"+this.configuration.queryParamsStringify(r.query));const u=Object.assign({},this.configuration.headers,r.headers);Object.keys(u).forEach(E=>u[E]===void 0?delete u[E]:{});const h=typeof s=="function"?s:async()=>s,m={method:r.method,headers:u,body:r.body,credentials:this.configuration.credentials},g={...m,...await h({init:m,context:r})};let b;qW(g.body)||g.body instanceof URLSearchParams||FW(g.body)?b=g.body:this.isJsonMime(u["Content-Type"])?b=JSON.stringify(g.body):b=g.body;const w={...g,body:b};return{url:o,init:w}}fetchApi=async(r,s)=>{let o={url:r,init:s};for(const h of this.middleware)h.pre&&(o=await h.pre({fetch:this.fetchApi,...o})||o);let u;try{u=await(this.configuration.fetchApi||fetch)(o.url,o.init)}catch(h){for(const m of this.middleware)m.onError&&(u=await m.onError({fetch:this.fetchApi,url:o.url,init:o.init,error:h,response:u?u.clone():void 0})||u);if(u===void 0)throw h instanceof Error?new UW(h,"The request failed and the interceptors did not return an alternative response"):h}for(const h of this.middleware)h.post&&(u=await h.post({fetch:this.fetchApi,url:o.url,init:o.init,response:u.clone()})||u);return u};clone(){const r=this.constructor,s=new r(this.configuration);return s.middleware=this.middleware.slice(),s}}function FW(e){return typeof Blob<"u"&&e instanceof Blob}function qW(e){return typeof FormData<"u"&&e instanceof FormData}class BW extends Error{constructor(r,s){super(s),this.response=r}name="ResponseError"}class UW extends Error{constructor(r,s){super(s),this.cause=r}name="FetchError"}class Qe extends Error{constructor(r,s){super(s),this.field=r}name="RequiredError"}function wz(e,r=""){return Object.keys(e).map(s=>Sz(s,e[s],r)).filter(s=>s.length>0).join("&")}function Sz(e,r,s=""){const o=s+(s.length?`[${e}]`:e);if(r instanceof Array){const u=r.map(h=>encodeURIComponent(String(h))).join(`&${encodeURIComponent(o)}=`);return`${encodeURIComponent(o)}=${u}`}if(r instanceof Set){const u=Array.from(r);return Sz(e,u,s)}return r instanceof Date?`${encodeURIComponent(o)}=${encodeURIComponent(r.toISOString())}`:r instanceof Object?wz(r,o):`${encodeURIComponent(o)}=${encodeURIComponent(String(r))}`}class ht{constructor(r,s=o=>o){this.raw=r,this.transformer=s}async value(){return this.transformer(await this.raw.json())}}class Hi{constructor(r){this.raw=r}async value(){}}class Qo{constructor(r){this.raw=r}async value(){return await this.raw.text()}}function GE(e){return KW(e)}function KW(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),description:e.description==null?void 0:e.description,id:e.id==null?void 0:e.id,label:e.label==null?void 0:e.label,make_target:e.make_target==null?void 0:e.make_target,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function sg(e){return VW(e)}function VW(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function HW(e){return GW(e,!1)}function GW(e,r=!1){return e==null?e:{annotation_ids:e.annotation_ids}}function XW(e){return YW(e,!1)}function YW(e,r=!1){return e==null?e:{server_id:e.server_id}}function ZW(e){return JW(e,!1)}function JW(e,r=!1){return e==null?e:{domain_id:e.domain_id}}function WW(e){return QW(e,!1)}function QW(e,r=!1){return e==null?e:{label_ids:e.label_ids}}function GM(e){return eQ(e,!1)}function eQ(e,r=!1){return e==null?e:{load_balancer_id:e.load_balancer_id}}function tQ(e){return nQ(e,!1)}function nQ(e,r=!1){return e==null?e:{node_pool_id:e.node_pool_id}}function rQ(e){return sQ(e,!1)}function sQ(e,r=!1){return e==null?e:{record_set_id:e.record_set_id}}function iQ(e){return aQ(e,!1)}function aQ(e,r=!1){return e==null?e:{server_ids:e.server_ids}}function oQ(e){return lQ(e,!1)}function lQ(e,r=!1){return e==null?e:{taint_ids:e.taint_ids}}function cQ(e){return uQ(e)}function uQ(e,r){return e==null?e:{auth_url:e.auth_url==null?void 0:e.auth_url}}function Sb(e){return dQ(e)}function dQ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,credential_id:e.credential_id==null?void 0:e.credential_id,domain_name:e.domain_name==null?void 0:e.domain_name,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,organization_id:e.organization_id==null?void 0:e.organization_id,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at,zone_id:e.zone_id==null?void 0:e.zone_id}}function ig(e){return hQ(e)}function hQ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,kind:e.kind==null?void 0:e.kind,name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,private_ip_address:e.private_ip_address==null?void 0:e.private_ip_address,public_ip_address:e.public_ip_address==null?void 0:e.public_ip_address,updated_at:e.updated_at==null?void 0:e.updated_at}}function ag(e){return pQ(e)}function pQ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,effect:e.effect==null?void 0:e.effect,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function og(e){return fQ(e)}function fQ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,key:e.key==null?void 0:e.key,organization_id:e.organization_id==null?void 0:e.organization_id,updated_at:e.updated_at==null?void 0:e.updated_at,value:e.value==null?void 0:e.value}}function Fd(e){return mQ(e)}function mQ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,hostname:e.hostname==null?void 0:e.hostname,id:e.id==null?void 0:e.id,organization_id:e.organization_id==null?void 0:e.organization_id,private_ip_address:e.private_ip_address==null?void 0:e.private_ip_address,public_ip_address:e.public_ip_address==null?void 0:e.public_ip_address,role:e.role==null?void 0:e.role,ssh_key_id:e.ssh_key_id==null?void 0:e.ssh_key_id,ssh_user:e.ssh_user==null?void 0:e.ssh_user,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at}}function Eb(e){return gQ(e)}function gQ(e,r){return e==null?e:{annotations:e.annotations==null?void 0:e.annotations.map(sg),created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,labels:e.labels==null?void 0:e.labels.map(og),name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,role:e.role==null?void 0:e.role,servers:e.servers==null?void 0:e.servers.map(Fd),taints:e.taints==null?void 0:e.taints.map(ag),updated_at:e.updated_at==null?void 0:e.updated_at}}function jb(e){return yQ(e)}function yQ(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,domain_id:e.domain_id==null?void 0:e.domain_id,fingerprint:e.fingerprint==null?void 0:e.fingerprint,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,name:e.name==null?void 0:e.name,owner:e.owner==null?void 0:e.owner,status:e.status==null?void 0:e.status,ttl:e.ttl==null?void 0:e.ttl,type:e.type==null?void 0:e.type,updated_at:e.updated_at==null?void 0:e.updated_at,values:e.values==null?void 0:e.values}}function Ps(e){return vQ(e)}function vQ(e,r){return e==null?e:{apps_load_balancer:e.apps_load_balancer==null?void 0:ig(e.apps_load_balancer),bastion_server:e.bastion_server==null?void 0:Fd(e.bastion_server),captain_domain:e.captain_domain==null?void 0:Sb(e.captain_domain),certificate_key:e.certificate_key==null?void 0:e.certificate_key,cluster_provider:e.cluster_provider==null?void 0:e.cluster_provider,control_plane_fqdn:e.control_plane_fqdn==null?void 0:e.control_plane_fqdn,control_plane_record_set:e.control_plane_record_set==null?void 0:jb(e.control_plane_record_set),created_at:e.created_at==null?void 0:e.created_at,docker_image:e.docker_image==null?void 0:e.docker_image,docker_tag:e.docker_tag==null?void 0:e.docker_tag,glueops_load_balancer:e.glueops_load_balancer==null?void 0:ig(e.glueops_load_balancer),id:e.id==null?void 0:e.id,kubeconfig:e.kubeconfig==null?void 0:e.kubeconfig,last_error:e.last_error==null?void 0:e.last_error,name:e.name==null?void 0:e.name,node_pools:e.node_pools==null?void 0:e.node_pools.map(Eb),org_key:e.org_key==null?void 0:e.org_key,org_secret:e.org_secret==null?void 0:e.org_secret,random_token:e.random_token==null?void 0:e.random_token,region:e.region==null?void 0:e.region,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:e.updated_at}}function qR(e){return xQ(e)}function xQ(e,r){return e==null?e:{action:e.action==null?void 0:e.action,cluster_id:e.cluster_id==null?void 0:e.cluster_id,created_at:e.created_at==null?void 0:new Date(e.created_at),error:e.error==null?void 0:e.error,finished_at:e.finished_at==null?void 0:new Date(e.finished_at),id:e.id==null?void 0:e.id,organization_id:e.organization_id==null?void 0:e.organization_id,status:e.status==null?void 0:e.status,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function bQ(e){return wQ(e,!1)}function wQ(e,r=!1){return e==null?e:{description:e.description,label:e.label,make_target:e.make_target}}function SQ(e){return EQ(e,!1)}function EQ(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function jQ(e){return CQ(e,!1)}function CQ(e,r=!1){return e==null?e:{cluster_provider:e.cluster_provider,docker_image:e.docker_image,docker_tag:e.docker_tag,name:e.name,region:e.region}}function AQ(e){return OQ(e,!1)}function OQ(e,r=!1){return e==null?e:{account_id:e.account_id,credential_provider:e.credential_provider,kind:e.kind,name:e.name,region:e.region,schema_version:e.schema_version,scope:e.scope,scope_kind:e.scope_kind,scope_version:e.scope_version,secret:e.secret}}function kQ(e){return RQ(e,!1)}function RQ(e,r=!1){return e==null?e:{credential_id:e.credential_id,domain_name:e.domain_name,zone_id:e.zone_id}}function TQ(e){return _Q(e,!1)}function _Q(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function $Q(e){return NQ(e,!1)}function NQ(e,r=!1){return e==null?e:{kind:e.kind,name:e.name,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address}}function DQ(e){return PQ(e,!1)}function PQ(e,r=!1){return e==null?e:{name:e.name,role:e.role}}function MQ(e){return IQ(e,!1)}function IQ(e,r=!1){return e==null?e:{name:e.name,ttl:e.ttl,type:e.type,values:e.values}}function zQ(e){return LQ(e,!1)}function LQ(e,r=!1){return e==null?e:{bits:e.bits,comment:e.comment,name:e.name,type:e.type}}function FQ(e){return qQ(e,!1)}function qQ(e,r=!1){return e==null?e:{hostname:e.hostname,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address,role:e.role,ssh_key_id:e.ssh_key_id,ssh_user:e.ssh_user,status:e.status}}function BQ(e){return UQ(e,!1)}function UQ(e,r=!1){return e==null?e:{effect:e.effect,key:e.key,value:e.value}}function XE(e){return KQ(e)}function KQ(e,r){return e==null?e:{account_id:e.account_id==null?void 0:e.account_id,created_at:e.created_at==null?void 0:e.created_at,credential_provider:e.credential_provider==null?void 0:e.credential_provider,id:e.id==null?void 0:e.id,kind:e.kind==null?void 0:e.kind,name:e.name==null?void 0:e.name,region:e.region==null?void 0:e.region,schema_version:e.schema_version==null?void 0:e.schema_version,scope:e.scope==null?void 0:e.scope,scope_kind:e.scope_kind==null?void 0:e.scope_kind,scope_version:e.scope_version==null?void 0:e.scope_version,updated_at:e.updated_at==null?void 0:e.updated_at}}function VQ(e){return HQ(e,!1)}function HQ(e,r=!1){return e==null?e:{payload:e.payload,queue:e.queue,run_at:e.run_at,type:e.type}}function GQ(e){return XQ(e)}function XQ(e,r){return e==null?e:{alg:e.alg==null?void 0:e.alg,e:e.e==null?void 0:e.e,kid:e.kid==null?void 0:e.kid,kty:e.kty==null?void 0:e.kty,n:e.n==null?void 0:e.n,use:e.use==null?void 0:e.use,x:e.x==null?void 0:e.x}}function YQ(e){return ZQ(e)}function ZQ(e,r){return e==null?e:{keys:e.keys==null?void 0:e.keys.map(GQ)}}function JQ(e){return WQ(e)}function WQ(e,r){return e}function bj(e){return QQ(e)}function QQ(e,r){return e==null?e:{attempts:e.attempts==null?void 0:e.attempts,created_at:e.created_at==null?void 0:e.created_at,id:e.id==null?void 0:e.id,last_error:e.last_error==null?void 0:e.last_error,max_attempts:e.max_attempts==null?void 0:e.max_attempts,payload:e.payload==null?void 0:e.payload,queue:e.queue==null?void 0:e.queue,run_at:e.run_at==null?void 0:e.run_at,status:e.status==null?void 0:JQ(e.status),type:e.type==null?void 0:e.type,updated_at:e.updated_at==null?void 0:e.updated_at}}function eee(e){return tee(e,!1)}function tee(e,r=!1){return e==null?e:{refresh_token:e.refresh_token}}function nee(e){return ree(e)}function ree(e,r){return e==null?e:{items:e.items==null?void 0:e.items.map(bj),page:e.page==null?void 0:e.page,page_size:e.page_size==null?void 0:e.page_size,total:e.total==null?void 0:e.total}}function see(e){return iee(e)}function iee(e,r){return e==null?e:{failed:e.failed==null?void 0:e.failed,name:e.name==null?void 0:e.name,pending:e.pending==null?void 0:e.pending,running:e.running==null?void 0:e.running,scheduled:e.scheduled==null?void 0:e.scheduled}}function aee(e){return oee(e,!1)}function oee(e,r=!1){return e==null?e:{refresh_token:e.refresh_token}}function lee(e){return cee(e,!1)}function cee(e,r=!1){return e==null?e:{kubeconfig:e.kubeconfig}}function XM(e){return Ez(e)}function Ez(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,fingerprint:e.fingerprint==null?void 0:e.fingerprint,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,organization_id:e.organization_id==null?void 0:e.organization_id,public_key:e.public_key==null?void 0:e.public_key,updated_at:e.updated_at==null?void 0:e.updated_at}}function YM(e){return uee(e)}function uee(e,r){return e==null?e:{access_token:e.access_token==null?void 0:e.access_token,expires_in:e.expires_in==null?void 0:e.expires_in,refresh_token:e.refresh_token==null?void 0:e.refresh_token,token_type:e.token_type==null?void 0:e.token_type}}function dee(e){return hee(e,!1)}function hee(e,r=!1){return e==null?e:{description:e.description,label:e.label,make_target:e.make_target}}function pee(e){return fee(e,!1)}function fee(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function mee(e){return gee(e,!1)}function gee(e,r=!1){return e==null?e:{cluster_provider:e.cluster_provider,docker_image:e.docker_image,docker_tag:e.docker_tag,name:e.name,region:e.region}}function yee(e){return vee(e,!1)}function vee(e,r=!1){return e==null?e:{account_id:e.account_id,name:e.name,region:e.region,scope:e.scope,scope_kind:e.scope_kind,scope_version:e.scope_version,secret:e.secret}}function xee(e){return bee(e,!1)}function bee(e,r=!1){return e==null?e:{credential_id:e.credential_id,domain_name:e.domain_name,status:e.status,zone_id:e.zone_id}}function wee(e){return See(e,!1)}function See(e,r=!1){return e==null?e:{key:e.key,value:e.value}}function Eee(e){return jee(e,!1)}function jee(e,r=!1){return e==null?e:{kind:e.kind,name:e.name,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address}}function Cee(e){return Aee(e,!1)}function Aee(e,r=!1){return e==null?e:{name:e.name,role:e.role}}function Oee(e){return kee(e,!1)}function kee(e,r=!1){return e==null?e:{name:e.name,status:e.status,ttl:e.ttl,type:e.type,values:e.values}}function Ree(e){return Tee(e,!1)}function Tee(e,r=!1){return e==null?e:{hostname:e.hostname,private_ip_address:e.private_ip_address,public_ip_address:e.public_ip_address,role:e.role,ssh_key_id:e.ssh_key_id,ssh_user:e.ssh_user,status:e.status}}function _ee(e){return $ee(e,!1)}function $ee(e,r=!1){return e==null?e:{effect:e.effect,key:e.key,value:e.value}}function Nee(e){return Dee(e)}function Dee(e,r){return e==null||typeof e!="object"?e:Ez(e)}function Pee(e){return Mee(e,!1)}function Mee(e,r=!1){return e==null?e:{expires_in_hours:e.expires_in_hours,name:e.name}}function jz(e){return Iee(e)}function Iee(e,r){return e==null?e:{avatar_url:e.avatar_url==null?void 0:e.avatar_url,created_at:e.created_at==null?void 0:new Date(e.created_at),display_name:e.display_name==null?void 0:e.display_name,id:e.id==null?void 0:e.id,is_admin:e.is_admin==null?void 0:e.is_admin,is_disabled:e.is_disabled==null?void 0:e.is_disabled,primary_email:e.primary_email==null?void 0:e.primary_email,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function zee(e){return Lee(e)}function Lee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),email:e.email==null?void 0:e.email,id:e.id==null?void 0:e.id,is_primary:e.is_primary==null?void 0:e.is_primary,is_verified:e.is_verified==null?void 0:e.is_verified,updated_at:e.updated_at==null?void 0:new Date(e.updated_at),user:e.user==null?void 0:jz(e.user),user_id:e.user_id==null?void 0:e.user_id}}function Cb(e){return Fee(e)}function Fee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:new Date(e.created_at),domain:e.domain==null?void 0:e.domain,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function qee(e){return Bee(e)}function Bee(e,r){return e==null?e:{avatar_url:e.avatar_url==null?void 0:e.avatar_url,created_at:e.created_at==null?void 0:new Date(e.created_at),display_name:e.display_name==null?void 0:e.display_name,emails:e.emails==null?void 0:e.emails.map(zee),id:e.id==null?void 0:e.id,is_admin:e.is_admin==null?void 0:e.is_admin,is_disabled:e.is_disabled==null?void 0:e.is_disabled,organizations:e.organizations==null?void 0:e.organizations.map(Cb),primary_email:e.primary_email==null?void 0:e.primary_email,updated_at:e.updated_at==null?void 0:new Date(e.updated_at)}}function ZM(e){return Uee(e)}function Uee(e,r){return e==null?e:{email:e.email==null?void 0:e.email,role:e.role==null?void 0:e.role,user_id:e.user_id==null?void 0:e.user_id}}function Kee(e){return Vee(e,!1)}function Vee(e,r=!1){return e==null?e:{role:e.role,user_id:e.user_id}}function Hee(e){return Gee(e,!1)}function Gee(e,r=!1){return e==null?e:{domain:e.domain,name:e.name}}function Xee(e){return Yee(e,!1)}function Yee(e,r=!1){return e==null?e:{expires_in_hours:e.expires_in_hours,name:e.name}}function Zee(e){return Jee(e)}function Jee(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,expires_at:e.expires_at==null?void 0:e.expires_at,id:e.id==null?void 0:e.id,name:e.name==null?void 0:e.name,org_key:e.org_key==null?void 0:e.org_key,org_secret:e.org_secret==null?void 0:e.org_secret,scope:e.scope==null?void 0:e.scope}}function Wee(e){return Qee(e,!1)}function Qee(e,r=!1){return e==null?e:{domain:e.domain,name:e.name}}function ete(e){return tte(e,!1)}function tte(e,r=!1){return e==null?e:{display_name:e.display_name}}function JM(e){return nte(e)}function nte(e,r){return e==null?e:{created_at:e.created_at==null?void 0:e.created_at,expires_at:e.expires_at==null?void 0:e.expires_at,id:e.id==null?void 0:e.id,last_used_at:e.last_used_at==null?void 0:e.last_used_at,name:e.name==null?void 0:e.name,plain:e.plain==null?void 0:e.plain,scope:e.scope==null?void 0:e.scope}}function rte(e){return ste(e)}function ste(e,r){return e==null?e:{cluster_id:e.cluster_id==null?void 0:e.cluster_id,created_at:e.created_at==null?void 0:new Date(e.created_at),expires_at:e.expires_at==null?void 0:new Date(e.expires_at),id:e.id==null?void 0:e.id,is_ephemeral:e.is_ephemeral==null?void 0:e.is_ephemeral,last_used_at:e.last_used_at==null?void 0:new Date(e.last_used_at),name:e.name==null?void 0:e.name,org_id:e.org_id==null?void 0:e.org_id,prefix:e.prefix==null?void 0:e.prefix,purpose:e.purpose==null?void 0:e.purpose,revoked:e.revoked==null?void 0:e.revoked,scope:e.scope==null?void 0:e.scope,updated_at:e.updated_at==null?void 0:new Date(e.updated_at),user_id:e.user_id==null?void 0:e.user_id}}class ite extends ks{async createActionRaw(r,s){if(r.dtoCreateActionRequest==null)throw new Qe("dtoCreateActionRequest",'Required parameter "dtoCreateActionRequest" was null or undefined when calling createAction().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/admin/actions",method:"POST",headers:u,query:o,body:bQ(r.dtoCreateActionRequest)},s);return new ht(m,g=>GE(g))}async createAction(r,s){return await(await this.createActionRaw(r,s)).value()}async deleteActionRaw(r,s){if(r.actionID==null)throw new Qe("actionID",'Required parameter "actionID" was null or undefined when calling deleteAction().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/admin/actions/{actionID}";h=h.replace("{actionID}",encodeURIComponent(String(r.actionID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async deleteAction(r,s){return await(await this.deleteActionRaw(r,s)).value()}async getActionRaw(r,s){if(r.actionID==null)throw new Qe("actionID",'Required parameter "actionID" was null or undefined when calling getAction().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/admin/actions/{actionID}";h=h.replace("{actionID}",encodeURIComponent(String(r.actionID)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>GE(g))}async getAction(r,s){return await(await this.getActionRaw(r,s)).value()}async listActionsRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const h=await this.request({path:"/admin/actions",method:"GET",headers:o,query:s},r);return new ht(h,m=>m.map(GE))}async listActions(r){return await(await this.listActionsRaw(r)).value()}async updateActionRaw(r,s){if(r.actionID==null)throw new Qe("actionID",'Required parameter "actionID" was null or undefined when calling updateAction().');if(r.dtoUpdateActionRequest==null)throw new Qe("dtoUpdateActionRequest",'Required parameter "dtoUpdateActionRequest" was null or undefined when calling updateAction().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/admin/actions/{actionID}";h=h.replace("{actionID}",encodeURIComponent(String(r.actionID)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:dee(r.dtoUpdateActionRequest)},s);return new ht(m,g=>GE(g))}async updateAction(r,s){return await(await this.updateActionRaw(r,s)).value()}}class ate extends ks{async createAnnotationRaw(r,s){if(r.dtoCreateAnnotationRequest==null)throw new Qe("dtoCreateAnnotationRequest",'Required parameter "dtoCreateAnnotationRequest" was null or undefined when calling createAnnotation().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/annotations",method:"POST",headers:u,query:o,body:SQ(r.dtoCreateAnnotationRequest)},s);return new ht(m,g=>sg(g))}async createAnnotation(r,s){return await(await this.createAnnotationRaw(r,s)).value()}async deleteAnnotationRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteAnnotation().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/annotations/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteAnnotation(r,s){await this.deleteAnnotationRaw(r,s)}async getAnnotationRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getAnnotation().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/annotations/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>sg(g))}async getAnnotation(r,s){return await(await this.getAnnotationRaw(r,s)).value()}async listAnnotationsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/annotations",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(sg))}async listAnnotations(r={},s){return await(await this.listAnnotationsRaw(r,s)).value()}async updateAnnotationRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateAnnotation().');if(r.dtoUpdateAnnotationRequest==null)throw new Qe("dtoUpdateAnnotationRequest",'Required parameter "dtoUpdateAnnotationRequest" was null or undefined when calling updateAnnotation().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/annotations/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:pee(r.dtoUpdateAnnotationRequest)},s);return new ht(m,g=>sg(g))}async updateAnnotation(r,s){return await(await this.updateAnnotationRaw(r,s)).value()}}class ote extends ks{async adminCancelArcherJobRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling adminCancelArcherJob().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/admin/archer/jobs/{id}/cancel";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:r.body},s);return new ht(m,g=>bj(g))}async adminCancelArcherJob(r,s){return await(await this.adminCancelArcherJobRaw(r,s)).value()}async adminEnqueueArcherJobRaw(r,s){if(r.dtoEnqueueRequest==null)throw new Qe("dtoEnqueueRequest",'Required parameter "dtoEnqueueRequest" was null or undefined when calling adminEnqueueArcherJob().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/admin/archer/jobs",method:"POST",headers:u,query:o,body:VQ(r.dtoEnqueueRequest)},s);return new ht(m,g=>bj(g))}async adminEnqueueArcherJob(r,s){return await(await this.adminEnqueueArcherJobRaw(r,s)).value()}async adminListArcherJobsRaw(r,s){const o={};r.status!=null&&(o.status=r.status),r.queue!=null&&(o.queue=r.queue),r.q!=null&&(o.q=r.q),r.page!=null&&(o.page=r.page),r.pageSize!=null&&(o.page_size=r.pageSize);const u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/admin/archer/jobs",method:"GET",headers:u,query:o},s);return new ht(m,g=>nee(g))}async adminListArcherJobs(r={},s){return await(await this.adminListArcherJobsRaw(r,s)).value()}async adminListArcherQueuesRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const h=await this.request({path:"/admin/archer/queues",method:"GET",headers:o,query:s},r);return new ht(h,m=>m.map(see))}async adminListArcherQueues(r){return await(await this.adminListArcherQueuesRaw(r)).value()}async adminRetryArcherJobRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling adminRetryArcherJob().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/admin/archer/jobs/{id}/retry";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:r.body},s);return new ht(m,g=>bj(g))}async adminRetryArcherJob(r,s){return await(await this.adminRetryArcherJobRaw(r,s)).value()}}const Da={queued:"queued",running:"running",succeeded:"succeeded",failed:"failed",canceled:"canceled",retrying:"retrying",scheduled:"scheduled"};class lte extends ks{async authCallbackRaw(r,s){if(r.provider==null)throw new Qe("provider",'Required parameter "provider" was null or undefined when calling authCallback().');const o={},u={};let h="/auth/{provider}/callback";h=h.replace("{provider}",encodeURIComponent(String(r.provider)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>YM(g))}async authCallback(r,s){return await(await this.authCallbackRaw(r,s)).value()}async authStartRaw(r,s){if(r.provider==null)throw new Qe("provider",'Required parameter "provider" was null or undefined when calling authStart().');const o={},u={};let h="/auth/{provider}/start";h=h.replace("{provider}",encodeURIComponent(String(r.provider)));const m=await this.request({path:h,method:"POST",headers:u,query:o},s);return new ht(m,g=>cQ(g))}async authStart(r,s){return await(await this.authStartRaw(r,s)).value()}async getJWKSRaw(r){const s={},o={},h=await this.request({path:"/.well-known/jwks.json",method:"GET",headers:o,query:s},r);return new ht(h,m=>YQ(m))}async getJWKS(r){return await(await this.getJWKSRaw(r)).value()}async logoutRaw(r,s){if(r.dtoLogoutRequest==null)throw new Qe("dtoLogoutRequest",'Required parameter "dtoLogoutRequest" was null or undefined when calling logout().');const o={},u={};u["Content-Type"]="application/json";const m=await this.request({path:"/auth/logout",method:"POST",headers:u,query:o,body:eee(r.dtoLogoutRequest)},s);return new Hi(m)}async logout(r,s){await this.logoutRaw(r,s)}async refreshRaw(r,s){if(r.dtoRefreshRequest==null)throw new Qe("dtoRefreshRequest",'Required parameter "dtoRefreshRequest" was null or undefined when calling refresh().');const o={},u={};u["Content-Type"]="application/json";const m=await this.request({path:"/auth/refresh",method:"POST",headers:u,query:o,body:aee(r.dtoRefreshRequest)},s);return new ht(m,g=>YM(g))}async refresh(r,s){return await(await this.refreshRaw(r,s)).value()}}class cte extends ks{async getClusterRunRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling getClusterRun().');if(r.runID==null)throw new Qe("runID",'Required parameter "runID" was null or undefined when calling getClusterRun().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/runs/{runID}";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID))),h=h.replace("{runID}",encodeURIComponent(String(r.runID)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>qR(g))}async getClusterRun(r,s){return await(await this.getClusterRunRaw(r,s)).value()}async listClusterRunsRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling listClusterRuns().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/runs";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(qR))}async listClusterRuns(r,s){return await(await this.listClusterRunsRaw(r,s)).value()}async runClusterActionRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling runClusterAction().');if(r.actionID==null)throw new Qe("actionID",'Required parameter "actionID" was null or undefined when calling runClusterAction().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/actions/{actionID}/runs";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID))),h=h.replace("{actionID}",encodeURIComponent(String(r.actionID)));const m=await this.request({path:h,method:"POST",headers:u,query:o},s);return new ht(m,g=>qR(g))}async runClusterAction(r,s){return await(await this.runClusterActionRaw(r,s)).value()}}class ute extends ks{async attachAppsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling attachAppsLoadBalancer().');if(r.dtoAttachLoadBalancerRequest==null)throw new Qe("dtoAttachLoadBalancerRequest",'Required parameter "dtoAttachLoadBalancerRequest" was null or undefined when calling attachAppsLoadBalancer().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/apps-load-balancer";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:GM(r.dtoAttachLoadBalancerRequest)},s);return new ht(m,g=>Ps(g))}async attachAppsLoadBalancer(r,s){return await(await this.attachAppsLoadBalancerRaw(r,s)).value()}async attachBastionServerRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling attachBastionServer().');if(r.dtoAttachBastionRequest==null)throw new Qe("dtoAttachBastionRequest",'Required parameter "dtoAttachBastionRequest" was null or undefined when calling attachBastionServer().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/bastion";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:XW(r.dtoAttachBastionRequest)},s);return new ht(m,g=>Ps(g))}async attachBastionServer(r,s){return await(await this.attachBastionServerRaw(r,s)).value()}async attachCaptainDomainRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling attachCaptainDomain().');if(r.dtoAttachCaptainDomainRequest==null)throw new Qe("dtoAttachCaptainDomainRequest",'Required parameter "dtoAttachCaptainDomainRequest" was null or undefined when calling attachCaptainDomain().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/captain-domain";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:ZW(r.dtoAttachCaptainDomainRequest)},s);return new ht(m,g=>Ps(g))}async attachCaptainDomain(r,s){return await(await this.attachCaptainDomainRaw(r,s)).value()}async attachControlPlaneRecordSetRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling attachControlPlaneRecordSet().');if(r.dtoAttachRecordSetRequest==null)throw new Qe("dtoAttachRecordSetRequest",'Required parameter "dtoAttachRecordSetRequest" was null or undefined when calling attachControlPlaneRecordSet().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/control-plane-record-set";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:rQ(r.dtoAttachRecordSetRequest)},s);return new ht(m,g=>Ps(g))}async attachControlPlaneRecordSet(r,s){return await(await this.attachControlPlaneRecordSetRaw(r,s)).value()}async attachGlueOpsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling attachGlueOpsLoadBalancer().');if(r.dtoAttachLoadBalancerRequest==null)throw new Qe("dtoAttachLoadBalancerRequest",'Required parameter "dtoAttachLoadBalancerRequest" was null or undefined when calling attachGlueOpsLoadBalancer().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/glueops-load-balancer";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:GM(r.dtoAttachLoadBalancerRequest)},s);return new ht(m,g=>Ps(g))}async attachGlueOpsLoadBalancer(r,s){return await(await this.attachGlueOpsLoadBalancerRaw(r,s)).value()}async attachNodePoolRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling attachNodePool().');if(r.dtoAttachNodePoolRequest==null)throw new Qe("dtoAttachNodePoolRequest",'Required parameter "dtoAttachNodePoolRequest" was null or undefined when calling attachNodePool().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/node-pools";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:tQ(r.dtoAttachNodePoolRequest)},s);return new ht(m,g=>Ps(g))}async attachNodePool(r,s){return await(await this.attachNodePoolRaw(r,s)).value()}async clearClusterKubeconfigRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling clearClusterKubeconfig().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/kubeconfig";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async clearClusterKubeconfig(r,s){return await(await this.clearClusterKubeconfigRaw(r,s)).value()}async createClusterRaw(r,s){if(r.dtoCreateClusterRequest==null)throw new Qe("dtoCreateClusterRequest",'Required parameter "dtoCreateClusterRequest" was null or undefined when calling createCluster().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/clusters",method:"POST",headers:u,query:o,body:jQ(r.dtoCreateClusterRequest)},s);return new ht(m,g=>Ps(g))}async createCluster(r,s){return await(await this.createClusterRaw(r,s)).value()}async deleteClusterRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling deleteCluster().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async deleteCluster(r,s){return await(await this.deleteClusterRaw(r,s)).value()}async detachAppsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling detachAppsLoadBalancer().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/apps-load-balancer";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async detachAppsLoadBalancer(r,s){return await(await this.detachAppsLoadBalancerRaw(r,s)).value()}async detachBastionServerRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling detachBastionServer().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/bastion";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async detachBastionServer(r,s){return await(await this.detachBastionServerRaw(r,s)).value()}async detachCaptainDomainRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling detachCaptainDomain().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/captain-domain";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async detachCaptainDomain(r,s){return await(await this.detachCaptainDomainRaw(r,s)).value()}async detachControlPlaneRecordSetRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling detachControlPlaneRecordSet().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/control-plane-record-set";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async detachControlPlaneRecordSet(r,s){return await(await this.detachControlPlaneRecordSetRaw(r,s)).value()}async detachGlueOpsLoadBalancerRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling detachGlueOpsLoadBalancer().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/glueops-load-balancer";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async detachGlueOpsLoadBalancer(r,s){return await(await this.detachGlueOpsLoadBalancerRaw(r,s)).value()}async detachNodePoolRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling detachNodePool().');if(r.nodePoolID==null)throw new Qe("nodePoolID",'Required parameter "nodePoolID" was null or undefined when calling detachNodePool().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/node-pools/{nodePoolID}";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID))),h=h.replace("{nodePoolID}",encodeURIComponent(String(r.nodePoolID)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async detachNodePool(r,s){return await(await this.detachNodePoolRaw(r,s)).value()}async getClusterRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling getCluster().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>Ps(g))}async getCluster(r,s){return await(await this.getClusterRaw(r,s)).value()}async listClustersRaw(r,s){const o={};r.q!=null&&(o.q=r.q);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/clusters",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(Ps))}async listClusters(r={},s){return await(await this.listClustersRaw(r,s)).value()}async setClusterKubeconfigRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling setClusterKubeconfig().');if(r.dtoSetKubeconfigRequest==null)throw new Qe("dtoSetKubeconfigRequest",'Required parameter "dtoSetKubeconfigRequest" was null or undefined when calling setClusterKubeconfig().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}/kubeconfig";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:lee(r.dtoSetKubeconfigRequest)},s);return new ht(m,g=>Ps(g))}async setClusterKubeconfig(r,s){return await(await this.setClusterKubeconfigRaw(r,s)).value()}async updateClusterRaw(r,s){if(r.clusterID==null)throw new Qe("clusterID",'Required parameter "clusterID" was null or undefined when calling updateCluster().');if(r.dtoUpdateClusterRequest==null)throw new Qe("dtoUpdateClusterRequest",'Required parameter "dtoUpdateClusterRequest" was null or undefined when calling updateCluster().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/clusters/{clusterID}";h=h.replace("{clusterID}",encodeURIComponent(String(r.clusterID)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:mee(r.dtoUpdateClusterRequest)},s);return new ht(m,g=>Ps(g))}async updateCluster(r,s){return await(await this.updateClusterRaw(r,s)).value()}}class dte extends ks{async createCredentialRaw(r,s){if(r.dtoCreateCredentialRequest==null)throw new Qe("dtoCreateCredentialRequest",'Required parameter "dtoCreateCredentialRequest" was null or undefined when calling createCredential().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/credentials",method:"POST",headers:u,query:o,body:AQ(r.dtoCreateCredentialRequest)},s);return new ht(m,g=>XE(g))}async createCredential(r,s){return await(await this.createCredentialRaw(r,s)).value()}async deleteCredentialRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteCredential().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/credentials/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteCredential(r,s){await this.deleteCredentialRaw(r,s)}async getCredentialRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getCredential().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/credentials/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>XE(g))}async getCredential(r,s){return await(await this.getCredentialRaw(r,s)).value()}async listCredentialsRaw(r,s){const o={};r.credentialProvider!=null&&(o.credential_provider=r.credentialProvider),r.kind!=null&&(o.kind=r.kind),r.scopeKind!=null&&(o.scope_kind=r.scopeKind);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/credentials",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(XE))}async listCredentials(r={},s){return await(await this.listCredentialsRaw(r,s)).value()}async revealCredentialRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling revealCredential().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/credentials/{id}/reveal";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:r.body},s);return new ht(m)}async revealCredential(r,s){return await(await this.revealCredentialRaw(r,s)).value()}async updateCredentialRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateCredential().');if(r.dtoUpdateCredentialRequest==null)throw new Qe("dtoUpdateCredentialRequest",'Required parameter "dtoUpdateCredentialRequest" was null or undefined when calling updateCredential().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/credentials/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:yee(r.dtoUpdateCredentialRequest)},s);return new ht(m,g=>XE(g))}async updateCredential(r,s){return await(await this.updateCredentialRaw(r,s)).value()}}class hte extends ks{async createDomainRaw(r,s){if(r.dtoCreateDomainRequest==null)throw new Qe("dtoCreateDomainRequest",'Required parameter "dtoCreateDomainRequest" was null or undefined when calling createDomain().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/dns/domains",method:"POST",headers:u,query:o,body:kQ(r.dtoCreateDomainRequest)},s);return new ht(m,g=>Sb(g))}async createDomain(r,s){return await(await this.createDomainRaw(r,s)).value()}async createRecordSetRaw(r,s){if(r.domainId==null)throw new Qe("domainId",'Required parameter "domainId" was null or undefined when calling createRecordSet().');if(r.dtoCreateRecordSetRequest==null)throw new Qe("dtoCreateRecordSetRequest",'Required parameter "dtoCreateRecordSetRequest" was null or undefined when calling createRecordSet().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/dns/domains/{domain_id}/records";h=h.replace("{domain_id}",encodeURIComponent(String(r.domainId)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:MQ(r.dtoCreateRecordSetRequest)},s);return new ht(m,g=>jb(g))}async createRecordSet(r,s){return await(await this.createRecordSetRaw(r,s)).value()}async deleteDomainRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteDomain().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/dns/domains/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteDomain(r,s){await this.deleteDomainRaw(r,s)}async deleteRecordSetRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteRecordSet().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/dns/records/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteRecordSet(r,s){await this.deleteRecordSetRaw(r,s)}async getDomainRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getDomain().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/dns/domains/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>Sb(g))}async getDomain(r,s){return await(await this.getDomainRaw(r,s)).value()}async getRecordSetRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getRecordSet().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID));let h="/dns/records/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>jb(g))}async getRecordSet(r,s){return await(await this.getRecordSetRaw(r,s)).value()}async listDomainsRaw(r,s){const o={};r.domainName!=null&&(o.domain_name=r.domainName),r.status!=null&&(o.status=r.status),r.q!=null&&(o.q=r.q);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/dns/domains",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(Sb))}async listDomains(r={},s){return await(await this.listDomainsRaw(r,s)).value()}async listRecordSetsRaw(r,s){if(r.domainId==null)throw new Qe("domainId",'Required parameter "domainId" was null or undefined when calling listRecordSets().');const o={};r.name!=null&&(o.name=r.name),r.type!=null&&(o.type=r.type),r.status!=null&&(o.status=r.status);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/dns/domains/{domain_id}/records";h=h.replace("{domain_id}",encodeURIComponent(String(r.domainId)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(jb))}async listRecordSets(r,s){return await(await this.listRecordSetsRaw(r,s)).value()}async updateDomainRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateDomain().');if(r.dtoUpdateDomainRequest==null)throw new Qe("dtoUpdateDomainRequest",'Required parameter "dtoUpdateDomainRequest" was null or undefined when calling updateDomain().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/dns/domains/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:xee(r.dtoUpdateDomainRequest)},s);return new ht(m,g=>Sb(g))}async updateDomain(r,s){return await(await this.updateDomainRaw(r,s)).value()}async updateRecordSetRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateRecordSet().');if(r.dtoUpdateRecordSetRequest==null)throw new Qe("dtoUpdateRecordSetRequest",'Required parameter "dtoUpdateRecordSetRequest" was null or undefined when calling updateRecordSet().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/dns/records/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:Oee(r.dtoUpdateRecordSetRequest)},s);return new ht(m,g=>jb(g))}async updateRecordSet(r,s){return await(await this.updateRecordSetRaw(r,s)).value()}}class pte extends ks{async createLabelRaw(r,s){if(r.dtoCreateLabelRequest==null)throw new Qe("dtoCreateLabelRequest",'Required parameter "dtoCreateLabelRequest" was null or undefined when calling createLabel().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/labels",method:"POST",headers:u,query:o,body:TQ(r.dtoCreateLabelRequest)},s);return new ht(m,g=>og(g))}async createLabel(r,s){return await(await this.createLabelRaw(r,s)).value()}async deleteLabelRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteLabel().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/labels/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteLabel(r,s){await this.deleteLabelRaw(r,s)}async getLabelRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getLabel().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/labels/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>og(g))}async getLabel(r,s){return await(await this.getLabelRaw(r,s)).value()}async listLabelsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/labels",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(og))}async listLabels(r={},s){return await(await this.listLabelsRaw(r,s)).value()}async updateLabelRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateLabel().');if(r.dtoUpdateLabelRequest==null)throw new Qe("dtoUpdateLabelRequest",'Required parameter "dtoUpdateLabelRequest" was null or undefined when calling updateLabel().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/labels/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:wee(r.dtoUpdateLabelRequest)},s);return new ht(m,g=>og(g))}async updateLabel(r,s){return await(await this.updateLabelRaw(r,s)).value()}}class fte extends ks{async createLoadBalancerRaw(r,s){if(r.dtoCreateLoadBalancerRequest==null)throw new Qe("dtoCreateLoadBalancerRequest",'Required parameter "dtoCreateLoadBalancerRequest" was null or undefined when calling createLoadBalancer().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/load-balancers",method:"POST",headers:u,query:o,body:$Q(r.dtoCreateLoadBalancerRequest)},s);return new ht(m,g=>ig(g))}async createLoadBalancer(r,s){return await(await this.createLoadBalancerRaw(r,s)).value()}async deleteLoadBalancerRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteLoadBalancer().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/load-balancers/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteLoadBalancer(r,s){await this.deleteLoadBalancerRaw(r,s)}async getLoadBalancersRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getLoadBalancers().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/load-balancers/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(ig))}async getLoadBalancers(r,s){return await(await this.getLoadBalancersRaw(r,s)).value()}async listLoadBalancersRaw(r,s){const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/load-balancers",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(ig))}async listLoadBalancers(r={},s){return await(await this.listLoadBalancersRaw(r,s)).value()}async updateLoadBalancerRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateLoadBalancer().');if(r.dtoUpdateLoadBalancerRequest==null)throw new Qe("dtoUpdateLoadBalancerRequest",'Required parameter "dtoUpdateLoadBalancerRequest" was null or undefined when calling updateLoadBalancer().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/load-balancers/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:Eee(r.dtoUpdateLoadBalancerRequest)},s);return new ht(m,g=>ig(g))}async updateLoadBalancer(r,s){return await(await this.updateLoadBalancerRaw(r,s)).value()}}class mte extends ks{async getMeRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const h=await this.request({path:"/me",method:"GET",headers:o,query:s},r);return new ht(h,m=>qee(m))}async getMe(r){return await(await this.getMeRaw(r)).value()}async updateMeRaw(r,s){if(r.handlersUpdateMeRequest==null)throw new Qe("handlersUpdateMeRequest",'Required parameter "handlersUpdateMeRequest" was null or undefined when calling updateMe().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/me",method:"PATCH",headers:u,query:o,body:ete(r.handlersUpdateMeRequest)},s);return new ht(m,g=>jz(g))}async updateMe(r,s){return await(await this.updateMeRaw(r,s)).value()}}class gte extends ks{async createUserAPIKeyRaw(r,s){if(r.handlersCreateUserKeyRequest==null)throw new Qe("handlersCreateUserKeyRequest",'Required parameter "handlersCreateUserKeyRequest" was null or undefined when calling createUserAPIKey().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/me/api-keys",method:"POST",headers:u,query:o,body:Pee(r.handlersCreateUserKeyRequest)},s);return new ht(m,g=>JM(g))}async createUserAPIKey(r,s){return await(await this.createUserAPIKeyRaw(r,s)).value()}async deleteUserAPIKeyRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteUserAPIKey().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/me/api-keys/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteUserAPIKey(r,s){await this.deleteUserAPIKeyRaw(r,s)}async listUserAPIKeysRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o["X-API-KEY"]=await this.configuration.apiKey("X-API-KEY")),this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const h=await this.request({path:"/me/api-keys",method:"GET",headers:o,query:s},r);return new ht(h,m=>m.map(JM))}async listUserAPIKeys(r){return await(await this.listUserAPIKeysRaw(r)).value()}}class yte extends ks{async attachNodePoolAnnotationsRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling attachNodePoolAnnotations().');if(r.dtoAttachAnnotationsRequest==null)throw new Qe("dtoAttachAnnotationsRequest",'Required parameter "dtoAttachAnnotationsRequest" was null or undefined when calling attachNodePoolAnnotations().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/annotations";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:HW(r.dtoAttachAnnotationsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async attachNodePoolAnnotations(r,s){return await(await this.attachNodePoolAnnotationsRaw(r,s)).value()}async attachNodePoolLabelsRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling attachNodePoolLabels().');if(r.dtoAttachLabelsRequest==null)throw new Qe("dtoAttachLabelsRequest",'Required parameter "dtoAttachLabelsRequest" was null or undefined when calling attachNodePoolLabels().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/labels";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:WW(r.dtoAttachLabelsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async attachNodePoolLabels(r,s){return await(await this.attachNodePoolLabelsRaw(r,s)).value()}async attachNodePoolServersRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling attachNodePoolServers().');if(r.dtoAttachServersRequest==null)throw new Qe("dtoAttachServersRequest",'Required parameter "dtoAttachServersRequest" was null or undefined when calling attachNodePoolServers().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/servers";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:iQ(r.dtoAttachServersRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async attachNodePoolServers(r,s){return await(await this.attachNodePoolServersRaw(r,s)).value()}async attachNodePoolTaintsRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling attachNodePoolTaints().');if(r.dtoAttachTaintsRequest==null)throw new Qe("dtoAttachTaintsRequest",'Required parameter "dtoAttachTaintsRequest" was null or undefined when calling attachNodePoolTaints().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/taints";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:oQ(r.dtoAttachTaintsRequest)},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async attachNodePoolTaints(r,s){return await(await this.attachNodePoolTaintsRaw(r,s)).value()}async createNodePoolRaw(r,s){if(r.dtoCreateNodePoolRequest==null)throw new Qe("dtoCreateNodePoolRequest",'Required parameter "dtoCreateNodePoolRequest" was null or undefined when calling createNodePool().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/node-pools",method:"POST",headers:u,query:o,body:DQ(r.dtoCreateNodePoolRequest)},s);return new ht(m,g=>Eb(g))}async createNodePool(r,s){return await(await this.createNodePoolRaw(r,s)).value()}async deleteNodePoolRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteNodePool().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteNodePool(r,s){await this.deleteNodePoolRaw(r,s)}async detachNodePoolAnnotationRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling detachNodePoolAnnotation().');if(r.annotationId==null)throw new Qe("annotationId",'Required parameter "annotationId" was null or undefined when calling detachNodePoolAnnotation().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/annotations/{annotationId}";h=h.replace("{id}",encodeURIComponent(String(r.id))),h=h.replace("{annotationId}",encodeURIComponent(String(r.annotationId)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async detachNodePoolAnnotation(r,s){return await(await this.detachNodePoolAnnotationRaw(r,s)).value()}async detachNodePoolLabelRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling detachNodePoolLabel().');if(r.labelId==null)throw new Qe("labelId",'Required parameter "labelId" was null or undefined when calling detachNodePoolLabel().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/labels/{labelId}";h=h.replace("{id}",encodeURIComponent(String(r.id))),h=h.replace("{labelId}",encodeURIComponent(String(r.labelId)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async detachNodePoolLabel(r,s){return await(await this.detachNodePoolLabelRaw(r,s)).value()}async detachNodePoolServerRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling detachNodePoolServer().');if(r.serverId==null)throw new Qe("serverId",'Required parameter "serverId" was null or undefined when calling detachNodePoolServer().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/servers/{serverId}";h=h.replace("{id}",encodeURIComponent(String(r.id))),h=h.replace("{serverId}",encodeURIComponent(String(r.serverId)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async detachNodePoolServer(r,s){return await(await this.detachNodePoolServerRaw(r,s)).value()}async detachNodePoolTaintRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling detachNodePoolTaint().');if(r.taintId==null)throw new Qe("taintId",'Required parameter "taintId" was null or undefined when calling detachNodePoolTaint().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/taints/{taintId}";h=h.replace("{id}",encodeURIComponent(String(r.id))),h=h.replace("{taintId}",encodeURIComponent(String(r.taintId)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async detachNodePoolTaint(r,s){return await(await this.detachNodePoolTaintRaw(r,s)).value()}async getNodePoolRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getNodePool().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>Eb(g))}async getNodePool(r,s){return await(await this.getNodePoolRaw(r,s)).value()}async listNodePoolAnnotationsRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling listNodePoolAnnotations().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/annotations";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(sg))}async listNodePoolAnnotations(r,s){return await(await this.listNodePoolAnnotationsRaw(r,s)).value()}async listNodePoolLabelsRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling listNodePoolLabels().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/labels";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(og))}async listNodePoolLabels(r,s){return await(await this.listNodePoolLabelsRaw(r,s)).value()}async listNodePoolServersRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling listNodePoolServers().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/servers";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(Fd))}async listNodePoolServers(r,s){return await(await this.listNodePoolServersRaw(r,s)).value()}async listNodePoolTaintsRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling listNodePoolTaints().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}/taints";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(ag))}async listNodePoolTaints(r,s){return await(await this.listNodePoolTaintsRaw(r,s)).value()}async listNodePoolsRaw(r,s){const o={};r.q!=null&&(o.q=r.q);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/node-pools",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(Eb))}async listNodePools(r={},s){return await(await this.listNodePoolsRaw(r,s)).value()}async updateNodePoolRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateNodePool().');if(r.dtoUpdateNodePoolRequest==null)throw new Qe("dtoUpdateNodePoolRequest",'Required parameter "dtoUpdateNodePoolRequest" was null or undefined when calling updateNodePool().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/node-pools/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:Cee(r.dtoUpdateNodePoolRequest)},s);return new ht(m,g=>Eb(g))}async updateNodePool(r,s){return await(await this.updateNodePoolRaw(r,s)).value()}}class vte extends ks{async addOrUpdateMemberRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling addOrUpdateMember().');if(r.handlersMemberUpsertReq==null)throw new Qe("handlersMemberUpsertReq",'Required parameter "handlersMemberUpsertReq" was null or undefined when calling addOrUpdateMember().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}/members";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:Kee(r.handlersMemberUpsertReq)},s);return new ht(m,g=>ZM(g))}async addOrUpdateMember(r,s){return await(await this.addOrUpdateMemberRaw(r,s)).value()}async createOrgRaw(r,s){if(r.handlersOrgCreateReq==null)throw new Qe("handlersOrgCreateReq",'Required parameter "handlersOrgCreateReq" was null or undefined when calling createOrg().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/orgs",method:"POST",headers:u,query:o,body:Hee(r.handlersOrgCreateReq)},s);return new ht(m,g=>Cb(g))}async createOrg(r,s){return await(await this.createOrgRaw(r,s)).value()}async createOrgKeyRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling createOrgKey().');if(r.handlersOrgKeyCreateReq==null)throw new Qe("handlersOrgKeyCreateReq",'Required parameter "handlersOrgKeyCreateReq" was null or undefined when calling createOrgKey().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}/api-keys";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:Xee(r.handlersOrgKeyCreateReq)},s);return new ht(m,g=>Zee(g))}async createOrgKey(r,s){return await(await this.createOrgKeyRaw(r,s)).value()}async deleteOrgRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteOrg().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteOrg(r,s){await this.deleteOrgRaw(r,s)}async deleteOrgKeyRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteOrgKey().');if(r.keyId==null)throw new Qe("keyId",'Required parameter "keyId" was null or undefined when calling deleteOrgKey().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}/api-keys/{key_id}";h=h.replace("{id}",encodeURIComponent(String(r.id))),h=h.replace("{key_id}",encodeURIComponent(String(r.keyId)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteOrgKey(r,s){await this.deleteOrgKeyRaw(r,s)}async getOrgRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getOrg().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>Cb(g))}async getOrg(r,s){return await(await this.getOrgRaw(r,s)).value()}async listMembersRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling listMembers().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}/members";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(ZM))}async listMembers(r,s){return await(await this.listMembersRaw(r,s)).value()}async listMyOrgsRaw(r){const s={},o={};this.configuration&&this.configuration.apiKey&&(o.Authorization=await this.configuration.apiKey("Authorization"));const h=await this.request({path:"/orgs",method:"GET",headers:o,query:s},r);return new ht(h,m=>m.map(Cb))}async listMyOrgs(r){return await(await this.listMyOrgsRaw(r)).value()}async listOrgKeysRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling listOrgKeys().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}/api-keys";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(rte))}async listOrgKeys(r,s){return await(await this.listOrgKeysRaw(r,s)).value()}async removeMemberRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling removeMember().');if(r.userId==null)throw new Qe("userId",'Required parameter "userId" was null or undefined when calling removeMember().');const o={},u={};this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}/members/{user_id}";h=h.replace("{id}",encodeURIComponent(String(r.id))),h=h.replace("{user_id}",encodeURIComponent(String(r.userId)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async removeMember(r,s){await this.removeMemberRaw(r,s)}async updateOrgRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateOrg().');if(r.handlersOrgUpdateReq==null)throw new Qe("handlersOrgUpdateReq",'Required parameter "handlersOrgUpdateReq" was null or undefined when calling updateOrg().');const o={},u={};u["Content-Type"]="application/json",this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/orgs/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:Wee(r.handlersOrgUpdateReq)},s);return new ht(m,g=>Cb(g))}async updateOrg(r,s){return await(await this.updateOrgRaw(r,s)).value()}}class xte extends ks{async createServerRaw(r,s){if(r.dtoCreateServerRequest==null)throw new Qe("dtoCreateServerRequest",'Required parameter "dtoCreateServerRequest" was null or undefined when calling createServer().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/servers",method:"POST",headers:u,query:o,body:FQ(r.dtoCreateServerRequest)},s);return new ht(m,g=>Fd(g))}async createServer(r,s){return await(await this.createServerRaw(r,s)).value()}async deleteServerRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteServer().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/servers/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteServer(r,s){await this.deleteServerRaw(r,s)}async getServerRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getServer().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/servers/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>Fd(g))}async getServer(r,s){return await(await this.getServerRaw(r,s)).value()}async listServersRaw(r,s){const o={};r.status!=null&&(o.status=r.status),r.role!=null&&(o.role=r.role);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/servers",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(Fd))}async listServers(r={},s){return await(await this.listServersRaw(r,s)).value()}async resetServerHostKeyRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling resetServerHostKey().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/servers/{id}/reset-hostkey";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"POST",headers:u,query:o,body:r.body},s);return new ht(m,g=>Fd(g))}async resetServerHostKey(r,s){return await(await this.resetServerHostKeyRaw(r,s)).value()}async updateServerRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateServer().');if(r.dtoUpdateServerRequest==null)throw new Qe("dtoUpdateServerRequest",'Required parameter "dtoUpdateServerRequest" was null or undefined when calling updateServer().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/servers/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:Ree(r.dtoUpdateServerRequest)},s);return new ht(m,g=>Fd(g))}async updateServer(r,s){return await(await this.updateServerRaw(r,s)).value()}}class bte extends ks{async createSSHKeyRaw(r,s){if(r.dtoCreateSSHRequest==null)throw new Qe("dtoCreateSSHRequest",'Required parameter "dtoCreateSSHRequest" was null or undefined when calling createSSHKey().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/ssh",method:"POST",headers:u,query:o,body:zQ(r.dtoCreateSSHRequest)},s);return new ht(m,g=>XM(g))}async createSSHKey(r,s){return await(await this.createSSHKeyRaw(r,s)).value()}async deleteSSHKeyRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteSSHKey().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/ssh/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteSSHKey(r,s){await this.deleteSSHKeyRaw(r,s)}async downloadSSHKeyRaw(r,s){if(r.xOrgID==null)throw new Qe("xOrgID",'Required parameter "xOrgID" was null or undefined when calling downloadSSHKey().');if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling downloadSSHKey().');if(r.part==null)throw new Qe("part",'Required parameter "part" was null or undefined when calling downloadSSHKey().');const o={};r.part!=null&&(o.part=r.part);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/ssh/{id}/download";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return this.isJsonMime(m.headers.get("content-type"))?new ht(m):new Qo(m)}async downloadSSHKey(r,s){return await(await this.downloadSSHKeyRaw(r,s)).value()}async getSSHKeyRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getSSHKey().');const o={};r.reveal!=null&&(o.reveal=r.reveal);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/ssh/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>Nee(g))}async getSSHKey(r,s){return await(await this.getSSHKeyRaw(r,s)).value()}async listPublicSshKeysRaw(r,s){const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/ssh",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(XM))}async listPublicSshKeys(r={},s){return await(await this.listPublicSshKeysRaw(r,s)).value()}}class wte extends ks{async createTaintRaw(r,s){if(r.dtoCreateTaintRequest==null)throw new Qe("dtoCreateTaintRequest",'Required parameter "dtoCreateTaintRequest" was null or undefined when calling createTaint().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/taints",method:"POST",headers:u,query:o,body:BQ(r.dtoCreateTaintRequest)},s);return new ht(m,g=>ag(g))}async createTaint(r,s){return await(await this.createTaintRaw(r,s)).value()}async deleteTaintRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling deleteTaint().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/taints/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"DELETE",headers:u,query:o},s);return new Hi(m)}async deleteTaint(r,s){await this.deleteTaintRaw(r,s)}async getTaintRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling getTaint().');const o={},u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/taints/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"GET",headers:u,query:o},s);return new ht(m,g=>ag(g))}async getTaint(r,s){return await(await this.getTaintRaw(r,s)).value()}async listTaintsRaw(r,s){const o={};r.key!=null&&(o.key=r.key),r.value!=null&&(o.value=r.value),r.q!=null&&(o.q=r.q);const u={};r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));const m=await this.request({path:"/taints",method:"GET",headers:u,query:o},s);return new ht(m,g=>g.map(ag))}async listTaints(r={},s){return await(await this.listTaintsRaw(r,s)).value()}async updateTaintRaw(r,s){if(r.id==null)throw new Qe("id",'Required parameter "id" was null or undefined when calling updateTaint().');if(r.dtoUpdateTaintRequest==null)throw new Qe("dtoUpdateTaintRequest",'Required parameter "dtoUpdateTaintRequest" was null or undefined when calling updateTaint().');const o={},u={};u["Content-Type"]="application/json",r.xOrgID!=null&&(u["X-Org-ID"]=String(r.xOrgID)),this.configuration&&this.configuration.apiKey&&(u["X-ORG-KEY"]=await this.configuration.apiKey("X-ORG-KEY")),this.configuration&&this.configuration.apiKey&&(u["X-ORG-SECRET"]=await this.configuration.apiKey("X-ORG-SECRET")),this.configuration&&this.configuration.apiKey&&(u.Authorization=await this.configuration.apiKey("Authorization"));let h="/taints/{id}";h=h.replace("{id}",encodeURIComponent(String(r.id)));const m=await this.request({path:h,method:"PATCH",headers:u,query:o,body:_ee(r.dtoUpdateTaintRequest)},s);return new ht(m,g=>ag(g))}async updateTaint(r,s){return await(await this.updateTaintRaw(r,s)).value()}}const Q_="/api/v1";function Ste(){return new bz({basePath:Q_,accessToken:async()=>Xs.getAccessToken()??"",middleware:[{async pre(e){const r=new Headers(e.init?.headers??{});e.init?.body!=null&&!(e.init.body instanceof FormData)&&!(e.init.body instanceof Blob)&&!r.has("Content-Type")&&r.set("Content-Type","application/json");const o=Xs.getAccessToken();o&&r.set("Authorization",`Bearer ${o}`);const u=rl.get();return u&&r.set("X-Org-ID",u),{...e,init:{...e.init,headers:r}}},async post(e){return e.response}}]})}function ei(e){return new e(Ste())}function Ete(){return ei(lte)}function jte(){return ei(mte)}function Cte(){return ei(gte)}function CC(){return ei(vte)}function Ate(){return ei(bte)}function Ote(){return ei(xte)}function kte(){return ei(wte)}function Rte(){return ei(pte)}function Tte(){return ei(ate)}function _te(){return ei(ote)}function $te(){return ei(yte)}function Nte(){return ei(dte)}function Dte(){return ei(hte)}function Pte(){return ei(fte)}function Mte(){return ei(ute)}function Ite(){return ei(ite)}function zte(){return ei(cte)}let YE=null;async function Lte(){const e=Xs.get();if(!e?.refresh_token)return!1;try{const r=await fetch(`${Q_}/auth/refresh`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh_token:e.refresh_token})});if(!r.ok)return!1;const s=await r.json();return Xs.set(s),!0}catch{return!1}}async function WM(){return YE||(YE=Lte().finally(()=>{YE=null})),YE}function Fte(e){return e?.status===401||e?.cause?.status===401||e?.response?.status===401||e instanceof Response&&e.status===401}async function ct(e){Xs.willExpireSoon?.(30)&&await WM();try{return await e()}catch(r){if(!Fte(r)||!await WM())throw r;return await e()}}const QM=jte(),BR=Cte(),wp={getMe:()=>ct(async()=>await QM.getMe()),updateMe:e=>ct(async()=>await QM.updateMe({handlersUpdateMeRequest:e})),listKeys:()=>ct(async()=>await BR.listUserAPIKeys()),createKey:e=>ct(async()=>await BR.createUserAPIKey({handlersCreateUserKeyRequest:e})),deleteKey:e=>ct(async()=>(await BR.deleteUserAPIKey({id:e}),!0))},qte={footer:async()=>{const e=await fetch("/api/v1/version",{cache:"no-store"});if(!e.ok)throw new Error("failed to fetch version");return await e.json()}};function eI(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Gi(...e){return r=>{let s=!1;const o=e.map(u=>{const h=eI(u,r);return!s&&typeof h=="function"&&(s=!0),h});if(s)return()=>{for(let u=0;u<o.length;u++){const h=o[u];typeof h=="function"?h():eI(e[u],null)}}}}function Ln(...e){return T.useCallback(Gi(...e),e)}var Bte=Symbol.for("react.lazy"),Ij=q_[" use ".trim().toString()];function Ute(e){return typeof e=="object"&&e!==null&&"then"in e}function Cz(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Bte&&"_payload"in e&&Ute(e._payload)}function iw(e){const r=Kte(e),s=T.forwardRef((o,u)=>{let{children:h,...m}=o;Cz(h)&&typeof Ij=="function"&&(h=Ij(h._payload));const g=T.Children.toArray(h),b=g.find(Hte);if(b){const w=b.props.children,E=g.map(A=>A===b?T.Children.count(w)>1?T.Children.only(null):T.isValidElement(w)?w.props.children:null:A);return c.jsx(r,{...m,ref:u,children:T.isValidElement(w)?T.cloneElement(w,void 0,E):null})}return c.jsx(r,{...m,ref:u,children:h})});return s.displayName=`${e}.Slot`,s}var Tg=iw("Slot");function Kte(e){const r=T.forwardRef((s,o)=>{let{children:u,...h}=s;if(Cz(u)&&typeof Ij=="function"&&(u=Ij(u._payload)),T.isValidElement(u)){const m=Xte(u),g=Gte(h,u.props);return u.type!==T.Fragment&&(g.ref=o?Gi(o,m):m),T.cloneElement(u,g)}return T.Children.count(u)>1?T.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Vte=Symbol("radix.slottable");function Hte(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vte}function Gte(e,r){const s={...r};for(const o in r){const u=e[o],h=r[o];/^on[A-Z]/.test(o)?u&&h?s[o]=(...g)=>{const b=h(...g);return u(...g),b}:u&&(s[o]=u):o==="style"?s[o]={...u,...h}:o==="className"&&(s[o]=[u,h].filter(Boolean).join(" "))}return{...e,...s}}function Xte(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function Az(e){var r,s,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var u=e.length;for(r=0;r<u;r++)e[r]&&(s=Az(e[r]))&&(o&&(o+=" "),o+=s)}else for(s in e)e[s]&&(o&&(o+=" "),o+=s);return o}function Oz(){for(var e,r,s=0,o="",u=arguments.length;s<u;s++)(e=arguments[s])&&(r=Az(e))&&(o&&(o+=" "),o+=r);return o}const tI=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,nI=Oz,e2=(e,r)=>s=>{var o;if(r?.variants==null)return nI(e,s?.class,s?.className);const{variants:u,defaultVariants:h}=r,m=Object.keys(u).map(w=>{const E=s?.[w],A=h?.[w];if(E===null)return null;const k=tI(E)||tI(A);return u[w][k]}),g=s&&Object.entries(s).reduce((w,E)=>{let[A,k]=E;return k===void 0||(w[A]=k),w},{}),b=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((w,E)=>{let{class:A,className:k,...R}=E;return Object.entries(R).every(M=>{let[I,F]=M;return Array.isArray(F)?F.includes({...h,...g}[I]):{...h,...g}[I]===F})?[...w,A,k]:w},[]);return nI(e,m,b,s?.class,s?.className)},Yte=(e,r)=>{const s=new Array(e.length+r.length);for(let o=0;o<e.length;o++)s[o]=e[o];for(let o=0;o<r.length;o++)s[e.length+o]=r[o];return s},Zte=(e,r)=>({classGroupId:e,validator:r}),kz=(e=new Map,r=null,s)=>({nextPart:e,validators:r,classGroupId:s}),zj="-",rI=[],Jte="arbitrary..",Wte=e=>{const r=ene(e),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:m=>{if(m.startsWith("[")&&m.endsWith("]"))return Qte(m);const g=m.split(zj),b=g[0]===""&&g.length>1?1:0;return Rz(g,b,r)},getConflictingClassGroupIds:(m,g)=>{if(g){const b=o[m],w=s[m];return b?w?Yte(w,b):b:w||rI}return s[m]||rI}}},Rz=(e,r,s)=>{if(e.length-r===0)return s.classGroupId;const u=e[r],h=s.nextPart.get(u);if(h){const w=Rz(e,r+1,h);if(w)return w}const m=s.validators;if(m===null)return;const g=r===0?e.join(zj):e.slice(r).join(zj),b=m.length;for(let w=0;w<b;w++){const E=m[w];if(E.validator(g))return E.classGroupId}},Qte=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=e.slice(1,-1),s=r.indexOf(":"),o=r.slice(0,s);return o?Jte+o:void 0})(),ene=e=>{const{theme:r,classGroups:s}=e;return tne(s,r)},tne=(e,r)=>{const s=kz();for(const o in e){const u=e[o];t2(u,s,o,r)}return s},t2=(e,r,s,o)=>{const u=e.length;for(let h=0;h<u;h++){const m=e[h];nne(m,r,s,o)}},nne=(e,r,s,o)=>{if(typeof e=="string"){rne(e,r,s);return}if(typeof e=="function"){sne(e,r,s,o);return}ine(e,r,s,o)},rne=(e,r,s)=>{const o=e===""?r:Tz(r,e);o.classGroupId=s},sne=(e,r,s,o)=>{if(ane(e)){t2(e(o),r,s,o);return}r.validators===null&&(r.validators=[]),r.validators.push(Zte(s,e))},ine=(e,r,s,o)=>{const u=Object.entries(e),h=u.length;for(let m=0;m<h;m++){const[g,b]=u[m];t2(b,Tz(r,g),s,o)}},Tz=(e,r)=>{let s=e;const o=r.split(zj),u=o.length;for(let h=0;h<u;h++){const m=o[h];let g=s.nextPart.get(m);g||(g=kz(),s.nextPart.set(m,g)),s=g}return s},ane=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,one=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,s=Object.create(null),o=Object.create(null);const u=(h,m)=>{s[h]=m,r++,r>e&&(r=0,o=s,s=Object.create(null))};return{get(h){let m=s[h];if(m!==void 0)return m;if((m=o[h])!==void 0)return u(h,m),m},set(h,m){h in s?s[h]=m:u(h,m)}}},KT="!",sI=":",lne=[],iI=(e,r,s,o,u)=>({modifiers:e,hasImportantModifier:r,baseClassName:s,maybePostfixModifierPosition:o,isExternal:u}),cne=e=>{const{prefix:r,experimentalParseClassName:s}=e;let o=u=>{const h=[];let m=0,g=0,b=0,w;const E=u.length;for(let I=0;I<E;I++){const F=u[I];if(m===0&&g===0){if(F===sI){h.push(u.slice(b,I)),b=I+1;continue}if(F==="/"){w=I;continue}}F==="["?m++:F==="]"?m--:F==="("?g++:F===")"&&g--}const A=h.length===0?u:u.slice(b);let k=A,R=!1;A.endsWith(KT)?(k=A.slice(0,-1),R=!0):A.startsWith(KT)&&(k=A.slice(1),R=!0);const M=w&&w>b?w-b:void 0;return iI(h,R,k,M)};if(r){const u=r+sI,h=o;o=m=>m.startsWith(u)?h(m.slice(u.length)):iI(lne,!1,m,void 0,!0)}if(s){const u=o;o=h=>s({className:h,parseClassName:u})}return o},une=e=>{const r=new Map;return e.orderSensitiveModifiers.forEach((s,o)=>{r.set(s,1e6+o)}),s=>{const o=[];let u=[];for(let h=0;h<s.length;h++){const m=s[h],g=m[0]==="[",b=r.has(m);g||b?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(m)):u.push(m)}return u.length>0&&(u.sort(),o.push(...u)),o}},dne=e=>({cache:one(e.cacheSize),parseClassName:cne(e),sortModifiers:une(e),...Wte(e)}),hne=/\s+/,pne=(e,r)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:h}=r,m=[],g=e.trim().split(hne);let b="";for(let w=g.length-1;w>=0;w-=1){const E=g[w],{isExternal:A,modifiers:k,hasImportantModifier:R,baseClassName:M,maybePostfixModifierPosition:I}=s(E);if(A){b=E+(b.length>0?" "+b:b);continue}let F=!!I,H=o(F?M.substring(0,I):M);if(!H){if(!F){b=E+(b.length>0?" "+b:b);continue}if(H=o(M),!H){b=E+(b.length>0?" "+b:b);continue}F=!1}const V=k.length===0?"":k.length===1?k[0]:h(k).join(":"),K=R?V+KT:V,z=K+H;if(m.indexOf(z)>-1)continue;m.push(z);const W=u(H,F);for(let ae=0;ae<W.length;++ae){const Q=W[ae];m.push(K+Q)}b=E+(b.length>0?" "+b:b)}return b},fne=(...e)=>{let r=0,s,o,u="";for(;r<e.length;)(s=e[r++])&&(o=_z(s))&&(u&&(u+=" "),u+=o);return u},_z=e=>{if(typeof e=="string")return e;let r,s="";for(let o=0;o<e.length;o++)e[o]&&(r=_z(e[o]))&&(s&&(s+=" "),s+=r);return s},mne=(e,...r)=>{let s,o,u,h;const m=b=>{const w=r.reduce((E,A)=>A(E),e());return s=dne(w),o=s.cache.get,u=s.cache.set,h=g,g(b)},g=b=>{const w=o(b);if(w)return w;const E=pne(b,s);return u(b,E),E};return h=m,(...b)=>h(fne(...b))},gne=[],Es=e=>{const r=s=>s[e]||gne;return r.isThemeGetter=!0,r},$z=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Nz=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yne=/^\d+\/\d+$/,vne=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xne=/\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$/,bne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wne=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sne=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Gm=e=>yne.test(e),Cn=e=>!!e&&!Number.isNaN(Number(e)),Pd=e=>!!e&&Number.isInteger(Number(e)),UR=e=>e.endsWith("%")&&Cn(e.slice(0,-1)),hu=e=>vne.test(e),Ene=()=>!0,jne=e=>xne.test(e)&&!bne.test(e),Dz=()=>!1,Cne=e=>wne.test(e),Ane=e=>Sne.test(e),One=e=>!It(e)&&!zt(e),kne=e=>_g(e,Iz,Dz),It=e=>$z.test(e),vp=e=>_g(e,zz,jne),KR=e=>_g(e,Nne,Cn),aI=e=>_g(e,Pz,Dz),Rne=e=>_g(e,Mz,Ane),ZE=e=>_g(e,Lz,Cne),zt=e=>Nz.test(e),cb=e=>$g(e,zz),Tne=e=>$g(e,Dne),oI=e=>$g(e,Pz),_ne=e=>$g(e,Iz),$ne=e=>$g(e,Mz),JE=e=>$g(e,Lz,!0),_g=(e,r,s)=>{const o=$z.exec(e);return o?o[1]?r(o[1]):s(o[2]):!1},$g=(e,r,s=!1)=>{const o=Nz.exec(e);return o?o[1]?r(o[1]):s:!1},Pz=e=>e==="position"||e==="percentage",Mz=e=>e==="image"||e==="url",Iz=e=>e==="length"||e==="size"||e==="bg-size",zz=e=>e==="length",Nne=e=>e==="number",Dne=e=>e==="family-name",Lz=e=>e==="shadow",Pne=()=>{const e=Es("color"),r=Es("font"),s=Es("text"),o=Es("font-weight"),u=Es("tracking"),h=Es("leading"),m=Es("breakpoint"),g=Es("container"),b=Es("spacing"),w=Es("radius"),E=Es("shadow"),A=Es("inset-shadow"),k=Es("text-shadow"),R=Es("drop-shadow"),M=Es("blur"),I=Es("perspective"),F=Es("aspect"),H=Es("ease"),V=Es("animate"),K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],W=()=>[...z(),zt,It],ae=()=>["auto","hidden","clip","visible","scroll"],Q=()=>["auto","contain","none"],te=()=>[zt,It,b],de=()=>[Gm,"full","auto",...te()],je=()=>[Pd,"none","subgrid",zt,It],we=()=>["auto",{span:["full",Pd,zt,It]},Pd,zt,It],ie=()=>[Pd,"auto",zt,It],Se=()=>["auto","min","max","fr",zt,It],Ae=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],He=()=>["start","end","center","stretch","center-safe","end-safe"],ue=()=>["auto",...te()],ne=()=>[Gm,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...te()],ce=()=>[e,zt,It],$e=()=>[...z(),oI,aI,{position:[zt,It]}],me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Xe=()=>["auto","cover","contain",_ne,kne,{size:[zt,It]}],Oe=()=>[UR,cb,vp],Te=()=>["","none","full",w,zt,It],Ke=()=>["",Cn,cb,vp],se=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Fe=()=>[Cn,UR,oI,aI],at=()=>["","none",M,zt,It],gt=()=>["none",Cn,zt,It],Ot=()=>["none",Cn,zt,It],Lt=()=>[Cn,zt,It],Rt=()=>[Gm,"full",...te()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[hu],breakpoint:[hu],color:[Ene],container:[hu],"drop-shadow":[hu],ease:["in","out","in-out"],font:[One],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[hu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[hu],shadow:[hu],spacing:["px",Cn],text:[hu],"text-shadow":[hu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Gm,It,zt,F]}],container:["container"],columns:[{columns:[Cn,It,zt,g]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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:W()}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:Q()}],"overscroll-x":[{"overscroll-x":Q()}],"overscroll-y":[{"overscroll-y":Q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:de()}],"inset-x":[{"inset-x":de()}],"inset-y":[{"inset-y":de()}],start:[{start:de()}],end:[{end:de()}],top:[{top:de()}],right:[{right:de()}],bottom:[{bottom:de()}],left:[{left:de()}],visibility:["visible","invisible","collapse"],z:[{z:[Pd,"auto",zt,It]}],basis:[{basis:[Gm,"full","auto",g,...te()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Cn,Gm,"auto","initial","none",It]}],grow:[{grow:["",Cn,zt,It]}],shrink:[{shrink:["",Cn,zt,It]}],order:[{order:[Pd,"first","last","none",zt,It]}],"grid-cols":[{"grid-cols":je()}],"col-start-end":[{col:we()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":je()}],"row-start-end":[{row:we()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Se()}],"auto-rows":[{"auto-rows":Se()}],gap:[{gap:te()}],"gap-x":[{"gap-x":te()}],"gap-y":[{"gap-y":te()}],"justify-content":[{justify:[...Ae(),"normal"]}],"justify-items":[{"justify-items":[...He(),"normal"]}],"justify-self":[{"justify-self":["auto",...He()]}],"align-content":[{content:["normal",...Ae()]}],"align-items":[{items:[...He(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...He(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ae()}],"place-items":[{"place-items":[...He(),"baseline"]}],"place-self":[{"place-self":["auto",...He()]}],p:[{p:te()}],px:[{px:te()}],py:[{py:te()}],ps:[{ps:te()}],pe:[{pe:te()}],pt:[{pt:te()}],pr:[{pr:te()}],pb:[{pb:te()}],pl:[{pl:te()}],m:[{m:ue()}],mx:[{mx:ue()}],my:[{my:ue()}],ms:[{ms:ue()}],me:[{me:ue()}],mt:[{mt:ue()}],mr:[{mr:ue()}],mb:[{mb:ue()}],ml:[{ml:ue()}],"space-x":[{"space-x":te()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":te()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],w:[{w:[g,"screen",...ne()]}],"min-w":[{"min-w":[g,"screen","none",...ne()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[m]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",s,cb,vp]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,zt,KR]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",UR,It]}],"font-family":[{font:[Tne,It,r]}],"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:[u,zt,It]}],"line-clamp":[{"line-clamp":[Cn,"none",zt,KR]}],leading:[{leading:[h,...te()]}],"list-image":[{"list-image":["none",zt,It]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",zt,It]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ce()}],"text-color":[{text:ce()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Cn,"from-font","auto",zt,vp]}],"text-decoration-color":[{decoration:ce()}],"underline-offset":[{"underline-offset":[Cn,"auto",zt,It]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:te()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",zt,It]}],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",zt,It]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$e()}],"bg-repeat":[{bg:me()}],"bg-size":[{bg:Xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Pd,zt,It],radial:["",zt,It],conic:[Pd,zt,It]},$ne,Rne]}],"bg-color":[{bg:ce()}],"gradient-from-pos":[{from:Oe()}],"gradient-via-pos":[{via:Oe()}],"gradient-to-pos":[{to:Oe()}],"gradient-from":[{from:ce()}],"gradient-via":[{via:ce()}],"gradient-to":[{to:ce()}],rounded:[{rounded:Te()}],"rounded-s":[{"rounded-s":Te()}],"rounded-e":[{"rounded-e":Te()}],"rounded-t":[{"rounded-t":Te()}],"rounded-r":[{"rounded-r":Te()}],"rounded-b":[{"rounded-b":Te()}],"rounded-l":[{"rounded-l":Te()}],"rounded-ss":[{"rounded-ss":Te()}],"rounded-se":[{"rounded-se":Te()}],"rounded-ee":[{"rounded-ee":Te()}],"rounded-es":[{"rounded-es":Te()}],"rounded-tl":[{"rounded-tl":Te()}],"rounded-tr":[{"rounded-tr":Te()}],"rounded-br":[{"rounded-br":Te()}],"rounded-bl":[{"rounded-bl":Te()}],"border-w":[{border:Ke()}],"border-w-x":[{"border-x":Ke()}],"border-w-y":[{"border-y":Ke()}],"border-w-s":[{"border-s":Ke()}],"border-w-e":[{"border-e":Ke()}],"border-w-t":[{"border-t":Ke()}],"border-w-r":[{"border-r":Ke()}],"border-w-b":[{"border-b":Ke()}],"border-w-l":[{"border-l":Ke()}],"divide-x":[{"divide-x":Ke()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ke()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:ce()}],"border-color-x":[{"border-x":ce()}],"border-color-y":[{"border-y":ce()}],"border-color-s":[{"border-s":ce()}],"border-color-e":[{"border-e":ce()}],"border-color-t":[{"border-t":ce()}],"border-color-r":[{"border-r":ce()}],"border-color-b":[{"border-b":ce()}],"border-color-l":[{"border-l":ce()}],"divide-color":[{divide:ce()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Cn,zt,It]}],"outline-w":[{outline:["",Cn,cb,vp]}],"outline-color":[{outline:ce()}],shadow:[{shadow:["","none",E,JE,ZE]}],"shadow-color":[{shadow:ce()}],"inset-shadow":[{"inset-shadow":["none",A,JE,ZE]}],"inset-shadow-color":[{"inset-shadow":ce()}],"ring-w":[{ring:Ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ce()}],"ring-offset-w":[{"ring-offset":[Cn,vp]}],"ring-offset-color":[{"ring-offset":ce()}],"inset-ring-w":[{"inset-ring":Ke()}],"inset-ring-color":[{"inset-ring":ce()}],"text-shadow":[{"text-shadow":["none",k,JE,ZE]}],"text-shadow-color":[{"text-shadow":ce()}],opacity:[{opacity:[Cn,zt,It]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"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":[Cn]}],"mask-image-linear-from-pos":[{"mask-linear-from":Fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":Fe()}],"mask-image-linear-from-color":[{"mask-linear-from":ce()}],"mask-image-linear-to-color":[{"mask-linear-to":ce()}],"mask-image-t-from-pos":[{"mask-t-from":Fe()}],"mask-image-t-to-pos":[{"mask-t-to":Fe()}],"mask-image-t-from-color":[{"mask-t-from":ce()}],"mask-image-t-to-color":[{"mask-t-to":ce()}],"mask-image-r-from-pos":[{"mask-r-from":Fe()}],"mask-image-r-to-pos":[{"mask-r-to":Fe()}],"mask-image-r-from-color":[{"mask-r-from":ce()}],"mask-image-r-to-color":[{"mask-r-to":ce()}],"mask-image-b-from-pos":[{"mask-b-from":Fe()}],"mask-image-b-to-pos":[{"mask-b-to":Fe()}],"mask-image-b-from-color":[{"mask-b-from":ce()}],"mask-image-b-to-color":[{"mask-b-to":ce()}],"mask-image-l-from-pos":[{"mask-l-from":Fe()}],"mask-image-l-to-pos":[{"mask-l-to":Fe()}],"mask-image-l-from-color":[{"mask-l-from":ce()}],"mask-image-l-to-color":[{"mask-l-to":ce()}],"mask-image-x-from-pos":[{"mask-x-from":Fe()}],"mask-image-x-to-pos":[{"mask-x-to":Fe()}],"mask-image-x-from-color":[{"mask-x-from":ce()}],"mask-image-x-to-color":[{"mask-x-to":ce()}],"mask-image-y-from-pos":[{"mask-y-from":Fe()}],"mask-image-y-to-pos":[{"mask-y-to":Fe()}],"mask-image-y-from-color":[{"mask-y-from":ce()}],"mask-image-y-to-color":[{"mask-y-to":ce()}],"mask-image-radial":[{"mask-radial":[zt,It]}],"mask-image-radial-from-pos":[{"mask-radial-from":Fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":Fe()}],"mask-image-radial-from-color":[{"mask-radial-from":ce()}],"mask-image-radial-to-color":[{"mask-radial-to":ce()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[Cn]}],"mask-image-conic-from-pos":[{"mask-conic-from":Fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":Fe()}],"mask-image-conic-from-color":[{"mask-conic-from":ce()}],"mask-image-conic-to-color":[{"mask-conic-to":ce()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$e()}],"mask-repeat":[{mask:me()}],"mask-size":[{mask:Xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",zt,It]}],filter:[{filter:["","none",zt,It]}],blur:[{blur:at()}],brightness:[{brightness:[Cn,zt,It]}],contrast:[{contrast:[Cn,zt,It]}],"drop-shadow":[{"drop-shadow":["","none",R,JE,ZE]}],"drop-shadow-color":[{"drop-shadow":ce()}],grayscale:[{grayscale:["",Cn,zt,It]}],"hue-rotate":[{"hue-rotate":[Cn,zt,It]}],invert:[{invert:["",Cn,zt,It]}],saturate:[{saturate:[Cn,zt,It]}],sepia:[{sepia:["",Cn,zt,It]}],"backdrop-filter":[{"backdrop-filter":["","none",zt,It]}],"backdrop-blur":[{"backdrop-blur":at()}],"backdrop-brightness":[{"backdrop-brightness":[Cn,zt,It]}],"backdrop-contrast":[{"backdrop-contrast":[Cn,zt,It]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Cn,zt,It]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Cn,zt,It]}],"backdrop-invert":[{"backdrop-invert":["",Cn,zt,It]}],"backdrop-opacity":[{"backdrop-opacity":[Cn,zt,It]}],"backdrop-saturate":[{"backdrop-saturate":[Cn,zt,It]}],"backdrop-sepia":[{"backdrop-sepia":["",Cn,zt,It]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":te()}],"border-spacing-x":[{"border-spacing-x":te()}],"border-spacing-y":[{"border-spacing-y":te()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",zt,It]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Cn,"initial",zt,It]}],ease:[{ease:["linear","initial",H,zt,It]}],delay:[{delay:[Cn,zt,It]}],animate:[{animate:["none",V,zt,It]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[I,zt,It]}],"perspective-origin":[{"perspective-origin":W()}],rotate:[{rotate:gt()}],"rotate-x":[{"rotate-x":gt()}],"rotate-y":[{"rotate-y":gt()}],"rotate-z":[{"rotate-z":gt()}],scale:[{scale:Ot()}],"scale-x":[{"scale-x":Ot()}],"scale-y":[{"scale-y":Ot()}],"scale-z":[{"scale-z":Ot()}],"scale-3d":["scale-3d"],skew:[{skew:Lt()}],"skew-x":[{"skew-x":Lt()}],"skew-y":[{"skew-y":Lt()}],transform:[{transform:[zt,It,"","none","gpu","cpu"]}],"transform-origin":[{origin:W()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Rt()}],"translate-x":[{"translate-x":Rt()}],"translate-y":[{"translate-y":Rt()}],"translate-z":[{"translate-z":Rt()}],"translate-none":["translate-none"],accent:[{accent:ce()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ce()}],"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",zt,It]}],"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":te()}],"scroll-mx":[{"scroll-mx":te()}],"scroll-my":[{"scroll-my":te()}],"scroll-ms":[{"scroll-ms":te()}],"scroll-me":[{"scroll-me":te()}],"scroll-mt":[{"scroll-mt":te()}],"scroll-mr":[{"scroll-mr":te()}],"scroll-mb":[{"scroll-mb":te()}],"scroll-ml":[{"scroll-ml":te()}],"scroll-p":[{"scroll-p":te()}],"scroll-px":[{"scroll-px":te()}],"scroll-py":[{"scroll-py":te()}],"scroll-ps":[{"scroll-ps":te()}],"scroll-pe":[{"scroll-pe":te()}],"scroll-pt":[{"scroll-pt":te()}],"scroll-pr":[{"scroll-pr":te()}],"scroll-pb":[{"scroll-pb":te()}],"scroll-pl":[{"scroll-pl":te()}],"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",zt,It]}],fill:[{fill:["none",...ce()]}],"stroke-w":[{stroke:[Cn,cb,vp,KR]}],stroke:[{stroke:["none",...ce()]}],"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"]}},Mne=mne(Pne);function vt(...e){return Mne(Oz(e))}function za(e,r=24){return!e||e.length<=r*2+3?e:`${e.slice(0,r)}…${e.slice(-r)}`}const Ine=e2("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 rr({className:e,variant:r,asChild:s=!1,...o}){const u=s?Tg:"span";return c.jsx(u,{"data-slot":"badge",className:vt(Ine({variant:r}),e),...o})}const n2=e2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md 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-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Pe({className:e,variant:r,size:s,asChild:o=!1,...u}){const h=o?Tg:"button";return c.jsx(h,{"data-slot":"button",className:vt(n2({variant:r,size:s,className:e})),...u})}var zne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lne=zne.reduce((e,r)=>{const s=iw(`Primitive.${r}`),o=T.forwardRef((u,h)=>{const{asChild:m,...g}=u,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(b,{...g,ref:h})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),Fne="Separator",lI="horizontal",qne=["horizontal","vertical"],Fz=T.forwardRef((e,r)=>{const{decorative:s,orientation:o=lI,...u}=e,h=Bne(o)?o:lI,g=s?{role:"none"}:{"aria-orientation":h==="vertical"?h:void 0,role:"separator"};return c.jsx(Lne.div,{"data-orientation":h,...g,...u,ref:r})});Fz.displayName=Fne;function Bne(e){return qne.includes(e)}var Une=Fz;function Ab({className:e,orientation:r="horizontal",decorative:s=!0,...o}){return c.jsx(Une,{"data-slot":"separator",decorative:s,orientation:r,className:vt("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...o})}function Nt(e,r,{checkForDefaultPrevented:s=!0}={}){return function(u){if(e?.(u),s===!1||!u.defaultPrevented)return r?.(u)}}function Kne(e,r){const s=T.createContext(r),o=h=>{const{children:m,...g}=h,b=T.useMemo(()=>g,Object.values(g));return c.jsx(s.Provider,{value:b,children:m})};o.displayName=e+"Provider";function u(h){const m=T.useContext(s);if(m)return m;if(r!==void 0)return r;throw new Error(`\`${h}\` must be used within \`${e}\``)}return[o,u]}function cl(e,r=[]){let s=[];function o(h,m){const g=T.createContext(m),b=s.length;s=[...s,m];const w=A=>{const{scope:k,children:R,...M}=A,I=k?.[e]?.[b]||g,F=T.useMemo(()=>M,Object.values(M));return c.jsx(I.Provider,{value:F,children:R})};w.displayName=h+"Provider";function E(A,k){const R=k?.[e]?.[b]||g,M=T.useContext(R);if(M)return M;if(m!==void 0)return m;throw new Error(`\`${A}\` must be used within \`${h}\``)}return[w,E]}const u=()=>{const h=s.map(m=>T.createContext(m));return function(g){const b=g?.[e]||h;return T.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return u.scopeName=e,[o,Vne(u,...r)]}function Vne(...e){const r=e[0];if(e.length===1)return r;const s=()=>{const o=e.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(h){const m=o.reduce((g,{useScope:b,scopeName:w})=>{const A=b(h)[`__scope${w}`];return{...g,...A}},{});return T.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])}};return s.scopeName=r.scopeName,s}function Hne(e){const r=Gne(e),s=T.forwardRef((o,u)=>{const{children:h,...m}=o,g=T.Children.toArray(h),b=g.find(Yne);if(b){const w=b.props.children,E=g.map(A=>A===b?T.Children.count(w)>1?T.Children.only(null):T.isValidElement(w)?w.props.children:null:A);return c.jsx(r,{...m,ref:u,children:T.isValidElement(w)?T.cloneElement(w,void 0,E):null})}return c.jsx(r,{...m,ref:u,children:h})});return s.displayName=`${e}.Slot`,s}function Gne(e){const r=T.forwardRef((s,o)=>{const{children:u,...h}=s;if(T.isValidElement(u)){const m=Jne(u),g=Zne(h,u.props);return u.type!==T.Fragment&&(g.ref=o?Gi(o,m):m),T.cloneElement(u,g)}return T.Children.count(u)>1?T.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Xne=Symbol("radix.slottable");function Yne(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Xne}function Zne(e,r){const s={...r};for(const o in r){const u=e[o],h=r[o];/^on[A-Z]/.test(o)?u&&h?s[o]=(...g)=>{const b=h(...g);return u(...g),b}:u&&(s[o]=u):o==="style"?s[o]={...u,...h}:o==="className"&&(s[o]=[u,h].filter(Boolean).join(" "))}return{...e,...s}}function Jne(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var Wne=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],An=Wne.reduce((e,r)=>{const s=Hne(`Primitive.${r}`),o=T.forwardRef((u,h)=>{const{asChild:m,...g}=u,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(b,{...g,ref:h})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{});function qz(e,r){e&&SC.flushSync(()=>e.dispatchEvent(r))}function sl(e){const r=T.useRef(e);return T.useEffect(()=>{r.current=e}),T.useMemo(()=>(...s)=>r.current?.(...s),[])}function Qne(e,r=globalThis?.document){const s=sl(e);T.useEffect(()=>{const o=u=>{u.key==="Escape"&&s(u)};return r.addEventListener("keydown",o,{capture:!0}),()=>r.removeEventListener("keydown",o,{capture:!0})},[s,r])}var ere="DismissableLayer",VT="dismissableLayer.update",tre="dismissableLayer.pointerDownOutside",nre="dismissableLayer.focusOutside",cI,Bz=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ng=T.forwardRef((e,r)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:h,onInteractOutside:m,onDismiss:g,...b}=e,w=T.useContext(Bz),[E,A]=T.useState(null),k=E?.ownerDocument??globalThis?.document,[,R]=T.useState({}),M=Ln(r,Q=>A(Q)),I=Array.from(w.layers),[F]=[...w.layersWithOutsidePointerEventsDisabled].slice(-1),H=I.indexOf(F),V=E?I.indexOf(E):-1,K=w.layersWithOutsidePointerEventsDisabled.size>0,z=V>=H,W=ire(Q=>{const te=Q.target,de=[...w.branches].some(je=>je.contains(te));!z||de||(u?.(Q),m?.(Q),Q.defaultPrevented||g?.())},k),ae=are(Q=>{const te=Q.target;[...w.branches].some(je=>je.contains(te))||(h?.(Q),m?.(Q),Q.defaultPrevented||g?.())},k);return Qne(Q=>{V===w.layers.size-1&&(o?.(Q),!Q.defaultPrevented&&g&&(Q.preventDefault(),g()))},k),T.useEffect(()=>{if(E)return s&&(w.layersWithOutsidePointerEventsDisabled.size===0&&(cI=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),w.layersWithOutsidePointerEventsDisabled.add(E)),w.layers.add(E),uI(),()=>{s&&w.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=cI)}},[E,k,s,w]),T.useEffect(()=>()=>{E&&(w.layers.delete(E),w.layersWithOutsidePointerEventsDisabled.delete(E),uI())},[E,w]),T.useEffect(()=>{const Q=()=>R({});return document.addEventListener(VT,Q),()=>document.removeEventListener(VT,Q)},[]),c.jsx(An.div,{...b,ref:M,style:{pointerEvents:K?z?"auto":"none":void 0,...e.style},onFocusCapture:Nt(e.onFocusCapture,ae.onFocusCapture),onBlurCapture:Nt(e.onBlurCapture,ae.onBlurCapture),onPointerDownCapture:Nt(e.onPointerDownCapture,W.onPointerDownCapture)})});Ng.displayName=ere;var rre="DismissableLayerBranch",sre=T.forwardRef((e,r)=>{const s=T.useContext(Bz),o=T.useRef(null),u=Ln(r,o);return T.useEffect(()=>{const h=o.current;if(h)return s.branches.add(h),()=>{s.branches.delete(h)}},[s.branches]),c.jsx(An.div,{...e,ref:u})});sre.displayName=rre;function ire(e,r=globalThis?.document){const s=sl(e),o=T.useRef(!1),u=T.useRef(()=>{});return T.useEffect(()=>{const h=g=>{if(g.target&&!o.current){let b=function(){Uz(tre,s,w,{discrete:!0})};const w={originalEvent:g};g.pointerType==="touch"?(r.removeEventListener("click",u.current),u.current=b,r.addEventListener("click",u.current,{once:!0})):b()}else r.removeEventListener("click",u.current);o.current=!1},m=window.setTimeout(()=>{r.addEventListener("pointerdown",h)},0);return()=>{window.clearTimeout(m),r.removeEventListener("pointerdown",h),r.removeEventListener("click",u.current)}},[r,s]),{onPointerDownCapture:()=>o.current=!0}}function are(e,r=globalThis?.document){const s=sl(e),o=T.useRef(!1);return T.useEffect(()=>{const u=h=>{h.target&&!o.current&&Uz(nre,s,{originalEvent:h},{discrete:!1})};return r.addEventListener("focusin",u),()=>r.removeEventListener("focusin",u)},[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function uI(){const e=new CustomEvent(VT);document.dispatchEvent(e)}function Uz(e,r,s,{discrete:o}){const u=s.originalEvent.target,h=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:s});r&&u.addEventListener(e,r,{once:!0}),o?qz(u,h):u.dispatchEvent(h)}var Os=globalThis?.document?T.useLayoutEffect:()=>{},ore=q_[" useId ".trim().toString()]||(()=>{}),lre=0;function Ys(e){const[r,s]=T.useState(ore());return Os(()=>{s(o=>o??String(lre++))},[e]),r?`radix-${r}`:""}const cre=["top","right","bottom","left"],Bd=Math.min,Ma=Math.max,Lj=Math.round,WE=Math.floor,oc=e=>({x:e,y:e}),ure={left:"right",right:"left",bottom:"top",top:"bottom"},dre={start:"end",end:"start"};function HT(e,r,s){return Ma(e,Bd(r,s))}function gu(e,r){return typeof e=="function"?e(r):e}function yu(e){return e.split("-")[0]}function Dg(e){return e.split("-")[1]}function r2(e){return e==="x"?"y":"x"}function s2(e){return e==="y"?"height":"width"}const hre=new Set(["top","bottom"]);function ac(e){return hre.has(yu(e))?"y":"x"}function i2(e){return r2(ac(e))}function pre(e,r,s){s===void 0&&(s=!1);const o=Dg(e),u=i2(e),h=s2(u);let m=u==="x"?o===(s?"end":"start")?"right":"left":o==="start"?"bottom":"top";return r.reference[h]>r.floating[h]&&(m=Fj(m)),[m,Fj(m)]}function fre(e){const r=Fj(e);return[GT(e),r,GT(r)]}function GT(e){return e.replace(/start|end/g,r=>dre[r])}const dI=["left","right"],hI=["right","left"],mre=["top","bottom"],gre=["bottom","top"];function yre(e,r,s){switch(e){case"top":case"bottom":return s?r?hI:dI:r?dI:hI;case"left":case"right":return r?mre:gre;default:return[]}}function vre(e,r,s,o){const u=Dg(e);let h=yre(yu(e),s==="start",o);return u&&(h=h.map(m=>m+"-"+u),r&&(h=h.concat(h.map(GT)))),h}function Fj(e){return e.replace(/left|right|bottom|top/g,r=>ure[r])}function xre(e){return{top:0,right:0,bottom:0,left:0,...e}}function Kz(e){return typeof e!="number"?xre(e):{top:e,right:e,bottom:e,left:e}}function qj(e){const{x:r,y:s,width:o,height:u}=e;return{width:o,height:u,top:s,left:r,right:r+o,bottom:s+u,x:r,y:s}}function pI(e,r,s){let{reference:o,floating:u}=e;const h=ac(r),m=i2(r),g=s2(m),b=yu(r),w=h==="y",E=o.x+o.width/2-u.width/2,A=o.y+o.height/2-u.height/2,k=o[g]/2-u[g]/2;let R;switch(b){case"top":R={x:E,y:o.y-u.height};break;case"bottom":R={x:E,y:o.y+o.height};break;case"right":R={x:o.x+o.width,y:A};break;case"left":R={x:o.x-u.width,y:A};break;default:R={x:o.x,y:o.y}}switch(Dg(r)){case"start":R[m]-=k*(s&&w?-1:1);break;case"end":R[m]+=k*(s&&w?-1:1);break}return R}const bre=async(e,r,s)=>{const{placement:o="bottom",strategy:u="absolute",middleware:h=[],platform:m}=s,g=h.filter(Boolean),b=await(m.isRTL==null?void 0:m.isRTL(r));let w=await m.getElementRects({reference:e,floating:r,strategy:u}),{x:E,y:A}=pI(w,o,b),k=o,R={},M=0;for(let I=0;I<g.length;I++){const{name:F,fn:H}=g[I],{x:V,y:K,data:z,reset:W}=await H({x:E,y:A,initialPlacement:o,placement:k,strategy:u,middlewareData:R,rects:w,platform:m,elements:{reference:e,floating:r}});E=V??E,A=K??A,R={...R,[F]:{...R[F],...z}},W&&M<=50&&(M++,typeof W=="object"&&(W.placement&&(k=W.placement),W.rects&&(w=W.rects===!0?await m.getElementRects({reference:e,floating:r,strategy:u}):W.rects),{x:E,y:A}=pI(w,k,b)),I=-1)}return{x:E,y:A,placement:k,strategy:u,middlewareData:R}};async function Vb(e,r){var s;r===void 0&&(r={});const{x:o,y:u,platform:h,rects:m,elements:g,strategy:b}=e,{boundary:w="clippingAncestors",rootBoundary:E="viewport",elementContext:A="floating",altBoundary:k=!1,padding:R=0}=gu(r,e),M=Kz(R),F=g[k?A==="floating"?"reference":"floating":A],H=qj(await h.getClippingRect({element:(s=await(h.isElement==null?void 0:h.isElement(F)))==null||s?F:F.contextElement||await(h.getDocumentElement==null?void 0:h.getDocumentElement(g.floating)),boundary:w,rootBoundary:E,strategy:b})),V=A==="floating"?{x:o,y:u,width:m.floating.width,height:m.floating.height}:m.reference,K=await(h.getOffsetParent==null?void 0:h.getOffsetParent(g.floating)),z=await(h.isElement==null?void 0:h.isElement(K))?await(h.getScale==null?void 0:h.getScale(K))||{x:1,y:1}:{x:1,y:1},W=qj(h.convertOffsetParentRelativeRectToViewportRelativeRect?await h.convertOffsetParentRelativeRectToViewportRelativeRect({elements:g,rect:V,offsetParent:K,strategy:b}):V);return{top:(H.top-W.top+M.top)/z.y,bottom:(W.bottom-H.bottom+M.bottom)/z.y,left:(H.left-W.left+M.left)/z.x,right:(W.right-H.right+M.right)/z.x}}const wre=e=>({name:"arrow",options:e,async fn(r){const{x:s,y:o,placement:u,rects:h,platform:m,elements:g,middlewareData:b}=r,{element:w,padding:E=0}=gu(e,r)||{};if(w==null)return{};const A=Kz(E),k={x:s,y:o},R=i2(u),M=s2(R),I=await m.getDimensions(w),F=R==="y",H=F?"top":"left",V=F?"bottom":"right",K=F?"clientHeight":"clientWidth",z=h.reference[M]+h.reference[R]-k[R]-h.floating[M],W=k[R]-h.reference[R],ae=await(m.getOffsetParent==null?void 0:m.getOffsetParent(w));let Q=ae?ae[K]:0;(!Q||!await(m.isElement==null?void 0:m.isElement(ae)))&&(Q=g.floating[K]||h.floating[M]);const te=z/2-W/2,de=Q/2-I[M]/2-1,je=Bd(A[H],de),we=Bd(A[V],de),ie=je,Se=Q-I[M]-we,Ae=Q/2-I[M]/2+te,He=HT(ie,Ae,Se),ue=!b.arrow&&Dg(u)!=null&&Ae!==He&&h.reference[M]/2-(Ae<ie?je:we)-I[M]/2<0,ne=ue?Ae<ie?Ae-ie:Ae-Se:0;return{[R]:k[R]+ne,data:{[R]:He,centerOffset:Ae-He-ne,...ue&&{alignmentOffset:ne}},reset:ue}}}),Sre=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(r){var s,o;const{placement:u,middlewareData:h,rects:m,initialPlacement:g,platform:b,elements:w}=r,{mainAxis:E=!0,crossAxis:A=!0,fallbackPlacements:k,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:I=!0,...F}=gu(e,r);if((s=h.arrow)!=null&&s.alignmentOffset)return{};const H=yu(u),V=ac(g),K=yu(g)===g,z=await(b.isRTL==null?void 0:b.isRTL(w.floating)),W=k||(K||!I?[Fj(g)]:fre(g)),ae=M!=="none";!k&&ae&&W.push(...vre(g,I,M,z));const Q=[g,...W],te=await Vb(r,F),de=[];let je=((o=h.flip)==null?void 0:o.overflows)||[];if(E&&de.push(te[H]),A){const Ae=pre(u,m,z);de.push(te[Ae[0]],te[Ae[1]])}if(je=[...je,{placement:u,overflows:de}],!de.every(Ae=>Ae<=0)){var we,ie;const Ae=(((we=h.flip)==null?void 0:we.index)||0)+1,He=Q[Ae];if(He&&(!(A==="alignment"?V!==ac(He):!1)||je.every(ce=>ac(ce.placement)===V?ce.overflows[0]>0:!0)))return{data:{index:Ae,overflows:je},reset:{placement:He}};let ue=(ie=je.filter(ne=>ne.overflows[0]<=0).sort((ne,ce)=>ne.overflows[1]-ce.overflows[1])[0])==null?void 0:ie.placement;if(!ue)switch(R){case"bestFit":{var Se;const ne=(Se=je.filter(ce=>{if(ae){const $e=ac(ce.placement);return $e===V||$e==="y"}return!0}).map(ce=>[ce.placement,ce.overflows.filter($e=>$e>0).reduce(($e,me)=>$e+me,0)]).sort((ce,$e)=>ce[1]-$e[1])[0])==null?void 0:Se[0];ne&&(ue=ne);break}case"initialPlacement":ue=g;break}if(u!==ue)return{reset:{placement:ue}}}return{}}}};function fI(e,r){return{top:e.top-r.height,right:e.right-r.width,bottom:e.bottom-r.height,left:e.left-r.width}}function mI(e){return cre.some(r=>e[r]>=0)}const Ere=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(r){const{rects:s}=r,{strategy:o="referenceHidden",...u}=gu(e,r);switch(o){case"referenceHidden":{const h=await Vb(r,{...u,elementContext:"reference"}),m=fI(h,s.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:mI(m)}}}case"escaped":{const h=await Vb(r,{...u,altBoundary:!0}),m=fI(h,s.floating);return{data:{escapedOffsets:m,escaped:mI(m)}}}default:return{}}}}},Vz=new Set(["left","top"]);async function jre(e,r){const{placement:s,platform:o,elements:u}=e,h=await(o.isRTL==null?void 0:o.isRTL(u.floating)),m=yu(s),g=Dg(s),b=ac(s)==="y",w=Vz.has(m)?-1:1,E=h&&b?-1:1,A=gu(r,e);let{mainAxis:k,crossAxis:R,alignmentAxis:M}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return g&&typeof M=="number"&&(R=g==="end"?M*-1:M),b?{x:R*E,y:k*w}:{x:k*w,y:R*E}}const Cre=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(r){var s,o;const{x:u,y:h,placement:m,middlewareData:g}=r,b=await jre(r,e);return m===((s=g.offset)==null?void 0:s.placement)&&(o=g.arrow)!=null&&o.alignmentOffset?{}:{x:u+b.x,y:h+b.y,data:{...b,placement:m}}}}},Are=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(r){const{x:s,y:o,placement:u}=r,{mainAxis:h=!0,crossAxis:m=!1,limiter:g={fn:F=>{let{x:H,y:V}=F;return{x:H,y:V}}},...b}=gu(e,r),w={x:s,y:o},E=await Vb(r,b),A=ac(yu(u)),k=r2(A);let R=w[k],M=w[A];if(h){const F=k==="y"?"top":"left",H=k==="y"?"bottom":"right",V=R+E[F],K=R-E[H];R=HT(V,R,K)}if(m){const F=A==="y"?"top":"left",H=A==="y"?"bottom":"right",V=M+E[F],K=M-E[H];M=HT(V,M,K)}const I=g.fn({...r,[k]:R,[A]:M});return{...I,data:{x:I.x-s,y:I.y-o,enabled:{[k]:h,[A]:m}}}}}},Ore=function(e){return e===void 0&&(e={}),{options:e,fn(r){const{x:s,y:o,placement:u,rects:h,middlewareData:m}=r,{offset:g=0,mainAxis:b=!0,crossAxis:w=!0}=gu(e,r),E={x:s,y:o},A=ac(u),k=r2(A);let R=E[k],M=E[A];const I=gu(g,r),F=typeof I=="number"?{mainAxis:I,crossAxis:0}:{mainAxis:0,crossAxis:0,...I};if(b){const K=k==="y"?"height":"width",z=h.reference[k]-h.floating[K]+F.mainAxis,W=h.reference[k]+h.reference[K]-F.mainAxis;R<z?R=z:R>W&&(R=W)}if(w){var H,V;const K=k==="y"?"width":"height",z=Vz.has(yu(u)),W=h.reference[A]-h.floating[K]+(z&&((H=m.offset)==null?void 0:H[A])||0)+(z?0:F.crossAxis),ae=h.reference[A]+h.reference[K]+(z?0:((V=m.offset)==null?void 0:V[A])||0)-(z?F.crossAxis:0);M<W?M=W:M>ae&&(M=ae)}return{[k]:R,[A]:M}}}},kre=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(r){var s,o;const{placement:u,rects:h,platform:m,elements:g}=r,{apply:b=()=>{},...w}=gu(e,r),E=await Vb(r,w),A=yu(u),k=Dg(u),R=ac(u)==="y",{width:M,height:I}=h.floating;let F,H;A==="top"||A==="bottom"?(F=A,H=k===(await(m.isRTL==null?void 0:m.isRTL(g.floating))?"start":"end")?"left":"right"):(H=A,F=k==="end"?"top":"bottom");const V=I-E.top-E.bottom,K=M-E.left-E.right,z=Bd(I-E[F],V),W=Bd(M-E[H],K),ae=!r.middlewareData.shift;let Q=z,te=W;if((s=r.middlewareData.shift)!=null&&s.enabled.x&&(te=K),(o=r.middlewareData.shift)!=null&&o.enabled.y&&(Q=V),ae&&!k){const je=Ma(E.left,0),we=Ma(E.right,0),ie=Ma(E.top,0),Se=Ma(E.bottom,0);R?te=M-2*(je!==0||we!==0?je+we:Ma(E.left,E.right)):Q=I-2*(ie!==0||Se!==0?ie+Se:Ma(E.top,E.bottom))}await b({...r,availableWidth:te,availableHeight:Q});const de=await m.getDimensions(g.floating);return M!==de.width||I!==de.height?{reset:{rects:!0}}:{}}}};function AC(){return typeof window<"u"}function Pg(e){return Hz(e)?(e.nodeName||"").toLowerCase():"#document"}function La(e){var r;return(e==null||(r=e.ownerDocument)==null?void 0:r.defaultView)||window}function hc(e){var r;return(r=(Hz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:r.documentElement}function Hz(e){return AC()?e instanceof Node||e instanceof La(e).Node:!1}function il(e){return AC()?e instanceof Element||e instanceof La(e).Element:!1}function dc(e){return AC()?e instanceof HTMLElement||e instanceof La(e).HTMLElement:!1}function gI(e){return!AC()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof La(e).ShadowRoot}const Rre=new Set(["inline","contents"]);function aw(e){const{overflow:r,overflowX:s,overflowY:o,display:u}=al(e);return/auto|scroll|overlay|hidden|clip/.test(r+o+s)&&!Rre.has(u)}const Tre=new Set(["table","td","th"]);function _re(e){return Tre.has(Pg(e))}const $re=[":popover-open",":modal"];function OC(e){return $re.some(r=>{try{return e.matches(r)}catch{return!1}})}const Nre=["transform","translate","scale","rotate","perspective"],Dre=["transform","translate","scale","rotate","perspective","filter"],Pre=["paint","layout","strict","content"];function a2(e){const r=o2(),s=il(e)?al(e):e;return Nre.some(o=>s[o]?s[o]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!r&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!r&&(s.filter?s.filter!=="none":!1)||Dre.some(o=>(s.willChange||"").includes(o))||Pre.some(o=>(s.contain||"").includes(o))}function Mre(e){let r=Ud(e);for(;dc(r)&&!Sg(r);){if(a2(r))return r;if(OC(r))return null;r=Ud(r)}return null}function o2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ire=new Set(["html","body","#document"]);function Sg(e){return Ire.has(Pg(e))}function al(e){return La(e).getComputedStyle(e)}function kC(e){return il(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ud(e){if(Pg(e)==="html")return e;const r=e.assignedSlot||e.parentNode||gI(e)&&e.host||hc(e);return gI(r)?r.host:r}function Gz(e){const r=Ud(e);return Sg(r)?e.ownerDocument?e.ownerDocument.body:e.body:dc(r)&&aw(r)?r:Gz(r)}function Hb(e,r,s){var o;r===void 0&&(r=[]),s===void 0&&(s=!0);const u=Gz(e),h=u===((o=e.ownerDocument)==null?void 0:o.body),m=La(u);if(h){const g=XT(m);return r.concat(m,m.visualViewport||[],aw(u)?u:[],g&&s?Hb(g):[])}return r.concat(u,Hb(u,[],s))}function XT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xz(e){const r=al(e);let s=parseFloat(r.width)||0,o=parseFloat(r.height)||0;const u=dc(e),h=u?e.offsetWidth:s,m=u?e.offsetHeight:o,g=Lj(s)!==h||Lj(o)!==m;return g&&(s=h,o=m),{width:s,height:o,$:g}}function l2(e){return il(e)?e:e.contextElement}function gg(e){const r=l2(e);if(!dc(r))return oc(1);const s=r.getBoundingClientRect(),{width:o,height:u,$:h}=Xz(r);let m=(h?Lj(s.width):s.width)/o,g=(h?Lj(s.height):s.height)/u;return(!m||!Number.isFinite(m))&&(m=1),(!g||!Number.isFinite(g))&&(g=1),{x:m,y:g}}const zre=oc(0);function Yz(e){const r=La(e);return!o2()||!r.visualViewport?zre:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function Lre(e,r,s){return r===void 0&&(r=!1),!s||r&&s!==La(e)?!1:r}function _p(e,r,s,o){r===void 0&&(r=!1),s===void 0&&(s=!1);const u=e.getBoundingClientRect(),h=l2(e);let m=oc(1);r&&(o?il(o)&&(m=gg(o)):m=gg(e));const g=Lre(h,s,o)?Yz(h):oc(0);let b=(u.left+g.x)/m.x,w=(u.top+g.y)/m.y,E=u.width/m.x,A=u.height/m.y;if(h){const k=La(h),R=o&&il(o)?La(o):o;let M=k,I=XT(M);for(;I&&o&&R!==M;){const F=gg(I),H=I.getBoundingClientRect(),V=al(I),K=H.left+(I.clientLeft+parseFloat(V.paddingLeft))*F.x,z=H.top+(I.clientTop+parseFloat(V.paddingTop))*F.y;b*=F.x,w*=F.y,E*=F.x,A*=F.y,b+=K,w+=z,M=La(I),I=XT(M)}}return qj({width:E,height:A,x:b,y:w})}function RC(e,r){const s=kC(e).scrollLeft;return r?r.left+s:_p(hc(e)).left+s}function Zz(e,r){const s=e.getBoundingClientRect(),o=s.left+r.scrollLeft-RC(e,s),u=s.top+r.scrollTop;return{x:o,y:u}}function Fre(e){let{elements:r,rect:s,offsetParent:o,strategy:u}=e;const h=u==="fixed",m=hc(o),g=r?OC(r.floating):!1;if(o===m||g&&h)return s;let b={scrollLeft:0,scrollTop:0},w=oc(1);const E=oc(0),A=dc(o);if((A||!A&&!h)&&((Pg(o)!=="body"||aw(m))&&(b=kC(o)),dc(o))){const R=_p(o);w=gg(o),E.x=R.x+o.clientLeft,E.y=R.y+o.clientTop}const k=m&&!A&&!h?Zz(m,b):oc(0);return{width:s.width*w.x,height:s.height*w.y,x:s.x*w.x-b.scrollLeft*w.x+E.x+k.x,y:s.y*w.y-b.scrollTop*w.y+E.y+k.y}}function qre(e){return Array.from(e.getClientRects())}function Bre(e){const r=hc(e),s=kC(e),o=e.ownerDocument.body,u=Ma(r.scrollWidth,r.clientWidth,o.scrollWidth,o.clientWidth),h=Ma(r.scrollHeight,r.clientHeight,o.scrollHeight,o.clientHeight);let m=-s.scrollLeft+RC(e);const g=-s.scrollTop;return al(o).direction==="rtl"&&(m+=Ma(r.clientWidth,o.clientWidth)-u),{width:u,height:h,x:m,y:g}}const yI=25;function Ure(e,r){const s=La(e),o=hc(e),u=s.visualViewport;let h=o.clientWidth,m=o.clientHeight,g=0,b=0;if(u){h=u.width,m=u.height;const E=o2();(!E||E&&r==="fixed")&&(g=u.offsetLeft,b=u.offsetTop)}const w=RC(o);if(w<=0){const E=o.ownerDocument,A=E.body,k=getComputedStyle(A),R=E.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,M=Math.abs(o.clientWidth-A.clientWidth-R);M<=yI&&(h-=M)}else w<=yI&&(h+=w);return{width:h,height:m,x:g,y:b}}const Kre=new Set(["absolute","fixed"]);function Vre(e,r){const s=_p(e,!0,r==="fixed"),o=s.top+e.clientTop,u=s.left+e.clientLeft,h=dc(e)?gg(e):oc(1),m=e.clientWidth*h.x,g=e.clientHeight*h.y,b=u*h.x,w=o*h.y;return{width:m,height:g,x:b,y:w}}function vI(e,r,s){let o;if(r==="viewport")o=Ure(e,s);else if(r==="document")o=Bre(hc(e));else if(il(r))o=Vre(r,s);else{const u=Yz(e);o={x:r.x-u.x,y:r.y-u.y,width:r.width,height:r.height}}return qj(o)}function Jz(e,r){const s=Ud(e);return s===r||!il(s)||Sg(s)?!1:al(s).position==="fixed"||Jz(s,r)}function Hre(e,r){const s=r.get(e);if(s)return s;let o=Hb(e,[],!1).filter(g=>il(g)&&Pg(g)!=="body"),u=null;const h=al(e).position==="fixed";let m=h?Ud(e):e;for(;il(m)&&!Sg(m);){const g=al(m),b=a2(m);!b&&g.position==="fixed"&&(u=null),(h?!b&&!u:!b&&g.position==="static"&&!!u&&Kre.has(u.position)||aw(m)&&!b&&Jz(e,m))?o=o.filter(E=>E!==m):u=g,m=Ud(m)}return r.set(e,o),o}function Gre(e){let{element:r,boundary:s,rootBoundary:o,strategy:u}=e;const m=[...s==="clippingAncestors"?OC(r)?[]:Hre(r,this._c):[].concat(s),o],g=m[0],b=m.reduce((w,E)=>{const A=vI(r,E,u);return w.top=Ma(A.top,w.top),w.right=Bd(A.right,w.right),w.bottom=Bd(A.bottom,w.bottom),w.left=Ma(A.left,w.left),w},vI(r,g,u));return{width:b.right-b.left,height:b.bottom-b.top,x:b.left,y:b.top}}function Xre(e){const{width:r,height:s}=Xz(e);return{width:r,height:s}}function Yre(e,r,s){const o=dc(r),u=hc(r),h=s==="fixed",m=_p(e,!0,h,r);let g={scrollLeft:0,scrollTop:0};const b=oc(0);function w(){b.x=RC(u)}if(o||!o&&!h)if((Pg(r)!=="body"||aw(u))&&(g=kC(r)),o){const R=_p(r,!0,h,r);b.x=R.x+r.clientLeft,b.y=R.y+r.clientTop}else u&&w();h&&!o&&u&&w();const E=u&&!o&&!h?Zz(u,g):oc(0),A=m.left+g.scrollLeft-b.x-E.x,k=m.top+g.scrollTop-b.y-E.y;return{x:A,y:k,width:m.width,height:m.height}}function VR(e){return al(e).position==="static"}function xI(e,r){if(!dc(e)||al(e).position==="fixed")return null;if(r)return r(e);let s=e.offsetParent;return hc(e)===s&&(s=s.ownerDocument.body),s}function Wz(e,r){const s=La(e);if(OC(e))return s;if(!dc(e)){let u=Ud(e);for(;u&&!Sg(u);){if(il(u)&&!VR(u))return u;u=Ud(u)}return s}let o=xI(e,r);for(;o&&_re(o)&&VR(o);)o=xI(o,r);return o&&Sg(o)&&VR(o)&&!a2(o)?s:o||Mre(e)||s}const Zre=async function(e){const r=this.getOffsetParent||Wz,s=this.getDimensions,o=await s(e.floating);return{reference:Yre(e.reference,await r(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Jre(e){return al(e).direction==="rtl"}const Wre={convertOffsetParentRelativeRectToViewportRelativeRect:Fre,getDocumentElement:hc,getClippingRect:Gre,getOffsetParent:Wz,getElementRects:Zre,getClientRects:qre,getDimensions:Xre,getScale:gg,isElement:il,isRTL:Jre};function Qz(e,r){return e.x===r.x&&e.y===r.y&&e.width===r.width&&e.height===r.height}function Qre(e,r){let s=null,o;const u=hc(e);function h(){var g;clearTimeout(o),(g=s)==null||g.disconnect(),s=null}function m(g,b){g===void 0&&(g=!1),b===void 0&&(b=1),h();const w=e.getBoundingClientRect(),{left:E,top:A,width:k,height:R}=w;if(g||r(),!k||!R)return;const M=WE(A),I=WE(u.clientWidth-(E+k)),F=WE(u.clientHeight-(A+R)),H=WE(E),K={rootMargin:-M+"px "+-I+"px "+-F+"px "+-H+"px",threshold:Ma(0,Bd(1,b))||1};let z=!0;function W(ae){const Q=ae[0].intersectionRatio;if(Q!==b){if(!z)return m();Q?m(!1,Q):o=setTimeout(()=>{m(!1,1e-7)},1e3)}Q===1&&!Qz(w,e.getBoundingClientRect())&&m(),z=!1}try{s=new IntersectionObserver(W,{...K,root:u.ownerDocument})}catch{s=new IntersectionObserver(W,K)}s.observe(e)}return m(!0),h}function ese(e,r,s,o){o===void 0&&(o={});const{ancestorScroll:u=!0,ancestorResize:h=!0,elementResize:m=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:b=!1}=o,w=l2(e),E=u||h?[...w?Hb(w):[],...Hb(r)]:[];E.forEach(H=>{u&&H.addEventListener("scroll",s,{passive:!0}),h&&H.addEventListener("resize",s)});const A=w&&g?Qre(w,s):null;let k=-1,R=null;m&&(R=new ResizeObserver(H=>{let[V]=H;V&&V.target===w&&R&&(R.unobserve(r),cancelAnimationFrame(k),k=requestAnimationFrame(()=>{var K;(K=R)==null||K.observe(r)})),s()}),w&&!b&&R.observe(w),R.observe(r));let M,I=b?_p(e):null;b&&F();function F(){const H=_p(e);I&&!Qz(I,H)&&s(),I=H,M=requestAnimationFrame(F)}return s(),()=>{var H;E.forEach(V=>{u&&V.removeEventListener("scroll",s),h&&V.removeEventListener("resize",s)}),A?.(),(H=R)==null||H.disconnect(),R=null,b&&cancelAnimationFrame(M)}}const tse=Cre,nse=Are,rse=Sre,sse=kre,ise=Ere,bI=wre,ase=Ore,ose=(e,r,s)=>{const o=new Map,u={platform:Wre,...s},h={...u.platform,_c:o};return bre(e,r,{...u,platform:h})};var lse=typeof document<"u",cse=function(){},wj=lse?T.useLayoutEffect:cse;function Bj(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(typeof e=="function"&&e.toString()===r.toString())return!0;let s,o,u;if(e&&r&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==r.length)return!1;for(o=s;o--!==0;)if(!Bj(e[o],r[o]))return!1;return!0}if(u=Object.keys(e),s=u.length,s!==Object.keys(r).length)return!1;for(o=s;o--!==0;)if(!{}.hasOwnProperty.call(r,u[o]))return!1;for(o=s;o--!==0;){const h=u[o];if(!(h==="_owner"&&e.$$typeof)&&!Bj(e[h],r[h]))return!1}return!0}return e!==e&&r!==r}function eL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wI(e,r){const s=eL(e);return Math.round(r*s)/s}function HR(e){const r=T.useRef(e);return wj(()=>{r.current=e}),r}function use(e){e===void 0&&(e={});const{placement:r="bottom",strategy:s="absolute",middleware:o=[],platform:u,elements:{reference:h,floating:m}={},transform:g=!0,whileElementsMounted:b,open:w}=e,[E,A]=T.useState({x:0,y:0,strategy:s,placement:r,middlewareData:{},isPositioned:!1}),[k,R]=T.useState(o);Bj(k,o)||R(o);const[M,I]=T.useState(null),[F,H]=T.useState(null),V=T.useCallback(ce=>{ce!==ae.current&&(ae.current=ce,I(ce))},[]),K=T.useCallback(ce=>{ce!==Q.current&&(Q.current=ce,H(ce))},[]),z=h||M,W=m||F,ae=T.useRef(null),Q=T.useRef(null),te=T.useRef(E),de=b!=null,je=HR(b),we=HR(u),ie=HR(w),Se=T.useCallback(()=>{if(!ae.current||!Q.current)return;const ce={placement:r,strategy:s,middleware:k};we.current&&(ce.platform=we.current),ose(ae.current,Q.current,ce).then($e=>{const me={...$e,isPositioned:ie.current!==!1};Ae.current&&!Bj(te.current,me)&&(te.current=me,SC.flushSync(()=>{A(me)}))})},[k,r,s,we,ie]);wj(()=>{w===!1&&te.current.isPositioned&&(te.current.isPositioned=!1,A(ce=>({...ce,isPositioned:!1})))},[w]);const Ae=T.useRef(!1);wj(()=>(Ae.current=!0,()=>{Ae.current=!1}),[]),wj(()=>{if(z&&(ae.current=z),W&&(Q.current=W),z&&W){if(je.current)return je.current(z,W,Se);Se()}},[z,W,Se,je,de]);const He=T.useMemo(()=>({reference:ae,floating:Q,setReference:V,setFloating:K}),[V,K]),ue=T.useMemo(()=>({reference:z,floating:W}),[z,W]),ne=T.useMemo(()=>{const ce={position:s,left:0,top:0};if(!ue.floating)return ce;const $e=wI(ue.floating,E.x),me=wI(ue.floating,E.y);return g?{...ce,transform:"translate("+$e+"px, "+me+"px)",...eL(ue.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:$e,top:me}},[s,g,ue.floating,E.x,E.y]);return T.useMemo(()=>({...E,update:Se,refs:He,elements:ue,floatingStyles:ne}),[E,Se,He,ue,ne])}const dse=e=>{function r(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:o,padding:u}=typeof e=="function"?e(s):e;return o&&r(o)?o.current!=null?bI({element:o.current,padding:u}).fn(s):{}:o?bI({element:o,padding:u}).fn(s):{}}}},hse=(e,r)=>({...tse(e),options:[e,r]}),pse=(e,r)=>({...nse(e),options:[e,r]}),fse=(e,r)=>({...ase(e),options:[e,r]}),mse=(e,r)=>({...rse(e),options:[e,r]}),gse=(e,r)=>({...sse(e),options:[e,r]}),yse=(e,r)=>({...ise(e),options:[e,r]}),vse=(e,r)=>({...dse(e),options:[e,r]});var xse="Arrow",tL=T.forwardRef((e,r)=>{const{children:s,width:o=10,height:u=5,...h}=e;return c.jsx(An.svg,{...h,ref:r,width:o,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});tL.displayName=xse;var bse=tL;function nL(e){const[r,s]=T.useState(void 0);return Os(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const h=u[0];let m,g;if("borderBoxSize"in h){const b=h.borderBoxSize,w=Array.isArray(b)?b[0]:b;m=w.inlineSize,g=w.blockSize}else m=e.offsetWidth,g=e.offsetHeight;s({width:m,height:g})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else s(void 0)},[e]),r}var c2="Popper",[rL,Yd]=cl(c2),[wse,sL]=rL(c2),iL=e=>{const{__scopePopper:r,children:s}=e,[o,u]=T.useState(null);return c.jsx(wse,{scope:r,anchor:o,onAnchorChange:u,children:s})};iL.displayName=c2;var aL="PopperAnchor",oL=T.forwardRef((e,r)=>{const{__scopePopper:s,virtualRef:o,...u}=e,h=sL(aL,s),m=T.useRef(null),g=Ln(r,m),b=T.useRef(null);return T.useEffect(()=>{const w=b.current;b.current=o?.current||m.current,w!==b.current&&h.onAnchorChange(b.current)}),o?null:c.jsx(An.div,{...u,ref:g})});oL.displayName=aL;var u2="PopperContent",[Sse,Ese]=rL(u2),lL=T.forwardRef((e,r)=>{const{__scopePopper:s,side:o="bottom",sideOffset:u=0,align:h="center",alignOffset:m=0,arrowPadding:g=0,avoidCollisions:b=!0,collisionBoundary:w=[],collisionPadding:E=0,sticky:A="partial",hideWhenDetached:k=!1,updatePositionStrategy:R="optimized",onPlaced:M,...I}=e,F=sL(u2,s),[H,V]=T.useState(null),K=Ln(r,Fe=>V(Fe)),[z,W]=T.useState(null),ae=nL(z),Q=ae?.width??0,te=ae?.height??0,de=o+(h!=="center"?"-"+h:""),je=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},we=Array.isArray(w)?w:[w],ie=we.length>0,Se={padding:je,boundary:we.filter(Cse),altBoundary:ie},{refs:Ae,floatingStyles:He,placement:ue,isPositioned:ne,middlewareData:ce}=use({strategy:"fixed",placement:de,whileElementsMounted:(...Fe)=>ese(...Fe,{animationFrame:R==="always"}),elements:{reference:F.anchor},middleware:[hse({mainAxis:u+te,alignmentAxis:m}),b&&pse({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?fse():void 0,...Se}),b&&mse({...Se}),gse({...Se,apply:({elements:Fe,rects:at,availableWidth:gt,availableHeight:Ot})=>{const{width:Lt,height:Rt}=at.reference,Ft=Fe.floating.style;Ft.setProperty("--radix-popper-available-width",`${gt}px`),Ft.setProperty("--radix-popper-available-height",`${Ot}px`),Ft.setProperty("--radix-popper-anchor-width",`${Lt}px`),Ft.setProperty("--radix-popper-anchor-height",`${Rt}px`)}}),z&&vse({element:z,padding:g}),Ase({arrowWidth:Q,arrowHeight:te}),k&&yse({strategy:"referenceHidden",...Se})]}),[$e,me]=dL(ue),Xe=sl(M);Os(()=>{ne&&Xe?.()},[ne,Xe]);const Oe=ce.arrow?.x,Te=ce.arrow?.y,Ke=ce.arrow?.centerOffset!==0,[se,Ne]=T.useState();return Os(()=>{H&&Ne(window.getComputedStyle(H).zIndex)},[H]),c.jsx("div",{ref:Ae.setFloating,"data-radix-popper-content-wrapper":"",style:{...He,transform:ne?He.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[ce.transformOrigin?.x,ce.transformOrigin?.y].join(" "),...ce.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Sse,{scope:s,placedSide:$e,onArrowChange:W,arrowX:Oe,arrowY:Te,shouldHideArrow:Ke,children:c.jsx(An.div,{"data-side":$e,"data-align":me,...I,ref:K,style:{...I.style,animation:ne?void 0:"none"}})})})});lL.displayName=u2;var cL="PopperArrow",jse={top:"bottom",right:"left",bottom:"top",left:"right"},uL=T.forwardRef(function(r,s){const{__scopePopper:o,...u}=r,h=Ese(cL,o),m=jse[h.placedSide];return c.jsx("span",{ref:h.onArrowChange,style:{position:"absolute",left:h.arrowX,top:h.arrowY,[m]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[h.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[h.placedSide],visibility:h.shouldHideArrow?"hidden":void 0},children:c.jsx(bse,{...u,ref:s,style:{...u.style,display:"block"}})})});uL.displayName=cL;function Cse(e){return e!==null}var Ase=e=>({name:"transformOrigin",options:e,fn(r){const{placement:s,rects:o,middlewareData:u}=r,m=u.arrow?.centerOffset!==0,g=m?0:e.arrowWidth,b=m?0:e.arrowHeight,[w,E]=dL(s),A={start:"0%",center:"50%",end:"100%"}[E],k=(u.arrow?.x??0)+g/2,R=(u.arrow?.y??0)+b/2;let M="",I="";return w==="bottom"?(M=m?A:`${k}px`,I=`${-b}px`):w==="top"?(M=m?A:`${k}px`,I=`${o.floating.height+b}px`):w==="right"?(M=`${-b}px`,I=m?A:`${R}px`):w==="left"&&(M=`${o.floating.width+b}px`,I=m?A:`${R}px`),{data:{x:M,y:I}}}});function dL(e){const[r,s="center"]=e.split("-");return[r,s]}var TC=iL,ow=oL,_C=lL,$C=uL,Ose="Portal",Mg=T.forwardRef((e,r)=>{const{container:s,...o}=e,[u,h]=T.useState(!1);Os(()=>h(!0),[]);const m=s||u&&globalThis?.document?.body;return m?ez.createPortal(c.jsx(An.div,{...o,ref:r}),m):null});Mg.displayName=Ose;function kse(e,r){return T.useReducer((s,o)=>r[s][o]??s,e)}var po=e=>{const{present:r,children:s}=e,o=Rse(r),u=typeof s=="function"?s({present:o.isPresent}):T.Children.only(s),h=Ln(o.ref,Tse(u));return typeof s=="function"||o.isPresent?T.cloneElement(u,{ref:h}):null};po.displayName="Presence";function Rse(e){const[r,s]=T.useState(),o=T.useRef(null),u=T.useRef(e),h=T.useRef("none"),m=e?"mounted":"unmounted",[g,b]=kse(m,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{const w=QE(o.current);h.current=g==="mounted"?w:"none"},[g]),Os(()=>{const w=o.current,E=u.current;if(E!==e){const k=h.current,R=QE(w);e?b("MOUNT"):R==="none"||w?.display==="none"?b("UNMOUNT"):b(E&&k!==R?"ANIMATION_OUT":"UNMOUNT"),u.current=e}},[e,b]),Os(()=>{if(r){let w;const E=r.ownerDocument.defaultView??window,A=R=>{const I=QE(o.current).includes(CSS.escape(R.animationName));if(R.target===r&&I&&(b("ANIMATION_END"),!u.current)){const F=r.style.animationFillMode;r.style.animationFillMode="forwards",w=E.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=F)})}},k=R=>{R.target===r&&(h.current=QE(o.current))};return r.addEventListener("animationstart",k),r.addEventListener("animationcancel",A),r.addEventListener("animationend",A),()=>{E.clearTimeout(w),r.removeEventListener("animationstart",k),r.removeEventListener("animationcancel",A),r.removeEventListener("animationend",A)}}else b("ANIMATION_END")},[r,b]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:T.useCallback(w=>{o.current=w?getComputedStyle(w):null,s(w)},[])}}function QE(e){return e?.animationName||"none"}function Tse(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var _se=Symbol("radix.slottable");function $se(e){const r=({children:s})=>c.jsx(c.Fragment,{children:s});return r.displayName=`${e}.Slottable`,r.__radixId=_se,r}var Nse=q_[" useInsertionEffect ".trim().toString()]||Os;function Kd({prop:e,defaultProp:r,onChange:s=()=>{},caller:o}){const[u,h,m]=Dse({defaultProp:r,onChange:s}),g=e!==void 0,b=g?e:u;{const E=T.useRef(e!==void 0);T.useEffect(()=>{const A=E.current;A!==g&&console.warn(`${o} is changing from ${A?"controlled":"uncontrolled"} to ${g?"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.`),E.current=g},[g,o])}const w=T.useCallback(E=>{if(g){const A=Pse(E)?E(e):E;A!==e&&m.current?.(A)}else h(E)},[g,e,h,m]);return[b,w]}function Dse({defaultProp:e,onChange:r}){const[s,o]=T.useState(e),u=T.useRef(s),h=T.useRef(r);return Nse(()=>{h.current=r},[r]),T.useEffect(()=>{u.current!==s&&(h.current?.(s),u.current=s)},[s,u]),[s,o,h]}function Pse(e){return typeof e=="function"}var hL=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"}),Mse="VisuallyHidden",pL=T.forwardRef((e,r)=>c.jsx(An.span,{...e,ref:r,style:{...hL,...e.style}}));pL.displayName=Mse;var Ise=pL,[NC]=cl("Tooltip",[Yd]),DC=Yd(),fL="TooltipProvider",zse=700,YT="tooltip.open",[Lse,d2]=NC(fL),mL=e=>{const{__scopeTooltip:r,delayDuration:s=zse,skipDelayDuration:o=300,disableHoverableContent:u=!1,children:h}=e,m=T.useRef(!0),g=T.useRef(!1),b=T.useRef(0);return T.useEffect(()=>{const w=b.current;return()=>window.clearTimeout(w)},[]),c.jsx(Lse,{scope:r,isOpenDelayedRef:m,delayDuration:s,onOpen:T.useCallback(()=>{window.clearTimeout(b.current),m.current=!1},[]),onClose:T.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>m.current=!0,o)},[o]),isPointerInTransitRef:g,onPointerInTransitChange:T.useCallback(w=>{g.current=w},[]),disableHoverableContent:u,children:h})};mL.displayName=fL;var Gb="Tooltip",[Fse,lw]=NC(Gb),gL=e=>{const{__scopeTooltip:r,children:s,open:o,defaultOpen:u,onOpenChange:h,disableHoverableContent:m,delayDuration:g}=e,b=d2(Gb,e.__scopeTooltip),w=DC(r),[E,A]=T.useState(null),k=Ys(),R=T.useRef(0),M=m??b.disableHoverableContent,I=g??b.delayDuration,F=T.useRef(!1),[H,V]=Kd({prop:o,defaultProp:u??!1,onChange:Q=>{Q?(b.onOpen(),document.dispatchEvent(new CustomEvent(YT))):b.onClose(),h?.(Q)},caller:Gb}),K=T.useMemo(()=>H?F.current?"delayed-open":"instant-open":"closed",[H]),z=T.useCallback(()=>{window.clearTimeout(R.current),R.current=0,F.current=!1,V(!0)},[V]),W=T.useCallback(()=>{window.clearTimeout(R.current),R.current=0,V(!1)},[V]),ae=T.useCallback(()=>{window.clearTimeout(R.current),R.current=window.setTimeout(()=>{F.current=!0,V(!0),R.current=0},I)},[I,V]);return T.useEffect(()=>()=>{R.current&&(window.clearTimeout(R.current),R.current=0)},[]),c.jsx(TC,{...w,children:c.jsx(Fse,{scope:r,contentId:k,open:H,stateAttribute:K,trigger:E,onTriggerChange:A,onTriggerEnter:T.useCallback(()=>{b.isOpenDelayedRef.current?ae():z()},[b.isOpenDelayedRef,ae,z]),onTriggerLeave:T.useCallback(()=>{M?W():(window.clearTimeout(R.current),R.current=0)},[W,M]),onOpen:z,onClose:W,disableHoverableContent:M,children:s})})};gL.displayName=Gb;var ZT="TooltipTrigger",yL=T.forwardRef((e,r)=>{const{__scopeTooltip:s,...o}=e,u=lw(ZT,s),h=d2(ZT,s),m=DC(s),g=T.useRef(null),b=Ln(r,g,u.onTriggerChange),w=T.useRef(!1),E=T.useRef(!1),A=T.useCallback(()=>w.current=!1,[]);return T.useEffect(()=>()=>document.removeEventListener("pointerup",A),[A]),c.jsx(ow,{asChild:!0,...m,children:c.jsx(An.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...o,ref:b,onPointerMove:Nt(e.onPointerMove,k=>{k.pointerType!=="touch"&&!E.current&&!h.isPointerInTransitRef.current&&(u.onTriggerEnter(),E.current=!0)}),onPointerLeave:Nt(e.onPointerLeave,()=>{u.onTriggerLeave(),E.current=!1}),onPointerDown:Nt(e.onPointerDown,()=>{u.open&&u.onClose(),w.current=!0,document.addEventListener("pointerup",A,{once:!0})}),onFocus:Nt(e.onFocus,()=>{w.current||u.onOpen()}),onBlur:Nt(e.onBlur,u.onClose),onClick:Nt(e.onClick,u.onClose)})})});yL.displayName=ZT;var h2="TooltipPortal",[qse,Bse]=NC(h2,{forceMount:void 0}),vL=e=>{const{__scopeTooltip:r,forceMount:s,children:o,container:u}=e,h=lw(h2,r);return c.jsx(qse,{scope:r,forceMount:s,children:c.jsx(po,{present:s||h.open,children:c.jsx(Mg,{asChild:!0,container:u,children:o})})})};vL.displayName=h2;var Eg="TooltipContent",xL=T.forwardRef((e,r)=>{const s=Bse(Eg,e.__scopeTooltip),{forceMount:o=s.forceMount,side:u="top",...h}=e,m=lw(Eg,e.__scopeTooltip);return c.jsx(po,{present:o||m.open,children:m.disableHoverableContent?c.jsx(bL,{side:u,...h,ref:r}):c.jsx(Use,{side:u,...h,ref:r})})}),Use=T.forwardRef((e,r)=>{const s=lw(Eg,e.__scopeTooltip),o=d2(Eg,e.__scopeTooltip),u=T.useRef(null),h=Ln(r,u),[m,g]=T.useState(null),{trigger:b,onClose:w}=s,E=u.current,{onPointerInTransitChange:A}=o,k=T.useCallback(()=>{g(null),A(!1)},[A]),R=T.useCallback((M,I)=>{const F=M.currentTarget,H={x:M.clientX,y:M.clientY},V=Gse(H,F.getBoundingClientRect()),K=Xse(H,V),z=Yse(I.getBoundingClientRect()),W=Jse([...K,...z]);g(W),A(!0)},[A]);return T.useEffect(()=>()=>k(),[k]),T.useEffect(()=>{if(b&&E){const M=F=>R(F,E),I=F=>R(F,b);return b.addEventListener("pointerleave",M),E.addEventListener("pointerleave",I),()=>{b.removeEventListener("pointerleave",M),E.removeEventListener("pointerleave",I)}}},[b,E,R,k]),T.useEffect(()=>{if(m){const M=I=>{const F=I.target,H={x:I.clientX,y:I.clientY},V=b?.contains(F)||E?.contains(F),K=!Zse(H,m);V?k():K&&(k(),w())};return document.addEventListener("pointermove",M),()=>document.removeEventListener("pointermove",M)}},[b,E,m,w,k]),c.jsx(bL,{...e,ref:h})}),[Kse,Vse]=NC(Gb,{isInside:!1}),Hse=$se("TooltipContent"),bL=T.forwardRef((e,r)=>{const{__scopeTooltip:s,children:o,"aria-label":u,onEscapeKeyDown:h,onPointerDownOutside:m,...g}=e,b=lw(Eg,s),w=DC(s),{onClose:E}=b;return T.useEffect(()=>(document.addEventListener(YT,E),()=>document.removeEventListener(YT,E)),[E]),T.useEffect(()=>{if(b.trigger){const A=k=>{k.target?.contains(b.trigger)&&E()};return window.addEventListener("scroll",A,{capture:!0}),()=>window.removeEventListener("scroll",A,{capture:!0})}},[b.trigger,E]),c.jsx(Ng,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:A=>A.preventDefault(),onDismiss:E,children:c.jsxs(_C,{"data-state":b.stateAttribute,...w,...g,ref:r,style:{...g.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:[c.jsx(Hse,{children:o}),c.jsx(Kse,{scope:s,isInside:!0,children:c.jsx(Ise,{id:b.contentId,role:"tooltip",children:u||o})})]})})});xL.displayName=Eg;var wL="TooltipArrow",SL=T.forwardRef((e,r)=>{const{__scopeTooltip:s,...o}=e,u=DC(s);return Vse(wL,s).isInside?null:c.jsx($C,{...u,...o,ref:r})});SL.displayName=wL;function Gse(e,r){const s=Math.abs(r.top-e.y),o=Math.abs(r.bottom-e.y),u=Math.abs(r.right-e.x),h=Math.abs(r.left-e.x);switch(Math.min(s,o,u,h)){case h:return"left";case u:return"right";case s:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Xse(e,r,s=5){const o=[];switch(r){case"top":o.push({x:e.x-s,y:e.y+s},{x:e.x+s,y:e.y+s});break;case"bottom":o.push({x:e.x-s,y:e.y-s},{x:e.x+s,y:e.y-s});break;case"left":o.push({x:e.x+s,y:e.y-s},{x:e.x+s,y:e.y+s});break;case"right":o.push({x:e.x-s,y:e.y-s},{x:e.x-s,y:e.y+s});break}return o}function Yse(e){const{top:r,right:s,bottom:o,left:u}=e;return[{x:u,y:r},{x:s,y:r},{x:s,y:o},{x:u,y:o}]}function Zse(e,r){const{x:s,y:o}=e;let u=!1;for(let h=0,m=r.length-1;h<r.length;m=h++){const g=r[h],b=r[m],w=g.x,E=g.y,A=b.x,k=b.y;E>o!=k>o&&s<(A-w)*(o-E)/(k-E)+w&&(u=!u)}return u}function Jse(e){const r=e.slice();return r.sort((s,o)=>s.x<o.x?-1:s.x>o.x?1:s.y<o.y?-1:s.y>o.y?1:0),Wse(r)}function Wse(e){if(e.length<=1)return e.slice();const r=[];for(let o=0;o<e.length;o++){const u=e[o];for(;r.length>=2;){const h=r[r.length-1],m=r[r.length-2];if((h.x-m.x)*(u.y-m.y)>=(h.y-m.y)*(u.x-m.x))r.pop();else break}r.push(u)}r.pop();const s=[];for(let o=e.length-1;o>=0;o--){const u=e[o];for(;s.length>=2;){const h=s[s.length-1],m=s[s.length-2];if((h.x-m.x)*(u.y-m.y)>=(h.y-m.y)*(u.x-m.x))s.pop();else break}s.push(u)}return s.pop(),r.length===1&&s.length===1&&r[0].x===s[0].x&&r[0].y===s[0].y?r:r.concat(s)}var Qse=mL,eie=gL,tie=yL,nie=vL,rie=xL,sie=SL;function cw({delayDuration:e=0,...r}){return c.jsx(Qse,{"data-slot":"tooltip-provider",delayDuration:e,...r})}function Uj({...e}){return c.jsx(cw,{children:c.jsx(eie,{"data-slot":"tooltip",...e})})}function Kj({...e}){return c.jsx(tie,{"data-slot":"tooltip-trigger",...e})}function Vj({className:e,sideOffset:r=0,children:s,...o}){return c.jsx(nie,{children:c.jsxs(rie,{"data-slot":"tooltip-content",sideOffset:r,className:vt("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",e),...o,children:[s,c.jsx(sie,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function EL(e){return e&&e!=="none"?e.slice(0,7):"none"}function iie(e){if(!e||e==="unknown")return"unknown";const r=new Date(e);return isNaN(+r)?e:r.toLocaleString()}function aie(e){return e?`v${e.version} (${EL(e.commit)}) • built ${e.built} • ${e.go} ${e.goOS}/${e.goArch}`:""}const oie=T.memo(function(){const r=Un({queryKey:["footer"],queryFn:()=>qte.footer(),staleTime:6e4,refetchOnWindowFocus:!1}),s=r.data,o=T.useMemo(()=>aie(s),[s]);return c.jsx("footer",{className:"bg-background text-muted-foreground w-full border-t px-3 py-2 text-xs sm:text-sm",children:c.jsxs("div",{className:"mx-auto flex max-w-screen-2xl items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs sm:text-sm",children:[c.jsxs("span",{children:["© ",new Date().getFullYear()," GlueOps"]}),c.jsx(Ab,{orientation:"vertical",className:"hidden h-4 sm:block"}),c.jsx("span",{className:"hidden sm:block",children:"All systems nominal."})]}),c.jsx("div",{className:"flex flex-wrap items-center gap-2 text-xs sm:text-sm",children:r.isLoading?c.jsx("span",{className:"animate-pulse",children:"loading version…"}):r.isError?c.jsx("span",{className:"text-destructive",children:"version unavailable"}):s?c.jsx(cw,{children:c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(rr,{variant:"secondary",className:"font-mono",children:s.version}),c.jsxs(Uj,{children:[c.jsx(Kj,{asChild:!0,children:c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(fJ,{className:"h-3.5 w-3.5"}),c.jsx("span",{className:"font-mono",children:EL(s.commit)})]})}),c.jsx(Vj,{side:"top",children:c.jsx("div",{className:"font-mono text-xs",children:s.commit})})]}),c.jsx(Ab,{orientation:"vertical",className:"h-4"}),c.jsxs(Uj,{children:[c.jsx(Kj,{asChild:!0,children:c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(vz,{className:"h-3.5 w-3.5"}),c.jsx("span",{children:s.go})]})}),c.jsx(Vj,{side:"top",children:c.jsxs("div",{className:"font-mono text-xs",children:[s.goOS,"/",s.goArch]})})]}),c.jsx(Ab,{orientation:"vertical",className:"hidden h-4 sm:block"}),c.jsxs("span",{className:"hidden sm:inline",children:["built ",c.jsx("span",{className:"font-mono",children:iie(s.built)})]}),c.jsx(Ab,{orientation:"vertical",className:"hidden h-4 sm:block"}),c.jsx(Pe,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>{navigator.clipboard?.writeText(o).catch(()=>{})},title:"Copy version details",children:c.jsx(WZ,{className:"h-4 w-4"})}),c.jsxs("a",{href:"/api/v1/version",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs underline-offset-4 hover:underline",title:"Open raw version JSON",children:["JSON ",c.jsx(oJ,{className:"h-3.5 w-3.5"})]})]})}):null})]})})});var jL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},SI=et.createContext&&et.createContext(jL),lie=["attr","size","title"];function cie(e,r){if(e==null)return{};var s=uie(e,r),o,u;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(e);for(u=0;u<h.length;u++)o=h[u],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function uie(e,r){if(e==null)return{};var s={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(r.indexOf(o)>=0)continue;s[o]=e[o]}return s}function Hj(){return Hj=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var s=arguments[r];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},Hj.apply(this,arguments)}function EI(e,r){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),s.push.apply(s,o)}return s}function Gj(e){for(var r=1;r<arguments.length;r++){var s=arguments[r]!=null?arguments[r]:{};r%2?EI(Object(s),!0).forEach(function(o){die(e,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):EI(Object(s)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(s,o))})}return e}function die(e,r,s){return r=hie(r),r in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,e}function hie(e){var r=pie(e,"string");return typeof r=="symbol"?r:r+""}function pie(e,r){if(typeof e!="object"||!e)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var o=s.call(e,r);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function CL(e){return e&&e.map((r,s)=>et.createElement(r.tag,Gj({key:s},r.attr),CL(r.child)))}function uw(e){return r=>et.createElement(fie,Hj({attr:Gj({},e.attr)},r),CL(e.child))}function fie(e){var r=s=>{var{attr:o,size:u,title:h}=e,m=cie(e,lie),g=u||s.size||"1em",b;return s.className&&(b=s.className),e.className&&(b=(b?b+" ":"")+e.className),et.createElement("svg",Hj({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},s.attr,o,m,{className:b,style:Gj(Gj({color:e.color||s.color},s.style),e.style),height:g,width:g,xmlns:"http://www.w3.org/2000/svg"}),h&&et.createElement("title",null,h),e.children)};return SI!==void 0?et.createElement(SI.Consumer,null,s=>r(s)):r(jL)}function mie(e){return uw({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M888 680h-54V540H546v-92h238c8.8 0 16-7.2 16-16V168c0-8.8-7.2-16-16-16H240c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h238v92H190v140h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8h-54v-72h220v72h-54c-4.4 0-8 3.6-8 8v176c0 4.4 3.6 8 8 8h176c4.4 0 8-3.6 8-8V688c0-4.4-3.6-8-8-8zM256 805.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zm288 0c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM288 384V216h448v168H288zm544 421.3c0 1.5-1.2 2.7-2.7 2.7h-58.7c-1.5 0-2.7-1.2-2.7-2.7v-58.7c0-1.5 1.2-2.7 2.7-2.7h58.7c1.5 0 2.7 1.2 2.7 2.7v58.7zM360 300a40 40 0 1 0 80 0 40 40 0 1 0-80 0z"},child:[]}]})(e)}function gie(e){return uw({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",strokeWidth:"2",d:"M3,6 L21,6 L3,6 Z M10,2 L10,4 M14,2 L14,4 M16,12 C18.3736719,13.1826446 20,15.6506255 20,19 L20,23 L4,23 L4,19 C4,15.6457258 5.6310898,13.1754259 8,12 M12,16.5 L12,23 M12,13 C15.3137085,13 18,10.3137085 18,7 C18,3.6862915 15.3137085,1 12,1 C8.6862915,1 6,3.6862915 6,7 C6,10.3137085 8.6862915,13 12,13 Z M8,12 C8,14.209139 9.790861,16 12,16 L12,16 C14.209139,16 16,14.209139 16,12"},child:[]}]})(e)}function yie(e){return uw({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"},child:[]}]})(e)}function vie(e){return uw({attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 0C5.383 0 0 5.383 0 12s5.383 12 12 12c6.616 0 12-5.383 12-12S18.616 0 12 0zm0 1.144c5.995 0 10.856 4.86 10.856 10.856 0 5.995-4.86 10.856-10.856 10.856-5.996 0-10.856-4.86-10.856-10.856C1.144 6.004 6.004 1.144 12 1.144zM8.37 5.868a6.707 6.707 0 0 0-.423.005c-.983.056-1.573.517-1.735 1.472-.115.665-.096 1.348-.143 2.017-.013.35-.05.697-.115 1.038-.134.609-.397.798-1.016.83a2.65 2.65 0 0 0-.244.042v1.463c1.126.055 1.278.452 1.37 1.629.033.429-.013.858.015 1.287.018.406.073.808.156 1.2.259 1.075 1.307 1.435 2.575 1.218v-1.283c-.203 0-.383.005-.558 0-.43-.013-.591-.12-.632-.535-.056-.535-.042-1.08-.075-1.62-.064-1.001-.175-1.988-1.153-2.625.503-.37.868-.812.983-1.398.083-.41.134-.821.166-1.237.028-.415-.023-.84.014-1.25.06-.665.102-.937.9-.91.12 0 .235-.017.369-.027v-1.31c-.16 0-.31-.004-.454-.006zm7.593.009a4.247 4.247 0 0 0-.813.06v1.274c.245 0 .434 0 .623.005.328.004.577.13.61.494.032.332.031.669.064 1.006.065.669.101 1.347.217 2.007.102.544.475.95.941 1.283-.817.549-1.057 1.333-1.098 2.215-.023.604-.037 1.213-.069 1.822-.028.554-.222.734-.78.748-.157.004-.31.018-.484.028v1.305c.327 0 .627.019.927 0 .932-.055 1.495-.507 1.68-1.412.078-.498.124-1 .138-1.504.032-.461.028-.927.074-1.384.069-.715.397-1.01 1.112-1.057a.972.972 0 0 0 .199-.046v-1.463c-.12-.014-.204-.027-.291-.032-.536-.023-.804-.203-.937-.71a5.146 5.146 0 0 1-.152-.993c-.037-.618-.033-1.241-.074-1.86-.08-1.192-.794-1.753-1.887-1.786zm-6.89 5.28a.844.844 0 0 0-.083 1.684h.055a.83.83 0 0 0 .877-.78v-.046a.845.845 0 0 0-.83-.858zm2.911 0a.808.808 0 0 0-.834.78c0 .027 0 .05.004.078 0 .503.342.826.859.826.507 0 .826-.332.826-.853-.005-.503-.342-.836-.855-.831zm2.963 0a.861.861 0 0 0-.876.835c0 .47.378.849.849.849h.009c.425.074.853-.337.881-.83.023-.457-.392-.854-.863-.854z"},child:[]}]})(e)}function xie(e){return uw({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M12 13m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0"},child:[]},{tag:"path",attr:{d:"M12 20m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},child:[]},{tag:"path",attr:{d:"M12 16v3"},child:[]},{tag:"path",attr:{d:"M12 10v-7"},child:[]},{tag:"path",attr:{d:"M9 6l3 -3l3 3"},child:[]},{tag:"path",attr:{d:"M12 10v-7"},child:[]},{tag:"path",attr:{d:"M9 6l3 -3l3 3"},child:[]},{tag:"path",attr:{d:"M14.894 12.227l6.11 -2.224"},child:[]},{tag:"path",attr:{d:"M17.159 8.21l3.845 1.793l-1.793 3.845"},child:[]},{tag:"path",attr:{d:"M9.101 12.214l-6.075 -2.211"},child:[]},{tag:"path",attr:{d:"M6.871 8.21l-3.845 1.793l1.793 3.845"},child:[]}]})(e)}const bie=[{to:"/clusters",label:"Clusters",icon:mie},{to:"/load-balancers",label:"Load Balancers",icon:xie},{to:"/dns",label:"DNS",icon:yie},{to:"/node-pools",label:"Node Pools",icon:MZ},{to:"/annotations",label:"Annotations",icon:eJ},{to:"/labels",label:"Labels",icon:jC},{to:"/taints",label:"Taints",icon:UJ},{to:"/servers",label:"Servers",icon:J_},{to:"/ssh",label:"SSH Keys",icon:hJ},{to:"/credentials",label:"Credentials",icon:wJ}],wie=[{to:"/org/members",label:"Members",icon:xz},{to:"/org/api-keys",label:"Org API Keys",icon:yJ},{to:"/org/settings",label:"Org Settings",icon:mz}],Sie=[{to:"/me",label:"Profile",icon:ZJ}],Eie=[{to:"/admin/users",label:"Users Admin",icon:xz},{to:"/admin/jobs",label:"Jobs Admin",icon:gie},{to:"/admin/actions",label:"Actions Admin",icon:MJ},{to:"/docs",label:"API Docs ",icon:vie,target:"_blank"}];var jI=1,jie=.9,Cie=.8,Aie=.17,GR=.1,XR=.999,Oie=.9999,kie=.99,Rie=/[\\\/_+.#"@\[\(\{&]/,Tie=/[\\\/_+.#"@\[\(\{&]/g,_ie=/[\s-]/,AL=/[\s-]/g;function JT(e,r,s,o,u,h,m){if(h===r.length)return u===e.length?jI:kie;var g=`${u},${h}`;if(m[g]!==void 0)return m[g];for(var b=o.charAt(h),w=s.indexOf(b,u),E=0,A,k,R,M;w>=0;)A=JT(e,r,s,o,w+1,h+1,m),A>E&&(w===u?A*=jI:Rie.test(e.charAt(w-1))?(A*=Cie,R=e.slice(u,w-1).match(Tie),R&&u>0&&(A*=Math.pow(XR,R.length))):_ie.test(e.charAt(w-1))?(A*=jie,M=e.slice(u,w-1).match(AL),M&&u>0&&(A*=Math.pow(XR,M.length))):(A*=Aie,u>0&&(A*=Math.pow(XR,w-u))),e.charAt(w)!==r.charAt(h)&&(A*=Oie)),(A<GR&&s.charAt(w-1)===o.charAt(h+1)||o.charAt(h+1)===o.charAt(h)&&s.charAt(w-1)!==o.charAt(h))&&(k=JT(e,r,s,o,w+1,h+2,m),k*GR>A&&(A=k*GR)),A>E&&(E=A),w=s.indexOf(b,w+1);return m[g]=E,E}function CI(e){return e.toLowerCase().replace(AL," ")}function $ie(e,r,s){return e=s&&s.length>0?`${e+" "+s.join(" ")}`:e,JT(e,r,CI(e),CI(r),0,0,{})}var YR="focusScope.autoFocusOnMount",ZR="focusScope.autoFocusOnUnmount",AI={bubbles:!1,cancelable:!0},Nie="FocusScope",dw=T.forwardRef((e,r)=>{const{loop:s=!1,trapped:o=!1,onMountAutoFocus:u,onUnmountAutoFocus:h,...m}=e,[g,b]=T.useState(null),w=sl(u),E=sl(h),A=T.useRef(null),k=Ln(r,I=>b(I)),R=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(o){let I=function(K){if(R.paused||!g)return;const z=K.target;g.contains(z)?A.current=z:zd(A.current,{select:!0})},F=function(K){if(R.paused||!g)return;const z=K.relatedTarget;z!==null&&(g.contains(z)||zd(A.current,{select:!0}))},H=function(K){if(document.activeElement===document.body)for(const W of K)W.removedNodes.length>0&&zd(g)};document.addEventListener("focusin",I),document.addEventListener("focusout",F);const V=new MutationObserver(H);return g&&V.observe(g,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",I),document.removeEventListener("focusout",F),V.disconnect()}}},[o,g,R.paused]),T.useEffect(()=>{if(g){kI.add(R);const I=document.activeElement;if(!g.contains(I)){const H=new CustomEvent(YR,AI);g.addEventListener(YR,w),g.dispatchEvent(H),H.defaultPrevented||(Die(Lie(OL(g)),{select:!0}),document.activeElement===I&&zd(g))}return()=>{g.removeEventListener(YR,w),setTimeout(()=>{const H=new CustomEvent(ZR,AI);g.addEventListener(ZR,E),g.dispatchEvent(H),H.defaultPrevented||zd(I??document.body,{select:!0}),g.removeEventListener(ZR,E),kI.remove(R)},0)}}},[g,w,E,R]);const M=T.useCallback(I=>{if(!s&&!o||R.paused)return;const F=I.key==="Tab"&&!I.altKey&&!I.ctrlKey&&!I.metaKey,H=document.activeElement;if(F&&H){const V=I.currentTarget,[K,z]=Pie(V);K&&z?!I.shiftKey&&H===z?(I.preventDefault(),s&&zd(K,{select:!0})):I.shiftKey&&H===K&&(I.preventDefault(),s&&zd(z,{select:!0})):H===V&&I.preventDefault()}},[s,o,R.paused]);return c.jsx(An.div,{tabIndex:-1,...m,ref:k,onKeyDown:M})});dw.displayName=Nie;function Die(e,{select:r=!1}={}){const s=document.activeElement;for(const o of e)if(zd(o,{select:r}),document.activeElement!==s)return}function Pie(e){const r=OL(e),s=OI(r,e),o=OI(r.reverse(),e);return[s,o]}function OL(e){const r=[],s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const u=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||u?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)r.push(s.currentNode);return r}function OI(e,r){for(const s of e)if(!Mie(s,{upTo:r}))return s}function Mie(e,{upTo:r}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(r!==void 0&&e===r)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Iie(e){return e instanceof HTMLInputElement&&"select"in e}function zd(e,{select:r=!1}={}){if(e&&e.focus){const s=document.activeElement;e.focus({preventScroll:!0}),e!==s&&Iie(e)&&r&&e.select()}}var kI=zie();function zie(){let e=[];return{add(r){const s=e[0];r!==s&&s?.pause(),e=RI(e,r),e.unshift(r)},remove(r){e=RI(e,r),e[0]?.resume()}}}function RI(e,r){const s=[...e],o=s.indexOf(r);return o!==-1&&s.splice(o,1),s}function Lie(e){return e.filter(r=>r.tagName!=="A")}var JR=0;function PC(){T.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??TI()),document.body.insertAdjacentElement("beforeend",e[1]??TI()),JR++,()=>{JR===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),JR--}},[])}function TI(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ic=function(){return ic=Object.assign||function(r){for(var s,o=1,u=arguments.length;o<u;o++){s=arguments[o];for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(r[h]=s[h])}return r},ic.apply(this,arguments)};function kL(e,r){var s={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,o=Object.getOwnPropertySymbols(e);u<o.length;u++)r.indexOf(o[u])<0&&Object.prototype.propertyIsEnumerable.call(e,o[u])&&(s[o[u]]=e[o[u]]);return s}function Fie(e,r,s){if(s||arguments.length===2)for(var o=0,u=r.length,h;o<u;o++)(h||!(o in r))&&(h||(h=Array.prototype.slice.call(r,0,o)),h[o]=r[o]);return e.concat(h||Array.prototype.slice.call(r))}var Sj="right-scroll-bar-position",Ej="width-before-scroll-bar",qie="with-scroll-bars-hidden",Bie="--removed-body-scroll-bar-size";function WR(e,r){return typeof e=="function"?e(r):e&&(e.current=r),e}function Uie(e,r){var s=T.useState(function(){return{value:e,callback:r,facade:{get current(){return s.value},set current(o){var u=s.value;u!==o&&(s.value=o,s.callback(o,u))}}}})[0];return s.callback=r,s.facade}var Kie=typeof window<"u"?T.useLayoutEffect:T.useEffect,_I=new WeakMap;function Vie(e,r){var s=Uie(null,function(o){return e.forEach(function(u){return WR(u,o)})});return Kie(function(){var o=_I.get(s);if(o){var u=new Set(o),h=new Set(e),m=s.current;u.forEach(function(g){h.has(g)||WR(g,null)}),h.forEach(function(g){u.has(g)||WR(g,m)})}_I.set(s,e)},[e]),s}function Hie(e){return e}function Gie(e,r){r===void 0&&(r=Hie);var s=[],o=!1,u={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return s.length?s[s.length-1]:e},useMedium:function(h){var m=r(h,o);return s.push(m),function(){s=s.filter(function(g){return g!==m})}},assignSyncMedium:function(h){for(o=!0;s.length;){var m=s;s=[],m.forEach(h)}s={push:function(g){return h(g)},filter:function(){return s}}},assignMedium:function(h){o=!0;var m=[];if(s.length){var g=s;s=[],g.forEach(h),m=s}var b=function(){var E=m;m=[],E.forEach(h)},w=function(){return Promise.resolve().then(b)};w(),s={push:function(E){m.push(E),w()},filter:function(E){return m=m.filter(E),s}}}};return u}function Xie(e){e===void 0&&(e={});var r=Gie(null);return r.options=ic({async:!0,ssr:!1},e),r}var RL=function(e){var r=e.sideCar,s=kL(e,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=r.read();if(!o)throw new Error("Sidecar medium not found");return T.createElement(o,ic({},s))};RL.isSideCarExport=!0;function Yie(e,r){return e.useMedium(r),RL}var TL=Xie(),QR=function(){},MC=T.forwardRef(function(e,r){var s=T.useRef(null),o=T.useState({onScrollCapture:QR,onWheelCapture:QR,onTouchMoveCapture:QR}),u=o[0],h=o[1],m=e.forwardProps,g=e.children,b=e.className,w=e.removeScrollBar,E=e.enabled,A=e.shards,k=e.sideCar,R=e.noRelative,M=e.noIsolation,I=e.inert,F=e.allowPinchZoom,H=e.as,V=H===void 0?"div":H,K=e.gapMode,z=kL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),W=k,ae=Vie([s,r]),Q=ic(ic({},z),u);return T.createElement(T.Fragment,null,E&&T.createElement(W,{sideCar:TL,removeScrollBar:w,shards:A,noRelative:R,noIsolation:M,inert:I,setCallbacks:h,allowPinchZoom:!!F,lockRef:s,gapMode:K}),m?T.cloneElement(T.Children.only(g),ic(ic({},Q),{ref:ae})):T.createElement(V,ic({},Q,{className:b,ref:ae}),g))});MC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};MC.classNames={fullWidth:Ej,zeroRight:Sj};var Zie=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Jie(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var r=Zie();return r&&e.setAttribute("nonce",r),e}function Wie(e,r){e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r))}function Qie(e){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(e)}var eae=function(){var e=0,r=null;return{add:function(s){e==0&&(r=Jie())&&(Wie(r,s),Qie(r)),e++},remove:function(){e--,!e&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},tae=function(){var e=eae();return function(r,s){T.useEffect(function(){return e.add(r),function(){e.remove()}},[r&&s])}},_L=function(){var e=tae(),r=function(s){var o=s.styles,u=s.dynamic;return e(o,u),null};return r},nae={left:0,top:0,right:0,gap:0},eT=function(e){return parseInt(e||"",10)||0},rae=function(e){var r=window.getComputedStyle(document.body),s=r[e==="padding"?"paddingLeft":"marginLeft"],o=r[e==="padding"?"paddingTop":"marginTop"],u=r[e==="padding"?"paddingRight":"marginRight"];return[eT(s),eT(o),eT(u)]},sae=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return nae;var r=rae(e),s=document.documentElement.clientWidth,o=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,o-s+r[2]-r[0])}},iae=_L(),yg="data-scroll-locked",aae=function(e,r,s,o){var u=e.left,h=e.top,m=e.right,g=e.gap;return s===void 0&&(s="margin"),`
|
||
.`.concat(qie,` {
|
||
overflow: hidden `).concat(o,`;
|
||
padding-right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
body[`).concat(yg,`] {
|
||
overflow: hidden `).concat(o,`;
|
||
overscroll-behavior: contain;
|
||
`).concat([r&&"position: relative ".concat(o,";"),s==="margin"&&`
|
||
padding-left: `.concat(u,`px;
|
||
padding-top: `).concat(h,`px;
|
||
padding-right: `).concat(m,`px;
|
||
margin-left:0;
|
||
margin-top:0;
|
||
margin-right: `).concat(g,"px ").concat(o,`;
|
||
`),s==="padding"&&"padding-right: ".concat(g,"px ").concat(o,";")].filter(Boolean).join(""),`
|
||
}
|
||
|
||
.`).concat(Sj,` {
|
||
right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
|
||
.`).concat(Ej,` {
|
||
margin-right: `).concat(g,"px ").concat(o,`;
|
||
}
|
||
|
||
.`).concat(Sj," .").concat(Sj,` {
|
||
right: 0 `).concat(o,`;
|
||
}
|
||
|
||
.`).concat(Ej," .").concat(Ej,` {
|
||
margin-right: 0 `).concat(o,`;
|
||
}
|
||
|
||
body[`).concat(yg,`] {
|
||
`).concat(Bie,": ").concat(g,`px;
|
||
}
|
||
`)},$I=function(){var e=parseInt(document.body.getAttribute(yg)||"0",10);return isFinite(e)?e:0},oae=function(){T.useEffect(function(){return document.body.setAttribute(yg,($I()+1).toString()),function(){var e=$I()-1;e<=0?document.body.removeAttribute(yg):document.body.setAttribute(yg,e.toString())}},[])},lae=function(e){var r=e.noRelative,s=e.noImportant,o=e.gapMode,u=o===void 0?"margin":o;oae();var h=T.useMemo(function(){return sae(u)},[u]);return T.createElement(iae,{styles:aae(h,!r,u,s?"":"!important")})},WT=!1;if(typeof window<"u")try{var ej=Object.defineProperty({},"passive",{get:function(){return WT=!0,!0}});window.addEventListener("test",ej,ej),window.removeEventListener("test",ej,ej)}catch{WT=!1}var Xm=WT?{passive:!1}:!1,cae=function(e){return e.tagName==="TEXTAREA"},$L=function(e,r){if(!(e instanceof Element))return!1;var s=window.getComputedStyle(e);return s[r]!=="hidden"&&!(s.overflowY===s.overflowX&&!cae(e)&&s[r]==="visible")},uae=function(e){return $L(e,"overflowY")},dae=function(e){return $L(e,"overflowX")},NI=function(e,r){var s=r.ownerDocument,o=r;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var u=NL(e,o);if(u){var h=DL(e,o),m=h[1],g=h[2];if(m>g)return!0}o=o.parentNode}while(o&&o!==s.body);return!1},hae=function(e){var r=e.scrollTop,s=e.scrollHeight,o=e.clientHeight;return[r,s,o]},pae=function(e){var r=e.scrollLeft,s=e.scrollWidth,o=e.clientWidth;return[r,s,o]},NL=function(e,r){return e==="v"?uae(r):dae(r)},DL=function(e,r){return e==="v"?hae(r):pae(r)},fae=function(e,r){return e==="h"&&r==="rtl"?-1:1},mae=function(e,r,s,o,u){var h=fae(e,window.getComputedStyle(r).direction),m=h*o,g=s.target,b=r.contains(g),w=!1,E=m>0,A=0,k=0;do{if(!g)break;var R=DL(e,g),M=R[0],I=R[1],F=R[2],H=I-F-h*M;(M||H)&&NL(e,g)&&(A+=H,k+=M);var V=g.parentNode;g=V&&V.nodeType===Node.DOCUMENT_FRAGMENT_NODE?V.host:V}while(!b&&g!==document.body||b&&(r.contains(g)||r===g));return(E&&Math.abs(A)<1||!E&&Math.abs(k)<1)&&(w=!0),w},tj=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DI=function(e){return[e.deltaX,e.deltaY]},PI=function(e){return e&&"current"in e?e.current:e},gae=function(e,r){return e[0]===r[0]&&e[1]===r[1]},yae=function(e){return`
|
||
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
||
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
||
`)},vae=0,Ym=[];function xae(e){var r=T.useRef([]),s=T.useRef([0,0]),o=T.useRef(),u=T.useState(vae++)[0],h=T.useState(_L)[0],m=T.useRef(e);T.useEffect(function(){m.current=e},[e]),T.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(u));var I=Fie([e.lockRef.current],(e.shards||[]).map(PI),!0).filter(Boolean);return I.forEach(function(F){return F.classList.add("allow-interactivity-".concat(u))}),function(){document.body.classList.remove("block-interactivity-".concat(u)),I.forEach(function(F){return F.classList.remove("allow-interactivity-".concat(u))})}}},[e.inert,e.lockRef.current,e.shards]);var g=T.useCallback(function(I,F){if("touches"in I&&I.touches.length===2||I.type==="wheel"&&I.ctrlKey)return!m.current.allowPinchZoom;var H=tj(I),V=s.current,K="deltaX"in I?I.deltaX:V[0]-H[0],z="deltaY"in I?I.deltaY:V[1]-H[1],W,ae=I.target,Q=Math.abs(K)>Math.abs(z)?"h":"v";if("touches"in I&&Q==="h"&&ae.type==="range")return!1;var te=window.getSelection(),de=te&&te.anchorNode,je=de?de===ae||de.contains(ae):!1;if(je)return!1;var we=NI(Q,ae);if(!we)return!0;if(we?W=Q:(W=Q==="v"?"h":"v",we=NI(Q,ae)),!we)return!1;if(!o.current&&"changedTouches"in I&&(K||z)&&(o.current=W),!W)return!0;var ie=o.current||W;return mae(ie,F,I,ie==="h"?K:z)},[]),b=T.useCallback(function(I){var F=I;if(!(!Ym.length||Ym[Ym.length-1]!==h)){var H="deltaY"in F?DI(F):tj(F),V=r.current.filter(function(W){return W.name===F.type&&(W.target===F.target||F.target===W.shadowParent)&&gae(W.delta,H)})[0];if(V&&V.should){F.cancelable&&F.preventDefault();return}if(!V){var K=(m.current.shards||[]).map(PI).filter(Boolean).filter(function(W){return W.contains(F.target)}),z=K.length>0?g(F,K[0]):!m.current.noIsolation;z&&F.cancelable&&F.preventDefault()}}},[]),w=T.useCallback(function(I,F,H,V){var K={name:I,delta:F,target:H,should:V,shadowParent:bae(H)};r.current.push(K),setTimeout(function(){r.current=r.current.filter(function(z){return z!==K})},1)},[]),E=T.useCallback(function(I){s.current=tj(I),o.current=void 0},[]),A=T.useCallback(function(I){w(I.type,DI(I),I.target,g(I,e.lockRef.current))},[]),k=T.useCallback(function(I){w(I.type,tj(I),I.target,g(I,e.lockRef.current))},[]);T.useEffect(function(){return Ym.push(h),e.setCallbacks({onScrollCapture:A,onWheelCapture:A,onTouchMoveCapture:k}),document.addEventListener("wheel",b,Xm),document.addEventListener("touchmove",b,Xm),document.addEventListener("touchstart",E,Xm),function(){Ym=Ym.filter(function(I){return I!==h}),document.removeEventListener("wheel",b,Xm),document.removeEventListener("touchmove",b,Xm),document.removeEventListener("touchstart",E,Xm)}},[]);var R=e.removeScrollBar,M=e.inert;return T.createElement(T.Fragment,null,M?T.createElement(h,{styles:yae(u)}):null,R?T.createElement(lae,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bae(e){for(var r=null;e!==null;)e instanceof ShadowRoot&&(r=e.host,e=e.host),e=e.parentNode;return r}const wae=Yie(TL,xae);var hw=T.forwardRef(function(e,r){return T.createElement(MC,ic({},e,{ref:r,sideCar:wae}))});hw.classNames=MC.classNames;var Sae=function(e){if(typeof document>"u")return null;var r=Array.isArray(e)?e[0]:e;return r.ownerDocument.body},Zm=new WeakMap,nj=new WeakMap,rj={},tT=0,PL=function(e){return e&&(e.host||PL(e.parentNode))},Eae=function(e,r){return r.map(function(s){if(e.contains(s))return s;var o=PL(s);return o&&e.contains(o)?o:(console.error("aria-hidden",s,"in not contained inside",e,". Doing nothing"),null)}).filter(function(s){return!!s})},jae=function(e,r,s,o){var u=Eae(r,Array.isArray(e)?e:[e]);rj[s]||(rj[s]=new WeakMap);var h=rj[s],m=[],g=new Set,b=new Set(u),w=function(A){!A||g.has(A)||(g.add(A),w(A.parentNode))};u.forEach(w);var E=function(A){!A||b.has(A)||Array.prototype.forEach.call(A.children,function(k){if(g.has(k))E(k);else try{var R=k.getAttribute(o),M=R!==null&&R!=="false",I=(Zm.get(k)||0)+1,F=(h.get(k)||0)+1;Zm.set(k,I),h.set(k,F),m.push(k),I===1&&M&&nj.set(k,!0),F===1&&k.setAttribute(s,"true"),M||k.setAttribute(o,"true")}catch(H){console.error("aria-hidden: cannot operate on ",k,H)}})};return E(r),g.clear(),tT++,function(){m.forEach(function(A){var k=Zm.get(A)-1,R=h.get(A)-1;Zm.set(A,k),h.set(A,R),k||(nj.has(A)||A.removeAttribute(o),nj.delete(A)),R||A.removeAttribute(s)}),tT--,tT||(Zm=new WeakMap,Zm=new WeakMap,nj=new WeakMap,rj={})}},IC=function(e,r,s){s===void 0&&(s="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),u=Sae(e);return u?(o.push.apply(o,Array.from(u.querySelectorAll("[aria-live], script"))),jae(o,u,s,"aria-hidden")):function(){return null}};function Cae(e){const r=Aae(e),s=T.forwardRef((o,u)=>{const{children:h,...m}=o,g=T.Children.toArray(h),b=g.find(kae);if(b){const w=b.props.children,E=g.map(A=>A===b?T.Children.count(w)>1?T.Children.only(null):T.isValidElement(w)?w.props.children:null:A);return c.jsx(r,{...m,ref:u,children:T.isValidElement(w)?T.cloneElement(w,void 0,E):null})}return c.jsx(r,{...m,ref:u,children:h})});return s.displayName=`${e}.Slot`,s}function Aae(e){const r=T.forwardRef((s,o)=>{const{children:u,...h}=s;if(T.isValidElement(u)){const m=Tae(u),g=Rae(h,u.props);return u.type!==T.Fragment&&(g.ref=o?Gi(o,m):m),T.cloneElement(u,g)}return T.Children.count(u)>1?T.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Oae=Symbol("radix.slottable");function kae(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Oae}function Rae(e,r){const s={...r};for(const o in r){const u=e[o],h=r[o];/^on[A-Z]/.test(o)?u&&h?s[o]=(...g)=>{const b=h(...g);return u(...g),b}:u&&(s[o]=u):o==="style"?s[o]={...u,...h}:o==="className"&&(s[o]=[u,h].filter(Boolean).join(" "))}return{...e,...s}}function Tae(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var zC="Dialog",[ML,IL]=cl(zC),[_ae,ul]=ML(zC),zL=e=>{const{__scopeDialog:r,children:s,open:o,defaultOpen:u,onOpenChange:h,modal:m=!0}=e,g=T.useRef(null),b=T.useRef(null),[w,E]=Kd({prop:o,defaultProp:u??!1,onChange:h,caller:zC});return c.jsx(_ae,{scope:r,triggerRef:g,contentRef:b,contentId:Ys(),titleId:Ys(),descriptionId:Ys(),open:w,onOpenChange:E,onOpenToggle:T.useCallback(()=>E(A=>!A),[E]),modal:m,children:s})};zL.displayName=zC;var LL="DialogTrigger",FL=T.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,u=ul(LL,s),h=Ln(r,u.triggerRef);return c.jsx(An.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.contentId,"data-state":m2(u.open),...o,ref:h,onClick:Nt(e.onClick,u.onOpenToggle)})});FL.displayName=LL;var p2="DialogPortal",[$ae,qL]=ML(p2,{forceMount:void 0}),BL=e=>{const{__scopeDialog:r,forceMount:s,children:o,container:u}=e,h=ul(p2,r);return c.jsx($ae,{scope:r,forceMount:s,children:T.Children.map(o,m=>c.jsx(po,{present:s||h.open,children:c.jsx(Mg,{asChild:!0,container:u,children:m})}))})};BL.displayName=p2;var Xj="DialogOverlay",UL=T.forwardRef((e,r)=>{const s=qL(Xj,e.__scopeDialog),{forceMount:o=s.forceMount,...u}=e,h=ul(Xj,e.__scopeDialog);return h.modal?c.jsx(po,{present:o||h.open,children:c.jsx(Dae,{...u,ref:r})}):null});UL.displayName=Xj;var Nae=Cae("DialogOverlay.RemoveScroll"),Dae=T.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,u=ul(Xj,s);return c.jsx(hw,{as:Nae,allowPinchZoom:!0,shards:[u.contentRef],children:c.jsx(An.div,{"data-state":m2(u.open),...o,ref:r,style:{pointerEvents:"auto",...o.style}})})}),$p="DialogContent",KL=T.forwardRef((e,r)=>{const s=qL($p,e.__scopeDialog),{forceMount:o=s.forceMount,...u}=e,h=ul($p,e.__scopeDialog);return c.jsx(po,{present:o||h.open,children:h.modal?c.jsx(Pae,{...u,ref:r}):c.jsx(Mae,{...u,ref:r})})});KL.displayName=$p;var Pae=T.forwardRef((e,r)=>{const s=ul($p,e.__scopeDialog),o=T.useRef(null),u=Ln(r,s.contentRef,o);return T.useEffect(()=>{const h=o.current;if(h)return IC(h)},[]),c.jsx(VL,{...e,ref:u,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nt(e.onCloseAutoFocus,h=>{h.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:Nt(e.onPointerDownOutside,h=>{const m=h.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0;(m.button===2||g)&&h.preventDefault()}),onFocusOutside:Nt(e.onFocusOutside,h=>h.preventDefault())})}),Mae=T.forwardRef((e,r)=>{const s=ul($p,e.__scopeDialog),o=T.useRef(!1),u=T.useRef(!1);return c.jsx(VL,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:h=>{e.onCloseAutoFocus?.(h),h.defaultPrevented||(o.current||s.triggerRef.current?.focus(),h.preventDefault()),o.current=!1,u.current=!1},onInteractOutside:h=>{e.onInteractOutside?.(h),h.defaultPrevented||(o.current=!0,h.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const m=h.target;s.triggerRef.current?.contains(m)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&u.current&&h.preventDefault()}})}),VL=T.forwardRef((e,r)=>{const{__scopeDialog:s,trapFocus:o,onOpenAutoFocus:u,onCloseAutoFocus:h,...m}=e,g=ul($p,s),b=T.useRef(null),w=Ln(r,b);return PC(),c.jsxs(c.Fragment,{children:[c.jsx(dw,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:u,onUnmountAutoFocus:h,children:c.jsx(Ng,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionId,"aria-labelledby":g.titleId,"data-state":m2(g.open),...m,ref:w,onDismiss:()=>g.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(zae,{titleId:g.titleId}),c.jsx(Fae,{contentRef:b,descriptionId:g.descriptionId})]})]})}),f2="DialogTitle",HL=T.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,u=ul(f2,s);return c.jsx(An.h2,{id:u.titleId,...o,ref:r})});HL.displayName=f2;var GL="DialogDescription",XL=T.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,u=ul(GL,s);return c.jsx(An.p,{id:u.descriptionId,...o,ref:r})});XL.displayName=GL;var YL="DialogClose",ZL=T.forwardRef((e,r)=>{const{__scopeDialog:s,...o}=e,u=ul(YL,s);return c.jsx(An.button,{type:"button",...o,ref:r,onClick:Nt(e.onClick,()=>u.onOpenChange(!1))})});ZL.displayName=YL;function m2(e){return e?"open":"closed"}var JL="DialogTitleWarning",[Iae,WL]=Kne(JL,{contentName:$p,titleName:f2,docsSlug:"dialog"}),zae=({titleId:e})=>{const r=WL(JL),s=`\`${r.contentName}\` requires a \`${r.titleName}\` for the component to be accessible for screen reader users.
|
||
|
||
If you want to hide the \`${r.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return T.useEffect(()=>{e&&(document.getElementById(e)||console.error(s))},[s,e]),null},Lae="DialogDescriptionWarning",Fae=({contentRef:e,descriptionId:r})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${WL(Lae).contentName}}.`;return T.useEffect(()=>{const u=e.current?.getAttribute("aria-describedby");r&&u&&(document.getElementById(r)||console.warn(o))},[o,e,r]),null},LC=zL,QL=FL,FC=BL,qC=UL,BC=KL,g2=HL,y2=XL,pw=ZL,qae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zd=qae.reduce((e,r)=>{const s=iw(`Primitive.${r}`),o=T.forwardRef((u,h)=>{const{asChild:m,...g}=u,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(b,{...g,ref:h})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),ub='[cmdk-group=""]',nT='[cmdk-group-items=""]',Bae='[cmdk-group-heading=""]',e5='[cmdk-item=""]',MI=`${e5}:not([aria-disabled="true"])`,QT="cmdk-item-select",Qm="data-value",Uae=(e,r,s)=>$ie(e,r,s),t5=T.createContext(void 0),fw=()=>T.useContext(t5),n5=T.createContext(void 0),v2=()=>T.useContext(n5),r5=T.createContext(void 0),s5=T.forwardRef((e,r)=>{let s=eg(()=>{var Oe,Te;return{search:"",value:(Te=(Oe=e.value)!=null?Oe:e.defaultValue)!=null?Te:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=eg(()=>new Set),u=eg(()=>new Map),h=eg(()=>new Map),m=eg(()=>new Set),g=i5(e),{label:b,children:w,value:E,onValueChange:A,filter:k,shouldFilter:R,loop:M,disablePointerSelection:I=!1,vimBindings:F=!0,...H}=e,V=Ys(),K=Ys(),z=Ys(),W=T.useRef(null),ae=eoe();Np(()=>{if(E!==void 0){let Oe=E.trim();s.current.value=Oe,Q.emit()}},[E]),Np(()=>{ae(6,Se)},[]);let Q=T.useMemo(()=>({subscribe:Oe=>(m.current.add(Oe),()=>m.current.delete(Oe)),snapshot:()=>s.current,setState:(Oe,Te,Ke)=>{var se,Ne,Fe,at;if(!Object.is(s.current[Oe],Te)){if(s.current[Oe]=Te,Oe==="search")ie(),je(),ae(1,we);else if(Oe==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let gt=document.getElementById(z);gt?gt.focus():(se=document.getElementById(V))==null||se.focus()}if(ae(7,()=>{var gt;s.current.selectedItemId=(gt=Ae())==null?void 0:gt.id,Q.emit()}),Ke||ae(5,Se),((Ne=g.current)==null?void 0:Ne.value)!==void 0){let gt=Te??"";(at=(Fe=g.current).onValueChange)==null||at.call(Fe,gt);return}}Q.emit()}},emit:()=>{m.current.forEach(Oe=>Oe())}}),[]),te=T.useMemo(()=>({value:(Oe,Te,Ke)=>{var se;Te!==((se=h.current.get(Oe))==null?void 0:se.value)&&(h.current.set(Oe,{value:Te,keywords:Ke}),s.current.filtered.items.set(Oe,de(Te,Ke)),ae(2,()=>{je(),Q.emit()}))},item:(Oe,Te)=>(o.current.add(Oe),Te&&(u.current.has(Te)?u.current.get(Te).add(Oe):u.current.set(Te,new Set([Oe]))),ae(3,()=>{ie(),je(),s.current.value||we(),Q.emit()}),()=>{h.current.delete(Oe),o.current.delete(Oe),s.current.filtered.items.delete(Oe);let Ke=Ae();ae(4,()=>{ie(),Ke?.getAttribute("id")===Oe&&we(),Q.emit()})}),group:Oe=>(u.current.has(Oe)||u.current.set(Oe,new Set),()=>{h.current.delete(Oe),u.current.delete(Oe)}),filter:()=>g.current.shouldFilter,label:b||e["aria-label"],getDisablePointerSelection:()=>g.current.disablePointerSelection,listId:V,inputId:z,labelId:K,listInnerRef:W}),[]);function de(Oe,Te){var Ke,se;let Ne=(se=(Ke=g.current)==null?void 0:Ke.filter)!=null?se:Uae;return Oe?Ne(Oe,s.current.search,Te):0}function je(){if(!s.current.search||g.current.shouldFilter===!1)return;let Oe=s.current.filtered.items,Te=[];s.current.filtered.groups.forEach(se=>{let Ne=u.current.get(se),Fe=0;Ne.forEach(at=>{let gt=Oe.get(at);Fe=Math.max(gt,Fe)}),Te.push([se,Fe])});let Ke=W.current;He().sort((se,Ne)=>{var Fe,at;let gt=se.getAttribute("id"),Ot=Ne.getAttribute("id");return((Fe=Oe.get(Ot))!=null?Fe:0)-((at=Oe.get(gt))!=null?at:0)}).forEach(se=>{let Ne=se.closest(nT);Ne?Ne.appendChild(se.parentElement===Ne?se:se.closest(`${nT} > *`)):Ke.appendChild(se.parentElement===Ke?se:se.closest(`${nT} > *`))}),Te.sort((se,Ne)=>Ne[1]-se[1]).forEach(se=>{var Ne;let Fe=(Ne=W.current)==null?void 0:Ne.querySelector(`${ub}[${Qm}="${encodeURIComponent(se[0])}"]`);Fe?.parentElement.appendChild(Fe)})}function we(){let Oe=He().find(Ke=>Ke.getAttribute("aria-disabled")!=="true"),Te=Oe?.getAttribute(Qm);Q.setState("value",Te||void 0)}function ie(){var Oe,Te,Ke,se;if(!s.current.search||g.current.shouldFilter===!1){s.current.filtered.count=o.current.size;return}s.current.filtered.groups=new Set;let Ne=0;for(let Fe of o.current){let at=(Te=(Oe=h.current.get(Fe))==null?void 0:Oe.value)!=null?Te:"",gt=(se=(Ke=h.current.get(Fe))==null?void 0:Ke.keywords)!=null?se:[],Ot=de(at,gt);s.current.filtered.items.set(Fe,Ot),Ot>0&&Ne++}for(let[Fe,at]of u.current)for(let gt of at)if(s.current.filtered.items.get(gt)>0){s.current.filtered.groups.add(Fe);break}s.current.filtered.count=Ne}function Se(){var Oe,Te,Ke;let se=Ae();se&&(((Oe=se.parentElement)==null?void 0:Oe.firstChild)===se&&((Ke=(Te=se.closest(ub))==null?void 0:Te.querySelector(Bae))==null||Ke.scrollIntoView({block:"nearest"})),se.scrollIntoView({block:"nearest"}))}function Ae(){var Oe;return(Oe=W.current)==null?void 0:Oe.querySelector(`${e5}[aria-selected="true"]`)}function He(){var Oe;return Array.from(((Oe=W.current)==null?void 0:Oe.querySelectorAll(MI))||[])}function ue(Oe){let Te=He()[Oe];Te&&Q.setState("value",Te.getAttribute(Qm))}function ne(Oe){var Te;let Ke=Ae(),se=He(),Ne=se.findIndex(at=>at===Ke),Fe=se[Ne+Oe];(Te=g.current)!=null&&Te.loop&&(Fe=Ne+Oe<0?se[se.length-1]:Ne+Oe===se.length?se[0]:se[Ne+Oe]),Fe&&Q.setState("value",Fe.getAttribute(Qm))}function ce(Oe){let Te=Ae(),Ke=Te?.closest(ub),se;for(;Ke&&!se;)Ke=Oe>0?Wae(Ke,ub):Qae(Ke,ub),se=Ke?.querySelector(MI);se?Q.setState("value",se.getAttribute(Qm)):ne(Oe)}let $e=()=>ue(He().length-1),me=Oe=>{Oe.preventDefault(),Oe.metaKey?$e():Oe.altKey?ce(1):ne(1)},Xe=Oe=>{Oe.preventDefault(),Oe.metaKey?ue(0):Oe.altKey?ce(-1):ne(-1)};return T.createElement(Zd.div,{ref:r,tabIndex:-1,...H,"cmdk-root":"",onKeyDown:Oe=>{var Te;(Te=H.onKeyDown)==null||Te.call(H,Oe);let Ke=Oe.nativeEvent.isComposing||Oe.keyCode===229;if(!(Oe.defaultPrevented||Ke))switch(Oe.key){case"n":case"j":{F&&Oe.ctrlKey&&me(Oe);break}case"ArrowDown":{me(Oe);break}case"p":case"k":{F&&Oe.ctrlKey&&Xe(Oe);break}case"ArrowUp":{Xe(Oe);break}case"Home":{Oe.preventDefault(),ue(0);break}case"End":{Oe.preventDefault(),$e();break}case"Enter":{Oe.preventDefault();let se=Ae();if(se){let Ne=new Event(QT);se.dispatchEvent(Ne)}}}}},T.createElement("label",{"cmdk-label":"",htmlFor:te.inputId,id:te.labelId,style:noe},b),UC(e,Oe=>T.createElement(n5.Provider,{value:Q},T.createElement(t5.Provider,{value:te},Oe))))}),Kae=T.forwardRef((e,r)=>{var s,o;let u=Ys(),h=T.useRef(null),m=T.useContext(r5),g=fw(),b=i5(e),w=(o=(s=b.current)==null?void 0:s.forceMount)!=null?o:m?.forceMount;Np(()=>{if(!w)return g.item(u,m?.id)},[w]);let E=a5(u,h,[e.value,e.children,h],e.keywords),A=v2(),k=Vd(ae=>ae.value&&ae.value===E.current),R=Vd(ae=>w||g.filter()===!1?!0:ae.search?ae.filtered.items.get(u)>0:!0);T.useEffect(()=>{let ae=h.current;if(!(!ae||e.disabled))return ae.addEventListener(QT,M),()=>ae.removeEventListener(QT,M)},[R,e.onSelect,e.disabled]);function M(){var ae,Q;I(),(Q=(ae=b.current).onSelect)==null||Q.call(ae,E.current)}function I(){A.setState("value",E.current,!0)}if(!R)return null;let{disabled:F,value:H,onSelect:V,forceMount:K,keywords:z,...W}=e;return T.createElement(Zd.div,{ref:Gi(h,r),...W,id:u,"cmdk-item":"",role:"option","aria-disabled":!!F,"aria-selected":!!k,"data-disabled":!!F,"data-selected":!!k,onPointerMove:F||g.getDisablePointerSelection()?void 0:I,onClick:F?void 0:M},e.children)}),Vae=T.forwardRef((e,r)=>{let{heading:s,children:o,forceMount:u,...h}=e,m=Ys(),g=T.useRef(null),b=T.useRef(null),w=Ys(),E=fw(),A=Vd(R=>u||E.filter()===!1?!0:R.search?R.filtered.groups.has(m):!0);Np(()=>E.group(m),[]),a5(m,g,[e.value,e.heading,b]);let k=T.useMemo(()=>({id:m,forceMount:u}),[u]);return T.createElement(Zd.div,{ref:Gi(g,r),...h,"cmdk-group":"",role:"presentation",hidden:A?void 0:!0},s&&T.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:w},s),UC(e,R=>T.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":s?w:void 0},T.createElement(r5.Provider,{value:k},R))))}),Hae=T.forwardRef((e,r)=>{let{alwaysRender:s,...o}=e,u=T.useRef(null),h=Vd(m=>!m.search);return!s&&!h?null:T.createElement(Zd.div,{ref:Gi(u,r),...o,"cmdk-separator":"",role:"separator"})}),Gae=T.forwardRef((e,r)=>{let{onValueChange:s,...o}=e,u=e.value!=null,h=v2(),m=Vd(w=>w.search),g=Vd(w=>w.selectedItemId),b=fw();return T.useEffect(()=>{e.value!=null&&h.setState("search",e.value)},[e.value]),T.createElement(Zd.input,{ref:r,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":g,id:b.inputId,type:"text",value:u?e.value:m,onChange:w=>{u||h.setState("search",w.target.value),s?.(w.target.value)}})}),Xae=T.forwardRef((e,r)=>{let{children:s,label:o="Suggestions",...u}=e,h=T.useRef(null),m=T.useRef(null),g=Vd(w=>w.selectedItemId),b=fw();return T.useEffect(()=>{if(m.current&&h.current){let w=m.current,E=h.current,A,k=new ResizeObserver(()=>{A=requestAnimationFrame(()=>{let R=w.offsetHeight;E.style.setProperty("--cmdk-list-height",R.toFixed(1)+"px")})});return k.observe(w),()=>{cancelAnimationFrame(A),k.unobserve(w)}}},[]),T.createElement(Zd.div,{ref:Gi(h,r),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":g,"aria-label":o,id:b.listId},UC(e,w=>T.createElement("div",{ref:Gi(m,b.listInnerRef),"cmdk-list-sizer":""},w)))}),Yae=T.forwardRef((e,r)=>{let{open:s,onOpenChange:o,overlayClassName:u,contentClassName:h,container:m,...g}=e;return T.createElement(LC,{open:s,onOpenChange:o},T.createElement(FC,{container:m},T.createElement(qC,{"cmdk-overlay":"",className:u}),T.createElement(BC,{"aria-label":e.label,"cmdk-dialog":"",className:h},T.createElement(s5,{ref:r,...g}))))}),Zae=T.forwardRef((e,r)=>Vd(s=>s.filtered.count===0)?T.createElement(Zd.div,{ref:r,...e,"cmdk-empty":"",role:"presentation"}):null),Jae=T.forwardRef((e,r)=>{let{progress:s,children:o,label:u="Loading...",...h}=e;return T.createElement(Zd.div,{ref:r,...h,"cmdk-loading":"",role:"progressbar","aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},UC(e,m=>T.createElement("div",{"aria-hidden":!0},m)))}),Ig=Object.assign(s5,{List:Xae,Item:Kae,Input:Gae,Group:Vae,Separator:Hae,Dialog:Yae,Empty:Zae,Loading:Jae});function Wae(e,r){let s=e.nextElementSibling;for(;s;){if(s.matches(r))return s;s=s.nextElementSibling}}function Qae(e,r){let s=e.previousElementSibling;for(;s;){if(s.matches(r))return s;s=s.previousElementSibling}}function i5(e){let r=T.useRef(e);return Np(()=>{r.current=e}),r}var Np=typeof window>"u"?T.useEffect:T.useLayoutEffect;function eg(e){let r=T.useRef();return r.current===void 0&&(r.current=e()),r}function Vd(e){let r=v2(),s=()=>e(r.snapshot());return T.useSyncExternalStore(r.subscribe,s,s)}function a5(e,r,s,o=[]){let u=T.useRef(),h=fw();return Np(()=>{var m;let g=(()=>{var w;for(let E of s){if(typeof E=="string")return E.trim();if(typeof E=="object"&&"current"in E)return E.current?(w=E.current.textContent)==null?void 0:w.trim():u.current}})(),b=o.map(w=>w.trim());h.value(e,g,b),(m=r.current)==null||m.setAttribute(Qm,g),u.current=g}),u}var eoe=()=>{let[e,r]=T.useState(),s=eg(()=>new Map);return Np(()=>{s.current.forEach(o=>o()),s.current=new Map},[e]),(o,u)=>{s.current.set(o,u),r({})}};function toe(e){let r=e.type;return typeof r=="function"?r(e.props):"render"in r?r.render(e.props):e}function UC({asChild:e,children:r},s){return e&&T.isValidElement(r)?T.cloneElement(toe(r),{ref:r.ref},s(r.props.children)):s(r)}var noe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function dn({...e}){return c.jsx(LC,{"data-slot":"dialog",...e})}function Ai({...e}){return c.jsx(QL,{"data-slot":"dialog-trigger",...e})}function roe({...e}){return c.jsx(FC,{"data-slot":"dialog-portal",...e})}function Yj({...e}){return c.jsx(pw,{"data-slot":"dialog-close",...e})}function soe({className:e,...r}){return c.jsx(qC,{"data-slot":"dialog-overlay",className:vt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function hn({className:e,children:r,showCloseButton:s=!0,...o}){return c.jsxs(roe,{"data-slot":"dialog-portal",children:[c.jsx(soe,{}),c.jsxs(BC,{"data-slot":"dialog-content",className:vt("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...o,children:[r,s&&c.jsxs(pw,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[c.jsx(W_,{}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function pn({className:e,...r}){return c.jsx("div",{"data-slot":"dialog-header",className:vt("flex flex-col gap-2 text-center sm:text-left",e),...r})}function gn({className:e,...r}){return c.jsx("div",{"data-slot":"dialog-footer",className:vt("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function fn({className:e,...r}){return c.jsx(g2,{"data-slot":"dialog-title",className:vt("text-lg leading-none font-semibold",e),...r})}function rT({className:e,...r}){return c.jsx(y2,{"data-slot":"dialog-description",className:vt("text-muted-foreground text-sm",e),...r})}function ioe({className:e,...r}){return c.jsx(Ig,{"data-slot":"command",className:vt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...r})}function aoe({className:e,...r}){return c.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[c.jsx(va,{className:"size-4 shrink-0 opacity-50"}),c.jsx(Ig.Input,{"data-slot":"command-input",className:vt("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...r})]})}function ooe({className:e,...r}){return c.jsx(Ig.List,{"data-slot":"command-list",className:vt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...r})}function loe({...e}){return c.jsx(Ig.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function coe({className:e,...r}){return c.jsx(Ig.Group,{"data-slot":"command-group",className:vt("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...r})}function uoe({className:e,...r}){return c.jsx(Ig.Item,{"data-slot":"command-item",className:vt("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function doe(e){const r=hoe(e),s=T.forwardRef((o,u)=>{const{children:h,...m}=o,g=T.Children.toArray(h),b=g.find(foe);if(b){const w=b.props.children,E=g.map(A=>A===b?T.Children.count(w)>1?T.Children.only(null):T.isValidElement(w)?w.props.children:null:A);return c.jsx(r,{...m,ref:u,children:T.isValidElement(w)?T.cloneElement(w,void 0,E):null})}return c.jsx(r,{...m,ref:u,children:h})});return s.displayName=`${e}.Slot`,s}function hoe(e){const r=T.forwardRef((s,o)=>{const{children:u,...h}=s;if(T.isValidElement(u)){const m=goe(u),g=moe(h,u.props);return u.type!==T.Fragment&&(g.ref=o?Gi(o,m):m),T.cloneElement(u,g)}return T.Children.count(u)>1?T.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var poe=Symbol("radix.slottable");function foe(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===poe}function moe(e,r){const s={...r};for(const o in r){const u=e[o],h=r[o];/^on[A-Z]/.test(o)?u&&h?s[o]=(...g)=>{const b=h(...g);return u(...g),b}:u&&(s[o]=u):o==="style"?s[o]={...u,...h}:o==="className"&&(s[o]=[u,h].filter(Boolean).join(" "))}return{...e,...s}}function goe(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var KC="Popover",[o5]=cl(KC,[Yd]),mw=Yd(),[yoe,Jd]=o5(KC),l5=e=>{const{__scopePopover:r,children:s,open:o,defaultOpen:u,onOpenChange:h,modal:m=!1}=e,g=mw(r),b=T.useRef(null),[w,E]=T.useState(!1),[A,k]=Kd({prop:o,defaultProp:u??!1,onChange:h,caller:KC});return c.jsx(TC,{...g,children:c.jsx(yoe,{scope:r,contentId:Ys(),triggerRef:b,open:A,onOpenChange:k,onOpenToggle:T.useCallback(()=>k(R=>!R),[k]),hasCustomAnchor:w,onCustomAnchorAdd:T.useCallback(()=>E(!0),[]),onCustomAnchorRemove:T.useCallback(()=>E(!1),[]),modal:m,children:s})})};l5.displayName=KC;var c5="PopoverAnchor",voe=T.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,u=Jd(c5,s),h=mw(s),{onCustomAnchorAdd:m,onCustomAnchorRemove:g}=u;return T.useEffect(()=>(m(),()=>g()),[m,g]),c.jsx(ow,{...h,...o,ref:r})});voe.displayName=c5;var u5="PopoverTrigger",d5=T.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,u=Jd(u5,s),h=mw(s),m=Ln(r,u.triggerRef),g=c.jsx(An.button,{type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.contentId,"data-state":g5(u.open),...o,ref:m,onClick:Nt(e.onClick,u.onOpenToggle)});return u.hasCustomAnchor?g:c.jsx(ow,{asChild:!0,...h,children:g})});d5.displayName=u5;var x2="PopoverPortal",[xoe,boe]=o5(x2,{forceMount:void 0}),h5=e=>{const{__scopePopover:r,forceMount:s,children:o,container:u}=e,h=Jd(x2,r);return c.jsx(xoe,{scope:r,forceMount:s,children:c.jsx(po,{present:s||h.open,children:c.jsx(Mg,{asChild:!0,container:u,children:o})})})};h5.displayName=x2;var jg="PopoverContent",p5=T.forwardRef((e,r)=>{const s=boe(jg,e.__scopePopover),{forceMount:o=s.forceMount,...u}=e,h=Jd(jg,e.__scopePopover);return c.jsx(po,{present:o||h.open,children:h.modal?c.jsx(Soe,{...u,ref:r}):c.jsx(Eoe,{...u,ref:r})})});p5.displayName=jg;var woe=doe("PopoverContent.RemoveScroll"),Soe=T.forwardRef((e,r)=>{const s=Jd(jg,e.__scopePopover),o=T.useRef(null),u=Ln(r,o),h=T.useRef(!1);return T.useEffect(()=>{const m=o.current;if(m)return IC(m)},[]),c.jsx(hw,{as:woe,allowPinchZoom:!0,children:c.jsx(f5,{...e,ref:u,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Nt(e.onCloseAutoFocus,m=>{m.preventDefault(),h.current||s.triggerRef.current?.focus()}),onPointerDownOutside:Nt(e.onPointerDownOutside,m=>{const g=m.detail.originalEvent,b=g.button===0&&g.ctrlKey===!0,w=g.button===2||b;h.current=w},{checkForDefaultPrevented:!1}),onFocusOutside:Nt(e.onFocusOutside,m=>m.preventDefault(),{checkForDefaultPrevented:!1})})})}),Eoe=T.forwardRef((e,r)=>{const s=Jd(jg,e.__scopePopover),o=T.useRef(!1),u=T.useRef(!1);return c.jsx(f5,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:h=>{e.onCloseAutoFocus?.(h),h.defaultPrevented||(o.current||s.triggerRef.current?.focus(),h.preventDefault()),o.current=!1,u.current=!1},onInteractOutside:h=>{e.onInteractOutside?.(h),h.defaultPrevented||(o.current=!0,h.detail.originalEvent.type==="pointerdown"&&(u.current=!0));const m=h.target;s.triggerRef.current?.contains(m)&&h.preventDefault(),h.detail.originalEvent.type==="focusin"&&u.current&&h.preventDefault()}})}),f5=T.forwardRef((e,r)=>{const{__scopePopover:s,trapFocus:o,onOpenAutoFocus:u,onCloseAutoFocus:h,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:w,onInteractOutside:E,...A}=e,k=Jd(jg,s),R=mw(s);return PC(),c.jsx(dw,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:u,onUnmountAutoFocus:h,children:c.jsx(Ng,{asChild:!0,disableOutsidePointerEvents:m,onInteractOutside:E,onEscapeKeyDown:g,onPointerDownOutside:b,onFocusOutside:w,onDismiss:()=>k.onOpenChange(!1),children:c.jsx(_C,{"data-state":g5(k.open),role:"dialog",id:k.contentId,...R,...A,ref:r,style:{...A.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),m5="PopoverClose",joe=T.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,u=Jd(m5,s);return c.jsx(An.button,{type:"button",...o,ref:r,onClick:Nt(e.onClick,()=>u.onOpenChange(!1))})});joe.displayName=m5;var Coe="PopoverArrow",Aoe=T.forwardRef((e,r)=>{const{__scopePopover:s,...o}=e,u=mw(s);return c.jsx($C,{...u,...o,ref:r})});Aoe.displayName=Coe;function g5(e){return e?"open":"closed"}var Ooe=l5,koe=d5,Roe=h5,Toe=p5;function _oe({...e}){return c.jsx(Ooe,{"data-slot":"popover",...e})}function $oe({...e}){return c.jsx(koe,{"data-slot":"popover-trigger",...e})}function Noe({className:e,align:r="center",sideOffset:s=4,...o}){return c.jsx(Roe,{children:c.jsx(Toe,{"data-slot":"popover-content",align:r,sideOffset:s,className:vt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o})})}const Doe=({orgs:e})=>{const[r,s]=T.useState(!1),[o,u]=T.useState(rl.get()??"");T.useEffect(()=>rl.subscribe(m=>u(m??"")),[]);const h=e.find(m=>m.id===o);return c.jsxs(_oe,{open:r,onOpenChange:s,children:[c.jsx($oe,{asChild:!0,children:c.jsxs(Pe,{variant:"ghost",className:"h-9 w-full justify-between px-2","aria-label":"Switch organization",children:[c.jsxs("span",{className:"flex items-center gap-2 truncate",children:[c.jsx(mz,{className:"h-4 w-4"}),c.jsx("span",{className:"truncate",children:h?.name??"Select org"})]}),c.jsx(VZ,{className:"ml-2 h-4 w-4 opacity-50"})]})}),c.jsx(Noe,{className:"w-[280px] p-0",align:"start",children:c.jsxs(ioe,{children:[c.jsx(aoe,{placeholder:"Search orgs..."}),c.jsxs(ooe,{children:[c.jsx(loe,{children:"No orgs found."}),c.jsx(coe,{heading:"Organizations",children:e.map(m=>c.jsxs(uoe,{value:m.id,onSelect:g=>{rl.set(g),s(!1)},children:[c.jsx(gz,{className:vt("mr-2 h-4 w-4",o===m.id?"opacity-100":"opacity-0")}),c.jsx("span",{className:"truncate",children:m.name})]},m.id))})]})]})})]})},y5=T.createContext({});function Poe(e){const r=T.useRef(null);return r.current===null&&(r.current=e()),r.current}const b2=typeof window<"u",Moe=b2?T.useLayoutEffect:T.useEffect,w2=T.createContext(null);function S2(e,r){e.indexOf(r)===-1&&e.push(r)}function E2(e,r){const s=e.indexOf(r);s>-1&&e.splice(s,1)}const vu=(e,r,s)=>s>r?r:s<e?e:s;let j2=()=>{};const xu={},v5=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function x5(e){return typeof e=="object"&&e!==null}const b5=e=>/^0[^.\s]+$/u.test(e);function C2(e){let r;return()=>(r===void 0&&(r=e()),r)}const co=e=>e,Ioe=(e,r)=>s=>r(e(s)),gw=(...e)=>e.reduce(Ioe),Xb=(e,r,s)=>{const o=r-e;return o===0?1:(s-e)/o};class A2{constructor(){this.subscriptions=[]}add(r){return S2(this.subscriptions,r),()=>E2(this.subscriptions,r)}notify(r,s,o){const u=this.subscriptions.length;if(u)if(u===1)this.subscriptions[0](r,s,o);else for(let h=0;h<u;h++){const m=this.subscriptions[h];m&&m(r,s,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const lc=e=>e*1e3,lo=e=>e/1e3;function w5(e,r){return r?e*(1e3/r):0}const S5=(e,r,s)=>(((1-3*s+3*r)*e+(3*s-6*r))*e+3*r)*e,zoe=1e-7,Loe=12;function Foe(e,r,s,o,u){let h,m,g=0;do m=r+(s-r)/2,h=S5(m,o,u)-e,h>0?s=m:r=m;while(Math.abs(h)>zoe&&++g<Loe);return m}function yw(e,r,s,o){if(e===r&&s===o)return co;const u=h=>Foe(h,0,1,e,s);return h=>h===0||h===1?h:S5(u(h),r,o)}const E5=e=>r=>r<=.5?e(2*r)/2:(2-e(2*(1-r)))/2,j5=e=>r=>1-e(1-r),C5=yw(.33,1.53,.69,.99),O2=j5(C5),A5=E5(O2),O5=e=>(e*=2)<1?.5*O2(e):.5*(2-Math.pow(2,-10*(e-1))),k2=e=>1-Math.sin(Math.acos(e)),k5=j5(k2),R5=E5(k2),qoe=yw(.42,0,1,1),Boe=yw(0,0,.58,1),T5=yw(.42,0,.58,1),Uoe=e=>Array.isArray(e)&&typeof e[0]!="number",_5=e=>Array.isArray(e)&&typeof e[0]=="number",Koe={linear:co,easeIn:qoe,easeInOut:T5,easeOut:Boe,circIn:k2,circInOut:R5,circOut:k5,backIn:O2,backInOut:A5,backOut:C5,anticipate:O5},Voe=e=>typeof e=="string",II=e=>{if(_5(e)){j2(e.length===4);const[r,s,o,u]=e;return yw(r,s,o,u)}else if(Voe(e))return Koe[e];return e},sj=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Hoe(e,r){let s=new Set,o=new Set,u=!1,h=!1;const m=new WeakSet;let g={delta:0,timestamp:0,isProcessing:!1};function b(E){m.has(E)&&(w.schedule(E),e()),E(g)}const w={schedule:(E,A=!1,k=!1)=>{const M=k&&u?s:o;return A&&m.add(E),M.has(E)||M.add(E),E},cancel:E=>{o.delete(E),m.delete(E)},process:E=>{if(g=E,u){h=!0;return}u=!0,[s,o]=[o,s],s.forEach(b),s.clear(),u=!1,h&&(h=!1,w.process(E))}};return w}const Goe=40;function $5(e,r){let s=!1,o=!0;const u={delta:0,timestamp:0,isProcessing:!1},h=()=>s=!0,m=sj.reduce((K,z)=>(K[z]=Hoe(h),K),{}),{setup:g,read:b,resolveKeyframes:w,preUpdate:E,update:A,preRender:k,render:R,postRender:M}=m,I=()=>{const K=xu.useManualTiming?u.timestamp:performance.now();s=!1,xu.useManualTiming||(u.delta=o?1e3/60:Math.max(Math.min(K-u.timestamp,Goe),1)),u.timestamp=K,u.isProcessing=!0,g.process(u),b.process(u),w.process(u),E.process(u),A.process(u),k.process(u),R.process(u),M.process(u),u.isProcessing=!1,s&&r&&(o=!1,e(I))},F=()=>{s=!0,o=!0,u.isProcessing||e(I)};return{schedule:sj.reduce((K,z)=>{const W=m[z];return K[z]=(ae,Q=!1,te=!1)=>(s||F(),W.schedule(ae,Q,te)),K},{}),cancel:K=>{for(let z=0;z<sj.length;z++)m[sj[z]].cancel(K)},state:u,steps:m}}const{schedule:$r,cancel:Hd,state:Hs,steps:sT}=$5(typeof requestAnimationFrame<"u"?requestAnimationFrame:co,!0);let jj;function Xoe(){jj=void 0}const ga={now:()=>(jj===void 0&&ga.set(Hs.isProcessing||xu.useManualTiming?Hs.timestamp:performance.now()),jj),set:e=>{jj=e,queueMicrotask(Xoe)}},N5=e=>r=>typeof r=="string"&&r.startsWith(e),D5=N5("--"),Yoe=N5("var(--"),R2=e=>Yoe(e)?Zoe.test(e.split("/*")[0].trim()):!1,Zoe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,zg={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yb={...zg,transform:e=>vu(0,1,e)},ij={...zg,default:1},zb=e=>Math.round(e*1e5)/1e5,T2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Joe(e){return e==null}const Woe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_2=(e,r)=>s=>!!(typeof s=="string"&&Woe.test(s)&&s.startsWith(e)||r&&!Joe(s)&&Object.prototype.hasOwnProperty.call(s,r)),P5=(e,r,s)=>o=>{if(typeof o!="string")return o;const[u,h,m,g]=o.match(T2);return{[e]:parseFloat(u),[r]:parseFloat(h),[s]:parseFloat(m),alpha:g!==void 0?parseFloat(g):1}},Qoe=e=>vu(0,255,e),iT={...zg,transform:e=>Math.round(Qoe(e))},Ep={test:_2("rgb","red"),parse:P5("red","green","blue"),transform:({red:e,green:r,blue:s,alpha:o=1})=>"rgba("+iT.transform(e)+", "+iT.transform(r)+", "+iT.transform(s)+", "+zb(Yb.transform(o))+")"};function ele(e){let r="",s="",o="",u="";return e.length>5?(r=e.substring(1,3),s=e.substring(3,5),o=e.substring(5,7),u=e.substring(7,9)):(r=e.substring(1,2),s=e.substring(2,3),o=e.substring(3,4),u=e.substring(4,5),r+=r,s+=s,o+=o,u+=u),{red:parseInt(r,16),green:parseInt(s,16),blue:parseInt(o,16),alpha:u?parseInt(u,16)/255:1}}const e_={test:_2("#"),parse:ele,transform:Ep.transform},vw=e=>({test:r=>typeof r=="string"&&r.endsWith(e)&&r.split(" ").length===1,parse:parseFloat,transform:r=>`${r}${e}`}),Ld=vw("deg"),cc=vw("%"),sn=vw("px"),tle=vw("vh"),nle=vw("vw"),zI={...cc,parse:e=>cc.parse(e)/100,transform:e=>cc.transform(e*100)},lg={test:_2("hsl","hue"),parse:P5("hue","saturation","lightness"),transform:({hue:e,saturation:r,lightness:s,alpha:o=1})=>"hsla("+Math.round(e)+", "+cc.transform(zb(r))+", "+cc.transform(zb(s))+", "+zb(Yb.transform(o))+")"},gs={test:e=>Ep.test(e)||e_.test(e)||lg.test(e),parse:e=>Ep.test(e)?Ep.parse(e):lg.test(e)?lg.parse(e):e_.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ep.transform(e):lg.transform(e),getAnimatableNone:e=>{const r=gs.parse(e);return r.alpha=0,gs.transform(r)}},rle=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function sle(e){return isNaN(e)&&typeof e=="string"&&(e.match(T2)?.length||0)+(e.match(rle)?.length||0)>0}const M5="number",I5="color",ile="var",ale="var(",LI="${}",ole=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zb(e){const r=e.toString(),s=[],o={color:[],number:[],var:[]},u=[];let h=0;const g=r.replace(ole,b=>(gs.test(b)?(o.color.push(h),u.push(I5),s.push(gs.parse(b))):b.startsWith(ale)?(o.var.push(h),u.push(ile),s.push(b)):(o.number.push(h),u.push(M5),s.push(parseFloat(b))),++h,LI)).split(LI);return{values:s,split:g,indexes:o,types:u}}function z5(e){return Zb(e).values}function L5(e){const{split:r,types:s}=Zb(e),o=r.length;return u=>{let h="";for(let m=0;m<o;m++)if(h+=r[m],u[m]!==void 0){const g=s[m];g===M5?h+=zb(u[m]):g===I5?h+=gs.transform(u[m]):h+=u[m]}return h}}const lle=e=>typeof e=="number"?0:gs.test(e)?gs.getAnimatableNone(e):e;function cle(e){const r=z5(e);return L5(e)(r.map(lle))}const Gd={test:sle,parse:z5,createTransformer:L5,getAnimatableNone:cle};function aT(e,r,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(r-e)*6*s:s<1/2?r:s<2/3?e+(r-e)*(2/3-s)*6:e}function ule({hue:e,saturation:r,lightness:s,alpha:o}){e/=360,r/=100,s/=100;let u=0,h=0,m=0;if(!r)u=h=m=s;else{const g=s<.5?s*(1+r):s+r-s*r,b=2*s-g;u=aT(b,g,e+1/3),h=aT(b,g,e),m=aT(b,g,e-1/3)}return{red:Math.round(u*255),green:Math.round(h*255),blue:Math.round(m*255),alpha:o}}function Zj(e,r){return s=>s>0?r:e}const Lr=(e,r,s)=>e+(r-e)*s,oT=(e,r,s)=>{const o=e*e,u=s*(r*r-o)+o;return u<0?0:Math.sqrt(u)},dle=[e_,Ep,lg],hle=e=>dle.find(r=>r.test(e));function FI(e){const r=hle(e);if(!r)return!1;let s=r.parse(e);return r===lg&&(s=ule(s)),s}const qI=(e,r)=>{const s=FI(e),o=FI(r);if(!s||!o)return Zj(e,r);const u={...s};return h=>(u.red=oT(s.red,o.red,h),u.green=oT(s.green,o.green,h),u.blue=oT(s.blue,o.blue,h),u.alpha=Lr(s.alpha,o.alpha,h),Ep.transform(u))},t_=new Set(["none","hidden"]);function ple(e,r){return t_.has(e)?s=>s<=0?e:r:s=>s>=1?r:e}function fle(e,r){return s=>Lr(e,r,s)}function $2(e){return typeof e=="number"?fle:typeof e=="string"?R2(e)?Zj:gs.test(e)?qI:yle:Array.isArray(e)?F5:typeof e=="object"?gs.test(e)?qI:mle:Zj}function F5(e,r){const s=[...e],o=s.length,u=e.map((h,m)=>$2(h)(h,r[m]));return h=>{for(let m=0;m<o;m++)s[m]=u[m](h);return s}}function mle(e,r){const s={...e,...r},o={};for(const u in s)e[u]!==void 0&&r[u]!==void 0&&(o[u]=$2(e[u])(e[u],r[u]));return u=>{for(const h in o)s[h]=o[h](u);return s}}function gle(e,r){const s=[],o={color:0,var:0,number:0};for(let u=0;u<r.values.length;u++){const h=r.types[u],m=e.indexes[h][o[h]],g=e.values[m]??0;s[u]=g,o[h]++}return s}const yle=(e,r)=>{const s=Gd.createTransformer(r),o=Zb(e),u=Zb(r);return o.indexes.var.length===u.indexes.var.length&&o.indexes.color.length===u.indexes.color.length&&o.indexes.number.length>=u.indexes.number.length?t_.has(e)&&!u.values.length||t_.has(r)&&!o.values.length?ple(e,r):gw(F5(gle(o,u),u.values),s):Zj(e,r)};function q5(e,r,s){return typeof e=="number"&&typeof r=="number"&&typeof s=="number"?Lr(e,r,s):$2(e)(e,r)}const vle=e=>{const r=({timestamp:s})=>e(s);return{start:(s=!0)=>$r.update(r,s),stop:()=>Hd(r),now:()=>Hs.isProcessing?Hs.timestamp:ga.now()}},B5=(e,r,s=10)=>{let o="";const u=Math.max(Math.round(r/s),2);for(let h=0;h<u;h++)o+=Math.round(e(h/(u-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`},Jj=2e4;function N2(e){let r=0;const s=50;let o=e.next(r);for(;!o.done&&r<Jj;)r+=s,o=e.next(r);return r>=Jj?1/0:r}function xle(e,r=100,s){const o=s({...e,keyframes:[0,r]}),u=Math.min(N2(o),Jj);return{type:"keyframes",ease:h=>o.next(u*h).value/r,duration:lo(u)}}const ble=5;function U5(e,r,s){const o=Math.max(r-ble,0);return w5(s-e(o),r-o)}const Hr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},lT=.001;function wle({duration:e=Hr.duration,bounce:r=Hr.bounce,velocity:s=Hr.velocity,mass:o=Hr.mass}){let u,h,m=1-r;m=vu(Hr.minDamping,Hr.maxDamping,m),e=vu(Hr.minDuration,Hr.maxDuration,lo(e)),m<1?(u=w=>{const E=w*m,A=E*e,k=E-s,R=n_(w,m),M=Math.exp(-A);return lT-k/R*M},h=w=>{const A=w*m*e,k=A*s+s,R=Math.pow(m,2)*Math.pow(w,2)*e,M=Math.exp(-A),I=n_(Math.pow(w,2),m);return(-u(w)+lT>0?-1:1)*((k-R)*M)/I}):(u=w=>{const E=Math.exp(-w*e),A=(w-s)*e+1;return-lT+E*A},h=w=>{const E=Math.exp(-w*e),A=(s-w)*(e*e);return E*A});const g=5/e,b=Ele(u,h,g);if(e=lc(e),isNaN(b))return{stiffness:Hr.stiffness,damping:Hr.damping,duration:e};{const w=Math.pow(b,2)*o;return{stiffness:w,damping:m*2*Math.sqrt(o*w),duration:e}}}const Sle=12;function Ele(e,r,s){let o=s;for(let u=1;u<Sle;u++)o=o-e(o)/r(o);return o}function n_(e,r){return e*Math.sqrt(1-r*r)}const jle=["duration","bounce"],Cle=["stiffness","damping","mass"];function BI(e,r){return r.some(s=>e[s]!==void 0)}function Ale(e){let r={velocity:Hr.velocity,stiffness:Hr.stiffness,damping:Hr.damping,mass:Hr.mass,isResolvedFromDuration:!1,...e};if(!BI(e,Cle)&&BI(e,jle))if(e.visualDuration){const s=e.visualDuration,o=2*Math.PI/(s*1.2),u=o*o,h=2*vu(.05,1,1-(e.bounce||0))*Math.sqrt(u);r={...r,mass:Hr.mass,stiffness:u,damping:h}}else{const s=wle(e);r={...r,...s,mass:Hr.mass},r.isResolvedFromDuration=!0}return r}function Wj(e=Hr.visualDuration,r=Hr.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:r}:e;let{restSpeed:o,restDelta:u}=s;const h=s.keyframes[0],m=s.keyframes[s.keyframes.length-1],g={done:!1,value:h},{stiffness:b,damping:w,mass:E,duration:A,velocity:k,isResolvedFromDuration:R}=Ale({...s,velocity:-lo(s.velocity||0)}),M=k||0,I=w/(2*Math.sqrt(b*E)),F=m-h,H=lo(Math.sqrt(b/E)),V=Math.abs(F)<5;o||(o=V?Hr.restSpeed.granular:Hr.restSpeed.default),u||(u=V?Hr.restDelta.granular:Hr.restDelta.default);let K;if(I<1){const W=n_(H,I);K=ae=>{const Q=Math.exp(-I*H*ae);return m-Q*((M+I*H*F)/W*Math.sin(W*ae)+F*Math.cos(W*ae))}}else if(I===1)K=W=>m-Math.exp(-H*W)*(F+(M+H*F)*W);else{const W=H*Math.sqrt(I*I-1);K=ae=>{const Q=Math.exp(-I*H*ae),te=Math.min(W*ae,300);return m-Q*((M+I*H*F)*Math.sinh(te)+W*F*Math.cosh(te))/W}}const z={calculatedDuration:R&&A||null,next:W=>{const ae=K(W);if(R)g.done=W>=A;else{let Q=W===0?M:0;I<1&&(Q=W===0?lc(M):U5(K,W,ae));const te=Math.abs(Q)<=o,de=Math.abs(m-ae)<=u;g.done=te&&de}return g.value=g.done?m:ae,g},toString:()=>{const W=Math.min(N2(z),Jj),ae=B5(Q=>z.next(W*Q).value,W,30);return W+"ms "+ae},toTransition:()=>{}};return z}Wj.applyToOptions=e=>{const r=xle(e,100,Wj);return e.ease=r.ease,e.duration=lc(r.duration),e.type="keyframes",e};function r_({keyframes:e,velocity:r=0,power:s=.8,timeConstant:o=325,bounceDamping:u=10,bounceStiffness:h=500,modifyTarget:m,min:g,max:b,restDelta:w=.5,restSpeed:E}){const A=e[0],k={done:!1,value:A},R=te=>g!==void 0&&te<g||b!==void 0&&te>b,M=te=>g===void 0?b:b===void 0||Math.abs(g-te)<Math.abs(b-te)?g:b;let I=s*r;const F=A+I,H=m===void 0?F:m(F);H!==F&&(I=H-A);const V=te=>-I*Math.exp(-te/o),K=te=>H+V(te),z=te=>{const de=V(te),je=K(te);k.done=Math.abs(de)<=w,k.value=k.done?H:je};let W,ae;const Q=te=>{R(k.value)&&(W=te,ae=Wj({keyframes:[k.value,M(k.value)],velocity:U5(K,te,k.value),damping:u,stiffness:h,restDelta:w,restSpeed:E}))};return Q(0),{calculatedDuration:null,next:te=>{let de=!1;return!ae&&W===void 0&&(de=!0,z(te),Q(te)),W!==void 0&&te>=W?ae.next(te-W):(!de&&z(te),k)}}}function Ole(e,r,s){const o=[],u=s||xu.mix||q5,h=e.length-1;for(let m=0;m<h;m++){let g=u(e[m],e[m+1]);if(r){const b=Array.isArray(r)?r[m]||co:r;g=gw(b,g)}o.push(g)}return o}function kle(e,r,{clamp:s=!0,ease:o,mixer:u}={}){const h=e.length;if(j2(h===r.length),h===1)return()=>r[0];if(h===2&&r[0]===r[1])return()=>r[1];const m=e[0]===e[1];e[0]>e[h-1]&&(e=[...e].reverse(),r=[...r].reverse());const g=Ole(r,o,u),b=g.length,w=E=>{if(m&&E<e[0])return r[0];let A=0;if(b>1)for(;A<e.length-2&&!(E<e[A+1]);A++);const k=Xb(e[A],e[A+1],E);return g[A](k)};return s?E=>w(vu(e[0],e[h-1],E)):w}function Rle(e,r){const s=e[e.length-1];for(let o=1;o<=r;o++){const u=Xb(0,r,o);e.push(Lr(s,1,u))}}function Tle(e){const r=[0];return Rle(r,e.length-1),r}function _le(e,r){return e.map(s=>s*r)}function $le(e,r){return e.map(()=>r||T5).splice(0,e.length-1)}function Lb({duration:e=300,keyframes:r,times:s,ease:o="easeInOut"}){const u=Uoe(o)?o.map(II):II(o),h={done:!1,value:r[0]},m=_le(s&&s.length===r.length?s:Tle(r),e),g=kle(m,r,{ease:Array.isArray(u)?u:$le(r,u)});return{calculatedDuration:e,next:b=>(h.value=g(b),h.done=b>=e,h)}}const Nle=e=>e!==null;function D2(e,{repeat:r,repeatType:s="loop"},o,u=1){const h=e.filter(Nle),g=u<0||r&&s!=="loop"&&r%2===1?0:h.length-1;return!g||o===void 0?h[g]:o}const Dle={decay:r_,inertia:r_,tween:Lb,keyframes:Lb,spring:Wj};function K5(e){typeof e.type=="string"&&(e.type=Dle[e.type])}class P2{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(r=>{this.resolve=r})}notifyFinished(){this.resolve()}then(r,s){return this.finished.then(r,s)}}const Ple=e=>e/100;class M2 extends P2{constructor(r){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==ga.now()&&this.tick(ga.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=r,this.initAnimation(),this.play(),r.autoplay===!1&&this.pause()}initAnimation(){const{options:r}=this;K5(r);const{type:s=Lb,repeat:o=0,repeatDelay:u=0,repeatType:h,velocity:m=0}=r;let{keyframes:g}=r;const b=s||Lb;b!==Lb&&typeof g[0]!="number"&&(this.mixKeyframes=gw(Ple,q5(g[0],g[1])),g=[0,100]);const w=b({...r,keyframes:g});h==="mirror"&&(this.mirroredGenerator=b({...r,keyframes:[...g].reverse(),velocity:-m})),w.calculatedDuration===null&&(w.calculatedDuration=N2(w));const{calculatedDuration:E}=w;this.calculatedDuration=E,this.resolvedDuration=E+u,this.totalDuration=this.resolvedDuration*(o+1)-u,this.generator=w}updateTime(r){const s=Math.round(r-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(r,s=!1){const{generator:o,totalDuration:u,mixKeyframes:h,mirroredGenerator:m,resolvedDuration:g,calculatedDuration:b}=this;if(this.startTime===null)return o.next(0);const{delay:w=0,keyframes:E,repeat:A,repeatType:k,repeatDelay:R,type:M,onUpdate:I,finalKeyframe:F}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,r):this.speed<0&&(this.startTime=Math.min(r-u/this.speed,this.startTime)),s?this.currentTime=r:this.updateTime(r);const H=this.currentTime-w*(this.playbackSpeed>=0?1:-1),V=this.playbackSpeed>=0?H<0:H>u;this.currentTime=Math.max(H,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let K=this.currentTime,z=o;if(A){const te=Math.min(this.currentTime,u)/g;let de=Math.floor(te),je=te%1;!je&&te>=1&&(je=1),je===1&&de--,de=Math.min(de,A+1),de%2&&(k==="reverse"?(je=1-je,R&&(je-=R/g)):k==="mirror"&&(z=m)),K=vu(0,1,je)*g}const W=V?{done:!1,value:E[0]}:z.next(K);h&&(W.value=h(W.value));let{done:ae}=W;!V&&b!==null&&(ae=this.playbackSpeed>=0?this.currentTime>=u:this.currentTime<=0);const Q=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&ae);return Q&&M!==r_&&(W.value=D2(E,this.options,F,this.speed)),I&&I(W.value),Q&&this.finish(),W}then(r,s){return this.finished.then(r,s)}get duration(){return lo(this.calculatedDuration)}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+lo(r)}get time(){return lo(this.currentTime)}set time(r){r=lc(r),this.currentTime=r,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=r:this.driver&&(this.startTime=this.driver.now()-r/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(r){this.updateTime(ga.now());const s=this.playbackSpeed!==r;this.playbackSpeed=r,s&&(this.time=lo(this.currentTime))}play(){if(this.isStopped)return;const{driver:r=vle,startTime:s}=this.options;this.driver||(this.driver=r(u=>this.tick(u))),this.options.onPlay?.();const o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=s??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ga.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(r){return this.startTime=0,this.tick(r,!0)}attachTimeline(r){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),r.observe(this)}}function Mle(e){for(let r=1;r<e.length;r++)e[r]??(e[r]=e[r-1])}const jp=e=>e*180/Math.PI,s_=e=>{const r=jp(Math.atan2(e[1],e[0]));return i_(r)},Ile={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:s_,rotateZ:s_,skewX:e=>jp(Math.atan(e[1])),skewY:e=>jp(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},i_=e=>(e=e%360,e<0&&(e+=360),e),UI=s_,KI=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),VI=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zle={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:KI,scaleY:VI,scale:e=>(KI(e)+VI(e))/2,rotateX:e=>i_(jp(Math.atan2(e[6],e[5]))),rotateY:e=>i_(jp(Math.atan2(-e[2],e[0]))),rotateZ:UI,rotate:UI,skewX:e=>jp(Math.atan(e[4])),skewY:e=>jp(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function a_(e){return e.includes("scale")?1:0}function o_(e,r){if(!e||e==="none")return a_(r);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,u;if(s)o=zle,u=s;else{const g=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Ile,u=g}if(!u)return a_(r);const h=o[r],m=u[1].split(",").map(Fle);return typeof h=="function"?h(m):m[h]}const Lle=(e,r)=>{const{transform:s="none"}=getComputedStyle(e);return o_(s,r)};function Fle(e){return parseFloat(e.trim())}const Lg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fg=new Set(Lg),HI=e=>e===zg||e===sn,qle=new Set(["x","y","z"]),Ble=Lg.filter(e=>!qle.has(e));function Ule(e){const r=[];return Ble.forEach(s=>{const o=e.getValue(s);o!==void 0&&(r.push([s,o.get()]),o.set(s.startsWith("scale")?1:0))}),r}const Ap={width:({x:e},{paddingLeft:r="0",paddingRight:s="0"})=>e.max-e.min-parseFloat(r)-parseFloat(s),height:({y:e},{paddingTop:r="0",paddingBottom:s="0"})=>e.max-e.min-parseFloat(r)-parseFloat(s),top:(e,{top:r})=>parseFloat(r),left:(e,{left:r})=>parseFloat(r),bottom:({y:e},{top:r})=>parseFloat(r)+(e.max-e.min),right:({x:e},{left:r})=>parseFloat(r)+(e.max-e.min),x:(e,{transform:r})=>o_(r,"x"),y:(e,{transform:r})=>o_(r,"y")};Ap.translateX=Ap.x;Ap.translateY=Ap.y;const Op=new Set;let l_=!1,c_=!1,u_=!1;function V5(){if(c_){const e=Array.from(Op).filter(o=>o.needsMeasurement),r=new Set(e.map(o=>o.element)),s=new Map;r.forEach(o=>{const u=Ule(o);u.length&&(s.set(o,u),o.render())}),e.forEach(o=>o.measureInitialState()),r.forEach(o=>{o.render();const u=s.get(o);u&&u.forEach(([h,m])=>{o.getValue(h)?.set(m)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}c_=!1,l_=!1,Op.forEach(e=>e.complete(u_)),Op.clear()}function H5(){Op.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(c_=!0)})}function Kle(){u_=!0,H5(),V5(),u_=!1}class I2{constructor(r,s,o,u,h,m=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...r],this.onComplete=s,this.name=o,this.motionValue=u,this.element=h,this.isAsync=m}scheduleResolve(){this.state="scheduled",this.isAsync?(Op.add(this),l_||(l_=!0,$r.read(H5),$r.resolveKeyframes(V5))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:r,name:s,element:o,motionValue:u}=this;if(r[0]===null){const h=u?.get(),m=r[r.length-1];if(h!==void 0)r[0]=h;else if(o&&s){const g=o.readValue(s,m);g!=null&&(r[0]=g)}r[0]===void 0&&(r[0]=m),u&&h===void 0&&u.set(r[0])}Mle(r)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(r=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,r),Op.delete(this)}cancel(){this.state==="scheduled"&&(Op.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Vle=e=>e.startsWith("--");function Hle(e,r,s){Vle(r)?e.style.setProperty(r,s):e.style[r]=s}const Gle=C2(()=>window.ScrollTimeline!==void 0),Xle={};function Yle(e,r){const s=C2(e);return()=>Xle[r]??s()}const G5=Yle(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ob=([e,r,s,o])=>`cubic-bezier(${e}, ${r}, ${s}, ${o})`,GI={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ob([0,.65,.55,1]),circOut:Ob([.55,0,1,.45]),backIn:Ob([.31,.01,.66,-.59]),backOut:Ob([.33,1.53,.69,.99])};function X5(e,r){if(e)return typeof e=="function"?G5()?B5(e,r):"ease-out":_5(e)?Ob(e):Array.isArray(e)?e.map(s=>X5(s,r)||GI.easeOut):GI[e]}function Zle(e,r,s,{delay:o=0,duration:u=300,repeat:h=0,repeatType:m="loop",ease:g="easeOut",times:b}={},w=void 0){const E={[r]:s};b&&(E.offset=b);const A=X5(g,u);Array.isArray(A)&&(E.easing=A);const k={delay:o,duration:u,easing:Array.isArray(A)?"linear":A,fill:"both",iterations:h+1,direction:m==="reverse"?"alternate":"normal"};return w&&(k.pseudoElement=w),e.animate(E,k)}function Y5(e){return typeof e=="function"&&"applyToOptions"in e}function Jle({type:e,...r}){return Y5(e)&&G5()?e.applyToOptions(r):(r.duration??(r.duration=300),r.ease??(r.ease="easeOut"),r)}class Wle extends P2{constructor(r){if(super(),this.finishedTime=null,this.isStopped=!1,!r)return;const{element:s,name:o,keyframes:u,pseudoElement:h,allowFlatten:m=!1,finalKeyframe:g,onComplete:b}=r;this.isPseudoElement=!!h,this.allowFlatten=m,this.options=r,j2(typeof r.type!="string");const w=Jle(r);this.animation=Zle(s,o,u,w,h),w.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!h){const E=D2(u,this.options,g,this.speed);this.updateMotionValue?this.updateMotionValue(E):Hle(s,o,E),this.animation.cancel()}b?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:r}=this;r==="idle"||r==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const r=this.animation.effect?.getComputedTiming?.().duration||0;return lo(Number(r))}get iterationDuration(){const{delay:r=0}=this.options||{};return this.duration+lo(r)}get time(){return lo(Number(this.animation.currentTime)||0)}set time(r){this.finishedTime=null,this.animation.currentTime=lc(r)}get speed(){return this.animation.playbackRate}set speed(r){r<0&&(this.finishedTime=null),this.animation.playbackRate=r}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(r){this.animation.startTime=r}attachTimeline({timeline:r,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,r&&Gle()?(this.animation.timeline=r,co):s(this)}}const Z5={anticipate:O5,backInOut:A5,circInOut:R5};function Qle(e){return e in Z5}function ece(e){typeof e.ease=="string"&&Qle(e.ease)&&(e.ease=Z5[e.ease])}const XI=10;class tce extends Wle{constructor(r){ece(r),K5(r),super(r),r.startTime&&(this.startTime=r.startTime),this.options=r}updateMotionValue(r){const{motionValue:s,onUpdate:o,onComplete:u,element:h,...m}=this.options;if(!s)return;if(r!==void 0){s.set(r);return}const g=new M2({...m,autoplay:!1}),b=lc(this.finishedTime??this.time);s.setWithVelocity(g.sample(b-XI).value,g.sample(b).value,XI),g.stop()}}const YI=(e,r)=>r==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Gd.test(e)||e==="0")&&!e.startsWith("url("));function nce(e){const r=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==r)return!0}function rce(e,r,s,o){const u=e[0];if(u===null)return!1;if(r==="display"||r==="visibility")return!0;const h=e[e.length-1],m=YI(u,r),g=YI(h,r);return!m||!g?!1:nce(e)||(s==="spring"||Y5(s))&&o}function d_(e){e.duration=0,e.type="keyframes"}const sce=new Set(["opacity","clipPath","filter","transform"]),ice=C2(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ace(e){const{motionValue:r,name:s,repeatDelay:o,repeatType:u,damping:h,type:m}=e;if(!(r?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:b,transformTemplate:w}=r.owner.getProps();return ice()&&s&&sce.has(s)&&(s!=="transform"||!w)&&!b&&!o&&u!=="mirror"&&h!==0&&m!=="inertia"}const oce=40;class lce extends P2{constructor({autoplay:r=!0,delay:s=0,type:o="keyframes",repeat:u=0,repeatDelay:h=0,repeatType:m="loop",keyframes:g,name:b,motionValue:w,element:E,...A}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ga.now();const k={autoplay:r,delay:s,type:o,repeat:u,repeatDelay:h,repeatType:m,name:b,motionValue:w,element:E,...A},R=E?.KeyframeResolver||I2;this.keyframeResolver=new R(g,(M,I,F)=>this.onKeyframesResolved(M,I,k,!F),b,w,E),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(r,s,o,u){this.keyframeResolver=void 0;const{name:h,type:m,velocity:g,delay:b,isHandoff:w,onUpdate:E}=o;this.resolvedAt=ga.now(),rce(r,h,m,g)||((xu.instantAnimations||!b)&&E?.(D2(r,o,s)),r[0]=r[r.length-1],d_(o),o.repeat=0);const k={startTime:u?this.resolvedAt?this.resolvedAt-this.createdAt>oce?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:s,...o,keyframes:r},R=!w&&ace(k)?new tce({...k,element:k.motionValue.owner.current}):new M2(k);R.finished.then(()=>this.notifyFinished()).catch(co),this.pendingTimeline&&(this.stopTimeline=R.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=R}get finished(){return this._animation?this.animation.finished:this._finished}then(r,s){return this.finished.finally(r).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Kle()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(r){this.animation.time=r}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(r){this.animation.speed=r}get startTime(){return this.animation.startTime}attachTimeline(r){return this._animation?this.stopTimeline=this.animation.attachTimeline(r):this.pendingTimeline=r,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const cce=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uce(e){const r=cce.exec(e);if(!r)return[,];const[,s,o,u]=r;return[`--${s??o}`,u]}function J5(e,r,s=1){const[o,u]=uce(e);if(!o)return;const h=window.getComputedStyle(r).getPropertyValue(o);if(h){const m=h.trim();return v5(m)?parseFloat(m):m}return R2(u)?J5(u,r,s+1):u}function z2(e,r){return e?.[r]??e?.default??e}const W5=new Set(["width","height","top","left","right","bottom",...Lg]),dce={test:e=>e==="auto",parse:e=>e},Q5=e=>r=>r.test(e),eF=[zg,sn,cc,Ld,nle,tle,dce],ZI=e=>eF.find(Q5(e));function hce(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||b5(e):!0}const pce=new Set(["brightness","contrast","saturate","opacity"]);function fce(e){const[r,s]=e.slice(0,-1).split("(");if(r==="drop-shadow")return e;const[o]=s.match(T2)||[];if(!o)return e;const u=s.replace(o,"");let h=pce.has(r)?1:0;return o!==s&&(h*=100),r+"("+h+u+")"}const mce=/\b([a-z-]*)\(.*?\)/gu,h_={...Gd,getAnimatableNone:e=>{const r=e.match(mce);return r?r.map(fce).join(" "):e}},JI={...zg,transform:Math.round},gce={rotate:Ld,rotateX:Ld,rotateY:Ld,rotateZ:Ld,scale:ij,scaleX:ij,scaleY:ij,scaleZ:ij,skew:Ld,skewX:Ld,skewY:Ld,distance:sn,translateX:sn,translateY:sn,translateZ:sn,x:sn,y:sn,z:sn,perspective:sn,transformPerspective:sn,opacity:Yb,originX:zI,originY:zI,originZ:sn},L2={borderWidth:sn,borderTopWidth:sn,borderRightWidth:sn,borderBottomWidth:sn,borderLeftWidth:sn,borderRadius:sn,radius:sn,borderTopLeftRadius:sn,borderTopRightRadius:sn,borderBottomRightRadius:sn,borderBottomLeftRadius:sn,width:sn,maxWidth:sn,height:sn,maxHeight:sn,top:sn,right:sn,bottom:sn,left:sn,padding:sn,paddingTop:sn,paddingRight:sn,paddingBottom:sn,paddingLeft:sn,margin:sn,marginTop:sn,marginRight:sn,marginBottom:sn,marginLeft:sn,backgroundPositionX:sn,backgroundPositionY:sn,...gce,zIndex:JI,fillOpacity:Yb,strokeOpacity:Yb,numOctaves:JI},yce={...L2,color:gs,backgroundColor:gs,outlineColor:gs,fill:gs,stroke:gs,borderColor:gs,borderTopColor:gs,borderRightColor:gs,borderBottomColor:gs,borderLeftColor:gs,filter:h_,WebkitFilter:h_},tF=e=>yce[e];function nF(e,r){let s=tF(e);return s!==h_&&(s=Gd),s.getAnimatableNone?s.getAnimatableNone(r):void 0}const vce=new Set(["auto","none","0"]);function xce(e,r,s){let o=0,u;for(;o<e.length&&!u;){const h=e[o];typeof h=="string"&&!vce.has(h)&&Zb(h).values.length&&(u=e[o]),o++}if(u&&s)for(const h of r)e[h]=nF(s,u)}class bce extends I2{constructor(r,s,o,u,h){super(r,s,o,u,h,!0)}readKeyframes(){const{unresolvedKeyframes:r,element:s,name:o}=this;if(!s||!s.current)return;super.readKeyframes();for(let b=0;b<r.length;b++){let w=r[b];if(typeof w=="string"&&(w=w.trim(),R2(w))){const E=J5(w,s.current);E!==void 0&&(r[b]=E),b===r.length-1&&(this.finalKeyframe=w)}}if(this.resolveNoneKeyframes(),!W5.has(o)||r.length!==2)return;const[u,h]=r,m=ZI(u),g=ZI(h);if(m!==g)if(HI(m)&&HI(g))for(let b=0;b<r.length;b++){const w=r[b];typeof w=="string"&&(r[b]=parseFloat(w))}else Ap[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:r,name:s}=this,o=[];for(let u=0;u<r.length;u++)(r[u]===null||hce(r[u]))&&o.push(u);o.length&&xce(r,o,s)}measureInitialState(){const{element:r,unresolvedKeyframes:s,name:o}=this;if(!r||!r.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ap[o](r.measureViewportBox(),window.getComputedStyle(r.current)),s[0]=this.measuredOrigin;const u=s[s.length-1];u!==void 0&&r.getValue(o,u).jump(u,!1)}measureEndState(){const{element:r,name:s,unresolvedKeyframes:o}=this;if(!r||!r.current)return;const u=r.getValue(s);u&&u.jump(this.measuredOrigin,!1);const h=o.length-1,m=o[h];o[h]=Ap[s](r.measureViewportBox(),window.getComputedStyle(r.current)),m!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=m),this.removedTransforms?.length&&this.removedTransforms.forEach(([g,b])=>{r.getValue(g).set(b)}),this.resolveNoneKeyframes()}}function wce(e,r,s){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const u=s?.[e]??o.querySelectorAll(e);return u?Array.from(u):[]}return Array.from(e)}const rF=(e,r)=>r&&typeof e=="number"?r.transform(e):e;function Sce(e){return x5(e)&&"offsetHeight"in e}const WI=30,Ece=e=>!isNaN(parseFloat(e));class jce{constructor(r,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{const u=ga.now();if(this.updatedAt!==u&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const h of this.dependents)h.dirty()},this.hasAnimated=!1,this.setCurrent(r),this.owner=s.owner}setCurrent(r){this.current=r,this.updatedAt=ga.now(),this.canTrackVelocity===null&&r!==void 0&&(this.canTrackVelocity=Ece(this.current))}setPrevFrameValue(r=this.current){this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt}onChange(r){return this.on("change",r)}on(r,s){this.events[r]||(this.events[r]=new A2);const o=this.events[r].add(s);return r==="change"?()=>{o(),$r.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const r in this.events)this.events[r].clear()}attach(r,s){this.passiveEffect=r,this.stopPassiveEffect=s}set(r){this.passiveEffect?this.passiveEffect(r,this.updateAndNotify):this.updateAndNotify(r)}setWithVelocity(r,s,o){this.set(s),this.prev=void 0,this.prevFrameValue=r,this.prevUpdatedAt=this.updatedAt-o}jump(r,s=!0){this.updateAndNotify(r),this.prev=r,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(r){this.dependents||(this.dependents=new Set),this.dependents.add(r)}removeDependent(r){this.dependents&&this.dependents.delete(r)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const r=ga.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||r-this.updatedAt>WI)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,WI);return w5(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(r){return this.stop(),new Promise(s=>{this.hasAnimated=!0,this.animation=r(s),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Cg(e,r){return new jce(e,r)}const{schedule:F2}=$5(queueMicrotask,!1),Jo={x:!1,y:!1};function sF(){return Jo.x||Jo.y}function Cce(e){return e==="x"||e==="y"?Jo[e]?null:(Jo[e]=!0,()=>{Jo[e]=!1}):Jo.x||Jo.y?null:(Jo.x=Jo.y=!0,()=>{Jo.x=Jo.y=!1})}function iF(e,r){const s=wce(e),o=new AbortController,u={passive:!0,...r,signal:o.signal};return[s,u,()=>o.abort()]}function QI(e){return!(e.pointerType==="touch"||sF())}function Ace(e,r,s={}){const[o,u,h]=iF(e,s),m=g=>{if(!QI(g))return;const{target:b}=g,w=r(b,g);if(typeof w!="function"||!b)return;const E=A=>{QI(A)&&(w(A),b.removeEventListener("pointerleave",E))};b.addEventListener("pointerleave",E,u)};return o.forEach(g=>{g.addEventListener("pointerenter",m,u)}),h}const aF=(e,r)=>r?e===r?!0:aF(e,r.parentElement):!1,q2=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Oce=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function kce(e){return Oce.has(e.tagName)||e.tabIndex!==-1}const Cj=new WeakSet;function e4(e){return r=>{r.key==="Enter"&&e(r)}}function cT(e,r){e.dispatchEvent(new PointerEvent("pointer"+r,{isPrimary:!0,bubbles:!0}))}const Rce=(e,r)=>{const s=e.currentTarget;if(!s)return;const o=e4(()=>{if(Cj.has(s))return;cT(s,"down");const u=e4(()=>{cT(s,"up")}),h=()=>cT(s,"cancel");s.addEventListener("keyup",u,r),s.addEventListener("blur",h,r)});s.addEventListener("keydown",o,r),s.addEventListener("blur",()=>s.removeEventListener("keydown",o),r)};function t4(e){return q2(e)&&!sF()}function Tce(e,r,s={}){const[o,u,h]=iF(e,s),m=g=>{const b=g.currentTarget;if(!t4(g))return;Cj.add(b);const w=r(b,g),E=(R,M)=>{window.removeEventListener("pointerup",A),window.removeEventListener("pointercancel",k),Cj.has(b)&&Cj.delete(b),t4(R)&&typeof w=="function"&&w(R,{success:M})},A=R=>{E(R,b===window||b===document||s.useGlobalTarget||aF(b,R.target))},k=R=>{E(R,!1)};window.addEventListener("pointerup",A,u),window.addEventListener("pointercancel",k,u)};return o.forEach(g=>{(s.useGlobalTarget?window:g).addEventListener("pointerdown",m,u),Sce(g)&&(g.addEventListener("focus",w=>Rce(w,u)),!kce(g)&&!g.hasAttribute("tabindex")&&(g.tabIndex=0))}),h}function oF(e){return x5(e)&&"ownerSVGElement"in e}function _ce(e){return oF(e)&&e.tagName==="svg"}const Ci=e=>!!(e&&e.getVelocity),$ce=[...eF,gs,Gd],Nce=e=>$ce.find(Q5(e)),lF=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Dce(e=!0){const r=T.useContext(w2);if(r===null)return[!0,null];const{isPresent:s,onExitComplete:o,register:u}=r,h=T.useId();T.useEffect(()=>{if(e)return u(h)},[e]);const m=T.useCallback(()=>e&&o&&o(h),[h,o,e]);return!s&&o?[!1,m]:[!0]}const cF=T.createContext({strict:!1}),n4={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ag={};for(const e in n4)Ag[e]={isEnabled:r=>n4[e].some(s=>!!r[s])};function Pce(e){for(const r in e)Ag[r]={...Ag[r],...e[r]}}const Mce=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Qj(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Mce.has(e)}let uF=e=>!Qj(e);function Ice(e){typeof e=="function"&&(uF=r=>r.startsWith("on")?!Qj(r):e(r))}try{Ice(require("@emotion/is-prop-valid").default)}catch{}function zce(e,r,s){const o={};for(const u in e)u==="values"&&typeof e.values=="object"||(uF(u)||s===!0&&Qj(u)||!r&&!Qj(u)||e.draggable&&u.startsWith("onDrag"))&&(o[u]=e[u]);return o}const VC=T.createContext({});function HC(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Jb(e){return typeof e=="string"||Array.isArray(e)}const B2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],U2=["initial",...B2];function GC(e){return HC(e.animate)||U2.some(r=>Jb(e[r]))}function dF(e){return!!(GC(e)||e.variants)}function Lce(e,r){if(GC(e)){const{initial:s,animate:o}=e;return{initial:s===!1||Jb(s)?s:void 0,animate:Jb(o)?o:void 0}}return e.inherit!==!1?r:{}}function Fce(e){const{initial:r,animate:s}=Lce(e,T.useContext(VC));return T.useMemo(()=>({initial:r,animate:s}),[r4(r),r4(s)])}function r4(e){return Array.isArray(e)?e.join(" "):e}function s4(e,r){return r.max===r.min?0:e/(r.max-r.min)*100}const db={correct:(e,r)=>{if(!r.target)return e;if(typeof e=="string")if(sn.test(e))e=parseFloat(e);else return e;const s=s4(e,r.target.x),o=s4(e,r.target.y);return`${s}% ${o}%`}},qce={correct:(e,{treeScale:r,projectionDelta:s})=>{const o=e,u=Gd.parse(e);if(u.length>5)return o;const h=Gd.createTransformer(e),m=typeof u[0]!="number"?1:0,g=s.x.scale*r.x,b=s.y.scale*r.y;u[0+m]/=g,u[1+m]/=b;const w=Lr(g,b,.5);return typeof u[2+m]=="number"&&(u[2+m]/=w),typeof u[3+m]=="number"&&(u[3+m]/=w),h(u)}},p_={borderRadius:{...db,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:db,borderTopRightRadius:db,borderBottomLeftRadius:db,borderBottomRightRadius:db,boxShadow:qce};function hF(e,{layout:r,layoutId:s}){return Fg.has(e)||e.startsWith("origin")||(r||s!==void 0)&&(!!p_[e]||e==="opacity")}const Bce={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uce=Lg.length;function Kce(e,r,s){let o="",u=!0;for(let h=0;h<Uce;h++){const m=Lg[h],g=e[m];if(g===void 0)continue;let b=!0;if(typeof g=="number"?b=g===(m.startsWith("scale")?1:0):b=parseFloat(g)===0,!b||s){const w=rF(g,L2[m]);if(!b){u=!1;const E=Bce[m]||m;o+=`${E}(${w}) `}s&&(r[m]=w)}}return o=o.trim(),s?o=s(r,u?"":o):u&&(o="none"),o}function K2(e,r,s){const{style:o,vars:u,transformOrigin:h}=e;let m=!1,g=!1;for(const b in r){const w=r[b];if(Fg.has(b)){m=!0;continue}else if(D5(b)){u[b]=w;continue}else{const E=rF(w,L2[b]);b.startsWith("origin")?(g=!0,h[b]=E):o[b]=E}}if(r.transform||(m||s?o.transform=Kce(r,e.transform,s):o.transform&&(o.transform="none")),g){const{originX:b="50%",originY:w="50%",originZ:E=0}=h;o.transformOrigin=`${b} ${w} ${E}`}}const V2=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pF(e,r,s){for(const o in r)!Ci(r[o])&&!hF(o,s)&&(e[o]=r[o])}function Vce({transformTemplate:e},r){return T.useMemo(()=>{const s=V2();return K2(s,r,e),Object.assign({},s.vars,s.style)},[r])}function Hce(e,r){const s=e.style||{},o={};return pF(o,s,e),Object.assign(o,Vce(e,r)),o}function Gce(e,r){const s={},o=Hce(e,r);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=o,s}const Xce={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yce={offset:"strokeDashoffset",array:"strokeDasharray"};function Zce(e,r,s=1,o=0,u=!0){e.pathLength=1;const h=u?Xce:Yce;e[h.offset]=sn.transform(-o);const m=sn.transform(r),g=sn.transform(s);e[h.array]=`${m} ${g}`}function fF(e,{attrX:r,attrY:s,attrScale:o,pathLength:u,pathSpacing:h=1,pathOffset:m=0,...g},b,w,E){if(K2(e,g,w),b){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:A,style:k}=e;A.transform&&(k.transform=A.transform,delete A.transform),(k.transform||A.transformOrigin)&&(k.transformOrigin=A.transformOrigin??"50% 50%",delete A.transformOrigin),k.transform&&(k.transformBox=E?.transformBox??"fill-box",delete A.transformBox),r!==void 0&&(A.x=r),s!==void 0&&(A.y=s),o!==void 0&&(A.scale=o),u!==void 0&&Zce(A,u,h,m,!1)}const mF=()=>({...V2(),attrs:{}}),gF=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Jce(e,r,s,o){const u=T.useMemo(()=>{const h=mF();return fF(h,r,gF(o),e.transformTemplate,e.style),{...h.attrs,style:{...h.style}}},[r]);if(e.style){const h={};pF(h,e.style,e),u.style={...h,...u.style}}return u}const Wce=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function H2(e){return typeof e!="string"||e.includes("-")?!1:!!(Wce.indexOf(e)>-1||/[A-Z]/u.test(e))}function Qce(e,r,s,{latestValues:o},u,h=!1){const g=(H2(e)?Jce:Gce)(r,o,u,e),b=zce(r,typeof e=="string",h),w=e!==T.Fragment?{...b,...g,ref:s}:{},{children:E}=r,A=T.useMemo(()=>Ci(E)?E.get():E,[E]);return T.createElement(e,{...w,children:A})}function i4(e){const r=[{},{}];return e?.values.forEach((s,o)=>{r[0][o]=s.get(),r[1][o]=s.getVelocity()}),r}function G2(e,r,s,o){if(typeof r=="function"){const[u,h]=i4(o);r=r(s!==void 0?s:e.custom,u,h)}if(typeof r=="string"&&(r=e.variants&&e.variants[r]),typeof r=="function"){const[u,h]=i4(o);r=r(s!==void 0?s:e.custom,u,h)}return r}function Aj(e){return Ci(e)?e.get():e}function eue({scrapeMotionValuesFromProps:e,createRenderState:r},s,o,u){return{latestValues:tue(s,o,u,e),renderState:r()}}function tue(e,r,s,o){const u={},h=o(e,{});for(const k in h)u[k]=Aj(h[k]);let{initial:m,animate:g}=e;const b=GC(e),w=dF(e);r&&w&&!b&&e.inherit!==!1&&(m===void 0&&(m=r.initial),g===void 0&&(g=r.animate));let E=s?s.initial===!1:!1;E=E||m===!1;const A=E?g:m;if(A&&typeof A!="boolean"&&!HC(A)){const k=Array.isArray(A)?A:[A];for(let R=0;R<k.length;R++){const M=G2(e,k[R]);if(M){const{transitionEnd:I,transition:F,...H}=M;for(const V in H){let K=H[V];if(Array.isArray(K)){const z=E?K.length-1:0;K=K[z]}K!==null&&(u[V]=K)}for(const V in I)u[V]=I[V]}}}return u}const yF=e=>(r,s)=>{const o=T.useContext(VC),u=T.useContext(w2),h=()=>eue(e,r,o,u);return s?h():Poe(h)};function X2(e,r,s){const{style:o}=e,u={};for(const h in o)(Ci(o[h])||r.style&&Ci(r.style[h])||hF(h,e)||s?.getValue(h)?.liveStyle!==void 0)&&(u[h]=o[h]);return u}const nue=yF({scrapeMotionValuesFromProps:X2,createRenderState:V2});function vF(e,r,s){const o=X2(e,r,s);for(const u in e)if(Ci(e[u])||Ci(r[u])){const h=Lg.indexOf(u)!==-1?"attr"+u.charAt(0).toUpperCase()+u.substring(1):u;o[h]=e[u]}return o}const rue=yF({scrapeMotionValuesFromProps:vF,createRenderState:mF}),sue=Symbol.for("motionComponentSymbol");function cg(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function iue(e,r,s){return T.useCallback(o=>{o&&e.onMount&&e.onMount(o),r&&(o?r.mount(o):r.unmount()),s&&(typeof s=="function"?s(o):cg(s)&&(s.current=o))},[r])}const Y2=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),aue="framerAppearId",xF="data-"+Y2(aue),bF=T.createContext({});function oue(e,r,s,o,u){const{visualElement:h}=T.useContext(VC),m=T.useContext(cF),g=T.useContext(w2),b=T.useContext(lF).reducedMotion,w=T.useRef(null);o=o||m.renderer,!w.current&&o&&(w.current=o(e,{visualState:r,parent:h,props:s,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:b}));const E=w.current,A=T.useContext(bF);E&&!E.projection&&u&&(E.type==="html"||E.type==="svg")&&lue(w.current,s,u,A);const k=T.useRef(!1);T.useInsertionEffect(()=>{E&&k.current&&E.update(s,g)});const R=s[xF],M=T.useRef(!!R&&!window.MotionHandoffIsComplete?.(R)&&window.MotionHasOptimisedAnimation?.(R));return Moe(()=>{E&&(k.current=!0,window.MotionIsMounted=!0,E.updateFeatures(),E.scheduleRenderMicrotask(),M.current&&E.animationState&&E.animationState.animateChanges())}),T.useEffect(()=>{E&&(!M.current&&E.animationState&&E.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(R)}),M.current=!1),E.enteringChildren=void 0)}),E}function lue(e,r,s,o){const{layoutId:u,layout:h,drag:m,dragConstraints:g,layoutScroll:b,layoutRoot:w,layoutCrossfade:E}=r;e.projection=new s(e.latestValues,r["data-framer-portal-id"]?void 0:wF(e.parent)),e.projection.setOptions({layoutId:u,layout:h,alwaysMeasureLayout:!!m||g&&cg(g),visualElement:e,animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,crossfade:E,layoutScroll:b,layoutRoot:w})}function wF(e){if(e)return e.options.allowProjection!==!1?e.projection:wF(e.parent)}function uT(e,{forwardMotionProps:r=!1}={},s,o){s&&Pce(s);const u=H2(e)?rue:nue;function h(g,b){let w;const E={...T.useContext(lF),...g,layoutId:cue(g)},{isStatic:A}=E,k=Fce(g),R=u(g,A);if(!A&&b2){uue();const M=due(E);w=M.MeasureLayout,k.visualElement=oue(e,R,E,o,M.ProjectionNode)}return c.jsxs(VC.Provider,{value:k,children:[w&&k.visualElement?c.jsx(w,{visualElement:k.visualElement,...E}):null,Qce(e,g,iue(R,k.visualElement,b),R,A,r)]})}h.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const m=T.forwardRef(h);return m[sue]=e,m}function cue({layoutId:e}){const r=T.useContext(y5).id;return r&&e!==void 0?r+"-"+e:e}function uue(e,r){T.useContext(cF).strict}function due(e){const{drag:r,layout:s}=Ag;if(!r&&!s)return{};const o={...r,...s};return{MeasureLayout:r?.isEnabled(e)||s?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function hue(e,r){if(typeof Proxy>"u")return uT;const s=new Map,o=(h,m)=>uT(h,m,e,r),u=(h,m)=>o(h,m);return new Proxy(u,{get:(h,m)=>m==="create"?o:(s.has(m)||s.set(m,uT(m,void 0,e,r)),s.get(m))})}function SF({top:e,left:r,right:s,bottom:o}){return{x:{min:r,max:s},y:{min:e,max:o}}}function pue({x:e,y:r}){return{top:r.min,right:e.max,bottom:r.max,left:e.min}}function fue(e,r){if(!r)return e;const s=r({x:e.left,y:e.top}),o=r({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:o.y,right:o.x}}function dT(e){return e===void 0||e===1}function f_({scale:e,scaleX:r,scaleY:s}){return!dT(e)||!dT(r)||!dT(s)}function bp(e){return f_(e)||EF(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function EF(e){return a4(e.x)||a4(e.y)}function a4(e){return e&&e!=="0%"}function eC(e,r,s){const o=e-s,u=r*o;return s+u}function o4(e,r,s,o,u){return u!==void 0&&(e=eC(e,u,o)),eC(e,s,o)+r}function m_(e,r=0,s=1,o,u){e.min=o4(e.min,r,s,o,u),e.max=o4(e.max,r,s,o,u)}function jF(e,{x:r,y:s}){m_(e.x,r.translate,r.scale,r.originPoint),m_(e.y,s.translate,s.scale,s.originPoint)}const l4=.999999999999,c4=1.0000000000001;function mue(e,r,s,o=!1){const u=s.length;if(!u)return;r.x=r.y=1;let h,m;for(let g=0;g<u;g++){h=s[g],m=h.projectionDelta;const{visualElement:b}=h.options;b&&b.props.style&&b.props.style.display==="contents"||(o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&dg(e,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),m&&(r.x*=m.x.scale,r.y*=m.y.scale,jF(e,m)),o&&bp(h.latestValues)&&dg(e,h.latestValues))}r.x<c4&&r.x>l4&&(r.x=1),r.y<c4&&r.y>l4&&(r.y=1)}function ug(e,r){e.min=e.min+r,e.max=e.max+r}function u4(e,r,s,o,u=.5){const h=Lr(e.min,e.max,u);m_(e,r,s,h,o)}function dg(e,r){u4(e.x,r.x,r.scaleX,r.scale,r.originX),u4(e.y,r.y,r.scaleY,r.scale,r.originY)}function CF(e,r){return SF(fue(e.getBoundingClientRect(),r))}function gue(e,r,s){const o=CF(e,s),{scroll:u}=r;return u&&(ug(o.x,u.offset.x),ug(o.y,u.offset.y)),o}const d4=()=>({translate:0,scale:1,origin:0,originPoint:0}),hg=()=>({x:d4(),y:d4()}),h4=()=>({min:0,max:0}),Cs=()=>({x:h4(),y:h4()}),g_={current:null},AF={current:!1};function yue(){if(AF.current=!0,!!b2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),r=()=>g_.current=e.matches;e.addEventListener("change",r),r()}else g_.current=!1}const vue=new WeakMap;function xue(e,r,s){for(const o in r){const u=r[o],h=s[o];if(Ci(u))e.addValue(o,u);else if(Ci(h))e.addValue(o,Cg(u,{owner:e}));else if(h!==u)if(e.hasValue(o)){const m=e.getValue(o);m.liveStyle===!0?m.jump(u):m.hasAnimated||m.set(u)}else{const m=e.getStaticValue(o);e.addValue(o,Cg(m!==void 0?m:u,{owner:e}))}}for(const o in s)r[o]===void 0&&e.removeValue(o);return r}const p4=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class bue{scrapeMotionValuesFromProps(r,s,o){return{}}constructor({parent:r,props:s,presenceContext:o,reducedMotionConfig:u,blockInitialAnimation:h,visualState:m},g={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=I2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const k=ga.now();this.renderScheduledAt<k&&(this.renderScheduledAt=k,$r.render(this.render,!1,!0))};const{latestValues:b,renderState:w}=m;this.latestValues=b,this.baseTarget={...b},this.initialValues=s.initial?{...b}:{},this.renderState=w,this.parent=r,this.props=s,this.presenceContext=o,this.depth=r?r.depth+1:0,this.reducedMotionConfig=u,this.options=g,this.blockInitialAnimation=!!h,this.isControllingVariants=GC(s),this.isVariantNode=dF(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(r&&r.current);const{willChange:E,...A}=this.scrapeMotionValuesFromProps(s,{},this);for(const k in A){const R=A[k];b[k]!==void 0&&Ci(R)&&R.set(b[k])}}mount(r){this.current=r,vue.set(r,this),this.projection&&!this.projection.instance&&this.projection.mount(r),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),AF.current||yue(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:g_.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hd(this.notifyUpdate),Hd(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const s=this.features[r];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(r){this.children.add(r),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(r)}removeChild(r){this.children.delete(r),this.enteringChildren&&this.enteringChildren.delete(r)}bindToMotionValue(r,s){this.valueSubscriptions.has(r)&&this.valueSubscriptions.get(r)();const o=Fg.has(r);o&&this.onBindTransform&&this.onBindTransform();const u=s.on("change",m=>{this.latestValues[r]=m,this.props.onUpdate&&$r.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let h;window.MotionCheckAppearSync&&(h=window.MotionCheckAppearSync(this,r,s)),this.valueSubscriptions.set(r,()=>{u(),h&&h(),s.owner&&s.stop()})}sortNodePosition(r){return!this.current||!this.sortInstanceNodePosition||this.type!==r.type?0:this.sortInstanceNodePosition(this.current,r.current)}updateFeatures(){let r="animation";for(r in Ag){const s=Ag[r];if(!s)continue;const{isEnabled:o,Feature:u}=s;if(!this.features[r]&&u&&o(this.props)&&(this.features[r]=new u(this)),this.features[r]){const h=this.features[r];h.isMounted?h.update():(h.mount(),h.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Cs()}getStaticValue(r){return this.latestValues[r]}setStaticValue(r,s){this.latestValues[r]=s}update(r,s){(r.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=r,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let o=0;o<p4.length;o++){const u=p4[o];this.propEventSubscriptions[u]&&(this.propEventSubscriptions[u](),delete this.propEventSubscriptions[u]);const h="on"+u,m=r[h];m&&(this.propEventSubscriptions[u]=this.on(u,m))}this.prevMotionValues=xue(this,this.scrapeMotionValuesFromProps(r,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(r){return this.props.variants?this.props.variants[r]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(r){const s=this.getClosestVariantNode();if(s)return s.variantChildren&&s.variantChildren.add(r),()=>s.variantChildren.delete(r)}addValue(r,s){const o=this.values.get(r);s!==o&&(o&&this.removeValue(r),this.bindToMotionValue(r,s),this.values.set(r,s),this.latestValues[r]=s.get())}removeValue(r){this.values.delete(r);const s=this.valueSubscriptions.get(r);s&&(s(),this.valueSubscriptions.delete(r)),delete this.latestValues[r],this.removeValueFromRenderState(r,this.renderState)}hasValue(r){return this.values.has(r)}getValue(r,s){if(this.props.values&&this.props.values[r])return this.props.values[r];let o=this.values.get(r);return o===void 0&&s!==void 0&&(o=Cg(s===null?void 0:s,{owner:this}),this.addValue(r,o)),o}readValue(r,s){let o=this.latestValues[r]!==void 0||!this.current?this.latestValues[r]:this.getBaseTargetFromProps(this.props,r)??this.readValueFromInstance(this.current,r,this.options);return o!=null&&(typeof o=="string"&&(v5(o)||b5(o))?o=parseFloat(o):!Nce(o)&&Gd.test(s)&&(o=nF(r,s)),this.setBaseTarget(r,Ci(o)?o.get():o)),Ci(o)?o.get():o}setBaseTarget(r,s){this.baseTarget[r]=s}getBaseTarget(r){const{initial:s}=this.props;let o;if(typeof s=="string"||typeof s=="object"){const h=G2(this.props,s,this.presenceContext?.custom);h&&(o=h[r])}if(s&&o!==void 0)return o;const u=this.getBaseTargetFromProps(this.props,r);return u!==void 0&&!Ci(u)?u:this.initialValues[r]!==void 0&&o===void 0?void 0:this.baseTarget[r]}on(r,s){return this.events[r]||(this.events[r]=new A2),this.events[r].add(s)}notify(r,...s){this.events[r]&&this.events[r].notify(...s)}scheduleRenderMicrotask(){F2.render(this.render)}}class OF extends bue{constructor(){super(...arguments),this.KeyframeResolver=bce}sortInstanceNodePosition(r,s){return r.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(r,s){return r.style?r.style[s]:void 0}removeValueFromRenderState(r,{vars:s,style:o}){delete s[r],delete o[r]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:r}=this.props;Ci(r)&&(this.childSubscription=r.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}function kF(e,{style:r,vars:s},o,u){const h=e.style;let m;for(m in r)h[m]=r[m];u?.applyProjectionStyles(h,o);for(m in s)h.setProperty(m,s[m])}function wue(e){return window.getComputedStyle(e)}class Sue extends OF{constructor(){super(...arguments),this.type="html",this.renderInstance=kF}readValueFromInstance(r,s){if(Fg.has(s))return this.projection?.isProjecting?a_(s):Lle(r,s);{const o=wue(r),u=(D5(s)?o.getPropertyValue(s):o[s])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(r,{transformPagePoint:s}){return CF(r,s)}build(r,s,o){K2(r,s,o.transformTemplate)}scrapeMotionValuesFromProps(r,s,o){return X2(r,s,o)}}const RF=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Eue(e,r,s,o){kF(e,r,void 0,o);for(const u in r.attrs)e.setAttribute(RF.has(u)?u:Y2(u),r.attrs[u])}class jue extends OF{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Cs}getBaseTargetFromProps(r,s){return r[s]}readValueFromInstance(r,s){if(Fg.has(s)){const o=tF(s);return o&&o.default||0}return s=RF.has(s)?s:Y2(s),r.getAttribute(s)}scrapeMotionValuesFromProps(r,s,o){return vF(r,s,o)}build(r,s,o){fF(r,s,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(r,s,o,u){Eue(r,s,o,u)}mount(r){this.isSVGTag=gF(r.tagName),super.mount(r)}}const Cue=(e,r)=>H2(e)?new jue(r):new Sue(r,{allowProjection:e!==T.Fragment});function vg(e,r,s){const o=e.getProps();return G2(o,r,s!==void 0?s:o.custom,e)}const y_=e=>Array.isArray(e);function Aue(e,r,s){e.hasValue(r)?e.getValue(r).set(s):e.addValue(r,Cg(s))}function Oue(e){return y_(e)?e[e.length-1]||0:e}function kue(e,r){const s=vg(e,r);let{transitionEnd:o={},transition:u={},...h}=s||{};h={...h,...o};for(const m in h){const g=Oue(h[m]);Aue(e,m,g)}}function Rue(e){return!!(Ci(e)&&e.add)}function v_(e,r){const s=e.getValue("willChange");if(Rue(s))return s.add(r);if(!s&&xu.WillChange){const o=new xu.WillChange("auto");e.addValue("willChange",o),o.add(r)}}function TF(e){return e.props[xF]}const Tue=e=>e!==null;function _ue(e,{repeat:r,repeatType:s="loop"},o){const u=e.filter(Tue),h=r&&s!=="loop"&&r%2===1?0:u.length-1;return u[h]}const $ue={type:"spring",stiffness:500,damping:25,restSpeed:10},Nue=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Due={type:"keyframes",duration:.8},Pue={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Mue=(e,{keyframes:r})=>r.length>2?Due:Fg.has(e)?e.startsWith("scale")?Nue(r[1]):$ue:Pue;function Iue({when:e,delay:r,delayChildren:s,staggerChildren:o,staggerDirection:u,repeat:h,repeatType:m,repeatDelay:g,from:b,elapsed:w,...E}){return!!Object.keys(E).length}const Z2=(e,r,s,o={},u,h)=>m=>{const g=z2(o,e)||{},b=g.delay||o.delay||0;let{elapsed:w=0}=o;w=w-lc(b);const E={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:r.getVelocity(),...g,delay:-w,onUpdate:k=>{r.set(k),g.onUpdate&&g.onUpdate(k)},onComplete:()=>{m(),g.onComplete&&g.onComplete()},name:e,motionValue:r,element:h?void 0:u};Iue(g)||Object.assign(E,Mue(e,E)),E.duration&&(E.duration=lc(E.duration)),E.repeatDelay&&(E.repeatDelay=lc(E.repeatDelay)),E.from!==void 0&&(E.keyframes[0]=E.from);let A=!1;if((E.type===!1||E.duration===0&&!E.repeatDelay)&&(d_(E),E.delay===0&&(A=!0)),(xu.instantAnimations||xu.skipAnimations)&&(A=!0,d_(E),E.delay=0),E.allowFlatten=!g.type&&!g.ease,A&&!h&&r.get()!==void 0){const k=_ue(E.keyframes,g);if(k!==void 0){$r.update(()=>{E.onUpdate(k),E.onComplete()});return}}return g.isSync?new M2(E):new lce(E)};function zue({protectedKeys:e,needsAnimating:r},s){const o=e.hasOwnProperty(s)&&r[s]!==!0;return r[s]=!1,o}function _F(e,r,{delay:s=0,transitionOverride:o,type:u}={}){let{transition:h=e.getDefaultTransition(),transitionEnd:m,...g}=r;o&&(h=o);const b=[],w=u&&e.animationState&&e.animationState.getState()[u];for(const E in g){const A=e.getValue(E,e.latestValues[E]??null),k=g[E];if(k===void 0||w&&zue(w,E))continue;const R={delay:s,...z2(h||{},E)},M=A.get();if(M!==void 0&&!A.isAnimating&&!Array.isArray(k)&&k===M&&!R.velocity)continue;let I=!1;if(window.MotionHandoffAnimation){const H=TF(e);if(H){const V=window.MotionHandoffAnimation(H,E,$r);V!==null&&(R.startTime=V,I=!0)}}v_(e,E),A.start(Z2(E,A,k,e.shouldReduceMotion&&W5.has(E)?{type:!1}:R,e,I));const F=A.animation;F&&b.push(F)}return m&&Promise.all(b).then(()=>{$r.update(()=>{m&&kue(e,m)})}),b}function $F(e,r,s,o=0,u=1){const h=Array.from(e).sort((w,E)=>w.sortNodePosition(E)).indexOf(r),m=e.size,g=(m-1)*o;return typeof s=="function"?s(h,m):u===1?h*o:g-h*o}function x_(e,r,s={}){const o=vg(e,r,s.type==="exit"?e.presenceContext?.custom:void 0);let{transition:u=e.getDefaultTransition()||{}}=o||{};s.transitionOverride&&(u=s.transitionOverride);const h=o?()=>Promise.all(_F(e,o,s)):()=>Promise.resolve(),m=e.variantChildren&&e.variantChildren.size?(b=0)=>{const{delayChildren:w=0,staggerChildren:E,staggerDirection:A}=u;return Lue(e,r,b,w,E,A,s)}:()=>Promise.resolve(),{when:g}=u;if(g){const[b,w]=g==="beforeChildren"?[h,m]:[m,h];return b().then(()=>w())}else return Promise.all([h(),m(s.delay)])}function Lue(e,r,s=0,o=0,u=0,h=1,m){const g=[];for(const b of e.variantChildren)b.notify("AnimationStart",r),g.push(x_(b,r,{...m,delay:s+(typeof o=="function"?0:o)+$F(e.variantChildren,b,o,u,h)}).then(()=>b.notify("AnimationComplete",r)));return Promise.all(g)}function Fue(e,r,s={}){e.notify("AnimationStart",r);let o;if(Array.isArray(r)){const u=r.map(h=>x_(e,h,s));o=Promise.all(u)}else if(typeof r=="string")o=x_(e,r,s);else{const u=typeof r=="function"?vg(e,r,s.custom):r;o=Promise.all(_F(e,u,s))}return o.then(()=>{e.notify("AnimationComplete",r)})}function NF(e,r){if(!Array.isArray(r))return!1;const s=r.length;if(s!==e.length)return!1;for(let o=0;o<s;o++)if(r[o]!==e[o])return!1;return!0}const que=U2.length;function DF(e){if(!e)return;if(!e.isControllingVariants){const s=e.parent?DF(e.parent)||{}:{};return e.props.initial!==void 0&&(s.initial=e.props.initial),s}const r={};for(let s=0;s<que;s++){const o=U2[s],u=e.props[o];(Jb(u)||u===!1)&&(r[o]=u)}return r}const Bue=[...B2].reverse(),Uue=B2.length;function Kue(e){return r=>Promise.all(r.map(({animation:s,options:o})=>Fue(e,s,o)))}function Vue(e){let r=Kue(e),s=f4(),o=!0;const u=b=>(w,E)=>{const A=vg(e,E,b==="exit"?e.presenceContext?.custom:void 0);if(A){const{transition:k,transitionEnd:R,...M}=A;w={...w,...M,...R}}return w};function h(b){r=b(e)}function m(b){const{props:w}=e,E=DF(e.parent)||{},A=[],k=new Set;let R={},M=1/0;for(let F=0;F<Uue;F++){const H=Bue[F],V=s[H],K=w[H]!==void 0?w[H]:E[H],z=Jb(K),W=H===b?V.isActive:null;W===!1&&(M=F);let ae=K===E[H]&&K!==w[H]&&z;if(ae&&o&&e.manuallyAnimateOnMount&&(ae=!1),V.protectedKeys={...R},!V.isActive&&W===null||!K&&!V.prevProp||HC(K)||typeof K=="boolean")continue;const Q=Hue(V.prevProp,K);let te=Q||H===b&&V.isActive&&!ae&&z||F>M&&z,de=!1;const je=Array.isArray(K)?K:[K];let we=je.reduce(u(H),{});W===!1&&(we={});const{prevResolvedValues:ie={}}=V,Se={...ie,...we},Ae=ne=>{te=!0,k.has(ne)&&(de=!0,k.delete(ne)),V.needsAnimating[ne]=!0;const ce=e.getValue(ne);ce&&(ce.liveStyle=!1)};for(const ne in Se){const ce=we[ne],$e=ie[ne];if(R.hasOwnProperty(ne))continue;let me=!1;y_(ce)&&y_($e)?me=!NF(ce,$e):me=ce!==$e,me?ce!=null?Ae(ne):k.add(ne):ce!==void 0&&k.has(ne)?Ae(ne):V.protectedKeys[ne]=!0}V.prevProp=K,V.prevResolvedValues=we,V.isActive&&(R={...R,...we}),o&&e.blockInitialAnimation&&(te=!1);const He=ae&&Q;te&&(!He||de)&&A.push(...je.map(ne=>{const ce={type:H};if(typeof ne=="string"&&o&&!He&&e.manuallyAnimateOnMount&&e.parent){const{parent:$e}=e,me=vg($e,ne);if($e.enteringChildren&&me){const{delayChildren:Xe}=me.transition||{};ce.delay=$F($e.enteringChildren,e,Xe)}}return{animation:ne,options:ce}}))}if(k.size){const F={};if(typeof w.initial!="boolean"){const H=vg(e,Array.isArray(w.initial)?w.initial[0]:w.initial);H&&H.transition&&(F.transition=H.transition)}k.forEach(H=>{const V=e.getBaseTarget(H),K=e.getValue(H);K&&(K.liveStyle=!0),F[H]=V??null}),A.push({animation:F})}let I=!!A.length;return o&&(w.initial===!1||w.initial===w.animate)&&!e.manuallyAnimateOnMount&&(I=!1),o=!1,I?r(A):Promise.resolve()}function g(b,w){if(s[b].isActive===w)return Promise.resolve();e.variantChildren?.forEach(A=>A.animationState?.setActive(b,w)),s[b].isActive=w;const E=m(b);for(const A in s)s[A].protectedKeys={};return E}return{animateChanges:m,setActive:g,setAnimateFunction:h,getState:()=>s,reset:()=>{s=f4()}}}function Hue(e,r){return typeof r=="string"?r!==e:Array.isArray(r)?!NF(r,e):!1}function xp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function f4(){return{animate:xp(!0),whileInView:xp(),whileHover:xp(),whileTap:xp(),whileDrag:xp(),whileFocus:xp(),exit:xp()}}class Wd{constructor(r){this.isMounted=!1,this.node=r}update(){}}class Gue extends Wd{constructor(r){super(r),r.animationState||(r.animationState=Vue(r))}updateAnimationControlsSubscription(){const{animate:r}=this.node.getProps();HC(r)&&(this.unmountControls=r.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:r}=this.node.getProps(),{animate:s}=this.node.prevProps||{};r!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Xue=0;class Yue extends Wd{constructor(){super(...arguments),this.id=Xue++}update(){if(!this.node.presenceContext)return;const{isPresent:r,onExitComplete:s}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||r===o)return;const u=this.node.animationState.setActive("exit",!r);s&&!r&&u.then(()=>{s(this.id)})}mount(){const{register:r,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),r&&(this.unmount=r(this.id))}unmount(){}}const Zue={animation:{Feature:Gue},exit:{Feature:Yue}};function Wb(e,r,s,o={passive:!0}){return e.addEventListener(r,s,o),()=>e.removeEventListener(r,s)}function xw(e){return{point:{x:e.pageX,y:e.pageY}}}const Jue=e=>r=>q2(r)&&e(r,xw(r));function Fb(e,r,s,o){return Wb(e,r,Jue(s),o)}const PF=1e-4,Wue=1-PF,Que=1+PF,MF=.01,ede=0-MF,tde=0+MF;function Vi(e){return e.max-e.min}function nde(e,r,s){return Math.abs(e-r)<=s}function m4(e,r,s,o=.5){e.origin=o,e.originPoint=Lr(r.min,r.max,e.origin),e.scale=Vi(s)/Vi(r),e.translate=Lr(s.min,s.max,e.origin)-e.originPoint,(e.scale>=Wue&&e.scale<=Que||isNaN(e.scale))&&(e.scale=1),(e.translate>=ede&&e.translate<=tde||isNaN(e.translate))&&(e.translate=0)}function qb(e,r,s,o){m4(e.x,r.x,s.x,o?o.originX:void 0),m4(e.y,r.y,s.y,o?o.originY:void 0)}function g4(e,r,s){e.min=s.min+r.min,e.max=e.min+Vi(r)}function rde(e,r,s){g4(e.x,r.x,s.x),g4(e.y,r.y,s.y)}function y4(e,r,s){e.min=r.min-s.min,e.max=e.min+Vi(r)}function tC(e,r,s){y4(e.x,r.x,s.x),y4(e.y,r.y,s.y)}function ao(e){return[e("x"),e("y")]}const IF=({current:e})=>e?e.ownerDocument.defaultView:null,v4=(e,r)=>Math.abs(e-r);function sde(e,r){const s=v4(e.x,r.x),o=v4(e.y,r.y);return Math.sqrt(s**2+o**2)}class zF{constructor(r,s,{transformPagePoint:o,contextWindow:u=window,dragSnapToOrigin:h=!1,distanceThreshold:m=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=pT(this.lastMoveEventInfo,this.history),R=this.startEvent!==null,M=sde(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!R&&!M)return;const{point:I}=k,{timestamp:F}=Hs;this.history.push({...I,timestamp:F});const{onStart:H,onMove:V}=this.handlers;R||(H&&H(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),V&&V(this.lastMoveEvent,k)},this.handlePointerMove=(k,R)=>{this.lastMoveEvent=k,this.lastMoveEventInfo=hT(R,this.transformPagePoint),$r.update(this.updatePoint,!0)},this.handlePointerUp=(k,R)=>{this.end();const{onEnd:M,onSessionEnd:I,resumeAnimation:F}=this.handlers;if(this.dragSnapToOrigin&&F&&F(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const H=pT(k.type==="pointercancel"?this.lastMoveEventInfo:hT(R,this.transformPagePoint),this.history);this.startEvent&&M&&M(k,H),I&&I(k,H)},!q2(r))return;this.dragSnapToOrigin=h,this.handlers=s,this.transformPagePoint=o,this.distanceThreshold=m,this.contextWindow=u||window;const g=xw(r),b=hT(g,this.transformPagePoint),{point:w}=b,{timestamp:E}=Hs;this.history=[{...w,timestamp:E}];const{onSessionStart:A}=s;A&&A(r,pT(b,this.history)),this.removeListeners=gw(Fb(this.contextWindow,"pointermove",this.handlePointerMove),Fb(this.contextWindow,"pointerup",this.handlePointerUp),Fb(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(r){this.handlers=r}end(){this.removeListeners&&this.removeListeners(),Hd(this.updatePoint)}}function hT(e,r){return r?{point:r(e.point)}:e}function x4(e,r){return{x:e.x-r.x,y:e.y-r.y}}function pT({point:e},r){return{point:e,delta:x4(e,LF(r)),offset:x4(e,ide(r)),velocity:ade(r,.1)}}function ide(e){return e[0]}function LF(e){return e[e.length-1]}function ade(e,r){if(e.length<2)return{x:0,y:0};let s=e.length-1,o=null;const u=LF(e);for(;s>=0&&(o=e[s],!(u.timestamp-o.timestamp>lc(r)));)s--;if(!o)return{x:0,y:0};const h=lo(u.timestamp-o.timestamp);if(h===0)return{x:0,y:0};const m={x:(u.x-o.x)/h,y:(u.y-o.y)/h};return m.x===1/0&&(m.x=0),m.y===1/0&&(m.y=0),m}function ode(e,{min:r,max:s},o){return r!==void 0&&e<r?e=o?Lr(r,e,o.min):Math.max(e,r):s!==void 0&&e>s&&(e=o?Lr(s,e,o.max):Math.min(e,s)),e}function b4(e,r,s){return{min:r!==void 0?e.min+r:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function lde(e,{top:r,left:s,bottom:o,right:u}){return{x:b4(e.x,s,u),y:b4(e.y,r,o)}}function w4(e,r){let s=r.min-e.min,o=r.max-e.max;return r.max-r.min<e.max-e.min&&([s,o]=[o,s]),{min:s,max:o}}function cde(e,r){return{x:w4(e.x,r.x),y:w4(e.y,r.y)}}function ude(e,r){let s=.5;const o=Vi(e),u=Vi(r);return u>o?s=Xb(r.min,r.max-o,e.min):o>u&&(s=Xb(e.min,e.max-u,r.min)),vu(0,1,s)}function dde(e,r){const s={};return r.min!==void 0&&(s.min=r.min-e.min),r.max!==void 0&&(s.max=r.max-e.min),s}const b_=.35;function hde(e=b_){return e===!1?e=0:e===!0&&(e=b_),{x:S4(e,"left","right"),y:S4(e,"top","bottom")}}function S4(e,r,s){return{min:E4(e,r),max:E4(e,s)}}function E4(e,r){return typeof e=="number"?e:e[r]||0}const pde=new WeakMap;class fde{constructor(r){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Cs(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=r}start(r,{snapToCursor:s=!1,distanceThreshold:o}={}){const{presenceContext:u}=this.visualElement;if(u&&u.isPresent===!1)return;const h=A=>{const{dragSnapToOrigin:k}=this.getProps();k?this.pauseAnimation():this.stopAnimation(),s&&this.snapToCursor(xw(A).point)},m=(A,k)=>{const{drag:R,dragPropagation:M,onDragStart:I}=this.getProps();if(R&&!M&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Cce(R),!this.openDragLock))return;this.latestPointerEvent=A,this.latestPanInfo=k,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ao(H=>{let V=this.getAxisMotionValue(H).get()||0;if(cc.test(V)){const{projection:K}=this.visualElement;if(K&&K.layout){const z=K.layout.layoutBox[H];z&&(V=Vi(z)*(parseFloat(V)/100))}}this.originPoint[H]=V}),I&&$r.postRender(()=>I(A,k)),v_(this.visualElement,"transform");const{animationState:F}=this.visualElement;F&&F.setActive("whileDrag",!0)},g=(A,k)=>{this.latestPointerEvent=A,this.latestPanInfo=k;const{dragPropagation:R,dragDirectionLock:M,onDirectionLock:I,onDrag:F}=this.getProps();if(!R&&!this.openDragLock)return;const{offset:H}=k;if(M&&this.currentDirection===null){this.currentDirection=mde(H),this.currentDirection!==null&&I&&I(this.currentDirection);return}this.updateAxis("x",k.point,H),this.updateAxis("y",k.point,H),this.visualElement.render(),F&&F(A,k)},b=(A,k)=>{this.latestPointerEvent=A,this.latestPanInfo=k,this.stop(A,k),this.latestPointerEvent=null,this.latestPanInfo=null},w=()=>ao(A=>this.getAnimationState(A)==="paused"&&this.getAxisMotionValue(A).animation?.play()),{dragSnapToOrigin:E}=this.getProps();this.panSession=new zF(r,{onSessionStart:h,onStart:m,onMove:g,onSessionEnd:b,resumeAnimation:w},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:E,distanceThreshold:o,contextWindow:IF(this.visualElement)})}stop(r,s){const o=r||this.latestPointerEvent,u=s||this.latestPanInfo,h=this.isDragging;if(this.cancel(),!h||!u||!o)return;const{velocity:m}=u;this.startAnimation(m);const{onDragEnd:g}=this.getProps();g&&$r.postRender(()=>g(o,u))}cancel(){this.isDragging=!1;const{projection:r,animationState:s}=this.visualElement;r&&(r.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}updateAxis(r,s,o){const{drag:u}=this.getProps();if(!o||!aj(r,u,this.currentDirection))return;const h=this.getAxisMotionValue(r);let m=this.originPoint[r]+o[r];this.constraints&&this.constraints[r]&&(m=ode(m,this.constraints[r],this.elastic[r])),h.set(m)}resolveConstraints(){const{dragConstraints:r,dragElastic:s}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,u=this.constraints;r&&cg(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=lde(o.layoutBox,r):this.constraints=!1,this.elastic=hde(s),u!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&ao(h=>{this.constraints!==!1&&this.getAxisMotionValue(h)&&(this.constraints[h]=dde(o.layoutBox[h],this.constraints[h]))})}resolveRefConstraints(){const{dragConstraints:r,onMeasureDragConstraints:s}=this.getProps();if(!r||!cg(r))return!1;const o=r.current,{projection:u}=this.visualElement;if(!u||!u.layout)return!1;const h=gue(o,u.root,this.visualElement.getTransformPagePoint());let m=cde(u.layout.layoutBox,h);if(s){const g=s(pue(m));this.hasMutatedConstraints=!!g,g&&(m=SF(g))}return m}startAnimation(r){const{drag:s,dragMomentum:o,dragElastic:u,dragTransition:h,dragSnapToOrigin:m,onDragTransitionEnd:g}=this.getProps(),b=this.constraints||{},w=ao(E=>{if(!aj(E,s,this.currentDirection))return;let A=b&&b[E]||{};m&&(A={min:0,max:0});const k=u?200:1e6,R=u?40:1e7,M={type:"inertia",velocity:o?r[E]:0,bounceStiffness:k,bounceDamping:R,timeConstant:750,restDelta:1,restSpeed:10,...h,...A};return this.startAxisValueAnimation(E,M)});return Promise.all(w).then(g)}startAxisValueAnimation(r,s){const o=this.getAxisMotionValue(r);return v_(this.visualElement,r),o.start(Z2(r,o,0,s,this.visualElement,!1))}stopAnimation(){ao(r=>this.getAxisMotionValue(r).stop())}pauseAnimation(){ao(r=>this.getAxisMotionValue(r).animation?.pause())}getAnimationState(r){return this.getAxisMotionValue(r).animation?.state}getAxisMotionValue(r){const s=`_drag${r.toUpperCase()}`,o=this.visualElement.getProps(),u=o[s];return u||this.visualElement.getValue(r,(o.initial?o.initial[r]:void 0)||0)}snapToCursor(r){ao(s=>{const{drag:o}=this.getProps();if(!aj(s,o,this.currentDirection))return;const{projection:u}=this.visualElement,h=this.getAxisMotionValue(s);if(u&&u.layout){const{min:m,max:g}=u.layout.layoutBox[s];h.set(r[s]-Lr(m,g,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:r,dragConstraints:s}=this.getProps(),{projection:o}=this.visualElement;if(!cg(s)||!o||!this.constraints)return;this.stopAnimation();const u={x:0,y:0};ao(m=>{const g=this.getAxisMotionValue(m);if(g&&this.constraints!==!1){const b=g.get();u[m]=ude({min:b,max:b},this.constraints[m])}});const{transformTemplate:h}=this.visualElement.getProps();this.visualElement.current.style.transform=h?h({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),ao(m=>{if(!aj(m,r,null))return;const g=this.getAxisMotionValue(m),{min:b,max:w}=this.constraints[m];g.set(Lr(b,w,u[m]))})}addListeners(){if(!this.visualElement.current)return;pde.set(this.visualElement,this);const r=this.visualElement.current,s=Fb(r,"pointerdown",b=>{const{drag:w,dragListener:E=!0}=this.getProps();w&&E&&this.start(b)}),o=()=>{const{dragConstraints:b}=this.getProps();cg(b)&&b.current&&(this.constraints=this.resolveRefConstraints())},{projection:u}=this.visualElement,h=u.addEventListener("measure",o);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),$r.read(o);const m=Wb(window,"resize",()=>this.scalePositionWithinConstraints()),g=u.addEventListener("didUpdate",(({delta:b,hasLayoutChanged:w})=>{this.isDragging&&w&&(ao(E=>{const A=this.getAxisMotionValue(E);A&&(this.originPoint[E]+=b[E].translate,A.set(A.get()+b[E].translate))}),this.visualElement.render())}));return()=>{m(),s(),h(),g&&g()}}getProps(){const r=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:o=!1,dragPropagation:u=!1,dragConstraints:h=!1,dragElastic:m=b_,dragMomentum:g=!0}=r;return{...r,drag:s,dragDirectionLock:o,dragPropagation:u,dragConstraints:h,dragElastic:m,dragMomentum:g}}}function aj(e,r,s){return(r===!0||r===e)&&(s===null||s===e)}function mde(e,r=10){let s=null;return Math.abs(e.y)>r?s="y":Math.abs(e.x)>r&&(s="x"),s}class gde extends Wd{constructor(r){super(r),this.removeGroupControls=co,this.removeListeners=co,this.controls=new fde(r)}mount(){const{dragControls:r}=this.node.getProps();r&&(this.removeGroupControls=r.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||co}unmount(){this.removeGroupControls(),this.removeListeners()}}const j4=e=>(r,s)=>{e&&$r.postRender(()=>e(r,s))};class yde extends Wd{constructor(){super(...arguments),this.removePointerDownListener=co}onPointerDown(r){this.session=new zF(r,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:IF(this.node)})}createPanHandlers(){const{onPanSessionStart:r,onPanStart:s,onPan:o,onPanEnd:u}=this.node.getProps();return{onSessionStart:j4(r),onStart:j4(s),onMove:o,onEnd:(h,m)=>{delete this.session,u&&$r.postRender(()=>u(h,m))}}}mount(){this.removePointerDownListener=Fb(this.node.current,"pointerdown",r=>this.onPointerDown(r))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Oj={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let fT=!1;class vde extends T.Component{componentDidMount(){const{visualElement:r,layoutGroup:s,switchLayoutGroup:o,layoutId:u}=this.props,{projection:h}=r;h&&(s.group&&s.group.add(h),o&&o.register&&u&&o.register(h),fT&&h.root.didUpdate(),h.addEventListener("animationComplete",()=>{this.safeToRemove()}),h.setOptions({...h.options,onExitComplete:()=>this.safeToRemove()})),Oj.hasEverUpdated=!0}getSnapshotBeforeUpdate(r){const{layoutDependency:s,visualElement:o,drag:u,isPresent:h}=this.props,{projection:m}=o;return m&&(m.isPresent=h,fT=!0,u||r.layoutDependency!==s||s===void 0||r.isPresent!==h?m.willUpdate():this.safeToRemove(),r.isPresent!==h&&(h?m.promote():m.relegate()||$r.postRender(()=>{const g=m.getStack();(!g||!g.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:r}=this.props.visualElement;r&&(r.root.didUpdate(),F2.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:r,layoutGroup:s,switchLayoutGroup:o}=this.props,{projection:u}=r;fT=!0,u&&(u.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(u),o&&o.deregister&&o.deregister(u))}safeToRemove(){const{safeToRemove:r}=this.props;r&&r()}render(){return null}}function FF(e){const[r,s]=Dce(),o=T.useContext(y5);return c.jsx(vde,{...e,layoutGroup:o,switchLayoutGroup:T.useContext(bF),isPresent:r,safeToRemove:s})}function xde(e,r,s){const o=Ci(e)?e:Cg(e);return o.start(Z2("",o,r,s)),o.animation}const bde=(e,r)=>e.depth-r.depth;class wde{constructor(){this.children=[],this.isDirty=!1}add(r){S2(this.children,r),this.isDirty=!0}remove(r){E2(this.children,r),this.isDirty=!0}forEach(r){this.isDirty&&this.children.sort(bde),this.isDirty=!1,this.children.forEach(r)}}function Sde(e,r){const s=ga.now(),o=({timestamp:u})=>{const h=u-s;h>=r&&(Hd(o),e(h-r))};return $r.setup(o,!0),()=>Hd(o)}const qF=["TopLeft","TopRight","BottomLeft","BottomRight"],Ede=qF.length,C4=e=>typeof e=="string"?parseFloat(e):e,A4=e=>typeof e=="number"||sn.test(e);function jde(e,r,s,o,u,h){u?(e.opacity=Lr(0,s.opacity??1,Cde(o)),e.opacityExit=Lr(r.opacity??1,0,Ade(o))):h&&(e.opacity=Lr(r.opacity??1,s.opacity??1,o));for(let m=0;m<Ede;m++){const g=`border${qF[m]}Radius`;let b=O4(r,g),w=O4(s,g);if(b===void 0&&w===void 0)continue;b||(b=0),w||(w=0),b===0||w===0||A4(b)===A4(w)?(e[g]=Math.max(Lr(C4(b),C4(w),o),0),(cc.test(w)||cc.test(b))&&(e[g]+="%")):e[g]=w}(r.rotate||s.rotate)&&(e.rotate=Lr(r.rotate||0,s.rotate||0,o))}function O4(e,r){return e[r]!==void 0?e[r]:e.borderRadius}const Cde=BF(0,.5,k5),Ade=BF(.5,.95,co);function BF(e,r,s){return o=>o<e?0:o>r?1:s(Xb(e,r,o))}function k4(e,r){e.min=r.min,e.max=r.max}function Yo(e,r){k4(e.x,r.x),k4(e.y,r.y)}function R4(e,r){e.translate=r.translate,e.scale=r.scale,e.originPoint=r.originPoint,e.origin=r.origin}function T4(e,r,s,o,u){return e-=r,e=eC(e,1/s,o),u!==void 0&&(e=eC(e,1/u,o)),e}function Ode(e,r=0,s=1,o=.5,u,h=e,m=e){if(cc.test(r)&&(r=parseFloat(r),r=Lr(m.min,m.max,r/100)-m.min),typeof r!="number")return;let g=Lr(h.min,h.max,o);e===h&&(g-=r),e.min=T4(e.min,r,s,g,u),e.max=T4(e.max,r,s,g,u)}function _4(e,r,[s,o,u],h,m){Ode(e,r[s],r[o],r[u],r.scale,h,m)}const kde=["x","scaleX","originX"],Rde=["y","scaleY","originY"];function $4(e,r,s,o){_4(e.x,r,kde,s?s.x:void 0,o?o.x:void 0),_4(e.y,r,Rde,s?s.y:void 0,o?o.y:void 0)}function N4(e){return e.translate===0&&e.scale===1}function UF(e){return N4(e.x)&&N4(e.y)}function D4(e,r){return e.min===r.min&&e.max===r.max}function Tde(e,r){return D4(e.x,r.x)&&D4(e.y,r.y)}function P4(e,r){return Math.round(e.min)===Math.round(r.min)&&Math.round(e.max)===Math.round(r.max)}function KF(e,r){return P4(e.x,r.x)&&P4(e.y,r.y)}function M4(e){return Vi(e.x)/Vi(e.y)}function I4(e,r){return e.translate===r.translate&&e.scale===r.scale&&e.originPoint===r.originPoint}class _de{constructor(){this.members=[]}add(r){S2(this.members,r),r.scheduleRender()}remove(r){if(E2(this.members,r),r===this.prevLead&&(this.prevLead=void 0),r===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(r){const s=this.members.findIndex(u=>r===u);if(s===0)return!1;let o;for(let u=s;u>=0;u--){const h=this.members[u];if(h.isPresent!==!1){o=h;break}}return o?(this.promote(o),!0):!1}promote(r,s){const o=this.lead;if(r!==o&&(this.prevLead=o,this.lead=r,r.show(),o)){o.instance&&o.scheduleRender(),r.scheduleRender(),r.resumeFrom=o,s&&(r.resumeFrom.preserveOpacity=!0),o.snapshot&&(r.snapshot=o.snapshot,r.snapshot.latestValues=o.animationValues||o.latestValues),r.root&&r.root.isUpdating&&(r.isLayoutDirty=!0);const{crossfade:u}=r.options;u===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(r=>{const{options:s,resumingFrom:o}=r;s.onExitComplete&&s.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(r=>{r.instance&&r.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function $de(e,r,s){let o="";const u=e.x.translate/r.x,h=e.y.translate/r.y,m=s?.z||0;if((u||h||m)&&(o=`translate3d(${u}px, ${h}px, ${m}px) `),(r.x!==1||r.y!==1)&&(o+=`scale(${1/r.x}, ${1/r.y}) `),s){const{transformPerspective:w,rotate:E,rotateX:A,rotateY:k,skewX:R,skewY:M}=s;w&&(o=`perspective(${w}px) ${o}`),E&&(o+=`rotate(${E}deg) `),A&&(o+=`rotateX(${A}deg) `),k&&(o+=`rotateY(${k}deg) `),R&&(o+=`skewX(${R}deg) `),M&&(o+=`skewY(${M}deg) `)}const g=e.x.scale*r.x,b=e.y.scale*r.y;return(g!==1||b!==1)&&(o+=`scale(${g}, ${b})`),o||"none"}const mT=["","X","Y","Z"],Nde=1e3;let Dde=0;function gT(e,r,s,o){const{latestValues:u}=r;u[e]&&(s[e]=u[e],r.setStaticValue(e,0),o&&(o[e]=0))}function VF(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:r}=e.options;if(!r)return;const s=TF(r);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:u,layoutId:h}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",$r,!(u||h))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&VF(o)}function HF({attachResizeListener:e,defaultParent:r,measureScroll:s,checkIsScrollRoot:o,resetTransform:u}){return class{constructor(m={},g=r?.()){this.id=Dde++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ide),this.nodes.forEach(qde),this.nodes.forEach(Bde),this.nodes.forEach(zde)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=m,this.root=g?g.root||g:this,this.path=g?[...g.path,g]:[],this.parent=g,this.depth=g?g.depth+1:0;for(let b=0;b<this.path.length;b++)this.path[b].shouldResetTransform=!0;this.root===this&&(this.nodes=new wde)}addEventListener(m,g){return this.eventHandlers.has(m)||this.eventHandlers.set(m,new A2),this.eventHandlers.get(m).add(g)}notifyListeners(m,...g){const b=this.eventHandlers.get(m);b&&b.notify(...g)}hasListeners(m){return this.eventHandlers.has(m)}mount(m){if(this.instance)return;this.isSVG=oF(m)&&!_ce(m),this.instance=m;const{layoutId:g,layout:b,visualElement:w}=this.options;if(w&&!w.current&&w.mount(m),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(b||g)&&(this.isLayoutDirty=!0),e){let E,A=0;const k=()=>this.root.updateBlockedByResize=!1;$r.read(()=>{A=window.innerWidth}),e(m,()=>{const R=window.innerWidth;R!==A&&(A=R,this.root.updateBlockedByResize=!0,E&&E(),E=Sde(k,250),Oj.hasAnimatedSinceResize&&(Oj.hasAnimatedSinceResize=!1,this.nodes.forEach(F4)))})}g&&this.root.registerSharedNode(g,this),this.options.animate!==!1&&w&&(g||b)&&this.addEventListener("didUpdate",({delta:E,hasLayoutChanged:A,hasRelativeLayoutChanged:k,layout:R})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const M=this.options.transition||w.getDefaultTransition()||Gde,{onLayoutAnimationStart:I,onLayoutAnimationComplete:F}=w.getProps(),H=!this.targetLayout||!KF(this.targetLayout,R),V=!A&&k;if(this.options.layoutRoot||this.resumeFrom||V||A&&(H||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const K={...z2(M,"layout"),onPlay:I,onComplete:F};(w.shouldReduceMotion||this.options.layoutRoot)&&(K.delay=0,K.type=!1),this.startAnimation(K),this.setAnimationOrigin(E,V)}else A||F4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=R})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const m=this.getStack();m&&m.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Hd(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ude),this.animationId++)}getTransformTemplate(){const{visualElement:m}=this.options;return m&&m.getProps().transformTemplate}willUpdate(m=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&VF(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let E=0;E<this.path.length;E++){const A=this.path[E];A.shouldResetTransform=!0,A.updateScroll("snapshot"),A.options.layoutRoot&&A.willUpdate(!1)}const{layoutId:g,layout:b}=this.options;if(g===void 0&&!b)return;const w=this.getTransformTemplate();this.prevTransformTemplateValue=w?w(this.latestValues,""):void 0,this.updateSnapshot(),m&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(z4);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(L4);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Fde),this.nodes.forEach(Pde),this.nodes.forEach(Mde)):this.nodes.forEach(L4),this.clearAllSnapshots();const g=ga.now();Hs.delta=vu(0,1e3/60,g-Hs.timestamp),Hs.timestamp=g,Hs.isProcessing=!0,sT.update.process(Hs),sT.preRender.process(Hs),sT.render.process(Hs),Hs.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,F2.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Lde),this.sharedNodes.forEach(Kde)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,$r.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){$r.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Vi(this.snapshot.measuredBox.x)&&!Vi(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let b=0;b<this.path.length;b++)this.path[b].updateScroll();const m=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Cs(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:g}=this.options;g&&g.notify("LayoutMeasure",this.layout.layoutBox,m?m.layoutBox:void 0)}updateScroll(m="measure"){let g=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===m&&(g=!1),g&&this.instance){const b=o(this.instance);this.scroll={animationId:this.root.animationId,phase:m,isRoot:b,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:b}}}resetTransform(){if(!u)return;const m=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,g=this.projectionDelta&&!UF(this.projectionDelta),b=this.getTransformTemplate(),w=b?b(this.latestValues,""):void 0,E=w!==this.prevTransformTemplateValue;m&&this.instance&&(g||bp(this.latestValues)||E)&&(u(this.instance,w),this.shouldResetTransform=!1,this.scheduleRender())}measure(m=!0){const g=this.measurePageBox();let b=this.removeElementScroll(g);return m&&(b=this.removeTransform(b)),Xde(b),{animationId:this.root.animationId,measuredBox:g,layoutBox:b,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:m}=this.options;if(!m)return Cs();const g=m.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Yde))){const{scroll:w}=this.root;w&&(ug(g.x,w.offset.x),ug(g.y,w.offset.y))}return g}removeElementScroll(m){const g=Cs();if(Yo(g,m),this.scroll?.wasRoot)return g;for(let b=0;b<this.path.length;b++){const w=this.path[b],{scroll:E,options:A}=w;w!==this.root&&E&&A.layoutScroll&&(E.wasRoot&&Yo(g,m),ug(g.x,E.offset.x),ug(g.y,E.offset.y))}return g}applyTransform(m,g=!1){const b=Cs();Yo(b,m);for(let w=0;w<this.path.length;w++){const E=this.path[w];!g&&E.options.layoutScroll&&E.scroll&&E!==E.root&&dg(b,{x:-E.scroll.offset.x,y:-E.scroll.offset.y}),bp(E.latestValues)&&dg(b,E.latestValues)}return bp(this.latestValues)&&dg(b,this.latestValues),b}removeTransform(m){const g=Cs();Yo(g,m);for(let b=0;b<this.path.length;b++){const w=this.path[b];if(!w.instance||!bp(w.latestValues))continue;f_(w.latestValues)&&w.updateSnapshot();const E=Cs(),A=w.measurePageBox();Yo(E,A),$4(g,w.latestValues,w.snapshot?w.snapshot.layoutBox:void 0,E)}return bp(this.latestValues)&&$4(g,this.latestValues),g}setTargetDelta(m){this.targetDelta=m,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(m){this.options={...this.options,...m,crossfade:m.crossfade!==void 0?m.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Hs.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(m=!1){const g=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=g.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=g.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=g.isSharedProjectionDirty);const b=!!this.resumingFrom||this!==g;if(!(m||b&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:E,layoutId:A}=this.options;if(!this.layout||!(E||A))return;this.resolvedRelativeTargetAt=Hs.timestamp;const k=this.getClosestProjectingParent();k&&this.linkedParentVersion!==k.layoutVersion&&!k.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(k&&k.layout?this.createRelativeTarget(k,this.layout.layoutBox,k.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Cs(),this.targetWithTransforms=Cs()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),rde(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Yo(this.target,this.layout.layoutBox),jF(this.target,this.targetDelta)):Yo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,k&&!!k.resumingFrom==!!this.resumingFrom&&!k.options.layoutScroll&&k.target&&this.animationProgress!==1?this.createRelativeTarget(k,this.target,k.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||f_(this.parent.latestValues)||EF(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(m,g,b){this.relativeParent=m,this.linkedParentVersion=m.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Cs(),this.relativeTargetOrigin=Cs(),tC(this.relativeTargetOrigin,g,b),Yo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const m=this.getLead(),g=!!this.resumingFrom||this!==m;let b=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(b=!1),g&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(b=!1),this.resolvedRelativeTargetAt===Hs.timestamp&&(b=!1),b)return;const{layout:w,layoutId:E}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(w||E))return;Yo(this.layoutCorrected,this.layout.layoutBox);const A=this.treeScale.x,k=this.treeScale.y;mue(this.layoutCorrected,this.treeScale,this.path,g),m.layout&&!m.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(m.target=m.layout.layoutBox,m.targetWithTransforms=Cs());const{target:R}=m;if(!R){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(R4(this.prevProjectionDelta.x,this.projectionDelta.x),R4(this.prevProjectionDelta.y,this.projectionDelta.y)),qb(this.projectionDelta,this.layoutCorrected,R,this.latestValues),(this.treeScale.x!==A||this.treeScale.y!==k||!I4(this.projectionDelta.x,this.prevProjectionDelta.x)||!I4(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",R))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(m=!0){if(this.options.visualElement?.scheduleRender(),m){const g=this.getStack();g&&g.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=hg(),this.projectionDelta=hg(),this.projectionDeltaWithTransform=hg()}setAnimationOrigin(m,g=!1){const b=this.snapshot,w=b?b.latestValues:{},E={...this.latestValues},A=hg();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!g;const k=Cs(),R=b?b.source:void 0,M=this.layout?this.layout.source:void 0,I=R!==M,F=this.getStack(),H=!F||F.members.length<=1,V=!!(I&&!H&&this.options.crossfade===!0&&!this.path.some(Hde));this.animationProgress=0;let K;this.mixTargetDelta=z=>{const W=z/1e3;q4(A.x,m.x,W),q4(A.y,m.y,W),this.setTargetDelta(A),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tC(k,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Vde(this.relativeTarget,this.relativeTargetOrigin,k,W),K&&Tde(this.relativeTarget,K)&&(this.isProjectionDirty=!1),K||(K=Cs()),Yo(K,this.relativeTarget)),I&&(this.animationValues=E,jde(E,w,this.latestValues,W,V,H)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=W},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(m){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Hd(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=$r.update(()=>{Oj.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Cg(0)),this.currentAnimation=xde(this.motionValue,[0,1e3],{...m,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),m.onUpdate&&m.onUpdate(g)},onStop:()=>{},onComplete:()=>{m.onComplete&&m.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const m=this.getStack();m&&m.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Nde),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const m=this.getLead();let{targetWithTransforms:g,target:b,layout:w,latestValues:E}=m;if(!(!g||!b||!w)){if(this!==m&&this.layout&&w&&GF(this.options.animationType,this.layout.layoutBox,w.layoutBox)){b=this.target||Cs();const A=Vi(this.layout.layoutBox.x);b.x.min=m.target.x.min,b.x.max=b.x.min+A;const k=Vi(this.layout.layoutBox.y);b.y.min=m.target.y.min,b.y.max=b.y.min+k}Yo(g,b),dg(g,E),qb(this.projectionDeltaWithTransform,this.layoutCorrected,g,E)}}registerSharedNode(m,g){this.sharedNodes.has(m)||this.sharedNodes.set(m,new _de),this.sharedNodes.get(m).add(g);const w=g.options.initialPromotionConfig;g.promote({transition:w?w.transition:void 0,preserveFollowOpacity:w&&w.shouldPreserveFollowOpacity?w.shouldPreserveFollowOpacity(g):void 0})}isLead(){const m=this.getStack();return m?m.lead===this:!0}getLead(){const{layoutId:m}=this.options;return m?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:m}=this.options;return m?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:m}=this.options;if(m)return this.root.sharedNodes.get(m)}promote({needsReset:m,transition:g,preserveFollowOpacity:b}={}){const w=this.getStack();w&&w.promote(this,b),m&&(this.projectionDelta=void 0,this.needsReset=!0),g&&this.setOptions({transition:g})}relegate(){const m=this.getStack();return m?m.relegate(this):!1}resetSkewAndRotation(){const{visualElement:m}=this.options;if(!m)return;let g=!1;const{latestValues:b}=m;if((b.z||b.rotate||b.rotateX||b.rotateY||b.rotateZ||b.skewX||b.skewY)&&(g=!0),!g)return;const w={};b.z&&gT("z",m,w,this.animationValues);for(let E=0;E<mT.length;E++)gT(`rotate${mT[E]}`,m,w,this.animationValues),gT(`skew${mT[E]}`,m,w,this.animationValues);m.render();for(const E in w)m.setStaticValue(E,w[E]),this.animationValues&&(this.animationValues[E]=w[E]);m.scheduleRender()}applyProjectionStyles(m,g){if(!this.instance||this.isSVG)return;if(!this.isVisible){m.visibility="hidden";return}const b=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,m.visibility="",m.opacity="",m.pointerEvents=Aj(g?.pointerEvents)||"",m.transform=b?b(this.latestValues,""):"none";return}const w=this.getLead();if(!this.projectionDelta||!this.layout||!w.target){this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Aj(g?.pointerEvents)||""),this.hasProjected&&!bp(this.latestValues)&&(m.transform=b?b({},""):"none",this.hasProjected=!1);return}m.visibility="";const E=w.animationValues||w.latestValues;this.applyTransformsToTarget();let A=$de(this.projectionDeltaWithTransform,this.treeScale,E);b&&(A=b(E,A)),m.transform=A;const{x:k,y:R}=this.projectionDelta;m.transformOrigin=`${k.origin*100}% ${R.origin*100}% 0`,w.animationValues?m.opacity=w===this?E.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:E.opacityExit:m.opacity=w===this?E.opacity!==void 0?E.opacity:"":E.opacityExit!==void 0?E.opacityExit:0;for(const M in p_){if(E[M]===void 0)continue;const{correct:I,applyTo:F,isCSSVariable:H}=p_[M],V=A==="none"?E[M]:I(E[M],w);if(F){const K=F.length;for(let z=0;z<K;z++)m[F[z]]=V}else H?this.options.visualElement.renderState.vars[M]=V:m[M]=V}this.options.layoutId&&(m.pointerEvents=w===this?Aj(g?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(m=>m.currentAnimation?.stop()),this.root.nodes.forEach(z4),this.root.sharedNodes.clear()}}}function Pde(e){e.updateLayout()}function Mde(e){const r=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:o}=e.layout,{animationType:u}=e.options,h=r.source!==e.layout.source;u==="size"?ao(E=>{const A=h?r.measuredBox[E]:r.layoutBox[E],k=Vi(A);A.min=s[E].min,A.max=A.min+k}):GF(u,r.layoutBox,s)&&ao(E=>{const A=h?r.measuredBox[E]:r.layoutBox[E],k=Vi(s[E]);A.max=A.min+k,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[E].max=e.relativeTarget[E].min+k)});const m=hg();qb(m,s,r.layoutBox);const g=hg();h?qb(g,e.applyTransform(o,!0),r.measuredBox):qb(g,s,r.layoutBox);const b=!UF(m);let w=!1;if(!e.resumeFrom){const E=e.getClosestProjectingParent();if(E&&!E.resumeFrom){const{snapshot:A,layout:k}=E;if(A&&k){const R=Cs();tC(R,r.layoutBox,A.layoutBox);const M=Cs();tC(M,s,k.layoutBox),KF(R,M)||(w=!0),E.options.layoutRoot&&(e.relativeTarget=M,e.relativeTargetOrigin=R,e.relativeParent=E)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:r,delta:g,layoutDelta:m,hasLayoutChanged:b,hasRelativeLayoutChanged:w})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function Ide(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function zde(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Lde(e){e.clearSnapshot()}function z4(e){e.clearMeasurements()}function L4(e){e.isLayoutDirty=!1}function Fde(e){const{visualElement:r}=e.options;r&&r.getProps().onBeforeLayoutMeasure&&r.notify("BeforeLayoutMeasure"),e.resetTransform()}function F4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qde(e){e.resolveTargetDelta()}function Bde(e){e.calcProjection()}function Ude(e){e.resetSkewAndRotation()}function Kde(e){e.removeLeadSnapshot()}function q4(e,r,s){e.translate=Lr(r.translate,0,s),e.scale=Lr(r.scale,1,s),e.origin=r.origin,e.originPoint=r.originPoint}function B4(e,r,s,o){e.min=Lr(r.min,s.min,o),e.max=Lr(r.max,s.max,o)}function Vde(e,r,s,o){B4(e.x,r.x,s.x,o),B4(e.y,r.y,s.y,o)}function Hde(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Gde={duration:.45,ease:[.4,0,.1,1]},U4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),K4=U4("applewebkit/")&&!U4("chrome/")?Math.round:co;function V4(e){e.min=K4(e.min),e.max=K4(e.max)}function Xde(e){V4(e.x),V4(e.y)}function GF(e,r,s){return e==="position"||e==="preserve-aspect"&&!nde(M4(r),M4(s),.2)}function Yde(e){return e!==e.root&&e.scroll?.wasRoot}const Zde=HF({attachResizeListener:(e,r)=>Wb(e,"resize",r),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),yT={current:void 0},XF=HF({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!yT.current){const e=new Zde({});e.mount(window),e.setOptions({layoutScroll:!0}),yT.current=e}return yT.current},resetTransform:(e,r)=>{e.style.transform=r!==void 0?r:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jde={pan:{Feature:yde},drag:{Feature:gde,ProjectionNode:XF,MeasureLayout:FF}};function H4(e,r,s){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",s==="Start");const u="onHover"+s,h=o[u];h&&$r.postRender(()=>h(r,xw(r)))}class Wde extends Wd{mount(){const{current:r}=this.node;r&&(this.unmount=Ace(r,(s,o)=>(H4(this.node,o,"Start"),u=>H4(this.node,u,"End"))))}unmount(){}}class Qde extends Wd{constructor(){super(...arguments),this.isActive=!1}onFocus(){let r=!1;try{r=this.node.current.matches(":focus-visible")}catch{r=!0}!r||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gw(Wb(this.node.current,"focus",()=>this.onFocus()),Wb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function G4(e,r,s){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",s==="Start");const u="onTap"+(s==="End"?"":s),h=o[u];h&&$r.postRender(()=>h(r,xw(r)))}class ehe extends Wd{mount(){const{current:r}=this.node;r&&(this.unmount=Tce(r,(s,o)=>(G4(this.node,o,"Start"),(u,{success:h})=>G4(this.node,u,h?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const w_=new WeakMap,vT=new WeakMap,the=e=>{const r=w_.get(e.target);r&&r(e)},nhe=e=>{e.forEach(the)};function rhe({root:e,...r}){const s=e||document;vT.has(s)||vT.set(s,{});const o=vT.get(s),u=JSON.stringify(r);return o[u]||(o[u]=new IntersectionObserver(nhe,{root:e,...r})),o[u]}function she(e,r,s){const o=rhe(r);return w_.set(e,s),o.observe(e),()=>{w_.delete(e),o.unobserve(e)}}const ihe={some:0,all:1};class ahe extends Wd{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:r={}}=this.node.getProps(),{root:s,margin:o,amount:u="some",once:h}=r,m={root:s?s.current:void 0,rootMargin:o,threshold:typeof u=="number"?u:ihe[u]},g=b=>{const{isIntersecting:w}=b;if(this.isInView===w||(this.isInView=w,h&&!w&&this.hasEnteredView))return;w&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",w);const{onViewportEnter:E,onViewportLeave:A}=this.node.getProps(),k=w?E:A;k&&k(b)};return she(this.node.current,m,g)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:r,prevProps:s}=this.node;["amount","margin","root"].some(ohe(r,s))&&this.startObserver()}unmount(){}}function ohe({viewport:e={}},{viewport:r={}}={}){return s=>e[s]!==r[s]}const lhe={inView:{Feature:ahe},tap:{Feature:ehe},focus:{Feature:Qde},hover:{Feature:Wde}},che={layout:{ProjectionNode:XF,MeasureLayout:FF}},uhe={...Zue,...lhe,...Jde,...che},dhe=hue(uhe,Cue),hhe=[{id:"light",icon:VJ,label:"Light"},{id:"dark",icon:OJ,label:"Dark"},{id:"system",icon:CJ,label:"System"}],YF=({className:e="",variant:r="pill",ariaLabel:s="Toggle theme"})=>{const{theme:o,setTheme:u}=K_(),h=o??"system",m=r==="pill";return c.jsx("div",{className:vt("inline-flex items-center",m&&"bg-muted/70 rounded-full p-1 text-xs shadow-sm",!m&&"gap-2",e),"aria-label":s,role:"radiogroup",children:hhe.map(({id:g,icon:b,label:w})=>{const E=h===g;return c.jsxs("button",{type:"button",role:"radio","aria-checked":E,onClick:()=>u(g),"aria-label":m?w:void 0,className:vt("focus-visible:ring-ring focus-visible:ring-offset-background relative flex items-center justify-center rounded-full transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",E?"text-foreground border":"text-muted-foreground hover:text-foreground",m&&"h-8 w-8",!m&&"h-8 gap-2 px-3 text-sm font-medium"),children:[E&&c.jsx(dhe.span,{layoutId:"theme-switcher-pill",className:"bg-background absolute inset-0 rounded-full shadow-sm",transition:{type:"spring",stiffness:350,damping:26}}),c.jsx(b,{className:"relative z-10 h-4 w-4"}),!m&&c.jsx("span",{className:"relative z-10",children:w})]},g)})})};function phe(){return Un({queryKey:["me"],queryFn:()=>wp.getMe(),staleTime:300*1e3})}function fhe(e,r=[]){let s=[];function o(h,m){const g=T.createContext(m);g.displayName=h+"Context";const b=s.length;s=[...s,m];const w=A=>{const{scope:k,children:R,...M}=A,I=k?.[e]?.[b]||g,F=T.useMemo(()=>M,Object.values(M));return c.jsx(I.Provider,{value:F,children:R})};w.displayName=h+"Provider";function E(A,k){const R=k?.[e]?.[b]||g,M=T.useContext(R);if(M)return M;if(m!==void 0)return m;throw new Error(`\`${A}\` must be used within \`${h}\``)}return[w,E]}const u=()=>{const h=s.map(m=>T.createContext(m));return function(g){const b=g?.[e]||h;return T.useMemo(()=>({[`__scope${e}`]:{...g,[e]:b}}),[g,b])}};return u.scopeName=e,[o,mhe(u,...r)]}function mhe(...e){const r=e[0];if(e.length===1)return r;const s=()=>{const o=e.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(h){const m=o.reduce((g,{useScope:b,scopeName:w})=>{const A=b(h)[`__scope${w}`];return{...g,...A}},{});return T.useMemo(()=>({[`__scope${r.scopeName}`]:m}),[m])}};return s.scopeName=r.scopeName,s}var ghe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J2=ghe.reduce((e,r)=>{const s=iw(`Primitive.${r}`),o=T.forwardRef((u,h)=>{const{asChild:m,...g}=u,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(b,{...g,ref:h})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),xT={exports:{}},bT={};var X4;function yhe(){if(X4)return bT;X4=1;var e=tz();function r(A,k){return A===k&&(A!==0||1/A===1/k)||A!==A&&k!==k}var s=typeof Object.is=="function"?Object.is:r,o=e.useState,u=e.useEffect,h=e.useLayoutEffect,m=e.useDebugValue;function g(A,k){var R=k(),M=o({inst:{value:R,getSnapshot:k}}),I=M[0].inst,F=M[1];return h(function(){I.value=R,I.getSnapshot=k,b(I)&&F({inst:I})},[A,R,k]),u(function(){return b(I)&&F({inst:I}),A(function(){b(I)&&F({inst:I})})},[A]),m(R),R}function b(A){var k=A.getSnapshot;A=A.value;try{var R=k();return!s(A,R)}catch{return!0}}function w(A,k){return k()}var E=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?w:g;return bT.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:E,bT}var Y4;function vhe(){return Y4||(Y4=1,xT.exports=yhe()),xT.exports}var xhe=vhe();function bhe(){return xhe.useSyncExternalStore(whe,()=>!0,()=>!1)}function whe(){return()=>{}}var W2="Avatar",[She]=fhe(W2),[Ehe,ZF]=She(W2),JF=T.forwardRef((e,r)=>{const{__scopeAvatar:s,...o}=e,[u,h]=T.useState("idle");return c.jsx(Ehe,{scope:s,imageLoadingStatus:u,onImageLoadingStatusChange:h,children:c.jsx(J2.span,{...o,ref:r})})});JF.displayName=W2;var WF="AvatarImage",jhe=T.forwardRef((e,r)=>{const{__scopeAvatar:s,src:o,onLoadingStatusChange:u=()=>{},...h}=e,m=ZF(WF,s),g=Che(o,h),b=sl(w=>{u(w),m.onImageLoadingStatusChange(w)});return Os(()=>{g!=="idle"&&b(g)},[g,b]),g==="loaded"?c.jsx(J2.img,{...h,ref:r,src:o}):null});jhe.displayName=WF;var QF="AvatarFallback",e6=T.forwardRef((e,r)=>{const{__scopeAvatar:s,delayMs:o,...u}=e,h=ZF(QF,s),[m,g]=T.useState(o===void 0);return T.useEffect(()=>{if(o!==void 0){const b=window.setTimeout(()=>g(!0),o);return()=>window.clearTimeout(b)}},[o]),m&&h.imageLoadingStatus!=="loaded"?c.jsx(J2.span,{...u,ref:r}):null});e6.displayName=QF;function Z4(e,r){return e?r?(e.src!==r&&(e.src=r),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Che(e,{referrerPolicy:r,crossOrigin:s}){const o=bhe(),u=T.useRef(null),h=o?(u.current||(u.current=new window.Image),u.current):null,[m,g]=T.useState(()=>Z4(h,e));return Os(()=>{g(Z4(h,e))},[h,e]),Os(()=>{const b=A=>()=>{g(A)};if(!h)return;const w=b("loaded"),E=b("error");return h.addEventListener("load",w),h.addEventListener("error",E),r&&(h.referrerPolicy=r),typeof s=="string"&&(h.crossOrigin=s),()=>{h.removeEventListener("load",w),h.removeEventListener("error",E)}},[h,s,r]),m}var Ahe=JF,Ohe=e6;function khe({className:e,...r}){return c.jsx(Ahe,{"data-slot":"avatar",className:vt("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...r})}function Rhe({className:e,...r}){return c.jsx(Ohe,{"data-slot":"avatar-fallback",className:vt("bg-muted flex size-full items-center justify-center rounded-full",e),...r})}function The({...e}){return c.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function _he({className:e,...r}){return c.jsx("ol",{"data-slot":"breadcrumb-list",className:vt("text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...r})}function J4({className:e,...r}){return c.jsx("li",{"data-slot":"breadcrumb-item",className:vt("inline-flex items-center gap-1.5",e),...r})}function W4({asChild:e,className:r,...s}){const o=e?Tg:"a";return c.jsx(o,{"data-slot":"breadcrumb-link",className:vt("hover:text-foreground transition-colors",r),...s})}function $he({className:e,...r}){return c.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:vt("text-foreground font-normal",e),...r})}function Nhe({children:e,className:r,...s}){return c.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:vt("[&>svg]:size-3.5",r),...s,children:e??c.jsx(qZ,{})})}const wT=768;function Dhe(){const[e,r]=T.useState(void 0);return T.useEffect(()=>{const s=window.matchMedia(`(max-width: ${wT-1}px)`),o=()=>{r(window.innerWidth<wT)};return s.addEventListener("change",o),r(window.innerWidth<wT),()=>s.removeEventListener("change",o)},[]),!!e}function mt({className:e,type:r,...s}){return c.jsx("input",{type:r,"data-slot":"input",className:vt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}function Phe({...e}){return c.jsx(LC,{"data-slot":"sheet",...e})}function Mhe({...e}){return c.jsx(FC,{"data-slot":"sheet-portal",...e})}function Ihe({className:e,...r}){return c.jsx(qC,{"data-slot":"sheet-overlay",className:vt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function zhe({className:e,children:r,side:s="right",...o}){return c.jsxs(Mhe,{children:[c.jsx(Ihe,{}),c.jsxs(BC,{"data-slot":"sheet-content",className:vt("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",s==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",s==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",s==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",s==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...o,children:[r,c.jsxs(pw,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[c.jsx(W_,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Lhe({className:e,...r}){return c.jsx("div",{"data-slot":"sheet-header",className:vt("flex flex-col gap-1.5 p-4",e),...r})}function Fhe({className:e,...r}){return c.jsx(g2,{"data-slot":"sheet-title",className:vt("text-foreground font-semibold",e),...r})}function qhe({className:e,...r}){return c.jsx(y2,{"data-slot":"sheet-description",className:vt("text-muted-foreground text-sm",e),...r})}const Bhe="sidebar_state",Uhe=3600*24*7,Khe="16rem",Vhe="18rem",Hhe="3rem",Ghe="b",t6=T.createContext(null);function Q2(){const e=T.useContext(t6);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Xhe({defaultOpen:e=!0,open:r,onOpenChange:s,className:o,style:u,children:h,...m}){const g=Dhe(),[b,w]=T.useState(!1),[E,A]=T.useState(e),k=r??E,R=T.useCallback(H=>{const V=typeof H=="function"?H(k):H;s?s(V):A(V),document.cookie=`${Bhe}=${V}; path=/; max-age=${Uhe}`},[s,k]),M=T.useCallback(()=>g?w(H=>!H):R(H=>!H),[g,R,w]);T.useEffect(()=>{const H=V=>{V.key===Ghe&&(V.metaKey||V.ctrlKey)&&(V.preventDefault(),M())};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[M]);const I=k?"expanded":"collapsed",F=T.useMemo(()=>({state:I,open:k,setOpen:R,isMobile:g,openMobile:b,setOpenMobile:w,toggleSidebar:M}),[I,k,R,g,b,w,M]);return c.jsx(t6.Provider,{value:F,children:c.jsx(cw,{delayDuration:0,children:c.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Khe,"--sidebar-width-icon":Hhe,...u},className:vt("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",o),...m,children:h})})})}function Yhe({side:e="left",variant:r="sidebar",collapsible:s="offcanvas",className:o,children:u,...h}){const{isMobile:m,state:g,openMobile:b,setOpenMobile:w}=Q2();return s==="none"?c.jsx("div",{"data-slot":"sidebar",className:vt("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",o),...h,children:u}):m?c.jsx(Phe,{open:b,onOpenChange:w,...h,children:c.jsxs(zhe,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Vhe},side:e,children:[c.jsxs(Lhe,{className:"sr-only",children:[c.jsx(Fhe,{children:"Sidebar"}),c.jsx(qhe,{children:"Displays the mobile sidebar."})]}),c.jsx("div",{className:"flex h-full w-full flex-col",children:u})]})}):c.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":g,"data-collapsible":g==="collapsed"?s:"","data-variant":r,"data-side":e,"data-slot":"sidebar",children:[c.jsx("div",{"data-slot":"sidebar-gap",className:vt("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",r==="floating"||r==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),c.jsx("div",{"data-slot":"sidebar-container",className:vt("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",r==="floating"||r==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...h,children:c.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:u})})]})}function Zhe({className:e,onClick:r,...s}){const{toggleSidebar:o}=Q2();return c.jsxs(Pe,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:vt("size-7",e),onClick:u=>{r?.(u),o()},...s,children:[c.jsx(NJ,{}),c.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Jhe({className:e,...r}){return c.jsx("main",{"data-slot":"sidebar-inset",className:vt("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...r})}function Whe({className:e,...r}){return c.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:vt("flex flex-col gap-2 p-2",e),...r})}function Qhe({className:e,...r}){return c.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:vt("flex flex-col gap-2 p-2",e),...r})}function epe({className:e,...r}){return c.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:vt("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...r})}function oj({className:e,...r}){return c.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:vt("relative flex w-full min-w-0 flex-col p-2",e),...r})}function lj({className:e,asChild:r=!1,...s}){const o=r?Tg:"div";return c.jsx(o,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:vt("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...s})}function cj({className:e,...r}){return c.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:vt("w-full text-sm",e),...r})}function uj({className:e,...r}){return c.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:vt("flex w-full min-w-0 flex-col gap-1",e),...r})}function dj({className:e,...r}){return c.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:vt("group/menu-item relative",e),...r})}const tpe=e2("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function hj({asChild:e=!1,isActive:r=!1,variant:s="default",size:o="default",tooltip:u,className:h,...m}){const g=e?Tg:"button",{isMobile:b,state:w}=Q2(),E=c.jsx(g,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":o,"data-active":r,className:vt(tpe({variant:s,size:o}),h),...m});return u?(typeof u=="string"&&(u={children:u}),c.jsxs(Uj,{children:[c.jsx(Kj,{asChild:!0,children:E}),c.jsx(Vj,{side:"right",align:"center",hidden:w!=="collapsed"||b,...u})]})):E}const npe=()=>{const e=B_(),{data:r,isLoading:s}=phe(),o=T.useMemo(()=>{const h=e.pathname.split("/").filter(Boolean),m=[];let g="";for(const b of h)g+=`/${b}`,m.push({to:g,label:b});return m},[e.pathname]),u=T.useMemo(()=>{if(!r)return"U";const m=(r.display_name||r.primary_email||"").trim().split(/\s+/);return m.length>=2?(m[0][0]+m[1][0]).toUpperCase():m.length===1&&m[0]?m[0][0].toUpperCase():"U"},[r]);return c.jsxs("div",{className:"flex h-12 items-center gap-2 border-b px-3",children:[c.jsx(Zhe,{}),c.jsx("div",{className:"flex-1",children:c.jsx(The,{children:c.jsxs(_he,{children:[c.jsx(J4,{children:c.jsx(W4,{asChild:!0,children:c.jsx(PR,{to:"/",children:"Home"})})}),o.map((h,m)=>c.jsxs("span",{className:"flex items-center",children:[c.jsx(Nhe,{}),c.jsx(J4,{children:m===o.length-1?c.jsx($he,{className:"capitalize",children:h.label}):c.jsx(W4,{asChild:!0,children:c.jsx(PR,{to:h.to,className:"capitalize",children:h.label})})})]},h.to))]})})}),c.jsx(YF,{variant:"wide"}),c.jsx(Pe,{variant:"ghost",size:"sm",asChild:!0,children:c.jsx(PR,{to:"/me",children:s?"…":r?.display_name||"Profile"})}),c.jsx(khe,{className:"h-7 w-7",children:c.jsx(Rhe,{children:u})})]})};async function rpe(){const e=Xs.get();if(!e?.refresh_token){Xs.logout();return}try{const r={refresh_token:e.refresh_token};await Ete().logout({dtoLogoutRequest:r})}catch(r){console.warn("Logout API failed; clearing local state anyway",r)}finally{Xs.logout()}}function spe(){return{logout:T.useCallback(()=>rpe(),[])}}const ipe=()=>{const[e,r]=T.useState([]),{logout:s}=spe();return T.useEffect(()=>{let o=!0;return(async()=>{try{const h=((await wp.getMe()).organizations??[]).map(m=>({id:m.id,name:m.name??m.id}));if(!o)return;r(h),!rl.get()&&h.length>0&&rl.set(h[0].id)}catch{}})(),()=>{o=!1}},[]),c.jsxs(Xhe,{defaultOpen:!0,children:[c.jsxs(Yhe,{collapsible:"icon",variant:"floating",children:[c.jsx(Whe,{children:c.jsx("div",{className:"px-2 py-2",children:c.jsx(Doe,{orgs:e})})}),c.jsxs(epe,{children:[c.jsxs(oj,{children:[c.jsx(lj,{children:"Navigation"}),c.jsx(cj,{children:c.jsx(uj,{children:bie.map(o=>c.jsx(dj,{children:c.jsx(hj,{asChild:!0,tooltip:o.label,children:c.jsxs(BE,{to:o.to,className:({isActive:u})=>vt("flex items-center gap-2",u&&"text-primary"),children:[c.jsx(o.icon,{className:"h-4 w-4"}),c.jsx("span",{children:o.label})]})})},o.to))})})]}),c.jsxs(oj,{children:[c.jsx(lj,{children:"Organization"}),c.jsx(cj,{children:c.jsx(uj,{children:wie.map(o=>c.jsx(dj,{children:c.jsx(hj,{asChild:!0,tooltip:o.label,children:c.jsxs(BE,{to:o.to,className:({isActive:u})=>vt("flex items-center gap-2",u&&"text-primary"),children:[c.jsx(o.icon,{className:"h-4 w-4"}),c.jsx("span",{children:o.label})]})})},o.to))})})]}),c.jsxs(oj,{children:[c.jsx(lj,{children:"User"}),c.jsx(cj,{children:c.jsx(uj,{children:Sie.map(o=>c.jsx(dj,{children:c.jsx(hj,{asChild:!0,tooltip:o.label,children:c.jsxs(BE,{to:o.to,className:({isActive:u})=>vt("flex items-center gap-2",u&&"text-primary"),children:[c.jsx(o.icon,{className:"h-4 w-4"}),c.jsx("span",{children:o.label})]})})},o.to))})})]}),c.jsxs(oj,{children:[c.jsx(lj,{children:"Admin"}),c.jsx(cj,{children:c.jsx(uj,{children:Eie.map(o=>c.jsx(dj,{children:c.jsx(hj,{asChild:!0,tooltip:o.label,children:c.jsxs(BE,{to:o.to,target:o.target?o.target:"_self",className:({isActive:u})=>vt("flex items-center gap-2",u&&"text-primary"),children:[c.jsx(o.icon,{className:"h-4 w-4"}),c.jsx("span",{children:o.label})]})})},o.to))})})]}),c.jsx("div",{className:"mt-auto flex items-center justify-center p-3",children:c.jsx(YF,{})})]}),c.jsx(Qhe,{children:c.jsx("div",{className:"px-2 py-2",children:c.jsx(Pe,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{s()},children:"Sign out"})})})]}),c.jsxs(Jhe,{className:"flex min-h-screen flex-col",children:[c.jsx(npe,{}),c.jsx("main",{className:"p-4",children:c.jsx(nz,{})}),c.jsx(oie,{})]})]})},ape=()=>{const e=T.useSyncExternalStore(r=>Xs.subscribe(r),()=>Xs.get(),()=>Xs.get());return{tokens:e,authed:!!e?.access_token,isExpired:Xs.isExpired(),willExpireSoon:Xs.willExpireSoon()}},ope=()=>{const{authed:e}=ape(),r=B_();return e?c.jsx(nz,{}):c.jsx($Y,{to:`/login?to=${encodeURIComponent(r.pathname+r.search)}`,replace:!0})},pj=Ite(),kb={listActions:()=>ct(async()=>await pj.listActions()),createAction:e=>ct(async()=>await pj.createAction({dtoCreateActionRequest:e})),updateAction:(e,r)=>ct(async()=>await pj.updateAction({actionID:e,dtoUpdateActionRequest:r})),deleteAction:e=>ct(async()=>{await pj.deleteAction({actionID:e})})};var bw=e=>e.type==="checkbox",Cp=e=>e instanceof Date,ma=e=>e==null;const n6=e=>typeof e=="object";var vs=e=>!ma(e)&&!Array.isArray(e)&&n6(e)&&!Cp(e),r6=e=>vs(e)&&e.target?bw(e.target)?e.target.checked:e.target.value:e,lpe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,s6=(e,r)=>e.has(lpe(r)),cpe=e=>{const r=e.constructor&&e.constructor.prototype;return vs(r)&&r.hasOwnProperty("isPrototypeOf")},e$=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function fs(e){if(e instanceof Date)return new Date(e);const r=typeof FileList<"u"&&e instanceof FileList;if(e$&&(e instanceof Blob||r))return e;const s=Array.isArray(e);if(!s&&!(vs(e)&&cpe(e)))return e;const o=s?[]:Object.create(Object.getPrototypeOf(e));for(const u in e)Object.prototype.hasOwnProperty.call(e,u)&&(o[u]=fs(e[u]));return o}var XC=e=>/^\w*$/.test(e),_r=e=>e===void 0,t$=e=>Array.isArray(e)?e.filter(Boolean):[],n$=e=>t$(e.replace(/["|']|\]/g,"").split(/\.|\[/)),jt=(e,r,s)=>{if(!r||!vs(e))return s;const o=(XC(r)?[r]:n$(r)).reduce((u,h)=>ma(u)?u:u[h],e);return _r(o)||o===e?_r(e[r])?s:e[r]:o},Pa=e=>typeof e=="boolean",Ki=e=>typeof e=="function",dr=(e,r,s)=>{let o=-1;const u=XC(r)?[r]:n$(r),h=u.length,m=h-1;for(;++o<h;){const g=u[o];let b=s;if(o!==m){const w=e[g];b=vs(w)||Array.isArray(w)?w:isNaN(+u[o+1])?{}:[]}if(g==="__proto__"||g==="constructor"||g==="prototype")return;e[g]=b,e=e[g]}};const nC={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},el={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},r$=et.createContext(null);r$.displayName="HookFormContext";const YC=()=>et.useContext(r$),upe=e=>{const{children:r,...s}=e;return et.createElement(r$.Provider,{value:s},r)};var i6=(e,r,s,o=!0)=>{const u={defaultValues:r._defaultValues};for(const h in e)Object.defineProperty(u,h,{get:()=>{const m=h;return r._proxyFormState[m]!==el.all&&(r._proxyFormState[m]=!o||el.all),s&&(s[m]=!0),e[m]}});return u};const s$=typeof window<"u"?et.useLayoutEffect:et.useEffect;function a6(e){const r=YC(),{control:s=r.control,disabled:o,name:u,exact:h}=e||{},[m,g]=et.useState(s._formState),b=et.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return s$(()=>s._subscribe({name:u,formState:b.current,exact:h,callback:w=>{!o&&g({...s._formState,...w})}}),[u,o,h]),et.useEffect(()=>{b.current.isValid&&s._setValid(!0)},[s]),et.useMemo(()=>i6(m,s,b.current,!1),[m,s])}var Ia=e=>typeof e=="string",S_=(e,r,s,o,u)=>Ia(e)?(o&&r.watch.add(e),jt(s,e,u)):Array.isArray(e)?e.map(h=>(o&&r.watch.add(h),jt(s,h))):(o&&(r.watchAll=!0),s),E_=e=>ma(e)||!n6(e);function tl(e,r,s=new WeakSet){if(E_(e)||E_(r))return Object.is(e,r);if(Cp(e)&&Cp(r))return Object.is(e.getTime(),r.getTime());const o=Object.keys(e),u=Object.keys(r);if(o.length!==u.length)return!1;if(s.has(e)||s.has(r))return!0;s.add(e),s.add(r);for(const h of o){const m=e[h];if(!u.includes(h))return!1;if(h!=="ref"){const g=r[h];if(Cp(m)&&Cp(g)||vs(m)&&vs(g)||Array.isArray(m)&&Array.isArray(g)?!tl(m,g,s):!Object.is(m,g))return!1}}return!0}function pg(e){const r=YC(),{control:s=r.control,name:o,defaultValue:u,disabled:h,exact:m,compute:g}=e||{},b=et.useRef(u),w=et.useRef(g),E=et.useRef(void 0),A=et.useRef(s),k=et.useRef(o);w.current=g;const[R,M]=et.useState(()=>{const z=s._getWatch(o,b.current);return w.current?w.current(z):z}),I=et.useCallback(z=>{const W=S_(o,s._names,z||s._formValues,!1,b.current);return w.current?w.current(W):W},[s._formValues,s._names,o]),F=et.useCallback(z=>{if(!h){const W=S_(o,s._names,z||s._formValues,!1,b.current);if(w.current){const ae=w.current(W);tl(ae,E.current)||(M(ae),E.current=ae)}else M(W)}},[s._formValues,s._names,h,o]);s$(()=>((A.current!==s||!tl(k.current,o))&&(A.current=s,k.current=o,F()),s._subscribe({name:o,formState:{values:!0},exact:m,callback:z=>{F(z.values)}})),[s,m,o,F]),et.useEffect(()=>s._removeUnmounted());const H=A.current!==s,V=k.current,K=et.useMemo(()=>{if(h)return null;const z=!H&&!tl(V,o);return H||z?I():null},[h,H,o,V,I]);return K!==null?K:R}function dpe(e){const r=YC(),{name:s,disabled:o,control:u=r.control,shouldUnregister:h,defaultValue:m,exact:g=!0}=e,b=s6(u._names.array,s),w=et.useMemo(()=>jt(u._formValues,s,jt(u._defaultValues,s,m)),[u,s,m]),E=pg({control:u,name:s,defaultValue:w,exact:g}),A=a6({control:u,name:s,exact:g}),k=et.useRef(e),R=et.useRef(void 0),M=et.useRef(u.register(s,{...e.rules,value:E,...Pa(e.disabled)?{disabled:e.disabled}:{}}));k.current=e;const I=et.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!jt(A.errors,s)},isDirty:{enumerable:!0,get:()=>!!jt(A.dirtyFields,s)},isTouched:{enumerable:!0,get:()=>!!jt(A.touchedFields,s)},isValidating:{enumerable:!0,get:()=>!!jt(A.validatingFields,s)},error:{enumerable:!0,get:()=>jt(A.errors,s)}}),[A,s]),F=et.useCallback(z=>M.current.onChange({target:{value:r6(z),name:s},type:nC.CHANGE}),[s]),H=et.useCallback(()=>M.current.onBlur({target:{value:jt(u._formValues,s),name:s},type:nC.BLUR}),[s,u._formValues]),V=et.useCallback(z=>{const W=jt(u._fields,s);W&&W._f&&z&&(W._f.ref={focus:()=>Ki(z.focus)&&z.focus(),select:()=>Ki(z.select)&&z.select(),setCustomValidity:ae=>Ki(z.setCustomValidity)&&z.setCustomValidity(ae),reportValidity:()=>Ki(z.reportValidity)&&z.reportValidity()})},[u._fields,s]),K=et.useMemo(()=>({name:s,value:E,...Pa(o)||A.disabled?{disabled:A.disabled||o}:{},onChange:F,onBlur:H,ref:V}),[s,o,A.disabled,F,H,V,E]);return et.useEffect(()=>{const z=u._options.shouldUnregister||h,W=R.current;W&&W!==s&&!b&&u.unregister(W),u.register(s,{...k.current.rules,...Pa(k.current.disabled)?{disabled:k.current.disabled}:{}});const ae=(Q,te)=>{const de=jt(u._fields,Q);de&&de._f&&(de._f.mount=te)};if(ae(s,!0),z){const Q=fs(jt(u._options.defaultValues,s,k.current.defaultValue));dr(u._defaultValues,s,Q),_r(jt(u._formValues,s))&&dr(u._formValues,s,Q)}return!b&&u.register(s),R.current=s,()=>{(b?z&&!u._state.action:z)?u.unregister(s):ae(s,!1)}},[s,u,b,h]),et.useEffect(()=>{u._setDisabledField({disabled:o,name:s})},[o,s,u]),et.useMemo(()=>({field:K,formState:A,fieldState:I}),[K,A,I])}const Zo=e=>e.render(dpe(e));var i$=(e,r,s,o,u)=>r?{...s[e],types:{...s[e]&&s[e].types?s[e].types:{},[o]:u||!0}}:{},Bb=e=>Array.isArray(e)?e:[e],Q4=()=>{let e=[];return{get observers(){return e},next:u=>{for(const h of e)h.next&&h.next(u)},subscribe:u=>(e.push(u),{unsubscribe:()=>{e=e.filter(h=>h!==u)}}),unsubscribe:()=>{e=[]}}};function o6(e,r){const s={};for(const o in e)if(e.hasOwnProperty(o)){const u=e[o],h=r[o];if(u&&vs(u)&&h){const m=o6(u,h);vs(m)&&(s[o]=m)}else e[o]&&(s[o]=h)}return s}var Bi=e=>vs(e)&&!Object.keys(e).length,a$=e=>e.type==="file",rC=e=>{if(!e$)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},l6=e=>e.type==="select-multiple",o$=e=>e.type==="radio",hpe=e=>o$(e)||bw(e),ST=e=>rC(e)&&e.isConnected;function ppe(e,r){const s=r.slice(0,-1).length;let o=0;for(;o<s;)e=_r(e)?o++:e[r[o++]];return e}function fpe(e){for(const r in e)if(e.hasOwnProperty(r)&&!_r(e[r]))return!1;return!0}function ms(e,r){const s=Array.isArray(r)?r:XC(r)?[r]:n$(r),o=s.length===1?e:ppe(e,s),u=s.length-1,h=s[u];return o&&delete o[h],u!==0&&(vs(o)&&Bi(o)||Array.isArray(o)&&fpe(o))&&ms(e,s.slice(0,-1)),e}var mpe=e=>{for(const r in e)if(Ki(e[r]))return!0;return!1};function c6(e){return Array.isArray(e)||vs(e)&&!mpe(e)}function j_(e,r={}){for(const s in e){const o=e[s];c6(o)?(r[s]=Array.isArray(o)?[]:{},j_(o,r[s])):_r(o)||(r[s]=!0)}return r}function tg(e,r,s){s||(s=j_(r));for(const o in e){const u=e[o];if(c6(u))_r(r)||E_(s[o])?s[o]=j_(u,Array.isArray(u)?[]:{}):tg(u,ma(r)?{}:r[o],s[o]);else{const h=r[o];s[o]=!tl(u,h)}}return s}const e3={value:!1,isValid:!1},t3={value:!0,isValid:!0};var u6=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!_r(e[0].attributes.value)?_r(e[0].value)||e[0].value===""?t3:{value:e[0].value,isValid:!0}:t3:e3}return e3},d6=(e,{valueAsNumber:r,valueAsDate:s,setValueAs:o})=>_r(e)?e:r?e===""?NaN:e&&+e:s&&Ia(e)?new Date(e):o?o(e):e;const n3={isValid:!1,value:null};var h6=e=>Array.isArray(e)?e.reduce((r,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:r,n3):n3;function r3(e){const r=e.ref;return a$(r)?r.files:o$(r)?h6(e.refs).value:l6(r)?[...r.selectedOptions].map(({value:s})=>s):bw(r)?u6(e.refs).value:d6(_r(r.value)?e.ref.value:r.value,e)}var gpe=(e,r,s,o)=>{const u={};for(const h of e){const m=jt(r,h);m&&dr(u,h,m._f)}return{criteriaMode:s,names:[...e],fields:u,shouldUseNativeValidation:o}},sC=e=>e instanceof RegExp,hb=e=>_r(e)?e:sC(e)?e.source:vs(e)?sC(e.value)?e.value.source:e.value:e,s3=e=>({isOnSubmit:!e||e===el.onSubmit,isOnBlur:e===el.onBlur,isOnChange:e===el.onChange,isOnAll:e===el.all,isOnTouch:e===el.onTouched});const i3="AsyncFunction";var ype=e=>!!e&&!!e.validate&&!!(Ki(e.validate)&&e.validate.constructor.name===i3||vs(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===i3)),vpe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),a3=(e,r,s)=>!s&&(r.watchAll||r.watch.has(e)||[...r.watch].some(o=>e.startsWith(o)&&/^\.\w+/.test(e.slice(o.length))));const Ub=(e,r,s,o)=>{for(const u of s||Object.keys(e)){const h=jt(e,u);if(h){const{_f:m,...g}=h;if(m){if(m.refs&&m.refs[0]&&r(m.refs[0],u)&&!o)return!0;if(m.ref&&r(m.ref,m.name)&&!o)return!0;if(Ub(g,r))break}else if(vs(g)&&Ub(g,r))break}}};function o3(e,r,s){const o=jt(e,s);if(o||XC(s))return{error:o,name:s};const u=s.split(".");for(;u.length;){const h=u.join("."),m=jt(r,h),g=jt(e,h);if(m&&!Array.isArray(m)&&s!==h)return{name:s};if(g&&g.type)return{name:h,error:g};if(g&&g.root&&g.root.type)return{name:`${h}.root`,error:g.root};u.pop()}return{name:s}}var xpe=(e,r,s,o)=>{s(e);const{name:u,...h}=e;return Bi(h)||Object.keys(h).length>=Object.keys(r).length||Object.keys(h).find(m=>r[m]===(!o||el.all))},bpe=(e,r,s)=>!e||!r||e===r||Bb(e).some(o=>o&&(s?o===r:o.startsWith(r)||r.startsWith(o))),wpe=(e,r,s,o,u)=>u.isOnAll?!1:!s&&u.isOnTouch?!(r||e):(s?o.isOnBlur:u.isOnBlur)?!e:(s?o.isOnChange:u.isOnChange)?e:!0,Spe=(e,r)=>!t$(jt(e,r)).length&&ms(e,r),Epe=(e,r,s)=>{const o=Bb(jt(e,s));return dr(o,"root",r[s]),dr(e,s,o),e};function l3(e,r,s="validate"){if(Ia(e)||Array.isArray(e)&&e.every(Ia)||Pa(e)&&!e)return{type:s,message:Ia(e)?e:"",ref:r}}var Jm=e=>vs(e)&&!sC(e)?e:{value:e,message:""},c3=async(e,r,s,o,u,h)=>{const{ref:m,refs:g,required:b,maxLength:w,minLength:E,min:A,max:k,pattern:R,validate:M,name:I,valueAsNumber:F,mount:H}=e._f,V=jt(s,I);if(!H||r.has(I))return{};const K=g?g[0]:m,z=ie=>{u&&K.reportValidity&&(K.setCustomValidity(Pa(ie)?"":ie||""),K.reportValidity())},W={},ae=o$(m),Q=bw(m),te=ae||Q,de=(F||a$(m))&&_r(m.value)&&_r(V)||rC(m)&&m.value===""||V===""||Array.isArray(V)&&!V.length,je=i$.bind(null,I,o,W),we=(ie,Se,Ae,He=pu.maxLength,ue=pu.minLength)=>{const ne=ie?Se:Ae;W[I]={type:ie?He:ue,message:ne,ref:m,...je(ie?He:ue,ne)}};if(h?!Array.isArray(V)||!V.length:b&&(!te&&(de||ma(V))||Pa(V)&&!V||Q&&!u6(g).isValid||ae&&!h6(g).isValid)){const{value:ie,message:Se}=Ia(b)?{value:!!b,message:b}:Jm(b);if(ie&&(W[I]={type:pu.required,message:Se,ref:K,...je(pu.required,Se)},!o))return z(Se),W}if(!de&&(!ma(A)||!ma(k))){let ie,Se;const Ae=Jm(k),He=Jm(A);if(!ma(V)&&!isNaN(V)){const ue=m.valueAsNumber||V&&+V;ma(Ae.value)||(ie=ue>Ae.value),ma(He.value)||(Se=ue<He.value)}else{const ue=m.valueAsDate||new Date(V),ne=me=>new Date(new Date().toDateString()+" "+me),ce=m.type=="time",$e=m.type=="week";Ia(Ae.value)&&V&&(ie=ce?ne(V)>ne(Ae.value):$e?V>Ae.value:ue>new Date(Ae.value)),Ia(He.value)&&V&&(Se=ce?ne(V)<ne(He.value):$e?V<He.value:ue<new Date(He.value))}if((ie||Se)&&(we(!!ie,Ae.message,He.message,pu.max,pu.min),!o))return z(W[I].message),W}if((w||E)&&!de&&(Ia(V)||h&&Array.isArray(V))){const ie=Jm(w),Se=Jm(E),Ae=!ma(ie.value)&&V.length>+ie.value,He=!ma(Se.value)&&V.length<+Se.value;if((Ae||He)&&(we(Ae,ie.message,Se.message),!o))return z(W[I].message),W}if(R&&!de&&Ia(V)){const{value:ie,message:Se}=Jm(R);if(sC(ie)&&!V.match(ie)&&(W[I]={type:pu.pattern,message:Se,ref:m,...je(pu.pattern,Se)},!o))return z(Se),W}if(M){if(Ki(M)){const ie=await M(V,s),Se=l3(ie,K);if(Se&&(W[I]={...Se,...je(pu.validate,Se.message)},!o))return z(Se.message),W}else if(vs(M)){let ie={};for(const Se in M){if(!Bi(ie)&&!o)break;const Ae=l3(await M[Se](V,s),K,Se);Ae&&(ie={...Ae,...je(Se,Ae.message)},z(Ae.message),o&&(W[I]=ie))}if(!Bi(ie)&&(W[I]={ref:K,...ie},!o))return W}}return z(!0),W};const jpe={mode:el.onSubmit,reValidateMode:el.onChange,shouldFocusError:!0};function Cpe(e={}){let r={...jpe,...e},s={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ki(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},o={},u=vs(r.defaultValues)||vs(r.values)?fs(r.defaultValues||r.values)||{}:{},h=r.shouldUnregister?{}:fs(u),m={action:!1,mount:!1,watch:!1,keepIsValid:!1},g={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,w=0;const E={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},A={...E};let k={...A};const R={array:Q4(),state:Q4()},M=r.criteriaMode===el.all,I=ge=>Me=>{clearTimeout(w),w=setTimeout(ge,Me)},F=async ge=>{if(!m.keepIsValid&&!r.disabled&&(A.isValid||k.isValid||ge)){let Me;r.resolver?(Me=Bi((await te()).errors),H()):Me=await je(o,!0),Me!==s.isValid&&R.state.next({isValid:Me})}},H=(ge,Me)=>{!r.disabled&&(A.isValidating||A.validatingFields||k.isValidating||k.validatingFields)&&((ge||Array.from(g.mount)).forEach(_=>{_&&(Me?dr(s.validatingFields,_,Me):ms(s.validatingFields,_))}),R.state.next({validatingFields:s.validatingFields,isValidating:!Bi(s.validatingFields)}))},V=(ge,Me=[],_,q,X=!0,oe=!0)=>{if(q&&_&&!r.disabled){if(m.action=!0,oe&&Array.isArray(jt(o,ge))){const ve=_(jt(o,ge),q.argA,q.argB);X&&dr(o,ge,ve)}if(oe&&Array.isArray(jt(s.errors,ge))){const ve=_(jt(s.errors,ge),q.argA,q.argB);X&&dr(s.errors,ge,ve),Spe(s.errors,ge)}if((A.touchedFields||k.touchedFields)&&oe&&Array.isArray(jt(s.touchedFields,ge))){const ve=_(jt(s.touchedFields,ge),q.argA,q.argB);X&&dr(s.touchedFields,ge,ve)}(A.dirtyFields||k.dirtyFields)&&(s.dirtyFields=tg(u,h)),R.state.next({name:ge,isDirty:ie(ge,Me),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else dr(h,ge,Me)},K=(ge,Me)=>{dr(s.errors,ge,Me),R.state.next({errors:s.errors})},z=ge=>{s.errors=ge,R.state.next({errors:s.errors,isValid:!1})},W=(ge,Me,_,q)=>{const X=jt(o,ge);if(X){const oe=jt(h,ge,_r(_)?jt(u,ge):_);_r(oe)||q&&q.defaultChecked||Me?dr(h,ge,Me?oe:r3(X._f)):He(ge,oe),m.mount&&!m.action&&F()}},ae=(ge,Me,_,q,X)=>{let oe=!1,ve=!1;const Re={name:ge};if(!r.disabled){if(!_||q){(A.isDirty||k.isDirty)&&(ve=s.isDirty,s.isDirty=Re.isDirty=ie(),oe=ve!==Re.isDirty);const Je=tl(jt(u,ge),Me);ve=!!jt(s.dirtyFields,ge),Je?ms(s.dirtyFields,ge):dr(s.dirtyFields,ge,!0),Re.dirtyFields=s.dirtyFields,oe=oe||(A.dirtyFields||k.dirtyFields)&&ve!==!Je}if(_){const Je=jt(s.touchedFields,ge);Je||(dr(s.touchedFields,ge,_),Re.touchedFields=s.touchedFields,oe=oe||(A.touchedFields||k.touchedFields)&&Je!==_)}oe&&X&&R.state.next(Re)}return oe?Re:{}},Q=(ge,Me,_,q)=>{const X=jt(s.errors,ge),oe=(A.isValid||k.isValid)&&Pa(Me)&&s.isValid!==Me;if(r.delayError&&_?(b=I(()=>K(ge,_)),b(r.delayError)):(clearTimeout(w),b=null,_?dr(s.errors,ge,_):ms(s.errors,ge)),(_?!tl(X,_):X)||!Bi(q)||oe){const ve={...q,...oe&&Pa(Me)?{isValid:Me}:{},errors:s.errors,name:ge};s={...s,...ve},R.state.next(ve)}},te=async ge=>(H(ge,!0),await r.resolver(h,r.context,gpe(ge||g.mount,o,r.criteriaMode,r.shouldUseNativeValidation))),de=async ge=>{const{errors:Me}=await te(ge);if(H(ge),ge)for(const _ of ge){const q=jt(Me,_);q?dr(s.errors,_,q):ms(s.errors,_)}else s.errors=Me;return Me},je=async(ge,Me,_={valid:!0})=>{for(const q in ge){const X=ge[q];if(X){const{_f:oe,...ve}=X;if(oe){const Re=g.array.has(oe.name),Je=X._f&&ype(X._f);Je&&A.validatingFields&&H([oe.name],!0);const Tt=await c3(X,g.disabled,h,M,r.shouldUseNativeValidation&&!Me,Re);if(Je&&A.validatingFields&&H([oe.name]),Tt[oe.name]&&(_.valid=!1,Me||e.shouldUseNativeValidation))break;!Me&&(jt(Tt,oe.name)?Re?Epe(s.errors,Tt,oe.name):dr(s.errors,oe.name,Tt[oe.name]):ms(s.errors,oe.name))}!Bi(ve)&&await je(ve,Me,_)}}return _.valid},we=()=>{for(const ge of g.unMount){const Me=jt(o,ge);Me&&(Me._f.refs?Me._f.refs.every(_=>!ST(_)):!ST(Me._f.ref))&&at(ge)}g.unMount=new Set},ie=(ge,Me)=>!r.disabled&&(ge&&Me&&dr(h,ge,Me),!tl(Xe(),u)),Se=(ge,Me,_)=>S_(ge,g,{...m.mount?h:_r(Me)?u:Ia(ge)?{[ge]:Me}:Me},_,Me),Ae=ge=>t$(jt(m.mount?h:u,ge,r.shouldUnregister?jt(u,ge,[]):[])),He=(ge,Me,_={})=>{const q=jt(o,ge);let X=Me;if(q){const oe=q._f;oe&&(!oe.disabled&&dr(h,ge,d6(Me,oe)),X=rC(oe.ref)&&ma(Me)?"":Me,l6(oe.ref)?[...oe.ref.options].forEach(ve=>ve.selected=X.includes(ve.value)):oe.refs?bw(oe.ref)?oe.refs.forEach(ve=>{(!ve.defaultChecked||!ve.disabled)&&(Array.isArray(X)?ve.checked=!!X.find(Re=>Re===ve.value):ve.checked=X===ve.value||!!X)}):oe.refs.forEach(ve=>ve.checked=ve.value===X):a$(oe.ref)?oe.ref.value="":(oe.ref.value=X,oe.ref.type||R.state.next({name:ge,values:fs(h)})))}(_.shouldDirty||_.shouldTouch)&&ae(ge,X,_.shouldTouch,_.shouldDirty,!0),_.shouldValidate&&me(ge)},ue=(ge,Me,_)=>{for(const q in Me){if(!Me.hasOwnProperty(q))return;const X=Me[q],oe=ge+"."+q,ve=jt(o,oe);(g.array.has(ge)||vs(X)||ve&&!ve._f)&&!Cp(X)?ue(oe,X,_):He(oe,X,_)}},ne=(ge,Me,_={})=>{const q=jt(o,ge),X=g.array.has(ge),oe=fs(Me);dr(h,ge,oe),X?(R.array.next({name:ge,values:fs(h)}),(A.isDirty||A.dirtyFields||k.isDirty||k.dirtyFields)&&_.shouldDirty&&R.state.next({name:ge,dirtyFields:tg(u,h),isDirty:ie(ge,oe)})):q&&!q._f&&!ma(oe)?ue(ge,oe,_):He(ge,oe,_),a3(ge,g)?R.state.next({...s,name:ge,values:fs(h)}):R.state.next({name:m.mount?ge:void 0,values:fs(h)})},ce=async ge=>{m.mount=!0;const Me=ge.target;let _=Me.name,q=!0;const X=jt(o,_),oe=Je=>{q=Number.isNaN(Je)||Cp(Je)&&isNaN(Je.getTime())||tl(Je,jt(h,_,Je))},ve=s3(r.mode),Re=s3(r.reValidateMode);if(X){let Je,Tt;const fe=Me.type?r3(X._f):r6(ge),Ut=ge.type===nC.BLUR||ge.type===nC.FOCUS_OUT,nn=!vpe(X._f)&&!r.resolver&&!jt(s.errors,_)&&!X._f.deps||wpe(Ut,jt(s.touchedFields,_),s.isSubmitted,Re,ve),Gt=a3(_,g,Ut);dr(h,_,fe),Ut?(!Me||!Me.readOnly)&&(X._f.onBlur&&X._f.onBlur(ge),b&&b(0)):X._f.onChange&&X._f.onChange(ge);const ss=ae(_,fe,Ut),is=!Bi(ss)||Gt;if(!Ut&&R.state.next({name:_,type:ge.type,values:fs(h)}),nn)return(A.isValid||k.isValid)&&(r.mode==="onBlur"?Ut&&F():Ut||F()),is&&R.state.next({name:_,...Gt?{}:ss});if(!Ut&&Gt&&R.state.next({...s}),r.resolver){const{errors:Yi}=await te([_]);if(H([_]),oe(fe),q){const dl=o3(s.errors,o,_),ki=o3(Yi,o,dl.name||_);Je=ki.error,_=ki.name,Tt=Bi(Yi)}}else H([_],!0),Je=(await c3(X,g.disabled,h,M,r.shouldUseNativeValidation))[_],H([_]),oe(fe),q&&(Je?Tt=!1:(A.isValid||k.isValid)&&(Tt=await je(o,!0)));q&&(X._f.deps&&(!Array.isArray(X._f.deps)||X._f.deps.length>0)&&me(X._f.deps),Q(_,Tt,Je,ss))}},$e=(ge,Me)=>{if(jt(s.errors,Me)&&ge.focus)return ge.focus(),1},me=async(ge,Me={})=>{let _,q;const X=Bb(ge);if(r.resolver){const oe=await de(_r(ge)?ge:X);_=Bi(oe),q=ge?!X.some(ve=>jt(oe,ve)):_}else ge?(q=(await Promise.all(X.map(async oe=>{const ve=jt(o,oe);return await je(ve&&ve._f?{[oe]:ve}:ve)}))).every(Boolean),!(!q&&!s.isValid)&&F()):q=_=await je(o);return R.state.next({...!Ia(ge)||(A.isValid||k.isValid)&&_!==s.isValid?{}:{name:ge},...r.resolver||!ge?{isValid:_}:{},errors:s.errors}),Me.shouldFocus&&!q&&Ub(o,$e,ge?X:g.mount),q},Xe=(ge,Me)=>{let _={...m.mount?h:u};return Me&&(_=o6(Me.dirtyFields?s.dirtyFields:s.touchedFields,_)),_r(ge)?_:Ia(ge)?jt(_,ge):ge.map(q=>jt(_,q))},Oe=(ge,Me)=>({invalid:!!jt((Me||s).errors,ge),isDirty:!!jt((Me||s).dirtyFields,ge),error:jt((Me||s).errors,ge),isValidating:!!jt(s.validatingFields,ge),isTouched:!!jt((Me||s).touchedFields,ge)}),Te=ge=>{ge&&Bb(ge).forEach(Me=>ms(s.errors,Me)),R.state.next({errors:ge?s.errors:{}})},Ke=(ge,Me,_)=>{const q=(jt(o,ge,{_f:{}})._f||{}).ref,X=jt(s.errors,ge)||{},{ref:oe,message:ve,type:Re,...Je}=X;dr(s.errors,ge,{...Je,...Me,ref:q}),R.state.next({name:ge,errors:s.errors,isValid:!1}),_&&_.shouldFocus&&q&&q.focus&&q.focus()},se=(ge,Me)=>Ki(ge)?R.state.subscribe({next:_=>"values"in _&&ge(Se(void 0,Me),_)}):Se(ge,Me,!0),Ne=ge=>R.state.subscribe({next:Me=>{bpe(ge.name,Me.name,ge.exact)&&xpe(Me,ge.formState||A,On,ge.reRenderRoot)&&ge.callback({values:{...h},...s,...Me,defaultValues:u})}}).unsubscribe,Fe=ge=>(m.mount=!0,k={...k,...ge.formState},Ne({...ge,formState:{...E,...ge.formState}})),at=(ge,Me={})=>{for(const _ of ge?Bb(ge):g.mount)g.mount.delete(_),g.array.delete(_),Me.keepValue||(ms(o,_),ms(h,_)),!Me.keepError&&ms(s.errors,_),!Me.keepDirty&&ms(s.dirtyFields,_),!Me.keepTouched&&ms(s.touchedFields,_),!Me.keepIsValidating&&ms(s.validatingFields,_),!r.shouldUnregister&&!Me.keepDefaultValue&&ms(u,_);R.state.next({values:fs(h)}),R.state.next({...s,...Me.keepDirty?{isDirty:ie()}:{}}),!Me.keepIsValid&&F()},gt=({disabled:ge,name:Me})=>{(Pa(ge)&&m.mount||ge||g.disabled.has(Me))&&(ge?g.disabled.add(Me):g.disabled.delete(Me))},Ot=(ge,Me={})=>{let _=jt(o,ge);const q=Pa(Me.disabled)||Pa(r.disabled);return dr(o,ge,{..._||{},_f:{..._&&_._f?_._f:{ref:{name:ge}},name:ge,mount:!0,...Me}}),g.mount.add(ge),_?gt({disabled:Pa(Me.disabled)?Me.disabled:r.disabled,name:ge}):W(ge,!0,Me.value),{...q?{disabled:Me.disabled||r.disabled}:{},...r.progressive?{required:!!Me.required,min:hb(Me.min),max:hb(Me.max),minLength:hb(Me.minLength),maxLength:hb(Me.maxLength),pattern:hb(Me.pattern)}:{},name:ge,onChange:ce,onBlur:ce,ref:X=>{if(X){Ot(ge,Me),_=jt(o,ge);const oe=_r(X.value)&&X.querySelectorAll&&X.querySelectorAll("input,select,textarea")[0]||X,ve=hpe(oe),Re=_._f.refs||[];if(ve?Re.find(Je=>Je===oe):oe===_._f.ref)return;dr(o,ge,{_f:{..._._f,...ve?{refs:[...Re.filter(ST),oe,...Array.isArray(jt(u,ge))?[{}]:[]],ref:{type:oe.type,name:ge}}:{ref:oe}}}),W(ge,!1,void 0,oe)}else _=jt(o,ge,{}),_._f&&(_._f.mount=!1),(r.shouldUnregister||Me.shouldUnregister)&&!(s6(g.array,ge)&&m.action)&&g.unMount.add(ge)}}},Lt=()=>r.shouldFocusError&&Ub(o,$e,g.mount),Rt=ge=>{Pa(ge)&&(R.state.next({disabled:ge}),Ub(o,(Me,_)=>{const q=jt(o,_);q&&(Me.disabled=q._f.disabled||ge,Array.isArray(q._f.refs)&&q._f.refs.forEach(X=>{X.disabled=q._f.disabled||ge}))},0,!1))},Ft=(ge,Me)=>async _=>{let q;_&&(_.preventDefault&&_.preventDefault(),_.persist&&_.persist());let X=fs(h);if(R.state.next({isSubmitting:!0}),r.resolver){const{errors:oe,values:ve}=await te();H(),s.errors=oe,X=fs(ve)}else await je(o);if(g.disabled.size)for(const oe of g.disabled)ms(X,oe);if(ms(s.errors,"root"),Bi(s.errors)){R.state.next({errors:{}});try{await ge(X,_)}catch(oe){q=oe}}else Me&&await Me({...s.errors},_),Lt(),setTimeout(Lt);if(R.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Bi(s.errors)&&!q,submitCount:s.submitCount+1,errors:s.errors}),q)throw q},qe=(ge,Me={})=>{jt(o,ge)&&(_r(Me.defaultValue)?ne(ge,fs(jt(u,ge))):(ne(ge,Me.defaultValue),dr(u,ge,fs(Me.defaultValue))),Me.keepTouched||ms(s.touchedFields,ge),Me.keepDirty||(ms(s.dirtyFields,ge),s.isDirty=Me.defaultValue?ie(ge,fs(jt(u,ge))):ie()),Me.keepError||(ms(s.errors,ge),A.isValid&&F()),R.state.next({...s}))},Bt=(ge,Me={})=>{const _=ge?fs(ge):u,q=fs(_),X=Bi(ge),oe=X?u:q;if(Me.keepDefaultValues||(u=_),!Me.keepValues){if(Me.keepDirtyValues){const ve=new Set([...g.mount,...Object.keys(tg(u,h))]);for(const Re of Array.from(ve)){const Je=jt(s.dirtyFields,Re),Tt=jt(h,Re),fe=jt(oe,Re);Je&&!_r(Tt)?dr(oe,Re,Tt):!Je&&!_r(fe)&&ne(Re,fe)}}else{if(e$&&_r(ge))for(const ve of g.mount){const Re=jt(o,ve);if(Re&&Re._f){const Je=Array.isArray(Re._f.refs)?Re._f.refs[0]:Re._f.ref;if(rC(Je)){const Tt=Je.closest("form");if(Tt){Tt.reset();break}}}}if(Me.keepFieldsRef)for(const ve of g.mount)ne(ve,jt(oe,ve));else o={}}h=r.shouldUnregister?Me.keepDefaultValues?fs(u):{}:fs(oe),R.array.next({values:{...oe}}),R.state.next({values:{...oe}})}g={mount:Me.keepDirtyValues?g.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},m.mount=!A.isValid||!!Me.keepIsValid||!!Me.keepDirtyValues||!r.shouldUnregister&&!Bi(oe),m.watch=!!r.shouldUnregister,m.keepIsValid=!!Me.keepIsValid,m.action=!1,Me.keepErrors||(s.errors={}),R.state.next({submitCount:Me.keepSubmitCount?s.submitCount:0,isDirty:X?!1:Me.keepDirty?s.isDirty:!!(Me.keepDefaultValues&&!tl(ge,u)),isSubmitted:Me.keepIsSubmitted?s.isSubmitted:!1,dirtyFields:X?{}:Me.keepDirtyValues?Me.keepDefaultValues&&h?tg(u,h):s.dirtyFields:Me.keepDefaultValues&&ge?tg(u,ge):Me.keepDirty?s.dirtyFields:{},touchedFields:Me.keepTouched?s.touchedFields:{},errors:Me.keepErrors?s.errors:{},isSubmitSuccessful:Me.keepIsSubmitSuccessful?s.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:u})},kt=(ge,Me)=>Bt(Ki(ge)?ge(h):ge,{...r.resetOptions,...Me}),G=(ge,Me={})=>{const _=jt(o,ge),q=_&&_._f;if(q){const X=q.refs?q.refs[0]:q.ref;X.focus&&setTimeout(()=>{X.focus(),Me.shouldSelect&&Ki(X.select)&&X.select()})}},On=ge=>{s={...s,...ge}},Oi={control:{register:Ot,unregister:at,getFieldState:Oe,handleSubmit:Ft,setError:Ke,_subscribe:Ne,_runSchema:te,_updateIsValidating:H,_focusError:Lt,_getWatch:Se,_getDirty:ie,_setValid:F,_setFieldArray:V,_setDisabledField:gt,_setErrors:z,_getFieldArray:Ae,_reset:Bt,_resetDefaultValues:()=>Ki(r.defaultValues)&&r.defaultValues().then(ge=>{kt(ge,r.resetOptions),R.state.next({isLoading:!1})}),_removeUnmounted:we,_disableForm:Rt,_subjects:R,_proxyFormState:A,get _fields(){return o},get _formValues(){return h},get _state(){return m},set _state(ge){m=ge},get _defaultValues(){return u},get _names(){return g},set _names(ge){g=ge},get _formState(){return s},get _options(){return r},set _options(ge){r={...r,...ge}}},subscribe:Fe,trigger:me,register:Ot,handleSubmit:Ft,watch:se,setValue:ne,getValues:Xe,reset:kt,resetField:qe,clearErrors:Te,unregister:at,setError:Ke,setFocus:G,getFieldState:Oe};return{...Oi,formControl:Oi}}function hr(e={}){const r=et.useRef(void 0),s=et.useRef(void 0),[o,u]=et.useState({isDirty:!1,isValidating:!1,isLoading:Ki(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ki(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:o},e.defaultValues&&!Ki(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:m,...g}=Cpe(e);r.current={...g,formState:o}}const h=r.current.control;return h._options=e,s$(()=>{const m=h._subscribe({formState:h._proxyFormState,callback:()=>u({...h._formState}),reRenderRoot:!0});return u(g=>({...g,isReady:!0})),h._formState.isReady=!0,m},[h]),et.useEffect(()=>h._disableForm(e.disabled),[h,e.disabled]),et.useEffect(()=>{e.mode&&(h._options.mode=e.mode),e.reValidateMode&&(h._options.reValidateMode=e.reValidateMode)},[h,e.mode,e.reValidateMode]),et.useEffect(()=>{e.errors&&(h._setErrors(e.errors),h._focusError())},[h,e.errors]),et.useEffect(()=>{e.shouldUnregister&&h._subjects.state.next({values:h._getWatch()})},[h,e.shouldUnregister]),et.useEffect(()=>{if(h._proxyFormState.isDirty){const m=h._getDirty();m!==o.isDirty&&h._subjects.state.next({isDirty:m})}},[h,o.isDirty]),et.useEffect(()=>{var m;e.values&&!tl(e.values,s.current)?(h._reset(e.values,{keepFieldsRef:!0,...h._options.resetOptions}),!((m=h._options.resetOptions)===null||m===void 0)&&m.keepIsValid||h._setValid(),s.current=e.values,u(g=>({...g}))):h._resetDefaultValues()},[h,e.values]),et.useEffect(()=>{h._state.mount||(h._setValid(),h._state.mount=!0),h._state.watch&&(h._state.watch=!1,h._subjects.state.next({...h._formState})),h._removeUnmounted()}),r.current.formState=i6(o,h),r.current}const u3=(e,r,s)=>{if(e&&"reportValidity"in e){const o=jt(s,r);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},C_=(e,r)=>{for(const s in r.fields){const o=r.fields[s];o&&o.ref&&"reportValidity"in o.ref?u3(o.ref,s,e):o&&o.refs&&o.refs.forEach(u=>u3(u,s,e))}},d3=(e,r)=>{r.shouldUseNativeValidation&&C_(e,r);const s={};for(const o in e){const u=jt(r.fields,o),h=Object.assign(e[o]||{},{ref:u&&u.ref});if(Ape(r.names||Object.keys(e),o)){const m=Object.assign({},jt(s,o));dr(m,"root",h),dr(s,o,m)}else dr(s,o,h)}return s},Ape=(e,r)=>{const s=h3(r);return e.some(o=>h3(o).match(`^${s}\\.\\d+`))};function h3(e){return e.replace(/\]|\[/g,"")}function it(e,r,s){function o(g,b){if(g._zod||Object.defineProperty(g,"_zod",{value:{def:b,constr:m,traits:new Set},enumerable:!1}),g._zod.traits.has(e))return;g._zod.traits.add(e),r(g,b);const w=m.prototype,E=Object.keys(w);for(let A=0;A<E.length;A++){const k=E[A];k in g||(g[k]=w[k].bind(g))}}const u=s?.Parent??Object;class h extends u{}Object.defineProperty(h,"name",{value:e});function m(g){var b;const w=s?.Parent?new h:this;o(w,g),(b=w._zod).deferred??(b.deferred=[]);for(const E of w._zod.deferred)E();return w}return Object.defineProperty(m,"init",{value:o}),Object.defineProperty(m,Symbol.hasInstance,{value:g=>s?.Parent&&g instanceof s.Parent?!0:g?._zod?.traits?.has(e)}),Object.defineProperty(m,"name",{value:e}),m}class xg extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class p6 extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}const f6={};function Dp(e){return f6}function m6(e){const r=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,u])=>r.indexOf(+o)===-1).map(([o,u])=>u)}function A_(e,r){return typeof r=="bigint"?r.toString():r}function l$(e){return{get value(){{const r=e();return Object.defineProperty(this,"value",{value:r}),r}}}}function c$(e){return e==null}function u$(e){const r=e.startsWith("^")?1:0,s=e.endsWith("$")?e.length-1:e.length;return e.slice(r,s)}function Ope(e,r){const s=(e.toString().split(".")[1]||"").length,o=r.toString();let u=(o.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(o)){const b=o.match(/\d?e-(\d?)/);b?.[1]&&(u=Number.parseInt(b[1]))}const h=s>u?s:u,m=Number.parseInt(e.toFixed(h).replace(".","")),g=Number.parseInt(r.toFixed(h).replace(".",""));return m%g/10**h}const p3=Symbol("evaluating");function pr(e,r,s){let o;Object.defineProperty(e,r,{get(){if(o!==p3)return o===void 0&&(o=p3,o=s()),o},set(u){Object.defineProperty(e,r,{value:u})},configurable:!0})}function zp(e,r,s){Object.defineProperty(e,r,{value:s,writable:!0,enumerable:!0,configurable:!0})}function Qd(...e){const r={};for(const s of e){const o=Object.getOwnPropertyDescriptors(s);Object.assign(r,o)}return Object.defineProperties({},r)}function f3(e){return JSON.stringify(e)}function kpe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const g6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function iC(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Rpe=l$(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Qb(e){if(iC(e)===!1)return!1;const r=e.constructor;if(r===void 0||typeof r!="function")return!0;const s=r.prototype;return!(iC(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function y6(e){return Qb(e)?{...e}:Array.isArray(e)?[...e]:e}const Tpe=new Set(["string","number","symbol"]);function Og(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function eh(e,r,s){const o=new e._zod.constr(r??e._zod.def);return(!r||s?.parent)&&(o._zod.parent=e),o}function Jt(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function _pe(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}const $pe={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Npe(e,r){const s=e._zod.def,o=s.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const h=Qd(e._zod.def,{get shape(){const m={};for(const g in r){if(!(g in s.shape))throw new Error(`Unrecognized key: "${g}"`);r[g]&&(m[g]=s.shape[g])}return zp(this,"shape",m),m},checks:[]});return eh(e,h)}function Dpe(e,r){const s=e._zod.def,o=s.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const h=Qd(e._zod.def,{get shape(){const m={...e._zod.def.shape};for(const g in r){if(!(g in s.shape))throw new Error(`Unrecognized key: "${g}"`);r[g]&&delete m[g]}return zp(this,"shape",m),m},checks:[]});return eh(e,h)}function Ppe(e,r){if(!Qb(r))throw new Error("Invalid input to extend: expected a plain object");const s=e._zod.def.checks;if(s&&s.length>0){const h=e._zod.def.shape;for(const m in r)if(Object.getOwnPropertyDescriptor(h,m)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const u=Qd(e._zod.def,{get shape(){const h={...e._zod.def.shape,...r};return zp(this,"shape",h),h}});return eh(e,u)}function Mpe(e,r){if(!Qb(r))throw new Error("Invalid input to safeExtend: expected a plain object");const s=Qd(e._zod.def,{get shape(){const o={...e._zod.def.shape,...r};return zp(this,"shape",o),o}});return eh(e,s)}function Ipe(e,r){const s=Qd(e._zod.def,{get shape(){const o={...e._zod.def.shape,...r._zod.def.shape};return zp(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:[]});return eh(e,s)}function zpe(e,r,s){const u=r._zod.def.checks;if(u&&u.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const m=Qd(r._zod.def,{get shape(){const g=r._zod.def.shape,b={...g};if(s)for(const w in s){if(!(w in g))throw new Error(`Unrecognized key: "${w}"`);s[w]&&(b[w]=e?new e({type:"optional",innerType:g[w]}):g[w])}else for(const w in g)b[w]=e?new e({type:"optional",innerType:g[w]}):g[w];return zp(this,"shape",b),b},checks:[]});return eh(r,m)}function Lpe(e,r,s){const o=Qd(r._zod.def,{get shape(){const u=r._zod.def.shape,h={...u};if(s)for(const m in s){if(!(m in h))throw new Error(`Unrecognized key: "${m}"`);s[m]&&(h[m]=new e({type:"nonoptional",innerType:u[m]}))}else for(const m in u)h[m]=new e({type:"nonoptional",innerType:u[m]});return zp(this,"shape",h),h}});return eh(r,o)}function fg(e,r=0){if(e.aborted===!0)return!0;for(let s=r;s<e.issues.length;s++)if(e.issues[s]?.continue!==!0)return!0;return!1}function v6(e,r){return r.map(s=>{var o;return(o=s).path??(o.path=[]),s.path.unshift(e),s})}function fj(e){return typeof e=="string"?e:e?.message}function Pp(e,r,s){const o={...e,path:e.path??[]};if(!e.message){const u=fj(e.inst?._zod.def?.error?.(e))??fj(r?.error?.(e))??fj(s.customError?.(e))??fj(s.localeError?.(e))??"Invalid input";o.message=u}return delete o.inst,delete o.continue,r?.reportInput||delete o.input,o}function d$(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ew(...e){const[r,s,o]=e;return typeof r=="string"?{message:r,code:"custom",input:s,inst:o}:{...r}}const x6=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,A_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},h$=it("$ZodError",x6),ZC=it("$ZodError",x6,{Parent:Error});function Fpe(e,r=s=>s.message){const s={},o=[];for(const u of e.issues)u.path.length>0?(s[u.path[0]]=s[u.path[0]]||[],s[u.path[0]].push(r(u))):o.push(r(u));return{formErrors:o,fieldErrors:s}}function qpe(e,r=s=>s.message){const s={_errors:[]},o=u=>{for(const h of u.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map(m=>o({issues:m}));else if(h.code==="invalid_key")o({issues:h.issues});else if(h.code==="invalid_element")o({issues:h.issues});else if(h.path.length===0)s._errors.push(r(h));else{let m=s,g=0;for(;g<h.path.length;){const b=h.path[g];g===h.path.length-1?(m[b]=m[b]||{_errors:[]},m[b]._errors.push(r(h))):m[b]=m[b]||{_errors:[]},m=m[b],g++}}};return o(e),s}const JC=e=>(r,s,o,u)=>{const h=o?Object.assign(o,{async:!1}):{async:!1},m=r._zod.run({value:s,issues:[]},h);if(m instanceof Promise)throw new xg;if(m.issues.length){const g=new(u?.Err??e)(m.issues.map(b=>Pp(b,h,Dp())));throw g6(g,u?.callee),g}return m.value},Bpe=JC(ZC),WC=e=>async(r,s,o,u)=>{const h=o?Object.assign(o,{async:!0}):{async:!0};let m=r._zod.run({value:s,issues:[]},h);if(m instanceof Promise&&(m=await m),m.issues.length){const g=new(u?.Err??e)(m.issues.map(b=>Pp(b,h,Dp())));throw g6(g,u?.callee),g}return m.value},Upe=WC(ZC),QC=e=>(r,s,o)=>{const u=o?{...o,async:!1}:{async:!1},h=r._zod.run({value:s,issues:[]},u);if(h instanceof Promise)throw new xg;return h.issues.length?{success:!1,error:new(e??h$)(h.issues.map(m=>Pp(m,u,Dp())))}:{success:!0,data:h.value}},Kpe=QC(ZC),eA=e=>async(r,s,o)=>{const u=o?Object.assign(o,{async:!0}):{async:!0};let h=r._zod.run({value:s,issues:[]},u);return h instanceof Promise&&(h=await h),h.issues.length?{success:!1,error:new e(h.issues.map(m=>Pp(m,u,Dp())))}:{success:!0,data:h.value}},Vpe=eA(ZC),Hpe=e=>(r,s,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return JC(e)(r,s,u)},Gpe=e=>(r,s,o)=>JC(e)(r,s,o),Xpe=e=>async(r,s,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return WC(e)(r,s,u)},Ype=e=>async(r,s,o)=>WC(e)(r,s,o),Zpe=e=>(r,s,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return QC(e)(r,s,u)},Jpe=e=>(r,s,o)=>QC(e)(r,s,o),Wpe=e=>async(r,s,o)=>{const u=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return eA(e)(r,s,u)},Qpe=e=>async(r,s,o)=>eA(e)(r,s,o),efe=/^[cC][^\s-]{8,}$/,tfe=/^[0-9a-z]+$/,nfe=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,rfe=/^[0-9a-vA-V]{20}$/,sfe=/^[A-Za-z0-9]{27}$/,ife=/^[a-zA-Z0-9_-]{21}$/,afe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ofe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,m3=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,lfe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cfe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ufe(){return new RegExp(cfe,"u")}const dfe=/^(?:(?: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])$/,hfe=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,pfe=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,ffe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mfe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,b6=/^[A-Za-z0-9_-]*$/,gfe=/^\+[1-9]\d{6,14}$/,w6="(?:(?:\\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])))",yfe=new RegExp(`^${w6}$`);function S6(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function vfe(e){return new RegExp(`^${S6(e)}$`)}function xfe(e){const r=S6({precision:e.precision}),s=["Z"];e.local&&s.push(""),e.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${r}(?:${s.join("|")})`;return new RegExp(`^${w6}T(?:${o})$`)}const bfe=e=>{const r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},wfe=/^-?\d+$/,Sfe=/^-?\d+(?:\.\d+)?$/,Efe=/^[^A-Z]*$/,jfe=/^[^a-z]*$/,xa=it("$ZodCheck",(e,r)=>{var s;e._zod??(e._zod={}),e._zod.def=r,(s=e._zod).onattach??(s.onattach=[])}),E6={number:"number",bigint:"bigint",object:"date"},j6=it("$ZodCheckLessThan",(e,r)=>{xa.init(e,r);const s=E6[typeof r.value];e._zod.onattach.push(o=>{const u=o._zod.bag,h=(r.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<h&&(r.inclusive?u.maximum=r.value:u.exclusiveMaximum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:s,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),C6=it("$ZodCheckGreaterThan",(e,r)=>{xa.init(e,r);const s=E6[typeof r.value];e._zod.onattach.push(o=>{const u=o._zod.bag,h=(r.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>h&&(r.inclusive?u.minimum=r.value:u.exclusiveMinimum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:s,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Cfe=it("$ZodCheckMultipleOf",(e,r)=>{xa.init(e,r),e._zod.onattach.push(s=>{var o;(o=s._zod.bag).multipleOf??(o.multipleOf=r.value)}),e._zod.check=s=>{if(typeof s.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?s.value%r.value===BigInt(0):Ope(s.value,r.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:r.value,input:s.value,inst:e,continue:!r.abort})}}),Afe=it("$ZodCheckNumberFormat",(e,r)=>{xa.init(e,r),r.format=r.format||"float64";const s=r.format?.includes("int"),o=s?"int":"number",[u,h]=$pe[r.format];e._zod.onattach.push(m=>{const g=m._zod.bag;g.format=r.format,g.minimum=u,g.maximum=h,s&&(g.pattern=wfe)}),e._zod.check=m=>{const g=m.value;if(s){if(!Number.isInteger(g)){m.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:g,inst:e});return}if(!Number.isSafeInteger(g)){g>0?m.issues.push({input:g,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!r.abort}):m.issues.push({input:g,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!r.abort});return}}g<u&&m.issues.push({origin:"number",input:g,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!r.abort}),g>h&&m.issues.push({origin:"number",input:g,code:"too_big",maximum:h,inclusive:!0,inst:e,continue:!r.abort})}}),Ofe=it("$ZodCheckMaxLength",(e,r)=>{var s;xa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const u=o.value;return!c$(u)&&u.length!==void 0}),e._zod.onattach.push(o=>{const u=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<u&&(o._zod.bag.maximum=r.maximum)}),e._zod.check=o=>{const u=o.value;if(u.length<=r.maximum)return;const m=d$(u);o.issues.push({origin:m,code:"too_big",maximum:r.maximum,inclusive:!0,input:u,inst:e,continue:!r.abort})}}),kfe=it("$ZodCheckMinLength",(e,r)=>{var s;xa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const u=o.value;return!c$(u)&&u.length!==void 0}),e._zod.onattach.push(o=>{const u=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>u&&(o._zod.bag.minimum=r.minimum)}),e._zod.check=o=>{const u=o.value;if(u.length>=r.minimum)return;const m=d$(u);o.issues.push({origin:m,code:"too_small",minimum:r.minimum,inclusive:!0,input:u,inst:e,continue:!r.abort})}}),Rfe=it("$ZodCheckLengthEquals",(e,r)=>{var s;xa.init(e,r),(s=e._zod.def).when??(s.when=o=>{const u=o.value;return!c$(u)&&u.length!==void 0}),e._zod.onattach.push(o=>{const u=o._zod.bag;u.minimum=r.length,u.maximum=r.length,u.length=r.length}),e._zod.check=o=>{const u=o.value,h=u.length;if(h===r.length)return;const m=d$(u),g=h>r.length;o.issues.push({origin:m,...g?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),tA=it("$ZodCheckStringFormat",(e,r)=>{var s,o;xa.init(e,r),e._zod.onattach.push(u=>{const h=u._zod.bag;h.format=r.format,r.pattern&&(h.patterns??(h.patterns=new Set),h.patterns.add(r.pattern))}),r.pattern?(s=e._zod).check??(s.check=u=>{r.pattern.lastIndex=0,!r.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:r.format,input:u.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(o=e._zod).check??(o.check=()=>{})}),Tfe=it("$ZodCheckRegex",(e,r)=>{tA.init(e,r),e._zod.check=s=>{r.pattern.lastIndex=0,!r.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),_fe=it("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=Efe),tA.init(e,r)}),$fe=it("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=jfe),tA.init(e,r)}),Nfe=it("$ZodCheckIncludes",(e,r)=>{xa.init(e,r);const s=Og(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${s}`:s);r.pattern=o,e._zod.onattach.push(u=>{const h=u._zod.bag;h.patterns??(h.patterns=new Set),h.patterns.add(o)}),e._zod.check=u=>{u.value.includes(r.includes,r.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:u.value,inst:e,continue:!r.abort})}}),Dfe=it("$ZodCheckStartsWith",(e,r)=>{xa.init(e,r);const s=new RegExp(`^${Og(r.prefix)}.*`);r.pattern??(r.pattern=s),e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(s)}),e._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:e,continue:!r.abort})}}),Pfe=it("$ZodCheckEndsWith",(e,r)=>{xa.init(e,r);const s=new RegExp(`.*${Og(r.suffix)}$`);r.pattern??(r.pattern=s),e._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(s)}),e._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:e,continue:!r.abort})}}),Mfe=it("$ZodCheckOverwrite",(e,r)=>{xa.init(e,r),e._zod.check=s=>{s.value=r.tx(s.value)}});class Ife{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const o=r.split(`
|
||
`).filter(m=>m),u=Math.min(...o.map(m=>m.length-m.trimStart().length)),h=o.map(m=>m.slice(u)).map(m=>" ".repeat(this.indent*2)+m);for(const m of h)this.content.push(m)}compile(){const r=Function,s=this?.args,u=[...(this?.content??[""]).map(h=>` ${h}`)];return new r(...s,u.join(`
|
||
`))}}const zfe={major:4,minor:3,patch:5},Gr=it("$ZodType",(e,r)=>{var s;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=zfe;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const u of o)for(const h of u._zod.onattach)h(e);if(o.length===0)(s=e._zod).deferred??(s.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const u=(m,g,b)=>{let w=fg(m),E;for(const A of g){if(A._zod.def.when){if(!A._zod.def.when(m))continue}else if(w)continue;const k=m.issues.length,R=A._zod.check(m);if(R instanceof Promise&&b?.async===!1)throw new xg;if(E||R instanceof Promise)E=(E??Promise.resolve()).then(async()=>{await R,m.issues.length!==k&&(w||(w=fg(m,k)))});else{if(m.issues.length===k)continue;w||(w=fg(m,k))}}return E?E.then(()=>m):m},h=(m,g,b)=>{if(fg(m))return m.aborted=!0,m;const w=u(g,o,b);if(w instanceof Promise){if(b.async===!1)throw new xg;return w.then(E=>e._zod.parse(E,b))}return e._zod.parse(w,b)};e._zod.run=(m,g)=>{if(g.skipChecks)return e._zod.parse(m,g);if(g.direction==="backward"){const w=e._zod.parse({value:m.value,issues:[]},{...g,skipChecks:!0});return w instanceof Promise?w.then(E=>h(E,m,g)):h(w,m,g)}const b=e._zod.parse(m,g);if(b instanceof Promise){if(g.async===!1)throw new xg;return b.then(w=>u(w,o,g))}return u(b,o,g)}}pr(e,"~standard",()=>({validate:u=>{try{const h=Kpe(e,u);return h.success?{value:h.data}:{issues:h.error?.issues}}catch{return Vpe(e,u).then(m=>m.success?{value:m.data}:{issues:m.error?.issues})}},vendor:"zod",version:1}))}),p$=it("$ZodString",(e,r)=>{Gr.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??bfe(e._zod.bag),e._zod.parse=(s,o)=>{if(r.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:e}),s}}),Nr=it("$ZodStringFormat",(e,r)=>{tA.init(e,r),p$.init(e,r)}),Lfe=it("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=ofe),Nr.init(e,r)}),Ffe=it("$ZodUUID",(e,r)=>{if(r.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=m3(o))}else r.pattern??(r.pattern=m3());Nr.init(e,r)}),qfe=it("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=lfe),Nr.init(e,r)}),Bfe=it("$ZodURL",(e,r)=>{Nr.init(e,r),e._zod.check=s=>{try{const o=s.value.trim(),u=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(u.hostname)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:s.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.protocol)||s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:s.value,inst:e,continue:!r.abort})),r.normalize?s.value=u.href:s.value=o;return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:e,continue:!r.abort})}}}),Ufe=it("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=ufe()),Nr.init(e,r)}),Kfe=it("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=ife),Nr.init(e,r)}),Vfe=it("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=efe),Nr.init(e,r)}),Hfe=it("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=tfe),Nr.init(e,r)}),Gfe=it("$ZodULID",(e,r)=>{r.pattern??(r.pattern=nfe),Nr.init(e,r)}),Xfe=it("$ZodXID",(e,r)=>{r.pattern??(r.pattern=rfe),Nr.init(e,r)}),Yfe=it("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=sfe),Nr.init(e,r)}),Zfe=it("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=xfe(r)),Nr.init(e,r)}),Jfe=it("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=yfe),Nr.init(e,r)}),Wfe=it("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=vfe(r)),Nr.init(e,r)}),Qfe=it("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=afe),Nr.init(e,r)}),eme=it("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=dfe),Nr.init(e,r),e._zod.bag.format="ipv4"}),tme=it("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=hfe),Nr.init(e,r),e._zod.bag.format="ipv6",e._zod.check=s=>{try{new URL(`http://[${s.value}]`)}catch{s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:e,continue:!r.abort})}}}),nme=it("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=pfe),Nr.init(e,r)}),rme=it("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=ffe),Nr.init(e,r),e._zod.check=s=>{const o=s.value.split("/");try{if(o.length!==2)throw new Error;const[u,h]=o;if(!h)throw new Error;const m=Number(h);if(`${m}`!==h)throw new Error;if(m<0||m>128)throw new Error;new URL(`http://[${u}]`)}catch{s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:e,continue:!r.abort})}}});function A6(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const sme=it("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=mfe),Nr.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=s=>{A6(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:e,continue:!r.abort})}});function ime(e){if(!b6.test(e))return!1;const r=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),s=r.padEnd(Math.ceil(r.length/4)*4,"=");return A6(s)}const ame=it("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=b6),Nr.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=s=>{ime(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:e,continue:!r.abort})}}),ome=it("$ZodE164",(e,r)=>{r.pattern??(r.pattern=gfe),Nr.init(e,r)});function lme(e,r=null){try{const s=e.split(".");if(s.length!==3)return!1;const[o]=s;if(!o)return!1;const u=JSON.parse(atob(o));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||r&&(!("alg"in u)||u.alg!==r))}catch{return!1}}const cme=it("$ZodJWT",(e,r)=>{Nr.init(e,r),e._zod.check=s=>{lme(s.value,r.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:e,continue:!r.abort})}}),O6=it("$ZodNumber",(e,r)=>{Gr.init(e,r),e._zod.pattern=e._zod.bag.pattern??Sfe,e._zod.parse=(s,o)=>{if(r.coerce)try{s.value=Number(s.value)}catch{}const u=s.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return s;const h=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return s.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...h?{received:h}:{}}),s}}),ume=it("$ZodNumberFormat",(e,r)=>{Afe.init(e,r),O6.init(e,r)}),dme=it("$ZodAny",(e,r)=>{Gr.init(e,r),e._zod.parse=s=>s}),hme=it("$ZodUnknown",(e,r)=>{Gr.init(e,r),e._zod.parse=s=>s}),pme=it("$ZodNever",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:e}),s)});function g3(e,r,s){e.issues.length&&r.issues.push(...v6(s,e.issues)),r.value[s]=e.value}const fme=it("$ZodArray",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{const u=s.value;if(!Array.isArray(u))return s.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),s;s.value=Array(u.length);const h=[];for(let m=0;m<u.length;m++){const g=u[m],b=r.element._zod.run({value:g,issues:[]},o);b instanceof Promise?h.push(b.then(w=>g3(w,s,m))):g3(b,s,m)}return h.length?Promise.all(h).then(()=>s):s}});function aC(e,r,s,o,u){if(e.issues.length){if(u&&!(s in o))return;r.issues.push(...v6(s,e.issues))}e.value===void 0?s in o&&(r.value[s]=void 0):r.value[s]=e.value}function k6(e){const r=Object.keys(e.shape);for(const o of r)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const s=_pe(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(s)}}function R6(e,r,s,o,u,h){const m=[],g=u.keySet,b=u.catchall._zod,w=b.def.type,E=b.optout==="optional";for(const A in r){if(g.has(A))continue;if(w==="never"){m.push(A);continue}const k=b.run({value:r[A],issues:[]},o);k instanceof Promise?e.push(k.then(R=>aC(R,s,A,r,E))):aC(k,s,A,r,E)}return m.length&&s.issues.push({code:"unrecognized_keys",keys:m,input:r,inst:h}),e.length?Promise.all(e).then(()=>s):s}const mme=it("$ZodObject",(e,r)=>{if(Gr.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){const g=r.shape;Object.defineProperty(r,"shape",{get:()=>{const b={...g};return Object.defineProperty(r,"shape",{value:b}),b}})}const o=l$(()=>k6(r));pr(e._zod,"propValues",()=>{const g=r.shape,b={};for(const w in g){const E=g[w]._zod;if(E.values){b[w]??(b[w]=new Set);for(const A of E.values)b[w].add(A)}}return b});const u=iC,h=r.catchall;let m;e._zod.parse=(g,b)=>{m??(m=o.value);const w=g.value;if(!u(w))return g.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),g;g.value={};const E=[],A=m.shape;for(const k of m.keys){const R=A[k],M=R._zod.optout==="optional",I=R._zod.run({value:w[k],issues:[]},b);I instanceof Promise?E.push(I.then(F=>aC(F,g,k,w,M))):aC(I,g,k,w,M)}return h?R6(E,w,g,b,o.value,e):E.length?Promise.all(E).then(()=>g):g}}),gme=it("$ZodObjectJIT",(e,r)=>{mme.init(e,r);const s=e._zod.parse,o=l$(()=>k6(r)),u=k=>{const R=new Ife(["shape","payload","ctx"]),M=o.value,I=K=>{const z=f3(K);return`shape[${z}]._zod.run({ value: input[${z}], issues: [] }, ctx)`};R.write("const input = payload.value;");const F=Object.create(null);let H=0;for(const K of M.keys)F[K]=`key_${H++}`;R.write("const newResult = {};");for(const K of M.keys){const z=F[K],W=f3(K),Q=k[K]?._zod?.optout==="optional";R.write(`const ${z} = ${I(K)};`),Q?R.write(`
|
||
if (${z}.issues.length) {
|
||
if (${W} in input) {
|
||
payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
|
||
...iss,
|
||
path: iss.path ? [${W}, ...iss.path] : [${W}]
|
||
})));
|
||
}
|
||
}
|
||
|
||
if (${z}.value === undefined) {
|
||
if (${W} in input) {
|
||
newResult[${W}] = undefined;
|
||
}
|
||
} else {
|
||
newResult[${W}] = ${z}.value;
|
||
}
|
||
|
||
`):R.write(`
|
||
if (${z}.issues.length) {
|
||
payload.issues = payload.issues.concat(${z}.issues.map(iss => ({
|
||
...iss,
|
||
path: iss.path ? [${W}, ...iss.path] : [${W}]
|
||
})));
|
||
}
|
||
|
||
if (${z}.value === undefined) {
|
||
if (${W} in input) {
|
||
newResult[${W}] = undefined;
|
||
}
|
||
} else {
|
||
newResult[${W}] = ${z}.value;
|
||
}
|
||
|
||
`)}R.write("payload.value = newResult;"),R.write("return payload;");const V=R.compile();return(K,z)=>V(k,K,z)};let h;const m=iC,g=!f6.jitless,w=g&&Rpe.value,E=r.catchall;let A;e._zod.parse=(k,R)=>{A??(A=o.value);const M=k.value;return m(M)?g&&w&&R?.async===!1&&R.jitless!==!0?(h||(h=u(r.shape)),k=h(k,R),E?R6([],M,k,R,A,e):k):s(k,R):(k.issues.push({expected:"object",code:"invalid_type",input:M,inst:e}),k)}});function y3(e,r,s,o){for(const h of e)if(h.issues.length===0)return r.value=h.value,r;const u=e.filter(h=>!fg(h));return u.length===1?(r.value=u[0].value,u[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:s,errors:e.map(h=>h.issues.map(m=>Pp(m,o,Dp())))}),r)}const yme=it("$ZodUnion",(e,r)=>{Gr.init(e,r),pr(e._zod,"optin",()=>r.options.some(u=>u._zod.optin==="optional")?"optional":void 0),pr(e._zod,"optout",()=>r.options.some(u=>u._zod.optout==="optional")?"optional":void 0),pr(e._zod,"values",()=>{if(r.options.every(u=>u._zod.values))return new Set(r.options.flatMap(u=>Array.from(u._zod.values)))}),pr(e._zod,"pattern",()=>{if(r.options.every(u=>u._zod.pattern)){const u=r.options.map(h=>h._zod.pattern);return new RegExp(`^(${u.map(h=>u$(h.source)).join("|")})$`)}});const s=r.options.length===1,o=r.options[0]._zod.run;e._zod.parse=(u,h)=>{if(s)return o(u,h);let m=!1;const g=[];for(const b of r.options){const w=b._zod.run({value:u.value,issues:[]},h);if(w instanceof Promise)g.push(w),m=!0;else{if(w.issues.length===0)return w;g.push(w)}}return m?Promise.all(g).then(b=>y3(b,u,e,h)):y3(g,u,e,h)}}),vme=it("$ZodIntersection",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{const u=s.value,h=r.left._zod.run({value:u,issues:[]},o),m=r.right._zod.run({value:u,issues:[]},o);return h instanceof Promise||m instanceof Promise?Promise.all([h,m]).then(([b,w])=>v3(s,b,w)):v3(s,h,m)}});function O_(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(Qb(e)&&Qb(r)){const s=Object.keys(r),o=Object.keys(e).filter(h=>s.indexOf(h)!==-1),u={...e,...r};for(const h of o){const m=O_(e[h],r[h]);if(!m.valid)return{valid:!1,mergeErrorPath:[h,...m.mergeErrorPath]};u[h]=m.data}return{valid:!0,data:u}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let o=0;o<e.length;o++){const u=e[o],h=r[o],m=O_(u,h);if(!m.valid)return{valid:!1,mergeErrorPath:[o,...m.mergeErrorPath]};s.push(m.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function v3(e,r,s){const o=new Map;let u;for(const g of r.issues)if(g.code==="unrecognized_keys"){u??(u=g);for(const b of g.keys)o.has(b)||o.set(b,{}),o.get(b).l=!0}else e.issues.push(g);for(const g of s.issues)if(g.code==="unrecognized_keys")for(const b of g.keys)o.has(b)||o.set(b,{}),o.get(b).r=!0;else e.issues.push(g);const h=[...o].filter(([,g])=>g.l&&g.r).map(([g])=>g);if(h.length&&u&&e.issues.push({...u,keys:h}),fg(e))return e;const m=O_(r.value,s.value);if(!m.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`);return e.value=m.data,e}const xme=it("$ZodEnum",(e,r)=>{Gr.init(e,r);const s=m6(r.entries),o=new Set(s);e._zod.values=o,e._zod.pattern=new RegExp(`^(${s.filter(u=>Tpe.has(typeof u)).map(u=>typeof u=="string"?Og(u):u.toString()).join("|")})$`),e._zod.parse=(u,h)=>{const m=u.value;return o.has(m)||u.issues.push({code:"invalid_value",values:s,input:m,inst:e}),u}}),bme=it("$ZodLiteral",(e,r)=>{if(Gr.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");const s=new Set(r.values);e._zod.values=s,e._zod.pattern=new RegExp(`^(${r.values.map(o=>typeof o=="string"?Og(o):o?Og(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,u)=>{const h=o.value;return s.has(h)||o.issues.push({code:"invalid_value",values:r.values,input:h,inst:e}),o}}),wme=it("$ZodTransform",(e,r)=>{Gr.init(e,r),e._zod.parse=(s,o)=>{if(o.direction==="backward")throw new p6(e.constructor.name);const u=r.transform(s.value,s);if(o.async)return(u instanceof Promise?u:Promise.resolve(u)).then(m=>(s.value=m,s));if(u instanceof Promise)throw new xg;return s.value=u,s}});function x3(e,r){return e.issues.length&&r===void 0?{issues:[],value:void 0}:e}const T6=it("$ZodOptional",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",e._zod.optout="optional",pr(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),pr(e._zod,"pattern",()=>{const s=r.innerType._zod.pattern;return s?new RegExp(`^(${u$(s.source)})?$`):void 0}),e._zod.parse=(s,o)=>{if(r.innerType._zod.optin==="optional"){const u=r.innerType._zod.run(s,o);return u instanceof Promise?u.then(h=>x3(h,s.value)):x3(u,s.value)}return s.value===void 0?s:r.innerType._zod.run(s,o)}}),Sme=it("$ZodExactOptional",(e,r)=>{T6.init(e,r),pr(e._zod,"values",()=>r.innerType._zod.values),pr(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(s,o)=>r.innerType._zod.run(s,o)}),Eme=it("$ZodNullable",(e,r)=>{Gr.init(e,r),pr(e._zod,"optin",()=>r.innerType._zod.optin),pr(e._zod,"optout",()=>r.innerType._zod.optout),pr(e._zod,"pattern",()=>{const s=r.innerType._zod.pattern;return s?new RegExp(`^(${u$(s.source)}|null)$`):void 0}),pr(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(s,o)=>s.value===null?s:r.innerType._zod.run(s,o)}),jme=it("$ZodDefault",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",pr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);if(s.value===void 0)return s.value=r.defaultValue,s;const u=r.innerType._zod.run(s,o);return u instanceof Promise?u.then(h=>b3(h,r)):b3(u,r)}});function b3(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const Cme=it("$ZodPrefault",(e,r)=>{Gr.init(e,r),e._zod.optin="optional",pr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>(o.direction==="backward"||s.value===void 0&&(s.value=r.defaultValue),r.innerType._zod.run(s,o))}),Ame=it("$ZodNonOptional",(e,r)=>{Gr.init(e,r),pr(e._zod,"values",()=>{const s=r.innerType._zod.values;return s?new Set([...s].filter(o=>o!==void 0)):void 0}),e._zod.parse=(s,o)=>{const u=r.innerType._zod.run(s,o);return u instanceof Promise?u.then(h=>w3(h,e)):w3(u,e)}});function w3(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}const Ome=it("$ZodCatch",(e,r)=>{Gr.init(e,r),pr(e._zod,"optin",()=>r.innerType._zod.optin),pr(e._zod,"optout",()=>r.innerType._zod.optout),pr(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);const u=r.innerType._zod.run(s,o);return u instanceof Promise?u.then(h=>(s.value=h.value,h.issues.length&&(s.value=r.catchValue({...s,error:{issues:h.issues.map(m=>Pp(m,o,Dp()))},input:s.value}),s.issues=[]),s)):(s.value=u.value,u.issues.length&&(s.value=r.catchValue({...s,error:{issues:u.issues.map(h=>Pp(h,o,Dp()))},input:s.value}),s.issues=[]),s)}}),kme=it("$ZodPipe",(e,r)=>{Gr.init(e,r),pr(e._zod,"values",()=>r.in._zod.values),pr(e._zod,"optin",()=>r.in._zod.optin),pr(e._zod,"optout",()=>r.out._zod.optout),pr(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(s,o)=>{if(o.direction==="backward"){const h=r.out._zod.run(s,o);return h instanceof Promise?h.then(m=>mj(m,r.in,o)):mj(h,r.in,o)}const u=r.in._zod.run(s,o);return u instanceof Promise?u.then(h=>mj(h,r.out,o)):mj(u,r.out,o)}});function mj(e,r,s){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},s)}const Rme=it("$ZodReadonly",(e,r)=>{Gr.init(e,r),pr(e._zod,"propValues",()=>r.innerType._zod.propValues),pr(e._zod,"values",()=>r.innerType._zod.values),pr(e._zod,"optin",()=>r.innerType?._zod?.optin),pr(e._zod,"optout",()=>r.innerType?._zod?.optout),e._zod.parse=(s,o)=>{if(o.direction==="backward")return r.innerType._zod.run(s,o);const u=r.innerType._zod.run(s,o);return u instanceof Promise?u.then(S3):S3(u)}});function S3(e){return e.value=Object.freeze(e.value),e}const Tme=it("$ZodCustom",(e,r)=>{xa.init(e,r),Gr.init(e,r),e._zod.parse=(s,o)=>s,e._zod.check=s=>{const o=s.value,u=r.fn(o);if(u instanceof Promise)return u.then(h=>E3(h,s,o,e));E3(u,s,o,e)}});function E3(e,r,s,o){if(!e){const u={code:"custom",input:s,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(u.params=o._zod.def.params),r.issues.push(ew(u))}}var j3;class _me{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...s){const o=s[0];return this._map.set(r,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const s=this._map.get(r);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(r),this}get(r){const s=r._zod.parent;if(s){const o={...this.get(s)??{}};delete o.id;const u={...o,...this._map.get(r)};return Object.keys(u).length?u:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function $me(){return new _me}(j3=globalThis).__zod_globalRegistry??(j3.__zod_globalRegistry=$me());const Rb=globalThis.__zod_globalRegistry;function Nme(e,r){return new e({type:"string",...Jt(r)})}function Dme(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Jt(r)})}function C3(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Jt(r)})}function _6(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Jt(r)})}function Pme(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Jt(r)})}function Mme(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Jt(r)})}function Ime(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Jt(r)})}function zme(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Jt(r)})}function Lme(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Jt(r)})}function Fme(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Jt(r)})}function qme(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Jt(r)})}function Bme(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Jt(r)})}function Ume(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Jt(r)})}function Kme(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Jt(r)})}function Vme(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Jt(r)})}function Hme(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Jt(r)})}function Gme(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Jt(r)})}function Xme(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Jt(r)})}function Yme(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Jt(r)})}function Zme(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Jt(r)})}function Jme(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Jt(r)})}function Wme(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Jt(r)})}function Qme(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Jt(r)})}function ege(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Jt(r)})}function tge(e,r){return new e({type:"string",format:"date",check:"string_format",...Jt(r)})}function nge(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...Jt(r)})}function rge(e,r){return new e({type:"string",format:"duration",check:"string_format",...Jt(r)})}function sge(e,r){return new e({type:"number",checks:[],...Jt(r)})}function ige(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Jt(r)})}function age(e){return new e({type:"any"})}function oge(e){return new e({type:"unknown"})}function lge(e,r){return new e({type:"never",...Jt(r)})}function A3(e,r){return new j6({check:"less_than",...Jt(r),value:e,inclusive:!1})}function ET(e,r){return new j6({check:"less_than",...Jt(r),value:e,inclusive:!0})}function O3(e,r){return new C6({check:"greater_than",...Jt(r),value:e,inclusive:!1})}function jT(e,r){return new C6({check:"greater_than",...Jt(r),value:e,inclusive:!0})}function k3(e,r){return new Cfe({check:"multiple_of",...Jt(r),value:e})}function $6(e,r){return new Ofe({check:"max_length",...Jt(r),maximum:e})}function oC(e,r){return new kfe({check:"min_length",...Jt(r),minimum:e})}function N6(e,r){return new Rfe({check:"length_equals",...Jt(r),length:e})}function cge(e,r){return new Tfe({check:"string_format",format:"regex",...Jt(r),pattern:e})}function uge(e){return new _fe({check:"string_format",format:"lowercase",...Jt(e)})}function dge(e){return new $fe({check:"string_format",format:"uppercase",...Jt(e)})}function hge(e,r){return new Nfe({check:"string_format",format:"includes",...Jt(r),includes:e})}function pge(e,r){return new Dfe({check:"string_format",format:"starts_with",...Jt(r),prefix:e})}function fge(e,r){return new Pfe({check:"string_format",format:"ends_with",...Jt(r),suffix:e})}function qg(e){return new Mfe({check:"overwrite",tx:e})}function mge(e){return qg(r=>r.normalize(e))}function gge(){return qg(e=>e.trim())}function yge(){return qg(e=>e.toLowerCase())}function vge(){return qg(e=>e.toUpperCase())}function xge(){return qg(e=>kpe(e))}function bge(e,r,s){return new e({type:"array",element:r,...Jt(s)})}function wge(e,r,s){return new e({type:"custom",check:"custom",fn:r,...Jt(s)})}function Sge(e){const r=Ege(s=>(s.addIssue=o=>{if(typeof o=="string")s.issues.push(ew(o,s.value,r._zod.def));else{const u=o;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=s.value),u.inst??(u.inst=r),u.continue??(u.continue=!r._zod.def.abort),s.issues.push(ew(u))}},e(s.value,s)));return r}function Ege(e,r){const s=new xa({check:"custom",...Jt(r)});return s._zod.check=e,s}function D6(e){let r=e?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Rb,target:r,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Zs(e,r,s={path:[],schemaPath:[]}){var o;const u=e._zod.def,h=r.seen.get(e);if(h)return h.count++,s.schemaPath.includes(e)&&(h.cycle=s.path),h.schema;const m={schema:{},count:1,cycle:void 0,path:s.path};r.seen.set(e,m);const g=e._zod.toJSONSchema?.();if(g)m.schema=g;else{const E={...s,schemaPath:[...s.schemaPath,e],path:s.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,m.schema,E);else{const k=m.schema,R=r.processors[u.type];if(!R)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);R(e,r,k,E)}const A=e._zod.parent;A&&(m.ref||(m.ref=A),Zs(A,r,E),r.seen.get(A).isParent=!0)}const b=r.metadataRegistry.get(e);return b&&Object.assign(m.schema,b),r.io==="input"&&qi(e)&&(delete m.schema.examples,delete m.schema.default),r.io==="input"&&m.schema._prefault&&((o=m.schema).default??(o.default=m.schema._prefault)),delete m.schema._prefault,r.seen.get(e).schema}function P6(e,r){const s=e.seen.get(r);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const m of e.seen.entries()){const g=e.metadataRegistry.get(m[0])?.id;if(g){const b=o.get(g);if(b&&b!==m[0])throw new Error(`Duplicate schema id "${g}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(g,m[0])}}const u=m=>{const g=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const A=e.external.registry.get(m[0])?.id,k=e.external.uri??(M=>M);if(A)return{ref:k(A)};const R=m[1].defId??m[1].schema.id??`schema${e.counter++}`;return m[1].defId=R,{defId:R,ref:`${k("__shared")}#/${g}/${R}`}}if(m[1]===s)return{ref:"#"};const w=`#/${g}/`,E=m[1].schema.id??`__schema${e.counter++}`;return{defId:E,ref:w+E}},h=m=>{if(m[1].schema.$ref)return;const g=m[1],{ref:b,defId:w}=u(m);g.def={...g.schema},w&&(g.defId=w);const E=g.schema;for(const A in E)delete E[A];E.$ref=b};if(e.cycles==="throw")for(const m of e.seen.entries()){const g=m[1];if(g.cycle)throw new Error(`Cycle detected: #/${g.cycle?.join("/")}/<root>
|
||
|
||
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of e.seen.entries()){const g=m[1];if(r===m[0]){h(m);continue}if(e.external){const w=e.external.registry.get(m[0])?.id;if(r!==m[0]&&w){h(m);continue}}if(e.metadataRegistry.get(m[0])?.id){h(m);continue}if(g.cycle){h(m);continue}if(g.count>1&&e.reused==="ref"){h(m);continue}}}function M6(e,r){const s=e.seen.get(r);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=m=>{const g=e.seen.get(m);if(g.ref===null)return;const b=g.def??g.schema,w={...b},E=g.ref;if(g.ref=null,E){o(E);const k=e.seen.get(E),R=k.schema;if(R.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(b.allOf=b.allOf??[],b.allOf.push(R)):Object.assign(b,R),Object.assign(b,w),m._zod.parent===E)for(const I in b)I==="$ref"||I==="allOf"||I in w||delete b[I];if(R.$ref)for(const I in b)I==="$ref"||I==="allOf"||I in k.def&&JSON.stringify(b[I])===JSON.stringify(k.def[I])&&delete b[I]}const A=m._zod.parent;if(A&&A!==E){o(A);const k=e.seen.get(A);if(k?.schema.$ref&&(b.$ref=k.schema.$ref,k.def))for(const R in b)R==="$ref"||R==="allOf"||R in k.def&&JSON.stringify(b[R])===JSON.stringify(k.def[R])&&delete b[R]}e.override({zodSchema:m,jsonSchema:b,path:g.path??[]})};for(const m of[...e.seen.entries()].reverse())o(m[0]);const u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const m=e.external.registry.get(r)?.id;if(!m)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(m)}Object.assign(u,s.def??s.schema);const h=e.external?.defs??{};for(const m of e.seen.entries()){const g=m[1];g.def&&g.defId&&(h[g.defId]=g.def)}e.external||Object.keys(h).length>0&&(e.target==="draft-2020-12"?u.$defs=h:u.definitions=h);try{const m=JSON.parse(JSON.stringify(u));return Object.defineProperty(m,"~standard",{value:{...r["~standard"],jsonSchema:{input:lC(r,"input",e.processors),output:lC(r,"output",e.processors)}},enumerable:!1,writable:!1}),m}catch{throw new Error("Error converting schema to JSON.")}}function qi(e,r){const s=r??{seen:new Set};if(s.seen.has(e))return!1;s.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return qi(o.element,s);if(o.type==="set")return qi(o.valueType,s);if(o.type==="lazy")return qi(o.getter(),s);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return qi(o.innerType,s);if(o.type==="intersection")return qi(o.left,s)||qi(o.right,s);if(o.type==="record"||o.type==="map")return qi(o.keyType,s)||qi(o.valueType,s);if(o.type==="pipe")return qi(o.in,s)||qi(o.out,s);if(o.type==="object"){for(const u in o.shape)if(qi(o.shape[u],s))return!0;return!1}if(o.type==="union"){for(const u of o.options)if(qi(u,s))return!0;return!1}if(o.type==="tuple"){for(const u of o.items)if(qi(u,s))return!0;return!!(o.rest&&qi(o.rest,s))}return!1}const jge=(e,r={})=>s=>{const o=D6({...s,processors:r});return Zs(e,o),P6(o,e),M6(o,e)},lC=(e,r,s={})=>o=>{const{libraryOptions:u,target:h}=o??{},m=D6({...u??{},target:h,io:r,processors:s});return Zs(e,m),P6(m,e),M6(m,e)},Cge={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Age=(e,r,s,o)=>{const u=s;u.type="string";const{minimum:h,maximum:m,format:g,patterns:b,contentEncoding:w}=e._zod.bag;if(typeof h=="number"&&(u.minLength=h),typeof m=="number"&&(u.maxLength=m),g&&(u.format=Cge[g]??g,u.format===""&&delete u.format,g==="time"&&delete u.format),w&&(u.contentEncoding=w),b&&b.size>0){const E=[...b];E.length===1?u.pattern=E[0].source:E.length>1&&(u.allOf=[...E.map(A=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:A.source}))])}},Oge=(e,r,s,o)=>{const u=s,{minimum:h,maximum:m,format:g,multipleOf:b,exclusiveMaximum:w,exclusiveMinimum:E}=e._zod.bag;typeof g=="string"&&g.includes("int")?u.type="integer":u.type="number",typeof E=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(u.minimum=E,u.exclusiveMinimum=!0):u.exclusiveMinimum=E),typeof h=="number"&&(u.minimum=h,typeof E=="number"&&r.target!=="draft-04"&&(E>=h?delete u.minimum:delete u.exclusiveMinimum)),typeof w=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(u.maximum=w,u.exclusiveMaximum=!0):u.exclusiveMaximum=w),typeof m=="number"&&(u.maximum=m,typeof w=="number"&&r.target!=="draft-04"&&(w<=m?delete u.maximum:delete u.exclusiveMaximum)),typeof b=="number"&&(u.multipleOf=b)},kge=(e,r,s,o)=>{s.not={}},Rge=(e,r,s,o)=>{},Tge=(e,r,s,o)=>{},_ge=(e,r,s,o)=>{const u=e._zod.def,h=m6(u.entries);h.every(m=>typeof m=="number")&&(s.type="number"),h.every(m=>typeof m=="string")&&(s.type="string"),s.enum=h},$ge=(e,r,s,o)=>{const u=e._zod.def,h=[];for(const m of u.values)if(m===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof m=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");h.push(Number(m))}else h.push(m);if(h.length!==0)if(h.length===1){const m=h[0];s.type=m===null?"null":typeof m,r.target==="draft-04"||r.target==="openapi-3.0"?s.enum=[m]:s.const=m}else h.every(m=>typeof m=="number")&&(s.type="number"),h.every(m=>typeof m=="string")&&(s.type="string"),h.every(m=>typeof m=="boolean")&&(s.type="boolean"),h.every(m=>m===null)&&(s.type="null"),s.enum=h},Nge=(e,r,s,o)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Dge=(e,r,s,o)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Pge=(e,r,s,o)=>{const u=s,h=e._zod.def,{minimum:m,maximum:g}=e._zod.bag;typeof m=="number"&&(u.minItems=m),typeof g=="number"&&(u.maxItems=g),u.type="array",u.items=Zs(h.element,r,{...o,path:[...o.path,"items"]})},Mge=(e,r,s,o)=>{const u=s,h=e._zod.def;u.type="object",u.properties={};const m=h.shape;for(const w in m)u.properties[w]=Zs(m[w],r,{...o,path:[...o.path,"properties",w]});const g=new Set(Object.keys(m)),b=new Set([...g].filter(w=>{const E=h.shape[w]._zod;return r.io==="input"?E.optin===void 0:E.optout===void 0}));b.size>0&&(u.required=Array.from(b)),h.catchall?._zod.def.type==="never"?u.additionalProperties=!1:h.catchall?h.catchall&&(u.additionalProperties=Zs(h.catchall,r,{...o,path:[...o.path,"additionalProperties"]})):r.io==="output"&&(u.additionalProperties=!1)},Ige=(e,r,s,o)=>{const u=e._zod.def,h=u.inclusive===!1,m=u.options.map((g,b)=>Zs(g,r,{...o,path:[...o.path,h?"oneOf":"anyOf",b]}));h?s.oneOf=m:s.anyOf=m},zge=(e,r,s,o)=>{const u=e._zod.def,h=Zs(u.left,r,{...o,path:[...o.path,"allOf",0]}),m=Zs(u.right,r,{...o,path:[...o.path,"allOf",1]}),g=w=>"allOf"in w&&Object.keys(w).length===1,b=[...g(h)?h.allOf:[h],...g(m)?m.allOf:[m]];s.allOf=b},Lge=(e,r,s,o)=>{const u=e._zod.def,h=Zs(u.innerType,r,o),m=r.seen.get(e);r.target==="openapi-3.0"?(m.ref=u.innerType,s.nullable=!0):s.anyOf=[h,{type:"null"}]},Fge=(e,r,s,o)=>{const u=e._zod.def;Zs(u.innerType,r,o);const h=r.seen.get(e);h.ref=u.innerType},qge=(e,r,s,o)=>{const u=e._zod.def;Zs(u.innerType,r,o);const h=r.seen.get(e);h.ref=u.innerType,s.default=JSON.parse(JSON.stringify(u.defaultValue))},Bge=(e,r,s,o)=>{const u=e._zod.def;Zs(u.innerType,r,o);const h=r.seen.get(e);h.ref=u.innerType,r.io==="input"&&(s._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},Uge=(e,r,s,o)=>{const u=e._zod.def;Zs(u.innerType,r,o);const h=r.seen.get(e);h.ref=u.innerType;let m;try{m=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}s.default=m},Kge=(e,r,s,o)=>{const u=e._zod.def,h=r.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;Zs(h,r,o);const m=r.seen.get(e);m.ref=h},Vge=(e,r,s,o)=>{const u=e._zod.def;Zs(u.innerType,r,o);const h=r.seen.get(e);h.ref=u.innerType,s.readOnly=!0},I6=(e,r,s,o)=>{const u=e._zod.def;Zs(u.innerType,r,o);const h=r.seen.get(e);h.ref=u.innerType};function R3(e,r){try{var s=e()}catch(o){return r(o)}return s&&s.then?s.then(void 0,r):s}function Hge(e,r){for(var s={};e.length;){var o=e[0],u=o.code,h=o.message,m=o.path.join(".");if(!s[m])if("unionErrors"in o){var g=o.unionErrors[0].errors[0];s[m]={message:g.message,type:g.code}}else s[m]={message:h,type:u};if("unionErrors"in o&&o.unionErrors.forEach(function(E){return E.errors.forEach(function(A){return e.push(A)})}),r){var b=s[m].types,w=b&&b[o.code];s[m]=i$(m,r,s,u,w?[].concat(w,o.message):o.message)}e.shift()}return s}function Gge(e,r){for(var s={};e.length;){var o=e[0],u=o.code,h=o.message,m=o.path.join(".");if(!s[m])if(o.code==="invalid_union"&&o.errors.length>0){var g=o.errors[0][0];s[m]={message:g.message,type:g.code}}else s[m]={message:h,type:u};if(o.code==="invalid_union"&&o.errors.forEach(function(E){return E.forEach(function(A){return e.push(A)})}),r){var b=s[m].types,w=b&&b[o.code];s[m]=i$(m,r,s,u,w?[].concat(w,o.message):o.message)}e.shift()}return s}function fr(e,r,s){if(s===void 0&&(s={}),(function(o){return"_def"in o&&typeof o._def=="object"&&"typeName"in o._def})(e))return function(o,u,h){try{return Promise.resolve(R3(function(){return Promise.resolve(e[s.mode==="sync"?"parse":"parseAsync"](o,r)).then(function(m){return h.shouldUseNativeValidation&&C_({},h),{errors:{},values:s.raw?Object.assign({},o):m}})},function(m){if((function(g){return Array.isArray(g?.issues)})(m))return{values:{},errors:d3(Hge(m.errors,!h.shouldUseNativeValidation&&h.criteriaMode==="all"),h)};throw m}))}catch(m){return Promise.reject(m)}};if((function(o){return"_zod"in o&&typeof o._zod=="object"})(e))return function(o,u,h){try{return Promise.resolve(R3(function(){return Promise.resolve((s.mode==="sync"?Bpe:Upe)(e,o,r)).then(function(m){return h.shouldUseNativeValidation&&C_({},h),{errors:{},values:s.raw?Object.assign({},o):m}})},function(m){if((function(g){return g instanceof h$})(m))return{values:{},errors:d3(Gge(m.issues,!h.shouldUseNativeValidation&&h.criteriaMode==="all"),h)};throw m}))}catch(m){return Promise.reject(m)}};throw new Error("Invalid input: not a Zod schema")}const Xge=it("ZodISODateTime",(e,r)=>{Zfe.init(e,r),Fr.init(e,r)});function Yge(e){return ege(Xge,e)}const Zge=it("ZodISODate",(e,r)=>{Jfe.init(e,r),Fr.init(e,r)});function Jge(e){return tge(Zge,e)}const Wge=it("ZodISOTime",(e,r)=>{Wfe.init(e,r),Fr.init(e,r)});function Qge(e){return nge(Wge,e)}const eye=it("ZodISODuration",(e,r)=>{Qfe.init(e,r),Fr.init(e,r)});function tye(e){return rge(eye,e)}const nye=(e,r)=>{h$.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:s=>qpe(e,s)},flatten:{value:s=>Fpe(e,s)},addIssue:{value:s=>{e.issues.push(s),e.message=JSON.stringify(e.issues,A_,2)}},addIssues:{value:s=>{e.issues.push(...s),e.message=JSON.stringify(e.issues,A_,2)}},isEmpty:{get(){return e.issues.length===0}}})},fo=it("ZodError",nye,{Parent:Error}),rye=JC(fo),sye=WC(fo),iye=QC(fo),aye=eA(fo),oye=Hpe(fo),lye=Gpe(fo),cye=Xpe(fo),uye=Ype(fo),dye=Zpe(fo),hye=Jpe(fo),pye=Wpe(fo),fye=Qpe(fo),Xr=it("ZodType",(e,r)=>(Gr.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:lC(e,"input"),output:lC(e,"output")}}),e.toJSONSchema=jge(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...s)=>e.clone(Qd(r,{checks:[...r.checks??[],...s.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(s,o)=>eh(e,s,o),e.brand=()=>e,e.register=((s,o)=>(s.add(e,o),e)),e.parse=(s,o)=>rye(e,s,o,{callee:e.parse}),e.safeParse=(s,o)=>iye(e,s,o),e.parseAsync=async(s,o)=>sye(e,s,o,{callee:e.parseAsync}),e.safeParseAsync=async(s,o)=>aye(e,s,o),e.spa=e.safeParseAsync,e.encode=(s,o)=>oye(e,s,o),e.decode=(s,o)=>lye(e,s,o),e.encodeAsync=async(s,o)=>cye(e,s,o),e.decodeAsync=async(s,o)=>uye(e,s,o),e.safeEncode=(s,o)=>dye(e,s,o),e.safeDecode=(s,o)=>hye(e,s,o),e.safeEncodeAsync=async(s,o)=>pye(e,s,o),e.safeDecodeAsync=async(s,o)=>fye(e,s,o),e.refine=(s,o)=>e.check(ove(s,o)),e.superRefine=s=>e.check(lve(s)),e.overwrite=s=>e.check(qg(s)),e.optional=()=>D3(e),e.exactOptional=()=>Xye(e),e.nullable=()=>P3(e),e.nullish=()=>D3(P3(e)),e.nonoptional=s=>eve(e,s),e.array=()=>Lye(e),e.or=s=>q6([e,s]),e.and=s=>Uye(e,s),e.transform=s=>M3(e,Hye(s)),e.default=s=>Jye(e,s),e.prefault=s=>Qye(e,s),e.catch=s=>nve(e,s),e.pipe=s=>M3(e,s),e.readonly=()=>ive(e),e.describe=s=>{const o=e.clone();return Rb.add(o,{description:s}),o},Object.defineProperty(e,"description",{get(){return Rb.get(e)?.description},configurable:!0}),e.meta=(...s)=>{if(s.length===0)return Rb.get(e);const o=e.clone();return Rb.add(o,s[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=s=>s(e),e)),z6=it("_ZodString",(e,r)=>{p$.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(o,u,h)=>Age(e,o,u);const s=e._zod.bag;e.format=s.format??null,e.minLength=s.minimum??null,e.maxLength=s.maximum??null,e.regex=(...o)=>e.check(cge(...o)),e.includes=(...o)=>e.check(hge(...o)),e.startsWith=(...o)=>e.check(pge(...o)),e.endsWith=(...o)=>e.check(fge(...o)),e.min=(...o)=>e.check(oC(...o)),e.max=(...o)=>e.check($6(...o)),e.length=(...o)=>e.check(N6(...o)),e.nonempty=(...o)=>e.check(oC(1,...o)),e.lowercase=o=>e.check(uge(o)),e.uppercase=o=>e.check(dge(o)),e.trim=()=>e.check(gge()),e.normalize=(...o)=>e.check(mge(...o)),e.toLowerCase=()=>e.check(yge()),e.toUpperCase=()=>e.check(vge()),e.slugify=()=>e.check(xge())}),mye=it("ZodString",(e,r)=>{p$.init(e,r),z6.init(e,r),e.email=s=>e.check(Dme(gye,s)),e.url=s=>e.check(zme(yye,s)),e.jwt=s=>e.check(Qme($ye,s)),e.emoji=s=>e.check(Lme(vye,s)),e.guid=s=>e.check(C3(T3,s)),e.uuid=s=>e.check(_6(Tb,s)),e.uuidv4=s=>e.check(Pme(Tb,s)),e.uuidv6=s=>e.check(Mme(Tb,s)),e.uuidv7=s=>e.check(Ime(Tb,s)),e.nanoid=s=>e.check(Fme(xye,s)),e.guid=s=>e.check(C3(T3,s)),e.cuid=s=>e.check(qme(bye,s)),e.cuid2=s=>e.check(Bme(wye,s)),e.ulid=s=>e.check(Ume(Sye,s)),e.base64=s=>e.check(Zme(Rye,s)),e.base64url=s=>e.check(Jme(Tye,s)),e.xid=s=>e.check(Kme(Eye,s)),e.ksuid=s=>e.check(Vme(jye,s)),e.ipv4=s=>e.check(Hme(Cye,s)),e.ipv6=s=>e.check(Gme(Aye,s)),e.cidrv4=s=>e.check(Xme(Oye,s)),e.cidrv6=s=>e.check(Yme(kye,s)),e.e164=s=>e.check(Wme(_ye,s)),e.datetime=s=>e.check(Yge(s)),e.date=s=>e.check(Jge(s)),e.time=s=>e.check(Qge(s)),e.duration=s=>e.check(tye(s))});function Sn(e){return Nme(mye,e)}const Fr=it("ZodStringFormat",(e,r)=>{Nr.init(e,r),z6.init(e,r)}),gye=it("ZodEmail",(e,r)=>{qfe.init(e,r),Fr.init(e,r)}),T3=it("ZodGUID",(e,r)=>{Lfe.init(e,r),Fr.init(e,r)}),Tb=it("ZodUUID",(e,r)=>{Ffe.init(e,r),Fr.init(e,r)});function L6(e){return _6(Tb,e)}const yye=it("ZodURL",(e,r)=>{Bfe.init(e,r),Fr.init(e,r)}),vye=it("ZodEmoji",(e,r)=>{Ufe.init(e,r),Fr.init(e,r)}),xye=it("ZodNanoID",(e,r)=>{Kfe.init(e,r),Fr.init(e,r)}),bye=it("ZodCUID",(e,r)=>{Vfe.init(e,r),Fr.init(e,r)}),wye=it("ZodCUID2",(e,r)=>{Hfe.init(e,r),Fr.init(e,r)}),Sye=it("ZodULID",(e,r)=>{Gfe.init(e,r),Fr.init(e,r)}),Eye=it("ZodXID",(e,r)=>{Xfe.init(e,r),Fr.init(e,r)}),jye=it("ZodKSUID",(e,r)=>{Yfe.init(e,r),Fr.init(e,r)}),Cye=it("ZodIPv4",(e,r)=>{eme.init(e,r),Fr.init(e,r)}),Aye=it("ZodIPv6",(e,r)=>{tme.init(e,r),Fr.init(e,r)}),Oye=it("ZodCIDRv4",(e,r)=>{nme.init(e,r),Fr.init(e,r)}),kye=it("ZodCIDRv6",(e,r)=>{rme.init(e,r),Fr.init(e,r)}),Rye=it("ZodBase64",(e,r)=>{sme.init(e,r),Fr.init(e,r)}),Tye=it("ZodBase64URL",(e,r)=>{ame.init(e,r),Fr.init(e,r)}),_ye=it("ZodE164",(e,r)=>{ome.init(e,r),Fr.init(e,r)}),$ye=it("ZodJWT",(e,r)=>{cme.init(e,r),Fr.init(e,r)}),F6=it("ZodNumber",(e,r)=>{O6.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(o,u,h)=>Oge(e,o,u),e.gt=(o,u)=>e.check(O3(o,u)),e.gte=(o,u)=>e.check(jT(o,u)),e.min=(o,u)=>e.check(jT(o,u)),e.lt=(o,u)=>e.check(A3(o,u)),e.lte=(o,u)=>e.check(ET(o,u)),e.max=(o,u)=>e.check(ET(o,u)),e.int=o=>e.check(_3(o)),e.safe=o=>e.check(_3(o)),e.positive=o=>e.check(O3(0,o)),e.nonnegative=o=>e.check(jT(0,o)),e.negative=o=>e.check(A3(0,o)),e.nonpositive=o=>e.check(ET(0,o)),e.multipleOf=(o,u)=>e.check(k3(o,u)),e.step=(o,u)=>e.check(k3(o,u)),e.finite=()=>e;const s=e._zod.bag;e.minValue=Math.max(s.minimum??Number.NEGATIVE_INFINITY,s.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(s.maximum??Number.POSITIVE_INFINITY,s.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(s.format??"").includes("int")||Number.isSafeInteger(s.multipleOf??.5),e.isFinite=!0,e.format=s.format??null});function tw(e){return sge(F6,e)}const Nye=it("ZodNumberFormat",(e,r)=>{ume.init(e,r),F6.init(e,r)});function _3(e){return ige(Nye,e)}const Dye=it("ZodAny",(e,r)=>{dme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Rge()});function $3(){return age(Dye)}const Pye=it("ZodUnknown",(e,r)=>{hme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Tge()});function N3(){return oge(Pye)}const Mye=it("ZodNever",(e,r)=>{pme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>kge(e,s,o)});function Iye(e){return lge(Mye,e)}const zye=it("ZodArray",(e,r)=>{fme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Pge(e,s,o,u),e.element=r.element,e.min=(s,o)=>e.check(oC(s,o)),e.nonempty=s=>e.check(oC(1,s)),e.max=(s,o)=>e.check($6(s,o)),e.length=(s,o)=>e.check(N6(s,o)),e.unwrap=()=>e.element});function Lye(e,r){return bge(zye,e,r)}const Fye=it("ZodObject",(e,r)=>{gme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Mge(e,s,o,u),pr(e,"shape",()=>r.shape),e.keyof=()=>Fa(Object.keys(e._zod.def.shape)),e.catchall=s=>e.clone({...e._zod.def,catchall:s}),e.passthrough=()=>e.clone({...e._zod.def,catchall:N3()}),e.loose=()=>e.clone({...e._zod.def,catchall:N3()}),e.strict=()=>e.clone({...e._zod.def,catchall:Iye()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=s=>Ppe(e,s),e.safeExtend=s=>Mpe(e,s),e.merge=s=>Ipe(e,s),e.pick=s=>Npe(e,s),e.omit=s=>Dpe(e,s),e.partial=(...s)=>zpe(B6,e,s[0]),e.required=(...s)=>Lpe(U6,e,s[0])});function Is(e,r){const s={type:"object",shape:e??{},...Jt(r)};return new Fye(s)}const qye=it("ZodUnion",(e,r)=>{yme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Ige(e,s,o,u),e.options=r.options});function q6(e,r){return new qye({type:"union",options:e,...Jt(r)})}const Bye=it("ZodIntersection",(e,r)=>{vme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>zge(e,s,o,u)});function Uye(e,r){return new Bye({type:"intersection",left:e,right:r})}const k_=it("ZodEnum",(e,r)=>{xme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(o,u,h)=>_ge(e,o,u),e.enum=r.entries,e.options=Object.values(r.entries);const s=new Set(Object.keys(r.entries));e.extract=(o,u)=>{const h={};for(const m of o)if(s.has(m))h[m]=r.entries[m];else throw new Error(`Key ${m} not found in enum`);return new k_({...r,checks:[],...Jt(u),entries:h})},e.exclude=(o,u)=>{const h={...r.entries};for(const m of o)if(s.has(m))delete h[m];else throw new Error(`Key ${m} not found in enum`);return new k_({...r,checks:[],...Jt(u),entries:h})}});function Fa(e,r){const s=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new k_({type:"enum",entries:s,...Jt(r)})}const Kye=it("ZodLiteral",(e,r)=>{bme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>$ge(e,s,o),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function nw(e,r){return new Kye({type:"literal",values:Array.isArray(e)?e:[e],...Jt(r)})}const Vye=it("ZodTransform",(e,r)=>{wme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Dge(e,s),e._zod.parse=(s,o)=>{if(o.direction==="backward")throw new p6(e.constructor.name);s.addIssue=h=>{if(typeof h=="string")s.issues.push(ew(h,s.value,r));else{const m=h;m.fatal&&(m.continue=!1),m.code??(m.code="custom"),m.input??(m.input=s.value),m.inst??(m.inst=e),s.issues.push(ew(m))}};const u=r.transform(s.value,s);return u instanceof Promise?u.then(h=>(s.value=h,s)):(s.value=u,s)}});function Hye(e){return new Vye({type:"transform",transform:e})}const B6=it("ZodOptional",(e,r)=>{T6.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>I6(e,s,o,u),e.unwrap=()=>e._zod.def.innerType});function D3(e){return new B6({type:"optional",innerType:e})}const Gye=it("ZodExactOptional",(e,r)=>{Sme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>I6(e,s,o,u),e.unwrap=()=>e._zod.def.innerType});function Xye(e){return new Gye({type:"optional",innerType:e})}const Yye=it("ZodNullable",(e,r)=>{Eme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Lge(e,s,o,u),e.unwrap=()=>e._zod.def.innerType});function P3(e){return new Yye({type:"nullable",innerType:e})}const Zye=it("ZodDefault",(e,r)=>{jme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>qge(e,s,o,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Jye(e,r){return new Zye({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():y6(r)}})}const Wye=it("ZodPrefault",(e,r)=>{Cme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Bge(e,s,o,u),e.unwrap=()=>e._zod.def.innerType});function Qye(e,r){return new Wye({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():y6(r)}})}const U6=it("ZodNonOptional",(e,r)=>{Ame.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Fge(e,s,o,u),e.unwrap=()=>e._zod.def.innerType});function eve(e,r){return new U6({type:"nonoptional",innerType:e,...Jt(r)})}const tve=it("ZodCatch",(e,r)=>{Ome.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Uge(e,s,o,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nve(e,r){return new tve({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}const rve=it("ZodPipe",(e,r)=>{kme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Kge(e,s,o,u),e.in=r.in,e.out=r.out});function M3(e,r){return new rve({type:"pipe",in:e,out:r})}const sve=it("ZodReadonly",(e,r)=>{Rme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Vge(e,s,o,u),e.unwrap=()=>e._zod.def.innerType});function ive(e){return new sve({type:"readonly",innerType:e})}const ave=it("ZodCustom",(e,r)=>{Tme.init(e,r),Xr.init(e,r),e._zod.processJSONSchema=(s,o,u)=>Nge(e,s)});function ove(e,r={}){return wge(ave,e,r)}function lve(e){return Sge(e)}const Md={custom:"custom"};var cve=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uve=cve.reduce((e,r)=>{const s=iw(`Primitive.${r}`),o=T.forwardRef((u,h)=>{const{asChild:m,...g}=u,b=m?s:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(b,{...g,ref:h})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),dve="Label",K6=T.forwardRef((e,r)=>c.jsx(uve.label,{...e,ref:r,onMouseDown:s=>{s.target.closest("button, input, select, textarea")||(e.onMouseDown?.(s),!s.defaultPrevented&&s.detail>1&&s.preventDefault())}}));K6.displayName=dve;var hve=K6;function Gs({className:e,...r}){return c.jsx(hve,{"data-slot":"label",className:vt("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",e),...r})}const mr=upe,V6=T.createContext({}),ft=({...e})=>c.jsx(V6.Provider,{value:{name:e.name},children:c.jsx(Zo,{...e})}),f$=()=>{const e=T.useContext(V6),r=T.useContext(H6),{getFieldState:s}=YC(),o=a6({name:e.name}),u=s(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:h}=r;return{id:h,name:e.name,formItemId:`${h}-form-item`,formDescriptionId:`${h}-form-item-description`,formMessageId:`${h}-form-item-message`,...u}},H6=T.createContext({});function ot({className:e,...r}){const s=T.useId();return c.jsx(H6.Provider,{value:{id:s},children:c.jsx("div",{"data-slot":"form-item",className:vt("grid gap-2",e),...r})})}function lt({className:e,...r}){const{error:s,formItemId:o}=f$();return c.jsx(Gs,{"data-slot":"form-label","data-error":!!s,className:vt("data-[error=true]:text-destructive",e),htmlFor:o,...r})}function bt({...e}){const{error:r,formItemId:s,formDescriptionId:o,formMessageId:u}=f$();return c.jsx(Tg,{"data-slot":"form-control",id:s,"aria-describedby":r?`${o} ${u}`:`${o}`,"aria-invalid":!!r,...e})}function pt({className:e,...r}){const{error:s,formMessageId:o}=f$(),u=s?String(s?.message??""):r.children;return u?c.jsx("p",{"data-slot":"form-message",id:o,className:vt("text-destructive text-sm",e),...r,children:u}):null}function Js({className:e,...r}){return c.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:c.jsx("table",{"data-slot":"table",className:vt("w-full caption-bottom text-sm",e),...r})})}function Ws({className:e,...r}){return c.jsx("thead",{"data-slot":"table-header",className:vt("[&_tr]:border-b",e),...r})}function Qs({className:e,...r}){return c.jsx("tbody",{"data-slot":"table-body",className:vt("[&_tr:last-child]:border-0",e),...r})}function Qt({className:e,...r}){return c.jsx("tr",{"data-slot":"table-row",className:vt("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...r})}function St({className:e,...r}){return c.jsx("th",{"data-slot":"table-head",className:vt("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}function dt({className:e,...r}){return c.jsx("td",{"data-slot":"table-cell",className:vt("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...r})}function pve({className:e,...r}){return c.jsx("caption",{"data-slot":"table-caption",className:vt("text-muted-foreground mt-4 text-sm",e),...r})}function nl({className:e,...r}){return c.jsx("textarea",{"data-slot":"textarea",className:vt("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...r})}const G6=Is({label:Sn().trim().min(1,"Label is required").max(255,"Max 255 chars"),description:Sn().trim().min(1,"Description is required"),make_target:Sn().trim().min(1,"Make target is required").max(255,"Max 255 chars").regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/,"Invalid make target (allowed: a-z A-Z 0-9 . _ -)")}),fve=G6.partial();function mve({target:e}){return e?c.jsx(rr,{variant:"secondary",className:"font-mono text-xs",children:e}):c.jsx(rr,{variant:"outline",className:"text-xs",children:"—"})}const gve=()=>{const e=Ms(),[r,s]=T.useState(""),[o,u]=T.useState(!1),[h,m]=T.useState(!1),[g,b]=T.useState(null),[w,E]=T.useState(null),A=Un({queryKey:["admin-actions"],queryFn:()=>kb.listActions()}),k=T.useMemo(()=>{const K=A.data??[],z=r.trim().toLowerCase();return z?K.filter(W=>(W.label??"").toLowerCase().includes(z)||(W.description??"").toLowerCase().includes(z)||(W.make_target??"").toLowerCase().includes(z)):K},[r,A.data]),R=hr({resolver:fr(G6),defaultValues:{label:"",description:"",make_target:""}}),M=Wt({mutationFn:K=>kb.createAction(K),onSuccess:async()=>{await e.invalidateQueries({queryKey:["admin-actions"]}),R.reset(),u(!1),Ge.success("Action created.")},onError:K=>{Ge.error(K?.message??"Failed to create action.")}}),I=hr({resolver:fr(fve),defaultValues:{}}),F=Wt({mutationFn:({id:K,values:z})=>kb.updateAction(K,z),onSuccess:async()=>{await e.invalidateQueries({queryKey:["admin-actions"]}),I.reset(),m(!1),E(null),Ge.success("Action updated.")},onError:K=>{Ge.error(K?.message??"Failed to update action.")}}),H=K=>{K.id&&(E(K),I.reset({label:K.label??"",description:K.description??"",make_target:K.make_target??""}),m(!0))},V=Wt({mutationFn:K=>kb.deleteAction(K),onSuccess:async()=>{await e.invalidateQueries({queryKey:["admin-actions"]}),b(null),Ge.success("Action deleted.")},onError:K=>{Ge.error(K?.message??"Failed to delete action.")}});return A.isLoading?c.jsx("div",{className:"p-6",children:"Loading actions…"}):A.error?c.jsx("div",{className:"p-6 text-red-500",children:"Error loading actions."}):c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"text-2xl font-bold",children:"Admin Actions"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:r,onChange:K=>s(K.target.value),placeholder:"Search actions",className:"w-72 pl-8"})]}),c.jsxs(dn,{open:o,onOpenChange:u,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>u(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Action"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create Action"})}),c.jsx(mr,{...R,children:c.jsxs("form",{className:"space-y-4",onSubmit:R.handleSubmit(K=>M.mutate(K)),children:[c.jsx(ft,{control:R.control,name:"label",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Label"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"Setup",...K})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:R.control,name:"make_target",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Make Target"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"setup",className:"font-mono",...K})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:R.control,name:"description",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Description"}),c.jsx(bt,{children:c.jsx(nl,{rows:4,placeholder:"Runs prepare, ping-servers, then make setup on the bastion.",...K})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>u(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:M.isPending,children:M.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Label"}),c.jsx(St,{children:"Make Target"}),c.jsx(St,{children:"Description"}),c.jsx(St,{className:"w-[260px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[k.map(K=>c.jsxs(Qt,{children:[c.jsx(dt,{className:"font-medium",children:K.label}),c.jsx(dt,{children:c.jsx(mve,{target:K.make_target})}),c.jsx(dt,{className:"text-muted-foreground max-w-[680px] truncate",children:K.description}),c.jsx(dt,{children:c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>H(K),children:[c.jsx(uc,{className:"mr-2 h-4 w-4"}),"Edit"]}),c.jsxs(Pe,{variant:"destructive",size:"sm",onClick:()=>K.id&&b(K.id),disabled:V.isPending&&g===K.id,children:[c.jsx(wg,{className:"mr-2 h-4 w-4"}),V.isPending&&g===K.id?"Deleting…":"Delete"]})]})})]},K.id)),k.length===0&&c.jsx(Qt,{children:c.jsxs(dt,{colSpan:4,className:"text-muted-foreground py-10 text-center",children:[c.jsx(Rg,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No actions match your search."]})})]})]})})}),c.jsx(dn,{open:h,onOpenChange:K=>{m(K),K||E(null)},children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Action"})}),w?c.jsx(mr,{...I,children:c.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(K=>{w.id&&F.mutate({id:w.id,values:K})}),children:[c.jsx(ft,{control:I.control,name:"label",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Label"}),c.jsx(bt,{children:c.jsx(mt,{...K})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"make_target",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Make Target"}),c.jsx(bt,{children:c.jsx(mt,{className:"font-mono",...K})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"description",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Description"}),c.jsx(bt,{children:c.jsx(nl,{rows:4,...K})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>m(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:F.isPending,children:F.isPending?c.jsxs("span",{className:"inline-flex items-center gap-2",children:[c.jsx(ys,{className:"h-4 w-4 animate-spin"}),"Saving…"]}):"Save changes"})]})]})}):c.jsx("div",{className:"text-muted-foreground text-sm",children:"No action selected."})]})}),c.jsx(dn,{open:!!g,onOpenChange:K=>!K&&b(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete action"})}),c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(Dj,{className:"mt-0.5 h-5 w-5 text-red-500"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete it?"})]}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>b(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>g&&V.mutate(g),disabled:V.isPending,children:V.isPending?"Deleting…":"Delete"})]})]})})]})},pb=Tte(),_b={listAnnotations:()=>ct(async()=>await pb.listAnnotations()),createAnnotation:e=>ct(async()=>await pb.createAnnotation({dtoCreateAnnotationRequest:e})),getAnnotation:e=>ct(async()=>await pb.getAnnotation({id:e})),deleteAnnotation:e=>ct(async()=>{await pb.deleteAnnotation({id:e})}),updateAnnotation:(e,r)=>ct(async()=>await pb.updateAnnotation({id:e,dtoUpdateAnnotationRequest:r}))},X6=Is({key:Sn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:Sn().trim().optional()}),yve=X6.partial();function vve({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}`;return c.jsxs(rr,{variant:"secondary",className:"font-mono text-xs",children:[c.jsx(jC,{className:"mr-1 h-3 w-3"}),r]})}const xve=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(null),[b,w]=T.useState(null),E=Ms(),A=Un({queryKey:["annotations"],queryFn:()=>_b.listAnnotations()}),k=hr({resolver:fr(X6),defaultValues:{key:"",value:""}}),R=Wt({mutationFn:z=>_b.createAnnotation(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["annotations"]}),k.reset(),o(!1),Ge.success("Annotation Created Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while creating Annotation")}}),M=z=>{R.mutate(z)},I=hr({resolver:fr(yve),defaultValues:{}}),F=Wt({mutationFn:({id:z,values:W})=>_b.updateAnnotation(z,W),onSuccess:async()=>{await E.invalidateQueries({queryKey:["annotations"]}),I.reset(),h(!1),Ge.success("Annotation Updated Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while updating Annotation")}}),H=z=>{w(z.id),I.reset({key:z.key,value:z.value}),h(!0)},V=Wt({mutationFn:z=>_b.deleteAnnotation(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["annotations"]}),g(null),Ge.success("Annotation Deleted Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while deleting Annotation")}}),K=T.useMemo(()=>{const z=A.data??[],W=e.trim().toLowerCase();return W?z.filter(ae=>ae.key?.toLowerCase().includes(W)||ae.value?.toLowerCase().includes(W)):z},[e,A.data]);return A.isLoading?c.jsx("div",{className:"p-6",children:"Loading annotations…"}):A.error?c.jsxs("div",{className:"p-6 text-red-500",children:["Error loading annotations.",c.jsx("pre",{children:JSON.stringify(A,null,2)})]}):c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Annotations"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search annotations",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Annotation"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create Label"})}),c.jsx(mr,{...k,children:c.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[c.jsx(ft,{control:k.control,name:"key",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Key"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"environment",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:k.control,name:"value",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Value"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"dev",...z})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Key"}),c.jsx(St,{children:"Value"}),c.jsx(St,{children:"Annotation"}),c.jsx(St,{className:"w-[180px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[K.map(z=>c.jsxs(Qt,{children:[c.jsx(dt,{children:z.key}),c.jsx(dt,{children:z.value}),c.jsx(dt,{children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(vve,{t:z}),c.jsx("code",{className:"text-muted-foreground text-xs",children:za(z.id,6)})]})}),c.jsx(dt,{children:c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>H(z),children:[c.jsx(uc,{className:"mr-2 h-4 w-4"})," Edit"]}),c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:V.isPending&&m===z.id,children:V.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),K.length===0&&c.jsx(Qt,{children:c.jsxs(dt,{colSpan:4,className:"text-muted-foreground py-10 text-center",children:[c.jsx(Rg,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No labels match your search."]})})]})]})})}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Annotation"})}),c.jsx(mr,{...I,children:c.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&F.mutate({id:b,values:z})}),children:[c.jsx(ft,{control:I.control,name:"key",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Key"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"dedicated",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"value",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Value (optional)"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"gpu",...z})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:F.isPending,children:F.isPending?"Saving…":"Save changes"})]})]})})]})}),c.jsx(dn,{open:!!m,onOpenChange:z=>!z&&g(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete annotation"})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this annotation?"}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>m&&V.mutate(m),disabled:V.isPending,children:V.isPending?"Deleting…":"Delete"})]})]})})]})},js=Mte(),CT=zte(),rs={listClusters:e=>ct(async()=>await js.listClusters(e?{q:e}:{})),getCluster:e=>ct(async()=>await js.getCluster({clusterID:e})),createCluster:e=>ct(async()=>await js.createCluster({dtoCreateClusterRequest:e})),updateCluster:(e,r)=>ct(async()=>await js.updateCluster({clusterID:e,dtoUpdateClusterRequest:r})),deleteCluster:e=>ct(async()=>await js.deleteCluster({clusterID:e})),setKubeconfig:(e,r)=>ct(async()=>await js.setClusterKubeconfig({clusterID:e,dtoSetKubeconfigRequest:r})),clearKubeconfig:e=>ct(async()=>await js.clearClusterKubeconfig({clusterID:e})),attachCaptainDomain:(e,r)=>ct(async()=>await js.attachCaptainDomain({clusterID:e,dtoAttachCaptainDomainRequest:r})),detachCaptainDomain:e=>ct(async()=>await js.detachCaptainDomain({clusterID:e})),attachControlPlaneRecordSet:(e,r)=>ct(async()=>await js.attachControlPlaneRecordSet({clusterID:e,dtoAttachRecordSetRequest:r})),detachControlPlaneRecordSet:e=>ct(async()=>await js.detachControlPlaneRecordSet({clusterID:e})),attachAppsLoadBalancer:(e,r)=>ct(async()=>await js.attachAppsLoadBalancer({clusterID:e,dtoAttachLoadBalancerRequest:r})),detachAppsLoadBalancer:e=>ct(async()=>await js.detachAppsLoadBalancer({clusterID:e})),attachGlueOpsLoadBalancer:(e,r)=>ct(async()=>await js.attachGlueOpsLoadBalancer({clusterID:e,dtoAttachLoadBalancerRequest:r})),detachGlueOpsLoadBalancer:e=>ct(async()=>await js.detachGlueOpsLoadBalancer({clusterID:e})),attachBastion:(e,r)=>ct(async()=>await js.attachBastionServer({clusterID:e,dtoAttachBastionRequest:r})),detachBastion:e=>ct(async()=>await js.detachBastionServer({clusterID:e})),attachNodePool:(e,r)=>ct(async()=>await js.attachNodePool({clusterID:e,dtoAttachNodePoolRequest:{node_pool_id:r}})),detachNodePool:(e,r)=>ct(async()=>await js.detachNodePool({clusterID:e,nodePoolID:r})),listClusterRuns:e=>ct(async()=>await CT.listClusterRuns({clusterID:e})),getClusterRun:(e,r)=>ct(async()=>await CT.getClusterRun({clusterID:e,runID:r})),runClusterAction:(e,r)=>ct(async()=>await CT.runClusterAction({clusterID:e,actionID:r}))},fu=Dte(),sc={listDomains:()=>ct(async()=>await fu.listDomains()),getDomain:e=>ct(async()=>await fu.getDomain({id:e})),createDomain:async e=>ct(async()=>await fu.createDomain({dtoCreateDomainRequest:e})),updateDomain:async(e,r)=>ct(async()=>await fu.updateDomain({id:e,dtoUpdateDomainRequest:r})),deleteDomain:async e=>ct(async()=>await fu.deleteDomain({id:e})),listRecordSetsByDomain:async e=>ct(async()=>await fu.listRecordSets({domainId:e})),createRecordSetsByDomain:async(e,r)=>ct(async()=>await fu.createRecordSet({domainId:e,dtoCreateRecordSetRequest:r})),updateRecordSetsByDomain:async(e,r)=>ct(async()=>await fu.updateRecordSet({id:e,dtoUpdateRecordSetRequest:r})),deleteRecordSetsByDomain:async e=>ct(async()=>await fu.deleteRecordSet({id:e}))},fb=Pte(),$b={listLoadBalancers:()=>ct(async()=>await fb.listLoadBalancers()),getLoadBalancer:e=>ct(async()=>await fb.getLoadBalancers({id:e})),createLoadBalancer:e=>ct(async()=>await fb.createLoadBalancer({dtoCreateLoadBalancerRequest:e})),updateLoadBalancer:(e,r)=>ct(async()=>await fb.updateLoadBalancer({id:e,dtoUpdateLoadBalancerRequest:r})),deleteLoadBalancer:e=>ct(async()=>await fb.deleteLoadBalancer({id:e}))},Vs=$te(),bve=(e,r)=>e?e===r:!0,Na={listNodePools:()=>ct(async()=>await Vs.listNodePools({})),createNodePool:e=>ct(async()=>await Vs.createNodePool({dtoCreateNodePoolRequest:e})),getNodePool:e=>ct(async()=>await Vs.getNodePool({id:e})),deleteNodePool:e=>ct(async()=>{await Vs.deleteNodePool({id:e})}),updateNodePool:(e,r)=>ct(async()=>await Vs.updateNodePool({id:e,dtoUpdateNodePoolRequest:r})),listNodePoolServers:e=>ct(async()=>await Vs.listNodePoolServers({id:e})),attachNodePoolServer:(e,r)=>ct(async()=>await Vs.attachNodePoolServers({id:e,dtoAttachServersRequest:r})),detachNodePoolServers:(e,r)=>ct(async()=>await Vs.detachNodePoolServer({id:e,serverId:r})),listNodePoolTaints:e=>ct(async()=>await Vs.listNodePoolTaints({id:e})),attachNodePoolTaints:(e,r)=>ct(async()=>await Vs.attachNodePoolTaints({id:e,dtoAttachTaintsRequest:r})),detachNodePoolTaints:(e,r)=>ct(async()=>await Vs.detachNodePoolTaint({id:e,taintId:r})),listNodePoolLabels:e=>ct(async()=>await Vs.listNodePoolLabels({id:e})),attachNodePoolLabels:(e,r)=>ct(async()=>await Vs.attachNodePoolLabels({id:e,dtoAttachLabelsRequest:r})),detachNodePoolLabels:(e,r)=>ct(async()=>await Vs.detachNodePoolLabel({id:e,labelId:r})),listNodePoolAnnotations:e=>ct(async()=>await Vs.listNodePoolAnnotations({id:e})),attachNodePoolAnnotations:(e,r)=>ct(async()=>await Vs.attachNodePoolAnnotations({id:e,dtoAttachAnnotationsRequest:r})),detachNodePoolAnnotations:(e,r)=>ct(async()=>await Vs.detachNodePoolAnnotation({id:e,annotationId:r}))},mb=Ote(),mg={listServers:()=>ct(async()=>await mb.listServers()),createServer:e=>ct(async()=>await mb.createServer({dtoCreateServerRequest:e})),getServer:e=>ct(async()=>await mb.getServer({id:e})),updateServer:(e,r)=>ct(async()=>await mb.updateServer({id:e,dtoUpdateServerRequest:r})),deleteServer:e=>ct(async()=>{await mb.deleteServer({id:e})})};function I3(e,[r,s]){return Math.min(s,Math.max(r,e))}function z3(e){const r=wve(e),s=T.forwardRef((o,u)=>{const{children:h,...m}=o,g=T.Children.toArray(h),b=g.find(Eve);if(b){const w=b.props.children,E=g.map(A=>A===b?T.Children.count(w)>1?T.Children.only(null):T.isValidElement(w)?w.props.children:null:A);return c.jsx(r,{...m,ref:u,children:T.isValidElement(w)?T.cloneElement(w,void 0,E):null})}return c.jsx(r,{...m,ref:u,children:h})});return s.displayName=`${e}.Slot`,s}function wve(e){const r=T.forwardRef((s,o)=>{const{children:u,...h}=s;if(T.isValidElement(u)){const m=Cve(u),g=jve(h,u.props);return u.type!==T.Fragment&&(g.ref=o?Gi(o,m):m),T.cloneElement(u,g)}return T.Children.count(u)>1?T.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Sve=Symbol("radix.slottable");function Eve(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Sve}function jve(e,r){const s={...r};for(const o in r){const u=e[o],h=r[o];/^on[A-Z]/.test(o)?u&&h?s[o]=(...g)=>{const b=h(...g);return u(...g),b}:u&&(s[o]=u):o==="style"?s[o]={...u,...h}:o==="className"&&(s[o]=[u,h].filter(Boolean).join(" "))}return{...e,...s}}function Cve(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function m$(e){const r=e+"CollectionProvider",[s,o]=cl(r),[u,h]=s(r,{collectionRef:{current:null},itemMap:new Map}),m=I=>{const{scope:F,children:H}=I,V=et.useRef(null),K=et.useRef(new Map).current;return c.jsx(u,{scope:F,itemMap:K,collectionRef:V,children:H})};m.displayName=r;const g=e+"CollectionSlot",b=z3(g),w=et.forwardRef((I,F)=>{const{scope:H,children:V}=I,K=h(g,H),z=Ln(F,K.collectionRef);return c.jsx(b,{ref:z,children:V})});w.displayName=g;const E=e+"CollectionItemSlot",A="data-radix-collection-item",k=z3(E),R=et.forwardRef((I,F)=>{const{scope:H,children:V,...K}=I,z=et.useRef(null),W=Ln(F,z),ae=h(E,H);return et.useEffect(()=>(ae.itemMap.set(z,{ref:z,...K}),()=>{ae.itemMap.delete(z)})),c.jsx(k,{[A]:"",ref:W,children:V})});R.displayName=E;function M(I){const F=h(e+"CollectionConsumer",I);return et.useCallback(()=>{const V=F.collectionRef.current;if(!V)return[];const K=Array.from(V.querySelectorAll(`[${A}]`));return Array.from(F.itemMap.values()).sort((ae,Q)=>K.indexOf(ae.ref.current)-K.indexOf(Q.ref.current))},[F.collectionRef,F.itemMap])}return[{Provider:m,Slot:w,ItemSlot:R},M,o]}var Ave=T.createContext(void 0);function g$(e){const r=T.useContext(Ave);return e||r||"ltr"}function Ove(e){const r=kve(e),s=T.forwardRef((o,u)=>{const{children:h,...m}=o,g=T.Children.toArray(h),b=g.find(Tve);if(b){const w=b.props.children,E=g.map(A=>A===b?T.Children.count(w)>1?T.Children.only(null):T.isValidElement(w)?w.props.children:null:A);return c.jsx(r,{...m,ref:u,children:T.isValidElement(w)?T.cloneElement(w,void 0,E):null})}return c.jsx(r,{...m,ref:u,children:h})});return s.displayName=`${e}.Slot`,s}function kve(e){const r=T.forwardRef((s,o)=>{const{children:u,...h}=s;if(T.isValidElement(u)){const m=$ve(u),g=_ve(h,u.props);return u.type!==T.Fragment&&(g.ref=o?Gi(o,m):m),T.cloneElement(u,g)}return T.Children.count(u)>1?T.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Rve=Symbol("radix.slottable");function Tve(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rve}function _ve(e,r){const s={...r};for(const o in r){const u=e[o],h=r[o];/^on[A-Z]/.test(o)?u&&h?s[o]=(...g)=>{const b=h(...g);return u(...g),b}:u&&(s[o]=u):o==="style"?s[o]={...u,...h}:o==="className"&&(s[o]=[u,h].filter(Boolean).join(" "))}return{...e,...s}}function $ve(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}function Y6(e){const r=T.useRef({value:e,previous:e});return T.useMemo(()=>(r.current.value!==e&&(r.current.previous=r.current.value,r.current.value=e),r.current.previous),[e])}var Nve=[" ","Enter","ArrowUp","ArrowDown"],Dve=[" ","Enter"],Mp="Select",[nA,rA,Pve]=m$(Mp),[Bg]=cl(Mp,[Pve,Yd]),sA=Yd(),[Mve,th]=Bg(Mp),[Ive,zve]=Bg(Mp),Z6=e=>{const{__scopeSelect:r,children:s,open:o,defaultOpen:u,onOpenChange:h,value:m,defaultValue:g,onValueChange:b,dir:w,name:E,autoComplete:A,disabled:k,required:R,form:M}=e,I=sA(r),[F,H]=T.useState(null),[V,K]=T.useState(null),[z,W]=T.useState(!1),ae=g$(w),[Q,te]=Kd({prop:o,defaultProp:u??!1,onChange:h,caller:Mp}),[de,je]=Kd({prop:m,defaultProp:g,onChange:b,caller:Mp}),we=T.useRef(null),ie=F?M||!!F.closest("form"):!0,[Se,Ae]=T.useState(new Set),He=Array.from(Se).map(ue=>ue.props.value).join(";");return c.jsx(TC,{...I,children:c.jsxs(Mve,{required:R,scope:r,trigger:F,onTriggerChange:H,valueNode:V,onValueNodeChange:K,valueNodeHasChildren:z,onValueNodeHasChildrenChange:W,contentId:Ys(),value:de,onValueChange:je,open:Q,onOpenChange:te,dir:ae,triggerPointerDownPosRef:we,disabled:k,children:[c.jsx(nA.Provider,{scope:r,children:c.jsx(Ive,{scope:e.__scopeSelect,onNativeOptionAdd:T.useCallback(ue=>{Ae(ne=>new Set(ne).add(ue))},[]),onNativeOptionRemove:T.useCallback(ue=>{Ae(ne=>{const ce=new Set(ne);return ce.delete(ue),ce})},[]),children:s})}),ie?c.jsxs(vq,{"aria-hidden":!0,required:R,tabIndex:-1,name:E,autoComplete:A,value:de,onChange:ue=>je(ue.target.value),disabled:k,form:M,children:[de===void 0?c.jsx("option",{value:""}):null,Array.from(Se)]},He):null]})})};Z6.displayName=Mp;var J6="SelectTrigger",W6=T.forwardRef((e,r)=>{const{__scopeSelect:s,disabled:o=!1,...u}=e,h=sA(s),m=th(J6,s),g=m.disabled||o,b=Ln(r,m.onTriggerChange),w=rA(s),E=T.useRef("touch"),[A,k,R]=bq(I=>{const F=w().filter(K=>!K.disabled),H=F.find(K=>K.value===m.value),V=wq(F,I,H);V!==void 0&&m.onValueChange(V.value)}),M=I=>{g||(m.onOpenChange(!0),R()),I&&(m.triggerPointerDownPosRef.current={x:Math.round(I.pageX),y:Math.round(I.pageY)})};return c.jsx(ow,{asChild:!0,...h,children:c.jsx(An.button,{type:"button",role:"combobox","aria-controls":m.contentId,"aria-expanded":m.open,"aria-required":m.required,"aria-autocomplete":"none",dir:m.dir,"data-state":m.open?"open":"closed",disabled:g,"data-disabled":g?"":void 0,"data-placeholder":xq(m.value)?"":void 0,...u,ref:b,onClick:Nt(u.onClick,I=>{I.currentTarget.focus(),E.current!=="mouse"&&M(I)}),onPointerDown:Nt(u.onPointerDown,I=>{E.current=I.pointerType;const F=I.target;F.hasPointerCapture(I.pointerId)&&F.releasePointerCapture(I.pointerId),I.button===0&&I.ctrlKey===!1&&I.pointerType==="mouse"&&(M(I),I.preventDefault())}),onKeyDown:Nt(u.onKeyDown,I=>{const F=A.current!=="";!(I.ctrlKey||I.altKey||I.metaKey)&&I.key.length===1&&k(I.key),!(F&&I.key===" ")&&Nve.includes(I.key)&&(M(),I.preventDefault())})})})});W6.displayName=J6;var Q6="SelectValue",eq=T.forwardRef((e,r)=>{const{__scopeSelect:s,className:o,style:u,children:h,placeholder:m="",...g}=e,b=th(Q6,s),{onValueNodeHasChildrenChange:w}=b,E=h!==void 0,A=Ln(r,b.onValueNodeChange);return Os(()=>{w(E)},[w,E]),c.jsx(An.span,{...g,ref:A,style:{pointerEvents:"none"},children:xq(b.value)?c.jsx(c.Fragment,{children:m}):h})});eq.displayName=Q6;var Lve="SelectIcon",tq=T.forwardRef((e,r)=>{const{__scopeSelect:s,children:o,...u}=e;return c.jsx(An.span,{"aria-hidden":!0,...u,ref:r,children:o||"▼"})});tq.displayName=Lve;var Fve="SelectPortal",nq=e=>c.jsx(Mg,{asChild:!0,...e});nq.displayName=Fve;var Ip="SelectContent",rq=T.forwardRef((e,r)=>{const s=th(Ip,e.__scopeSelect),[o,u]=T.useState();if(Os(()=>{u(new DocumentFragment)},[]),!s.open){const h=o;return h?SC.createPortal(c.jsx(sq,{scope:e.__scopeSelect,children:c.jsx(nA.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),h):null}return c.jsx(iq,{...e,ref:r})});rq.displayName=Ip;var Wo=10,[sq,nh]=Bg(Ip),qve="SelectContentImpl",Bve=Ove("SelectContent.RemoveScroll"),iq=T.forwardRef((e,r)=>{const{__scopeSelect:s,position:o="item-aligned",onCloseAutoFocus:u,onEscapeKeyDown:h,onPointerDownOutside:m,side:g,sideOffset:b,align:w,alignOffset:E,arrowPadding:A,collisionBoundary:k,collisionPadding:R,sticky:M,hideWhenDetached:I,avoidCollisions:F,...H}=e,V=th(Ip,s),[K,z]=T.useState(null),[W,ae]=T.useState(null),Q=Ln(r,Fe=>z(Fe)),[te,de]=T.useState(null),[je,we]=T.useState(null),ie=rA(s),[Se,Ae]=T.useState(!1),He=T.useRef(!1);T.useEffect(()=>{if(K)return IC(K)},[K]),PC();const ue=T.useCallback(Fe=>{const[at,...gt]=ie().map(Rt=>Rt.ref.current),[Ot]=gt.slice(-1),Lt=document.activeElement;for(const Rt of Fe)if(Rt===Lt||(Rt?.scrollIntoView({block:"nearest"}),Rt===at&&W&&(W.scrollTop=0),Rt===Ot&&W&&(W.scrollTop=W.scrollHeight),Rt?.focus(),document.activeElement!==Lt))return},[ie,W]),ne=T.useCallback(()=>ue([te,K]),[ue,te,K]);T.useEffect(()=>{Se&&ne()},[Se,ne]);const{onOpenChange:ce,triggerPointerDownPosRef:$e}=V;T.useEffect(()=>{if(K){let Fe={x:0,y:0};const at=Ot=>{Fe={x:Math.abs(Math.round(Ot.pageX)-($e.current?.x??0)),y:Math.abs(Math.round(Ot.pageY)-($e.current?.y??0))}},gt=Ot=>{Fe.x<=10&&Fe.y<=10?Ot.preventDefault():K.contains(Ot.target)||ce(!1),document.removeEventListener("pointermove",at),$e.current=null};return $e.current!==null&&(document.addEventListener("pointermove",at),document.addEventListener("pointerup",gt,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",at),document.removeEventListener("pointerup",gt,{capture:!0})}}},[K,ce,$e]),T.useEffect(()=>{const Fe=()=>ce(!1);return window.addEventListener("blur",Fe),window.addEventListener("resize",Fe),()=>{window.removeEventListener("blur",Fe),window.removeEventListener("resize",Fe)}},[ce]);const[me,Xe]=bq(Fe=>{const at=ie().filter(Lt=>!Lt.disabled),gt=at.find(Lt=>Lt.ref.current===document.activeElement),Ot=wq(at,Fe,gt);Ot&&setTimeout(()=>Ot.ref.current.focus())}),Oe=T.useCallback((Fe,at,gt)=>{const Ot=!He.current&&!gt;(V.value!==void 0&&V.value===at||Ot)&&(de(Fe),Ot&&(He.current=!0))},[V.value]),Te=T.useCallback(()=>K?.focus(),[K]),Ke=T.useCallback((Fe,at,gt)=>{const Ot=!He.current&&!gt;(V.value!==void 0&&V.value===at||Ot)&&we(Fe)},[V.value]),se=o==="popper"?R_:aq,Ne=se===R_?{side:g,sideOffset:b,align:w,alignOffset:E,arrowPadding:A,collisionBoundary:k,collisionPadding:R,sticky:M,hideWhenDetached:I,avoidCollisions:F}:{};return c.jsx(sq,{scope:s,content:K,viewport:W,onViewportChange:ae,itemRefCallback:Oe,selectedItem:te,onItemLeave:Te,itemTextRefCallback:Ke,focusSelectedItem:ne,selectedItemText:je,position:o,isPositioned:Se,searchRef:me,children:c.jsx(hw,{as:Bve,allowPinchZoom:!0,children:c.jsx(dw,{asChild:!0,trapped:V.open,onMountAutoFocus:Fe=>{Fe.preventDefault()},onUnmountAutoFocus:Nt(u,Fe=>{V.trigger?.focus({preventScroll:!0}),Fe.preventDefault()}),children:c.jsx(Ng,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:Fe=>Fe.preventDefault(),onDismiss:()=>V.onOpenChange(!1),children:c.jsx(se,{role:"listbox",id:V.contentId,"data-state":V.open?"open":"closed",dir:V.dir,onContextMenu:Fe=>Fe.preventDefault(),...H,...Ne,onPlaced:()=>Ae(!0),ref:Q,style:{display:"flex",flexDirection:"column",outline:"none",...H.style},onKeyDown:Nt(H.onKeyDown,Fe=>{const at=Fe.ctrlKey||Fe.altKey||Fe.metaKey;if(Fe.key==="Tab"&&Fe.preventDefault(),!at&&Fe.key.length===1&&Xe(Fe.key),["ArrowUp","ArrowDown","Home","End"].includes(Fe.key)){let Ot=ie().filter(Lt=>!Lt.disabled).map(Lt=>Lt.ref.current);if(["ArrowUp","End"].includes(Fe.key)&&(Ot=Ot.slice().reverse()),["ArrowUp","ArrowDown"].includes(Fe.key)){const Lt=Fe.target,Rt=Ot.indexOf(Lt);Ot=Ot.slice(Rt+1)}setTimeout(()=>ue(Ot)),Fe.preventDefault()}})})})})})})});iq.displayName=qve;var Uve="SelectItemAlignedPosition",aq=T.forwardRef((e,r)=>{const{__scopeSelect:s,onPlaced:o,...u}=e,h=th(Ip,s),m=nh(Ip,s),[g,b]=T.useState(null),[w,E]=T.useState(null),A=Ln(r,Q=>E(Q)),k=rA(s),R=T.useRef(!1),M=T.useRef(!0),{viewport:I,selectedItem:F,selectedItemText:H,focusSelectedItem:V}=m,K=T.useCallback(()=>{if(h.trigger&&h.valueNode&&g&&w&&I&&F&&H){const Q=h.trigger.getBoundingClientRect(),te=w.getBoundingClientRect(),de=h.valueNode.getBoundingClientRect(),je=H.getBoundingClientRect();if(h.dir!=="rtl"){const Lt=je.left-te.left,Rt=de.left-Lt,Ft=Q.left-Rt,qe=Q.width+Ft,Bt=Math.max(qe,te.width),kt=window.innerWidth-Wo,G=I3(Rt,[Wo,Math.max(Wo,kt-Bt)]);g.style.minWidth=qe+"px",g.style.left=G+"px"}else{const Lt=te.right-je.right,Rt=window.innerWidth-de.right-Lt,Ft=window.innerWidth-Q.right-Rt,qe=Q.width+Ft,Bt=Math.max(qe,te.width),kt=window.innerWidth-Wo,G=I3(Rt,[Wo,Math.max(Wo,kt-Bt)]);g.style.minWidth=qe+"px",g.style.right=G+"px"}const we=k(),ie=window.innerHeight-Wo*2,Se=I.scrollHeight,Ae=window.getComputedStyle(w),He=parseInt(Ae.borderTopWidth,10),ue=parseInt(Ae.paddingTop,10),ne=parseInt(Ae.borderBottomWidth,10),ce=parseInt(Ae.paddingBottom,10),$e=He+ue+Se+ce+ne,me=Math.min(F.offsetHeight*5,$e),Xe=window.getComputedStyle(I),Oe=parseInt(Xe.paddingTop,10),Te=parseInt(Xe.paddingBottom,10),Ke=Q.top+Q.height/2-Wo,se=ie-Ke,Ne=F.offsetHeight/2,Fe=F.offsetTop+Ne,at=He+ue+Fe,gt=$e-at;if(at<=Ke){const Lt=we.length>0&&F===we[we.length-1].ref.current;g.style.bottom="0px";const Rt=w.clientHeight-I.offsetTop-I.offsetHeight,Ft=Math.max(se,Ne+(Lt?Te:0)+Rt+ne),qe=at+Ft;g.style.height=qe+"px"}else{const Lt=we.length>0&&F===we[0].ref.current;g.style.top="0px";const Ft=Math.max(Ke,He+I.offsetTop+(Lt?Oe:0)+Ne)+gt;g.style.height=Ft+"px",I.scrollTop=at-Ke+I.offsetTop}g.style.margin=`${Wo}px 0`,g.style.minHeight=me+"px",g.style.maxHeight=ie+"px",o?.(),requestAnimationFrame(()=>R.current=!0)}},[k,h.trigger,h.valueNode,g,w,I,F,H,h.dir,o]);Os(()=>K(),[K]);const[z,W]=T.useState();Os(()=>{w&&W(window.getComputedStyle(w).zIndex)},[w]);const ae=T.useCallback(Q=>{Q&&M.current===!0&&(K(),V?.(),M.current=!1)},[K,V]);return c.jsx(Vve,{scope:s,contentWrapper:g,shouldExpandOnScrollRef:R,onScrollButtonChange:ae,children:c.jsx("div",{ref:b,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:z},children:c.jsx(An.div,{...u,ref:A,style:{boxSizing:"border-box",maxHeight:"100%",...u.style}})})})});aq.displayName=Uve;var Kve="SelectPopperPosition",R_=T.forwardRef((e,r)=>{const{__scopeSelect:s,align:o="start",collisionPadding:u=Wo,...h}=e,m=sA(s);return c.jsx(_C,{...m,...h,ref:r,align:o,collisionPadding:u,style:{boxSizing:"border-box",...h.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});R_.displayName=Kve;var[Vve,y$]=Bg(Ip,{}),T_="SelectViewport",oq=T.forwardRef((e,r)=>{const{__scopeSelect:s,nonce:o,...u}=e,h=nh(T_,s),m=y$(T_,s),g=Ln(r,h.onViewportChange),b=T.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),c.jsx(nA.Slot,{scope:s,children:c.jsx(An.div,{"data-radix-select-viewport":"",role:"presentation",...u,ref:g,style:{position:"relative",flex:1,overflow:"hidden auto",...u.style},onScroll:Nt(u.onScroll,w=>{const E=w.currentTarget,{contentWrapper:A,shouldExpandOnScrollRef:k}=m;if(k?.current&&A){const R=Math.abs(b.current-E.scrollTop);if(R>0){const M=window.innerHeight-Wo*2,I=parseFloat(A.style.minHeight),F=parseFloat(A.style.height),H=Math.max(I,F);if(H<M){const V=H+R,K=Math.min(M,V),z=V-K;A.style.height=K+"px",A.style.bottom==="0px"&&(E.scrollTop=z>0?z:0,A.style.justifyContent="flex-end")}}}b.current=E.scrollTop})})})]})});oq.displayName=T_;var lq="SelectGroup",[Hve,Gve]=Bg(lq),Xve=T.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,u=Ys();return c.jsx(Hve,{scope:s,id:u,children:c.jsx(An.div,{role:"group","aria-labelledby":u,...o,ref:r})})});Xve.displayName=lq;var cq="SelectLabel",Yve=T.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,u=Gve(cq,s);return c.jsx(An.div,{id:u.id,...o,ref:r})});Yve.displayName=cq;var cC="SelectItem",[Zve,uq]=Bg(cC),dq=T.forwardRef((e,r)=>{const{__scopeSelect:s,value:o,disabled:u=!1,textValue:h,...m}=e,g=th(cC,s),b=nh(cC,s),w=g.value===o,[E,A]=T.useState(h??""),[k,R]=T.useState(!1),M=Ln(r,V=>b.itemRefCallback?.(V,o,u)),I=Ys(),F=T.useRef("touch"),H=()=>{u||(g.onValueChange(o),g.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(Zve,{scope:s,value:o,disabled:u,textId:I,isSelected:w,onItemTextChange:T.useCallback(V=>{A(K=>K||(V?.textContent??"").trim())},[]),children:c.jsx(nA.ItemSlot,{scope:s,value:o,disabled:u,textValue:E,children:c.jsx(An.div,{role:"option","aria-labelledby":I,"data-highlighted":k?"":void 0,"aria-selected":w&&k,"data-state":w?"checked":"unchecked","aria-disabled":u||void 0,"data-disabled":u?"":void 0,tabIndex:u?void 0:-1,...m,ref:M,onFocus:Nt(m.onFocus,()=>R(!0)),onBlur:Nt(m.onBlur,()=>R(!1)),onClick:Nt(m.onClick,()=>{F.current!=="mouse"&&H()}),onPointerUp:Nt(m.onPointerUp,()=>{F.current==="mouse"&&H()}),onPointerDown:Nt(m.onPointerDown,V=>{F.current=V.pointerType}),onPointerMove:Nt(m.onPointerMove,V=>{F.current=V.pointerType,u?b.onItemLeave?.():F.current==="mouse"&&V.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Nt(m.onPointerLeave,V=>{V.currentTarget===document.activeElement&&b.onItemLeave?.()}),onKeyDown:Nt(m.onKeyDown,V=>{b.searchRef?.current!==""&&V.key===" "||(Dve.includes(V.key)&&H(),V.key===" "&&V.preventDefault())})})})})});dq.displayName=cC;var Nb="SelectItemText",hq=T.forwardRef((e,r)=>{const{__scopeSelect:s,className:o,style:u,...h}=e,m=th(Nb,s),g=nh(Nb,s),b=uq(Nb,s),w=zve(Nb,s),[E,A]=T.useState(null),k=Ln(r,H=>A(H),b.onItemTextChange,H=>g.itemTextRefCallback?.(H,b.value,b.disabled)),R=E?.textContent,M=T.useMemo(()=>c.jsx("option",{value:b.value,disabled:b.disabled,children:R},b.value),[b.disabled,b.value,R]),{onNativeOptionAdd:I,onNativeOptionRemove:F}=w;return Os(()=>(I(M),()=>F(M)),[I,F,M]),c.jsxs(c.Fragment,{children:[c.jsx(An.span,{id:b.textId,...h,ref:k}),b.isSelected&&m.valueNode&&!m.valueNodeHasChildren?SC.createPortal(h.children,m.valueNode):null]})});hq.displayName=Nb;var pq="SelectItemIndicator",fq=T.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e;return uq(pq,s).isSelected?c.jsx(An.span,{"aria-hidden":!0,...o,ref:r}):null});fq.displayName=pq;var __="SelectScrollUpButton",mq=T.forwardRef((e,r)=>{const s=nh(__,e.__scopeSelect),o=y$(__,e.__scopeSelect),[u,h]=T.useState(!1),m=Ln(r,o.onScrollButtonChange);return Os(()=>{if(s.viewport&&s.isPositioned){let g=function(){const w=b.scrollTop>0;h(w)};const b=s.viewport;return g(),b.addEventListener("scroll",g),()=>b.removeEventListener("scroll",g)}},[s.viewport,s.isPositioned]),u?c.jsx(yq,{...e,ref:m,onAutoScroll:()=>{const{viewport:g,selectedItem:b}=s;g&&b&&(g.scrollTop=g.scrollTop-b.offsetHeight)}}):null});mq.displayName=__;var $_="SelectScrollDownButton",gq=T.forwardRef((e,r)=>{const s=nh($_,e.__scopeSelect),o=y$($_,e.__scopeSelect),[u,h]=T.useState(!1),m=Ln(r,o.onScrollButtonChange);return Os(()=>{if(s.viewport&&s.isPositioned){let g=function(){const w=b.scrollHeight-b.clientHeight,E=Math.ceil(b.scrollTop)<w;h(E)};const b=s.viewport;return g(),b.addEventListener("scroll",g),()=>b.removeEventListener("scroll",g)}},[s.viewport,s.isPositioned]),u?c.jsx(yq,{...e,ref:m,onAutoScroll:()=>{const{viewport:g,selectedItem:b}=s;g&&b&&(g.scrollTop=g.scrollTop+b.offsetHeight)}}):null});gq.displayName=$_;var yq=T.forwardRef((e,r)=>{const{__scopeSelect:s,onAutoScroll:o,...u}=e,h=nh("SelectScrollButton",s),m=T.useRef(null),g=rA(s),b=T.useCallback(()=>{m.current!==null&&(window.clearInterval(m.current),m.current=null)},[]);return T.useEffect(()=>()=>b(),[b]),Os(()=>{g().find(E=>E.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[g]),c.jsx(An.div,{"aria-hidden":!0,...u,ref:r,style:{flexShrink:0,...u.style},onPointerDown:Nt(u.onPointerDown,()=>{m.current===null&&(m.current=window.setInterval(o,50))}),onPointerMove:Nt(u.onPointerMove,()=>{h.onItemLeave?.(),m.current===null&&(m.current=window.setInterval(o,50))}),onPointerLeave:Nt(u.onPointerLeave,()=>{b()})})}),Jve="SelectSeparator",Wve=T.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e;return c.jsx(An.div,{"aria-hidden":!0,...o,ref:r})});Wve.displayName=Jve;var N_="SelectArrow",Qve=T.forwardRef((e,r)=>{const{__scopeSelect:s,...o}=e,u=sA(s),h=th(N_,s),m=nh(N_,s);return h.open&&m.position==="popper"?c.jsx($C,{...u,...o,ref:r}):null});Qve.displayName=N_;var exe="SelectBubbleInput",vq=T.forwardRef(({__scopeSelect:e,value:r,...s},o)=>{const u=T.useRef(null),h=Ln(o,u),m=Y6(r);return T.useEffect(()=>{const g=u.current;if(!g)return;const b=window.HTMLSelectElement.prototype,E=Object.getOwnPropertyDescriptor(b,"value").set;if(m!==r&&E){const A=new Event("change",{bubbles:!0});E.call(g,r),g.dispatchEvent(A)}},[m,r]),c.jsx(An.select,{...s,style:{...hL,...s.style},ref:h,defaultValue:r})});vq.displayName=exe;function xq(e){return e===""||e===void 0}function bq(e){const r=sl(e),s=T.useRef(""),o=T.useRef(0),u=T.useCallback(m=>{const g=s.current+m;r(g),(function b(w){s.current=w,window.clearTimeout(o.current),w!==""&&(o.current=window.setTimeout(()=>b(""),1e3))})(g)},[r]),h=T.useCallback(()=>{s.current="",window.clearTimeout(o.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(o.current),[]),[s,u,h]}function wq(e,r,s){const u=r.length>1&&Array.from(r).every(w=>w===r[0])?r[0]:r,h=s?e.indexOf(s):-1;let m=txe(e,Math.max(h,0));u.length===1&&(m=m.filter(w=>w!==s));const b=m.find(w=>w.textValue.toLowerCase().startsWith(u.toLowerCase()));return b!==s?b:void 0}function txe(e,r){return e.map((s,o)=>e[(r+o)%e.length])}var nxe=Z6,rxe=W6,sxe=eq,ixe=tq,axe=nq,oxe=rq,lxe=oq,cxe=dq,uxe=hq,dxe=fq,hxe=mq,pxe=gq;function _n({...e}){return c.jsx(nxe,{"data-slot":"select",...e})}function $n({...e}){return c.jsx(sxe,{"data-slot":"select-value",...e})}function Nn({className:e,size:r="default",children:s,...o}){return c.jsxs(rxe,{"data-slot":"select-trigger","data-size":r,className:vt("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[s,c.jsx(ixe,{asChild:!0,children:c.jsx(yz,{className:"size-4 opacity-50"})})]})}function Dn({className:e,children:r,position:s="popper",align:o="center",...u}){return c.jsx(axe,{children:c.jsxs(oxe,{"data-slot":"select-content",className:vt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,align:o,...u,children:[c.jsx(fxe,{}),c.jsx(lxe,{className:vt("p-1",s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),c.jsx(mxe,{})]})})}function Ct({className:e,children:r,...s}){return c.jsxs(cxe,{"data-slot":"select-item",className:vt("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[c.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(dxe,{children:c.jsx(gz,{className:"size-4"})})}),c.jsx(uxe,{children:r})]})}function fxe({className:e,...r}){return c.jsx(hxe,{"data-slot":"select-scroll-up-button",className:vt("flex cursor-default items-center justify-center py-1",e),...r,children:c.jsx(UZ,{className:"size-4"})})}function mxe({className:e,...r}){return c.jsx(pxe,{"data-slot":"select-scroll-down-button",className:vt("flex cursor-default items-center justify-center py-1",e),...r,children:c.jsx(yz,{className:"size-4"})})}const Sq=Is({name:Sn().trim().min(1,"Name is required").max(120,"Max 120 chars"),cluster_provider:Sn().trim().min(1,"Provider is required").max(120,"Max 120 chars"),region:Sn().trim().min(1,"Region is required").max(120,"Max 120 chars"),docker_image:Sn().trim().min(1,"Docker Image is required"),docker_tag:Sn().trim().min(1,"Docker Tag is required")}),gxe=Sq.partial();function Id(e){return Array.isArray(e)?e:Array.isArray(e?.data)?e.data:Array.isArray(e?.body)?e.body:Array.isArray(e?.result)?e.result:[]}function yxe(e){return e?.data&&typeof e.data=="object"?e.data:e}function vxe({status:e}){const r=(e??"").toLowerCase();return r?r==="ready"?c.jsxs(rr,{variant:"default",className:"flex items-center gap-1 text-xs",children:[c.jsx(EC,{className:"h-3 w-3"}),"ready"]}):r==="failed"?c.jsxs(rr,{variant:"destructive",className:"flex items-center gap-1 text-xs",children:[c.jsx(Dj,{className:"h-3 w-3"}),"failed"]}):r==="provisioning"||r==="pending"||r==="pre_pending"?c.jsxs(rr,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[c.jsx(ys,{className:"h-3 w-3 animate-spin"}),r.replace("_"," ")]}):r==="incomplete"?c.jsxs(rr,{variant:"outline",className:"flex items-center gap-1 text-xs",children:[c.jsx(Dj,{className:"h-3 w-3"}),"incomplete"]}):c.jsx(rr,{variant:"outline",className:"text-xs",children:r}):c.jsx(rr,{variant:"outline",className:"text-xs",children:"unknown"})}function xxe({status:e}){const r=(e??"").toLowerCase();return r?r==="succeeded"||r==="success"?c.jsxs(rr,{variant:"default",className:"flex items-center gap-1 text-xs",children:[c.jsx(EC,{className:"h-3 w-3"}),"succeeded"]}):r==="failed"||r==="error"?c.jsxs(rr,{variant:"destructive",className:"flex items-center gap-1 text-xs",children:[c.jsx(Dj,{className:"h-3 w-3"}),"failed"]}):r==="queued"||r==="running"?c.jsxs(rr,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[c.jsx(ys,{className:"h-3 w-3 animate-spin"}),r]}):c.jsx(rr,{variant:"outline",className:"text-xs",children:r}):c.jsx(rr,{variant:"outline",className:"text-xs",children:"unknown"})}function L3(e){if(!e)return"-";try{const r=e instanceof Date?e:new Date(e);return Number.isNaN(r.getTime())?"-":r.toLocaleString()}catch{return"-"}}function bxe({c:e}){return c.jsxs("div",{className:"text-muted-foreground flex flex-col gap-1 text-xs",children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.cluster_provider&&c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(sJ,{className:"h-3 w-3"}),e.cluster_provider]}),e.region&&c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx(EJ,{className:"h-3 w-3"}),e.region]})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2 font-mono",children:[e.random_token&&c.jsxs("span",{children:["token: ",c.jsx("span",{className:"ml-1",children:za(e.random_token,8)})]}),e.certificate_key&&c.jsxs("span",{children:["cert: ",c.jsx("span",{className:"ml-1",children:za(e.certificate_key,8)})]})]})]})}const wxe=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(null),[b,w]=T.useState(null),[E,A]=T.useState(null),[k,R]=T.useState(""),[M,I]=T.useState(""),[F,H]=T.useState(""),[V,K]=T.useState(""),[z,W]=T.useState(""),[ae,Q]=T.useState(""),[te,de]=T.useState(""),[je,we]=T.useState(null),ie=fe=>je===fe,Se=Ms(),Ae=Un({queryKey:["clusters"],queryFn:async()=>Id(await rs.listClusters())}),He=Un({queryKey:["load-balancers"],queryFn:async()=>Id(await $b.listLoadBalancers())}),ue=Un({queryKey:["domains"],queryFn:async()=>Id(await sc.listDomains())}),ne=Un({queryKey:["record-sets",k],enabled:!!k,queryFn:async()=>Id(await sc.listRecordSetsByDomain(k))}),ce=Un({queryKey:["servers"],queryFn:async()=>Id(await mg.listServers())}),$e=Un({queryKey:["node-pools"],queryFn:async()=>Id(await Na.listNodePools())}),me=Un({queryKey:["actions"],queryFn:async()=>Id(await kb.listActions())}),Xe=Un({queryKey:["cluster-runs",E?.id],enabled:!!E?.id,queryFn:async()=>Id(await rs.listClusterRuns(E.id)),refetchInterval:fe=>(Array.isArray(fe)?fe:[]).some(Gt=>{const ss=String(Gt?.status??"").toLowerCase();return ss==="queued"||ss==="running"})?2e3:!1}),Oe=T.useMemo(()=>{const fe=new Map;return(me.data??[]).forEach(Ut=>{Ut.make_target&&fe.set(Ut.make_target,Ut.label??Ut.make_target)}),fe},[me.data]),Te=fe=>Oe.get(fe.action??"")??fe.action??"unknown",Ke=hr({resolver:fr(Sq),defaultValues:{name:"",cluster_provider:"",region:"",docker_image:"",docker_tag:""}}),se=Wt({mutationFn:fe=>rs.createCluster(fe),onSuccess:async()=>{await Se.invalidateQueries({queryKey:["clusters"]}),Ke.reset(),o(!1),Ge.success("Cluster created successfully.")},onError:fe=>Ge.error(fe?.message??"There was an error while creating the cluster")}),Ne=hr({resolver:fr(gxe),defaultValues:{}}),Fe=Wt({mutationFn:({id:fe,values:Ut})=>rs.updateCluster(fe,Ut),onSuccess:async()=>{await Se.invalidateQueries({queryKey:["clusters"]}),Ne.reset(),h(!1),Ge.success("Cluster updated successfully.")},onError:fe=>Ge.error(fe?.message??"There was an error while updating the cluster")}),at=fe=>{fe.id&&(w(fe.id),Ne.reset({name:fe.name??"",cluster_provider:fe.cluster_provider??"",region:fe.region??"",docker_image:fe.docker_image??"",docker_tag:fe.docker_tag??""}),h(!0))},gt=Wt({mutationFn:fe=>rs.deleteCluster(fe),onSuccess:async()=>{await Se.invalidateQueries({queryKey:["clusters"]}),g(null),Ge.success("Cluster deleted successfully.")},onError:fe=>Ge.error(fe?.message??"There was an error while deleting the cluster")}),Ot=Wt({mutationFn:({clusterID:fe,actionID:Ut})=>rs.runClusterAction(fe,Ut),onSuccess:async()=>{await Se.invalidateQueries({queryKey:["cluster-runs",E?.id]}),Ge.success("Action enqueued.")},onError:fe=>Ge.error(fe?.message??"Failed to enqueue action.")});async function Lt(fe){if(E?.id){we(`run:${fe}`);try{await Ot.mutateAsync({clusterID:E.id,actionID:fe})}finally{we(null)}}}const Rt=T.useMemo(()=>{const fe=Ae.data??[],Ut=e.trim().toLowerCase();return Ut?fe.filter(nn=>nn.name?.toLowerCase().includes(Ut)||nn.cluster_provider?.toLowerCase().includes(Ut)||nn.region?.toLowerCase().includes(Ut)||nn.status?.toLowerCase().includes(Ut)):fe},[e,Ae.data]);T.useEffect(()=>{if(!E){R(""),I(""),H(""),K(""),W(""),Q(""),de("");return}E.captain_domain?.id&&R(E.captain_domain.id),E.control_plane_record_set?.id&&I(E.control_plane_record_set.id),E.apps_load_balancer?.id&&H(E.apps_load_balancer.id),E.glueops_load_balancer?.id&&K(E.glueops_load_balancer.id),E.bastion_server?.id&&W(E.bastion_server.id)},[E]);async function Ft(){if(E?.id)try{const fe=await rs.getCluster(E.id),Ut=yxe(fe);A(Ut),await Se.invalidateQueries({queryKey:["clusters"]}),await Se.invalidateQueries({queryKey:["cluster-runs",E.id]})}catch{}}async function qe(){if(E?.id){if(!k)return Ge.error("Domain is required");we("captain");try{await rs.attachCaptainDomain(E.id,{domain_id:k}),Ge.success("Captain domain attached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to attach captain domain.")}finally{we(null)}}}async function Bt(){if(E?.id){we("captain");try{await rs.detachCaptainDomain(E.id),Ge.success("Captain domain detached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to detach captain domain.")}finally{we(null)}}}async function kt(){if(E?.id){if(!M)return Ge.error("Record set is required");we("recordset");try{await rs.attachControlPlaneRecordSet(E.id,{record_set_id:M}),Ge.success("Control plane record set attached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to attach record set.")}finally{we(null)}}}async function G(){if(E?.id){we("recordset");try{await rs.detachControlPlaneRecordSet(E.id),Ge.success("Control plane record set detached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to detach record set.")}finally{we(null)}}}async function On(){if(E?.id){if(!F)return Ge.error("Load balancer is required");we("apps-lb");try{await rs.attachAppsLoadBalancer(E.id,{load_balancer_id:F}),Ge.success("Apps load balancer attached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to attach apps load balancer.")}finally{we(null)}}}async function mn(){if(E?.id){we("apps-lb");try{await rs.detachAppsLoadBalancer(E.id),Ge.success("Apps load balancer detached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to detach apps load balancer.")}finally{we(null)}}}async function Oi(){if(E?.id){if(!V)return Ge.error("Load balancer is required");we("glueops-lb");try{await rs.attachGlueOpsLoadBalancer(E.id,{load_balancer_id:V}),Ge.success("GlueOps load balancer attached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to attach GlueOps load balancer.")}finally{we(null)}}}async function ge(){if(E?.id){we("glueops-lb");try{await rs.detachGlueOpsLoadBalancer(E.id),Ge.success("GlueOps load balancer detached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to detach GlueOps load balancer.")}finally{we(null)}}}async function Me(){if(E?.id){if(!z)return Ge.error("Server is required");we("bastion");try{await rs.attachBastion(E.id,{server_id:z}),Ge.success("Bastion server attached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to attach bastion server.")}finally{we(null)}}}async function _(){if(E?.id){we("bastion");try{await rs.detachBastion(E.id),Ge.success("Bastion server detached."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to detach bastion server.")}finally{we(null)}}}async function q(){if(E?.id){if(!ae)return Ge.error("Node pool is required");we("nodepool");try{await rs.attachNodePool(E.id,ae),Ge.success("Node pool attached."),Q(""),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to attach node pool.")}finally{we(null)}}}async function X(fe){if(E?.id){we("nodepool");try{await rs.detachNodePool(E.id,fe),Ge.success("Node pool detached."),await Ft()}catch(Ut){Ge.error(Ut?.message??"Failed to detach node pool.")}finally{we(null)}}}async function oe(){if(E?.id){if(!te.trim())return Ge.error("Kubeconfig is required");we("kubeconfig");try{await rs.setKubeconfig(E.id,{kubeconfig:te}),Ge.success("Kubeconfig updated."),de(""),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to set kubeconfig.")}finally{we(null)}}}async function ve(){if(E?.id){we("kubeconfig");try{await rs.clearKubeconfig(E.id),Ge.success("Kubeconfig cleared."),await Ft()}catch(fe){Ge.error(fe?.message??"Failed to clear kubeconfig.")}finally{we(null)}}}if(Ae.isLoading)return c.jsx("div",{className:"p-6",children:"Loading clusters…"});if(Ae.error)return c.jsx("div",{className:"p-6 text-red-500",children:"Error loading clusters."});const Re=He.data??[],Je=Re.filter(fe=>fe.kind==="public"),Tt=Re.filter(fe=>fe.kind==="glueops");return c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Clusters"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:fe=>r(fe.target.value),placeholder:"Search clusters",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Cluster"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create Cluster"})}),c.jsx(mr,{...Ke,children:c.jsxs("form",{className:"space-y-4",onSubmit:Ke.handleSubmit(fe=>se.mutate(fe)),children:[c.jsx(ft,{control:Ke.control,name:"name",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"prod-cluster-eu-west-1",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ke.control,name:"cluster_provider",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Provider"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"aws / hetzner / baremetal",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ke.control,name:"region",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Region"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"eu-west-1",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ke.control,name:"docker_image",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Docker Image"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"ghcr.io/glueops/gluekube",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ke.control,name:"docker_tag",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Docker Tag"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"v1.33",...fe})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:se.isPending,children:se.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Name"}),c.jsx(St,{children:"Provider"}),c.jsx(St,{children:"Region"}),c.jsx(St,{children:"Status"}),c.jsx(St,{children:"Docker"}),c.jsx(St,{children:"Summary"}),c.jsx(St,{className:"w-[320px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[Rt.map(fe=>c.jsxs(Qt,{children:[c.jsx(dt,{className:"font-medium",children:fe.name}),c.jsx(dt,{children:fe.cluster_provider}),c.jsx(dt,{children:fe.region}),c.jsxs(dt,{children:[c.jsx(vxe,{status:fe.status}),fe.last_error&&c.jsx("div",{className:"mt-1 text-xs text-red-500",children:za(fe.last_error,80)})]}),c.jsx(dt,{children:(fe.docker_image??"")+":"+(fe.docker_tag??"")}),c.jsxs(dt,{children:[c.jsx(bxe,{c:fe}),fe.id&&c.jsx("code",{className:"text-muted-foreground mt-1 block text-xs",children:za(fe.id,6)})]}),c.jsx(dt,{children:c.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[c.jsxs(Pe,{variant:"ghost",size:"sm",onClick:()=>A(fe),children:[c.jsx(LM,{className:"mr-1 h-4 w-4"})," Configure"]}),c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>at(fe),children:[c.jsx(uc,{className:"mr-2 h-4 w-4"})," Edit"]}),c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>fe.id&&g(fe.id),disabled:gt.isPending&&m===fe.id,children:gt.isPending&&m===fe.id?"Deleting…":"Delete"})]})})]},fe.id)),Rt.length===0&&c.jsx(Qt,{children:c.jsxs(dt,{colSpan:7,className:"text-muted-foreground py-10 text-center",children:[c.jsx(Rg,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No clusters match your search."]})})]})]})})}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Cluster"})}),c.jsx(mr,{...Ne,children:c.jsxs("form",{className:"space-y-4",onSubmit:Ne.handleSubmit(fe=>{b&&Fe.mutate({id:b,values:fe})}),children:[c.jsx(ft,{control:Ne.control,name:"name",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"prod-cluster-eu-west-1",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ne.control,name:"cluster_provider",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Provider"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"aws / hetzner / baremetal",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ne.control,name:"region",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Region"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"eu-west-1",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ne.control,name:"docker_image",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Docker Image"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"ghcr.io/glueops/gluekube",...fe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ne.control,name:"docker_tag",render:({field:fe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Docker Tag"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"v1.33",...fe})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:Fe.isPending,children:Fe.isPending?"Saving…":"Save changes"})]})]})})]})}),c.jsx(dn,{open:!!E,onOpenChange:fe=>!fe&&A(null),children:c.jsxs(hn,{className:"max-h-[90vh] overflow-y-auto sm:max-w-2xl lg:max-w-250 ",children:[c.jsx(pn,{children:c.jsxs(fn,{children:["Configure Cluster",E?.name?`: ${E.name}`:""]})}),E&&c.jsxs("div",{className:"space-y-6 py-2",children:[c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(LM,{className:"h-4 w-4"}),c.jsx("h3",{className:"text-sm font-semibold",children:"Cluster Actions"})]}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Run admin-configured actions on this cluster. Actions are executed asynchronously."})]}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:()=>Xe.refetch(),disabled:Xe.isFetching||!E?.id,children:Xe.isFetching?"Refreshing…":"Refresh runs"})]}),c.jsx("div",{className:"space-y-2",children:me.isLoading?c.jsx("p",{className:"text-muted-foreground text-xs",children:"Loading actions…"}):(me.data??[]).length===0?c.jsx("p",{className:"text-muted-foreground text-xs",children:"No actions configured yet. Create actions in Admin → Actions."}):c.jsx("div",{className:"divide-border rounded-md border",children:(me.data??[]).map(fe=>c.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2",children:[c.jsxs("div",{className:"flex min-w-0 flex-col",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-sm font-medium",children:fe.label}),fe.make_target&&c.jsx("code",{className:"text-muted-foreground text-xs",children:fe.make_target})]}),fe.description&&c.jsx("p",{className:"text-muted-foreground line-clamp-2 text-xs",children:fe.description})]}),c.jsx(Pe,{size:"sm",onClick:()=>fe.id&&Lt(fe.id),disabled:!fe.id||ie(`run:${fe.id}`),children:fe.id&&ie(`run:${fe.id}`)?"Enqueueing…":"Run"})]},fe.id))})}),c.jsxs("div",{className:"mt-3 space-y-1",children:[c.jsx(Gs,{className:"text-xs",children:"Recent Runs"}),Xe.isLoading?c.jsx("p",{className:"text-muted-foreground text-xs",children:"Loading runs…"}):(Xe.data??[]).length===0?c.jsx("p",{className:"text-muted-foreground text-xs",children:"No runs yet for this cluster."}):c.jsx("div",{className:"overflow-x-auto rounded-md border",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Action"}),c.jsx(St,{children:"Status"}),c.jsx(St,{children:"Created"}),c.jsx(St,{children:"Finished"}),c.jsx(St,{children:"Error"})]})}),c.jsx(Qs,{children:(Xe.data??[]).slice(0,20).map(fe=>c.jsxs(Qt,{children:[c.jsx(dt,{className:"min-w-[220px]",children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{className:"text-sm font-medium",children:Te(fe)}),fe.id&&c.jsx("code",{className:"text-muted-foreground text-xs",children:za(fe.id,8)})]})}),c.jsx(dt,{children:c.jsx(xxe,{status:fe.status})}),c.jsx(dt,{className:"text-xs",children:L3(fe.created_at)}),c.jsx(dt,{className:"text-xs",children:L3(fe.finished_at)}),c.jsx(dt,{className:"text-xs",children:fe.error?za(fe.error,80):"-"})]},fe.id))})]})})]})]}),c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(uJ,{className:"h-4 w-4"}),c.jsx("h3",{className:"text-sm font-semibold",children:"Kubeconfig"})]}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Paste the kubeconfig for this cluster. It will be stored encrypted and never returned by the API."})]}),c.jsx(nl,{value:te,onChange:fe=>de(fe.target.value),rows:6,placeholder:`apiVersion: v1
|
||
clusters:
|
||
- cluster: ...`,className:"font-mono text-xs"}),c.jsxs("div",{className:"flex flex-wrap gap-2",children:[c.jsx(Pe,{size:"sm",onClick:oe,disabled:ie("kubeconfig"),children:ie("kubeconfig")?"Saving…":"Save kubeconfig"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:ve,disabled:ie("kubeconfig"),children:"Clear kubeconfig"})]})]}),c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold",children:"Captain Domain"}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Domain used for the AutoGlue captain endpoint."})]}),c.jsx("div",{className:"text-right text-xs",children:c.jsx("div",{className:"font-mono",children:E.captain_domain?E.captain_domain.domain_name:"Not attached"})})]}),c.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx(Gs,{className:"text-xs",children:"Domain"}),c.jsxs(_n,{value:k,onValueChange:fe=>{R(fe),I("")},children:[c.jsx(Nn,{className:"w-full",children:c.jsx($n,{placeholder:ue.isLoading?"Loading domains…":"Select domain"})}),c.jsx(Dn,{children:(ue.data??[]).map(fe=>c.jsx(Ct,{value:fe.id,children:fe.domain_name},fe.id))})]}),c.jsx("p",{className:"text-muted-foreground mt-1 text-[11px]",children:"Once a domain is attached, control plane record sets for that domain will be available below."})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Pe,{size:"sm",onClick:qe,disabled:ie("captain")||ue.isLoading,children:ie("captain")?"Attaching…":"Attach"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:Bt,disabled:ie("captain")||!E.captain_domain,children:"Detach"})]})]})]}),k&&c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold",children:"Control Plane Record Set"}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"DNS record set used for the cluster control plane endpoint."})]}),c.jsx("div",{className:"text-right text-xs",children:c.jsx("div",{className:"font-mono",children:E.control_plane_record_set?E.control_plane_record_set.name:"Not attached"})})]}),c.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx(Gs,{className:"text-xs",children:"Record Set"}),c.jsxs(_n,{value:M,onValueChange:fe=>I(fe),children:[c.jsx(Nn,{className:"w-full",children:c.jsx($n,{placeholder:ne.isLoading?"Loading record sets…":"Select record set"})}),c.jsx(Dn,{children:(ne.data??[]).map(fe=>c.jsxs(Ct,{value:fe.id,children:[fe.name," · ",fe.type]},fe.id))})]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Pe,{size:"sm",onClick:kt,disabled:ie("recordset")||ne.isLoading,children:ie("recordset")?"Attaching…":"Attach"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:G,disabled:ie("recordset")||!E.control_plane_record_set,children:"Detach"})]})]})]}),c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold",children:"Apps Load Balancer"}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Frontend load balancer for application traffic."})]}),c.jsx("div",{className:"text-right text-xs",children:c.jsx("div",{className:"font-mono",children:E.apps_load_balancer?E.apps_load_balancer.name:"Not attached"})})]}),c.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx(Gs,{className:"text-xs",children:"Apps Load Balancer"}),c.jsxs(_n,{value:F,onValueChange:fe=>H(fe),children:[c.jsx(Nn,{className:"w-full",children:c.jsx($n,{placeholder:He.isLoading?"Loading load balancers…":"Select apps LB"})}),c.jsx(Dn,{children:Je.map(fe=>c.jsxs(Ct,{value:fe.id,children:[fe.name," · ",fe.public_ip_address]},fe.id))})]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Pe,{size:"sm",onClick:On,disabled:ie("apps-lb")||He.isLoading,children:ie("apps-lb")?"Attaching…":"Attach"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:mn,disabled:ie("apps-lb")||!E.apps_load_balancer,children:"Detach"})]})]})]}),c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold",children:"GlueOps / Control-plane Load Balancer"}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Load balancer for GlueOps/control-plane traffic."})]}),c.jsx("div",{className:"text-right text-xs",children:c.jsx("div",{className:"font-mono",children:E.glueops_load_balancer?E.glueops_load_balancer.name:"Not attached"})})]}),c.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx(Gs,{className:"text-xs",children:"GlueOps Load Balancer"}),c.jsxs(_n,{value:V,onValueChange:fe=>K(fe),children:[c.jsx(Nn,{className:"w-full",children:c.jsx($n,{placeholder:He.isLoading?"Loading load balancers…":"Select GlueOps LB"})}),c.jsx(Dn,{children:Tt.map(fe=>c.jsxs(Ct,{value:fe.id,children:[fe.name," · ",fe.private_ip_address]},fe.id))})]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Pe,{size:"sm",onClick:Oi,disabled:ie("glueops-lb")||He.isLoading,children:ie("glueops-lb")?"Attaching…":"Attach"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:ge,disabled:ie("glueops-lb")||!E.glueops_load_balancer,children:"Detach"})]})]})]}),c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(J_,{className:"h-4 w-4"}),c.jsx("h3",{className:"text-sm font-semibold",children:"Bastion Server"})]}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"SSH bastion used to reach the cluster nodes."})]}),c.jsx("div",{className:"text-right text-xs",children:c.jsx("div",{className:"font-mono",children:E.bastion_server?E.bastion_server.hostname??E.bastion_server.id:"Not attached"})})]}),c.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx(Gs,{className:"text-xs",children:"Bastion Server"}),c.jsxs(_n,{value:z,onValueChange:fe=>W(fe),children:[c.jsx(Nn,{className:"w-full",children:c.jsx($n,{placeholder:ce.isLoading?"Loading servers…":"Select server"})}),c.jsx(Dn,{children:(ce.data??[]).map(fe=>c.jsxs(Ct,{value:fe.id,children:[fe.hostname??fe.id," · ",fe.private_ip_address]},fe.id))})]})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Pe,{size:"sm",onClick:Me,disabled:ie("bastion")||ce.isLoading,children:ie("bastion")?"Attaching…":"Attach"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:_,disabled:ie("bastion")||!E.bastion_server,children:"Detach"})]})]})]}),c.jsxs("section",{className:"space-y-2 rounded-xl border p-4",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold",children:"Node Pools"}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"Attach node pools to this cluster. Each node pool may have its own labels, taints, and backing servers."})]}),c.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-end",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx(Gs,{className:"text-xs",children:"Available Node Pools"}),c.jsxs(_n,{value:ae,onValueChange:fe=>Q(fe),children:[c.jsx(Nn,{className:"w-full",children:c.jsx($n,{placeholder:$e.isLoading?"Loading node pools…":"Select node pool"})}),c.jsx(Dn,{children:($e.data??[]).map(fe=>c.jsxs(Ct,{value:fe.id,children:[fe.name," · ",fe.role]},fe.id))})]})]}),c.jsx("div",{className:"flex gap-2",children:c.jsx(Pe,{size:"sm",onClick:q,disabled:ie("nodepool")||$e.isLoading,children:ie("nodepool")?"Attaching…":"Attach"})})]}),c.jsxs("div",{className:"mt-3 space-y-1",children:[c.jsx(Gs,{className:"text-xs",children:"Attached Node Pools"}),E.node_pools&&E.node_pools.length>0?c.jsx("div",{className:"divide-border mt-1 rounded-md border",children:E.node_pools.map(fe=>c.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 text-xs",children:[c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{className:"font-medium",children:fe.name}),c.jsxs("span",{className:"text-muted-foreground",children:["role: ",fe.role," · servers: ",fe.servers?.length??0]})]}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:()=>fe.id&&X(fe.id),disabled:ie("nodepool"),children:"Detach"})]},fe.id))}):c.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:"No node pools attached to this cluster yet."})]})]}),c.jsx(gn,{className:"mt-2",children:c.jsx(Pe,{variant:"outline",onClick:()=>A(null),children:"Close"})})]})]})}),c.jsx(dn,{open:!!m,onOpenChange:fe=>!fe&&g(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete cluster"})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this cluster?"}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>m&>.mutate(m),disabled:gt.isPending,children:gt.isPending?"Deleting…":"Delete"})]})]})})]})},Wm=Nte(),ng={listCredentials:()=>ct(async()=>await Wm.listCredentials()),createCredential:async e=>ct(async()=>await Wm.createCredential({dtoCreateCredentialRequest:e})),getCredential:async e=>ct(async()=>await Wm.getCredential({id:e})),deleteCredential:async e=>ct(async()=>{await Wm.deleteCredential({id:e})}),updateCredential:async(e,r)=>ct(async()=>await Wm.updateCredential({id:e,dtoUpdateCredentialRequest:r})),revealCredential:async e=>ct(async()=>await Wm.revealCredential({id:e}))};var Sxe=Symbol("radix.slottable");function Exe(e){const r=({children:s})=>c.jsx(c.Fragment,{children:s});return r.displayName=`${e}.Slottable`,r.__radixId=Sxe,r}var Eq="AlertDialog",[jxe]=cl(Eq,[IL]),bu=IL(),jq=e=>{const{__scopeAlertDialog:r,...s}=e,o=bu(r);return c.jsx(LC,{...o,...s,modal:!0})};jq.displayName=Eq;var Cxe="AlertDialogTrigger",Cq=T.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,u=bu(s);return c.jsx(QL,{...u,...o,ref:r})});Cq.displayName=Cxe;var Axe="AlertDialogPortal",Aq=e=>{const{__scopeAlertDialog:r,...s}=e,o=bu(r);return c.jsx(FC,{...o,...s})};Aq.displayName=Axe;var Oxe="AlertDialogOverlay",Oq=T.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,u=bu(s);return c.jsx(qC,{...u,...o,ref:r})});Oq.displayName=Oxe;var bg="AlertDialogContent",[kxe,Rxe]=jxe(bg),Txe=Exe("AlertDialogContent"),kq=T.forwardRef((e,r)=>{const{__scopeAlertDialog:s,children:o,...u}=e,h=bu(s),m=T.useRef(null),g=Ln(r,m),b=T.useRef(null);return c.jsx(Iae,{contentName:bg,titleName:Rq,docsSlug:"alert-dialog",children:c.jsx(kxe,{scope:s,cancelRef:b,children:c.jsxs(BC,{role:"alertdialog",...h,...u,ref:g,onOpenAutoFocus:Nt(u.onOpenAutoFocus,w=>{w.preventDefault(),b.current?.focus({preventScroll:!0})}),onPointerDownOutside:w=>w.preventDefault(),onInteractOutside:w=>w.preventDefault(),children:[c.jsx(Txe,{children:o}),c.jsx($xe,{contentRef:m})]})})})});kq.displayName=bg;var Rq="AlertDialogTitle",Tq=T.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,u=bu(s);return c.jsx(g2,{...u,...o,ref:r})});Tq.displayName=Rq;var _q="AlertDialogDescription",$q=T.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,u=bu(s);return c.jsx(y2,{...u,...o,ref:r})});$q.displayName=_q;var _xe="AlertDialogAction",Nq=T.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,u=bu(s);return c.jsx(pw,{...u,...o,ref:r})});Nq.displayName=_xe;var Dq="AlertDialogCancel",Pq=T.forwardRef((e,r)=>{const{__scopeAlertDialog:s,...o}=e,{cancelRef:u}=Rxe(Dq,s),h=bu(s),m=Ln(r,u);return c.jsx(pw,{...h,...o,ref:m})});Pq.displayName=Dq;var $xe=({contentRef:e})=>{const r=`\`${bg}\` requires a description for the component to be accessible for screen reader users.
|
||
|
||
You can add a description to the \`${bg}\` by passing a \`${_q}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
||
|
||
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${bg}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
||
|
||
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return T.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(r)},[r,e]),null},Nxe=jq,Dxe=Cq,Pxe=Aq,Mxe=Oq,Ixe=kq,zxe=Nq,Lxe=Pq,Fxe=Tq,qxe=$q;function uC({...e}){return c.jsx(Nxe,{"data-slot":"alert-dialog",...e})}function dC({...e}){return c.jsx(Dxe,{"data-slot":"alert-dialog-trigger",...e})}function Bxe({...e}){return c.jsx(Pxe,{"data-slot":"alert-dialog-portal",...e})}function Uxe({className:e,...r}){return c.jsx(Mxe,{"data-slot":"alert-dialog-overlay",className:vt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...r})}function hC({className:e,...r}){return c.jsxs(Bxe,{children:[c.jsx(Uxe,{}),c.jsx(Ixe,{"data-slot":"alert-dialog-content",className:vt("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...r})]})}function pC({className:e,...r}){return c.jsx("div",{"data-slot":"alert-dialog-header",className:vt("flex flex-col gap-2 text-center sm:text-left",e),...r})}function fC({className:e,...r}){return c.jsx("div",{"data-slot":"alert-dialog-footer",className:vt("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r})}function mC({className:e,...r}){return c.jsx(Fxe,{"data-slot":"alert-dialog-title",className:vt("text-lg font-semibold",e),...r})}function gC({className:e,...r}){return c.jsx(qxe,{"data-slot":"alert-dialog-description",className:vt("text-muted-foreground text-sm",e),...r})}function yC({className:e,...r}){return c.jsx(zxe,{className:vt(n2(),e),...r})}function vC({className:e,...r}){return c.jsx(Lxe,{className:vt(n2({variant:"outline"}),e),...r})}var AT="rovingFocusGroup.onEntryFocus",Kxe={bubbles:!1,cancelable:!0},ww="RovingFocusGroup",[D_,Mq,Vxe]=m$(ww),[Hxe,Iq]=cl(ww,[Vxe]),[Gxe,Xxe]=Hxe(ww),zq=T.forwardRef((e,r)=>c.jsx(D_.Provider,{scope:e.__scopeRovingFocusGroup,children:c.jsx(D_.Slot,{scope:e.__scopeRovingFocusGroup,children:c.jsx(Yxe,{...e,ref:r})})}));zq.displayName=ww;var Yxe=T.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,orientation:o,loop:u=!1,dir:h,currentTabStopId:m,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:b,onEntryFocus:w,preventScrollOnEntryFocus:E=!1,...A}=e,k=T.useRef(null),R=Ln(r,k),M=g$(h),[I,F]=Kd({prop:m,defaultProp:g??null,onChange:b,caller:ww}),[H,V]=T.useState(!1),K=sl(w),z=Mq(s),W=T.useRef(!1),[ae,Q]=T.useState(0);return T.useEffect(()=>{const te=k.current;if(te)return te.addEventListener(AT,K),()=>te.removeEventListener(AT,K)},[K]),c.jsx(Gxe,{scope:s,orientation:o,dir:M,loop:u,currentTabStopId:I,onItemFocus:T.useCallback(te=>F(te),[F]),onItemShiftTab:T.useCallback(()=>V(!0),[]),onFocusableItemAdd:T.useCallback(()=>Q(te=>te+1),[]),onFocusableItemRemove:T.useCallback(()=>Q(te=>te-1),[]),children:c.jsx(An.div,{tabIndex:H||ae===0?-1:0,"data-orientation":o,...A,ref:R,style:{outline:"none",...e.style},onMouseDown:Nt(e.onMouseDown,()=>{W.current=!0}),onFocus:Nt(e.onFocus,te=>{const de=!W.current;if(te.target===te.currentTarget&&de&&!H){const je=new CustomEvent(AT,Kxe);if(te.currentTarget.dispatchEvent(je),!je.defaultPrevented){const we=z().filter(ue=>ue.focusable),ie=we.find(ue=>ue.active),Se=we.find(ue=>ue.id===I),He=[ie,Se,...we].filter(Boolean).map(ue=>ue.ref.current);qq(He,E)}}W.current=!1}),onBlur:Nt(e.onBlur,()=>V(!1))})})}),Lq="RovingFocusGroupItem",Fq=T.forwardRef((e,r)=>{const{__scopeRovingFocusGroup:s,focusable:o=!0,active:u=!1,tabStopId:h,children:m,...g}=e,b=Ys(),w=h||b,E=Xxe(Lq,s),A=E.currentTabStopId===w,k=Mq(s),{onFocusableItemAdd:R,onFocusableItemRemove:M,currentTabStopId:I}=E;return T.useEffect(()=>{if(o)return R(),()=>M()},[o,R,M]),c.jsx(D_.ItemSlot,{scope:s,id:w,focusable:o,active:u,children:c.jsx(An.span,{tabIndex:A?0:-1,"data-orientation":E.orientation,...g,ref:r,onMouseDown:Nt(e.onMouseDown,F=>{o?E.onItemFocus(w):F.preventDefault()}),onFocus:Nt(e.onFocus,()=>E.onItemFocus(w)),onKeyDown:Nt(e.onKeyDown,F=>{if(F.key==="Tab"&&F.shiftKey){E.onItemShiftTab();return}if(F.target!==F.currentTarget)return;const H=Wxe(F,E.orientation,E.dir);if(H!==void 0){if(F.metaKey||F.ctrlKey||F.altKey||F.shiftKey)return;F.preventDefault();let K=k().filter(z=>z.focusable).map(z=>z.ref.current);if(H==="last")K.reverse();else if(H==="prev"||H==="next"){H==="prev"&&K.reverse();const z=K.indexOf(F.currentTarget);K=E.loop?Qxe(K,z+1):K.slice(z+1)}setTimeout(()=>qq(K))}}),children:typeof m=="function"?m({isCurrentTabStop:A,hasTabStop:I!=null}):m})})});Fq.displayName=Lq;var Zxe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jxe(e,r){return r!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Wxe(e,r,s){const o=Jxe(e.key,s);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Zxe[o]}function qq(e,r=!1){const s=document.activeElement;for(const o of e)if(o===s||(o.focus({preventScroll:r}),document.activeElement!==s))return}function Qxe(e,r){return e.map((s,o)=>e[(r+o)%e.length])}var ebe=zq,tbe=Fq;function nbe(e){const r=rbe(e),s=T.forwardRef((o,u)=>{const{children:h,...m}=o,g=T.Children.toArray(h),b=g.find(ibe);if(b){const w=b.props.children,E=g.map(A=>A===b?T.Children.count(w)>1?T.Children.only(null):T.isValidElement(w)?w.props.children:null:A);return c.jsx(r,{...m,ref:u,children:T.isValidElement(w)?T.cloneElement(w,void 0,E):null})}return c.jsx(r,{...m,ref:u,children:h})});return s.displayName=`${e}.Slot`,s}function rbe(e){const r=T.forwardRef((s,o)=>{const{children:u,...h}=s;if(T.isValidElement(u)){const m=obe(u),g=abe(h,u.props);return u.type!==T.Fragment&&(g.ref=o?Gi(o,m):m),T.cloneElement(u,g)}return T.Children.count(u)>1?T.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var sbe=Symbol("radix.slottable");function ibe(e){return T.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sbe}function abe(e,r){const s={...r};for(const o in r){const u=e[o],h=r[o];/^on[A-Z]/.test(o)?u&&h?s[o]=(...g)=>{const b=h(...g);return u(...g),b}:u&&(s[o]=u):o==="style"?s[o]={...u,...h}:o==="className"&&(s[o]=[u,h].filter(Boolean).join(" "))}return{...e,...s}}function obe(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning;return s?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,s=r&&"isReactWarning"in r&&r.isReactWarning,s?e.props.ref:e.props.ref||e.ref)}var P_=["Enter"," "],lbe=["ArrowDown","PageUp","Home"],Bq=["ArrowUp","PageDown","End"],cbe=[...lbe,...Bq],ube={ltr:[...P_,"ArrowRight"],rtl:[...P_,"ArrowLeft"]},dbe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Sw="Menu",[rw,hbe,pbe]=m$(Sw),[Lp,Uq]=cl(Sw,[pbe,Yd,Iq]),iA=Yd(),Kq=Iq(),[fbe,Fp]=Lp(Sw),[mbe,Ew]=Lp(Sw),Vq=e=>{const{__scopeMenu:r,open:s=!1,children:o,dir:u,onOpenChange:h,modal:m=!0}=e,g=iA(r),[b,w]=T.useState(null),E=T.useRef(!1),A=sl(h),k=g$(u);return T.useEffect(()=>{const R=()=>{E.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>E.current=!1;return document.addEventListener("keydown",R,{capture:!0}),()=>{document.removeEventListener("keydown",R,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),c.jsx(TC,{...g,children:c.jsx(fbe,{scope:r,open:s,onOpenChange:A,content:b,onContentChange:w,children:c.jsx(mbe,{scope:r,onClose:T.useCallback(()=>A(!1),[A]),isUsingKeyboardRef:E,dir:k,modal:m,children:o})})})};Vq.displayName=Sw;var gbe="MenuAnchor",v$=T.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e,u=iA(s);return c.jsx(ow,{...u,...o,ref:r})});v$.displayName=gbe;var x$="MenuPortal",[ybe,Hq]=Lp(x$,{forceMount:void 0}),Gq=e=>{const{__scopeMenu:r,forceMount:s,children:o,container:u}=e,h=Fp(x$,r);return c.jsx(ybe,{scope:r,forceMount:s,children:c.jsx(po,{present:s||h.open,children:c.jsx(Mg,{asChild:!0,container:u,children:o})})})};Gq.displayName=x$;var uo="MenuContent",[vbe,b$]=Lp(uo),Xq=T.forwardRef((e,r)=>{const s=Hq(uo,e.__scopeMenu),{forceMount:o=s.forceMount,...u}=e,h=Fp(uo,e.__scopeMenu),m=Ew(uo,e.__scopeMenu);return c.jsx(rw.Provider,{scope:e.__scopeMenu,children:c.jsx(po,{present:o||h.open,children:c.jsx(rw.Slot,{scope:e.__scopeMenu,children:m.modal?c.jsx(xbe,{...u,ref:r}):c.jsx(bbe,{...u,ref:r})})})})}),xbe=T.forwardRef((e,r)=>{const s=Fp(uo,e.__scopeMenu),o=T.useRef(null),u=Ln(r,o);return T.useEffect(()=>{const h=o.current;if(h)return IC(h)},[]),c.jsx(w$,{...e,ref:u,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:Nt(e.onFocusOutside,h=>h.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})}),bbe=T.forwardRef((e,r)=>{const s=Fp(uo,e.__scopeMenu);return c.jsx(w$,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})}),wbe=nbe("MenuContent.ScrollLock"),w$=T.forwardRef((e,r)=>{const{__scopeMenu:s,loop:o=!1,trapFocus:u,onOpenAutoFocus:h,onCloseAutoFocus:m,disableOutsidePointerEvents:g,onEntryFocus:b,onEscapeKeyDown:w,onPointerDownOutside:E,onFocusOutside:A,onInteractOutside:k,onDismiss:R,disableOutsideScroll:M,...I}=e,F=Fp(uo,s),H=Ew(uo,s),V=iA(s),K=Kq(s),z=hbe(s),[W,ae]=T.useState(null),Q=T.useRef(null),te=Ln(r,Q,F.onContentChange),de=T.useRef(0),je=T.useRef(""),we=T.useRef(0),ie=T.useRef(null),Se=T.useRef("right"),Ae=T.useRef(0),He=M?hw:T.Fragment,ue=M?{as:wbe,allowPinchZoom:!0}:void 0,ne=$e=>{const me=je.current+$e,Xe=z().filter(Fe=>!Fe.disabled),Oe=document.activeElement,Te=Xe.find(Fe=>Fe.ref.current===Oe)?.textValue,Ke=Xe.map(Fe=>Fe.textValue),se=Nbe(Ke,me,Te),Ne=Xe.find(Fe=>Fe.textValue===se)?.ref.current;(function Fe(at){je.current=at,window.clearTimeout(de.current),at!==""&&(de.current=window.setTimeout(()=>Fe(""),1e3))})(me),Ne&&setTimeout(()=>Ne.focus())};T.useEffect(()=>()=>window.clearTimeout(de.current),[]),PC();const ce=T.useCallback($e=>Se.current===ie.current?.side&&Pbe($e,ie.current?.area),[]);return c.jsx(vbe,{scope:s,searchRef:je,onItemEnter:T.useCallback($e=>{ce($e)&&$e.preventDefault()},[ce]),onItemLeave:T.useCallback($e=>{ce($e)||(Q.current?.focus(),ae(null))},[ce]),onTriggerLeave:T.useCallback($e=>{ce($e)&&$e.preventDefault()},[ce]),pointerGraceTimerRef:we,onPointerGraceIntentChange:T.useCallback($e=>{ie.current=$e},[]),children:c.jsx(He,{...ue,children:c.jsx(dw,{asChild:!0,trapped:u,onMountAutoFocus:Nt(h,$e=>{$e.preventDefault(),Q.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:m,children:c.jsx(Ng,{asChild:!0,disableOutsidePointerEvents:g,onEscapeKeyDown:w,onPointerDownOutside:E,onFocusOutside:A,onInteractOutside:k,onDismiss:R,children:c.jsx(ebe,{asChild:!0,...K,dir:H.dir,orientation:"vertical",loop:o,currentTabStopId:W,onCurrentTabStopIdChange:ae,onEntryFocus:Nt(b,$e=>{H.isUsingKeyboardRef.current||$e.preventDefault()}),preventScrollOnEntryFocus:!0,children:c.jsx(_C,{role:"menu","aria-orientation":"vertical","data-state":uB(F.open),"data-radix-menu-content":"",dir:H.dir,...V,...I,ref:te,style:{outline:"none",...I.style},onKeyDown:Nt(I.onKeyDown,$e=>{const Xe=$e.target.closest("[data-radix-menu-content]")===$e.currentTarget,Oe=$e.ctrlKey||$e.altKey||$e.metaKey,Te=$e.key.length===1;Xe&&($e.key==="Tab"&&$e.preventDefault(),!Oe&&Te&&ne($e.key));const Ke=Q.current;if($e.target!==Ke||!cbe.includes($e.key))return;$e.preventDefault();const Ne=z().filter(Fe=>!Fe.disabled).map(Fe=>Fe.ref.current);Bq.includes($e.key)&&Ne.reverse(),_be(Ne)}),onBlur:Nt(e.onBlur,$e=>{$e.currentTarget.contains($e.target)||(window.clearTimeout(de.current),je.current="")}),onPointerMove:Nt(e.onPointerMove,sw($e=>{const me=$e.target,Xe=Ae.current!==$e.clientX;if($e.currentTarget.contains(me)&&Xe){const Oe=$e.clientX>Ae.current?"right":"left";Se.current=Oe,Ae.current=$e.clientX}}))})})})})})})});Xq.displayName=uo;var Sbe="MenuGroup",S$=T.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return c.jsx(An.div,{role:"group",...o,ref:r})});S$.displayName=Sbe;var Ebe="MenuLabel",Yq=T.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return c.jsx(An.div,{...o,ref:r})});Yq.displayName=Ebe;var xC="MenuItem",F3="menu.itemSelect",aA=T.forwardRef((e,r)=>{const{disabled:s=!1,onSelect:o,...u}=e,h=T.useRef(null),m=Ew(xC,e.__scopeMenu),g=b$(xC,e.__scopeMenu),b=Ln(r,h),w=T.useRef(!1),E=()=>{const A=h.current;if(!s&&A){const k=new CustomEvent(F3,{bubbles:!0,cancelable:!0});A.addEventListener(F3,R=>o?.(R),{once:!0}),qz(A,k),k.defaultPrevented?w.current=!1:m.onClose()}};return c.jsx(Zq,{...u,ref:b,disabled:s,onClick:Nt(e.onClick,E),onPointerDown:A=>{e.onPointerDown?.(A),w.current=!0},onPointerUp:Nt(e.onPointerUp,A=>{w.current||A.currentTarget?.click()}),onKeyDown:Nt(e.onKeyDown,A=>{const k=g.searchRef.current!=="";s||k&&A.key===" "||P_.includes(A.key)&&(A.currentTarget.click(),A.preventDefault())})})});aA.displayName=xC;var Zq=T.forwardRef((e,r)=>{const{__scopeMenu:s,disabled:o=!1,textValue:u,...h}=e,m=b$(xC,s),g=Kq(s),b=T.useRef(null),w=Ln(r,b),[E,A]=T.useState(!1),[k,R]=T.useState("");return T.useEffect(()=>{const M=b.current;M&&R((M.textContent??"").trim())},[h.children]),c.jsx(rw.ItemSlot,{scope:s,disabled:o,textValue:u??k,children:c.jsx(tbe,{asChild:!0,...g,focusable:!o,children:c.jsx(An.div,{role:"menuitem","data-highlighted":E?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...h,ref:w,onPointerMove:Nt(e.onPointerMove,sw(M=>{o?m.onItemLeave(M):(m.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Nt(e.onPointerLeave,sw(M=>m.onItemLeave(M))),onFocus:Nt(e.onFocus,()=>A(!0)),onBlur:Nt(e.onBlur,()=>A(!1))})})})}),jbe="MenuCheckboxItem",Jq=T.forwardRef((e,r)=>{const{checked:s=!1,onCheckedChange:o,...u}=e;return c.jsx(nB,{scope:e.__scopeMenu,checked:s,children:c.jsx(aA,{role:"menuitemcheckbox","aria-checked":bC(s)?"mixed":s,...u,ref:r,"data-state":j$(s),onSelect:Nt(u.onSelect,()=>o?.(bC(s)?!0:!s),{checkForDefaultPrevented:!1})})})});Jq.displayName=jbe;var Wq="MenuRadioGroup",[Cbe,Abe]=Lp(Wq,{value:void 0,onValueChange:()=>{}}),Qq=T.forwardRef((e,r)=>{const{value:s,onValueChange:o,...u}=e,h=sl(o);return c.jsx(Cbe,{scope:e.__scopeMenu,value:s,onValueChange:h,children:c.jsx(S$,{...u,ref:r})})});Qq.displayName=Wq;var eB="MenuRadioItem",tB=T.forwardRef((e,r)=>{const{value:s,...o}=e,u=Abe(eB,e.__scopeMenu),h=s===u.value;return c.jsx(nB,{scope:e.__scopeMenu,checked:h,children:c.jsx(aA,{role:"menuitemradio","aria-checked":h,...o,ref:r,"data-state":j$(h),onSelect:Nt(o.onSelect,()=>u.onValueChange?.(s),{checkForDefaultPrevented:!1})})})});tB.displayName=eB;var E$="MenuItemIndicator",[nB,Obe]=Lp(E$,{checked:!1}),rB=T.forwardRef((e,r)=>{const{__scopeMenu:s,forceMount:o,...u}=e,h=Obe(E$,s);return c.jsx(po,{present:o||bC(h.checked)||h.checked===!0,children:c.jsx(An.span,{...u,ref:r,"data-state":j$(h.checked)})})});rB.displayName=E$;var kbe="MenuSeparator",sB=T.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e;return c.jsx(An.div,{role:"separator","aria-orientation":"horizontal",...o,ref:r})});sB.displayName=kbe;var Rbe="MenuArrow",iB=T.forwardRef((e,r)=>{const{__scopeMenu:s,...o}=e,u=iA(s);return c.jsx($C,{...u,...o,ref:r})});iB.displayName=Rbe;var Tbe="MenuSub",[OSe,aB]=Lp(Tbe),Db="MenuSubTrigger",oB=T.forwardRef((e,r)=>{const s=Fp(Db,e.__scopeMenu),o=Ew(Db,e.__scopeMenu),u=aB(Db,e.__scopeMenu),h=b$(Db,e.__scopeMenu),m=T.useRef(null),{pointerGraceTimerRef:g,onPointerGraceIntentChange:b}=h,w={__scopeMenu:e.__scopeMenu},E=T.useCallback(()=>{m.current&&window.clearTimeout(m.current),m.current=null},[]);return T.useEffect(()=>E,[E]),T.useEffect(()=>{const A=g.current;return()=>{window.clearTimeout(A),b(null)}},[g,b]),c.jsx(v$,{asChild:!0,...w,children:c.jsx(Zq,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":u.contentId,"data-state":uB(s.open),...e,ref:Gi(r,u.onTriggerChange),onClick:A=>{e.onClick?.(A),!(e.disabled||A.defaultPrevented)&&(A.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:Nt(e.onPointerMove,sw(A=>{h.onItemEnter(A),!A.defaultPrevented&&!e.disabled&&!s.open&&!m.current&&(h.onPointerGraceIntentChange(null),m.current=window.setTimeout(()=>{s.onOpenChange(!0),E()},100))})),onPointerLeave:Nt(e.onPointerLeave,sw(A=>{E();const k=s.content?.getBoundingClientRect();if(k){const R=s.content?.dataset.side,M=R==="right",I=M?-5:5,F=k[M?"left":"right"],H=k[M?"right":"left"];h.onPointerGraceIntentChange({area:[{x:A.clientX+I,y:A.clientY},{x:F,y:k.top},{x:H,y:k.top},{x:H,y:k.bottom},{x:F,y:k.bottom}],side:R}),window.clearTimeout(g.current),g.current=window.setTimeout(()=>h.onPointerGraceIntentChange(null),300)}else{if(h.onTriggerLeave(A),A.defaultPrevented)return;h.onPointerGraceIntentChange(null)}})),onKeyDown:Nt(e.onKeyDown,A=>{const k=h.searchRef.current!=="";e.disabled||k&&A.key===" "||ube[o.dir].includes(A.key)&&(s.onOpenChange(!0),s.content?.focus(),A.preventDefault())})})})});oB.displayName=Db;var lB="MenuSubContent",cB=T.forwardRef((e,r)=>{const s=Hq(uo,e.__scopeMenu),{forceMount:o=s.forceMount,...u}=e,h=Fp(uo,e.__scopeMenu),m=Ew(uo,e.__scopeMenu),g=aB(lB,e.__scopeMenu),b=T.useRef(null),w=Ln(r,b);return c.jsx(rw.Provider,{scope:e.__scopeMenu,children:c.jsx(po,{present:o||h.open,children:c.jsx(rw.Slot,{scope:e.__scopeMenu,children:c.jsx(w$,{id:g.contentId,"aria-labelledby":g.triggerId,...u,ref:w,align:"start",side:m.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:E=>{m.isUsingKeyboardRef.current&&b.current?.focus(),E.preventDefault()},onCloseAutoFocus:E=>E.preventDefault(),onFocusOutside:Nt(e.onFocusOutside,E=>{E.target!==g.trigger&&h.onOpenChange(!1)}),onEscapeKeyDown:Nt(e.onEscapeKeyDown,E=>{m.onClose(),E.preventDefault()}),onKeyDown:Nt(e.onKeyDown,E=>{const A=E.currentTarget.contains(E.target),k=dbe[m.dir].includes(E.key);A&&k&&(h.onOpenChange(!1),g.trigger?.focus(),E.preventDefault())})})})})})});cB.displayName=lB;function uB(e){return e?"open":"closed"}function bC(e){return e==="indeterminate"}function j$(e){return bC(e)?"indeterminate":e?"checked":"unchecked"}function _be(e){const r=document.activeElement;for(const s of e)if(s===r||(s.focus(),document.activeElement!==r))return}function $be(e,r){return e.map((s,o)=>e[(r+o)%e.length])}function Nbe(e,r,s){const u=r.length>1&&Array.from(r).every(w=>w===r[0])?r[0]:r,h=s?e.indexOf(s):-1;let m=$be(e,Math.max(h,0));u.length===1&&(m=m.filter(w=>w!==s));const b=m.find(w=>w.toLowerCase().startsWith(u.toLowerCase()));return b!==s?b:void 0}function Dbe(e,r){const{x:s,y:o}=e;let u=!1;for(let h=0,m=r.length-1;h<r.length;m=h++){const g=r[h],b=r[m],w=g.x,E=g.y,A=b.x,k=b.y;E>o!=k>o&&s<(A-w)*(o-E)/(k-E)+w&&(u=!u)}return u}function Pbe(e,r){if(!r)return!1;const s={x:e.clientX,y:e.clientY};return Dbe(s,r)}function sw(e){return r=>r.pointerType==="mouse"?e(r):void 0}var Mbe=Vq,Ibe=v$,zbe=Gq,Lbe=Xq,Fbe=S$,qbe=Yq,Bbe=aA,Ube=Jq,Kbe=Qq,Vbe=tB,Hbe=rB,Gbe=sB,Xbe=iB,Ybe=oB,Zbe=cB,oA="DropdownMenu",[Jbe]=cl(oA,[Uq]),Xi=Uq(),[Wbe,dB]=Jbe(oA),hB=e=>{const{__scopeDropdownMenu:r,children:s,dir:o,open:u,defaultOpen:h,onOpenChange:m,modal:g=!0}=e,b=Xi(r),w=T.useRef(null),[E,A]=Kd({prop:u,defaultProp:h??!1,onChange:m,caller:oA});return c.jsx(Wbe,{scope:r,triggerId:Ys(),triggerRef:w,contentId:Ys(),open:E,onOpenChange:A,onOpenToggle:T.useCallback(()=>A(k=>!k),[A]),modal:g,children:c.jsx(Mbe,{...b,open:E,onOpenChange:A,dir:o,modal:g,children:s})})};hB.displayName=oA;var pB="DropdownMenuTrigger",fB=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,disabled:o=!1,...u}=e,h=dB(pB,s),m=Xi(s);return c.jsx(Ibe,{asChild:!0,...m,children:c.jsx(An.button,{type:"button",id:h.triggerId,"aria-haspopup":"menu","aria-expanded":h.open,"aria-controls":h.open?h.contentId:void 0,"data-state":h.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...u,ref:Gi(r,h.triggerRef),onPointerDown:Nt(e.onPointerDown,g=>{!o&&g.button===0&&g.ctrlKey===!1&&(h.onOpenToggle(),h.open||g.preventDefault())}),onKeyDown:Nt(e.onKeyDown,g=>{o||(["Enter"," "].includes(g.key)&&h.onOpenToggle(),g.key==="ArrowDown"&&h.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(g.key)&&g.preventDefault())})})})});fB.displayName=pB;var Qbe="DropdownMenuPortal",mB=e=>{const{__scopeDropdownMenu:r,...s}=e,o=Xi(r);return c.jsx(zbe,{...o,...s})};mB.displayName=Qbe;var gB="DropdownMenuContent",yB=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=dB(gB,s),h=Xi(s),m=T.useRef(!1);return c.jsx(Lbe,{id:u.contentId,"aria-labelledby":u.triggerId,...h,...o,ref:r,onCloseAutoFocus:Nt(e.onCloseAutoFocus,g=>{m.current||u.triggerRef.current?.focus(),m.current=!1,g.preventDefault()}),onInteractOutside:Nt(e.onInteractOutside,g=>{const b=g.detail.originalEvent,w=b.button===0&&b.ctrlKey===!0,E=b.button===2||w;(!u.modal||E)&&(m.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});yB.displayName=gB;var ewe="DropdownMenuGroup",twe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Fbe,{...u,...o,ref:r})});twe.displayName=ewe;var nwe="DropdownMenuLabel",rwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(qbe,{...u,...o,ref:r})});rwe.displayName=nwe;var swe="DropdownMenuItem",vB=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Bbe,{...u,...o,ref:r})});vB.displayName=swe;var iwe="DropdownMenuCheckboxItem",awe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Ube,{...u,...o,ref:r})});awe.displayName=iwe;var owe="DropdownMenuRadioGroup",lwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Kbe,{...u,...o,ref:r})});lwe.displayName=owe;var cwe="DropdownMenuRadioItem",uwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Vbe,{...u,...o,ref:r})});uwe.displayName=cwe;var dwe="DropdownMenuItemIndicator",hwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Hbe,{...u,...o,ref:r})});hwe.displayName=dwe;var pwe="DropdownMenuSeparator",fwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Gbe,{...u,...o,ref:r})});fwe.displayName=pwe;var mwe="DropdownMenuArrow",gwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Xbe,{...u,...o,ref:r})});gwe.displayName=mwe;var ywe="DropdownMenuSubTrigger",vwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Ybe,{...u,...o,ref:r})});vwe.displayName=ywe;var xwe="DropdownMenuSubContent",bwe=T.forwardRef((e,r)=>{const{__scopeDropdownMenu:s,...o}=e,u=Xi(s);return c.jsx(Zbe,{...u,...o,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});bwe.displayName=xwe;var wwe=hB,Swe=fB,Ewe=mB,jwe=yB,Cwe=vB;function C$({...e}){return c.jsx(wwe,{"data-slot":"dropdown-menu",...e})}function A$({...e}){return c.jsx(Swe,{"data-slot":"dropdown-menu-trigger",...e})}function O$({className:e,sideOffset:r=4,...s}){return c.jsx(Ewe,{children:c.jsx(jwe,{"data-slot":"dropdown-menu-content",sideOffset:r,className:vt("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...s})})}function kp({className:e,inset:r,variant:s="default",...o}){return c.jsx(Cwe,{"data-slot":"dropdown-menu-item","data-inset":r,"data-variant":s,className:vt("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}var lA="Switch",[Awe]=cl(lA),[Owe,kwe]=Awe(lA),xB=T.forwardRef((e,r)=>{const{__scopeSwitch:s,name:o,checked:u,defaultChecked:h,required:m,disabled:g,value:b="on",onCheckedChange:w,form:E,...A}=e,[k,R]=T.useState(null),M=Ln(r,K=>R(K)),I=T.useRef(!1),F=k?E||!!k.closest("form"):!0,[H,V]=Kd({prop:u,defaultProp:h??!1,onChange:w,caller:lA});return c.jsxs(Owe,{scope:s,checked:H,disabled:g,children:[c.jsx(An.button,{type:"button",role:"switch","aria-checked":H,"aria-required":m,"data-state":EB(H),"data-disabled":g?"":void 0,disabled:g,value:b,...A,ref:M,onClick:Nt(e.onClick,K=>{V(z=>!z),F&&(I.current=K.isPropagationStopped(),I.current||K.stopPropagation())})}),F&&c.jsx(SB,{control:k,bubbles:!I.current,name:o,value:b,checked:H,required:m,disabled:g,form:E,style:{transform:"translateX(-100%)"}})]})});xB.displayName=lA;var bB="SwitchThumb",wB=T.forwardRef((e,r)=>{const{__scopeSwitch:s,...o}=e,u=kwe(bB,s);return c.jsx(An.span,{"data-state":EB(u.checked),"data-disabled":u.disabled?"":void 0,...o,ref:r})});wB.displayName=bB;var Rwe="SwitchBubbleInput",SB=T.forwardRef(({__scopeSwitch:e,control:r,checked:s,bubbles:o=!0,...u},h)=>{const m=T.useRef(null),g=Ln(m,h),b=Y6(s),w=nL(r);return T.useEffect(()=>{const E=m.current;if(!E)return;const A=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(A,"checked").set;if(b!==s&&R){const M=new Event("click",{bubbles:o});R.call(E,s),E.dispatchEvent(M)}},[b,s,o]),c.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:s,...u,tabIndex:-1,ref:g,style:{...u.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});SB.displayName=Rwe;function EB(e){return e?"checked":"unchecked"}var Twe=xB,_we=wB;function q3({className:e,...r}){return c.jsx(Twe,{"data-slot":"switch",className:vt("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:c.jsx(_we,{"data-slot":"switch-thumb",className:vt("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const wC=["route53","s3","ec2","iam","rds","dynamodb"],kj=Is({credential_provider:Fa(["aws","cloudflare","hetzner","digitalocean","generic"]),kind:Fa(["aws_access_key","api_token","basic_auth","oauth2"]),schema_version:tw().default(1),name:Sn().min(1,"Name is required").max(100),scope_kind:Fa(["provider","service","resource"]),scope_version:tw().default(1),scope:$3(),account_id:Sn().optional().or(nw("")).transform(e=>e||void 0),region:Sn().optional().or(nw("")).transform(e=>e||void 0),secret:$3()}).superRefine((e,r)=>{if(e.credential_provider==="aws"){if(e.scope_kind==="service"){const s=e.scope?.service;wC.includes(s)||r.addIssue({code:Md.custom,path:["scope"],message:`For AWS service scope, "service" must be one of: ${wC.join(", ")}`})}if(e.scope_kind==="resource"){const s=e.scope?.arn;(typeof s!="string"||!s.startsWith("arn:"))&&r.addIssue({code:Md.custom,path:["scope"],message:'For AWS resource scope, "arn" must start with "arn:"'})}if(e.kind==="aws_access_key"){const s=e.secret??{},o=s.access_key_id;(typeof o!="string"||!/^[A-Z0-9]{20}$/.test(o))&&r.addIssue({code:Md.custom,path:["secret"],message:"access_key_id must be 20 chars (A-Z0-9)"}),(typeof s.secret_access_key!="string"||s.secret_access_key.length<10)&&r.addIssue({code:Md.custom,path:["secret"],message:"secret_access_key is required"})}}if(e.kind==="api_token"&&((e.secret??{}).token||r.addIssue({code:Md.custom,path:["secret"],message:"token is required"})),e.kind==="basic_auth"){const s=e.secret??{};(!s.username||!s.password)&&r.addIssue({code:Md.custom,path:["secret"],message:"username and password are required"})}if(e.kind==="oauth2"){const s=e.secret??{};(!s.client_id||!s.client_secret||!s.refresh_token)&&r.addIssue({code:Md.custom,path:["secret"],message:"client_id, client_secret, and refresh_token are required"})}e.scope_kind!=="provider"&&!e.scope&&r.addIssue({code:Md.custom,path:["scope"],message:"scope is required"})}),OT=kj.partial().extend({name:Sn().min(1,"Name is required").max(100).optional()});function rc(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return""}}function gj(e){const r=e?.body??e?.response??e?.message;if(typeof r=="string")return r;try{const s=e?.response?.data?.message||e?.message;if(s)return String(s)}catch{return"Unknown error"}return"Unknown error"}function $we({credential_provider:e,scope_kind:r}){return e==="aws"&&r==="service"}function Nwe({credential_provider:e,scope_kind:r}){return e==="aws"&&r==="resource"}function Dwe({scope_kind:e}){return e==="provider"}function B3(){return{credential_provider:"aws",kind:"aws_access_key",schema_version:1,name:"",scope_kind:"provider",scope_version:1,scope:{},account_id:"",region:"",secret:{}}}function U3(e){return{credential_provider:e.credential_provider,kind:e.kind,schema_version:e.schema_version??1,name:e.name,scope_kind:e.scope_kind,scope_version:e.scope_version??1,scope:e.scope??{},account_id:e.account_id,region:e.region,secret:e.secret??{}}}function K3(e){const r={},s=["name","account_id","region","scope_kind","scope_version","scope","secret","credential_provider","kind","schema_version"];for(const o of s)typeof e[o]<"u"&&e[o]!==""&&(r[o]=e[o]);return r}const Pwe=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(!1),[b,w]=T.useState(null),[E,A]=T.useState(null),[k,R]=T.useState(!1),[M,I]=T.useState(!1),[F,H]=T.useState(!1),[V,K]=T.useState(null),[z,W]=T.useState(!1),[ae,Q]=T.useState(null),te=Ms(),de=Un({queryKey:["credentials"],queryFn:()=>ng.listCredentials()}),je=Wt({mutationFn:se=>ng.createCredential(U3(se)),onSuccess:async()=>{await te.invalidateQueries({queryKey:["credentials"]}),Ge.success("Credential created"),o(!1),Ae.reset(B3()),R(!1)},onError:se=>{Ge.error("Failed to create credential",{description:gj(se)})}}),we=Wt({mutationFn:se=>ng.updateCredential(se.id,K3(se.body)),onSuccess:async()=>{await te.invalidateQueries({queryKey:["credentials"]}),Ge.success("Credential updated"),h(!1),A(null),I(!1)},onError:se=>{Ge.error("Failed to update credential",{description:gj(se)})}}),ie=Wt({mutationFn:se=>ng.deleteCredential(se),onSuccess:async()=>{await te.invalidateQueries({queryKey:["credentials"]}),Ge.success("Credential deleted")},onError:se=>{Ge.error("Failed to delete credential",{description:gj(se)})}}),Se=Wt({mutationFn:se=>ng.revealCredential(se),onSuccess:se=>{w(se),g(!0)},onError:se=>{Ge.error("Failed to reveal secret",{description:gj(se)})}}),Ae=hr({resolver:fr(kj),defaultValues:B3(),mode:"onBlur"}),He=hr({resolver:fr(OT),defaultValues:{},mode:"onBlur"});function ue(se){A(se.id),He.reset({provider:se.provider,kind:se.kind,schema_version:se.schema_version??1,name:se.name,scope_kind:se.scope_kind,scope_version:se.scope_version??1,account_id:se.account_id??"",region:se.region??"",scope:se.scope??(se.scope_kind==="provider"?{}:void 0),secret:void 0}),I(!1),h(!0)}const ne=T.useMemo(()=>{const se=de.data??[];if(!e.trim())return se;const Ne=e.toLowerCase();return se.filter(Fe=>[Fe.name,Fe.provider,Fe.kind,Fe.scope_kind,Fe.account_id,Fe.region,JSON.stringify(Fe.scope??{})].filter(Boolean).map(at=>String(at).toLowerCase()).some(at=>at.includes(Ne)))},[de.data,e]);if(de.isLoading)return c.jsxs("div",{className:"flex items-center gap-2 p-6",children:[c.jsx(ys,{className:"h-4 w-4 animate-spin"})," Loading credentials…"]});if(de.error)return c.jsxs("div",{className:"p-6 text-red-500",children:["Error loading credentials.",c.jsx("pre",{className:"mt-2 text-xs opacity-80",children:JSON.stringify(de.error,null,2)})]});const ce=Ae.watch("credential_provider"),$e=Ae.watch("kind"),me=Ae.watch("scope_kind"),Xe=se=>Ae.setValue("scope",se,{shouldDirty:!0,shouldValidate:!0}),Oe=se=>Ae.setValue("secret",se,{shouldDirty:!0,shouldValidate:!0});function Te(){if(!k){if(ce==="aws"&&$e==="aws_access_key"){const se=Ae.getValues("secret")??{};Oe({access_key_id:se.access_key_id??"",secret_access_key:se.secret_access_key??""})}else if($e==="api_token"){const se=Ae.getValues("secret")??{};Oe({token:se.token??""})}else if($e==="basic_auth"){const se=Ae.getValues("secret")??{};Oe({username:se.username??"",password:se.password??""})}else if($e==="oauth2"){const se=Ae.getValues("secret")??{};Oe({client_id:se.client_id??"",client_secret:se.client_secret??"",refresh_token:se.refresh_token??""})}}}function Ke(se){Ae.setValue("scope_kind",se),se==="provider"&&Xe({}),se==="service"&&Xe({service:"route53"}),se==="resource"&&Xe({arn:""})}return c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"mb-1 text-2xl font-bold",children:"Credentials"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Store provider credentials. Secrets are encrypted server-side; revealing is a one-time read."})]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:se=>r(se.target.value),placeholder:"Search by name, provider, kind, scope…",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Credential"]})}),c.jsxs(hn,{className:"sm:max-w-2xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create Credential"})}),c.jsx(mr,{...Ae,children:c.jsxs("form",{onSubmit:Ae.handleSubmit(se=>{const Ne=kj.safeParse(se);if(!Ne.success){Ge.error("Please fix validation errors");return}je.mutate(Ne.data)}),className:"space-y-5 pt-2",children:[c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsx(ft,{control:Ae.control,name:"credential_provider",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Provider"}),c.jsxs(_n,{onValueChange:Ne=>{se.onChange(Ne),Te()},defaultValue:se.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"aws",children:"AWS"}),c.jsx(Ct,{value:"cloudflare",children:"Cloudflare"}),c.jsx(Ct,{value:"hetzner",children:"Hetzner"}),c.jsx(Ct,{value:"digitalocean",children:"DigitalOcean"}),c.jsx(Ct,{value:"generic",children:"Generic"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ae.control,name:"kind",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Kind"}),c.jsxs(_n,{onValueChange:Ne=>{se.onChange(Ne),Te()},defaultValue:se.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"aws_access_key",children:"AWS Access Key"}),c.jsx(Ct,{value:"api_token",children:"API Token"}),c.jsx(Ct,{value:"basic_auth",children:"Basic Auth"}),c.jsx(Ct,{value:"oauth2",children:"OAuth2"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ae.control,name:"scope_kind",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Scope Kind"}),c.jsxs(_n,{onValueChange:Ne=>{Ke(Ne)},defaultValue:se.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"provider",children:"Provider"}),c.jsx(Ct,{value:"service",children:"Service"}),c.jsx(Ct,{value:"resource",children:"Resource"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ae.control,name:"name",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(mt,{...se,placeholder:"My AWS Key"}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ae.control,name:"account_id",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Account ID (optional)"}),c.jsx(mt,{...se,placeholder:"e.g. 123456789012"}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ae.control,name:"region",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Region (optional)"}),c.jsx(mt,{...se,placeholder:"e.g. us-east-1"}),c.jsx(pt,{})]})})]}),!Dwe({scope_kind:me})&&c.jsx(c.Fragment,{children:$we({credential_provider:ce,scope_kind:me})?c.jsxs(ot,{children:[c.jsx(lt,{children:"Service"}),c.jsx(Zo,{control:Ae.control,name:"scope",render:({field:se})=>c.jsxs(_n,{onValueChange:Ne=>se.onChange({service:Ne}),value:se.value?.service??"route53",children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select an AWS service"})})}),c.jsx(Dn,{children:wC.map(Ne=>c.jsx(Ct,{value:Ne,children:Ne.toUpperCase()},Ne))})]})}),c.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:["Must be one of: ",wC.join(", "),"."]})]}):Nwe({credential_provider:ce,scope_kind:me})?c.jsxs(ot,{children:[c.jsx(lt,{children:"Resource ARN"}),c.jsx(Zo,{control:Ae.control,name:"scope",render:({field:se})=>c.jsx(mt,{value:se.value?.arn??"",onChange:Ne=>se.onChange({arn:Ne.target.value}),placeholder:"arn:aws:service:region:account:resource"})}),c.jsx(pt,{})]}):c.jsx(ft,{control:Ae.control,name:"scope",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Scope (JSON)"}),c.jsx(nl,{value:rc(se.value??{}),onChange:Ne=>{try{const Fe=JSON.parse(Ne.target.value);se.onChange(Fe)}catch{se.onChange(Ne.target.value)}},rows:3,placeholder:'{"service":"route53"} or {"arn":"arn:aws:..."}',className:"font-mono"}),c.jsx(pt,{})]})})}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(q3,{checked:k,onCheckedChange:se=>{R(se),Te()},id:"raw-secret-toggle"}),c.jsx("label",{htmlFor:"raw-secret-toggle",className:"text-sm",children:"Edit secret as raw JSON"})]}),k?c.jsx(ft,{control:Ae.control,name:"secret",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Secret (JSON)"}),c.jsx(nl,{value:rc(se.value??{}),onChange:Ne=>{try{se.onChange(JSON.parse(Ne.target.value))}catch{se.onChange(Ne.target.value)}},rows:6,placeholder:$e==="aws_access_key"?'{"access_key_id":"...","secret_access_key":"..."}':$e==="api_token"?'{"token":"..."}':$e==="basic_auth"?'{"username":"...","password":"..."}':'{"client_id":"...","client_secret":"...","refresh_token":"..."}',className:"font-mono"}),c.jsx(pt,{})]})}):c.jsxs(c.Fragment,{children:[ce==="aws"&&$e==="aws_access_key"&&c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsxs(ot,{children:[c.jsx(lt,{children:"Access Key ID"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{value:(se.value??{}).access_key_id??"",onChange:Ne=>Oe({...se.value??{},access_key_id:Ne.target.value.trim()}),placeholder:"AKIA..."})})]}),c.jsxs(ot,{children:[c.jsx(lt,{children:"Secret Access Key"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{type:"password",value:(se.value??{}).secret_access_key??"",onChange:Ne=>Oe({...se.value??{},secret_access_key:Ne.target.value}),placeholder:"•••••••••••••••"})})]})]}),$e==="api_token"&&c.jsxs(ot,{children:[c.jsx(lt,{children:"API Token"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{value:(se.value??{}).token??"",onChange:Ne=>Oe({...se.value??{},token:Ne.target.value}),placeholder:"token..."})})]}),$e==="basic_auth"&&c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsxs(ot,{children:[c.jsx(lt,{children:"Username"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{value:(se.value??{}).username??"",onChange:Ne=>Oe({...se.value??{},username:Ne.target.value})})})]}),c.jsxs(ot,{children:[c.jsx(lt,{children:"Password"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{type:"password",value:(se.value??{}).password??"",onChange:Ne=>Oe({...se.value??{},password:Ne.target.value})})})]})]}),$e==="oauth2"&&c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[c.jsxs(ot,{children:[c.jsx(lt,{children:"Client ID"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{value:(se.value??{}).client_id??"",onChange:Ne=>Oe({...se.value??{},client_id:Ne.target.value})})})]}),c.jsxs(ot,{children:[c.jsx(lt,{children:"Client Secret"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{type:"password",value:(se.value??{}).client_secret??"",onChange:Ne=>Oe({...se.value??{},client_secret:Ne.target.value})})})]}),c.jsxs(ot,{children:[c.jsx(lt,{children:"Refresh Token"}),c.jsx(Zo,{control:Ae.control,name:"secret",render:({field:se})=>c.jsx(mt,{value:(se.value??{}).refresh_token??"",onChange:Ne=>Oe({...se.value??{},refresh_token:Ne.target.value})})})]})]})]}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"secondary",onClick:()=>{const se=kj.safeParse(Ae.getValues());if(!se.success){Ge.error("Fix validation errors before previewing");return}const Ne=U3(se.data);K(Ne),H(!0)},children:"Preview request"}),c.jsx(Pe,{variant:"outline",type:"button",onClick:()=>o(!1),children:"Cancel"}),c.jsxs(Pe,{type:"submit",disabled:je.isPending,children:[je.isPending&&c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),c.jsx("div",{className:"overflow-x-auto rounded-xl border",children:c.jsxs("table",{className:"min-w-full text-sm",children:[c.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:c.jsxs("tr",{children:[c.jsx("th",{className:"w-[26%] px-4 py-2 text-left",children:"Name"}),c.jsx("th",{className:"px-4 py-2 text-left",children:"Provider"}),c.jsx("th",{className:"px-4 py-2 text-left",children:"Kind"}),c.jsx("th",{className:"px-4 py-2 text-left",children:"Scope"}),c.jsx("th",{className:"px-4 py-2 text-left",children:"Account"}),c.jsx("th",{className:"px-4 py-2 text-left",children:"Region"}),c.jsx("th",{className:"px-4 py-2 text-right",children:"Actions"})]})}),c.jsxs("tbody",{children:[ne.map(se=>c.jsxs("tr",{className:"border-t",children:[c.jsxs("td",{className:"px-4 py-2",children:[c.jsx("div",{className:"font-medium",children:se.name}),c.jsxs("div",{className:"text-muted-foreground text-xs",children:[c.jsx("span",{className:"mr-1",children:"id:"}),c.jsxs("code",{className:"bg-muted rounded px-1",children:[se.id.slice(0,8),"…"]})]})]}),c.jsx("td",{className:"px-4 py-2",children:se.credential_provider}),c.jsx("td",{className:"px-4 py-2",children:se.kind}),c.jsx("td",{className:"px-4 py-2",children:c.jsx(rr,{variant:"secondary",children:se.scope_kind})}),c.jsx("td",{className:"px-4 py-2",children:se.account_id??"—"}),c.jsx("td",{className:"px-4 py-2",children:se.region??"—"}),c.jsx("td",{className:"px-4 py-2",children:c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsx(Pe,{size:"icon",variant:"ghost",title:"Reveal secret (one-time read)",onClick:()=>Se.mutate(se.id),children:c.jsx(LT,{className:"h-4 w-4"})}),c.jsx(Pe,{size:"icon",variant:"ghost",title:"Edit",onClick:()=>ue(se),children:c.jsx(uc,{className:"h-4 w-4"})}),c.jsxs(uC,{children:[c.jsx(dC,{asChild:!0,children:c.jsx(Pe,{size:"icon",variant:"ghost",title:"Delete",children:c.jsx(wg,{className:"h-4 w-4"})})}),c.jsxs(hC,{children:[c.jsxs(pC,{children:[c.jsxs(mC,{children:["Delete “",se.name,"”?"]}),c.jsx(gC,{children:"This will permanently remove the credential metadata. Secrets are not recoverable."})]}),c.jsxs(fC,{children:[c.jsx(vC,{disabled:ie.isPending,children:"Cancel"}),c.jsxs(yC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>ie.mutate(se.id),disabled:ie.isPending,children:[ie.isPending&&c.jsx(ys,{className:"mr-2 inline h-4 w-4 animate-spin"}),"Delete"]})]})]})]}),c.jsxs(C$,{children:[c.jsx(A$,{asChild:!0,children:c.jsx(Pe,{size:"icon",variant:"ghost",children:c.jsx(Z_,{className:"h-4 w-4"})})}),c.jsxs(O$,{align:"end",children:[c.jsx(kp,{onClick:()=>ue(se),children:"Edit"}),c.jsx(kp,{onClick:()=>Se.mutate(se.id),children:"Reveal secret"}),c.jsx(kp,{className:"text-destructive",onClick:()=>ie.mutate(se.id),children:"Delete"})]})]})]})})]},se.id)),ne.length===0&&c.jsx("tr",{children:c.jsx("td",{colSpan:7,className:"px-4 py-12 text-center",children:c.jsxs("div",{className:"mx-auto max-w-md",children:[c.jsx("div",{className:"mb-2 flex items-center justify-center",children:c.jsx(Pj,{className:"text-muted-foreground h-5 w-5"})}),c.jsx("p",{className:"text-muted-foreground",children:"No credentials match your search."})]})})})]})]})}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-2xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Credential"})}),c.jsx(mr,{...He,children:c.jsxs("form",{onSubmit:He.handleSubmit(se=>{if(!E)return;const Ne=OT.safeParse(se);if(!Ne.success){Ge.error("Please fix validation errors");return}we.mutate({id:E,body:Ne.data})}),className:"space-y-5 pt-2",children:[c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsx(ft,{control:He.control,name:"credential_provider",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Provider"}),c.jsxs(_n,{onValueChange:se.onChange,value:se.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"aws",children:"AWS"}),c.jsx(Ct,{value:"cloudflare",children:"Cloudflare"}),c.jsx(Ct,{value:"hetzner",children:"Hetzner"}),c.jsx(Ct,{value:"digitalocean",children:"DigitalOcean"}),c.jsx(Ct,{value:"generic",children:"Generic"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:He.control,name:"kind",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Kind"}),c.jsxs(_n,{onValueChange:se.onChange,value:se.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"aws_access_key",children:"AWS Access Key"}),c.jsx(Ct,{value:"api_token",children:"API Token"}),c.jsx(Ct,{value:"basic_auth",children:"Basic Auth"}),c.jsx(Ct,{value:"oauth2",children:"OAuth2"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:He.control,name:"scope_kind",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Scope Kind"}),c.jsxs(_n,{onValueChange:se.onChange,value:se.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"provider",children:"Provider"}),c.jsx(Ct,{value:"service",children:"Service"}),c.jsx(Ct,{value:"resource",children:"Resource"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:He.control,name:"name",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(mt,{...se}),c.jsx(pt,{})]})}),c.jsx(ft,{control:He.control,name:"account_id",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Account ID"}),c.jsx(mt,{...se,placeholder:"optional"}),c.jsx(pt,{})]})}),c.jsx(ft,{control:He.control,name:"region",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Region"}),c.jsx(mt,{...se,placeholder:"optional"}),c.jsx(pt,{})]})})]}),c.jsx(ft,{control:He.control,name:"scope",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Scope (JSON)"}),c.jsx(nl,{value:rc(se.value??(He.getValues("scope_kind")==="provider"?{}:void 0)),onChange:Ne=>{try{se.onChange(JSON.parse(Ne.target.value))}catch{se.onChange(Ne.target.value)}},rows:3,className:"font-mono"}),c.jsx(pt,{})]})}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(q3,{checked:M,onCheckedChange:I,id:"raw-edit-secret-toggle"}),c.jsx("label",{htmlFor:"raw-edit-secret-toggle",className:"text-sm",children:"Rotate secret with raw JSON (leave empty to keep existing)"})]}),M&&c.jsx(ft,{control:He.control,name:"secret",render:({field:se})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Rotate Secret (JSON)"}),c.jsx(nl,{value:typeof se.value=="string"?se.value:rc(se.value??{}),onChange:Ne=>{try{se.onChange(JSON.parse(Ne.target.value))}catch{se.onChange(Ne.target.value)}},rows:6,className:"font-mono",placeholder:'{"access_key_id":"...","secret_access_key":"..."}'}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"secondary",onClick:()=>{const se=OT.safeParse(He.getValues());if(!se.success){Ge.error("Fix validation errors before previewing");return}const Ne=K3(se.data);Q(Ne),W(!0)},children:"Preview request"}),c.jsx(Pe,{variant:"outline",type:"button",onClick:()=>h(!1),children:"Cancel"}),c.jsxs(Pe,{type:"submit",disabled:we.isPending,children:[we.isPending&&c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Save changes"]})]})]})})]})}),c.jsx(dn,{open:m,onOpenChange:g,children:c.jsxs(hn,{className:"sm:max-w-xl",children:[c.jsx(pn,{children:c.jsxs(fn,{className:"flex items-center gap-2",children:[c.jsx(LT,{className:"h-4 w-4"})," Decrypted Secret"]})}),c.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:c.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:rc(b??{})})}),c.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 text-xs",children:[c.jsx(Pj,{className:"h-3.5 w-3.5"}),"One-time read. Close this dialog to hide the secret."]}),c.jsxs(gn,{children:[c.jsx(Pe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(rc(b??{})),Ge.success("Copied to clipboard")},children:"Copy"}),c.jsx(Pe,{onClick:()=>g(!1),children:"Close"})]})]})}),c.jsx(dn,{open:F,onOpenChange:H,children:c.jsxs(hn,{className:"sm:max-w-2xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Preview: POST /api/v1/credentials"})}),c.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:c.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:rc(V??{})})}),c.jsxs(gn,{children:[c.jsx(Pe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(rc(V??{})),Ge.success("Copied body")},children:"Copy body"}),c.jsx(Pe,{onClick:()=>H(!1),children:"Close"})]})]})}),c.jsx(dn,{open:z,onOpenChange:W,children:c.jsxs(hn,{className:"sm:max-w-2xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Preview: PATCH /api/v1/credentials/:id"})}),c.jsx("div",{className:"bg-muted/40 rounded-lg border p-3",children:c.jsx("pre",{className:"max-h-[50vh] overflow-auto text-xs leading-relaxed",children:rc(ae??{})})}),c.jsxs(gn,{children:[c.jsx(Pe,{variant:"outline",onClick:()=>{navigator.clipboard.writeText(rc(ae??{})),Ge.success("Copied body")},children:"Copy body"}),c.jsx(Pe,{onClick:()=>W(!1),children:"Close"})]})]})})]})};function ya({className:e,...r}){return c.jsx("div",{"data-slot":"card",className:vt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...r})}function ol({className:e,...r}){return c.jsx("div",{"data-slot":"card-header",className:vt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...r})}function ll({className:e,...r}){return c.jsx("div",{"data-slot":"card-title",className:vt("leading-none font-semibold",e),...r})}function M_({className:e,...r}){return c.jsx("div",{"data-slot":"card-description",className:vt("text-muted-foreground text-sm",e),...r})}function ho({className:e,...r}){return c.jsx("div",{"data-slot":"card-content",className:vt("px-6",e),...r})}const Mwe=e=>{switch(e){case"ready":return c.jsx(EC,{className:"h-4 w-4 text-emerald-600"});case"provisioning":return c.jsx(ys,{className:"h-4 w-4 animate-spin text-blue-600"});case"failed":return c.jsx(Pj,{className:"h-4 w-4 text-red-600"});default:return c.jsx(ZZ,{className:"text-muted-foreground h-4 w-4"})}},kT=({s:e})=>c.jsxs(rr,{variant:e==="failed"?"destructive":e==="ready"?"default":"secondary",className:"gap-1",title:e,children:[Mwe(e),c.jsx("span",{className:"capitalize",children:e??"pending"})]}),I_=e=>e.split(",").map(r=>r.trim()).filter(Boolean),Iwe=e=>e&&e.length?e.join(","):"",z_=["A","AAAA","CNAME","TXT","MX","NS","SRV","CAA"],zwe=e=>e.credential_provider==="aws"&&e.scope_kind==="service"&&(()=>{const r=e.scope;try{return(typeof r=="string"?JSON.parse(r):r||{})?.service==="route53"}catch{return!1}})(),V3=e=>[e.name||"Unnamed",e.account_id,e.region].filter(Boolean).join(" · "),jB=Is({domain_name:Sn().min(1,"Domain is required").max(253).transform(e=>e.trim().replace(/\.$/,"").toLowerCase()),credential_id:Sn().uuid("Pick a credential"),zone_id:Sn().optional().or(nw("")).transform(e=>e?e.trim():void 0)}),Lwe=jB.partial(),Fwe=q6([tw(),Sn().regex(/^\d+$/).transform(e=>Number(e))]).optional().refine(e=>e===void 0||e>=1&&e<=86400,{message:"TTL must be between 1 and 86400"}),CB=Is({name:Sn().min(1,"Name required").max(253).transform(e=>e.trim().replace(/\.$/,"").toLowerCase()),type:Fa(z_),ttl:Fwe,valuesCsv:Sn().optional()}).superRefine((e,r)=>{const s=I_(e.valuesCsv??"");s.length===0&&r.addIssue({code:"custom",message:"At least one value is required"}),e.type==="CNAME"&&s.length!==1&&r.addIssue({code:"custom",message:"CNAME requires exactly one value"})}),qwe=CB.partial(),Bwe=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(null),[u,h]=T.useState(!1),[m,g]=T.useState(!1),[b,w]=T.useState(!1),[E,A]=T.useState(!1),[k,R]=T.useState(null),M=Ms(),I=Un({queryKey:["dns","domains"],queryFn:()=>sc.listDomains()}),F=Un({queryKey:["dns","records",s?.id],queryFn:async()=>s?await sc.listRecordSetsByDomain(s.id):[],enabled:!!s?.id}),H=Un({queryKey:["credentials","r53"],queryFn:()=>ng.listCredentials()}),V=T.useMemo(()=>(H.data??[]).filter(zwe),[H.data]);T.useEffect(()=>{!s&&I.data&&I.data.length&&o(I.data[0])},[I.data,s]);const K=T.useMemo(()=>{const ne=I.data??[];if(!e.trim())return ne;const ce=e.toLowerCase();return ne.filter($e=>[$e.domain_name,$e.zone_id,$e.status,$e.domain_name].filter(Boolean).map(me=>String(me).toLowerCase()).some(me=>me.includes(ce)))},[I.data,e]),z=hr({resolver:fr(jB),defaultValues:{domain_name:"",credential_id:"",zone_id:""}}),W=Wt({mutationFn:ne=>sc.createDomain(ne),onSuccess:async ne=>{Ge.success("Domain created"),h(!1),z.reset(),await M.invalidateQueries({queryKey:["dns","domains"]}),o(ne)},onError:ne=>Ge.error("Failed to create domain",{description:ne?.message??"Unknown error"})}),ae=hr({resolver:fr(Lwe)}),Q=ne=>{o(ne),ae.reset({domain_name:ne.domain_name,credential_id:ne.credential_id,zone_id:ne.zone_id||""}),g(!0)},te=Wt({mutationFn:ne=>{if(!s)throw new Error("No domain selected");return sc.updateDomain(s.id,ne)},onSuccess:async()=>{Ge.success("Domain updated"),g(!1),await M.invalidateQueries({queryKey:["dns","domains"]}),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:ne=>Ge.error("Failed to update domain",{description:ne?.message??"Unknown error"})}),de=Wt({mutationFn:ne=>sc.deleteDomain(ne),onSuccess:async()=>{Ge.success("Domain deleted"),await M.invalidateQueries({queryKey:["dns","domains"]}),o(null)},onError:ne=>Ge.error("Failed to delete domain",{description:ne?.message??"Unknown error"})}),je=hr({resolver:fr(CB),defaultValues:{name:"",type:"A",ttl:300,valuesCsv:""}}),we=ne=>{const ce=ne?.response?.data?.error||ne?.message||"Unknown error";return ce.includes("ownership_conflict")?"Ownership conflict: this (name,type) exists but isn’t owned by autoglue.":ce.includes("already_exists")?"A record with this (name,type) already exists. Use Edit instead.":ce},ie=Wt({mutationFn:async ne=>{if(!s)throw new Error("No domain selected");const ce={name:ne.name,type:ne.type,...ne.ttl?{ttl:ne.ttl}:{},values:I_(ne.valuesCsv??"")};return sc.createRecordSetsByDomain(s.id,ce)},onSuccess:async()=>{Ge.success("Record set created"),w(!1),je.reset(),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:ne=>Ge.error("Failed to create record set",{description:we(ne)})}),Se=hr({resolver:fr(qwe)}),Ae=ne=>{R(ne);const ce=ne.values||[];Se.reset({name:ne.name,type:ne.type,ttl:ne.ttl?Number(ne.ttl):void 0,valuesCsv:Iwe(ce)}),A(!0)},He=Wt({mutationFn:async ne=>{if(!k)throw new Error("No record selected");const ce={};return ne.name!==void 0&&(ce.name=ne.name),ne.type!==void 0&&(ce.type=ne.type),ne.ttl!==void 0&&ne.ttl!==null&&(ce.ttl=ne.ttl),ne.valuesCsv!==void 0&&(ce.values=I_(ne.valuesCsv)),sc.updateRecordSetsByDomain(k.id,ce)},onSuccess:async()=>{Ge.success("Record set updated"),A(!1),R(null),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:ne=>Ge.error("Failed to update record set",{description:we(ne)})}),ue=Wt({mutationFn:ne=>sc.deleteRecordSetsByDomain(ne),onSuccess:async()=>{Ge.success("Record set deleted"),await M.invalidateQueries({queryKey:["dns","records",s?.id]})},onError:ne=>Ge.error("Failed to delete record set",{description:ne?.message??"Unknown error"})});return c.jsxs("div",{className:"space-y-5 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"text-2xl font-bold",children:"DNS"}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:ne=>r(ne.target.value),placeholder:"Search domains…",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:u,onOpenChange:h,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>h(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Add Domain"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Add Domain"})}),c.jsx(mr,{...z,children:c.jsxs("form",{className:"space-y-4 pt-2",onSubmit:z.handleSubmit(ne=>W.mutate(ne)),children:[c.jsx(ft,{control:z.control,name:"domain_name",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Domain"}),c.jsx(bt,{children:c.jsx(mt,{...ne,placeholder:"example.com"})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:z.control,name:"credential_id",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Route53 Credential"}),c.jsxs(_n,{onValueChange:ne.onChange,value:ne.value,disabled:H.isLoading||(V?.length??0)===0,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:H.isLoading?"Loading…":(V?.length??0)===0?"No Route53 credentials found":"Select credential"})})}),c.jsx(Dn,{children:(V??[]).map(ce=>c.jsx(Ct,{value:ce.id,children:V3(ce)},ce.id))})]}),H.error&&c.jsx("p",{className:"text-destructive text-xs",children:"Failed to load credentials."}),c.jsx(pt,{})]})}),c.jsx(ft,{control:z.control,name:"zone_id",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Zone ID (optional)"}),c.jsx(bt,{children:c.jsx(mt,{...ne,placeholder:"/hostedzone/Z123…"})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),c.jsxs(Pe,{type:"submit",disabled:W.isPending,children:[W.isPending&&c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),c.jsx("div",{children:c.jsxs(ya,{className:"p-3 md:col-span-5",children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[c.jsx("div",{className:"text-sm font-semibold",children:"Domains"}),I.isFetching&&c.jsx(ys,{className:"h-4 w-4 animate-spin"})]}),c.jsx("div",{className:"max-h-[60vh] overflow-auto rounded-md border",children:c.jsxs("table",{className:"min-w-full text-sm",children:[c.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-3 py-2 text-left",children:"Domain"}),c.jsx("th",{className:"px-3 py-2 text-left",children:"Zone"}),c.jsx("th",{className:"px-3 py-2 text-left",children:"Status"}),c.jsx("th",{className:"px-3 py-2 text-right",children:"Actions"})]})}),c.jsxs("tbody",{children:[(K??[]).map(ne=>c.jsxs("tr",{className:`hover:bg-muted/30 border-t ${s?.id===ne.id?"bg-muted/40":""}`,onClick:()=>o(ne),children:[c.jsx("td",{className:"cursor-pointer px-3 py-2 font-medium",children:ne.domain_name}),c.jsx("td",{className:"px-3 py-2",children:ne.zone_id||"—"}),c.jsx("td",{className:"px-3 py-2",children:c.jsx(kT,{s:ne.status})}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsx(Pe,{size:"icon",variant:"ghost",onClick:()=>Q(ne),children:c.jsx(uc,{className:"h-4 w-4"})}),c.jsxs(uC,{children:[c.jsx(dC,{asChild:!0,children:c.jsx(Pe,{size:"icon",variant:"ghost",onClick:ce=>ce.stopPropagation(),children:c.jsx(wg,{className:"h-4 w-4"})})}),c.jsxs(hC,{children:[c.jsxs(pC,{children:[c.jsxs(mC,{children:["Delete “",ne.domain_name,"”?"]}),c.jsx(gC,{children:"This deletes the domain metadata. External DNS records are not touched."})]}),c.jsxs(fC,{children:[c.jsx(vC,{children:"Cancel"}),c.jsx(yC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>de.mutate(ne.id),children:"Delete"})]})]})]})]})})]},ne.id)),(!K||K.length===0)&&c.jsx("tr",{children:c.jsx("td",{colSpan:4,className:"text-muted-foreground px-3 py-8 text-center",children:"No domains yet."})})]})]})})]})}),c.jsx("div",{children:c.jsxs(ya,{className:"p-3 md:col-span-7",children:[c.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[c.jsxs("div",{className:"text-sm font-semibold",children:["Records ",s?`— ${s.domain_name}`:""]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(kT,{s:s?.status}),c.jsxs(dn,{open:b,onOpenChange:w,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{disabled:!s,children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Add Record"]})}),c.jsxs(hn,{className:"sm:max-w-xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Add Record"})}),c.jsx(mr,{...je,children:c.jsxs("form",{className:"space-y-4 pt-2",onSubmit:je.handleSubmit(ne=>ie.mutate(ne)),children:[c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[c.jsx(ft,{control:je.control,name:"name",render:({field:ne})=>c.jsxs(ot,{className:"md:col-span-1",children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{...ne,placeholder:"endpoint (or @)"})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:je.control,name:"type",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Type"}),c.jsxs(_n,{onValueChange:ne.onChange,defaultValue:ne.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsx(Dn,{children:z_.map(ce=>c.jsx(Ct,{value:ce,children:ce},ce))})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:je.control,name:"ttl",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"TTL (sec, optional)"}),c.jsx(bt,{children:c.jsx(mt,{type:"number",value:ne.value,onChange:ce=>ne.onChange(ce.target.value===""?void 0:Number(ce.target.value)),placeholder:"300"})}),c.jsx(pt,{})]})})]}),c.jsx(ft,{control:je.control,name:"valuesCsv",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Values (comma-separated)"}),c.jsx(bt,{children:c.jsx(nl,{...ne,rows:3,placeholder:'e.g. 10.0.30.1, 10.0.30.2 or "v=spf1 ~all"',className:"font-mono"})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",type:"button",onClick:()=>w(!1),children:"Cancel"}),c.jsxs(Pe,{type:"submit",disabled:ie.isPending,children:[ie.isPending&&c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Create"]})]})]})})]})]})]})]}),c.jsxs("div",{className:"overflow-x-auto rounded-md border",children:[F.isLoading&&c.jsxs("div",{className:"flex items-center gap-2 p-4",children:[c.jsx(ys,{className:"h-4 w-4 animate-spin"})," Loading records…"]}),!F.isLoading&&c.jsxs("table",{className:"min-w-full text-sm",children:[c.jsx("thead",{className:"bg-muted/40 text-xs tracking-wide uppercase",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-3 py-2 text-left",children:"Name"}),c.jsx("th",{className:"px-3 py-2 text-left",children:"Type"}),c.jsx("th",{className:"px-3 py-2 text-left",children:"TTL"}),c.jsx("th",{className:"px-3 py-2 text-left",children:"Values"}),c.jsx("th",{className:"px-3 py-2 text-left",children:"Status"}),c.jsx("th",{className:"px-3 py-2 text-left",children:"Owner"}),c.jsx("th",{className:"px-3 py-2 text-right",children:"Actions"})]})}),c.jsxs("tbody",{children:[(F.data??[]).map(ne=>{const ce=ne.values||[];return c.jsxs("tr",{className:"border-t",children:[c.jsx("td",{className:"px-3 py-2 font-medium",children:ne.name||"@"}),c.jsx("td",{className:"px-3 py-2",children:ne.type}),c.jsx("td",{className:"px-3 py-2",children:ne.ttl??"—"}),c.jsx("td",{className:"px-3 py-2",children:c.jsx("div",{className:"max-w-[420px] truncate",title:(ce||[]).join(", "),children:(ce||[]).join(", ")})}),c.jsx("td",{className:"px-3 py-2",children:c.jsx(kT,{s:ne.status})}),c.jsx("td",{className:"px-3 py-2",children:ne.owner}),c.jsx("td",{className:"px-3 py-2",children:c.jsxs("div",{className:"flex items-center justify-end gap-2",children:[c.jsx(Pe,{size:"icon",variant:"ghost",onClick:()=>Ae(ne),children:c.jsx(uc,{className:"h-4 w-4"})}),c.jsxs(uC,{children:[c.jsx(dC,{asChild:!0,children:c.jsx(Pe,{size:"icon",variant:"ghost",children:c.jsx(wg,{className:"h-4 w-4"})})}),c.jsxs(hC,{children:[c.jsxs(pC,{children:[c.jsxs(mC,{children:["Delete “",ne.name||"@"," ",ne.type,"”?"]}),c.jsx(gC,{children:"This removes the record set from your project. Your worker does not delete it from the DNS provider right now."})]}),c.jsxs(fC,{children:[c.jsx(vC,{children:"Cancel"}),c.jsx(yC,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>ue.mutate(ne.id),children:"Delete"})]})]})]}),c.jsxs(C$,{children:[c.jsx(A$,{asChild:!0,children:c.jsx(Pe,{variant:"ghost",size:"icon",children:c.jsx(Z_,{className:"h-4 w-4"})})}),c.jsxs(O$,{align:"end",children:[c.jsx(kp,{onClick:()=>Ae(ne),children:"Edit"}),c.jsx(kp,{className:"text-destructive",onClick:()=>ue.mutate(ne.id),children:"Delete"})]})]})]})})]},ne.id)}),(!F.data||F.data.length===0)&&c.jsx("tr",{children:c.jsx("td",{colSpan:7,className:"text-muted-foreground px-3 py-8 text-center",children:s?"No records yet — add one.":"Select a domain to view records."})})]})]})]})]})}),c.jsx(dn,{open:m,onOpenChange:g,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Domain"})}),c.jsx(mr,{...ae,children:c.jsxs("form",{className:"space-y-4 pt-2",onSubmit:ae.handleSubmit(ne=>te.mutate(ne)),children:[c.jsx(ft,{control:ae.control,name:"domain_name",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Domain"}),c.jsx(bt,{children:c.jsx(mt,{...ne,placeholder:"example.com"})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:ae.control,name:"credential_id",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Route53 Credential"}),c.jsxs(_n,{onValueChange:ne.onChange,value:ne.value??"",disabled:H.isLoading||(V?.length??0)===0,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:H.isLoading?"Loading…":(V?.length??0)===0?"No Route53 credentials found":"Select credential"})})}),c.jsx(Dn,{children:(V??[]).map(ce=>c.jsx(Ct,{value:ce.id,children:V3(ce)},ce.id))})]}),H.error&&c.jsx("p",{className:"text-destructive text-xs",children:"Failed to load credentials."}),c.jsx(pt,{})]})}),c.jsx(ft,{control:ae.control,name:"zone_id",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Zone ID"}),c.jsx(bt,{children:c.jsx(mt,{...ne,placeholder:"/hostedzone/Z123…"})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",type:"button",onClick:()=>g(!1),children:"Cancel"}),c.jsxs(Pe,{type:"submit",disabled:te.isPending,children:[te.isPending&&c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Save Changes"]})]})]})})]})}),c.jsx(dn,{open:E,onOpenChange:A,children:c.jsxs(hn,{className:"sm:max-w-xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Record"})}),c.jsx(mr,{...Se,children:c.jsxs("form",{className:"space-y-4 pt-2",onSubmit:Se.handleSubmit(ne=>He.mutate(ne)),children:[c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[c.jsx(ft,{control:Se.control,name:"name",render:({field:ne})=>c.jsxs(ot,{className:"md:col-span-1",children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{...ne})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Se.control,name:"type",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Type"}),c.jsxs(_n,{onValueChange:ne.onChange,defaultValue:ne.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{})})}),c.jsx(Dn,{children:z_.map(ce=>c.jsx(Ct,{value:ce,children:ce},ce))})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Se.control,name:"ttl",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"TTL (sec, optional)"}),c.jsx(bt,{children:c.jsx(mt,{type:"number",value:ne.value,onChange:ce=>ne.onChange(ce.target.value===""?void 0:Number(ce.target.value)),placeholder:"300"})}),c.jsx(pt,{})]})})]}),c.jsx(ft,{control:Se.control,name:"valuesCsv",render:({field:ne})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Values (comma-separated)"}),c.jsx(bt,{children:c.jsx(nl,{...ne,rows:3,className:"font-mono"})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",type:"button",onClick:()=>A(!1),children:"Cancel"}),c.jsxs(Pe,{type:"submit",disabled:He.isPending,children:[He.isPending&&c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Save Changes"]})]})]})})]})})]})};var H3={};var G3;function Uwe(){return G3||(G3=1,(()=>{var e,r,s={557:(h,m,g)=>{const b=globalThis,w=b.ShadowRoot&&(b.ShadyCSS===void 0||b.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,E=Symbol(),A=new WeakMap;class k{constructor(n,i,l){if(this._$cssResult$=!0,l!==E)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=n,this.t=i}get styleSheet(){let n=this.o;const i=this.t;if(w&&n===void 0){const l=i!==void 0&&i.length===1;l&&(n=A.get(i)),n===void 0&&((this.o=n=new CSSStyleSheet).replaceSync(this.cssText),l&&A.set(i,n))}return n}toString(){return this.cssText}}const R=t=>new k(typeof t=="string"?t:t+"",void 0,E),M=(t,...n)=>{const i=t.length===1?t[0]:n.reduce(((l,p,v)=>l+(x=>{if(x._$cssResult$===!0)return x.cssText;if(typeof x=="number")return x;throw Error("Value passed to 'css' function must be a 'css' function result: "+x+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(p)+t[v+1]),t[0]);return new k(i,t,E)},I=(t,n)=>{if(w)t.adoptedStyleSheets=n.map((i=>i instanceof CSSStyleSheet?i:i.styleSheet));else for(const i of n){const l=document.createElement("style"),p=b.litNonce;p!==void 0&&l.setAttribute("nonce",p),l.textContent=i.cssText,t.appendChild(l)}},F=w?t=>t:t=>t instanceof CSSStyleSheet?(n=>{let i="";for(const l of n.cssRules)i+=l.cssText;return R(i)})(t):t,{is:H,defineProperty:V,getOwnPropertyDescriptor:K,getOwnPropertyNames:z,getOwnPropertySymbols:W,getPrototypeOf:ae}=Object,Q=globalThis,te=Q.trustedTypes,de=te?te.emptyScript:"",je=Q.reactiveElementPolyfillSupport,we=(t,n)=>t,ie={toAttribute(t,n){switch(n){case Boolean:t=t?de:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,n){let i=t;switch(n){case Boolean:i=t!==null;break;case Number:i=t===null?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch{i=null}}return i}},Se=(t,n)=>!H(t,n),Ae={attribute:!0,type:String,converter:ie,reflect:!1,hasChanged:Se};Symbol.metadata??=Symbol("metadata"),Q.litPropertyMetadata??=new WeakMap;class He extends HTMLElement{static addInitializer(n){this._$Ei(),(this.l??=[]).push(n)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(n,i=Ae){if(i.state&&(i.attribute=!1),this._$Ei(),this.elementProperties.set(n,i),!i.noAccessor){const l=Symbol(),p=this.getPropertyDescriptor(n,l,i);p!==void 0&&V(this.prototype,n,p)}}static getPropertyDescriptor(n,i,l){const{get:p,set:v}=K(this.prototype,n)??{get(){return this[i]},set(x){this[i]=x}};return{get(){return p?.call(this)},set(x){const S=p?.call(this);v.call(this,x),this.requestUpdate(n,S,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(n){return this.elementProperties.get(n)??Ae}static _$Ei(){if(this.hasOwnProperty(we("elementProperties")))return;const n=ae(this);n.finalize(),n.l!==void 0&&(this.l=[...n.l]),this.elementProperties=new Map(n.elementProperties)}static finalize(){if(this.hasOwnProperty(we("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(we("properties"))){const i=this.properties,l=[...z(i),...W(i)];for(const p of l)this.createProperty(p,i[p])}const n=this[Symbol.metadata];if(n!==null){const i=litPropertyMetadata.get(n);if(i!==void 0)for(const[l,p]of i)this.elementProperties.set(l,p)}this._$Eh=new Map;for(const[i,l]of this.elementProperties){const p=this._$Eu(i,l);p!==void 0&&this._$Eh.set(p,i)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(n){const i=[];if(Array.isArray(n)){const l=new Set(n.flat(1/0).reverse());for(const p of l)i.unshift(F(p))}else n!==void 0&&i.push(F(n));return i}static _$Eu(n,i){const l=i.attribute;return l===!1?void 0:typeof l=="string"?l:typeof n=="string"?n.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((n=>this.enableUpdating=n)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((n=>n(this)))}addController(n){(this._$EO??=new Set).add(n),this.renderRoot!==void 0&&this.isConnected&&n.hostConnected?.()}removeController(n){this._$EO?.delete(n)}_$E_(){const n=new Map,i=this.constructor.elementProperties;for(const l of i.keys())this.hasOwnProperty(l)&&(n.set(l,this[l]),delete this[l]);n.size>0&&(this._$Ep=n)}createRenderRoot(){const n=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return I(n,this.constructor.elementStyles),n}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((n=>n.hostConnected?.()))}enableUpdating(n){}disconnectedCallback(){this._$EO?.forEach((n=>n.hostDisconnected?.()))}attributeChangedCallback(n,i,l){this._$AK(n,l)}_$EC(n,i){const l=this.constructor.elementProperties.get(n),p=this.constructor._$Eu(n,l);if(p!==void 0&&l.reflect===!0){const v=(l.converter?.toAttribute!==void 0?l.converter:ie).toAttribute(i,l.type);this._$Em=n,v==null?this.removeAttribute(p):this.setAttribute(p,v),this._$Em=null}}_$AK(n,i){const l=this.constructor,p=l._$Eh.get(n);if(p!==void 0&&this._$Em!==p){const v=l.getPropertyOptions(p),x=typeof v.converter=="function"?{fromAttribute:v.converter}:v.converter?.fromAttribute!==void 0?v.converter:ie;this._$Em=p,this[p]=x.fromAttribute(i,v.type),this._$Em=null}}requestUpdate(n,i,l){if(n!==void 0){if(l??=this.constructor.getPropertyOptions(n),!(l.hasChanged??Se)(this[n],i))return;this.P(n,i,l)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(n,i,l){this._$AL.has(n)||this._$AL.set(n,i),l.reflect===!0&&this._$Em!==n&&(this._$Ej??=new Set).add(n)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(i){Promise.reject(i)}const n=this.scheduleUpdate();return n!=null&&await n,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[p,v]of this._$Ep)this[p]=v;this._$Ep=void 0}const l=this.constructor.elementProperties;if(l.size>0)for(const[p,v]of l)v.wrapped!==!0||this._$AL.has(p)||this[p]===void 0||this.P(p,this[p],v)}let n=!1;const i=this._$AL;try{n=this.shouldUpdate(i),n?(this.willUpdate(i),this._$EO?.forEach((l=>l.hostUpdate?.())),this.update(i)):this._$EU()}catch(l){throw n=!1,this._$EU(),l}n&&this._$AE(i)}willUpdate(n){}_$AE(n){this._$EO?.forEach((i=>i.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(n)),this.updated(n)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(n){return!0}update(n){this._$Ej&&=this._$Ej.forEach((i=>this._$EC(i,this[i]))),this._$EU()}updated(n){}firstUpdated(n){}}He.elementStyles=[],He.shadowRootOptions={mode:"open"},He[we("elementProperties")]=new Map,He[we("finalized")]=new Map,je?.({ReactiveElement:He}),(Q.reactiveElementVersions??=[]).push("2.0.4");const ue=globalThis,ne=ue.trustedTypes,ce=ne?ne.createPolicy("lit-html",{createHTML:t=>t}):void 0,$e="$lit$",me=`lit$${Math.random().toFixed(9).slice(2)}$`,Xe="?"+me,Oe=`<${Xe}>`,Te=document,Ke=()=>Te.createComment(""),se=t=>t===null||typeof t!="object"&&typeof t!="function",Ne=Array.isArray,Fe=t=>Ne(t)||typeof t?.[Symbol.iterator]=="function",at=`[
|
||
\f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ot=/-->/g,Lt=/>/g,Rt=RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
|
||
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ft=/'/g,qe=/"/g,Bt=/^(?:script|style|textarea|title)$/i,kt=t=>(n,...i)=>({_$litType$:t,strings:n,values:i}),G=kt(1),On=Symbol.for("lit-noChange"),mn=Symbol.for("lit-nothing"),Oi=new WeakMap,ge=Te.createTreeWalker(Te,129);function Me(t,n){if(!Ne(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return ce!==void 0?ce.createHTML(n):n}const _=(t,n)=>{const i=t.length-1,l=[];let p,v=n===2?"<svg>":n===3?"<math>":"",x=gt;for(let S=0;S<i;S++){const C=t[S];let N,D,$=-1,L=0;for(;L<C.length&&(x.lastIndex=L,D=x.exec(C),D!==null);)L=x.lastIndex,x===gt?D[1]==="!--"?x=Ot:D[1]!==void 0?x=Lt:D[2]!==void 0?(Bt.test(D[2])&&(p=RegExp("</"+D[2],"g")),x=Rt):D[3]!==void 0&&(x=Rt):x===Rt?D[0]===">"?(x=p??gt,$=-1):D[1]===void 0?$=-2:($=x.lastIndex-D[2].length,N=D[1],x=D[3]===void 0?Rt:D[3]==='"'?qe:Ft):x===qe||x===Ft?x=Rt:x===Ot||x===Lt?x=gt:(x=Rt,p=void 0);const U=x===Rt&&t[S+1].startsWith("/>")?" ":"";v+=x===gt?C+Oe:$>=0?(l.push(N),C.slice(0,$)+$e+C.slice($)+me+U):C+me+($===-2?S:U)}return[Me(t,v+(t[i]||"<?>")+(n===2?"</svg>":n===3?"</math>":"")),l]};class q{constructor({strings:n,_$litType$:i},l){let p;this.parts=[];let v=0,x=0;const S=n.length-1,C=this.parts,[N,D]=_(n,i);if(this.el=q.createElement(N,l),ge.currentNode=this.el.content,i===2||i===3){const $=this.el.content.firstChild;$.replaceWith(...$.childNodes)}for(;(p=ge.nextNode())!==null&&C.length<S;){if(p.nodeType===1){if(p.hasAttributes())for(const $ of p.getAttributeNames())if($.endsWith($e)){const L=D[x++],U=p.getAttribute($).split(me),J=/([.?@])?(.*)/.exec(L);C.push({type:1,index:v,name:J[2],strings:U,ctor:J[1]==="."?Je:J[1]==="?"?Tt:J[1]==="@"?fe:Re}),p.removeAttribute($)}else $.startsWith(me)&&(C.push({type:6,index:v}),p.removeAttribute($));if(Bt.test(p.tagName)){const $=p.textContent.split(me),L=$.length-1;if(L>0){p.textContent=ne?ne.emptyScript:"";for(let U=0;U<L;U++)p.append($[U],Ke()),ge.nextNode(),C.push({type:2,index:++v});p.append($[L],Ke())}}}else if(p.nodeType===8)if(p.data===Xe)C.push({type:2,index:v});else{let $=-1;for(;($=p.data.indexOf(me,$+1))!==-1;)C.push({type:7,index:v}),$+=me.length-1}v++}}static createElement(n,i){const l=Te.createElement("template");return l.innerHTML=n,l}}function X(t,n,i=t,l){if(n===On)return n;let p=l!==void 0?i.o?.[l]:i.l;const v=se(n)?void 0:n._$litDirective$;return p?.constructor!==v&&(p?._$AO?.(!1),v===void 0?p=void 0:(p=new v(t),p._$AT(t,i,l)),l!==void 0?(i.o??=[])[l]=p:i.l=p),p!==void 0&&(n=X(t,p._$AS(t,n.values),p,l)),n}class oe{constructor(n,i){this._$AV=[],this._$AN=void 0,this._$AD=n,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(n){const{el:{content:i},parts:l}=this._$AD,p=(n?.creationScope??Te).importNode(i,!0);ge.currentNode=p;let v=ge.nextNode(),x=0,S=0,C=l[0];for(;C!==void 0;){if(x===C.index){let N;C.type===2?N=new ve(v,v.nextSibling,this,n):C.type===1?N=new C.ctor(v,C.name,C.strings,this,n):C.type===6&&(N=new Ut(v,this,n)),this._$AV.push(N),C=l[++S]}x!==C?.index&&(v=ge.nextNode(),x++)}return ge.currentNode=Te,p}p(n){let i=0;for(const l of this._$AV)l!==void 0&&(l.strings!==void 0?(l._$AI(n,l,i),i+=l.strings.length-2):l._$AI(n[i])),i++}}class ve{get _$AU(){return this._$AM?._$AU??this.v}constructor(n,i,l,p){this.type=2,this._$AH=mn,this._$AN=void 0,this._$AA=n,this._$AB=i,this._$AM=l,this.options=p,this.v=p?.isConnected??!0}get parentNode(){let n=this._$AA.parentNode;const i=this._$AM;return i!==void 0&&n?.nodeType===11&&(n=i.parentNode),n}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(n,i=this){n=X(this,n,i),se(n)?n===mn||n==null||n===""?(this._$AH!==mn&&this._$AR(),this._$AH=mn):n!==this._$AH&&n!==On&&this._(n):n._$litType$!==void 0?this.$(n):n.nodeType!==void 0?this.T(n):Fe(n)?this.k(n):this._(n)}O(n){return this._$AA.parentNode.insertBefore(n,this._$AB)}T(n){this._$AH!==n&&(this._$AR(),this._$AH=this.O(n))}_(n){this._$AH!==mn&&se(this._$AH)?this._$AA.nextSibling.data=n:this.T(Te.createTextNode(n)),this._$AH=n}$(n){const{values:i,_$litType$:l}=n,p=typeof l=="number"?this._$AC(n):(l.el===void 0&&(l.el=q.createElement(Me(l.h,l.h[0]),this.options)),l);if(this._$AH?._$AD===p)this._$AH.p(i);else{const v=new oe(p,this),x=v.u(this.options);v.p(i),this.T(x),this._$AH=v}}_$AC(n){let i=Oi.get(n.strings);return i===void 0&&Oi.set(n.strings,i=new q(n)),i}k(n){Ne(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let l,p=0;for(const v of n)p===i.length?i.push(l=new ve(this.O(Ke()),this.O(Ke()),this,this.options)):l=i[p],l._$AI(v),p++;p<i.length&&(this._$AR(l&&l._$AB.nextSibling,p),i.length=p)}_$AR(n=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);n&&n!==this._$AB;){const l=n.nextSibling;n.remove(),n=l}}setConnected(n){this._$AM===void 0&&(this.v=n,this._$AP?.(n))}}class Re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(n,i,l,p,v){this.type=1,this._$AH=mn,this._$AN=void 0,this.element=n,this.name=i,this._$AM=p,this.options=v,l.length>2||l[0]!==""||l[1]!==""?(this._$AH=Array(l.length-1).fill(new String),this.strings=l):this._$AH=mn}_$AI(n,i=this,l,p){const v=this.strings;let x=!1;if(v===void 0)n=X(this,n,i,0),x=!se(n)||n!==this._$AH&&n!==On,x&&(this._$AH=n);else{const S=n;let C,N;for(n=v[0],C=0;C<v.length-1;C++)N=X(this,S[l+C],i,C),N===On&&(N=this._$AH[C]),x||=!se(N)||N!==this._$AH[C],N===mn?n=mn:n!==mn&&(n+=(N??"")+v[C+1]),this._$AH[C]=N}x&&!p&&this.j(n)}j(n){n===mn?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,n??"")}}class Je extends Re{constructor(){super(...arguments),this.type=3}j(n){this.element[this.name]=n===mn?void 0:n}}class Tt extends Re{constructor(){super(...arguments),this.type=4}j(n){this.element.toggleAttribute(this.name,!!n&&n!==mn)}}class fe extends Re{constructor(n,i,l,p,v){super(n,i,l,p,v),this.type=5}_$AI(n,i=this){if((n=X(this,n,i,0)??mn)===On)return;const l=this._$AH,p=n===mn&&l!==mn||n.capture!==l.capture||n.once!==l.once||n.passive!==l.passive,v=n!==mn&&(l===mn||p);p&&this.element.removeEventListener(this.name,this,l),v&&this.element.addEventListener(this.name,this,n),this._$AH=n}handleEvent(n){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,n):this._$AH.handleEvent(n)}}class Ut{constructor(n,i,l){this.element=n,this.type=6,this._$AN=void 0,this._$AM=i,this.options=l}get _$AU(){return this._$AM._$AU}_$AI(n){X(this,n)}}const nn=ue.litHtmlPolyfillSupport;nn?.(q,ve),(ue.litHtmlVersions??=[]).push("3.2.0");class Gt extends He{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){const n=super.createRenderRoot();return this.renderOptions.renderBefore??=n.firstChild,n}update(n){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(n),this.o=((l,p,v)=>{const x=v?.renderBefore??p;let S=x._$litPart$;if(S===void 0){const C=v?.renderBefore??null;x._$litPart$=S=new ve(p.insertBefore(Ke(),C),C,void 0,v??{})}return S._$AI(l),S})(i,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return On}}Gt._$litElement$=!0,Gt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Gt});const ss=globalThis.litElementPolyfillSupport;ss?.({LitElement:Gt});function is(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}(globalThis.litElementVersions??=[]).push("4.1.0");let Yi={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const dl=/[&<>"']/,ki=new RegExp(dl.source,"g"),pc=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,wu=new RegExp(pc.source,"g"),fc={"&":"&","<":"<",">":">",'"':""","'":"'"},ba=t=>fc[t];function qt(t,n){if(n){if(dl.test(t))return t.replace(ki,ba)}else if(pc.test(t))return t.replace(wu,ba);return t}const xr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function Yr(t){return t.replace(xr,((n,i)=>(i=i.toLowerCase())==="colon"?":":i.charAt(0)==="#"?i.charAt(1)==="x"?String.fromCharCode(parseInt(i.substring(2),16)):String.fromCharCode(+i.substring(1)):""))}const Rs=/(^|[^\[])\^/g;function Pn(t,n){t=typeof t=="string"?t:t.source,n=n||"";const i={replace:(l,p)=>(p=(p=p.source||p).replace(Rs,"$1"),t=t.replace(l,p),i),getRegex:()=>new RegExp(t,n)};return i}const Er=/[^\w:]/g,ti=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function hl(t,n,i){if(t){let l;try{l=decodeURIComponent(Yr(i)).replace(Er,"").toLowerCase()}catch{return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}n&&!ti.test(i)&&(i=(function(l,p){xs[" "+l]||(ni.test(l)?xs[" "+l]=l+"/":xs[" "+l]=Sa(l,"/",!0)),l=xs[" "+l];const v=l.indexOf(":")===-1;return p.substring(0,2)==="//"?v?p:l.replace(Su,"$1")+p:p.charAt(0)==="/"?v?p:l.replace(wa,"$1")+p:l+p})(n,i));try{i=encodeURI(i).replace(/%25/g,"%")}catch{return null}return i}const xs={},ni=/^[^:]+:\/*[^/]*$/,Su=/^([^:]+:)[\s\S]*$/,wa=/^([^:]+:\/*[^/]*)[\s\S]*$/,Eu={exec:function(){}};function Ug(t,n){const i=t.replace(/\|/g,((p,v,x)=>{let S=!1,C=v;for(;--C>=0&&x[C]==="\\";)S=!S;return S?"|":" |"})).split(/ \|/);let l=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),i.length>n)i.splice(n);else for(;i.length<n;)i.push("");for(;l<i.length;l++)i[l]=i[l].trim().replace(/\\\|/g,"|");return i}function Sa(t,n,i){const l=t.length;if(l===0)return"";let p=0;for(;p<l;){const v=t.charAt(l-p-1);if(v!==n||i){if(v===n||!i)break;p++}else p++}return t.slice(0,l-p)}function as(t,n){if(n<1)return"";let i="";for(;n>1;)1&n&&(i+=t),n>>=1,t+=t;return i+t}function zs(t,n,i,l){const p=n.href,v=n.title?qt(n.title):null,x=t[1].replace(/\\([\[\]])/g,"$1");if(t[0].charAt(0)!=="!"){l.state.inLink=!0;const S={type:"link",raw:i,href:p,title:v,text:x,tokens:l.inlineTokens(x)};return l.state.inLink=!1,S}return{type:"image",raw:i,href:p,title:v,text:qt(x)}}class pl{constructor(n){this.options=n||Yi}space(n){const i=this.rules.block.newline.exec(n);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(n){const i=this.rules.block.code.exec(n);if(i){const l=i[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?l:Sa(l,`
|
||
`)}}}fences(n){const i=this.rules.block.fences.exec(n);if(i){const l=i[0],p=(function(v,x){const S=v.match(/^(\s+)(?:```)/);if(S===null)return x;const C=S[1];return x.split(`
|
||
`).map((N=>{const D=N.match(/^\s+/);if(D===null)return N;const[$]=D;return $.length>=C.length?N.slice(C.length):N})).join(`
|
||
`)})(l,i[3]||"");return{type:"code",raw:l,lang:i[2]?i[2].trim().replace(this.rules.inline._escapes,"$1"):i[2],text:p}}}heading(n){const i=this.rules.block.heading.exec(n);if(i){let l=i[2].trim();if(/#$/.test(l)){const p=Sa(l,"#");this.options.pedantic?l=p.trim():p&&!/ $/.test(p)||(l=p.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:l,tokens:this.lexer.inline(l)}}}hr(n){const i=this.rules.block.hr.exec(n);if(i)return{type:"hr",raw:i[0]}}blockquote(n){const i=this.rules.block.blockquote.exec(n);if(i){const l=i[0].replace(/^ *>[ \t]?/gm,""),p=this.lexer.state.top;this.lexer.state.top=!0;const v=this.lexer.blockTokens(l);return this.lexer.state.top=p,{type:"blockquote",raw:i[0],tokens:v,text:l}}}list(n){let i=this.rules.block.list.exec(n);if(i){let l,p,v,x,S,C,N,D,$,L,U,J,Y=i[1].trim();const Z=Y.length>1,P={type:"list",raw:"",ordered:Z,start:Z?+Y.slice(0,-1):"",loose:!1,items:[]};Y=Z?`\\d{1,9}\\${Y.slice(-1)}`:`\\${Y}`,this.options.pedantic&&(Y=Z?Y:"[*+-]");const re=new RegExp(`^( {0,3}${Y})((?:[ ][^\\n]*)?(?:\\n|$))`);for(;n&&(J=!1,i=re.exec(n))&&!this.rules.block.hr.test(n);){if(l=i[0],n=n.substring(l.length),D=i[2].split(`
|
||
`,1)[0].replace(/^\t+/,(he=>" ".repeat(3*he.length))),$=n.split(`
|
||
`,1)[0],this.options.pedantic?(x=2,U=D.trimLeft()):(x=i[2].search(/[^ ]/),x=x>4?1:x,U=D.slice(x),x+=i[1].length),C=!1,!D&&/^ *$/.test($)&&(l+=$+`
|
||
`,n=n.substring($.length+1),J=!0),!J){const he=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),xe=new RegExp(`^ {0,${Math.min(3,x-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),pe=new RegExp(`^ {0,${Math.min(3,x-1)}}(?:\`\`\`|~~~)`),_e=new RegExp(`^ {0,${Math.min(3,x-1)}}#`);for(;n&&(L=n.split(`
|
||
`,1)[0],$=L,this.options.pedantic&&($=$.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!pe.test($))&&!_e.test($)&&!he.test($)&&!xe.test(n);){if($.search(/[^ ]/)>=x||!$.trim())U+=`
|
||
`+$.slice(x);else{if(C||D.search(/[^ ]/)>=4||pe.test(D)||_e.test(D)||xe.test(D))break;U+=`
|
||
`+$}C||$.trim()||(C=!0),l+=L+`
|
||
`,n=n.substring(L.length+1),D=$.slice(x)}}P.loose||(N?P.loose=!0:/\n *\n *$/.test(l)&&(N=!0)),this.options.gfm&&(p=/^\[[ xX]\] /.exec(U),p&&(v=p[0]!=="[ ] ",U=U.replace(/^\[[ xX]\] +/,""))),P.items.push({type:"list_item",raw:l,task:!!p,checked:v,loose:!1,text:U}),P.raw+=l}P.items[P.items.length-1].raw=l.trimRight(),P.items[P.items.length-1].text=U.trimRight(),P.raw=P.raw.trimRight();const le=P.items.length;for(S=0;S<le;S++)if(this.lexer.state.top=!1,P.items[S].tokens=this.lexer.blockTokens(P.items[S].text,[]),!P.loose){const he=P.items[S].tokens.filter((pe=>pe.type==="space")),xe=he.length>0&&he.some((pe=>/\n.*\n/.test(pe.raw)));P.loose=xe}if(P.loose)for(S=0;S<le;S++)P.items[S].loose=!0;return P}}html(n){const i=this.rules.block.html.exec(n);if(i){const l={type:"html",raw:i[0],pre:!this.options.sanitizer&&(i[1]==="pre"||i[1]==="script"||i[1]==="style"),text:i[0]};if(this.options.sanitize){const p=this.options.sanitizer?this.options.sanitizer(i[0]):qt(i[0]);l.type="paragraph",l.text=p,l.tokens=this.lexer.inline(p)}return l}}def(n){const i=this.rules.block.def.exec(n);if(i){const l=i[1].toLowerCase().replace(/\s+/g," "),p=i[2]?i[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",v=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline._escapes,"$1"):i[3];return{type:"def",tag:l,raw:i[0],href:p,title:v}}}table(n){const i=this.rules.block.table.exec(n);if(i){const l={type:"table",header:Ug(i[1]).map((p=>({text:p}))),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:i[3]&&i[3].trim()?i[3].replace(/\n[ \t]*$/,"").split(`
|
||
`):[]};if(l.header.length===l.align.length){l.raw=i[0];let p,v,x,S,C=l.align.length;for(p=0;p<C;p++)/^ *-+: *$/.test(l.align[p])?l.align[p]="right":/^ *:-+: *$/.test(l.align[p])?l.align[p]="center":/^ *:-+ *$/.test(l.align[p])?l.align[p]="left":l.align[p]=null;for(C=l.rows.length,p=0;p<C;p++)l.rows[p]=Ug(l.rows[p],l.header.length).map((N=>({text:N})));for(C=l.header.length,v=0;v<C;v++)l.header[v].tokens=this.lexer.inline(l.header[v].text);for(C=l.rows.length,v=0;v<C;v++)for(S=l.rows[v],x=0;x<S.length;x++)S[x].tokens=this.lexer.inline(S[x].text);return l}}}lheading(n){const i=this.rules.block.lheading.exec(n);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(n){const i=this.rules.block.paragraph.exec(n);if(i){const l=i[1].charAt(i[1].length-1)===`
|
||
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:l,tokens:this.lexer.inline(l)}}}text(n){const i=this.rules.block.text.exec(n);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(n){const i=this.rules.inline.escape.exec(n);if(i)return{type:"escape",raw:i[0],text:qt(i[1])}}tag(n){const i=this.rules.inline.tag.exec(n);if(i)return!this.lexer.state.inLink&&/^<a /i.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):qt(i[0]):i[0]}}link(n){const i=this.rules.inline.link.exec(n);if(i){const l=i[2].trim();if(!this.options.pedantic&&/^</.test(l)){if(!/>$/.test(l))return;const x=Sa(l.slice(0,-1),"\\");if((l.length-x.length)%2==0)return}else{const x=(function(S,C){if(S.indexOf(C[1])===-1)return-1;const N=S.length;let D=0,$=0;for(;$<N;$++)if(S[$]==="\\")$++;else if(S[$]===C[0])D++;else if(S[$]===C[1]&&(D--,D<0))return $;return-1})(i[2],"()");if(x>-1){const S=(i[0].indexOf("!")===0?5:4)+i[1].length+x;i[2]=i[2].substring(0,x),i[0]=i[0].substring(0,S).trim(),i[3]=""}}let p=i[2],v="";if(this.options.pedantic){const x=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(p);x&&(p=x[1],v=x[3])}else v=i[3]?i[3].slice(1,-1):"";return p=p.trim(),/^</.test(p)&&(p=this.options.pedantic&&!/>$/.test(l)?p.slice(1):p.slice(1,-1)),zs(i,{href:p&&p.replace(this.rules.inline._escapes,"$1"),title:v&&v.replace(this.rules.inline._escapes,"$1")},i[0],this.lexer)}}reflink(n,i){let l;if((l=this.rules.inline.reflink.exec(n))||(l=this.rules.inline.nolink.exec(n))){let p=(l[2]||l[1]).replace(/\s+/g," ");if(p=i[p.toLowerCase()],!p){const v=l[0].charAt(0);return{type:"text",raw:v,text:v}}return zs(l,p,l[0],this.lexer)}}emStrong(n,i,l=""){let p=this.rules.inline.emStrong.lDelim.exec(n);if(!p||p[3]&&l.match(/[\p{L}\p{N}]/u))return;const v=p[1]||p[2]||"";if(!v||v&&(l===""||this.rules.inline.punctuation.exec(l))){const x=p[0].length-1;let S,C,N=x,D=0;const $=p[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for($.lastIndex=0,i=i.slice(-1*n.length+x);(p=$.exec(i))!=null;){if(S=p[1]||p[2]||p[3]||p[4]||p[5]||p[6],!S)continue;if(C=S.length,p[3]||p[4]){N+=C;continue}if((p[5]||p[6])&&x%3&&!((x+C)%3)){D+=C;continue}if(N-=C,N>0)continue;C=Math.min(C,C+N+D);const L=n.slice(0,x+p.index+(p[0].length-S.length)+C);if(Math.min(x,C)%2){const J=L.slice(1,-1);return{type:"em",raw:L,text:J,tokens:this.lexer.inlineTokens(J)}}const U=L.slice(2,-2);return{type:"strong",raw:L,text:U,tokens:this.lexer.inlineTokens(U)}}}}codespan(n){const i=this.rules.inline.code.exec(n);if(i){let l=i[2].replace(/\n/g," ");const p=/[^ ]/.test(l),v=/^ /.test(l)&&/ $/.test(l);return p&&v&&(l=l.substring(1,l.length-1)),l=qt(l,!0),{type:"codespan",raw:i[0],text:l}}}br(n){const i=this.rules.inline.br.exec(n);if(i)return{type:"br",raw:i[0]}}del(n){const i=this.rules.inline.del.exec(n);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(n,i){const l=this.rules.inline.autolink.exec(n);if(l){let p,v;return l[2]==="@"?(p=qt(this.options.mangle?i(l[1]):l[1]),v="mailto:"+p):(p=qt(l[1]),v=p),{type:"link",raw:l[0],text:p,href:v,tokens:[{type:"text",raw:p,text:p}]}}}url(n,i){let l;if(l=this.rules.inline.url.exec(n)){let p,v;if(l[2]==="@")p=qt(this.options.mangle?i(l[0]):l[0]),v="mailto:"+p;else{let x;do x=l[0],l[0]=this.rules.inline._backpedal.exec(l[0])[0];while(x!==l[0]);p=qt(l[0]),v=l[1]==="www."?"http://"+l[0]:l[0]}return{type:"link",raw:l[0],text:p,href:v,tokens:[{type:"text",raw:p,text:p}]}}}inlineText(n,i){const l=this.rules.inline.text.exec(n);if(l){let p;return p=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(l[0]):qt(l[0]):l[0]:qt(this.options.smartypants?i(l[0]):l[0]),{type:"text",raw:l[0],text:p}}}}const Yt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Eu,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Yt.def=Pn(Yt.def).replace("label",Yt._label).replace("title",Yt._title).getRegex(),Yt.bullet=/(?:[*+-]|\d{1,9}[.)])/,Yt.listItemStart=Pn(/^( *)(bull) */).replace("bull",Yt.bullet).getRegex(),Yt.list=Pn(Yt.list).replace(/bull/g,Yt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Yt.def.source+")").getRegex(),Yt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Yt.html=Pn(Yt.html,"i").replace("comment",Yt._comment).replace("tag",Yt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Yt.paragraph=Pn(Yt._paragraph).replace("hr",Yt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt._tag).getRegex(),Yt.blockquote=Pn(Yt.blockquote).replace("paragraph",Yt.paragraph).getRegex(),Yt.normal={...Yt},Yt.gfm={...Yt.normal,table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"},Yt.gfm.table=Pn(Yt.gfm.table).replace("hr",Yt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt._tag).getRegex(),Yt.gfm.paragraph=Pn(Yt._paragraph).replace("hr",Yt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Yt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt._tag).getRegex(),Yt.pedantic={...Yt.normal,html:Pn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Eu,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pn(Yt.normal._paragraph).replace("hr",Yt.hr).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",Yt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const Dt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Eu,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Eu,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function cA(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Kg(t){let n,i,l="";const p=t.length;for(n=0;n<p;n++)i=t.charCodeAt(n),Math.random()>.5&&(i="x"+i.toString(16)),l+="&#"+i+";";return l}Dt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Dt.punctuation=Pn(Dt.punctuation).replace(/punctuation/g,Dt._punctuation).getRegex(),Dt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Dt.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Dt._comment=Pn(Yt._comment).replace("(?:-->|$)","-->").getRegex(),Dt.emStrong.lDelim=Pn(Dt.emStrong.lDelim).replace(/punct/g,Dt._punctuation).getRegex(),Dt.emStrong.rDelimAst=Pn(Dt.emStrong.rDelimAst,"g").replace(/punct/g,Dt._punctuation).getRegex(),Dt.emStrong.rDelimUnd=Pn(Dt.emStrong.rDelimUnd,"g").replace(/punct/g,Dt._punctuation).getRegex(),Dt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Dt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Dt._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Dt.autolink=Pn(Dt.autolink).replace("scheme",Dt._scheme).replace("email",Dt._email).getRegex(),Dt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Dt.tag=Pn(Dt.tag).replace("comment",Dt._comment).replace("attribute",Dt._attribute).getRegex(),Dt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Dt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Dt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Dt.link=Pn(Dt.link).replace("label",Dt._label).replace("href",Dt._href).replace("title",Dt._title).getRegex(),Dt.reflink=Pn(Dt.reflink).replace("label",Dt._label).replace("ref",Yt._label).getRegex(),Dt.nolink=Pn(Dt.nolink).replace("ref",Yt._label).getRegex(),Dt.reflinkSearch=Pn(Dt.reflinkSearch,"g").replace("reflink",Dt.reflink).replace("nolink",Dt.nolink).getRegex(),Dt.normal={...Dt},Dt.pedantic={...Dt.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Pn(/^!?\[(label)\]\((.*?)\)/).replace("label",Dt._label).getRegex(),reflink:Pn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Dt._label).getRegex()},Dt.gfm={...Dt.normal,escape:Pn(Dt.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Dt.gfm.url=Pn(Dt.gfm.url,"i").replace("email",Dt.gfm._extended_email).getRegex(),Dt.breaks={...Dt.gfm,br:Pn(Dt.br).replace("{2,}","*").getRegex(),text:Pn(Dt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class Zi{constructor(n){this.tokens=[],this.tokens.links=Object.create(null),this.options=n||Yi,this.options.tokenizer=this.options.tokenizer||new pl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={block:Yt.normal,inline:Dt.normal};this.options.pedantic?(i.block=Yt.pedantic,i.inline=Dt.pedantic):this.options.gfm&&(i.block=Yt.gfm,this.options.breaks?i.inline=Dt.breaks:i.inline=Dt.gfm),this.tokenizer.rules=i}static get rules(){return{block:Yt,inline:Dt}}static lex(n,i){return new Zi(i).lex(n)}static lexInline(n,i){return new Zi(i).inlineTokens(n)}lex(n){let i;for(n=n.replace(/\r\n|\r/g,`
|
||
`),this.blockTokens(n,this.tokens);i=this.inlineQueue.shift();)this.inlineTokens(i.src,i.tokens);return this.tokens}blockTokens(n,i=[]){let l,p,v,x;for(n=this.options.pedantic?n.replace(/\t/g," ").replace(/^ +$/gm,""):n.replace(/^( *)(\t+)/gm,((S,C,N)=>C+" ".repeat(N.length)));n;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((S=>!!(l=S.call({lexer:this},n,i))&&(n=n.substring(l.raw.length),i.push(l),!0)))))if(l=this.tokenizer.space(n))n=n.substring(l.raw.length),l.raw.length===1&&i.length>0?i[i.length-1].raw+=`
|
||
`:i.push(l);else if(l=this.tokenizer.code(n))n=n.substring(l.raw.length),p=i[i.length-1],!p||p.type!=="paragraph"&&p.type!=="text"?i.push(l):(p.raw+=`
|
||
`+l.raw,p.text+=`
|
||
`+l.text,this.inlineQueue[this.inlineQueue.length-1].src=p.text);else if(l=this.tokenizer.fences(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.heading(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.hr(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.blockquote(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.list(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.html(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.def(n))n=n.substring(l.raw.length),p=i[i.length-1],!p||p.type!=="paragraph"&&p.type!=="text"?this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title}):(p.raw+=`
|
||
`+l.raw,p.text+=`
|
||
`+l.raw,this.inlineQueue[this.inlineQueue.length-1].src=p.text);else if(l=this.tokenizer.table(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.lheading(n))n=n.substring(l.raw.length),i.push(l);else{if(v=n,this.options.extensions&&this.options.extensions.startBlock){let S=1/0;const C=n.slice(1);let N;this.options.extensions.startBlock.forEach((function(D){N=D.call({lexer:this},C),typeof N=="number"&&N>=0&&(S=Math.min(S,N))})),S<1/0&&S>=0&&(v=n.substring(0,S+1))}if(this.state.top&&(l=this.tokenizer.paragraph(v)))p=i[i.length-1],x&&p.type==="paragraph"?(p.raw+=`
|
||
`+l.raw,p.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=p.text):i.push(l),x=v.length!==n.length,n=n.substring(l.raw.length);else if(l=this.tokenizer.text(n))n=n.substring(l.raw.length),p=i[i.length-1],p&&p.type==="text"?(p.raw+=`
|
||
`+l.raw,p.text+=`
|
||
`+l.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=p.text):i.push(l);else if(n){const S="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(S);break}throw new Error(S)}}return this.state.top=!0,i}inline(n,i=[]){return this.inlineQueue.push({src:n,tokens:i}),i}inlineTokens(n,i=[]){let l,p,v,x,S,C,N=n;if(this.tokens.links){const D=Object.keys(this.tokens.links);if(D.length>0)for(;(x=this.tokenizer.rules.inline.reflinkSearch.exec(N))!=null;)D.includes(x[0].slice(x[0].lastIndexOf("[")+1,-1))&&(N=N.slice(0,x.index)+"["+as("a",x[0].length-2)+"]"+N.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(x=this.tokenizer.rules.inline.blockSkip.exec(N))!=null;)N=N.slice(0,x.index)+"["+as("a",x[0].length-2)+"]"+N.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(x=this.tokenizer.rules.inline.escapedEmSt.exec(N))!=null;)N=N.slice(0,x.index+x[0].length-2)+"++"+N.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;n;)if(S||(C=""),S=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((D=>!!(l=D.call({lexer:this},n,i))&&(n=n.substring(l.raw.length),i.push(l),!0)))))if(l=this.tokenizer.escape(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.tag(n))n=n.substring(l.raw.length),p=i[i.length-1],p&&l.type==="text"&&p.type==="text"?(p.raw+=l.raw,p.text+=l.text):i.push(l);else if(l=this.tokenizer.link(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.reflink(n,this.tokens.links))n=n.substring(l.raw.length),p=i[i.length-1],p&&l.type==="text"&&p.type==="text"?(p.raw+=l.raw,p.text+=l.text):i.push(l);else if(l=this.tokenizer.emStrong(n,N,C))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.codespan(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.br(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.del(n))n=n.substring(l.raw.length),i.push(l);else if(l=this.tokenizer.autolink(n,Kg))n=n.substring(l.raw.length),i.push(l);else if(this.state.inLink||!(l=this.tokenizer.url(n,Kg))){if(v=n,this.options.extensions&&this.options.extensions.startInline){let D=1/0;const $=n.slice(1);let L;this.options.extensions.startInline.forEach((function(U){L=U.call({lexer:this},$),typeof L=="number"&&L>=0&&(D=Math.min(D,L))})),D<1/0&&D>=0&&(v=n.substring(0,D+1))}if(l=this.tokenizer.inlineText(v,cA))n=n.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(C=l.raw.slice(-1)),S=!0,p=i[i.length-1],p&&p.type==="text"?(p.raw+=l.raw,p.text+=l.text):i.push(l);else if(n){const D="Infinite loop on byte: "+n.charCodeAt(0);if(this.options.silent){console.error(D);break}throw new Error(D)}}else n=n.substring(l.raw.length),i.push(l);return i}}class rh{constructor(n){this.options=n||Yi}code(n,i,l){const p=(i||"").match(/\S*/)[0];if(this.options.highlight){const v=this.options.highlight(n,p);v!=null&&v!==n&&(l=!0,n=v)}return n=n.replace(/\n$/,"")+`
|
||
`,p?'<pre><code class="'+this.options.langPrefix+qt(p)+'">'+(l?n:qt(n,!0))+`</code></pre>
|
||
`:"<pre><code>"+(l?n:qt(n,!0))+`</code></pre>
|
||
`}blockquote(n){return`<blockquote>
|
||
${n}</blockquote>
|
||
`}html(n){return n}heading(n,i,l,p){return this.options.headerIds?`<h${i} id="${this.options.headerPrefix+p.slug(l)}">${n}</h${i}>
|
||
`:`<h${i}>${n}</h${i}>
|
||
`}hr(){return this.options.xhtml?`<hr/>
|
||
`:`<hr>
|
||
`}list(n,i,l){const p=i?"ol":"ul";return"<"+p+(i&&l!==1?' start="'+l+'"':"")+`>
|
||
`+n+"</"+p+`>
|
||
`}listitem(n){return`<li>${n}</li>
|
||
`}checkbox(n){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(n){return`<p>${n}</p>
|
||
`}table(n,i){return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
||
<thead>
|
||
`+n+`</thead>
|
||
`+i+`</table>
|
||
`}tablerow(n){return`<tr>
|
||
${n}</tr>
|
||
`}tablecell(n,i){const l=i.header?"th":"td";return(i.align?`<${l} align="${i.align}">`:`<${l}>`)+n+`</${l}>
|
||
`}strong(n){return`<strong>${n}</strong>`}em(n){return`<em>${n}</em>`}codespan(n){return`<code>${n}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(n){return`<del>${n}</del>`}link(n,i,l){if((n=hl(this.options.sanitize,this.options.baseUrl,n))===null)return l;let p='<a href="'+n+'"';return i&&(p+=' title="'+i+'"'),p+=">"+l+"</a>",p}image(n,i,l){if((n=hl(this.options.sanitize,this.options.baseUrl,n))===null)return l;let p=`<img src="${n}" alt="${l}"`;return i&&(p+=` title="${i}"`),p+=this.options.xhtml?"/>":">",p}text(n){return n}}class mc{strong(n){return n}em(n){return n}codespan(n){return n}del(n){return n}html(n){return n}text(n){return n}link(n,i,l){return""+l}image(n,i,l){return""+l}br(){return""}}class gc{constructor(){this.seen={}}serialize(n){return n.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(n,i){let l=n,p=0;if(this.seen.hasOwnProperty(l)){p=this.seen[n];do p++,l=n+"-"+p;while(this.seen.hasOwnProperty(l))}return i||(this.seen[n]=p,this.seen[l]=0),l}slug(n,i={}){const l=this.serialize(n);return this.getNextSafeSlug(l,i.dryrun)}}class Ji{constructor(n){this.options=n||Yi,this.options.renderer=this.options.renderer||new rh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new mc,this.slugger=new gc}static parse(n,i){return new Ji(i).parse(n)}static parseInline(n,i){return new Ji(i).parseInline(n)}parse(n,i=!0){let l,p,v,x,S,C,N,D,$,L,U,J,Y,Z,P,re,le,he,xe,pe="";const _e=n.length;for(l=0;l<_e;l++)if(L=n[l],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[L.type]&&(xe=this.options.extensions.renderers[L.type].call({parser:this},L),xe!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(L.type)))pe+=xe||"";else switch(L.type){case"space":continue;case"hr":pe+=this.renderer.hr();continue;case"heading":pe+=this.renderer.heading(this.parseInline(L.tokens),L.depth,Yr(this.parseInline(L.tokens,this.textRenderer)),this.slugger);continue;case"code":pe+=this.renderer.code(L.text,L.lang,L.escaped);continue;case"table":for(D="",N="",x=L.header.length,p=0;p<x;p++)N+=this.renderer.tablecell(this.parseInline(L.header[p].tokens),{header:!0,align:L.align[p]});for(D+=this.renderer.tablerow(N),$="",x=L.rows.length,p=0;p<x;p++){for(C=L.rows[p],N="",S=C.length,v=0;v<S;v++)N+=this.renderer.tablecell(this.parseInline(C[v].tokens),{header:!1,align:L.align[v]});$+=this.renderer.tablerow(N)}pe+=this.renderer.table(D,$);continue;case"blockquote":$=this.parse(L.tokens),pe+=this.renderer.blockquote($);continue;case"list":for(U=L.ordered,J=L.start,Y=L.loose,x=L.items.length,$="",p=0;p<x;p++)P=L.items[p],re=P.checked,le=P.task,Z="",P.task&&(he=this.renderer.checkbox(re),Y?P.tokens.length>0&&P.tokens[0].type==="paragraph"?(P.tokens[0].text=he+" "+P.tokens[0].text,P.tokens[0].tokens&&P.tokens[0].tokens.length>0&&P.tokens[0].tokens[0].type==="text"&&(P.tokens[0].tokens[0].text=he+" "+P.tokens[0].tokens[0].text)):P.tokens.unshift({type:"text",text:he}):Z+=he),Z+=this.parse(P.tokens,Y),$+=this.renderer.listitem(Z,le,re);pe+=this.renderer.list($,U,J);continue;case"html":pe+=this.renderer.html(L.text);continue;case"paragraph":pe+=this.renderer.paragraph(this.parseInline(L.tokens));continue;case"text":for($=L.tokens?this.parseInline(L.tokens):L.text;l+1<_e&&n[l+1].type==="text";)L=n[++l],$+=`
|
||
`+(L.tokens?this.parseInline(L.tokens):L.text);pe+=i?this.renderer.paragraph($):$;continue;default:{const ke='Token with "'+L.type+'" type was not found.';if(this.options.silent)return void console.error(ke);throw new Error(ke)}}return pe}parseInline(n,i){i=i||this.renderer;let l,p,v,x="";const S=n.length;for(l=0;l<S;l++)if(p=n[l],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type]&&(v=this.options.extensions.renderers[p.type].call({parser:this},p),v!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(p.type)))x+=v||"";else switch(p.type){case"escape":case"text":x+=i.text(p.text);break;case"html":x+=i.html(p.text);break;case"link":x+=i.link(p.href,p.title,this.parseInline(p.tokens,i));break;case"image":x+=i.image(p.href,p.title,p.text);break;case"strong":x+=i.strong(this.parseInline(p.tokens,i));break;case"em":x+=i.em(this.parseInline(p.tokens,i));break;case"codespan":x+=i.codespan(p.text);break;case"br":x+=i.br();break;case"del":x+=i.del(this.parseInline(p.tokens,i));break;default:{const C='Token with "'+p.type+'" type was not found.';if(this.options.silent)return void console.error(C);throw new Error(C)}}return x}}class fl{constructor(n){this.options=n||Yi}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(n){return n}postprocess(n){return n}}function Zr(t,n){return(i,l,p)=>{typeof l=="function"&&(p=l,l=null);const v={...l},x=(function(S,C,N){return D=>{if(D.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,S){const $="<p>An error occurred:</p><pre>"+qt(D.message+"",!0)+"</pre>";return C?Promise.resolve($):N?void N(null,$):$}if(C)return Promise.reject(D);if(!N)throw D;N(D)}})((l={...yt.defaults,...v}).silent,l.async,p);if(i==null)return x(new Error("marked(): input parameter is undefined or null"));if(typeof i!="string")return x(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if((function(S){S&&S.sanitize&&!S.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")})(l),l.hooks&&(l.hooks.options=l),p){const S=l.highlight;let C;try{l.hooks&&(i=l.hooks.preprocess(i)),C=t(i,l)}catch($){return x($)}const N=function($){let L;if(!$)try{l.walkTokens&&yt.walkTokens(C,l.walkTokens),L=n(C,l),l.hooks&&(L=l.hooks.postprocess(L))}catch(U){$=U}return l.highlight=S,$?x($):p(null,L)};if(!S||S.length<3||(delete l.highlight,!C.length))return N();let D=0;return yt.walkTokens(C,(function($){$.type==="code"&&(D++,setTimeout((()=>{S($.text,$.lang,(function(L,U){if(L)return N(L);U!=null&&U!==$.text&&($.text=U,$.escaped=!0),D--,D===0&&N()}))}),0))})),void(D===0&&N())}if(l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(i):i).then((S=>t(S,l))).then((S=>l.walkTokens?Promise.all(yt.walkTokens(S,l.walkTokens)).then((()=>S)):S)).then((S=>n(S,l))).then((S=>l.hooks?l.hooks.postprocess(S):S)).catch(x);try{l.hooks&&(i=l.hooks.preprocess(i));const S=t(i,l);l.walkTokens&&yt.walkTokens(S,l.walkTokens);let C=n(S,l);return l.hooks&&(C=l.hooks.postprocess(C)),C}catch(S){return x(S)}}}function yt(t,n,i){return Zr(Zi.lex,Ji.parse)(t,n,i)}yt.options=yt.setOptions=function(t){var n;return yt.defaults={...yt.defaults,...t},n=yt.defaults,Yi=n,yt},yt.getDefaults=is,yt.defaults=Yi,yt.use=function(...t){const n=yt.defaults.extensions||{renderers:{},childTokens:{}};t.forEach((i=>{const l={...i};if(l.async=yt.defaults.async||l.async||!1,i.extensions&&(i.extensions.forEach((p=>{if(!p.name)throw new Error("extension name required");if(p.renderer){const v=n.renderers[p.name];n.renderers[p.name]=v?function(...x){let S=p.renderer.apply(this,x);return S===!1&&(S=v.apply(this,x)),S}:p.renderer}if(p.tokenizer){if(!p.level||p.level!=="block"&&p.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");n[p.level]?n[p.level].unshift(p.tokenizer):n[p.level]=[p.tokenizer],p.start&&(p.level==="block"?n.startBlock?n.startBlock.push(p.start):n.startBlock=[p.start]:p.level==="inline"&&(n.startInline?n.startInline.push(p.start):n.startInline=[p.start]))}p.childTokens&&(n.childTokens[p.name]=p.childTokens)})),l.extensions=n),i.renderer){const p=yt.defaults.renderer||new rh;for(const v in i.renderer){const x=p[v];p[v]=(...S)=>{let C=i.renderer[v].apply(p,S);return C===!1&&(C=x.apply(p,S)),C}}l.renderer=p}if(i.tokenizer){const p=yt.defaults.tokenizer||new pl;for(const v in i.tokenizer){const x=p[v];p[v]=(...S)=>{let C=i.tokenizer[v].apply(p,S);return C===!1&&(C=x.apply(p,S)),C}}l.tokenizer=p}if(i.hooks){const p=yt.defaults.hooks||new fl;for(const v in i.hooks){const x=p[v];fl.passThroughHooks.has(v)?p[v]=S=>{if(yt.defaults.async)return Promise.resolve(i.hooks[v].call(p,S)).then((N=>x.call(p,N)));const C=i.hooks[v].call(p,S);return x.call(p,C)}:p[v]=(...S)=>{let C=i.hooks[v].apply(p,S);return C===!1&&(C=x.apply(p,S)),C}}l.hooks=p}if(i.walkTokens){const p=yt.defaults.walkTokens;l.walkTokens=function(v){let x=[];return x.push(i.walkTokens.call(this,v)),p&&(x=x.concat(p.call(this,v))),x}}yt.setOptions(l)}))},yt.walkTokens=function(t,n){let i=[];for(const l of t)switch(i=i.concat(n.call(yt,l)),l.type){case"table":for(const p of l.header)i=i.concat(yt.walkTokens(p.tokens,n));for(const p of l.rows)for(const v of p)i=i.concat(yt.walkTokens(v.tokens,n));break;case"list":i=i.concat(yt.walkTokens(l.items,n));break;default:yt.defaults.extensions&&yt.defaults.extensions.childTokens&&yt.defaults.extensions.childTokens[l.type]?yt.defaults.extensions.childTokens[l.type].forEach((function(p){i=i.concat(yt.walkTokens(l[p],n))})):l.tokens&&(i=i.concat(yt.walkTokens(l.tokens,n)))}return i},yt.parseInline=Zr(Zi.lexInline,Ji.parseInline),yt.Parser=Ji,yt.parser=Ji.parse,yt.Renderer=rh,yt.TextRenderer=mc,yt.Lexer=Zi,yt.lexer=Zi.lex,yt.Tokenizer=pl,yt.Slugger=gc,yt.Hooks=fl,yt.parse=yt,yt.options,yt.setOptions,yt.use,yt.walkTokens,yt.parseInline,Ji.parse,Zi.lex;var jw=g(848),sr=g.n(jw);g(113),g(83),g(378),g(976),g(514),g(22),g(342),g(784),g(651);const Ri=M`
|
||
.hover-bg:hover {
|
||
background: var(--bg3);
|
||
}
|
||
::selection {
|
||
background: var(--selection-bg);
|
||
color: var(--selection-fg);
|
||
}
|
||
.regular-font {
|
||
font-family:var(--font-regular);
|
||
}
|
||
.mono-font {
|
||
font-family:var(--font-mono);
|
||
}
|
||
.title {
|
||
font-size: calc(var(--font-size-small) + 18px);
|
||
font-weight: normal
|
||
}
|
||
.sub-title{ font-size: 20px; }
|
||
.req-res-title {
|
||
font-family: var(--font-regular);
|
||
font-size: calc(var(--font-size-small) + 4px);
|
||
font-weight:bold;
|
||
margin-bottom:8px;
|
||
text-align:left;
|
||
}
|
||
.tiny-title {
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
font-weight:bold;
|
||
}
|
||
.regular-font-size { font-size: var(--font-size-regular); }
|
||
.small-font-size { font-size: var(--font-size-small); }
|
||
.upper { text-transform: uppercase; }
|
||
.primary-text { color: var(--primary-color); }
|
||
.bold-text { font-weight:bold; }
|
||
.gray-text { color: var(--light-fg); }
|
||
.red-text { color: var(--red) }
|
||
.blue-text { color: var(--blue) }
|
||
.multiline {
|
||
overflow: scroll;
|
||
max-height: var(--resp-area-height, 400px);
|
||
color: var(--fg3);
|
||
}
|
||
.method-fg.put { color: var(--orange); }
|
||
.method-fg.post { color: var(--green); }
|
||
.method-fg.get { color: var(--blue); }
|
||
.method-fg.delete { color: var(--red); }
|
||
.method-fg.options,
|
||
.method-fg.head,
|
||
.method-fg.patch {
|
||
color: var(--yellow);
|
||
}
|
||
|
||
h1 { font-family:var(--font-regular); font-size:28px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h2 { font-family:var(--font-regular); font-size:24px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h3 { font-family:var(--font-regular); font-size:18px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h4 { font-family:var(--font-regular); font-size:16px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h5 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
h6 { font-family:var(--font-regular); font-size:14px; padding-top: 10px; letter-spacing:normal; font-weight:normal; }
|
||
|
||
h1,h2,h3,h4,h5,h5 {
|
||
margin-block-end: 0.2em;
|
||
}
|
||
p { margin-block-start: 0.5em; }
|
||
a { color: var(--blue); cursor:pointer; }
|
||
a.inactive-link {
|
||
color:var(--fg);
|
||
text-decoration: none;
|
||
cursor:text;
|
||
}
|
||
|
||
code,
|
||
pre {
|
||
margin: 0px;
|
||
font-family: var(--font-mono);
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown,
|
||
.m-markdown-small {
|
||
display:block;
|
||
}
|
||
|
||
.m-markdown p,
|
||
.m-markdown span {
|
||
font-size: var(--font-size-regular);
|
||
line-height:calc(var(--font-size-regular) + 8px);
|
||
}
|
||
.m-markdown li {
|
||
font-size: var(--font-size-regular);
|
||
line-height:calc(var(--font-size-regular) + 10px);
|
||
}
|
||
|
||
.m-markdown-small p,
|
||
.m-markdown-small span,
|
||
.m-markdown-small li {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
}
|
||
.m-markdown-small li {
|
||
line-height: calc(var(--font-size-small) + 8px);
|
||
}
|
||
|
||
.m-markdown p:not(:first-child) {
|
||
margin-block-start: 24px;
|
||
}
|
||
|
||
.m-markdown-small p:not(:first-child) {
|
||
margin-block-start: 12px;
|
||
}
|
||
.m-markdown-small p:first-child {
|
||
margin-block-start: 0;
|
||
}
|
||
|
||
.m-markdown p,
|
||
.m-markdown-small p {
|
||
margin-block-end: 0
|
||
}
|
||
|
||
.m-markdown code span {
|
||
font-size:var(--font-size-mono);
|
||
}
|
||
|
||
.m-markdown-small code,
|
||
.m-markdown code {
|
||
padding: 1px 6px;
|
||
border-radius: 2px;
|
||
color: var(--inline-code-fg);
|
||
background-color: var(--bg3);
|
||
font-size: calc(var(--font-size-mono));
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.m-markdown-small code {
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown-small pre,
|
||
.m-markdown pre {
|
||
white-space: pre-wrap;
|
||
overflow-x: auto;
|
||
line-height: normal;
|
||
border-radius: 2px;
|
||
border: 1px solid var(--code-border-color);
|
||
}
|
||
|
||
.m-markdown pre {
|
||
padding: 12px;
|
||
background-color: var(--code-bg);
|
||
color:var(--code-fg);
|
||
}
|
||
|
||
.m-markdown-small pre {
|
||
margin-top: 4px;
|
||
padding: 2px 4px;
|
||
background-color: var(--bg3);
|
||
color: var(--fg2);
|
||
}
|
||
|
||
.m-markdown-small pre code,
|
||
.m-markdown pre code {
|
||
border:none;
|
||
padding:0;
|
||
}
|
||
|
||
.m-markdown pre code {
|
||
color: var(--code-fg);
|
||
background-color: var(--code-bg);
|
||
background-color: transparent;
|
||
}
|
||
|
||
.m-markdown-small pre code {
|
||
color: var(--fg2);
|
||
background-color: var(--bg3);
|
||
}
|
||
|
||
.m-markdown ul,
|
||
.m-markdown ol {
|
||
padding-inline-start: 30px;
|
||
}
|
||
|
||
.m-markdown-small ul,
|
||
.m-markdown-small ol {
|
||
padding-inline-start: 20px;
|
||
}
|
||
|
||
.m-markdown-small a,
|
||
.m-markdown a {
|
||
color:var(--blue);
|
||
}
|
||
|
||
.m-markdown-small img,
|
||
.m-markdown img {
|
||
max-width: 100%;
|
||
}
|
||
|
||
/* Markdown table */
|
||
|
||
.m-markdown-small table,
|
||
.m-markdown table {
|
||
border-spacing: 0;
|
||
margin: 10px 0;
|
||
border-collapse: separate;
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
max-width: 100%;
|
||
}
|
||
|
||
.m-markdown-small table {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 2px);
|
||
margin: 8px 0;
|
||
}
|
||
|
||
.m-markdown-small td,
|
||
.m-markdown-small th,
|
||
.m-markdown td,
|
||
.m-markdown th {
|
||
vertical-align: top;
|
||
border-top: 1px solid var(--border-color);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
}
|
||
|
||
.m-markdown-small tr:first-child th,
|
||
.m-markdown tr:first-child th {
|
||
border-top: 0 none;
|
||
}
|
||
|
||
.m-markdown th,
|
||
.m-markdown td {
|
||
padding: 10px 12px;
|
||
}
|
||
|
||
.m-markdown-small th,
|
||
.m-markdown-small td {
|
||
padding: 8px 8px;
|
||
}
|
||
|
||
.m-markdown th,
|
||
.m-markdown-small th {
|
||
font-weight: 600;
|
||
background-color: var(--bg2);
|
||
vertical-align: middle;
|
||
}
|
||
|
||
.m-markdown-small table code {
|
||
font-size: calc(var(--font-size-mono) - 2px);
|
||
}
|
||
|
||
.m-markdown table code {
|
||
font-size: calc(var(--font-size-mono) - 1px);
|
||
}
|
||
|
||
.m-markdown blockquote,
|
||
.m-markdown-small blockquote {
|
||
margin-inline-start: 0;
|
||
margin-inline-end: 0;
|
||
border-left: 3px solid var(--border-color);
|
||
padding: 6px 0 6px 6px;
|
||
}
|
||
.m-markdown hr{
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
`,ju=M`
|
||
/* Button */
|
||
.m-btn {
|
||
border-radius: var(--border-radius);
|
||
font-weight: 600;
|
||
display: inline-block;
|
||
padding: 6px 16px;
|
||
font-size: var(--font-size-small);
|
||
outline: 0;
|
||
line-height: 1;
|
||
text-align: center;
|
||
white-space: nowrap;
|
||
border: 2px solid var(--primary-color);
|
||
background-color:transparent;
|
||
user-select: none;
|
||
cursor: pointer;
|
||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||
transition-duration: 0.75s;
|
||
}
|
||
.m-btn.primary {
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
}
|
||
.m-btn.thin-border { border-width: 1px; }
|
||
.m-btn.large { padding:8px 14px; }
|
||
.m-btn.small { padding:5px 12px; }
|
||
.m-btn.tiny { padding:5px 6px; }
|
||
.m-btn.circle { border-radius: 50%; }
|
||
.m-btn:hover {
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
}
|
||
.m-btn.nav { border: 2px solid var(--nav-accent-color); }
|
||
.m-btn.nav:hover {
|
||
background-color: var(--nav-accent-color);
|
||
}
|
||
.m-btn:disabled {
|
||
background-color: var(--bg3);
|
||
color: var(--fg3);
|
||
border-color: var(--fg3);
|
||
cursor: not-allowed;
|
||
opacity: 0.4;
|
||
}
|
||
.m-btn:active {
|
||
filter: brightness(75%);
|
||
transform: scale(0.95);
|
||
transition:scale 0s;
|
||
}
|
||
.toolbar-btn {
|
||
cursor: pointer;
|
||
padding: 4px;
|
||
margin:0 2px;
|
||
font-size: var(--font-size-small);
|
||
min-width: 50px;
|
||
color: var(--primary-color-invert);
|
||
border-radius: 2px;
|
||
border: none;
|
||
background-color: var(--primary-color);
|
||
}
|
||
|
||
input, textarea, select, button, pre {
|
||
color:var(--fg);
|
||
outline: none;
|
||
background-color: var(--input-bg);
|
||
border: 1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
button {
|
||
font-family: var(--font-regular);
|
||
}
|
||
|
||
/* Form Inputs */
|
||
pre,
|
||
select,
|
||
textarea,
|
||
input[type="file"],
|
||
input[type="text"],
|
||
input[type="password"] {
|
||
font-family: var(--font-mono);
|
||
font-weight: 400;
|
||
font-size: var(--font-size-small);
|
||
transition: border .2s;
|
||
padding: 6px 5px;
|
||
}
|
||
|
||
select {
|
||
font-family: var(--font-regular);
|
||
padding: 5px 30px 5px 5px;
|
||
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2212%22%20height%3D%2212%22%3E%3Cpath%20d%3D%22M10.3%203.3L6%207.6%201.7%203.3A1%201%200%2000.3%204.7l5%205a1%201%200%20001.4%200l5-5a1%201%200%2010-1.4-1.4z%22%20fill%3D%22%23777777%22%2F%3E%3C%2Fsvg%3E");
|
||
background-position: calc(100% - 5px) center;
|
||
background-repeat: no-repeat;
|
||
background-size: 10px;
|
||
-webkit-appearance: none;
|
||
-moz-appearance: none;
|
||
appearance: none;
|
||
cursor: pointer;
|
||
}
|
||
|
||
select:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
textarea::placeholder,
|
||
input[type="text"]::placeholder,
|
||
input[type="password"]::placeholder {
|
||
color: var(--placeholder-color);
|
||
opacity:1;
|
||
}
|
||
|
||
|
||
input[type="file"]{
|
||
font-family: var(--font-regular);
|
||
padding:2px;
|
||
cursor:pointer;
|
||
border: 1px solid var(--primary-color);
|
||
min-height: calc(var(--font-size-small) + 18px);
|
||
}
|
||
|
||
input[type="file"]::-webkit-file-upload-button {
|
||
font-family: var(--font-regular);
|
||
font-size: var(--font-size-small);
|
||
outline: none;
|
||
cursor:pointer;
|
||
padding: 3px 8px;
|
||
border: 1px solid var(--primary-color);
|
||
background-color: var(--primary-color);
|
||
color: var(--primary-color-invert);
|
||
border-radius: var(--border-radius);;
|
||
-webkit-appearance: none;
|
||
}
|
||
|
||
pre,
|
||
textarea {
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) var(--input-bg);
|
||
}
|
||
|
||
pre::-webkit-scrollbar,
|
||
textarea::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
|
||
pre::-webkit-scrollbar-track,
|
||
textarea::-webkit-scrollbar-track {
|
||
background:var(--input-bg);
|
||
}
|
||
|
||
pre::-webkit-scrollbar-thumb,
|
||
textarea::-webkit-scrollbar-thumb {
|
||
border-radius: 2px;
|
||
background-color: var(--border-color);
|
||
}
|
||
|
||
.link {
|
||
font-size:var(--font-size-small);
|
||
text-decoration: underline;
|
||
color:var(--blue);
|
||
font-family:var(--font-mono);
|
||
margin-bottom:2px;
|
||
}
|
||
|
||
/* Toggle Body */
|
||
input[type="checkbox"] {
|
||
appearance: none;
|
||
display: inline-block;
|
||
background-color: var(--light-bg);
|
||
border: 1px solid var(--light-bg);
|
||
border-radius: 9px;
|
||
cursor: pointer;
|
||
height: 18px;
|
||
position: relative;
|
||
transition: border .25s .15s, box-shadow .25s .3s, padding .25s;
|
||
min-width: 36px;
|
||
width: 36px;
|
||
vertical-align: top;
|
||
}
|
||
/* Toggle Thumb */
|
||
input[type="checkbox"]:after {
|
||
position: absolute;
|
||
background-color: var(--bg);
|
||
border: 1px solid var(--light-bg);
|
||
border-radius: 8px;
|
||
content: '';
|
||
top: 0px;
|
||
left: 0px;
|
||
right: 16px;
|
||
display: block;
|
||
height: 16px;
|
||
transition: border .25s .15s, left .25s .1s, right .15s .175s;
|
||
}
|
||
|
||
/* Toggle Body - Checked */
|
||
input[type="checkbox"]:checked {
|
||
background-color: var(--green);
|
||
border-color: var(--green);
|
||
}
|
||
/* Toggle Thumb - Checked*/
|
||
input[type="checkbox"]:checked:after {
|
||
border: 1px solid var(--green);
|
||
left: 16px;
|
||
right: 1px;
|
||
transition: border .25s, left .15s .25s, right .25s .175s;
|
||
}`,Cu=M`
|
||
.row, .col {
|
||
display:flex;
|
||
}
|
||
.row {
|
||
align-items:center;
|
||
flex-direction: row;
|
||
}
|
||
.col {
|
||
align-items:stretch;
|
||
flex-direction: column;
|
||
}
|
||
`,Au=M`
|
||
.m-table {
|
||
border-spacing: 0;
|
||
border-collapse: separate;
|
||
border: 1px solid var(--light-border-color);
|
||
border-radius: var(--border-radius);
|
||
margin: 0;
|
||
max-width: 100%;
|
||
direction: ltr;
|
||
}
|
||
.m-table tr:first-child td,
|
||
.m-table tr:first-child th {
|
||
border-top: 0 none;
|
||
}
|
||
.m-table td,
|
||
.m-table th {
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
padding: 4px 5px 4px;
|
||
vertical-align: top;
|
||
}
|
||
|
||
.m-table.padded-12 td,
|
||
.m-table.padded-12 th {
|
||
padding: 12px;
|
||
}
|
||
|
||
.m-table td:not([align]),
|
||
.m-table th:not([align]) {
|
||
text-align: left;
|
||
}
|
||
|
||
.m-table th {
|
||
color: var(--fg2);
|
||
font-size: var(--font-size-small);
|
||
line-height: calc(var(--font-size-small) + 18px);
|
||
font-weight: 600;
|
||
letter-spacing: normal;
|
||
background-color: var(--bg2);
|
||
vertical-align: bottom;
|
||
border-bottom: 1px solid var(--light-border-color);
|
||
}
|
||
|
||
.m-table > tbody > tr > td,
|
||
.m-table > tr > td {
|
||
border-top: 1px solid var(--light-border-color);
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
}
|
||
.table-title {
|
||
font-size:var(--font-size-small);
|
||
font-weight:bold;
|
||
vertical-align: middle;
|
||
margin: 12px 0 4px 0;
|
||
}
|
||
`,Vg=M`
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
.only-large-screen { display:none; }
|
||
.endpoint-head .path {
|
||
display: flex;
|
||
font-family:var(--font-mono);
|
||
font-size: var(--font-size-small);
|
||
align-items: center;
|
||
overflow-wrap: break-word;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.endpoint-head .descr {
|
||
font-size: var(--font-size-small);
|
||
color:var(--light-fg);
|
||
font-weight:400;
|
||
align-items: center;
|
||
overflow-wrap: break-word;
|
||
word-break: break-all;
|
||
display:none;
|
||
}
|
||
|
||
.m-endpoint.expanded { margin-bottom:16px; }
|
||
.m-endpoint > .endpoint-head{
|
||
border-width:1px 1px 1px 5px;
|
||
border-style:solid;
|
||
border-color:transparent;
|
||
border-top-color:var(--light-border-color);
|
||
display:flex;
|
||
padding:6px 16px;
|
||
align-items: center;
|
||
cursor: pointer;
|
||
}
|
||
.m-endpoint > .endpoint-head.put:hover,
|
||
.m-endpoint > .endpoint-head.put.expanded {
|
||
border-color:var(--orange);
|
||
background-color:var(--light-orange);
|
||
}
|
||
.m-endpoint > .endpoint-head.post:hover,
|
||
.m-endpoint > .endpoint-head.post.expanded {
|
||
border-color:var(--green);
|
||
background-color:var(--light-green);
|
||
}
|
||
.m-endpoint > .endpoint-head.get:hover,
|
||
.m-endpoint > .endpoint-head.get.expanded {
|
||
border-color:var(--blue);
|
||
background-color:var(--light-blue);
|
||
}
|
||
.m-endpoint > .endpoint-head.delete:hover,
|
||
.m-endpoint > .endpoint-head.delete.expanded {
|
||
border-color:var(--red);
|
||
background-color:var(--light-red);
|
||
}
|
||
|
||
.m-endpoint > .endpoint-head.head:hover,
|
||
.m-endpoint > .endpoint-head.head.expanded,
|
||
.m-endpoint > .endpoint-head.patch:hover,
|
||
.m-endpoint > .endpoint-head.patch.expanded,
|
||
.m-endpoint > .endpoint-head.options:hover,
|
||
.m-endpoint > .endpoint-head.options.expanded {
|
||
border-color:var(--yellow);
|
||
background-color:var(--light-yellow);
|
||
}
|
||
|
||
.m-endpoint > .endpoint-head.deprecated:hover,
|
||
.m-endpoint > .endpoint-head.deprecated.expanded {
|
||
border-color:var(--border-color);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.m-endpoint .endpoint-body {
|
||
flex-wrap:wrap;
|
||
padding:16px 0px 0 0px;
|
||
border-width:0px 1px 1px 5px;
|
||
border-style:solid;
|
||
box-shadow: 0px 4px 3px -3px rgba(0, 0, 0, 0.15);
|
||
}
|
||
.m-endpoint .endpoint-body.delete{ border-color:var(--red); }
|
||
.m-endpoint .endpoint-body.put{ border-color:var(--orange); }
|
||
.m-endpoint .endpoint-body.post { border-color:var(--green); }
|
||
.m-endpoint .endpoint-body.get { border-color:var(--blue); }
|
||
.m-endpoint .endpoint-body.head,
|
||
.m-endpoint .endpoint-body.patch,
|
||
.m-endpoint .endpoint-body.options {
|
||
border-color:var(--yellow);
|
||
}
|
||
|
||
.m-endpoint .endpoint-body.deprecated {
|
||
border-color:var(--border-color);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.endpoint-head .deprecated {
|
||
color: var(--light-fg);
|
||
filter:opacity(0.6);
|
||
}
|
||
|
||
.summary{
|
||
padding:8px 8px;
|
||
}
|
||
.summary .title {
|
||
font-size:calc(var(--font-size-regular) + 2px);
|
||
margin-bottom: 6px;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.endpoint-head .method {
|
||
padding:2px 5px;
|
||
vertical-align: middle;
|
||
font-size:var(--font-size-small);
|
||
height: calc(var(--font-size-small) + 16px);
|
||
line-height: calc(var(--font-size-small) + 8px);
|
||
width: 60px;
|
||
border-radius: 2px;
|
||
display:inline-block;
|
||
text-align: center;
|
||
font-weight: bold;
|
||
text-transform:uppercase;
|
||
margin-right:5px;
|
||
}
|
||
.endpoint-head .method.delete{ border: 2px solid var(--red);}
|
||
.endpoint-head .method.put{ border: 2px solid var(--orange); }
|
||
.endpoint-head .method.post{ border: 2px solid var(--green); }
|
||
.endpoint-head .method.get{ border: 2px solid var(--blue); }
|
||
.endpoint-head .method.get.deprecated{ border: 2px solid var(--border-color); }
|
||
.endpoint-head .method.head,
|
||
.endpoint-head .method.patch,
|
||
.endpoint-head .method.options {
|
||
border: 2px solid var(--yellow);
|
||
}
|
||
|
||
.req-resp-container {
|
||
display: flex;
|
||
margin-top:16px;
|
||
align-items: stretch;
|
||
flex-wrap: wrap;
|
||
flex-direction: column;
|
||
border-top:1px solid var(--light-border-color);
|
||
}
|
||
|
||
.view-mode-request,
|
||
api-response.view-mode {
|
||
flex:1;
|
||
min-height:100px;
|
||
padding:16px 8px;
|
||
overflow:hidden;
|
||
}
|
||
.view-mode-request {
|
||
border-width:0 0 1px 0;
|
||
border-style:dashed;
|
||
}
|
||
|
||
.head .view-mode-request,
|
||
.patch .view-mode-request,
|
||
.options .view-mode-request {
|
||
border-color:var(--yellow);
|
||
}
|
||
.put .view-mode-request {
|
||
border-color:var(--orange);
|
||
}
|
||
.post .view-mode-request {
|
||
border-color:var(--green);
|
||
}
|
||
.get .view-mode-request {
|
||
border-color:var(--blue);
|
||
}
|
||
.delete .view-mode-request {
|
||
border-color:var(--red);
|
||
}
|
||
|
||
@container (min-width: 1024px) {
|
||
.only-large-screen { display:block; }
|
||
.endpoint-head .path{
|
||
font-size: var(--font-size-regular);
|
||
}
|
||
.endpoint-head .descr{
|
||
display: flex;
|
||
}
|
||
.endpoint-head .m-markdown-small,
|
||
.descr .m-markdown-small{
|
||
display:block;
|
||
}
|
||
.req-resp-container{
|
||
flex-direction: var(--layout, row);
|
||
flex-wrap: nowrap;
|
||
}
|
||
api-response.view-mode {
|
||
padding:16px;
|
||
}
|
||
.view-mode-request.row-layout {
|
||
border-width:0 1px 0 0;
|
||
padding:16px;
|
||
}
|
||
.summary{
|
||
padding:8px 16px;
|
||
}
|
||
}
|
||
`,yc=M`
|
||
code[class*="language-"],
|
||
pre[class*="language-"] {
|
||
text-align: left;
|
||
white-space: pre;
|
||
word-spacing: normal;
|
||
word-break: normal;
|
||
word-wrap: normal;
|
||
line-height: 1.5;
|
||
tab-size: 2;
|
||
|
||
-webkit-hyphens: none;
|
||
-moz-hyphens: none;
|
||
-ms-hyphens: none;
|
||
hyphens: none;
|
||
}
|
||
|
||
/* Code blocks */
|
||
pre[class*="language-"] {
|
||
padding: 1em;
|
||
margin: .5em 0;
|
||
overflow: auto;
|
||
}
|
||
|
||
/* Inline code */
|
||
:not(pre) > code[class*="language-"] {
|
||
white-space: normal;
|
||
}
|
||
|
||
.token.comment,
|
||
.token.block-comment,
|
||
.token.prolog,
|
||
.token.doctype,
|
||
.token.cdata {
|
||
color: var(--light-fg)
|
||
}
|
||
|
||
.token.punctuation {
|
||
color: var(--fg);
|
||
}
|
||
|
||
.token.tag,
|
||
.token.attr-name,
|
||
.token.namespace,
|
||
.token.deleted {
|
||
color:var(--pink);
|
||
}
|
||
|
||
.token.function-name {
|
||
color: var(--blue);
|
||
}
|
||
|
||
.token.boolean,
|
||
.token.number,
|
||
.token.function {
|
||
color: var(--red);
|
||
}
|
||
|
||
.token.property,
|
||
.token.class-name,
|
||
.token.constant,
|
||
.token.symbol {
|
||
color: var(--code-property-color);
|
||
}
|
||
|
||
.token.selector,
|
||
.token.important,
|
||
.token.atrule,
|
||
.token.keyword,
|
||
.token.builtin {
|
||
color: var(--code-keyword-color);
|
||
}
|
||
|
||
.token.string,
|
||
.token.char,
|
||
.token.attr-value,
|
||
.token.regex,
|
||
.token.variable {
|
||
color: var(--green);
|
||
}
|
||
|
||
.token.operator,
|
||
.token.entity,
|
||
.token.url {
|
||
color: var(--code-operator-color);
|
||
}
|
||
|
||
.token.important,
|
||
.token.bold {
|
||
font-weight: bold;
|
||
}
|
||
.token.italic {
|
||
font-style: italic;
|
||
}
|
||
|
||
.token.entity {
|
||
cursor: help;
|
||
}
|
||
|
||
.token.inserted {
|
||
color: green;
|
||
}
|
||
`,ml=M`
|
||
.tab-panel {
|
||
border: none;
|
||
}
|
||
.tab-buttons {
|
||
height:30px;
|
||
padding: 4px 4px 0 4px;
|
||
border-bottom: 1px solid var(--light-border-color) ;
|
||
align-items: stretch;
|
||
overflow-y: hidden;
|
||
overflow-x: auto;
|
||
scrollbar-width: thin;
|
||
}
|
||
.tab-buttons::-webkit-scrollbar {
|
||
height: 1px;
|
||
background-color: var(--border-color);
|
||
}
|
||
.tab-btn {
|
||
border: none;
|
||
border-bottom: 3px solid transparent;
|
||
color: var(--light-fg);
|
||
background-color: transparent;
|
||
white-space: nowrap;
|
||
cursor:pointer;
|
||
outline:none;
|
||
font-family:var(--font-regular);
|
||
font-size:var(--font-size-small);
|
||
margin-right:16px;
|
||
padding:1px;
|
||
}
|
||
.tab-btn.active {
|
||
border-bottom: 3px solid var(--primary-color);
|
||
font-weight:bold;
|
||
color:var(--primary-color);
|
||
}
|
||
|
||
.tab-btn:hover {
|
||
color:var(--primary-color);
|
||
}
|
||
.tab-content {
|
||
margin:-1px 0 0 0;
|
||
position:relative;
|
||
min-height: 50px;
|
||
}
|
||
`,Ea=M`
|
||
.nav-bar-info:focus-visible,
|
||
.nav-bar-tag:focus-visible,
|
||
.nav-bar-path:focus-visible {
|
||
outline: 1px solid;
|
||
box-shadow: none;
|
||
outline-offset: -4px;
|
||
}
|
||
.nav-bar-expand-all:focus-visible,
|
||
.nav-bar-collapse-all:focus-visible,
|
||
.nav-bar-tag-icon:focus-visible {
|
||
outline: 1px solid;
|
||
box-shadow: none;
|
||
outline-offset: 2px;
|
||
}
|
||
.nav-bar {
|
||
width:0;
|
||
height:100%;
|
||
overflow: hidden;
|
||
color:var(--nav-text-color);
|
||
background-color: var(--nav-bg-color);
|
||
background-blend-mode: multiply;
|
||
line-height: calc(var(--font-size-small) + 4px);
|
||
display:none;
|
||
position:relative;
|
||
flex-direction:column;
|
||
flex-wrap:nowrap;
|
||
word-break:break-word;
|
||
}
|
||
::slotted([slot=nav-logo]) {
|
||
padding:16px 16px 0 16px;
|
||
}
|
||
.nav-scroll {
|
||
overflow-x: hidden;
|
||
overflow-y: auto;
|
||
overflow-y: overlay;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--nav-hover-bg-color) transparent;
|
||
}
|
||
|
||
.nav-bar-tag {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
flex-direction: row;
|
||
}
|
||
.nav-bar.read .nav-bar-tag-icon {
|
||
display:none;
|
||
}
|
||
.nav-bar-paths-under-tag {
|
||
overflow:hidden;
|
||
transition: max-height .2s ease-out, visibility .3s;
|
||
}
|
||
.collapsed .nav-bar-paths-under-tag {
|
||
visibility: hidden;
|
||
}
|
||
|
||
.nav-bar-expand-all {
|
||
transform: rotate(90deg);
|
||
cursor:pointer;
|
||
margin-right:10px;
|
||
}
|
||
.nav-bar-collapse-all {
|
||
transform: rotate(270deg);
|
||
cursor:pointer;
|
||
}
|
||
.nav-bar-expand-all:hover, .nav-bar-collapse-all:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.nav-bar-tag-icon {
|
||
color: var(--nav-text-color);
|
||
font-size: 20px;
|
||
}
|
||
.nav-bar-tag-icon:hover {
|
||
color:var(--nav-hover-text-color);
|
||
}
|
||
.nav-bar.focused .nav-bar-tag-and-paths.collapsed .nav-bar-tag-icon::after {
|
||
content: '⌵';
|
||
width:16px;
|
||
height:16px;
|
||
text-align: center;
|
||
display: inline-block;
|
||
transform: rotate(-90deg);
|
||
transition: transform 0.2s ease-out 0s;
|
||
}
|
||
.nav-bar.focused .nav-bar-tag-and-paths.expanded .nav-bar-tag-icon::after {
|
||
content: '⌵';
|
||
width:16px;
|
||
height:16px;
|
||
text-align: center;
|
||
display: inline-block;
|
||
transition: transform 0.2s ease-out 0s;
|
||
}
|
||
.nav-scroll::-webkit-scrollbar {
|
||
width: var(--scroll-bar-width, 8px);
|
||
}
|
||
.nav-scroll::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.nav-scroll::-webkit-scrollbar-thumb {
|
||
background-color: var(--nav-hover-bg-color);
|
||
}
|
||
|
||
.nav-bar-tag {
|
||
font-size: var(--font-size-regular);
|
||
color: var(--nav-accent-color);
|
||
border-left:4px solid transparent;
|
||
font-weight:bold;
|
||
padding: 15px 15px 15px 10px;
|
||
text-transform: capitalize;
|
||
}
|
||
|
||
.nav-bar-components,
|
||
.nav-bar-h1,
|
||
.nav-bar-h2,
|
||
.nav-bar-info,
|
||
.nav-bar-tag,
|
||
.nav-bar-path {
|
||
display:flex;
|
||
cursor: pointer;
|
||
width: 100%;
|
||
border: none;
|
||
border-radius:4px;
|
||
color: var(--nav-text-color);
|
||
background: transparent;
|
||
border-left:4px solid transparent;
|
||
}
|
||
|
||
.nav-bar-h1,
|
||
.nav-bar-h2,
|
||
.nav-bar-path {
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
padding: var(--nav-item-padding);
|
||
}
|
||
.nav-bar-path.small-font {
|
||
font-size: var(--font-size-small);
|
||
}
|
||
|
||
.nav-bar-info {
|
||
font-size: var(--font-size-regular);
|
||
padding: 16px 10px;
|
||
font-weight:bold;
|
||
}
|
||
.nav-bar-section {
|
||
display: flex;
|
||
flex-direction: row;
|
||
justify-content: space-between;
|
||
font-size: var(--font-size-small);
|
||
color: var(--nav-text-color);
|
||
padding: var(--nav-item-padding);
|
||
font-weight:bold;
|
||
}
|
||
.nav-bar-section.operations {
|
||
cursor:pointer;
|
||
}
|
||
.nav-bar-section.operations:hover {
|
||
color:var(--nav-hover-text-color);
|
||
background-color:var(--nav-hover-bg-color);
|
||
}
|
||
|
||
.nav-bar-section:first-child {
|
||
display: none;
|
||
}
|
||
.nav-bar-h2 {margin-left:12px;}
|
||
|
||
.nav-bar-h1.left-bar.active,
|
||
.nav-bar-h2.left-bar.active,
|
||
.nav-bar-info.left-bar.active,
|
||
.nav-bar-tag.left-bar.active,
|
||
.nav-bar-path.left-bar.active,
|
||
.nav-bar-section.left-bar.operations.active {
|
||
border-left:4px solid var(--nav-accent-color);
|
||
color:var(--nav-hover-text-color);
|
||
}
|
||
|
||
.nav-bar-h1.colored-block.active,
|
||
.nav-bar-h2.colored-block.active,
|
||
.nav-bar-info.colored-block.active,
|
||
.nav-bar-tag.colored-block.active,
|
||
.nav-bar-path.colored-block.active,
|
||
.nav-bar-section.colored-block.operations.active {
|
||
background-color: var(--nav-accent-color);
|
||
color: var(--nav-accent-text-color);
|
||
border-radius: 0;
|
||
}
|
||
|
||
.nav-bar-h1:hover,
|
||
.nav-bar-h2:hover,
|
||
.nav-bar-info:hover,
|
||
.nav-bar-tag:hover,
|
||
.nav-bar-path:hover {
|
||
color:var(--nav-hover-text-color);
|
||
background-color:var(--nav-hover-bg-color);
|
||
}
|
||
`,ri=M`
|
||
#api-info {
|
||
font-size: calc(var(--font-size-regular) - 1px);
|
||
margin-top: 8px;
|
||
margin-left: -15px;
|
||
}
|
||
|
||
#api-info span:before {
|
||
content: "|";
|
||
display: inline-block;
|
||
opacity: 0.5;
|
||
width: 15px;
|
||
text-align: center;
|
||
}
|
||
#api-info span:first-child:before {
|
||
content: "";
|
||
width: 0px;
|
||
}
|
||
`,vc=M`
|
||
|
||
`,sh=/[\s#:?&={}]/g,mo="_rapidoc_api_key";function Ou(t){return new Promise((n=>setTimeout(n,t)))}function gl(t,n){const i=n.target,l=document.createElement("textarea");l.value=t,l.style.position="fixed",document.body.appendChild(l),l.focus(),l.select();try{document.execCommand("copy"),i.innerText="Copied",setTimeout((()=>{i.innerText="Copy"}),5e3)}catch(p){console.error("Unable to copy",p)}document.body.removeChild(l)}function ih(t,n,i=""){return`${n.method} ${n.path} ${n.summary||""} ${n.description||""} ${n.operationId||""} ${i}`.toLowerCase().includes(t.toLowerCase())}function si(t,n=new Set){return t&&Object.keys(t).forEach((i=>{var l;if(n.add(i),t[i].properties)si(t[i].properties,n);else if((l=t[i].items)!==null&&l!==void 0&&l.properties){var p;si((p=t[i].items)===null||p===void 0?void 0:p.properties,n)}})),n}function qp(t,n){if(t){const i=document.createElement("a");document.body.appendChild(i),i.style="display: none",i.href=t,i.download=n,i.click(),i.remove()}}function Hg(t){if(t){const n=document.createElement("a");document.body.appendChild(n),n.style="display: none",n.href=t,n.target="_blank",n.click(),n.remove()}}const Bp=Object.freeze({url:"/"}),{fetch:ku,Response:Cw,Headers:Aw,Request:Ru,FormData:uA,File:Ow,Blob:kw}=globalThis;function ah(t,n){return n||typeof navigator>"u"||(n=navigator),n&&n.product==="ReactNative"?!(!t||typeof t!="object"||typeof t.uri!="string"):typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||!!ArrayBuffer.isView(t)||t!==null&&typeof t=="object"&&typeof t.pipe=="function"}function Rw(t,n){return Array.isArray(t)&&t.some((i=>ah(i,n)))}globalThis.fetch===void 0&&(globalThis.fetch=ku),globalThis.Headers===void 0&&(globalThis.Headers=Aw),globalThis.Request===void 0&&(globalThis.Request=Ru),globalThis.Response===void 0&&(globalThis.Response=Cw),globalThis.FormData===void 0&&(globalThis.FormData=uA),globalThis.File===void 0&&(globalThis.File=Ow),globalThis.Blob===void 0&&(globalThis.Blob=kw);class Gg extends File{constructor(n,i="",l={}){super([n],i,l),this.data=n}valueOf(){return this.data}toString(){return this.valueOf()}}function oh(t,n="reserved"){return[...t].map((i=>{if((p=>/^[a-z0-9\-._~]+$/i.test(p))(i)||(p=>":/?#[]@!$&'()*+,;=".indexOf(p)>-1)(i)&&n==="unsafe")return i;const l=new TextEncoder;return Array.from(l.encode(i)).map((p=>`0${p.toString(16).toUpperCase()}`.slice(-2))).map((p=>`%${p}`)).join("")})).join("")}function ja(t){const{value:n}=t;return Array.isArray(n)?(function({key:i,value:l,style:p,explode:v,escape:x}){if(p==="simple")return l.map((S=>os(S,x))).join(",");if(p==="label")return`.${l.map((S=>os(S,x))).join(".")}`;if(p==="matrix")return l.map((S=>os(S,x))).reduce(((S,C)=>!S||v?`${S||""};${i}=${C}`:`${S},${C}`),"");if(p==="form"){const S=v?`&${i}=`:",";return l.map((C=>os(C,x))).join(S)}if(p==="spaceDelimited"){const S=v?`${i}=`:"";return l.map((C=>os(C,x))).join(` ${S}`)}if(p==="pipeDelimited"){const S=v?`${i}=`:"";return l.map((C=>os(C,x))).join(`|${S}`)}})(t):typeof n=="object"?(function({key:i,value:l,style:p,explode:v,escape:x}){const S=Object.keys(l);return p==="simple"?S.reduce(((C,N)=>{const D=os(l[N],x);return`${C?`${C},`:""}${N}${v?"=":","}${D}`}),""):p==="label"?S.reduce(((C,N)=>{const D=os(l[N],x);return`${C?`${C}.`:"."}${N}${v?"=":"."}${D}`}),""):p==="matrix"&&v?S.reduce(((C,N)=>`${C?`${C};`:";"}${N}=${os(l[N],x)}`),""):p==="matrix"?S.reduce(((C,N)=>{const D=os(l[N],x);return`${C?`${C},`:`;${i}=`}${N},${D}`}),""):p==="form"?S.reduce(((C,N)=>{const D=os(l[N],x);return`${C?`${C}${v?"&":","}`:""}${N}${v?"=":","}${D}`}),""):void 0})(t):(function({key:i,value:l,style:p,escape:v}){return p==="simple"?os(l,v):p==="label"?`.${os(l,v)}`:p==="matrix"?`;${i}=${os(l,v)}`:p==="form"||p==="deepObject"?os(l,v):void 0})(t)}function os(t,n=!1){return Array.isArray(t)||t!==null&&typeof t=="object"?t=JSON.stringify(t):typeof t!="number"&&typeof t!="boolean"||(t=String(t)),n&&t.length>0?oh(t,n):t}const Xg={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Tu={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function xc(t,n,i=!1){const{collectionFormat:l,allowEmptyValue:p,serializationOption:v,encoding:x}=n,S=typeof n!="object"||Array.isArray(n)?n:n.value,C=i?D=>D.toString():D=>encodeURIComponent(D),N=C(t);if(S===void 0&&p)return[[N,""]];if(ah(S)||Rw(S))return[[N,S]];if(v)return Yg(t,S,i,v);if(x){if([typeof x.style,typeof x.explode,typeof x.allowReserved].some((D=>D!=="undefined"))){const{style:D,explode:$,allowReserved:L}=x;return Yg(t,S,i,{style:D,explode:$,allowReserved:L})}if(typeof x.contentType=="string"){if(x.contentType.startsWith("application/json")){const $=C(typeof S=="string"?S:JSON.stringify(S));return[[N,new Gg($,"blob",{type:x.contentType})]]}const D=C(String(S));return[[N,new Gg(D,"blob",{type:x.contentType})]]}return typeof S!="object"?[[N,C(S)]]:Array.isArray(S)&&S.every((D=>typeof D!="object"))?[[N,S.map(C).join(",")]]:[[N,C(JSON.stringify(S))]]}return typeof S!="object"?[[N,C(S)]]:Array.isArray(S)?l==="multi"?[[N,S.map(C)]]:[[N,S.map(C).join(Tu[l||"csv"])]]:[[N,""]]}function Yg(t,n,i,l){const p=l.style||"form",v=l.explode===void 0?p==="form":l.explode,x=!i&&(l&&l.allowReserved?"unsafe":"reserved"),S=N=>os(N,x),C=i?N=>N:N=>S(N);return typeof n!="object"?[[C(t),S(n)]]:Array.isArray(n)?v?[[C(t),n.map(S)]]:[[C(t),n.map(S).join(Xg[p])]]:p==="deepObject"?Object.keys(n).map((N=>[C(`${t}[${N}]`),S(n[N])])):v?Object.keys(n).map((N=>[C(N),S(n[N])])):[[C(t),Object.keys(n).map((N=>[`${C(N)},${S(n[N])}`])).join(",")]]}function Up(t){return((n,{encode:i=!0}={})=>{const l=(x,S,C)=>(C==null?x.append(S,""):Array.isArray(C)?C.reduce(((N,D)=>l(x,S,D)),x):C instanceof Date?x.append(S,C.toISOString()):typeof C=="object"?Object.entries(C).reduce(((N,[D,$])=>l(x,`${S}[${D}]`,$)),x):x.append(S,C),x),p=Object.entries(n).reduce(((x,[S,C])=>l(x,S,C)),new URLSearchParams),v=String(p);return i?v:decodeURIComponent(v)})(Object.keys(t).reduce(((n,i)=>{for(const[l,p]of xc(i,t[i]))n[l]=p instanceof Gg?p.valueOf():p;return n}),{}),{encode:!1})}function Kp(t={}){const{url:n="",query:i,form:l}=t;if(l){const v=Object.keys(l).some((S=>{const{value:C}=l[S];return ah(C)||Rw(C)})),x=t.headers["content-type"]||t.headers["Content-Type"];if(v||/multipart\/form-data/i.test(x)){const S=(p=t.form,Object.entries(p).reduce(((C,[N,D])=>{for(const[$,L]of xc(N,D,!0))if(Array.isArray(L))for(const U of L)if(ArrayBuffer.isView(U)){const J=new Blob([U]);C.append($,J)}else C.append($,U);else if(ArrayBuffer.isView(L)){const U=new Blob([L]);C.append($,U)}else C.append($,L);return C}),new FormData));t.formdata=S,t.body=S}else t.body=Up(l);delete t.form}var p;if(i){const[v,x]=n.split("?");let S="";if(x){const N=new URLSearchParams(x);Object.keys(i).forEach((D=>N.delete(D))),S=String(N)}const C=((...N)=>{const D=N.filter(($=>$)).join("&");return D?`?${D}`:""})(S,Up(i));t.url=v+C,delete t.query}return t}function _u(t){return t==null}var ar={isNothing:_u,isObject:function(t){return typeof t=="object"&&t!==null},toArray:function(t){return Array.isArray(t)?t:_u(t)?[]:[t]},repeat:function(t,n){var i,l="";for(i=0;i<n;i+=1)l+=t;return l},isNegativeZero:function(t){return t===0&&Number.NEGATIVE_INFINITY===1/t},extend:function(t,n){var i,l,p,v;if(n)for(i=0,l=(v=Object.keys(n)).length;i<l;i+=1)t[p=v[i]]=n[p];return t}};function Vp(t,n){var i="",l=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(i+='in "'+t.mark.name+'" '),i+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!n&&t.mark.snippet&&(i+=`
|
||
|
||
`+t.mark.snippet),l+" "+i):l}function go(t,n){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=n,this.message=Vp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}go.prototype=Object.create(Error.prototype),go.prototype.constructor=go,go.prototype.toString=function(t){return this.name+": "+Vp(this,t)};var Rr=go;function lh(t,n,i,l,p){var v="",x="",S=Math.floor(p/2)-1;return l-n>S&&(n=l-S+(v=" ... ").length),i-l>S&&(i=l+S-(x=" ...").length),{str:v+t.slice(n,i).replace(/\t/g,"→")+x,pos:l-n+v.length}}function $u(t,n){return ar.repeat(" ",n-t.length)+t}var Tw=function(t,n){if(n=Object.create(n||null),!t.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i,l=/\r?\n|\r|\0/g,p=[0],v=[],x=-1;i=l.exec(t.buffer);)v.push(i.index),p.push(i.index+i[0].length),t.position<=i.index&&x<0&&(x=p.length-2);x<0&&(x=p.length-1);var S,C,N="",D=Math.min(t.line+n.linesAfter,v.length).toString().length,$=n.maxLength-(n.indent+D+3);for(S=1;S<=n.linesBefore&&!(x-S<0);S++)C=lh(t.buffer,p[x-S],v[x-S],t.position-(p[x]-p[x-S]),$),N=ar.repeat(" ",n.indent)+$u((t.line-S+1).toString(),D)+" | "+C.str+`
|
||
`+N;for(C=lh(t.buffer,p[x],v[x],t.position,$),N+=ar.repeat(" ",n.indent)+$u((t.line+1).toString(),D)+" | "+C.str+`
|
||
`,N+=ar.repeat("-",n.indent+D+3+C.pos)+`^
|
||
`,S=1;S<=n.linesAfter&&!(x+S>=v.length);S++)C=lh(t.buffer,p[x+S],v[x+S],t.position-(p[x]-p[x+S]),$),N+=ar.repeat(" ",n.indent)+$u((t.line+S+1).toString(),D)+" | "+C.str+`
|
||
`;return N.replace(/\n$/,"")},Hp=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Gp=["scalar","sequence","mapping"],ls=function(t,n){if(n=n||{},Object.keys(n).forEach((function(i){if(Hp.indexOf(i)===-1)throw new Rr('Unknown option "'+i+'" is met in definition of "'+t+'" YAML type.')})),this.options=n,this.tag=t,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=(function(i){var l={};return i!==null&&Object.keys(i).forEach((function(p){i[p].forEach((function(v){l[String(v)]=p}))})),l})(n.styleAliases||null),Gp.indexOf(this.kind)===-1)throw new Rr('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function Ls(t,n){var i=[];return t[n].forEach((function(l){var p=i.length;i.forEach((function(v,x){v.tag===l.tag&&v.kind===l.kind&&v.multi===l.multi&&(p=x)})),i[p]=l})),i}function yo(t){return this.extend(t)}yo.prototype.extend=function(t){var n=[],i=[];if(t instanceof ls)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new Rr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}n.forEach((function(p){if(!(p instanceof ls))throw new Rr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.loadKind!=="scalar")throw new Rr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(p.multi)throw new Rr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(p){if(!(p instanceof ls))throw new Rr("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var l=Object.create(yo.prototype);return l.implicit=(this.implicit||[]).concat(n),l.explicit=(this.explicit||[]).concat(i),l.compiledImplicit=Ls(l,"implicit"),l.compiledExplicit=Ls(l,"explicit"),l.compiledTypeMap=(function(){var p,v,x={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function S(C){C.multi?(x.multi[C.kind].push(C),x.multi.fallback.push(C)):x[C.kind][C.tag]=x.fallback[C.tag]=C}for(p=0,v=arguments.length;p<v;p+=1)arguments[p].forEach(S);return x})(l.compiledImplicit,l.compiledExplicit),l};var ch=yo,Nu=new ls("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),_w=new ls("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Xp=new ls("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Yp=new ch({explicit:[Nu,_w,Xp]}),Du=new ls("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(t===null)return!0;var n=t.length;return n===1&&t==="~"||n===4&&(t==="null"||t==="Null"||t==="NULL")},construct:function(){return null},predicate:function(t){return t===null},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),uh=new ls("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n=t.length;return n===4&&(t==="true"||t==="True"||t==="TRUE")||n===5&&(t==="false"||t==="False"||t==="FALSE")},construct:function(t){return t==="true"||t==="True"||t==="TRUE"},predicate:function(t){return Object.prototype.toString.call(t)==="[object Boolean]"},represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function $w(t){return 48<=t&&t<=55}function dA(t){return 48<=t&&t<=57}var Nw=new ls("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n,i,l=t.length,p=0,v=!1;if(!l)return!1;if((n=t[p])!=="-"&&n!=="+"||(n=t[++p]),n==="0"){if(p+1===l)return!0;if((n=t[++p])==="b"){for(p++;p<l;p++)if((n=t[p])!=="_"){if(n!=="0"&&n!=="1")return!1;v=!0}return v&&n!=="_"}if(n==="x"){for(p++;p<l;p++)if((n=t[p])!=="_"){if(!(48<=(i=t.charCodeAt(p))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;v=!0}return v&&n!=="_"}if(n==="o"){for(p++;p<l;p++)if((n=t[p])!=="_"){if(!$w(t.charCodeAt(p)))return!1;v=!0}return v&&n!=="_"}}if(n==="_")return!1;for(;p<l;p++)if((n=t[p])!=="_"){if(!dA(t.charCodeAt(p)))return!1;v=!0}return!(!v||n==="_")},construct:function(t){var n,i=t,l=1;if(i.indexOf("_")!==-1&&(i=i.replace(/_/g,"")),(n=i[0])!=="-"&&n!=="+"||(n==="-"&&(l=-1),n=(i=i.slice(1))[0]),i==="0")return 0;if(n==="0"){if(i[1]==="b")return l*parseInt(i.slice(2),2);if(i[1]==="x")return l*parseInt(i.slice(2),16);if(i[1]==="o")return l*parseInt(i.slice(2),8)}return l*parseInt(i,10)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1==0&&!ar.isNegativeZero(t)},represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),hA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Zg=/^[-+]?[0-9]+e/,Dw=new ls("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return t!==null&&!(!hA.test(t)||t[t.length-1]==="_")},construct:function(t){var n,i;return i=(n=t.replace(/_/g,"").toLowerCase())[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!=0||ar.isNegativeZero(t))},represent:function(t,n){var i;if(isNaN(t))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ar.isNegativeZero(t))return"-0.0";return i=t.toString(10),Zg.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),Pw=Yp.extend({implicit:[Du,uh,Nw,Dw]}),Mw=Pw,Iw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),zw=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),Jg=new ls("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return t!==null&&(Iw.exec(t)!==null||zw.exec(t)!==null)},construct:function(t){var n,i,l,p,v,x,S,C,N=0,D=null;if((n=Iw.exec(t))===null&&(n=zw.exec(t)),n===null)throw new Error("Date resolve error");if(i=+n[1],l=+n[2]-1,p=+n[3],!n[4])return new Date(Date.UTC(i,l,p));if(v=+n[4],x=+n[5],S=+n[6],n[7]){for(N=n[7].slice(0,3);N.length<3;)N+="0";N=+N}return n[9]&&(D=6e4*(60*+n[10]+ +(n[11]||0)),n[9]==="-"&&(D=-D)),C=new Date(Date.UTC(i,l,p,v,x,S,N)),D&&C.setTime(C.getTime()-D),C},instanceOf:Date,represent:function(t){return t.toISOString()}}),Lw=new ls("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return t==="<<"||t===null}}),Wg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`,Fw=new ls("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(t===null)return!1;var n,i,l=0,p=t.length,v=Wg;for(i=0;i<p;i++)if(!((n=v.indexOf(t.charAt(i)))>64)){if(n<0)return!1;l+=6}return l%8==0},construct:function(t){var n,i,l=t.replace(/[\r\n=]/g,""),p=l.length,v=Wg,x=0,S=[];for(n=0;n<p;n++)n%4==0&&n&&(S.push(x>>16&255),S.push(x>>8&255),S.push(255&x)),x=x<<6|v.indexOf(l.charAt(n));return(i=p%4*6)==0?(S.push(x>>16&255),S.push(x>>8&255),S.push(255&x)):i===18?(S.push(x>>10&255),S.push(x>>2&255)):i===12&&S.push(x>>4&255),new Uint8Array(S)},predicate:function(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"},represent:function(t){var n,i,l="",p=0,v=t.length,x=Wg;for(n=0;n<v;n++)n%3==0&&n&&(l+=x[p>>18&63],l+=x[p>>12&63],l+=x[p>>6&63],l+=x[63&p]),p=(p<<8)+t[n];return(i=v%3)==0?(l+=x[p>>18&63],l+=x[p>>12&63],l+=x[p>>6&63],l+=x[63&p]):i===2?(l+=x[p>>10&63],l+=x[p>>4&63],l+=x[p<<2&63],l+=x[64]):i===1&&(l+=x[p>>2&63],l+=x[p<<4&63],l+=x[64],l+=x[64]),l}}),pA=Object.prototype.hasOwnProperty,Qg=Object.prototype.toString,qw=new ls("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(t===null)return!0;var n,i,l,p,v,x=[],S=t;for(n=0,i=S.length;n<i;n+=1){if(l=S[n],v=!1,Qg.call(l)!=="[object Object]")return!1;for(p in l)if(pA.call(l,p)){if(v)return!1;v=!0}if(!v||x.indexOf(p)!==-1)return!1;x.push(p)}return!0},construct:function(t){return t!==null?t:[]}}),fA=Object.prototype.toString,Bw=new ls("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(t){if(t===null)return!0;var n,i,l,p,v,x=t;for(v=new Array(x.length),n=0,i=x.length;n<i;n+=1){if(l=x[n],fA.call(l)!=="[object Object]"||(p=Object.keys(l)).length!==1)return!1;v[n]=[p[0],l[p[0]]]}return!0},construct:function(t){if(t===null)return[];var n,i,l,p,v,x=t;for(v=new Array(x.length),n=0,i=x.length;n<i;n+=1)l=x[n],p=Object.keys(l),v[n]=[p[0],l[p[0]]];return v}}),Uw=Object.prototype.hasOwnProperty,Kw=new ls("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(t===null)return!0;var n,i=t;for(n in i)if(Uw.call(i,n)&&i[n]!==null)return!1;return!0},construct:function(t){return t!==null?t:{}}}),ey=Mw.extend({implicit:[Jg,Lw],explicit:[Fw,qw,Bw,Kw]}),yl=Object.prototype.hasOwnProperty,mA=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,gA=/[\x85\u2028\u2029]/,yA=/[,\[\]\{\}]/,Vw=/^(?:!|!!|![a-z\-]+!)$/i,Hw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Gw(t){return Object.prototype.toString.call(t)}function Wi(t){return t===10||t===13}function Ca(t){return t===9||t===32}function ii(t){return t===9||t===32||t===10||t===13}function bc(t){return t===44||t===91||t===93||t===123||t===125}function Xw(t){var n;return 48<=t&&t<=57?t-48:97<=(n=32|t)&&n<=102?n-97+10:-1}function ty(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
||
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function Yw(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var ny=new Array(256),wc=new Array(256),Pu=0;Pu<256;Pu++)ny[Pu]=ty(Pu)?1:0,wc[Pu]=ty(Pu);function vA(t,n){this.input=t,this.filename=n.filename||null,this.schema=n.schema||ey,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Zw(t,n){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=Tw(i),new Rr(n,i)}function Vt(t,n){throw Zw(t,n)}function dh(t,n){t.onWarning&&t.onWarning.call(null,Zw(t,n))}var Mu={YAML:function(t,n,i){var l,p,v;t.version!==null&&Vt(t,"duplication of %YAML directive"),i.length!==1&&Vt(t,"YAML directive accepts exactly one argument"),(l=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))===null&&Vt(t,"ill-formed argument of the YAML directive"),p=parseInt(l[1],10),v=parseInt(l[2],10),p!==1&&Vt(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=v<2,v!==1&&v!==2&&dh(t,"unsupported YAML version of the document")},TAG:function(t,n,i){var l,p;i.length!==2&&Vt(t,"TAG directive accepts exactly two arguments"),l=i[0],p=i[1],Vw.test(l)||Vt(t,"ill-formed tag handle (first argument) of the TAG directive"),yl.call(t.tagMap,l)&&Vt(t,'there is a previously declared suffix for "'+l+'" tag handle'),Hw.test(p)||Vt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{p=decodeURIComponent(p)}catch{Vt(t,"tag prefix is malformed: "+p)}t.tagMap[l]=p}};function Qi(t,n,i,l){var p,v,x,S;if(n<i){if(S=t.input.slice(n,i),l)for(p=0,v=S.length;p<v;p+=1)(x=S.charCodeAt(p))===9||32<=x&&x<=1114111||Vt(t,"expected valid JSON character");else mA.test(S)&&Vt(t,"the stream contains non-printable characters");t.result+=S}}function Jw(t,n,i,l){var p,v,x,S;for(ar.isObject(i)||Vt(t,"cannot merge mappings; the provided source object is unacceptable"),x=0,S=(p=Object.keys(i)).length;x<S;x+=1)v=p[x],yl.call(n,v)||(n[v]=i[v],l[v]=!0)}function vo(t,n,i,l,p,v,x,S,C){var N,D;if(Array.isArray(p))for(N=0,D=(p=Array.prototype.slice.call(p)).length;N<D;N+=1)Array.isArray(p[N])&&Vt(t,"nested arrays are not supported inside keys"),typeof p=="object"&&Gw(p[N])==="[object Object]"&&(p[N]="[object Object]");if(typeof p=="object"&&Gw(p)==="[object Object]"&&(p="[object Object]"),p=String(p),n===null&&(n={}),l==="tag:yaml.org,2002:merge")if(Array.isArray(v))for(N=0,D=v.length;N<D;N+=1)Jw(t,n,v[N],i);else Jw(t,n,v,i);else t.json||yl.call(i,p)||!yl.call(n,p)||(t.line=x||t.line,t.lineStart=S||t.lineStart,t.position=C||t.position,Vt(t,"duplicated mapping key")),p==="__proto__"?Object.defineProperty(n,p,{configurable:!0,enumerable:!0,writable:!0,value:v}):n[p]=v,delete i[p];return n}function Zp(t){var n;(n=t.input.charCodeAt(t.position))===10?t.position++:n===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Vt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Dr(t,n,i){for(var l=0,p=t.input.charCodeAt(t.position);p!==0;){for(;Ca(p);)p===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),p=t.input.charCodeAt(++t.position);if(n&&p===35)do p=t.input.charCodeAt(++t.position);while(p!==10&&p!==13&&p!==0);if(!Wi(p))break;for(Zp(t),p=t.input.charCodeAt(t.position),l++,t.lineIndent=0;p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position)}return i!==-1&&l!==0&&t.lineIndent<i&&dh(t,"deficient indentation"),l}function Iu(t){var n,i=t.position;return!((n=t.input.charCodeAt(i))!==45&&n!==46||n!==t.input.charCodeAt(i+1)||n!==t.input.charCodeAt(i+2)||(i+=3,(n=t.input.charCodeAt(i))!==0&&!ii(n)))}function hh(t,n){n===1?t.result+=" ":n>1&&(t.result+=ar.repeat(`
|
||
`,n-1))}function ry(t,n){var i,l,p=t.tag,v=t.anchor,x=[],S=!1;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=x),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Vt(t,"tab characters must not be used in indentation")),l===45)&&ii(t.input.charCodeAt(t.position+1));)if(S=!0,t.position++,Dr(t,!0,-1)&&t.lineIndent<=n)x.push(null),l=t.input.charCodeAt(t.position);else if(i=t.line,zu(t,n,3,!1,!0),x.push(t.result),Dr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>n)&&l!==0)Vt(t,"bad indentation of a sequence entry");else if(t.lineIndent<n)break;return!!S&&(t.tag=p,t.anchor=v,t.kind="sequence",t.result=x,!0)}function Ww(t){var n,i,l,p,v=!1,x=!1;if((p=t.input.charCodeAt(t.position))!==33)return!1;if(t.tag!==null&&Vt(t,"duplication of a tag property"),(p=t.input.charCodeAt(++t.position))===60?(v=!0,p=t.input.charCodeAt(++t.position)):p===33?(x=!0,i="!!",p=t.input.charCodeAt(++t.position)):i="!",n=t.position,v){do p=t.input.charCodeAt(++t.position);while(p!==0&&p!==62);t.position<t.length?(l=t.input.slice(n,t.position),p=t.input.charCodeAt(++t.position)):Vt(t,"unexpected end of the stream within a verbatim tag")}else{for(;p!==0&&!ii(p);)p===33&&(x?Vt(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(n-1,t.position+1),Vw.test(i)||Vt(t,"named tag handle cannot contain such characters"),x=!0,n=t.position+1)),p=t.input.charCodeAt(++t.position);l=t.input.slice(n,t.position),yA.test(l)&&Vt(t,"tag suffix cannot contain flow indicator characters")}l&&!Hw.test(l)&&Vt(t,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{Vt(t,"tag name is malformed: "+l)}return v?t.tag=l:yl.call(t.tagMap,i)?t.tag=t.tagMap[i]+l:i==="!"?t.tag="!"+l:i==="!!"?t.tag="tag:yaml.org,2002:"+l:Vt(t,'undeclared tag handle "'+i+'"'),!0}function Qw(t){var n,i;if((i=t.input.charCodeAt(t.position))!==38)return!1;for(t.anchor!==null&&Vt(t,"duplication of an anchor property"),i=t.input.charCodeAt(++t.position),n=t.position;i!==0&&!ii(i)&&!bc(i);)i=t.input.charCodeAt(++t.position);return t.position===n&&Vt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(n,t.position),!0}function zu(t,n,i,l,p){var v,x,S,C,N,D,$,L,U,J=1,Y=!1,Z=!1;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,v=x=S=i===4||i===3,l&&Dr(t,!0,-1)&&(Y=!0,t.lineIndent>n?J=1:t.lineIndent===n?J=0:t.lineIndent<n&&(J=-1)),J===1)for(;Ww(t)||Qw(t);)Dr(t,!0,-1)?(Y=!0,S=v,t.lineIndent>n?J=1:t.lineIndent===n?J=0:t.lineIndent<n&&(J=-1)):S=!1;if(S&&(S=Y||p),J!==1&&i!==4||(L=i===1||i===2?n:n+1,U=t.position-t.lineStart,J===1?S&&(ry(t,U)||(function(P,re,le){var he,xe,pe,_e,ke,Be,Ee,ye=P.tag,ze=P.anchor,Le={},tt=Object.create(null),ut=null,Kt=null,Tn=null,_t=!1,cn=!1;if(P.firstTabInLine!==-1)return!1;for(P.anchor!==null&&(P.anchorMap[P.anchor]=Le),Ee=P.input.charCodeAt(P.position);Ee!==0;){if(_t||P.firstTabInLine===-1||(P.position=P.firstTabInLine,Vt(P,"tab characters must not be used in indentation")),he=P.input.charCodeAt(P.position+1),pe=P.line,Ee!==63&&Ee!==58||!ii(he)){if(_e=P.line,ke=P.lineStart,Be=P.position,!zu(P,le,2,!1,!0))break;if(P.line===pe){for(Ee=P.input.charCodeAt(P.position);Ca(Ee);)Ee=P.input.charCodeAt(++P.position);if(Ee===58)ii(Ee=P.input.charCodeAt(++P.position))||Vt(P,"a whitespace character is expected after the key-value separator within a block mapping"),_t&&(vo(P,Le,tt,ut,Kt,null,_e,ke,Be),ut=Kt=Tn=null),cn=!0,_t=!1,xe=!1,ut=P.tag,Kt=P.result;else{if(!cn)return P.tag=ye,P.anchor=ze,!0;Vt(P,"can not read an implicit mapping pair; a colon is missed")}}else{if(!cn)return P.tag=ye,P.anchor=ze,!0;Vt(P,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else Ee===63?(_t&&(vo(P,Le,tt,ut,Kt,null,_e,ke,Be),ut=Kt=Tn=null),cn=!0,_t=!0,xe=!0):_t?(_t=!1,xe=!0):Vt(P,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),P.position+=1,Ee=he;if((P.line===pe||P.lineIndent>re)&&(_t&&(_e=P.line,ke=P.lineStart,Be=P.position),zu(P,re,4,!0,xe)&&(_t?Kt=P.result:Tn=P.result),_t||(vo(P,Le,tt,ut,Kt,Tn,_e,ke,Be),ut=Kt=Tn=null),Dr(P,!0,-1),Ee=P.input.charCodeAt(P.position)),(P.line===pe||P.lineIndent>re)&&Ee!==0)Vt(P,"bad indentation of a mapping entry");else if(P.lineIndent<re)break}return _t&&vo(P,Le,tt,ut,Kt,null,_e,ke,Be),cn&&(P.tag=ye,P.anchor=ze,P.kind="mapping",P.result=Le),cn})(t,U,L))||(function(P,re){var le,he,xe,pe,_e,ke,Be,Ee,ye,ze,Le,tt,ut=!0,Kt=P.tag,Tn=P.anchor,_t=Object.create(null);if((tt=P.input.charCodeAt(P.position))===91)_e=93,Ee=!1,pe=[];else{if(tt!==123)return!1;_e=125,Ee=!0,pe={}}for(P.anchor!==null&&(P.anchorMap[P.anchor]=pe),tt=P.input.charCodeAt(++P.position);tt!==0;){if(Dr(P,!0,re),(tt=P.input.charCodeAt(P.position))===_e)return P.position++,P.tag=Kt,P.anchor=Tn,P.kind=Ee?"mapping":"sequence",P.result=pe,!0;ut?tt===44&&Vt(P,"expected the node content, but found ','"):Vt(P,"missed comma between flow collection entries"),Le=null,ke=Be=!1,tt===63&&ii(P.input.charCodeAt(P.position+1))&&(ke=Be=!0,P.position++,Dr(P,!0,re)),le=P.line,he=P.lineStart,xe=P.position,zu(P,re,1,!1,!0),ze=P.tag,ye=P.result,Dr(P,!0,re),tt=P.input.charCodeAt(P.position),!Be&&P.line!==le||tt!==58||(ke=!0,tt=P.input.charCodeAt(++P.position),Dr(P,!0,re),zu(P,re,1,!1,!0),Le=P.result),Ee?vo(P,pe,_t,ze,ye,Le,le,he,xe):ke?pe.push(vo(P,null,_t,ze,ye,Le,le,he,xe)):pe.push(ye),Dr(P,!0,re),(tt=P.input.charCodeAt(P.position))===44?(ut=!0,tt=P.input.charCodeAt(++P.position)):ut=!1}Vt(P,"unexpected end of the stream within a flow collection")})(t,L)?Z=!0:(x&&(function(P,re){var le,he,xe,pe,_e,ke=1,Be=!1,Ee=!1,ye=re,ze=0,Le=!1;if((pe=P.input.charCodeAt(P.position))===124)he=!1;else{if(pe!==62)return!1;he=!0}for(P.kind="scalar",P.result="";pe!==0;)if((pe=P.input.charCodeAt(++P.position))===43||pe===45)ke===1?ke=pe===43?3:2:Vt(P,"repeat of a chomping mode identifier");else{if(!((xe=48<=(_e=pe)&&_e<=57?_e-48:-1)>=0))break;xe===0?Vt(P,"bad explicit indentation width of a block scalar; it cannot be less than one"):Ee?Vt(P,"repeat of an indentation width identifier"):(ye=re+xe-1,Ee=!0)}if(Ca(pe)){do pe=P.input.charCodeAt(++P.position);while(Ca(pe));if(pe===35)do pe=P.input.charCodeAt(++P.position);while(!Wi(pe)&&pe!==0)}for(;pe!==0;){for(Zp(P),P.lineIndent=0,pe=P.input.charCodeAt(P.position);(!Ee||P.lineIndent<ye)&&pe===32;)P.lineIndent++,pe=P.input.charCodeAt(++P.position);if(!Ee&&P.lineIndent>ye&&(ye=P.lineIndent),Wi(pe))ze++;else{if(P.lineIndent<ye){ke===3?P.result+=ar.repeat(`
|
||
`,Be?1+ze:ze):ke===1&&Be&&(P.result+=`
|
||
`);break}for(he?Ca(pe)?(Le=!0,P.result+=ar.repeat(`
|
||
`,Be?1+ze:ze)):Le?(Le=!1,P.result+=ar.repeat(`
|
||
`,ze+1)):ze===0?Be&&(P.result+=" "):P.result+=ar.repeat(`
|
||
`,ze):P.result+=ar.repeat(`
|
||
`,Be?1+ze:ze),Be=!0,Ee=!0,ze=0,le=P.position;!Wi(pe)&&pe!==0;)pe=P.input.charCodeAt(++P.position);Qi(P,le,P.position,!1)}}return!0})(t,L)||(function(P,re){var le,he,xe;if((le=P.input.charCodeAt(P.position))!==39)return!1;for(P.kind="scalar",P.result="",P.position++,he=xe=P.position;(le=P.input.charCodeAt(P.position))!==0;)if(le===39){if(Qi(P,he,P.position,!0),(le=P.input.charCodeAt(++P.position))!==39)return!0;he=P.position,P.position++,xe=P.position}else Wi(le)?(Qi(P,he,xe,!0),hh(P,Dr(P,!1,re)),he=xe=P.position):P.position===P.lineStart&&Iu(P)?Vt(P,"unexpected end of the document within a single quoted scalar"):(P.position++,xe=P.position);Vt(P,"unexpected end of the stream within a single quoted scalar")})(t,L)||(function(P,re){var le,he,xe,pe,_e,ke,Be;if((ke=P.input.charCodeAt(P.position))!==34)return!1;for(P.kind="scalar",P.result="",P.position++,le=he=P.position;(ke=P.input.charCodeAt(P.position))!==0;){if(ke===34)return Qi(P,le,P.position,!0),P.position++,!0;if(ke===92){if(Qi(P,le,P.position,!0),Wi(ke=P.input.charCodeAt(++P.position)))Dr(P,!1,re);else if(ke<256&&ny[ke])P.result+=wc[ke],P.position++;else if((_e=(Be=ke)===120?2:Be===117?4:Be===85?8:0)>0){for(xe=_e,pe=0;xe>0;xe--)(_e=Xw(ke=P.input.charCodeAt(++P.position)))>=0?pe=(pe<<4)+_e:Vt(P,"expected hexadecimal character");P.result+=Yw(pe),P.position++}else Vt(P,"unknown escape sequence");le=he=P.position}else Wi(ke)?(Qi(P,le,he,!0),hh(P,Dr(P,!1,re)),le=he=P.position):P.position===P.lineStart&&Iu(P)?Vt(P,"unexpected end of the document within a double quoted scalar"):(P.position++,he=P.position)}Vt(P,"unexpected end of the stream within a double quoted scalar")})(t,L)?Z=!0:(function(P){var re,le,he;if((he=P.input.charCodeAt(P.position))!==42)return!1;for(he=P.input.charCodeAt(++P.position),re=P.position;he!==0&&!ii(he)&&!bc(he);)he=P.input.charCodeAt(++P.position);return P.position===re&&Vt(P,"name of an alias node must contain at least one character"),le=P.input.slice(re,P.position),yl.call(P.anchorMap,le)||Vt(P,'unidentified alias "'+le+'"'),P.result=P.anchorMap[le],Dr(P,!0,-1),!0})(t)?(Z=!0,t.tag===null&&t.anchor===null||Vt(t,"alias node should not have any properties")):(function(P,re,le){var he,xe,pe,_e,ke,Be,Ee,ye,ze=P.kind,Le=P.result;if(ii(ye=P.input.charCodeAt(P.position))||bc(ye)||ye===35||ye===38||ye===42||ye===33||ye===124||ye===62||ye===39||ye===34||ye===37||ye===64||ye===96||(ye===63||ye===45)&&(ii(he=P.input.charCodeAt(P.position+1))||le&&bc(he)))return!1;for(P.kind="scalar",P.result="",xe=pe=P.position,_e=!1;ye!==0;){if(ye===58){if(ii(he=P.input.charCodeAt(P.position+1))||le&&bc(he))break}else if(ye===35){if(ii(P.input.charCodeAt(P.position-1)))break}else{if(P.position===P.lineStart&&Iu(P)||le&&bc(ye))break;if(Wi(ye)){if(ke=P.line,Be=P.lineStart,Ee=P.lineIndent,Dr(P,!1,-1),P.lineIndent>=re){_e=!0,ye=P.input.charCodeAt(P.position);continue}P.position=pe,P.line=ke,P.lineStart=Be,P.lineIndent=Ee;break}}_e&&(Qi(P,xe,pe,!1),hh(P,P.line-ke),xe=pe=P.position,_e=!1),Ca(ye)||(pe=P.position+1),ye=P.input.charCodeAt(++P.position)}return Qi(P,xe,pe,!1),!!P.result||(P.kind=ze,P.result=Le,!1)})(t,L,i===1)&&(Z=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):J===0&&(Z=S&&ry(t,U))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Vt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),C=0,N=t.implicitTypes.length;C<N;C+=1)if(($=t.implicitTypes[C]).resolve(t.result)){t.result=$.construct(t.result),t.tag=$.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(yl.call(t.typeMap[t.kind||"fallback"],t.tag))$=t.typeMap[t.kind||"fallback"][t.tag];else for($=null,C=0,N=(D=t.typeMap.multi[t.kind||"fallback"]).length;C<N;C+=1)if(t.tag.slice(0,D[C].tag.length)===D[C].tag){$=D[C];break}$||Vt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&$.kind!==t.kind&&Vt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+$.kind+'", not "'+t.kind+'"'),$.resolve(t.result,t.tag)?(t.result=$.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Vt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||Z}function xA(t){var n,i,l,p,v=t.position,x=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(p=t.input.charCodeAt(t.position))!==0&&(Dr(t,!0,-1),p=t.input.charCodeAt(t.position),!(t.lineIndent>0||p!==37));){for(x=!0,p=t.input.charCodeAt(++t.position),n=t.position;p!==0&&!ii(p);)p=t.input.charCodeAt(++t.position);for(l=[],(i=t.input.slice(n,t.position)).length<1&&Vt(t,"directive name must not be less than one character in length");p!==0;){for(;Ca(p);)p=t.input.charCodeAt(++t.position);if(p===35){do p=t.input.charCodeAt(++t.position);while(p!==0&&!Wi(p));break}if(Wi(p))break;for(n=t.position;p!==0&&!ii(p);)p=t.input.charCodeAt(++t.position);l.push(t.input.slice(n,t.position))}p!==0&&Zp(t),yl.call(Mu,i)?Mu[i](t,i,l):dh(t,'unknown document directive "'+i+'"')}Dr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Dr(t,!0,-1)):x&&Vt(t,"directives end mark is expected"),zu(t,t.lineIndent-1,4,!1,!0),Dr(t,!0,-1),t.checkLineBreaks&&gA.test(t.input.slice(v,t.position))&&dh(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Iu(t)?t.input.charCodeAt(t.position)===46&&(t.position+=3,Dr(t,!0,-1)):t.position<t.length-1&&Vt(t,"end of the stream or a document separator is expected")}function e0(t,n){n=n||{},(t=String(t)).length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
||
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var i=new vA(t,n),l=t.indexOf("\0");for(l!==-1&&(i.position=l,Vt(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)xA(i);return i.documents}var bA=function(t,n,i){n!==null&&typeof n=="object"&&i===void 0&&(i=n,n=null);var l=e0(t,i);if(typeof n!="function")return l;for(var p=0,v=l.length;p<v;p+=1)n(l[p])},wA=function(t,n){var i=e0(t,n);if(i.length!==0){if(i.length===1)return i[0];throw new Rr("expected a single document in the stream, but found more")}},ai=Object.prototype.toString,Lu=Object.prototype.hasOwnProperty,t0={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},n0=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],r0=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function s0(t){var n,i,l;if(n=t.toString(16).toUpperCase(),t<=255)i="x",l=2;else if(t<=65535)i="u",l=4;else{if(!(t<=4294967295))throw new Rr("code point within a string may not be greater than 0xFFFFFFFF");i="U",l=8}return"\\"+i+ar.repeat("0",l-n.length)+n}function sy(t){this.schema=t.schema||ey,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=ar.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=(function(n,i){var l,p,v,x,S,C,N;if(i===null)return{};for(l={},v=0,x=(p=Object.keys(i)).length;v<x;v+=1)S=p[v],C=String(i[S]),S.slice(0,2)==="!!"&&(S="tag:yaml.org,2002:"+S.slice(2)),(N=n.compiledTypeMap.fallback[S])&&Lu.call(N.styleAliases,C)&&(C=N.styleAliases[C]),l[S]=C;return l})(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function i0(t,n){for(var i,l=ar.repeat(" ",n),p=0,v=-1,x="",S=t.length;p<S;)(v=t.indexOf(`
|
||
`,p))===-1?(i=t.slice(p),p=S):(i=t.slice(p,v+1),p=v+1),i.length&&i!==`
|
||
`&&(x+=l),x+=i;return x}function vl(t,n){return`
|
||
`+ar.repeat(" ",t.indent*n)}function Fu(t){return t===32||t===9}function xo(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function Jp(t){return xo(t)&&t!==65279&&t!==13&&t!==10}function iy(t,n,i){var l=Jp(t),p=l&&!Fu(t);return(i?l:l&&t!==44&&t!==91&&t!==93&&t!==123&&t!==125)&&t!==35&&!(n===58&&!p)||Jp(n)&&!Fu(n)&&t===35||n===58&&p}function Aa(t,n){var i,l=t.charCodeAt(n);return l>=55296&&l<=56319&&n+1<t.length&&(i=t.charCodeAt(n+1))>=56320&&i<=57343?1024*(l-55296)+i-56320+65536:l}function Sc(t){return/^\n* /.test(t)}function ay(t,n,i,l,p){t.dump=(function(){if(n.length===0)return t.quotingType===2?'""':"''";if(!t.noCompatMode&&(n0.indexOf(n)!==-1||r0.test(n)))return t.quotingType===2?'"'+n+'"':"'"+n+"'";var v=t.indent*Math.max(1,i),x=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-v),S=l||t.flowLevel>-1&&i>=t.flowLevel;switch((function(C,N,D,$,L,U,J,Y){var Z,P,re=0,le=null,he=!1,xe=!1,pe=$!==-1,_e=-1,ke=xo(P=Aa(C,0))&&P!==65279&&!Fu(P)&&P!==45&&P!==63&&P!==58&&P!==44&&P!==91&&P!==93&&P!==123&&P!==125&&P!==35&&P!==38&&P!==42&&P!==33&&P!==124&&P!==61&&P!==62&&P!==39&&P!==34&&P!==37&&P!==64&&P!==96&&(function(Be){return!Fu(Be)&&Be!==58})(Aa(C,C.length-1));if(N||J)for(Z=0;Z<C.length;re>=65536?Z+=2:Z++){if(!xo(re=Aa(C,Z)))return 5;ke=ke&&iy(re,le,Y),le=re}else{for(Z=0;Z<C.length;re>=65536?Z+=2:Z++){if((re=Aa(C,Z))===10)he=!0,pe&&(xe=xe||Z-_e-1>$&&C[_e+1]!==" ",_e=Z);else if(!xo(re))return 5;ke=ke&&iy(re,le,Y),le=re}xe=xe||pe&&Z-_e-1>$&&C[_e+1]!==" "}return he||xe?D>9&&Sc(C)?5:J?U===2?5:2:xe?4:3:!ke||J||L(C)?U===2?5:2:1})(n,S,t.indent,x,(function(C){return(function(N,D){var $,L;for($=0,L=N.implicitTypes.length;$<L;$+=1)if(N.implicitTypes[$].resolve(D))return!0;return!1})(t,C)}),t.quotingType,t.forceQuotes&&!l,p)){case 1:return n;case 2:return"'"+n.replace(/'/g,"''")+"'";case 3:return"|"+oy(n,t.indent)+xl(i0(n,v));case 4:return">"+oy(n,t.indent)+xl(i0((function(C,N){for(var D,$,L,U=/(\n+)([^\n]*)/g,J=(L=(L=C.indexOf(`
|
||
`))!==-1?L:C.length,U.lastIndex=L,ly(C.slice(0,L),N)),Y=C[0]===`
|
||
`||C[0]===" ";$=U.exec(C);){var Z=$[1],P=$[2];D=P[0]===" ",J+=Z+(Y||D||P===""?"":`
|
||
`)+ly(P,N),Y=D}return J})(n,x),v));case 5:return'"'+(function(C){for(var N,D="",$=0,L=0;L<C.length;$>=65536?L+=2:L++)$=Aa(C,L),!(N=t0[$])&&xo($)?(D+=C[L],$>=65536&&(D+=C[L+1])):D+=N||s0($);return D})(n)+'"';default:throw new Rr("impossible error: invalid scalar style")}})()}function oy(t,n){var i=Sc(t)?String(n):"",l=t[t.length-1]===`
|
||
`;return i+(!l||t[t.length-2]!==`
|
||
`&&t!==`
|
||
`?l?"":"-":"+")+`
|
||
`}function xl(t){return t[t.length-1]===`
|
||
`?t.slice(0,-1):t}function ly(t,n){if(t===""||t[0]===" ")return t;for(var i,l,p=/ [^ ]/g,v=0,x=0,S=0,C="";i=p.exec(t);)(S=i.index)-v>n&&(l=x>v?x:S,C+=`
|
||
`+t.slice(v,l),v=l+1),x=S;return C+=`
|
||
`,t.length-v>n&&x>v?C+=t.slice(v,x)+`
|
||
`+t.slice(x+1):C+=t.slice(v),C.slice(1)}function cy(t,n,i,l){var p,v,x,S="",C=t.tag;for(p=0,v=i.length;p<v;p+=1)x=i[p],t.replacer&&(x=t.replacer.call(i,String(p),x)),(bo(t,n+1,x,!0,!0,!1,!0)||x===void 0&&bo(t,n+1,null,!0,!0,!1,!0))&&(l&&S===""||(S+=vl(t,n)),t.dump&&t.dump.charCodeAt(0)===10?S+="-":S+="- ",S+=t.dump);t.tag=C,t.dump=S||"[]"}function uy(t,n,i){var l,p,v,x,S,C;for(v=0,x=(p=i?t.explicitTypes:t.implicitTypes).length;v<x;v+=1)if(((S=p[v]).instanceOf||S.predicate)&&(!S.instanceOf||typeof n=="object"&&n instanceof S.instanceOf)&&(!S.predicate||S.predicate(n))){if(i?S.multi&&S.representName?t.tag=S.representName(n):t.tag=S.tag:t.tag="?",S.represent){if(C=t.styleMap[S.tag]||S.defaultStyle,ai.call(S.represent)==="[object Function]")l=S.represent(n,C);else{if(!Lu.call(S.represent,C))throw new Rr("!<"+S.tag+'> tag resolver accepts not "'+C+'" style');l=S.represent[C](n,C)}t.dump=l}return!0}return!1}function bo(t,n,i,l,p,v,x){t.tag=null,t.dump=i,uy(t,i,!1)||uy(t,i,!0);var S,C=ai.call(t.dump),N=l;l&&(l=t.flowLevel<0||t.flowLevel>n);var D,$,L=C==="[object Object]"||C==="[object Array]";if(L&&($=(D=t.duplicates.indexOf(i))!==-1),(t.tag!==null&&t.tag!=="?"||$||t.indent!==2&&n>0)&&(p=!1),$&&t.usedDuplicates[D])t.dump="*ref_"+D;else{if(L&&$&&!t.usedDuplicates[D]&&(t.usedDuplicates[D]=!0),C==="[object Object]")l&&Object.keys(t.dump).length!==0?((function(U,J,Y,Z){var P,re,le,he,xe,pe,_e="",ke=U.tag,Be=Object.keys(Y);if(U.sortKeys===!0)Be.sort();else if(typeof U.sortKeys=="function")Be.sort(U.sortKeys);else if(U.sortKeys)throw new Rr("sortKeys must be a boolean or a function");for(P=0,re=Be.length;P<re;P+=1)pe="",Z&&_e===""||(pe+=vl(U,J)),he=Y[le=Be[P]],U.replacer&&(he=U.replacer.call(Y,le,he)),bo(U,J+1,le,!0,!0,!0)&&((xe=U.tag!==null&&U.tag!=="?"||U.dump&&U.dump.length>1024)&&(U.dump&&U.dump.charCodeAt(0)===10?pe+="?":pe+="? "),pe+=U.dump,xe&&(pe+=vl(U,J)),bo(U,J+1,he,!0,xe)&&(U.dump&&U.dump.charCodeAt(0)===10?pe+=":":pe+=": ",_e+=pe+=U.dump));U.tag=ke,U.dump=_e||"{}"})(t,n,t.dump,p),$&&(t.dump="&ref_"+D+t.dump)):((function(U,J,Y){var Z,P,re,le,he,xe="",pe=U.tag,_e=Object.keys(Y);for(Z=0,P=_e.length;Z<P;Z+=1)he="",xe!==""&&(he+=", "),U.condenseFlow&&(he+='"'),le=Y[re=_e[Z]],U.replacer&&(le=U.replacer.call(Y,re,le)),bo(U,J,re,!1,!1)&&(U.dump.length>1024&&(he+="? "),he+=U.dump+(U.condenseFlow?'"':"")+":"+(U.condenseFlow?"":" "),bo(U,J,le,!1,!1)&&(xe+=he+=U.dump));U.tag=pe,U.dump="{"+xe+"}"})(t,n,t.dump),$&&(t.dump="&ref_"+D+" "+t.dump));else if(C==="[object Array]")l&&t.dump.length!==0?(t.noArrayIndent&&!x&&n>0?cy(t,n-1,t.dump,p):cy(t,n,t.dump,p),$&&(t.dump="&ref_"+D+t.dump)):((function(U,J,Y){var Z,P,re,le="",he=U.tag;for(Z=0,P=Y.length;Z<P;Z+=1)re=Y[Z],U.replacer&&(re=U.replacer.call(Y,String(Z),re)),(bo(U,J,re,!1,!1)||re===void 0&&bo(U,J,null,!1,!1))&&(le!==""&&(le+=","+(U.condenseFlow?"":" ")),le+=U.dump);U.tag=he,U.dump="["+le+"]"})(t,n,t.dump),$&&(t.dump="&ref_"+D+" "+t.dump));else{if(C!=="[object String]"){if(C==="[object Undefined]"||t.skipInvalid)return!1;throw new Rr("unacceptable kind of an object to dump "+C)}t.tag!=="?"&&ay(t,t.dump,n,v,N)}t.tag!==null&&t.tag!=="?"&&(S=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),S=t.tag[0]==="!"?"!"+S:S.slice(0,18)==="tag:yaml.org,2002:"?"!!"+S.slice(18):"!<"+S+">",t.dump=S+" "+t.dump)}return!0}function SA(t,n){var i,l,p=[],v=[];for(dy(t,p,v),i=0,l=v.length;i<l;i+=1)n.duplicates.push(p[v[i]]);n.usedDuplicates=new Array(l)}function dy(t,n,i){var l,p,v;if(t!==null&&typeof t=="object")if((p=n.indexOf(t))!==-1)i.indexOf(p)===-1&&i.push(p);else if(n.push(t),Array.isArray(t))for(p=0,v=t.length;p<v;p+=1)dy(t[p],n,i);else for(p=0,v=(l=Object.keys(t)).length;p<v;p+=1)dy(t[l[p]],n,i)}function Wp(t,n){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var a0=ls,hy=ch,Oa=Yp,Ec=Pw,ea=Mw,qu=ey,py=wA,Qp=bA,ef=function(t,n){var i=new sy(n=n||{});i.noRefs||SA(t,i);var l=t;return i.replacer&&(l=i.replacer.call({"":l},"",l)),bo(i,0,l,!0,!0)?i.dump+`
|
||
`:""},fy=Rr,jc={binary:Fw,float:Dw,map:Xp,null:Du,pairs:Bw,set:Kw,timestamp:Jg,bool:uh,int:Nw,merge:Lw,omap:qw,seq:_w,str:Nu},o0=Wp("safeLoad","load"),tf=Wp("safeLoadAll","loadAll"),Bu=Wp("safeDump","dump"),Uu={Type:a0,Schema:hy,FAILSAFE_SCHEMA:Oa,JSON_SCHEMA:Ec,CORE_SCHEMA:ea,DEFAULT_SCHEMA:qu,load:py,loadAll:Qp,dump:ef,YAMLException:fy,types:jc,safeLoad:o0,safeLoadAll:tf,safeDump:Bu};function oi(t={}){return typeof t.entries!="function"?{}:Array.from(t.entries()).reduce(((n,[i,l])=>(n[i]=(function(p){return p.includes(", ")?p.split(", "):p})(l),n)),{})}function nf(t,n,{loadSpec:i=!1}={}){const l={ok:t.ok,url:t.url||n,status:t.status,statusText:t.statusText,headers:oi(t.headers)},p=l.headers["content-type"],v=i||((x="")=>/(json|xml|yaml|text)\b/.test(x))(p);return(v?t.text:t.blob||t.buffer).call(t).then((x=>{if(l.text=x,l.data=x,v)try{const S=(function(C,N){return N&&(N.indexOf("application/json")===0||N.indexOf("+json")>0)?JSON.parse(C):Uu.load(C)})(x,p);l.body=S,l.obj=S}catch(S){l.parseError=S}return l}))}async function li(t,n={}){typeof t=="object"&&(t=(n=t).url),n.headers=n.headers||{},(n=Kp(n)).headers&&Object.keys(n.headers).forEach((p=>{const v=n.headers[p];typeof v=="string"&&(n.headers[p]=v.replace(/\n+/g," "))})),n.requestInterceptor&&(n=await n.requestInterceptor(n)||n);const i=n.headers["content-type"]||n.headers["Content-Type"];let l;/multipart\/form-data/i.test(i)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]);try{l=await(n.userFetch||fetch)(n.url,n),l=await nf(l,t,n),n.responseInterceptor&&(l=await n.responseInterceptor(l)||l)}catch(p){if(!l)throw p;const v=new Error(l.statusText||`response status is ${l.status}`);throw v.status=l.status,v.statusCode=l.status,v.responseError=p,v}if(!l.ok){const p=new Error(l.statusText||`response status is ${l.status}`);throw p.status=l.status,p.statusCode=l.status,p.response=l,p}return l}function my(t,n={}){const{requestInterceptor:i,responseInterceptor:l}=n,p=t.withCredentials?"include":"same-origin";return v=>t({url:v,loadSpec:!0,requestInterceptor:i,responseInterceptor:l,headers:{Accept:"application/json, application/yaml"},credentials:p}).then((x=>x.body))}const Ku=t=>{var n,i;const{baseDoc:l,url:p}=t,v=(n=l??p)!==null&&n!==void 0?n:"";return typeof((i=globalThis.document)===null||i===void 0?void 0:i.baseURI)=="string"?String(new URL(v,globalThis.document.baseURI)):v},bl=t=>{const{fetch:n,http:i}=t;return n||i||li};var Vu,l0=(Vu=function(t,n){return Vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var p in l)l.hasOwnProperty(p)&&(i[p]=l[p])},Vu(t,n)},function(t,n){function i(){this.constructor=t}Vu(t,n),t.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}),gy=Object.prototype.hasOwnProperty;function rf(t,n){return gy.call(t,n)}function ci(t){if(Array.isArray(t)){for(var n=new Array(t.length),i=0;i<n.length;i++)n[i]=""+i;return n}if(Object.keys)return Object.keys(t);var l=[];for(var p in t)rf(t,p)&&l.push(p);return l}function cs(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function wl(t){for(var n,i=0,l=t.length;i<l;){if(!((n=t.charCodeAt(i))>=48&&n<=57))return!1;i++}return!0}function Ba(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function Hu(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function ui(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var n=0,i=t.length;n<i;n++)if(ui(t[n]))return!0}else if(typeof t=="object"){for(var l=ci(t),p=l.length,v=0;v<p;v++)if(ui(t[l[v]]))return!0}}return!1}function Ti(t,n){var i=[t];for(var l in n){var p=typeof n[l]=="object"?JSON.stringify(n[l],null,2):n[l];p!==void 0&&i.push(l+": "+p)}return i.join(`
|
||
`)}var wo=(function(t){function n(i,l,p,v,x){var S=this.constructor,C=t.call(this,Ti(i,{name:l,index:p,operation:v,tree:x}))||this;return C.name=l,C.index=p,C.operation=v,C.tree=x,Object.setPrototypeOf(C,S.prototype),C.message=Ti(i,{name:l,index:p,operation:v,tree:x}),C}return l0(n,t),n})(Error),Kn=wo,Ua=cs,di={add:function(t,n,i){return t[n]=this.value,{newDocument:i}},remove:function(t,n,i){var l=t[n];return delete t[n],{newDocument:i,removed:l}},replace:function(t,n,i){var l=t[n];return t[n]=this.value,{newDocument:i,removed:l}},move:function(t,n,i){var l=Cc(i,this.path);l&&(l=cs(l));var p=So(i,{op:"remove",path:this.from}).removed;return So(i,{op:"add",path:this.path,value:p}),{newDocument:i,removed:l}},copy:function(t,n,i){var l=Cc(i,this.from);return So(i,{op:"add",path:this.path,value:cs(l)}),{newDocument:i}},test:function(t,n,i){return{newDocument:i,test:xn(t[n],this.value)}},_get:function(t,n,i){return this.value=t[n],{newDocument:i}}},c0={add:function(t,n,i){return wl(n)?t.splice(n,0,this.value):t[n]=this.value,{newDocument:i,index:n}},remove:function(t,n,i){return{newDocument:i,removed:t.splice(n,1)[0]}},replace:function(t,n,i){var l=t[n];return t[n]=this.value,{newDocument:i,removed:l}},move:di.move,copy:di.copy,test:di.test,_get:di._get};function Cc(t,n){if(n=="")return t;var i={op:"_get",path:n};return So(t,i),i.value}function So(t,n,i,l,p,v){if(i===void 0&&(i=!1),l===void 0&&(l=!0),p===void 0&&(p=!0),v===void 0&&(v=0),i&&(typeof i=="function"?i(n,0,t,n.path):qr(n,0)),n.path===""){var x={newDocument:t};if(n.op==="add")return x.newDocument=n.value,x;if(n.op==="replace")return x.newDocument=n.value,x.removed=t,x;if(n.op==="move"||n.op==="copy")return x.newDocument=Cc(t,n.from),n.op==="move"&&(x.removed=t),x;if(n.op==="test"){if(x.test=xn(t,n.value),x.test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x.newDocument=t,x}if(n.op==="remove")return x.removed=t,x.newDocument=null,x;if(n.op==="_get")return n.value=t,x;if(i)throw new Kn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",v,n,t);return x}l||(t=cs(t));var S=(n.path||"").split("/"),C=t,N=1,D=S.length,$=void 0,L=void 0,U=void 0;for(U=typeof i=="function"?i:qr;;){if((L=S[N])&&L.indexOf("~")!=-1&&(L=Hu(L)),p&&(L=="__proto__"||L=="prototype"&&N>0&&S[N-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&$===void 0&&(C[L]===void 0?$=S.slice(0,N).join("/"):N==D-1&&($=n.path),$!==void 0&&U(n,0,t,$)),N++,Array.isArray(C)){if(L==="-")L=C.length;else{if(i&&!wl(L))throw new Kn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",v,n,t);wl(L)&&(L=~~L)}if(N>=D){if(i&&n.op==="add"&&L>C.length)throw new Kn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",v,n,t);if((x=c0[n.op].call(n,C,L,t)).test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x}}else if(N>=D){if((x=di[n.op].call(n,C,L,t)).test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",v,n,t);return x}if(C=C[L],i&&N<D&&(!C||typeof C!="object"))throw new Kn("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",v,n,t)}}function Eo(t,n,i,l,p){if(l===void 0&&(l=!0),p===void 0&&(p=!0),i&&!Array.isArray(n))throw new Kn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");l||(t=cs(t));for(var v=new Array(n.length),x=0,S=n.length;x<S;x++)v[x]=So(t,n[x],i,!0,p,x),t=v[x].newDocument;return v.newDocument=t,v}function qr(t,n,i,l){if(typeof t!="object"||t===null||Array.isArray(t))throw new Kn("Operation is not an object","OPERATION_NOT_AN_OBJECT",n,t,i);if(!di[t.op])throw new Kn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",n,t,i);if(typeof t.path!="string")throw new Kn("Operation `path` property is not a string","OPERATION_PATH_INVALID",n,t,i);if(t.path.indexOf("/")!==0&&t.path.length>0)throw new Kn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,i);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new Kn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new Kn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&ui(t.value))throw new Kn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,i);if(i){if(t.op=="add"){var p=t.path.split("/").length,v=l.split("/").length;if(p!==v+1&&p!==v)throw new Kn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,i)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==l)throw new Kn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,i)}else if(t.op==="move"||t.op==="copy"){var x=gr([{op:"_get",path:t.from,value:void 0}],i);if(x&&x.name==="OPERATION_PATH_UNRESOLVABLE")throw new Kn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,i)}}}function gr(t,n,i){try{if(!Array.isArray(t))throw new Kn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(n)Eo(cs(n),cs(t),i||!0);else{i=i||qr;for(var l=0;l<t.length;l++)i(t[l],l,n,void 0)}}catch(p){if(p instanceof Kn)return p;throw p}}function xn(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){var i,l,p,v=Array.isArray(t),x=Array.isArray(n);if(v&&x){if((l=t.length)!=n.length)return!1;for(i=l;i--!=0;)if(!xn(t[i],n[i]))return!1;return!0}if(v!=x)return!1;var S=Object.keys(t);if((l=S.length)!==Object.keys(n).length)return!1;for(i=l;i--!=0;)if(!n.hasOwnProperty(S[i]))return!1;for(i=l;i--!=0;)if(!xn(t[p=S[i]],n[p]))return!1;return!0}return t!=t&&n!=n}const Sl=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:Kn,_areEquals:xn,applyOperation:So,applyPatch:Eo,applyReducer:function(t,n,i){var l=So(t,n);if(l.test===!1)throw new Kn("Test operation failed","TEST_OPERATION_FAILED",i,n,t);return l.newDocument},deepClone:Ua,getValueByPointer:Cc,validate:gr,validator:qr},Symbol.toStringTag,{value:"Module"}));var hi=new WeakMap,yy=function(t){this.observers=new Map,this.obj=t},El=function(t,n){this.callback=t,this.observer=n};function sf(t,n){n===void 0&&(n=!1);var i=hi.get(t.object);af(i.value,t.object,t.patches,"",n),t.patches.length&&Eo(i.value,t.patches);var l=t.patches;return l.length>0&&(t.patches=[],t.callback&&t.callback(l)),l}function af(t,n,i,l,p){if(n!==t){typeof n.toJSON=="function"&&(n=n.toJSON());for(var v=ci(n),x=ci(t),S=!1,C=x.length-1;C>=0;C--){var N=t[$=x[C]];if(!rf(n,$)||n[$]===void 0&&N!==void 0&&Array.isArray(n)===!1)Array.isArray(t)===Array.isArray(n)?(p&&i.push({op:"test",path:l+"/"+Ba($),value:cs(N)}),i.push({op:"remove",path:l+"/"+Ba($)}),S=!0):(p&&i.push({op:"test",path:l,value:t}),i.push({op:"replace",path:l,value:n}));else{var D=n[$];typeof N=="object"&&N!=null&&typeof D=="object"&&D!=null&&Array.isArray(N)===Array.isArray(D)?af(N,D,i,l+"/"+Ba($),p):N!==D&&(p&&i.push({op:"test",path:l+"/"+Ba($),value:cs(N)}),i.push({op:"replace",path:l+"/"+Ba($),value:cs(D)}))}}if(S||v.length!=x.length)for(C=0;C<v.length;C++){var $;rf(t,$=v[C])||n[$]===void 0||i.push({op:"add",path:l+"/"+Ba($),value:cs(n[$])})}}}const Gu=Object.freeze(Object.defineProperty({__proto__:null,compare:function(t,n,i){i===void 0&&(i=!1);var l=[];return af(t,n,l,"",i),l},generate:sf,observe:function(t,n){var i,l=(function(S){return hi.get(S)})(t);if(l){var p=(function(S,C){return S.observers.get(C)})(l,n);i=p&&p.observer}else l=new yy(t),hi.set(t,l);if(i)return i;if(i={},l.value=cs(t),n){i.callback=n,i.next=null;var v=function(){sf(i)},x=function(){clearTimeout(i.next),i.next=setTimeout(v)};typeof window<"u"&&(window.addEventListener("mouseup",x),window.addEventListener("keyup",x),window.addEventListener("mousedown",x),window.addEventListener("keydown",x),window.addEventListener("change",x))}return i.patches=[],i.object=t,i.unobserve=function(){sf(i),clearTimeout(i.next),(function(S,C){S.observers.delete(C.callback)})(l,i),typeof window<"u"&&(window.removeEventListener("mouseup",x),window.removeEventListener("keyup",x),window.removeEventListener("mousedown",x),window.removeEventListener("keydown",x),window.removeEventListener("change",x))},l.observers.set(n,new El(n,i)),i},unobserve:function(t,n){n.unobserve()}},Symbol.toStringTag,{value:"Module"}));function Ka(t){return t&&t.t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}Object.assign({},Sl,Gu,{JsonPatchError:wo,deepClone:cs,escapePathComponent:Ba,unescapePathComponent:Hu});var vy=function(t){return(function(n){return!!n&&typeof n=="object"})(t)&&!(function(n){var i=Object.prototype.toString.call(n);return i==="[object RegExp]"||i==="[object Date]"||(function(l){return l.$$typeof===ph})(n)})(t)},ph=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Ac(t,n){return n.clone!==!1&&n.isMergeableObject(t)?pi((i=t,Array.isArray(i)?[]:{}),t,n):t;var i}function Oc(t,n,i){return t.concat(n).map((function(l){return Ac(l,i)}))}function Va(t){return Object.keys(t).concat((function(n){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(n).filter((function(i){return Object.propertyIsEnumerable.call(n,i)})):[]})(t))}function jo(t,n){try{return n in t}catch{return!1}}function pi(t,n,i){(i=i||{}).arrayMerge=i.arrayMerge||Oc,i.isMergeableObject=i.isMergeableObject||vy,i.cloneUnlessOtherwiseSpecified=Ac;var l=Array.isArray(n);return l===Array.isArray(t)?l?i.arrayMerge(t,n,i):(function(p,v,x){var S={};return x.isMergeableObject(p)&&Va(p).forEach((function(C){S[C]=Ac(p[C],x)})),Va(v).forEach((function(C){(function(N,D){return jo(N,D)&&!(Object.hasOwnProperty.call(N,D)&&Object.propertyIsEnumerable.call(N,D))})(p,C)||(jo(p,C)&&x.isMergeableObject(v[C])?S[C]=(function(N,D){if(!D.customMerge)return pi;var $=D.customMerge(N);return typeof $=="function"?$:pi})(C,x)(p[C],v[C],x):S[C]=Ac(v[C],x))})),S})(t,n,i):Ac(n,i)}pi.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(i,l){return pi(i,l,n)}),{})};const xy=Ka(pi),Fn={add:function(t,n){return{op:"add",path:t,value:n}},replace:Rc,remove:function(t){return{op:"remove",path:t}},merge:function(t,n){return{type:"mutation",op:"merge",path:t,value:n}},mergeDeep:function(t,n){return{type:"mutation",op:"mergeDeep",path:t,value:n}},context:function(t,n){return{type:"context",path:t,value:n}},getIn:function(t,n){return n.reduce(((i,l)=>l!==void 0&&i?i[l]:i),t)},applyPatch:function(t,n,i){if(i=i||{},(n={...n,path:n.path&&kc(n.path)}).op==="merge"){const l=Al(t,n.path);Object.assign(l,n.value),Eo(t,[Rc(n.path,l)])}else if(n.op==="mergeDeep"){const l=Al(t,n.path),p=xy(l,n.value);t=Eo(t,[Rc(n.path,p)]).newDocument}else if(n.op==="add"&&n.path===""&&Tc(n.value)){const l=Object.keys(n.value).reduce(((p,v)=>(p.push({op:"add",path:`/${kc(v)}`,value:n.value[v]}),p)),[]);Eo(t,l)}else if(n.op==="replace"&&n.path===""){let{value:l}=n;i.allowMetaPatches&&n.meta&&Cl(n)&&(Array.isArray(n.value)||Tc(n.value))&&(l={...l,...n.meta}),t=l}else if(Eo(t,[n]),i.allowMetaPatches&&n.meta&&Cl(n)&&(Array.isArray(n.value)||Tc(n.value))){const l={...Al(t,n.path),...n.meta};Eo(t,[Rc(n.path,l)])}return t},parentPathMatch:function(t,n){if(!Array.isArray(n))return!1;for(let i=0,l=n.length;i<l;i+=1)if(n[i]!==t[i])return!1;return!0},flatten:fh,fullyNormalizeArray:function(t){return u0(fh(by(t)))},normalizeArray:by,isPromise:function(t){return Tc(t)&&Pr(t.then)},forEachNew:function(t,n){try{return jl(t,Xu,n)}catch(i){return i}},forEachNewPrimitive:function(t,n){try{return jl(t,Jr,n)}catch(i){return i}},isJsonPatch:of,isContextPatch:function(t){return Zu(t)&&t.type==="context"},isPatch:Zu,isMutation:Yu,isAdditiveMutation:Cl,isGenerator:function(t){return Object.prototype.toString.call(t)==="[object GeneratorFunction]"},isFunction:Pr,isObject:Tc,isError:function(t){return t instanceof Error}};function kc(t){return Array.isArray(t)?t.length<1?"":`/${t.map((n=>(n+"").replace(/~/g,"~0").replace(/\//g,"~1"))).join("/")}`:t}function Rc(t,n,i){return{op:"replace",path:t,value:n,meta:i}}function jl(t,n,i){return u0(fh(t.filter(Cl).map((l=>n(l.value,i,l.path)))||[]))}function Jr(t,n,i){return i=i||[],Array.isArray(t)?t.map(((l,p)=>Jr(l,n,i.concat(p)))):Tc(t)?Object.keys(t).map((l=>Jr(t[l],n,i.concat(l)))):n(t,i[i.length-1],i)}function Xu(t,n,i){let l=[];if((i=i||[]).length>0){const p=n(t,i[i.length-1],i);p&&(l=l.concat(p))}if(Array.isArray(t)){const p=t.map(((v,x)=>Xu(v,n,i.concat(x))));p&&(l=l.concat(p))}else if(Tc(t)){const p=Object.keys(t).map((v=>Xu(t[v],n,i.concat(v))));p&&(l=l.concat(p))}return l=fh(l),l}function by(t){return Array.isArray(t)?t:[t]}function fh(t){return[].concat(...t.map((n=>Array.isArray(n)?fh(n):n)))}function u0(t){return t.filter((n=>n!==void 0))}function Tc(t){return t&&typeof t=="object"}function Pr(t){return t&&typeof t=="function"}function of(t){if(Zu(t)){const{op:n}=t;return n==="add"||n==="remove"||n==="replace"}return!1}function Yu(t){return of(t)||Zu(t)&&t.type==="mutation"}function Cl(t){return Yu(t)&&(t.op==="add"||t.op==="replace"||t.op==="merge"||t.op==="mergeDeep")}function Zu(t){return t&&typeof t=="object"}function Al(t,n){try{return Cc(t,n)}catch(i){return console.error(i),{}}}var Ha=function(t){return t&&t.Math===Math&&t},_i=Ha(typeof globalThis=="object"&&globalThis)||Ha(typeof window=="object"&&window)||Ha(typeof self=="object"&&self)||Ha(typeof Hm=="object"&&Hm)||Ha(!1)||(function(){return this})()||Function("return this")(),ta=function(t){try{return!!t()}catch{return!0}},lf=!ta((function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")})),d0=lf,Ol=Function.prototype,cf=Ol.apply,mh=Ol.call,uf=typeof Reflect=="object"&&Reflect.apply||(d0?mh.bind(cf):function(){return mh.apply(cf,arguments)}),_c=lf,df=Function.prototype,Ju=df.call,hf=_c&&df.bind.bind(Ju,Ju),na=_c?hf:function(t){return function(){return Ju.apply(t,arguments)}},wy=na,$c=wy({}.toString),Nc=wy("".slice),pf=function(t){return Nc($c(t),8,-1)},h0=pf,Wu=na,Dc=function(t){if(h0(t)==="Function")return Wu(t)},Qu=typeof document=="object"&&document.all,Ts=Qu===void 0&&Qu!==void 0?function(t){return typeof t=="function"||t===Qu}:function(t){return typeof t=="function"},ed={},Co=!ta((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),Pc=lf,gh=Function.prototype.call,fi=Pc?gh.bind(gh):function(){return gh.apply(gh,arguments)},ff={},mf={}.propertyIsEnumerable,Ao=Object.getOwnPropertyDescriptor,kl=Ao&&!mf.call({1:2},1);ff.f=kl?function(t){var n=Ao(this,t);return!!n&&n.enumerable}:mf;var ra,td,Mc=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},yh=ta,vh=pf,gf=Object,p0=na("".split),nd=yh((function(){return!gf("z").propertyIsEnumerable(0)}))?function(t){return vh(t)==="String"?p0(t,""):gf(t)}:gf,rd=function(t){return t==null},f0=rd,Sy=TypeError,sd=function(t){if(f0(t))throw new Sy("Can't call method on "+t);return t},$i=nd,sa=sd,ia=function(t){return $i(sa(t))},Ey=Ts,ka=function(t){return typeof t=="object"?t!==null:Ey(t)},Ga={},Fs=Ga,jr=_i,yf=Ts,Xa=function(t){return yf(t)?t:void 0},rn=function(t,n){return arguments.length<2?Xa(Fs[t])||Xa(jr[t]):Fs[t]&&Fs[t][n]||jr[t]&&jr[t][n]},Vn=na({}.isPrototypeOf),Mr=_i.navigator,xh=Mr&&Mr.userAgent,Ic=_i,Oo=xh?String(xh):"",bh=Ic.process,id=Ic.Deno,zc=bh&&bh.versions||id&&id.version,m0=zc&&zc.v8;m0&&(td=(ra=m0.split("."))[0]>0&&ra[0]<4?1:+(ra[0]+ra[1])),!td&&Oo&&(!(ra=Oo.match(/Edge\/(\d+)/))||ra[1]>=74)&&(ra=Oo.match(/Chrome\/(\d+)/))&&(td=+ra[1]);var Cr=td,jy=ta,Cy=_i.String,Ay=!!Object.getOwnPropertySymbols&&!jy((function(){var t=Symbol("symbol detection");return!Cy(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Cr&&Cr<41})),Oy=Ay&&!Symbol.sham&&typeof Symbol.iterator=="symbol",EA=rn,ky=Ts,Ry=Vn,Ty=Object,_s=Oy?function(t){return typeof t=="symbol"}:function(t){var n=EA("Symbol");return ky(n)&&Ry(n.prototype,Ty(t))},Ir=String,ad=function(t){try{return Ir(t)}catch{return"Object"}},wh=Ts,vf=ad,_y=TypeError,aa=function(t){if(wh(t))return t;throw new _y(vf(t)+" is not a function")},xf=aa,$y=rd,Sh=function(t,n){var i=t[n];return $y(i)?void 0:xf(i)},Ny=fi,Dy=Ts,Py=ka,g0=TypeError,My={exports:{}},Iy=_i,zy=Object.defineProperty,y0=_i,v0=My.exports=y0.o||(function(t,n){try{zy(Iy,t,{value:n,configurable:!0,writable:!0})}catch{Iy[t]=n}return n})("__core-js_shared__",{});(v0.versions||(v0.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Ly=My.exports,Fy=Ly,qy=function(t,n){return Fy[t]||(Fy[t]=n||{})},By=sd,x0=Object,Uy=function(t){return x0(By(t))},b0=Uy,w0=na({}.hasOwnProperty),Ya=Object.hasOwn||function(t,n){return w0(b0(t),n)},jA=na,S0=0,od=Math.random(),E0=jA(1 .toString),Eh=function(t){return"Symbol("+(t===void 0?"":t)+")_"+E0(++S0+od,36)},bf=qy,Ky=Ya,Vy=Eh,CA=Ay,j0=Oy,Lc=_i.Symbol,wf=bf("wks"),C0=j0?Lc.for||Lc:Lc&&Lc.withoutSetter||Vy,Za=function(t){return Ky(wf,t)||(wf[t]=CA&&Ky(Lc,t)?Lc[t]:C0("Symbol."+t)),wf[t]},Hy=fi,Gy=ka,Xy=_s,Yy=Sh,A0=TypeError,O0=Za("toPrimitive"),AA=function(t,n){if(!Gy(t)||Xy(t))return t;var i,l=Yy(t,O0);if(l){if(i=Hy(l,t,n),!Gy(i)||Xy(i))return i;throw new A0("Can't convert object to primitive value")}return(function(p,v){var x,S;if(Dy(x=p.toString)&&!Py(S=Ny(x,p))||Dy(x=p.valueOf)&&!Py(S=Ny(x,p)))return S;throw new g0("Can't convert object to primitive value")})(t)},Zy=_s,Jy=function(t){var n=AA(t,"string");return Zy(n)?n:n+""},Wy=ka,jh=_i.document,k0=Wy(jh)&&Wy(jh.createElement),Qy=function(t){return k0?jh.createElement(t):{}},OA=Qy,R0=!Co&&!ta((function(){return Object.defineProperty(OA("div"),"a",{get:function(){return 7}}).a!==7})),T0=Co,Ch=fi,ev=ff,Sf=Mc,_0=ia,$0=Jy,Ah=Ya,N0=R0,Ef=Object.getOwnPropertyDescriptor;ed.f=T0?Ef:function(t,n){if(t=_0(t),n=$0(n),N0)try{return Ef(t,n)}catch{}if(Ah(t,n))return Sf(!Ch(ev.f,t,n),t[n])};var D0=ta,tv=Ts,nv=/#|\.prototype\./,ld=function(t,n){var i=Fc[P0(t)];return i===I0||i!==M0&&(tv(n)?D0(n):!!n)},P0=ld.normalize=function(t){return String(t).replace(nv,".").toLowerCase()},Fc=ld.data={},M0=ld.NATIVE="N",I0=ld.POLYFILL="P",z0=ld,jf=aa,L0=lf,rv=Dc(Dc.bind),sv=function(t,n){return jf(t),n===void 0?t:L0?rv(t,n):function(){return t.apply(n,arguments)}},Rl={},F0=Co&&ta((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42})),iv=ka,Br=String,bs=TypeError,Tl=function(t){if(iv(t))return t;throw new bs(Br(t)+" is not an object")},q0=Co,B0=R0,U0=F0,_l=Tl,av=Jy,Cf=TypeError,Af=Object.defineProperty,kA=Object.getOwnPropertyDescriptor;Rl.f=q0?U0?function(t,n,i){if(_l(t),n=av(n),_l(i),typeof t=="function"&&n==="prototype"&&"value"in i&&"writable"in i&&!i.writable){var l=kA(t,n);l&&l.writable&&(t[n]=i.value,i={configurable:"configurable"in i?i.configurable:l.configurable,enumerable:"enumerable"in i?i.enumerable:l.enumerable,writable:!1})}return Af(t,n,i)}:Af:function(t,n,i){if(_l(t),n=av(n),_l(i),B0)try{return Af(t,n,i)}catch{}if("get"in i||"set"in i)throw new Cf("Accessors not supported");return"value"in i&&(t[n]=i.value),t};var Of=Rl,ov=Mc,ko=Co?function(t,n,i){return Of.f(t,n,ov(1,i))}:function(t,n,i){return t[n]=i,t},cd=_i,K0=uf,lv=Dc,cv=Ts,uv=ed.f,V0=z0,$l=Ga,kf=sv,Nl=ko,dv=Ya,hv=function(t){var n=function(i,l,p){if(this instanceof n){switch(arguments.length){case 0:return new t;case 1:return new t(i);case 2:return new t(i,l)}return new t(i,l,p)}return K0(t,this,arguments)};return n.prototype=t.prototype,n},Oh=function(t,n){var i,l,p,v,x,S,C,N,D,$=t.target,L=t.global,U=t.stat,J=t.proto,Y=L?cd:U?cd[$]:cd[$]&&cd[$].prototype,Z=L?$l:$l[$]||Nl($l,$,{})[$],P=Z.prototype;for(v in n)l=!(i=V0(L?v:$+(U?".":"#")+v,t.forced))&&Y&&dv(Y,v),S=Z[v],l&&(C=t.dontCallGetSet?(D=uv(Y,v))&&D.value:Y[v]),x=l&&C?C:n[v],(i||J||typeof S!=typeof x)&&(N=t.bind&&l?kf(x,cd):t.wrap&&l?hv(x):J&&cv(x)?lv(x):x,(t.sham||x&&x.sham||S&&S.sham)&&Nl(N,"sham",!0),Nl(Z,v,N),J&&(dv($l,p=$+"Prototype")||Nl($l,p,{}),Nl($l[p],v,x),t.real&&P&&(i||!P[v])&&Nl(P,v,x)))},Ro=Eh,Rf=qy("keys"),pv=function(t){return Rf[t]||(Rf[t]=Ro(t))},H0=!ta((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),To=Ya,fv=Ts,G0=Uy,Tf=H0,ud=pv("IE_PROTO"),or=Object,RA=or.prototype,mv=Tf?or.getPrototypeOf:function(t){var n=G0(t);if(To(n,ud))return n[ud];var i=n.constructor;return fv(i)&&n instanceof i?i.prototype:n instanceof or?RA:null},X0=na,kh=aa,Dl=ka,Y0=String,Z0=TypeError,Rh=ka,Ja=sd,J0=function(t){if((function(n){return Dl(n)||n===null})(t))return t;throw new Z0("Can't set "+Y0(t)+" as a prototype")},Th=Object.setPrototypeOf||("__proto__"in{}?(function(){var t,n=!1,i={};try{(t=(function(l,p,v){try{return X0(kh(Object.getOwnPropertyDescriptor(l,p)[v]))}catch{}})(Object.prototype,"__proto__","set"))(i,[]),n=i instanceof Array}catch{}return function(l,p){return Ja(l),J0(p),Rh(l)&&(n?t(l,p):l.__proto__=p),l}})():void 0),gv={},yv=Math.ceil,vv=Math.floor,_f=Math.trunc||function(t){var n=+t;return(n>0?vv:yv)(n)},$f=function(t){var n=+t;return n!=n||n===0?0:_f(n)},_o=$f,Ur=Math.max,xv=Math.min,W0=$f,us=Math.min,Q0=function(t){return(function(n){var i=W0(n);return i>0?us(i,9007199254740991):0})(t.length)},eS=ia,tS=Q0,br=function(t){return function(n,i,l){var p=eS(n),v=tS(p);if(v===0)return!t&&-1;var x,S=(function(C,N){var D=_o(C);return D<0?Ur(D+N,0):xv(D,N)})(l,v);if(t&&i!=i){for(;v>S;)if((x=p[S++])!=x)return!0}else for(;v>S;S++)if((t||S in p)&&p[S]===i)return t||S||0;return!t&&-1}},mi={indexOf:br(!1)},Ra={},Nf=Ya,nS=ia,rS=mi.indexOf,TA=Ra,_h=na([].push),qs=function(t,n){var i,l=nS(t),p=0,v=[];for(i in l)!Nf(TA,i)&&Nf(l,i)&&_h(v,i);for(;n.length>p;)Nf(l,i=n[p++])&&(~rS(v,i)||_h(v,i));return v},Ni=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],sS=qs,gi=Ni.concat("length","prototype");gv.f=Object.getOwnPropertyNames||function(t){return sS(t,gi)};var bv={};bv.f=Object.getOwnPropertySymbols;var $o=rn,qc=gv,No=bv,wv=Tl,Sv=na([].concat),Ta=$o("Reflect","ownKeys")||function(t){var n=qc.f(wv(t)),i=No.f;return i?Sv(n,i(t)):n},Ev=Ya,dd=Ta,$h=ed,Nh=Rl,Bc=function(t,n,i){for(var l=dd(n),p=Nh.f,v=$h.f,x=0;x<l.length;x++){var S=l[x];Ev(t,S)||i&&Ev(i,S)||p(t,S,v(n,S))}},jv={},iS=qs,Dh=Ni,aS=Object.keys||function(t){return iS(t,Dh)},Df=Co,oS=F0,_A=Rl,$A=Tl,Hn=ia,lr=aS;jv.f=Df&&!oS?Object.defineProperties:function(t,n){$A(t);for(var i,l=Hn(n),p=lr(n),v=p.length,x=0;v>x;)_A.f(t,i=p[x++],l[i]);return t};var yn,kn=rn("document","documentElement"),Jn=Tl,Di=jv,Do=Ni,hd=Ra,Cv=kn,Po=Qy,Ar=pv("IE_PROTO"),Wa=function(){},Pl=function(t){return"<script>"+t+"<\/script>"},Pf=function(t){t.write(Pl("")),t.close();var n=t.parentWindow.Object;return t=null,n},$s=function(){try{yn=new ActiveXObject("htmlfile")}catch{}var t,n;$s=typeof document<"u"?document.domain&&yn?Pf(yn):((n=Po("iframe")).style.display="none",Cv.appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write(Pl("document.F=Object")),t.close(),t.F):Pf(yn);for(var i=Do.length;i--;)delete $s.prototype[Do[i]];return $s()};hd[Ar]=!0;var Ml=Object.create||function(t,n){var i;return t!==null?(Wa.prototype=Jn(t),i=new Wa,Wa.prototype=null,i[Ar]=t):i=$s(),n===void 0?i:Di.f(i,n)},Ph=ka,yi=ko,Mf=function(t,n){Ph(n)&&"cause"in n&&yi(t,"cause",n.cause)},Mh=Error,lS=na("".replace),If=String(new Mh("zxcasd").stack),Ih=/\n\s*at [^:]*:[^\n]*/,Il=Ih.test(If),Wr=Mc,zl=!ta((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",Wr(1,7)),t.stack!==7)})),pd=ko,Mo=zl,zf=Error.captureStackTrace,Lf=function(t,n,i,l){Mo&&(zf?zf(t,n):pd(t,"stack",(function(p,v){if(Il&&typeof p=="string"&&!Mh.prepareStackTrace)for(;v--;)p=lS(p,Ih,"");return p})(i,l)))},Uc={},zh=Uc,Av=Za("iterator"),Pi=Array.prototype,Ov={};Ov[Za("toStringTag")]="z";var Ns=String(Ov)==="[object z]",cS=Ns,uS=Ts,Ff=pf,Ll=Za("toStringTag"),qf=Object,kv=Ff((function(){return arguments})())==="Arguments",Fl=cS?Ff:function(t){var n,i,l;return t===void 0?"Undefined":t===null?"Null":typeof(i=(function(p,v){try{return p[v]}catch{}})(n=qf(t),Ll))=="string"?i:kv?Ff(n):(l=Ff(n))==="Object"&&uS(n.callee)?"Arguments":l},dS=Fl,Rv=Sh,hS=rd,pS=Uc,Bf=Za("iterator"),Uf=function(t){if(!hS(t))return Rv(t,Bf)||Rv(t,"@@iterator")||pS[dS(t)]},NA=fi,DA=aa,PA=Tl,fS=ad,mS=Uf,fd=TypeError,Kf=fi,Tv=Tl,gS=Sh,yS=sv,vS=fi,xS=Tl,bS=ad,Vf=Q0,_v=Vn,wS=Uf,Xn=function(t,n,i){var l,p;Tv(t);try{if(!(l=gS(t,"return"))){if(n==="throw")throw i;return i}l=Kf(l,t)}catch(v){p=!0,l=v}if(n==="throw")throw i;if(p)throw l;return Tv(l),i},$v=TypeError,Hf=function(t,n){this.stopped=t,this.result=n},Nv=Hf.prototype,MA=Fl,IA=String,Dv=function(t){if(MA(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return IA(t)},Gf=Dv,Kc=function(t,n){return t===void 0?arguments.length<2?"":n:Gf(t)},Pv=Oh,Xf=Vn,Mv=mv,_a=Th,Qa=Bc,md=Ml,Iv=ko,Yf=Mc,SS=Mf,ES=Lf,jS=function(t,n,i){var l,p,v,x,S,C,N,D=i&&i.that,$=!(!i||!i.AS_ENTRIES),L=!(!i||!i.IS_RECORD),U=!(!i||!i.IS_ITERATOR),J=!(!i||!i.INTERRUPTED),Y=yS(n,D),Z=function(re){return l&&Xn(l,"normal",re),new Hf(!0,re)},P=function(re){return $?(xS(re),J?Y(re[0],re[1],Z):Y(re[0],re[1])):J?Y(re,Z):Y(re)};if(L)l=t.iterator;else if(U)l=t;else{if(!(p=wS(t)))throw new $v(bS(t)+" is not iterable");if((function(re){return re!==void 0&&(zh.Array===re||Pi[Av]===re)})(p)){for(v=0,x=Vf(t);x>v;v++)if((S=P(t[v]))&&_v(Nv,S))return S;return new Hf(!1)}l=(function(re,le){var he=arguments.length<2?mS(re):le;if(DA(he))return PA(NA(he,re));throw new fd(fS(re)+" is not iterable")})(t,p)}for(C=L?t.next:l.next;!(N=vS(C,l)).done;){try{S=P(N.value)}catch(re){Xn(l,"throw",re)}if(typeof S=="object"&&S&&_v(Nv,S))return S}return new Hf(!1)},zA=Kc,zv=Za("toStringTag"),Lh=Error,CS=[].push,gd=function(t,n){var i,l=Xf(Fh,this);_a?i=_a(new Lh,l?Mv(this):Fh):(i=l?this:md(Fh),Iv(i,zv,"Error")),n!==void 0&&Iv(i,"message",zA(n)),ES(i,gd,i.stack,1),arguments.length>2&&SS(i,arguments[2]);var p=[];return jS(t,CS,{that:p}),Iv(i,"errors",p),i};_a?_a(gd,Lh):Qa(gd,Lh,{name:!0});var Fh=gd.prototype=md(Lh.prototype,{constructor:Yf(1,gd),message:Yf(1,""),name:Yf(1,"AggregateError")});Pv({global:!0},{AggregateError:gd});var Lv=Rl.f,LA=Ts,FA=ka,yd=Th,AS=rn,OS=ko,jn=Vn,Zf=Th,qh=Bc,Jf=function(t,n,i){i in t||Lv(t,i,{configurable:!0,get:function(){return n[i]},set:function(l){n[i]=l}})},kS=Kc,Fv=Mf,Bh=Lf,Wf=Co,RS=function(t,n,i,l){var p="stackTraceLimit",v=l?2:1,x=t.split("."),S=x[x.length-1],C=AS.apply(null,x);if(C){var N=C.prototype;if(!i)return C;var D=AS("Error"),$=n((function(L,U){var J=kS(l?U:L,void 0),Y=l?new C(L):new C;return J!==void 0&&OS(Y,"message",J),Bh(Y,$,Y.stack,2),this&&jn(N,this)&&(function(Z,P,re){var le,he;yd&&LA(le=P.constructor)&&le!==re&&FA(he=le.prototype)&&he!==re.prototype&&yd(Z,he)})(Y,this,$),arguments.length>v&&Fv(Y,arguments[v]),Y}));return $.prototype=N,S!=="Error"?Zf?Zf($,D):qh($,D,{name:!0}):Wf&&p in C&&(Jf($,C,p),Jf($,C,"prepareStackTrace")),qh($,C),$}},qv=Oh,eo=uf,TS=RS,Bv=_i.WebAssembly,Uh=new Error("e",{cause:7}).cause!==7,Mn=function(t,n){var i={};i[t]=TS(t,n,Uh),qv({global:!0,forced:Uh},i)},Kh=function(t,n){if(Bv&&Bv[t]){var i={};i[t]=TS("WebAssembly."+t,n,Uh),qv({target:"WebAssembly",stat:!0,forced:Uh},i)}};Mn("Error",(function(t){return function(n){return eo(t,this,arguments)}})),Mn("EvalError",(function(t){return function(n){return eo(t,this,arguments)}})),Mn("RangeError",(function(t){return function(n){return eo(t,this,arguments)}})),Mn("ReferenceError",(function(t){return function(n){return eo(t,this,arguments)}})),Mn("SyntaxError",(function(t){return function(n){return eo(t,this,arguments)}})),Mn("TypeError",(function(t){return function(n){return eo(t,this,arguments)}})),Mn("URIError",(function(t){return function(n){return eo(t,this,arguments)}})),Kh("CompileError",(function(t){return function(n){return eo(t,this,arguments)}})),Kh("LinkError",(function(t){return function(n){return eo(t,this,arguments)}})),Kh("RuntimeError",(function(t){return function(n){return eo(t,this,arguments)}}));var ws=Oh,qA=uf,Uv=ta,BA=RS,Qf=rn("AggregateError"),em=!Uv((function(){return Qf([1]).errors[0]!==1}))&&Uv((function(){return Qf([1],"AggregateError",{cause:7}).cause!==7}));ws({global:!0,forced:em},{AggregateError:BA("AggregateError",(function(t){return function(n,i){return qA(t,this,arguments)}}),em,!0)});var Vc,vd,Vh,Kv=Ts,tm=_i.WeakMap,UA=Kv(tm)&&/native code/.test(String(tm)),Vv=_i,KA=ka,_S=ko,Hv=Ya,Gv=Ly,ql=pv,$S=Ra,nm=Vv.TypeError,Xv=Vv.WeakMap;if(UA||Gv.state){var to=Gv.state||(Gv.state=new Xv);to.get=to.get,to.has=to.has,to.set=to.set,Vc=function(t,n){if(to.has(t))throw new nm("Object already initialized");return n.facade=t,to.set(t,n),n},vd=function(t){return to.get(t)||{}},Vh=function(t){return to.has(t)}}else{var xd=ql("state");$S[xd]=!0,Vc=function(t,n){if(Hv(t,xd))throw new nm("Object already initialized");return n.facade=t,_S(t,xd,n),n},vd=function(t){return Hv(t,xd)?t[xd]:{}},Vh=function(t){return Hv(t,xd)}}var Bl,rm,sm,NS={set:Vc,get:vd,has:Vh,enforce:function(t){return Vh(t)?vd(t):Vc(t,{})},getterFor:function(t){return function(n){var i;if(!KA(n)||(i=vd(n)).type!==t)throw new nm("Incompatible receiver, "+t+" required");return i}}},vi=Co,Yv=Ya,Zv=Function.prototype,DS=vi&&Object.getOwnPropertyDescriptor,Jv=Yv(Zv,"name"),Hh={PROPER:Jv&&(function(){}).name==="something",CONFIGURABLE:Jv&&(!vi||vi&&DS(Zv,"name").configurable)},oa=ko,Wv=function(t,n,i,l){return l&&l.enumerable?t[n]=i:oa(t,n,i),t},im=ta,Io=Ts,VA=ka,HA=Ml,Hc=mv,PS=Wv,Qv=Za("iterator"),MS=!1;[].keys&&("next"in(sm=[].keys())?(rm=Hc(Hc(sm)))!==Object.prototype&&(Bl=rm):MS=!0);var GA=!VA(Bl)||im((function(){var t={};return Bl[Qv].call(t)!==t}));Io((Bl=GA?{}:HA(Bl))[Qv])||PS(Bl,Qv,(function(){return this}));var IS={IteratorPrototype:Bl,BUGGY_SAFARI_ITERATORS:MS},XA=Fl,YA=Ns?{}.toString:function(){return"[object "+XA(this)+"]"},ZA=Ns,zS=Rl.f,bd=ko,Gh=Ya,LS=YA,FS=Za("toStringTag"),Ul=function(t,n,i,l){var p=i?t:t&&t.prototype;p&&(Gh(p,FS)||zS(p,FS,{configurable:!0,value:n}),l&&!ZA&&bd(p,"toString",LS))},Xh=IS.IteratorPrototype,qS=Ml,am=Mc,ex=Ul,tx=Uc,om=function(){return this},BS=Oh,US=fi,JA=mv,KS=Ul,VS=Wv,lm=Uc,WA=Hh.PROPER,Gc=IS.BUGGY_SAFARI_ITERATORS,wd=Za("iterator"),cm=function(){return this},HS=function(t,n,i,l,p,v,x){(function(P,re,le,he){var xe=re+" Iterator";P.prototype=qS(Xh,{next:am(1,le)}),ex(P,xe,!1,!0),tx[xe]=om})(i,n,l);var S,C,N,D=function(P){if(P===p&&Y)return Y;if(!Gc&&P&&P in U)return U[P];switch(P){case"keys":case"values":case"entries":return function(){return new i(this,P)}}return function(){return new i(this)}},$=n+" Iterator",L=!1,U=t.prototype,J=U[wd]||U["@@iterator"]||p&&U[p],Y=!Gc&&J||D(p),Z=n==="Array"&&U.entries||J;if(Z&&(S=JA(Z.call(new t)))!==Object.prototype&&S.next&&(KS(S,$,!0,!0),lm[$]=cm),WA&&p==="values"&&J&&J.name!=="values"&&(L=!0,Y=function(){return US(J,this)}),p)if(C={values:D("values"),keys:v?Y:D("keys"),entries:D("entries")},x)for(N in C)(Gc||L||!(N in U))&&VS(U,N,C[N]);else BS({target:n,proto:!0,forced:Gc||L},C);return x&&U[wd]!==Y&&VS(U,wd,Y,{}),lm[n]=Y,C},Sd=function(t,n){return{value:t,done:n}},QA=ia,nx=Uc,rx=NS;Rl.f;var GS=HS,Yh=Sd,sx=rx.set,XS=rx.getterFor("Array Iterator");GS(Array,"Array",(function(t,n){sx(this,{type:"Array Iterator",target:QA(t),index:0,kind:n})}),(function(){var t=XS(this),n=t.target,i=t.index++;if(!n||i>=n.length)return t.target=null,Yh(void 0,!0);switch(t.kind){case"keys":return Yh(i,!1);case"values":return Yh(n[i],!1)}return Yh([i,n[i]],!1)}),"values"),nx.Arguments=nx.Array;var um=na,dm=$f,eO=Dv,tO=sd,ix=um("".charAt),hm=um("".charCodeAt),pm=um("".slice),ax=function(t){return function(n,i){var l,p,v=eO(tO(n)),x=dm(i),S=v.length;return x<0||x>=S?t?"":void 0:(l=hm(v,x))<55296||l>56319||x+1===S||(p=hm(v,x+1))<56320||p>57343?t?ix(v,x):l:t?pm(v,x,x+2):p-56320+(l-55296<<10)+65536}},YS=ax(!0),ox=Dv,zo=NS,Kl=HS,Lo=Sd,Zh=zo.set,Jh=zo.getterFor("String Iterator");Kl(String,"String",(function(t){Zh(this,{type:"String Iterator",string:ox(t),index:0})}),(function(){var t,n=Jh(this),i=n.string,l=n.index;return l>=i.length?Lo(void 0,!0):(t=YS(i,l),n.index+=t.length,Lo(t,!1))}));var Vl=Ga.AggregateError,nO=_i,ZS=Ul,Ed=Uc;for(var lx in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})ZS(nO[lx],lx),Ed[lx]=Ed.Array;const JS=Ka(Vl);class fm extends JS{constructor(n,i,l){if(super(n,i,l),this.name=this.constructor.name,typeof i=="string"&&(this.message=i),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(i).stack,l!=null&&typeof l=="object"&&Object.hasOwn(l,"cause")&&!("cause"in this)){const{cause:p}=l;this.cause=p,p instanceof Error&&"stack"in p&&(this.stack=`${this.stack}
|
||
CAUSE: ${p.stack}`)}}}class wr extends Error{static[Symbol.hasInstance](n){return super[Symbol.hasInstance](n)||Function.prototype[Symbol.hasInstance].call(fm,n)}constructor(n,i){if(super(n,i),this.name=this.constructor.name,typeof n=="string"&&(this.message=n),typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(n).stack,i!=null&&typeof i=="object"&&Object.hasOwn(i,"cause")&&!("cause"in this)){const{cause:l}=i;this.cause=l,l instanceof Error&&"stack"in l&&(this.stack=`${this.stack}
|
||
CAUSE: ${l.stack}`)}}}class $a extends wr{constructor(n,i){if(super(n,i),i!=null&&typeof i=="object"){const{cause:l,...p}=i;Object.assign(this,p)}}}class Kr extends wr{}class jd extends Kr{}var mm=function(){return!1},xi=function(){return!0};function yr(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function qn(t){return function n(i){return arguments.length===0||yr(i)?n:t.apply(this,arguments)}}function en(t){return function n(i,l){switch(arguments.length){case 0:return n;case 1:return yr(i)?n:qn((function(p){return t(i,p)}));default:return yr(i)&&yr(l)?n:yr(i)?qn((function(p){return t(p,l)})):yr(l)?qn((function(p){return t(i,p)})):t(i,l)}}}function Wh(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(i){return n.apply(this,arguments)};case 2:return function(i,l){return n.apply(this,arguments)};case 3:return function(i,l,p){return n.apply(this,arguments)};case 4:return function(i,l,p,v){return n.apply(this,arguments)};case 5:return function(i,l,p,v,x){return n.apply(this,arguments)};case 6:return function(i,l,p,v,x,S){return n.apply(this,arguments)};case 7:return function(i,l,p,v,x,S,C){return n.apply(this,arguments)};case 8:return function(i,l,p,v,x,S,C,N){return n.apply(this,arguments)};case 9:return function(i,l,p,v,x,S,C,N,D){return n.apply(this,arguments)};case 10:return function(i,l,p,v,x,S,C,N,D,$){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function cx(t,n,i){return function(){for(var l=[],p=0,v=t,x=0,S=!1;x<n.length||p<arguments.length;){var C;x<n.length&&(!yr(n[x])||p>=arguments.length)?C=n[x]:(C=arguments[p],p+=1),l[x]=C,yr(C)?S=!0:v-=1,x+=1}return!S&&v<=0?i.apply(this,l):Wh(Math.max(0,v),cx(t,l,i))}}var Wn=en((function(t,n){return t===1?qn(n):Wh(t,cx(t,[],n))}));function a(t){return function n(i,l,p){switch(arguments.length){case 0:return n;case 1:return yr(i)?n:en((function(v,x){return t(i,v,x)}));case 2:return yr(i)&&yr(l)?n:yr(i)?en((function(v,x){return t(v,l,x)})):yr(l)?en((function(v,x){return t(i,v,x)})):qn((function(v){return t(i,l,v)}));default:return yr(i)&&yr(l)&&yr(p)?n:yr(i)&&yr(l)?en((function(v,x){return t(v,x,p)})):yr(i)&&yr(p)?en((function(v,x){return t(v,l,x)})):yr(l)&&yr(p)?en((function(v,x){return t(i,v,x)})):yr(i)?qn((function(v){return t(v,l,p)})):yr(l)?qn((function(v){return t(i,v,p)})):yr(p)?qn((function(v){return t(i,l,v)})):t(i,l,p)}}}const d=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function f(t,n,i){return function(){if(arguments.length===0)return i();var l=arguments[arguments.length-1];if(!d(l)){for(var p=0;p<t.length;){if(typeof l[t[p]]=="function")return l[t[p]].apply(l,Array.prototype.slice.call(arguments,0,-1));p+=1}if((function(v){return v!=null&&typeof v["@@transducer/step"]=="function"})(l))return n.apply(null,Array.prototype.slice.call(arguments,0,-1))(l)}return i.apply(this,arguments)}}function y(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}}const j=function(){return this.xf["@@transducer/init"]()},O=function(t){return this.xf["@@transducer/result"](t)};var B=(function(){function t(n,i){this.xf=i,this.f=n,this.all=!0}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=function(n){return this.all&&(n=this.xf["@@transducer/step"](n,!0)),this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){return this.f(i)||(this.all=!1,n=y(this.xf["@@transducer/step"](n,!1))),n},t})(),ee=en(f(["all"],(function(t){return function(n){return new B(t,n)}}),(function(t,n){for(var i=0;i<n.length;){if(!t(n[i]))return!1;i+=1}return!0})));function be(t){for(var n,i=[];!(n=t.next()).done;)i.push(n.value);return i}function Ue(t,n,i){for(var l=0,p=i.length;l<p;){if(t(n,i[l]))return!0;l+=1}return!1}function We(t,n){return Object.prototype.hasOwnProperty.call(n,t)}const rt=typeof Object.is=="function"?Object.is:function(t,n){return t===n?t!==0||1/t==1/n:t!=t&&n!=n};var Ve=Object.prototype.toString,Ye=(function(){return Ve.call(arguments)==="[object Arguments]"?function(t){return Ve.call(t)==="[object Arguments]"}:function(t){return We("callee",t)}})(),Pt=!{toString:null}.propertyIsEnumerable("toString"),Zt=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Qn=(function(){return arguments.propertyIsEnumerable("length")})(),De=function(t,n){for(var i=0;i<t.length;){if(t[i]===n)return!0;i+=1}return!1},Ce=qn(typeof Object.keys!="function"||Qn?(function(t){if(Object(t)!==t)return[];var n,i,l=[],p=Qn&&Ye(t);for(n in t)!We(n,t)||p&&n==="length"||(l[l.length]=n);if(Pt)for(i=Zt.length-1;i>=0;)We(n=Zt[i],t)&&!De(l,n)&&(l[l.length]=n),i-=1;return l}):(function(t){return Object(t)!==t?[]:Object.keys(t)})),Ie=qn((function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function nt(t,n,i,l){var p=be(t);function v(x,S){return Ht(x,S,i.slice(),l.slice())}return!Ue((function(x,S){return!Ue(v,S,x)}),be(n),p)}function Ht(t,n,i,l){if(rt(t,n))return!0;var p=Ie(t);if(p!==Ie(n))return!1;if(typeof t["fantasy-land/equals"]=="function"||typeof n["fantasy-land/equals"]=="function")return typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](n)&&typeof n["fantasy-land/equals"]=="function"&&n["fantasy-land/equals"](t);if(typeof t.equals=="function"||typeof n.equals=="function")return typeof t.equals=="function"&&t.equals(n)&&typeof n.equals=="function"&&n.equals(t);switch(p){case"Arguments":case"Array":case"Object":if(typeof t.constructor=="function"&&(function(D){var $=String(D).match(/^function (\w*)/);return $==null?"":$[1]})(t.constructor)==="Promise")return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!rt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!rt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var v=i.length-1;v>=0;){if(i[v]===t)return l[v]===n;v-=1}switch(p){case"Map":return t.size===n.size&&nt(t.entries(),n.entries(),i.concat([t]),l.concat([n]));case"Set":return t.size===n.size&&nt(t.values(),n.values(),i.concat([t]),l.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var x=Ce(t);if(x.length!==Ce(n).length)return!1;var S=i.concat([t]),C=l.concat([n]);for(v=x.length-1;v>=0;){var N=x[v];if(!We(N,n)||!Ht(n[N],t[N],S,C))return!1;v-=1}return!0}var vn=en((function(t,n){return Ht(t,n,[],[])}));function Mt(t,n){return(function(i,l,p){var v,x;if(typeof i.indexOf=="function")switch(typeof l){case"number":if(l===0){for(v=1/l;p<i.length;){if((x=i[p])===0&&1/x===v)return p;p+=1}return-1}if(l!=l){for(;p<i.length;){if(typeof(x=i[p])=="number"&&x!=x)return p;p+=1}return-1}return i.indexOf(l,p);case"string":case"boolean":case"function":case"undefined":return i.indexOf(l,p);case"object":if(l===null)return i.indexOf(l,p)}for(;p<i.length;){if(vn(i[p],l))return p;p+=1}return-1})(n,t,0)>=0}function an(t,n){for(var i=0,l=n.length,p=Array(l);i<l;)p[i]=t(n[i]),i+=1;return p}function En(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var Rn=function(t){return(t<10?"0":"")+t},Hl=typeof Date.prototype.toISOString=="function"?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Rn(t.getUTCMonth()+1)+"-"+Rn(t.getUTCDate())+"T"+Rn(t.getUTCHours())+":"+Rn(t.getUTCMinutes())+":"+Rn(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function WS(t){return function(){return!t.apply(this,arguments)}}function ux(t,n,i){for(var l=0,p=i.length;l<p;)n=t(n,i[l]),l+=1;return n}function QS(t){return Object.prototype.toString.call(t)==="[object Object]"}var DB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return this.f(i)?this.xf["@@transducer/step"](n,i):n},t})(),PB=en(f(["fantasy-land/filter","filter"],(function(t){return function(n){return new DB(t,n)}}),(function(t,n){return QS(n)?ux((function(i,l){return t(n[l])&&(i[l]=n[l]),i}),{},Ce(n)):(function(i,l){for(var p=0,v=l.length,x=[];p<v;)i(l[p])&&(x[x.length]=l[p]),p+=1;return x})(t,n)}))),MB=en((function(t,n){return PB(WS(t),n)}));function T$(t,n){var i=function(v){var x=n.concat([t]);return Mt(v,x)?"<Circular>":T$(v,x)},l=function(v,x){return an((function(S){return En(S)+": "+i(v[S])}),x.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+an(i,t).join(", ")+"))";case"[object Array]":return"["+an(i,t).concat(l(t,MB((function(v){return/^\d+$/.test(v)}),Ce(t)))).join(", ")+"]";case"[object Boolean]":return typeof t=="object"?"new Boolean("+i(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?i(NaN):En(Hl(t)))+")";case"[object Map]":return"new Map("+i(Array.from(t))+")";case"[object Null]":return"null";case"[object Number]":return typeof t=="object"?"new Number("+i(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object Set]":return"new Set("+i(Array.from(t).sort())+")";case"[object String]":return typeof t=="object"?"new String("+i(t.valueOf())+")":En(t);case"[object Undefined]":return"undefined";default:if(typeof t.toString=="function"){var p=t.toString();if(p!=="[object Object]")return p}return"{"+l(t,Ce(t)).join(", ")+"}"}}var gm=qn((function(t){return T$(t,[])})),rO=en((function(t,n){if(t===n)return n;function i(S,C){if(S>C!=C>S)return C>S?C:S}var l=i(t,n);if(l!==void 0)return l;var p=i(typeof t,typeof n);if(p!==void 0)return p===typeof t?t:n;var v=gm(t),x=i(v,gm(n));return x!==void 0&&x===v?t:n})),IB=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return this.xf["@@transducer/step"](n,this.f(i))},t})(),dx=en(f(["fantasy-land/map","map"],(function(t){return function(n){return new IB(t,n)}}),(function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return Wn(n.length,(function(){return t.call(this,n.apply(this,arguments))}));case"[object Object]":return ux((function(i,l){return i[l]=t(n[l]),i}),{},Ce(n));default:return an(t,n)}})));const e1=Number.isInteger||function(t){return(t|0)===t};function sO(t){return Object.prototype.toString.call(t)==="[object String]"}function t1(t,n){var i=t<0?n.length+t:t;return sO(n)?n.charAt(i):n[i]}var hx=en((function(t,n){if(n!=null)return e1(t)?t1(t,n):n[t]})),iO=en((function(t,n){return dx(hx(t),n)})),zB=qn((function(t){return!!d(t)||!!t&&typeof t=="object"&&!sO(t)&&(t.length===0||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),_$=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function $$(t,n,i){return function(l,p,v){if(zB(v))return t(l,p,v);if(v==null)return p;if(typeof v["fantasy-land/reduce"]=="function")return n(l,p,v,"fantasy-land/reduce");if(v[_$]!=null)return i(l,p,v[_$]());if(typeof v.next=="function")return i(l,p,v);if(typeof v.reduce=="function")return n(l,p,v,"reduce");throw new TypeError("reduce: list must be array or iterable")}}var n1=en((function(t,n){return Wh(t.length,(function(){return t.apply(n,arguments)}))})),aO=$$((function(t,n,i){for(var l=0,p=i.length;l<p;){if((n=t["@@transducer/step"](n,i[l]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}l+=1}return t["@@transducer/result"](n)}),(function(t,n,i,l){return t["@@transducer/result"](i[l](n1(t["@@transducer/step"],t),n))}),(function(t,n,i){for(var l=i.next();!l.done;){if((n=t["@@transducer/step"](n,l.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}l=i.next()}return t["@@transducer/result"](n)})),LB=(function(){function t(n){this.f=n}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(n){return n},t.prototype["@@transducer/step"]=function(n,i){return this.f(n,i)},t})();function N$(t){return new LB(t)}var Qh=a((function(t,n,i){return aO(typeof t=="function"?N$(t):t,n,i)})),FB=qn((function(t){return Wn(Qh(rO,0,iO("length",t)),(function(){for(var n=0,i=t.length;n<i;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0}))})),tn=qn((function(t){return function(){return t}})),qB=en((function(t,n){return t&&n})),BB=qn((function(t){return Wn(Qh(rO,0,iO("length",t)),(function(){for(var n=0,i=t.length;n<i;){if(t[n].apply(this,arguments))return!0;n+=1}return!1}))})),UB=$$(ux,(function(t,n,i,l){return i[l](t,n)}),(function(t,n,i){for(var l=i.next();!l.done;)n=t(n,l.value),l=i.next();return n})),KB=en((function(t,n){return typeof n["fantasy-land/ap"]=="function"?n["fantasy-land/ap"](t):typeof t.ap=="function"?t.ap(n):typeof t=="function"?function(i){return t(i)(n(i))}:UB((function(i,l){return(function(p,v){var x;v=v||[];var S=(p=p||[]).length,C=v.length,N=[];for(x=0;x<S;)N[N.length]=p[x],x+=1;for(x=0;x<C;)N[N.length]=v[x],x+=1;return N})(i,dx(l,n))}),[],t)})),VB=en((function(t,n){return t.apply(this,n)})),oO=qn((function(t){return Wn(t.length,t)})),r1=qn((function(t){return t==null})),HB=a((function t(n,i,l){if(n.length===0)return i;var p=n[0];if(n.length>1){var v=!r1(l)&&We(p,l)&&typeof l[p]=="object"?l[p]:e1(n[1])?[]:{};i=t(Array.prototype.slice.call(n,1),i,v)}return(function(x,S,C){if(e1(x)&&d(C)){var N=[].concat(C);return N[x]=S,N}var D={};for(var $ in C)D[$]=C[$];return D[x]=S,D})(p,i,l)}));function lO(t){var n=Object.prototype.toString.call(t);return n==="[object Function]"||n==="[object AsyncFunction]"||n==="[object GeneratorFunction]"||n==="[object AsyncGeneratorFunction]"}var GB=en((function(t,n){var i=Wn(t,n);return Wn(t,(function(){return ux(KB,dx(i,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),cO=qn((function(t){return GB(t.length,t)})),ep=en((function(t,n){return lO(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:cO(qB)(t,n)}));function D$(t){return new RegExp(t.source,t.flags?t.flags:(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":"")+(t.dotAll?"s":""))}function P$(t,n,i){if(i||(i=new XB),(function(p){var v=typeof p;return p==null||v!="object"&&v!="function"})(t))return t;var l=function(p){var v=i.get(t);if(v)return v;for(var x in i.set(t,p),t)Object.prototype.hasOwnProperty.call(t,x)&&(p[x]=t[x]);return p};switch(Ie(t)){case"Object":return l(Object.create(Object.getPrototypeOf(t)));case"Array":return l(Array(t.length));case"Date":return new Date(t.valueOf());case"RegExp":return D$(t);case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":return t.slice();default:return t}}var XB=(function(){function t(){this.map={},this.length=0}return t.prototype.set=function(n,i){var l=this.hash(n),p=this.map[l];p||(this.map[l]=p=[]),p.push([n,i]),this.length+=1},t.prototype.hash=function(n){var i=[];for(var l in n)i.push(Object.prototype.toString.call(n[l]));return i.join()},t.prototype.get=function(n){if(this.length<=180){for(var i in this.map)for(var l=this.map[i],p=0;p<l.length;p+=1)if((x=l[p])[0]===n)return x[1]}else{var v=this.hash(n);if(l=this.map[v])for(p=0;p<l.length;p+=1){var x;if((x=l[p])[0]===n)return x[1]}}},t})(),YB=qn((function(t){return function(n,i){return t(n,i)?-1:t(i,n)?1:0}})),px=cO(qn((function(t){return!t})));function ZB(t,n){return function(){return n.call(this,t.apply(this,arguments))}}function uO(t,n){return function(){var i=arguments.length;if(i===0)return n();var l=arguments[i-1];return d(l)||typeof l[t]!="function"?n.apply(this,arguments):l[t].apply(l,Array.prototype.slice.call(arguments,0,i-1))}}var fx=a(uO("slice",(function(t,n,i){return Array.prototype.slice.call(i,t,n)}))),M$=qn(uO("tail",fx(1,1/0)));function Bs(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return Wh(arguments[0].length,Qh(ZB,arguments[0],M$(arguments)))}var JB=qn((function(t){return t1(0,t)})),dO=qn((function(t){return t})),WB=en((function(t,n){return Wn(Qh(rO,0,iO("length",n)),(function(){var i=arguments,l=this;return t.apply(l,an((function(p){return p.apply(l,i)}),n))}))})),QB=(function(){function t(n,i,l,p){this.valueFn=n,this.valueAcc=i,this.keyFn=l,this.xf=p,this.inputs={}}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=function(n){var i;for(i in this.inputs)if(We(i,this.inputs)&&(n=this.xf["@@transducer/step"](n,this.inputs[i]))["@@transducer/reduced"]){n=n["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){var l=this.keyFn(i);return this.inputs[l]=this.inputs[l]||[l,P$(this.valueAcc)],this.inputs[l][1]=this.valueFn(this.inputs[l][1],i),n},t})(),eU=cx(4,[],f([],(function(t,n,i){return function(l){return new QB(t,n,i,l)}}),(function(t,n,i,l){var p=N$((function(v,x){var S=i(x),C=t(We(S,v)?v[S]:P$(n),x);return C&&C["@@transducer/reduced"]?y(v):(v[S]=C,v)}));return aO(p,{},l)}))),ym=en((function(t,n){return n==null||n!=n?t:n})),tU=(function(){function t(){this._nativeSet=typeof Set=="function"?new Set:null,this._items={}}return t.prototype.add=function(n){return!I$(n,!0,this)},t.prototype.has=function(n){return I$(n,!1,this)},t})();function I$(t,n,i){var l,p=typeof t;switch(p){case"string":case"number":return t===0&&1/t==-1/0?!!i._items["-0"]||(n&&(i._items["-0"]=!0),!1):i._nativeSet!==null?n?(l=i._nativeSet.size,i._nativeSet.add(t),i._nativeSet.size===l):i._nativeSet.has(t):p in i._items?t in i._items[p]||(n&&(i._items[p][t]=!0),!1):(n&&(i._items[p]={},i._items[p][t]=!0),!1);case"boolean":if(p in i._items){var v=t?1:0;return!!i._items[p][v]||(n&&(i._items[p][v]=!0),!1)}return n&&(i._items[p]=t?[!1,!0]:[!0,!1]),!1;case"function":return i._nativeSet!==null?n?(l=i._nativeSet.size,i._nativeSet.add(t),i._nativeSet.size===l):i._nativeSet.has(t):p in i._items?!!Mt(t,i._items[p])||(n&&i._items[p].push(t),!1):(n&&(i._items[p]=[t]),!1);case"undefined":return!!i._items[p]||(n&&(i._items[p]=!0),!1);case"object":if(t===null)return!!i._items.null||(n&&(i._items.null=!0),!1);default:return(p=Object.prototype.toString.call(t))in i._items?!!Mt(t,i._items[p])||(n&&i._items[p].push(t),!1):(n&&(i._items[p]=[t]),!1)}}var nU=en((function(t,n){for(var i=[],l=0,p=t.length,v=n.length,x=new tU,S=0;S<v;S+=1)x.add(n[S]);for(;l<p;)x.add(t[l])&&(i[i.length]=t[l]),l+=1;return i})),rU=(function(){function t(n,i){this.xf=i,this.n=n,this.i=0}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){this.i+=1;var l=this.n===0?n:this.xf["@@transducer/step"](n,i);return this.n>=0&&this.i>=this.n?y(l):l},t})(),sU=en(f(["take"],(function(t){return function(n){return new rU(t,n)}}),(function(t,n){return fx(0,t<0?1/0:t,n)}))),iU=(function(){function t(n,i){this.f=n,this.retained=[],this.xf=i}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=function(n){return this.retained=null,this.xf["@@transducer/result"](n)},t.prototype["@@transducer/step"]=function(n,i){return this.f(i)?this.retain(n,i):this.flush(n,i)},t.prototype.flush=function(n,i){return n=aO(this.xf,n,this.retained),this.retained=[],this.xf["@@transducer/step"](n,i)},t.prototype.retain=function(n,i){return this.retained.push(i),n},t})(),aU=en(f([],(function(t){return function(n){return new iU(t,n)}}),(function(t,n){for(var i=n.length-1;i>=0&&t(n[i]);)i-=1;return fx(0,i+1,n)}))),s1=qn((function(t){return t1(-1,t)})),oU=(function(){function t(n,i){this.xf=i,this.f=n}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){if(this.f){if(this.f(i))return n;this.f=null}return this.xf["@@transducer/step"](n,i)},t})(),lU=en(f(["dropWhile"],(function(t){return function(n){return new oU(t,n)}}),(function(t,n){for(var i=0,l=n.length;i<l&&t(n[i]);)i+=1;return fx(i,1/0,n)}))),cU=en((function(t,n){return t||n})),uU=en((function(t,n){return lO(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:cO(cU)(t,n)})),dU=qn((function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():d(t)?[]:sO(t)?"":QS(t)?{}:Ye(t)?(function(){return arguments})():(function(n){var i=Object.prototype.toString.call(n);return i==="[object Uint8ClampedArray]"||i==="[object Int8Array]"||i==="[object Uint8Array]"||i==="[object Int16Array]"||i==="[object Uint16Array]"||i==="[object Int32Array]"||i==="[object Uint32Array]"||i==="[object Float32Array]"||i==="[object Float64Array]"||i==="[object BigInt64Array]"||i==="[object BigUint64Array]"})(t)?t.constructor.from(""):void 0})),hU=qn((function(t){return Wn(t.length,(function(n,i){var l=Array.prototype.slice.call(arguments,0);return l[0]=i,l[1]=n,t.apply(this,l)}))})),pU=en(uO("groupBy",eU((function(t,n){return t.push(n),t}),[]))),fU=en((function(t,n){if(t.length===0||r1(n))return!1;for(var i=n,l=0;l<t.length;){if(r1(i)||!We(t[l],i))return!1;i=i[t[l]],l+=1}return!0})),z$=en((function(t,n){return fU([t],n)})),Xc=function(t,n){switch(arguments.length){case 0:return Xc;case 1:return function i(l){return arguments.length===0?i:rt(t,l)};default:return rt(t,n)}},hO=a((function(t,n,i){return Wn(Math.max(t.length,n.length,i.length),(function(){return t.apply(this,arguments)?n.apply(this,arguments):i.apply(this,arguments)}))})),mU=en(Mt),gU=fx(0,-1),pO=en((function(t,n){return Wn(t+1,(function(){var i=arguments[t];if(i!=null&&lO(i[n]))return i[n].apply(i,Array.prototype.slice.call(arguments,0,t));throw new TypeError(gm(i)+' does not have a method named "'+n+'"')}))})),mx=qn((function(t){return t!=null&&vn(t,dU(t))})),L$=qn((function(t){return!mx(t)})),F$=pO(1,"join");function q$(t){return Object.prototype.toString.call(t)==="[object Number]"}var yU=en((function(t,n){return function(i){return function(l){return dx((function(p){return n(p,l)}),i(t(l)))}}}));function fO(t,n){for(var i=n,l=0;l<t.length;l+=1){if(i==null)return;var p=t[l];i=e1(p)?t1(p,i):i[p]}return i}var vU=en((function(t,n){return ux((function(i,l){return i[l]=t(n[l],l,n),i}),{},Ce(n))})),xU=a((function(t,n,i){var l,p={};for(l in i=i||{},n=n||{})We(l,n)&&(p[l]=We(l,i)?t(l,n[l],i[l]):n[l]);for(l in i)We(l,i)&&!We(l,p)&&(p[l]=i[l]);return p})),bU=a((function t(n,i,l){return xU((function(p,v,x){return QS(v)&&QS(x)?t(n,v,x):n(p,v,x)}),i,l)})),mO=en((function(t,n){return bU((function(i,l,p){return p}),t,n)})),wU=en((function(t,n){return ee(WS(t),n)})),B$=function(t){return{value:t,map:function(n){return B$(n(t))}}},SU=a((function(t,n,i){return t((function(l){return B$(n(l))}))(i).value})),la=en(fO),U$=a((function(t,n,i){return ym(t,fO(n,i))})),i1=a((function(t,n,i){return t(fO(n,i))})),K$=en((function(t,n){for(var i={},l=0;l<t.length;)t[l]in n&&(i[t[l]]=n[t[l]]),l+=1;return i})),V$=a((function(t,n,i){return vn(t,hx(n,i))})),a1=a((function(t,n,i){return ym(t,hx(n,i))})),EU=a((function(t,n,i){return t(hx(n,i))})),jU=en((function(t,n){if(!q$(t)||!q$(n))throw new TypeError("Both arguments to range must be numbers");for(var i=Array(t<n?n-t:0),l=t<0?n+Math.abs(t):n-t,p=0;p<l;)i[p]=p+t,p+=1;return i})),CU=qn(y),vm=a((function(t,n,i){return i.replace(t,n)})),AU=en((function(t,n){return Array.prototype.slice.call(n,0).sort(t)})),gO=pO(1,"split"),H$=en((function(t,n){return vn(sU(t.length,n),t)})),OU=en((function(t,n){if(i=t,Object.prototype.toString.call(i)!=="[object RegExp]")throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+gm(t));var i;return D$(t).test(n)})),kU=(function(){function t(n,i){this.xf=i,this.pred=n,this.items=[]}return t.prototype["@@transducer/init"]=j,t.prototype["@@transducer/result"]=O,t.prototype["@@transducer/step"]=function(n,i){return Ue(this.pred,i,this.items)?n:(this.items.push(i),this.xf["@@transducer/step"](n,i))},t})(),RU=en(f([],(function(t){return function(n){return new kU(t,n)}}),(function(t,n){for(var i,l=0,p=n.length,v=[];l<p;)Ue(t,i=n[l],v)||(v[v.length]=i),l+=1;return v}))),TU=a((function(t,n,i){return t(i)?n(i):i})),o1=tn(void 0),Cd=vn(o1()),G$=px(Cd),X$=vn(null),Y$=px(X$),_U=px(r1),$U=Wn(1,Bs(Ie,Xc("GeneratorFunction"))),NU=Wn(1,Bs(Ie,Xc("AsyncFunction"))),Yc=BB([Bs(Ie,Xc("Function")),$U,NU]),Z$=Wn(1,Yc(Array.isArray)?Array.isArray:Bs(Ie,Xc("Array"))),DU=ep(Z$,mx),PU=ep(Z$,L$),tp=Wn(1,Bs(Ie,Xc("String"))),J$=vn("");function yO(t){return yO=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yO(t)}var W$=function(t){return yO(t)==="object"},MU=px(Wn(1,ep(Y$,uU(W$,Yc)))),vO=FB([tp,MU,L$]),IU=px(Yc),zU=Wn(1,ep(Y$,W$)),LU=Bs(Ie,Xc("Object")),FU=Bs(gm,vn(gm(Object))),qU=i1(ep(Yc,FU),["constructor"]),np=Wn(1,(function(t){if(!zU(t)||!LU(t))return!1;var n=Object.getPrototypeOf(t);return!!X$(n)||qU(n)})),BU=ep(Wn(1,Bs(Ie,Xc("Number"))),isFinite),UU=Wn(1,BU),KU=ep(Yc(Number.isFinite)?Wn(1,n1(Number.isFinite,Number)):UU,WB(vn,[Math.floor,dO])),VU=Wn(1,KU),HU=Yc(Number.isInteger)?Wn(1,n1(Number.isInteger,Number)):VU,GU=Wn(1,Bs(Ie,Xc("RegExp")));function xO(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,l=Array(n);i<n;i++)l[i]=t[i];return l}var Zc,Jc,XU=Bs(AU(YB((function(t,n){return t.length>n.length}))),JB,hx("length")),YU=oO((function(t,n,i){var l=i.apply(void 0,(function(p){return(function(v){if(Array.isArray(v))return xO(v)})(p)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(p)||(function(v,x){if(v){if(typeof v=="string")return xO(v,x);var S={}.toString.call(v).slice(8,-1);return S==="Object"&&v.constructor&&(S=v.constructor.name),S==="Map"||S==="Set"?Array.from(v):S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S)?xO(v,x):void 0}})(p)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(t));return _U(l)?CU(l):n})),Q$=hO(PU,(function(t){var n=XU(t);return Wn(n,(function(){for(var i=arguments.length,l=new Array(i),p=0;p<i;p++)l[p]=arguments[p];return Qh(YU(l),void 0,t)}))}),o1),l1=hU(mU),gx=Wn(3,(function(t,n,i){var l=la(t,i),p=la(gU(t),i);if(!IU(l)&&!DU(t)){var v=n1(l,p);return VB(v,n)}})),ZU=TU(tp,vm(/[.*+?^${}()|[\]\\-]/g,"\\$&")),eN=function(t,n){if(typeof t!="string"&&!(t instanceof String))throw TypeError("`".concat(n,"` must be a string"))},JU=Wn(3,(function(t,n,i){(function(p,v,x){if(x==null||p==null||v==null)throw TypeError("Input values must not be `null` or `undefined`")})(t,n,i),eN(i,"str"),eN(n,"replaceValue"),(function(p){if(!(typeof p=="string"||p instanceof String||p instanceof RegExp))throw TypeError("`searchValue` must be a string or an regexp")})(t);var l=new RegExp(GU(t)?t:ZU(t),"g");return vm(l,n,i)})),WU=pO(2,"replaceAll"),QU=Yc(String.prototype.replaceAll)?WU:JU,e8=oO((function(t,n){return Bs(gO(""),aU(l1(t)),F$(""))(n)})),bO=oO((function(t,n){return Bs(gO(""),lU(l1(t)),F$(""))(n)})),tN={exports:{}},Qr=tN.exports={};function wO(){throw new Error("setTimeout has not been defined")}function SO(){throw new Error("clearTimeout has not been defined")}function nN(t){if(Zc===setTimeout)return setTimeout(t,0);if((Zc===wO||!Zc)&&setTimeout)return Zc=setTimeout,setTimeout(t,0);try{return Zc(t,0)}catch{try{return Zc.call(null,t,0)}catch{return Zc.call(this,t,0)}}}(function(){try{Zc=typeof setTimeout=="function"?setTimeout:wO}catch{Zc=wO}try{Jc=typeof clearTimeout=="function"?clearTimeout:SO}catch{Jc=SO}})();var rp,Wc=[],xm=!1,c1=-1;function t8(){xm&&rp&&(xm=!1,rp.length?Wc=rp.concat(Wc):c1=-1,Wc.length&&rN())}function rN(){if(!xm){var t=nN(t8);xm=!0;for(var n=Wc.length;n;){for(rp=Wc,Wc=[];++c1<n;)rp&&rp[c1].run();c1=-1,n=Wc.length}rp=null,xm=!1,(function(i){if(Jc===clearTimeout)return clearTimeout(i);if((Jc===SO||!Jc)&&clearTimeout)return Jc=clearTimeout,clearTimeout(i);try{Jc(i)}catch{try{return Jc.call(null,i)}catch{return Jc.call(this,i)}}})(t)}}function sN(t,n){this.fun=t,this.array=n}function Qc(){}Qr.nextTick=function(t){var n=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)n[i-1]=arguments[i];Wc.push(new sN(t,n)),Wc.length!==1||xm||nN(rN)},sN.prototype.run=function(){this.fun.apply(null,this.array)},Qr.title="browser",Qr.browser=!0,Qr.env={},Qr.argv=[],Qr.version="",Qr.versions={},Qr.on=Qc,Qr.addListener=Qc,Qr.once=Qc,Qr.off=Qc,Qr.removeListener=Qc,Qr.removeAllListeners=Qc,Qr.emit=Qc,Qr.prependListener=Qc,Qr.prependOnceListener=Qc,Qr.listeners=function(t){return[]},Qr.binding=function(t){throw new Error("process.binding is not supported")},Qr.cwd=function(){return"/"},Qr.chdir=function(t){throw new Error("process.chdir is not supported")},Qr.umask=function(){return 0};const u1=Ka(tN.exports),EO=()=>i1(OU(/^win/),["platform"],u1),d1=t=>{try{const n=new URL(t);return e8(":",n.protocol)}catch{return}},n8=Bs(d1,G$),iN=t=>{const n=t.lastIndexOf(".");return n>=0?t.substring(n).toLowerCase():""},jO=t=>{if(u1.browser)return!1;const n=d1(t);return Cd(n)||n==="file"||/^[a-zA-Z]$/.test(n)},h1=t=>{const n=d1(t);return n==="http"||n==="https"},CO=(t,n)=>{const i=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"],l=a1(!1,"keepFileProtocol",n),p=a1(EO,"isWindows",n);let v=decodeURI(t);for(let S=0;S<i.length;S+=2)v=v.replace(i[S],i[S+1]);let x=v.substring(0,7).toLowerCase()==="file://";return x&&(v=v[7]==="/"?v.substring(8):v.substring(7),p()&&v[1]==="/"&&(v=`${v[0]}:${v.substring(1)}`),l?v=`file:///${v}`:(x=!1,v=p()?v:`/${v}`)),p()&&!x&&(v=QU("/","\\",v),v.substring(1,3)===":\\"&&(v=v[0].toUpperCase()+v.substring(1))),v},aN=t=>{const n=[/\?/g,"%3F",/#/g,"%23"];let i=t;EO()&&(i=i.replace(/\\/g,"/")),i=encodeURI(i);for(let l=0;l<n.length;l+=2)i=i.replace(n[l],n[l+1]);return i},AO=t=>{const n=t.indexOf("#");return n!==-1?t.substring(n):"#"},cr=t=>{const n=t.indexOf("#");let i=t;return n>=0&&(i=t.substring(0,n)),i},p1=()=>{if(u1.browser)return cr(globalThis.location.href);const t=u1.cwd(),n=s1(t);return["/","\\"].includes(n)?t:t+(EO()?"\\":"/")},Ds=(t,n)=>{const i=new URL(n,new URL(t,"resolve://"));if(i.protocol==="resolve:"){const{pathname:l,search:p,hash:v}=i;return l+p+v}return i.toString()},yx=t=>{if(jO(t))return aN(CO(t));try{return new URL(t).toString()}catch{return encodeURI(decodeURI(t)).replace(/%5B/g,"[").replace(/%5D/g,"]")}},Fo=t=>jO(t)?CO(t):decodeURI(t),r8=Object.freeze(Object.defineProperty({__proto__:null,cwd:p1,fromFileSystemPath:aN,getExtension:iN,getHash:AO,getProtocol:d1,hasProtocol:n8,isFileSystemPath:jO,isHttpUrl:h1,isURI:t=>{try{return new URL(t)&&!0}catch{return!1}},resolve:Ds,sanitize:yx,stripHash:cr,toFileSystemPath:CO,unsanitize:Fo},Symbol.toStringTag,{value:"Module"}));let vx=class{uri;mediaType;data;parseResult;constructor({uri:t,mediaType:n="text/plain",data:i,parseResult:l}){this.uri=t,this.mediaType=n,this.data=i,this.parseResult=l}get extension(){return tp(this.uri)?iN(this.uri):""}toString(){return typeof this.data=="string"?this.data:this.data instanceof ArrayBuffer||["ArrayBuffer"].includes(Ie(this.data))||ArrayBuffer.isView(this.data)?new TextDecoder("utf-8").decode(this.data):String(this.data)}};class bm{rootRef;refs;circular;constructor({refs:n=[],circular:i=!1}={}){this.refs=[],this.circular=i,n.forEach(this.add.bind(this))}get size(){return this.refs.length}add(n){return this.has(n)||(this.refs.push(n),this.rootRef=this.rootRef===void 0?n:this.rootRef,n.refSet=this),this}merge(n){for(const i of n.values())this.add(i);return this}has(n){const i=tp(n)?n:n.uri;return G$(this.find((l=>l.uri===i)))}find(n){return this.refs.find(n)}*values(){yield*this.refs}clean(){this.refs.forEach((n=>{n.refSet=void 0})),this.rootRef=void 0,this.refs.length=0}}const oN={parse:{mediaType:"text/plain",parsers:[],parserOpts:{}},resolve:{baseURI:"",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:"ignore",circularReplacer:dO,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}},s8=yU(la(["resolve","baseURI"]),HB(["resolve","baseURI"])),i8=t=>J$(t)?p1():t,lN=(t,n)=>{const i=mO(t,n);return SU(s8,i8,i)};class a8 extends wr{plugin;constructor(n,i){super(n,{cause:i.cause}),this.plugin=i.plugin}}const OO=async(t,n,i)=>{const l=await Promise.all(i.map(gx([t],n)));return i.filter(((p,v)=>l[v]))},kO=async(t,n,i)=>{let l;for(const p of i)try{const v=await p[t].call(p,...n);return{plugin:p,result:v}}catch(v){l=new a8("Error while running plugin",{cause:v,plugin:p})}return Promise.reject(l)};class RO extends wr{}class TO extends wr{}class cN extends TO{}class uN extends cN{}var dN=typeof Hm=="object"&&Hm&&Hm.Object===Object&&Hm,o8=dN,l8=typeof self=="object"&&self&&self.Object===Object&&self,eu=o8||l8||Function("return this")(),xx=eu.Symbol,hN=xx,pN=Object.prototype,c8=pN.hasOwnProperty,u8=pN.toString,bx=hN?hN.toStringTag:void 0,d8=Object.prototype.toString,h8=function(t){var n=c8.call(t,bx),i=t[bx];try{t[bx]=void 0;var l=!0}catch{}var p=u8.call(t);return l&&(n?t[bx]=i:delete t[bx]),p},fN=xx?xx.toStringTag:void 0,sp=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":fN&&fN in Object(t)?h8(t):(function(n){return d8.call(n)})(t)},f1=Array.isArray,ip=function(t){return t!=null&&typeof t=="object"},p8=sp,f8=f1,m8=ip,g8=sp,y8=ip,v8=sp,x8=ip,m1=function(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")},mN=function(t,n){return t===n||t!=t&&n!=n},b8=mN,g1=function(t,n){for(var i=t.length;i--;)if(b8(t[i][0],n))return i;return-1},w8=g1,S8=Array.prototype.splice,E8=g1,j8=g1,C8=g1,A8=function(){this.u=[],this.size=0},O8=function(t){var n=this.u,i=w8(n,t);return!(i<0||(i==n.length-1?n.pop():S8.call(n,i,1),--this.size,0))},k8=function(t){var n=this.u,i=E8(n,t);return i<0?void 0:n[i][1]},R8=function(t,n){var i=this.u,l=C8(i,t);return l<0?(++this.size,i.push([t,n])):i[l][1]=n,this};function wm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}wm.prototype.clear=A8,wm.prototype.delete=O8,wm.prototype.get=k8,wm.prototype.has=function(t){return j8(this.u,t)>-1},wm.prototype.set=R8;var y1=wm,T8=y1,_8=sp,$8=m1,gN=function(t){if(!$8(t))return!1;var n=_8(t);return n=="[object Function]"||n=="[object GeneratorFunction]"||n=="[object AsyncFunction]"||n=="[object Proxy]"},_O=eu.o,yN=(function(){var t=/[^.]+$/.exec(_O&&_O.keys&&_O.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})(),N8=Function.prototype.toString,vN=function(t){if(t!=null){try{return N8.call(t)}catch{}try{return t+""}catch{}}return""},D8=gN,P8=function(t){return!!yN&&yN in t},M8=m1,I8=vN,z8=/^\[object .+?Constructor\]$/,L8=Function.prototype,F8=Object.prototype,q8=L8.toString,B8=F8.hasOwnProperty,U8=RegExp("^"+q8.call(B8).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Sm=function(t,n){var i=(function(l,p){return l?.[p]})(t,n);return(function(l){return!(!M8(l)||P8(l))&&(D8(l)?U8:z8).test(I8(l))})(i)?i:void 0},$O=Sm(eu,"Map"),v1=Sm(Object,"create"),xN=v1,K8=v1,V8=Object.prototype.hasOwnProperty,H8=v1,G8=Object.prototype.hasOwnProperty,X8=v1,Y8=function(){this.u=xN?xN(null):{},this.size=0},Z8=function(t){var n=this.has(t)&&delete this.u[t];return this.size-=n?1:0,n},J8=function(t){var n=this.u;if(K8){var i=n[t];return i==="__lodash_hash_undefined__"?void 0:i}return V8.call(n,t)?n[t]:void 0},W8=function(t){var n=this.u;return H8?n[t]!==void 0:G8.call(n,t)},Q8=function(t,n){var i=this.u;return this.size+=this.has(t)?0:1,i[t]=X8&&n===void 0?"__lodash_hash_undefined__":n,this};function Em(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}Em.prototype.clear=Y8,Em.prototype.delete=Z8,Em.prototype.get=J8,Em.prototype.has=W8,Em.prototype.set=Q8;var bN=Em,eK=y1,tK=$O,nK=function(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null},x1=function(t,n){var i=t.u;return nK(n)?i[typeof n=="string"?"string":"hash"]:i.map},rK=x1,sK=x1,iK=x1,aK=x1,oK=function(t,n){var i=aK(this,t),l=i.size;return i.set(t,n),this.size+=i.size==l?0:1,this};function jm(t){var n=-1,i=t==null?0:t.length;for(this.clear();++n<i;){var l=t[n];this.set(l[0],l[1])}}jm.prototype.clear=function(){this.size=0,this.u={hash:new bN,map:new(tK||eK),string:new bN}},jm.prototype.delete=function(t){var n=rK(this,t).delete(t);return this.size-=n?1:0,n},jm.prototype.get=function(t){return sK(this,t).get(t)},jm.prototype.has=function(t){return iK(this,t).has(t)},jm.prototype.set=oK;var wN=jm,lK=y1,cK=$O,uK=wN,dK=y1,hK=function(){this.u=new T8,this.size=0},pK=function(t){var n=this.u,i=n.delete(t);return this.size=n.size,i},fK=function(t){return this.u.get(t)},mK=function(t){return this.u.has(t)},gK=function(t,n){var i=this.u;if(i instanceof lK){var l=i.u;if(!cK||l.length<199)return l.push([t,n]),this.size=++i.size,this;i=this.u=new uK(l)}return i.set(t,n),this.size=i.size,this};function Cm(t){var n=this.u=new dK(t);this.size=n.size}Cm.prototype.clear=hK,Cm.prototype.delete=pK,Cm.prototype.get=fK,Cm.prototype.has=mK,Cm.prototype.set=gK;var yK=Cm,vK=wN;function b1(t){var n=-1,i=t==null?0:t.length;for(this.u=new vK;++n<i;)this.add(t[n])}b1.prototype.add=b1.prototype.push=function(t){return this.u.set(t,"__lodash_hash_undefined__"),this},b1.prototype.has=function(t){return this.u.has(t)};var xK=b1,bK=function(t,n){for(var i=-1,l=t==null?0:t.length;++i<l;)if(n(t[i],i,t))return!0;return!1},wK=function(t,n){return t.has(n)},SN=function(t,n,i,l,p,v){var x=1&i,S=t.length,C=n.length;if(S!=C&&!(x&&C>S))return!1;var N=v.get(t),D=v.get(n);if(N&&D)return N==n&&D==t;var $=-1,L=!0,U=2&i?new xK:void 0;for(v.set(t,n),v.set(n,t);++$<S;){var J=t[$],Y=n[$];if(l)var Z=x?l(Y,J,$,n,t,v):l(J,Y,$,t,n,v);if(Z!==void 0){if(Z)continue;L=!1;break}if(U){if(!bK(n,(function(P,re){if(!wK(U,re)&&(J===P||p(J,P,i,l,v)))return U.push(re)}))){L=!1;break}}else if(J!==Y&&!p(J,Y,i,l,v)){L=!1;break}}return v.delete(t),v.delete(n),L},EN=eu.Uint8Array,SK=mN,EK=SN,jK=function(t){var n=-1,i=Array(t.size);return t.forEach((function(l,p){i[++n]=[p,l]})),i},CK=function(t){var n=-1,i=Array(t.size);return t.forEach((function(l){i[++n]=l})),i},jN=xx?xx.prototype:void 0,NO=jN?jN.valueOf:void 0,AK=function(t,n){for(var i=-1,l=n.length,p=t.length;++i<l;)t[p+i]=n[i];return t},OK=f1,kK=function(t,n){for(var i=-1,l=t==null?0:t.length,p=0,v=[];++i<l;){var x=t[i];n(x,i,t)&&(v[p++]=x)}return v},RK=Object.prototype.propertyIsEnumerable,CN=Object.getOwnPropertySymbols,TK=CN?function(t){return t==null?[]:(t=Object(t),kK(CN(t),(function(n){return RK.call(t,n)})))}:function(){return[]},_K=sp,$K=ip,AN=function(t){return $K(t)&&_K(t)=="[object Arguments]"},NK=ip,ON=Object.prototype,DK=ON.hasOwnProperty,PK=ON.propertyIsEnumerable,MK=AN((function(){return arguments})())?AN:function(t){return NK(t)&&DK.call(t,"callee")&&!PK.call(t,"callee")},DO={exports:{}},IK=function(){return!1};(function(t,n){var i=eu,l=IK,p=n&&!n.nodeType&&n,v=p&&t&&!t.nodeType&&t,x=v&&v.exports===p?i.Buffer:void 0,S=(x?x.isBuffer:void 0)||l;t.exports=S})(DO,DO.exports);var kN=DO.exports,zK=/^(?:0|[1-9]\d*)$/,RN=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991},LK=sp,FK=RN,qK=ip,Or={};Or["[object Float32Array]"]=Or["[object Float64Array]"]=Or["[object Int8Array]"]=Or["[object Int16Array]"]=Or["[object Int32Array]"]=Or["[object Uint8Array]"]=Or["[object Uint8ClampedArray]"]=Or["[object Uint16Array]"]=Or["[object Uint32Array]"]=!0,Or["[object Arguments]"]=Or["[object Array]"]=Or["[object ArrayBuffer]"]=Or["[object Boolean]"]=Or["[object DataView]"]=Or["[object Date]"]=Or["[object Error]"]=Or["[object Function]"]=Or["[object Map]"]=Or["[object Number]"]=Or["[object Object]"]=Or["[object RegExp]"]=Or["[object Set]"]=Or["[object String]"]=Or["[object WeakMap]"]=!1;var PO={exports:{}};(function(t,n){var i=dN,l=n&&!n.nodeType&&n,p=l&&t&&!t.nodeType&&t,v=p&&p.exports===l&&i.process,x=(function(){try{return p&&p.require&&p.require("util").types||v&&v.binding&&v.binding("util")}catch{}})();t.exports=x})(PO,PO.exports);var TN=PO.exports,BK=function(t){return qK(t)&&FK(t.length)&&!!Or[LK(t)]},UK=function(t){return function(n){return t(n)}},_N=TN&&TN.isTypedArray,$N=_N?UK(_N):BK,KK=function(t,n){for(var i=-1,l=Array(t);++i<t;)l[i]=n(i);return l},VK=MK,HK=f1,GK=kN,XK=function(t,n){var i=typeof t;return!!(n=n??9007199254740991)&&(i=="number"||i!="symbol"&&zK.test(t))&&t>-1&&t%1==0&&t<n},YK=$N,ZK=Object.prototype.hasOwnProperty,JK=Object.prototype,WK=(function(t,n){return function(i){return t(n(i))}})(Object.keys,Object),QK=function(t){var n=t&&t.constructor;return t===(typeof n=="function"&&n.prototype||JK)},eV=WK,tV=Object.prototype.hasOwnProperty,nV=gN,rV=RN,sV=function(t,n){var i=HK(t),l=!i&&VK(t),p=!i&&!l&&GK(t),v=!i&&!l&&!p&&YK(t),x=i||l||p||v,S=x?KK(t.length,String):[],C=S.length;for(var N in t)!ZK.call(t,N)||x&&(N=="length"||p&&(N=="offset"||N=="parent")||v&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||XK(N,C))||S.push(N);return S},iV=function(t,n,i){var l=n(t);return OK(t)?l:AK(l,i(t))},aV=TK,oV=function(t){return(function(n){return n!=null&&rV(n.length)&&!nV(n)})(t)?sV(t):(function(n){if(!QK(n))return eV(n);var i=[];for(var l in Object(n))tV.call(n,l)&&l!="constructor"&&i.push(l);return i})(t)},NN=function(t){return iV(t,oV,aV)},lV=Object.prototype.hasOwnProperty,MO=Sm(eu,"DataView"),IO=$O,zO=Sm(eu,"Promise"),LO=Sm(eu,"Set"),FO=Sm(eu,"WeakMap"),DN=sp,Am=vN,cV=Am(MO),uV=Am(IO),dV=Am(zO),hV=Am(LO),pV=Am(FO),ap=DN;(MO&&ap(new MO(new ArrayBuffer(1)))!="[object DataView]"||IO&&ap(new IO)!="[object Map]"||zO&&ap(zO.resolve())!="[object Promise]"||LO&&ap(new LO)!="[object Set]"||FO&&ap(new FO)!="[object WeakMap]")&&(ap=function(t){var n=DN(t),i=n=="[object Object]"?t.constructor:void 0,l=i?Am(i):"";if(l)switch(l){case cV:return"[object DataView]";case uV:return"[object Map]";case dV:return"[object Promise]";case hV:return"[object Set]";case pV:return"[object WeakMap]"}return n});var qO=yK,fV=SN,mV=function(t,n,i,l,p,v,x){switch(i){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!v(new EN(t),new EN(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return SK(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var S=jK;case"[object Set]":var C=1&l;if(S||(S=CK),t.size!=n.size&&!C)return!1;var N=x.get(t);if(N)return N==n;l|=2,x.set(t,n);var D=EK(S(t),S(n),l,p,v,x);return x.delete(t),D;case"[object Symbol]":if(NO)return NO.call(t)==NO.call(n)}return!1},gV=function(t,n,i,l,p,v){var x=1&i,S=NN(t),C=S.length;if(C!=NN(n).length&&!x)return!1;for(var N=C;N--;){var D=S[N];if(!(x?D in n:lV.call(n,D)))return!1}var $=v.get(t),L=v.get(n);if($&&L)return $==n&&L==t;var U=!0;v.set(t,n),v.set(n,t);for(var J=x;++N<C;){var Y=t[D=S[N]],Z=n[D];if(l)var P=x?l(Z,Y,D,n,t,v):l(Y,Z,D,t,n,v);if(!(P===void 0?Y===Z||p(Y,Z,i,l,v):P)){U=!1;break}J||(J=D=="constructor")}if(U&&!J){var re=t.constructor,le=n.constructor;re==le||!("constructor"in t)||!("constructor"in n)||typeof re=="function"&&re instanceof re&&typeof le=="function"&&le instanceof le||(U=!1)}return v.delete(t),v.delete(n),U},PN=ap,MN=f1,IN=kN,yV=$N,w1="[object Object]",zN=Object.prototype.hasOwnProperty,LN=ip,vV=function t(n,i,l,p,v){return n===i||(n==null||i==null||!LN(n)&&!LN(i)?n!=n&&i!=i:(function(x,S,C,N,D,$){var L=MN(x),U=MN(S),J=L?"[object Array]":PN(x),Y=U?"[object Array]":PN(S),Z=(J=J=="[object Arguments]"?w1:J)==w1,P=(Y=Y=="[object Arguments]"?w1:Y)==w1,re=J==Y;if(re&&IN(x)){if(!IN(S))return!1;L=!0,Z=!1}if(re&&!Z)return $||($=new qO),L||yV(x)?fV(x,S,C,N,D,$):mV(x,S,J,C,N,D,$);if(!(1&C)){var le=Z&&zN.call(x,"__wrapped__"),he=P&&zN.call(S,"__wrapped__");if(le||he){var xe=le?x.value():x,pe=he?S.value():S;return $||($=new qO),D(xe,pe,C,N,$)}}return!!re&&($||($=new qO),gV(x,S,C,N,D,$))})(n,i,l,p,t,v))},S1=class AB{constructor(n,i){this.key=n,this.value=i}clone(){const n=new AB;return this.key&&(n.key=this.key.clone()),this.value&&(n.value=this.value.clone()),n}},E1=function(t){if(typeof t!="function")throw new TypeError("Expected a function");return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}};const xV=E1;function BO(t){return typeof t=="string"?n=>n.element===t:t.constructor&&t.extend?n=>n instanceof t:t}let FN=class L_{constructor(n){this.elements=n||[]}toValue(){return this.elements.map((n=>n.toValue()))}map(n,i){return this.elements.map(n,i)}flatMap(n,i){return this.map(n,i).reduce(((l,p)=>l.concat(p)),[])}compactMap(n,i){const l=[];return this.forEach((p=>{const v=n.bind(i)(p);v&&l.push(v)})),l}filter(n,i){return n=BO(n),new L_(this.elements.filter(n,i))}reject(n,i){return n=BO(n),new L_(this.elements.filter(xV(n),i))}find(n,i){return n=BO(n),this.elements.find(n,i)}forEach(n,i){this.elements.forEach(n,i)}reduce(n,i){return this.elements.reduce(n,i)}includes(n){return this.elements.some((i=>i.equals(n)))}shift(){return this.elements.shift()}unshift(n){this.elements.unshift(this.refract(n))}push(n){return this.elements.push(this.refract(n)),this}add(n){this.push(n)}get(n){return this.elements[n]}getValue(n){const i=this.elements[n];if(i)return i.toValue()}get length(){return this.elements.length}get isEmpty(){return this.elements.length===0}get first(){return this.elements[0]}};typeof Symbol<"u"&&(FN.prototype[Symbol.iterator]=function(){return this.elements[Symbol.iterator]()});var j1=FN;const bV=function(t,n){return vV(t,n)},C1=S1,Ad=j1;var tu=class Rj{constructor(n,i,l){i&&(this.meta=i),l&&(this.attributes=l),this.content=n}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((n=>{n.parent=this,n.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const n=new this.constructor;return n.element=this.element,this.meta.length&&(n._meta=this.meta.clone()),this.attributes.length&&(n._attributes=this.attributes.clone()),this.content?this.content.clone?n.content=this.content.clone():Array.isArray(this.content)?n.content=this.content.map((i=>i.clone())):n.content=this.content:n.content=this.content,n}toValue(){return this.content instanceof Rj?this.content.toValue():this.content instanceof C1?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((n=>n.toValue()),this):this.content}toRef(n){if(this.id.toValue()==="")throw Error("Cannot create reference to an element that does not contain an ID");const i=new this.RefElement(this.id.toValue());return n&&(i.path=n),i}findRecursive(...n){if(arguments.length>1&&!this.isFrozen)throw new Error("Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`");const i=n.pop();let l=new Ad;const p=(x,S)=>(x.push(S),x),v=(x,S)=>{S.element===i&&x.push(S);const C=S.findRecursive(i);return C&&C.reduce(p,x),S.content instanceof C1&&(S.content.key&&v(x,S.content.key),S.content.value&&v(x,S.content.value)),x};return this.content&&(this.content.element&&v(l,this.content),Array.isArray(this.content)&&this.content.reduce(v,l)),n.isEmpty||(l=l.filter((x=>{let S=x.parents.map((C=>C.element));for(const C in n){const N=n[C],D=S.indexOf(N);if(D===-1)return!1;S=S.splice(0,D)}return!0}))),l}set(n){return this.content=n,this}equals(n){return bV(this.toValue(),n)}getMetaProperty(n,i){if(!this.meta.hasKey(n)){if(this.isFrozen){const l=this.refract(i);return l.freeze(),l}this.meta.set(n,i)}return this.meta.get(n)}setMetaProperty(n,i){this.meta.set(n,i)}get element(){return this._storedElement||"element"}set element(n){this._storedElement=n}get content(){return this._content}set content(n){if(n instanceof Rj)this._content=n;else if(n instanceof Ad)this.content=n.elements;else if(typeof n=="string"||typeof n=="number"||typeof n=="boolean"||n==="null"||n==null)this._content=n;else if(n instanceof C1)this._content=n;else if(Array.isArray(n))this._content=n.map(this.refract);else{if(typeof n!="object")throw new Error("Cannot set content to given value");this._content=Object.keys(n).map((i=>new this.MemberElement(i,n[i])))}}get meta(){if(!this._meta){if(this.isFrozen){const n=new this.ObjectElement;return n.freeze(),n}this._meta=new this.ObjectElement}return this._meta}set meta(n){n instanceof this.ObjectElement?this._meta=n:this.meta.set(n||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const n=new this.ObjectElement;return n.freeze(),n}this._attributes=new this.ObjectElement}return this._attributes}set attributes(n){n instanceof this.ObjectElement?this._attributes=n:this.attributes.set(n||{})}get id(){return this.getMetaProperty("id","")}set id(n){this.setMetaProperty("id",n)}get classes(){return this.getMetaProperty("classes",[])}set classes(n){this.setMetaProperty("classes",n)}get title(){return this.getMetaProperty("title","")}set title(n){this.setMetaProperty("title",n)}get description(){return this.getMetaProperty("description","")}set description(n){this.setMetaProperty("description",n)}get links(){return this.getMetaProperty("links",[])}set links(n){this.setMetaProperty("links",n)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:n}=this;const i=new Ad;for(;n;)i.push(n),n=n.parent;return i}get children(){if(Array.isArray(this.content))return new Ad(this.content);if(this.content instanceof C1){const n=new Ad([this.content.key]);return this.content.value&&n.push(this.content.value),n}return this.content instanceof Rj?new Ad([this.content]):new Ad}get recursiveChildren(){const n=new Ad;return this.children.forEach((i=>{n.push(i),i.recursiveChildren.forEach((l=>{n.push(l)}))})),n}};const wV=tu,SV=tu,EV=tu,jV=tu,CV=E1,AV=tu,qN=j1;let wx=class extends AV{constructor(t,n,i){super(t||[],n,i),this.element="array"}primitive(){return"array"}get(t){return this.content[t]}getValue(t){const n=this.get(t);if(n)return n.toValue()}getIndex(t){return this.content[t]}set(t,n){return this.content[t]=this.refract(n),this}remove(t){const n=this.content.splice(t,1);return n.length?n[0]:null}map(t,n){return this.content.map(t,n)}flatMap(t,n){return this.map(t,n).reduce(((i,l)=>i.concat(l)),[])}compactMap(t,n){const i=[];return this.forEach((l=>{const p=t.bind(n)(l);p&&i.push(p)})),i}filter(t,n){return new qN(this.content.filter(t,n))}reject(t,n){return this.filter(CV(t),n)}reduce(t,n){let i,l;n!==void 0?(i=0,l=this.refract(n)):(i=1,l=this.primitive()==="object"?this.first.value:this.first);for(let p=i;p<this.length;p+=1){const v=this.content[p];l=this.primitive()==="object"?this.refract(t(l,v.value,v.key,v,this)):this.refract(t(l,v,p,this))}return l}forEach(t,n){this.content.forEach(((i,l)=>{t.bind(n)(i,this.refract(l))}))}shift(){return this.content.shift()}unshift(t){this.content.unshift(this.refract(t))}push(t){return this.content.push(this.refract(t)),this}add(t){this.push(t)}findElements(t,n){const i=n||{},l=!!i.recursive,p=i.results===void 0?[]:i.results;return this.forEach(((v,x,S)=>{l&&v.findElements!==void 0&&v.findElements(t,{results:p,recursive:l}),t(v,x,S)&&p.push(v)})),p}find(t){return new qN(this.findElements(t,{recursive:!0}))}findByElement(t){return this.find((n=>n.element===t))}findByClass(t){return this.find((n=>n.classes.includes(t)))}getById(t){return this.find((n=>n.id.toValue()===t)).first}includes(t){return this.content.some((n=>n.equals(t)))}contains(t){return this.includes(t)}empty(){return new this.constructor([])}"fantasy-land/empty"(){return this.empty()}concat(t){return new this.constructor(this.content.concat(t.content))}"fantasy-land/concat"(t){return this.concat(t)}"fantasy-land/map"(t){return new this.constructor(this.map(t))}"fantasy-land/chain"(t){return this.map((n=>t(n)),this).reduce(((n,i)=>n.concat(i)),this.empty())}"fantasy-land/filter"(t){return new this.constructor(this.content.filter(t))}"fantasy-land/reduce"(t,n){return this.content.reduce(t,n)}get length(){return this.content.length}get isEmpty(){return this.content.length===0}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}};wx.empty=function(){return new this},wx["fantasy-land/empty"]=wx.empty,typeof Symbol<"u"&&(wx.prototype[Symbol.iterator]=function(){return this.content[Symbol.iterator]()});var BN=wx;const OV=S1,kV=tu;var UN=class extends kV{constructor(t,n,i,l){super(new OV,i,l),this.element="member",this.key=t,this.value=n}get key(){return this.content.key}set key(t){this.content.key=this.refract(t)}get value(){return this.content.value}set value(t){this.content.value=this.refract(t)}};const RV=E1,TV=j1;var KN=class OB extends TV{map(n,i){return this.elements.map((l=>n.bind(i)(l.value,l.key,l)))}filter(n,i){return new OB(this.elements.filter((l=>n.bind(i)(l.value,l.key,l))))}reject(n,i){return this.filter(RV(n.bind(i)))}forEach(n,i){return this.elements.forEach(((l,p)=>{n.bind(i)(l.value,l.key,l,p)}))}keys(){return this.map(((n,i)=>i.toValue()))}values(){return this.map((n=>n.toValue()))}};const _V=E1,$V=m1,NV=BN,DV=UN,PV=KN,MV=tu,IV=tu,Om=tu,VN=class extends wV{constructor(t,n,i){super(t||null,n,i),this.element="null"}primitive(){return"null"}set(){return new Error("Cannot set the value of null")}},HN=class extends SV{constructor(t,n,i){super(t,n,i),this.element="string"}primitive(){return"string"}get length(){return this.content.length}},GN=class extends EV{constructor(t,n,i){super(t,n,i),this.element="number"}primitive(){return"number"}},XN=class extends jV{constructor(t,n,i){super(t,n,i),this.element="boolean"}primitive(){return"boolean"}},YN=BN,ZN=UN,UO=class extends NV{constructor(t,n,i){super(t||[],n,i),this.element="object"}primitive(){return"object"}toValue(){return this.content.reduce(((t,n)=>(t[n.key.toValue()]=n.value?n.value.toValue():void 0,t)),{})}get(t){const n=this.getMember(t);if(n)return n.value}getMember(t){if(t!==void 0)return this.content.find((n=>n.key.toValue()===t))}remove(t){let n=null;return this.content=this.content.filter((i=>i.key.toValue()!==t||(n=i,!1))),n}getKey(t){const n=this.getMember(t);if(n)return n.key}set(t,n){if($V(t))return Object.keys(t).forEach((p=>{this.set(p,t[p])})),this;const i=t,l=this.getMember(i);return l?l.value=n:this.content.push(new DV(i,n)),this}keys(){return this.content.map((t=>t.key.toValue()))}values(){return this.content.map((t=>t.value.toValue()))}hasKey(t){return this.content.some((n=>n.key.equals(t)))}items(){return this.content.map((t=>[t.key.toValue(),t.value.toValue()]))}map(t,n){return this.content.map((i=>t.bind(n)(i.value,i.key,i)))}compactMap(t,n){const i=[];return this.forEach(((l,p,v)=>{const x=t.bind(n)(l,p,v);x&&i.push(x)})),i}filter(t,n){return new PV(this.content).filter(t,n)}reject(t,n){return this.filter(_V(t),n)}forEach(t,n){return this.content.forEach((i=>t.bind(n)(i.value,i.key,i)))}},JN=class extends IV{constructor(t,n,i){super(t||[],n,i),this.element="ref",this.path||(this.path="element")}get path(){return this.attributes.get("path")}set path(t){this.attributes.set("path",t)}},WN=j1,zV=KN,LV=S1;function A1(t){return t instanceof Om?t:typeof t=="string"?new HN(t):typeof t=="number"?new GN(t):typeof t=="boolean"?new XN(t):t===null?new VN:Array.isArray(t)?new YN(t.map(A1)):typeof t=="object"?new UO(t):t}Om.prototype.ObjectElement=UO,Om.prototype.RefElement=JN,Om.prototype.MemberElement=ZN,Om.prototype.refract=A1,WN.prototype.refract=A1;var ca={Element:Om,NullElement:VN,StringElement:HN,NumberElement:GN,BooleanElement:XN,ArrayElement:YN,MemberElement:ZN,ObjectElement:UO,LinkElement:class extends MV{constructor(t,n,i){super(t||[],n,i),this.element="link"}get relation(){return this.attributes.get("relation")}set relation(t){this.attributes.set("relation",t)}get href(){return this.attributes.get("href")}set href(t){this.attributes.set("href",t)}},RefElement:JN,refract:A1,ArraySlice:WN,ObjectSlice:zV,KeyValuePair:LV};const FV=function(t){return t===null},qV=function(t){return typeof t=="string"||!f8(t)&&m8(t)&&p8(t)=="[object String]"},BV=function(t){return typeof t=="number"||y8(t)&&g8(t)=="[object Number]"},UV=function(t){return t===!0||t===!1||x8(t)&&v8(t)=="[object Boolean]"},KV=m1,QN=class{constructor(t){this.namespace=t||new this.Namespace}serialise(t){if(!(t instanceof this.namespace.elements.Element))throw new TypeError(`Given element \`${t}\` is not an Element instance`);const n={element:t.element};t._meta&&t._meta.length>0&&(n.meta=this.serialiseObject(t.meta)),t._attributes&&t._attributes.length>0&&(n.attributes=this.serialiseObject(t.attributes));const i=this.serialiseContent(t.content);return i!==void 0&&(n.content=i),n}deserialise(t){if(!t.element)throw new Error("Given value is not an object containing an element name");const n=new(this.namespace.getElementClass(t.element));n.element!==t.element&&(n.element=t.element),t.meta&&this.deserialiseObject(t.meta,n.meta),t.attributes&&this.deserialiseObject(t.attributes,n.attributes);const i=this.deserialiseContent(t.content);return i===void 0&&n.content!==null||(n.content=i),n}serialiseContent(t){if(t instanceof this.namespace.elements.Element)return this.serialise(t);if(t instanceof this.namespace.KeyValuePair){const n={key:this.serialise(t.key)};return t.value&&(n.value=this.serialise(t.value)),n}return t&&t.map?t.length===0?void 0:t.map(this.serialise,this):t}deserialiseContent(t){if(t){if(t.element)return this.deserialise(t);if(t.key){const n=new this.namespace.KeyValuePair(this.deserialise(t.key));return t.value&&(n.value=this.deserialise(t.value)),n}if(t.map)return t.map(this.deserialise,this)}return t}serialiseObject(t){const n={};if(t.forEach(((i,l)=>{i&&(n[l.toValue()]=this.serialise(i))})),Object.keys(n).length!==0)return n}deserialiseObject(t,n){Object.keys(t).forEach((i=>{n.set(i,this.deserialise(t[i]))}))}},Us=ca;let eD=class{constructor(t){this.elementMap={},this.elementDetection=[],this.Element=Us.Element,this.KeyValuePair=Us.KeyValuePair,t&&t.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(t){return t.namespace&&t.namespace({base:this}),t.load&&t.load({base:this}),this}useDefault(){return this.register("null",Us.NullElement).register("string",Us.StringElement).register("number",Us.NumberElement).register("boolean",Us.BooleanElement).register("array",Us.ArrayElement).register("object",Us.ObjectElement).register("member",Us.MemberElement).register("ref",Us.RefElement).register("link",Us.LinkElement),this.detect(FV,Us.NullElement,!1).detect(qV,Us.StringElement,!1).detect(BV,Us.NumberElement,!1).detect(UV,Us.BooleanElement,!1).detect(Array.isArray,Us.ArrayElement,!1).detect(KV,Us.ObjectElement,!1),this}register(t,n){return this._elements=void 0,this.elementMap[t]=n,this}unregister(t){return this._elements=void 0,delete this.elementMap[t],this}detect(t,n,i){return i===void 0||i?this.elementDetection.unshift([t,n]):this.elementDetection.push([t,n]),this}toElement(t){if(t instanceof this.Element)return t;let n;for(let i=0;i<this.elementDetection.length;i+=1){const l=this.elementDetection[i][0],p=this.elementDetection[i][1];if(l(t)){n=new p(t);break}}return n}getElementClass(t){const n=this.elementMap[t];return n===void 0?this.Element:n}fromRefract(t){return this.serialiser.deserialise(t)}toRefract(t){return this.serialiser.serialise(t)}get elements(){return this._elements===void 0&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((t=>{const n=t[0].toUpperCase()+t.substr(1);this._elements[n]=this.elementMap[t]}))),this._elements}get serialiser(){return new QN(this)}};QN.prototype.Namespace=eD;var VV=eD,km=S1,Sx=ca.ArraySlice,O1=ca.ObjectSlice,HV=ca.Element,nu=ca.StringElement,KO=ca.NumberElement,ru=ca.BooleanElement,VO=ca.NullElement,ur=ca.ArrayElement,Et=ca.ObjectElement,Ex=ca.MemberElement,su=ca.RefElement,HO=ca.LinkElement,GO=ca.refract;class k1 extends nu{constructor(n,i,l){super(n,i,l),this.element="annotation"}get code(){return this.attributes.get("code")}set code(n){this.attributes.set("code",n)}}class R1 extends nu{constructor(n,i,l){super(n,i,l),this.element="comment"}}class qo extends ur{constructor(n,i,l){super(n,i,l),this.element="parseResult"}get api(){return this.children.filter((n=>n.classes.contains("api"))).first}get results(){return this.children.filter((n=>n.classes.contains("result")))}get result(){return this.results.first}get annotations(){return this.children.filter((n=>n.element==="annotation"))}get warnings(){return this.children.filter((n=>n.element==="annotation"&&n.classes.contains("warning")))}get errors(){return this.children.filter((n=>n.element==="annotation"&&n.classes.contains("error")))}get isEmpty(){return this.children.reject((n=>n.element==="annotation")).isEmpty}replaceResult(n){const{result:i}=this;if(Cd(i))return!1;const l=this.content.findIndex((p=>p===i));return l!==-1&&(this.content[l]=n,!0)}}class T1 extends ur{constructor(n,i,l){super(n,i,l),this.element="sourceMap"}get positionStart(){return this.children.filter((n=>n.classes.contains("position"))).get(0)}get positionEnd(){return this.children.filter((n=>n.classes.contains("position"))).get(1)}set position(n){if(n===void 0)return;const i=new ur([n.start.row,n.start.column,n.start.char]),l=new ur([n.end.row,n.end.column,n.end.char]);i.classes.push("position"),l.classes.push("position"),this.push(i).push(l)}}const GV=(t,n)=>typeof n=="object"&&n!==null&&t in n&&typeof n[t]=="function",XV=t=>typeof t=="object"&&t!=null&&"_storedElement"in t&&typeof t._storedElement=="string"&&"_content"in t,YV=(t,n)=>typeof n=="object"&&n!==null&&"primitive"in n&&typeof n.primitive=="function"&&n.primitive()===t,ZV=(t,n)=>typeof n=="object"&&n!==null&&"classes"in n&&(Array.isArray(n.classes)||n.classes instanceof ur)&&n.classes.includes(t),Od=(t,n)=>typeof n=="object"&&n!==null&&"element"in n&&n.element===t,$t=t=>t({hasMethod:GV,hasBasicElementProps:XV,primitiveEq:YV,isElementType:Od,hasClass:ZV}),es=$t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof HV||t(i)&&n(void 0,i))),bn=$t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof nu||t(i)&&n("string",i))),XO=$t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof KO||t(i)&&n("number",i))),YO=$t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof VO||t(i)&&n("null",i))),jx=$t((({hasBasicElementProps:t,primitiveEq:n})=>i=>i instanceof ru||t(i)&&n("boolean",i))),Bn=$t((({hasBasicElementProps:t,primitiveEq:n,hasMethod:i})=>l=>l instanceof Et||t(l)&&n("object",l)&&i("keys",l)&&i("values",l)&&i("items",l))),Mi=$t((({hasBasicElementProps:t,primitiveEq:n,hasMethod:i})=>l=>l instanceof ur&&!(l instanceof Et)||t(l)&&n("array",l)&&i("push",l)&&i("unshift",l)&&i("map",l)&&i("reduce",l))),Bo=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ex||t(l)&&n("member",l)&&i(void 0,l))),tD=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof HO||t(l)&&n("link",l)&&i(void 0,l))),nD=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof su||t(l)&&n("ref",l)&&i(void 0,l))),JV=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof k1||t(l)&&n("annotation",l)&&i("array",l))),WV=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof R1||t(l)&&n("comment",l)&&i("string",l))),rD=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof qo||t(l)&&n("parseResult",l)&&i("array",l))),sD=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof T1||t(l)&&n("sourceMap",l)&&i("array",l))),op=t=>Od("object",t)||Od("array",t)||Od("boolean",t)||Od("number",t)||Od("string",t)||Od("null",t)||Od("member",t),Cx=t=>sD(t.meta.get("sourceMap")),_1=(t,n)=>t.length===0||ee(l1(n.classes.toValue()),t),QV=Object.freeze(Object.defineProperty({__proto__:null,hasElementSourceMap:Cx,includesClasses:_1,includesSymbols:(t,n)=>{if(t.length===0)return!0;const i=n.attributes.get("symbols");return!!Mi(i)&&ee(l1(i.toValue()),t)},isAnnotationElement:JV,isArrayElement:Mi,isBooleanElement:jx,isCommentElement:WV,isElement:es,isLinkElement:tD,isMemberElement:Bo,isNullElement:YO,isNumberElement:XO,isObjectElement:Bn,isParseResultElement:rD,isPrimitiveElement:op,isRefElement:nD,isSourceMapElement:sD,isStringElement:bn},Symbol.toStringTag,{value:"Module"}));class iD extends VV{constructor(){super(),this.register("annotation",k1),this.register("comment",R1),this.register("parseResult",qo),this.register("sourceMap",T1)}}const aD=new iD,Ax=t=>{const n=new iD;return np(t)&&n.use(t),n},oD=()=>({predicates:{...QV},namespace:aD}),$1=(t,n,i)=>{const l=t[n];if(l!=null){if(!i&&typeof l=="function")return l;const p=i?l.leave:l.enter;if(typeof p=="function")return p}else{const p=i?t.leave:t.enter;if(p!=null){if(typeof p=="function")return p;const v=p[n];if(typeof v=="function")return v}}return null},Gn={},Ox=t=>t?.type,lD=t=>typeof Ox(t)=="string",ZO=t=>Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),N1=(t,{visitFnGetter:n=$1,nodeTypeGetter:i=Ox,breakSymbol:l=Gn,deleteNodeSymbol:p=null,skipVisitingNodeSymbol:v=!1,exposeEdits:x=!1}={})=>{const S=Symbol("skip"),C=new Array(t.length).fill(S);return{enter(N,D,$,L,U,J){let Y=N,Z=!1;const P={...J,replaceWith(re,le){J.replaceWith(re,le),Y=re}};for(let re=0;re<t.length;re+=1)if(C[re]===S){const le=n(t[re],i(Y),!1);if(typeof le=="function"){const he=le.call(t[re],Y,D,$,L,U,P);if(typeof he?.then=="function")throw new $a("Async visitor not supported in sync mode",{visitor:t[re],visitFn:le});if(he===v)C[re]=Y;else if(he===l)C[re]=l;else{if(he===p)return he;if(he!==void 0){if(!x)return he;Y=he,Z=!0}}}}return Z?Y:void 0},leave(N,D,$,L,U,J){let Y=N;const Z={...J,replaceWith(P,re){J.replaceWith(P,re),Y=P}};for(let P=0;P<t.length;P+=1)if(C[P]===S){const re=n(t[P],i(Y),!0);if(typeof re=="function"){const le=re.call(t[P],Y,D,$,L,U,Z);if(typeof le?.then=="function")throw new $a("Async visitor not supported in sync mode",{visitor:t[P],visitFn:re});if(le===l)C[P]=l;else if(le!==void 0&&le!==v)return le}}else C[P]===Y&&(C[P]=S)}}};N1[Symbol.for("nodejs.util.promisify.custom")]=(t,{visitFnGetter:n=$1,nodeTypeGetter:i=Ox,breakSymbol:l=Gn,deleteNodeSymbol:p=null,skipVisitingNodeSymbol:v=!1,exposeEdits:x=!1}={})=>{const S=Symbol("skip"),C=new Array(t.length).fill(S);return{async enter(N,D,$,L,U,J){let Y=N,Z=!1;const P={...J,replaceWith(re,le){J.replaceWith(re,le),Y=re}};for(let re=0;re<t.length;re+=1)if(C[re]===S){const le=n(t[re],i(Y),!1);if(typeof le=="function"){const he=await le.call(t[re],Y,D,$,L,U,P);if(he===v)C[re]=Y;else if(he===l)C[re]=l;else{if(he===p)return he;if(he!==void 0){if(!x)return he;Y=he,Z=!0}}}}return Z?Y:void 0},async leave(N,D,$,L,U,J){let Y=N;const Z={...J,replaceWith(P,re){J.replaceWith(P,re),Y=P}};for(let P=0;P<t.length;P+=1)if(C[P]===S){const re=n(t[P],i(Y),!0);if(typeof re=="function"){const le=await re.call(t[P],Y,D,$,L,U,Z);if(le===l)C[P]=l;else if(le!==void 0&&le!==v)return le}}else C[P]===Y&&(C[P]=S)}}};const JO=(t,n,{keyMap:i=null,state:l={},breakSymbol:p=Gn,deleteNodeSymbol:v=null,skipVisitingNodeSymbol:x=!1,visitFnGetter:S=$1,nodeTypeGetter:C=Ox,nodePredicate:N=lD,nodeCloneFn:D=ZO,detectCycles:$=!0}={})=>{const L=i||{};let U,J,Y=Array.isArray(t),Z=[t],P=-1,re=[],le=t;const he=[],xe=[];do{P+=1;const ke=P===Z.length;let Be;const Ee=ke&&re.length!==0;if(ke){if(Be=xe.length===0?void 0:he.pop(),le=J,J=xe.pop(),Ee)if(Y){le=le.slice();let ze=0;for(const[Le,tt]of re){const ut=Le-ze;tt===v?(le.splice(ut,1),ze+=1):le[ut]=tt}}else{le=D(le);for(const[ze,Le]of re)le[ze]=Le}P=U.index,Z=U.keys,re=U.edits,Y=U.inArray,U=U.prev}else if(J!==v&&J!==void 0){if(Be=Y?P:Z[P],le=J[Be],le===v||le===void 0)continue;he.push(Be)}let ye;if(!Array.isArray(le)){var pe;if(!N(le))throw new $a(`Invalid AST Node: ${String(le)}`,{node:le});if($&&xe.includes(le)){he.pop();continue}const ze=S(n,C(le),ke);if(ze){for(const[tt,ut]of Object.entries(l))n[tt]=ut;const Le={replaceWith(tt,ut){typeof ut=="function"?ut(tt,le,Be,J,he,xe):J&&(J[Be]=tt),ke||(le=tt)}};ye=ze.call(n,le,Be,J,he,xe,Le)}if(typeof((pe=ye)===null||pe===void 0?void 0:pe.then)=="function")throw new $a("Async visitor not supported in sync mode",{visitor:n,visitFn:ze});if(ye===p)break;if(ye===x){if(!ke){he.pop();continue}}else if(ye!==void 0&&(re.push([Be,ye]),!ke)){if(!N(ye)){he.pop();continue}le=ye}}var _e;ye===void 0&&Ee&&re.push([Be,le]),ke||(U={inArray:Y,index:P,keys:Z,edits:re,prev:U},Y=Array.isArray(le),Z=Y?le:(_e=L[C(le)])!==null&&_e!==void 0?_e:[],P=-1,re=[],J!==v&&J!==void 0&&xe.push(J),J=le)}while(U!==void 0);return re.length!==0?re[re.length-1][1]:t};JO[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,{keyMap:i=null,state:l={},breakSymbol:p=Gn,deleteNodeSymbol:v=null,skipVisitingNodeSymbol:x=!1,visitFnGetter:S=$1,nodeTypeGetter:C=Ox,nodePredicate:N=lD,nodeCloneFn:D=ZO,detectCycles:$=!0}={})=>{const L=i||{};let U,J,Y=Array.isArray(t),Z=[t],P=-1,re=[],le=t;const he=[],xe=[];do{P+=1;const _e=P===Z.length;let ke;const Be=_e&&re.length!==0;if(_e){if(ke=xe.length===0?void 0:he.pop(),le=J,J=xe.pop(),Be)if(Y){le=le.slice();let ye=0;for(const[ze,Le]of re){const tt=ze-ye;Le===v?(le.splice(tt,1),ye+=1):le[tt]=Le}}else{le=D(le);for(const[ye,ze]of re)le[ye]=ze}P=U.index,Z=U.keys,re=U.edits,Y=U.inArray,U=U.prev}else if(J!==v&&J!==void 0){if(ke=Y?P:Z[P],le=J[ke],le===v||le===void 0)continue;he.push(ke)}let Ee;if(!Array.isArray(le)){if(!N(le))throw new $a(`Invalid AST Node: ${String(le)}`,{node:le});if($&&xe.includes(le)){he.pop();continue}const ye=S(n,C(le),_e);if(ye){for(const[Le,tt]of Object.entries(l))n[Le]=tt;const ze={replaceWith(Le,tt){typeof tt=="function"?tt(Le,le,ke,J,he,xe):J&&(J[ke]=Le),_e||(le=Le)}};Ee=await ye.call(n,le,ke,J,he,xe,ze)}if(Ee===p)break;if(Ee===x){if(!_e){he.pop();continue}}else if(Ee!==void 0&&(re.push([ke,Ee]),!_e)){if(!N(Ee)){he.pop();continue}le=Ee}}var pe;Ee===void 0&&Be&&re.push([ke,le]),_e||(U={inArray:Y,index:P,keys:Z,edits:re,prev:U},Y=Array.isArray(le),Z=Y?le:(pe=L[C(le)])!==null&&pe!==void 0?pe:[],P=-1,re=[],J!==v&&J!==void 0&&xe.push(J),J=le)}while(U!==void 0);return re.length!==0?re[re.length-1][1]:t};class cD extends $a{value;constructor(n,i){super(n,i),i!==void 0&&(this.value=i.value)}}class e7 extends cD{}class t7 extends cD{}const At=(t,n={})=>{const{visited:i=new WeakMap}=n,l={...n,visited:i};if(i.has(t))return i.get(t);if(t instanceof km){const{key:p,value:v}=t,x=es(p)?At(p,l):p,S=es(v)?At(v,l):v,C=new km(x,S);return i.set(t,C),C}if(t instanceof O1){const p=S=>At(S,l),v=[...t].map(p),x=new O1(v);return i.set(t,x),x}if(t instanceof Sx){const p=S=>At(S,l),v=[...t].map(p),x=new Sx(v);return i.set(t,x),x}if(es(t)){const p=Ii(t);if(i.set(t,p),t.content)if(es(t.content))p.content=At(t.content,l);else if(t.content instanceof km)p.content=At(t.content,l);else if(Array.isArray(t.content)){const v=x=>At(x,l);p.content=t.content.map(v)}else p.content=t.content;else p.content=t.content;return p}throw new e7("Value provided to cloneDeep function couldn't be cloned",{value:t})};At.safe=t=>{try{return At(t)}catch{return t}};const uD=t=>{const{key:n,value:i}=t;return new km(n,i)},dD=t=>{const n=new t.constructor;if(n.element=t.element,t.meta.length>0&&(n._meta=At(t.meta)),t.attributes.length>0&&(n._attributes=At(t.attributes)),es(t.content)){const i=t.content;n.content=dD(i)}else Array.isArray(t.content)?n.content=[...t.content]:t.content instanceof km?n.content=uD(t.content):n.content=t.content;return n},Ii=t=>{if(t instanceof km)return uD(t);if(t instanceof O1)return(n=>{const i=[...n];return new O1(i)})(t);if(t instanceof Sx)return(n=>{const i=[...n];return new Sx(i)})(t);if(es(t))return dD(t);throw new t7("Value provided to cloneShallow function couldn't be cloned",{value:t})};Ii.safe=t=>{try{return Ii(t)}catch{return t}};const Rm=t=>Bn(t)?"ObjectElement":Mi(t)?"ArrayElement":Bo(t)?"MemberElement":bn(t)?"StringElement":jx(t)?"BooleanElement":XO(t)?"NumberElement":YO(t)?"NullElement":tD(t)?"LinkElement":nD(t)?"RefElement":void 0,hD=t=>es(t)?Ii(t):ZO(t),pD=Bs(Rm,tp),Tm={ObjectElement:["content"],ArrayElement:["content"],MemberElement:["key","value"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:["content"],SourceMap:["content"]};class fD{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:n=mm,returnOnTrue:i,returnOnFalse:l}={}){this.result=[],this.predicate=n,this.returnOnTrue=i,this.returnOnFalse=l}enter(n){return this.predicate(n)?(this.result.push(n),this.returnOnTrue):this.returnOnFalse}}const bi=(t,n,{keyMap:i=Tm,...l}={})=>JO(t,n,{keyMap:i,nodeTypeGetter:Rm,nodePredicate:pD,nodeCloneFn:hD,...l});bi[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,{keyMap:i=Tm,...l}={})=>JO[Symbol.for("nodejs.util.promisify.custom")](t,n,{keyMap:i,nodeTypeGetter:Rm,nodePredicate:pD,nodeCloneFn:hD,...l});const mD={toolboxCreator:oD,visitorOptions:{nodeTypeGetter:Rm,exposeEdits:!0}},_m=(t,n,i={})=>{if(n.length===0)return t;const l=mO(mD,i),{toolboxCreator:p,visitorOptions:v}=l,x=p(),S=n.map((D=>D(x))),C=N1(S.map(a1({},"visitor")),{...v});S.forEach(gx(["pre"],[]));const N=bi(t,C,v);return S.forEach(gx(["post"],[])),N};_m[Symbol.for("nodejs.util.promisify.custom")]=async(t,n,i={})=>{if(n.length===0)return t;const l=mO(mD,i),{toolboxCreator:p,visitorOptions:v}=l,x=p(),S=n.map((L=>L(x))),C=N1[Symbol.for("nodejs.util.promisify.custom")],N=bi[Symbol.for("nodejs.util.promisify.custom")],D=C(S.map(a1({},"visitor")),{...v});await Promise.allSettled(S.map(gx(["pre"],[])));const $=await N(t,D,v);return await Promise.allSettled(S.map(gx(["post"],[]))),$};var gD={exports:{}};(function(t){var n=(()=>{var i=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,C=(Z,P,re)=>P in Z?i(Z,P,{enumerable:!0,configurable:!0,writable:!0,value:re}):Z[P]=re,N=(Z,P)=>{for(var re in P||(P={}))x.call(P,re)&&C(Z,re,P[re]);if(v)for(var re of v(P))S.call(P,re)&&C(Z,re,P[re]);return Z},D=(Z,P,re)=>(C(Z,typeof P!="symbol"?P+"":P,re),re),$={};((Z,P)=>{for(var re in P)i(Z,re,{get:P[re],enumerable:!0})})($,{DEFAULT_OPTIONS:()=>U,DEFAULT_UUID_LENGTH:()=>L,default:()=>Y});var L=6,U={dictionary:"alphanum",shuffle:!0,debug:!1,length:L,counter:0},J=class{constructor(Z={}){D(this,"counter"),D(this,"debug"),D(this,"dict"),D(this,"version"),D(this,"dictIndex",0),D(this,"dictRange",[]),D(this,"lowerBound",0),D(this,"upperBound",0),D(this,"dictLength",0),D(this,"uuidLength"),D(this,"_digit_first_ascii",48),D(this,"_digit_last_ascii",58),D(this,"_alpha_lower_first_ascii",97),D(this,"_alpha_lower_last_ascii",123),D(this,"_hex_last_ascii",103),D(this,"_alpha_upper_first_ascii",65),D(this,"_alpha_upper_last_ascii",91),D(this,"_number_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),D(this,"_alpha_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),D(this,"_alpha_lower_dict_ranges",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),D(this,"_alpha_upper_dict_ranges",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),D(this,"_alphanum_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),D(this,"_alphanum_lower_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),D(this,"_alphanum_upper_dict_ranges",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),D(this,"_hex_dict_ranges",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),D(this,"_dict_ranges",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),D(this,"log",((...pe)=>{const _e=[...pe];if(_e[0]=`[short-unique-id] ${pe[0]}`,this.debug===!0&&typeof console<"u"&&console!==null)return console.log(..._e)})),D(this,"_normalizeDictionary",((pe,_e)=>{let ke;if(pe&&Array.isArray(pe)&&pe.length>1)ke=pe;else{let Be;ke=[],this.dictIndex=Be=0;const Ee=`_${pe}_dict_ranges`,ye=this._dict_ranges[Ee];Object.keys(ye).forEach((ze=>{const Le=ze;for(this.dictRange=ye[Le],this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1],this.dictIndex=Be=this.lowerBound;this.lowerBound<=this.upperBound?Be<this.upperBound:Be>this.upperBound;this.dictIndex=this.lowerBound<=this.upperBound?Be+=1:Be-=1)ke.push(String.fromCharCode(this.dictIndex))}))}return _e&&(ke=ke.sort((()=>Math.random()-.5))),ke})),D(this,"setDictionary",((pe,_e)=>{this.dict=this._normalizeDictionary(pe,_e),this.dictLength=this.dict.length,this.setCounter(0)})),D(this,"seq",(()=>this.sequentialUUID())),D(this,"sequentialUUID",(()=>{let pe,_e,ke="";pe=this.counter;do _e=pe%this.dictLength,pe=Math.trunc(pe/this.dictLength),ke+=this.dict[_e];while(pe!==0);return this.counter+=1,ke})),D(this,"rnd",((pe=this.uuidLength||L)=>this.randomUUID(pe))),D(this,"randomUUID",((pe=this.uuidLength||L)=>{let _e,ke,Be;if(pe==null||pe<1)throw new Error("Invalid UUID Length Provided");for(_e="",Be=0;Be<pe;Be+=1)ke=parseInt((Math.random()*this.dictLength).toFixed(0),10)%this.dictLength,_e+=this.dict[ke];return _e})),D(this,"fmt",((pe,_e)=>this.formattedUUID(pe,_e))),D(this,"formattedUUID",((pe,_e)=>{const ke={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return pe.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(Be=>{const Ee=Be.slice(0,2),ye=parseInt(Be.slice(2),10);return Ee==="$s"?ke[Ee]().padStart(ye,"0"):Ee==="$t"&&_e?ke[Ee](ye,_e):ke[Ee](ye)}))})),D(this,"availableUUIDs",((pe=this.uuidLength)=>parseFloat(Math.pow([...new Set(this.dict)].length,pe).toFixed(0)))),D(this,"approxMaxBeforeCollision",((pe=this.availableUUIDs(this.uuidLength))=>parseFloat(Math.sqrt(Math.PI/2*pe).toFixed(20)))),D(this,"collisionProbability",((pe=this.availableUUIDs(this.uuidLength),_e=this.uuidLength)=>parseFloat((this.approxMaxBeforeCollision(pe)/this.availableUUIDs(_e)).toFixed(20)))),D(this,"uniqueness",((pe=this.availableUUIDs(this.uuidLength))=>{const _e=parseFloat((1-this.approxMaxBeforeCollision(pe)/pe).toFixed(20));return _e>1?1:_e<0?0:_e})),D(this,"getVersion",(()=>this.version)),D(this,"stamp",((pe,_e)=>{const ke=Math.floor(+(_e||new Date)/1e3).toString(16);if(typeof pe=="number"&&pe===0)return ke;if(typeof pe!="number"||pe<10)throw new Error(["Param finalLength must be a number greater than or equal to 10,","or 0 if you want the raw hexadecimal timestamp"].join(`
|
||
`));const Be=pe-9,Ee=Math.round(Math.random()*(Be>15?15:Be)),ye=this.randomUUID(Be);return`${ye.substring(0,Ee)}${ke}${ye.substring(Ee)}${Ee.toString(16)}`})),D(this,"parseStamp",((pe,_e)=>{if(_e&&!/t0|t[1-9]\d{1,}/.test(_e))throw new Error("Cannot extract date from a formated UUID with no timestamp in the format");const ke=_e?_e.replace(/\$[rs]\d{0,}|\$t0|\$t[1-9]\d{1,}/g,(Ee=>{const ye={$r:tt=>[...Array(tt)].map((()=>"r")).join(""),$s:tt=>[...Array(tt)].map((()=>"s")).join(""),$t:tt=>[...Array(tt)].map((()=>"t")).join("")},ze=Ee.slice(0,2),Le=parseInt(Ee.slice(2),10);return ye[ze](Le)})).replace(/^(.*?)(t{8,})(.*)$/g,((Ee,ye,ze)=>pe.substring(ye.length,ye.length+ze.length))):pe;if(ke.length===8)return new Date(1e3*parseInt(ke,16));if(ke.length<10)throw new Error("Stamp length invalid");const Be=parseInt(ke.substring(ke.length-1),16);return new Date(1e3*parseInt(ke.substring(Be,Be+8),16))})),D(this,"setCounter",(pe=>{this.counter=pe})),D(this,"validate",((pe,_e)=>{const ke=_e?this._normalizeDictionary(_e):this.dict;return pe.split("").every((Be=>ke.includes(Be)))}));const P=N(N({},U),Z);this.counter=0,this.debug=!1,this.dict=[],this.version="5.2.0";const{dictionary:re,shuffle:le,length:he,counter:xe}=P;return this.uuidLength=he,this.setDictionary(re,le),this.setCounter(xe),this.debug=P.debug,this.log(this.dict),this.log(`Generator instantiated with Dictionary Size ${this.dictLength} and counter set to ${this.counter}`),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this),this}};D(J,"default",J);var Y=J;return(Z=>((P,re,le,he)=>{if(re&&typeof re=="object"||typeof re=="function")for(let xe of p(re))x.call(P,xe)||xe===void 0||i(P,xe,{get:()=>re[xe],enumerable:!(he=l(re,xe))||he.enumerable});return P})(i({},"__esModule",{value:!0}),Z))($)})();t.exports=n.default,typeof window<"u"&&(n=n.default)})(gD);const n7=Ka(gD.exports);class r7 extends $a{value;constructor(n,i){super(n,i),i!==void 0&&(this.value=i.value)}}class WO{uuid;identityMap;constructor({length:n=6}={}){this.uuid=new n7({length:n}),this.identityMap=new WeakMap}identify(n){if(!es(n))throw new r7("Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.",{value:n});if(n.meta.hasKey("id")&&bn(n.meta.get("id"))&&!n.meta.get("id").equals(""))return n.id;if(this.identityMap.has(n))return this.identityMap.get(n);const i=new nu(this.generateId());return this.identityMap.set(n,i),i}forget(n){return!!this.identityMap.has(n)&&(this.identityMap.delete(n),!0)}generateId(){return this.uuid.randomUUID()}}new WO;class s7 extends Array{unknownMediaType="application/octet-stream";filterByFormat(){throw new jd("filterByFormat method in MediaTypes class is not yet implemented.")}findBy(){throw new jd("findBy method in MediaTypes class is not yet implemented.")}latest(){throw new jd("latest method in MediaTypes class is not yet implemented.")}}const no=t=>(n,i={})=>((l,{Type:p,plugins:v=[]})=>{const x=new p(l);return es(l)&&(l.meta.length>0&&(x.meta=At(l.meta)),l.attributes.length>0&&(x.attributes=At(l.attributes))),_m(x,v,{toolboxCreator:oD,visitorOptions:{nodeTypeGetter:Rm}})})(n,{...i,Type:t});Et.refract=no(Et),ur.refract=no(ur),nu.refract=no(nu),ru.refract=no(ru),VO.refract=no(VO),KO.refract=no(KO),HO.refract=no(HO),su.refract=no(su),k1.refract=no(k1),R1.refract=no(R1),qo.refract=no(qo),T1.refract=no(T1);const yD=(t,n)=>{const i=new fD({predicate:t,returnOnTrue:Gn});return bi(n,i),U$(void 0,[0],i.result)},vD=t=>typeof t?.type=="string"?t.type:Rm(t),xD={EphemeralObject:["content"],EphemeralArray:["content"],...Tm},bD=(t,n,{keyMap:i=xD,...l}={})=>bi(t,n,{keyMap:i,nodeTypeGetter:vD,nodePredicate:xi,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...l});bD[Symbol.for("nodejs.util.promisify.custom")]=async(t,{keyMap:n=xD,...i}={})=>bi[Symbol.for("nodejs.util.promisify.custom")](t,visitor,{keyMap:n,nodeTypeGetter:vD,nodePredicate:xi,detectCycles:!1,deleteNodeSymbol:Symbol.for("delete-node"),skipVisitingNodeSymbol:Symbol.for("skip-visiting-node"),...i});class i7{type="EphemeralArray";content=[];reference=void 0;constructor(n){this.content=n,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}}class a7{type="EphemeralObject";content=[];reference=void 0;constructor(n){this.content=n,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}}const st=t=>es(t)?bn(t)||XO(t)||jx(t)||YO(t)?t.toValue():bD(t,new class{ObjectElement={enter:n=>{if(this.references.has(n))return this.references.get(n).toReference();const i=new a7(n.content);return this.references.set(n,i),i}};EphemeralObject={leave:n=>n.toObject()};MemberElement={enter:n=>[n.key,n.value]};ArrayElement={enter:n=>{if(this.references.has(n))return this.references.get(n).toReference();const i=new i7(n.content);return this.references.set(n,i),i}};EphemeralArray={leave:n=>n.toArray()};references=new WeakMap;BooleanElement(n){return n.toValue()}NumberElement(n){return n.toValue()}StringElement(n){return n.toValue()}NullElement(){return null}RefElement(n,...i){var l;const p=i[3];return((l=p[p.length-1])===null||l===void 0?void 0:l.type)==="EphemeralObject"?Symbol.for("delete-node"):String(n.toValue())}LinkElement(n){return bn(n.href)?n.href.toValue():""}}):t,D1=(t,n=new WeakMap)=>(Bo(t)?(n.set(t.key,t),D1(t.key,n),n.set(t.value,t),D1(t.value,n)):t.children.forEach((i=>{n.set(i,t),D1(i,n)})),n);class o7{element;edges;constructor({element:n}){this.element=n}transclude(n,i){var l;if(n===this.element)return i;if(n===i)return this.element;this.edges=(l=this.edges)!==null&&l!==void 0?l:D1(this.element);const p=this.edges.get(n);return Cd(p)?void 0:(Bn(p)?((v,x,S)=>{const C=S.get(v);Bn(C)&&(C.content=C.map(((N,D,$)=>$===v?(S.delete(v),S.set(x,C),x):$)))})(n,i,this.edges):Mi(p)?((v,x,S)=>{const C=S.get(v);Mi(C)&&(C.content=C.map((N=>N===v?(S.delete(v),S.set(x,C),x):N)))})(n,i,this.edges):Bo(p)&&((v,x,S)=>{const C=S.get(v);Bo(C)&&(C.key===v&&(C.key=x,S.delete(v),S.set(x,C)),C.value===v&&(C.value=x,S.delete(v),S.set(x,C)))})(n,i,this.edges),this.element)}}const P1=(t,n)=>{const i=ym(t,n);return vU((l=>{if(np(l)&&z$("$ref",l)&&EU(tp,"$ref",l)){const p=la(["$ref"],l),v=bO("#/",p);return la(v.split("/"),i)}return np(l)?P1(l,i):l}),t)},wD=(t,n=aD)=>{if(tp(t))try{return n.fromRefract(JSON.parse(t))}catch{}return np(t)&&z$("element",t)?n.fromRefract(t):n.toElement(t)},M1=t=>{const n=t.meta.length>0?At(t.meta):void 0,i=t.attributes.length>0?At(t.attributes):void 0;return new t.constructor(void 0,n,i)},I1=(t,n)=>n.clone&&n.isMergeableElement(t)?Gl(M1(t),t,n):t,z1={clone:!0,isMergeableElement:t=>Bn(t)||Mi(t),arrayElementMerge:(t,n,i)=>t.concat(n)["fantasy-land/map"]((l=>I1(l,i))),objectElementMerge:(t,n,i)=>{const l=Bn(t)?M1(t):M1(n);return Bn(t)&&t.forEach(((p,v,x)=>{const S=Ii(x);S.value=I1(p,i),l.content.push(S)})),n.forEach(((p,v,x)=>{const S=st(v);let C;if(Bn(t)&&t.hasKey(S)&&i.isMergeableElement(p)){const N=t.get(S);C=Ii(x),C.value=((D,$)=>{if(typeof $.customMerge!="function")return Gl;const L=$.customMerge(D,$);return typeof L=="function"?L:Gl})(v,i)(N,p)}else C=Ii(x),C.value=I1(p,i);l.remove(S),l.content.push(C)})),l},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0};function Gl(t,n,i){var l,p,v;const x={...z1,...i};x.isMergeableElement=(l=x.isMergeableElement)!==null&&l!==void 0?l:z1.isMergeableElement,x.arrayElementMerge=(p=x.arrayElementMerge)!==null&&p!==void 0?p:z1.arrayElementMerge,x.objectElementMerge=(v=x.objectElementMerge)!==null&&v!==void 0?v:z1.objectElementMerge;const S=Mi(n);if(S!==Mi(t))return I1(n,x);const C=S&&typeof x.arrayElementMerge=="function"?x.arrayElementMerge(t,n,x):x.objectElementMerge(t,n,x);return C.meta=(N=>typeof N.customMetaMerge!="function"?D=>At(D):N.customMetaMerge)(x)(t.meta,n.meta),C.attributes=(N=>typeof N.customAttributesMerge!="function"?D=>At(D):N.customAttributesMerge)(x)(t.attributes,n.attributes),C}Gl.all=(t,n)=>{if(!Array.isArray(t))throw new TypeError("First argument of deepmerge should be an array.");return t.length===0?new Et:t.reduce(((i,l)=>Gl(i,l,n)),M1(t[0]))};class QO extends wr{}class SD extends QO{}let kx=class{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:t,allowEmpty:n=!0,sourceMap:i=!1,fileExtensions:l=[],mediaTypes:p=[]}){this.name=t,this.allowEmpty=n,this.sourceMap=i,this.fileExtensions=l,this.mediaTypes=p}};class ek extends Array{includesCycle(n){return this.filter((i=>i.has(n))).length>1}includes(n,i){return n instanceof Set?super.includes(n,i):this.some((l=>l.has(n)))}findItem(n){for(const i of this)for(const l of i)if(es(l)&&n(l))return l}}let iu=class{uri;depth;value;refSet;errors;constructor({uri:t,depth:n=0,refSet:i,value:l}){this.uri=t,this.value=l,this.depth=n,this.refSet=i,this.errors=[]}};class ED extends wr{}class l7 extends ED{}class c7 extends wr{}class tk extends c7{}class u7 extends ED{constructor(n){super(`Invalid JSON Schema $anchor "${n}".`)}}class $m extends QO{}class d7 extends TO{}class au extends RO{}function jD(t,n){(n==null||n>t.length)&&(n=t.length);for(var i=0,l=new Array(n);i<n;i++)l[i]=t[i];return l}function CD(t,n){return n!=null&&typeof Symbol<"u"&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n}function h7(t,n){return(function(i){if(Array.isArray(i))return i})(t)||(function(i,l){var p=i==null?null:typeof Symbol<"u"&&i[Symbol.iterator]||i["@@iterator"];if(p!=null){var v,x,S=[],C=!0,N=!1;try{for(p=p.call(i);!(C=(v=p.next()).done)&&(S.push(v.value),!l||S.length!==l);C=!0);}catch(D){N=!0,x=D}finally{try{C||p.return==null||p.return()}finally{if(N)throw x}}return S}})(t,n)||(function(i,l){if(i){if(typeof i=="string")return jD(i,l);var p=Object.prototype.toString.call(i).slice(8,-1);return p==="Object"&&i.constructor&&(p=i.constructor.name),p==="Map"||p==="Set"?Array.from(p):p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p)?jD(i,l):void 0}})(t,n)||(function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}function Nm(t){return t&&typeof Symbol<"u"&&t.constructor===Symbol?"symbol":typeof t}var AD=function(t){throw TypeError(t)},OD=function(t,n,i){return n.has(t)||AD("Cannot "+i)},zi=function(t,n,i){return OD(t,n,"read from private field"),n.get(t)},kD=function(t,n,i){return n.has(t)?AD("Cannot add the same private member more than once"):CD(n,WeakSet)?n.add(t):n.set(t,i)},nk=function(t,n,i,l){return OD(t,n,"write to private field"),n.set(t,i),i},Dm=function(t){return Object.prototype.toString.call(t)},RD=function(t){return ArrayBuffer.isView(t)&&!CD(t,DataView)},TD=Array.isArray,p7=Object.getOwnPropertyDescriptor,f7=Object.prototype.propertyIsEnumerable,m7=Object.getOwnPropertySymbols,L1=Object.prototype.hasOwnProperty;function rk(t){for(var n=Object.keys(t),i=m7(t),l=0;l<i.length;l++)f7.call(t,i[l])&&n.push(i[l]);return n}function g7(t,n){var i;return!(!((i=p7(t,n))===null||i===void 0)&&i.writable)}function _D(t,n){if((t===void 0?"undefined":Nm(t))==="object"&&t!==null){var i;if(TD(t))i=[];else if(Dm(t)==="[object Date]")i=new Date(t.getTime?t.getTime():t);else if((function(D){return Dm(D)==="[object RegExp]"})(t))i=new RegExp(t);else if((function(D){return Dm(D)==="[object Error]"})(t))i={message:t.message};else if((function(D){return Dm(D)==="[object Boolean]"})(t)||(function(D){return Dm(D)==="[object Number]"})(t)||(function(D){return Dm(D)==="[object String]"})(t))i=Object(t);else{if(RD(t))return t.slice();i=Object.create(Object.getPrototypeOf(t))}var l=n.includeSymbols?rk:Object.keys,p=!0,v=!1,x=void 0;try{for(var S,C=l(t)[Symbol.iterator]();!(p=(S=C.next()).done);p=!0){var N=S.value;i[N]=t[N]}}catch(D){v=!0,x=D}finally{try{p||C.return==null||C.return()}finally{if(v)throw x}}return i}return t}var ua,kd,$D={includeSymbols:!1,immutable:!1};function ND(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$D,l=[],p=[],v=!0,x=i.includeSymbols?rk:Object.keys,S=!!i.immutable;return(function C(N){var D=S?_D(N,i):N,$={},L=!0,U={node:D,node_:N,path:[].concat(l),parent:p[p.length-1],parents:p,key:l[l.length-1],isRoot:l.length===0,level:l.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function(ye){var ze=arguments.length>1&&arguments[1]!==void 0&&arguments[1];U.isRoot||(U.parent.node[U.key]=ye),U.node=ye,ze&&(L=!1)},delete:function(ye){delete U.parent.node[U.key],ye&&(L=!1)},remove:function(ye){TD(U.parent.node)?U.parent.node.splice(U.key,1):delete U.parent.node[U.key],ye&&(L=!1)},keys:null,before:function(ye){$.before=ye},after:function(ye){$.after=ye},pre:function(ye){$.pre=ye},post:function(ye){$.post=ye},stop:function(){v=!1},block:function(){L=!1}};if(!v)return U;function J(){if(Nm(U.node)==="object"&&U.node!==null){U.keys&&U.node_===U.node||(U.keys=x(U.node)),U.isLeaf=U.keys.length===0;for(var ye=0;ye<p.length;ye++)if(p[ye].node_===N){U.circular=p[ye];break}}else U.isLeaf=!0,U.keys=null;U.notLeaf=!U.isLeaf,U.notRoot=!U.isRoot}J();var Y=n.call(U,U.node);if(Y!==void 0&&U.update&&U.update(Y),$.before&&$.before.call(U,U.node),!L)return U;if(Nm(U.node)==="object"&&U.node!==null&&!U.circular){var Z;p.push(U),J();var P=!0,re=!1,le=void 0;try{for(var he,xe=Object.entries((Z=U.keys)!==null&&Z!==void 0?Z:[])[Symbol.iterator]();!(P=(he=xe.next()).done);P=!0){var pe,_e=h7(he.value,2),ke=_e[0],Be=_e[1];l.push(Be),$.pre&&$.pre.call(U,U.node[Be],Be);var Ee=C(U.node[Be]);S&&L1.call(U.node,Be)&&!g7(U.node,Be)&&(U.node[Be]=Ee.node),Ee.isLast=!!(!((pe=U.keys)===null||pe===void 0)&&pe.length)&&+ke==U.keys.length-1,Ee.isFirst=+ke==0,$.post&&$.post.call(U,Ee),l.pop()}}catch(ye){re=!0,le=ye}finally{try{P||xe.return==null||xe.return()}finally{if(re)throw le}}p.pop()}return $.after&&$.after.call(U,U.node),U})(t).node}var Xl=(function(){function t(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$D;(function(l,p){if(!(l instanceof p))throw new TypeError("Cannot call a class as a function")})(this,t),kD(this,ua),kD(this,kd),nk(this,ua,n),nk(this,kd,i)}return(function(n,i){i&&(function(l,p){for(var v=0;v<p.length;v++){var x=p[v];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(l,x.key,x)}})(n.prototype,i)})(t,[{key:"get",value:function(n){for(var i=zi(this,ua),l=0;i&&l<n.length;l++){var p=n[l];if(!L1.call(i,p)||!zi(this,kd).includeSymbols&&(p===void 0?"undefined":Nm(p))==="symbol")return;i=i[p]}return i}},{key:"has",value:function(n){for(var i=zi(this,ua),l=0;i&&l<n.length;l++){var p=n[l];if(!L1.call(i,p)||!zi(this,kd).includeSymbols&&(p===void 0?"undefined":Nm(p))==="symbol")return!1;i=i[p]}return!0}},{key:"set",value:function(n,i){var l=zi(this,ua),p=0;for(p=0;p<n.length-1;p++){var v=n[p];L1.call(l,v)||(l[v]={}),l=l[v]}return l[n[p]]=i,i}},{key:"map",value:function(n){return ND(zi(this,ua),n,{immutable:!0,includeSymbols:!!zi(this,kd).includeSymbols})}},{key:"forEach",value:function(n){return nk(this,ua,ND(zi(this,ua),n,zi(this,kd))),zi(this,ua)}},{key:"reduce",value:function(n,i){var l=arguments.length===1,p=l?zi(this,ua):i;return this.forEach((function(v){this.isRoot&&l||(p=n.call(this,p,v))})),p}},{key:"paths",value:function(){var n=[];return this.forEach((function(){n.push(this.path)})),n}},{key:"nodes",value:function(){var n=[];return this.forEach((function(){n.push(this.node)})),n}},{key:"clone",value:function(){var n=[],i=[],l=zi(this,kd);return RD(zi(this,ua))?zi(this,ua).slice():(function p(v){for(var x=0;x<n.length;x++)if(n[x]===v)return i[x];if((v===void 0?"undefined":Nm(v))==="object"&&v!==null){var S=_D(v,l);n.push(v),i.push(S);var C=l.includeSymbols?rk:Object.keys,N=!0,D=!1,$=void 0;try{for(var L,U=C(v)[Symbol.iterator]();!(N=(L=U.next()).done);N=!0){var J=L.value;S[J]=p(v[J])}}catch(Y){D=!0,$=Y}finally{try{N||U.return==null||U.return()}finally{if(D)throw $}}return n.pop(),i.pop(),S}return v})(zi(this,ua))}}]),t})();ua=new WeakMap,kd=new WeakMap;var Yl=function(t,n){return new Xl(t,n)};Yl.get=function(t,n,i){return new Xl(t,i).get(n)},Yl.set=function(t,n,i,l){return new Xl(t,l).set(n,i)},Yl.has=function(t,n,i){return new Xl(t,i).has(n)},Yl.map=function(t,n,i){return new Xl(t,i).map(n)},Yl.forEach=function(t,n,i){return new Xl(t,i).forEach(n)},Yl.reduce=function(t,n,i,l){return new Xl(t,l).reduce(n,i)},Yl.paths=function(t,n){return new Xl(t,n).paths()},Yl.nodes=function(t,n){return new Xl(t,n).nodes()},Yl.clone=function(t,n){return new Xl(t,n).clone()};var y7=Yl;const v7=["properties"],x7=["properties"],b7=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],w7=["schema/example","items/example"];function DD(t){const n=t[t.length-1],i=t[t.length-2],l=t.join("/");return v7.indexOf(n)>-1&&x7.indexOf(i)===-1||b7.indexOf(l)>-1||w7.some((p=>l.indexOf(p)>-1))}function sk(t,n){const[i,l]=t.split("#"),p=n??"",v=i??"";let x;if(h1(p))x=Ds(p,v);else{const S=Ds("https://swagger.io",p),C=Ds(S,v).replace("https://swagger.io","");x=v.startsWith("/")?C:C.substring(1)}return l?`${x}#${l}`:x}const S7=/^([a-z]+:\/\/|\/\/)/i;class Pm extends $a{}const ou={},PD=new WeakMap,E7=[t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="examples",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="examples"&&t[6]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="examples"&&t[7]==="value",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="example",t=>t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value",t=>t[0]==="paths"&&t[3]==="parameters"&&t[4]==="content"&&t[7]==="example",t=>t[0]==="paths"&&t[3]==="parameters"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"],j7={key:"$ref",plugin:(t,n,i,l)=>{const p=l.getInstance(),v=i.slice(0,-1);if(DD(v)||(Y=>E7.some((Z=>Z(Y))))(v))return;const{baseDoc:x}=l.getContext(i);if(typeof t!="string")return new Pm("$ref: must be a string (JSON-Ref)",{$ref:t,baseDoc:x,fullPath:i});const S=ID(t),C=S[0],N=S[1]||"";let D,$,L;try{D=x||C?MD(C,x):null}catch(Y){return ak(Y,{pointer:N,$ref:t,basePath:D,fullPath:i})}if((function(Y,Z,P,re){let le=PD.get(re);le||(le={},PD.set(re,le));const he=(function(Be){return Be.length===0?"":`/${Be.map(qD).join("/")}`})(P),xe=`${Z||"<specmap-base>"}#${Y}`,pe=he.replace(/allOf\/\d+\/?/g,"");if(Z===re.contextTree.get([]).baseDoc&&ck(pe,Y))return!0;let _e="";if(P.some((Be=>(_e=`${_e}/${qD(Be)}`,le[_e]&&le[_e].some((Ee=>ck(Ee,xe)||ck(xe,Ee)))))))return!0;le[pe]=(le[pe]||[]).concat(xe)})(N,D,v,l)&&!p.useCircularStructures){const Y=sk(t,D);return t===Y?null:Fn.replace(i,Y)}if(D==null?(L=lk(N),$=l.get(L),$===void 0&&($=new Pm(`Could not resolve reference: ${t}`,{pointer:N,$ref:t,baseDoc:x,fullPath:i}))):($=zD(D,N),$=$.l!=null?$.l:$.catch((Y=>{throw ak(Y,{pointer:N,$ref:t,baseDoc:x,fullPath:i})}))),$ instanceof Error)return[Fn.remove(i),$];const U=sk(t,D),J=Fn.replace(v,$,{$$ref:U});if(D&&D!==x)return[J,Fn.context(v,{baseDoc:D})];try{if(!(function(Y,Z){const P=[Y];return Z.path.reduce(((re,le)=>(P.push(re[le]),re[le])),Y),(function re(le){return Fn.isObject(le)&&(P.indexOf(le)>=0||Object.keys(le).some((he=>re(le[he]))))})(Z.value)})(l.state,J)||p.useCircularStructures)return J}catch{return null}}},ik=Object.assign(j7,{docCache:ou,absoluteify:MD,clearCache:function(t){t!==void 0?delete ou[t]:Object.keys(ou).forEach((n=>{delete ou[n]}))},JSONRefError:Pm,wrapError:ak,getDoc:LD,split:ID,extractFromDoc:zD,fetchJSON:function(t){return fetch(t,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((n=>n.text())).then((n=>Uu.load(n)))},extract:ok,jsonPointerToArray:lk,unescapeJsonPointerToken:FD});function MD(t,n){if(!S7.test(t)){if(!n)throw new Pm(`Tried to resolve a relative URL, without having a basePath. path: '${t}' basePath: '${n}'`);return Ds(n,t)}return t}function ak(t,n){let i;return i=t&&t.response&&t.response.body?`${t.response.body.code} ${t.response.body.message}`:t.message,new Pm(`Could not resolve reference: ${i}`,{...n,cause:t})}function ID(t){return(t+"").split("#")}function zD(t,n){const i=ou[t];if(i&&!Fn.isPromise(i))try{const l=ok(n,i);return Object.assign(Promise.resolve(l),{l})}catch(l){return Promise.reject(l)}return LD(t).then((l=>ok(n,l)))}function LD(t){const n=ou[t];return n?Fn.isPromise(n)?n:Promise.resolve(n):(ou[t]=ik.fetchJSON(t).then((i=>(ou[t]=i,i))),ou[t])}function ok(t,n){const i=lk(t);if(i.length<1)return n;const l=Fn.getIn(n,i);if(l===void 0)throw new Pm(`Could not resolve pointer: ${t} does not exist in document`,{pointer:t});return l}function lk(t){if(typeof t!="string")throw new TypeError("Expected a string, got a "+typeof t);return t[0]==="/"&&(t=t.substr(1)),t===""?[]:t.split("/").map(FD)}function FD(t){return typeof t!="string"?t:new URLSearchParams(`=${t.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function qD(t){return new URLSearchParams([["",t.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}function ck(t,n){if(!(i=n)||i==="/"||i==="#")return!0;var i;const l=t.charAt(n.length),p=n.slice(-1);return t.indexOf(n)===0&&(!l||l==="/"||l==="#")&&p!=="#"}const C7={key:"allOf",plugin:(t,n,i,l,p)=>{if(p.meta&&p.meta.$$ref)return;const v=i.slice(0,-1);if(DD(v))return;if(!Array.isArray(t)){const N=new TypeError("allOf must be an array");return N.fullPath=i,N}let x=!1,S=p.value;if(v.forEach((N=>{S&&(S=S[N])})),S={...S},Object.keys(S).length===0)return;delete S.allOf;const C=[];return C.push(l.replace(v,{})),t.forEach(((N,D)=>{if(!l.isObject(N)){if(x)return null;x=!0;const L=new TypeError("Elements in allOf must be objects");return L.fullPath=i,C.push(L)}C.push(l.mergeDeep(v,N));const $=(function(L,U,{specmap:J,getBaseUrlForNodePath:Y=P=>J.getContext([...U,...P]).baseDoc,targetKeys:Z=["$ref","$$ref"]}={}){const P=[];return y7(L).forEach((function(){if(Z.includes(this.key)&&typeof this.node=="string"){const re=this.path,le=U.concat(this.path),he=sk(this.node,Y(re));P.push(J.replace(le,he))}})),P})(N,i.slice(0,-1),{getBaseUrlForNodePath:L=>l.getContext([...i,D,...L]).baseDoc,specmap:l});C.push(...$)})),S.example&&C.push(l.remove([].concat(v,"example"))),C.push(l.mergeDeep(v,S)),S.$$ref||C.push(l.remove([].concat(v,"$$ref"))),C}},A7={key:"parameters",plugin:(t,n,i,l)=>{if(Array.isArray(t)&&t.length){const p=Object.assign([],t),v=i.slice(0,-1),x={...Fn.getIn(l.spec,v)};for(let S=0;S<t.length;S+=1){const C=t[S];try{p[S].default=l.parameterMacro(x,C)}catch(N){const D=new Error(N);return D.fullPath=i,D}}return Fn.replace(i,p)}return Fn.replace(i,t)}},O7={key:"properties",plugin:(t,n,i,l)=>{const p={...t};for(const v in t)try{p[v].default=l.modelPropertyMacro(p[v])}catch(x){const S=new Error(x);return S.fullPath=i,S}return Fn.replace(i,p)}};class k7{constructor(n){this.root=uk(n||{})}set(n,i){const l=this.getParent(n,!0);if(!l)return void F1(this.root,i,null);const p=n[n.length-1],{children:v}=l;v[p]?F1(v[p],i,l):v[p]=uk(i,l)}get(n){if((n=n||[]).length<1)return this.root.value;let i,l,p=this.root;for(let v=0;v<n.length&&(l=n[v],i=p.children,i[l]);v+=1)p=i[l];return p&&p.protoValue}getParent(n,i){return!n||n.length<1?null:n.length<2?this.root:n.slice(0,-1).reduce(((l,p)=>{if(!l)return l;const{children:v}=l;return!v[p]&&i&&(v[p]=uk(null,l)),v[p]}),this.root)}}function uk(t,n){return F1({children:{}},t,n)}function F1(t,n,i){return t.value=n||{},t.protoValue=i?{...i.protoValue,...t.value}:t.value,Object.keys(t.children).forEach((l=>{const p=t.children[l];t.children[l]=F1(p,p.value,t)})),t}const BD=()=>{};class R7{static getPluginName(n){return n.pluginName}static getPatchesOfType(n,i){return n.filter(i)}constructor(n){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new k7,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),Fn,{getInstance:()=>this}),allowMetaPatches:!1},n),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(Fn.isFunction),this.patches.push(Fn.add([],this.spec)),this.patches.push(Fn.context([],this.context)),this.updatePatches(this.patches)}debug(n,...i){this.debugLevel===n&&console.log(...i)}verbose(n,...i){this.debugLevel==="verbose"&&console.log(`[${n}] `,...i)}wrapPlugin(n,i){const{pathDiscriminator:l}=this;let p,v=null;return n[this.pluginProp]?(v=n,p=n[this.pluginProp]):Fn.isFunction(n)?p=n:Fn.isObject(n)&&(p=(function(x){const S=(C,N)=>!Array.isArray(C)||C.every(((D,$)=>D===N[$]));return function*(C,N){const D={};for(const[L,U]of C.filter(Fn.isAdditiveMutation).entries()){if(!(L<3e3))return;yield*$(U.value,U.path,U)}function*$(L,U,J){if(Fn.isObject(L)){const Y=U.length-1,Z=U[Y],P=U.indexOf("properties"),re=Z==="properties"&&Y===P,le=N.allowMetaPatches&&D[L.$$ref];for(const he of Object.keys(L)){const xe=L[he],pe=U.concat(he),_e=Fn.isObject(xe),ke=L.$$ref;if(le||_e&&(N.allowMetaPatches&&ke&&(D[ke]=!0),yield*$(xe,pe,J)),!re&&he===x.key){const Be=S(l,U);l&&!Be||(yield x.plugin(xe,he,pe,N,J))}}}else x.key===U[U.length-1]&&(yield x.plugin(L,x.key,U,N))}}})(n)),Object.assign(p.bind(v),{pluginName:n.name||i,isGenerator:Fn.isGenerator(p)})}nextPlugin(){return this.wrappedPlugins.find((n=>this.getMutationsForPlugin(n).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((n=>n.value)))}getPluginHistory(n){const i=this.constructor.getPluginName(n);return this.pluginHistory[i]||[]}getPluginRunCount(n){return this.getPluginHistory(n).length}getPluginHistoryTip(n){const i=this.getPluginHistory(n);return i&&i[i.length-1]||{}}getPluginMutationIndex(n){const i=this.getPluginHistoryTip(n).mutationIndex;return typeof i!="number"?-1:i}updatePluginHistory(n,i){const l=this.constructor.getPluginName(n);this.pluginHistory[l]=this.pluginHistory[l]||[],this.pluginHistory[l].push(i)}updatePatches(n){Fn.normalizeArray(n).forEach((i=>{if(i instanceof Error)this.errors.push(i);else try{if(!Fn.isObject(i))return void this.debug("updatePatches","Got a non-object patch",i);if(this.showDebug&&this.allPatches.push(i),Fn.isPromise(i.value))return this.promisedPatches.push(i),void this.promisedPatchThen(i);if(Fn.isContextPatch(i))return void this.setContext(i.path,i.value);Fn.isMutation(i)&&this.updateMutations(i)}catch(l){console.error(l),this.errors.push(l)}}))}updateMutations(n){typeof n.value=="object"&&!Array.isArray(n.value)&&this.allowMetaPatches&&(n.value={...n.value});const i=Fn.applyPatch(this.state,n,{allowMetaPatches:this.allowMetaPatches});i&&(this.mutations.push(n),this.state=i)}removePromisedPatch(n){const i=this.promisedPatches.indexOf(n);i<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(i,1)}promisedPatchThen(n){return n.value=n.value.then((i=>{const l={...n,value:i};this.removePromisedPatch(n),this.updatePatches(l)})).catch((i=>{this.removePromisedPatch(n),this.updatePatches(i)})),n.value}getMutations(n,i){return n=n||0,typeof i!="number"&&(i=this.mutations.length),this.mutations.slice(n,i)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(n){const i=this.getPluginMutationIndex(n);return this.getMutations(i+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(n){return Fn.getIn(this.state,n)}_getContext(n){return this.contextTree.get(n)}setContext(n,i){return this.contextTree.set(n,i)}_hasRun(n){return this.getPluginRunCount(this.getCurrentPlugin())>(n||0)}dispatch(){const n=this,i=this.nextPlugin();if(!i){const p=this.nextPromisedPatch();if(p)return p.then((()=>this.dispatch())).catch((()=>this.dispatch()));const v={spec:this.state,errors:this.errors};return this.showDebug&&(v.patches=this.allPatches),Promise.resolve(v)}if(n.pluginCount=n.pluginCount||new WeakMap,n.pluginCount.set(i,(n.pluginCount.get(i)||0)+1),n.pluginCount[i]>100)return Promise.resolve({spec:n.state,errors:n.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(i!==this.currentPlugin&&this.promisedPatches.length){const p=this.promisedPatches.map((v=>v.value));return Promise.all(p.map((v=>v.then(BD,BD)))).then((()=>this.dispatch()))}return(function(){n.currentPlugin=i;const p=n.getCurrentMutations(),v=n.mutations.length-1;try{if(i.isGenerator)for(const x of i(p,n.getLib()))l(x);else l(i(p,n.getLib()))}catch(x){console.error(x),l([Object.assign(Object.create(x),{plugin:i})])}finally{n.updatePluginHistory(i,{mutationIndex:v})}return n.dispatch()})();function l(p){p&&(p=Fn.fullyNormalizeArray(p),n.updatePatches(p,i))}}}const lp={refs:ik,allOf:C7,parameters:A7,properties:O7};async function dk(t){const{spec:n,mode:i,allowMetaPatches:l=!0,pathDiscriminator:p,modelPropertyMacro:v,parameterMacro:x,requestInterceptor:S,responseInterceptor:C,skipNormalization:N=!1,useCircularStructures:D,strategies:$}=t,L=Ku(t),U=bl(t),J=$.find((Y=>Y.match(n)));return(async function(Y){L&&(lp.refs.docCache[L]=Y),lp.refs.fetchJSON=my(U,{requestInterceptor:S,responseInterceptor:C});const Z=[lp.refs];typeof x=="function"&&Z.push(lp.parameters),typeof v=="function"&&Z.push(lp.properties),i!=="strict"&&Z.push(lp.allOf);const P=await(re={spec:Y,context:{baseDoc:L},plugins:Z,allowMetaPatches:l,pathDiscriminator:p,parameterMacro:x,modelPropertyMacro:v,useCircularStructures:D},new R7(re).dispatch());var re;return N||(P.spec=J.normalize(P.spec)),P})(n)}const UD=t=>t.replace(/\W/gi,"_");function Rx(t,n,i="",{v2OperationIdCompatibilityMode:l}={}){return t&&typeof t=="object"?(t.operationId||"").replace(/\s/g,"").length?UD(t.operationId):(function(p,v,{v2OperationIdCompatibilityMode:x}={}){if(x){let S=`${v.toLowerCase()}_${p}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return S=S||`${p.substring(1)}_${v}`,S.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${v.toLowerCase()}${UD(p)}`})(n,i,{v2OperationIdCompatibilityMode:l}):null}function hk(t){const{spec:n}=t,{paths:i}=n,l={};if(!i||n.$$normalized)return t;for(const p in i){const v=i[p];if(v==null||!["object","function"].includes(typeof v))continue;const x=v.parameters;for(const S in v){const C=v[S];if(C==null||!["object","function"].includes(typeof C))continue;const N=Rx(C,p,S);if(N){l[N]?l[N].push(C):l[N]=[C];const D=l[N];if(D.length>1)D.forEach((($,L)=>{$.h=$.h||$.operationId,$.operationId=`${N}${L+1}`}));else if(C.operationId!==void 0){const $=D[0];$.h=$.h||C.operationId,$.operationId=N}}if(S!=="parameters"){const D=[],$={};for(const L in n)L!=="produces"&&L!=="consumes"&&L!=="security"||($[L]=n[L],D.push($));if(x&&($.parameters=x,D.push($)),D.length)for(const L of D)for(const U in L)if(C[U]){if(U==="parameters")for(const J of L[U])C[U].some((Y=>Y.name&&Y.name===J.name||Y.$ref&&Y.$ref===J.$ref||Y.$$ref&&Y.$$ref===J.$$ref||Y===J))||C[U].push(J)}else C[U]=L[U]}}}return n.$$normalized=!0,t}const KD={name:"generic",match:()=>!0,normalize(t){const{spec:n}=hk({spec:t});return n},resolve:async t=>dk(t)},VD=t=>{try{const{swagger:n}=t;return n==="2.0"}catch{return!1}},HD=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.0\.([0123])(?:-rc[012])?$/.test(n)}catch{return!1}},pk=t=>{try{const{openapi:n}=t;return typeof n=="string"&&/^3\.1\.(?:[1-9]\d*|0)$/.test(n)}catch{return!1}},fk=t=>HD(t)||pk(t),GD={name:"openapi-2",match:t=>VD(t),normalize(t){const{spec:n}=hk({spec:t});return n},resolve:async t=>(async function(n){return dk(n)})(t)},XD={name:"openapi-3-0",match:t=>HD(t),normalize(t){const{spec:n}=hk({spec:t});return n},resolve:async t=>(async function(n){return dk(n)})(t)},YD=t=>async n=>(async i=>{const{spec:l,requestInterceptor:p,responseInterceptor:v}=i,x=Ku(i),S=bl(i),C=l||await my(S,{requestInterceptor:p,responseInterceptor:v})(x),N={...i,spec:C};return i.strategies.find((D=>D.match(C))).resolve(N)})({...t,...n}),T7=YD({strategies:[XD,GD,KD]});class mk extends $a{}class gk extends mk{pointer;constructor(n,i){super(n,i),i!==void 0&&(this.pointer=i.pointer)}}class _7 extends mk{tokens;constructor(n,i){super(n,i),i!==void 0&&(this.tokens=[...i.tokens])}}class Tx extends mk{pointer;tokens;failedToken;failedTokenPosition;element;constructor(n,i){super(n,i),i!==void 0&&(this.pointer=i.pointer,Array.isArray(i.tokens)&&(this.tokens=[...i.tokens]),this.failedToken=i.failedToken,this.failedTokenPosition=i.failedTokenPosition,this.element=i.element)}}const $7=Bs(vm(/~/g,"~0"),vm(/\//g,"~1"),encodeURIComponent),N7=Bs(vm(/~1/g,"/"),vm(/~0/g,"~"),(t=>{try{return decodeURIComponent(t)}catch{return t}})),ro=t=>{const n=(i=>{const l=i.indexOf("#");return l!==-1?i.substring(l):"#"})(t);return bO("#",n)},ZD=t=>{try{return t.length===0?"":`/${t.map($7).join("/")}`}catch(n){throw new _7("JSON Pointer compilation of tokens encountered an error.",{tokens:t,cause:n})}},Uo=(t,n)=>{let i;try{i=(l=>{if(J$(l))return[];if(!H$("/",l))throw new gk(`Invalid JSON Pointer "${l}". JSON Pointers must begin with "/"`,{pointer:l});try{const p=Bs(gO("/"),dx(N7))(l);return M$(p)}catch(p){throw new gk(`JSON Pointer parsing of "${l}" encountered an error.`,{pointer:l,cause:p})}})(t)}catch(l){throw new Tx(`JSON Pointer evaluation failed while parsing the pointer "${t}".`,{pointer:t,element:At(n),cause:l})}return i.reduce(((l,p,v)=>{if(Bn(l)){if(!l.hasKey(p))throw new Tx(`JSON Pointer evaluation failed while evaluating token "${p}" against an ObjectElement`,{pointer:t,tokens:i,failedToken:p,failedTokenPosition:v,element:At(l)});return l.get(p)}if(Mi(l)){if(!(p in l.content)||!HU(Number(p)))throw new Tx(`JSON Pointer evaluation failed while evaluating token "${p}" against an ArrayElement`,{pointer:t,tokens:i,failedToken:p,failedTokenPosition:v,element:At(l)});return l.get(Number(p))}throw new Tx(`JSON Pointer evaluation failed while evaluating token "${p}" against an unexpected Element`,{pointer:t,tokens:i,failedToken:p,failedTokenPosition:v,element:At(l)})}),n)};class yk extends s7{filterByFormat(n="generic"){const i=n==="generic"?"openapi;version":n;return this.filter((l=>l.includes(i)))}findBy(n="3.1.0",i="generic"){const l=i==="generic"?`vnd.oai.openapi;version=${n}`:`vnd.oai.openapi+${i};version=${n}`;return this.find((p=>p.includes(l)))||this.unknownMediaType}latest(n="generic"){return s1(this.filterByFormat(n))}}const Mm=new yk("application/vnd.oai.openapi;version=3.1.0","application/vnd.oai.openapi+json;version=3.1.0","application/vnd.oai.openapi+yaml;version=3.1.0");let _x=class extends Et{constructor(t,n,i){super(t,n,i),this.element="callback"}},$x=class extends Et{constructor(t,n,i){super(t,n,i),this.element="components"}get schemas(){return this.get("schemas")}set schemas(t){this.set("schemas",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get requestBodies(){return this.get("requestBodies")}set requestBodies(t){this.set("requestBodies",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get securitySchemes(){return this.get("securitySchemes")}set securitySchemes(t){this.set("securitySchemes",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}},Nx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="contact"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}get email(){return this.get("email")}set email(t){this.set("email",t)}},q1=class extends Et{constructor(t,n,i){super(t,n,i),this.element="discriminator"}get propertyName(){return this.get("propertyName")}set propertyName(t){this.set("propertyName",t)}get mapping(){return this.get("mapping")}set mapping(t){this.set("mapping",t)}},B1=class extends Et{constructor(t,n,i){super(t,n,i),this.element="encoding"}get contentType(){return this.get("contentType")}set contentType(t){this.set("contentType",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowedReserved(){return this.get("allowedReserved")}set allowedReserved(t){this.set("allowedReserved",t)}},Dx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="example"}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get value(){return this.get("value")}set value(t){this.set("value",t)}get externalValue(){return this.get("externalValue")}set externalValue(t){this.set("externalValue",t)}},Px=class extends Et{constructor(t,n,i){super(t,n,i),this.element="externalDocumentation"}get description(){return this.get("description")}set description(t){this.set("description",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}},Im=class extends Et{constructor(t,n,i){super(t,n,i),this.element="header"}get required(){return this.hasKey("required")?this.get("required"):new ru(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new ru(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}};Object.defineProperty(Im.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let Mx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="info",this.classes.push("info")}get title(){return this.get("title")}set title(t){this.set("title",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get termsOfService(){return this.get("termsOfService")}set termsOfService(t){this.set("termsOfService",t)}get contact(){return this.get("contact")}set contact(t){this.set("contact",t)}get license(){return this.get("license")}set license(t){this.set("license",t)}get version(){return this.get("version")}set version(t){this.set("version",t)}},Ix=class extends Et{constructor(t,n,i){super(t,n,i),this.element="license"}get name(){return this.get("name")}set name(t){this.set("name",t)}get url(){return this.get("url")}set url(t){this.set("url",t)}},zx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="link"}get operationRef(){return this.get("operationRef")}set operationRef(t){this.set("operationRef",t)}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get operation(){var t,n;return bn(this.operationRef)?(t=this.operationRef)===null||t===void 0?void 0:t.meta.get("operation"):bn(this.operationId)?(n=this.operationId)===null||n===void 0?void 0:n.meta.get("operation"):void 0}set operation(t){this.set("operation",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get server(){return this.get("server")}set server(t){this.set("server",t)}},Lx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="mediaType"}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get encoding(){return this.get("encoding")}set encoding(t){this.set("encoding",t)}},U1=class extends Et{constructor(t,n,i){super(t,n,i),this.element="oAuthFlow"}get authorizationUrl(){return this.get("authorizationUrl")}set authorizationUrl(t){this.set("authorizationUrl",t)}get tokenUrl(){return this.get("tokenUrl")}set tokenUrl(t){this.set("tokenUrl",t)}get refreshUrl(){return this.get("refreshUrl")}set refreshUrl(t){this.set("refreshUrl",t)}get scopes(){return this.get("scopes")}set scopes(t){this.set("scopes",t)}},K1=class extends Et{constructor(t,n,i){super(t,n,i),this.element="oAuthFlows"}get implicit(){return this.get("implicit")}set implicit(t){this.set("implicit",t)}get password(){return this.get("password")}set password(t){this.set("password",t)}get clientCredentials(){return this.get("clientCredentials")}set clientCredentials(t){this.set("clientCredentials",t)}get authorizationCode(){return this.get("authorizationCode")}set authorizationCode(t){this.set("authorizationCode",t)}},Fx=class extends nu{constructor(t,n,i){super(t,n,i),this.element="openapi",this.classes.push("spec-version"),this.classes.push("version")}};class V1 extends Et{constructor(n,i,l){super(n,i,l),this.element="openApi3_0",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(n){this.set("openapi",n)}get info(){return this.get("info")}set info(n){this.set("info",n)}get servers(){return this.get("servers")}set servers(n){this.set("servers",n)}get paths(){return this.get("paths")}set paths(n){this.set("paths",n)}get components(){return this.get("components")}set components(n){this.set("components",n)}get security(){return this.get("security")}set security(n){this.set("security",n)}get tags(){return this.get("tags")}set tags(n){this.set("tags",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}}let qx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="operation"}get tags(){return this.get("tags")}set tags(t){this.set("tags",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}set externalDocs(t){this.set("externalDocs",t)}get externalDocs(){return this.get("externalDocs")}get operationId(){return this.get("operationId")}set operationId(t){this.set("operationId",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}get requestBody(){return this.get("requestBody")}set requestBody(t){this.set("requestBody",t)}get responses(){return this.get("responses")}set responses(t){this.set("responses",t)}get callbacks(){return this.get("callbacks")}set callbacks(t){this.set("callbacks",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new ru(!1)}set deprecated(t){this.set("deprecated",t)}get security(){return this.get("security")}set security(t){this.set("security",t)}get servers(){return this.get("severs")}set servers(t){this.set("servers",t)}},zm=class extends Et{constructor(t,n,i){super(t,n,i),this.element="parameter"}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get required(){return this.hasKey("required")?this.get("required"):new ru(!1)}set required(t){this.set("required",t)}get deprecated(){return this.hasKey("deprecated")?this.get("deprecated"):new ru(!1)}set deprecated(t){this.set("deprecated",t)}get allowEmptyValue(){return this.get("allowEmptyValue")}set allowEmptyValue(t){this.set("allowEmptyValue",t)}get style(){return this.get("style")}set style(t){this.set("style",t)}get explode(){return this.get("explode")}set explode(t){this.set("explode",t)}get allowReserved(){return this.get("allowReserved")}set allowReserved(t){this.set("allowReserved",t)}get schema(){return this.get("schema")}set schema(t){this.set("schema",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get examples(){return this.get("examples")}set examples(t){this.set("examples",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}};Object.defineProperty(zm.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0});let Bx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="pathItem"}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}get summary(){return this.get("summary")}set summary(t){this.set("summary",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get GET(){return this.get("get")}set GET(t){this.set("GET",t)}get PUT(){return this.get("put")}set PUT(t){this.set("PUT",t)}get POST(){return this.get("post")}set POST(t){this.set("POST",t)}get DELETE(){return this.get("delete")}set DELETE(t){this.set("DELETE",t)}get OPTIONS(){return this.get("options")}set OPTIONS(t){this.set("OPTIONS",t)}get HEAD(){return this.get("head")}set HEAD(t){this.set("HEAD",t)}get PATCH(){return this.get("patch")}set PATCH(t){this.set("PATCH",t)}get TRACE(){return this.get("trace")}set TRACE(t){this.set("TRACE",t)}get servers(){return this.get("servers")}set servers(t){this.set("servers",t)}get parameters(){return this.get("parameters")}set parameters(t){this.set("parameters",t)}},Ux=class extends Et{constructor(t,n,i){super(t,n,i),this.element="paths"}},Kx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="reference",this.classes.push("openapi-reference")}get $ref(){return this.get("$ref")}set $ref(t){this.set("$ref",t)}},Vx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="requestBody"}get description(){return this.get("description")}set description(t){this.set("description",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get required(){return this.hasKey("required")?this.get("required"):new ru(!1)}set required(t){this.set("required",t)}},Hx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="response"}get description(){return this.get("description")}set description(t){this.set("description",t)}get headers(){return this.get("headers")}set headers(t){this.set("headers",t)}get contentProp(){return this.get("content")}set contentProp(t){this.set("content",t)}get links(){return this.get("links")}set links(t){this.set("links",t)}},Gx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="responses"}get default(){return this.get("default")}set default(t){this.set("default",t)}};class Xx extends Et{constructor(n,i,l){super(n,i,l),this.element="JSONSchemaDraft4"}get idProp(){return this.get("id")}set idProp(n){this.set("id",n)}get $schema(){return this.get("$schema")}set $schema(n){this.set("$schema",n)}get multipleOf(){return this.get("multipleOf")}set multipleOf(n){this.set("multipleOf",n)}get maximum(){return this.get("maximum")}set maximum(n){this.set("maximum",n)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(n){this.set("exclusiveMaximum",n)}get minimum(){return this.get("minimum")}set minimum(n){this.set("minimum",n)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(n){this.set("exclusiveMinimum",n)}get maxLength(){return this.get("maxLength")}set maxLength(n){this.set("maxLength",n)}get minLength(){return this.get("minLength")}set minLength(n){this.set("minLength",n)}get pattern(){return this.get("pattern")}set pattern(n){this.set("pattern",n)}get additionalItems(){return this.get("additionalItems")}set additionalItems(n){this.set("additionalItems",n)}get items(){return this.get("items")}set items(n){this.set("items",n)}get maxItems(){return this.get("maxItems")}set maxItems(n){this.set("maxItems",n)}get minItems(){return this.get("minItems")}set minItems(n){this.set("minItems",n)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(n){this.set("uniqueItems",n)}get maxProperties(){return this.get("maxProperties")}set maxProperties(n){this.set("maxProperties",n)}get minProperties(){return this.get("minProperties")}set minProperties(n){this.set("minProperties",n)}get required(){return this.get("required")}set required(n){this.set("required",n)}get properties(){return this.get("properties")}set properties(n){this.set("properties",n)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(n){this.set("additionalProperties",n)}get patternProperties(){return this.get("patternProperties")}set patternProperties(n){this.set("patternProperties",n)}get dependencies(){return this.get("dependencies")}set dependencies(n){this.set("dependencies",n)}get enum(){return this.get("enum")}set enum(n){this.set("enum",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}get allOf(){return this.get("allOf")}set allOf(n){this.set("allOf",n)}get anyOf(){return this.get("anyOf")}set anyOf(n){this.set("anyOf",n)}get oneOf(){return this.get("oneOf")}set oneOf(n){this.set("oneOf",n)}get not(){return this.get("not")}set not(n){this.set("not",n)}get definitions(){return this.get("definitions")}set definitions(n){this.set("definitions",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get description(){return this.get("description")}set description(n){this.set("description",n)}get default(){return this.get("default")}set default(n){this.set("default",n)}get format(){return this.get("format")}set format(n){this.set("format",n)}get base(){return this.get("base")}set base(n){this.set("base",n)}get links(){return this.get("links")}set links(n){this.set("links",n)}get media(){return this.get("media")}set media(n){this.set("media",n)}get readOnly(){return this.get("readOnly")}set readOnly(n){this.set("readOnly",n)}}class H1 extends Et{constructor(n,i,l){super(n,i,l),this.element="JSONReference",this.classes.push("json-reference")}get $ref(){return this.get("$ref")}set $ref(n){this.set("$ref",n)}}class G1 extends Et{constructor(n,i,l){super(n,i,l),this.element="media"}get binaryEncoding(){return this.get("binaryEncoding")}set binaryEncoding(n){this.set("binaryEncoding",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}}class X1 extends Et{constructor(n,i,l){super(n,i,l),this.element="linkDescription"}get href(){return this.get("href")}set href(n){this.set("href",n)}get rel(){return this.get("rel")}set rel(n){this.set("rel",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get targetSchema(){return this.get("targetSchema")}set targetSchema(n){this.set("targetSchema",n)}get mediaType(){return this.get("mediaType")}set mediaType(n){this.set("mediaType",n)}get method(){return this.get("method")}set method(n){this.set("method",n)}get encType(){return this.get("encType")}set encType(n){this.set("encType",n)}get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}const D7={namespace:t=>{const{base:n}=t;return n.register("jSONSchemaDraft4",Xx),n.register("jSONReference",H1),n.register("media",G1),n.register("linkDescription",X1),n}},P7=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},M7={JSONSchemaDraft4Element:["content"],JSONReferenceElement:["content"],MediaElement:["content"],LinkDescriptionElement:["content"],...Tm};let JD=class{element;constructor(t){Object.assign(this,t)}copyMetaAndAttributes(t,n){(t.meta.length>0||n.meta.length>0)&&(n.meta=Gl(n.meta,t.meta),Cx(t)&&n.meta.set("sourceMap",t.meta.get("sourceMap"))),(t.attributes.length>0||t.meta.length>0)&&(n.attributes=Gl(n.attributes,t.attributes))}},ds=class extends JD{enter(t){return this.element=At(t),Gn}};const WD=(t,n,i=[])=>{const l=Object.getOwnPropertyDescriptors(n);for(let p of i)delete l[p];Object.defineProperties(t,l)},Yx=(t,n=[t])=>{const i=Object.getPrototypeOf(t);return i===null?n:Yx(i,[...n,i])},QD=(t,n,i=[])=>{var l;const p=(l=((...S)=>{if(S.length===0)return;let C;const N=S.map((D=>Yx(D)));for(;N.every((D=>D.length>0));){const D=N.map((L=>L.pop())),$=D[0];if(!D.every((L=>L===$)))break;C=$}return C})(...t))!==null&&l!==void 0?l:Object.prototype,v=Object.create(p),x=Yx(p);for(let S of t){let C=Yx(S);for(let N=C.length-1;N>=0;N--){let D=C[N];x.indexOf(D)===-1&&(WD(v,D,["constructor",...i]),x.push(D))}}return v.constructor=n,v},vk=t=>t.filter(((n,i)=>t.indexOf(n)==i)),eP=new WeakMap,I7=t=>eP.get(t),tP=(t,n)=>{var i,l;const p=vk([...Object.getOwnPropertyNames(t),...Object.getOwnPropertyNames(n)]),v={};for(let x of p)v[x]=vk([...(i=t?.[x])!==null&&i!==void 0?i:[],...(l=n?.[x])!==null&&l!==void 0?l:[]]);return v},nP=(t,n)=>{var i,l,p,v;return{property:tP((i=t?.property)!==null&&i!==void 0?i:{},(l=n?.property)!==null&&l!==void 0?l:{}),method:tP((p=t?.method)!==null&&p!==void 0?p:{},(v=n?.method)!==null&&v!==void 0?v:{})}},z7=new Map;function wt(...t){var n,i,l;const p=t.map((N=>N.prototype));function v(...N){for(const D of t)WD(this,new D(...N))}v.prototype=QD(p,v),Object.setPrototypeOf(v,QD(t,null,["prototype"]));let x=v;{const N=((...D)=>{const $=((...L)=>{var U;const J=new Set,Y=new Set([...L]);for(;Y.size>0;)for(let Z of Y){const P=[...Yx(Z.prototype).map((re=>re.constructor)),...(U=I7(Z))!==null&&U!==void 0?U:[]].filter((re=>!J.has(re)));for(let re of P)Y.add(re);J.add(Z),Y.delete(Z)}return[...J]})(...D).map((L=>z7.get(L))).filter((L=>!!L));return $.length==0?{}:$.length==1?$[0]:$.reduce(((L,U)=>((J,Y)=>{var Z,P,re,le,he,xe;return{class:vk([...(Z=J?.class)!==null&&Z!==void 0?Z:[],...(P=Y?.class)!==null&&P!==void 0?P:[]]),static:nP((re=J?.static)!==null&&re!==void 0?re:{},(le=Y?.static)!==null&&le!==void 0?le:{}),instance:nP((he=J?.instance)!==null&&he!==void 0?he:{},(xe=Y?.instance)!==null&&xe!==void 0?xe:{})}})(L,U)))})(...t);for(let D of(n=N?.class)!==null&&n!==void 0?n:[]){const $=D(x);$&&(x=$)}rP((i=N?.static)!==null&&i!==void 0?i:{},x),rP((l=N?.instance)!==null&&l!==void 0?l:{},x.prototype)}var S,C;return S=x,C=t,eP.set(S,C),x}const rP=(t,n)=>{const i=t.property,l=t.method;if(i)for(let p in i)for(let v of i[p])v(n,p);if(l)for(let p in l)for(let v of l[p])v(n,p,Object.getOwnPropertyDescriptor(n,p))};let Rd=class extends JD{specObj;passingOptionsNames=["specObj"];constructor({specObj:t,...n}){super({...n}),this.specObj=t}retrievePassingOptions(){return K$(this.passingOptionsNames,this)}retrieveFixedFields(t){const n=la(["visitors",...t,"fixedFields"],this.specObj);return typeof n=="object"&&n!==null?Object.keys(n):[]}retrieveVisitor(t){return i1(Yc,["visitors",...t],this.specObj)?la(["visitors",...t],this.specObj):la(["visitors",...t,"$visitor"],this.specObj)}retrieveVisitorInstance(t,n={}){const i=this.retrievePassingOptions();return new(this.retrieveVisitor(t))({...i,...n})}toRefractedElement(t,n,i={}){const l=this.retrieveVisitorInstance(t,i);return l instanceof ds&&l?.constructor===ds?At(n):(bi(n,l,i),l.element)}},Zx=class extends Rd{specPath;ignoredFields;constructor({specPath:t,ignoredFields:n,...i}){super({...i}),this.specPath=t,this.ignoredFields=n||[]}ObjectElement(t){const n=this.specPath(t),i=this.retrieveFixedFields(n);return t.forEach(((l,p,v)=>{if(bn(p)&&i.includes(st(p))&&!this.ignoredFields.includes(st(p))){const x=this.toRefractedElement([...n,"fixedFields",st(p)],l),S=new Ex(At(p),x);this.copyMetaAndAttributes(v,S),S.classes.push("fixed-field"),this.element.content.push(S)}else this.ignoredFields.includes(st(p))||this.element.content.push(At(v))})),this.copyMetaAndAttributes(t,this.element),Gn}};class L7 extends wt(Zx,ds){constructor(n){super(n),this.element=new Xx,this.specPath=tn(["document","objects","JSONSchema"])}}let lu=class{parent;constructor({parent:t}){this.parent=t}};const Zl=t=>Bn(t)&&t.hasKey("$ref");let F7=class extends wt(Rd,lu,ds){ObjectElement(t){const n=Zl(t)?["document","objects","JSONReference"]:["document","objects","JSONSchema"];return this.element=this.toRefractedElement(n,t),Gn}ArrayElement(t){return this.element=new ur,this.element.classes.push("json-schema-items"),t.forEach((n=>{const i=Zl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},q7=class extends Rd{specPath;ignoredFields;fieldPatternPredicate=mm;constructor({specPath:t,ignoredFields:n,fieldPatternPredicate:i,...l}){super({...l}),this.specPath=t,this.ignoredFields=n||[],typeof i=="function"&&(this.fieldPatternPredicate=i)}ObjectElement(t){return t.forEach(((n,i,l)=>{if(!this.ignoredFields.includes(st(i))&&this.fieldPatternPredicate(st(i))){const p=this.specPath(n),v=this.toRefractedElement(p,n),x=new Ex(At(i),v);this.copyMetaAndAttributes(l,x),x.classes.push("patterned-field"),this.element.content.push(x)}else this.ignoredFields.includes(st(i))||this.element.content.push(At(l))})),this.copyMetaAndAttributes(t,this.element),Gn}},Y1=class extends q7{constructor(t){super(t),this.fieldPatternPredicate=vO}},B7=class extends wt(Y1,lu,ds){constructor(t){super(t),this.element=new Et,this.element.classes.push("json-schema-properties"),this.specPath=n=>Zl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}},U7=class extends wt(Y1,lu,ds){constructor(t){super(t),this.element=new Et,this.element.classes.push("json-schema-patternProperties"),this.specPath=n=>Zl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}};class K7 extends wt(Y1,lu,ds){constructor(n){super(n),this.element=new Et,this.element.classes.push("json-schema-dependencies"),this.specPath=i=>Zl(i)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let V7=class extends wt(Rd,lu,ds){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-allOf")}ArrayElement(t){return t.forEach((n=>{const i=Zl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},H7=class extends wt(Rd,lu,ds){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-anyOf")}ArrayElement(t){return t.forEach((n=>{const i=Zl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},G7=class extends wt(Rd,lu,ds){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-oneOf")}ArrayElement(t){return t.forEach((n=>{const i=Zl(n)?["document","objects","JSONReference"]:["document","objects","JSONSchema"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}};class X7 extends wt(Y1,lu,ds){constructor(n){super(n),this.element=new Et,this.element.classes.push("json-schema-definitions"),this.specPath=i=>Zl(i)?["document","objects","JSONReference"]:["document","objects","JSONSchema"]}}let Y7=class extends wt(Rd,lu,ds){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-links")}ArrayElement(t){return t.forEach((n=>{const i=this.toRefractedElement(["document","objects","LinkDescription"],n);this.element.push(i)})),this.copyMetaAndAttributes(t,this.element),Gn}};class Z7 extends wt(Zx,ds){constructor(n){super(n),this.element=new H1,this.specPath=tn(["document","objects","JSONReference"])}ObjectElement(n){const i=Zx.prototype.ObjectElement.call(this,n);return bn(this.element.$ref)&&this.element.classes.push("reference-element"),i}}let J7=class extends Rd{alternator;constructor({alternator:t,...n}){super({...n}),this.alternator=t}enter(t){const n=this.alternator.map((({predicate:l,specPath:p})=>hO(l,tn(p),o1))),i=Q$(n)(t);return this.element=this.toRefractedElement(i,t),Gn}},Lm=class extends J7{constructor(t){super(t),this.alternator=[{predicate:Zl,specPath:["document","objects","JSONReference"]},{predicate:xi,specPath:["document","objects","JSONSchema"]}]}};class W7 extends wt(Zx,ds){constructor(n){super(n),this.element=new G1,this.specPath=tn(["document","objects","Media"])}}class Q7 extends wt(Zx,ds){constructor(n){super(n),this.element=new X1,this.specPath=tn(["document","objects","LinkDescription"])}}const cu={visitors:{value:ds,JSONSchemaOrJSONReferenceVisitor:Lm,document:{objects:{JSONSchema:{$visitor:L7,fixedFields:{id:{$ref:"#/visitors/value"},$schema:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},additionalItems:Lm,items:F7,maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:class extends ds{ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-required"),n}},properties:B7,additionalProperties:Lm,patternProperties:U7,dependencies:K7,enum:class extends ds{ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-enum"),n}},type:class extends ds{StringElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-type"),n}ArrayElement(t){const n=this.enter(t);return this.element.classes.push("json-schema-type"),n}},allOf:V7,anyOf:H7,oneOf:G7,not:Lm,definitions:X7,title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},format:{$ref:"#/visitors/value"},base:{$ref:"#/visitors/value"},links:Y7,media:{$ref:"#/visitors/document/objects/Media"},readOnly:{$ref:"#/visitors/value"}}},JSONReference:{$visitor:Z7,fixedFields:{$ref:class extends ds{StringElement(t){const n=this.enter(t);return this.element.classes.push("reference-value"),n}}}},Media:{$visitor:W7,fixedFields:{binaryEncoding:{$ref:"#/visitors/value"},type:{$ref:"#/visitors/value"}}},LinkDescription:{$visitor:Q7,fixedFields:{href:{$ref:"#/visitors/value"},rel:{$ref:"#/visitors/value"},title:{$ref:"#/visitors/value"},targetSchema:Lm,mediaType:{$ref:"#/visitors/value"},method:{$ref:"#/visitors/value"},encType:{$ref:"#/visitors/value"},schema:Lm}}}}}},e9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Xx||t(l)&&n("JSONSchemaDraft4",l)&&i("object",l))),t9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof H1||t(l)&&n("JSONReference",l)&&i("object",l))),n9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof G1||t(l)&&n("media",l)&&i("object",l))),r9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof X1||t(l)&&n("linkDescription",l)&&i("object",l))),s9=Object.freeze(Object.defineProperty({__proto__:null,isJSONReferenceElement:t9,isJSONSchemaElement:e9,isLinkDescriptionElement:r9,isMediaElement:n9},Symbol.toStringTag,{value:"Module"})),i9=()=>{const t=Ax(D7);return{predicates:{...s9,isStringElement:bn},namespace:t}},Z1=t=>(n,i={})=>((l,{specPath:p=["visitors","document","objects","JSONSchema","$visitor"],plugins:v=[],specificationObj:x=cu}={})=>{const S=GO(l),C=P1(x),N=new(la(p,C))({specObj:C});return bi(S,N),_m(N.element,v,{toolboxCreator:i9,visitorOptions:{keyMap:M7,nodeTypeGetter:P7}})})(n,{specPath:t,...i});Xx.refract=Z1(["visitors","document","objects","JSONSchema","$visitor"]),H1.refract=Z1(["visitors","document","objects","JSONReference","$visitor"]),G1.refract=Z1(["visitors","document","objects","Media","$visitor"]),X1.refract=Z1(["visitors","document","objects","LinkDescription","$visitor"]);let J1=class extends Xx{constructor(t,n,i){super(t,n,i),this.element="schema",this.classes.push("json-schema-draft-4")}get idProp(){throw new Kr("idProp getter in Schema class is not not supported.")}set idProp(t){throw new Kr("idProp setter in Schema class is not not supported.")}get $schema(){throw new Kr("$schema getter in Schema class is not not supported.")}set $schema(t){throw new Kr("$schema setter in Schema class is not not supported.")}get additionalItems(){return this.get("additionalItems")}set additionalItems(t){this.set("additionalItems",t)}get items(){return this.get("items")}set items(t){this.set("items",t)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(t){this.set("additionalProperties",t)}get patternProperties(){throw new Kr("patternProperties getter in Schema class is not not supported.")}set patternProperties(t){throw new Kr("patternProperties setter in Schema class is not not supported.")}get dependencies(){throw new Kr("dependencies getter in Schema class is not not supported.")}set dependencies(t){throw new Kr("dependencies setter in Schema class is not not supported.")}get type(){return this.get("type")}set type(t){this.set("type",t)}get not(){return this.get("not")}set not(t){this.set("not",t)}get definitions(){throw new Kr("definitions getter in Schema class is not not supported.")}set definitions(t){throw new Kr("definitions setter in Schema class is not not supported.")}get base(){throw new Kr("base getter in Schema class is not not supported.")}set base(t){throw new Kr("base setter in Schema class is not not supported.")}get links(){throw new Kr("links getter in Schema class is not not supported.")}set links(t){throw new Kr("links setter in Schema class is not not supported.")}get media(){throw new Kr("media getter in Schema class is not not supported.")}set media(t){throw new Kr("media setter in Schema class is not not supported.")}get nullable(){return this.get("nullable")}set nullable(t){this.set("nullable",t)}get discriminator(){return this.get("discriminator")}set discriminator(t){this.set("discriminator",t)}get writeOnly(){return this.get("writeOnly")}set writeOnly(t){this.set("writeOnly",t)}get xml(){return this.get("xml")}set xml(t){this.set("xml",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}get example(){return this.get("example")}set example(t){this.set("example",t)}get deprecated(){return this.get("deprecated")}set deprecated(t){this.set("deprecated",t)}},Jx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="securityRequirement"}},Wx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="securityScheme"}get type(){return this.get("type")}set type(t){this.set("type",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get name(){return this.get("name")}set name(t){this.set("name",t)}get in(){return this.get("in")}set in(t){this.set("in",t)}get scheme(){return this.get("scheme")}set scheme(t){this.set("scheme",t)}get bearerFormat(){return this.get("bearerFormat")}set bearerFormat(t){this.set("bearerFormat",t)}get flows(){return this.get("flows")}set flows(t){this.set("flows",t)}get openIdConnectUrl(){return this.get("openIdConnectUrl")}set openIdConnectUrl(t){this.set("openIdConnectUrl",t)}},Qx=class extends Et{constructor(t,n,i){super(t,n,i),this.element="server"}get url(){return this.get("url")}set url(t){this.set("url",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get variables(){return this.get("variables")}set variables(t){this.set("variables",t)}},eb=class extends Et{constructor(t,n,i){super(t,n,i),this.element="serverVariable"}get enum(){return this.get("enum")}set enum(t){this.set("enum",t)}get default(){return this.get("default")}set default(t){this.set("default",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}},W1=class extends Et{constructor(t,n,i){super(t,n,i),this.element="tag"}get name(){return this.get("name")}set name(t){this.set("name",t)}get description(){return this.get("description")}set description(t){this.set("description",t)}get externalDocs(){return this.get("externalDocs")}set externalDocs(t){this.set("externalDocs",t)}},Q1=class extends Et{constructor(t,n,i){super(t,n,i),this.element="xml"}get name(){return this.get("name")}set name(t){this.set("name",t)}get namespace(){return this.get("namespace")}set namespace(t){this.set("namespace",t)}get prefix(){return this.get("prefix")}set prefix(t){this.set("prefix",t)}get attribute(){return this.get("attribute")}set attribute(t){this.set("attribute",t)}get wrapped(){return this.get("wrapped")}set wrapped(t){this.set("wrapped",t)}};const a9={namespace:t=>{const{base:n}=t;return n.register("callback",_x),n.register("components",$x),n.register("contact",Nx),n.register("discriminator",q1),n.register("encoding",B1),n.register("example",Dx),n.register("externalDocumentation",Px),n.register("header",Im),n.register("info",Mx),n.register("license",Ix),n.register("link",zx),n.register("mediaType",Lx),n.register("oAuthFlow",U1),n.register("oAuthFlows",K1),n.register("openapi",Fx),n.register("openApi3_0",V1),n.register("operation",qx),n.register("parameter",zm),n.register("pathItem",Bx),n.register("paths",Ux),n.register("reference",Kx),n.register("requestBody",Vx),n.register("response",Hx),n.register("responses",Gx),n.register("schema",J1),n.register("securityRequirement",Jx),n.register("securityScheme",Wx),n.register("server",Qx),n.register("serverVariable",eb),n.register("tag",W1),n.register("xml",Q1),n}};class eE extends ur{static primaryClass="servers";constructor(n,i,l){super(n,i,l),this.classes.push(eE.primaryClass)}}class xk extends ur{static primaryClass="security";constructor(n,i,l){super(n,i,l),this.classes.push(xk.primaryClass)}}class bk extends ur{static primaryClass="tags";constructor(n,i,l){super(n,i,l),this.classes.push(bk.primaryClass)}}class wk extends Et{static primaryClass="server-variables";constructor(n,i,l){super(n,i,l),this.classes.push(wk.primaryClass)}}class tE extends Et{static primaryClass="components-schemas";constructor(n,i,l){super(n,i,l),this.classes.push(tE.primaryClass)}}class Sk extends Et{static primaryClass="components-responses";constructor(n,i,l){super(n,i,l),this.classes.push(Sk.primaryClass)}}class Ek extends Et{static primaryClass="components-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(Ek.primaryClass),this.classes.push("parameters")}}class jk extends Et{static primaryClass="components-examples";constructor(n,i,l){super(n,i,l),this.classes.push(jk.primaryClass),this.classes.push("examples")}}class Ck extends Et{static primaryClass="components-request-bodies";constructor(n,i,l){super(n,i,l),this.classes.push(Ck.primaryClass)}}class Ak extends Et{static primaryClass="components-headers";constructor(n,i,l){super(n,i,l),this.classes.push(Ak.primaryClass)}}class Ok extends Et{static primaryClass="components-security-schemes";constructor(n,i,l){super(n,i,l),this.classes.push(Ok.primaryClass)}}class kk extends Et{static primaryClass="components-links";constructor(n,i,l){super(n,i,l),this.classes.push(kk.primaryClass)}}class Rk extends Et{static primaryClass="components-callbacks";constructor(n,i,l){super(n,i,l),this.classes.push(Rk.primaryClass)}}class Tk extends ur{static primaryClass="path-item-servers";constructor(n,i,l){super(n,i,l),this.classes.push(Tk.primaryClass),this.classes.push("servers")}}class _k extends ur{static primaryClass="path-item-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(_k.primaryClass),this.classes.push("parameters")}}class nE extends ur{static primaryClass="operation-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(nE.primaryClass),this.classes.push("parameters")}}class $k extends Et{static primaryClass="parameter-examples";constructor(n,i,l){super(n,i,l),this.classes.push($k.primaryClass),this.classes.push("examples")}}class Nk extends Et{static primaryClass="parameter-content";constructor(n,i,l){super(n,i,l),this.classes.push(Nk.primaryClass),this.classes.push("content")}}class Dk extends ur{static primaryClass="operation-tags";constructor(n,i,l){super(n,i,l),this.classes.push(Dk.primaryClass)}}class Pk extends Et{static primaryClass="operation-callbacks";constructor(n,i,l){super(n,i,l),this.classes.push(Pk.primaryClass)}}class rE extends ur{static primaryClass="operation-security";constructor(n,i,l){super(n,i,l),this.classes.push(rE.primaryClass),this.classes.push("security")}}class Mk extends ur{static primaryClass="operation-servers";constructor(n,i,l){super(n,i,l),this.classes.push(Mk.primaryClass),this.classes.push("servers")}}class Ik extends Et{static primaryClass="request-body-content";constructor(n,i,l){super(n,i,l),this.classes.push(Ik.primaryClass),this.classes.push("content")}}class zk extends Et{static primaryClass="media-type-examples";constructor(n,i,l){super(n,i,l),this.classes.push(zk.primaryClass),this.classes.push("examples")}}class Lk extends Et{static primaryClass="media-type-encoding";constructor(n,i,l){super(n,i,l),this.classes.push(Lk.primaryClass)}}class Fk extends Et{static primaryClass="encoding-headers";constructor(n,i,l){super(n,i,l),this.classes.push(Fk.primaryClass)}}class qk extends Et{static primaryClass="response-headers";constructor(n,i,l){super(n,i,l),this.classes.push(qk.primaryClass)}}class Bk extends Et{static primaryClass="response-content";constructor(n,i,l){super(n,i,l),this.classes.push(Bk.primaryClass),this.classes.push("content")}}class Uk extends Et{static primaryClass="response-links";constructor(n,i,l){super(n,i,l),this.classes.push(Uk.primaryClass)}}class Kk extends Et{static primaryClass="discriminator-mapping";constructor(n,i,l){super(n,i,l),this.classes.push(Kk.primaryClass)}}class Vk extends Et{static primaryClass="oauth-flow-scopes";constructor(n,i,l){super(n,i,l),this.classes.push(Vk.primaryClass)}}class Hk extends Et{static primaryClass="link-parameters";constructor(n,i,l){super(n,i,l),this.classes.push(Hk.primaryClass)}}class Gk extends Et{static primaryClass="header-examples";constructor(n,i,l){super(n,i,l),this.classes.push(Gk.primaryClass),this.classes.push("examples")}}class Xk extends Et{static primaryClass="header-content";constructor(n,i,l){super(n,i,l),this.classes.push(Xk.primaryClass),this.classes.push("content")}}const o9=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},l9={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_0Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Tm};class sP{element;constructor(n={}){Object.assign(this,n)}copyMetaAndAttributes(n,i){(n.meta.length>0||i.meta.length>0)&&(i.meta=Gl(i.meta,n.meta),Cx(n)&&i.meta.set("sourceMap",n.meta.get("sourceMap"))),(n.attributes.length>0||n.meta.length>0)&&(i.attributes=Gl(i.attributes,n.attributes))}}class xt extends sP{enter(n){return this.element=At(n),Gn}}class Li extends sP{specObj;passingOptionsNames=["specObj","openApiGenericElement","openApiSemanticElement"];openApiGenericElement;openApiSemanticElement;constructor({specObj:n,passingOptionsNames:i,openApiGenericElement:l,openApiSemanticElement:p,...v}){super({...v}),this.specObj=n,this.openApiGenericElement=l,this.openApiSemanticElement=p,Array.isArray(i)&&(this.passingOptionsNames=i)}retrievePassingOptions(){return K$(this.passingOptionsNames,this)}retrieveFixedFields(n){const i=la(["visitors",...n,"fixedFields"],this.specObj);return typeof i=="object"&&i!==null?Object.keys(i):[]}retrieveVisitor(n){return i1(Yc,["visitors",...n],this.specObj)?la(["visitors",...n],this.specObj):la(["visitors",...n,"$visitor"],this.specObj)}retrieveVisitorInstance(n,i={}){const l=this.retrievePassingOptions();return new(this.retrieveVisitor(n))({...l,...i})}toRefractedElement(n,i,l={}){const p=this.retrieveVisitorInstance(n,l);return p instanceof xt&&p?.constructor===xt?At(i):(bi(i,p,l),p.element)}}const Sr=t=>Bn(t)&&t.hasKey("$ref"),c9=Bn,u9=Bn,iP=t=>bn(t.key)&&H$("x-",st(t.key));class wn extends Li{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=iP;constructor({specPath:n,ignoredFields:i,canSupportSpecificationExtensions:l,specificationExtensionPredicate:p,...v}){super({...v}),this.specPath=n,this.ignoredFields=i||[],typeof l=="boolean"&&(this.canSupportSpecificationExtensions=l),typeof p=="function"&&(this.specificationExtensionPredicate=p)}ObjectElement(n){const i=this.specPath(n),l=this.retrieveFixedFields(i);return n.forEach(((p,v,x)=>{if(bn(v)&&l.includes(st(v))&&!this.ignoredFields.includes(st(v))){const S=this.toRefractedElement([...i,"fixedFields",st(v)],p),C=new Ex(At(v),S);this.copyMetaAndAttributes(x,C),C.classes.push("fixed-field"),this.element.content.push(C)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(x)){const S=this.toRefractedElement(["document","extension"],x);this.element.content.push(S)}else this.ignoredFields.includes(st(v))||this.element.content.push(At(x))})),this.copyMetaAndAttributes(n,this.element),Gn}}class d9 extends wt(wn,xt){constructor(n){super(n),this.element=new V1,this.specPath=tn(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0}ObjectElement(n){return wn.prototype.ObjectElement.call(this,n)}}class h9 extends wt(Li,xt){StringElement(n){const i=new Fx(st(n));return this.copyMetaAndAttributes(n,i),this.element=i,Gn}}let p9=class extends wt(wn,xt){constructor(t){super(t),this.element=new Mx,this.specPath=tn(["document","objects","Info"]),this.canSupportSpecificationExtensions=!0}},f9=class extends wt(wn,xt){constructor(t){super(t),this.element=new Nx,this.specPath=tn(["document","objects","Contact"]),this.canSupportSpecificationExtensions=!0}},m9=class extends wt(wn,xt){constructor(t){super(t),this.element=new Ix,this.specPath=tn(["document","objects","License"]),this.canSupportSpecificationExtensions=!0}},g9=class extends wt(wn,xt){constructor(t){super(t),this.element=new zx,this.specPath=tn(["document","objects","Link"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return(bn(this.element.operationId)||bn(this.element.operationRef))&&this.element.classes.push("reference-element"),n}};class Fm extends Li{specPath;ignoredFields;fieldPatternPredicate=mm;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=iP;constructor({specPath:n,ignoredFields:i,fieldPatternPredicate:l,canSupportSpecificationExtensions:p,specificationExtensionPredicate:v,...x}){super({...x}),this.specPath=n,this.ignoredFields=i||[],typeof l=="function"&&(this.fieldPatternPredicate=l),typeof p=="boolean"&&(this.canSupportSpecificationExtensions=p),typeof v=="function"&&(this.specificationExtensionPredicate=v)}ObjectElement(n){return n.forEach(((i,l,p)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(p)){const v=this.toRefractedElement(["document","extension"],p);this.element.content.push(v)}else if(!this.ignoredFields.includes(st(l))&&this.fieldPatternPredicate(st(l))){const v=this.specPath(i),x=this.toRefractedElement(v,i),S=new Ex(At(l),x);this.copyMetaAndAttributes(p,S),S.classes.push("patterned-field"),this.element.content.push(S)}else this.ignoredFields.includes(st(l))||this.element.content.push(At(p))})),this.copyMetaAndAttributes(n,this.element),Gn}}class un extends Fm{constructor(n){super(n),this.fieldPatternPredicate=vO}}let y9=class extends wt(un,xt){constructor(t){super(t),this.element=new Hk,this.specPath=tn(["value"])}},v9=class extends wt(wn,xt){constructor(t){super(t),this.element=new Qx,this.specPath=tn(["document","objects","Server"]),this.canSupportSpecificationExtensions=!0}},Yk=class extends wt(Li,xt){constructor(t){super(t),this.element=new eE}ArrayElement(t){return t.forEach((n=>{const i=c9(n)?["document","objects","Server"]:["value"],l=this.toRefractedElement(i,n);this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}},x9=class extends wt(wn,xt){constructor(t){super(t),this.element=new eb,this.specPath=tn(["document","objects","ServerVariable"]),this.canSupportSpecificationExtensions=!0}};class b9 extends wt(un,xt){constructor(n){super(n),this.element=new wk,this.specPath=tn(["document","objects","ServerVariable"])}}let w9=class extends wt(wn,xt){constructor(t){super(t),this.element=new Lx,this.specPath=tn(["document","objects","MediaType"]),this.canSupportSpecificationExtensions=!0}};class Jl extends Li{alternator;constructor({alternator:n,...i}){super({...i}),this.alternator=n||[]}enter(n){const i=this.alternator.map((({predicate:p,specPath:v})=>hO(p,tn(v),o1))),l=Q$(i)(n);return this.element=this.toRefractedElement(l,n),Gn}}const S9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof _x||t(l)&&n("callback",l)&&i("object",l))),E9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof $x||t(l)&&n("components",l)&&i("object",l))),j9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Nx||t(l)&&n("contact",l)&&i("object",l))),C9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Dx||t(l)&&n("example",l)&&i("object",l))),A9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Px||t(l)&&n("externalDocumentation",l)&&i("object",l))),qm=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Im||t(l)&&n("header",l)&&i("object",l))),O9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Mx||t(l)&&n("info",l)&&i("object",l))),k9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ix||t(l)&&n("license",l)&&i("object",l))),R9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof zx||t(l)&&n("link",l)&&i("object",l))),T9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Fx||t(l)&&n("openapi",l)&&i("string",l))),_9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>p=>p instanceof V1||t(p)&&n("openApi3_0",p)&&i("object",p)&&l("api",p))),aP=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof qx||t(l)&&n("operation",l)&&i("object",l))),$9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof zm||t(l)&&n("parameter",l)&&i("object",l))),Zk=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Bx||t(l)&&n("pathItem",l)&&i("object",l))),N9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Ux||t(l)&&n("paths",l)&&i("object",l))),vr=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Kx||t(l)&&n("reference",l)&&i("object",l))),D9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Vx||t(l)&&n("requestBody",l)&&i("object",l))),sE=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Hx||t(l)&&n("response",l)&&i("object",l))),P9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Gx||t(l)&&n("responses",l)&&i("object",l))),M9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof J1||t(l)&&n("schema",l)&&i("object",l))),I9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Jx||t(l)&&n("securityRequirement",l)&&i("object",l))),z9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Wx||t(l)&&n("securityScheme",l)&&i("object",l))),L9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Qx||t(l)&&n("server",l)&&i("object",l))),F9=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof eb||t(l)&&n("serverVariable",l)&&i("object",l))),iE=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof Lx||t(l)&&n("mediaType",l)&&i("object",l))),oP=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>p=>p instanceof eE||t(p)&&n("array",p)&&i("array",p)&&l("servers",p))),q9=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:t=>jx(t)&&t.classes.includes("boolean-json-schema"),isCallbackElement:S9,isComponentsElement:E9,isContactElement:j9,isExampleElement:C9,isExternalDocumentationElement:A9,isHeaderElement:qm,isInfoElement:O9,isLicenseElement:k9,isLinkElement:R9,isMediaTypeElement:iE,isOpenApi3_0Element:_9,isOpenapiElement:T9,isOperationElement:aP,isParameterElement:$9,isPathItemElement:Zk,isPathsElement:N9,isReferenceElement:vr,isRequestBodyElement:D9,isResponseElement:sE,isResponsesElement:P9,isSchemaElement:M9,isSecurityRequirementElement:I9,isSecuritySchemeElement:z9,isServerElement:L9,isServerVariableElement:F9,isServersElement:oP},Symbol.toStringTag,{value:"Module"}));let B9=class extends wt(Jl,xt){constructor(t){super(t),this.alternator=[{predicate:Sr,specPath:["document","objects","Reference"]},{predicate:xi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Jl.prototype.enter.call(this,t);return vr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},Jk=class extends wt(un,xt){constructor(t){super(t),this.element=new Et,this.element.classes.push("examples"),this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Example"],this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","example")})),n}},U9=class extends wt(un,xt){constructor(t){super(t),this.element=new Lk,this.specPath=tn(["document","objects","Encoding"])}},K9=class extends wt(un,xt){constructor(t){super(t),this.element=new Jx,this.specPath=tn(["value"])}},V9=class extends wt(Li,xt){constructor(t){super(t),this.element=new xk}ArrayElement(t){return t.forEach((n=>{if(Bn(n)){const i=this.toRefractedElement(["document","objects","SecurityRequirement"],n);this.element.push(i)}else this.element.push(At(n))})),this.copyMetaAndAttributes(t,this.element),Gn}},H9=class extends wt(wn,xt){constructor(t){super(t),this.element=new $x,this.specPath=tn(["document","objects","Components"]),this.canSupportSpecificationExtensions=!0}},G9=class extends wt(wn,xt){constructor(t){super(t),this.element=new W1,this.specPath=tn(["document","objects","Tag"]),this.canSupportSpecificationExtensions=!0}},X9=class extends wt(wn,xt){constructor(t){super(t),this.element=new Kx,this.specPath=tn(["document","objects","Reference"]),this.canSupportSpecificationExtensions=!1}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return bn(this.element.$ref)&&this.element.classes.push("reference-element"),n}},Y9=class extends wt(wn,xt){constructor(t){super(t),this.element=new zm,this.specPath=tn(["document","objects","Parameter"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return Bn(this.element.contentProp)&&this.element.contentProp.filter(iE).forEach(((i,l)=>{i.setMetaProperty("media-type",st(l))})),n}},Z9=class extends wt(Jl,xt){constructor(t){super(t),this.alternator=[{predicate:Sr,specPath:["document","objects","Reference"]},{predicate:xi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Jl.prototype.enter.call(this,t);return vr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},J9=class extends wt(wn,xt){constructor(t){super(t),this.element=new Im,this.specPath=tn(["document","objects","Header"]),this.canSupportSpecificationExtensions=!0}},W9=class extends wt(Jl,xt){constructor(t){super(t),this.alternator=[{predicate:Sr,specPath:["document","objects","Reference"]},{predicate:xi,specPath:["document","objects","Schema"]}]}ObjectElement(t){const n=Jl.prototype.enter.call(this,t);return vr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}},aE=class extends wt(un,xt){constructor(t){super(t),this.element=new Et,this.element.classes.push("content"),this.specPath=tn(["document","objects","MediaType"])}},Q9=class extends wt(wn,xt){constructor(t){super(t),this.element=new J1,this.specPath=tn(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0}};const{allOf:lP}=cu.visitors.document.objects.JSONSchema.fixedFields,{anyOf:cP}=cu.visitors.document.objects.JSONSchema.fixedFields,{oneOf:uP}=cu.visitors.document.objects.JSONSchema.fixedFields,{items:dP}=cu.visitors.document.objects.JSONSchema.fixedFields,{properties:hP}=cu.visitors.document.objects.JSONSchema.fixedFields,{type:eH}=cu.visitors.document.objects.JSONSchema.fixedFields,{JSONSchemaOrJSONReferenceVisitor:pP}=cu.visitors;class fP extends pP{ObjectElement(n){const i=pP.prototype.enter.call(this,n);return vr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),i}}let tH=class extends wt(wn,xt){constructor(t){super(t),this.element=new q1,this.specPath=tn(["document","objects","Discriminator"]),this.canSupportSpecificationExtensions=!1}};class nH extends wt(un,xt){constructor(n){super(n),this.element=new Kk,this.specPath=tn(["value"])}}let rH=class extends wt(wn,xt){constructor(t){super(t),this.element=new Q1,this.specPath=tn(["document","objects","XML"]),this.canSupportSpecificationExtensions=!0}},sH=class extends wt(un,xt){constructor(t){super(t),this.element=new tE,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Schema"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},iH=class extends wt(un,xt){constructor(t){super(t),this.element=new Sk,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Response"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","response")})),this.element.filter(sE).forEach(((i,l)=>{i.setMetaProperty("http-status-code",st(l))})),n}},aH=class extends wt(un,xt){constructor(t){super(t),this.element=new Ek,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Parameter"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","parameter")})),n}},oH=class extends wt(un,xt){constructor(t){super(t),this.element=new jk,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Example"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","example")})),n}};class lH extends wt(un,xt){constructor(n){super(n),this.element=new Ck,this.specPath=i=>Sr(i)?["document","objects","Reference"]:["document","objects","RequestBody"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(vr).forEach((l=>{l.setMetaProperty("referenced-element","requestBody")})),i}}let cH=class extends wt(un,xt){constructor(t){super(t),this.element=new Ak,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","header")})),this.element.filter(qm).forEach(((i,l)=>{i.setMetaProperty("header-name",st(l))})),n}};class uH extends wt(un,xt){constructor(n){super(n),this.element=new Ok,this.specPath=i=>Sr(i)?["document","objects","Reference"]:["document","objects","SecurityScheme"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(vr).forEach((l=>{l.setMetaProperty("referenced-element","securityScheme")})),i}}let dH=class extends wt(un,xt){constructor(t){super(t),this.element=new kk,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","link")})),n}},hH=class extends wt(un,xt){constructor(t){super(t),this.element=new Rk,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","callback")})),n}},pH=class extends wt(wn,xt){constructor(t){super(t),this.element=new Dx,this.specPath=tn(["document","objects","Example"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return bn(this.element.externalValue)&&this.element.classes.push("reference-element"),n}},fH=class extends wt(wn,xt){constructor(t){super(t),this.element=new Px,this.specPath=tn(["document","objects","ExternalDocumentation"]),this.canSupportSpecificationExtensions=!0}},mH=class extends wt(wn,xt){constructor(t){super(t),this.element=new B1,this.specPath=tn(["document","objects","Encoding"]),this.canSupportSpecificationExtensions=!0}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return Bn(this.element.headers)&&this.element.headers.filter(qm).forEach(((i,l)=>{i.setMetaProperty("header-name",st(l))})),n}},gH=class extends wt(un,xt){constructor(t){super(t),this.element=new Fk,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","header")})),this.element.forEach(((i,l)=>{if(!qm(i))return;const p=st(l);i.setMetaProperty("headerName",p)})),n}},yH=class extends wt(Fm,xt){constructor(t){super(t),this.element=new Ux,this.specPath=tn(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=xi}ObjectElement(t){const n=Fm.prototype.ObjectElement.call(this,t);return this.element.filter(Zk).forEach(((i,l)=>{l.classes.push("openapi-path-template"),l.classes.push("path-template"),i.setMetaProperty("path",At(l))})),n}},vH=class extends wt(wn,xt){constructor(t){super(t),this.element=new Vx,this.specPath=tn(["document","objects","RequestBody"])}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return Bn(this.element.contentProp)&&this.element.contentProp.filter(iE).forEach(((i,l)=>{i.setMetaProperty("media-type",st(l))})),n}},xH=class extends wt(Fm,xt){constructor(t){super(t),this.element=new _x,this.specPath=tn(["document","objects","PathItem"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=n=>/{(?<expression>[^}]{1,2083})}/.test(String(n))}ObjectElement(t){const n=un.prototype.ObjectElement.call(this,t);return this.element.filter(Zk).forEach(((i,l)=>{i.setMetaProperty("runtime-expression",st(l))})),n}},bH=class extends wt(wn,xt){constructor(t){super(t),this.element=new Hx,this.specPath=tn(["document","objects","Response"])}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return Bn(this.element.contentProp)&&this.element.contentProp.filter(iE).forEach(((i,l)=>{i.setMetaProperty("media-type",st(l))})),Bn(this.element.headers)&&this.element.headers.filter(qm).forEach(((i,l)=>{i.setMetaProperty("header-name",st(l))})),n}};class wH extends wt(un,xt){constructor(n){super(n),this.element=new qk,this.specPath=i=>Sr(i)?["document","objects","Reference"]:["document","objects","Header"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(vr).forEach((l=>{l.setMetaProperty("referenced-element","header")})),this.element.forEach(((l,p)=>{if(!qm(l))return;const v=st(p);l.setMetaProperty("header-name",v)})),i}}class SH extends wt(un,xt){constructor(n){super(n),this.element=new Uk,this.specPath=i=>Sr(i)?["document","objects","Reference"]:["document","objects","Link"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(vr).forEach((l=>{l.setMetaProperty("referenced-element","link")})),i}}class mP extends wt(wn,Fm){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:n,specPathPatternedFields:i,...l}){super({...l}),this.specPathFixedFields=n,this.specPathPatternedFields=i}ObjectElement(n){const{specPath:i,ignoredFields:l}=this;try{this.specPath=this.specPathFixedFields;const p=this.retrieveFixedFields(this.specPath(n));this.ignoredFields=[...l,...nU(n.keys(),p)],wn.prototype.ObjectElement.call(this,n),this.specPath=this.specPathPatternedFields,this.ignoredFields=p,Fm.prototype.ObjectElement.call(this,n)}catch(p){throw this.specPath=i,p}return Gn}}let EH=class extends wt(mP,xt){constructor(t){super(t),this.element=new Gx,this.specPathFixedFields=tn(["document","objects","Responses"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=n=>Sr(n)?["document","objects","Reference"]:["document","objects","Response"],this.fieldPatternPredicate=n=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${jU(100,600).join("|")})$`).test(String(n))}ObjectElement(t){const n=mP.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","response")})),this.element.filter(sE).forEach(((i,l)=>{const p=At(l);this.fieldPatternPredicate(st(p))&&i.setMetaProperty("http-status-code",p)})),n}};class jH extends wt(Jl,xt){constructor(n){super(n),this.alternator=[{predicate:Sr,specPath:["document","objects","Reference"]},{predicate:xi,specPath:["document","objects","Response"]}]}ObjectElement(n){const i=Jl.prototype.enter.call(this,n);return vr(this.element)?this.element.setMetaProperty("referenced-element","response"):sE(this.element)&&this.element.setMetaProperty("http-status-code","default"),i}}let CH=class extends wt(wn,xt){constructor(t){super(t),this.element=new qx,this.specPath=tn(["document","objects","Operation"])}},gP=class extends wt(Li,xt){constructor(t){super(t),this.element=new ur,this.element.classes.push("parameters")}ArrayElement(t){return t.forEach((n=>{const i=Sr(n)?["document","objects","Reference"]:["document","objects","Parameter"],l=this.toRefractedElement(i,n);vr(l)&&l.setMetaProperty("referenced-element","parameter"),this.element.push(l)})),this.copyMetaAndAttributes(t,this.element),Gn}};class AH extends wt(un,xt){specPath;constructor(n){super(n),this.element=new Pk,this.specPath=i=>Sr(i)?["document","objects","Reference"]:["document","objects","Callback"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(vr).forEach((l=>{l.setMetaProperty("referenced-element","callback")})),i}}class OH extends wt(Li,xt){constructor(n){super(n),this.element=new rE}ArrayElement(n){return n.forEach((i=>{const l=Bn(i)?["document","objects","SecurityRequirement"]:["value"],p=this.toRefractedElement(l,i);this.element.push(p)})),this.copyMetaAndAttributes(n,this.element),Gn}}let kH=class extends wt(wn,xt){constructor(t){super(t),this.element=new Bx,this.specPath=tn(["document","objects","PathItem"])}ObjectElement(t){const n=wn.prototype.ObjectElement.call(this,t);return this.element.filter(aP).forEach(((i,l)=>{const p=At(l);p.content=st(p).toUpperCase(),i.setMetaProperty("http-method",p)})),bn(this.element.$ref)&&this.element.classes.push("reference-element"),n}},RH=class extends wt(wn,xt){constructor(t){super(t),this.element=new Wx,this.specPath=tn(["document","objects","SecurityScheme"]),this.canSupportSpecificationExtensions=!0}},TH=class extends wt(wn,xt){constructor(t){super(t),this.element=new K1,this.specPath=tn(["document","objects","OAuthFlows"]),this.canSupportSpecificationExtensions=!0}},_H=class extends wt(wn,xt){constructor(t){super(t),this.element=new U1,this.specPath=tn(["document","objects","OAuthFlow"]),this.canSupportSpecificationExtensions=!0}};class $H extends wt(un,xt){constructor(n){super(n),this.element=new Vk,this.specPath=tn(["value"])}}class NH extends wt(Li,xt){constructor(n){super(n),this.element=new bk}ArrayElement(n){return n.forEach((i=>{const l=u9(i)?["document","objects","Tag"]:["value"],p=this.toRefractedElement(l,i);this.element.push(p)})),this.copyMetaAndAttributes(n,this.element),Gn}}const{fixedFields:Ss}=cu.visitors.document.objects.JSONSchema,Ze={visitors:{value:xt,document:{objects:{OpenApi:{$visitor:d9,fixedFields:{openapi:h9,info:{$ref:"#/visitors/document/objects/Info"},servers:Yk,paths:{$ref:"#/visitors/document/objects/Paths"},components:{$ref:"#/visitors/document/objects/Components"},security:V9,tags:NH,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:p9,fixedFields:{title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},termsOfService:{$ref:"#/visitors/value"},contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("api-version"),this.element.classes.push("version"),n}}}},Contact:{$visitor:f9,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"},email:{$ref:"#/visitors/value"}}},License:{$visitor:m9,fixedFields:{name:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Server:{$visitor:v9,fixedFields:{url:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("server-url"),n}},description:{$ref:"#/visitors/value"},variables:b9}},ServerVariable:{$visitor:x9,fixedFields:{enum:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Components:{$visitor:H9,fixedFields:{schemas:sH,responses:iH,parameters:aH,examples:oH,requestBodies:lH,headers:cH,securitySchemes:uH,links:dH,callbacks:hH}},Paths:{$visitor:yH},PathItem:{$visitor:kH,fixedFields:{$ref:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:class extends Yk{constructor(t){super(t),this.element=new Tk}},parameters:class extends gP{constructor(t){super(t),this.element=new _k}}}},Operation:{$visitor:CH,fixedFields:{tags:class extends xt{constructor(t){super(t),this.element=new Dk}ArrayElement(t){return this.element=this.element.concat(At(t)),Gn}},summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:{$ref:"#/visitors/value"},parameters:class extends gP{constructor(t){super(t),this.element=new nE}},requestBody:class extends Jl{constructor(t){super(t),this.alternator=[{predicate:Sr,specPath:["document","objects","Reference"]},{predicate:xi,specPath:["document","objects","RequestBody"]}]}ObjectElement(t){const n=Jl.prototype.enter.call(this,t);return vr(this.element)&&this.element.setMetaProperty("referenced-element","requestBody"),n}},responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:AH,deprecated:{$ref:"#/visitors/value"},security:OH,servers:class extends Yk{constructor(t){super(t),this.element=new Mk}}}},ExternalDocumentation:{$visitor:fH,fixedFields:{description:{$ref:"#/visitors/value"},url:{$ref:"#/visitors/value"}}},Parameter:{$visitor:Y9,fixedFields:{name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:Z9,example:{$ref:"#/visitors/value"},examples:class extends Jk{constructor(t){super(t),this.element=new $k}},content:class extends aE{constructor(t){super(t),this.element=new Nk}}}},RequestBody:{$visitor:vH,fixedFields:{description:{$ref:"#/visitors/value"},content:class extends aE{constructor(t){super(t),this.element=new Ik}},required:{$ref:"#/visitors/value"}}},MediaType:{$visitor:w9,fixedFields:{schema:B9,example:{$ref:"#/visitors/value"},examples:class extends Jk{constructor(t){super(t),this.element=new zk}},encoding:U9}},Encoding:{$visitor:mH,fixedFields:{contentType:{$ref:"#/visitors/value"},headers:gH,style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"}}},Responses:{$visitor:EH,fixedFields:{default:jH}},Response:{$visitor:bH,fixedFields:{description:{$ref:"#/visitors/value"},headers:wH,content:class extends aE{constructor(t){super(t),this.element=new Bk}},links:SH}},Callback:{$visitor:xH},Example:{$visitor:pH,fixedFields:{summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},value:{$ref:"#/visitors/value"},externalValue:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}}}},Link:{$visitor:g9,fixedFields:{operationRef:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},operationId:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},parameters:y9,requestBody:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:J9,fixedFields:{description:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},allowEmptyValue:{$ref:"#/visitors/value"},style:{$ref:"#/visitors/value"},explode:{$ref:"#/visitors/value"},allowReserved:{$ref:"#/visitors/value"},schema:W9,example:{$ref:"#/visitors/value"},examples:class extends Jk{constructor(t){super(t),this.element=new Gk}},content:class extends aE{constructor(t){super(t),this.element=new Xk}}}},Tag:{$visitor:G9,fixedFields:{name:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:X9,fixedFields:{$ref:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}}}},JSONSchema:{$ref:"#/visitors/document/objects/Schema"},JSONReference:{$ref:"#/visitors/document/objects/Reference"},Schema:{$visitor:Q9,fixedFields:{title:Ss.title,multipleOf:Ss.multipleOf,maximum:Ss.maximum,exclusiveMaximum:Ss.exclusiveMaximum,minimum:Ss.minimum,exclusiveMinimum:Ss.exclusiveMinimum,maxLength:Ss.maxLength,minLength:Ss.minLength,pattern:Ss.pattern,maxItems:Ss.maxItems,minItems:Ss.minItems,uniqueItems:Ss.uniqueItems,maxProperties:Ss.maxProperties,minProperties:Ss.minProperties,required:Ss.required,enum:Ss.enum,type:class extends eH{ArrayElement(t){return this.enter(t)}},allOf:class extends lP{ArrayElement(t){const n=lP.prototype.ArrayElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},anyOf:class extends cP{ArrayElement(t){const n=cP.prototype.ArrayElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},oneOf:class extends uP{ArrayElement(t){const n=uP.prototype.ArrayElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},not:fP,items:class extends dP{ObjectElement(t){const n=dP.prototype.ObjectElement.call(this,t);return vr(this.element)&&this.element.setMetaProperty("referenced-element","schema"),n}ArrayElement(t){return this.enter(t)}},properties:class extends hP{ObjectElement(t){const n=hP.prototype.ObjectElement.call(this,t);return this.element.filter(vr).forEach((i=>{i.setMetaProperty("referenced-element","schema")})),n}},additionalProperties:fP,description:Ss.description,format:Ss.format,default:Ss.default,nullable:{$ref:"#/visitors/value"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},writeOnly:{$ref:"#/visitors/value"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:tH,fixedFields:{propertyName:{$ref:"#/visitors/value"},mapping:nH}},XML:{$visitor:rH,fixedFields:{name:{$ref:"#/visitors/value"},namespace:{$ref:"#/visitors/value"},prefix:{$ref:"#/visitors/value"},attribute:{$ref:"#/visitors/value"},wrapped:{$ref:"#/visitors/value"}}},SecurityScheme:{$visitor:RH,fixedFields:{type:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},name:{$ref:"#/visitors/value"},in:{$ref:"#/visitors/value"},scheme:{$ref:"#/visitors/value"},bearerFormat:{$ref:"#/visitors/value"},flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:{$ref:"#/visitors/value"}}},OAuthFlows:{$visitor:TH,fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:_H,fixedFields:{authorizationUrl:{$ref:"#/visitors/value"},tokenUrl:{$ref:"#/visitors/value"},refreshUrl:{$ref:"#/visitors/value"},scopes:$H}},SecurityRequirement:{$visitor:K9}},extension:{$visitor:class extends Li{MemberElement(t){return this.element=At(t),this.element.classes.push("specification-extension"),Gn}}}}}},DH=()=>{const t=Ax(a9);return{predicates:{...q9,isElement:es,isStringElement:bn,isArrayElement:Mi,isObjectElement:Bn,isMemberElement:Bo,includesClasses:_1,hasElementSourceMap:Cx},namespace:t}},er=t=>(n,i={})=>((l,{specPath:p=["visitors","document","objects","OpenApi","$visitor"],plugins:v=[]}={})=>{const x=GO(l),S=P1(Ze),C=new(la(p,S))({specObj:S});return bi(x,C),_m(C.element,v,{toolboxCreator:DH,visitorOptions:{keyMap:l9,nodeTypeGetter:o9}})})(n,{specPath:t,...i});_x.refract=er(["visitors","document","objects","Callback","$visitor"]),$x.refract=er(["visitors","document","objects","Components","$visitor"]),Nx.refract=er(["visitors","document","objects","Contact","$visitor"]),Dx.refract=er(["visitors","document","objects","Example","$visitor"]),q1.refract=er(["visitors","document","objects","Discriminator","$visitor"]),B1.refract=er(["visitors","document","objects","Encoding","$visitor"]),Px.refract=er(["visitors","document","objects","ExternalDocumentation","$visitor"]),Im.refract=er(["visitors","document","objects","Header","$visitor"]),Mx.refract=er(["visitors","document","objects","Info","$visitor"]),Ix.refract=er(["visitors","document","objects","License","$visitor"]),zx.refract=er(["visitors","document","objects","Link","$visitor"]),Lx.refract=er(["visitors","document","objects","MediaType","$visitor"]),U1.refract=er(["visitors","document","objects","OAuthFlow","$visitor"]),K1.refract=er(["visitors","document","objects","OAuthFlows","$visitor"]),Fx.refract=er(["visitors","document","objects","OpenApi","fixedFields","openapi"]),V1.refract=er(["visitors","document","objects","OpenApi","$visitor"]),qx.refract=er(["visitors","document","objects","Operation","$visitor"]),zm.refract=er(["visitors","document","objects","Parameter","$visitor"]),Bx.refract=er(["visitors","document","objects","PathItem","$visitor"]),Ux.refract=er(["visitors","document","objects","Paths","$visitor"]),Kx.refract=er(["visitors","document","objects","Reference","$visitor"]),Vx.refract=er(["visitors","document","objects","RequestBody","$visitor"]),Hx.refract=er(["visitors","document","objects","Response","$visitor"]),Gx.refract=er(["visitors","document","objects","Responses","$visitor"]),J1.refract=er(["visitors","document","objects","Schema","$visitor"]),Jx.refract=er(["visitors","document","objects","SecurityRequirement","$visitor"]),Wx.refract=er(["visitors","document","objects","SecurityScheme","$visitor"]),Qx.refract=er(["visitors","document","objects","Server","$visitor"]),eb.refract=er(["visitors","document","objects","ServerVariable","$visitor"]),W1.refract=er(["visitors","document","objects","Tag","$visitor"]),Q1.refract=er(["visitors","document","objects","XML","$visitor"]);class oE extends _x{}class lE extends $x{get pathItems(){return this.get("pathItems")}set pathItems(n){this.set("pathItems",n)}}class cE extends Nx{}class Wk extends q1{}class Qk extends B1{}class uE extends Dx{}class dE extends Px{}class hE extends Im{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class pE extends Mx{get license(){return this.get("license")}set license(n){this.set("license",n)}get summary(){return this.get("summary")}set summary(n){this.set("summary",n)}}class cp extends nu{static default=new cp("https://spec.openapis.org/oas/3.1/dialect/base");constructor(n,i,l){super(n,i,l),this.element="jsonSchemaDialect"}}class fE extends Ix{get identifier(){return this.get("identifier")}set identifier(n){this.set("identifier",n)}}class mE extends zx{}class gE extends Lx{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class eR extends U1{}class tR extends K1{}class nR extends Fx{}class Td extends Et{constructor(n,i,l){super(n,i,l),this.element="openApi3_1",this.classes.push("api")}get openapi(){return this.get("openapi")}set openapi(n){this.set("openapi",n)}get info(){return this.get("info")}set info(n){this.set("info",n)}get jsonSchemaDialect(){return this.get("jsonSchemaDialect")}set jsonSchemaDialect(n){this.set("jsonSchemaDialect",n)}get servers(){return this.get("servers")}set servers(n){this.set("servers",n)}get paths(){return this.get("paths")}set paths(n){this.set("paths",n)}get components(){return this.get("components")}set components(n){this.set("components",n)}get security(){return this.get("security")}set security(n){this.set("security",n)}get tags(){return this.get("tags")}set tags(n){this.set("tags",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}get webhooks(){return this.get("webhooks")}set webhooks(n){this.set("webhooks",n)}}class tb extends qx{get requestBody(){return this.get("requestBody")}set requestBody(n){this.set("requestBody",n)}}class yE extends zm{get schema(){return this.get("schema")}set schema(n){this.set("schema",n)}}class _d extends Bx{get GET(){return this.get("get")}set GET(n){this.set("GET",n)}get PUT(){return this.get("put")}set PUT(n){this.set("PUT",n)}get POST(){return this.get("post")}set POST(n){this.set("POST",n)}get DELETE(){return this.get("delete")}set DELETE(n){this.set("DELETE",n)}get OPTIONS(){return this.get("options")}set OPTIONS(n){this.set("OPTIONS",n)}get HEAD(){return this.get("head")}set HEAD(n){this.set("HEAD",n)}get PATCH(){return this.get("patch")}set PATCH(n){this.set("PATCH",n)}get TRACE(){return this.get("trace")}set TRACE(n){this.set("TRACE",n)}}class vE extends Ux{}class $d extends Kx{}Object.defineProperty($d.prototype,"description",{get(){return this.get("description")},set(t){this.set("description",t)},enumerable:!0}),Object.defineProperty($d.prototype,"summary",{get(){return this.get("summary")},set(t){this.set("summary",t)},enumerable:!0});class xE extends Vx{}let bE=class extends Hx{};class wE extends Gx{}class up extends Et{constructor(n,i,l){super(n,i,l),this.element="schema"}get $schema(){return this.get("$schema")}set $schema(n){this.set("$schema",n)}get $vocabulary(){return this.get("$vocabulary")}set $vocabulary(n){this.set("$vocabulary",n)}get $id(){return this.get("$id")}set $id(n){this.set("$id",n)}get $anchor(){return this.get("$anchor")}set $anchor(n){this.set("$anchor",n)}get $dynamicAnchor(){return this.get("$dynamicAnchor")}set $dynamicAnchor(n){this.set("$dynamicAnchor",n)}get $dynamicRef(){return this.get("$dynamicRef")}set $dynamicRef(n){this.set("$dynamicRef",n)}get $ref(){return this.get("$ref")}set $ref(n){this.set("$ref",n)}get $defs(){return this.get("$defs")}set $defs(n){this.set("$defs",n)}get $comment(){return this.get("$comment")}set $comment(n){this.set("$comment",n)}get allOf(){return this.get("allOf")}set allOf(n){this.set("allOf",n)}get anyOf(){return this.get("anyOf")}set anyOf(n){this.set("anyOf",n)}get oneOf(){return this.get("oneOf")}set oneOf(n){this.set("oneOf",n)}get not(){return this.get("not")}set not(n){this.set("not",n)}get if(){return this.get("if")}set if(n){this.set("if",n)}get then(){return this.get("then")}set then(n){this.set("then",n)}get else(){return this.get("else")}set else(n){this.set("else",n)}get dependentSchemas(){return this.get("dependentSchemas")}set dependentSchemas(n){this.set("dependentSchemas",n)}get prefixItems(){return this.get("prefixItems")}set prefixItems(n){this.set("prefixItems",n)}get items(){return this.get("items")}set items(n){this.set("items",n)}get containsProp(){return this.get("contains")}set containsProp(n){this.set("contains",n)}get properties(){return this.get("properties")}set properties(n){this.set("properties",n)}get patternProperties(){return this.get("patternProperties")}set patternProperties(n){this.set("patternProperties",n)}get additionalProperties(){return this.get("additionalProperties")}set additionalProperties(n){this.set("additionalProperties",n)}get propertyNames(){return this.get("propertyNames")}set propertyNames(n){this.set("propertyNames",n)}get unevaluatedItems(){return this.get("unevaluatedItems")}set unevaluatedItems(n){this.set("unevaluatedItems",n)}get unevaluatedProperties(){return this.get("unevaluatedProperties")}set unevaluatedProperties(n){this.set("unevaluatedProperties",n)}get type(){return this.get("type")}set type(n){this.set("type",n)}get enum(){return this.get("enum")}set enum(n){this.set("enum",n)}get const(){return this.get("const")}set const(n){this.set("const",n)}get multipleOf(){return this.get("multipleOf")}set multipleOf(n){this.set("multipleOf",n)}get maximum(){return this.get("maximum")}set maximum(n){this.set("maximum",n)}get exclusiveMaximum(){return this.get("exclusiveMaximum")}set exclusiveMaximum(n){this.set("exclusiveMaximum",n)}get minimum(){return this.get("minimum")}set minimum(n){this.set("minimum",n)}get exclusiveMinimum(){return this.get("exclusiveMinimum")}set exclusiveMinimum(n){this.set("exclusiveMinimum",n)}get maxLength(){return this.get("maxLength")}set maxLength(n){this.set("maxLength",n)}get minLength(){return this.get("minLength")}set minLength(n){this.set("minLength",n)}get pattern(){return this.get("pattern")}set pattern(n){this.set("pattern",n)}get maxItems(){return this.get("maxItems")}set maxItems(n){this.set("maxItems",n)}get minItems(){return this.get("minItems")}set minItems(n){this.set("minItems",n)}get uniqueItems(){return this.get("uniqueItems")}set uniqueItems(n){this.set("uniqueItems",n)}get maxContains(){return this.get("maxContains")}set maxContains(n){this.set("maxContains",n)}get minContains(){return this.get("minContains")}set minContains(n){this.set("minContains",n)}get maxProperties(){return this.get("maxProperties")}set maxProperties(n){this.set("maxProperties",n)}get minProperties(){return this.get("minProperties")}set minProperties(n){this.set("minProperties",n)}get required(){return this.get("required")}set required(n){this.set("required",n)}get dependentRequired(){return this.get("dependentRequired")}set dependentRequired(n){this.set("dependentRequired",n)}get title(){return this.get("title")}set title(n){this.set("title",n)}get description(){return this.get("description")}set description(n){this.set("description",n)}get default(){return this.get("default")}set default(n){this.set("default",n)}get deprecated(){return this.get("deprecated")}set deprecated(n){this.set("deprecated",n)}get readOnly(){return this.get("readOnly")}set readOnly(n){this.set("readOnly",n)}get writeOnly(){return this.get("writeOnly")}set writeOnly(n){this.set("writeOnly",n)}get examples(){return this.get("examples")}set examples(n){this.set("examples",n)}get format(){return this.get("format")}set format(n){this.set("format",n)}get contentEncoding(){return this.get("contentEncoding")}set contentEncoding(n){this.set("contentEncoding",n)}get contentMediaType(){return this.get("contentMediaType")}set contentMediaType(n){this.set("contentMediaType",n)}get contentSchema(){return this.get("contentSchema")}set contentSchema(n){this.set("contentSchema",n)}get discriminator(){return this.get("discriminator")}set discriminator(n){this.set("discriminator",n)}get xml(){return this.get("xml")}set xml(n){this.set("xml",n)}get externalDocs(){return this.get("externalDocs")}set externalDocs(n){this.set("externalDocs",n)}get example(){return this.get("example")}set example(n){this.set("example",n)}}class SE extends Jx{}class EE extends Wx{}class jE extends Qx{}class CE extends eb{}class rR extends W1{}class sR extends Q1{}const iR={namespace:t=>{const{base:n}=t;return n.register("callback",oE),n.register("components",lE),n.register("contact",cE),n.register("discriminator",Wk),n.register("encoding",Qk),n.register("example",uE),n.register("externalDocumentation",dE),n.register("header",hE),n.register("info",pE),n.register("jsonSchemaDialect",cp),n.register("license",fE),n.register("link",mE),n.register("mediaType",gE),n.register("oAuthFlow",eR),n.register("oAuthFlows",tR),n.register("openapi",nR),n.register("openApi3_1",Td),n.register("operation",tb),n.register("parameter",yE),n.register("pathItem",_d),n.register("paths",vE),n.register("reference",$d),n.register("requestBody",xE),n.register("response",bE),n.register("responses",wE),n.register("schema",up),n.register("securityRequirement",SE),n.register("securityScheme",EE),n.register("server",jE),n.register("serverVariable",CE),n.register("tag",rR),n.register("xml",sR),n}};class aR extends Et{static primaryClass="components-path-items";constructor(n,i,l){super(n,i,l),this.classes.push(aR.primaryClass)}}class oR extends Et{static primaryClass="webhooks";constructor(n,i,l){super(n,i,l),this.classes.push(oR.primaryClass)}}const Ko=t=>{if(es(t))return`${t.element.charAt(0).toUpperCase()+t.element.slice(1)}Element`},Wl={CallbackElement:["content"],ComponentsElement:["content"],ContactElement:["content"],DiscriminatorElement:["content"],Encoding:["content"],Example:["content"],ExternalDocumentationElement:["content"],HeaderElement:["content"],InfoElement:["content"],LicenseElement:["content"],MediaTypeElement:["content"],OAuthFlowElement:["content"],OAuthFlowsElement:["content"],OpenApi3_1Element:["content"],OperationElement:["content"],ParameterElement:["content"],PathItemElement:["content"],PathsElement:["content"],ReferenceElement:["content"],RequestBodyElement:["content"],ResponseElement:["content"],ResponsesElement:["content"],SchemaElement:["content"],SecurityRequirementElement:["content"],SecuritySchemeElement:["content"],ServerElement:["content"],ServerVariableElement:["content"],TagElement:["content"],...Tm};class nb{internalStore;constructor(n,i,l){this.storageElement=n,this.storageField=i,this.storageSubField=l}get store(){if(!this.internalStore){let n=this.storageElement.get(this.storageField);Bn(n)||(n=new Et,this.storageElement.set(this.storageField,n));let i=n.get(this.storageSubField);Mi(i)||(i=new ur,n.set(this.storageSubField,i)),this.internalStore=i}return this.internalStore}append(n){this.includes(n)||this.store.push(n)}includes(n){return this.store.includes(n)}}const PH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n,p=(S,C)=>!!(i.isParameterElement(S)&&i.isParameterElement(C)&&i.isStringElement(S.name)&&i.isStringElement(S.in)&&i.isStringElement(C.name)&&i.isStringElement(C.in)&&st(S.name)===st(C.name)&&st(S.in)===st(C.in)),v=[];let x;return{visitor:{OpenApi3_1Element:{enter(S){x=new nb(S,t,"parameters")},leave(){x=void 0}},PathItemElement:{enter(S,C,N,D,$){if($.some(i.isComponentsElement))return;const{parameters:L}=S;i.isArrayElement(L)?v.push([...L.content]):v.push([])},leave(){v.pop()}},OperationElement:{leave(S,C,N,D,$){const L=s1(v);if(!Array.isArray(L)||L.length===0)return;const U=l([...$,N,S]);if(x.includes(U))return;const J=U$([],["parameters","content"],S),Y=RU(p,[...J,...L]);S.parameters=new nE(Y),x.append(U)}}}}},MH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let p,v;return{visitor:{OpenApi3_1Element:{enter(x){v=new nb(x,t,"security-requirements"),i.isArrayElement(x.security)&&(p=x.security)},leave(){v=void 0,p=void 0}},OperationElement:{leave(x,S,C,N,D){if(D.some(i.isComponentsElement))return;const $=l([...D,C,x]);var L;v.includes($)||x.security===void 0&&p!==void 0&&(x.security=new rE((L=p)===null||L===void 0?void 0:L.content),v.append($))}}}}},lR=t=>t.replace(/\s/g,""),cR=t=>t.replace(/\W/gi,"_"),IH=(t,n,i)=>{const l=lR(t);return l.length>0?cR(l):((p,v)=>`${cR(lR(v.toLowerCase()))}${cR(lR(p))}`)(n,i)},zH=({storageField:t="x-normalized",operationIdNormalizer:n=IH}={})=>i=>{const{predicates:l,ancestorLineageToJSONPointer:p,namespace:v}=i,x=[],S=[],C=[];let N;return{visitor:{OpenApi3_1Element:{enter(D){N=new nb(D,t,"operation-ids")},leave(){const D=pU(($=>st($.operationId)),S);Object.entries(D).forEach((([$,L])=>{Array.isArray(L)&&(L.length<=1||L.forEach(((U,J)=>{const Y=`${$}${J+1}`;U.operationId=new v.elements.String(Y)})))})),C.forEach(($=>{if($.operationId===void 0)return;const L=String(st($.operationId)),U=S.find((J=>st(J.meta.get("originalOperationId"))===L));U!==void 0&&($.operationId=At.safe(U.operationId),$.meta.set("originalOperationId",L),$.set("__originalOperationId",L))})),S.length=0,C.length=0,N=void 0}},PathItemElement:{enter(D){const $=ym("path",st(D.meta.get("path")));x.push($)},leave(){x.pop()}},OperationElement:{enter(D,$,L,U,J){if(D.operationId===void 0)return;const Y=p([...J,L,D]);if(N.includes(Y))return;const Z=String(st(D.operationId)),P=s1(x),re=ym("method",st(D.meta.get("http-method"))),le=n(Z,P,re);Z!==le&&(D.operationId=new v.elements.String(le),D.set("__originalOperationId",Z),D.meta.set("originalOperationId",Z),S.push(D),N.append(Y))}},LinkElement:{leave(D){l.isLinkElement(D)&&D.operationId!==void 0&&C.push(D)}}}}},LH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let p;return{visitor:{OpenApi3_1Element:{enter(v){p=new nb(v,t,"parameter-examples")},leave(){p=void 0}},ParameterElement:{leave(v,x,S,C,N){var D,$;if(N.some(i.isComponentsElement)||v.schema===void 0||!i.isSchemaElement(v.schema)||((D=v.schema)===null||D===void 0?void 0:D.example)===void 0&&(($=v.schema)===null||$===void 0?void 0:$.examples)===void 0)return;const L=l([...N,S,v]);if(!p.includes(L)){if(v.examples!==void 0&&i.isObjectElement(v.examples)){const U=v.examples.map((J=>At.safe(J.value)));return v.schema.examples!==void 0&&(v.schema.set("examples",U),p.append(L)),void(v.schema.example!==void 0&&(v.schema.set("example",U[0]),p.append(L)))}v.example!==void 0&&(v.schema.examples!==void 0&&(v.schema.set("examples",[At(v.example)]),p.append(L)),v.schema.example!==void 0&&(v.schema.set("example",At(v.example)),p.append(L)))}}}}}},FH=({storageField:t="x-normalized"}={})=>n=>{const{predicates:i,ancestorLineageToJSONPointer:l}=n;let p;return{visitor:{OpenApi3_1Element:{enter(v){p=new nb(v,t,"header-examples")},leave(){p=void 0}},HeaderElement:{leave(v,x,S,C,N){var D,$;if(N.some(i.isComponentsElement)||v.schema===void 0||!i.isSchemaElement(v.schema)||((D=v.schema)===null||D===void 0?void 0:D.example)===void 0&&(($=v.schema)===null||$===void 0?void 0:$.examples)===void 0)return;const L=l([...N,S,v]);if(!p.includes(L)){if(v.examples!==void 0&&i.isObjectElement(v.examples)){const U=v.examples.map((J=>At.safe(J.value)));return v.schema.examples!==void 0&&(v.schema.set("examples",U),p.append(L)),void(v.schema.example!==void 0&&(v.schema.set("example",U[0]),p.append(L)))}v.example!==void 0&&(v.schema.examples!==void 0&&(v.schema.set("examples",[At(v.example)]),p.append(L)),v.schema.example!==void 0&&(v.schema.set("example",At(v.example)),p.append(L)))}}}}}},qH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof oE||t(l)&&n("callback",l)&&i("object",l))),BH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof lE||t(l)&&n("components",l)&&i("object",l))),UH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof cE||t(l)&&n("contact",l)&&i("object",l))),KH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof uE||t(l)&&n("example",l)&&i("object",l))),VH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof dE||t(l)&&n("externalDocumentation",l)&&i("object",l))),HH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof hE||t(l)&&n("header",l)&&i("object",l))),GH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof pE||t(l)&&n("info",l)&&i("object",l))),yP=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof cp||t(l)&&n("jsonSchemaDialect",l)&&i("string",l))),XH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof fE||t(l)&&n("license",l)&&i("object",l))),YH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof mE||t(l)&&n("link",l)&&i("object",l))),ZH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof nR||t(l)&&n("openapi",l)&&i("string",l))),vP=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i,hasClass:l})=>p=>p instanceof Td||t(p)&&n("openApi3_1",p)&&i("object",p)&&l("api",p))),xP=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof tb||t(l)&&n("operation",l)&&i("object",l))),JH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof yE||t(l)&&n("parameter",l)&&i("object",l))),dp=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof _d||t(l)&&n("pathItem",l)&&i("object",l))),WH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof vE||t(l)&&n("paths",l)&&i("object",l))),hp=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof $d||t(l)&&n("reference",l)&&i("object",l))),QH=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof xE||t(l)&&n("requestBody",l)&&i("object",l))),eG=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof bE||t(l)&&n("response",l)&&i("object",l))),tG=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof wE||t(l)&&n("responses",l)&&i("object",l))),uu=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof up||t(l)&&n("schema",l)&&i("object",l))),uR=t=>jx(t)&&t.classes.includes("boolean-json-schema"),nG=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof SE||t(l)&&n("securityRequirement",l)&&i("object",l))),rG=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof EE||t(l)&&n("securityScheme",l)&&i("object",l))),sG=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof jE||t(l)&&n("server",l)&&i("object",l))),iG=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof CE||t(l)&&n("serverVariable",l)&&i("object",l))),aG=$t((({hasBasicElementProps:t,isElementType:n,primitiveEq:i})=>l=>l instanceof gE||t(l)&&n("mediaType",l)&&i("object",l))),oG=Object.freeze(Object.defineProperty({__proto__:null,isBooleanJsonSchemaElement:uR,isCallbackElement:qH,isComponentsElement:BH,isContactElement:UH,isExampleElement:KH,isExternalDocumentationElement:VH,isHeaderElement:HH,isInfoElement:GH,isJsonSchemaDialectElement:yP,isLicenseElement:XH,isLinkElement:YH,isMediaTypeElement:aG,isOpenApi3_1Element:vP,isOpenapiElement:ZH,isOperationElement:xP,isParameterElement:JH,isPathItemElement:dp,isPathItemElementExternal:t=>{if(!dp(t)||!bn(t.$ref))return!1;const n=st(t.$ref);return typeof n=="string"&&n.length>0&&!n.startsWith("#")},isPathsElement:WH,isReferenceElement:hp,isReferenceElementExternal:t=>{if(!hp(t)||!bn(t.$ref))return!1;const n=st(t.$ref);return typeof n=="string"&&n.length>0&&!n.startsWith("#")},isRequestBodyElement:QH,isResponseElement:eG,isResponsesElement:tG,isSchemaElement:uu,isSecurityRequirementElement:nG,isSecuritySchemeElement:rG,isServerElement:sG,isServerVariableElement:iG},Symbol.toStringTag,{value:"Module"})),lG=t=>{const n=t.reduce(((i,l,p)=>{if(Bo(l)){const v=String(st(l.key));i.push(v)}else if(Mi(t[p-2])){const v=String(t[p-2].content.indexOf(l));i.push(v)}return i}),[]);return ZD(n)},bP=()=>{const t=Ax(iR);return{predicates:{...oG,isElement:es,isStringElement:bn,isArrayElement:Mi,isObjectElement:Bn,isMemberElement:Bo,isServersElement:oP,includesClasses:_1,hasElementSourceMap:Cx},ancestorLineageToJSONPointer:lG,namespace:t}};class cG extends wt(wn,xt){constructor(n){super(n),this.element=new Td,this.specPath=tn(["document","objects","OpenApi"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(n){return this.openApiGenericElement=n,wn.prototype.ObjectElement.call(this,n)}}const{visitors:{document:{objects:{Info:{$visitor:uG}}}}}=Ze,{visitors:{document:{objects:{Contact:{$visitor:dG}}}}}=Ze,{visitors:{document:{objects:{License:{$visitor:hG}}}}}=Ze,{visitors:{document:{objects:{Link:{$visitor:pG}}}}}=Ze;class fG extends wt(Li,xt){StringElement(n){const i=new cp(st(n));return this.copyMetaAndAttributes(n,i),this.element=i,Gn}}const{visitors:{document:{objects:{Server:{$visitor:mG}}}}}=Ze,{visitors:{document:{objects:{ServerVariable:{$visitor:gG}}}}}=Ze,{visitors:{document:{objects:{MediaType:{$visitor:yG}}}}}=Ze,{visitors:{document:{objects:{SecurityRequirement:{$visitor:vG}}}}}=Ze,{visitors:{document:{objects:{Components:{$visitor:xG}}}}}=Ze,{visitors:{document:{objects:{Tag:{$visitor:bG}}}}}=Ze,{visitors:{document:{objects:{Reference:{$visitor:wG}}}}}=Ze,{visitors:{document:{objects:{Parameter:{$visitor:SG}}}}}=Ze,{visitors:{document:{objects:{Header:{$visitor:EG}}}}}=Ze;class du{parent;constructor({parent:n}){this.parent=n}}class jG extends wt(wn,du,xt){constructor(n){super(n),this.element=new up,this.specPath=tn(["document","objects","Schema"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=cp.default,this.passingOptionsNames.push("parent")}ObjectElement(n){this.handle$schema(n),this.handle$id(n),this.parent=this.element;const i=wn.prototype.ObjectElement.call(this,n);return bn(this.element.$ref)&&(this.element.classes.push("reference-element"),this.element.setMetaProperty("referenced-element","schema")),i}BooleanElement(n){const i=super.enter(n);return this.element.classes.push("boolean-json-schema"),i}getJsonSchemaDialect(){let n;return n=this.openApiSemanticElement!==void 0&&yP(this.openApiSemanticElement.jsonSchemaDialect)?st(this.openApiSemanticElement.jsonSchemaDialect):this.openApiGenericElement!==void 0&&bn(this.openApiGenericElement.get("jsonSchemaDialect"))?st(this.openApiGenericElement.get("jsonSchemaDialect")):st(this.jsonSchemaDefaultDialect),n}handle$schema(n){if(Cd(this.parent)&&!bn(n.get("$schema")))this.element.setMetaProperty("inherited$schema",this.getJsonSchemaDialect());else if(uu(this.parent)&&!bn(n.get("$schema"))){const i=ym(st(this.parent.meta.get("inherited$schema")),st(this.parent.$schema));this.element.setMetaProperty("inherited$schema",i)}}handle$id(n){const i=this.parent!==void 0?At(this.parent.getMetaProperty("inherited$id",[])):new ur,l=st(n.get("$id"));vO(l)&&i.push(l),this.element.setMetaProperty("inherited$id",i)}}class CG extends wt(un,du,xt){constructor(n){super(n),this.element=new Et,this.element.classes.push("json-schema-$defs"),this.specPath=tn(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}let AG=class extends wt(Li,du,xt){constructor(t){super(t),this.element=new ur,this.element.classes.push("json-schema-allOf"),this.passingOptionsNames.push("parent")}ArrayElement(t){return t.forEach((n=>{if(Bn(n)){const i=this.toRefractedElement(["document","objects","Schema"],n);this.element.push(i)}else{const i=At(n);this.element.push(i)}})),this.copyMetaAndAttributes(t,this.element),Gn}};class OG extends wt(Li,du,xt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-anyOf"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Bn(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=At(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class kG extends wt(Li,du,xt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-oneOf"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Bn(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=At(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class RG extends wt(un,du,xt){constructor(n){super(n),this.element=new Et,this.element.classes.push("json-schema-dependentSchemas"),this.specPath=tn(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class TG extends wt(Li,du,xt){constructor(n){super(n),this.element=new ur,this.element.classes.push("json-schema-prefixItems"),this.passingOptionsNames.push("parent")}ArrayElement(n){return n.forEach((i=>{if(Bn(i)){const l=this.toRefractedElement(["document","objects","Schema"],i);this.element.push(l)}else{const l=At(i);this.element.push(l)}})),this.copyMetaAndAttributes(n,this.element),Gn}}class _G extends wt(un,du,xt){constructor(n){super(n),this.element=new Et,this.element.classes.push("json-schema-properties"),this.specPath=tn(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}class $G extends wt(un,du,xt){constructor(n){super(n),this.element=new Et,this.element.classes.push("json-schema-patternProperties"),this.specPath=tn(["document","objects","Schema"]),this.passingOptionsNames.push("parent")}}const{visitors:{document:{objects:{Discriminator:{$visitor:NG}}}}}=Ze,{visitors:{document:{objects:{XML:{$visitor:DG}}}}}=Ze;class PG extends wt(un,xt){constructor(n){super(n),this.element=new tE,this.specPath=tn(["document","objects","Schema"])}}class MG extends wt(un,xt){constructor(n){super(n),this.element=new aR,this.specPath=i=>Sr(i)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(hp).forEach((l=>{l.setMetaProperty("referenced-element","pathItem")})),i}}const{visitors:{document:{objects:{Example:{$visitor:IG}}}}}=Ze,{visitors:{document:{objects:{ExternalDocumentation:{$visitor:zG}}}}}=Ze,{visitors:{document:{objects:{Encoding:{$visitor:LG}}}}}=Ze,{visitors:{document:{objects:{Paths:{$visitor:FG}}}}}=Ze,{visitors:{document:{objects:{RequestBody:{$visitor:qG}}}}}=Ze,{visitors:{document:{objects:{Callback:{$visitor:wP}}}}}=Ze,{visitors:{document:{objects:{Response:{$visitor:BG}}}}}=Ze,{visitors:{document:{objects:{Responses:{$visitor:UG}}}}}=Ze,{visitors:{document:{objects:{Operation:{$visitor:KG}}}}}=Ze,{visitors:{document:{objects:{PathItem:{$visitor:VG}}}}}=Ze,{visitors:{document:{objects:{SecurityScheme:{$visitor:HG}}}}}=Ze,{visitors:{document:{objects:{OAuthFlows:{$visitor:GG}}}}}=Ze,{visitors:{document:{objects:{OAuthFlow:{$visitor:XG}}}}}=Ze;class YG extends wt(un,xt){constructor(n){super(n),this.element=new oR,this.specPath=i=>Sr(i)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(n){const i=un.prototype.ObjectElement.call(this,n);return this.element.filter(hp).forEach((l=>{l.setMetaProperty("referenced-element","pathItem")})),this.element.filter(dp).forEach(((l,p)=>{l.setMetaProperty("webhook-name",st(p))})),i}}const ZG={visitors:{value:Ze.visitors.value,document:{objects:{OpenApi:{$visitor:cG,fixedFields:{openapi:Ze.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:"#/visitors/document/objects/Info"},jsonSchemaDialect:fG,servers:Ze.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:"#/visitors/document/objects/Paths"},webhooks:YG,components:{$ref:"#/visitors/document/objects/Components"},security:Ze.visitors.document.objects.OpenApi.fixedFields.security,tags:Ze.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Info:{$visitor:class extends uG{constructor(t){super(t),this.element=new pE}},fixedFields:{title:Ze.visitors.document.objects.Info.fixedFields.title,description:Ze.visitors.document.objects.Info.fixedFields.description,summary:{$ref:"#/visitors/value"},termsOfService:Ze.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:"#/visitors/document/objects/Contact"},license:{$ref:"#/visitors/document/objects/License"},version:Ze.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:class extends dG{constructor(t){super(t),this.element=new cE}},fixedFields:{name:Ze.visitors.document.objects.Contact.fixedFields.name,url:Ze.visitors.document.objects.Contact.fixedFields.url,email:Ze.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:class extends hG{constructor(t){super(t),this.element=new fE}},fixedFields:{name:Ze.visitors.document.objects.License.fixedFields.name,identifier:{$ref:"#/visitors/value"},url:Ze.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:class extends mG{constructor(t){super(t),this.element=new jE}},fixedFields:{url:Ze.visitors.document.objects.Server.fixedFields.url,description:Ze.visitors.document.objects.Server.fixedFields.description,variables:Ze.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:class extends gG{constructor(t){super(t),this.element=new CE}},fixedFields:{enum:Ze.visitors.document.objects.ServerVariable.fixedFields.enum,default:Ze.visitors.document.objects.ServerVariable.fixedFields.default,description:Ze.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:class extends xG{constructor(t){super(t),this.element=new lE}},fixedFields:{schemas:PG,responses:Ze.visitors.document.objects.Components.fixedFields.responses,parameters:Ze.visitors.document.objects.Components.fixedFields.parameters,examples:Ze.visitors.document.objects.Components.fixedFields.examples,requestBodies:Ze.visitors.document.objects.Components.fixedFields.requestBodies,headers:Ze.visitors.document.objects.Components.fixedFields.headers,securitySchemes:Ze.visitors.document.objects.Components.fixedFields.securitySchemes,links:Ze.visitors.document.objects.Components.fixedFields.links,callbacks:Ze.visitors.document.objects.Components.fixedFields.callbacks,pathItems:MG}},Paths:{$visitor:class extends FG{constructor(t){super(t),this.element=new vE}}},PathItem:{$visitor:class extends VG{constructor(t){super(t),this.element=new _d}},fixedFields:{$ref:Ze.visitors.document.objects.PathItem.fixedFields.$ref,summary:Ze.visitors.document.objects.PathItem.fixedFields.summary,description:Ze.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:"#/visitors/document/objects/Operation"},put:{$ref:"#/visitors/document/objects/Operation"},post:{$ref:"#/visitors/document/objects/Operation"},delete:{$ref:"#/visitors/document/objects/Operation"},options:{$ref:"#/visitors/document/objects/Operation"},head:{$ref:"#/visitors/document/objects/Operation"},patch:{$ref:"#/visitors/document/objects/Operation"},trace:{$ref:"#/visitors/document/objects/Operation"},servers:Ze.visitors.document.objects.PathItem.fixedFields.servers,parameters:Ze.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:class extends KG{constructor(t){super(t),this.element=new tb}},fixedFields:{tags:Ze.visitors.document.objects.Operation.fixedFields.tags,summary:Ze.visitors.document.objects.Operation.fixedFields.summary,description:Ze.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},operationId:Ze.visitors.document.objects.Operation.fixedFields.operationId,parameters:Ze.visitors.document.objects.Operation.fixedFields.parameters,requestBody:Ze.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:"#/visitors/document/objects/Responses"},callbacks:Ze.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:Ze.visitors.document.objects.Operation.fixedFields.deprecated,security:Ze.visitors.document.objects.Operation.fixedFields.security,servers:Ze.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:class extends zG{constructor(t){super(t),this.element=new dE}},fixedFields:{description:Ze.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:Ze.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:class extends SG{constructor(t){super(t),this.element=new yE}},fixedFields:{name:Ze.visitors.document.objects.Parameter.fixedFields.name,in:Ze.visitors.document.objects.Parameter.fixedFields.in,description:Ze.visitors.document.objects.Parameter.fixedFields.description,required:Ze.visitors.document.objects.Parameter.fixedFields.required,deprecated:Ze.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:Ze.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:Ze.visitors.document.objects.Parameter.fixedFields.style,explode:Ze.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:Ze.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Ze.visitors.document.objects.Parameter.fixedFields.example,examples:Ze.visitors.document.objects.Parameter.fixedFields.examples,content:Ze.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:class extends qG{constructor(t){super(t),this.element=new xE}},fixedFields:{description:Ze.visitors.document.objects.RequestBody.fixedFields.description,content:Ze.visitors.document.objects.RequestBody.fixedFields.content,required:Ze.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:class extends yG{constructor(t){super(t),this.element=new gE}},fixedFields:{schema:{$ref:"#/visitors/document/objects/Schema"},example:Ze.visitors.document.objects.MediaType.fixedFields.example,examples:Ze.visitors.document.objects.MediaType.fixedFields.examples,encoding:Ze.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:class extends LG{constructor(t){super(t),this.element=new Qk}},fixedFields:{contentType:Ze.visitors.document.objects.Encoding.fixedFields.contentType,headers:Ze.visitors.document.objects.Encoding.fixedFields.headers,style:Ze.visitors.document.objects.Encoding.fixedFields.style,explode:Ze.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:Ze.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:class extends UG{constructor(t){super(t),this.element=new wE}},fixedFields:{default:Ze.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:class extends BG{constructor(t){super(t),this.element=new bE}},fixedFields:{description:Ze.visitors.document.objects.Response.fixedFields.description,headers:Ze.visitors.document.objects.Response.fixedFields.headers,content:Ze.visitors.document.objects.Response.fixedFields.content,links:Ze.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:class extends wP{constructor(t){super(t),this.element=new oE,this.specPath=n=>Sr(n)?["document","objects","Reference"]:["document","objects","PathItem"]}ObjectElement(t){const n=wP.prototype.ObjectElement.call(this,t);return this.element.filter(hp).forEach((i=>{i.setMetaProperty("referenced-element","pathItem")})),n}}},Example:{$visitor:class extends IG{constructor(t){super(t),this.element=new uE}},fixedFields:{summary:Ze.visitors.document.objects.Example.fixedFields.summary,description:Ze.visitors.document.objects.Example.fixedFields.description,value:Ze.visitors.document.objects.Example.fixedFields.value,externalValue:Ze.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:class extends pG{constructor(t){super(t),this.element=new mE}},fixedFields:{operationRef:Ze.visitors.document.objects.Link.fixedFields.operationRef,operationId:Ze.visitors.document.objects.Link.fixedFields.operationId,parameters:Ze.visitors.document.objects.Link.fixedFields.parameters,requestBody:Ze.visitors.document.objects.Link.fixedFields.requestBody,description:Ze.visitors.document.objects.Link.fixedFields.description,server:{$ref:"#/visitors/document/objects/Server"}}},Header:{$visitor:class extends EG{constructor(t){super(t),this.element=new hE}},fixedFields:{description:Ze.visitors.document.objects.Header.fixedFields.description,required:Ze.visitors.document.objects.Header.fixedFields.required,deprecated:Ze.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:Ze.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:Ze.visitors.document.objects.Header.fixedFields.style,explode:Ze.visitors.document.objects.Header.fixedFields.explode,allowReserved:Ze.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:"#/visitors/document/objects/Schema"},example:Ze.visitors.document.objects.Header.fixedFields.example,examples:Ze.visitors.document.objects.Header.fixedFields.examples,content:Ze.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:class extends bG{constructor(t){super(t),this.element=new rR}},fixedFields:{name:Ze.visitors.document.objects.Tag.fixedFields.name,description:Ze.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"}}},Reference:{$visitor:class extends wG{constructor(t){super(t),this.element=new $d}},fixedFields:{$ref:Ze.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"}}},Schema:{$visitor:jG,fixedFields:{$schema:{$ref:"#/visitors/value"},$vocabulary:class extends xt{ObjectElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-$vocabulary"),n}},$id:{$ref:"#/visitors/value"},$anchor:{$ref:"#/visitors/value"},$dynamicAnchor:{$ref:"#/visitors/value"},$dynamicRef:{$ref:"#/visitors/value"},$ref:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("reference-value"),n}},$defs:CG,$comment:{$ref:"#/visitors/value"},allOf:AG,anyOf:OG,oneOf:kG,not:{$ref:"#/visitors/document/objects/Schema"},if:{$ref:"#/visitors/document/objects/Schema"},then:{$ref:"#/visitors/document/objects/Schema"},else:{$ref:"#/visitors/document/objects/Schema"},dependentSchemas:RG,prefixItems:TG,items:{$ref:"#/visitors/document/objects/Schema"},contains:{$ref:"#/visitors/document/objects/Schema"},properties:_G,patternProperties:$G,additionalProperties:{$ref:"#/visitors/document/objects/Schema"},propertyNames:{$ref:"#/visitors/document/objects/Schema"},unevaluatedItems:{$ref:"#/visitors/document/objects/Schema"},unevaluatedProperties:{$ref:"#/visitors/document/objects/Schema"},type:class extends xt{StringElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-type"),n}ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-type"),n}},enum:class extends xt{ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-enum"),n}},const:{$ref:"#/visitors/value"},multipleOf:{$ref:"#/visitors/value"},maximum:{$ref:"#/visitors/value"},exclusiveMaximum:{$ref:"#/visitors/value"},minimum:{$ref:"#/visitors/value"},exclusiveMinimum:{$ref:"#/visitors/value"},maxLength:{$ref:"#/visitors/value"},minLength:{$ref:"#/visitors/value"},pattern:{$ref:"#/visitors/value"},maxItems:{$ref:"#/visitors/value"},minItems:{$ref:"#/visitors/value"},uniqueItems:{$ref:"#/visitors/value"},maxContains:{$ref:"#/visitors/value"},minContains:{$ref:"#/visitors/value"},maxProperties:{$ref:"#/visitors/value"},minProperties:{$ref:"#/visitors/value"},required:{$ref:"#/visitors/value"},dependentRequired:class extends xt{ObjectElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-dependentRequired"),n}},title:{$ref:"#/visitors/value"},description:{$ref:"#/visitors/value"},default:{$ref:"#/visitors/value"},deprecated:{$ref:"#/visitors/value"},readOnly:{$ref:"#/visitors/value"},writeOnly:{$ref:"#/visitors/value"},examples:class extends xt{ArrayElement(t){const n=super.enter(t);return this.element.classes.push("json-schema-examples"),n}},format:{$ref:"#/visitors/value"},contentEncoding:{$ref:"#/visitors/value"},contentMediaType:{$ref:"#/visitors/value"},contentSchema:{$ref:"#/visitors/document/objects/Schema"},discriminator:{$ref:"#/visitors/document/objects/Discriminator"},xml:{$ref:"#/visitors/document/objects/XML"},externalDocs:{$ref:"#/visitors/document/objects/ExternalDocumentation"},example:{$ref:"#/visitors/value"}}},Discriminator:{$visitor:class extends NG{constructor(t){super(t),this.element=new Wk,this.canSupportSpecificationExtensions=!0}},fixedFields:{propertyName:Ze.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:Ze.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:class extends DG{constructor(t){super(t),this.element=new sR}},fixedFields:{name:Ze.visitors.document.objects.XML.fixedFields.name,namespace:Ze.visitors.document.objects.XML.fixedFields.namespace,prefix:Ze.visitors.document.objects.XML.fixedFields.prefix,attribute:Ze.visitors.document.objects.XML.fixedFields.attribute,wrapped:Ze.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:class extends HG{constructor(t){super(t),this.element=new EE}},fixedFields:{type:Ze.visitors.document.objects.SecurityScheme.fixedFields.type,description:Ze.visitors.document.objects.SecurityScheme.fixedFields.description,name:Ze.visitors.document.objects.SecurityScheme.fixedFields.name,in:Ze.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:Ze.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:Ze.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:"#/visitors/document/objects/OAuthFlows"},openIdConnectUrl:Ze.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:class extends GG{constructor(t){super(t),this.element=new tR}},fixedFields:{implicit:{$ref:"#/visitors/document/objects/OAuthFlow"},password:{$ref:"#/visitors/document/objects/OAuthFlow"},clientCredentials:{$ref:"#/visitors/document/objects/OAuthFlow"},authorizationCode:{$ref:"#/visitors/document/objects/OAuthFlow"}}},OAuthFlow:{$visitor:class extends XG{constructor(t){super(t),this.element=new eR}},fixedFields:{authorizationUrl:Ze.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:Ze.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:Ze.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:Ze.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:class extends vG{constructor(t){super(t),this.element=new SE}}}},extension:{$visitor:Ze.visitors.document.extension.$visitor}}}},Yn=t=>(n,i={})=>((l,{specPath:p=["visitors","document","objects","OpenApi","$visitor"],plugins:v=[]}={})=>{const x=GO(l),S=P1(ZG),C=new(la(p,S))({specObj:S});return bi(x,C),_m(C.element,v,{toolboxCreator:bP,visitorOptions:{keyMap:Wl,nodeTypeGetter:Ko}})})(n,{specPath:t,...i});oE.refract=Yn(["visitors","document","objects","Callback","$visitor"]),lE.refract=Yn(["visitors","document","objects","Components","$visitor"]),cE.refract=Yn(["visitors","document","objects","Contact","$visitor"]),uE.refract=Yn(["visitors","document","objects","Example","$visitor"]),Wk.refract=Yn(["visitors","document","objects","Discriminator","$visitor"]),Qk.refract=Yn(["visitors","document","objects","Encoding","$visitor"]),dE.refract=Yn(["visitors","document","objects","ExternalDocumentation","$visitor"]),hE.refract=Yn(["visitors","document","objects","Header","$visitor"]),pE.refract=Yn(["visitors","document","objects","Info","$visitor"]),cp.refract=Yn(["visitors","document","objects","OpenApi","fixedFields","jsonSchemaDialect"]),fE.refract=Yn(["visitors","document","objects","License","$visitor"]),mE.refract=Yn(["visitors","document","objects","Link","$visitor"]),gE.refract=Yn(["visitors","document","objects","MediaType","$visitor"]),eR.refract=Yn(["visitors","document","objects","OAuthFlow","$visitor"]),tR.refract=Yn(["visitors","document","objects","OAuthFlows","$visitor"]),nR.refract=Yn(["visitors","document","objects","OpenApi","fixedFields","openapi"]),Td.refract=Yn(["visitors","document","objects","OpenApi","$visitor"]),tb.refract=Yn(["visitors","document","objects","Operation","$visitor"]),yE.refract=Yn(["visitors","document","objects","Parameter","$visitor"]),_d.refract=Yn(["visitors","document","objects","PathItem","$visitor"]),vE.refract=Yn(["visitors","document","objects","Paths","$visitor"]),$d.refract=Yn(["visitors","document","objects","Reference","$visitor"]),xE.refract=Yn(["visitors","document","objects","RequestBody","$visitor"]),bE.refract=Yn(["visitors","document","objects","Response","$visitor"]),wE.refract=Yn(["visitors","document","objects","Responses","$visitor"]),up.refract=Yn(["visitors","document","objects","Schema","$visitor"]),SE.refract=Yn(["visitors","document","objects","SecurityRequirement","$visitor"]),EE.refract=Yn(["visitors","document","objects","SecurityScheme","$visitor"]),jE.refract=Yn(["visitors","document","objects","Server","$visitor"]),CE.refract=Yn(["visitors","document","objects","ServerVariable","$visitor"]),rR.refract=Yn(["visitors","document","objects","Tag","$visitor"]),sR.refract=Yn(["visitors","document","objects","XML","$visitor"]);class JG extends kx{constructor(n){super({...n??{},name:"binary"})}canParse(n){return this.fileExtensions.length===0||this.fileExtensions.includes(n.extension)}parse(n){try{const i=unescape(encodeURIComponent(n.toString())),l=btoa(i),p=new qo;if(l.length!==0){const v=new nu(l);v.classes.push("result"),p.push(v)}return p}catch(i){throw new au(`Error parsing "${n.uri}"`,{cause:i})}}}class WG extends class{name;constructor({name:n}){this.name=n}}{constructor(n){super({...n??{},name:"openapi-3-1"})}canResolve(n,i){const l=i.dereference.strategies.find((p=>p.name==="openapi-3-1"));return l!==void 0&&l.canDereference(n,i)}async resolve(n,i){const l=i.dereference.strategies.find((x=>x.name==="openapi-3-1"));if(l===void 0)throw new SD('"openapi-3-1" dereference strategy is not available.');const p=new bm,v=lN(i,{resolve:{internal:!1},dereference:{refSet:p}});return await l.dereference(n,v),p}}const{AbortController:QG,AbortSignal:eX}=globalThis;globalThis.AbortController===void 0&&(globalThis.AbortController=QG),globalThis.AbortSignal===void 0&&(globalThis.AbortSignal=eX);class SP extends class extends class{name;constructor({name:n}){this.name=n}}{timeout;redirects;withCredentials;constructor(n){const{name:i="http-resolver",timeout:l=5e3,redirects:p=5,withCredentials:v=!1}=n??{};super({name:i}),this.timeout=l,this.redirects=p,this.withCredentials=v}canRead(n){return h1(n.uri)}}{swaggerHTTPClient=li;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:n=li,swaggerHTTPClientConfig:i={},...l}={}){super({...l,name:"http-swagger-client"}),this.swaggerHTTPClient=n,this.swaggerHTTPClientConfig=i}getHttpClient(){return this.swaggerHTTPClient}async read(n){const i=this.getHttpClient(),l=new AbortController,{signal:p}=l,v=setTimeout((()=>{l.abort()}),this.timeout),x=this.getHttpClient().withCredentials||this.withCredentials?"include":"same-origin",S=this.redirects===0?"error":"follow",C=this.redirects>0?this.redirects:void 0;try{return(await i({url:n.uri,signal:p,userFetch:async(N,D)=>{let $=await fetch(N,D);try{$.headers.delete("Content-Type")}catch{$=new Response($.body,{...$,headers:new Headers($.headers)}),$.headers.delete("Content-Type")}return $},credentials:x,redirect:S,follow:C,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(N){throw new cN(`Error downloading "${n.uri}"`,{cause:N})}finally{clearTimeout(v)}}}class EP extends kx{constructor(n={}){super({name:"json-swagger-client",mediaTypes:["application/json"],...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{return JSON.parse(n.toString()),!0}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new au("json-swagger-client parser plugin doesn't support sourceMaps option");const i=new qo,l=n.toString();if(this.allowEmpty&&l.trim()==="")return i;try{const p=wD(JSON.parse(l));return p.classes.push("result"),i.push(p),i}catch(p){throw new au(`Error parsing "${n.uri}"`,{cause:p})}}}class jP extends kx{constructor(n={}){super({name:"yaml-1-2-swagger-client",mediaTypes:["text/yaml","application/yaml"],...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{return Uu.load(n.toString(),{schema:Ec}),!0}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new au("yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option");const i=new qo,l=n.toString();try{const p=Uu.load(l,{schema:Ec});if(this.allowEmpty&&p===void 0)return i;const v=wD(p);return v.classes.push("result"),i.push(v),i}catch(p){throw new au(`Error parsing "${n.uri}"`,{cause:p})}}}class CP extends kx{detectionRegExp=/"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))"/;constructor(n={}){super({name:"openapi-json-3-1-swagger-client",mediaTypes:new yk(...Mm.filterByFormat("generic"),...Mm.filterByFormat("json")),...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{const p=n.toString();return JSON.parse(p),this.detectionRegExp.test(p)}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new au("openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option");const i=new qo,l=n.toString();if(this.allowEmpty&&l.trim()==="")return i;try{const p=JSON.parse(l),v=Td.refract(p,this.refractorOpts);return v.classes.push("result"),i.push(v),i}catch(p){throw new au(`Error parsing "${n.uri}"`,{cause:p})}}}class AP extends kx{detectionRegExp=/(?<YAML>^(["']?)openapi\2\s*:\s*(["']?)(?<version_yaml>3\.1\.(?:[1-9]\d*|0))\3(?:\s+|$))|(?<JSON>"openapi"\s*:\s*"(?<version_json>3\.1\.(?:[1-9]\d*|0))")/m;constructor(n={}){super({name:"openapi-yaml-3-1-swagger-client",mediaTypes:new yk(...Mm.filterByFormat("generic"),...Mm.filterByFormat("yaml")),...n})}async canParse(n){const i=this.fileExtensions.length===0||this.fileExtensions.includes(n.extension),l=this.mediaTypes.includes(n.mediaType);if(!i)return!1;if(l)return!0;if(!l)try{const p=n.toString();return Uu.load(p),this.detectionRegExp.test(p)}catch{return!1}return!1}async parse(n){if(this.sourceMap)throw new au("openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option");const i=new qo,l=n.toString();try{const p=Uu.load(l,{schema:Ec});if(this.allowEmpty&&p===void 0)return i;const v=Td.refract(p,this.refractorOpts);return v.classes.push("result"),i.push(v),i}catch(p){throw new au(`Error parsing "${n.uri}"`,{cause:p})}}}const AE=t=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(t),Bm=t=>{const n=AO(t);return bO("#",n)},dR=(t,n)=>{const i=(p=>{if(!AE(p))throw new u7(p);return p})(t),l=yD((p=>uu(p)&&st(p.$anchor)===i),n);if(Cd(l))throw new l7(`Evaluation failed on token: "${i}"`);return l},OP=(t,n)=>{if(n.$ref===void 0)return;const i=AO(st(n.$ref)),l=st(n.meta.get("inherited$id"));return`${Qh(((p,v)=>Ds(p,yx(cr(v)))),t,[...l,st(n.$ref)])}${i==="#"?"":i}`},rb=t=>{if(rb.cache.has(t))return rb.cache.get(t);const n=up.refract(t);return rb.cache.set(t,n),n};rb.cache=new WeakMap;const wi=t=>op(t)?rb(t):t,OE=(t,n)=>{const{cache:i}=OE,l=cr(t),p=C=>uu(C)&&C.$id!==void 0;if(!i.has(n)){const C=((N,D)=>{const $=new fD({predicate:N});return bi(D,$),new Sx($.result)})(p,n);i.set(n,Array.from(C))}const v=i.get(n).find((C=>((D,$)=>{if($.$id===void 0)return;const L=st($.meta.get("inherited$id"));return Qh(((U,J)=>Ds(U,yx(cr(J)))),D,[...L,st($.$id)])})(l,C)===l));if(Cd(v))throw new tk(`Evaluation failed on URI: "${t}"`);let x,S;return AE(Bm(t))?(x=dR,S=Bm(t)):(x=Uo,S=ro(t)),x(S,v)};OE.cache=new WeakMap;const hR=bi[Symbol.for("nodejs.util.promisify.custom")],Ks=new WO,Ql=(t,n,i,l)=>{Bo(l)?l.value=t:Array.isArray(l)&&(l[i]=t)};class Um{indirections;namespace;reference;options;ancestors;refractCache;constructor({reference:n,namespace:i,options:l,indirections:p=[],ancestors:v=new ek,refractCache:x=new Map}){this.indirections=p,this.namespace=i,this.reference=n,this.options=l,this.ancestors=new ek(...v),this.refractCache=x}toBaseURI(n){return Ds(this.reference.uri,yx(cr(n)))}async toReference(n){if(this.reference.depth>=this.options.resolve.maxDepth)throw new d7(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file "${this.reference.uri}"`);const i=this.toBaseURI(n),{refSet:l}=this.reference;if(l.has(i))return l.find(V$(i,"uri"));const p=await(async(x,S)=>{const C=new vx({uri:yx(cr(x)),mediaType:S.parse.mediaType}),N=await(async(D,$)=>{const L=$.resolve.resolvers.map((J=>{const Y=Object.create(J);return Object.assign(Y,$.resolve.resolverOpts)})),U=await OO("canRead",[D,$],L);if(mx(U))throw new uN(D.uri);try{const{result:J}=await kO("read",[D],U);return J}catch(J){throw new TO(`Error while reading file "${D.uri}"`,{cause:J})}})(C,S);return(async(D,$)=>{const L=$.parse.parsers.map((J=>{const Y=Object.create(J);return Object.assign(Y,$.parse.parserOpts)})),U=await OO("canParse",[D,$],L);if(mx(U))throw new uN(D.uri);try{const{plugin:J,result:Y}=await kO("parse",[D,$],U);return!J.allowEmpty&&Y.isEmpty?Promise.reject(new RO(`Error while parsing file "${D.uri}". File is empty.`)):Y}catch(J){throw new RO(`Error while parsing file "${D.uri}"`,{cause:J})}})(new vx({...C,data:N}),S)})(Fo(i),{...this.options,parse:{...this.options.parse,mediaType:"text/plain"}}),v=new iu({uri:i,value:At(p),depth:this.reference.depth+1});if(l.add(v),this.options.dereference.immutable){const x=new iu({uri:`immutable://${i}`,value:p,depth:this.reference.depth+1});l.add(x)}return v}toAncestorLineage(n){const i=new Set(n.filter(es));return[new ek(...this.ancestors,i),i]}async ReferenceElement(n,i,l,p,v,x){if(this.indirections.includes(n))return!1;const[S,C]=this.toAncestorLineage([...v,l]),N=this.toBaseURI(st(n.$ref)),D=cr(this.reference.uri)===N,$=!D;if(!this.options.resolve.internal&&D||!this.options.resolve.external&&$)return!1;const L=await this.toReference(st(n.$ref)),U=Ds(N,st(n.$ref));this.indirections.push(n);const J=ro(U);let Y=Uo(J,L.value.result);if(Y.id=Ks.identify(Y),op(Y)){const xe=st(n.meta.get("referenced-element")),pe=`${xe}-${st(Ks.identify(Y))}`;this.refractCache.has(pe)?Y=this.refractCache.get(pe):Sr(Y)?(Y=$d.refract(Y),Y.setMetaProperty("referenced-element",xe),this.refractCache.set(pe,Y)):(Y=this.namespace.getElementClass(xe).refract(Y),this.refractCache.set(pe,Y))}if(n===Y)throw new wr("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new $m(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(S.includes(Y)){if(L.refSet.circular=!0,this.options.dereference.circular==="error")throw new wr("Circular reference detected");if(this.options.dereference.circular==="replace"){var Z,P;const xe=new su(Y.id,{type:"reference",uri:L.uri,$ref:st(n.$ref)}),pe=((Z=(P=this.options.dereference.strategyOpts["openapi-3-1"])===null||P===void 0?void 0:P.circularReplacer)!==null&&Z!==void 0?Z:this.options.dereference.circularReplacer)(xe);return x.replaceWith(pe,Ql),!l&&pe}}const re=cr(L.refSet.rootRef.uri)!==L.uri,le=["error","replace"].includes(this.options.dereference.circular);if(($||re||hp(Y)||le)&&!S.includesCycle(Y)){C.add(n);const xe=new Um({reference:L,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:S});Y=await hR(Y,xe,{keyMap:Wl,nodeTypeGetter:Ko}),C.delete(n)}this.indirections.pop();const he=Ii(Y);return he.setMetaProperty("id",Ks.generateId()),he.setMetaProperty("ref-fields",{$ref:st(n.$ref),description:st(n.description),summary:st(n.summary)}),he.setMetaProperty("ref-origin",L.uri),he.setMetaProperty("ref-referencing-element-id",At(Ks.identify(n))),Bn(Y)&&Bn(he)&&(n.hasKey("description")&&"description"in Y&&(he.remove("description"),he.set("description",n.get("description"))),n.hasKey("summary")&&"summary"in Y&&(he.remove("summary"),he.set("summary",n.get("summary")))),x.replaceWith(he,Ql),!l&&he}async PathItemElement(n,i,l,p,v,x){if(!bn(n.$ref))return;if(this.indirections.includes(n))return!1;const[S,C]=this.toAncestorLineage([...v,l]),N=this.toBaseURI(st(n.$ref)),D=cr(this.reference.uri)===N,$=!D;if(!this.options.resolve.internal&&D||!this.options.resolve.external&&$)return;const L=await this.toReference(st(n.$ref)),U=Ds(N,st(n.$ref));this.indirections.push(n);const J=ro(U);let Y=Uo(J,L.value.result);if(Y.id=Ks.identify(Y),op(Y)){const he=`path-item-${st(Ks.identify(Y))}`;this.refractCache.has(he)?Y=this.refractCache.get(he):(Y=_d.refract(Y),this.refractCache.set(he,Y))}if(n===Y)throw new wr("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new $m(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(S.includes(Y)){if(L.refSet.circular=!0,this.options.dereference.circular==="error")throw new wr("Circular reference detected");if(this.options.dereference.circular==="replace"){var Z,P;const he=new su(Y.id,{type:"path-item",uri:L.uri,$ref:st(n.$ref)}),xe=((Z=(P=this.options.dereference.strategyOpts["openapi-3-1"])===null||P===void 0?void 0:P.circularReplacer)!==null&&Z!==void 0?Z:this.options.dereference.circularReplacer)(he);return x.replaceWith(xe,Ql),!l&&xe}}const re=cr(L.refSet.rootRef.uri)!==L.uri,le=["error","replace"].includes(this.options.dereference.circular);if(($||re||dp(Y)&&bn(Y.$ref)||le)&&!S.includesCycle(Y)){C.add(n);const he=new Um({reference:L,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:S});Y=await hR(Y,he,{keyMap:Wl,nodeTypeGetter:Ko}),C.delete(n)}if(this.indirections.pop(),dp(Y)){const he=new _d([...Y.content],At(Y.meta),At(Y.attributes));he.setMetaProperty("id",Ks.generateId()),n.forEach(((xe,pe,_e)=>{he.remove(st(pe)),he.content.push(_e)})),he.remove("$ref"),he.setMetaProperty("ref-fields",{$ref:st(n.$ref)}),he.setMetaProperty("ref-origin",L.uri),he.setMetaProperty("ref-referencing-element-id",At(Ks.identify(n))),Y=he}return x.replaceWith(Y,Ql),l?void 0:Y}async LinkElement(n,i,l,p,v,x){if(!bn(n.operationRef)&&!bn(n.operationId))return;if(bn(n.operationRef)&&bn(n.operationId))throw new wr("LinkElement operationRef and operationId fields are mutually exclusive.");let S;if(bn(n.operationRef)){var C;const D=ro(st(n.operationRef)),$=this.toBaseURI(st(n.operationRef)),L=cr(this.reference.uri)===$,U=!L;if(!this.options.resolve.internal&&L||!this.options.resolve.external&&U)return;const J=await this.toReference(st(n.operationRef));if(S=Uo(D,J.value.result),op(S)){const Z=`operation-${st(Ks.identify(S))}`;this.refractCache.has(Z)?S=this.refractCache.get(Z):(S=tb.refract(S),this.refractCache.set(Z,S))}S=Ii(S),S.setMetaProperty("ref-origin",J.uri);const Y=Ii(n);return(C=Y.operationRef)===null||C===void 0||C.meta.set("operation",S),x.replaceWith(Y,Ql),l?void 0:Y}if(bn(n.operationId)){var N;const D=st(n.operationId),$=await this.toReference(Fo(this.reference.uri));if(S=yD((U=>xP(U)&&es(U.operationId)&&U.operationId.equals(D)),$.value.result),Cd(S))throw new wr(`OperationElement(operationId=${D}) not found.`);const L=Ii(n);return(N=L.operationId)===null||N===void 0||N.meta.set("operation",S),x.replaceWith(L,Ql),l?void 0:L}}async ExampleElement(n,i,l,p,v,x){if(!bn(n.externalValue))return;if(n.hasKey("value")&&bn(n.externalValue))throw new wr("ExampleElement value and externalValue fields are mutually exclusive.");const S=this.toBaseURI(st(n.externalValue)),C=cr(this.reference.uri)===S,N=!C;if(!this.options.resolve.internal&&C||!this.options.resolve.external&&N)return;const D=await this.toReference(st(n.externalValue)),$=Ii(D.value.result);$.setMetaProperty("ref-origin",D.uri);const L=Ii(n);return L.value=$,x.replaceWith(L,Ql),l?void 0:L}async SchemaElement(n,i,l,p,v,x){if(!bn(n.$ref))return;if(this.indirections.includes(n))return!1;const[S,C]=this.toAncestorLineage([...v,l]);let N=await this.toReference(Fo(this.reference.uri)),{uri:D}=N;const $=OP(D,n),L=cr($),U=new vx({uri:L}),J=wU((_e=>_e.canRead(U)),this.options.resolve.resolvers),Y=!J;let Z,P=cr(this.reference.uri)===$,re=!P;this.indirections.push(n);try{if(J||Y){D=this.toBaseURI($);const _e=$,ke=wi(N.value.result);if(Z=OE(_e,ke),Z=wi(Z),Z.id=Ks.identify(Z),!this.options.resolve.internal&&P||!this.options.resolve.external&&re)return}else{if(D=this.toBaseURI($),P=cr(this.reference.uri)===D,re=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&re)return;N=await this.toReference(Fo($));const _e=ro($),ke=wi(N.value.result);Z=Uo(_e,ke),Z=wi(Z),Z.id=Ks.identify(Z)}}catch(_e){if(!(Y&&_e instanceof tk))throw _e;if(AE(Bm($))){if(P=cr(this.reference.uri)===D,re=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&re)return;N=await this.toReference(Fo($));const ke=Bm($),Be=wi(N.value.result);Z=dR(ke,Be),Z=wi(Z),Z.id=Ks.identify(Z)}else{if(D=this.toBaseURI($),P=cr(this.reference.uri)===D,re=!P,!this.options.resolve.internal&&P||!this.options.resolve.external&&re)return;N=await this.toReference(Fo($));const ke=ro($),Be=wi(N.value.result);Z=Uo(ke,Be),Z=wi(Z),Z.id=Ks.identify(Z)}}if(n===Z)throw new wr("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new $m(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(S.includes(Z)){if(N.refSet.circular=!0,this.options.dereference.circular==="error")throw new wr("Circular reference detected");if(this.options.dereference.circular==="replace"){var le,he;const _e=new su(Z.id,{type:"json-schema",uri:N.uri,$ref:st(n.$ref)}),ke=((le=(he=this.options.dereference.strategyOpts["openapi-3-1"])===null||he===void 0?void 0:he.circularReplacer)!==null&&le!==void 0?le:this.options.dereference.circularReplacer)(_e);return x.replaceWith(ke,Ql),!l&&ke}}const xe=cr(N.refSet.rootRef.uri)!==N.uri,pe=["error","replace"].includes(this.options.dereference.circular);if((re||xe||uu(Z)&&bn(Z.$ref)||pe)&&!S.includesCycle(Z)){C.add(n);const _e=new Um({reference:N,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:S});Z=await hR(Z,_e,{keyMap:Wl,nodeTypeGetter:Ko}),C.delete(n)}if(this.indirections.pop(),uR(Z)){const _e=At(Z);return _e.setMetaProperty("id",Ks.generateId()),_e.setMetaProperty("ref-fields",{$ref:st(n.$ref)}),_e.setMetaProperty("ref-origin",N.uri),_e.setMetaProperty("ref-referencing-element-id",At(Ks.identify(n))),x.replaceWith(_e,Ql),!l&&_e}if(uu(Z)){const _e=new up([...Z.content],At(Z.meta),At(Z.attributes));_e.setMetaProperty("id",Ks.generateId()),n.forEach(((ke,Be,Ee)=>{_e.remove(st(Be)),_e.content.push(Ee)})),_e.remove("$ref"),_e.setMetaProperty("ref-fields",{$ref:st(n.$ref)}),_e.setMetaProperty("ref-origin",N.uri),_e.setMetaProperty("ref-referencing-element-id",At(Ks.identify(n))),Z=_e}return x.replaceWith(Z,Ql),l?void 0:Z}}const tX=bi[Symbol.for("nodejs.util.promisify.custom")],Vo=t=>{const n=(i=>i.slice(2))(t);return n.reduce(((i,l,p)=>{if(Bo(l)){const v=String(st(l.key));i.push(v)}else if(Mi(n[p-2])){const v=n[p-2].content.indexOf(l);i.push(v)}return i}),[])};class nX{modelPropertyMacro;options;SchemaElement={leave:(n,i,l,p,v)=>{n.properties!==void 0&&Bn(n.properties)&&n.properties.forEach((x=>{if(Bn(x))try{const N=this.modelPropertyMacro(st(x));x.set("default",N)}catch(N){var S,C;const D=new Error(N,{cause:N});D.fullPath=[...Vo([...v,l,n]),"properties"],(S=this.options.dereference.dereferenceOpts)===null||S===void 0||(S=S.errors)===null||S===void 0||(C=S.push)===null||C===void 0||C.call(S,D)}}))}};constructor({modelPropertyMacro:n,options:i}){this.modelPropertyMacro=n,this.options=i}}class rX{options;SchemaElement={leave(n,i,l,p,v){if(n.allOf!==void 0){if(!Mi(n.allOf)){var x,S;const D=new TypeError("allOf must be an array");return D.fullPath=[...Vo([...v,l,n]),"allOf"],void((x=this.options.dereference.dereferenceOpts)===null||x===void 0||(x=x.errors)===null||x===void 0||(S=x.push)===null||S===void 0||S.call(x,D))}if(n.allOf.isEmpty)n.remove("allOf");else{if(!n.allOf.content.every(uu)){var C,N;const D=new TypeError("Elements in allOf must be objects");return D.fullPath=[...Vo([...v,l,n]),"allOf"],void((C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||(N=C.push)===null||N===void 0||N.call(C,D))}for(;n.hasKey("allOf");){const{allOf:D}=n;n.remove("allOf");const $=Gl.all([...D.content,n]);if(n.hasKey("$$ref")||$.remove("$$ref"),n.hasKey("example")){const L=$.getMember("example");L&&(L.value=n.get("example"))}if(n.hasKey("examples")){const L=$.getMember("examples");L&&(L.value=n.get("examples"))}n.content=$.content}}}}};constructor({options:n}){this.options=n}}class sX{parameterMacro;options;#e;OperationElement={enter:n=>{this.#e=n},leave:()=>{this.#e=void 0}};ParameterElement={leave:(n,i,l,p,v)=>{const x=this.#e?st(this.#e):null,S=st(n);try{const D=this.parameterMacro(x,S);n.set("default",D)}catch(D){var C,N;const $=new Error(D,{cause:D});$.fullPath=Vo([...v,l]),(C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||(N=C.push)===null||N===void 0||N.call(C,$)}}};constructor({parameterMacro:n,options:i}){this.parameterMacro=n,this.options=i}}const kE=t=>{if(t.cause==null)return t;let{cause:n}=t;for(;n.cause!=null;)n=n.cause;return n};class iX extends $a{}const{wrapError:pR}=ik,fR=bi[Symbol.for("nodejs.util.promisify.custom")],so=new WO,pp=(t,n,i,l)=>{Bo(l)?l.value=t:Array.isArray(l)&&(l[i]=t)};class sb extends Um{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:n=!0,useCircularStructures:i=!1,basePath:l=null,...p}){super(p),this.allowMetaPatches=n,this.useCircularStructures=i,this.basePath=l}async ReferenceElement(n,i,l,p,v,x){try{if(this.indirections.includes(n))return!1;const[U,J]=this.toAncestorLineage([...v,l]),Y=this.toBaseURI(st(n.$ref)),Z=cr(this.reference.uri)===Y,P=!Z;if(!this.options.resolve.internal&&Z||!this.options.resolve.external&&P)return!1;const re=await this.toReference(st(n.$ref)),le=Ds(Y,st(n.$ref));this.indirections.push(n);const he=ro(le);let xe=Uo(he,re.value.result);if(xe.id=so.identify(xe),op(xe)){const Be=st(n.meta.get("referenced-element")),Ee=`${Be}-${st(so.identify(xe))}`;this.refractCache.has(Ee)?xe=this.refractCache.get(Ee):Sr(xe)?(xe=$d.refract(xe),xe.setMetaProperty("referenced-element",Be),this.refractCache.set(Ee,xe)):(xe=this.namespace.getElementClass(Be).refract(xe),this.refractCache.set(Ee,xe))}if(n===xe)throw new wr("Recursive Reference Object detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new $m(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(xe)){if(re.refSet.circular=!0,this.options.dereference.circular==="error")throw new wr("Circular reference detected");if(this.options.dereference.circular==="replace"){var S,C;const Be=new su(xe.id,{type:"reference",uri:re.uri,$ref:st(n.$ref),baseURI:le,referencingElement:n}),Ee=((S=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&S!==void 0?S:this.options.dereference.circularReplacer)(Be);return x.replaceWith(Be,pp),!l&&Ee}}const pe=cr(re.refSet.rootRef.uri)!==re.uri,_e=["error","replace"].includes(this.options.dereference.circular);if((P||pe||hp(xe)||_e)&&!U.includesCycle(xe)){var N;J.add(n);const Be=new sb({reference:re,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:U,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(N=this.basePath)!==null&&N!==void 0?N:[...Vo([...v,l,n]),"$ref"]});xe=await fR(xe,Be,{keyMap:Wl,nodeTypeGetter:Ko}),J.delete(n)}this.indirections.pop();const ke=Ii(xe);if(ke.setMetaProperty("ref-fields",{$ref:st(n.$ref),description:st(n.description),summary:st(n.summary)}),ke.setMetaProperty("ref-origin",re.uri),ke.setMetaProperty("ref-referencing-element-id",At(so.identify(n))),Bn(xe)&&(n.hasKey("description")&&"description"in xe&&(ke.remove("description"),ke.set("description",n.get("description"))),n.hasKey("summary")&&"summary"in xe&&(ke.remove("summary"),ke.set("summary",n.get("summary")))),this.allowMetaPatches&&Bn(ke)&&!ke.hasKey("$$ref")){const Be=Ds(Y,le);ke.set("$$ref",Be)}return x.replaceWith(ke,pp),!l&&ke}catch(U){var D,$,L;const J=kE(U),Y=pR(J,{baseDoc:this.reference.uri,$ref:st(n.$ref),pointer:ro(st(n.$ref)),fullPath:(D=this.basePath)!==null&&D!==void 0?D:[...Vo([...v,l,n]),"$ref"]});return void(($=this.options.dereference.dereferenceOpts)===null||$===void 0||($=$.errors)===null||$===void 0||(L=$.push)===null||L===void 0||L.call($,Y))}}async PathItemElement(n,i,l,p,v,x){try{if(!bn(n.$ref))return;if(this.indirections.includes(n)||_1(["cycle"],n.$ref))return!1;const[U,J]=this.toAncestorLineage([...v,l]),Y=this.toBaseURI(st(n.$ref)),Z=cr(this.reference.uri)===Y,P=!Z;if(!this.options.resolve.internal&&Z||!this.options.resolve.external&&P)return;const re=await this.toReference(st(n.$ref)),le=Ds(Y,st(n.$ref));this.indirections.push(n);const he=ro(le);let xe=Uo(he,re.value.result);if(xe.id=so.identify(xe),op(xe)){const ke=`path-item-${st(so.identify(xe))}`;this.refractCache.has(ke)?xe=this.refractCache.get(ke):(xe=_d.refract(xe),this.refractCache.set(ke,xe))}if(n===xe)throw new wr("Recursive Path Item Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new $m(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(xe)){if(re.refSet.circular=!0,this.options.dereference.circular==="error")throw new wr("Circular reference detected");if(this.options.dereference.circular==="replace"){var S,C;const ke=new su(xe.id,{type:"path-item",uri:re.uri,$ref:st(n.$ref),baseURI:le,referencingElement:n}),Be=((S=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&S!==void 0?S:this.options.dereference.circularReplacer)(ke);return x.replaceWith(ke,pp),!l&&Be}}const pe=cr(re.refSet.rootRef.uri)!==re.uri,_e=["error","replace"].includes(this.options.dereference.circular);if((P||pe||dp(xe)&&bn(xe.$ref)||_e)&&!U.includesCycle(xe)){var N;J.add(n);const ke=new sb({reference:re,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:U,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:(N=this.basePath)!==null&&N!==void 0?N:[...Vo([...v,l,n]),"$ref"]});xe=await fR(xe,ke,{keyMap:Wl,nodeTypeGetter:Ko}),J.delete(n)}if(this.indirections.pop(),dp(xe)){const ke=new _d([...xe.content],At(xe.meta),At(xe.attributes));if(n.forEach(((Be,Ee,ye)=>{ke.remove(st(Ee)),ke.content.push(ye)})),ke.remove("$ref"),ke.setMetaProperty("ref-fields",{$ref:st(n.$ref)}),ke.setMetaProperty("ref-origin",re.uri),ke.setMetaProperty("ref-referencing-element-id",At(so.identify(n))),this.allowMetaPatches&&ke.get("$$ref")===void 0){const Be=Ds(Y,le);ke.set("$$ref",Be)}xe=ke}return x.replaceWith(xe,pp),l?void 0:xe}catch(U){var D,$,L;const J=kE(U),Y=pR(J,{baseDoc:this.reference.uri,$ref:st(n.$ref),pointer:ro(st(n.$ref)),fullPath:(D=this.basePath)!==null&&D!==void 0?D:[...Vo([...v,l,n]),"$ref"]});return void(($=this.options.dereference.dereferenceOpts)===null||$===void 0||($=$.errors)===null||$===void 0||(L=$.push)===null||L===void 0||L.call($,Y))}}async SchemaElement(n,i,l,p,v,x){try{if(!bn(n.$ref))return;if(this.indirections.includes(n))return!1;const[U,J]=this.toAncestorLineage([...v,l]);let Y=await this.toReference(Fo(this.reference.uri)),{uri:Z}=Y;const P=OP(Z,n),re=cr(P),le=new vx({uri:re}),he=!this.options.resolve.resolvers.some((ye=>ye.canRead(le))),xe=!he;let pe,_e=cr(this.reference.uri)===P,ke=!_e;this.indirections.push(n);try{if(he||xe){Z=this.toBaseURI(P);const ye=P,ze=wi(Y.value.result);if(pe=OE(ye,ze),pe=wi(pe),pe.id=so.identify(pe),!this.options.resolve.internal&&_e||!this.options.resolve.external&&ke)return}else{if(Z=this.toBaseURI(P),_e=cr(this.reference.uri)===Z,ke=!_e,!this.options.resolve.internal&&_e||!this.options.resolve.external&&ke)return;Y=await this.toReference(Fo(P));const ye=ro(P),ze=wi(Y.value.result);pe=Uo(ye,ze),pe=wi(pe),pe.id=so.identify(pe)}}catch(ye){if(!(xe&&ye instanceof tk))throw ye;if(AE(Bm(P))){if(_e=cr(this.reference.uri)===Z,ke=!_e,!this.options.resolve.internal&&_e||!this.options.resolve.external&&ke)return;Y=await this.toReference(Fo(P));const ze=Bm(P),Le=wi(Y.value.result);pe=dR(ze,Le),pe=wi(pe),pe.id=so.identify(pe)}else{if(Z=this.toBaseURI(st(P)),_e=cr(this.reference.uri)===Z,ke=!_e,!this.options.resolve.internal&&_e||!this.options.resolve.external&&ke)return;Y=await this.toReference(Fo(P));const ze=ro(P),Le=wi(Y.value.result);pe=Uo(ze,Le),pe=wi(pe),pe.id=so.identify(pe)}}if(n===pe)throw new wr("Recursive Schema Object reference detected");if(this.indirections.length>this.options.dereference.maxDepth)throw new $m(`Maximum dereference depth of "${this.options.dereference.maxDepth}" has been exceeded in file "${this.reference.uri}"`);if(U.includes(pe)){if(Y.refSet.circular=!0,this.options.dereference.circular==="error")throw new wr("Circular reference detected");if(this.options.dereference.circular==="replace"){var S,C;const ye=new su(pe.id,{type:"json-schema",uri:Y.uri,$ref:st(n.$ref),baseURI:Ds(Z,P),referencingElement:n}),ze=((S=(C=this.options.dereference.strategyOpts["openapi-3-1"])===null||C===void 0?void 0:C.circularReplacer)!==null&&S!==void 0?S:this.options.dereference.circularReplacer)(ye);return x.replaceWith(ze,pp),!l&&ze}}const Be=cr(Y.refSet.rootRef.uri)!==Y.uri,Ee=["error","replace"].includes(this.options.dereference.circular);if((ke||Be||uu(pe)&&bn(pe.$ref)||Ee)&&!U.includesCycle(pe)){var N;J.add(n);const ye=new sb({reference:Y,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:U,basePath:(N=this.basePath)!==null&&N!==void 0?N:[...Vo([...v,l,n]),"$ref"]});pe=await fR(pe,ye,{keyMap:Wl,nodeTypeGetter:Ko}),J.delete(n)}if(this.indirections.pop(),uR(pe)){const ye=At(pe);return ye.setMetaProperty("ref-fields",{$ref:st(n.$ref)}),ye.setMetaProperty("ref-origin",Y.uri),ye.setMetaProperty("ref-referencing-element-id",At(so.identify(n))),x.replaceWith(ye,pp),!l&&ye}if(uu(pe)){const ye=new up([...pe.content],At(pe.meta),At(pe.attributes));if(n.forEach(((ze,Le,tt)=>{ye.remove(st(Le)),ye.content.push(tt)})),ye.remove("$ref"),ye.setMetaProperty("ref-fields",{$ref:st(n.$ref)}),ye.setMetaProperty("ref-origin",Y.uri),ye.setMetaProperty("ref-referencing-element-id",At(so.identify(n))),this.allowMetaPatches&&ye.get("$$ref")===void 0){const ze=Ds(Z,P);ye.set("$$ref",ze)}pe=ye}return x.replaceWith(pe,pp),l?void 0:pe}catch(U){var D,$,L;const J=kE(U),Y=new iX(`Could not resolve reference: ${J.message}`,{baseDoc:this.reference.uri,$ref:st(n.$ref),fullPath:(D=this.basePath)!==null&&D!==void 0?D:[...Vo([...v,l,n]),"$ref"],cause:J});return void(($=this.options.dereference.dereferenceOpts)===null||$===void 0||($=$.errors)===null||$===void 0||(L=$.push)===null||L===void 0||L.call($,Y))}}async LinkElement(){}async ExampleElement(n,i,l,p,v,x){try{return await super.ExampleElement(n,i,l,p,v,x)}catch(D){var S,C,N;const $=kE(D),L=pR($,{baseDoc:this.reference.uri,externalValue:st(n.externalValue),fullPath:(S=this.basePath)!==null&&S!==void 0?S:[...Vo([...v,l,n]),"externalValue"]});return void((C=this.options.dereference.dereferenceOpts)===null||C===void 0||(C=C.errors)===null||C===void 0||(N=C.push)===null||N===void 0||N.call(C,L))}}}const aX=N1[Symbol.for("nodejs.util.promisify.custom")];class oX{constructor({parameterMacro:n,modelPropertyMacro:i,mode:l,options:p,...v}){const x=[];x.push(new sb({...v,options:p})),typeof i=="function"&&x.push(new nX({modelPropertyMacro:i,options:p})),l!=="strict"&&x.push(new rX({options:p})),typeof n=="function"&&x.push(new sX({parameterMacro:n,options:p}));const S=aX(x,{nodeTypeGetter:Ko});Object.assign(this,S)}}const lX=bi[Symbol.for("nodejs.util.promisify.custom")];class kP extends class extends class{name;constructor({name:n}){this.name=n}}{constructor(n){super({...n??{},name:"openapi-3-1"})}canDereference(n){var i;return n.mediaType!=="text/plain"?Mm.includes(n.mediaType):vP((i=n.parseResult)===null||i===void 0?void 0:i.result)}async dereference(n,i){var l;const p=Ax(iR),v=(l=i.dereference.refSet)!==null&&l!==void 0?l:new bm,x=new bm;let S,C=v;v.has(n.uri)?S=v.find(V$(n.uri,"uri")):(S=new iu({uri:n.uri,value:n.parseResult}),v.add(S)),i.dereference.immutable&&(v.refs.map(($=>new iu({...$,value:At($.value)}))).forEach(($=>x.add($))),S=x.find(($=>$.uri===n.uri)),C=x);const N=new Um({reference:S,namespace:p,options:i}),D=await tX(C.rootRef.value,N,{keyMap:Wl,nodeTypeGetter:Ko});return i.dereference.immutable&&x.refs.filter(($=>$.uri.startsWith("immutable://"))).map(($=>new iu({...$,uri:$.uri.replace(/^immutable:\/\//,"")}))).forEach(($=>v.add($))),i.dereference.refSet===null&&v.clean(),x.clean(),D}}{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:n=!1,parameterMacro:i=null,modelPropertyMacro:l=null,mode:p="non-strict",ancestors:v=[],...x}={}){super({...x}),this.name="openapi-3-1-swagger-client",this.allowMetaPatches=n,this.parameterMacro=i,this.modelPropertyMacro=l,this.mode=p,this.ancestors=[...v]}async dereference(n,i){var l;const p=Ax(iR),v=(l=i.dereference.refSet)!==null&&l!==void 0?l:new bm,x=new bm;let S,C=v;v.has(n.uri)?S=v.find(($=>$.uri===n.uri)):(S=new iu({uri:n.uri,value:n.parseResult}),v.add(S)),i.dereference.immutable&&(v.refs.map(($=>new iu({...$,value:At($.value)}))).forEach(($=>x.add($))),S=x.find(($=>$.uri===n.uri)),C=x);const N=new oX({reference:S,namespace:p,options:i,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),D=await lX(C.rootRef.value,N,{keyMap:Wl,nodeTypeGetter:Ko});return i.dereference.immutable&&x.refs.filter(($=>$.uri.startsWith("immutable://"))).map(($=>new iu({...$,uri:$.uri.replace(/^immutable:\/\//,"")}))).forEach(($=>v.add($))),i.dereference.refSet===null&&v.clean(),x.clean(),D}}const cX=t=>{const n=st(t.meta.get("baseURI")),i=t.meta.get("referencingElement");return new Et({$ref:n},At(i.meta),At(i.attributes))},RE=async t=>{const{spec:n,timeout:i,redirects:l,requestInterceptor:p,responseInterceptor:v,pathDiscriminator:x=[],allowMetaPatches:S=!1,useCircularStructures:C=!1,skipNormalization:N=!1,parameterMacro:D=null,modelPropertyMacro:$=null,mode:L="non-strict",strategies:U}=t;try{const{cache:J}=RE,Y=U.find((tt=>tt.match(n))),Z=h1(p1())?p1():"https://swagger.io",P=Ku(t),re=Ds(Z,P);let le;J.has(n)?le=J.get(n):(le=Td.refract(n),le.classes.push("result"),J.set(n,le));const he=new qo([le]),xe=ZD(x),pe=xe===""?"":`#${xe}`,_e=Uo(xe,le),ke=new iu({uri:re,value:he}),Be=new bm({refs:[ke]});xe!==""&&(Be.rootRef=void 0);const Ee=[new Set([_e])],ye=[],ze=((tt,ut,Kt)=>new o7({element:Kt}).transclude(tt,ut))(_e,await(async(tt,ut={})=>(async(Kt,Tn)=>{let _t=Kt,cn=!1;if(!rD(Kt)){const Zn=Ii(Kt);Zn.classes.push("result"),_t=new qo([Zn]),cn=!0}const nr=new vx({uri:Tn.resolve.baseURI,parseResult:_t,mediaType:Tn.parse.mediaType}),Ei=await OO("canDereference",[nr,Tn],Tn.dereference.strategies);if(mx(Ei))throw new SD(nr.uri);try{const{result:Zn}=await kO("dereference",[nr,Tn],Ei);return cn?Zn.get(0):Zn}catch(Zn){throw new QO(`Error while dereferencing file "${nr.uri}"`,{cause:Zn})}})(tt,lN(oN,ut)))(_e,{resolve:{baseURI:`${re}${pe}`,resolvers:[new SP({timeout:i||1e4,redirects:l||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:p,responseInterceptor:v}},strategies:[new WG]},parse:{mediaType:Mm.latest(),parsers:[new CP({allowEmpty:!1,sourceMap:!1}),new AP({allowEmpty:!1,sourceMap:!1}),new EP({allowEmpty:!1,sourceMap:!1}),new jP({allowEmpty:!1,sourceMap:!1}),new JG({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new kP({allowMetaPatches:S,useCircularStructures:C,parameterMacro:D,modelPropertyMacro:$,mode:L,ancestors:Ee})],refSet:Be,dereferenceOpts:{errors:ye},immutable:!1,circular:C?"ignore":"replace",circularReplacer:C?oN.dereference.circularReplacer:cX}}),le),Le=N?ze:Y.normalize(ze);return{spec:st(Le),errors:ye}}catch(J){if(J instanceof gk||J instanceof Tx)return{spec:null,errors:[]};throw J}};RE.cache=new WeakMap;const RP=t=>{if(!Bn(t))return t;const n=[zH({operationIdNormalizer:(i,l,p)=>Rx({operationId:i},l,p,{v2OperationIdCompatibilityMode:!1})}),PH(),MH(),LH(),FH()];return _m(t,n,{toolboxCreator:bP,visitorOptions:{keyMap:Wl,nodeTypeGetter:Ko}})},uX={name:"openapi-3-1-apidom",match:t=>pk(t),normalize(t){if(!es(t)&&np(t)&&!t.$$normalized){const i=(n=RP,l=>{const p=Td.refract(l);p.classes.push("result");const v=n(p),x=st(v);return RE.cache.set(x,v),st(v)})(t);return i.$$normalized=!0,i}var n;return es(t)?RP(t):t},resolve:async t=>RE(t)};function TP(t,n,i){if(!t||typeof t!="object"||!t.paths||typeof t.paths!="object")return null;const{paths:l}=t;for(const p in l)for(const v in l[p]){if(v.toUpperCase()==="PARAMETERS")continue;const x=l[p][v];if(!x||typeof x!="object")continue;const S={spec:t,pathName:p,method:v.toUpperCase(),operation:x},C=n(S);if(i&&C)return S}}function _P(t,n){return`${n.toLowerCase()}-${t}`}const{isHttpUrl:dX}=r8,hX=()=>null,pX=function({spec:t,cb:n=hX,defaultTag:i="default",v2OperationIdCompatibilityMode:l}){const p={},v={};return TP(t,(({pathName:x,method:S,operation:C})=>{var N;(C.tags?(N=C.tags,Array.isArray(N)?N:[N]):[i]).forEach((D=>{if(typeof D!="string")return;v[D]=v[D]||{};const $=v[D],L=Rx(C,x,S,{v2OperationIdCompatibilityMode:l}),U=n({spec:t,pathName:x,method:S,operation:C,operationId:L});if(p[L])p[L]+=1,$[`${L}${p[L]}`]=U;else if($[L]!==void 0){const J=p[L]||1;p[L]=J+1,$[`${L}${p[L]}`]=U;const Y=$[L];delete $[L],$[`${L}${J}`]=Y}else $[L]=U}))})),v},fX=function(t={}){return({pathName:n,method:i,operationId:l})=>(p,v={})=>{const{requestInterceptor:x,responseInterceptor:S,userFetch:C}=t;return t.execute({spec:t.spec,requestInterceptor:x,responseInterceptor:S,userFetch:C,pathName:n,method:i,parameters:p,operationId:l,...v})}};var mX=function(t,n,i){var l={},p=l.encode||yX;if(typeof p!="function")throw new TypeError("option encode is invalid");if(!TE.test(t))throw new TypeError("argument name is invalid");var v=p(n);if(v&&!TE.test(v))throw new TypeError("argument val is invalid");var x=t+"="+v;if(l.maxAge!=null){var S=l.maxAge-0;if(isNaN(S)||!isFinite(S))throw new TypeError("option maxAge is invalid");x+="; Max-Age="+Math.floor(S)}if(l.domain){if(!TE.test(l.domain))throw new TypeError("option domain is invalid");x+="; Domain="+l.domain}if(l.path){if(!TE.test(l.path))throw new TypeError("option path is invalid");x+="; Path="+l.path}if(l.expires){var C=l.expires;if(!(function(N){return gX.call(N)==="[object Date]"||N instanceof Date})(C)||isNaN(C.valueOf()))throw new TypeError("option expires is invalid");x+="; Expires="+C.toUTCString()}if(l.httpOnly&&(x+="; HttpOnly"),l.secure&&(x+="; Secure"),l.partitioned&&(x+="; Partitioned"),l.priority)switch(typeof l.priority=="string"?l.priority.toLowerCase():l.priority){case"low":x+="; Priority=Low";break;case"medium":x+="; Priority=Medium";break;case"high":x+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}if(l.sameSite)switch(typeof l.sameSite=="string"?l.sameSite.toLowerCase():l.sameSite){case!0:x+="; SameSite=Strict";break;case"lax":x+="; SameSite=Lax";break;case"strict":x+="; SameSite=Strict";break;case"none":x+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return x},gX=Object.prototype.toString,TE=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function yX(t){return encodeURIComponent(t)}const $P=function(){const t=on,n=Si,i=this,l="parser.js: Parser(): ";i.ast=void 0,i.stats=void 0,i.trace=void 0,i.callbacks=[];let p,v,x,S,C,N,D,$=0,L=0,U=0,J=0,Y=0,Z=new function(){this.state=t.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=t.ACTIVE,this.phraseLength=0}};i.parse=(he,xe,pe,_e)=>{const ke=`${l}parse(): `;$=0,L=0,U=0,J=0,Y=0,p=void 0,v=void 0,x=void 0,S=void 0,Z.refresh(),C=void 0,N=void 0,D=void 0,S=n.stringToChars(pe),p=he.rules,v=he.udts;const Be=xe.toLowerCase();let Ee;for(const ze in p)if(p.hasOwnProperty(ze)&&Be===p[ze].lower){Ee=p[ze].index;break}if(Ee===void 0)throw new Error(`${ke}start rule name '${startRule}' not recognized`);(()=>{const ze=`${l}initializeCallbacks(): `;let Le,tt;for(C=[],N=[],Le=0;Le<p.length;Le+=1)C[Le]=void 0;for(Le=0;Le<v.length;Le+=1)N[Le]=void 0;const ut=[];for(Le=0;Le<p.length;Le+=1)ut.push(p[Le].lower);for(Le=0;Le<v.length;Le+=1)ut.push(v[Le].lower);for(const Kt in i.callbacks)if(i.callbacks.hasOwnProperty(Kt)){if(Le=ut.indexOf(Kt.toLowerCase()),Le<0)throw new Error(`${ze}syntax callback '${Kt}' not a rule or udt name`);if(tt=i.callbacks[Kt]?i.callbacks[Kt]:void 0,typeof tt!="function"&&tt!==void 0)throw new Error(`${ze}syntax callback[${Kt}] must be function reference or falsy)`);Le<p.length?C[Le]=tt:N[Le-p.length]=tt}})(),i.trace&&i.trace.init(p,v,S),i.stats&&i.stats.init(p,v),i.ast&&i.ast.init(p,v,S),D=_e,x=[{type:t.RNM,index:Ee}],le(0,0),x=void 0;let ye=!1;switch(Z.state){case t.ACTIVE:throw new Error(`${ke}final state should never be 'ACTIVE'`);case t.NOMATCH:ye=!1;break;case t.EMPTY:case t.MATCH:ye=Z.phraseLength===S.length;break;default:throw new Error("unrecognized state")}return{success:ye,state:Z.state,stateName:t.idName(Z.state),length:S.length,matched:Z.phraseLength,maxMatched:Y,maxTreeDepth:U,nodeHits:J}};const P=(he,xe,pe,_e)=>{if(xe.phraseLength>pe){let ke=`${l}opRNM(${he.name}): callback function error: `;throw ke+=`sysData.phraseLength: ${xe.phraseLength}`,ke+=` must be <= remaining chars: ${pe}`,new Error(ke)}switch(xe.state){case t.ACTIVE:if(!_e)throw new Error(`${l}opRNM(${he.name}): callback function return error. ACTIVE state not allowed.`);break;case t.EMPTY:xe.phraseLength=0;break;case t.MATCH:xe.phraseLength===0&&(xe.state=t.EMPTY);break;case t.NOMATCH:xe.phraseLength=0;break;default:throw new Error(`${l}opRNM(${he.name}): callback function return error. Unrecognized return state: ${xe.state}`)}},re=(he,xe)=>{let pe,_e,ke;const Be=x[he],Ee=v[Be.index];Z.UdtIndex=Ee.index,$||(ke=i.ast&&i.ast.udtDefined(Be.index),ke&&(_e=p.length+Be.index,pe=i.ast.getLength(),i.ast.down(_e,Ee.name)));const ye=S.length-xe;N[Be.index](Z,S,xe,D),((ze,Le,tt)=>{if(Le.phraseLength>tt){let ut=`${l}opUDT(${ze.name}): callback function error: `;throw ut+=`sysData.phraseLength: ${Le.phraseLength}`,ut+=` must be <= remaining chars: ${tt}`,new Error(ut)}switch(Le.state){case t.ACTIVE:throw new Error(`${l}opUDT(${ze.name}) ACTIVE state return not allowed.`);case t.EMPTY:if(!ze.empty)throw new Error(`${l}opUDT(${ze.name}) may not return EMPTY.`);Le.phraseLength=0;break;case t.MATCH:if(Le.phraseLength===0){if(!ze.empty)throw new Error(`${l}opUDT(${ze.name}) may not return EMPTY.`);Le.state=t.EMPTY}break;case t.NOMATCH:Le.phraseLength=0;break;default:throw new Error(`${l}opUDT(${ze.name}): callback function return error. Unrecognized return state: ${Le.state}`)}})(Ee,Z,ye),$||ke&&(Z.state===t.NOMATCH?i.ast.setLength(pe):i.ast.up(_e,Ee.name,xe,Z.phraseLength))},le=(he,xe)=>{const pe=`${l}opExecute(): `,_e=x[he];switch(J+=1,L>U&&(U=L),L+=1,Z.refresh(),i.trace&&i.trace.down(_e,xe),_e.type){case t.ALT:((ke,Be)=>{const Ee=x[ke];for(let ye=0;ye<Ee.children.length&&(le(Ee.children[ye],Be),Z.state===t.NOMATCH);ye+=1);})(he,xe);break;case t.CAT:((ke,Be)=>{let Ee,ye,ze,Le;const tt=x[ke];i.ast&&(ye=i.ast.getLength()),Ee=!0,ze=Be,Le=0;for(let ut=0;ut<tt.children.length;ut+=1){if(le(tt.children[ut],ze),Z.state===t.NOMATCH){Ee=!1;break}ze+=Z.phraseLength,Le+=Z.phraseLength}Ee?(Z.state=Le===0?t.EMPTY:t.MATCH,Z.phraseLength=Le):(Z.state=t.NOMATCH,Z.phraseLength=0,i.ast&&i.ast.setLength(ye))})(he,xe);break;case t.REP:((ke,Be)=>{let Ee,ye,ze,Le;const tt=x[ke];if(tt.max===0)return Z.state=t.EMPTY,void(Z.phraseLength=0);for(ye=Be,ze=0,Le=0,i.ast&&(Ee=i.ast.getLength());!(ye>=S.length)&&(le(ke+1,ye),Z.state!==t.NOMATCH)&&Z.state!==t.EMPTY&&(Le+=1,ze+=Z.phraseLength,ye+=Z.phraseLength,Le!==tt.max););Z.state===t.EMPTY||Le>=tt.min?(Z.state=ze===0?t.EMPTY:t.MATCH,Z.phraseLength=ze):(Z.state=t.NOMATCH,Z.phraseLength=0,i.ast&&i.ast.setLength(Ee))})(he,xe);break;case t.RNM:((ke,Be)=>{let Ee,ye,ze;const Le=x[ke],tt=p[Le.index],ut=C[tt.index];if($||(ye=i.ast&&i.ast.ruleDefined(Le.index),ye&&(Ee=i.ast.getLength(),i.ast.down(Le.index,p[Le.index].name))),ut){const Kt=S.length-Be;ut(Z,S,Be,D),P(tt,Z,Kt,!0),Z.state===t.ACTIVE&&(ze=x,x=tt.opcodes,le(0,Be),x=ze,ut(Z,S,Be,D),P(tt,Z,Kt,!1))}else ze=x,x=tt.opcodes,le(0,Be),x=ze;$||ye&&(Z.state===t.NOMATCH?i.ast.setLength(Ee):i.ast.up(Le.index,tt.name,Be,Z.phraseLength))})(he,xe);break;case t.TRG:((ke,Be)=>{const Ee=x[ke];Z.state=t.NOMATCH,Be<S.length&&Ee.min<=S[Be]&&S[Be]<=Ee.max&&(Z.state=t.MATCH,Z.phraseLength=1)})(he,xe);break;case t.TBS:((ke,Be)=>{const Ee=x[ke],ye=Ee.string.length;if(Z.state=t.NOMATCH,Be+ye<=S.length){for(let ze=0;ze<ye;ze+=1)if(S[Be+ze]!==Ee.string[ze])return;Z.state=t.MATCH,Z.phraseLength=ye}})(he,xe);break;case t.TLS:((ke,Be)=>{let Ee;const ye=x[ke];Z.state=t.NOMATCH;const ze=ye.string.length;if(ze!==0){if(Be+ze<=S.length){for(let Le=0;Le<ze;Le+=1)if(Ee=S[Be+Le],Ee>=65&&Ee<=90&&(Ee+=32),Ee!==ye.string[Le])return;Z.state=t.MATCH,Z.phraseLength=ze}}else Z.state=t.EMPTY})(he,xe);break;case t.UDT:re(he,xe);break;case t.AND:((ke,Be)=>{switch($+=1,le(ke+1,Be),$-=1,Z.phraseLength=0,Z.state){case t.EMPTY:case t.MATCH:Z.state=t.EMPTY;break;case t.NOMATCH:Z.state=t.NOMATCH;break;default:throw new Error(`opAND: invalid state ${Z.state}`)}})(he,xe);break;case t.NOT:((ke,Be)=>{switch($+=1,le(ke+1,Be),$-=1,Z.phraseLength=0,Z.state){case t.EMPTY:case t.MATCH:Z.state=t.NOMATCH;break;case t.NOMATCH:Z.state=t.EMPTY;break;default:throw new Error(`opNOT: invalid state ${Z.state}`)}})(he,xe);break;default:throw new Error(`${pe}unrecognized operator`)}$||xe+Z.phraseLength>Y&&(Y=xe+Z.phraseLength),i.stats&&i.stats.collect(_e,Z),i.trace&&i.trace.up(_e,Z.state,xe,Z.phraseLength),L-=1}},NP=function(){const t=on,n=Si,i=this;let l,p,v,x=0;const S=[],C=[],N=[];function D($){let L="";for(;$-- >0;)L+=" ";return L}i.callbacks=[],i.init=($,L,U)=>{let J;C.length=0,N.length=0,x=0,l=$,p=L,v=U;const Y=[];for(J=0;J<l.length;J+=1)Y.push(l[J].lower);for(J=0;J<p.length;J+=1)Y.push(p[J].lower);for(x=l.length+p.length,J=0;J<x;J+=1)S[J]=void 0;for(const Z in i.callbacks)if(i.callbacks.hasOwnProperty(Z)){const P=Z.toLowerCase();if(J=Y.indexOf(P),J<0)throw new Error(`parser.js: Ast()): init: node '${Z}' not a rule or udt name`);S[J]=i.callbacks[Z]}},i.ruleDefined=$=>!!S[$],i.udtDefined=$=>!!S[l.length+$],i.down=($,L)=>{const U=N.length;return C.push(U),N.push({name:L,thisIndex:U,thatIndex:void 0,state:t.SEM_PRE,callbackIndex:$,phraseIndex:void 0,phraseLength:void 0,stack:C.length}),U},i.up=($,L,U,J)=>{const Y=N.length,Z=C.pop();return N.push({name:L,thisIndex:Y,thatIndex:Z,state:t.SEM_POST,callbackIndex:$,phraseIndex:U,phraseLength:J,stack:C.length}),N[Z].thatIndex=Y,N[Z].phraseIndex=U,N[Z].phraseLength=J,Y},i.translate=$=>{let L,U;for(let J=0;J<N.length;J+=1)U=N[J],L=S[U.callbackIndex],L&&(U.state===t.SEM_PRE?L(t.SEM_PRE,v,U.phraseIndex,U.phraseLength,$):L&&L(t.SEM_POST,v,U.phraseIndex,U.phraseLength,$))},i.setLength=$=>{N.length=$,C.length=$>0?N[$-1].stack:0},i.getLength=()=>N.length,i.toXml=()=>{let $="",L=0;return $+=`<?xml version="1.0" encoding="utf-8"?>
|
||
`,$+=`<root nodes="${N.length/2}" characters="${v.length}">
|
||
`,$+=`<!-- input string -->
|
||
`,$+=D(L+2),$+=n.charsToString(v),$+=`
|
||
`,N.forEach((U=>{U.state===t.SEM_PRE?(L+=1,$+=D(L),$+=`<node name="${U.name}" index="${U.phraseIndex}" length="${U.phraseLength}">
|
||
`,$+=D(L+2),$+=n.charsToString(v,U.phraseIndex,U.phraseLength),$+=`
|
||
`):($+=D(L),$+=`</node><!-- name="${U.name}" -->
|
||
`,L-=1)})),$+=`</root>
|
||
`,$}},Si={stringToChars:t=>[...t].map((n=>n.codePointAt(0))),charsToString:(t,n,i)=>{let l=t;for(;!(n===void 0||n<0);){if(i===void 0){l=t.slice(n);break}if(i<=0)return"";l=t.slice(n,n+i);break}return String.fromCodePoint(...l)}},on={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:t=>{switch(t){case on.ALT:return"ALT";case on.CAT:return"CAT";case on.REP:return"REP";case on.RNM:return"RNM";case on.TRG:return"TRG";case on.TBS:return"TBS";case on.TLS:return"TLS";case on.UDT:return"UDT";case on.AND:return"AND";case on.NOT:return"NOT";case on.ACTIVE:return"ACTIVE";case on.EMPTY:return"EMPTY";case on.MATCH:return"MATCH";case on.NOMATCH:return"NOMATCH";case on.SEM_PRE:return"SEM_PRE";case on.SEM_POST:return"SEM_POST";case on.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}},vX=(t,n,i,l,p)=>{if(t===on.SEM_PRE){if(Array.isArray(p)===!1)throw new Error("parser's user data must be an array");p.push(["server-url-template",Si.charsToString(n,i,l)])}return on.SEM_OK},xX=(t,n,i,l,p)=>{if(t===on.SEM_PRE){if(Array.isArray(p)===!1)throw new Error("parser's user data must be an array");p.push(["server-variable",Si.charsToString(n,i,l)])}return on.SEM_OK},bX=(t,n,i,l,p)=>{if(t===on.SEM_PRE){if(Array.isArray(p)===!1)throw new Error("parser's user data must be an array");p.push(["server-variable-name",Si.charsToString(n,i,l)])}return on.SEM_OK},wX=(t,n,i,l,p)=>{if(t===on.SEM_PRE){if(Array.isArray(p)===!1)throw new Error("parser's user data must be an array");p.push(["literals",Si.charsToString(n,i,l)])}return on.SEM_OK},SX=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"server-url-template",lower:"server-url-template",index:0,isBkr:!1},this.rules[1]={name:"server-variable",lower:"server-variable",index:1,isBkr:!1},this.rules[2]={name:"server-variable-name",lower:"server-variable-name",index:2,isBkr:!1},this.rules[3]={name:"literals",lower:"literals",index:3,isBkr:!1},this.rules[4]={name:"ALPHA",lower:"alpha",index:4,isBkr:!1},this.rules[5]={name:"DIGIT",lower:"digit",index:5,isBkr:!1},this.rules[6]={name:"HEXDIG",lower:"hexdig",index:6,isBkr:!1},this.rules[7]={name:"pct-encoded",lower:"pct-encoded",index:7,isBkr:!1},this.rules[8]={name:"unreserved",lower:"unreserved",index:8,isBkr:!1},this.rules[9]={name:"sub-delims",lower:"sub-delims",index:9,isBkr:!1},this.rules[10]={name:"ucschar",lower:"ucschar",index:10,isBkr:!1},this.rules[11]={name:"iprivate",lower:"iprivate",index:11,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[2].opcodes[2]={type:4,index:8},this.rules[2].opcodes[3]={type:4,index:7},this.rules[2].opcodes[4]={type:4,index:9},this.rules[2].opcodes[5]={type:7,string:[58]},this.rules[2].opcodes[6]={type:7,string:[64]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13,14]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:6,string:[38]},this.rules[3].opcodes[5]={type:5,min:40,max:59},this.rules[3].opcodes[6]={type:6,string:[61]},this.rules[3].opcodes[7]={type:5,min:63,max:91},this.rules[3].opcodes[8]={type:6,string:[93]},this.rules[3].opcodes[9]={type:6,string:[95]},this.rules[3].opcodes[10]={type:5,min:97,max:122},this.rules[3].opcodes[11]={type:6,string:[126]},this.rules[3].opcodes[12]={type:4,index:10},this.rules[3].opcodes[13]={type:4,index:11},this.rules[3].opcodes[14]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:65,max:90},this.rules[4].opcodes[2]={type:5,min:97,max:122},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[6].opcodes[1]={type:4,index:5},this.rules[6].opcodes[2]={type:7,string:[97]},this.rules[6].opcodes[3]={type:7,string:[98]},this.rules[6].opcodes[4]={type:7,string:[99]},this.rules[6].opcodes[5]={type:7,string:[100]},this.rules[6].opcodes[6]={type:7,string:[101]},this.rules[6].opcodes[7]={type:7,string:[102]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:2,children:[1,2,3]},this.rules[7].opcodes[1]={type:7,string:[37]},this.rules[7].opcodes[2]={type:4,index:6},this.rules[7].opcodes[3]={type:4,index:6},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[8].opcodes[1]={type:4,index:4},this.rules[8].opcodes[2]={type:4,index:5},this.rules[8].opcodes[3]={type:7,string:[45]},this.rules[8].opcodes[4]={type:7,string:[46]},this.rules[8].opcodes[5]={type:7,string:[95]},this.rules[8].opcodes[6]={type:7,string:[126]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[10].opcodes[1]={type:5,min:160,max:55295},this.rules[10].opcodes[2]={type:5,min:63744,max:64975},this.rules[10].opcodes[3]={type:5,min:65008,max:65519},this.rules[10].opcodes[4]={type:5,min:65536,max:131069},this.rules[10].opcodes[5]={type:5,min:131072,max:196605},this.rules[10].opcodes[6]={type:5,min:196608,max:262141},this.rules[10].opcodes[7]={type:5,min:262144,max:327677},this.rules[10].opcodes[8]={type:5,min:327680,max:393213},this.rules[10].opcodes[9]={type:5,min:393216,max:458749},this.rules[10].opcodes[10]={type:5,min:458752,max:524285},this.rules[10].opcodes[11]={type:5,min:524288,max:589821},this.rules[10].opcodes[12]={type:5,min:589824,max:655357},this.rules[10].opcodes[13]={type:5,min:655360,max:720893},this.rules[10].opcodes[14]={type:5,min:720896,max:786429},this.rules[10].opcodes[15]={type:5,min:786432,max:851965},this.rules[10].opcodes[16]={type:5,min:851968,max:917501},this.rules[10].opcodes[17]={type:5,min:921600,max:983037},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:1,children:[1,2,3]},this.rules[11].opcodes[1]={type:5,min:57344,max:63743},this.rules[11].opcodes[2]={type:5,min:983040,max:1048573},this.rules[11].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function(){return`; OpenAPI Server URL templating ABNF syntax
|
||
server-url-template = 1*( literals / server-variable )
|
||
server-variable = "{" server-variable-name "}"
|
||
server-variable-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
literals = 1*( %x21 / %x23-24 / %x26 / %x28-3B / %x3D / %x3F-5B
|
||
/ %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate
|
||
/ pct-encoded)
|
||
; any Unicode character except: CTL, SP,
|
||
; DQUOTE, "'", "%" (aside from pct-encoded),
|
||
; "<", ">", "\\", "^", "\`", "{", "|", "}"
|
||
|
||
; Characters definitions (from RFC 6570)
|
||
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
||
DIGIT = %x30-39 ; 0-9
|
||
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
||
; case-insensitive
|
||
|
||
pct-encoded = "%" HEXDIG HEXDIG
|
||
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||
/ "*" / "+" / "," / ";" / "="
|
||
|
||
ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
|
||
/ %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
|
||
/ %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
|
||
/ %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
|
||
/ %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
|
||
/ %xD0000-DFFFD / %xE1000-EFFFD
|
||
|
||
iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
|
||
`}},DP=t=>{const n=new $P;return n.ast=new NP,n.ast.callbacks["server-url-template"]=vX,n.ast.callbacks["server-variable"]=xX,n.ast.callbacks["server-variable-name"]=bX,n.ast.callbacks.literals=wX,{result:n.parse(SX,"server-url-template",t),ast:n.ast}},EX=t=>(n=>{try{return typeof n=="string"&&decodeURIComponent(n)!==n}catch{return!1}})(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),jX=["literals","server-variable-name"],CX=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["slash",Si.charsToString(n,i,l)]),on.SEM_OK),AX=(t,n,i,l,p)=>{if(t===on.SEM_PRE){if(Array.isArray(p)===!1)throw new Error("parser's user data must be an array");p.push(["path-template",Si.charsToString(n,i,l)])}return on.SEM_OK},OX=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["path",Si.charsToString(n,i,l)]),on.SEM_OK),kX=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["path-literal",Si.charsToString(n,i,l)]),on.SEM_OK),RX=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["query",Si.charsToString(n,i,l)]),on.SEM_OK),TX=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["query-marker",Si.charsToString(n,i,l)]),on.SEM_OK),_X=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["fragment",Si.charsToString(n,i,l)]),on.SEM_OK),$X=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["fragment-marker",Si.charsToString(n,i,l)]),on.SEM_OK),NX=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["template-expression",Si.charsToString(n,i,l)]),on.SEM_OK),DX=(t,n,i,l,p)=>(t===on.SEM_PRE&&p.push(["template-expression-param-name",Si.charsToString(n,i,l)]),on.SEM_OK),PX=new function(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"path-template",lower:"path-template",index:0,isBkr:!1},this.rules[1]={name:"path",lower:"path",index:1,isBkr:!1},this.rules[2]={name:"path-segment",lower:"path-segment",index:2,isBkr:!1},this.rules[3]={name:"query",lower:"query",index:3,isBkr:!1},this.rules[4]={name:"query-literal",lower:"query-literal",index:4,isBkr:!1},this.rules[5]={name:"query-marker",lower:"query-marker",index:5,isBkr:!1},this.rules[6]={name:"fragment",lower:"fragment",index:6,isBkr:!1},this.rules[7]={name:"fragment-literal",lower:"fragment-literal",index:7,isBkr:!1},this.rules[8]={name:"fragment-marker",lower:"fragment-marker",index:8,isBkr:!1},this.rules[9]={name:"slash",lower:"slash",index:9,isBkr:!1},this.rules[10]={name:"path-literal",lower:"path-literal",index:10,isBkr:!1},this.rules[11]={name:"template-expression",lower:"template-expression",index:11,isBkr:!1},this.rules[12]={name:"template-expression-param-name",lower:"template-expression-param-name",index:12,isBkr:!1},this.rules[13]={name:"unreserved",lower:"unreserved",index:13,isBkr:!1},this.rules[14]={name:"pct-encoded",lower:"pct-encoded",index:14,isBkr:!1},this.rules[15]={name:"sub-delims",lower:"sub-delims",index:15,isBkr:!1},this.rules[16]={name:"ALPHA",lower:"alpha",index:16,isBkr:!1},this.rules[17]={name:"DIGIT",lower:"digit",index:17,isBkr:!1},this.rules[18]={name:"HEXDIG",lower:"hexdig",index:18,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:5},this.rules[0].opcodes[5]={type:4,index:3},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:2,children:[8,9]},this.rules[0].opcodes[8]={type:4,index:8},this.rules[0].opcodes[9]={type:4,index:6},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,6]},this.rules[1].opcodes[1]={type:4,index:9},this.rules[1].opcodes[2]={type:3,min:0,max:1/0},this.rules[1].opcodes[3]={type:2,children:[4,5]},this.rules[1].opcodes[4]={type:4,index:2},this.rules[1].opcodes[5]={type:4,index:9},this.rules[1].opcodes[6]={type:3,min:0,max:1},this.rules[1].opcodes[7]={type:4,index:2},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:10},this.rules[2].opcodes[3]={type:4,index:11},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:0,max:1/0},this.rules[3].opcodes[1]={type:4,index:4},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10]},this.rules[4].opcodes[2]={type:4,index:13},this.rules[4].opcodes[3]={type:4,index:14},this.rules[4].opcodes[4]={type:4,index:15},this.rules[4].opcodes[5]={type:7,string:[58]},this.rules[4].opcodes[6]={type:7,string:[64]},this.rules[4].opcodes[7]={type:7,string:[47]},this.rules[4].opcodes[8]={type:7,string:[63]},this.rules[4].opcodes[9]={type:7,string:[38]},this.rules[4].opcodes[10]={type:7,string:[61]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:7,string:[63]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:0,max:1/0},this.rules[6].opcodes[1]={type:4,index:7},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:3,min:1,max:1/0},this.rules[7].opcodes[1]={type:1,children:[2,3,4,5,6,7,8]},this.rules[7].opcodes[2]={type:4,index:13},this.rules[7].opcodes[3]={type:4,index:14},this.rules[7].opcodes[4]={type:4,index:15},this.rules[7].opcodes[5]={type:7,string:[58]},this.rules[7].opcodes[6]={type:7,string:[64]},this.rules[7].opcodes[7]={type:7,string:[47]},this.rules[7].opcodes[8]={type:7,string:[63]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:7,string:[35]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:7,string:[47]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:3,min:1,max:1/0},this.rules[10].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[10].opcodes[2]={type:4,index:13},this.rules[10].opcodes[3]={type:4,index:14},this.rules[10].opcodes[4]={type:4,index:15},this.rules[10].opcodes[5]={type:7,string:[58]},this.rules[10].opcodes[6]={type:7,string:[64]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:2,children:[1,2,3]},this.rules[11].opcodes[1]={type:7,string:[123]},this.rules[11].opcodes[2]={type:4,index:12},this.rules[11].opcodes[3]={type:7,string:[125]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:3,min:1,max:1/0},this.rules[12].opcodes[1]={type:1,children:[2,3,4,5,6]},this.rules[12].opcodes[2]={type:4,index:13},this.rules[12].opcodes[3]={type:4,index:14},this.rules[12].opcodes[4]={type:4,index:15},this.rules[12].opcodes[5]={type:7,string:[58]},this.rules[12].opcodes[6]={type:7,string:[64]},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[13].opcodes[1]={type:4,index:16},this.rules[13].opcodes[2]={type:4,index:17},this.rules[13].opcodes[3]={type:7,string:[45]},this.rules[13].opcodes[4]={type:7,string:[46]},this.rules[13].opcodes[5]={type:7,string:[95]},this.rules[13].opcodes[6]={type:7,string:[126]},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2,3]},this.rules[14].opcodes[1]={type:7,string:[37]},this.rules[14].opcodes[2]={type:4,index:18},this.rules[14].opcodes[3]={type:4,index:18},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[15].opcodes[1]={type:7,string:[33]},this.rules[15].opcodes[2]={type:7,string:[36]},this.rules[15].opcodes[3]={type:7,string:[38]},this.rules[15].opcodes[4]={type:7,string:[39]},this.rules[15].opcodes[5]={type:7,string:[40]},this.rules[15].opcodes[6]={type:7,string:[41]},this.rules[15].opcodes[7]={type:7,string:[42]},this.rules[15].opcodes[8]={type:7,string:[43]},this.rules[15].opcodes[9]={type:7,string:[44]},this.rules[15].opcodes[10]={type:7,string:[59]},this.rules[15].opcodes[11]={type:7,string:[61]},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2]},this.rules[16].opcodes[1]={type:5,min:65,max:90},this.rules[16].opcodes[2]={type:5,min:97,max:122},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:48,max:57},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[18].opcodes[1]={type:4,index:17},this.rules[18].opcodes[2]={type:7,string:[97]},this.rules[18].opcodes[3]={type:7,string:[98]},this.rules[18].opcodes[4]={type:7,string:[99]},this.rules[18].opcodes[5]={type:7,string:[100]},this.rules[18].opcodes[6]={type:7,string:[101]},this.rules[18].opcodes[7]={type:7,string:[102]},this.toString=function(){return`; OpenAPI Path Templating ABNF syntax
|
||
path-template = path [ query-marker query ] [ fragment-marker fragment ]
|
||
path = slash *( path-segment slash ) [ path-segment ]
|
||
path-segment = 1*( path-literal / template-expression )
|
||
query = *( query-literal )
|
||
query-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" / "&" / "=" )
|
||
query-marker = "?"
|
||
fragment = *( fragment-literal )
|
||
fragment-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" / "/" / "?" )
|
||
fragment-marker = "#"
|
||
slash = "/"
|
||
path-literal = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
template-expression = "{" template-expression-param-name "}"
|
||
template-expression-param-name = 1*( unreserved / pct-encoded / sub-delims / ":" / "@" )
|
||
|
||
; Characters definitions (from RFC 3986)
|
||
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
|
||
pct-encoded = "%" HEXDIG HEXDIG
|
||
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
|
||
/ "*" / "+" / "," / ";" / "="
|
||
ALPHA = %x41-5A / %x61-7A ; A-Z / a-z
|
||
DIGIT = %x30-39 ; 0-9
|
||
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
|
||
`}},MX=t=>(n=>{try{return typeof n=="string"&&decodeURIComponent(n)!==n}catch{return!1}})(t)?t:encodeURIComponent(t).replace(/%5B/g,"[").replace(/%5D/g,"]"),IX=["slash","path-literal","query-marker","query-literal","template-expression-param-name"],mR=(t,n,i={})=>{const l={encoder:MX,...i},p=(S=>{const C=new $P;return C.ast=new NP,C.ast.callbacks["path-template"]=AX,C.ast.callbacks.path=OX,C.ast.callbacks.query=RX,C.ast.callbacks["query-marker"]=TX,C.ast.callbacks.fragment=_X,C.ast.callbacks["fragment-marker"]=$X,C.ast.callbacks.slash=CX,C.ast.callbacks["path-literal"]=kX,C.ast.callbacks["template-expression"]=NX,C.ast.callbacks["template-expression-param-name"]=DX,{result:C.parse(PX,"path-template",S),ast:C.ast}})(t);if(!p.result.success)return t;const v=[];return p.ast.translate(v),v.filter((([S])=>IX.includes(S))).map((([S,C])=>S==="template-expression-param-name"?Object.hasOwn(n,C)?l.encoder(n[C],C):`{${C}}`:C)).join("")},zX={body:function({req:t,value:n}){n!==void 0&&(t.body=n)},header:function({req:t,parameter:n,value:i}){t.headers=t.headers||{},i!==void 0&&(t.headers[n.name]=i)},query:function({req:t,value:n,parameter:i}){if(t.query=t.query||{},n===!1&&i.type==="boolean"&&(n="false"),n===0&&["number","integer"].indexOf(i.type)>-1&&(n="0"),n)t.query[i.name]={collectionFormat:i.collectionFormat,value:n};else if(i.allowEmptyValue&&n!==void 0){const l=i.name;t.query[l]=t.query[l]||{},t.query[l].allowEmptyValue=!0}},path:function({req:t,value:n,parameter:i,baseURL:l}){if(n!==void 0){const p=t.url.replace(l,""),v=mR(p,{[i.name]:n});t.url=l+v}},formData:function({req:t,value:n,parameter:i}){if(n===!1&&i.type==="boolean"&&(n="false"),n===0&&["number","integer"].indexOf(i.type)>-1&&(n="0"),n)t.form=t.form||{},t.form[i.name]={collectionFormat:i.collectionFormat,value:n};else if(i.allowEmptyValue&&n!==void 0){t.form=t.form||{};const l=i.name;t.form[l]=t.form[l]||{},t.form[l].allowEmptyValue=!0}}};function _E(t,n){return n.includes("application/json")?typeof t=="string"?t:(Array.isArray(t)&&(t=t.map((i=>{try{return JSON.parse(i)}catch{return i}}))),JSON.stringify(t)):String(t)}const LX=["accept","authorization","content-type"],FX=Object.freeze(Object.defineProperty({__proto__:null,cookie:function({req:t,parameter:n,value:i}){t.headers=t.headers||{};const l=typeof i;if(i!==void 0&&n.content){const p=Object.keys(n.content)[0];t.headers.Cookie=`${n.name}=${_E(i,p)}`}else if(i!==void 0&&(!Array.isArray(i)||i.length!==0)){const p=l==="object"&&!Array.isArray(i)&&n.explode?"":`${n.name}=`;t.headers.Cookie=p+ja({key:n.name,value:i,escape:!1,style:n.style||"form",explode:n.explode!==void 0&&n.explode})}},header:function({req:t,parameter:n,value:i}){if(t.headers=t.headers||{},!(LX.indexOf(n.name.toLowerCase())>-1))if(i!==void 0&&n.content){const l=Object.keys(n.content)[0];t.headers[n.name]=_E(i,l)}else i===void 0||Array.isArray(i)&&i.length===0||(t.headers[n.name]=ja({key:n.name,value:i,style:n.style||"simple",explode:n.explode!==void 0&&n.explode,escape:!1}))},path:function({req:t,value:n,parameter:i,baseURL:l}){const{name:p,style:v,explode:x,content:S}=i;if(n===void 0)return;const C=t.url.replace(l,"");let N;if(S){const D=Object.keys(S)[0];N=mR(C,{[p]:n},{encoder:$=>oh(_E($,D))})}else N=mR(C,{[p]:n},{encoder:D=>ja({key:i.name,value:D,style:v||"simple",explode:x||!1,escape:"reserved"})});t.url=l+N},query:function({req:t,value:n,parameter:i}){if(t.query=t.query||{},n!==void 0&&i.content){const l=_E(n,Object.keys(i.content)[0]);if(l)t.query[i.name]=l;else if(i.allowEmptyValue){const p=i.name;t.query[p]=t.query[p]||{},t.query[p].allowEmptyValue=!0}}else if(n===!1&&(n="false"),n===0&&(n="0"),n){const{style:l,explode:p,allowReserved:v}=i;t.query[i.name]={value:n,serializationOption:{style:l,explode:p,allowReserved:v}}}else if(i.allowEmptyValue&&n!==void 0){const l=i.name;t.query[l]=t.query[l]||{},t.query[l].allowEmptyValue=!0}}},Symbol.toStringTag,{value:"Module"})),qX=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,{btoa:PP}=qX,MP=t=>Array.isArray(t)?t:[],gR=t=>{try{return new URL(t)}catch{const n=new URL(t,"https://swagger.io"),i=String(t).startsWith("/")?n.pathname:n.pathname.substring(1);return{hash:n.hash,host:"",hostname:"",href:"",origin:"",password:"",pathname:i,port:"",protocol:"",search:n.search,searchParams:n.searchParams}}};class BX extends $a{}const UX={buildRequest:IP};function IP(t){const{spec:n,operationId:i,responseContentType:l,scheme:p,requestInterceptor:v,responseInterceptor:x,contextUrl:S,userFetch:C,server:N,serverVariables:D,http:$,signal:L,serverVariableEncoder:U}=t;let{parameters:J,parameterBuilders:Y}=t;const Z=fk(n);Y||(Y=Z?FX:zX);let P={url:"",credentials:$&&$.withCredentials?"include":"same-origin",headers:{},cookies:{}};L&&(P.signal=L),v&&(P.requestInterceptor=v),x&&(P.responseInterceptor=x),C&&(P.userFetch=C);const re=(function(Ee,ye){return Ee&&Ee.paths?(function(ze,Le){return TP(ze,Le,!0)||null})(Ee,(({pathName:ze,method:Le,operation:tt})=>{if(!tt||typeof tt!="object")return!1;const ut=tt.operationId;return[Rx(tt,ze,Le),_P(ze,Le),ut].some((Kt=>Kt&&Kt===ye))})):null})(n,i);if(!re)throw new BX(`Operation ${i} not found`);const{operation:le={},method:he,pathName:xe}=re,pe=zP({spec:n,scheme:p,contextUrl:S,server:N,serverVariables:D,pathName:xe,method:he,serverVariableEncoder:U});if(P.url+=pe,!i)return delete P.cookies,P;P.url+=xe,P.method=`${he}`.toUpperCase(),J=J||{};const _e=n.paths[xe]||{};l&&(P.headers.accept=l);const ke=(Ee=>{const ye={};Ee.forEach((Le=>{ye[Le.in]||(ye[Le.in]={}),ye[Le.in][Le.name]=Le}));const ze=[];return Object.keys(ye).forEach((Le=>{Object.keys(ye[Le]).forEach((tt=>{ze.push(ye[Le][tt])}))})),ze})([].concat(MP(le.parameters)).concat(MP(_e.parameters)));ke.forEach((Ee=>{const ye=Y[Ee.in];let ze;if(Ee.in==="body"&&Ee.schema&&Ee.schema.properties&&(ze=J),ze=Ee&&Ee.name&&J[Ee.name],ze===void 0?ze=Ee&&Ee.name&&J[`${Ee.in}.${Ee.name}`]:((Le,tt)=>tt.filter((ut=>ut.name===Le)))(Ee.name,ke).length>1&&console.warn(`Parameter '${Ee.name}' is ambiguous because the defined spec has more than one parameter with the name: '${Ee.name}' and the passed-in parameter values did not define an 'in' value.`),ze!==null){if(Ee.default!==void 0&&ze===void 0&&(ze=Ee.default),ze===void 0&&Ee.required&&!Ee.allowEmptyValue)throw new Error(`Required parameter ${Ee.name} is not provided`);if(Z&&Ee.schema&&Ee.schema.type==="object"&&typeof ze=="string")try{ze=JSON.parse(ze)}catch{throw new Error("Could not parse object parameter value string as JSON")}ye&&ye({req:P,parameter:Ee,value:ze,operation:le,spec:n,baseURL:pe})}}));const Be={...t,operation:le};if(P=Z?(function(Ee,ye){const{operation:ze,requestBody:Le,securities:tt,spec:ut,attachContentTypeForEmptyPayload:Kt}=Ee;let{requestContentType:Tn}=Ee;ye=(function({request:kr,securities:Tr={},operation:zr={},spec:pa}){var ec;const Vr={...kr},{authorized:Ho={}}=Tr,ps=zr.security||pa.security||[],Go=Ho&&!!Object.keys(Ho).length,yp=(pa==null||(ec=pa.components)===null||ec===void 0?void 0:ec.securitySchemes)||{};return Vr.headers=Vr.headers||{},Vr.query=Vr.query||{},Object.keys(Tr).length&&Go&&ps&&(!Array.isArray(zr.security)||zr.security.length)?(ps.forEach((ib=>{Object.keys(ib).forEach((ab=>{const Xo=Ho[ab],ji=yp[ab];if(!Xo)return;const Dd=Xo.value||Xo,{type:FE}=ji;if(Xo){if(FE==="apiKey")ji.in==="query"&&(Vr.query[ji.name]=Dd),ji.in==="header"&&(Vr.headers[ji.name]=Dd),ji.in==="cookie"&&(Vr.cookies[ji.name]=Dd);else if(FE==="http"){if(/^basic$/i.test(ji.scheme)){const qE=Dd.username||"",DR=Dd.password||"",Vm=PP(`${qE}:${DR}`);Vr.headers.Authorization=`Basic ${Vm}`}/^bearer$/i.test(ji.scheme)&&(Vr.headers.Authorization=`Bearer ${Dd}`)}else if(FE==="oauth2"||FE==="openIdConnect"){const qE=Xo.token||{},DR=qE[ji["x-tokenName"]||"access_token"];let Vm=qE.token_type;Vm&&Vm.toLowerCase()!=="bearer"||(Vm="Bearer"),Vr.headers.Authorization=`${Vm} ${DR}`}}}))})),Vr):kr})({request:ye,securities:tt,operation:ze,spec:ut});const _t=ze.requestBody||{},cn=Object.keys(_t.content||{}),nr=Tn&&cn.indexOf(Tn)>-1;if(Le||Kt){if(Tn&&nr)ye.headers["Content-Type"]=Tn;else if(!Tn){const kr=cn[0];kr&&(ye.headers["Content-Type"]=kr,Tn=kr)}}else Tn&&nr&&(ye.headers["Content-Type"]=Tn);if(!Ee.responseContentType&&ze.responses){const kr=Object.entries(ze.responses).filter((([Tr,zr])=>{const pa=parseInt(Tr,10);return pa>=200&&pa<300&&np(zr.content)})).reduce(((Tr,[,zr])=>Tr.concat(Object.keys(zr.content))),[]);kr.length>0&&(ye.headers.accept=kr.join(", "))}if(Le)if(Tn){if(cn.indexOf(Tn)>-1)if(Tn==="application/x-www-form-urlencoded"||Tn==="multipart/form-data")if(typeof Le=="object"){var Ei,Zn;const kr=(Ei=(Zn=_t.content[Tn])===null||Zn===void 0?void 0:Zn.encoding)!==null&&Ei!==void 0?Ei:{};ye.form={},Object.keys(Le).forEach((Tr=>{let zr;try{zr=JSON.parse(Le[Tr])}catch{zr=Le[Tr]}ye.form[Tr]={value:zr,encoding:kr[Tr]||{}}}))}else if(typeof Le=="string"){var zn,Fi;const kr=(zn=(Fi=_t.content[Tn])===null||Fi===void 0?void 0:Fi.encoding)!==null&&zn!==void 0?zn:{};try{ye.form={};const Tr=JSON.parse(Le);Object.entries(Tr).forEach((([zr,pa])=>{ye.form[zr]={value:pa,encoding:kr[zr]||{}}}))}catch{ye.form=Le}}else ye.form=Le;else ye.body=Le}else ye.body=Le;return ye})(Be,P):(function(Ee,ye){const{spec:ze,operation:Le,securities:tt,requestContentType:ut,responseContentType:Kt,attachContentTypeForEmptyPayload:Tn}=Ee;if(ye=(function({request:_t,securities:cn={},operation:nr={},spec:Ei}){const Zn={..._t},{authorized:zn={},specSecurity:Fi=[]}=cn,kr=nr.security||Fi,Tr=zn&&!!Object.keys(zn).length,zr=Ei.securityDefinitions;return Zn.headers=Zn.headers||{},Zn.query=Zn.query||{},Object.keys(cn).length&&Tr&&kr&&(!Array.isArray(nr.security)||nr.security.length)?(kr.forEach((pa=>{Object.keys(pa).forEach((ec=>{const Vr=zn[ec];if(!Vr)return;const{token:Ho}=Vr,ps=Vr.value||Vr,Go=zr[ec],{type:yp}=Go,ib=Go["x-tokenName"]||"access_token",ab=Ho&&Ho[ib];let Xo=Ho&&Ho.token_type;if(Vr)if(yp==="apiKey"){const ji=Go.in==="query"?"query":"headers";Zn[ji]=Zn[ji]||{},Zn[ji][Go.name]=ps}else if(yp==="basic")if(ps.header)Zn.headers.authorization=ps.header;else{const ji=ps.username||"",Dd=ps.password||"";ps.base64=PP(`${ji}:${Dd}`),Zn.headers.authorization=`Basic ${ps.base64}`}else yp==="oauth2"&&ab&&(Xo=Xo&&Xo.toLowerCase()!=="bearer"?Xo:"Bearer",Zn.headers.authorization=`${Xo} ${ab}`)}))})),Zn):_t})({request:ye,securities:tt,operation:Le,spec:ze}),ye.body||ye.form||Tn)ut?ye.headers["Content-Type"]=ut:Array.isArray(Le.consumes)?[ye.headers["Content-Type"]]=Le.consumes:Array.isArray(ze.consumes)?[ye.headers["Content-Type"]]=ze.consumes:Le.parameters&&Le.parameters.filter((_t=>_t.type==="file")).length?ye.headers["Content-Type"]="multipart/form-data":Le.parameters&&Le.parameters.filter((_t=>_t.in==="formData")).length&&(ye.headers["Content-Type"]="application/x-www-form-urlencoded");else if(ut){const _t=Le.parameters&&Le.parameters.filter((nr=>nr.in==="body")).length>0,cn=Le.parameters&&Le.parameters.filter((nr=>nr.in==="formData")).length>0;(_t||cn)&&(ye.headers["Content-Type"]=ut)}return!Kt&&Array.isArray(Le.produces)&&Le.produces.length>0&&(ye.headers.accept=Le.produces.join(", ")),ye})(Be,P),P.cookies&&Object.keys(P.cookies).length){const Ee=Object.keys(P.cookies).reduce(((ye,ze)=>{const Le=P.cookies[ze];return ye+(ye?"&":"")+mX(ze,Le)}),"");P.headers.Cookie=Ee}return P.cookies&&delete P.cookies,Kp(P)}const yR=t=>t?t.replace(/\W/g,""):null;function zP(t){return fk(t.spec)?(function({spec:n,pathName:i,method:l,server:p,contextUrl:v,serverVariables:x={},serverVariableEncoder:S}){var C,N;let D,$=[],L="";const U=n==null||(C=n.paths)===null||C===void 0||(C=C[i])===null||C===void 0||(C=C[(l||"").toLowerCase()])===null||C===void 0?void 0:C.servers,J=n==null||(N=n.paths)===null||N===void 0||(N=N[i])===null||N===void 0?void 0:N.servers,Y=n?.servers;if($=vR(U)?U:vR(J)?J:vR(Y)?Y:[Bp],p&&(D=$.find((Z=>Z.url===p)),D&&(L=p)),L||([D]=$,L=D.url),((Z,{strict:P=!1}={})=>{try{const re=DP(Z);if(!re.result.success)return!1;const le=[];re.ast.translate(le);const he=le.some((([xe])=>xe==="server-variable"));if(!P&&!he)try{return new URL(Z,"https://vladimirgorej.com"),!0}catch{return!1}return!P||he}catch{return!1}})(L,{strict:!0})){const Z=Object.entries({...D.variables}).reduce(((P,[re,le])=>(P[re]=le.default,P)),{});L=((P,re,le={})=>{const he={encoder:EX,...le},xe=DP(P);if(!xe.result.success)return P;const pe=[];return xe.ast.translate(pe),pe.filter((([ke])=>jX.includes(ke))).map((([ke,Be])=>ke==="server-variable-name"?Object.hasOwn(re,Be)?he.encoder(re[Be],Be):`{${Be}}`:Be)).join("")})(L,{...Z,...x},{encoder:typeof S=="function"?S:dO})}return(function(Z="",P=""){const re=gR(Z&&P?Ds(P,Z):Z),le=gR(P),he=yR(re.protocol)||yR(le.protocol),xe=re.host||le.host,pe=re.pathname;let _e;return _e=he&&xe?`${he}://${xe+pe}`:pe,_e[_e.length-1]==="/"?_e.slice(0,-1):_e})(L,v)})(t):(function({spec:n,scheme:i,contextUrl:l=""}){const p=gR(l),v=Array.isArray(n.schemes)?n.schemes[0]:null,x=i||v||yR(p.protocol)||"http",S=n.host||p.host||"",C=n.basePath||"";let N;return N=S?`${x}://${S+C}`:C,N[N.length-1]==="/"?N.slice(0,-1):N})(t)}const vR=t=>Array.isArray(t)&&t.length>0;function tr(t,n={}){if(typeof t=="string"?n.url=t:n=t,!(this instanceof tr))return new tr(n);Object.assign(this,n);const i=this.resolve().then((()=>(this.disableInterfaces||Object.assign(this,tr.makeApisTagOperation(this)),this)));return i.client=this,i}function LP(t){const n=(t=t.replace("[]","Array")).split("/");return n[0]=n[0].replace(/[^A-Za-z0-9_\-\.]+|\s+/gm,"_"),n.join("/")}tr.http=li,tr.makeHttp=(function(t,n,i){return i=i||(l=>l),n=n||(l=>l),l=>(typeof l=="string"&&(l={url:l}),l=Kp(l),l=n(l),i(t(l)))}).bind(null,tr.http),tr.resolveStrategies={"openapi-3-1-apidom":uX,"openapi-3-0":XD,"openapi-2-0":GD,generic:KD},tr.resolve=YD({strategies:[tr.resolveStrategies["openapi-3-1-apidom"],tr.resolveStrategies["openapi-3-0"],tr.resolveStrategies["openapi-2-0"],tr.resolveStrategies.generic]}),tr.resolveSubtree=(t=>async(n,i,l={})=>(async(p,v,x={})=>{const{returnEntireTree:S,baseDoc:C,requestInterceptor:N,responseInterceptor:D,parameterMacro:$,modelPropertyMacro:L,useCircularStructures:U,strategies:J}=x,Y={spec:p,pathDiscriminator:v,baseDoc:C,requestInterceptor:N,responseInterceptor:D,parameterMacro:$,modelPropertyMacro:L,useCircularStructures:U,strategies:J},Z=J.find((re=>re.match(p))).normalize(p),P=await T7({spec:Z,...Y,allowMetaPatches:!0,skipNormalization:!pk(p)});return!S&&Array.isArray(v)&&v.length&&(P.spec=v.reduce(((re,le)=>re?.[le]),P.spec)||null),P})(n,i,{...t,...l}))({strategies:[tr.resolveStrategies["openapi-3-1-apidom"],tr.resolveStrategies["openapi-3-0"],tr.resolveStrategies["openapi-2-0"],tr.resolveStrategies.generic]}),tr.execute=function({http:t,fetch:n,spec:i,operationId:l,pathName:p,method:v,parameters:x,securities:S,...C}){const N=t||n||li;p&&v&&!l&&(l=_P(p,v));const D=UX.buildRequest({spec:i,operationId:l,parameters:x,securities:S,http:N,...C});return D.body&&(np(D.body)||Array.isArray(D.body))&&(D.body=JSON.stringify(D.body)),N(D)},tr.serializeRes=nf,tr.serializeHeaders=oi,tr.clearCache=function(){lp.refs.clearCache()},tr.makeApisTagOperation=function(t={}){const n=fX(t);return{apis:pX({v2OperationIdCompatibilityMode:t.v2OperationIdCompatibilityMode,spec:t.spec,cb:n})}},tr.buildRequest=IP,tr.helpers={opId:Rx},tr.getBaseUrl=zP,tr.apidom={resolve:{resolvers:{HTTPResolverSwaggerClient:SP}},parse:{parsers:{JsonParser:EP,YamlParser:jP,OpenApiJson3_1Parser:CP,OpenApiYaml3_1Parser:AP}},dereference:{strategies:{OpenApi3_1SwaggerClientDereferenceStrategy:kP}}},tr.prototype={http:li,execute(t){return this.applyDefaults(),tr.execute({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,...t})},resolve(t={}){return tr.resolve({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null,skipNormalization:this.skipNormalization||!1,...t}).then((n=>(this.originalSpec=this.spec,this.spec=n.spec,this.errors=n.errors,this)))}},tr.prototype.applyDefaults=function(){const{spec:t}=this,n=this.url;if(VD(t)&&dX(n)){const i=new URL(n);t.host||(t.host=i.host),t.schemes||(t.schemes=[i.protocol.replace(":","")]),t.basePath||(t.basePath="/")}else if(fk(t)){const i=Array.isArray(t.servers)&&t.servers.length===0;t.servers&&!i||(t.servers=[Bp])}};const ir={parameterTypeProperties:["format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","minLength","maxLength","multipleOf","minItems","maxItems","uniqueItems","minProperties","maxProperties","additionalProperties","pattern","enum","default"],arrayProperties:["items","minItems","maxItems","uniqueItems"],httpMethods:["get","post","put","delete","patch","head","options","trace"],uniqueOnly:function(t,n,i){return i.indexOf(t)===n},createHash:function(t){let n,i=0;if(t.length===0)return i;for(let l=0;l<t.length;l++)n=t.charCodeAt(l),i=(i<<5)-i+n,i|=0;return i},sanitise:LP,sanitiseAll:function(t){return LP(t.split("/").join("_"))},camelize:function(t){return t.toLowerCase().replace(/[-_ \/\.](.)/g,((n,i)=>i.toUpperCase()))},clone:function(t){return JSON.parse(JSON.stringify(t))},circularClone:function t(n,i=null){if(i||(i=new WeakMap),Object(n)!==n||n instanceof Function)return n;if(i.has(n))return i.get(n);let l;try{l=new n.constructor}catch{l=Object.create(Object.getPrototypeOf(n))}return i.set(n,l),Object.assign(l,...Object.keys(n).map((p=>({[p]:t(n[p],i)}))))}};function FP(){return{depth:0,seen:new WeakMap,top:!0,combine:!1,allowRefSiblings:!1}}const KX={getDefaultState:FP,walkSchema:function t(n,i,l,p){if(l.depth===void 0&&(l=FP()),n==null||(l.combine&&(n.allOf&&Array.isArray(n.allOf)&&n.allOf.length===1&&delete(n={...n.allOf[0],...n})?.allOf,n?.anyOf&&Array.isArray(n.anyOf)&&n.anyOf.length===1&&delete(n={...n.anyOf[0],...n})?.anyOf,n?.oneOf&&Array.isArray(n.oneOf)&&n.oneOf.length===1&&delete(n={...n.oneOf[0],...n})?.oneOf),p(n,i,l),l.seen.has(n)))return n;if(typeof n=="object"&&n!==null&&l.seen.set(n,!0),l.top=!1,l.depth++,n?.items!==void 0&&(l.property="items",t(n.items,n,l,p)),n?.additionalItems&&typeof n.additionalItems=="object"&&(l.property="additionalItems",t(n.additionalItems,n,l,p)),n?.additionalProperties&&typeof n.additionalProperties=="object"&&(l.property="additionalProperties",t(n.additionalProperties,n,l,p)),n?.properties)for(const v in n.properties){const x=n.properties[v];l.property=`properties/${v}`,t(x,n,l,p)}if(n?.patternProperties)for(const v in n.patternProperties){const x=n.patternProperties[v];l.property=`patternProperties/${v}`,t(x,n,l,p)}if(n?.allOf)for(const v in n.allOf){const x=n.allOf[v];l.property=`allOf/${v}`,t(x,n,l,p)}if(n?.anyOf)for(const v in n.anyOf){const x=n.anyOf[v];l.property=`anyOf/${v}`,t(x,n,l,p)}if(n?.oneOf)for(const v in n.oneOf){const x=n.oneOf[v];l.property=`oneOf/${v}`,t(x,n,l,p)}return n?.not&&(l.property="not",t(n.not,n,l,p)),l.depth--,n}};function xR(t,n,i){if(n||(n={depth:0}),n.depth||(n={path:"#",depth:0,pkey:"",parent:{},payload:{},seen:new WeakMap,identity:!1,identityDetection:!1,...n}),typeof t!="object")return;const l=n.path;for(const p in t){if(n.key=p,n.path=`${n.path}/${encodeURIComponent(p)}`,n.identityPath=n.seen.get(t[p]),n.identity=n.identityPath!==void 0,t.hasOwnProperty(p)&&i(t,p,n),typeof t[p]=="object"&&!n.identity){n.identityDetection&&!Array.isArray(t[p])&&t[p]!==null&&n.seen.set(t[p],n.path);const v={};v.parent=t,v.path=n.path,v.depth=n.depth?n.depth+1:1,v.pkey=p,v.payload=n.payload,v.seen=n.seen,v.identity=!1,v.identityDetection=n.identityDetection,xR(t[p],v,i)}n.path=l}}let qP;function bR(t,n){for(const i in t)i.startsWith("x-")&&!i.startsWith("x-s2o")&&(n[i]=t[i])}function $E(t,n){KX.walkSchema(t,{},{},((i,l)=>{(function(p){if(p["x-required"]&&Array.isArray(p["x-required"])&&(p.required||(p.required=[]),p.required=p.required.concat(p["x-required"]),delete p["x-required"]),p["x-anyOf"]&&(p.anyOf=p["x-anyOf"],delete p["x-anyOf"]),p["x-oneOf"]&&(p.oneOf=p["x-oneOf"],delete p["x-oneOf"]),p["x-not"]&&(p.not=p["x-not"],delete p["x-not"]),typeof p["x-nullable"]=="boolean"&&(p.nullable=p["x-nullable"],delete p["x-nullable"]),typeof p["x-discriminator"]=="object"&&typeof p["x-discriminator"].propertyName=="string"){p.discriminator=p["x-discriminator"],delete p["x-discriminator"];for(const v in p.discriminator.mapping){const x=p.discriminator.mapping[v];x.startsWith("#/definitions/")&&(p.discriminator.mapping[v]=x.replace("#/definitions/","#/components/schemas/"))}}})(i),(function(p,v,x){if(p.nullable&&x.patches++,p.discriminator&&typeof p.discriminator=="string"&&(p.discriminator={propertyName:p.discriminator}),p.items&&Array.isArray(p.items)&&(p.items.length===0?p.items={}:p.items.length===1?p.items=p.items[0]:p.items={anyOf:p.items}),p.type&&Array.isArray(p.type)){if(x.patches++,x.warnings.push("(Patchable) schema type must not be an array"),p.type.length===0)delete p.type;else{p.oneOf||(p.oneOf=[]);for(const S of p.type){const C={};if(S==="null")p.nullable=!0;else{C.type=S;for(const N of ir.arrayProperties)p.prop!==void 0&&(C[N]=p[N],delete p[N])}C.type&&p.oneOf.push(C)}delete p.type,p.oneOf.length===0?delete p.oneOf:p.oneOf.length<2&&(p.type=p.oneOf[0].type,Object.keys(p.oneOf[0]).length>1&&(x.patches++,x.warnings.push("Lost properties from oneOf")),delete p.oneOf)}p.type&&Array.isArray(p.type)&&p.type.length===1&&(p.type=p.type[0])}p.type&&p.type==="null"&&(delete p.type,p.nullable=!0),p.type!=="array"||p.items||(p.items={}),p.type==="file"&&(p.type="string",p.format="binary"),typeof p.required=="boolean"&&(p.required&&p.name&&(v.required===void 0&&(v.required=[]),Array.isArray(v.required)&&v.required.push(p.name)),delete p.required),p.xml&&typeof p.xml.namespace=="string"&&(p.xml.namespace||delete p.xml.namespace),p.allowEmptyValue&&(delete p.allowEmptyValue,x.patches++,x.warnings.push("(Patchable): deleted schema.allowEmptyValue"))})(i,l,n)}))}function BP(t){for(const n in t)for(const i in t[n]){const l=ir.sanitise(i);i!==l&&(t[n][l]=t[n][i],delete t[n][i])}}function VX(t,n){if(t.type==="basic"&&(t.type="http",t.scheme="basic"),t.type==="oauth2"){const i={};let l=t.flow;t.flow==="application"&&(l="clientCredentials"),t.flow==="accessCode"&&(l="authorizationCode"),typeof t.authorizationUrl=="string"&&(i.authorizationUrl=t.authorizationUrl.split("?")[0].trim()||"/"),typeof t.tokenUrl=="string"&&(i.tokenUrl=t.tokenUrl.split("?")[0].trim()||"/"),i.scopes=t.scopes||{},t.flows={},t.flows[l]=i,delete t.flow,delete t.authorizationUrl,delete t.tokenUrl,delete t.scopes,t.name&&(delete t.name,n.patches++,n.warnings.push("(Patchable) oauth2 securitySchemes should not have name property"))}}function UP(t){return t&&!t["x-s2o-delete"]}function KP(t,n){if(t.type&&!t.schema&&(t.schema={}),t.type&&(t.schema.type=t.type),t.items&&t.items.type!=="array"){if(t.items.collectionFormat!==t.collectionFormat)return n.errCount++,void n.errors.push({message:"Nested collectionFormats are not supported",pointer:"/.../responses/header"});delete t.items.collectionFormat}t.type==="array"?(t.collectionFormat==="ssv"?(n.patches++,n.warnings.push("collectionFormat:ssv is no longer supported for headers")):t.collectionFormat==="pipes"?(n.patches++,n.warnings.push("collectionFormat:pipes is no longer supported for headers")):t.collectionFormat==="multi"?t.explode=!0:t.collectionFormat==="tsv"?(t["x-collectionFormat"]="tsv",n.patches++,n.warnings.push("collectionFormat:tsv is no longer supported")):t.style="simple",delete t.collectionFormat):t.collectionFormat&&(delete t.collectionFormat,n.patches++,n.warnings.push("(Patchable) collectionFormat is only applicable to header.type array")),delete t.type;for(const i of ir.parameterTypeProperties)t[i]!==void 0&&(t.schema[i]=t[i],delete t[i]);for(const i of ir.arrayProperties)t[i]!==void 0&&(t.schema[i]=t[i],delete t[i])}function NE(t,n,i,l,p,v,x){const S={};let C,N=!0;n&&n.consumes&&typeof n.consumes=="string"&&(n.consumes=[n.consumes],x.patches++,x.warnings.push("(Patchable) operation.consumes must be an array")),Array.isArray(v.consumes)||delete v.consumes;const D=((n?n.consumes:null)||v.consumes||[]).filter(ir.uniqueOnly);if(t&&(t.name||t.in)){typeof t["x-deprecated"]=="boolean"&&(t.deprecated=t["x-deprecated"],delete t["x-deprecated"]),t["x-example"]!==void 0&&(t.example=t["x-example"],delete t["x-example"]),t.in==="body"||t.type||(t.type="string",x.patches++,x.warnings.push("(Patchable) parameter.type is mandatory for non-body parameters")),t.type==="file"&&(t["x-s2o-originalType"]=t.type,C=t.type),t.description===null&&delete t.description;let $=t.collectionFormat;if(t.type!=="array"||$||($="csv"),$&&(t.type!=="array"&&(delete t.collectionFormat,x.patches++,x.warnings.push("(Patchable) collectionFormat is only applicable to param.type array")),$!=="csv"||t.in!=="query"&&t.in!=="cookie"||(t.style="form",t.explode=!1),$!=="csv"||t.in!=="path"&&t.in!=="header"||(t.style="simple"),$==="ssv"&&(t.in==="query"?t.style="spaceDelimited":x.warnings.push(`${t.name} collectionFormat:ssv is no longer supported except for in:query parameters`)),$==="pipes"&&(t.in==="query"?t.style="pipeDelimited":x.warnings.push(`${t.name} collectionFormat:pipes is no longer supported except for in:query parameters`)),$==="multi"&&(t.explode=!0),$==="tsv"&&(x.warnings.push("collectionFormat:tsv is no longer supported"),t["x-collectionFormat"]="tsv"),delete t.collectionFormat),t.type&&t.type!=="body"&&t.in!=="formData")if(t.items&&t.schema)x.warnings.push(`${t.name} parameter has array,items and schema`);else{t.schema&&x.patches++,t.schema&&typeof t.schema=="object"||(t.schema={}),t.schema.type=t.type,t.items&&(t.schema.items=t.items,delete t.items,xR(t.schema.items,null,((L,U)=>{U==="collectionFormat"&&typeof L[U]=="string"&&($&&L[U]!==$&&x.warnings.push(`${t.name} Nested collectionFormats are not supported`),delete L[U])})));for(const L of ir.parameterTypeProperties)t[L]!==void 0&&(t.schema[L]=t[L]),delete t[L]}t.schema&&$E(t.schema,x),t["x-ms-skip-url-encoding"]&&t.in==="query"&&(t.allowReserved=!0,delete t["x-ms-skip-url-encoding"])}if(t&&t.in==="formData"){N=!1,S.content={};let $="application/x-www-form-urlencoded";if(D.length&&D.indexOf("multipart/form-data")>=0&&($="multipart/form-data"),S.content[$]={},t.schema)S.content[$].schema=t.schema;else{S.content[$].schema={},S.content[$].schema.type="object",S.content[$].schema.properties={},S.content[$].schema.properties[t.name]={};const L=S.content[$].schema,U=S.content[$].schema.properties[t.name];t.description&&(U.description=t.description),t.example&&(U.example=t.example),t.type&&(U.type=t.type);for(const J of ir.parameterTypeProperties)t[J]!==void 0&&(U[J]=t[J]);t.required===!0&&(L.required||(L.required=[]),L.required.push(t.name),S.required=!0),t.default!==void 0&&(U.default=t.default),U.properties&&(U.properties=t.properties),t.allOf&&(U.allOf=t.allOf),t.type==="array"&&t.items&&(U.items=t.items,U.items.collectionFormat&&delete U.items.collectionFormat),C!=="file"&&t["x-s2o-originalType"]!=="file"||(U.type="string",U.format="binary"),bR(t,U)}}else t&&t.type==="file"&&(t.required&&(S.required=t.required),S.content={},S.content["application/octet-stream"]={},S.content["application/octet-stream"].schema={},S.content["application/octet-stream"].schema.type="string",S.content["application/octet-stream"].schema.format="binary",bR(t,S));if(t&&t.in==="body"){S.content={},t.name&&(S["x-s2o-name"]=(n&&n.operationId?ir.sanitiseAll(n.operationId):"")+ir.camelize(`_${t.name}`)),t.description&&(S.description=t.description),t.required&&(S.required=t.required),D.length||D.push("application/json");for(const $ of D)S.content[$]={},S.content[$].schema=ir.clone(t.schema||{}),$E(S.content[$].schema,x);bR(t,S)}if(Object.keys(S).length>0&&(t["x-s2o-delete"]=!0,n))if(n.requestBody&&N){n.requestBody["x-s2o-overloaded"]=!0;const $=n.operationId||p;x.warnings.push(`Operation ${$} has multiple requestBodies`)}else n.requestBody||(n=(function($,L){const U={};for(const J of Object.keys($))U[J]=$[J],J==="parameters"&&(U.requestBody={},L.rbname&&(U[L.rbname]=""));return U.requestBody={},U})(n,x),i[l]=n),n.requestBody.content&&n.requestBody.content["multipart/form-data"]&&n.requestBody.content["multipart/form-data"].schema&&n.requestBody.content["multipart/form-data"].schema.properties&&S.content["multipart/form-data"]&&S.content["multipart/form-data"].schema&&S.content["multipart/form-data"].schema.properties?(n.requestBody.content["multipart/form-data"].schema.properties=Object.assign(n.requestBody.content["multipart/form-data"].schema.properties,S.content["multipart/form-data"].schema.properties),n.requestBody.content["multipart/form-data"].schema.required=(n.requestBody.content["multipart/form-data"].schema.required||[]).concat(S.content["multipart/form-data"].schema.required||[]),n.requestBody.content["multipart/form-data"].schema.required.length||delete n.requestBody.content["multipart/form-data"].schema.required):n.requestBody.content&&n.requestBody.content["application/x-www-form-urlencoded"]&&n.requestBody.content["application/x-www-form-urlencoded"].schema&&n.requestBody.content["application/x-www-form-urlencoded"].schema.properties&&S.content["application/x-www-form-urlencoded"]&&S.content["application/x-www-form-urlencoded"].schema&&S.content["application/x-www-form-urlencoded"].schema.properties?(n.requestBody.content["application/x-www-form-urlencoded"].schema.properties=Object.assign(n.requestBody.content["application/x-www-form-urlencoded"].schema.properties,S.content["application/x-www-form-urlencoded"].schema.properties),n.requestBody.content["application/x-www-form-urlencoded"].schema.required=(n.requestBody.content["application/x-www-form-urlencoded"].schema.required||[]).concat(S.content["application/x-www-form-urlencoded"].schema.required||[]),n.requestBody.content["application/x-www-form-urlencoded"].schema.required.length||delete n.requestBody.content["application/x-www-form-urlencoded"].schema.required):(n.requestBody=Object.assign(n.requestBody,S),n.requestBody["x-s2o-name"]||n.operationId&&(n.requestBody["x-s2o-name"]=ir.sanitiseAll(n.operationId)));if(t&&!t["x-s2o-delete"]){delete t.type;for(const $ of ir.parameterTypeProperties)delete t[$];t.in!=="path"||t.required!==void 0&&t.required===!0||(t.required=!0,x.patches++,x.warnings.push(`(Patchable) path parameters must be required:true [${t.name} in ${p}]`))}return n}function VP(t,n,i,l){if(!t)return!1;if(t.description||typeof t!="object"||Array.isArray(t)||(l.patches++,l.warnings.push("(Patchable) response.description is mandatory")),t.schema!==void 0){$E(t.schema,l),n&&n.produces&&typeof n.produces=="string"&&(n.produces=[n.produces],l.patches++,l.warnings.push("(Patchable) operation.produces must be an array")),i.produces&&!Array.isArray(i.produces)&&delete i.produces;const p=((n?n.produces:null)||i.produces||[]).filter(ir.uniqueOnly);p.length||p.push("*/*"),t.content={};for(const v of p){if(t.content[v]={},t.content[v].schema=ir.clone(t.schema),t.examples&&t.examples[v]){const x={};x.value=t.examples[v],t.content[v].examples={},t.content[v].examples.response=x,delete t.examples[v]}t.content[v].schema.type==="file"&&(t.content[v].schema={type:"string",format:"binary"})}delete t.schema}for(const p in t.examples)t.content||(t.content={}),t.content[p]||(t.content[p]={}),t.content[p].examples={},t.content[p].examples.response={},t.content[p].examples.response.value=t.examples[p];if(delete t.examples,t.headers)for(const p in t.headers)p.toLowerCase()==="status code"?(delete t.headers[p],l.patches++,l.warnings.push('(Patchable) "Status Code" is not a valid header')):KP(t.headers[p],l)}function HP(t,n,i,l,p){for(const v in t){const x=t[v];x&&x["x-trace"]&&typeof x["x-trace"]=="object"&&(x.trace=x["x-trace"],delete x["x-trace"]),x&&x["x-summary"]&&typeof x["x-summary"]=="string"&&(x.summary=x["x-summary"],delete x["x-summary"]),x&&x["x-description"]&&typeof x["x-description"]=="string"&&(x.description=x["x-description"],delete x["x-description"]),x&&x["x-servers"]&&Array.isArray(x["x-servers"])&&(x.servers=x["x-servers"],delete x["x-servers"]);for(const S in x)if(ir.httpMethods.indexOf(S)>=0||S==="x-amazon-apigateway-any-method"){let C=x[S];if(C&&C.parameters&&Array.isArray(C.parameters)){if(x.parameters)for(const N of x.parameters)C.parameters.find((D=>D.name===N.name&&D.in===N.in))||N.in!=="formData"&&N.in!=="body"&&N.type!=="file"||(C=NE(N,C,x,S,v,p,i));for(const N of C.parameters)C=NE(N,C,x,S,`${S}: ${v}`,p,i);C.parameters&&(C.parameters=C.parameters.filter(UP))}if(C&&C.security&&BP(C.security),typeof C=="object"){if(!C.responses){const N={description:"Default response"};C.responses={default:N}}for(const N in C.responses)VP(C.responses[N],C,p,i)}if(C&&C["x-servers"]&&Array.isArray(C["x-servers"]))C.servers=C["x-servers"],delete C["x-servers"];else if(C&&C.schemes&&C.schemes.length){for(const N of C.schemes)if((!p.schemes||p.schemes.indexOf(N)<0)&&(C.servers||(C.servers=[]),Array.isArray(p.servers)))for(const D of p.servers){const $=ir.clone(D);C.servers.push($)}}if(C){if(delete C.consumes,delete C.produces,delete C.schemes,C["x-ms-examples"]){for(const N in C["x-ms-examples"]){const D=C["x-ms-examples"][N],$=ir.sanitiseAll(N);if(D.parameters)for(const L in D.parameters){const U=D.parameters[L];for(const J of(C.parameters||[]).concat(x.parameters||[]))J.name!==L||J.example||(J.examples||(J.examples={}),J.examples[N]={value:U})}if(D.responses)for(const L in D.responses){if(D.responses[L].headers)for(const U in D.responses[L].headers){const J=D.responses[L].headers[U];for(const Y in C.responses[L].headers)Y===U&&(C.responses[L].headers[Y].example=J)}if(D.responses[L].body&&(p.components.examples[$]={value:ir.clone(D.responses[L].body)},C.responses[L]&&C.responses[L].content))for(const U in C.responses[L].content){const J=C.responses[L].content[U];J.examples||(J.examples={}),J.examples[N]={$ref:`#/components/examples/${$}`}}}}delete C["x-ms-examples"]}if(C.parameters&&C.parameters.length===0&&delete C.parameters,C.requestBody){const N=C.operationId?ir.sanitiseAll(C.operationId):ir.camelize(ir.sanitiseAll(S+v)),D=ir.sanitise(C.requestBody["x-s2o-name"]||N||"");delete C.requestBody["x-s2o-name"];const $=JSON.stringify(C.requestBody),L=ir.createHash($);if(!l[L]){const J={};J.name=D,J.body=C.requestBody,J.refs=[],l[L]=J}const U=`#/${n}/${encodeURIComponent(v)}/${S}/requestBody`;l[L].refs.push(U)}}}if(x&&x.parameters){for(const S in x.parameters)NE(x.parameters[S],null,x,null,v,p,i);Array.isArray(x.parameters)&&(x.parameters=x.parameters.filter(UP))}}}function GP(t){return t&&t.url&&typeof t.url=="string"&&(t.url=t.url.split("{{").join("{"),t.url=t.url.split("}}").join("}"),t.url.replace(/\{(.+?)\}/g,((n,i)=>{t.variables||(t.variables={}),t.variables[i]={default:"unknown"}}))),t}function XP(t,n){t.info!==void 0&&t.info!==null||(t.info={version:"",title:""},n.patches++,n.warnings.push("(Patchable) info object is mandatory")),(typeof t.info!="object"||Array.isArray(t.info))&&(n.errCount++,n.errors.push({message:"info must be an object",pointer:"/info"})),t.info&&(t.info.title===void 0&&(n.patches++,t.info.title="",n.warnings.push({message:"(Patchable) info.title cannot be null",pointer:"/info/title",patchable:!0})),t.info.version===void 0?(n.patches++,t.info.version="",n.warnings.push("(Patchable) info.version cannot be null")):typeof t.info.version!="string"&&(n.patches++,t.info.version=t.info.version.toString(),n.warnings.push("(Patchable) info.version must be a string")))}function YP(t,n){t.paths||(n.patches++,t.paths={},n.warnings.push("(Patchable) paths object is mandatory"))}function HX(t={}){const n={original:t,openapi:{},patches:0,warnings:[],errCount:0,errors:[]};if(t.openapi&&typeof t.openapi=="string"&&t.openapi.startsWith("3."))return n.openapi=ir.circularClone(t),XP(n.openapi,n),YP(n.openapi,n),n;if(t.swagger!=="2.0")return n.errCount++,n.errors.push({message:`Unsupported swagger/OpenAPI version: ${t.openapi?t.openapi:t.swagger}`,pointer:"/swagger"}),n;if(n.openapi=ir.circularClone(t),n.openapi.openapi="3.0.0",delete n.openapi.swagger,xR(n.openapi,{},((i,l,p)=>{i[l]===null&&!l.startsWith("x-")&&l!=="default"&&p.path.indexOf("/example")<0&&delete i[l]})),t.host)(t.schemes||[]).forEach((i=>{const l={},p=(t.basePath||"").replace(/\/$/,"");l.url=`${i?`${i}:`:""}//${t.host}${p}`,GP(l),n.openapi.servers||(n.openapi.servers=[]),n.openapi.servers.push(l)}));else if(t.basePath){const i={};i.url=t.basePath,GP(i),n.openapi.servers||(n.openapi.servers=[]),n.openapi.servers.push(i)}if(delete n.openapi.host,delete n.openapi.basePath,t["x-ms-parameterized-host"]){const i=t["x-ms-parameterized-host"],l={};l.url=i.hostTemplate+(t.basePath?t.basePath:""),l.variables={};const p=l.url.match(/\{\w+\}/g);for(const v in i.parameters){const x=i.parameters[v];v.startsWith("x-")||(delete x.required,delete x.type,delete x.in,x.default===void 0&&(x.enum?x.default=x.enum[0]:x.default="none"),x.name||(x.name=p[v].replace("{","").replace("}","")),l.variables[x.name]=x,delete x.name)}n.openapi.servers||(n.openapi.servers=[]),i.useSchemePrefix===!1?n.openapi.servers.push(l):t.schemes.forEach((v=>{n.openapi.servers.push({...l,url:`${v}://${l.url}`})})),delete n.openapi["x-ms-parameterized-host"]}return XP(n.openapi,n),YP(n.openapi,n),typeof n.openapi.consumes=="string"&&(n.openapi.consumes=[n.openapi.consumes]),typeof n.openapi.produces=="string"&&(n.openapi.produces=[n.openapi.produces]),n.openapi.components={},n.openapi["x-callbacks"]&&(n.openapi.components.callbacks=n.openapi["x-callbacks"],delete n.openapi["x-callbacks"]),n.openapi.components.examples={},n.openapi.components.headers={},n.openapi["x-links"]&&(n.openapi.components.links=n.openapi["x-links"],delete n.openapi["x-links"]),n.openapi.components.parameters=n.openapi.parameters||{},n.openapi.components.responses=n.openapi.responses||{},n.openapi.components.requestBodies={},n.openapi.components.securitySchemes=n.openapi.securityDefinitions||{},n.openapi.components.schemas=n.openapi.definitions||{},delete n.openapi.definitions,delete n.openapi.responses,delete n.openapi.parameters,delete n.openapi.securityDefinitions,(function(i){const l=i.openapi,p={};qP={schemas:{}},l.security&&BP(l.security);for(const v in l.components.securitySchemes){const x=ir.sanitise(v);if(v!==x){if(l.components.securitySchemes[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised securityScheme name ${x}`,pointer:`/components/securitySchemes/${x}`}),i;l.components.securitySchemes[x]=l.components.securitySchemes[v],delete l.components.securitySchemes[v]}VX(l.components.securitySchemes[x],i)}for(const v in l.components.schemas){const x=ir.sanitiseAll(v);let S=0;if(v!==x){for(;l.components.schemas[x+S];)S=S?++S:2;l.components.schemas[x+S]=l.components.schemas[v],delete l.components.schemas[v]}qP.schemas[v]=x+S,$E(l.components.schemas[`${x}${S}`],i)}for(const v in l.components.parameters){const x=ir.sanitise(v);if(v!==x){if(l.components.parameters[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised parameter name ${x}`,pointer:`/components/parameters/${x}`}),i;l.components.parameters[x]=l.components.parameters[v],delete l.components.parameters[v]}NE(l.components.parameters[x],null,null,null,x,l,i)}for(const v in l.components.responses){const x=ir.sanitise(v);if(v!==x){if(l.components.responses[x])return i.errCount++,i.errors.push({message:`Duplicate sanitised response name ${x}`,pointer:`/components/responses/${x}`}),i;l.components.responses[x]=l.components.responses[v],delete l.components.responses[v]}const S=l.components.responses[x];if(VP(S,null,l,i),S.headers)for(const C in S.headers)C.toLowerCase()==="status code"?(delete S.headers[C],i.patches++,i.warnings.push('(Patchable) "Status Code" is not a valid header')):KP(S.headers[C],i)}for(const v in l.components.requestBodies){const x=l.components.requestBodies[v],S=JSON.stringify(x),C=ir.createHash(S),N={};N.name=v,N.body=x,N.refs=[],p[C]=N}HP(l.paths,"paths",i,p,l),l["x-ms-paths"]&&HP(l["x-ms-paths"],"x-ms-paths",i,p,l);for(const v in l.components.parameters)l.components.parameters[v]["x-s2o-delete"]&&delete l.components.parameters[v];return delete l.consumes,delete l.produces,delete l.schemes,l.components.requestBodies={},l.components.responses&&Object.keys(l.components.responses).length===0&&delete l.components.responses,l.components.parameters&&Object.keys(l.components.parameters).length===0&&delete l.components.parameters,l.components.examples&&Object.keys(l.components.examples).length===0&&delete l.components.examples,l.components.requestBodies&&Object.keys(l.components.requestBodies).length===0&&delete l.components.requestBodies,l.components.securitySchemes&&Object.keys(l.components.securitySchemes).length===0&&delete l.components.securitySchemes,l.components.headers&&Object.keys(l.components.headers).length===0&&delete l.components.headers,l.components.schemas&&Object.keys(l.components.schemas).length===0&&delete l.components.schemas,l.components&&Object.keys(l.components).length===0&&delete l.components,i})(n)}function GX(t){return t.ok&&t.text&&t.parseError&&t.parseError.name==="YAMLException"&&(!t.headers["content-type"]||t.headers["content-type"].match("text/plain"))&&(t.body=t.text),t}const ZP=function(t){return new Promise((async n=>{try{const i=await tr.resolve(t,GX);if(i.errors&&i.errors.length>0)n(i);else{i.spec.openapi&&(i.resolvedSpec=i.spec,n(i));const l=HX(i.spec);l.errors&&l.errors.length>0&&(Array.isArray(i.errors)?i.errors.concat(i.errors):i.errors=l.errors),l.warnings&&l.warnings.length>0&&(i.warnings=l.warnings),i.resolvedSpec=i.spec,i.spec=l.openapi,n(i)}}catch(i){n(i)}}))};async function wR(t,n=!1,i=!1,l=!1,p="",v="",x="",S="",C="",N="",D="",$=""){var L,U;let J;try{var Y,Z;let Ee;if(this.requestUpdate(),Ee=typeof t=="string"?await ZP({url:t,allowMetaPatches:!1}):await ZP({spec:t,allowMetaPatches:!1}),await Ou(0),(Y=Ee.resolvedSpec)!==null&&Y!==void 0&&Y.jsonSchemaViewer&&(Z=Ee.resolvedSpec)!==null&&Z!==void 0&&Z.schemaAndExamples){this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:Ee.resolvedSpec}}));const ye=Object.entries(Ee.resolvedSpec.schemaAndExamples).map((ze=>({show:!0,expanded:!0,selectedExample:null,name:ze[0],elementId:ze[0].replace(sh,"-"),...ze[1]})));return{specLoadError:!1,isSpecLoading:!1,info:Ee.resolvedSpec.info,schemaAndExamples:ye}}var P,re,le,he;if(!Ee.spec||!(Ee.spec.components||Ee.spec.info||Ee.spec.servers||Ee.spec.tags||Ee.spec.paths))return console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",Ee),{specLoadError:!0,isSpecLoading:!1,info:{title:"Error loading the spec",description:(P=Ee.response)!==null&&P!==void 0&&P.url?`${(re=Ee.response)===null||re===void 0?void 0:re.url} ┃ ${(le=Ee.response)===null||le===void 0?void 0:le.status} ${(he=Ee.response)===null||he===void 0?void 0:he.statusText}`:"Unable to load the Spec",version:" "},tags:[]};J=(function(ye,ze="",Le="",tt=""){const ut={},Kt=tt.split(",").map((cn=>cn.trim().toLowerCase())).filter(Boolean);function Tn(cn,nr){if(!ze)return!0;const Ei=`${nr} ${cn}`.toLowerCase();return Le==="regex"?new RegExp(ze,"i").test(ze.toLowerCase()):Ei.includes(ze.toLowerCase())}function _t(cn){return cn.some((nr=>Kt.includes(nr?.label.toLowerCase())))}return Object.entries(ye.paths).forEach((([cn,nr])=>{const Ei={};Object.entries(nr).forEach((([Zn,zn])=>{const Fi=zn["x-badges"];Tn(cn,Zn)&&(Fi&&Array.isArray(Fi)&&_t(Fi)||(Ei[Zn]=zn))})),Object.keys(Ei).length>0&&(ut[cn]=Ei)})),ye.paths=ut,ye})(Ee.spec,N,D,$),this.dispatchEvent(new CustomEvent("before-render",{detail:{spec:J}}))}catch(Ee){console.info("RapiDoc: %c There was an issue while parsing the spec %o ","color:orangered",Ee)}const xe=(function(Ee,ye,ze=!1,Le=!1){const tt=["get","put","post","delete","patch","head","options"],ut=Ee.tags&&Array.isArray(Ee.tags)&&Ee.tags.length>0?Ee.tags.map((_t=>({show:!0,elementId:`tag--${_t.name.replace(sh,"-")}`,name:_t.name,displayName:_t["x-displayName"]||_t.name,description:_t.description||"",headers:_t.description?SR(_t.description):[],paths:[],expanded:_t["x-tag-expanded"]!==!1}))):[],Kt=Ee.paths||{};if(Ee.webhooks)for(const[_t,cn]of Object.entries(Ee.webhooks))cn._type="webhook",Kt[_t]=cn;for(const _t in Kt){const cn=Kt[_t].parameters,nr={servers:Kt[_t].servers||[],parameters:Kt[_t].parameters||[]},Ei=Kt[_t]._type==="webhook";tt.forEach((Zn=>{if(Kt[_t][Zn]){const zn=Ee.paths[_t][Zn],Fi=zn.tags||[];if(Fi.length===0)if(ze){const kr=_t.replace(/^\/+|\/+$/g,""),Tr=kr.indexOf("/");Tr===-1?Fi.push(kr):Fi.push(kr.substring(0,Tr))}else Fi.push("General ⦂");Fi.forEach((kr=>{let Tr,zr;var pa,ec;Ee.tags&&(zr=Ee.tags.find((ps=>ps.name.toLowerCase()===kr.toLowerCase()))),Tr=ut.find((ps=>ps.name===kr)),Tr||(Tr={show:!0,elementId:`tag--${kr.replace(sh,"-")}`,name:kr,description:((pa=zr)===null||pa===void 0?void 0:pa.description)||"",headers:(ec=zr)!==null&&ec!==void 0&&ec.description?SR(zr.description):[],paths:[],expanded:!zr||zr["x-tag-expanded"]!==!1},ut.push(Tr));let Vr=(zn.summary||zn.description||`${Zn.toUpperCase()} ${_t}`).trim();Vr.length>100&&([Vr]=Vr.split(/[.|!|?]\s|[\r?\n]/));let Ho=[];if(Ho=cn?zn.parameters?cn.filter((ps=>{if(!zn.parameters.some((Go=>ps.name===Go.name&&ps.in===Go.in)))return ps})).concat(zn.parameters):cn.slice(0):zn.parameters?zn.parameters.slice(0):[],zn.callbacks)for(const[ps,Go]of Object.entries(zn.callbacks)){const yp=Object.entries(Go).filter((ib=>typeof ib[1]=="object"))||[];zn.callbacks[ps]=Object.fromEntries(yp)}Tr.paths.push({show:!0,expanded:!1,isWebhook:Ei,expandedAtLeastOnce:!1,summary:zn.summary||"",description:zn.description||"",externalDocs:zn.externalDocs,shortSummary:Vr,method:Zn,path:_t,operationId:zn.operationId,elementId:`${Zn}-${_t.replace(sh,"-")}`,servers:zn.servers?nr.servers.concat(zn.servers):nr.servers,parameters:Ho,requestBody:zn.requestBody,responses:zn.responses,callbacks:zn.callbacks,deprecated:zn.deprecated,security:zn.security,xBadges:zn["x-badges"]||void 0,xCodeSamples:zn["x-codeSamples"]||zn["x-code-samples"]||""})}))}}))}const Tn=ut.filter((_t=>_t.paths&&_t.paths.length>0));return Tn.forEach((_t=>{ye==="method"?_t.paths.sort(((cn,nr)=>tt.indexOf(cn.method).toString().localeCompare(tt.indexOf(nr.method)))):ye==="summary"?_t.paths.sort(((cn,nr)=>cn.shortSummary.localeCompare(nr.shortSummary))):ye==="path"&&_t.paths.sort(((cn,nr)=>cn.path.localeCompare(nr.path))),_t.firstPathId=_t.paths[0].elementId})),Le?Tn.sort(((_t,cn)=>_t.name.localeCompare(cn.name))):Tn})(J,p,n,i),pe=(function(Ee,ye=!1){if(!Ee.components)return[];const ze=[];for(const Le in Ee.components){const tt=[];for(const _t in Ee.components[Le]){const cn={show:!0,id:`${Le.toLowerCase()}-${_t.toLowerCase()}`.replace(sh,"-"),name:_t,component:Ee.components[Le][_t]};tt.push(cn)}let ut=Le,Kt=Le;switch(Le){case"schemas":ye&&tt.sort(((_t,cn)=>_t.name.localeCompare(cn.name))),Kt="Schemas",ut="Schemas allows the definition of input and output data types. These types can be objects, but also primitives and arrays.";break;case"responses":Kt="Responses",ut="Describes responses from an API Operation, including design-time, static links to operations based on the response.";break;case"parameters":Kt="Parameters",ut="Describes operation parameters. A unique parameter is defined by a combination of a name and location.";break;case"examples":Kt="Examples",ut="List of Examples for operations, can be requests, responses and objects examples.";break;case"requestBodies":Kt="Request Bodies",ut="Describes common request bodies that are used across the API operations.";break;case"headers":Kt="Headers",ut='Headers follows the structure of the Parameters but they are explicitly in "header"';break;case"securitySchemes":Kt="Security Schemes",ut="Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header, a cookie parameter or as a query parameter), OAuth2's common flows(implicit, password, client credentials and authorization code) as defined in RFC6749, and OpenID Connect Discovery.";break;case"links":Kt="Links",ut="Links represent a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.";break;case"callbacks":Kt="Callbacks",ut="A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.";break;default:Kt=Le,ut=Le}const Tn={show:!0,name:Kt,description:ut,subComponents:tt};ze.push(Tn)}return ze||[]})(J,l),_e=(L=J.info)!==null&&L!==void 0&&L.description?SR(J.info.description):[],ke=[];if((U=J.components)!==null&&U!==void 0&&U.securitySchemes){const Ee=new Set;Object.entries(J.components.securitySchemes).forEach((ye=>{if(!Ee.has(ye[0])){Ee.add(ye[0]);const ze={securitySchemeId:ye[0],...ye[1]};ze.value="",ze.finalKeyValue="",ye[1].type==="apiKey"||ye[1].type==="http"?(ze.in=ye[1].in||"header",ze.name=ye[1].name||"Authorization",ze.user="",ze.password=""):ye[1].type==="oauth2"&&(ze.in="header",ze.name="Authorization",ze.clientId="",ze.clientSecret=""),ke.push(ze)}}))}v&&x&&S&&ke.push({securitySchemeId:mo,description:"api-key provided in rapidoc element attributes",type:"apiKey",oAuthFlow:"",name:v,in:x,value:S,finalKeyValue:S}),ke.forEach((Ee=>{Ee.type==="http"?Ee.typeDisplay=Ee.scheme==="basic"?"HTTP Basic":"HTTP Bearer":Ee.type==="apiKey"?Ee.typeDisplay=`API Key (${Ee.name})`:Ee.type==="oauth2"?Ee.typeDisplay=`OAuth (${Ee.securitySchemeId})`:Ee.typeDisplay=Ee.type||"None"}));let Be=[];return J.servers&&Array.isArray(J.servers)&&J.servers.length>0?(J.servers.forEach((Ee=>{let ye=Ee.url.trim();ye.startsWith("http")||ye.startsWith("//")||ye.startsWith("{")||window.location.origin.startsWith("http")&&(Ee.url=window.location.origin+Ee.url,ye=Ee.url),Ee.variables&&Object.entries(Ee.variables).forEach((ze=>{const Le=new RegExp(`{${ze[0]}}`,"g");ye=ye.replace(Le,ze[1].default||""),ze[1].value=ze[1].default||""})),Ee.computedUrl=ye})),C&&J.servers.push({url:C,computedUrl:C})):C?J.servers=[{url:C,computedUrl:C}]:window.location.origin.startsWith("http")?J.servers=[{url:window.location.origin,computedUrl:window.location.origin}]:J.servers=[{url:"http://localhost",computedUrl:"http://localhost"}],Be=J.servers,{specLoadError:!1,isSpecLoading:!1,info:J.info,infoDescriptionHeaders:_e,tags:xe,components:pe,externalDocs:J.externalDocs,securitySchemes:ke,servers:Be}}function SR(t){return yt.lexer(t).filter((i=>i.type==="heading"&&i.depth<=2))||[]}const JP=1,XX=2,WP=3,QP=4,ER=t=>(...n)=>({_$litDirective$:t,values:n});class jR{constructor(n){}get _$AU(){return this._$AM._$AU}_$AT(n,i,l){this.t=n,this._$AM=i,this.i=l}_$AS(n,i){return this.update(n,i)}update(n,i){return this.render(...i)}}class CR extends jR{constructor(n){if(super(n),this.it=mn,n.type!==XX)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(n){if(n===mn||n==null)return this._t=void 0,this.it=n;if(n===On)return n;if(typeof n!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(n===this.it)return this._t;this.it=n;const i=[n];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}}CR.directiveName="unsafeHTML",CR.resultType=1;const In=ER(CR);var eM=g(287).hp;const YX="731DB1C3F7EA533B85E29492D26AA-1234567890-1234567890",ZX="4FatVDBJKPAo4JgLLaaQFMUcQPn5CrPRvLlaob9PTYc",tM="rapidoc";function fp(t,n="",i="",l=""){var p,v;const x=(p=this.resolvedSpec.securitySchemes)===null||p===void 0?void 0:p.find((N=>N.securitySchemeId===t));if(!x)return!1;let S="";if(((v=x.scheme)===null||v===void 0?void 0:v.toLowerCase())==="basic")n&&(S=`Basic ${eM.from(`${n}:${i}`,"utf8").toString("base64")}`);else if(l){var C;x.value=l,S=`${((C=x.scheme)===null||C===void 0?void 0:C.toLowerCase())==="bearer"?"Bearer ":""}${l}`}return!!S&&(x.finalKeyValue=S,this.requestUpdate(),!0)}function AR(){var t;(t=this.resolvedSpec.securitySchemes)===null||t===void 0||t.forEach((n=>{n.user="",n.password="",n.value="",n.finalKeyValue=""})),this.requestUpdate()}function OR(){return JSON.parse(localStorage.getItem(tM))||{}}function nM(t){localStorage.setItem(tM,JSON.stringify(t))}function JX(){const t=OR.call(this);Object.values(t).forEach((n=>{fp.call(this,n.securitySchemeId,n.username,n.password,n.value)}))}function rM(t){let n="";const i=this.resolvedSpec.securitySchemes.find((l=>l.securitySchemeId===t));if(i){const l=this.shadowRoot.getElementById(`security-scheme-${t}`);if(l){if(i.type&&i.scheme&&i.type==="http"&&i.scheme.toLowerCase()==="basic"){const p=l.querySelector(".api-key-user").value.trim(),v=l.querySelector(".api-key-password").value.trim();fp.call(this,t,p,v)}else n=l.querySelector(".api-key-input").value.trim(),fp.call(this,t,"","",n);if(this.persistAuth==="true"){const p=OR.call(this);p[t]=i,nM.call(this,p)}}}}function sM(t,n,i="Bearer"){const l=this.resolvedSpec.securitySchemes.find((p=>p.securitySchemeId===t));l.finalKeyValue=`${i.toLowerCase()==="bearer"?"Bearer":i.toLowerCase()==="mac"?"MAC":i} ${n}`,this.requestUpdate()}async function kR(t,n,i,l,p,v,x,S,C="header",N=null,D=null,$=null){const L=S?S.querySelector(".oauth-resp-display"):void 0,U=new URLSearchParams,J=new Headers;U.append("grant_type",p),p==="authorization_code"&&(U.append("client_id",n),U.append("client_secret",i)),p!=="client_credentials"&&p!=="password"&&U.append("redirect_uri",l),v&&(U.append("code",v),U.append("code_verifier",YX)),C==="header"?J.set("Authorization",`Basic ${eM.from(`${n}:${i}`,"utf8").toString("base64")}`):p!=="authorization_code"&&(U.append("client_id",n),U.append("client_secret",i)),p==="password"&&(U.append("username",D),U.append("password",$)),N&&U.append("scope",N);try{const Y=await fetch(t,{method:"POST",headers:J,body:U}),Z=await Y.json();if(!Y.ok)return L&&(L.innerHTML=`<span style="color:var(--red)">${Z.error_description||Z.error_description||"Unable to get access token"}</span>`),!1;if(Z.token_type&&Z.access_token)return sM.call(this,x,Z.access_token,Z.token_type),L&&(L.innerHTML='<span style="color:var(--green)">Access Token Received</span>'),!0}catch{return L&&(L.innerHTML='<span style="color:var(--red)">Failed to get access token</span>'),!1}}async function WX(t,n,i,l,p,v,x,S,C,N){sessionStorage.removeItem("winMessageEventActive"),n.close(),t.data.fake||(t.data||console.warn("RapiDoc: Received no data with authorization message"),t.data.error&&console.warn("RapiDoc: Error while receiving data"),t.data&&(t.data.responseType==="code"?kR.call(this,i,l,p,v,x,t.data.code,C,N,S):t.data.responseType==="token"&&sM.call(this,C,t.data.access_token,t.data.token_type)))}async function QX(t,n,i,l,p){const v=p.target.closest(".oauth-flow"),x=v.querySelector(".oauth-client-id")?v.querySelector(".oauth-client-id").value.trim():"",S=v.querySelector(".oauth-client-secret")?v.querySelector(".oauth-client-secret").value.trim():"",C=v.querySelector(".api-key-user")?v.querySelector(".api-key-user").value.trim():"",N=v.querySelector(".api-key-password")?v.querySelector(".api-key-password").value.trim():"",D=v.querySelector(".oauth-send-client-secret-in")?v.querySelector(".oauth-send-client-secret-in").value.trim():"header",$=[...v.querySelectorAll(".scope-checkbox:checked")],L=v.querySelector(`#${t}-pkce`),U=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,J=`${Math.random().toString(36).slice(2,9)}random${Math.random().toString(36).slice(2,9)}`,Y=new URL(`${window.location.origin}${window.location.pathname.substring(0,window.location.pathname.lastIndexOf("/"))}/${this.oauthReceiver}`);let Z,P="",re="";if([...v.parentNode.querySelectorAll(".oauth-resp-display")].forEach((le=>{le.innerHTML=""})),n==="authorizationCode"||n==="implicit"){const le=new URL(i);n==="authorizationCode"?(P="authorization_code",re="code"):n==="implicit"&&(re="token");const he=new URLSearchParams(le.search),xe=$.map((pe=>pe.value)).join(" ");xe&&he.set("scope",xe),he.set("client_id",x),he.set("redirect_uri",Y.toString()),he.set("response_type",re),he.set("state",U),he.set("nonce",J),L&&L.checked&&(he.set("code_challenge",ZX),he.set("code_challenge_method","S256")),he.set("show_dialog",!0),le.search=he.toString(),sessionStorage.getItem("winMessageEventActive")==="true"&&window.postMessage({fake:!0},this),setTimeout((()=>{Z=window.open(le.toString()),Z?(sessionStorage.setItem("winMessageEventActive","true"),window.addEventListener("message",(pe=>WX.call(this,pe,Z,l,x,S,Y.toString(),P,D,t,v)),{once:!0})):console.error(`RapiDoc: Unable to open ${le.toString()} in a new window`)}),10)}else if(n==="clientCredentials"){P="client_credentials";const le=$.map((he=>he.value)).join(" ");kR.call(this,l,x,S,Y.toString(),P,"",t,v,D,le)}else if(n==="password"){P="password";const le=$.map((he=>he.value)).join(" ");kR.call(this,l,x,S,Y.toString(),P,"",t,v,D,le,C,N)}}function eY(t,n,i,l,p,v=[],x="header",S=void 0){var C;let{authorizationUrl:N,tokenUrl:D,refreshUrl:$}=p;const L=p["x-pkce-only"]||!1,U=Z=>Z.indexOf("://")>0||Z.indexOf("//")===0,J=new URL((C=this.selectedServer)===null||C===void 0?void 0:C.computedUrl).origin;let Y;return $&&!U($)&&($=`${J}/${$.replace(/^\//,"")}`),D&&!U(D)&&(D=`${J}/${D.replace(/^\//,"")}`),N&&!U(N)&&(N=`${J}/${N.replace(/^\//,"")}`),Y=t==="authorizationCode"?"Authorization Code Flow":t==="clientCredentials"?"Client Credentials Flow":t==="implicit"?"Implicit Flow":t==="password"?"Password Flow":t,G`
|
||
<div class="oauth-flow ${t}" style="padding: 12px 0; margin-bottom:12px;">
|
||
<div class="tiny-title upper" style="margin-bottom:8px;">${Y}</div>
|
||
${N?G`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Auth URL</span> <span class="mono-font"> ${N} </span></div>`:""}
|
||
${D?G`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Token URL</span> <span class="mono-font">${D}</span></div>`:""}
|
||
${$?G`<div style="margin-bottom:5px"><span style="width:75px; display: inline-block;">Refresh URL</span> <span class="mono-font">${$}</span></div>`:""}
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="implicit"||t==="password"?G`
|
||
${p.scopes?G`
|
||
<span> Scopes </span>
|
||
<div class= "oauth-scopes" part="section-auth-scopes" style = "width:100%; display:flex; flex-direction:column; flex-wrap:wrap; margin:0 0 10px 24px">
|
||
${Object.entries(p.scopes).map(((Z,P)=>G`
|
||
<div class="m-checkbox" style="display:inline-flex; align-items:center">
|
||
<input type="checkbox" part="checkbox checkbox-auth-scope" class="scope-checkbox" id="${l}${t}${P}" ?checked="${v.includes(Z[0])}" value="${Z[0]}">
|
||
<label for="${l}${t}${P}" style="margin-left:5px; cursor:pointer">
|
||
<span class="mono-font">${Z[0]}</span>
|
||
${Z[0]!==Z[1]?` - ${Z[1]||""}`:""}
|
||
</label>
|
||
</div>
|
||
`))}
|
||
</div>
|
||
`:""}
|
||
${t==="password"?G`
|
||
<div style="margin:5px 0">
|
||
<input type="text" value = "" placeholder="username" spellcheck="false" class="oauth2 ${t} ${l} api-key-user" part="textbox textbox-username" id="input-${l}-${t}-api-key-user">
|
||
<input type="password" value = "" placeholder="password" spellcheck="false" class="oauth2 ${t} ${l} api-key-password" style = "margin:0 5px;" part="textbox textbox-password" id="input-${l}-${t}-api-key-password">
|
||
</div>`:""}
|
||
<div>
|
||
${t==="authorizationCode"?G`
|
||
<div style="margin: 16px 0 4px">
|
||
<input type="checkbox" part="checkbox checkbox-auth-scope" id="${l}-pkce" checked ?disabled=${L}>
|
||
<label for="${l}-pkce" style="margin:0 16px 0 4px; line-height:24px; cursor:pointer">
|
||
Send Proof Key for Code Exchange (PKCE)
|
||
</label>
|
||
</div>
|
||
`:""}
|
||
<input type="text" part="textbox textbox-auth-client-id" value = "${n||""}" placeholder="client-id" spellcheck="false" class="oauth2 ${t} ${l} oauth-client-id">
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="password"?G`
|
||
<input
|
||
id="${l}-${t}-oauth-client-secret"
|
||
type="password" part="textbox textbox-auth-client-secret"
|
||
value = "${i||""}" placeholder="client-secret" spellcheck="false"
|
||
class="oauth2 ${t} ${l}
|
||
oauth-client-secret"
|
||
style = "margin:0 5px;${L?"display:none;":""}"
|
||
>
|
||
<select style="margin-right:5px;${L?"display:none;":""}" class="${t} ${l} oauth-send-client-secret-in">
|
||
${!S||S.includes("header")?G`<option value = 'header' .selected = ${x==="header"} > Authorization Header </option>`:""}
|
||
${!S||S.includes("request-body")?G` <option value = 'request-body' .selected = ${x==="request-body"}> Request Body </option>`:""}
|
||
</select>`:""}
|
||
${t==="authorizationCode"||t==="clientCredentials"||t==="implicit"||t==="password"?G`
|
||
<button class="m-btn thin-border" part="btn btn-outline"
|
||
@click="${Z=>{QX.call(this,l,t,N,D,Z)}}"
|
||
> GET TOKEN </button>`:""}
|
||
</div>
|
||
<div class="oauth-resp-display red-text small-font-size"></div>
|
||
`:""}
|
||
</div>
|
||
`}function tY(t){var n;const i=(n=this.resolvedSpec.securitySchemes)===null||n===void 0?void 0:n.find((l=>l.securitySchemeId===t));if(i.user="",i.password="",i.value="",i.finalKeyValue="",this.persistAuth==="true"){const l=OR.call(this);delete l[i.securitySchemeId],nM.call(this,l)}this.requestUpdate()}function iM(){var t;if(!this.resolvedSpec)return"";const n=(t=this.resolvedSpec.securitySchemes)===null||t===void 0?void 0:t.filter((i=>i.finalKeyValue));return n?G`
|
||
<section id='auth' part="section-auth" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class = 'observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap "}'>
|
||
<div class='sub-title regular-font'> AUTHENTICATION </div>
|
||
|
||
<div class="small-font-size" style="display:flex; align-items: center; min-height:30px">
|
||
${n.length>0?G`
|
||
<div class="blue-text"> ${n.length} API key applied </div>
|
||
<div style="flex:1"></div>
|
||
<button class="m-btn thin-border" part="btn btn-outline" @click=${()=>{AR.call(this)}}>CLEAR ALL API KEYS</button>`:G`<div class="red-text">No API key applied</div>`}
|
||
</div>
|
||
${this.resolvedSpec.securitySchemes&&this.resolvedSpec.securitySchemes.length>0?G`
|
||
<table role="presentation" id="auth-table" class='m-table padded-12' style="width:100%;">
|
||
${this.resolvedSpec.securitySchemes.filter((i=>i.type)).map((i=>{var l,p;return G`
|
||
<tr id="security-scheme-${i.securitySchemeId}" class="${i.type.toLowerCase()}">
|
||
<td style="max-width:500px; overflow-wrap: break-word;">
|
||
<div style="line-height:28px; margin-bottom:5px;">
|
||
<span style="font-weight:bold; font-size:var(--font-size-regular)">${i.typeDisplay}</span>
|
||
${i.finalKeyValue?G`
|
||
<span class='blue-text'> ${i.finalKeyValue?"Key Applied":""} </span>
|
||
<button class="m-btn thin-border small" part="btn btn-outline" @click=${()=>{tY.call(this,i.securitySchemeId)}}>REMOVE</button>
|
||
`:""}
|
||
</div>
|
||
${i.description?G`
|
||
<div class="m-markdown">
|
||
${In(yt(i.description||""))}
|
||
</div>`:""}
|
||
|
||
${i.type.toLowerCase()==="apikey"||i.type.toLowerCase()==="http"&&((l=i.scheme)===null||l===void 0?void 0:l.toLowerCase())==="bearer"?G`
|
||
<div style="margin-bottom:5px">
|
||
${i.type.toLowerCase()==="apikey"?G`Send <code>${i.name}</code> in <code>${i.in}</code>`:G`Send <code>Authorization</code> in <code>header</code> containing the word <code>Bearer</code> followed by a space and a Token String.`}
|
||
</div>
|
||
<div style="max-height:28px;">
|
||
${i.in!=="cookie"?G`
|
||
<input type = "text" value = "${i.value}" class="${i.type} ${i.securitySchemeId} api-key-input" placeholder = "api-token" spellcheck = "false" id = "${i.type}-${i.securitySchemeId}-api-key-input">
|
||
<button class="m-btn thin-border" style = "margin-left:5px;"
|
||
part = "btn btn-outline"
|
||
@click="${v=>{rM.call(this,i.securitySchemeId,v)}}">
|
||
${i.finalKeyValue?"UPDATE":"SET"}
|
||
</button>`:G`<span class="gray-text" style="font-size::var(--font-size-small)"> cookies cannot be set from here</span>`}
|
||
</div>`:""}
|
||
${i.type.toLowerCase()==="http"&&((p=i.scheme)===null||p===void 0?void 0:p.toLowerCase())==="basic"?G`
|
||
<div style="margin-bottom:5px">
|
||
Send <code>Authorization</code> in <code>header</code> containing the word <code>Basic</code> followed by a space and a base64 encoded string of <code>username:password</code>.
|
||
</div>
|
||
<div>
|
||
<input type="text" value = "${i.user}" placeholder="username" spellcheck="false" class="${i.type} ${i.securitySchemeId} api-key-user" style="width:100px" id = "input-${i.type}-${i.securitySchemeId}-api-key-user">
|
||
<input type="password" value = "${i.password}" placeholder="password" spellcheck="false" class="${i.type} ${i.securitySchemeId} api-key-password" style = "width:100px; margin:0 5px;" id = "input-${i.type}-${i.securitySchemeId}-api-key-password">
|
||
<button class="m-btn thin-border"
|
||
@click="${v=>{rM.call(this,i.securitySchemeId,v)}}"
|
||
part = "btn btn-outline"
|
||
>
|
||
${i.finalKeyValue?"UPDATE":"SET"}
|
||
</button>
|
||
</div>`:""}
|
||
</td>
|
||
</tr>
|
||
${i.type.toLowerCase()==="oauth2"?G`
|
||
<tr>
|
||
<td style="border:none; padding-left:48px">
|
||
${Object.keys(i.flows).map((v=>eY.call(this,v,i.flows[v]["x-client-id"]||i["x-client-id"]||"",i.flows[v]["x-client-secret"]||i["x-client-secret"]||"",i.securitySchemeId,i.flows[v],i.flows[v]["x-default-scopes"]||i["x-default-scopes"],i.flows[v]["x-receive-token-in"]||i["x-receive-token-in"],i.flows[v]["x-receive-token-in-options"]||i["x-receive-token-in-options"])))}
|
||
</td>
|
||
</tr>
|
||
`:""}
|
||
`}))}
|
||
</table>`:""}
|
||
<slot name="auth"></slot>
|
||
</section>
|
||
`:void 0}function aM(t){if(this.resolvedSpec.securitySchemes&&t){const n=[];return Array.isArray(t)?t.length===0?"":(t.forEach((i=>{const l=[],p=[];Object.keys(i).length===0?n.push({securityTypes:"None",securityDefs:[]}):(Object.keys(i).forEach((v=>{let x="";const S=this.resolvedSpec.securitySchemes.find((C=>C.securitySchemeId===v));i[v]&&Array.isArray(i[v])&&(x=i[v].join(", ")),S&&(p.push(S.typeDisplay),l.push({...S,scopes:x}))})),n.push({securityTypes:p.length>1?`${p[0]} + ${p.length-1} more`:p[0],securityDefs:l}))})),G`<div style="position:absolute; top:3px; right:2px; font-size:var(--font-size-small); line-height: 1.5;">
|
||
<div style="position:relative; display:flex; min-width:350px; max-width:700px; justify-content: flex-end;">
|
||
<svg width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" fill="none" style="stroke:var(--fg3)"> <rect x="5" y="11" width="14" height="10" rx="2" /> <circle cx="12" cy="16" r="1" /> <path d="M8 11v-4a4 4 0 0 1 8 0v4" /></svg>
|
||
${n.map(((i,l)=>G`
|
||
${i.securityTypes?G`
|
||
${l!==0?G`<div style="padding:3px 4px;"> OR </div>`:""}
|
||
<div class="tooltip">
|
||
<div style = "padding:2px 4px; white-space:nowrap; text-overflow:ellipsis;max-width:150px; overflow:hidden;">
|
||
${this.updateRoute==="true"&&this.allowAuthentication==="true"?G`<a part="anchor anchor-operation-security" href="#auth"> ${i.securityTypes} </a>`:G`${i.securityTypes}`}
|
||
</div>
|
||
<div class="tooltip-text" style="position:absolute; color: var(--fg); top:26px; right:0; border:1px solid var(--border-color);padding:2px 4px; display:block;">
|
||
${i.securityDefs.length>1?G`<div>Requires <b>all</b> of the following </div>`:""}
|
||
<div style="padding-left: 8px">
|
||
${i.securityDefs.map(((p,v)=>{const x=G`${p.scopes!==""?G`
|
||
<div>
|
||
<b>Required scopes:</b>
|
||
<br/>
|
||
<div style="margin-left:8px">
|
||
${p.scopes.split(",").map(((S,C)=>G`${C===0?"":"┃"}<span>${S}</span>`))}
|
||
</div>
|
||
</div>`:""}`;return G`
|
||
${p.type==="oauth2"?G`
|
||
<div>
|
||
${i.securityDefs.length>1?G`<b>${v+1}.</b> `:"Needs"}
|
||
OAuth Token <span style="font-family:var(--font-mono); color:var(--primary-color);">${p.securitySchemeId}</span> in <b>Authorization header</b>
|
||
${x}
|
||
</div>`:p.type==="http"?G`
|
||
<div>
|
||
${i.securityDefs.length>1?G`<b>${v+1}.</b> `:G`Requires`}
|
||
${p.scheme==="basic"?"Base 64 encoded username:password":"Bearer Token"} in <b>Authorization header</b>
|
||
${x}
|
||
</div>`:G`
|
||
<div>
|
||
${i.securityDefs.length>1?G`<b>${v+1}.</b> `:G`Requires`}
|
||
Token in <b>${p.name} ${p.in}</b>
|
||
${x}
|
||
</div>`}`}))}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`:""}
|
||
`))}
|
||
</div>
|
||
</div>
|
||
`):""}return""}function oM(t){return G`
|
||
<section class="table-title" style="margin-top:24px;">CODE SAMPLES</div>
|
||
<div part="tab-panel" class="tab-panel col"
|
||
@click="${n=>{if(!n.target.classList.contains("tab-btn"))return;const i=n.target.dataset.tab,l=[...n.currentTarget.querySelectorAll(".tab-btn")],p=[...n.currentTarget.querySelectorAll(".tab-content")];l.forEach((v=>v.classList[v.dataset.tab===i?"add":"remove"]("active"))),p.forEach((v=>{v.style.display=v.dataset.tab===i?"block":"none"}))}}">
|
||
<div part="tab-btn-row" class="tab-buttons row" style="width:100; overflow">
|
||
${t.map(((n,i)=>G`<button part="tab-btn" class="tab-btn ${i===0?"active":""}" data-tab = '${n.lang}${i}'> ${n.label||n.lang} </button>`))}
|
||
</div>
|
||
${t.map(((n,i)=>{var l,p,v;return G`
|
||
<div class="tab-content m-markdown" style= "display:${i===0?"block":"none"}" data-tab = '${n.lang}${i}'>
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${x=>{gl(n.source,x)}}'> Copy </button>
|
||
<pre><code class="language">${sr().languages[(l=n.lang)===null||l===void 0?void 0:l.toLowerCase()]?In(sr().highlight(n.source,sr().languages[(p=n.lang)===null||p===void 0?void 0:p.toLowerCase()],(v=n.lang)===null||v===void 0?void 0:v.toLowerCase())):n.source}</code></pre>
|
||
</div>`}))}
|
||
</div>
|
||
</section>`}function lM(t){return G`
|
||
<div class="req-res-title" style="margin-top:12px">CALLBACKS</div>
|
||
${Object.entries(t).map((n=>G`
|
||
<div class="tiny-title" style="padding: 12px; border:1px solid var(--light-border-color)">
|
||
${n[0]}
|
||
${Object.entries(n[1]).map((i=>G`
|
||
<div class="mono-font small-font-size" style="display:flex; margin-left:16px;">
|
||
<div style="width:100%">
|
||
${Object.entries(i[1]).map((l=>{var p,v,x;return G`
|
||
<div>
|
||
<div style="margin-top:12px;">
|
||
<div class="method method-fg ${l[0]}" style="width:70px; border:none; margin:0; padding:0; line-height:20px; vertical-align: baseline;text-align:left">
|
||
<span style="font-size:20px;"> ⥄ </span>
|
||
${l[0]}
|
||
</div>
|
||
<span style="line-height:20px; vertical-align: baseline;">${i[0]} </span>
|
||
</div>
|
||
<div class='expanded-req-resp-container'>
|
||
<api-request
|
||
class = "${this.renderStyle}-mode callback"
|
||
style = "width:100%;"
|
||
callback = "true"
|
||
method = "${l[0]||""}",
|
||
path = "${i[0]||""}"
|
||
.parameters = "${((p=l[1])===null||p===void 0?void 0:p.parameters)||""}"
|
||
.request_body = "${((v=l[1])===null||v===void 0?void 0:v.requestBody)||""}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "false"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":"true"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
<api-response
|
||
style = "width:100%;"
|
||
class = "${this.renderStyle}-mode"
|
||
callback = "true"
|
||
.responses="${(x=l[1])===null||x===void 0?void 0:x.responses}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style="${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":"true"}"
|
||
schema-hide-write-only = "false"
|
||
exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>
|
||
`}))}
|
||
</div>
|
||
</div>
|
||
`))}
|
||
</div>
|
||
`))}
|
||
`}const nY={},DE=ER(class extends jR{constructor(){super(...arguments),this.ot=nY}render(t,n){return n()}update(t,[n,i]){if(Array.isArray(n)){if(Array.isArray(this.ot)&&this.ot.length===n.length&&n.every(((l,p)=>l===this.ot[p])))return On}else if(this.ot===n)return On;return this.ot=Array.isArray(n)?Array.from(n):n,this.render(n,i)}}),rY={},RR=ER(class extends jR{constructor(t){if(super(t),t.type!==WP&&t.type!==JP&&t.type!==QP)throw Error("The `live` directive is not allowed on child or event bindings");if(!(n=>n.strings===void 0)(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[n]){if(n===On||n===mn)return n;const i=t.element,l=t.name;if(t.type===WP){if(n===i[l])return On}else if(t.type===QP){if(!!n===i.hasAttribute(l))return On}else if(t.type===JP&&i.getAttribute(l)===n+"")return On;return((p,v=rY)=>{p._$AH=v})(t),n}});var sY=g(657),iY=g.n(sY);const PE=M`
|
||
.border-top {
|
||
border-top:1px solid var(--border-color);
|
||
}
|
||
.border{
|
||
border:1px solid var(--border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
.light-border{
|
||
border:1px solid var(--light-border-color);
|
||
border-radius: var(--border-radius);
|
||
}
|
||
.pad-8-16{
|
||
padding: 8px 16px;
|
||
}
|
||
.pad-top-8 {
|
||
padding-top: 8px;
|
||
}
|
||
.mar-top-8 {
|
||
margin-top: 8px;
|
||
}
|
||
`;var aY=g(859),cM=g.n(aY);function mp(t){if(t===void 0)return"";if(t===null)return"null";if(t==="")return"∅";if(typeof t=="boolean"||typeof t=="number")return`${t}`;if(Array.isArray(t))return t.map((n=>n===null?"null":n===""?"∅":n.toString().replace(/^ +| +$/g,(i=>"●".repeat(i.length)))||"")).join(", ");if(typeof t=="object"){const n=Object.keys(t);return`{ ${n[0]}:${t[n[0]]}${n.length>1?",":""} ... }`}return t.toString().replace(/^ +| +$/g,(n=>"●".repeat(n.length)))||""}function Nd(t){if(!t)return;let n="",i="";if(t.$ref){const x=t.$ref.lastIndexOf("/");n=`{recursive: ${t.$ref.substring(x+1)}} `}else t.type?(n=Array.isArray(t.type)?t.type.join(t.length===2?" or ":"┃"):t.type,(t.format||t.enum||t.const)&&(n=n.replace("string",t.enum?"enum":t.const?"const":t.format)),t.nullable&&(n+="┃null")):n=t.const?"const":Object.keys(t).length===0?"any":"{missing-type-info}";const l={type:n,format:t.format||"",pattern:t.pattern&&!t.enum?t.pattern:"",readOrWriteOnly:t.readOnly?"🆁":t.writeOnly?"🆆":"",deprecated:t.deprecated?"❌":"",examples:t.examples||t.example,default:mp(t.default),description:t.description||"",constrain:"",allowedValues:"",arrayType:"",html:""};if(l.type==="{recursive}"?l.description=t.$ref.substring(t.$ref.lastIndexOf("/")+1):l.type!=="{missing-type-info}"&&l.type!=="any"||(l.description=l.description||""),l.allowedValues=t.const?t.const:Array.isArray(t.enum)?t.enum.map((x=>mp(x))).join("┃"):"",n==="array"&&t.items){var p,v;const x=(p=t.items)===null||p===void 0?void 0:p.type,S=mp(t.items.default);l.arrayType=`${t.type} of ${Array.isArray(x)?x.join(""):x}`,l.default=S,l.allowedValues=t.items.const?t.const:Array.isArray((v=t.items)===null||v===void 0?void 0:v.enum)?t.items.enum.map((C=>mp(C))).join("┃"):""}return n.match(/integer|number/g)&&(t.minimum===void 0&&t.exclusiveMinimum===void 0||(i+=t.minimum!==void 0?`Min ${t.minimum}`:`More than ${t.exclusiveMinimum}`),t.maximum===void 0&&t.exclusiveMaximum===void 0||(i+=t.maximum!==void 0?`${i?"┃":""}Max ${t.maximum}`:`${i?"┃":""}Less than ${t.exclusiveMaximum}`),t.multipleOf!==void 0&&(i+=`${i?"┃":""} multiple of ${t.multipleOf}`)),n.match(/string/g)&&(t.minLength!==void 0&&t.maxLength!==void 0?i+=`${i?"┃":""}${t.minLength} to ${t.maxLength} chars`:t.minLength!==void 0?i+=`${i?"┃":""}Min ${t.minLength} chars`:t.maxLength!==void 0&&(i+=`Max ${i?"┃":""}${t.maxLength} chars`)),l.constrain=i,l.html=`${l.type}~|~${l.readOrWriteOnly}~|~${l.constrain}~|~${l.default}~|~${l.allowedValues}~|~${l.pattern}~|~${l.description}~|~${t.title||""}~|~${l.deprecated?"deprecated":""}`,l}function da(t){if(typeof t=="object"&&!Array.isArray(t)){if(t.value!==void 0)return{Example:{...t}};const n=Object.entries(t).filter((([i,l])=>l.value!==void 0));return n.length===0?void 0:Object.fromEntries(n)}return Array.isArray(t)?t.reduce(((n,i,l)=>(n[`Example${l+1}`]={value:i},n)),{}):t?{Example:{value:t}}:void 0}function uM(t,n="string"){if(!t)return{exampleVal:"",exampleList:[]};if(t.constructor===Object){const p=Object.values(t).filter((v=>v["x-example-show-value"]!==!1)).map((v=>({value:typeof v.value=="boolean"||typeof v.value=="number"?`${v.value}`:v.value||"",printableValue:mp(v.value),summary:v.summary||"",description:v.description||""})));return{exampleVal:p.length>0?p[0].value:"",exampleList:p}}if(Array.isArray(t)||(t=t?[t]:[]),t.length===0)return{exampleVal:"",exampleList:[]};if(n==="array"){const[p]=t,v=t.map((x=>({value:x,printableValue:mp(x)})));return{exampleVal:p,exampleList:v}}const i=t[0].toString(),l=t.map((p=>({value:p.toString(),printableValue:mp(p)})));return{exampleVal:i,exampleList:l}}function ME(t){const n=t.examples?t.examples[0]:t.example===null?null:t.example||void 0;if(n==="")return"";if(n===null)return null;if(n===0)return 0;if(n===!1)return!1;if(n instanceof Date)switch(t.format.toLowerCase()){case"date":return n.toISOString().split("T")[0];case"time":return n.toISOString().split("T")[1];default:return n.toISOString()}if(n)return n;if(Object.keys(t).length===0)return null;if(t.$ref)return{};if(t.const===!1||t.const===0||t.const===null||t.const===""||t.const)return t.const;if(t.default)return t.default;const i=Array.isArray(t.type)?t.type[0]:t.type;if(!i)return null;if(i.match(/^integer|^number/g)){const l=Number.isNaN(Number(t.multipleOf))?void 0:Number(t.multipleOf),p=Number.isNaN(Number(t.maximum))?void 0:Number(t.maximum),v=Number.isNaN(Number(t.minimum))?Number.isNaN(Number(t.exclusiveMinimum))?p||0:Number(t.exclusiveMinimum)+(i.startsWith("integer")?1:.001):Number(t.minimum);return l?l>=v?l:v%l==0?v:Math.ceil(v/l)*l:v}if(i.match(/^boolean/g))return!1;if(i.match(/^null/g))return null;if(i.match(/^string/g)){if(t.enum)return t.enum[0];if(t.const)return t.const;if(t.pattern)try{return new(cM())(t.pattern).gen()}catch{return t.pattern}if(!t.format){const l=Number.isNaN(t.minLength)?void 0:Number(t.minLength),p=Number.isNaN(t.maxLength)?void 0:Number(t.maxLength),v=l||(p>6?6:p||void 0);return v?"A".repeat(v):"string"}{const l=`${Date.now().toString(16)}${Math.random().toString(16)}0`.repeat(16);switch(t.format.toLowerCase()){case"url":case"uri":return"http://example.com";case"date":return new Date(0).toISOString().split("T")[0];case"time":return new Date(0).toISOString().split("T")[1];case"date-time":return new Date(0).toISOString();case"duration":return"P3Y6M4DT12H30M5S";case"email":case"idn-email":return"user@example.com";case"hostname":case"idn-hostname":return"www.example.com";case"ipv4":return"198.51.100.42";case"ipv6":return"2001:0db8:5b96:0000:0000:426f:8e17:642a";case"uuid":return[l.substring(0,8),l.substring(8,12),`4000-8${l.substring(13,16)}`,l.substring(16,28)].join("-");case"byte":return"ZXhhbXBsZQ==";default:return""}}}return null}function TR(t,n=1){const i=" ".repeat(n);let l="";if(n===1&&typeof t!="object")return`
|
||
${i}${t.toString()}`;for(const p in t){const v=t[p]["::XML_TAG"]||p;let x="";x=Array.isArray(t[p])?v[0]["::XML_TAG"]||`${p}`:v,p.startsWith("::")||(l=Array.isArray(t[p])||typeof t[p]=="object"?`${l}
|
||
${i}<${x}>${TR(t[p],n+1)}
|
||
${i}</${x}>`:`${l}
|
||
${i}<${x}>${t[p].toString()}</${x}>`)}return l}function IE(t,n){var i,l;if(typeof n=="object"&&n!==null){var p,v;t.title&&(n["::TITLE"]=t.title),t.description&&(n["::DESCRIPTION"]=t.description),(i=t.xml)!==null&&i!==void 0&&i.name&&(n["::XML_TAG"]=(p=t.xml)===null||p===void 0?void 0:p.name),(l=t.xml)!==null&&l!==void 0&&l.wrapped&&(n["::XML_WRAP"]=(v=t.xml)===null||v===void 0?void 0:v.wrapped.toString())}}function dM(t){if(typeof t=="object"&&t!==null){delete t["::TITLE"],delete t["::DESCRIPTION"],delete t["::XML_TAG"],delete t["::XML_WRAP"];for(const n in t)dM(t[n])}}function hM(t,n,i){for(const l in n)n[l][i]=t}function gp(t,n,i){let l=0;const p={};for(const v in t){for(const x in i)if(p[`example-${l}`]={...t[v]},p[`example-${l}`][n]=i[x],l++,l>=10)break;if(l>=10)break}return p}function io(t,n={}){let i={};if(t){if(t.allOf){var l,p;const Y={};if(!(t.allOf.length!==1||(l=t.allOf[0])!==null&&l!==void 0&&l.properties||(p=t.allOf[0])!==null&&p!==void 0&&p.items))return t.allOf[0].$ref?"{ }":t.allOf[0].readOnly&&n.includeReadOnly?ME(t.allOf[0]):void 0;t.allOf.forEach((Z=>{if(Z.type==="object"||Z.properties||Z.allOf||Z.anyOf||Z.oneOf){const P=io(Z,n);Object.assign(Y,P)}else if(Z.type==="array"||Z.items){const P=[io(Z,n)];Object.assign(Y,P)}else{if(!Z.type)return"";{const P=`prop${Object.keys(Y).length}`;Y[P]=ME(Z)}}})),i=Y}else if(t.oneOf){const Y={};if(t.properties)for(const Z in t.properties){var v;t.properties[Z].properties||(v=t.properties[Z].properties)!==null&&v!==void 0&&v.items?Y[Z]=io(t.properties[Z],n):Y[Z]=ME(t.properties[Z])}if(t.oneOf.length>0){let Z=0;for(const P in t.oneOf){const re=io(t.oneOf[P],n);for(const le in re){let he;if(Object.keys(Y).length>0){if(re[le]===null||typeof re[le]!="object")continue;he=Object.assign(re[le],Y)}else he=re[le];i[`example-${Z}`]=he,IE(t.oneOf[P],i[`example-${Z}`]),Z++}}}}else if(t.anyOf){let Y;if(t.type==="object"||t.properties){Y={"example-0":{}};for(const P in t.properties){if(t.example){Y=t;break}t.properties[P].deprecated&&!n.includeDeprecated||t.properties[P].readOnly&&!n.includeReadOnly||t.properties[P].writeOnly&&!n.includeWriteOnly||(Y=gp(Y,P,io(t.properties[P],n)))}}let Z=0;for(const P in t.anyOf){const re=io(t.anyOf[P],n);for(const le in re){if(Y!==void 0)for(const he in Y)i[`example-${Z}`]={...Y[he],...re[le]};else i[`example-${Z}`]=re[le];IE(t.anyOf[P],i[`example-${Z}`]),Z++}}}else if(t.type==="object"||t.properties)if(i["example-0"]={},IE(t,i["example-0"]),t.example)i["example-0"]=t.example;else{for(const Y in t.properties){var x,S,C,N,D,$;if(((x=t.properties[Y])===null||x===void 0||!x.deprecated||n.includeDeprecated)&&((S=t.properties[Y])===null||S===void 0||!S.readOnly||n.includeReadOnly)&&((C=t.properties[Y])===null||C===void 0||!C.writeOnly||n.includeWriteOnly))if(((N=t.properties[Y])===null||N===void 0?void 0:N.type)==="array"||(D=t.properties[Y])!==null&&D!==void 0&&D.items)if(t.properties[Y].example)hM(t.properties[Y].example,i,Y);else if(($=t.properties[Y])!==null&&$!==void 0&&($=$.items)!==null&&$!==void 0&&$.example)hM([t.properties[Y].items.example],i,Y);else{const Z=io(t.properties[Y].items,n);if(n.useXmlTagForProp){var L,U;const P=((L=t.properties[Y].xml)===null||L===void 0?void 0:L.name)||Y;(U=t.properties[Y].xml)!==null&&U!==void 0&&U.wrapped?i=gp(i,P,JSON.parse(`{ "${P}" : { "${P}" : ${JSON.stringify(Z["example-0"])} } }`)):i=gp(i,P,Z)}else{const P=[];for(const re in Z)P[re]=[Z[re]];i=gp(i,Y,P)}}else i=gp(i,Y,io(t.properties[Y],n))}if(typeof t.additionalProperties=="object"){const Y=t.additionalProperties["x-additionalPropertiesName"]||"property";i=gp(i,`${Y}1`,io(t.additionalProperties,n)),i=gp(i,`${Y}2`,io(t.additionalProperties,n))}}else{if(t.type!=="array"&&!t.items)return{"example-0":ME(t)};var J;if(t.items||t.example)if(t.example)i["example-0"]=t.example;else if((J=t.items)!==null&&J!==void 0&&J.example)i["example-0"]=[t.items.example];else{const Y=io(t.items,n);let Z=0;for(const P in Y)i[`example-${Z}`]=[Y[P]],IE(t.items,i[`example-${Z}`]),Z++}else i["example-0"]=[]}return i}}function pM(t,n=0){var i;let l=(t.description||t.title)&&(t.minItems||t.maxItems)?'<span class="descr-expand-toggle">➔</span>':"";if(t.title?l=t.description?`${l} <b>${t.title}:</b> ${t.description}<br/>`:`${l} ${t.title}<br/>`:t.description&&(l=`${l} ${t.description}<br/>`),t.minItems&&(l=`${l} <b>Min Items:</b> ${t.minItems}`),t.maxItems&&(l=`${l} <b>Max Items:</b> ${t.maxItems}`),n>0&&(i=t.items)!==null&&i!==void 0&&i.description){let p="";t.items.minProperties&&(p=`<b>Min Properties:</b> ${t.items.minProperties}`),t.items.maxProperties&&(p=`${p} <b>Max Properties:</b> ${t.items.maxProperties}`),l=`${l} ⮕ ${p} [ ${t.items.description} ] `}return l}function ts(t,n,i=0,l=""){if(t){if(t.allOf){const S={};if(t.allOf.length===1&&!t.allOf[0].properties&&!t.allOf[0].items)return`${Nd(t.allOf[0]).html}`;t.allOf.map(((C,N)=>{if(C.type==="object"||C.properties||C.allOf||C.anyOf||C.oneOf){const D=(C.anyOf||C.oneOf)&&N>0?N:"",$=ts(C,{},i+1,D);Object.assign(S,$)}else if(C.type==="array"||C.items){const D=ts(C,{},i+1);Object.assign(S,D)}else{if(!C.type)return"";{const D=`prop${Object.keys(S).length}`,$=Nd(C);S[D]=`${$.html}`}}})),n=S}else if(t.anyOf||t.oneOf){if(n["::description"]=t.description||"",t.type==="object"||t.properties){n["::description"]=t.description||"",n["::type"]="object";for(const N in t.properties)t.required&&t.required.includes(N)?n[`${N}*`]=ts(t.properties[N],{},i+1):n[N]=ts(t.properties[N],{},i+1)}const S={},C=t.anyOf?"anyOf":"oneOf";t[C].forEach(((N,D)=>{if(N.type==="object"||N.properties||N.allOf||N.anyOf||N.oneOf){const $=ts(N,{});S[`::OPTION~${D+1}${N.title?`~${N.title}`:""}`]=$,S[`::OPTION~${D+1}${N.title?`~${N.title}`:""}`]["::readwrite"]="",S["::type"]="xxx-of-option"}else if(N.type==="array"||N.items){const $=ts(N,{});S[`::OPTION~${D+1}${N.title?`~${N.title}`:""}`]=$,S[`::OPTION~${D+1}${N.title?`~${N.title}`:""}`]["::readwrite"]="",S["::type"]="xxx-of-array"}else{const $=`::OPTION~${D+1}${N.title?`~${N.title}`:""}`;S[$]=`${Nd(N).html}`,S["::type"]="xxx-of-option"}})),n[t.anyOf?`::ANY~OF ${l}`:`::ONE~OF ${l}`]=S,n["::type"]="object"}else if(Array.isArray(t.type)){const S=JSON.parse(JSON.stringify(t)),C=[],N=[];let D;var p;if(S.type.forEach(($=>{var L,U;$.match(/integer|number|string|null|boolean/g)?C.push($):$==="array"&&typeof((L=S.items)===null||L===void 0?void 0:L.type)=="string"&&(U=S.items)!==null&&U!==void 0&&U.type.match(/integer|number|string|null|boolean/g)?S.items.type==="string"&&S.items.format?C.push(`[${S.items.format}]`):C.push(`[${S.items.type}]`):N.push($)})),C.length>0&&(S.type=C.join(C.length===2?" or ":"┃"),D=Nd(S),N.length===0))return`${((p=D)===null||p===void 0?void 0:p.html)||""}`;if(N.length>0){var v;n["::type"]="object";const $={"::type":"xxx-of-option"};N.forEach(((L,U)=>{if(L==="null")$[`::OPTION~${U+1}`]="NULL~|~~|~~|~~|~~|~~|~~|~~|~";else if("integer, number, string, boolean,".includes(`${L},`)){S.type=Array.isArray(L)?L.join("┃"):L;const J=Nd(S);$[`::OPTION~${U+1}`]=J.html}else if(L==="object"){const J={"::title":t.title||"","::description":t.description||"","::type":"object","::deprecated":t.deprecated||!1};for(const Y in t.properties)t.required&&t.required.includes(Y)?J[`${Y}*`]=ts(t.properties[Y],{},i+1):J[Y]=ts(t.properties[Y],{},i+1);$[`::OPTION~${U+1}`]=J}else L==="array"&&($[`::OPTION~${U+1}`]={"::title":t.title||"","::description":t.description||"","::type":"array","::props":ts(t.items,{},i+1)})})),$[`::OPTION~${N.length+1}`]=((v=D)===null||v===void 0?void 0:v.html)||"",n["::ONE~OF"]=$}}else if(t.type==="object"||t.properties){n["::title"]=t.title||"",n["::description"]=pM(t,i),n["::type"]="object",(Array.isArray(t.type)&&t.type.includes("null")||t.nullable)&&(n["::dataTypeLabel"]="object or null",n["::nullable"]=!0),n["::deprecated"]=t.deprecated||!1,n["::readwrite"]=t.readOnly?"readonly":t.writeOnly?"writeonly":"";for(const S in t.properties)t.required&&t.required.includes(S)?n[`${S}*`]=ts(t.properties[S],{},i+1):n[S]=ts(t.properties[S],{},i+1);for(const S in t.patternProperties)n[`[pattern: ${S}]`]=ts(t.patternProperties[S],n,i+1);t.additionalProperties&&(n["[any-key]"]=ts(t.additionalProperties,{}))}else{if(t.type!=="array"&&!t.items){const S=Nd(t);return S!=null&&S.html?`${S.html}`:""}var x;n["::title"]=t.title||"",n["::description"]=pM(t,i),n["::type"]="array",(Array.isArray(t.type)&&t.type.includes("null")||t.nullable)&&(n["::dataTypeLabel"]="array or null",n["::nullable"]=!0),n["::deprecated"]=t.deprecated||!1,n["::readwrite"]=t.readOnly?"readonly":t.writeOnly?"writeonly":"",(x=t.items)!==null&&x!==void 0&&x.items&&(n["::array-type"]=t.items.items.type),n["::props"]=ts(t.items,{},i+1)}return n}}function Km(t,n,i={},l={},p=!0,v=!0,x="json",S=!1){const C=[];if(i)for(const $ in i){let L="",U="json";if(n!=null&&n.toLowerCase().includes("json")){if(x==="text")L=typeof i[$].value=="string"?i[$].value:JSON.stringify(i[$].value,void 0,2),U="text";else if(L=i[$].value,typeof i[$].value=="string")try{const J=i[$].value;L=JSON.parse(J),U="json"}catch{U="text",L=i[$].value}}else L=i[$].value,U="text";C.push({exampleId:$,exampleSummary:i[$].summary||$,exampleDescription:i[$].description||"",exampleType:n,exampleValue:L,exampleFormat:U})}else if(l){let $="",L="json";if(n!=null&&n.toLowerCase().includes("json")){if(x==="text")$=typeof l=="string"?l:JSON.stringify(l,void 0,2),L="text";else if(typeof l=="object")$=l,L="json";else if(typeof l=="string")try{$=JSON.parse(l),L="json"}catch{L="text",$=l}}else $=l,L="text";C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:$,exampleFormat:L})}if(C.length===0||S===!0)if(t)if(t.example)C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:t.example,exampleFormat:n!=null&&n.toLowerCase().includes("json")&&typeof t.example=="object"?"json":"text"});else if(n!=null&&n.toLowerCase().includes("json")||n!=null&&n.toLowerCase().includes("text")||n!=null&&n.toLowerCase().includes("*/*")||n!=null&&n.toLowerCase().includes("xml")){let $="",L="",U="",J="";var N,D;n!=null&&n.toLowerCase().includes("xml")?($=(N=t.xml)!==null&&N!==void 0&&N.name?`<${t.xml.name} ${t.xml.namespace?`xmlns="${t.xml.namespace}"`:""}>`:"<root>",L=(D=t.xml)!==null&&D!==void 0&&D.name?`</${t.xml.name}>`:"</root>",U="text"):U=x;const Y=io(t,{includeReadOnly:p,includeWriteOnly:v,useXmlTagForProp:n?.toLowerCase().includes("xml")});let Z=0;for(const P in Y){if(!Y[P])continue;const re=Y[P]["::TITLE"]||"Example "+ ++Z,le=Y[P]["::DESCRIPTION"]||"";n!=null&&n.toLowerCase().includes("xml")?J=`<?xml version="1.0" encoding="UTF-8"?>
|
||
${$}${TR(Y[P],1)}
|
||
${L}`:(dM(Y[P]),J=x==="text"?JSON.stringify(Y[P],null,2):Y[P]),C.push({exampleId:P,exampleSummary:re,exampleDescription:le,exampleType:n,exampleFormat:U,exampleValue:J})}}else n!=null&&n.toLowerCase().includes("jose")?C.push({exampleId:"Example",exampleSummary:"Base64 Encoded",exampleDescription:"",exampleType:n,exampleValue:t.pattern||"bXJpbg==",exampleFormat:"text"}):C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});else C.push({exampleId:"Example",exampleSummary:"",exampleDescription:"",exampleType:n,exampleValue:"",exampleFormat:"text"});return C}function oY(t){return t==="application/json"?"json":t==="application/xml"?"xml":null}function lY(t){if(t.schema)return[t.schema,null,null];if(t.content){for(const n of Object.keys(t.content))if(t.content[n].schema)return[t.content[n].schema,oY(n),t.content[n]]}return[null,null,null]}cM().prototype.randInt=t=>t,customElements.define("json-tree",class extends Gt{static get properties(){return{data:{type:Object},renderStyle:{type:String,attribute:"render-style"}}}static get styles(){return[Ri,PE,ju,M`
|
||
:host{
|
||
display:flex;
|
||
}
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.json-tree {
|
||
position: relative;
|
||
font-family: var(--font-mono);
|
||
font-size: var(--font-size-small);
|
||
display:inline-block;
|
||
overflow:hidden;
|
||
word-break: break-all;
|
||
flex:1;
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
min-height: 40px;
|
||
direction: ltr;
|
||
text-align: left;
|
||
}
|
||
|
||
.open-bracket {
|
||
display:inline-block;
|
||
padding: 0 20px 0 0;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
}
|
||
.close-bracket {
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
display:inline-block;
|
||
}
|
||
.open-bracket:hover {
|
||
color:var(--primary-color);
|
||
background-color:var(--hover-color);
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
.open-bracket.expanded:hover ~ .inside-bracket {
|
||
border-left: 1px solid var(--fg3);
|
||
}
|
||
.open-bracket.expanded:hover ~ .close-bracket {
|
||
color:var(--primary-color);
|
||
}
|
||
.inside-bracket {
|
||
padding-left:12px;
|
||
overflow: hidden;
|
||
border-left:1px dotted var(--border-color);
|
||
}
|
||
.open-bracket.collapsed + .inside-bracket,
|
||
.open-bracket.collapsed + .inside-bracket + .close-bracket {
|
||
display:none;
|
||
}
|
||
|
||
.string{color:var(--green);}
|
||
.number{color:var(--blue);}
|
||
.null{color:var(--red);}
|
||
.boolean{color:var(--purple);}
|
||
.object{color:var(--fg)}
|
||
.toolbar {
|
||
position: absolute;
|
||
top:5px;
|
||
right:6px;
|
||
display:flex;
|
||
padding:2px;
|
||
align-items: center;
|
||
}`,vc]}render(){return G`
|
||
<div class = "json-tree" @click='${t=>{t.target.classList.contains("btn-copy")?gl(JSON.stringify(this.data,null,2),t):this.toggleExpand(t)}}'>
|
||
<div class='toolbar'>
|
||
<button class="toolbar-btn btn-copy" part="btn btn-fill btn-copy"> Copy </button>
|
||
</div>
|
||
${this.generateTree(this.data,!0)}
|
||
</div>
|
||
`}generateTree(t,n=!1){if(t===null)return G`<span class="null">null</span>${n?"":","}`;if(typeof t=="object"&&!(t instanceof Date)){const i=Array.isArray(t)?"array":"pure_object";return Object.keys(t).length===0?G`${Array.isArray(t)?"[ ],":"{ },"}`:G`
|
||
<div class="open-bracket expanded ${i==="array"?"array":"object"}" > ${i==="array"?"[":"{"}</div>
|
||
<div class="inside-bracket">
|
||
${Object.keys(t).map(((l,p,v)=>G`
|
||
<div class="item">
|
||
${i==="pure_object"?G`"${l}":`:""}
|
||
${this.generateTree(t[l],p===v.length-1)}
|
||
</div>`))}
|
||
</div>
|
||
<div class="close-bracket">${i==="array"?"]":"}"}${n?"":","}</div>
|
||
`}return typeof t=="string"||t instanceof Date?G`<span class="${typeof t}">"${t}"</span>${n?"":","}`:G`<span class="${typeof t}">${t}</span>${n?"":","}`}toggleExpand(t){const n=t.target;t.target.classList.contains("open-bracket")&&(n.classList.contains("expanded")?(n.classList.replace("expanded","collapsed"),t.target.innerHTML=t.target.classList.contains("array")?"[...]":"{...}"):(n.classList.replace("collapsed","expanded"),t.target.innerHTML=t.target.classList.contains("array")?"[":"{"))}});const fM=M`
|
||
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
|
||
.tr {
|
||
display: flex;
|
||
flex: none;
|
||
width: 100%;
|
||
box-sizing: content-box;
|
||
border-bottom: 1px dotted transparent;
|
||
transition: max-height 0.3s ease-out;
|
||
}
|
||
.td {
|
||
display: block;
|
||
flex: 0 0 auto;
|
||
}
|
||
.key {
|
||
font-family: var(--font-mono);
|
||
white-space: normal;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.collapsed-all-descr .key {
|
||
overflow:hidden;
|
||
}
|
||
.expanded-all-descr .key-descr .descr-expand-toggle {
|
||
display:none;
|
||
}
|
||
|
||
.key-descr .descr-expand-toggle {
|
||
display:inline-block;
|
||
user-select:none;
|
||
color: var(--fg);
|
||
cursor: pointer;
|
||
transform: rotate(45deg);
|
||
transition: transform .2s ease;
|
||
}
|
||
|
||
.expanded-descr .key-descr .descr-expand-toggle {
|
||
transform: rotate(270deg)
|
||
}
|
||
|
||
.key-descr .descr-expand-toggle:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.expanded-descr .more-content { display:none; }
|
||
|
||
.key-descr {
|
||
font-family:var(--font-regular);
|
||
color:var(--light-fg);
|
||
flex-shrink: 1;
|
||
text-overflow: ellipsis;
|
||
overflow: hidden;
|
||
display: none;
|
||
}
|
||
.expanded-descr .key-descr{
|
||
max-height:auto;
|
||
overflow:hidden;
|
||
display: none;
|
||
}
|
||
|
||
.xxx-of-key {
|
||
font-size: calc(var(--font-size-small) - 2px);
|
||
font-weight:bold;
|
||
background-color:var(--primary-color);
|
||
color:var(--primary-color-invert);
|
||
border-radius:2px;
|
||
line-height:calc(var(--font-size-small) + 6px);
|
||
padding:0px 5px;
|
||
margin-bottom:1px;
|
||
display:inline-block;
|
||
}
|
||
|
||
.xxx-of-descr {
|
||
font-family: var(--font-regular);
|
||
color: var(--primary-color);
|
||
font-size: calc(var(--font-size-small) - 1px);
|
||
margin-left: 2px;
|
||
}
|
||
|
||
.stri, .string, .uri, .url, .byte, .bina, .date, .pass, .ipv4, .ipv4, .uuid, .emai, .host { color:var(--green); }
|
||
.inte, .numb, .number, .int6, .int3, .floa, .doub, .deci .blue { color:var(--blue); }
|
||
.null { color:var(--red); }
|
||
.bool, .boolean { color:var(--orange) }
|
||
.enum { color:var(--purple) }
|
||
.cons { color:var(--purple) }
|
||
.recu { color:var(--brown) }
|
||
.toolbar {
|
||
display:flex;
|
||
width:100%;
|
||
padding: 2px 0;
|
||
color:var(--primary-color);
|
||
}
|
||
.toolbar-item {
|
||
cursor:pointer;
|
||
padding:5px 0;
|
||
margin:0 2px;
|
||
}
|
||
.schema-root-type {
|
||
cursor:auto;
|
||
color:var(--fg2);
|
||
font-weight: bold;
|
||
text-transform: uppercase;
|
||
}
|
||
.toolbar-item:first-of-type { margin:0 2px 0 0;}
|
||
|
||
@container (min-width: 500px) {
|
||
.key-descr {
|
||
display: block;
|
||
}
|
||
.expanded-descr .key-descr {
|
||
display: block;
|
||
}
|
||
}
|
||
`;customElements.define("schema-tree",class extends Gt{static get properties(){return{data:{type:Object},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[Ri,fM,PE,M`
|
||
.tree {
|
||
font-size:var(--font-size-small);
|
||
text-align: left;
|
||
direction: ltr;
|
||
line-height:calc(var(--font-size-small) + 6px);
|
||
}
|
||
.tree .tr:hover{
|
||
background-color:var(--hover-color);
|
||
}
|
||
.collapsed-all-descr .tr:not(.expanded-descr) {
|
||
overflow: hidden;
|
||
max-height:calc(var(--font-size-small) + 8px);
|
||
}
|
||
.tree .key {
|
||
max-width: 300px;
|
||
}
|
||
.tr.expanded:hover > .td.key > .open-bracket {
|
||
color: var(--primary-color);
|
||
}
|
||
.tr.expanded:hover + .inside-bracket {
|
||
border-left: 1px solid var(--fg3);
|
||
}
|
||
.tr.expanded:hover + .inside-bracket + .close-bracket {
|
||
color: var(--primary-color);
|
||
}
|
||
.inside-bracket.xxx-of-option {
|
||
border-left: 1px solid transparent;
|
||
}
|
||
.open-bracket{
|
||
display:inline-block;
|
||
padding: 0 20px 0 0;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius:3px;
|
||
}
|
||
.open-bracket:hover {
|
||
color:var(--primary-color);
|
||
background-color:var(--hover-color);
|
||
border: 1px solid var(--border-color);
|
||
}
|
||
.close-bracket{
|
||
display:inline-block;
|
||
font-family: var(--font-mono);
|
||
}
|
||
.tr.collapsed + .inside-bracket,
|
||
.tr.collapsed + .inside-bracket + .close-bracket{
|
||
overflow: hidden;
|
||
display:none;
|
||
}
|
||
.inside-bracket.object,
|
||
.inside-bracket.array {
|
||
border-left: 1px dotted var(--border-color);
|
||
}`,vc]}render(){var t,n,i;return G`
|
||
<div class="tree ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${l=>this.handleAllEvents(l)}">
|
||
<div class="toolbar">
|
||
<div class="toolbar-item schema-root-type ${((t=this.data)===null||t===void 0?void 0:t["::type"])||""} "> ${((n=this.data)===null||n===void 0?void 0:n["::type"])||""} </div>
|
||
${this.allowSchemaDescriptionExpandToggle==="true"?G`
|
||
<div style="flex:1"></div>
|
||
<div part="schema-toolbar-item schema-multiline-toggle" class='toolbar-item schema-multiline-toggle'>
|
||
${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}
|
||
</div>`:""}
|
||
</div>
|
||
<span part="schema-description" class='m-markdown'> ${In(yt(((i=this.data)===null||i===void 0?void 0:i["::description"])||""))}</span>
|
||
${this.data?G`
|
||
${this.generateTree(this.data["::type"]==="array"?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"]||"")}`:G`<span class='mono-font' style='color:var(--red)'> Schema not found </span>`}
|
||
</div>
|
||
`}generateTree(t,n="object",i="",l="",p="",v=0,x=0,S="",C=!1){var N;if(this.schemaHideReadOnly==="true"&&(n==="array"&&S==="readonly"||t?.["::readwrite"]==="readonly")||this.schemaHideWriteOnly==="true"&&(n==="array"&&S==="writeonly"||t?.["::readwrite"]==="writeonly"))return;if(!t)return G`<div class="null" style="display:inline;">
|
||
<span class="key-label xxx-of-key"> ${l.replace("::OPTION~","")}</span>
|
||
${n==="array"?G`<span class='mono-font'> [ ] </span>`:n==="object"?G`<span class='mono-font'> { } </span>`:G`<span class='mono-font'> schema undefined </span>`}
|
||
</div>`;if(Object.keys(t).length===0)return G`<span class="key object">${l}:{ }</span>`;let D="",$="";l.startsWith("::ONE~OF")||l.startsWith("::ANY~OF")?D=l.replace("::","").replace("~"," "):l.startsWith("::OPTION")?[,D,$]=l.split("~"):D=l;const L=400-12*x;let U="",J="";const Y=(N=t["::type"])!==null&&N!==void 0&&N.startsWith("xxx-of")?v:v+1,Z=n==="xxx-of-option"||t["::type"]==="xxx-of-option"||l.startsWith("::OPTION")?x:x+1;if(t["::type"]==="object")n==="array"?(U=v<this.schemaExpandLevel?G`<span class="open-bracket array-of-object" >[{</span>`:G`<span class="open-bracket array-of-object">[{...}]</span>`,J="}]"):(U=v<this.schemaExpandLevel?G`<span class="open-bracket object">${t["::nullable"]?"null┃":""}{</span>`:G`<span class="open-bracket object">${t["::nullable"]?"null┃":""}{...}</span>`,J="}");else if(t["::type"]==="array")if(n==="array"){const ut=i!=="object"?i:"";U=v<this.schemaExpandLevel?G`<span class="open-bracket array-of-array" data-array-type="${ut}">[[ ${ut} </span>`:G`<span class="open-bracket array-of-array" data-array-type="${ut}">[[...]]</span>`,J="]]"}else U=v<this.schemaExpandLevel?G`<span class="open-bracket array">[</span>`:G`<span class="open-bracket array">[...]</span>`,J="]";var P;if(typeof t=="object")return G`
|
||
<div class="tr ${v<this.schemaExpandLevel||(P=t["::type"])!==null&&P!==void 0&&P.startsWith("xxx-of")?"expanded":"collapsed"} ${t["::type"]||"no-type-info"}${t["::nullable"]?" nullable":""}" title="${C||t["::deprecated"]?"Deprecated":""}">
|
||
<div class="td key ${C||t["::deprecated"]?"deprecated":""}" style='min-width:${L}px'>
|
||
${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"||l.startsWith("::OPTION")?G`<span class='key-label xxx-of-key'> ${D}</span><span class="xxx-of-descr">${$}</span>`:D==="::props"||D==="::ARRAY~OF"?"":v>0?G`<span class="key-label" title="${S==="readonly"?"Read-Only":S==="writeonly"?"Write-Only":""}">
|
||
${C||t["::deprecated"]?G`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${D.replace(/\*$/,"")}${D.endsWith("*")?G`<span style="color:var(--red)">*</span>`:""}${S==="readonly"?G` 🆁`:S==="writeonly"?G` 🆆`:S}:
|
||
</span>`:""}
|
||
${U}
|
||
</div>
|
||
<div class='td key-descr m-markdown-small'>${In(yt(p||""))}</div>
|
||
</div>
|
||
<div class='inside-bracket ${t["::type"]||"no-type-info"}' style='padding-left:${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"?0:12}px;'>
|
||
${Array.isArray(t)&&t[0]?G`${this.generateTree(t[0],"xxx-of-option","","::ARRAY~OF","",Y,Z,t[0]["::readwrite"],C||t[0]["::deprecated"])}`:G`
|
||
${Object.keys(t).map((ut=>{var Kt;return G`
|
||
${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(ut)?t[ut]["::type"]==="array"||t[ut]["::type"]==="object"?G`${this.generateTree(t[ut]["::type"]==="array"?t[ut]["::props"]:t[ut],t[ut]["::type"],t[ut]["::array-type"]||"",ut,t[ut]["::description"],Y,Z,t[ut]["::readwrite"]?t[ut]["::readwrite"]:"",C||t[ut]["::deprecated"])}`:"":G`${this.generateTree(t[ut]["::type"]==="array"?t[ut]["::props"]:t[ut],t[ut]["::type"],t[ut]["::array-type"]||"",ut,((Kt=t[ut])===null||Kt===void 0?void 0:Kt["::description"])||"",Y,Z,t[ut]["::readwrite"]?t[ut]["::readwrite"]:"",C||t[ut]["::deprecated"])}`}
|
||
`}))}
|
||
`}
|
||
</div>
|
||
${t["::type"]&&t["::type"].includes("xxx-of")?"":G`<div class='close-bracket'> ${J} </div>`}
|
||
`;const[re,le,he,xe,pe,_e,ke,Be,Ee]=t.split("~|~");if(le==="🆁"&&this.schemaHideReadOnly==="true"||le==="🆆"&&this.schemaHideWriteOnly==="true")return;const ye=re.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),ze=he||xe||pe||_e?`<span class="descr-expand-toggle ${this.schemaDescriptionExpanded==="true"?"expanded-descr":""}">➔</span>`:"";let Le="",tt="";return n==="array"?S==="readonly"?(Le="🆁",tt="Read-Only"):S==="writeonly"&&(Le="🆆",tt="Write-Only"):le==="🆁"?(Le="🆁",tt="Read-Only"):le==="🆆"&&(Le="🆆",tt="Write-Only"),G`
|
||
<div class = "tr primitive" title="${Ee?"Deprecated":""}">
|
||
<div class="td key ${C||Ee}" style='min-width:${L}px'>
|
||
${C||Ee?G`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${D.endsWith("*")?G`<span class="key-label">${D.substring(0,D.length-1)}</span><span style='color:var(--red);'>*</span>:`:l.startsWith("::OPTION")?G`<span class='key-label xxx-of-key'>${D}</span><span class="xxx-of-descr">${$}</span>`:G`<span class="key-label">${D}:</span>`}
|
||
<span class="${ye}" title="${tt}">
|
||
${n==="array"?`[${re}]`:`${re}`}
|
||
${Le}
|
||
</span>
|
||
</div>
|
||
<div class='td key-descr'>
|
||
${p||Be||ke?G`${G`<span class="m-markdown-small">
|
||
${In(yt(n==="array"?`${ze} ${p}`:Be?`${ze} <b>${Be}:</b> ${ke}`:`${ze} ${ke}`))}
|
||
</span>`}`:""}
|
||
${he?G`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Constraints: </span>${he}</div>`:""}
|
||
${xe?G`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>Default: </span>${xe}</div>`:""}
|
||
${pe?G`<div style='display:inline-block; line-break:anywhere; margin-right:8px'><span class='bold-text'>${re==="const"?"Value":"Allowed"}: </span>${pe}</div>`:""}
|
||
${_e?G`<div style='display:inline-block; line-break: anywhere; margin-right:8px'><span class='bold-text'>Pattern: </span>${_e}</div>`:""}
|
||
</div>
|
||
</div>
|
||
`}handleAllEvents(t){if(t.target.classList.contains("open-bracket"))this.toggleObjectExpand(t);else if(t.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(t.target.classList.contains("descr-expand-toggle")){const n=t.target.closest(".tr");n&&(n.classList.toggle("expanded-descr"),n.style.maxHeight=n.scrollHeight)}}toggleObjectExpand(t){const n=t.target.closest(".tr"),i=n.classList.contains("nullable");n.classList.contains("expanded")?(n.classList.replace("expanded","collapsed"),t.target.innerHTML=t.target.classList.contains("array-of-object")?"[{...}]":t.target.classList.contains("array-of-array")?"[[...]]":t.target.classList.contains("array")?"[...]":(i?"null┃":"")+"{...}"):(n.classList.replace("collapsed","expanded"),t.target.innerHTML=t.target.classList.contains("array-of-object")?"[{":t.target.classList.contains("array-of-array")?`[[ ${t.target.dataset.arrayType}`:t.target.classList.contains("object")?(i?"null┃":"")+"{":"[")}}),customElements.define("tag-input",class extends Gt{render(){let t="";return Array.isArray(this.value)&&(t=G`${this.value.filter((n=>typeof n=="string"&&n.trim()!=="")).map((n=>G`<span class='tag'>${n}</span>`))}`),G`
|
||
<div class='tags'>
|
||
${t}
|
||
<input type="text" class='editor' @paste="${n=>this.afterPaste(n)}" @keydown="${this.afterKeyDown}" @blur="${this.onBlur}" placeholder="${this.placeholder||""}">
|
||
</div>
|
||
`}static get properties(){return{placeholder:{type:String},value:{type:Array,attribute:"value"}}}attributeChangedCallback(t,n,i){t==="value"&&i&&n!==i&&(this.value=i.split(",").filter((l=>l.trim()!==""))),super.attributeChangedCallback(t,n,i)}afterPaste(t){const n=(t.clipboardData||window.clipboardData).getData("Text"),i=n?n.split(",").filter((l=>l.trim()!=="")):"";i&&(Array.isArray(this.value)?this.value=[...this.value,...i]:this.value=i),t.preventDefault()}afterKeyDown(t){t.keyCode===13?(t.stopPropagation(),t.preventDefault(),t.target.value&&(Array.isArray(this.value)?this.value=[...this.value,t.target.value]:this.value=[t.target.value],t.target.value="")):t.keyCode===8&&t.target.value.length===0&&Array.isArray(this.value)&&this.value.length>0&&(this.value.splice(-1),this.value=[...this.value])}onBlur(t){t.target.value&&(Array.isArray(this.value)?this.value=[...this.value,t.target.value]:this.value=[t.target.value],t.target.value="")}static get styles(){return[M`
|
||
.tags {
|
||
display:flex;
|
||
flex-wrap: wrap;
|
||
outline: none;
|
||
padding:0;
|
||
border-radius:var(--border-radius);
|
||
border:1px solid var(--border-color);
|
||
cursor:text;
|
||
overflow:hidden;
|
||
background:var(--input-bg);
|
||
}
|
||
.tag, .editor {
|
||
padding:3px;
|
||
margin:2px;
|
||
}
|
||
.tag{
|
||
border:1px solid var(--border-color);
|
||
background-color:var(--bg3);
|
||
color:var(--fg3);
|
||
border-radius:var(--border-radius);
|
||
word-break: break-all;
|
||
font-size: var(--font-size-small);
|
||
}
|
||
.tag:hover ~ #cursor {
|
||
display: block;
|
||
}
|
||
.editor {
|
||
flex:1;
|
||
border:1px solid transparent;
|
||
color:var(--fg);
|
||
min-width:60px;
|
||
outline: none;
|
||
line-height: inherit;
|
||
font-family:inherit;
|
||
background:transparent;
|
||
font-size: calc(var(--font-size-small) + 1px);
|
||
}
|
||
.editor:focus-visible {
|
||
outline: 1px solid;
|
||
}
|
||
.editor::placeholder {
|
||
color: var(--placeholder-color);
|
||
opacity:1;
|
||
}
|
||
`]}}),customElements.define("api-request",class extends Gt{constructor(){super(),this.responseMessage="",this.responseStatus="success",this.responseHeaders="",this.responseText="",this.responseUrl="",this.curlSyntax="",this.activeResponseTab="response",this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.activeParameterSchemaTabs={}}static get properties(){return{serverUrl:{type:String,attribute:"server-url"},servers:{type:Array},method:{type:String},path:{type:String},security:{type:Array},parameters:{type:Array},request_body:{type:Object},api_keys:{type:Array},parser:{type:Object},accept:{type:String},callback:{type:String},webhook:{type:String},responseMessage:{type:String,attribute:!1},responseText:{type:String,attribute:!1},responseHeaders:{type:String,attribute:!1},responseStatus:{type:String,attribute:!1},responseUrl:{type:String,attribute:!1},curlSyntax:{type:String,attribute:!1},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},renderStyle:{type:String,attribute:"render-style"},schemaStyle:{type:String,attribute:"schema-style"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},activeParameterSchemaTabs:{type:Object,converter:{fromAttribute:t=>JSON.parse(t),toAttribute:t=>JSON.stringify(t)},attribute:"active-parameter-schema-tabs"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},fetchCredentials:{type:String,attribute:"fetch-credentials"},activeResponseTab:{type:String},selectedRequestBodyType:{type:String,attribute:"selected-request-body-type"},selectedRequestBodyExample:{type:String,attribute:"selected-request-body-example"}}}static get styles(){return[Au,ju,Ri,Cu,PE,ml,yc,M`
|
||
:host {
|
||
container-type: inline-size;
|
||
}
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
tag-input:focus-within { outline: 1px solid;}
|
||
.read-mode {
|
||
margin-top: 24px;
|
||
}
|
||
.param-name,
|
||
.param-type {
|
||
margin: 1px 0;
|
||
text-align: right;
|
||
line-height: var(--font-size-small);
|
||
}
|
||
.param-name {
|
||
color: var(--fg);
|
||
font-family: var(--font-mono);
|
||
}
|
||
.param-name.deprecated {
|
||
color: var(--red);
|
||
}
|
||
.param-type{
|
||
color: var(--light-fg);
|
||
font-family: var(--font-regular);
|
||
}
|
||
.param-constraint{
|
||
min-width:100px;
|
||
}
|
||
.param-constraint:empty{
|
||
display:none;
|
||
}
|
||
.top-gap{margin-top:24px;}
|
||
|
||
.textarea {
|
||
min-height:220px;
|
||
padding:5px;
|
||
resize:vertical;
|
||
direction: ltr;
|
||
}
|
||
.example:first-child {
|
||
margin-top: -9px;
|
||
}
|
||
|
||
.response-message{
|
||
font-weight:bold;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.response-message.error {
|
||
color:var(--red);
|
||
}
|
||
.response-message.success {
|
||
color:var(--blue);
|
||
}
|
||
|
||
.file-input-container {
|
||
align-items:flex-end;
|
||
}
|
||
.file-input-container .input-set:first-child .file-input-remove-btn{
|
||
visibility:hidden;
|
||
}
|
||
|
||
.file-input-remove-btn{
|
||
font-size:16px;
|
||
color:var(--red);
|
||
outline: none;
|
||
border: none;
|
||
background:none;
|
||
cursor:pointer;
|
||
}
|
||
|
||
.v-tab-btn {
|
||
font-size: var(--smal-font-size);
|
||
height:24px;
|
||
border:none;
|
||
background:none;
|
||
opacity: 0.3;
|
||
cursor: pointer;
|
||
padding: 4px 8px;
|
||
}
|
||
.v-tab-btn.active {
|
||
font-weight: bold;
|
||
background: var(--bg);
|
||
opacity: 1;
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.textarea {
|
||
padding:8px;
|
||
}
|
||
}
|
||
|
||
@container (max-width: 470px) {
|
||
.hide-in-small-screen {
|
||
display:none;
|
||
}
|
||
}
|
||
`,vc]}render(){return G`
|
||
<div class="col regular-font request-panel ${"read focused".includes(this.renderStyle)||this.callback==="true"?"read-mode":"view-mode"}">
|
||
<div class=" ${this.callback==="true"?"tiny-title":"req-res-title"} ">
|
||
${this.callback==="true"?"CALLBACK REQUEST":"REQUEST"}
|
||
</div>
|
||
<div>
|
||
${DE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("path")))}
|
||
${DE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("query")))}
|
||
${this.requestBodyTemplate()}
|
||
${DE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("header")))}
|
||
${DE([this.method,this.path,this.allowTry,this.parameters,this.activeParameterSchemaTabs],(()=>this.inputParametersTemplate("cookie")))}
|
||
${this.allowTry==="false"?"":G`${this.apiCallTemplate()}`}
|
||
</div>
|
||
</div>
|
||
`}async updated(){this.showCurlBeforeTry==="true"&&this.applyCURLSyntax(this.shadowRoot),this.webhook==="true"&&(this.allowTry="false")}async saveExampleState(){this.renderStyle==="focused"&&([...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((t=>{t.dataset.user_example=t.value})),[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((t=>{t.dataset.user_example=t.value})),this.requestUpdate())}async updateExamplesFromDataAttr(){this.renderStyle==="focused"&&([...this.shadowRoot.querySelectorAll("textarea.request-body-param-user-input")].forEach((t=>{t.value=t.dataset.user_example||t.dataset.example})),[...this.shadowRoot.querySelectorAll('textarea[data-ptype="form-data"]')].forEach((t=>{t.value=t.dataset.user_example||t.dataset.example})),this.requestUpdate())}renderExample(t,n,i){var l,p;return G`
|
||
${n==="array"?"[":""}
|
||
<a
|
||
part="anchor anchor-param-example"
|
||
style="display:inline-block; min-width:24px; text-align:center"
|
||
class="${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-example-type="${n==="array"?n:"string"}"
|
||
data-example="${t.value&&Array.isArray(t.value)?(l=t.value)===null||l===void 0?void 0:l.join("~|~"):(typeof t.value=="object"?JSON.stringify(t.value,null,2):t.value)||""}"
|
||
title="${t.value&&Array.isArray(t.value)?(p=t.value)===null||p===void 0?void 0:p.join("~|~"):(typeof t.value=="object"?JSON.stringify(t.value,null,2):t.value)||""}"
|
||
@click="${v=>{const x=v.target.closest("table").querySelector(`[data-pname="${i}"]`);x&&(x.value=v.target.dataset.exampleType==="array"?v.target.dataset.example.split("~|~"):v.target.dataset.example)}}"
|
||
> ${t.printableValue||t.value} </a>
|
||
${n==="array"?"] ":""}
|
||
`}renderShortFormatExamples(t,n,i){return G`${t.map(((l,p)=>G`
|
||
${p===0?"":"┃"}
|
||
${this.renderExample(l,n,i)}`))}`}renderLongFormatExamples(t,n,i){return G` <ul style="list-style-type: disclosure-closed;">
|
||
${t.map((l=>{var p,v;return G`
|
||
<li>
|
||
${this.renderExample(l,n,i)}
|
||
${((p=l.summary)===null||p===void 0?void 0:p.length)>0?G`<span>(${l.summary})</span>`:""}
|
||
${((v=l.description)===null||v===void 0?void 0:v.length)>0?G`<p>${In(yt(l.description))}</p>`:""}
|
||
</li>
|
||
`}))}
|
||
</ul>`}exampleListTemplate(t,n,i=[]){return G` ${i.length>0?G`<span style="font-weight:bold">Examples: </span>
|
||
${l=i,l.some((p=>{var v,x;return((v=p.summary)===null||v===void 0?void 0:v.length)>0||((x=p.description)===null||x===void 0?void 0:x.length)>0}))?this.renderLongFormatExamples(i,n,t):this.renderShortFormatExamples(i,n,t)}`:""}`;var l}inputParametersTemplate(t){const n=this.parameters?this.parameters.filter((p=>p.in===t)):[];if(n.length===0)return"";let i="";t==="path"?i="PATH PARAMETERS":t==="query"?i="QUERY-STRING PARAMETERS":t==="header"?i="REQUEST HEADERS":t==="cookie"&&(i="COOKIES");const l=[];for(const p of n){const[v,x,S]=lY(p);if(!v)continue;const C=Nd(v);if(!C)continue;const N=ts(v,{});let D="form",$=!0,L=!1;t!=="query"&&t!=="header"&&t!=="path"||(p.style&&"form spaceDelimited pipeDelimited".includes(p.style)?D=p.style:x&&(D=x),typeof p.explode=="boolean"&&($=p.explode),typeof p.allowReserved=="boolean"&&(L=p.allowReserved));const U=uM(da(p.examples)||da(p.example)||da(S?.example)||da(S?.examples)||da(C.examples)||da(C.example),C.type);U.exampleVal||C.type!=="object"||(U.exampleVal=Km(v,x||"json",{},{},this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true",!0,"text")[0].exampleValue);const J="read focused".includes(this.renderStyle)?"200px":"160px";l.push(G`
|
||
<tr title="${p.deprecated?"Deprecated":""}">
|
||
<td rowspan="${this.allowTry==="true"?"1":"2"}" style="width:${J}; min-width:100px;">
|
||
<div class="param-name ${p.deprecated?"deprecated":""}" >
|
||
${p.deprecated?G`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${p.required?G`<span style='color:var(--red)'>*</span>`:""}
|
||
${p.name}
|
||
</div>
|
||
<div class="param-type">
|
||
${C.type==="array"?`${C.arrayType}`:`${C.format?C.format:C.type}`}
|
||
</div>
|
||
</td>
|
||
${this.allowTry==="true"?G`
|
||
<td style="min-width:100px;" colspan="${C.default||C.constrain||C.allowedValues||C.pattern?"1":"2"}">
|
||
${C.type==="array"?G`
|
||
<tag-input class="request-param"
|
||
id = "tag-input-request-param-${p.name}"
|
||
style = "width:100%"
|
||
data-ptype = "${t}"
|
||
data-pname = "${p.name}"
|
||
data-example = "${Array.isArray(U.exampleVal)?U.exampleVal.join("~|~"):U.exampleVal}"
|
||
data-param-serialize-style = "${D}"
|
||
data-param-serialize-explode = "${$}"
|
||
data-param-allow-reserved = "${L}"
|
||
data-x-fill-example = "${p["x-fill-example"]||"yes"}"
|
||
data-array = "true"
|
||
placeholder = "add-multiple ↩"
|
||
.value="${p["x-fill-example"]==="no"?[]:RR(this.fillRequestFieldsWithExample==="true"?Array.isArray(U.exampleVal)?U.exampleVal:[U.exampleVal]:[])}"
|
||
>
|
||
</tag-input>`:C.type==="object"?G`
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${Y=>{if(Y.target.tagName.toLowerCase()==="button"){const Z={...this.activeParameterSchemaTabs};Z[p.name]=Y.target.dataset.tab,this.activeParameterSchemaTabs=Z}}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[p.name]==="example"?"active":""}" data-tab = 'example'>EXAMPLE </button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeParameterSchemaTabs[p.name]!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
|
||
${G`<div part="tab-content" class="tab-content col" data-tab = 'example' style="display:${this.activeParameterSchemaTabs[p.name]==="example"?"block":"none"}; padding-left:5px; width:100%">
|
||
<textarea
|
||
id = "textarea-request-param-${p.name}"
|
||
class = "textarea request-param"
|
||
part = "textarea textarea-param"
|
||
data-ptype = "${t}-object"
|
||
data-pname = "${p.name}"
|
||
data-example = "${U.exampleVal}"
|
||
data-param-serialize-style = "${D}"
|
||
data-param-serialize-explode = "${$}"
|
||
data-param-allow-reserved = "${L}"
|
||
data-x-fill-example = "${p["x-fill-example"]||"yes"}"
|
||
spellcheck = "false"
|
||
.textContent="${p["x-fill-example"]==="no"?"":RR(this.fillRequestFieldsWithExample==="true"?typeof U.exampleVal=="object"?JSON.stringify(U.exampleVal,null,2):U.exampleVal:"")}"
|
||
style = "resize:vertical; width:100%; height: ${"read focused".includes(this.renderStyle)?"180px":"120px"};"
|
||
@input=${Y=>{const Z=this.getRequestPanel(Y);this.liveCURLSyntaxUpdate(Z)}}
|
||
></textarea>
|
||
</div>`}
|
||
${G`<div part="tab-content" class="tab-content col" data-tab = 'schema' style="display:${this.activeParameterSchemaTabs[p.name]!=="example"?"block":"none"}; padding-left:5px; width:100%;">
|
||
<schema-tree
|
||
class = 'json'
|
||
style = 'display: block'
|
||
.data = '${N}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly.includes(this.method)}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly.includes(this.method)}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example"
|
||
> </schema-tree>
|
||
</div>`}
|
||
</div>`:G`
|
||
<input type="${C.format==="password"?"password":"text"}" spellcheck="false" style="width:100%"
|
||
id="input-request-param-${p.name}"
|
||
class="request-param"
|
||
part="textbox textbox-param"
|
||
data-ptype="${t}"
|
||
data-pname="${p.name}"
|
||
data-example="${Array.isArray(U.exampleVal)?U.exampleVal.join("~|~"):U.exampleVal}"
|
||
data-param-allow-reserved = "${L}"
|
||
data-x-fill-example = "${p["x-fill-example"]||"yes"}"
|
||
data-array="false"
|
||
.value="${p["x-fill-example"]==="no"?"":RR(this.fillRequestFieldsWithExample==="true"?U.exampleVal:"")}"
|
||
@input=${Y=>{const Z=this.getRequestPanel(Y);this.liveCURLSyntaxUpdate(Z)}}
|
||
/>`}
|
||
</td>`:""}
|
||
${C.default||C.constrain||C.allowedValues||C.pattern?G`
|
||
<td colspan="${this.allowTry==="true"?"1":"2"}">
|
||
<div class="param-constraint">
|
||
${C.default?G`<span style="font-weight:bold">Default: </span>${C.default}<br/>`:""}
|
||
${C.pattern?G`<span style="font-weight:bold">Pattern: </span>${C.pattern}<br/>`:""}
|
||
${C.constrain?G`${C.constrain}<br/>`:""}
|
||
${C.allowedValues&&C.allowedValues.split("┃").map(((Y,Z)=>G`
|
||
${Z>0?"┃":G`<span style="font-weight:bold">Allowed: </span>`}
|
||
${G`
|
||
<a part="anchor anchor-param-constraint" class = "${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-type="${C.type==="array"?C.type:"string"}"
|
||
data-enum="${Y.trim()}"
|
||
@click="${P=>{const re=P.target.closest("table").querySelector(`[data-pname="${p.name}"]`);re&&(P.target.dataset.type==="array"?re.value=[P.target.dataset.enum]:re.value=P.target.dataset.enum)}}"
|
||
>${Y}</a>`}`))}
|
||
</div>
|
||
</td>`:G`<td></td>`}
|
||
</tr>
|
||
<tr>
|
||
${this.allowTry==="true"?G`<td style="border:none"> </td>`:""}
|
||
<td colspan="2" style="border:none">
|
||
<span class="m-markdown-small">${In(yt(p.description||""))}</span>
|
||
${this.exampleListTemplate.call(this,p.name,C.type,U.exampleList)}
|
||
</td>
|
||
</tr>
|
||
`)}return G`
|
||
<div class="table-title top-gap">${i}</div>
|
||
<div style="display:block; overflow-x:auto; max-width:100%;">
|
||
<table role="presentation" class="m-table" style="width:100%; word-break:break-word;">
|
||
${l}
|
||
</table>
|
||
</div>`}async beforeNavigationFocusedMode(){}async afterNavigationFocusedMode(){this.selectedRequestBodyType="",this.selectedRequestBodyExample="",this.updateExamplesFromDataAttr(),this.clearResponseData()}onSelectExample(t){this.selectedRequestBodyExample=t.target.value;const n=t.target;window.setTimeout((i=>{const l=i.closest(".example-panel").querySelector(".request-body-param");i.closest(".example-panel").querySelector(".request-body-param-user-input").value=l.innerText;const p=this.getRequestPanel({target:i});this.liveCURLSyntaxUpdate(p)}),0,n)}onMimeTypeChange(t){this.selectedRequestBodyType=t.target.value;const n=t.target;this.selectedRequestBodyExample="",window.setTimeout((i=>{const l=i.closest(".request-body-container").querySelector(".request-body-param");l&&(i.closest(".request-body-container").querySelector(".request-body-param-user-input").value=l.innerText)}),0,n)}requestBodyTemplate(){if(!this.request_body||Object.keys(this.request_body).length===0)return"";let t="",n="",i="",l="",p="";const v=[],{content:x}=this.request_body;for(const S in x)v.push({mimeType:S,schema:x[S].schema,example:x[S].example,examples:x[S].examples}),this.selectedRequestBodyType||(this.selectedRequestBodyType=S);return t=v.length===1?"":G`
|
||
<select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change = '${S=>this.onMimeTypeChange(S)}'>
|
||
${v.map((S=>G`
|
||
<option value = '${S.mimeType}' ?selected = '${S.mimeType===this.selectedRequestBodyType}'>
|
||
${S.mimeType}
|
||
</option> `))}
|
||
</select>
|
||
`,v.forEach((S=>{let C,N=[];if(this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose"))S.mimeType===this.selectedRequestBodyType&&(N=Km(S.schema,S.mimeType,da(S.examples),da(S.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1),this.selectedRequestBodyExample||(this.selectedRequestBodyExample=N.length>0?N[0].exampleId:""),p=G`
|
||
${p}
|
||
<div class = 'example-panel border-top pad-top-8'>
|
||
${N.length===1?"":G`
|
||
<select style="min-width:100px; max-width:100%; margin-bottom:-1px;" @change='${D=>this.onSelectExample(D)}'>
|
||
${N.map((D=>G`<option value="${D.exampleId}" ?selected=${D.exampleId===this.selectedRequestBodyExample} >
|
||
${D.exampleSummary.length>80?D.exampleId:D.exampleSummary?D.exampleSummary:D.exampleId}
|
||
</option>`))}
|
||
</select>
|
||
`}
|
||
${N.filter((D=>D.exampleId===this.selectedRequestBodyExample)).map((D=>G`
|
||
<div class="example ${D.exampleId===this.selectedRequestBodyExample?"example-selected":""}" data-example = '${D.exampleId}'>
|
||
${D.exampleSummary&&D.exampleSummary.length>80?G`<div style="padding: 4px 0"> ${D.exampleSummary} </div>`:""}
|
||
${D.exampleDescription?G`<div class="m-markdown-small" style="padding: 4px 0"> ${In(yt(D.exampleDescription||""))} </div>`:""}
|
||
<!-- This pre(hidden) is to store the original example value, this will remain unchanged when users switches from one example to another, its is used to populate the editable textarea -->
|
||
<pre
|
||
class = "textarea is-hidden request-body-param ${S.mimeType.substring(S.mimeType.indexOf("/")+1)}"
|
||
spellcheck = "false"
|
||
data-ptype = "${S.mimeType}"
|
||
style="width:100%; resize:vertical; display:none"
|
||
>${D.exampleFormat==="text"?D.exampleValue:JSON.stringify(D.exampleValue,null,2)}</pre>
|
||
|
||
<!-- this textarea is for user to edit the example -->
|
||
<textarea
|
||
class = "textarea request-body-param-user-input"
|
||
part = "textarea textarea-param"
|
||
spellcheck = "false"
|
||
data-ptype = "${S.mimeType}"
|
||
data-example = "${D.exampleFormat==="text"?D.exampleValue:JSON.stringify(D.exampleValue,null,2)}"
|
||
data-example-format = "${D.exampleFormat}"
|
||
style="width:100%; resize:vertical;"
|
||
.textContent = "${this.fillRequestFieldsWithExample==="true"?D.exampleFormat==="text"?D.exampleValue:JSON.stringify(D.exampleValue,null,2):""}"
|
||
@input=${$=>{const L=this.getRequestPanel($);this.liveCURLSyntaxUpdate(L)}}
|
||
@keydown=${$=>{if(($.keyCode===10||$.keyCode===13)&&$.ctrlKey)return this.onTryClick($)}}
|
||
|
||
></textarea>
|
||
</div>
|
||
`))}
|
||
|
||
</div>
|
||
`);else if(this.selectedRequestBodyType.includes("form-urlencoded")||this.selectedRequestBodyType.includes("form-data")){if(S.mimeType===this.selectedRequestBodyType){const D=Km(S.schema,S.mimeType,S.examples,S.example,this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);S.schema&&(i=this.formDataTemplate(S.schema,S.mimeType,D[0]?D[0].exampleValue:""))}}else/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(this.selectedRequestBodyType)&&S.mimeType===this.selectedRequestBodyType&&(n=G`
|
||
<div class = "small-font-size bold-text row">
|
||
<input id="input-request-body-param-file" type="file" part="file-input" style="max-width:100%" class="request-body-param-file" data-ptype="${S.mimeType}" spellcheck="false" />
|
||
</div>
|
||
`);(S.mimeType.includes("json")||S.mimeType.includes("xml")||S.mimeType.includes("text")||this.selectedRequestBodyType.includes("jose"))&&(C=ts(S.schema,{}),this.schemaStyle==="table"?l=G`
|
||
${l}
|
||
<schema-table
|
||
class = '${S.mimeType.substring(S.mimeType.indexOf("/")+1)}'
|
||
style = 'display: ${this.selectedRequestBodyType===S.mimeType?"block":"none"};'
|
||
.data = '${C}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table>
|
||
`:this.schemaStyle==="tree"&&(l=G`
|
||
${l}
|
||
<schema-tree
|
||
class = "${S.mimeType.substring(S.mimeType.indexOf("/")+1)}"
|
||
style = "display: ${this.selectedRequestBodyType===S.mimeType?"block":"none"};"
|
||
.data = "${C}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>
|
||
`))})),G`
|
||
<div class='request-body-container' data-selected-request-body-type="${this.selectedRequestBodyType}">
|
||
<div class="table-title top-gap row">
|
||
REQUEST BODY ${this.request_body.required?G`<span class="mono-font" style='color:var(--red)'>*</span>`:""}
|
||
<span style = "font-weight:normal; margin-left:5px"> ${this.selectedRequestBodyType}</span>
|
||
<span style="flex:1"></span>
|
||
${t}
|
||
</div>
|
||
${this.request_body.description?G`<div class="m-markdown" style="margin-bottom:12px">${In(yt(this.request_body.description))}</div>`:""}
|
||
|
||
${this.selectedRequestBodyType.includes("json")||this.selectedRequestBodyType.includes("xml")||this.selectedRequestBodyType.includes("text")||this.selectedRequestBodyType.includes("jose")?G`
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${S=>{S.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=S.target.dataset.tab)}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE</button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
${G`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"block":"none"};"> ${p}</div>`}
|
||
${G`<div part="tab-content" class="tab-content col" style="display:${this.activeSchemaTab==="example"?"none":"block"};"> ${l}</div>`}
|
||
</div>`:G`
|
||
${n}
|
||
${i}`}
|
||
</div>
|
||
`}formDataParamAsObjectTemplate(t,n,i){var l;const p=ts(n,{}),v=Km(n,"json",da(n.examples),da(n.example),this.callback==="true"||this.webhook==="true",this.callback!=="true"&&this.webhook!=="true","text",!1);return G`
|
||
<div part="tab-panel" class="tab-panel row" style="min-height:220px; border-left: 6px solid var(--light-border-color); align-items: stretch;">
|
||
<div style="width:24px; background-color:var(--light-border-color)">
|
||
<div class="row" style="flex-direction:row-reverse; width:160px; height:24px; transform:rotate(270deg) translateX(-160px); transform-origin:top left; display:block;" @click="${x=>{if(x.target.classList.contains("v-tab-btn")){const{tab:S}=x.target.dataset;if(S){const C=x.target.closest(".tab-panel"),N=C.querySelector(`.v-tab-btn[data-tab="${S}"]`),D=[...C.querySelectorAll(`.v-tab-btn:not([data-tab="${S}"])`)],$=C.querySelector(`.tab-content[data-tab="${S}"]`),L=[...C.querySelectorAll(`.tab-content:not([data-tab="${S}"])`)];N.classList.add("active"),$.style.display="block",D.forEach((U=>{U.classList.remove("active")})),L.forEach((U=>{U.style.display="none"}))}}x.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=x.target.dataset.tab)}}">
|
||
<button class="v-tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE</button>
|
||
<button class="v-tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema'>SCHEMA</button>
|
||
</div>
|
||
</div>
|
||
${G`
|
||
<div class="tab-content col" data-tab = 'example' style="display:${this.activeSchemaTab==="example"?"block":"none"}; padding-left:5px; width:100%">
|
||
<textarea
|
||
class = "textarea"
|
||
part = "textarea textarea-param"
|
||
style = "width:100%; border:none; resize:vertical;"
|
||
data-array = "false"
|
||
data-ptype = "${i.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${t}"
|
||
data-example = "${((l=v[0])===null||l===void 0?void 0:l.exampleValue)||""}"
|
||
.textContent = "${this.fillRequestFieldsWithExample==="true"?v[0].exampleValue:""}"
|
||
spellcheck = "false"
|
||
></textarea>
|
||
</div>`}
|
||
${G`
|
||
<div class="tab-content col" data-tab = 'schema' style="display:${this.activeSchemaTab!=="example"?"block":"none"}; padding-left:5px; width:100%;">
|
||
<schema-tree
|
||
.data = "${p}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}",
|
||
> </schema-tree>
|
||
</div>`}
|
||
</div>
|
||
`}formDataTemplate(t,n,i=""){const l=[];if(t.properties){for(const x in t.properties){var p,v;const S=t.properties[x];if(S.readOnly)continue;const C=S.examples||S.example||"",N=S.type,D=Nd(S),$="read focused".includes(this.renderStyle)?"200px":"160px",L=uM(D.examples||D.example,D.type);l.push(G`
|
||
<tr title="${S.deprecated?"Deprecated":""}">
|
||
<td style="width:${$}; min-width:100px;">
|
||
<div class="param-name ${S.deprecated?"deprecated":""}">
|
||
${x}${(p=t.required)!==null&&p!==void 0&&p.includes(x)||S.required?G`<span style='color:var(--red);'>*</span>`:""}
|
||
</div>
|
||
<div class="param-type">${D.type}</div>
|
||
</td>
|
||
<td
|
||
style="${N==="object"?"width:100%; padding:0;":this.allowTry==="true"?"":"display:none;"} min-width:100px;"
|
||
colspan="${N==="object"?2:1}">
|
||
${N==="array"?((v=S.items)===null||v===void 0?void 0:v.format)==="binary"?G`
|
||
<div class="file-input-container col" style='align-items:flex-end;' @click="${U=>this.onAddRemoveFileInput(U,x,n)}">
|
||
<div class='input-set row'>
|
||
<input
|
||
type = "file"
|
||
part = "file-input"
|
||
style = "width:100%"
|
||
data-pname = "${x}"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-array = "false"
|
||
data-file-array = "true"
|
||
/>
|
||
<button class="file-input-remove-btn"> ✕ </button>
|
||
</div>
|
||
<button class="m-btn primary file-input-add-btn" part="btn btn-fill" style="margin:2px 25px 0 0; padding:2px 6px;">ADD</button>
|
||
</div>
|
||
`:G`
|
||
<tag-input
|
||
style = "width:100%"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${x}"
|
||
data-example = "${Array.isArray(C)?C.join("~|~"):C}"
|
||
data-array = "true"
|
||
placeholder = "add-multiple ↩"
|
||
.value = "${Array.isArray(C)?Array.isArray(C[0])?C[0]:C:[]}"
|
||
>
|
||
</tag-input>
|
||
`:G`
|
||
${N==="object"?this.formDataParamAsObjectTemplate.call(this,x,S,n):G`
|
||
${this.allowTry==="true"?G`<input
|
||
.value = "${this.fillRequestFieldsWithExample==="true"?L.exampleVal:""}"
|
||
spellcheck = "false"
|
||
type = "${S.format==="binary"?"file":S.format==="password"?"password":"text"}"
|
||
part = "textbox textbox-param"
|
||
style = "width:100%"
|
||
data-ptype = "${n.includes("form-urlencode")?"form-urlencode":"form-data"}"
|
||
data-pname = "${x}"
|
||
data-example = "${Array.isArray(C)?C[0]:C}"
|
||
data-array = "false"
|
||
/>`:""}
|
||
`}`}
|
||
</td>
|
||
${N==="object"?"":G`
|
||
<td>
|
||
${D.default||D.constrain||D.allowedValues||D.pattern?G`
|
||
<div class="param-constraint">
|
||
${D.default?G`<span style="font-weight:bold">Default: </span>${D.default}<br/>`:""}
|
||
${D.pattern?G`<span style="font-weight:bold">Pattern: </span>${D.pattern}<br/>`:""}
|
||
${D.constrain?G`${D.constrain}<br/>`:""}
|
||
${D.allowedValues&&D.allowedValues.split("┃").map(((U,J)=>G`
|
||
${J>0?"┃":G`<span style="font-weight:bold">Allowed: </span>`}
|
||
${G`
|
||
<a part="anchor anchor-param-constraint" class = "${this.allowTry==="true"?"":"inactive-link"}"
|
||
data-type="${D.type==="array"?D.type:"string"}"
|
||
data-enum="${U.trim()}"
|
||
@click="${Y=>{const Z=Y.target.closest("table").querySelector(`[data-pname="${x}"]`);Z&&(Y.target.dataset.type==="array"?Z.value=[Y.target.dataset.enum]:Z.value=Y.target.dataset.enum)}}"
|
||
>
|
||
${U}
|
||
</a>`}`))}
|
||
</div>`:""}
|
||
</td>`}
|
||
</tr>
|
||
${N==="object"?"":G`
|
||
<tr>
|
||
<td style="border:none"> </td>
|
||
<td colspan="2" style="border:none; margin-top:0; padding:0 5px 8px 5px;">
|
||
<span class="m-markdown-small">${In(yt(S.description||""))}</span>
|
||
${this.exampleListTemplate.call(this,x,D.type,L.exampleList)}
|
||
</td>
|
||
</tr>
|
||
`}`)}return G`
|
||
<table role="presentation" style="width:100%;" class="m-table">
|
||
${l}
|
||
</table>
|
||
`}return G`
|
||
<textarea
|
||
class = "textarea dynamic-form-param ${n}"
|
||
part = "textarea textarea-param"
|
||
spellcheck = "false"
|
||
data-pname="dynamic-form"
|
||
data-ptype="${n}"
|
||
.textContent = "${i}"
|
||
style="width:100%"
|
||
></textarea>
|
||
${t.description?G`<span class="m-markdown-small">${In(yt(t.description))}</span>`:""}
|
||
`}curlSyntaxTemplate(t="flex"){return G`
|
||
<div class="col m-markdown" style="flex:1; display:${t}; position:relative; max-width: 100%;">
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${n=>{gl(this.curlSyntax.trim().replace(/\\$/,""),n)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre"><code>${In(sr().highlight(this.curlSyntax.trim().replace(/\\$/,""),sr().languages.shell,"shell"))}</code></pre>
|
||
</div>
|
||
`}apiResponseTabTemplate(){let t="",n="";if(!this.responseIsBlob)if(this.responseHeaders.includes("application/x-ndjson")){t="json";const i=this.responseText.split(`
|
||
`).map((l=>sr().highlight(l,sr().languages[t],t))).join(`
|
||
`);n=G`<code>${In(i)}</code>`}else this.responseHeaders.includes("json")?(t="json",n=G`<code>${In(sr().highlight(this.responseText,sr().languages[t],t))}</code>`):this.responseHeaders.includes("html")||this.responseHeaders.includes("xml")?(t="html",n=G`<code>${In(sr().highlight(this.responseText,sr().languages[t],t))}</code>`):(t="text",n=G`<code>${this.responseText}</code>`);return G`
|
||
<div class="row" style="font-size:var(--font-size-small); margin:5px 0">
|
||
<div class="response-message ${this.responseStatus}">Response Status: ${this.responseMessage}</div>
|
||
<div style="flex:1"></div>
|
||
<button class="m-btn" part="btn btn-outline btn-clear-response" @click="${this.clearResponseData}">CLEAR RESPONSE</button>
|
||
</div>
|
||
<div part="tab-panel" class="tab-panel col" style="border-width:0 0 1px 0;">
|
||
<div id="tab_buttons" part="tab-btn-row" class="tab-buttons row" @click="${i=>{i.target.classList.contains("tab-btn")!==!1&&(this.activeResponseTab=i.target.dataset.tab)}}">
|
||
<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="response"?"active":""}" data-tab = 'response' > RESPONSE</button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="headers"?"active":""}" data-tab = 'headers' > RESPONSE HEADERS</button>
|
||
${this.showCurlBeforeTry==="true"?"":G`<button part="tab-btn" class="tab-btn ${this.activeResponseTab==="curl"?"active":""}" data-tab = 'curl'>CURL</button>`}
|
||
</div>
|
||
${this.responseIsBlob?G`
|
||
<div part="tab-content" class="tab-content col" style="flex:1; display:${this.activeResponseTab==="response"?"flex":"none"};">
|
||
${this.responseBlobType==="image"?G`<img style="max-height:var(--resp-area-height, 400px); object-fit:contain;" class="mar-top-8" src="${(i=>i??mn)(this.responseBlobUrl)}"></img>`:""}
|
||
<button class="m-btn thin-border mar-top-8" style="width:135px" @click='${i=>{qp(this.responseBlobUrl,this.respContentDisposition)}}' part="btn btn-outline">
|
||
DOWNLOAD
|
||
</button>
|
||
${this.responseBlobType==="view"||this.responseBlobType==="image"?G`<button class="m-btn thin-border mar-top-8" style="width:135px" @click='${i=>{Hg(this.responseBlobUrl)}}' part="btn btn-outline">VIEW (NEW TAB)</button>`:""}
|
||
</div>`:G`
|
||
<div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${this.activeResponseTab==="response"?"flex":"none"};" >
|
||
<button class="toolbar-btn" style="position:absolute; top:12px; right:8px" @click='${i=>{gl(this.responseText,i)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre; min-height:50px; height:var(--resp-area-height, 400px); resize:vertical; overflow:auto">${n}</pre>
|
||
</div>`}
|
||
<div part="tab-content" class="tab-content col m-markdown" style="flex:1; display:${this.activeResponseTab==="headers"?"flex":"none"};" >
|
||
<button class="toolbar-btn" style = "position:absolute; top:12px; right:8px" @click='${i=>{gl(this.responseHeaders,i)}}' part="btn btn-fill"> Copy </button>
|
||
<pre style="white-space:pre"><code>${In(sr().highlight(this.responseHeaders,sr().languages.css,"css"))}</code></pre>
|
||
</div>
|
||
${this.showCurlBeforeTry==="true"?"":this.curlSyntaxTemplate(this.activeResponseTab==="curl"?"flex":"none")}
|
||
</div>`}apiCallTemplate(){var t,n;const i=G`
|
||
<div style="display:flex; flex-direction:column;">
|
||
${this.serverUrl?G`
|
||
<div style="display:flex; align-items:baseline;">
|
||
<div style="font-weight:bold; padding-right:5px;">API Server</div>
|
||
<span class = "gray-text"> ${this.serverUrl} </span>
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
`;return G`
|
||
<div style="display:flex; align-items:flex-end; margin:16px 0; font-size:var(--font-size-small);" part="wrap-request-btn">
|
||
<div class="hide-in-small-screen" style="flex-direction:column; margin:0; width:calc(100% - 60px);">
|
||
<div style="display:flex; flex-direction:row; align-items:center; overflow:hidden;">
|
||
${i}
|
||
</div>
|
||
<div style="display:flex;">
|
||
<div style="font-weight:bold; padding-right:5px;">Authentication</div>
|
||
${((t=this.security)===null||t===void 0?void 0:t.length)>0?G`
|
||
${this.api_keys.length>0?G`<div style="color:var(--blue); overflow:hidden;">
|
||
${this.api_keys.length===1?`${(n=this.api_keys[0])===null||n===void 0?void 0:n.typeDisplay} in ${this.api_keys[0].in}`:`${this.api_keys.length} API keys applied`}
|
||
</div>`:G`<div class="gray-text">Required <span style="color:var(--red)">(None Applied)</span> </div>`}`:G`<span class="gray-text"> Not Required </span>`}
|
||
</div>
|
||
</div>
|
||
${this.parameters.length>0||this.request_body?G`
|
||
<button class="m-btn thin-border" part="btn btn-outline btn-fill" style="margin-right:5px;" @click="${this.onFillRequestData}" title="Fills with example data (if provided)">
|
||
FILL EXAMPLE
|
||
</button>
|
||
<button class="m-btn thin-border" part="btn btn-outline btn-clear" style="margin-right:5px;" @click="${this.onClearRequestData}">
|
||
CLEAR
|
||
</button>`:""}
|
||
<button class="m-btn primary thin-border" part="btn btn-try" @click="${this.onTryClick}">TRY</button>
|
||
</div>
|
||
<div class="row" style="font-size:var(--font-size-small); margin:5px 0">
|
||
${this.showCurlBeforeTry==="true"?this.curlSyntaxTemplate():""}
|
||
</div>
|
||
${this.responseMessage===""?"":this.apiResponseTabTemplate()}
|
||
`}async onFillRequestData(t){[...t.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((n=>{n.dataset.example&&(n.tagName.toUpperCase()==="TAG-INPUT"?n.value=n.dataset.example.split("~|~"):n.value=n.dataset.example)}))}async onClearRequestData(t){[...t.target.closest(".request-panel").querySelectorAll("input, tag-input, textarea:not(.is-hidden)")].forEach((n=>{n.value=""}))}buildFetchURL(t){let n;const i=[...t.querySelectorAll("[data-ptype='path']")],l=[...t.querySelectorAll("[data-ptype='query']")],p=[...t.querySelectorAll("[data-ptype='query-object']")];n=this.path,i.map((C=>{n=n.replace(`{${C.dataset.pname}}`,encodeURIComponent(C.value))}));const v=new Map,x=[];l.length>0&&l.forEach((C=>{const N=new URLSearchParams;if(C.dataset.paramAllowReserved==="true"&&x.push(C.dataset.pname),C.dataset.array==="false")C.value!==""&&N.append(C.dataset.pname,C.value);else{const{paramSerializeStyle:D,paramSerializeExplode:$}=C.dataset;let L=C.value&&Array.isArray(C.value)?C.value:[];L=Array.isArray(L)?L.filter((U=>U!=="")):[],L.length>0&&(D==="spaceDelimited"?N.append(C.dataset.pname,L.join(" ").replace(/^\s|\s$/g,"")):D==="pipeDelimited"?N.append(C.dataset.pname,L.join("|").replace(/^\||\|$/g,"")):$==="true"?L.forEach((U=>{N.append(C.dataset.pname,U)})):N.append(C.dataset.pname,L.join(",").replace(/^,|,$/g,"")))}N.toString()&&v.set(C.dataset.pname,N)})),p.length>0&&p.map((C=>{const N=new URLSearchParams;try{let D={};const{paramSerializeStyle:$,paramSerializeExplode:L,pname:U}=C.dataset;if(D=Object.assign(D,JSON.parse(C.value.replace(/\s+/g," "))),C.dataset.paramAllowReserved==="true"&&x.push(C.dataset.pname),"json xml".includes($))$==="json"?N.append(C.dataset.pname,JSON.stringify(D)):$==="xml"&&N.append(C.dataset.pname,TR(D));else for(const J in D){const Y=`${U}[${J}]`;typeof D[J]=="object"?Array.isArray(D[J])&&($==="spaceDelimited"?N.append(Y,D[J].join(" ")):$==="pipeDelimited"?N.append(Y,D[J].join("|")):L==="true"?D[J].forEach((Z=>{N.append(Y,Z)})):N.append(Y,D[J])):N.append(Y,D[J])}}catch{console.error("RapiDoc: unable to parse %s into object",C.value)}N.toString()&&v.set(C.dataset.pname,N)}));let S="";return v.size&&(v.forEach(((C,N)=>{x.includes(N)?(S+=`${N}=`,S+=C.getAll(N).join(`&${N}=`),S+="&"):S+=`${C.toString()}&`})),S=S.slice(0,-1)),S.length!==0&&(n=`${n}${n.includes("?")?"&":"?"}${S}`),this.api_keys.filter((C=>C.in==="query")).forEach((C=>{n=`${n}${n.includes("?")?"&":"?"}${C.name}=${encodeURIComponent(C.finalKeyValue)}`})),n=`${this.serverUrl.replace(/\/$/,"")}${n}`,n}buildFetchHeaders(t){var n;const i=(n=this.closest(".expanded-req-resp-container, .req-resp-container"))===null||n===void 0?void 0:n.getElementsByTagName("api-response")[0],l=[...t.querySelectorAll("[data-ptype='header'], [data-ptype='header-object']")],p=t.querySelector(".request-body-container"),v=i?.selectedMimeType,x=new Headers;if(v?x.append("Accept",v):this.accept&&x.append("Accept",this.accept),this.api_keys.filter((S=>S.in==="header")).forEach((S=>{x.append(S.name,S.finalKeyValue)})),l.map((S=>{if(S.value)if(S.dataset.ptype==="header-object"){const C=JSON.parse(S.value.replace(/\n/g,"").trim()),N=S.dataset.paramSerializeExplode==="true"?"=":",",D=Object.keys(C).map(($=>{const L=C[$];return typeof L=="object"?`${$}${N}${JSON.stringify(L)}`:`${$}${N}${L}`})).join(",");x.append(S.dataset.pname,D)}else x.append(S.dataset.pname,S.value)})),p){const S=p.dataset.selectedRequestBodyType;S.includes("form-data")||x.append("Content-Type",S)}return x}buildFetchBodyOptions(t){const n=t.querySelector(".request-body-container"),i={method:this.method.toUpperCase()};if(n){const l=n.dataset.selectedRequestBodyType;if(l.includes("form-urlencoded")){const p=t.querySelector("[data-ptype='dynamic-form']");if(p){const v=p.value,x=new URLSearchParams;let S,C=!0;if(v)try{S=JSON.parse(v)}catch(N){C=!1,console.warn("RapiDoc: Invalid JSON provided",N)}else C=!1;if(C){for(const N in S)x.append(N,JSON.stringify(S[N]));i.body=x}}else{const v=[...t.querySelectorAll("[data-ptype='form-urlencode']")],x=new URLSearchParams;v.filter((S=>S.type!=="file")).forEach((S=>{if(S.dataset.array==="false")S.value&&x.append(S.dataset.pname,S.value);else{const C=S.value&&Array.isArray(S.value)?S.value.join(","):"";x.append(S.dataset.pname,C)}})),i.body=x}}else if(l.includes("form-data")){const p=new FormData;[...t.querySelectorAll("[data-ptype='form-data']")].forEach((v=>{v.dataset.array==="false"?v.type==="file"&&v.files[0]?p.append(v.dataset.pname,v.files[0],v.files[0].name):v.value&&p.append(v.dataset.pname,v.value):v.value&&Array.isArray(v.value)&&p.append(v.dataset.pname,v.value.join(","))})),i.body=p}else if(/^audio\/|^image\/|^video\/|^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$/.test(l)){const p=t.querySelector(".request-body-param-file");p!=null&&p.files[0]&&(i.body=p.files[0])}else if(l.includes("json")||l.includes("xml")||l.includes("text")){const p=t.querySelector(".request-body-param-user-input");p!=null&&p.value&&(i.body=p.value)}}return i}async onTryClick(t){const n=t.target,i=n.closest(".request-panel"),l=this.buildFetchURL(i),p=this.buildFetchBodyOptions(i),v=this.buildFetchHeaders(i);this.responseUrl="",this.responseHeaders=[],this.curlSyntax=this.generateCURLSyntax(l,v,p,i),this.responseStatus="success",this.responseIsBlob=!1,this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),this.fetchCredentials&&(p.credentials=this.fetchCredentials);const x=new AbortController,{signal:S}=x;p.headers=v;const C={url:l,...p};this.dispatchEvent(new CustomEvent("before-try",{bubbles:!0,composed:!0,detail:{request:C,controller:x}}));const N={method:C.method,headers:C.headers,credentials:C.credentials,body:C.body},D=new Request(C.url,N);let $,L;try{let U,J,Y;n.disabled=!0,this.responseText="⌛",this.responseMessage="",this.requestUpdate();const Z=performance.now();$=await fetch(D,{signal:S});const P=performance.now();L=$.clone(),n.disabled=!1,this.responseMessage=G`${$.statusText?`${$.statusText}:${$.status}`:$.status} <div style="color:var(--light-fg)"> Took ${Math.round(P-Z)} milliseconds </div>`,this.responseUrl=$.url;const re={};$.headers.forEach(((he,xe)=>{re[xe]=he,this.responseHeaders=`${this.responseHeaders}${xe}: ${he}
|
||
`}));let le=$.headers.get("content-type");if((await $.clone().text()).length===0)this.responseText="";else if(le){if(le=le.split(";")[0].trim(),le==="application/x-ndjson")this.responseText=await $.text();else if(le.includes("json"))if(/charset=[^"']+/.test(le)){const he=le.split("charset=")[1],xe=await $.arrayBuffer();try{Y=new TextDecoder(he).decode(xe)}catch{Y=new TextDecoder("utf-8").decode(xe)}try{J=JSON.parse(Y),this.responseText=JSON.stringify(J,null,2)}catch{this.responseText=Y}}else J=await $.json(),this.responseText=JSON.stringify(J,null,2);else/^font\/|tar$|zip$|7z$|rtf$|msword$|excel$|\/pdf$|\/octet-stream$|^application\/vnd\./.test(le)?(this.responseIsBlob=!0,this.responseBlobType="download"):/^image/.test(le)?(this.responseIsBlob=!0,this.responseBlobType="image"):/^audio|^image|^video/.test(le)?(this.responseIsBlob=!0,this.responseBlobType="view"):(Y=await $.text(),le.includes("xml")?this.responseText=iY()(Y,{textNodesOnSameLine:!0,indentor:" "}):this.responseText=Y);if(this.responseIsBlob){const he=$.headers.get("content-disposition")||"";let xe="filename";if(he){const pe=he.match(/filename\*=\s*UTF-8''([^;]+)/);if(pe)xe=decodeURIComponent(pe[1]);else{const _e=he.match(/filename="?([^"]+)"?/);_e&&(xe=_e[1])}}this.respContentDisposition=xe,U=await $.blob(),this.responseBlobUrl=URL.createObjectURL(U)}}else Y=await $.text(),this.responseText=Y;this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{request:D,response:L,responseHeaders:re,responseBody:J||Y||U,responseStatus:L.ok}}))}catch(U){n.disabled=!1,U.name==="AbortError"?(this.dispatchEvent(new CustomEvent("request-aborted",{bubbles:!0,composed:!0,detail:{err:U,request:D}})),this.responseMessage="Request Aborted",this.responseText="Request Aborted"):(this.dispatchEvent(new CustomEvent("after-try",{bubbles:!0,composed:!0,detail:{err:U,request:D}})),this.responseMessage=`${U.message} (CORS or Network Issue)`)}this.requestUpdate()}liveCURLSyntaxUpdate(t){this.applyCURLSyntax(t),this.requestUpdate()}onGenerateCURLClick(t){const n=this.getRequestPanel(t);this.applyCURLSyntax(n)}getRequestPanel(t){return t.target.closest(".request-panel")}applyCURLSyntax(t){const n=this.buildFetchURL(t),i=this.buildFetchBodyOptions(t),l=this.buildFetchHeaders(t);this.curlSyntax=this.generateCURLSyntax(n,l,i,t)}generateCURLSyntax(t,n,i,l){let p,v="",x="",S="",C="";const N=l.querySelector(".request-body-container");if(t.startsWith("http")===!1?p=new URL(t,window.location.href).href:p=t,v=`curl -X ${this.method.toUpperCase()} "${p}" \\
|
||
`,n.forEach(((D,$)=>{let L=D.split(",");L=L.map((U=>U.trim())).filter(((U,J)=>L.indexOf(U)===J)),n.set($,L.join(", "))})),x=Array.from(n).map((([D,$])=>` -H '${D}: ${$}'`)).join(`\\
|
||
`),x&&(x=`${x} \\
|
||
`),i.body instanceof URLSearchParams)S=` -d ${i.body.toString()} \\
|
||
`;else if(i.body instanceof File)S=` --data-binary @${i.body.name} \\
|
||
`;else if(i.body instanceof FormData)C=Array.from(i.body).reduce(((D,[$,L])=>{if(L instanceof File)return[...D,` -F "${$}=@${L.name}"`];const U=L.match(/([^,],)/gm);if(U){const J=U.map((Y=>`-F "${$}[]=${Y}"`));return[...D,...J]}return[...D,` -F "${$}=${L}"`]}),[]).join(`\\
|
||
`);else if(N&&N.dataset.selectedRequestBodyType){const D=N.dataset.selectedRequestBodyType,$=l.querySelector(".request-body-param-user-input");if($!=null&&$.value){if(i.body=$.value,D.includes("json"))try{S=` -d '${JSON.stringify(JSON.parse($.value))}' \\
|
||
`}catch{}S||(S=` -d '${$.value.replace(/'/g,`'"'"'`)}' \\
|
||
`)}}return`${v}${x}${S}${C}`}onAddRemoveFileInput(t,n,i){if(t.target.tagName.toLowerCase()!=="button")return;if(t.target.classList.contains("file-input-remove-btn"))return void t.target.closest(".input-set").remove();const l=t.target.closest(".file-input-container"),p=document.createElement("div");p.setAttribute("class","input-set row");const v=document.createElement("input");v.type="file",v.style="width:200px; margin-top:2px;",v.setAttribute("data-pname",n),v.setAttribute("data-ptype",i.includes("form-urlencode")?"form-urlencode":"form-data"),v.setAttribute("data-array","false"),v.setAttribute("data-file-array","true");const x=document.createElement("button");x.setAttribute("class","file-input-remove-btn"),x.innerHTML="✕",p.appendChild(v),p.appendChild(x),l.insertBefore(p,t.target)}clearResponseData(){this.responseUrl="",this.responseHeaders="",this.responseText="",this.responseStatus="success",this.responseMessage="",this.responseIsBlob=!1,this.responseBlobType="",this.respContentDisposition="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl="")}disconnectedCallback(){this.curlSyntax="",this.responseBlobUrl&&(URL.revokeObjectURL(this.responseBlobUrl),this.responseBlobUrl=""),super.disconnectedCallback()}}),customElements.define("schema-table",class extends Gt{static get properties(){return{schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},data:{type:Object}}}connectedCallback(){super.connectedCallback(),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true false".includes(this.schemaDescriptionExpanded)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"true false".includes(this.schemaHideReadOnly)||(this.schemaHideReadOnly="true"),this.schemaHideWriteOnly&&"true false".includes(this.schemaHideWriteOnly)||(this.schemaHideWriteOnly="true")}static get styles(){return[Ri,fM,M`
|
||
.table {
|
||
font-size: var(--font-size-small);
|
||
text-align: left;
|
||
line-height: calc(var(--font-size-small) + 6px);
|
||
}
|
||
.table .tr {
|
||
width: calc(100% - 5px);
|
||
padding: 0 0 0 5px;
|
||
border-bottom: 1px dotted var(--light-border-color);
|
||
}
|
||
.table .td {
|
||
padding: 4px 0;
|
||
}
|
||
.table .key {
|
||
width: 240px;
|
||
}
|
||
.key .key-label {
|
||
font-size: var(--font-size-mono);
|
||
}
|
||
.key.deprecated .key-label {
|
||
color: var(--red);
|
||
}
|
||
|
||
.table .key-type {
|
||
white-space: normal;
|
||
width: 150px;
|
||
}
|
||
.collapsed-all-descr .tr:not(.expanded-descr) {
|
||
max-height: calc(var(--font-size-small) + var(--font-size-small));
|
||
}
|
||
|
||
.obj-toggle {
|
||
padding: 0 2px;
|
||
border-radius:2px;
|
||
border: 1px solid transparent;
|
||
display: inline-block;
|
||
margin-left: -16px;
|
||
color:var(--primary-color);
|
||
cursor:pointer;
|
||
font-size: calc(var(--font-size-small) + 4px);
|
||
font-family: var(--font-mono);
|
||
background-clip: border-box;
|
||
}
|
||
.obj-toggle:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
.tr.expanded + .object-body {
|
||
display:block;
|
||
}
|
||
.tr.collapsed + .object-body {
|
||
display:none;
|
||
}`,vc]}render(){var t,n,i;return G`
|
||
<div class="table ${this.schemaDescriptionExpanded==="true"?"expanded-all-descr":"collapsed-all-descr"}" @click="${l=>this.handleAllEvents(l)}">
|
||
<div class='toolbar'>
|
||
<div class="toolbar-item schema-root-type ${((t=this.data)===null||t===void 0?void 0:t["::type"])||""} "> ${((n=this.data)===null||n===void 0?void 0:n["::type"])||""} </div>
|
||
${this.allowSchemaDescriptionExpandToggle==="true"?G`
|
||
<div style="flex:1"></div>
|
||
<div part="schema-multiline-toggle" class='toolbar-item schema-multiline-toggle' >
|
||
${this.schemaDescriptionExpanded==="true"?"Single line description":"Multiline description"}
|
||
</div>
|
||
`:""}
|
||
</div>
|
||
<span part="schema-description" class='m-markdown'> ${In(yt(((i=this.data)===null||i===void 0?void 0:i["::description"])||""))} </span>
|
||
<div style = 'border:1px solid var(--light-border-color)'>
|
||
<div style='display:flex; background-color: var(--bg2); padding:8px 4px; border-bottom:1px solid var(--light-border-color);'>
|
||
<div class='key' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Field </div>
|
||
<div class='key-type' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Type </div>
|
||
<div class='key-descr' style='font-family:var(--font-regular); font-weight:bold; color:var(--fg);'> Description </div>
|
||
</div>
|
||
${this.data?G`
|
||
${this.generateTree(this.data["::type"]==="array"?this.data["::props"]:this.data,this.data["::type"],this.data["::array-type"])}`:""}
|
||
</div>
|
||
</div>
|
||
`}generateTree(t,n="object",i="",l="",p="",v=0,x=0,S="",C=!1){var N,D;if(this.schemaHideReadOnly==="true"&&(n==="array"&&S==="readonly"||t&&t["::readwrite"]==="readonly")||this.schemaHideWriteOnly==="true"&&(n==="array"&&S==="writeonly"||t&&t["::readwrite"]==="writeonly"))return;if(!t)return G`<div class="null" style="display:inline;">
|
||
<span style='margin-left:${16*(v+1)}px'> </span>
|
||
<span class="key-label xxx-of-key"> ${l.replace("::OPTION~","")}</span>
|
||
${n==="array"?G`<span class='mono-font'> [ ] </span>`:n==="object"?G`<span class='mono-font'> { } </span>`:G`<span class='mono-font'> schema undefined </span>`}
|
||
</div>`;const $=(N=t["::type"])!==null&&N!==void 0&&N.startsWith("xxx-of")?v:v+1,L=n==="xxx-of-option"||t["::type"]==="xxx-of-option"||l.startsWith("::OPTION")?x:x+1,U=16*L;if(Object.keys(t).length===0)return G`<span class="td key object" style='padding-left:${U}px'>${l}</span>`;let J="",Y="",Z=!1;if(l.startsWith("::ONE~OF")||l.startsWith("::ANY~OF"))J=l.replace("::","").replace("~"," "),Z=!0;else if(l.startsWith("::OPTION")){const tt=l.split("~");J=tt[1],Y=tt[2]}else J=l;let P="";if(t["::type"]==="object"?P=n==="array"?"array of object":t["::dataTypeLabel"]||t["::type"]:t["::type"]==="array"&&(P=n==="array"?"array of array "+(i!=="object"?`of ${i}`:""):t["::dataTypeLabel"]||t["::type"]),typeof t=="object")return G`
|
||
${$>=0&&l?G`
|
||
<div class='tr ${$<=this.schemaExpandLevel?"expanded":"collapsed"} ${t["::type"]}' data-obj='${J}' title="${C||t["::deprecated"]?"Deprecated":""}">
|
||
<div class="td key ${C||t["::deprecated"]?"deprecated":""}" style='padding-left:${U}px'>
|
||
${J||Y?G`
|
||
<span class='obj-toggle ${$<this.schemaExpandLevel?"expanded":"collapsed"}' data-obj='${J}'>
|
||
${v<this.schemaExpandLevel?"-":"+"}
|
||
</span>`:""}
|
||
${t["::type"]==="xxx-of-option"||t["::type"]==="xxx-of-array"||l.startsWith("::OPTION")?G`<span class="xxx-of-key" style="margin-left:-6px">${J}</span><span class="${Z?"xxx-of-key":"xxx-of-descr"}">${Y}</span>`:J.endsWith("*")?G`<span class="key-label" style="display:inline-block; margin-left:-6px;">${C||t["::deprecated"]?G`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${J.substring(0,J.length-1)}</span><span style='color:var(--red);'>*</span>`:G`<span class="key-label" style="display:inline-block; margin-left:-6px;">${C||t["::deprecated"]?G`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""} ${J==="::props"?"":J}</span>`}
|
||
${t["::type"]==="xxx-of"&&n==="array"?G`<span style="color:var(--primary-color)">ARRAY</span>`:""}
|
||
</div>
|
||
<div class='td key-type' title="${t["::readwrite"]==="readonly"?"Read-Only":t["::readwrite"]==="writeonly"?"Write-Only":""}">
|
||
${(t["::type"]||"").includes("xxx-of")?"":P}
|
||
${t["::readwrite"]==="readonly"?" 🆁":t["::readwrite"]==="writeonly"?" 🆆":""}
|
||
</div>
|
||
<div class='td key-descr m-markdown-small' style='line-height:1.7'>${In(yt(p||""))}</div>
|
||
</div>`:G`
|
||
${t["::type"]==="array"&&n==="array"?G`
|
||
<div class='tr'>
|
||
<div class='td key'></div>
|
||
<div class='td key-type'>
|
||
${i&&i!=="object"?`${n} of ${i}`:n}
|
||
</div>
|
||
<div class='td key-descr'></div>
|
||
</div>`:""}`}
|
||
<div class='object-body'>
|
||
${Array.isArray(t)&&t[0]?G`${this.generateTree(t[0],"xxx-of-option","","::ARRAY~OF","",$,L,"")}`:G`
|
||
${Object.keys(t).map((tt=>{var ut;return G`
|
||
${["::title","::description","::type","::props","::deprecated","::array-type","::readwrite","::dataTypeLabel","::nullable"].includes(tt)?t[tt]["::type"]==="array"||t[tt]["::type"]==="object"?G`${this.generateTree(t[tt]["::type"]==="array"?t[tt]["::props"]:t[tt],t[tt]["::type"],t[tt]["::array-type"]||"",tt,t[tt]["::description"],$,L,t[tt]["::readwrite"]?t[tt]["::readwrite"]:"",C||t[tt]["::deprecated"])}`:"":G`${this.generateTree(t[tt]["::type"]==="array"?t[tt]["::props"]:t[tt],t[tt]["::type"],t[tt]["::array-type"]||"",tt,((ut=t[tt])===null||ut===void 0?void 0:ut["::description"])||"",$,L,t[tt]["::readwrite"]?t[tt]["::readwrite"]:"",C||t[tt]["::deprecated"])}`}
|
||
`}))}
|
||
`}
|
||
</div>
|
||
`;const[re,le,he,xe,pe,_e,ke,Be,Ee]=t.split("~|~");if(le==="🆁"&&this.schemaHideReadOnly==="true"||le==="🆆"&&this.schemaHideWriteOnly==="true")return;const ye=re.replace(/┃.*/g,"").replace(/[^a-zA-Z0-9+]/g,"").substring(0,4).toLowerCase(),ze=he||xe||pe||_e?'<span class="descr-expand-toggle">➔</span>':"";let Le="";return Le=n==="array"?G`
|
||
<div class='td key-type ${ye}' title="${S==="readonly"?"Read-Only":le==="writeonly"?"Write-Only":""}">
|
||
[${re}] ${S==="readonly"?"🆁":S==="writeonly"?"🆆":""}
|
||
</div>`:G`
|
||
<div class='td key-type ${ye}' title="${le==="🆁"?"Read-Only":le==="🆆"?"Write-Only":""}">
|
||
${re} ${le}
|
||
</div>`,G`
|
||
<div class = "tr primitive" title="${C||Ee?"Deprecated":""}">
|
||
<div class="td key ${C||Ee?"deprecated":""}" style='padding-left:${U}px'>
|
||
${C||Ee?G`<svg viewBox="0 0 10 10" width="10" height="10" style="stroke:var(--red); margin-right:-6px"><path d="M2 2L8 8M2 8L8 2"/></svg>`:""}
|
||
${(D=J)!==null&&D!==void 0&&D.endsWith("*")?G`
|
||
<span class="key-label">${J.substring(0,J.length-1)}</span>
|
||
<span style='color:var(--red);'>*</span>`:l.startsWith("::OPTION")?G`<span class='xxx-of-key'>${J}</span><span class="xxx-of-descr">${Y}</span>`:G`${J?G`<span class="key-label"> ${J}</span>`:G`<span class="xxx-of-descr">${Be}</span>`}`}
|
||
</div>
|
||
${Le}
|
||
<div class='td key-descr' style='font-size: var(--font-size-small)'>
|
||
${G`<span class="m-markdown-small">
|
||
${In(yt(n==="array"?`${ze} ${p}`:Be?`${ze} <b>${Be}:</b> ${ke}`:`${ze} ${ke}`))}
|
||
</span>`}
|
||
${he?G`<div class='' style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Constraints: </span> ${he}</div>`:""}
|
||
${xe?G`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Default: </span>${xe}</div>`:""}
|
||
${pe?G`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>${re==="const"?"Value":"Allowed"}: </span>${pe}</div>`:""}
|
||
${_e?G`<div style='display:inline-block; line-break:anywhere; margin-right:8px;'> <span class='bold-text'>Pattern: </span>${_e}</div>`:""}
|
||
</div>
|
||
</div>
|
||
`}handleAllEvents(t){if(t.target.classList.contains("obj-toggle"))this.toggleObjectExpand(t);else if(t.target.classList.contains("schema-multiline-toggle"))this.schemaDescriptionExpanded=this.schemaDescriptionExpanded==="true"?"false":"true";else if(t.target.classList.contains("descr-expand-toggle")){const n=t.target.closest(".tr");n&&(n.classList.toggle("expanded-descr"),n.style.maxHeight=n.scrollHeight)}}toggleObjectExpand(t){const n=t.target.closest(".tr");n.classList.contains("expanded")?(n.classList.add("collapsed"),n.classList.remove("expanded"),t.target.innerText="+"):(n.classList.remove("collapsed"),n.classList.add("expanded"),t.target.innerText="-")}});function cY(t){const n=new yt.Renderer;return n.heading=(i,l,p,v)=>`<h${l} class="observe-me" id="${t}--${v.slug(p)}">${i}</h${l}>`,n}function uY(t){const n=t.target.closest(".tag-container").querySelector(".tag-description"),i=t.target.closest(".tag-container").querySelector(".tag-icon");n&&i&&(n.classList.contains("expanded")?(n.style.maxHeight=0,n.classList.replace("expanded","collapsed"),i.classList.replace("expanded","collapsed")):(n.style.maxHeight=`${n.scrollHeight}px`,n.classList.replace("collapsed","expanded"),i.classList.replace("collapsed","expanded")))}function _R(t,n="",i=""){var l,p,v,x,S,C,N,D,$;const L=new Set;for(const re in t.responses)for(const le in(U=t.responses[re])===null||U===void 0?void 0:U.content){var U;L.add(le.trim())}const J=[...L].join(", "),Y=this.resolvedSpec.securitySchemes.filter((re=>{var le;return re.finalKeyValue&&((le=t.security)===null||le===void 0?void 0:le.some((he=>re.securitySchemeId in he)))}))||[],Z=this.resolvedSpec.securitySchemes.find((re=>re.securitySchemeId===mo&&re.value!=="-"));Z&&Y.push(Z);const P=t.xCodeSamples?oM.call(this,t.xCodeSamples):"";return G`
|
||
${this.renderStyle==="read"?G`<div class='divider' part="operation-divider"></div>`:""}
|
||
<div class='expanded-endpoint-body observe-me ${t.method} ${t.deprecated?"deprecated":""} ' part="section-operation ${t.elementId}" id='${t.elementId}'>
|
||
${this.renderStyle==="focused"&&n!=="General ⦂"?G`
|
||
<div class="tag-container" part="section-operation-tag">
|
||
<span class="upper" style="font-weight:bold; font-size:18px;"> ${n} </span>
|
||
${i?G`
|
||
<svg class="tag-icon collapsed" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" style="stroke:var(--primary-color); vertical-align:top; cursor:pointer"
|
||
@click="${re=>{uY.call(this,re)}}"
|
||
>
|
||
<path d="M12 20h-6a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h8"></path><path d="M18 4v17"></path><path d="M15 18l3 3l3 -3"></path>
|
||
</svg>
|
||
<div class="tag-description collapsed" style="max-height:0px; overflow:hidden; margin-top:16px; border:1px solid var(--border-color)">
|
||
<div class="m-markdown" style="padding:8px"> ${In(yt(i))}</div>
|
||
</div>`:""}
|
||
</div>
|
||
`:""}
|
||
${t.deprecated?G`<div class="bold-text red-text"> DEPRECATED </div>`:""}
|
||
${G`
|
||
${t.xBadges&&((l=t.xBadges)===null||l===void 0?void 0:l.length)>0?G`
|
||
<div style="display:flex; flex-wrap:wrap; margin-bottom: -24px; font-size: var(--font-size-small);">
|
||
${t.xBadges.map((re=>re.color==="none"?"":G`<span style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${re.color}, var(--input-bg)); color:var(--${re.color}); border:1px solid var(--${re.color})">${re.label}</span>`))}
|
||
</div>
|
||
`:""}
|
||
<h2 part="section-operation-summary"> ${t.shortSummary||`${t.method.toUpperCase()} ${t.path}`}</h2>
|
||
${t.isWebhook?G`<span part="section-operation-webhook" style="color:var(--primary-color); font-weight:bold; font-size: var(--font-size-regular);"> WEBHOOK </span>`:G`
|
||
<div part="section-operation-webhook-method" class="mono-font regular-font-size" style="text-align:left; direction:ltr; padding: 8px 0; color:var(--fg3)">
|
||
<span part="label-operation-method" class="regular-font upper method-fg bold-text ${t.method}">${t.method}</span>
|
||
<span part="label-operation-path">${t.path}</span>
|
||
</div>
|
||
`}
|
||
<slot name="${t.elementId}"></slot>`}
|
||
${t.description?G`<div class="m-markdown"> ${In(yt(t.description))}</div>`:""}
|
||
${aM.call(this,t.security)}
|
||
${(p=t.externalDocs)!==null&&p!==void 0&&p.url||(v=t.externalDocs)!==null&&v!==void 0&&v.description?G`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
|
||
<div class="m-markdown"> ${In(yt(((x=t.externalDocs)===null||x===void 0?void 0:x.description)||""))} </div>
|
||
${(S=t.externalDocs)!==null&&S!==void 0&&S.url?G`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${(C=t.externalDocs)===null||C===void 0?void 0:C.url}" target="_blank">
|
||
${(N=t.externalDocs)===null||N===void 0?void 0:N.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
|
||
</a>`:""}
|
||
</div>`:""}
|
||
${P}
|
||
<div class='expanded-req-resp-container'>
|
||
<api-request
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
method = "${t.method}"
|
||
path = "${t.path}"
|
||
.security = "${t.security}"
|
||
.parameters = "${t.parameters}"
|
||
.request_body = "${t.requestBody}"
|
||
.api_keys = "${Y}"
|
||
.servers = "${t.servers}"
|
||
server-url = "${((D=t.servers)===null||D===void 0||(D=D[0])===null||D===void 0?void 0:D.url)||(($=this.selectedServer)===null||$===void 0?void 0:$.computedUrl)}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "${this.allowTry}"
|
||
show-curl-before-try = "${this.showCurlBeforeTry}"
|
||
accept = "${J}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"||t.isWebhook?"false":"true"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
${t.callbacks?lM.call(this,t.callbacks):""}
|
||
|
||
<api-response
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
.responses = "${t.responses}"
|
||
render-style = "${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"||t.isWebhook?"false":"true"}"
|
||
selected-status = "${Object.keys(t.responses||{})[0]||""}"
|
||
exportparts = "btn:btn, btn-response-status:btn-response-status, btn-selected-response-status:btn-selected-response-status, btn-fill:btn-fill, btn-copy:btn-copy,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>
|
||
`}function dY(){return this.resolvedSpec?G`
|
||
${this.resolvedSpec.tags.map((t=>G`
|
||
<section id="${t.elementId}" part="section-tag" class="regular-font section-gap--read-mode observe-me" style="border-top:1px solid var(--primary-color);">
|
||
<div class="title tag" part="section-tag-title label-tag-title">${t.displayName||t.name}</div>
|
||
<slot name="${t.elementId}"></slot>
|
||
<div class="regular-font-size">
|
||
${In(`
|
||
<div class="m-markdown regular-font">
|
||
${yt(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:cY(t.elementId)}:void 0)}
|
||
</div>`)}
|
||
</div>
|
||
</section>
|
||
<section class="regular-font section-gap--read-mode" part="section-operations-in-tag">
|
||
${t.paths.map((n=>_R.call(this,n)))}
|
||
</section>
|
||
`))}
|
||
`:""}function hY(t){return G`
|
||
<div class='divider'></div>
|
||
<div class='expanded-endpoint-body observe-me ${t.name}' id='cmp--${t.id}' >
|
||
<div style="font-weight:bold"> ${t.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400;"> Schema </span></div>
|
||
${this.schemaStyle==="table"?G`
|
||
<schema-table
|
||
.data = '${ts(t.component,{})}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table>`:G`
|
||
<schema-tree
|
||
.data = '${ts(t.component,{})}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>`}
|
||
</div>`}function pY(t,n){return t.id.indexOf("schemas-")!==-1?hY.call(this,t):G`
|
||
<div class='divider'></div>
|
||
<div class='expanded-endpoint-body observe-me ${t.name}' id='cmp--${t.id}' >
|
||
${G`
|
||
<div style="font-weight:bold"> ${t.name} <span style="color:var(--light-fg); font-size:var(--font-size-small); font-weight:400"> ${n} </span> </div>
|
||
${t.component?G`
|
||
<div class='mono-font regular-font-size' style='padding: 8px 0; color:var(--fg2)'>
|
||
<json-tree class="border tree" render-style='${this.renderStyle}' .data="${t.component}"> </json-tree>
|
||
</div>`:""}
|
||
`}
|
||
</div>
|
||
`}function fY(){return this.resolvedSpec?G`
|
||
${this.resolvedSpec.components.map((t=>G`
|
||
<div id="cmp--${t.name.toLowerCase()}" class='regular-font section-gap--read-mode observe-me' style="border-top:1px solid var(--primary-color);">
|
||
<div class="title tag">${t.name}</div>
|
||
<div class="regular-font-size">
|
||
${In(`<div class='m-markdown regular-font'>${yt(t.description?t.description:"")}</div>`)}
|
||
</div>
|
||
</div>
|
||
<div class='regular-font section-gap--read-mode'>
|
||
${t.subComponents.filter((n=>n.expanded!==!1)).map((n=>pY.call(this,n,t.name)))}
|
||
</div>
|
||
`))}
|
||
`:""}function mY(){const t=new yt.Renderer;return t.heading=(n,i,l,p)=>`<h${i} class="observe-me" id="overview--${p.slug(l)}">${n}</h${i}>`,t}function zE(){var t,n,i,l;return G`
|
||
<section id="overview" part="section-overview"
|
||
class="observe-me ${this.renderStyle==="view"?"section-gap":"section-gap--read-mode"}">
|
||
${(t=this.resolvedSpec)!==null&&t!==void 0&&t.info?G`
|
||
<div id="api-title" part="section-overview-title" style="font-size:32px">
|
||
${this.resolvedSpec.info.title}
|
||
${this.resolvedSpec.info.version?G`
|
||
<span style = 'font-size:var(--font-size-small);font-weight:bold'>
|
||
${this.resolvedSpec.info.version}
|
||
</span>`:""}
|
||
</div>
|
||
<div id="api-info" style="font-size:calc(var(--font-size-regular) - 1px); margin-top:8px;">
|
||
${(n=this.resolvedSpec.info.contact)!==null&&n!==void 0&&n.email?G`<span>${this.resolvedSpec.info.contact.name||"Email"}:
|
||
<a href="mailto:${this.resolvedSpec.info.contact.email}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.email}</a>
|
||
</span>`:""}
|
||
${(i=this.resolvedSpec.info.contact)!==null&&i!==void 0&&i.url?G`<span>URL: <a href="${this.resolvedSpec.info.contact.url}" part="anchor anchor-overview">${this.resolvedSpec.info.contact.url}</a></span>`:""}
|
||
${this.resolvedSpec.info.license?G`<span>License:
|
||
${this.resolvedSpec.info.license.url?G`<a href="${this.resolvedSpec.info.license.url}" part="anchor anchor-overview">${this.resolvedSpec.info.license.name}</a>`:this.resolvedSpec.info.license.name} </span>`:""}
|
||
${this.resolvedSpec.info.termsOfService?G`<span><a href="${this.resolvedSpec.info.termsOfService}" part="anchor anchor-overview">Terms of Service</a></span>`:""}
|
||
${this.specUrl&&this.allowSpecFileDownload==="true"?G`
|
||
<div style="display:flex; margin:12px 0; gap:8px; justify-content: start;">
|
||
<button class="m-btn thin-border" style="min-width:170px" part="btn btn-outline" @click='${p=>{qp(this.specUrl,"openapi-spec")}}'>Download OpenAPI spec</button>
|
||
${(l=this.specUrl)!==null&&l!==void 0&&l.trim().toLowerCase().endsWith("json")?G`<button class="m-btn thin-border" style="width:200px" part="btn btn-outline" @click='${p=>{Hg(this.specUrl)}}'>View OpenAPI spec (New Tab)</button>`:""}
|
||
</div>`:""}
|
||
</div>
|
||
<slot name="overview"></slot>
|
||
<div id="api-description">
|
||
${this.resolvedSpec.info.description?G`${In(`
|
||
<div class="m-markdown regular-font">
|
||
${yt(this.resolvedSpec.info.description,this.infoDescriptionHeadingsInNavBar==="true"?{renderer:mY()}:void 0)}
|
||
</div>`)}`:""}
|
||
</div>
|
||
`:""}
|
||
</section>
|
||
`}function $R(t){var n;const i=(n=this.resolvedSpec)===null||n===void 0?void 0:n.servers.find((l=>l.url===t));return!!i&&(this.selectedServer=i,this.requestUpdate(),this.dispatchEvent(new CustomEvent("api-server-change",{bubbles:!0,composed:!0,detail:{selectedServer:i}})),!0)}function mM(t,n){const i=[...t.currentTarget.closest("table").querySelectorAll("input, select")];let l=n.url;i.forEach((p=>{const v=new RegExp(`{${p.dataset.var}}`,"g");l=l.replace(v,p.value)})),n.computedUrl=l,this.requestUpdate()}function gY(){return this.selectedServer&&this.selectedServer.variables?G`
|
||
<div class="table-title">SERVER VARIABLES</div>
|
||
<table class='m-table' role='presentation'>
|
||
${Object.entries(this.selectedServer.variables).map((t=>G`
|
||
<tr>
|
||
<td style="vertical-align: middle;" >${t[0]}</td>
|
||
<td>
|
||
${t[1].enum?G`
|
||
<select
|
||
data-var = "${t[0]}"
|
||
@input = ${n=>{mM.call(this,n,this.selectedServer)}}
|
||
>
|
||
${Object.entries(t[1].enum).map((n=>t[1].default===n[1]?G`
|
||
<option
|
||
selected
|
||
label = ${n[1]}
|
||
value = ${n[1]}
|
||
/>`:G`
|
||
<option
|
||
label = ${n[1]}
|
||
value = ${n[1]}
|
||
/>`))}
|
||
</select>`:G`
|
||
<input
|
||
type = "text"
|
||
part="textbox textbox-server-var"
|
||
spellcheck = "false"
|
||
data-var = "${t[0]}"
|
||
value = "${t[1].default}"
|
||
@input = ${n=>{mM.call(this,n,this.selectedServer)}}
|
||
/>`}
|
||
</td>
|
||
</tr>
|
||
${t[1].description?G`<tr><td colspan="2" style="border:none"><span class="m-markdown-small"> ${In(yt(t[1].description))} </span></td></tr>`:""}
|
||
`))}
|
||
</table>
|
||
`:""}function gM(){var t,n,i;return!this.resolvedSpec||this.resolvedSpec.specLoadError?"":G`
|
||
<section id = 'servers' part="section-servers" style="text-align:left; direction:ltr; margin-top:24px; margin-bottom:24px;" class='regular-font observe-me ${"read focused".includes(this.renderStyle)?"section-gap--read-mode":"section-gap"}'>
|
||
<div part = "section-servers-title" class = "sub-title">API SERVER</div>
|
||
<div class = 'mono-font' style='margin: 12px 0; font-size:calc(var(--font-size-small) + 1px);'>
|
||
${this.resolvedSpec.servers&&((t=this.resolvedSpec.servers)===null||t===void 0?void 0:t.length)!==0?G`
|
||
${(n=this.resolvedSpec)===null||n===void 0?void 0:n.servers.map(((l,p)=>G`
|
||
<input type = 'radio'
|
||
name = 'api_server'
|
||
id = 'srvr-opt-${p}'
|
||
value = '${l.url}'
|
||
@change = ${()=>{$R.call(this,l.url)}}
|
||
.checked = '${this.selectedServer.url===l.url}'
|
||
style = 'margin:4px 0; cursor:pointer'
|
||
/>
|
||
<label style='cursor:pointer' for='srvr-opt-${p}'>
|
||
${l.url} ${l.description?G`- <span class='regular-font'>${l.description} </span>`:""}
|
||
</label>
|
||
<br/>
|
||
`))}
|
||
`:""}
|
||
<div class="table-title primary-text" part="label-selected-server"> SELECTED: ${((i=this.selectedServer)===null||i===void 0?void 0:i.computedUrl)||"none"}</div>
|
||
</div>
|
||
<slot name="servers"></slot>
|
||
${gY.call(this)}
|
||
</section>`}function yM(t,n="toggle"){const i=t?.closest(".nav-bar-tag-and-paths"),l=i?.querySelector(".nav-bar-paths-under-tag");if(i){const p=i.classList.contains("expanded");!p||n!=="toggle"&&n!=="collapse"?p||n!=="toggle"&&n!=="expand"||(i.classList.replace("collapsed","expanded"),l.style.maxHeight=`${l.scrollHeight}px`):(l.style.maxHeight=0,i.classList.replace("expanded","collapsed"))}}function vM(t){var n,i,l,p;if(t.type!=="click"&&(t.type!=="keyup"||t.keyCode!==13))return;const v=t.target;t.stopPropagation(),((n=v.dataset)===null||n===void 0?void 0:n.action)==="navigate"?this.scrollToEventTarget(t,!1):((i=v.dataset)===null||i===void 0?void 0:i.action)==="expand-all"||((l=v.dataset)===null||l===void 0?void 0:l.action)==="collapse-all"?(function(x,S="expand-all"){if(x.type!=="click"&&(x.type!=="keyup"||x.keyCode!==13))return;const C=[...x.target.closest(".nav-scroll").querySelectorAll(".nav-bar-tag-and-paths")];S==="expand-all"?C.forEach((N=>{const D=N.querySelector(".nav-bar-paths-under-tag");N.classList.replace("collapsed","expanded"),D.style.maxHeight=`${D?.scrollHeight}px`})):C.forEach((N=>{N.classList.replace("expanded","collapsed"),N.querySelector(".nav-bar-paths-under-tag").style.maxHeight=0}))})(t,v.dataset.action):((p=v.dataset)===null||p===void 0?void 0:p.action)==="expand-collapse-tag"&&yM(v,"toggle")}function yY(){var t,n;return!this.resolvedSpec||this.resolvedSpec.specLoadError?G`
|
||
<nav class='nav-bar' part='section-navbar'>
|
||
<slot name='nav-logo' class='logo'></slot>
|
||
</nav>
|
||
`:G`
|
||
<nav class='nav-bar ${this.renderStyle}' part='section-navbar'>
|
||
<slot name='nav-logo' class='logo'></slot>
|
||
${this.allowSearch==="false"&&this.allowAdvancedSearch==="false"?"":G`
|
||
<div style='display:flex; flex-direction:row; justify-content:center; align-items:stretch; padding:8px 24px 12px 24px; ${this.allowAdvancedSearch==="false"?"border-bottom: 1px solid var(--nav-hover-bg-color)":""}' part='section-navbar-search'>
|
||
${this.allowSearch==="false"?"":G`
|
||
<div style = 'display:flex; flex:1; line-height:22px;'>
|
||
<input id = 'nav-bar-search'
|
||
part = 'textbox textbox-nav-filter'
|
||
style = 'width:100%; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)'
|
||
type = 'text'
|
||
placeholder = 'Filter'
|
||
@change = '${this.onSearchChange}'
|
||
spellcheck = 'false'
|
||
>
|
||
<div style='margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;'>↩</div>
|
||
</div>
|
||
${this.searchVal?G`
|
||
<button @click = '${this.onClearSearch}' class='m-btn thin-border' style='margin-left:5px; color:var(--nav-text-color); width:75px; padding:6px 8px;' part='btn btn-outline btn-clear-filter'>
|
||
CLEAR
|
||
</button>`:""}
|
||
`}
|
||
${this.allowAdvancedSearch==="false"||this.searchVal?"":G`
|
||
<button class='m-btn primary' part='btn btn-fill btn-search' style='margin-left:5px; padding:6px 8px; width:75px' @click='${this.onShowSearchModalClicked}'>
|
||
SEARCH
|
||
</button>
|
||
`}
|
||
</div>
|
||
`}
|
||
${G`<nav class='nav-scroll' tabindex='-1' part='section-navbar-scroll' @click='${i=>vM.call(this,i)}' @keyup='${i=>vM.call(this,i)}' >
|
||
${this.showInfo!=="false"&&this.resolvedSpec.info?G`
|
||
${this.infoDescriptionHeadingsInNavBar==="true"?G`
|
||
${this.resolvedSpec.infoDescriptionHeaders.length>0?G`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-content-id='overview' data-action='navigate' tabindex='0' part='section-navbar-item section-navbar-overview'>
|
||
${((t=this.resolvedSpec.info)===null||t===void 0||(t=t.title)===null||t===void 0?void 0:t.trim())||"Overview"}
|
||
</div>`:""}
|
||
<div class='overview-headers'>
|
||
${this.resolvedSpec.infoDescriptionHeaders.map((i=>G`
|
||
<div
|
||
class='nav-bar-h${i.depth} ${this.navActiveItemMarker}'
|
||
id='link-overview--${new yt.Slugger().slug(i.text)}'
|
||
data-action='navigate'
|
||
data-content-id='overview--${new yt.Slugger().slug(i.text)}'
|
||
>
|
||
${i.text}
|
||
</div>`))}
|
||
</div>
|
||
${this.resolvedSpec.infoDescriptionHeaders.length>0?G`<hr style='border-top: 1px solid var(--nav-hover-bg-color); border-width:1px 0 0 0; margin: 15px 0 0 0'/>`:""}
|
||
`:G`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-overview' data-action='navigate' data-content-id='overview' tabindex='0'>
|
||
${((n=this.resolvedSpec.info)===null||n===void 0||(n=n.title)===null||n===void 0?void 0:n.trim())||"Overview"}
|
||
</div>`}
|
||
`:""}
|
||
|
||
${this.allowServerSelection==="false"?"":G`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-servers' data-action='navigate' data-content-id='servers' tabindex='0' part='section-navbar-item section-navbar-servers'> API Servers </div>`}
|
||
${this.allowAuthentication!=="false"&&this.resolvedSpec.securitySchemes?G`<div class='nav-bar-info ${this.navActiveItemMarker}' id='link-auth' data-action='navigate' data-content-id='auth' tabindex='0' part='section-navbar-item section-navbar-auth'> Authentication </div>`:""}
|
||
|
||
<div id='link-operations-top' class='nav-bar-section operations' data-action='navigate' data-content-id='${this.renderStyle==="focused"?"":"operations-top"}' part='section-navbar-item section-navbar-operations-top'>
|
||
<div style='font-size:16px; display:flex; margin-left:10px;'>
|
||
${this.renderStyle==="focused"?G`
|
||
<div class='nav-bar-expand-all'
|
||
data-action='expand-all'
|
||
tabindex='0'
|
||
title='Expand all'
|
||
>▸</div>
|
||
<div class='nav-bar-collapse-all'
|
||
data-action='collapse-all'
|
||
tabindex='0'
|
||
title='Collapse all'
|
||
>▸</div>`:""}
|
||
</div>
|
||
<div class='nav-bar-section-title'> OPERATIONS </div>
|
||
</div>
|
||
|
||
<!-- TAGS AND PATHS-->
|
||
${this.resolvedSpec.tags.filter((i=>i.paths.filter((l=>ih(this.searchVal,l,i.name))).length)).map((i=>{var l;return G`
|
||
<div class='nav-bar-tag-and-paths ${this.renderStyle==="read"||i.expanded?"expanded":"collapsed"}' >
|
||
${i.name==="General ⦂"?G`<hr style='border:none; border-top: 1px dotted var(--nav-text-color); opacity:0.3; margin:-1px 0 0 0;'/>`:G`
|
||
<div
|
||
class='nav-bar-tag ${this.navActiveItemMarker}'
|
||
part='section-navbar-item section-navbar-tag'
|
||
id='link-${i.elementId}'
|
||
data-action='${this.renderStyle==="read"||this.onNavTagClick==="show-description"?"navigate":"expand-collapse-tag"}'
|
||
data-content-id='${(this.renderStyle==="read"?`${i.elementId}`:this.onNavTagClick==="show-description")?`${i.elementId}`:""}'
|
||
data-first-path-id='${i.firstPathId}'
|
||
tabindex='0'
|
||
>
|
||
<div style="pointer-events:none;">${i.displayName||i.name}</div>
|
||
<div class='nav-bar-tag-icon' tabindex='0' data-action='expand-collapse-tag'></div>
|
||
</div>
|
||
`}
|
||
${this.infoDescriptionHeadingsInNavBar==="true"?G`
|
||
${this.renderStyle==="focused"&&this.onNavTagClick==="expand-collapse"?"":G`
|
||
<div class='tag-headers'>
|
||
${i.headers.map((p=>G`
|
||
<div
|
||
class='nav-bar-h${p.depth} ${this.navActiveItemMarker}'
|
||
part='section-navbar-item section-navbar-h${p.depth}'
|
||
id='link-${i.elementId}--${new yt.Slugger().slug(p.text)}'
|
||
data-action='navigate'
|
||
data-content-id='${i.elementId}--${new yt.Slugger().slug(p.text)}'
|
||
tabindex='0'
|
||
> ${p.text}</div>`))}
|
||
</div>`}`:""}
|
||
<div class='nav-bar-paths-under-tag' style='max-height:${i.expanded||this.renderStyle==="read"?50*(((l=i.paths)===null||l===void 0?void 0:l.length)||1):0}px;'>
|
||
<!-- Paths in each tag (endpoints) -->
|
||
${i.paths.filter((p=>!this.searchVal||ih(this.searchVal,p,i.name))).map((p=>G`
|
||
<div
|
||
class='nav-bar-path ${this.navActiveItemMarker} ${this.usePathInNavBar==="true"?"small-font":""}'
|
||
part='section-navbar-item section-navbar-path'
|
||
data-action='navigate'
|
||
data-content-id='${p.elementId}'
|
||
id='link-${p.elementId}'
|
||
tabindex='0'
|
||
>
|
||
<span style = 'display:flex; pointer-events: none; align-items:start; ${p.deprecated?"filter:opacity(0.5)":""}'>
|
||
${G`<span class='nav-method ${this.showMethodInNavBar} ${p.method}' style='pointer-events: none;'>
|
||
${this.showMethodInNavBar==="as-colored-block"?p.method.substring(0,3).toUpperCase():p.method.toUpperCase()}
|
||
</span>`}
|
||
${p.isWebhook?G`<span style='font-weight:bold; pointer-events: none; margin-right:8px; font-size: calc(var(--font-size-small) - 2px)'>WEBHOOK</span>`:""}
|
||
${this.usePathInNavBar==="true"?G`<span style='pointer-events: none;' class='mono-font'>${p.path}</span>`:p.summary||p.shortSummary}
|
||
</span>
|
||
</div>`))}
|
||
</div>
|
||
</div>
|
||
`}))}
|
||
|
||
<!-- COMPONENTS -->
|
||
${this.resolvedSpec.components&&this.showComponents==="true"&&this.renderStyle==="focused"?G`
|
||
<div id='link-components' class='nav-bar-section components'>
|
||
<div></div>
|
||
<div class='nav-bar-section-title'>COMPONENTS</div>
|
||
</div>
|
||
${this.resolvedSpec.components.map((i=>i.subComponents.length?G`
|
||
<div class='nav-bar-tag'
|
||
part='section-navbar-item section-navbar-tag'
|
||
data-action='navigate'
|
||
data-content-id='cmp--${i.name.toLowerCase()}'
|
||
id='link-cmp--${i.name.toLowerCase()}'
|
||
>
|
||
${i.name}
|
||
</div>
|
||
${i.subComponents.filter((l=>l.expanded!==!1)).map((l=>G`
|
||
<div class='nav-bar-path' data-action='navigate' data-content-id='cmp--${l.id}' id='link-cmp--${l.id}'>
|
||
<span style = 'pointer-events: none;'> ${l.name} </span>
|
||
</div>`))}`:""))}`:""}
|
||
</nav>`}
|
||
</nav>
|
||
`}function vY(t){const n=new yt.Renderer;return n.heading=(i,l,p,v)=>`<h${l} class="observe-me" id="${t}--${v.slug(p)}">${i}</h${l}>`,n}function LE(t){return G`
|
||
<div class='regular-font section-gap--focused-mode' part="section-operations-in-tag">
|
||
${t}
|
||
</div>`}function xM(){var t;if(this.showInfo==="true")return LE(zE.call(this));const n=this.resolvedSpec.tags[0],i=(t=this.resolvedSpec.tags[0])===null||t===void 0?void 0:t.paths[0];return LE(n&&i?_R.call(this,i,n.name):"")}function xY(t){return G`
|
||
<h1 id="${t.elementId}">${t.displayName||t.name}</h1>
|
||
${this.onNavTagClick==="show-description"&&t.description?G`
|
||
<div class="m-markdown">
|
||
${In(`
|
||
<div class="m-markdown regular-font">
|
||
${yt(t.description||"",this.infoDescriptionHeadingsInNavBar==="true"?{renderer:vY(t.elementId)}:void 0)}
|
||
</div>`)}
|
||
</div>`:""}
|
||
`}function bY(){if(!this.focusedElementId||!this.resolvedSpec)return;const t=this.focusedElementId;let n,i=null,l=null,p=0;if(t.startsWith("overview")&&this.showInfo==="true")n=zE.call(this);else if(t==="auth"&&this.allowAuthentication==="true")n=iM.call(this);else if(t==="servers"&&this.allowServerSelection==="true")n=gM.call(this);else if(t==="operations-top")n=G`
|
||
<div id="operations-top" class="observe-me">
|
||
<slot name="operations-top"></slot>
|
||
</div>`;else if(t.startsWith("cmp--")&&this.showComponents==="true")n=fY.call(this);else if(t.startsWith("tag--")){const v=t.indexOf("--",4)>0?t.substring(0,t.indexOf("--",5)):t;l=this.resolvedSpec.tags.find((x=>x.elementId===v)),n=l?LE.call(this,xY.call(this,l)):xM.call(this)}else{for(p=0;p<this.resolvedSpec.tags.length&&(l=this.resolvedSpec.tags[p],i=this.resolvedSpec.tags[p].paths.find((v=>`${v.elementId}`===t)),!i);p+=1);i?(yM(this.shadowRoot.getElementById(`link-${t}`),"expand"),n=LE.call(this,_R.call(this,i,l.name||"",l.description||""))):n=xM.call(this)}return n}function wY(t){if(t.expanded)t.expanded=!1,this.updateRoute==="true"&&this.replaceHistoryState("");else if(t.expanded=!0,this.updateRoute==="true"){const n=`${this.routePrefix||"#"}${t.elementId}`;window.location.hash!==n&&this.replaceHistoryState(t.elementId)}this.requestUpdate()}function SY(t,n="expand-all"){const i=[...t.querySelectorAll(".section-tag")];n==="expand-all"?i.map((l=>{l.classList.replace("collapsed","expanded")})):i.map((l=>{l.classList.replace("expanded","collapsed")}))}function bM(t,n="expand-all"){SY.call(this,t.target.closest(".operations-root"),n)}function wM(t,n=!1){return G`
|
||
<summary @click="${i=>{wY.call(this,t,i)}}" part="section-endpoint-head-${t.expanded?"expanded":"collapsed"}" class='endpoint-head ${t.method} ${t.deprecated?"deprecated":""} ${n||t.expanded?"expanded":"collapsed"}'>
|
||
<div part="section-endpoint-head-method" class="method ${t.method} ${t.deprecated?"deprecated":""}"> ${t.method} </div>
|
||
<div part="section-endpoint-head-path" class="path ${t.deprecated?"deprecated":""}">
|
||
${t.path}
|
||
${t.isWebhook?G`<span style="font-family: var(--font-regular); font-size: var(--); font-size: var(--font-size-small); color:var(--primary-color); margin-left: 16px"> Webhook</span>`:""}
|
||
</div>
|
||
${t.deprecated?G`
|
||
<span style="font-size:var(--font-size-small); text-transform:uppercase; font-weight:bold; color:var(--red); margin:2px 0 0 5px;">
|
||
deprecated
|
||
</span>`:""}
|
||
${this.showSummaryWhenCollapsed?G`
|
||
<div class="only-large-screen" style="min-width:60px; flex:1"></div>
|
||
<div part="section-endpoint-head-description" class="descr">${t.summary||t.shortSummary} </div>`:""}
|
||
</summary>
|
||
`}function SM(t){var n,i,l,p,v,x,S,C;const N=new Set;for(const Y in t.responses)for(const Z in(D=t.responses[Y])===null||D===void 0?void 0:D.content){var D;N.add(Z.trim())}const $=[...N].join(", "),L=this.resolvedSpec.securitySchemes.filter((Y=>{var Z;return Y.finalKeyValue&&((Z=t.security)===null||Z===void 0?void 0:Z.some((P=>Y.securitySchemeId in P)))}))||[],U=this.resolvedSpec.securitySchemes.find((Y=>Y.securitySchemeId===mo&&Y.value!=="-"));U&&L.push(U);const J=t.xCodeSamples?oM(t.xCodeSamples):"";return G`
|
||
<div part="section-endpoint-body-${t.expanded?"expanded":"collapsed"}" class='endpoint-body ${t.method} ${t.deprecated?"deprecated":""}'>
|
||
<div class="summary">
|
||
${t.summary?G`<div class="title" part="section-endpoint-body-title">${t.summary}</div>`:t.shortSummary!==t.description?G`<div class="title" part="section-endpoint-body-title">${t.shortSummary}</div>`:""}
|
||
${t.xBadges&&((n=t.xBadges)===null||n===void 0?void 0:n.length)>0?G`
|
||
<div style="display:flex; flex-wrap:wrap;font-size: var(--font-size-small);">
|
||
${t.xBadges.map((Y=>Y.color==="none"?"":G`<span part="endpoint-badge" style="margin:1px; margin-right:5px; padding:1px 8px; font-weight:bold; border-radius:12px; background-color: var(--light-${Y.color}, var(--input-bg)); color:var(--${Y.color}); border:1px solid var(--${Y.color})">${Y.label}</span>`))}
|
||
</div>
|
||
`:""}
|
||
|
||
${t.description?G`<div part="section-endpoint-body-description" class="m-markdown"> ${In(yt(t.description))}</div>`:""}
|
||
${(i=t.externalDocs)!==null&&i!==void 0&&i.url||(l=t.externalDocs)!==null&&l!==void 0&&l.description?G`<div style="background-color:var(--bg3); padding:2px 8px 8px 8px; margin:8px 0; border-radius:var(--border-radius)">
|
||
<div class="m-markdown"> ${In(yt(((p=t.externalDocs)===null||p===void 0?void 0:p.description)||""))} </div>
|
||
${(v=t.externalDocs)!==null&&v!==void 0&&v.url?G`<a style="font-family:var(--font-mono); font-size:var(--font-size-small)" href="${(x=t.externalDocs)===null||x===void 0?void 0:x.url}" target="_blank">
|
||
${(S=t.externalDocs)===null||S===void 0?void 0:S.url} <div style="transform: rotate(270deg) scale(1.5); display: inline-block; margin-left:5px">⇲</div>
|
||
</a>`:""}
|
||
</div>`:""}
|
||
<slot name="${t.elementId}"></slot>
|
||
${aM.call(this,t.security)}
|
||
${J}
|
||
</div>
|
||
<div class='req-resp-container'>
|
||
<div style="display:flex; flex-direction:column" class="view-mode-request ${this.layout}-layout">
|
||
<api-request
|
||
class = "${this.renderStyle}-mode ${this.layout}-layout"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
method = "${t.method}"
|
||
path = "${t.path}"
|
||
.security = "${t.security}"
|
||
.parameters = "${t.parameters}"
|
||
.request_body = "${t.requestBody}"
|
||
.api_keys = "${L}"
|
||
.servers = "${t.servers}"
|
||
server-url = "${t.servers&&t.servers.length>0?t.servers[0].url:(C=this.selectedServer)===null||C===void 0?void 0:C.computedUrl}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
fill-request-fields-with-example = "${this.fillRequestFieldsWithExample}"
|
||
allow-try = "${this.allowTry}"
|
||
show-curl-before-try = "${this.showCurlBeforeTry}"
|
||
accept = "${$}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style = "${this.schemaStyle}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"||t.isWebhook?"false":"true"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
fetch-credentials = "${this.fetchCredentials}"
|
||
exportparts = "wrap-request-btn:wrap-request-btn, btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, btn-clear:btn-clear, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
file-input:file-input, textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param,
|
||
anchor:anchor, anchor-param-example:anchor-param-example, schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-request>
|
||
|
||
${t.callbacks?lM.call(this,t.callbacks):""}
|
||
</div>
|
||
|
||
<api-response
|
||
class = "${this.renderStyle}-mode"
|
||
style = "width:100%;"
|
||
webhook = "${t.isWebhook}"
|
||
.responses="${t.responses}"
|
||
active-schema-tab = "${this.defaultSchemaTab}"
|
||
render-style="${this.renderStyle}"
|
||
schema-style="${this.schemaStyle}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly==="never"?"false":t.isWebhook?"true":"false"}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly==="never"||t.isWebhook?"false":"true"}"
|
||
selected-status = "${Object.keys(t.responses||{})[0]||""}"
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-outline:btn-outline, btn-try:btn-try, file-input:file-input,
|
||
textbox:textbox, textbox-param:textbox-param, textarea:textarea, textarea-param:textarea-param, anchor:anchor, anchor-param-example:anchor-param-example, btn-clear-resp:btn-clear-resp,
|
||
tab-panel:tab-panel, tab-btn:tab-btn, tab-btn-row:tab-btn-row, tab-coontent:tab-content,
|
||
schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </api-response>
|
||
</div>
|
||
</div>`}function EY(t=!1,n=!1){return this.resolvedSpec?G`
|
||
${t?"":G`
|
||
<div style="display:flex; justify-content:flex-end;">
|
||
<span @click="${i=>bM(i,"expand-all")}" style="color:var(--primary-color); cursor:pointer;">
|
||
Expand all
|
||
</span>
|
||
|
|
||
<span @click="${i=>bM(i,"collapse-all")}" style="color:var(--primary-color); cursor:pointer;" >
|
||
Collapse all
|
||
</span>
|
||
sections
|
||
</div>`}
|
||
${this.resolvedSpec.tags.map((i=>G`
|
||
${t?G`
|
||
<div class='section-tag-body'>
|
||
${i.paths.filter((l=>!this.searchVal||ih(this.searchVal,l,i.name))).map((l=>G`
|
||
<section id='${l.elementId}' class='m-endpoint regular-font ${l.method} ${n||l.expanded?"expanded":"collapsed"}'>
|
||
${wM.call(this,l,n)}
|
||
${n||l.expanded?SM.call(this,l):""}
|
||
</section>`))}
|
||
</div>
|
||
`:G`
|
||
<div class='regular-font section-gap section-tag ${i.expanded?"expanded":"collapsed"}'>
|
||
<div class='section-tag-header' @click="${()=>{i.expanded=!i.expanded,this.requestUpdate()}}">
|
||
<div id='${i.elementId}' class="sub-title tag" style="color:var(--primary-color)">${i.displayName||i.name}</div>
|
||
</div>
|
||
<div class='section-tag-body'>
|
||
<slot name="${i.elementId}"></slot>
|
||
<div class="regular-font regular-font-size m-markdown" style="padding-bottom:12px">
|
||
${In(yt(i.description||""))}
|
||
</div>
|
||
${i.paths.filter((l=>!this.searchVal||ih(this.searchVal,l,i.name))).map((l=>G`
|
||
<section part="section-endpoint" id='${l.elementId}' class='m-endpoint regular-font ${l.method} ${n||l.expanded?"expanded":"collapsed"}'>
|
||
${wM.call(this,l,n)}
|
||
${n||l.expanded?SM.call(this,l):""}
|
||
</section>`))}
|
||
</div>
|
||
</div>
|
||
`}
|
||
`))}`:""}function NR(){return G`
|
||
<header class="row main-header regular-font" part="section-header" style="padding:8px 4px 8px 4px;min-height:48px;">
|
||
<div class="only-large-screen-flex" style="align-items: center;">
|
||
<slot name="logo" class="logo" part="section-logo">
|
||
${t="height:36px;width:36px;margin-left:5px",G`
|
||
<div style=${t}>
|
||
<svg viewBox="1 0 511 512">
|
||
<path d="M351 411a202 202 0 01-350 0 203 203 0 01333-24 203 203 0 0117 24zm0 0" fill="#adc165"/>
|
||
<path d="M334 387a202 202 0 01-216-69 202 202 0 01216 69zm78 32H85a8 8 0 01-8-8 8 8 0 018-8h327a8 8 0 017 8 8 8 0 01-7 8zm0 0" fill="#99aa52"/>
|
||
<path d="M374 338l-5 30a202 202 0 01-248-248 203 203 0 01253 218zm0 0" fill="#ffc73b"/>
|
||
<path d="M374 338a202 202 0 01-100-197 203 203 0 01100 197zm38 81l-6-2-231-231a8 8 0 0111-11l231 230a8 8 0 01-5 14zm0 0" fill="#efb025"/>
|
||
<path d="M311 175c0 75 40 140 101 175a202 202 0 000-350 202 202 0 00-101 175zm0 0" fill="#ff903e"/>
|
||
<path d="M412 419a8 8 0 01-8-8V85a8 8 0 0115 0v326a8 8 0 01-7 8zm0 0" fill="#e87425"/>
|
||
</svg>
|
||
</div>
|
||
`}
|
||
<!-- m-logo style="height:36px;width:36px;margin-left:5px"></m-logo -->
|
||
</slot>
|
||
<div class="header-title" part="label-header-title">${this.headingText}</div>
|
||
</div>
|
||
<div style="margin: 0px 8px;display:flex;flex:1">
|
||
${this.allowSpecUrlLoad==="false"?"":G`
|
||
<input id="spec-url"
|
||
type="text"
|
||
style="font-size:var(--font-size-small)"
|
||
class="header-input mono-font"
|
||
part="textbox textbox-spec-url"
|
||
placeholder="Spec URL"
|
||
value="${this.specUrl||""}"
|
||
@change="${this.onSpecUrlChange}"
|
||
spellcheck="false"
|
||
>
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
`}
|
||
${this.allowSpecFileLoad==="false"?"":G`
|
||
<input id="spec-file"
|
||
part = "file-input"
|
||
type="file"
|
||
style="display:none"
|
||
value="${this.specFile||""}"
|
||
@change="${this.onSpecFileChange}"
|
||
spellcheck="false"
|
||
>
|
||
<button class="m-btn primary only-large-screen" style="margin-left:10px;" part="btn btn-fill" @click="${this.onFileLoadClick}"> LOCAL JSON FILE </button>
|
||
`}
|
||
<slot name="header"></slot>
|
||
${this.allowSearch==="false"||"read focused".includes(this.renderStyle)?"":G`
|
||
<input id="search" class="header-input" type="text" part="textbox textbox-header-filter" placeholder="Filter" @change="${this.onSearchChange}" style="max-width:130px;margin-left:10px;" spellcheck="false" >
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
`}
|
||
|
||
${this.allowAdvancedSearch==="false"||"read focused".includes(this.renderStyle)?"":G`
|
||
<button class="m-btn primary only-large-screen" part="btn btn-fill btn-search" style="margin-left:10px;" @click="${this.onShowSearchModalClicked}">
|
||
Search
|
||
</button>
|
||
`}
|
||
</div>
|
||
</header>`;var t}customElements.define("api-response",class extends Gt{constructor(){super(),this.selectedStatus="",this.headersForEachRespStatus={},this.mimeResponsesForEachStatus={},this.activeSchemaTab="schema"}static get properties(){return{callback:{type:String},webhook:{type:String},responses:{type:Object},parser:{type:Object},schemaStyle:{type:String,attribute:"schema-style"},renderStyle:{type:String,attribute:"render-style"},selectedStatus:{type:String,attribute:"selected-status"},selectedMimeType:{type:String,attribute:"selected-mime-type"},activeSchemaTab:{type:String,attribute:"active-schema-tab"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"}}}static get styles(){return[Ri,Cu,ml,Au,ju,PE,M`
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.resp-head{
|
||
vertical-align: middle;
|
||
padding:16px 0 8px;
|
||
}
|
||
.resp-head.divider{
|
||
border-top: 1px solid var(--border-color);
|
||
margin-top:10px;
|
||
}
|
||
.resp-status{
|
||
font-weight:bold;
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
}
|
||
.resp-descr{
|
||
font-size:calc(var(--font-size-small) + 1px);
|
||
color:var(--light-fg);
|
||
text-align:left;
|
||
}
|
||
.top-gap{margin-top:16px;}
|
||
.example-panel{
|
||
font-size:var(--font-size-small);
|
||
margin:0;
|
||
}
|
||
.focused-mode,
|
||
.read-mode {
|
||
padding-top:24px;
|
||
margin-top:12px;
|
||
border-top: 1px dashed var(--border-color);
|
||
}`,vc]}render(){return G`
|
||
<div class="col regular-font response-panel ${this.renderStyle}-mode">
|
||
<div class=" ${this.callback==="true"?"tiny-title":"req-res-title"} ">
|
||
${this.callback==="true"?"CALLBACK RESPONSE":"RESPONSE"}
|
||
</div>
|
||
<div>
|
||
${this.responseTemplate()}
|
||
</div>
|
||
</div>
|
||
`}resetSelection(){this.selectedStatus="",this.selectedMimeType=""}responseTemplate(){if(!this.responses)return"";for(const l in this.responses){this.selectedStatus||(this.selectedStatus=l);const p={};for(const x in(t=this.responses[l])===null||t===void 0?void 0:t.content){var t,n;const S=this.responses[l].content[x];this.selectedMimeType||(this.selectedMimeType=x);const C=ts(S.schema,{}),N=Km(S.schema,x,da(S.examples),da(S.example),this.callback!=="true"&&this.webhook!=="true",this.callback==="true"||this.webhook==="true",x.includes("json")?"json":"text");p[x]={description:this.responses[l].description,examples:N,selectedExample:((n=N[0])===null||n===void 0?void 0:n.exampleId)||"",schemaTree:C}}const v=[];for(const x in(i=this.responses[l])===null||i===void 0?void 0:i.headers){var i;v.push({name:x,...this.responses[l].headers[x]})}this.headersForEachRespStatus[l]=v,this.mimeResponsesForEachStatus[l]=p}return G`
|
||
${Object.keys(this.responses).length>1?G`<div class='row' style='flex-wrap:wrap'>
|
||
${Object.keys(this.responses).map((l=>G`
|
||
${l==="$$ref"?"":G`
|
||
<button
|
||
@click="${()=>{this.selectedStatus=l,this.responses[l].content&&Object.keys(this.responses[l].content)[0]?this.selectedMimeType=Object.keys(this.responses[l].content)[0]:this.selectedMimeType=void 0}}"
|
||
class='m-btn small ${this.selectedStatus===l?"primary":""}'
|
||
part="btn ${this.selectedStatus===l?"btn-response-status btn-selected-response-status":" btn-response-status"}"
|
||
style='margin: 8px 4px 0 0'
|
||
>
|
||
${l}
|
||
</button>`}`))}</div>`:G`<span>${Object.keys(this.responses)[0]}</span>`}
|
||
|
||
${Object.keys(this.responses).map((l=>{var p,v;return G`
|
||
<div style = 'display: ${l===this.selectedStatus?"block":"none"}' >
|
||
<div class="top-gap">
|
||
<span class="resp-descr m-markdown ">${In(yt(((p=this.responses[l])===null||p===void 0?void 0:p.description)||""))}</span>
|
||
${this.headersForEachRespStatus[l]&&((v=this.headersForEachRespStatus[l])===null||v===void 0?void 0:v.length)>0?G`${this.responseHeaderListTemplate(this.headersForEachRespStatus[l])}`:""}
|
||
</div>
|
||
${Object.keys(this.mimeResponsesForEachStatus[l]).length===0?"":G`
|
||
<div part="tab-panel" class="tab-panel col">
|
||
<div part="tab-btn-row" class="tab-buttons row" @click="${x=>{x.target.tagName.toLowerCase()==="button"&&(this.activeSchemaTab=x.target.dataset.tab)}}" >
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab==="example"?"active":""}" data-tab = 'example'>EXAMPLE </button>
|
||
<button part="tab-btn" class="tab-btn ${this.activeSchemaTab!=="example"?"active":""}" data-tab = 'schema' >SCHEMA</button>
|
||
<div style="flex:1"></div>
|
||
${Object.keys(this.mimeResponsesForEachStatus[l]).length===1?G`<span class='small-font-size gray-text' style='align-self:center; margin-top:8px;'> ${Object.keys(this.mimeResponsesForEachStatus[l])[0]} </span>`:G`${this.mimeTypeDropdownTemplate(Object.keys(this.mimeResponsesForEachStatus[l]))}`}
|
||
</div>
|
||
${this.activeSchemaTab==="example"?G`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
|
||
${this.mimeExampleTemplate(this.mimeResponsesForEachStatus[l][this.selectedMimeType])}
|
||
</div>`:G`<div part="tab-content" class ='tab-content col' style = 'flex:1;'>
|
||
${this.mimeSchemaTemplate(this.mimeResponsesForEachStatus[l][this.selectedMimeType])}
|
||
</div>`}
|
||
</div>
|
||
`}</div>`}))}
|
||
`}responseHeaderListTemplate(t){return G`
|
||
<div style="padding:16px 0 8px 0" class="resp-headers small-font-size bold-text">RESPONSE HEADERS</div>
|
||
<table role="presentation" style="border-collapse: collapse; margin-bottom:16px; border:1px solid var(--border-color); border-radius: var(--border-radius)" class="small-font-size mono-font">
|
||
${t.map((n=>{var i,l;return G`
|
||
<tr>
|
||
<td style="padding:8px; vertical-align: baseline; min-width:120px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${n.name||""}
|
||
</td>
|
||
<td style="padding:4px; vertical-align: baseline; padding:0 5px; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${((i=n.schema)===null||i===void 0?void 0:i.type)||""}
|
||
</td>
|
||
<td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color);text-overflow: ellipsis;">
|
||
<div class="m-markdown-small regular-font" >${In(yt(n.description||""))}</div>
|
||
</td>
|
||
<td style="padding:8px; vertical-align: baseline; border-top: 1px solid var(--light-border-color); text-overflow: ellipsis;">
|
||
${((l=n.schema)===null||l===void 0?void 0:l.example)||""}
|
||
</td>
|
||
</tr>
|
||
`}))}
|
||
</table>`}mimeTypeDropdownTemplate(t){return G`
|
||
<select aria-label='mime types' @change="${n=>{this.selectedMimeType=n.target.value}}" style='margin-bottom: -1px; z-index:1'>
|
||
${t.map((n=>G`<option value='${n}' ?selected = '${n===this.selectedMimeType}'> ${n} </option>`))}
|
||
</select>`}onSelectExample(t){[...t.target.closest(".example-panel").querySelectorAll(".example")].forEach((n=>{n.style.display=n.dataset.example===t.target.value?"block":"none"}))}mimeExampleTemplate(t){return t?G`
|
||
${t.examples.length===1?G`
|
||
${t.examples[0].exampleFormat==="json"?G`
|
||
${t.examples[0].exampleSummary&&t.examples[0].exampleSummary.length>80?G`<div style="padding: 4px 0"> ${t.examples[0].exampleSummary} </div>`:""}
|
||
${t.examples[0].exampleDescription?G`<div class="m-markdown-small" style="padding: 4px 0"> ${In(yt(t.examples[0].exampleDescription||""))} </div>`:""}
|
||
<json-tree
|
||
render-style = '${this.renderStyle}'
|
||
.data="${t.examples[0].exampleValue}"
|
||
class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
|
||
></json-tree>`:G`
|
||
${t.examples[0].exampleSummary&&t.examples[0].exampleSummary.length>80?G`<div style="padding: 4px 0"> ${t.examples[0].exampleSummary} </div>`:""}
|
||
${t.examples[0].exampleDescription?G`<div class="m-markdown-small" style="padding: 4px 0"> ${In(yt(t.examples[0].exampleDescription||""))} </div>`:""}
|
||
<pre class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'>${t.examples[0].exampleValue}</pre>
|
||
`}`:G`
|
||
<span class = 'example-panel ${this.renderStyle==="read"?"border pad-8-16":"border-top pad-top-8"}'>
|
||
<select aria-label='response examples' style="min-width:100px; max-width:100%" @change='${n=>this.onSelectExample(n)}'>
|
||
${t.examples.map((n=>G`<option value="${n.exampleId}" ?selected=${n.exampleId===t.selectedExample} >
|
||
${n.exampleSummary.length>80?n.exampleId:n.exampleSummary}
|
||
</option>`))}
|
||
</select>
|
||
${t.examples.map((n=>G`
|
||
<div class="example" data-example = '${n.exampleId}' style = "display: ${n.exampleId===t.selectedExample?"block":"none"}">
|
||
${n.exampleSummary&&n.exampleSummary.length>80?G`<div style="padding: 4px 0"> ${n.exampleSummary} </div>`:""}
|
||
${n.exampleDescription?G`<div class="m-markdown-small" style="padding: 4px 0"> ${In(yt(n.exampleDescription||""))} </div>`:""}
|
||
${n.exampleFormat==="json"?G`
|
||
<json-tree
|
||
render-style = '${this.renderStyle}'
|
||
.data = '${n.exampleValue}'
|
||
exportparts = "btn:btn, btn-fill:btn-fill, btn-copy:btn-copy"
|
||
></json-tree>`:G`<pre>${n.exampleValue}</pre>`}
|
||
</div>
|
||
`))}
|
||
</span>
|
||
`}
|
||
`:G`
|
||
<pre style='color:var(--red)' class = '${this.renderStyle==="read"?"read example-panel border pad-8-16":"example-panel border-top"}'> No example provided </pre>
|
||
`}mimeSchemaTemplate(t){return t?G`
|
||
${this.schemaStyle==="table"?G`
|
||
<schema-table
|
||
.data = "${t.schemaTree}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-table> `:G`
|
||
<schema-tree
|
||
.data = '${t.schemaTree}'
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "${this.schemaHideReadOnly}"
|
||
schema-hide-write-only = "${this.schemaHideWriteOnly}"
|
||
exportparts = "schema-description:schema-description, schema-multiline-toggle:schema-multiline-toggle"
|
||
> </schema-tree>`}`:G`
|
||
<pre style='color:var(--red)' class = '${this.renderStyle==="read"?"border pad-8-16":"border-top"}'> Schema not found</pre>
|
||
`}});const jY=M`
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
|
||
.dialog-box-overlay {
|
||
background-color: var(--overlay-bg);
|
||
position: fixed;
|
||
left: 0;
|
||
top: 0;
|
||
width: 100vw;
|
||
height: 100vh;
|
||
overflow: hidden;
|
||
z-index: var(--dialog-z-index);
|
||
}
|
||
|
||
.dialog-box {
|
||
position: fixed;
|
||
top: 100px;
|
||
left: 50%;
|
||
transform: translate(-50%, 0%);
|
||
display: flex;
|
||
flex-direction: column;
|
||
width: 70vw;
|
||
background-color: var(--bg2);
|
||
color: var(--fg2);
|
||
border-radius: 4px;
|
||
max-height: 500px;
|
||
overflow: hidden;
|
||
border: 1px solid var(--border-color);
|
||
box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
|
||
}
|
||
|
||
.dialog-box-header {
|
||
position: sticky;
|
||
top: 0;
|
||
align-self: stretch;
|
||
display: flex;
|
||
align-items: center;
|
||
padding: 0px 16px;
|
||
min-height: 60px;
|
||
max-height: 60px;
|
||
border-bottom: 1px solid var(--light-border-color);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.dialog-box-header button {
|
||
font-size: 1.5rem;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
color: var(--fg);
|
||
border: none;
|
||
outline: none;
|
||
background-color: transparent;
|
||
cursor:pointer;
|
||
border: 1px solid transparent;
|
||
border-radius: 50%;
|
||
margin-right: -8px;
|
||
}
|
||
.dialog-box-header button:hover {
|
||
border-color: var(--primary-color);
|
||
}
|
||
|
||
.dialog-box-content {
|
||
padding: 16px;
|
||
display:block;
|
||
overflow: auto;
|
||
height: 100%;
|
||
}
|
||
|
||
.dialog-box-title {
|
||
flex-grow: 1;
|
||
font-size:24px;
|
||
}
|
||
`;function CY(){var t;return document.addEventListener("close",(()=>{this.showAdvancedSearchDialog=!1})),document.addEventListener("open",this.onOpenSearchDialog),G`
|
||
<dialog-box
|
||
heading="Search"
|
||
show="${!!this.showAdvancedSearchDialog}"
|
||
>
|
||
<span class="advanced-search-options">
|
||
<input
|
||
id="input-advanced-search-dialog"
|
||
style="width:100%; padding-right:20px;"
|
||
type="text"
|
||
part="textbox textbox-search-dialog"
|
||
placeholder="search text..."
|
||
spellcheck="false"
|
||
@keyup = "${n=>this.onAdvancedSearch(n,400)}"
|
||
>
|
||
<div style="display:flex; margin:8px 0 24px;">
|
||
<div>
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-path" checked @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label for="search-api-path" style="cursor:pointer;"> API Path </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-descr" checked @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-descr"> API Description </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-params" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-params"> API Parameters </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-request-body" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-request-body"> Request Body Parameters </label>
|
||
</div>
|
||
<div style="margin-left: 16px;">
|
||
<input style="cursor:pointer;" type="checkbox" part="checkbox checkbox-search-dialog" id="search-api-resp-descr" @change = "${n=>this.onAdvancedSearch(n,0)}">
|
||
<label style="cursor:pointer;" for="search-api-resp-descr"> Response Description </label>
|
||
</div>
|
||
</div>
|
||
</span>
|
||
|
||
${(t=this.advancedSearchMatches)===null||t===void 0?void 0:t.map((n=>G`
|
||
<div
|
||
class="mono-font small-font-size hover-bg"
|
||
style='padding: 5px; cursor: pointer; border-bottom: 1px solid var(--light-border-color); ${n.deprecated?"filter:opacity(0.5);":""}'
|
||
data-content-id='${n.elementId}'
|
||
tabindex = '0'
|
||
@click="${i=>{this.searchVal="",this.showAdvancedSearchDialog=!1,this.requestUpdate(),this.scrollToEventTarget(i,!0)}}"
|
||
>
|
||
<span style="pointer-events: none" class="upper bold-text method-fg ${n.method}">${n.method}</span>
|
||
<span style="pointer-events: none">${n.path}</span>
|
||
<span style="pointer-events: none" class="regular-font gray-text">${n.summary}</span>
|
||
</div>
|
||
`))}
|
||
</dialog-box>
|
||
`}customElements.define("dialog-box",class extends Gt{static get properties(){return{heading:{type:String,attribute:"heading"},show:{type:String,attribute:"show"}}}static get styles(){return[jY]}connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",(t=>{t.code==="Escape"&&this.onClose()}))}attributeChangedCallback(t,n,i){n!==i&&(t==="heading"&&(this.heading=i),t==="show"&&(this.show=i,i==="true"&&document.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0,detail:this})))),super.attributeChangedCallback(t,n,i)}render(){return G`
|
||
${this.show==="true"?G`
|
||
<div class="dialog-box-overlay">
|
||
<div class="dialog-box">
|
||
<header class="dialog-box-header">
|
||
<span class="dialog-box-title">${this.heading}</span>
|
||
<button type="button" @click="${this.onClose}">×</button>
|
||
</header>
|
||
<div class="dialog-box-content">
|
||
<slot></slot>
|
||
</div>
|
||
</div>
|
||
</div>`:""}`}onClose(){document.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}});const Xt={color:{inputReverseFg:"#fff",inputReverseBg:"#333",headerBg:"#444",getRgb(t){if(t.indexOf("#")===0&&(t=t.slice(1,7)),t.length!==3&&t.length!==4||(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),t.length!==6)throw new Error("Invalid HEX color.");return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},luminanace(t){const n=this.getRgb(t);return .299*n.r+.587*n.g+.114*n.b},invert(t){return this.luminanace(t)>135?"#000":"#fff"},opacity(t,n){const i=this.getRgb(t);return`rgba(${i.r}, ${i.g}, ${i.b}, ${n})`},brightness(t,n){const i=this.getRgb(t);return i.r+=n,i.g+=n,i.b+=n,i.r>255?i.r=255:i.r<0&&(i.r=0),i.g>255?i.g=255:i.g<0&&(i.g=0),i.b>255?i.b=255:i.b<0&&(i.b=0),`#${i.r.toString(16).padStart(2,"0")}${i.g.toString(16).padStart(2,"0")}${i.b.toString(16).padStart(2,"0")}`},hasGoodContrast(t,n){return this.luminanace(t)-this.luminanace(n)}}};function hs(t){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/i.test(t)}function ha(t,n={}){let i={};const l=n.primaryColor?n.primaryColor:t==="dark"?"#f76b39":"#ff591e",p=Xt.color.invert(l),v=Xt.color.opacity(l,"0.4");if(t==="dark"){const x=n.bg1?n.bg1:"#2a2b2c",S=n.fg1?n.fg1:"#bbb",C=n.bg2?n.bg2:Xt.color.brightness(x,5),N=n.bg3?n.bg3:Xt.color.brightness(x,17),D=n.bg3?n.bg3:Xt.color.brightness(x,35),$=n.fg2?n.fg2:Xt.color.brightness(S,-15),L=n.fg3?n.fg3:Xt.color.brightness(S,-20),U=n.fg3?n.fg3:Xt.color.brightness(S,-65),J=n.inlineCodeFg?n.inlineCodeFg:"#aaa",Y=$,Z=C,P=n.headerColor?n.headerColor:Xt.color.brightness(x,10),re=n.navBgColor?n.navBgColor:Xt.color.brightness(x,10),le=n.navTextColor?n.navTextColor:Xt.color.opacity(Xt.color.invert(re),"0.50"),he=n.navHoverBgColor?n.navHoverBgColor:Xt.color.brightness(re,-15),xe=n.navHoverTextColor?n.navHoverTextColor:Xt.color.invert(re),pe=n.navAccentColor?n.navAccentColor:Xt.color.brightness(l,25);i={bg1:x,bg2:C,bg3:N,lightBg:D,fg1:S,fg2:$,fg3:L,lightFg:U,inlineCodeFg:J,primaryColor:l,primaryColorTrans:v,primaryColorInvert:p,selectionBg:Y,selectionFg:Z,overlayBg:"rgba(80, 80, 80, 0.4)",navBgColor:re,navTextColor:le,navHoverBgColor:he,navHoverTextColor:xe,navAccentColor:pe,navAccentTextColor:n.navAccentTextColor?n.navAccenttextColor:Xt.color.invert(pe),headerColor:P,headerColorInvert:Xt.color.invert(P),headerColorDarker:Xt.color.brightness(P,-20),headerColorBorder:Xt.color.brightness(P,10),borderColor:n.borderColor||Xt.color.brightness(x,20),lightBorderColor:n.lightBorderColor||Xt.color.brightness(x,15),codeBorderColor:n.codeBorderColor||Xt.color.brightness(x,30),inputBg:n.inputBg||Xt.color.brightness(x,-5),placeHolder:n.placeHolder||Xt.color.opacity(S,"0.3"),hoverColor:n.hoverColor||Xt.color.brightness(x,-10),red:n.red?n.red:"#F06560",lightRed:n.lightRed?n.lightRed:Xt.color.brightness(x,-10),pink:n.pink?n.pink:"#ffb2b2",lightPink:n.lightPink||Xt.color.brightness(x,-10),green:n.green||"#7ec699",lightGreen:n.lightGreen||Xt.color.brightness(x,-10),blue:n.blue||"#71b7ff",lightBlue:n.lightBlue||Xt.color.brightness(x,-10),orange:n.orange?n.orange:"#f08d49",lightOrange:n.lightOrange||Xt.color.brightness(x,-10),yellow:n.yellow||"#827717",lightYellow:n.lightYellow||Xt.color.brightness(x,-10),purple:n.purple||"#786FF1",brown:n.brown||"#D4AC0D",codeBg:n.codeBg||Xt.color.opacity(Xt.color.brightness(x,-15),.7),codeFg:n.codeFg||"#aaa",codePropertyColor:n.codePropertyColor||"#f8c555",codeKeywordColor:n.codeKeywordColor||"#cc99cd",codeOperatorColor:n.codeOperatorColor||"#67cdcc"}}else{const x=n.bg1?n.bg1:"#fafbfc",S=n.fg1?n.fg1:"#444444",C=n.bg2?n.bg2:Xt.color.brightness(x,-5),N=n.bg3?n.bg3:Xt.color.brightness(x,-15),D=n.bg3?n.bg3:Xt.color.brightness(x,-45),$=n.fg2?n.fg2:Xt.color.brightness(S,17),L=n.fg3?n.fg3:Xt.color.brightness(S,30),U=n.fg3?n.fg3:Xt.color.brightness(S,70),J=n.inlineCodeFg?n.inlineCodeFg:"brown",Y=$,Z=C,P=n.headerColor?n.headerColor:Xt.color.brightness(x,-180),re=n.navBgColor?n.navBgColor:Xt.color.brightness(x,-200),le=n.navTextColor?n.navTextColor:Xt.color.opacity(Xt.color.invert(re),"0.65"),he=n.navHoverBgColor?n.navHoverBgColor:Xt.color.brightness(re,-15),xe=n.navHoverTextColor?n.navHoverTextColor:Xt.color.invert(re),pe=n.navAccentColor?n.navAccentColor:Xt.color.brightness(l,25);i={bg1:x,bg2:C,bg3:N,lightBg:D,fg1:S,fg2:$,fg3:L,lightFg:U,inlineCodeFg:J,primaryColor:l,primaryColorTrans:v,primaryColorInvert:p,selectionBg:Y,selectionFg:Z,overlayBg:"rgba(0, 0, 0, 0.4)",navBgColor:re,navTextColor:le,navHoverBgColor:he,navHoverTextColor:xe,navAccentColor:pe,navAccentTextColor:n.navAccentTextColor?n.navAccenttextColor:Xt.color.invert(pe),headerColor:P,headerColorInvert:Xt.color.invert(P),headerColorDarker:Xt.color.brightness(P,-20),headerColorBorder:Xt.color.brightness(P,10),borderColor:n.borderColor||Xt.color.brightness(x,-38),lightBorderColor:n.lightBorderColor||Xt.color.brightness(x,-23),codeBorderColor:n.codeBorderColor||"transparent",inputBg:n.inputBg||Xt.color.brightness(x,10),placeHolder:n.placeHolder||Xt.color.brightness(U,20),hoverColor:n.hoverColor||Xt.color.brightness(x,-5),red:n.red||"#F06560",lightRed:n.lightRed||"#fff0f0",pink:n.pink?n.pink:"#990055",lightPink:n.lightPink?n.lightPink:"#ffb2b2",green:n.green||"#690",lightGreen:n.lightGreen||"#fbfff0",blue:n.blue||"#47AFE8",lightBlue:n.lightBlue||"#eff8fd",orange:n.orange||"#FF9900",lightOrange:n.lightOrange||"#fff5e6",yellow:n.yellow||"#827717",lightYellow:n.lightYellow||"#fff5cc",purple:n.purple||"#786FF1",brown:n.brown||"#D4AC0D",codeBg:n.codeBg||Xt.color.opacity(Xt.color.brightness(x,-15),.7),codeFg:n.codeFg||"#666",codePropertyColor:n.codePropertyColor||"#905",codeKeywordColor:n.codeKeywordColor||"#07a",codeOperatorColor:n.codeOperatorColor||"#9a6e3a"}}return G`
|
||
<style>
|
||
*, *:before, *:after { box-sizing: border-box; }
|
||
|
||
:host {
|
||
/* Common Styles - irrespective of themes */
|
||
--border-radius: 2px;
|
||
--layout: ${this.layout||"row"};
|
||
--font-mono: ${this.monoFont||'Monaco, "Andale Mono", "Roboto Mono", Consolas, monospace'};
|
||
--font-regular: ${this.regularFont||'"Open Sans", Avenir, "Segoe UI", Arial, sans-serif'};
|
||
--scroll-bar-width: 8px;
|
||
--nav-item-padding: ${this.navItemSpacing==="relaxed"?"10px 16px 10px 10px":this.navItemSpacing==="compact"?"5px 16px 5px 10px":"7px 16px 7px 10px"};
|
||
|
||
--resp-area-height: ${this.responseAreaHeight};
|
||
--font-size-small: ${this.fontSize==="default"?"12px":this.fontSize==="large"?"13px":"14px"};
|
||
--font-size-mono: ${this.fontSize==="default"?"13px":this.fontSize==="large"?"14px":"15px"};
|
||
--font-size-regular: ${this.fontSize==="default"?"14px":this.fontSize==="large"?"15px":"16px"};
|
||
--dialog-z-index: 1000;
|
||
|
||
--focus-shadow: 0 0 0 1px transparent, 0 0 0 3px ${i.primaryColorTrans};
|
||
|
||
/* Theme specific styles */
|
||
--bg:${i.bg1};
|
||
--bg2:${i.bg2};
|
||
--bg3:${i.bg3};
|
||
--light-bg:${i.lightBg};
|
||
--fg:${i.fg1};
|
||
--fg2:${i.fg2};
|
||
--fg3:${i.fg3};
|
||
--light-fg:${i.lightFg};
|
||
--selection-bg:${i.selectionBg};
|
||
--selection-fg:${i.selectionFg};
|
||
--overlay-bg:${i.overlayBg};
|
||
|
||
/* Border Colors */
|
||
--border-color:${i.borderColor};
|
||
--light-border-color:${i.lightBorderColor};
|
||
--code-border-color:${i.codeBorderColor};
|
||
|
||
--input-bg:${i.inputBg};
|
||
--placeholder-color:${i.placeHolder};
|
||
--hover-color:${i.hoverColor};
|
||
--red:${i.red};
|
||
--light-red:${i.lightRed};
|
||
--pink:${i.pink};
|
||
--light-pink:${i.lightPink};
|
||
--green:${i.green};
|
||
--light-green:${i.lightGreen};
|
||
--blue:${i.blue};
|
||
--light-blue:${i.lightBlue};
|
||
--orange:${i.orange};
|
||
--light-orange:${i.lightOrange};
|
||
--yellow:${i.yellow};
|
||
--light-yellow:${i.lightYellow};
|
||
--purple:${i.purple};
|
||
--brown:${i.brown};
|
||
|
||
/* Header Color */
|
||
--header-bg:${i.headerColor};
|
||
--header-fg:${i.headerColorInvert};
|
||
--header-color-darker:${i.headerColorDarker};
|
||
--header-color-border:${i.headerColorBorder};
|
||
|
||
/* Nav Colors */
|
||
--nav-bg-color:${i.navBgColor};
|
||
--nav-text-color:${i.navTextColor};
|
||
--nav-hover-bg-color:${i.navHoverBgColor};
|
||
--nav-hover-text-color:${i.navHoverTextColor};
|
||
--nav-accent-color:${i.navAccentColor};
|
||
--nav-accent-text-color:${i.navAccentTextColor};
|
||
|
||
/* Nav API Method Colors*/
|
||
--nav-get-color:${i.blue};
|
||
--nav-put-color:${i.orange};
|
||
--nav-post-color:${i.green};
|
||
--nav-delete-color:${i.red};
|
||
--nav-head-color:${i.yellow};
|
||
|
||
/* Primary Colors */
|
||
--primary-color:${i.primaryColor};
|
||
--primary-color-invert:${i.primaryColorInvert};
|
||
--primary-color-trans:${i.primaryColorTrans};
|
||
|
||
/*Code Syntax Color*/
|
||
--code-bg:${i.codeBg};
|
||
--code-fg:${i.codeFg};
|
||
--inline-code-fg:${i.inlineCodeFg};
|
||
--code-property-color:${i.codePropertyColor};
|
||
--code-keyword-color:${i.codeKeywordColor};
|
||
--code-operator-color:${i.codeOperatorColor};
|
||
}
|
||
</style>`}function EM(t=!1,n=!1){if(!this.resolvedSpec)return"";this.persistAuth==="true"&&JX.call(this);const i={bg1:hs(this.bgColor)?this.bgColor:"",fg1:hs(this.textColor)?this.textColor:"",headerColor:hs(this.headerColor)?this.headerColor:"",primaryColor:hs(this.primaryColor)?this.primaryColor:"",navBgColor:hs(this.navBgColor)?this.navBgColor:"",navTextColor:hs(this.navTextColor)?this.navTextColor:"",navHoverBgColor:hs(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:hs(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:hs(this.navAccentColor)?this.navAccentColor:"",navAccentTextColor:hs(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?G`
|
||
${this.theme==="dark"?ha.call(this,"dark",i):ha.call(this,"light",i)}
|
||
<div id="spec-not-found" style='display:flex; align-items:center; justify-content: center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)'>
|
||
${this.resolvedSpec.info.description}
|
||
</div>
|
||
`:this.resolvedSpec.isSpecLoading?G`
|
||
${this.theme==="dark"?ha.call(this,"dark",i):ha.call(this,"light",i)}
|
||
<main class='main-content regular-font' part='section-main-content'>
|
||
<slot></slot>
|
||
<div class='main-content-inner--${this.renderStyle}-mode'>
|
||
<div class='loader'></div>
|
||
</div>
|
||
</main>
|
||
`:G`
|
||
${this.theme==="dark"?ha.call(this,"dark",i):ha.call(this,"light",i)}
|
||
|
||
<!-- Header -->
|
||
${this.showHeader==="false"?"":NR.call(this)}
|
||
|
||
<!-- Advanced Search -->
|
||
${this.allowAdvancedSearch==="false"?"":CY.call(this)}
|
||
|
||
<div id='the-main-body' class='body ${this.cssClasses}' dir='${this.pageDirection}' >
|
||
<!-- Side Nav -->
|
||
${this.renderStyle!=="read"&&this.renderStyle!=="focused"||this.showSideNav!=="true"||!this.resolvedSpec?"":yY.call(this)}
|
||
|
||
<!-- Main Content -->
|
||
<main class='main-content regular-font' tabindex='-1' part='section-main-content'>
|
||
<slot></slot>
|
||
<div class='main-content-inner--${this.renderStyle}-mode'>
|
||
${this.loading===!0?G`<div class='loader'></div>`:G`
|
||
${this.loadFailed===!0?G`<div style='text-align: center;margin: 16px;'> Unable to load the Spec</div>`:G`
|
||
<div class='operations-root' @click='${l=>{this.handleHref(l)}}'>
|
||
${this.renderStyle==="focused"?G`${bY.call(this)}`:G`
|
||
${this.showInfo==="true"?zE.call(this):""}
|
||
${this.allowServerSelection==="true"?gM.call(this):""}
|
||
${this.allowAuthentication==="true"?iM.call(this):""}
|
||
<div id='operations-top' class='observe-me'>
|
||
<slot name='operations-top'></slot>
|
||
</div>
|
||
${this.renderStyle==="read"?dY.call(this):EY.call(this,t,n)}
|
||
`}
|
||
</div>
|
||
`}`}
|
||
</div>
|
||
<slot name='footer'></slot>
|
||
</main>
|
||
</div>
|
||
`}class AY extends Gt{constructor(){super();const n={root:this.getRootNode().host,rootMargin:"-50px 0px -50px 0px",threshold:0};this.showSummaryWhenCollapsed=!0,this.isIntersectionObserverActive=!1,this.intersectionObserver=new IntersectionObserver((i=>{this.onIntersect(i)}),n)}static get properties(){return{headingText:{type:String,attribute:"heading-text"},gotoPath:{type:String,attribute:"goto-path"},updateRoute:{type:String,attribute:"update-route"},routePrefix:{type:String,attribute:"route-prefix"},specUrl:{type:String,attribute:"spec-url"},sortTags:{type:String,attribute:"sort-tags"},sortSchemas:{type:String,attribute:"sort-schemas"},generateMissingTags:{type:String,attribute:"generate-missing-tags"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},specFile:{type:String,attribute:!1},layout:{type:String},renderStyle:{type:String,attribute:"render-style"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},onNavTagClick:{type:String,attribute:"on-nav-tag-click"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},schemaHideReadOnly:{type:String,attribute:"schema-hide-read-only"},schemaHideWriteOnly:{type:String,attribute:"schema-hide-write-only"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowAuthentication:{type:String,attribute:"allow-authentication"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},allowAdvancedSearch:{type:String,attribute:"allow-advanced-search"},allowServerSelection:{type:String,attribute:"allow-server-selection"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showComponents:{type:String,attribute:"show-components"},pageDirection:{type:String,attribute:"page-direction"},scrollBehavior:{type:String,attribute:"scroll-behavior"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},headerColor:{type:String,attribute:"header-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},cssFile:{type:String,attribute:"css-file"},cssClasses:{type:String,attribute:"css-classes"},navBgColor:{type:String,attribute:"nav-bg-color"},navTextColor:{type:String,attribute:"nav-text-color"},navHoverBgColor:{type:String,attribute:"nav-hover-bg-color"},navHoverTextColor:{type:String,attribute:"nav-hover-text-color"},navAccentColor:{type:String,attribute:"nav-accent-color"},navAccentTextColor:{type:String,attribute:"nav-accent-text-color"},navActiveItemMarker:{type:String,attribute:"nav-active-item-marker"},navItemSpacing:{type:String,attribute:"nav-item-spacing"},showMethodInNavBar:{type:String,attribute:"show-method-in-nav-bar"},usePathInNavBar:{type:String,attribute:"use-path-in-nav-bar"},infoDescriptionHeadingsInNavBar:{type:String,attribute:"info-description-headings-in-navbar"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean},focusedElementId:{type:String},showAdvancedSearchDialog:{type:Boolean},advancedSearchMatches:{type:Object},searchVal:{type:String}}}static get styles(){return[Ri,ju,Cu,Au,Vg,yc,ml,Ea,ri,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
:where(button, input[type="checkbox"], [tabindex="0"]):focus-visible { box-shadow: var(--focus-shadow); }
|
||
:where(input[type="text"], input[type="password"], select, textarea):focus-visible { border-color: var(--primary-color); }
|
||
.body {
|
||
display:flex;
|
||
height:100%;
|
||
width:100%;
|
||
overflow:hidden;
|
||
}
|
||
.main-content {
|
||
margin:0;
|
||
padding: 0;
|
||
display:block;
|
||
flex:1;
|
||
height:100%;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) transparent;
|
||
}
|
||
|
||
.main-content-inner--view-mode {
|
||
padding: 0 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.main-content::-webkit-scrollbar-thumb {
|
||
background-color: var(--border-color);
|
||
}
|
||
|
||
.section-gap.section-tag {
|
||
border-bottom:1px solid var(--border-color);
|
||
}
|
||
.section-gap,
|
||
.section-gap--focused-mode,
|
||
.section-gap--read-mode {
|
||
padding: 0px 4px;
|
||
}
|
||
.section-tag-header {
|
||
position:relative;
|
||
cursor: n-resize;
|
||
padding: 12px 0;
|
||
}
|
||
.collapsed .section-tag-header:hover {
|
||
cursor: s-resize;
|
||
}
|
||
|
||
.section-tag-header:hover {
|
||
background-image: linear-gradient(to right, rgba(0,0,0,0), var(--border-color), rgba(0,0,0,0));
|
||
}
|
||
|
||
.section-tag-header:hover::after {
|
||
position:absolute;
|
||
margin-left:-24px;
|
||
font-size:20px;
|
||
top: calc(50% - 14px);
|
||
color:var(--primary-color);
|
||
content: '⬆';
|
||
}
|
||
|
||
.collapsed .section-tag-header::after {
|
||
position:absolute;
|
||
margin-left:-24px;
|
||
font-size:20px;
|
||
top: calc(50% - 14px);
|
||
color: var(--border-color);
|
||
content: '⬇';
|
||
}
|
||
.collapsed .section-tag-header:hover::after {
|
||
color:var(--primary-color);
|
||
}
|
||
|
||
.collapsed .section-tag-body {
|
||
display:none;
|
||
}
|
||
|
||
.logo {
|
||
height:36px;
|
||
width:36px;
|
||
margin-left:5px;
|
||
}
|
||
.only-large-screen-flex,
|
||
.only-large-screen {
|
||
display:none;
|
||
}
|
||
.tag.title {
|
||
text-transform: uppercase;
|
||
}
|
||
.main-header {
|
||
background-color:var(--header-bg);
|
||
color:var(--header-fg);
|
||
width:100%;
|
||
}
|
||
.header-title {
|
||
font-size:calc(var(--font-size-regular) + 8px);
|
||
padding:0 8px;
|
||
}
|
||
input.header-input{
|
||
background:var(--header-color-darker);
|
||
color:var(--header-fg);
|
||
border:1px solid var(--header-color-border);
|
||
flex:1;
|
||
padding-right:24px;
|
||
border-radius:3px;
|
||
}
|
||
input.header-input::placeholder {
|
||
opacity:0.4;
|
||
}
|
||
.loader {
|
||
margin: 16px auto 16px auto;
|
||
border: 4px solid var(--bg3);
|
||
border-radius: 50%;
|
||
border-top: 4px solid var(--primary-color);
|
||
width: 36px;
|
||
height: 36px;
|
||
animation: spin 2s linear infinite;
|
||
}
|
||
.expanded-endpoint-body {
|
||
position: relative;
|
||
padding: 6px 0px;
|
||
}
|
||
.expanded-endpoint-body .tag-description {
|
||
background: var(--code-bg);
|
||
border-radius: var(--border-radius);
|
||
transition: max-height .2s ease-out;
|
||
}
|
||
.expanded-endpoint-body .tag-icon {
|
||
transition: transform .2s ease-out;
|
||
}
|
||
.expanded-endpoint-body .tag-icon.expanded {
|
||
transform: rotate(180deg);
|
||
}
|
||
.divider {
|
||
border-top: 2px solid var(--border-color);
|
||
margin: 24px 0;
|
||
width:100%;
|
||
}
|
||
|
||
.tooltip {
|
||
cursor:pointer;
|
||
border: 1px solid var(--border-color);
|
||
border-left-width: 4px;
|
||
margin-left:2px;
|
||
}
|
||
.tooltip a {
|
||
color: var(--fg2);
|
||
text-decoration: none;
|
||
}
|
||
.tooltip-text {
|
||
color: var(--fg2);
|
||
max-width: 400px;
|
||
position: absolute;
|
||
z-index:1;
|
||
background-color: var(--bg2);
|
||
visibility: hidden;
|
||
|
||
overflow-wrap: break-word;
|
||
}
|
||
.tooltip:hover {
|
||
color: var(--primary-color);
|
||
border-color: var(--primary-color);
|
||
}
|
||
.tooltip:hover a:hover {
|
||
color: var(--primary-color);
|
||
}
|
||
|
||
.tooltip:hover .tooltip-text {
|
||
visibility: visible;
|
||
}
|
||
|
||
@keyframes spin {
|
||
0% { transform: rotate(0deg); }
|
||
100% { transform: rotate(360deg); }
|
||
}
|
||
|
||
.nav-method { font-weight: bold; margin-right: 4px; font-size: calc(var(--font-size-small) - 2px); white-space: nowrap; }
|
||
.nav-method.false { display: none; }
|
||
|
||
.nav-method.as-colored-text.get { color:var(--nav-get-color); }
|
||
.nav-method.as-colored-text.put { color:var(--nav-put-color); }
|
||
.nav-method.as-colored-text.post { color:var(--nav-post-color); }
|
||
.nav-method.as-colored-text.delete { color:var(--nav-delete-color); }
|
||
.nav-method.as-colored-text.head, .nav-method.as-colored-text.patch, .nav-method.as-colored-text.options { color:var(--nav-head-color); }
|
||
|
||
.nav-method.as-colored-block {
|
||
padding: 1px 4px;
|
||
min-width: 30px;
|
||
border-radius: 4px 0 0 4px;
|
||
color: #000;
|
||
}
|
||
.colored-block .nav-method.as-colored-block {
|
||
outline: 1px solid;
|
||
}
|
||
|
||
.nav-method.as-colored-block.get { background-color: var(--blue); }
|
||
.nav-method.as-colored-block.put { background-color: var(--orange); }
|
||
.nav-method.as-colored-block.post { background-color: var(--green); }
|
||
.nav-method.as-colored-block.delete { background-color: var(--red); }
|
||
.nav-method.as-colored-block.head, .nav-method.as-colored-block.patch , .nav-method.as-colored-block.options {
|
||
background-color: var(--yellow);
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.nav-bar {
|
||
width: 260px;
|
||
display:flex;
|
||
}
|
||
.only-large-screen {
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
.section-gap {
|
||
padding: 0 0 0 24px;
|
||
}
|
||
.section-gap--focused-mode {
|
||
padding: 24px 8px;
|
||
}
|
||
.section-gap--read-mode {
|
||
padding: 24px 8px;
|
||
}
|
||
.endpoint-body {
|
||
position: relative;
|
||
padding:36px 0 48px 0;
|
||
}
|
||
}
|
||
|
||
@container (min-width: 1024px) {
|
||
.nav-bar {
|
||
width: ${R(this.fontSize==="default"?"300px":this.fontSize==="large"?"315px":"330px")};
|
||
display:flex;
|
||
}
|
||
.section-gap--focused-mode {
|
||
padding: 12px 80px 12px 80px;
|
||
}
|
||
.section-gap--read-mode {
|
||
padding: 24px 80px 12px 80px;
|
||
}
|
||
}`,vc]}connectedCallback(){super.connectedCallback();const n=this.parentElement;if(n&&(n.offsetWidth===0&&n.style.width===""&&(n.style.width="100vw"),n.offsetHeight===0&&n.style.height===""&&(n.style.height="100vh"),n.tagName==="BODY"&&(n.style.marginTop||(n.style.marginTop="0"),n.style.marginRight||(n.style.marginRight="0"),n.style.marginBottom||(n.style.marginBottom="0"),n.style.marginLeft||(n.style.marginLeft="0"))),this.loadFonts!=="false"){const i={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},l=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",i);i.weight="600";const p=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",i);l.load().then((v=>{document.fonts.add(v)})),p.load().then((v=>{document.fonts.add(v)}))}this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.renderStyle&&"read, view, focused,".includes(`${this.renderStyle},`)||(this.renderStyle="focused"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.schemaHideReadOnly&&"default, never,".includes(`${this.schemaHideReadOnly},`)||(this.schemaHideReadOnly="default"),this.schemaHideWriteOnly&&"default, never,".includes(`${this.schemaHideWriteOnly},`)||(this.schemaHideWriteOnly="default"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="400px"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),this.allowAdvancedSearch&&"true, false,".includes(`${this.allowAdvancedSearch},`)||(this.allowAdvancedSearch="true"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.updateRoute&&"true, false,".includes(`${this.updateRoute},`)||(this.updateRoute="true"),this.routePrefix||(this.routePrefix="#"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortSchemas&&"true, false,".includes(`${this.sortSchemas},`)||(this.sortSchemas="false"),this.generateMissingTags&&"true, false,".includes(`${this.generateMissingTags},`)||(this.generateMissingTags="false"),this.sortEndpointsBy&&"method, path, summary, none,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.onNavTagClick&&"expand-collapse, show-description,".includes(`${this.onNavTagClick},`)||(this.onNavTagClick="expand-collapse"),this.navItemSpacing&&"compact, relaxed, default,".includes(`${this.navItemSpacing},`)||(this.navItemSpacing="default"),this.showMethodInNavBar&&"false, as-plain-text, as-colored-text, as-colored-block,".includes(`${this.showMethodInNavBar},`)||(this.showMethodInNavBar="false"),this.usePathInNavBar&&"true, false,".includes(`${this.usePathInNavBar},`)||(this.usePathInNavBar="false"),this.navActiveItemMarker&&"left-bar, colored-block".includes(`${this.navActiveItemMarker},`)||(this.navActiveItemMarker="left-bar"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.allowServerSelection&&"true, false,".includes(`${this.allowServerSelection},`)||(this.allowServerSelection="true"),this.allowAuthentication&&"true, false,".includes(`${this.allowAuthentication},`)||(this.allowAuthentication="true"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showComponents&&"true false".includes(this.showComponents)||(this.showComponents="false"),this.infoDescriptionHeadingsInNavBar&&"true, false,".includes(`${this.infoDescriptionHeadingsInNavBar},`)||(this.infoDescriptionHeadingsInNavBar="false"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),this.scrollBehavior&&"smooth, auto,".includes(`${this.scrollBehavior},`)||(this.scrollBehavior="auto"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.showAdvancedSearchDialog||(this.showAdvancedSearchDialog=!1),this.cssFile||(this.cssFile=null),this.cssClasses||(this.cssClasses=""),yt.setOptions({highlight:(i,l)=>sr().languages[l]?sr().highlight(i,sr().languages[l],l):i}),window.addEventListener("hashchange",(()=>{this.scrollToPath(this.getElementIDFromURL())}),!0)}disconnectedCallback(){this.intersectionObserver&&this.intersectionObserver.disconnect(),super.disconnectedCallback()}infoDescriptionHeadingRenderer(){const n=new yt.Renderer;return n.heading=(i,l,p,v)=>`<h${l} class="observe-me" id="${v.slug(p)}">${i}</h${l}>`,n}render(){const n=document.querySelector(`link[href*="${this.cssFile}"]`);return n&&this.shadowRoot.appendChild(n.cloneNode()),EM.call(this)}observeExpandedContent(){this.shadowRoot.querySelectorAll(".observe-me").forEach((n=>{this.intersectionObserver.observe(n)}))}attributeChangedCallback(n,i,l){if(n==="spec-url"&&i!==l&&window.setTimeout((async()=>{await this.loadSpec(l),this.gotoPath&&!window.location.hash&&this.scrollToPath(this.gotoPath)}),0),n!=="match-paths"&&n!=="match-type"&&n!=="remove-endpoints-with-badge-label-as"||i!==l&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),n==="render-style"&&(l==="read"?window.setTimeout((()=>{this.observeExpandedContent()}),100):this.intersectionObserver.disconnect()),n==="api-key-name"||n==="api-key-location"||n==="api-key-value"){let p=!1,v="",x="",S="";if(n==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(v=l,x=this.getAttribute("api-key-location"),S=this.getAttribute("api-key-value"),p=!0):n==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(x=l,v=this.getAttribute("api-key-name"),S=this.getAttribute("api-key-value"),p=!0):n==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(S=l,x=this.getAttribute("api-key-location"),v=this.getAttribute("api-key-name"),p=!0),p&&this.resolvedSpec){const C=this.resolvedSpec.securitySchemes.find((N=>N.securitySchemeId===mo));C?(C.name=v,C.in=x,C.value=S,C.finalKeyValue=S):this.resolvedSpec.securitySchemes.push({securitySchemeId:mo,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:v,in:x,value:S,finalKeyValue:S}),this.requestUpdate()}}super.attributeChangedCallback(n,i,l)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSpecFileChange(n){this.setAttribute("spec-file",this.shadowRoot.getElementById("spec-file").value);const i=n.target.files[0],l=new FileReader;l.onload=()=>{try{const p=JSON.parse(l.result);this.loadSpec(p),this.shadowRoot.getElementById("spec-url").value=""}catch{console.error("RapiDoc: Unable to read or parse json")}},l.readAsText(i)}onFileLoadClick(){this.shadowRoot.getElementById("spec-file").click()}onSearchChange(n){this.searchVal=n.target.value,this.resolvedSpec.tags.forEach((i=>i.paths.filter((l=>{this.searchVal&&ih(this.searchVal,l,i.name)&&(i.expanded=!0)})))),this.resolvedSpec.components.forEach((i=>i.subComponents.filter((l=>{l.expanded=!1,(function(p,v){return v.name.toLowerCase().includes(p.toLowerCase())})(this.searchVal,l)&&(l.expanded=!0)})))),this.requestUpdate()}onClearSearch(){this.shadowRoot.getElementById("nav-bar-search").value="",this.searchVal="",this.resolvedSpec.components.forEach((n=>n.subComponents.filter((i=>{i.expanded=!0}))))}onShowSearchModalClicked(){this.showAdvancedSearchDialog=!0}async onOpenSearchDialog(n){const i=n.detail.querySelector("input");await Ou(0),i&&i.focus()}async loadSpec(n){if(n){this.searchVal="";try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1;const i=await wR.call(this,n,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(i)}catch(i){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${i.message}`)}}}async afterSpecParsedAndValidated(n){for(this.resolvedSpec=n,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((v=>v.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const i=new CustomEvent("spec-loaded",{detail:n});this.dispatchEvent(i),this.intersectionObserver.disconnect(),this.renderStyle==="read"&&(await Ou(100),this.observeExpandedContent()),this.isIntersectionObserverActive=!0;const l=this.getElementIDFromURL();if(l)this.renderStyle==="view"?this.expandAndGotoOperation(l,!0,!0):this.scrollToPath(l);else if(this.renderStyle==="focused"&&!this.gotoPath){var p;const v=this.showInfo?"overview":(p=this.resolvedSpec.tags[0])===null||p===void 0?void 0:p.paths[0];this.scrollToPath(v)}}getComponentBaseURL(){const{href:n}=window.location,i=this.routePrefix.replace(/(#|\/)$/,"");if(!i)return n.split("#")[0];const l=n.lastIndexOf(i);return l===-1?n:n.slice(0,l)}getElementIDFromURL(){const n=this.getComponentBaseURL();return window.location.href.replace(n+this.routePrefix,"")}replaceHistoryState(n){const i=this.getComponentBaseURL();window.history.replaceState(null,null,`${i}${this.routePrefix||"#"}${n}`)}expandAndGotoOperation(n,i=!0){if(!this.resolvedSpec)return;let l=!0;const p=n.indexOf("#")===-1?n:n.substring(1);if(p.startsWith("overview")||p==="servers"||p==="auth")l=!1;else for(let S=0;S<((v=this.resolvedSpec.tags)===null||v===void 0?void 0:v.length);S++){var v,x;const C=this.resolvedSpec.tags[S],N=(x=C.paths)===null||x===void 0?void 0:x.find((D=>D.elementId===n));N&&(N.expanded&&C.expanded?l=!1:(N.expanded=!0,C.expanded=!0))}i&&(l&&this.requestUpdate(),window.setTimeout((()=>{const S=this.shadowRoot.getElementById(p);S&&(S.scrollIntoView({behavior:this.scrollBehavior,block:"start"}),this.updateRoute==="true"&&this.replaceHistoryState(p))}),l?150:0))}isValidTopId(n){return n.startsWith("overview")||n==="servers"||n==="auth"}isValidPathId(n){var i,l;return!(n!=="overview"||!this.showInfo)||!(n!=="servers"||!this.allowServerSelection)||!(n!=="auth"||!this.allowAuthentication)||(n.startsWith("tag--")?(l=this.resolvedSpec)===null||l===void 0||(l=l.tags)===null||l===void 0?void 0:l.find((p=>p.elementId===n)):(i=this.resolvedSpec)===null||i===void 0||(i=i.tags)===null||i===void 0?void 0:i.find((p=>p.paths.find((v=>v.elementId===n)))))}onIntersect(n){this.isIntersectionObserverActive!==!1&&n.forEach((i=>{if(i.isIntersecting&&i.intersectionRatio>0){const l=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active"),p=this.shadowRoot.getElementById(`link-${i.target.id}`);p&&(this.updateRoute==="true"&&this.replaceHistoryState(i.target.id),p.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),p.classList.add("active"),p.part.add("section-navbar-active-item")),l&&l!==p&&(l.classList.remove("active"),l.part.remove("section-navbar-active-item"))}}))}handleHref(n){if(n.target.tagName.toLowerCase()==="a"&&n.target.getAttribute("href").startsWith("#")){const i=this.shadowRoot.getElementById(n.target.getAttribute("href").replace("#",""));i&&i.scrollIntoView({behavior:this.scrollBehavior,block:"start"})}}async scrollToEventTarget(n,i=!0){if(n.type!=="click"&&(n.type!=="keyup"||n.keyCode!==13))return;const l=n.target;if(l.dataset.contentId){if(this.isIntersectionObserverActive=!1,this.renderStyle==="focused"){const p=this.shadowRoot.querySelector("api-request");p&&p.beforeNavigationFocusedMode()}this.scrollToPath(l.dataset.contentId,!0,i),setTimeout((()=>{this.isIntersectionObserverActive=!0}),300)}}async scrollToPath(n,i=!0,l=!0){if(this.renderStyle==="focused"&&(this.focusedElementId=n,await Ou(0)),this.renderStyle==="view")this.expandAndGotoOperation(n,i,!0);else{let p=!1;const v=this.shadowRoot.getElementById(n);if(v?(p=!0,v.scrollIntoView({behavior:this.scrollBehavior,block:"start"})):p=!1,p){if(this.renderStyle==="focused"){const S=this.shadowRoot.querySelector("api-request");S&&S.afterNavigationFocusedMode();const C=this.shadowRoot.querySelector("api-response");C&&C.resetSelection()}this.updateRoute==="true"&&this.replaceHistoryState(n);const x=this.shadowRoot.getElementById(`link-${n}`);if(x){l&&x.scrollIntoView({behavior:this.scrollBehavior,block:"center"}),await Ou(0);const S=this.shadowRoot.querySelector(".nav-bar-tag.active, .nav-bar-path.active, .nav-bar-info.active, .nav-bar-h1.active, .nav-bar-h2.active, .operations.active");S&&(S.classList.remove("active"),S.part.remove("active"),S.part.remove("section-navbar-active-item")),x.classList.add("active"),x.part.add("section-navbar-active-item")}}}}setHttpUserNameAndPassword(n,i,l){return fp.call(this,n,i,l)}setApiKey(n,i){return fp.call(this,n,"","",i)}removeAllSecurityKeys(){return AR.call(this)}setApiServer(n){return $R.call(this,n)}onAdvancedSearch(n,i){const l=n.target;clearTimeout(this.timeoutId),this.timeoutId=setTimeout((()=>{let p;p=l.type==="text"?l:l.closest(".advanced-search-options").querySelector("input[type=text]");const v=[...l.closest(".advanced-search-options").querySelectorAll("input:checked")].map((x=>x.id));this.advancedSearchMatches=(function(x,S,C=[]){if(!x.trim()||C.length===0)return;const N=[];return S.forEach((D=>{D.paths.forEach(($=>{let L="";var U;if(C.includes("search-api-path")&&(L=$.path),C.includes("search-api-descr")&&(L=`${L} ${($.summary||"")+($.description||"")}`),C.includes("search-api-params")&&(L=`${L} ${((U=$.parameters)===null||U===void 0?void 0:U.map((P=>P.name)).join(" "))||""}`),C.includes("search-api-request-body")&&$.requestBody){let P=new Set;for(const re in(J=$.requestBody)===null||J===void 0?void 0:J.content){var J,Y,Z;(Y=$.requestBody.content[re].schema)!==null&&Y!==void 0&&Y.properties&&(P=si((Z=$.requestBody.content[re].schema)===null||Z===void 0?void 0:Z.properties)),L=`${L} ${[...P].join(" ")}`}}C.includes("search-api-resp-descr")&&(L=`${L} ${Object.values($.responses).map((P=>P.description||"")).join(" ")}`),L.toLowerCase().includes(x.trim().toLowerCase())&&N.push({elementId:$.elementId,method:$.method,path:$.path,summary:$.summary||$.description||"",deprecated:$.deprecated})}))})),N})(p.value,this.resolvedSpec.tags,v)}),i)}}customElements.define("rapi-doc",AY),customElements.define("rapi-doc-mini",class extends Gt{constructor(){super(),this.isMini=!0,this.updateRoute="false",this.renderStyle="view",this.showHeader="false",this.allowAdvancedSearch="false"}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},sortEndpointsBy:{type:String,attribute:"sort-endpoints-by"},layout:{type:String},pathsExpanded:{type:String,attribute:"paths-expanded"},defaultSchemaTab:{type:String,attribute:"default-schema-tab"},responseAreaHeight:{type:String,attribute:"response-area-height"},showSummaryWhenCollapsed:{type:String,attribute:"show-summary-when-collapsed"},fillRequestFieldsWithExample:{type:String,attribute:"fill-request-fields-with-example"},persistAuth:{type:String,attribute:"persist-auth"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},apiKeyName:{type:String,attribute:"api-key-name"},apiKeyLocation:{type:String,attribute:"api-key-location"},apiKeyValue:{type:String,attribute:"api-key-value"},defaultApiServerUrl:{type:String,attribute:"default-api-server"},serverUrl:{type:String,attribute:"server-url"},oauthReceiver:{type:String,attribute:"oauth-receiver"},allowTry:{type:String,attribute:"allow-try"},showCurlBeforeTry:{type:String,attribute:"show-curl-before-try"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},fetchCredentials:{type:String,attribute:"fetch-credentials"},matchPaths:{type:String,attribute:"match-paths"},matchType:{type:String,attribute:"match-type"},removeEndpointsWithBadgeLabelAs:{type:String,attribute:"remove-endpoints-with-badge-label-as"},loading:{type:Boolean}}}static get styles(){return[Ri,ju,Cu,Au,Vg,yc,ml,Ea,ri,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
|
||
@container (min-width: 768px) {
|
||
.only-large-screen {
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
}`]}connectedCallback(){if(super.connectedCallback(),this.loadFonts!=="false"){const t={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},n=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",t);t.weight="600";const i=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",t);n.load().then((l=>{document.fonts.add(l)})),i.load().then((l=>{document.fonts.add(l)}))}this.showSummaryWhenCollapsed&&"true, false,".includes(`${this.showSummaryWhenCollapsed},`)||(this.showSummaryWhenCollapsed="true"),this.layout&&"row, column,".includes(`${this.layout},`)||(this.layout="row"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.defaultSchemaTab&&"example, schema, model,".includes(`${this.defaultSchemaTab},`)?this.defaultSchemaTab==="model"&&(this.defaultSchemaTab="schema"):this.defaultSchemaTab="example",this.pathsExpanded=this.pathsExpanded==="true",(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fillRequestFieldsWithExample&&"true, false,".includes(`${this.fillRequestFieldsWithExample},`)||(this.fillRequestFieldsWithExample="true"),this.persistAuth&&"true, false,".includes(`${this.persistAuth},`)||(this.persistAuth="false"),this.responseAreaHeight||(this.responseAreaHeight="300px"),this.allowTry&&"true, false,".includes(`${this.allowTry},`)||(this.allowTry="true"),this.apiKeyValue||(this.apiKeyValue="-"),this.apiKeyLocation||(this.apiKeyLocation="header"),this.apiKeyName||(this.apiKeyName=""),this.oauthReceiver||(this.oauthReceiver="oauth-receiver.html"),this.sortTags&&"true, false,".includes(`${this.sortTags},`)||(this.sortTags="false"),this.sortEndpointsBy&&"method, path, summary,".includes(`${this.sortEndpointsBy},`)||(this.sortEndpointsBy="path"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.matchPaths||(this.matchPaths=""),this.removeEndpointsWithBadgeLabelAs||(this.removeEndpointsWithBadgeLabelAs=""),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),this.fetchCredentials&&"omit, same-origin, include,".includes(`${this.fetchCredentials},`)||(this.fetchCredentials=""),yt.setOptions({highlight:(t,n)=>sr().languages[n]?sr().highlight(t,sr().languages[n],n):t})}render(){return EM.call(this,!0,this.pathsExpanded)}attributeChangedCallback(t,n,i){if(t==="spec-url"&&n!==i&&window.setTimeout((async()=>{await this.loadSpec(i)}),0),t!=="match-paths"&&t!=="match-type"&&t!=="remove-endpoints-with-badge-label-as"||n!==i&&window.setTimeout((async()=>{await this.loadSpec(this.specUrl)}),0),t==="api-key-name"||t==="api-key-location"||t==="api-key-value"){let l=!1,p="",v="",x="";if(t==="api-key-name"?this.getAttribute("api-key-location")&&this.getAttribute("api-key-value")&&(p=i,v=this.getAttribute("api-key-location"),x=this.getAttribute("api-key-value"),l=!0):t==="api-key-location"?this.getAttribute("api-key-name")&&this.getAttribute("api-key-value")&&(v=i,p=this.getAttribute("api-key-name"),x=this.getAttribute("api-key-value"),l=!0):t==="api-key-value"&&this.getAttribute("api-key-name")&&this.getAttribute("api-key-location")&&(x=i,v=this.getAttribute("api-key-location"),p=this.getAttribute("api-key-name"),l=!0),l&&this.resolvedSpec){const S=this.resolvedSpec.securitySchemes.find((C=>C.securitySchemeId===mo));S?(S.name=p,S.in=v,S.value=x,S.finalKeyValue=x):this.resolvedSpec.securitySchemes.push({apiKeyId:mo,description:"api-key provided in rapidoc element attributes",type:"apiKey",name:p,in:v,value:x,finalKeyValue:x}),this.requestUpdate()}}super.attributeChangedCallback(t,n,i)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}async loadSpec(t){if(t)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const n=await wR.call(this,t,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("api-key-name"),this.getAttribute("api-key-location"),this.getAttribute("api-key-value"),this.getAttribute("server-url"),this.matchPaths,this.matchType,this.removeEndpointsWithBadgeLabelAs);this.loading=!1,this.afterSpecParsedAndValidated(n)}catch(n){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${n.message}`)}}setHttpUserNameAndPassword(t,n,i){return fp.call(this,t,n,i)}setApiKey(t,n){return fp.call(this,t,"","",n)}removeAllSecurityKeys(){return AR.call(this)}setApiServer(t){return $R.call(this,t)}async afterSpecParsedAndValidated(t){for(this.resolvedSpec=t,this.selectedServer=void 0,this.defaultApiServerUrl&&(this.defaultApiServerUrl===this.serverUrl?this.selectedServer={url:this.serverUrl,computedUrl:this.serverUrl}:this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers.find((i=>i.url===this.defaultApiServerUrl)))),this.selectedServer||this.resolvedSpec.servers&&(this.selectedServer=this.resolvedSpec.servers[0]),this.requestUpdate();!await this.updateComplete;);const n=new CustomEvent("spec-loaded",{detail:t});this.dispatchEvent(n)}handleHref(t){if(t.target.tagName.toLowerCase()==="a"&&t.target.getAttribute("href").startsWith("#")){const n=this.shadowRoot.getElementById(t.target.getAttribute("href").replace("#",""));n&&n.scrollIntoView({behavior:"auto",block:"start"})}}});class OY extends HTMLElement{connectedCallback(){this.receiveAuthParms(),window.addEventListener("storage",(n=>this.receiveStorage(n)),!0)}receiveAuthParms(){let n={};if(document.location.search){const i=new URLSearchParams(document.location.search);n={code:i.get("code"),error:i.get("error"),state:i.get("state"),responseType:"code"}}else window.location.hash&&(n={token_type:this.parseQueryString(window.location.hash.substring(1),"token_type"),access_token:this.parseQueryString(window.location.hash.substring(1),"access_token"),responseType:"token"});window.opener?window.opener.postMessage(n,this.target):sessionStorage.setItem("rapidoc-oauth-data",JSON.stringify(n))}relayAuthParams(n){if(window.parent&&n.key==="rapidoc-oauth-data"){const i=JSON.parse(n.newValue);window.parent.postMessage(i,this.target)}}parseQueryString(n,i){const l=n.split("&");for(let p=0;p<l.length;p++){const v=l[p].split("=");if(decodeURIComponent(v[0])===i)return decodeURIComponent(v[1])}}}function kY(){return G`
|
||
<nav class='nav-bar' part="section-navbar">
|
||
<slot name="nav-logo" class="logo"></slot>
|
||
<div style="display:flex;line-height:22px; padding:8px">
|
||
<input id="nav-bar-search"
|
||
part = "textbox textbox-nav-filter"
|
||
style = "width:100%; height: 26px; padding-right:20px; color:var(--nav-hover-text-color); border-color:var(--nav-accent-color); background-color:var(--nav-hover-bg-color)"
|
||
type = "text"
|
||
placeholder = "Filter"
|
||
@change = "${this.onSearchChange}"
|
||
spellcheck = "false"
|
||
>
|
||
<div style="margin: 6px 5px 0 -24px; font-size:var(--font-size-regular); cursor:pointer;">↩</div>
|
||
</div>
|
||
<nav style="flex:1" class='nav-scroll' part="section-navbar-scroll">
|
||
${this.resolvedSpec.schemaAndExamples.map((t=>G`
|
||
<div class='nav-bar-path' data-content-id='${t.elementId}' id='link-${t.elementId}'
|
||
@click = '${n=>{this.scrollToEventTarget(n,!1)}}'
|
||
>
|
||
${t.name}
|
||
</div>`))}
|
||
</nav>
|
||
</nav>
|
||
`}function RY(){return G`
|
||
${this.showInfo==="true"?zE.call(this):""}
|
||
<div style="font-size:var(--font-size-regular);">
|
||
${this.resolvedSpec.schemaAndExamples.map((t=>{var n;const i=Km(t.schema,"json",da(t.examples),da(t.example),!0,!1,"json",!0);return t.selectedExample=(n=i[0])===null||n===void 0?void 0:n.exampleId,G`
|
||
<section id='${t.elementId}' class='json-schema-and-example regular-font' style="display:flex; flex-direction: column; border:1px solid var(--border-color); margin-bottom:32px; border-top: 5px solid var(--border-color)">
|
||
<div style="padding:16px; border-bottom: 1px solid var(--border-color)">
|
||
<div style="font-size:var(--font-size-small); font-weight:bold">${t.name}</div>
|
||
<span class="json-schema-description m-markdown ">${In(yt(t.description||""))}</span>
|
||
</div>
|
||
<div style="display:flex; flex-direction: row; gap:16px;">
|
||
<div class="json-schema-def" style="flex:1; padding:16px 0 16px 16px; ">
|
||
<schema-tree
|
||
.data = "${ts(t.schema,{})}"
|
||
schema-expand-level = "${this.schemaExpandLevel}"
|
||
schema-description-expanded = "${this.schemaDescriptionExpanded}"
|
||
allow-schema-description-expand-toggle = "${this.allowSchemaDescriptionExpandToggle}"
|
||
schema-hide-read-only = "false"
|
||
schema-hide-write-only = "false"
|
||
> </schema-tree>
|
||
</div>
|
||
<div class="json-schema-example-panel" style="width:400px; background-color: var(--input-bg); padding:16px 0 16px 16px; border-left: 1px dashed var(--border-color);">
|
||
${i.length>1?G`<select style="min-width:100px; max-width:100%" @change='${l=>this.onSelectExample(l,t)}'>
|
||
${i.map((l=>G`
|
||
<option value="${l.exampleId}" ?selected=${l.exampleId===t.selectedExample}>
|
||
${l.exampleSummary.length>80?l.exampleId:l.exampleSummary}
|
||
</option>`))}
|
||
</select>`:G`<div style="font-size: var(--font-size-small);font-weight:700; margin:5px 0"> ${i[0].exampleSummary}</div>`}
|
||
${i.map((l=>G`
|
||
<json-tree
|
||
.data = "${l.exampleValue}"
|
||
data-example = "${l.exampleId}"
|
||
class = "example"
|
||
style = "margin-top:16px; display: ${l.exampleId===t.selectedExample?"flex":"none"}"
|
||
></json-tree>`))}
|
||
</div>
|
||
</div>
|
||
</section>`}))}
|
||
</div>
|
||
`}function TY(t=!1){if(!this.resolvedSpec)return"";const n={bg1:hs(this.bgColor)?this.bgColor:"",fg1:hs(this.textColor)?this.textColor:"",headerColor:hs(this.headerColor)?this.headerColor:"",primaryColor:hs(this.primaryColor)?this.primaryColor:"",navBgColor:hs(this.navBgColor)?this.navBgColor:"",navTextColor:hs(this.navTextColor)?this.navTextColor:"",navHoverBgColor:hs(this.navHoverBgColor)?this.navHoverBgColor:"",navHoverTextColor:hs(this.navHoverTextColor)?this.navHoverTextColor:"",navAccentColor:hs(this.navAccentColor)?this.navAccentColor:"",navAccenttextColor:hs(this.navAccentTextColor)?this.navAccentTextColor:""};return this.resolvedSpec.specLoadError?t?G`
|
||
${this.theme==="dark"?ha.call(this,"dark",n):ha.call(this,"light",n)}
|
||
<div style="display:flex; align-items:center; border:1px dashed var(--border-color); height:42px; padding:5px; font-size:var(--font-size-small); color:var(--red); font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
|
||
`:G`
|
||
${this.theme==="dark"?ha.call(this,"dark",n):ha.call(this,"light",n)}
|
||
<!-- Header -->
|
||
${NR.call(this)}
|
||
<h1> Header </h1>
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div style="margin:24px; text-align: center;">
|
||
<h1 style="color: var(--red)"> ${this.resolvedSpec.info.title} </h1>
|
||
<div style="font-family:var(--font-mono)"> ${this.resolvedSpec.info.description} </div>
|
||
</div>
|
||
</main>
|
||
`:this.resolvedSpec.isSpecLoading?G`
|
||
${this.theme==="dark"?ha.call(this,"dark",n):ha.call(this,"light",n)}
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div class="main-content-inner--${this.renderStyle}-mode">
|
||
<div class="loader"></div>
|
||
</div>
|
||
</main>
|
||
`:G`
|
||
${this.theme==="dark"?ha.call(this,"dark",n):ha.call(this,"light",n)}
|
||
|
||
<!-- Header -->
|
||
${this.showHeader==="false"?"":NR.call(this)}
|
||
|
||
<div id='the-main-body' class="body ${this.cssClasses}" dir= ${this.pageDirection}>
|
||
|
||
<!-- Side Nav -->
|
||
${kY.call(this)}
|
||
|
||
<!-- Main Content -->
|
||
<main class="main-content regular-font" part="section-main-content">
|
||
<slot></slot>
|
||
<div class="main-content-inner--${this.renderStyle}-mode">
|
||
${this.loading===!0?G`<div class="loader"></div>`:G`
|
||
${this.loadFailed===!0?G`<div style="text-align: center;margin: 16px;"> Unable to load the Spec</div>`:G`
|
||
<div class="operations-root" @click="${i=>{this.handleHref(i)}}">
|
||
${RY.call(this)}
|
||
</div>
|
||
`}`}
|
||
</div>
|
||
<slot name="footer"></slot>
|
||
</main>
|
||
</div>
|
||
`}customElements.define("oauth-receiver",OY),customElements.define("json-schema-viewer",class extends Gt{constructor(){super(),this.isMini=!1,this.updateRoute="false",this.renderStyle="focused",this.showHeader="true",this.allowAdvancedSearch="false",this.selectedExampleForEachSchema={}}static get properties(){return{specUrl:{type:String,attribute:"spec-url"},schemaStyle:{type:String,attribute:"schema-style"},schemaExpandLevel:{type:Number,attribute:"schema-expand-level"},schemaDescriptionExpanded:{type:String,attribute:"schema-description-expanded"},allowSchemaDescriptionExpandToggle:{type:String,attribute:"allow-schema-description-expand-toggle"},showHeader:{type:String,attribute:"show-header"},showSideNav:{type:String,attribute:"show-side-nav"},showInfo:{type:String,attribute:"show-info"},allowSpecUrlLoad:{type:String,attribute:"allow-spec-url-load"},allowSpecFileLoad:{type:String,attribute:"allow-spec-file-load"},allowSpecFileDownload:{type:String,attribute:"allow-spec-file-download"},allowSearch:{type:String,attribute:"allow-search"},theme:{type:String},bgColor:{type:String,attribute:"bg-color"},textColor:{type:String,attribute:"text-color"},primaryColor:{type:String,attribute:"primary-color"},fontSize:{type:String,attribute:"font-size"},regularFont:{type:String,attribute:"regular-font"},monoFont:{type:String,attribute:"mono-font"},loadFonts:{type:String,attribute:"load-fonts"},loading:{type:Boolean}}}static get styles(){return[Ri,ju,Cu,Au,Vg,yc,ml,Ea,ri,M`
|
||
:host {
|
||
all: initial;
|
||
display:flex;
|
||
flex-direction: column;
|
||
min-width:360px;
|
||
width:100%;
|
||
height:100%;
|
||
margin:0;
|
||
padding:0;
|
||
overflow: hidden;
|
||
letter-spacing:normal;
|
||
color:var(--fg);
|
||
background-color:var(--bg);
|
||
font-family:var(--font-regular);
|
||
container-type: inline-size;
|
||
}
|
||
.body {
|
||
display:flex;
|
||
height:100%;
|
||
width:100%;
|
||
overflow:hidden;
|
||
}
|
||
.nav-bar {
|
||
width: 230px;
|
||
display:flex;
|
||
}
|
||
|
||
.main-content {
|
||
margin:0;
|
||
padding: 16px;
|
||
display:block;
|
||
flex:1;
|
||
height:100%;
|
||
overflow-y: auto;
|
||
overflow-x: hidden;
|
||
scrollbar-width: thin;
|
||
scrollbar-color: var(--border-color) transparent;
|
||
}
|
||
.main-content-inner--view-mode {
|
||
padding: 0 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar {
|
||
width: 8px;
|
||
height: 8px;
|
||
}
|
||
.main-content::-webkit-scrollbar-track {
|
||
background:transparent;
|
||
}
|
||
.main-content::-webkit-scrollbar-thumb {
|
||
background-color: var(--border-color);
|
||
}
|
||
.main-header {
|
||
background-color:var(--header-bg);
|
||
color:var(--header-fg);
|
||
width:100%;
|
||
}
|
||
.header-title {
|
||
font-size:calc(var(--font-size-regular) + 8px);
|
||
padding:0 8px;
|
||
}
|
||
input.header-input{
|
||
background:var(--header-color-darker);
|
||
color:var(--header-fg);
|
||
border:1px solid var(--header-color-border);
|
||
flex:1;
|
||
padding-right:24px;
|
||
border-radius:3px;
|
||
}
|
||
input.header-input::placeholder {
|
||
opacity:0.4;
|
||
}
|
||
.loader {
|
||
margin: 16px auto 16px auto;
|
||
border: 4px solid var(--bg3);
|
||
border-radius: 50%;
|
||
border-top: 4px solid var(--primary-color);
|
||
width: 36px;
|
||
height: 36px;
|
||
animation: spin 2s linear infinite;
|
||
}
|
||
@container (min-width: 768px) {
|
||
.only-large-screen{
|
||
display:block;
|
||
}
|
||
.only-large-screen-flex {
|
||
display:flex;
|
||
}
|
||
}`]}connectedCallback(){super.connectedCallback();const t=this.parentElement;if(t&&(t.offsetWidth===0&&t.style.width===""&&(t.style.width="100vw"),t.offsetHeight===0&&t.style.height===""&&(t.style.height="100vh"),t.tagName==="BODY"&&(t.style.marginTop||(t.style.marginTop="0"),t.style.marginRight||(t.style.marginRight="0"),t.style.marginBottom||(t.style.marginBottom="0"),t.style.marginLeft||(t.style.marginLeft="0"))),this.loadFonts!=="false"){const n={family:"Open Sans",style:"normal",weight:"300",unicodeRange:"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"},i=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UN_r8OUuhpKKSTjw.woff2) format('woff2')",n);n.weight="600";const l=new FontFace("Open Sans","url(https://fonts.gstatic.com/s/opensans/v18/mem5YaGs126MiZpBA-UNirkOUuhpKKSTjw.woff2) format('woff2')",n);i.load().then((p=>{document.fonts.add(p)})),l.load().then((p=>{document.fonts.add(p)}))}this.renderStyle="focused",this.pathsExpanded=this.pathsExpanded==="true",this.showInfo&&"true, false,".includes(`${this.showInfo},`)||(this.showInfo="true"),this.showSideNav&&"true false".includes(this.showSideNav)||(this.showSideNav="true"),this.showHeader&&"true, false,".includes(`${this.showHeader},`)||(this.showHeader="true"),this.schemaStyle&&"tree, table,".includes(`${this.schemaStyle},`)||(this.schemaStyle="tree"),this.theme&&"light, dark,".includes(`${this.theme},`)||(this.theme=window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),this.allowSearch&&"true, false,".includes(`${this.allowSearch},`)||(this.allowSearch="true"),(!this.schemaExpandLevel||this.schemaExpandLevel<1)&&(this.schemaExpandLevel=99999),this.schemaDescriptionExpanded&&"true, false,".includes(`${this.schemaDescriptionExpanded},`)||(this.schemaDescriptionExpanded="false"),this.fontSize&&"default, large, largest,".includes(`${this.fontSize},`)||(this.fontSize="default"),this.matchType&&"includes regex".includes(this.matchType)||(this.matchType="includes"),this.allowSchemaDescriptionExpandToggle&&"true, false,".includes(`${this.allowSchemaDescriptionExpandToggle},`)||(this.allowSchemaDescriptionExpandToggle="true"),yt.setOptions({highlight:(n,i)=>sr().languages[i]?sr().highlight(n,sr().languages[i],i):n})}render(){return TY.call(this,!0,!1,!1,this.pathsExpanded)}attributeChangedCallback(t,n,i){t==="spec-url"&&n!==i&&window.setTimeout((async()=>{await this.loadSpec(i)}),0),super.attributeChangedCallback(t,n,i)}onSpecUrlChange(){this.setAttribute("spec-url",this.shadowRoot.getElementById("spec-url").value)}onSearchChange(t){this.matchPaths=t.target.value}async loadSpec(t){if(t)try{this.resolvedSpec={specLoadError:!1,isSpecLoading:!0,tags:[]},this.loading=!0,this.loadFailed=!1,this.requestUpdate();const n=await wR.call(this,t,this.generateMissingTags==="true",this.sortTags==="true",this.sortSchemas==="true",this.getAttribute("sort-endpoints-by"),this.getAttribute("match-paths"),this.getAttribute("match-type"),this.getAttribute("remove-endpoints-with-badge-label-as"));this.loading=!1,this.afterSpecParsedAndValidated(n)}catch(n){this.loading=!1,this.loadFailed=!0,this.resolvedSpec=null,console.error(`RapiDoc: Unable to resolve the API spec.. ${n.message}`)}}async afterSpecParsedAndValidated(t){this.resolvedSpec=t;const n=new CustomEvent("spec-loaded",{detail:t});this.dispatchEvent(n)}handleHref(t){if(t.target.tagName.toLowerCase()==="a"&&t.target.getAttribute("href").startsWith("#")){const n=this.shadowRoot.getElementById(t.target.getAttribute("href").replace("#",""));n&&n.scrollIntoView({behavior:"auto",block:"start"})}}onSelectExample(t){[...t.target.closest(".json-schema-example-panel").querySelectorAll(".example")].forEach((n=>{n.style.display=n.dataset.example===t.target.value?"flex":"none"}))}async scrollToEventTarget(t){const n=t.currentTarget;if(!n.dataset.contentId)return;const i=this.shadowRoot.getElementById(n.dataset.contentId);i&&i.scrollIntoView({behavior:"auto",block:"start"})}})},526:(h,m)=>{m.byteLength=function(M){var I=k(M),F=I[0],H=I[1];return 3*(F+H)/4-H},m.toByteArray=function(M){var I,F,H=k(M),V=H[0],K=H[1],z=new w((function(Q,te,de){return 3*(te+de)/4-de})(0,V,K)),W=0,ae=K>0?V-4:V;for(F=0;F<ae;F+=4)I=b[M.charCodeAt(F)]<<18|b[M.charCodeAt(F+1)]<<12|b[M.charCodeAt(F+2)]<<6|b[M.charCodeAt(F+3)],z[W++]=I>>16&255,z[W++]=I>>8&255,z[W++]=255&I;return K===2&&(I=b[M.charCodeAt(F)]<<2|b[M.charCodeAt(F+1)]>>4,z[W++]=255&I),K===1&&(I=b[M.charCodeAt(F)]<<10|b[M.charCodeAt(F+1)]<<4|b[M.charCodeAt(F+2)]>>2,z[W++]=I>>8&255,z[W++]=255&I),z},m.fromByteArray=function(M){for(var I,F=M.length,H=F%3,V=[],K=16383,z=0,W=F-H;z<W;z+=K)V.push(R(M,z,z+K>W?W:z+K));return H===1?(I=M[F-1],V.push(g[I>>2]+g[I<<4&63]+"==")):H===2&&(I=(M[F-2]<<8)+M[F-1],V.push(g[I>>10]+g[I>>4&63]+g[I<<2&63]+"=")),V.join("")};for(var g=[],b=[],w=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0;A<64;++A)g[A]=E[A],b[E.charCodeAt(A)]=A;function k(M){var I=M.length;if(I%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var F=M.indexOf("=");return F===-1&&(F=I),[F,F===I?0:4-F%4]}function R(M,I,F){for(var H,V,K=[],z=I;z<F;z+=3)H=(M[z]<<16&16711680)+(M[z+1]<<8&65280)+(255&M[z+2]),K.push(g[(V=H)>>18&63]+g[V>>12&63]+g[V>>6&63]+g[63&V]);return K.join("")}b[45]=62,b[95]=63},287:(h,m,g)=>{const b=g(526),w=g(251),E=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;m.hp=R,m.IS=50;const A=2147483647;function k(_){if(_>A)throw new RangeError('The value "'+_+'" is invalid for option "size"');const q=new Uint8Array(_);return Object.setPrototypeOf(q,R.prototype),q}function R(_,q,X){if(typeof _=="number"){if(typeof q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return F(_)}return M(_,q,X)}function M(_,q,X){if(typeof _=="string")return(function(Re,Je){if(typeof Je=="string"&&Je!==""||(Je="utf8"),!R.isEncoding(Je))throw new TypeError("Unknown encoding: "+Je);const Tt=0|z(Re,Je);let fe=k(Tt);const Ut=fe.write(Re,Je);return Ut!==Tt&&(fe=fe.slice(0,Ut)),fe})(_,q);if(ArrayBuffer.isView(_))return(function(Re){if(On(Re,Uint8Array)){const Je=new Uint8Array(Re);return V(Je.buffer,Je.byteOffset,Je.byteLength)}return H(Re)})(_);if(_==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _);if(On(_,ArrayBuffer)||_&&On(_.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(On(_,SharedArrayBuffer)||_&&On(_.buffer,SharedArrayBuffer)))return V(_,q,X);if(typeof _=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const oe=_.valueOf&&_.valueOf();if(oe!=null&&oe!==_)return R.from(oe,q,X);const ve=(function(Re){if(R.isBuffer(Re)){const Je=0|K(Re.length),Tt=k(Je);return Tt.length===0||Re.copy(Tt,0,0,Je),Tt}if(Re.length!==void 0)return typeof Re.length!="number"||mn(Re.length)?k(0):H(Re);if(Re.type==="Buffer"&&Array.isArray(Re.data))return H(Re.data)})(_);if(ve)return ve;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _[Symbol.toPrimitive]=="function")return R.from(_[Symbol.toPrimitive]("string"),q,X);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _)}function I(_){if(typeof _!="number")throw new TypeError('"size" argument must be of type number');if(_<0)throw new RangeError('The value "'+_+'" is invalid for option "size"')}function F(_){return I(_),k(_<0?0:0|K(_))}function H(_){const q=_.length<0?0:0|K(_.length),X=k(q);for(let oe=0;oe<q;oe+=1)X[oe]=255&_[oe];return X}function V(_,q,X){if(q<0||_.byteLength<q)throw new RangeError('"offset" is outside of buffer bounds');if(_.byteLength<q+(X||0))throw new RangeError('"length" is outside of buffer bounds');let oe;return oe=q===void 0&&X===void 0?new Uint8Array(_):X===void 0?new Uint8Array(_,q):new Uint8Array(_,q,X),Object.setPrototypeOf(oe,R.prototype),oe}function K(_){if(_>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return 0|_}function z(_,q){if(R.isBuffer(_))return _.length;if(ArrayBuffer.isView(_)||On(_,ArrayBuffer))return _.byteLength;if(typeof _!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _);const X=_.length,oe=arguments.length>2&&arguments[2]===!0;if(!oe&&X===0)return 0;let ve=!1;for(;;)switch(q){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":return Bt(_).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*X;case"hex":return X>>>1;case"base64":return kt(_).length;default:if(ve)return oe?-1:Bt(_).length;q=(""+q).toLowerCase(),ve=!0}}function W(_,q,X){let oe=!1;if((q===void 0||q<0)&&(q=0),q>this.length||((X===void 0||X>this.length)&&(X=this.length),X<=0)||(X>>>=0)<=(q>>>=0))return"";for(_||(_="utf8");;)switch(_){case"hex":return $e(this,q,X);case"utf8":case"utf-8":return He(this,q,X);case"ascii":return ne(this,q,X);case"latin1":case"binary":return ce(this,q,X);case"base64":return Ae(this,q,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,q,X);default:if(oe)throw new TypeError("Unknown encoding: "+_);_=(_+"").toLowerCase(),oe=!0}}function ae(_,q,X){const oe=_[q];_[q]=_[X],_[X]=oe}function Q(_,q,X,oe,ve){if(_.length===0)return-1;if(typeof X=="string"?(oe=X,X=0):X>2147483647?X=2147483647:X<-2147483648&&(X=-2147483648),mn(X=+X)&&(X=ve?0:_.length-1),X<0&&(X=_.length+X),X>=_.length){if(ve)return-1;X=_.length-1}else if(X<0){if(!ve)return-1;X=0}if(typeof q=="string"&&(q=R.from(q,oe)),R.isBuffer(q))return q.length===0?-1:te(_,q,X,oe,ve);if(typeof q=="number")return q&=255,typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(_,q,X):Uint8Array.prototype.lastIndexOf.call(_,q,X):te(_,[q],X,oe,ve);throw new TypeError("val must be string, number or Buffer")}function te(_,q,X,oe,ve){let Re,Je=1,Tt=_.length,fe=q.length;if(oe!==void 0&&((oe=String(oe).toLowerCase())==="ucs2"||oe==="ucs-2"||oe==="utf16le"||oe==="utf-16le")){if(_.length<2||q.length<2)return-1;Je=2,Tt/=2,fe/=2,X/=2}function Ut(nn,Gt){return Je===1?nn[Gt]:nn.readUInt16BE(Gt*Je)}if(ve){let nn=-1;for(Re=X;Re<Tt;Re++)if(Ut(_,Re)===Ut(q,nn===-1?0:Re-nn)){if(nn===-1&&(nn=Re),Re-nn+1===fe)return nn*Je}else nn!==-1&&(Re-=Re-nn),nn=-1}else for(X+fe>Tt&&(X=Tt-fe),Re=X;Re>=0;Re--){let nn=!0;for(let Gt=0;Gt<fe;Gt++)if(Ut(_,Re+Gt)!==Ut(q,Gt)){nn=!1;break}if(nn)return Re}return-1}function de(_,q,X,oe){X=Number(X)||0;const ve=_.length-X;oe?(oe=Number(oe))>ve&&(oe=ve):oe=ve;const Re=q.length;let Je;for(oe>Re/2&&(oe=Re/2),Je=0;Je<oe;++Je){const Tt=parseInt(q.substr(2*Je,2),16);if(mn(Tt))return Je;_[X+Je]=Tt}return Je}function je(_,q,X,oe){return G(Bt(q,_.length-X),_,X,oe)}function we(_,q,X,oe){return G((function(ve){const Re=[];for(let Je=0;Je<ve.length;++Je)Re.push(255&ve.charCodeAt(Je));return Re})(q),_,X,oe)}function ie(_,q,X,oe){return G(kt(q),_,X,oe)}function Se(_,q,X,oe){return G((function(ve,Re){let Je,Tt,fe;const Ut=[];for(let nn=0;nn<ve.length&&!((Re-=2)<0);++nn)Je=ve.charCodeAt(nn),Tt=Je>>8,fe=Je%256,Ut.push(fe),Ut.push(Tt);return Ut})(q,_.length-X),_,X,oe)}function Ae(_,q,X){return q===0&&X===_.length?b.fromByteArray(_):b.fromByteArray(_.slice(q,X))}function He(_,q,X){X=Math.min(_.length,X);const oe=[];let ve=q;for(;ve<X;){const Re=_[ve];let Je=null,Tt=Re>239?4:Re>223?3:Re>191?2:1;if(ve+Tt<=X){let fe,Ut,nn,Gt;switch(Tt){case 1:Re<128&&(Je=Re);break;case 2:fe=_[ve+1],(192&fe)==128&&(Gt=(31&Re)<<6|63&fe,Gt>127&&(Je=Gt));break;case 3:fe=_[ve+1],Ut=_[ve+2],(192&fe)==128&&(192&Ut)==128&&(Gt=(15&Re)<<12|(63&fe)<<6|63&Ut,Gt>2047&&(Gt<55296||Gt>57343)&&(Je=Gt));break;case 4:fe=_[ve+1],Ut=_[ve+2],nn=_[ve+3],(192&fe)==128&&(192&Ut)==128&&(192&nn)==128&&(Gt=(15&Re)<<18|(63&fe)<<12|(63&Ut)<<6|63&nn,Gt>65535&&Gt<1114112&&(Je=Gt))}}Je===null?(Je=65533,Tt=1):Je>65535&&(Je-=65536,oe.push(Je>>>10&1023|55296),Je=56320|1023&Je),oe.push(Je),ve+=Tt}return(function(Re){const Je=Re.length;if(Je<=ue)return String.fromCharCode.apply(String,Re);let Tt="",fe=0;for(;fe<Je;)Tt+=String.fromCharCode.apply(String,Re.slice(fe,fe+=ue));return Tt})(oe)}R.TYPED_ARRAY_SUPPORT=(function(){try{const _=new Uint8Array(1),q={foo:function(){return 42}};return Object.setPrototypeOf(q,Uint8Array.prototype),Object.setPrototypeOf(_,q),_.foo()===42}catch{return!1}})(),R.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(R.prototype,"parent",{enumerable:!0,get:function(){if(R.isBuffer(this))return this.buffer}}),Object.defineProperty(R.prototype,"offset",{enumerable:!0,get:function(){if(R.isBuffer(this))return this.byteOffset}}),R.poolSize=8192,R.from=function(_,q,X){return M(_,q,X)},Object.setPrototypeOf(R.prototype,Uint8Array.prototype),Object.setPrototypeOf(R,Uint8Array),R.alloc=function(_,q,X){return(function(oe,ve,Re){return I(oe),oe<=0?k(oe):ve!==void 0?typeof Re=="string"?k(oe).fill(ve,Re):k(oe).fill(ve):k(oe)})(_,q,X)},R.allocUnsafe=function(_){return F(_)},R.allocUnsafeSlow=function(_){return F(_)},R.isBuffer=function(_){return _!=null&&_._isBuffer===!0&&_!==R.prototype},R.compare=function(_,q){if(On(_,Uint8Array)&&(_=R.from(_,_.offset,_.byteLength)),On(q,Uint8Array)&&(q=R.from(q,q.offset,q.byteLength)),!R.isBuffer(_)||!R.isBuffer(q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_===q)return 0;let X=_.length,oe=q.length;for(let ve=0,Re=Math.min(X,oe);ve<Re;++ve)if(_[ve]!==q[ve]){X=_[ve],oe=q[ve];break}return X<oe?-1:oe<X?1:0},R.isEncoding=function(_){switch(String(_).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},R.concat=function(_,q){if(!Array.isArray(_))throw new TypeError('"list" argument must be an Array of Buffers');if(_.length===0)return R.alloc(0);let X;if(q===void 0)for(q=0,X=0;X<_.length;++X)q+=_[X].length;const oe=R.allocUnsafe(q);let ve=0;for(X=0;X<_.length;++X){let Re=_[X];if(On(Re,Uint8Array))ve+Re.length>oe.length?(R.isBuffer(Re)||(Re=R.from(Re)),Re.copy(oe,ve)):Uint8Array.prototype.set.call(oe,Re,ve);else{if(!R.isBuffer(Re))throw new TypeError('"list" argument must be an Array of Buffers');Re.copy(oe,ve)}ve+=Re.length}return oe},R.byteLength=z,R.prototype._isBuffer=!0,R.prototype.swap16=function(){const _=this.length;if(_%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let q=0;q<_;q+=2)ae(this,q,q+1);return this},R.prototype.swap32=function(){const _=this.length;if(_%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let q=0;q<_;q+=4)ae(this,q,q+3),ae(this,q+1,q+2);return this},R.prototype.swap64=function(){const _=this.length;if(_%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let q=0;q<_;q+=8)ae(this,q,q+7),ae(this,q+1,q+6),ae(this,q+2,q+5),ae(this,q+3,q+4);return this},R.prototype.toString=function(){const _=this.length;return _===0?"":arguments.length===0?He(this,0,_):W.apply(this,arguments)},R.prototype.toLocaleString=R.prototype.toString,R.prototype.equals=function(_){if(!R.isBuffer(_))throw new TypeError("Argument must be a Buffer");return this===_||R.compare(this,_)===0},R.prototype.inspect=function(){let _="";const q=m.IS;return _=this.toString("hex",0,q).replace(/(.{2})/g,"$1 ").trim(),this.length>q&&(_+=" ... "),"<Buffer "+_+">"},E&&(R.prototype[E]=R.prototype.inspect),R.prototype.compare=function(_,q,X,oe,ve){if(On(_,Uint8Array)&&(_=R.from(_,_.offset,_.byteLength)),!R.isBuffer(_))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _);if(q===void 0&&(q=0),X===void 0&&(X=_?_.length:0),oe===void 0&&(oe=0),ve===void 0&&(ve=this.length),q<0||X>_.length||oe<0||ve>this.length)throw new RangeError("out of range index");if(oe>=ve&&q>=X)return 0;if(oe>=ve)return-1;if(q>=X)return 1;if(this===_)return 0;let Re=(ve>>>=0)-(oe>>>=0),Je=(X>>>=0)-(q>>>=0);const Tt=Math.min(Re,Je),fe=this.slice(oe,ve),Ut=_.slice(q,X);for(let nn=0;nn<Tt;++nn)if(fe[nn]!==Ut[nn]){Re=fe[nn],Je=Ut[nn];break}return Re<Je?-1:Je<Re?1:0},R.prototype.includes=function(_,q,X){return this.indexOf(_,q,X)!==-1},R.prototype.indexOf=function(_,q,X){return Q(this,_,q,X,!0)},R.prototype.lastIndexOf=function(_,q,X){return Q(this,_,q,X,!1)},R.prototype.write=function(_,q,X,oe){if(q===void 0)oe="utf8",X=this.length,q=0;else if(X===void 0&&typeof q=="string")oe=q,X=this.length,q=0;else{if(!isFinite(q))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");q>>>=0,isFinite(X)?(X>>>=0,oe===void 0&&(oe="utf8")):(oe=X,X=void 0)}const ve=this.length-q;if((X===void 0||X>ve)&&(X=ve),_.length>0&&(X<0||q<0)||q>this.length)throw new RangeError("Attempt to write outside buffer bounds");oe||(oe="utf8");let Re=!1;for(;;)switch(oe){case"hex":return de(this,_,q,X);case"utf8":case"utf-8":return je(this,_,q,X);case"ascii":case"latin1":case"binary":return we(this,_,q,X);case"base64":return ie(this,_,q,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Se(this,_,q,X);default:if(Re)throw new TypeError("Unknown encoding: "+oe);oe=(""+oe).toLowerCase(),Re=!0}},R.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const ue=4096;function ne(_,q,X){let oe="";X=Math.min(_.length,X);for(let ve=q;ve<X;++ve)oe+=String.fromCharCode(127&_[ve]);return oe}function ce(_,q,X){let oe="";X=Math.min(_.length,X);for(let ve=q;ve<X;++ve)oe+=String.fromCharCode(_[ve]);return oe}function $e(_,q,X){const oe=_.length;(!q||q<0)&&(q=0),(!X||X<0||X>oe)&&(X=oe);let ve="";for(let Re=q;Re<X;++Re)ve+=Oi[_[Re]];return ve}function me(_,q,X){const oe=_.slice(q,X);let ve="";for(let Re=0;Re<oe.length-1;Re+=2)ve+=String.fromCharCode(oe[Re]+256*oe[Re+1]);return ve}function Xe(_,q,X){if(_%1!=0||_<0)throw new RangeError("offset is not uint");if(_+q>X)throw new RangeError("Trying to access beyond buffer length")}function Oe(_,q,X,oe,ve,Re){if(!R.isBuffer(_))throw new TypeError('"buffer" argument must be a Buffer instance');if(q>ve||q<Re)throw new RangeError('"value" argument is out of bounds');if(X+oe>_.length)throw new RangeError("Index out of range")}function Te(_,q,X,oe,ve){Lt(q,oe,ve,_,X,7);let Re=Number(q&BigInt(4294967295));_[X++]=Re,Re>>=8,_[X++]=Re,Re>>=8,_[X++]=Re,Re>>=8,_[X++]=Re;let Je=Number(q>>BigInt(32)&BigInt(4294967295));return _[X++]=Je,Je>>=8,_[X++]=Je,Je>>=8,_[X++]=Je,Je>>=8,_[X++]=Je,X}function Ke(_,q,X,oe,ve){Lt(q,oe,ve,_,X,7);let Re=Number(q&BigInt(4294967295));_[X+7]=Re,Re>>=8,_[X+6]=Re,Re>>=8,_[X+5]=Re,Re>>=8,_[X+4]=Re;let Je=Number(q>>BigInt(32)&BigInt(4294967295));return _[X+3]=Je,Je>>=8,_[X+2]=Je,Je>>=8,_[X+1]=Je,Je>>=8,_[X]=Je,X+8}function se(_,q,X,oe,ve,Re){if(X+oe>_.length)throw new RangeError("Index out of range");if(X<0)throw new RangeError("Index out of range")}function Ne(_,q,X,oe,ve){return q=+q,X>>>=0,ve||se(_,0,X,4),w.write(_,q,X,oe,23,4),X+4}function Fe(_,q,X,oe,ve){return q=+q,X>>>=0,ve||se(_,0,X,8),w.write(_,q,X,oe,52,8),X+8}R.prototype.slice=function(_,q){const X=this.length;(_=~~_)<0?(_+=X)<0&&(_=0):_>X&&(_=X),(q=q===void 0?X:~~q)<0?(q+=X)<0&&(q=0):q>X&&(q=X),q<_&&(q=_);const oe=this.subarray(_,q);return Object.setPrototypeOf(oe,R.prototype),oe},R.prototype.readUintLE=R.prototype.readUIntLE=function(_,q,X){_>>>=0,q>>>=0,X||Xe(_,q,this.length);let oe=this[_],ve=1,Re=0;for(;++Re<q&&(ve*=256);)oe+=this[_+Re]*ve;return oe},R.prototype.readUintBE=R.prototype.readUIntBE=function(_,q,X){_>>>=0,q>>>=0,X||Xe(_,q,this.length);let oe=this[_+--q],ve=1;for(;q>0&&(ve*=256);)oe+=this[_+--q]*ve;return oe},R.prototype.readUint8=R.prototype.readUInt8=function(_,q){return _>>>=0,q||Xe(_,1,this.length),this[_]},R.prototype.readUint16LE=R.prototype.readUInt16LE=function(_,q){return _>>>=0,q||Xe(_,2,this.length),this[_]|this[_+1]<<8},R.prototype.readUint16BE=R.prototype.readUInt16BE=function(_,q){return _>>>=0,q||Xe(_,2,this.length),this[_]<<8|this[_+1]},R.prototype.readUint32LE=R.prototype.readUInt32LE=function(_,q){return _>>>=0,q||Xe(_,4,this.length),(this[_]|this[_+1]<<8|this[_+2]<<16)+16777216*this[_+3]},R.prototype.readUint32BE=R.prototype.readUInt32BE=function(_,q){return _>>>=0,q||Xe(_,4,this.length),16777216*this[_]+(this[_+1]<<16|this[_+2]<<8|this[_+3])},R.prototype.readBigUInt64LE=ge((function(_){Rt(_>>>=0,"offset");const q=this[_],X=this[_+7];q!==void 0&&X!==void 0||Ft(_,this.length-8);const oe=q+256*this[++_]+65536*this[++_]+this[++_]*2**24,ve=this[++_]+256*this[++_]+65536*this[++_]+X*2**24;return BigInt(oe)+(BigInt(ve)<<BigInt(32))})),R.prototype.readBigUInt64BE=ge((function(_){Rt(_>>>=0,"offset");const q=this[_],X=this[_+7];q!==void 0&&X!==void 0||Ft(_,this.length-8);const oe=q*2**24+65536*this[++_]+256*this[++_]+this[++_],ve=this[++_]*2**24+65536*this[++_]+256*this[++_]+X;return(BigInt(oe)<<BigInt(32))+BigInt(ve)})),R.prototype.readIntLE=function(_,q,X){_>>>=0,q>>>=0,X||Xe(_,q,this.length);let oe=this[_],ve=1,Re=0;for(;++Re<q&&(ve*=256);)oe+=this[_+Re]*ve;return ve*=128,oe>=ve&&(oe-=Math.pow(2,8*q)),oe},R.prototype.readIntBE=function(_,q,X){_>>>=0,q>>>=0,X||Xe(_,q,this.length);let oe=q,ve=1,Re=this[_+--oe];for(;oe>0&&(ve*=256);)Re+=this[_+--oe]*ve;return ve*=128,Re>=ve&&(Re-=Math.pow(2,8*q)),Re},R.prototype.readInt8=function(_,q){return _>>>=0,q||Xe(_,1,this.length),128&this[_]?-1*(255-this[_]+1):this[_]},R.prototype.readInt16LE=function(_,q){_>>>=0,q||Xe(_,2,this.length);const X=this[_]|this[_+1]<<8;return 32768&X?4294901760|X:X},R.prototype.readInt16BE=function(_,q){_>>>=0,q||Xe(_,2,this.length);const X=this[_+1]|this[_]<<8;return 32768&X?4294901760|X:X},R.prototype.readInt32LE=function(_,q){return _>>>=0,q||Xe(_,4,this.length),this[_]|this[_+1]<<8|this[_+2]<<16|this[_+3]<<24},R.prototype.readInt32BE=function(_,q){return _>>>=0,q||Xe(_,4,this.length),this[_]<<24|this[_+1]<<16|this[_+2]<<8|this[_+3]},R.prototype.readBigInt64LE=ge((function(_){Rt(_>>>=0,"offset");const q=this[_],X=this[_+7];q!==void 0&&X!==void 0||Ft(_,this.length-8);const oe=this[_+4]+256*this[_+5]+65536*this[_+6]+(X<<24);return(BigInt(oe)<<BigInt(32))+BigInt(q+256*this[++_]+65536*this[++_]+this[++_]*16777216)})),R.prototype.readBigInt64BE=ge((function(_){Rt(_>>>=0,"offset");const q=this[_],X=this[_+7];q!==void 0&&X!==void 0||Ft(_,this.length-8);const oe=(q<<24)+65536*this[++_]+256*this[++_]+this[++_];return(BigInt(oe)<<BigInt(32))+BigInt(this[++_]*16777216+65536*this[++_]+256*this[++_]+X)})),R.prototype.readFloatLE=function(_,q){return _>>>=0,q||Xe(_,4,this.length),w.read(this,_,!0,23,4)},R.prototype.readFloatBE=function(_,q){return _>>>=0,q||Xe(_,4,this.length),w.read(this,_,!1,23,4)},R.prototype.readDoubleLE=function(_,q){return _>>>=0,q||Xe(_,8,this.length),w.read(this,_,!0,52,8)},R.prototype.readDoubleBE=function(_,q){return _>>>=0,q||Xe(_,8,this.length),w.read(this,_,!1,52,8)},R.prototype.writeUintLE=R.prototype.writeUIntLE=function(_,q,X,oe){_=+_,q>>>=0,X>>>=0,!oe&&Oe(this,_,q,X,Math.pow(2,8*X)-1,0);let ve=1,Re=0;for(this[q]=255&_;++Re<X&&(ve*=256);)this[q+Re]=_/ve&255;return q+X},R.prototype.writeUintBE=R.prototype.writeUIntBE=function(_,q,X,oe){_=+_,q>>>=0,X>>>=0,!oe&&Oe(this,_,q,X,Math.pow(2,8*X)-1,0);let ve=X-1,Re=1;for(this[q+ve]=255&_;--ve>=0&&(Re*=256);)this[q+ve]=_/Re&255;return q+X},R.prototype.writeUint8=R.prototype.writeUInt8=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,1,255,0),this[q]=255&_,q+1},R.prototype.writeUint16LE=R.prototype.writeUInt16LE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,2,65535,0),this[q]=255&_,this[q+1]=_>>>8,q+2},R.prototype.writeUint16BE=R.prototype.writeUInt16BE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,2,65535,0),this[q]=_>>>8,this[q+1]=255&_,q+2},R.prototype.writeUint32LE=R.prototype.writeUInt32LE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,4,4294967295,0),this[q+3]=_>>>24,this[q+2]=_>>>16,this[q+1]=_>>>8,this[q]=255&_,q+4},R.prototype.writeUint32BE=R.prototype.writeUInt32BE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,4,4294967295,0),this[q]=_>>>24,this[q+1]=_>>>16,this[q+2]=_>>>8,this[q+3]=255&_,q+4},R.prototype.writeBigUInt64LE=ge((function(_,q=0){return Te(this,_,q,BigInt(0),BigInt("0xffffffffffffffff"))})),R.prototype.writeBigUInt64BE=ge((function(_,q=0){return Ke(this,_,q,BigInt(0),BigInt("0xffffffffffffffff"))})),R.prototype.writeIntLE=function(_,q,X,oe){if(_=+_,q>>>=0,!oe){const Tt=Math.pow(2,8*X-1);Oe(this,_,q,X,Tt-1,-Tt)}let ve=0,Re=1,Je=0;for(this[q]=255&_;++ve<X&&(Re*=256);)_<0&&Je===0&&this[q+ve-1]!==0&&(Je=1),this[q+ve]=(_/Re|0)-Je&255;return q+X},R.prototype.writeIntBE=function(_,q,X,oe){if(_=+_,q>>>=0,!oe){const Tt=Math.pow(2,8*X-1);Oe(this,_,q,X,Tt-1,-Tt)}let ve=X-1,Re=1,Je=0;for(this[q+ve]=255&_;--ve>=0&&(Re*=256);)_<0&&Je===0&&this[q+ve+1]!==0&&(Je=1),this[q+ve]=(_/Re|0)-Je&255;return q+X},R.prototype.writeInt8=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,1,127,-128),_<0&&(_=255+_+1),this[q]=255&_,q+1},R.prototype.writeInt16LE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,2,32767,-32768),this[q]=255&_,this[q+1]=_>>>8,q+2},R.prototype.writeInt16BE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,2,32767,-32768),this[q]=_>>>8,this[q+1]=255&_,q+2},R.prototype.writeInt32LE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,4,2147483647,-2147483648),this[q]=255&_,this[q+1]=_>>>8,this[q+2]=_>>>16,this[q+3]=_>>>24,q+4},R.prototype.writeInt32BE=function(_,q,X){return _=+_,q>>>=0,X||Oe(this,_,q,4,2147483647,-2147483648),_<0&&(_=4294967295+_+1),this[q]=_>>>24,this[q+1]=_>>>16,this[q+2]=_>>>8,this[q+3]=255&_,q+4},R.prototype.writeBigInt64LE=ge((function(_,q=0){return Te(this,_,q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),R.prototype.writeBigInt64BE=ge((function(_,q=0){return Ke(this,_,q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),R.prototype.writeFloatLE=function(_,q,X){return Ne(this,_,q,!0,X)},R.prototype.writeFloatBE=function(_,q,X){return Ne(this,_,q,!1,X)},R.prototype.writeDoubleLE=function(_,q,X){return Fe(this,_,q,!0,X)},R.prototype.writeDoubleBE=function(_,q,X){return Fe(this,_,q,!1,X)},R.prototype.copy=function(_,q,X,oe){if(!R.isBuffer(_))throw new TypeError("argument should be a Buffer");if(X||(X=0),oe||oe===0||(oe=this.length),q>=_.length&&(q=_.length),q||(q=0),oe>0&&oe<X&&(oe=X),oe===X||_.length===0||this.length===0)return 0;if(q<0)throw new RangeError("targetStart out of bounds");if(X<0||X>=this.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("sourceEnd out of bounds");oe>this.length&&(oe=this.length),_.length-q<oe-X&&(oe=_.length-q+X);const ve=oe-X;return this===_&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(q,X,oe):Uint8Array.prototype.set.call(_,this.subarray(X,oe),q),ve},R.prototype.fill=function(_,q,X,oe){if(typeof _=="string"){if(typeof q=="string"?(oe=q,q=0,X=this.length):typeof X=="string"&&(oe=X,X=this.length),oe!==void 0&&typeof oe!="string")throw new TypeError("encoding must be a string");if(typeof oe=="string"&&!R.isEncoding(oe))throw new TypeError("Unknown encoding: "+oe);if(_.length===1){const Re=_.charCodeAt(0);(oe==="utf8"&&Re<128||oe==="latin1")&&(_=Re)}}else typeof _=="number"?_&=255:typeof _=="boolean"&&(_=Number(_));if(q<0||this.length<q||this.length<X)throw new RangeError("Out of range index");if(X<=q)return this;let ve;if(q>>>=0,X=X===void 0?this.length:X>>>0,_||(_=0),typeof _=="number")for(ve=q;ve<X;++ve)this[ve]=_;else{const Re=R.isBuffer(_)?_:R.from(_,oe),Je=Re.length;if(Je===0)throw new TypeError('The value "'+_+'" is invalid for argument "value"');for(ve=0;ve<X-q;++ve)this[ve+q]=Re[ve%Je]}return this};const at={};function gt(_,q,X){at[_]=class extends X{constructor(){super(),Object.defineProperty(this,"message",{value:q.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${_}]`,this.stack,delete this.name}get code(){return _}set code(oe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:oe,writable:!0})}toString(){return`${this.name} [${_}]: ${this.message}`}}}function Ot(_){let q="",X=_.length;const oe=_[0]==="-"?1:0;for(;X>=oe+4;X-=3)q=`_${_.slice(X-3,X)}${q}`;return`${_.slice(0,X)}${q}`}function Lt(_,q,X,oe,ve,Re){if(_>X||_<q){const Je=typeof q=="bigint"?"n":"";let Tt;throw Tt=q===0||q===BigInt(0)?`>= 0${Je} and < 2${Je} ** ${8*(Re+1)}${Je}`:`>= -(2${Je} ** ${8*(Re+1)-1}${Je}) and < 2 ** ${8*(Re+1)-1}${Je}`,new at.ERR_OUT_OF_RANGE("value",Tt,_)}(function(Je,Tt,fe){Rt(Tt,"offset"),Je[Tt]!==void 0&&Je[Tt+fe]!==void 0||Ft(Tt,Je.length-(fe+1))})(oe,ve,Re)}function Rt(_,q){if(typeof _!="number")throw new at.ERR_INVALID_ARG_TYPE(q,"number",_)}function Ft(_,q,X){throw Math.floor(_)!==_?(Rt(_,X),new at.ERR_OUT_OF_RANGE("offset","an integer",_)):q<0?new at.ERR_BUFFER_OUT_OF_BOUNDS:new at.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${q}`,_)}gt("ERR_BUFFER_OUT_OF_BOUNDS",(function(_){return _?`${_} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),gt("ERR_INVALID_ARG_TYPE",(function(_,q){return`The "${_}" argument must be of type number. Received type ${typeof q}`}),TypeError),gt("ERR_OUT_OF_RANGE",(function(_,q,X){let oe=`The value of "${_}" is out of range.`,ve=X;return Number.isInteger(X)&&Math.abs(X)>4294967296?ve=Ot(String(X)):typeof X=="bigint"&&(ve=String(X),(X>BigInt(2)**BigInt(32)||X<-(BigInt(2)**BigInt(32)))&&(ve=Ot(ve)),ve+="n"),oe+=` It must be ${q}. Received ${ve}`,oe}),RangeError);const qe=/[^+/0-9A-Za-z-_]/g;function Bt(_,q){let X;q=q||1/0;const oe=_.length;let ve=null;const Re=[];for(let Je=0;Je<oe;++Je){if(X=_.charCodeAt(Je),X>55295&&X<57344){if(!ve){if(X>56319){(q-=3)>-1&&Re.push(239,191,189);continue}if(Je+1===oe){(q-=3)>-1&&Re.push(239,191,189);continue}ve=X;continue}if(X<56320){(q-=3)>-1&&Re.push(239,191,189),ve=X;continue}X=65536+(ve-55296<<10|X-56320)}else ve&&(q-=3)>-1&&Re.push(239,191,189);if(ve=null,X<128){if((q-=1)<0)break;Re.push(X)}else if(X<2048){if((q-=2)<0)break;Re.push(X>>6|192,63&X|128)}else if(X<65536){if((q-=3)<0)break;Re.push(X>>12|224,X>>6&63|128,63&X|128)}else{if(!(X<1114112))throw new Error("Invalid code point");if((q-=4)<0)break;Re.push(X>>18|240,X>>12&63|128,X>>6&63|128,63&X|128)}}return Re}function kt(_){return b.toByteArray((function(q){if((q=(q=q.split("=")[0]).trim().replace(qe,"")).length<2)return"";for(;q.length%4!=0;)q+="=";return q})(_))}function G(_,q,X,oe){let ve;for(ve=0;ve<oe&&!(ve+X>=q.length||ve>=_.length);++ve)q[ve+X]=_[ve];return ve}function On(_,q){return _ instanceof q||_!=null&&_.constructor!=null&&_.constructor.name!=null&&_.constructor.name===q.name}function mn(_){return _!=_}const Oi=(function(){const _="0123456789abcdef",q=new Array(256);for(let X=0;X<16;++X){const oe=16*X;for(let ve=0;ve<16;++ve)q[oe+ve]=_[X]+_[ve]}return q})();function ge(_){return typeof BigInt>"u"?Me:_}function Me(){throw new Error("BigInt not supported")}},4:h=>{class m{constructor(w,E){this.low=w,this.high=E,this.length=1+E-w}overlaps(w){return!(this.high<w.low||this.low>w.high)}touches(w){return!(this.high+1<w.low||this.low-1>w.high)}add(w){return new m(Math.min(this.low,w.low),Math.max(this.high,w.high))}subtract(w){return w.low<=this.low&&w.high>=this.high?[]:w.low>this.low&&w.high<this.high?[new m(this.low,w.low-1),new m(w.high+1,this.high)]:w.low<=this.low?[new m(w.high+1,this.high)]:[new m(this.low,w.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+"-"+this.high}}class g{constructor(w,E){this.ranges=[],this.length=0,w!=null&&this.add(w,E)}_update_length(){this.length=this.ranges.reduce(((w,E)=>w+E.length),0)}add(w,E){var A=k=>{for(var R=0;R<this.ranges.length&&!k.touches(this.ranges[R]);)R++;for(var M=this.ranges.slice(0,R);R<this.ranges.length&&k.touches(this.ranges[R]);)k=k.add(this.ranges[R]),R++;M.push(k),this.ranges=M.concat(this.ranges.slice(R)),this._update_length()};return w instanceof g?w.ranges.forEach(A):(E==null&&(E=w),A(new m(w,E))),this}subtract(w,E){var A=k=>{for(var R=0;R<this.ranges.length&&!k.overlaps(this.ranges[R]);)R++;for(var M=this.ranges.slice(0,R);R<this.ranges.length&&k.overlaps(this.ranges[R]);)M=M.concat(this.ranges[R].subtract(k)),R++;this.ranges=M.concat(this.ranges.slice(R)),this._update_length()};return w instanceof g?w.ranges.forEach(A):(E==null&&(E=w),A(new m(w,E))),this}intersect(w,E){var A=[],k=R=>{for(var M=0;M<this.ranges.length&&!R.overlaps(this.ranges[M]);)M++;for(;M<this.ranges.length&&R.overlaps(this.ranges[M]);){var I=Math.max(this.ranges[M].low,R.low),F=Math.min(this.ranges[M].high,R.high);A.push(new m(I,F)),M++}};return w instanceof g?w.ranges.forEach(k):(E==null&&(E=w),k(new m(w,E))),this.ranges=A,this._update_length(),this}index(w){for(var E=0;E<this.ranges.length&&this.ranges[E].length<=w;)w-=this.ranges[E].length,E++;return this.ranges[E].low+w}toString(){return"[ "+this.ranges.join(", ")+" ]"}clone(){return new g(this)}numbers(){return this.ranges.reduce(((w,E)=>{for(var A=E.low;A<=E.high;)w.push(A),A++;return w}),[])}subranges(){return this.ranges.map((w=>({low:w.low,high:w.high,length:1+w.high-w.low})))}}h.exports=g},251:(h,m)=>{m.read=function(g,b,w,E,A){var k,R,M=8*A-E-1,I=(1<<M)-1,F=I>>1,H=-7,V=w?A-1:0,K=w?-1:1,z=g[b+V];for(V+=K,k=z&(1<<-H)-1,z>>=-H,H+=M;H>0;k=256*k+g[b+V],V+=K,H-=8);for(R=k&(1<<-H)-1,k>>=-H,H+=E;H>0;R=256*R+g[b+V],V+=K,H-=8);if(k===0)k=1-F;else{if(k===I)return R?NaN:1/0*(z?-1:1);R+=Math.pow(2,E),k-=F}return(z?-1:1)*R*Math.pow(2,k-E)},m.write=function(g,b,w,E,A,k){var R,M,I,F=8*k-A-1,H=(1<<F)-1,V=H>>1,K=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,z=E?0:k-1,W=E?1:-1,ae=b<0||b===0&&1/b<0?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(M=isNaN(b)?1:0,R=H):(R=Math.floor(Math.log(b)/Math.LN2),b*(I=Math.pow(2,-R))<1&&(R--,I*=2),(b+=R+V>=1?K/I:K*Math.pow(2,1-V))*I>=2&&(R++,I/=2),R+V>=H?(M=0,R=H):R+V>=1?(M=(b*I-1)*Math.pow(2,A),R+=V):(M=b*Math.pow(2,V-1)*Math.pow(2,A),R=0));A>=8;g[w+z]=255&M,z+=W,M/=256,A-=8);for(R=R<<A|M,F+=A;F>0;g[w+z]=255&R,z+=W,R/=256,F-=8);g[w+z-W]|=128*ae}},22:()=>{(function(h){var m="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",g={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},b={bash:g,environment:{pattern:RegExp("\\$"+m),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+m),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};h.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+m),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:b},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:g}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:b},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:b.entity}}],environment:{pattern:RegExp("\\$?"+m),alias:"constant"},variable:b.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},g.inside=h.languages.bash;for(var w=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],E=b.variable[1].inside,A=0;A<w.length;A++)E[w[A]]=h.languages.bash[w[A]];h.languages.sh=h.languages.bash,h.languages.shell=h.languages.bash})(Prism)},651:()=>{(function(h){function m(Fe,at){return Fe.replace(/<<(\d+)>>/g,(function(gt,Ot){return"(?:"+at[+Ot]+")"}))}function g(Fe,at,gt){return RegExp(m(Fe,at),"")}function b(Fe,at){for(var gt=0;gt<at;gt++)Fe=Fe.replace(/<<self>>/g,(function(){return"(?:"+Fe+")"}));return Fe.replace(/<<self>>/g,"[^\\s\\S]")}var w="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",E="class enum interface record struct",A="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",k="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function R(Fe){return"\\b(?:"+Fe.trim().replace(/ /g,"|")+")\\b"}var M=R(E),I=RegExp(R(w+" "+E+" "+A+" "+k)),F=R(E+" "+A+" "+k),H=R(w+" "+E+" "+k),V=b(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),K=b(/\((?:[^()]|<<self>>)*\)/.source,2),z=/@?\b[A-Za-z_]\w*\b/.source,W=m(/<<0>>(?:\s*<<1>>)?/.source,[z,V]),ae=m(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[F,W]),Q=/\[\s*(?:,\s*)*\]/.source,te=m(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[ae,Q]),de=m(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[V,K,Q]),je=m(/\(<<0>>+(?:,<<0>>+)+\)/.source,[de]),we=m(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[je,ae,Q]),ie={keyword:I,punctuation:/[<>()?,.:[\]]/},Se=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,Ae=/"(?:\\.|[^\\"\r\n])*"/.source,He=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;h.languages.csharp=h.languages.extend("clike",{string:[{pattern:g(/(^|[^$\\])<<0>>/.source,[He]),lookbehind:!0,greedy:!0},{pattern:g(/(^|[^@$\\])<<0>>/.source,[Ae]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:g(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[ae]),lookbehind:!0,inside:ie},{pattern:g(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[z,we]),lookbehind:!0,inside:ie},{pattern:g(/(\busing\s+)<<0>>(?=\s*=)/.source,[z]),lookbehind:!0},{pattern:g(/(\b<<0>>\s+)<<1>>/.source,[M,W]),lookbehind:!0,inside:ie},{pattern:g(/(\bcatch\s*\(\s*)<<0>>/.source,[ae]),lookbehind:!0,inside:ie},{pattern:g(/(\bwhere\s+)<<0>>/.source,[z]),lookbehind:!0},{pattern:g(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[te]),lookbehind:!0,inside:ie},{pattern:g(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[we,H,z]),inside:ie}],keyword:I,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),h.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),h.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:g(/([(,]\s*)<<0>>(?=\s*:)/.source,[z]),lookbehind:!0,alias:"punctuation"}}),h.languages.insertBefore("csharp","class-name",{namespace:{pattern:g(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[z]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:g(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[K]),lookbehind:!0,alias:"class-name",inside:ie},"return-type":{pattern:g(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[we,ae]),inside:ie,alias:"class-name"},"constructor-invocation":{pattern:g(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[we]),lookbehind:!0,inside:ie,alias:"class-name"},"generic-method":{pattern:g(/<<0>>\s*<<1>>(?=\s*\()/.source,[z,V]),inside:{function:g(/^<<0>>/.source,[z]),generic:{pattern:RegExp(V),alias:"class-name",inside:ie}}},"type-list":{pattern:g(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[M,W,z,we,I.source,K,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:g(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[W,K]),lookbehind:!0,greedy:!0,inside:h.languages.csharp},keyword:I,"class-name":{pattern:RegExp(we),greedy:!0,inside:ie},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var ue=Ae+"|"+Se,ne=m(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[ue]),ce=b(m(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[ne]),2),$e=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,me=m(/<<0>>(?:\s*\(<<1>>*\))?/.source,[ae,ce]);h.languages.insertBefore("csharp","class-name",{attribute:{pattern:g(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[$e,me]),lookbehind:!0,greedy:!0,inside:{target:{pattern:g(/^<<0>>(?=\s*:)/.source,[$e]),alias:"keyword"},"attribute-arguments":{pattern:g(/\(<<0>>*\)/.source,[ce]),inside:h.languages.csharp},"class-name":{pattern:RegExp(ae),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var Xe=/:[^}\r\n]+/.source,Oe=b(m(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[ne]),2),Te=m(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Oe,Xe]),Ke=b(m(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[ue]),2),se=m(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Ke,Xe]);function Ne(Fe,at){return{interpolation:{pattern:g(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[Fe]),lookbehind:!0,inside:{"format-string":{pattern:g(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[at,Xe]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:h.languages.csharp}}},string:/[\s\S]+/}}h.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:g(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[Te]),lookbehind:!0,greedy:!0,inside:Ne(Te,Oe)},{pattern:g(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[se]),lookbehind:!0,greedy:!0,inside:Ne(se,Ke)}],char:{pattern:RegExp(Se),greedy:!0}}),h.languages.dotnet=h.languages.cs=h.languages.csharp})(Prism)},113:()=>{(function(h){var m=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;h.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+m.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+m.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+m.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+m.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:m,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},h.languages.css.atrule.inside.rest=h.languages.css;var g=h.languages.markup;g&&(g.tag.addInlined("style","css"),g.tag.addAttribute("style","css"))})(Prism)},378:()=>{Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"]},784:()=>{(function(h){function m(M){return RegExp("(^(?:"+M+"):[ ]*(?![ ]))[^]+","i")}h.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:h.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:m(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:h.languages.csp},{pattern:m(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:h.languages.hpkp},{pattern:m(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:h.languages.hsts},{pattern:m(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var g,b=h.languages,w={"application/javascript":b.javascript,"application/json":b.json||b.javascript,"application/xml":b.xml,"text/xml":b.xml,"text/html":b.html,"text/css":b.css,"text/plain":b.plain},E={"application/json":!0,"application/xml":!0};function A(M){var I=M.replace(/^[a-z]+\//,"");return"(?:"+M+"|"+("\\w+/(?:[\\w.-]+\\+)+"+I+"(?![+\\w.-])")+")"}for(var k in w)if(w[k]){g=g||{};var R=E[k]?A(k):k;g[k.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+R+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:w[k]}}g&&h.languages.insertBefore("http","header",g)})(Prism)},976:()=>{(function(h){var m=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,g=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,b={pattern:RegExp(/(^|[^\w.])/.source+g+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};h.languages.java=h.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[b,{pattern:RegExp(/(^|[^\w.])/.source+g+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:b.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+g+/[A-Z]\w*\b/.source),lookbehind:!0,inside:b.inside}],keyword:m,function:[h.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),h.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),h.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":b,keyword:m,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+g+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:b.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+g+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:b.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return m.source}))),lookbehind:!0,inside:{punctuation:/\./}}})})(Prism)},514:()=>{Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json},342:()=>{Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python},83:()=>{(function(h){var m=/[*&][^\s[\]{},]+/,g=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,b="(?:"+g.source+"(?:[ ]+"+m.source+")?|"+m.source+"(?:[ ]+"+g.source+")?)",w=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),E=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function A(k,R){R=(R||"").replace(/m/g,"")+"m";var M=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return b})).replace(/<<value>>/g,(function(){return k}));return RegExp(M,R)}h.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return b}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return b})).replace(/<<key>>/g,(function(){return"(?:"+w+"|"+E+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:A(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:A(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:A(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:A(E),lookbehind:!0,greedy:!0},number:{pattern:A(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:g,important:m,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},h.languages.yml=h.languages.yaml})(Prism)},848:(h,m,g)=>{var b=(function(w){var E=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,A=0,k={},R={manual:w.Prism&&w.Prism.manual,disableWorkerMessageHandler:w.Prism&&w.Prism.disableWorkerMessageHandler,util:{encode:function Q(te){return te instanceof M?new M(te.type,Q(te.content),te.alias):Array.isArray(te)?te.map(Q):te.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(Q){return Object.prototype.toString.call(Q).slice(8,-1)},objId:function(Q){return Q.__id||Object.defineProperty(Q,"__id",{value:++A}),Q.__id},clone:function Q(te,de){var je,we;switch(de=de||{},R.util.type(te)){case"Object":if(we=R.util.objId(te),de[we])return de[we];for(var ie in je={},de[we]=je,te)te.hasOwnProperty(ie)&&(je[ie]=Q(te[ie],de));return je;case"Array":return we=R.util.objId(te),de[we]?de[we]:(je=[],de[we]=je,te.forEach((function(Se,Ae){je[Ae]=Q(Se,de)})),je);default:return te}},getLanguage:function(Q){for(;Q;){var te=E.exec(Q.className);if(te)return te[1].toLowerCase();Q=Q.parentElement}return"none"},setLanguage:function(Q,te){Q.className=Q.className.replace(RegExp(E,"gi"),""),Q.classList.add("language-"+te)},currentScript:function(){if(typeof document>"u")return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(je){var Q=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(je.stack)||[])[1];if(Q){var te=document.getElementsByTagName("script");for(var de in te)if(te[de].src==Q)return te[de]}return null}},isActive:function(Q,te,de){for(var je="no-"+te;Q;){var we=Q.classList;if(we.contains(te))return!0;if(we.contains(je))return!1;Q=Q.parentElement}return!!de}},languages:{plain:k,plaintext:k,text:k,txt:k,extend:function(Q,te){var de=R.util.clone(R.languages[Q]);for(var je in te)de[je]=te[je];return de},insertBefore:function(Q,te,de,je){var we=(je=je||R.languages)[Q],ie={};for(var Se in we)if(we.hasOwnProperty(Se)){if(Se==te)for(var Ae in de)de.hasOwnProperty(Ae)&&(ie[Ae]=de[Ae]);de.hasOwnProperty(Se)||(ie[Se]=we[Se])}var He=je[Q];return je[Q]=ie,R.languages.DFS(R.languages,(function(ue,ne){ne===He&&ue!=Q&&(this[ue]=ie)})),ie},DFS:function Q(te,de,je,we){we=we||{};var ie=R.util.objId;for(var Se in te)if(te.hasOwnProperty(Se)){de.call(te,Se,te[Se],je||Se);var Ae=te[Se],He=R.util.type(Ae);He!=="Object"||we[ie(Ae)]?He!=="Array"||we[ie(Ae)]||(we[ie(Ae)]=!0,Q(Ae,de,Se,we)):(we[ie(Ae)]=!0,Q(Ae,de,null,we))}}},plugins:{},highlightAll:function(Q,te){R.highlightAllUnder(document,Q,te)},highlightAllUnder:function(Q,te,de){var je={callback:de,container:Q,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};R.hooks.run("before-highlightall",je),je.elements=Array.prototype.slice.apply(je.container.querySelectorAll(je.selector)),R.hooks.run("before-all-elements-highlight",je);for(var we,ie=0;we=je.elements[ie++];)R.highlightElement(we,te===!0,je.callback)},highlightElement:function(Q,te,de){var je=R.util.getLanguage(Q),we=R.languages[je];R.util.setLanguage(Q,je);var ie=Q.parentElement;ie&&ie.nodeName.toLowerCase()==="pre"&&R.util.setLanguage(ie,je);var Se={element:Q,language:je,grammar:we,code:Q.textContent};function Ae(ue){Se.highlightedCode=ue,R.hooks.run("before-insert",Se),Se.element.innerHTML=Se.highlightedCode,R.hooks.run("after-highlight",Se),R.hooks.run("complete",Se),de&&de.call(Se.element)}if(R.hooks.run("before-sanity-check",Se),(ie=Se.element.parentElement)&&ie.nodeName.toLowerCase()==="pre"&&!ie.hasAttribute("tabindex")&&ie.setAttribute("tabindex","0"),!Se.code)return R.hooks.run("complete",Se),void(de&&de.call(Se.element));if(R.hooks.run("before-highlight",Se),Se.grammar)if(te&&w.Worker){var He=new Worker(R.filename);He.onmessage=function(ue){Ae(ue.data)},He.postMessage(JSON.stringify({language:Se.language,code:Se.code,immediateClose:!0}))}else Ae(R.highlight(Se.code,Se.grammar,Se.language));else Ae(R.util.encode(Se.code))},highlight:function(Q,te,de){var je={code:Q,grammar:te,language:de};if(R.hooks.run("before-tokenize",je),!je.grammar)throw new Error('The language "'+je.language+'" has no grammar.');return je.tokens=R.tokenize(je.code,je.grammar),R.hooks.run("after-tokenize",je),M.stringify(R.util.encode(je.tokens),je.language)},tokenize:function(Q,te){var de=te.rest;if(de){for(var je in de)te[je]=de[je];delete te.rest}var we=new H;return V(we,we.head,Q),F(Q,we,te,we.head,0),(function(ie){for(var Se=[],Ae=ie.head.next;Ae!==ie.tail;)Se.push(Ae.value),Ae=Ae.next;return Se})(we)},hooks:{all:{},add:function(Q,te){var de=R.hooks.all;de[Q]=de[Q]||[],de[Q].push(te)},run:function(Q,te){var de=R.hooks.all[Q];if(de&&de.length)for(var je,we=0;je=de[we++];)je(te)}},Token:M};function M(Q,te,de,je){this.type=Q,this.content=te,this.alias=de,this.length=0|(je||"").length}function I(Q,te,de,je){Q.lastIndex=te;var we=Q.exec(de);if(we&&je&&we[1]){var ie=we[1].length;we.index+=ie,we[0]=we[0].slice(ie)}return we}function F(Q,te,de,je,we,ie){for(var Se in de)if(de.hasOwnProperty(Se)&&de[Se]){var Ae=de[Se];Ae=Array.isArray(Ae)?Ae:[Ae];for(var He=0;He<Ae.length;++He){if(ie&&ie.cause==Se+","+He)return;var ue=Ae[He],ne=ue.inside,ce=!!ue.lookbehind,$e=!!ue.greedy,me=ue.alias;if($e&&!ue.pattern.global){var Xe=ue.pattern.toString().match(/[imsuy]*$/)[0];ue.pattern=RegExp(ue.pattern.source,Xe+"g")}for(var Oe=ue.pattern||ue,Te=je.next,Ke=we;Te!==te.tail&&!(ie&&Ke>=ie.reach);Ke+=Te.value.length,Te=Te.next){var se=Te.value;if(te.length>Q.length)return;if(!(se instanceof M)){var Ne,Fe=1;if($e){if(!(Ne=I(Oe,Ke,Q,ce))||Ne.index>=Q.length)break;var at=Ne.index,gt=Ne.index+Ne[0].length,Ot=Ke;for(Ot+=Te.value.length;at>=Ot;)Ot+=(Te=Te.next).value.length;if(Ke=Ot-=Te.value.length,Te.value instanceof M)continue;for(var Lt=Te;Lt!==te.tail&&(Ot<gt||typeof Lt.value=="string");Lt=Lt.next)Fe++,Ot+=Lt.value.length;Fe--,se=Q.slice(Ke,Ot),Ne.index-=Ke}else if(!(Ne=I(Oe,0,se,ce)))continue;at=Ne.index;var Rt=Ne[0],Ft=se.slice(0,at),qe=se.slice(at+Rt.length),Bt=Ke+se.length;ie&&Bt>ie.reach&&(ie.reach=Bt);var kt=Te.prev;if(Ft&&(kt=V(te,kt,Ft),Ke+=Ft.length),K(te,kt,Fe),Te=V(te,kt,new M(Se,ne?R.tokenize(Rt,ne):Rt,me,Rt)),qe&&V(te,Te,qe),Fe>1){var G={cause:Se+","+He,reach:Bt};F(Q,te,de,Te.prev,Ke,G),ie&&G.reach>ie.reach&&(ie.reach=G.reach)}}}}}}function H(){var Q={value:null,prev:null,next:null},te={value:null,prev:Q,next:null};Q.next=te,this.head=Q,this.tail=te,this.length=0}function V(Q,te,de){var je=te.next,we={value:de,prev:te,next:je};return te.next=we,je.prev=we,Q.length++,we}function K(Q,te,de){for(var je=te.next,we=0;we<de&&je!==Q.tail;we++)je=je.next;te.next=je,je.prev=te,Q.length-=we}if(w.Prism=R,M.stringify=function Q(te,de){if(typeof te=="string")return te;if(Array.isArray(te)){var je="";return te.forEach((function(He){je+=Q(He,de)})),je}var we={type:te.type,content:Q(te.content,de),tag:"span",classes:["token",te.type],attributes:{},language:de},ie=te.alias;ie&&(Array.isArray(ie)?Array.prototype.push.apply(we.classes,ie):we.classes.push(ie)),R.hooks.run("wrap",we);var Se="";for(var Ae in we.attributes)Se+=" "+Ae+'="'+(we.attributes[Ae]||"").replace(/"/g,""")+'"';return"<"+we.tag+' class="'+we.classes.join(" ")+'"'+Se+">"+we.content+"</"+we.tag+">"},!w.document)return w.addEventListener&&(R.disableWorkerMessageHandler||w.addEventListener("message",(function(Q){var te=JSON.parse(Q.data),de=te.language,je=te.code,we=te.immediateClose;w.postMessage(R.highlight(je,R.languages[de],de)),we&&w.close()}),!1)),R;var z=R.util.currentScript();function W(){R.manual||R.highlightAll()}if(z&&(R.filename=z.src,z.hasAttribute("data-manual")&&(R.manual=!0)),!R.manual){var ae=document.readyState;ae==="loading"||ae==="interactive"&&z&&z.defer?document.addEventListener("DOMContentLoaded",W):window.requestAnimationFrame?window.requestAnimationFrame(W):window.setTimeout(W,16)}return R})(typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{});h.exports&&(h.exports=b),g.g!==void 0&&(g.g.Prism=b),b.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},b.languages.markup.tag.inside["attr-value"].inside.entity=b.languages.markup.entity,b.languages.markup.doctype.inside["internal-subset"].inside=b.languages.markup,b.hooks.add("wrap",(function(w){w.type==="entity"&&(w.attributes.title=w.content.replace(/&/,"&"))})),Object.defineProperty(b.languages.markup.tag,"addInlined",{value:function(w,E){var A={};A["language-"+E]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:b.languages[E]},A.cdata=/^<!\[CDATA\[|\]\]>$/i;var k={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:A}};k["language-"+E]={pattern:/[\s\S]+/,inside:b.languages[E]};var R={};R[w]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return w})),"i"),lookbehind:!0,greedy:!0,inside:k},b.languages.insertBefore("markup","cdata",R)}}),Object.defineProperty(b.languages.markup.tag,"addAttribute",{value:function(w,E){b.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+w+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[E,"language-"+E],inside:b.languages[E]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),b.languages.html=b.languages.markup,b.languages.mathml=b.languages.markup,b.languages.svg=b.languages.markup,b.languages.xml=b.languages.extend("markup",{}),b.languages.ssml=b.languages.xml,b.languages.atom=b.languages.xml,b.languages.rss=b.languages.xml,(function(w){var E=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;w.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+E.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+E.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+E.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+E.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:E,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},w.languages.css.atrule.inside.rest=w.languages.css;var A=w.languages.markup;A&&(A.tag.addInlined("style","css"),A.tag.addAttribute("style","css"))})(b),b.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},b.languages.javascript=b.languages.extend("clike",{"class-name":[b.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),b.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,b.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:b.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:b.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:b.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:b.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:b.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),b.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:b.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),b.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),b.languages.markup&&(b.languages.markup.tag.addInlined("script","javascript"),b.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),b.languages.js=b.languages.javascript,(function(){if(b!==void 0&&typeof document<"u"){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var w={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},E="data-src-status",A="loading",k="loaded",R="pre[data-src]:not(["+E+'="'+k+'"]):not(['+E+'="'+A+'"])';b.hooks.add("before-highlightall",(function(I){I.selector+=", "+R})),b.hooks.add("before-sanity-check",(function(I){var F=I.element;if(F.matches(R)){I.code="",F.setAttribute(E,A);var H=F.appendChild(document.createElement("CODE"));H.textContent="Loading…";var V=F.getAttribute("data-src"),K=I.language;if(K==="none"){var z=(/\.(\w+)$/.exec(V)||[,"none"])[1];K=w[z]||z}b.util.setLanguage(H,K),b.util.setLanguage(F,K);var W=b.plugins.autoloader;W&&W.loadLanguages(K),(function(ae,Q,te){var de=new XMLHttpRequest;de.open("GET",ae,!0),de.onreadystatechange=function(){de.readyState==4&&(de.status<400&&de.responseText?Q(de.responseText):de.status>=400?te("✖ Error "+de.status+" while fetching file: "+de.statusText):te("✖ Error: File does not exist or is empty"))},de.send(null)})(V,(function(ae){F.setAttribute(E,k);var Q=(function(we){var ie=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(we||"");if(ie){var Se=Number(ie[1]),Ae=ie[2],He=ie[3];return Ae?He?[Se,Number(He)]:[Se,void 0]:[Se,Se]}})(F.getAttribute("data-range"));if(Q){var te=ae.split(/\r\n?|\n/g),de=Q[0],je=Q[1]==null?te.length:Q[1];de<0&&(de+=te.length),de=Math.max(0,Math.min(de-1,te.length)),je<0&&(je+=te.length),je=Math.max(0,Math.min(je,te.length)),ae=te.slice(de,je).join(`
|
||
`),F.hasAttribute("data-start")||F.setAttribute("data-start",String(de+1))}H.textContent=ae,b.highlightElement(H)}),(function(ae){F.setAttribute(E,"failed"),H.textContent=ae}))}})),b.plugins.fileHighlight={highlight:function(I){for(var F,H=(I||document).querySelectorAll(R),V=0;F=H[V++];)b.highlightElement(F)}};var M=!1;b.fileHighlight=function(){M||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),M=!0),b.plugins.fileHighlight.highlight.apply(this,arguments)}}})()},859:(h,m,g)=>{const b=g(96),w=g(4),E=b.types;h.exports=class Pb{constructor(k,R){if(this._setDefaults(k),k instanceof RegExp)this.ignoreCase=k.ignoreCase,this.multiline=k.multiline,k=k.source;else{if(typeof k!="string")throw new Error("Expected a regexp or string");this.ignoreCase=R&&R.indexOf("i")!==-1,this.multiline=R&&R.indexOf("m")!==-1}this.tokens=b(k)}_setDefaults(k){this.max=k.max!=null?k.max:Pb.prototype.max!=null?Pb.prototype.max:100,this.defaultRange=k.defaultRange?k.defaultRange:this.defaultRange.clone(),k.randInt&&(this.randInt=k.randInt)}gen(){return this._gen(this.tokens,[])}_gen(k,R){var M,I,F,H,V;switch(k.type){case E.ROOT:case E.GROUP:if(k.followedBy||k.notFollowedBy)return"";for(k.remember&&k.groupNumber===void 0&&(k.groupNumber=R.push(null)-1),I="",H=0,V=(M=k.options?this._randSelect(k.options):k.stack).length;H<V;H++)I+=this._gen(M[H],R);return k.remember&&(R[k.groupNumber]=I),I;case E.POSITION:return"";case E.SET:var K=this._expand(k);return K.length?String.fromCharCode(this._randSelect(K)):"";case E.REPETITION:for(F=this.randInt(k.min,k.max===1/0?k.min+this.max:k.max),I="",H=0;H<F;H++)I+=this._gen(k.value,R);return I;case E.REFERENCE:return R[k.value-1]||"";case E.CHAR:var z=this.ignoreCase&&this._randBool()?this._toOtherCase(k.value):k.value;return String.fromCharCode(z)}}_toOtherCase(k){return k+(97<=k&&k<=122?-32:65<=k&&k<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(k){return k instanceof w?k.index(this.randInt(0,k.length-1)):k[this.randInt(0,k.length-1)]}_expand(k){if(k.type===b.types.CHAR)return new w(k.value);if(k.type===b.types.RANGE)return new w(k.from,k.to);{let R=new w;for(let M=0;M<k.set.length;M++){let I=this._expand(k.set[M]);if(R.add(I),this.ignoreCase)for(let F=0;F<I.length;F++){let H=I.index(F),V=this._toOtherCase(H);H!==V&&R.add(V)}}return k.not?this.defaultRange.clone().subtract(R):this.defaultRange.clone().intersect(R)}}randInt(k,R){return k+Math.floor(Math.random()*(1+R-k))}get defaultRange(){return this._range=this._range||new w(32,126)}set defaultRange(k){this._range=k}static randexp(k,R){var M;return typeof k=="string"&&(k=new RegExp(k,R)),k._randexp===void 0?(M=new Pb(k,R),k._randexp=M):(M=k._randexp)._setDefaults(k),M.gen()}static sugar(){RegExp.prototype.gen=function(){return Pb.randexp(this)}}}},208:h=>{var m,g="";h.exports=function(b,w){if(typeof b!="string")throw new TypeError("expected a string");if(w===1)return b;if(w===2)return b+b;var E=b.length*w;if(m!==b||m===void 0)m=b,g="";else if(g.length>=E)return g.substr(0,E);for(;E>g.length&&w>1;)1&w&&(g+=b),w>>=1,b+=b;return g=(g+=b).substr(0,E)}},96:(h,m,g)=>{const b=g(586),w=g(205),E=g(23),A=g(48);h.exports=k=>{var R,M,I=0,F={type:w.ROOT,stack:[]},H=F,V=F.stack,K=[],z=Se=>{b.error(k,"Nothing to repeat at column "+(Se-1))},W=b.strToChars(k);for(R=W.length;I<R;)switch(M=W[I++]){case"\\":switch(M=W[I++]){case"b":V.push(A.wordBoundary());break;case"B":V.push(A.nonWordBoundary());break;case"w":V.push(E.words());break;case"W":V.push(E.notWords());break;case"d":V.push(E.ints());break;case"D":V.push(E.notInts());break;case"s":V.push(E.whitespace());break;case"S":V.push(E.notWhitespace());break;default:/\d/.test(M)?V.push({type:w.REFERENCE,value:parseInt(M,10)}):V.push({type:w.CHAR,value:M.charCodeAt(0)})}break;case"^":V.push(A.begin());break;case"$":V.push(A.end());break;case"[":var ae;W[I]==="^"?(ae=!0,I++):ae=!1;var Q=b.tokenizeClass(W.slice(I),k);I+=Q[1],V.push({type:w.SET,set:Q[0],not:ae});break;case".":V.push(E.anyChar());break;case"(":var te={type:w.GROUP,stack:[],remember:!0};(M=W[I])==="?"&&(M=W[I+1],I+=2,M==="="?te.followedBy=!0:M==="!"?te.notFollowedBy=!0:M!==":"&&b.error(k,`Invalid group, character '${M}' after '?' at column `+(I-1)),te.remember=!1),V.push(te),K.push(H),H=te,V=te.stack;break;case")":K.length===0&&b.error(k,"Unmatched ) at column "+(I-1)),V=(H=K.pop()).options?H.options[H.options.length-1]:H.stack;break;case"|":H.options||(H.options=[H.stack],delete H.stack);var de=[];H.options.push(de),V=de;break;case"{":var je,we,ie=/^(\d+)(,(\d+)?)?\}/.exec(W.slice(I));ie!==null?(V.length===0&&z(I),je=parseInt(ie[1],10),we=ie[2]?ie[3]?parseInt(ie[3],10):1/0:je,I+=ie[0].length,V.push({type:w.REPETITION,min:je,max:we,value:V.pop()})):V.push({type:w.CHAR,value:123});break;case"?":V.length===0&&z(I),V.push({type:w.REPETITION,min:0,max:1,value:V.pop()});break;case"+":V.length===0&&z(I),V.push({type:w.REPETITION,min:1,max:1/0,value:V.pop()});break;case"*":V.length===0&&z(I),V.push({type:w.REPETITION,min:0,max:1/0,value:V.pop()});break;default:V.push({type:w.CHAR,value:M.charCodeAt(0)})}return K.length!==0&&b.error(k,"Unterminated group"),F},h.exports.types=w},48:(h,m,g)=>{const b=g(205);m.wordBoundary=()=>({type:b.POSITION,value:"b"}),m.nonWordBoundary=()=>({type:b.POSITION,value:"B"}),m.begin=()=>({type:b.POSITION,value:"^"}),m.end=()=>({type:b.POSITION,value:"$"})},23:(h,m,g)=>{const b=g(205),w=()=>[{type:b.RANGE,from:48,to:57}],E=()=>[{type:b.CHAR,value:95},{type:b.RANGE,from:97,to:122},{type:b.RANGE,from:65,to:90}].concat(w()),A=()=>[{type:b.CHAR,value:9},{type:b.CHAR,value:10},{type:b.CHAR,value:11},{type:b.CHAR,value:12},{type:b.CHAR,value:13},{type:b.CHAR,value:32},{type:b.CHAR,value:160},{type:b.CHAR,value:5760},{type:b.RANGE,from:8192,to:8202},{type:b.CHAR,value:8232},{type:b.CHAR,value:8233},{type:b.CHAR,value:8239},{type:b.CHAR,value:8287},{type:b.CHAR,value:12288},{type:b.CHAR,value:65279}];m.words=()=>({type:b.SET,set:E(),not:!1}),m.notWords=()=>({type:b.SET,set:E(),not:!0}),m.ints=()=>({type:b.SET,set:w(),not:!1}),m.notInts=()=>({type:b.SET,set:w(),not:!0}),m.whitespace=()=>({type:b.SET,set:A(),not:!1}),m.notWhitespace=()=>({type:b.SET,set:A(),not:!0}),m.anyChar=()=>({type:b.SET,set:[{type:b.CHAR,value:10},{type:b.CHAR,value:13},{type:b.CHAR,value:8232},{type:b.CHAR,value:8233}],not:!0})},205:h=>{h.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},586:(h,m,g)=>{const b=g(205),w=g(23),E={0:0,t:9,n:10,v:11,f:12,r:13};m.strToChars=function(A){return A=A.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(k,R,M,I,F,H,V,K){if(M)return k;var z=R?8:I?parseInt(I,16):F?parseInt(F,16):H?parseInt(H,8):V?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(V):E[K],W=String.fromCharCode(z);return/[[\]{}^$.|?*+()]/.test(W)&&(W="\\"+W),W}))},m.tokenizeClass=(A,k)=>{for(var R,M,I=[],F=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;(R=F.exec(A))!=null;)if(R[1])I.push(w.words());else if(R[2])I.push(w.ints());else if(R[3])I.push(w.whitespace());else if(R[4])I.push(w.notWords());else if(R[5])I.push(w.notInts());else if(R[6])I.push(w.notWhitespace());else if(R[7])I.push({type:b.RANGE,from:(R[8]||R[9]).charCodeAt(0),to:R[10].charCodeAt(0)});else{if(!(M=R[12]))return[I,F.lastIndex];I.push({type:b.CHAR,value:M.charCodeAt(0)})}m.error(k,"Unterminated character class")},m.error=(A,k)=>{throw new SyntaxError("Invalid regular expression: /"+A+"/: "+k)}},657:(h,m,g)=>{var b=g(208),w=function(R){return/<\/+[^>]+>/.test(R)},E=function(R){return/<[^>]+\/>/.test(R)},A=function(R){return(function(M){return/<[^>!]+>/.test(M)})(R)&&!w(R)&&!E(R)};function k(R){return w(R)?"ClosingTag":A(R)?"OpeningTag":E(R)?"SelfClosingTag":"Text"}h.exports=function(R){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=M.indentor,F=M.textNodesOnSameLine,H=0,V=[];I=I||" ";var K,z,W=(K=R,(z=K,z.split(/(<\/?[^>]+>)/g).filter((function(ae){return ae.trim()!==""}))).map((function(ae){return{value:ae,type:k(ae)}}))).map((function(ae,Q,te){var de=ae.value,je=ae.type;je==="ClosingTag"&&H--;var we=b(I,H),ie=we+de;if(je==="OpeningTag"&&H++,F){var Se=te[Q-1],Ae=te[Q-2];je==="ClosingTag"&&Se.type==="Text"&&Ae.type==="OpeningTag"&&(ie=""+we+Ae.value+Se.value+de,V.push(Q-2,Q-1))}return ie}));return V.forEach((function(ae){return W[ae]=null})),W.filter((function(ae){return!!ae})).join(`
|
||
`)}}},o={};function u(h){var m=o[h];if(m!==void 0){if(m.error!==void 0)throw m.error;return m.exports}var g=o[h]={exports:{}};try{var b={id:h,module:g,factory:s[h],require:u};u.i.forEach((function(w){w(b)})),g=b.module,b.factory.call(g.exports,g,g.exports,b.require)}catch(w){throw g.error=w,w}return g.exports}u.m=s,u.c=o,u.i=[],u.n=h=>{var m=h&&h.__esModule?()=>h.default:()=>h;return u.d(m,{a:m}),m},u.d=(h,m)=>{for(var g in m)u.o(m,g)&&!u.o(h,g)&&Object.defineProperty(h,g,{enumerable:!0,get:m[g]})},u.hu=h=>h+"."+u.h()+".hot-update.js",u.hmrF=()=>"main."+u.h()+".hot-update.json",u.h=()=>"2337278d415d81467132",u.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),u.o=(h,m)=>Object.prototype.hasOwnProperty.call(h,m),e={},r="rapidoc:",u.l=(h,m,g,b)=>{if(e[h])e[h].push(m);else{var w,E;if(g!==void 0)for(var A=document.getElementsByTagName("script"),k=0;k<A.length;k++){var R=A[k];if(R.getAttribute("src")==h||R.getAttribute("data-webpack")==r+g){w=R;break}}w||(E=!0,(w=document.createElement("script")).charset="utf-8",w.timeout=120,u.nc&&w.setAttribute("nonce",u.nc),w.setAttribute("data-webpack",r+g),w.src=h),e[h]=[m];var M=(F,H)=>{w.onerror=w.onload=null,clearTimeout(I);var V=e[h];if(delete e[h],w.parentNode&&w.parentNode.removeChild(w),V&&V.forEach((K=>K(H))),F)return F(H)},I=setTimeout(M.bind(null,void 0,{type:"timeout",target:w}),12e4);w.onerror=M.bind(null,w.onerror),w.onload=M.bind(null,w.onload),E&&document.head.appendChild(w)}},(()=>{var h,m,g,b={},w=u.c,E=[],A=[],k="idle",R=0,M=[];function I(W){k=W;for(var ae=[],Q=0;Q<A.length;Q++)ae[Q]=A[Q].call(null,W);return Promise.all(ae).then((function(){}))}function F(){--R==0&&I("ready").then((function(){if(R===0){var W=M;M=[];for(var ae=0;ae<W.length;ae++)W[ae]()}}))}function H(W){if(k!=="idle")throw new Error("check() is only allowed in idle status");return I("check").then(u.hmrM).then((function(ae){return ae?I("prepare").then((function(){var Q=[];return m=[],Promise.all(Object.keys(u.hmrC).reduce((function(te,de){return u.hmrC[de](ae.c,ae.r,ae.m,te,m,Q),te}),[])).then((function(){return te=function(){return W?K(W):I("ready").then((function(){return Q}))},R===0?te():new Promise((function(de){M.push((function(){de(te())}))}));var te}))})):I(z()?"ready":"idle").then((function(){return null}))}))}function V(W){return k!=="ready"?Promise.resolve().then((function(){throw new Error("apply() is only allowed in ready status (state: "+k+")")})):K(W)}function K(W){W=W||{},z();var ae=m.map((function(Se){return Se(W)}));m=void 0;var Q=ae.map((function(Se){return Se.error})).filter(Boolean);if(Q.length>0)return I("abort").then((function(){throw Q[0]}));var te=I("dispose");ae.forEach((function(Se){Se.dispose&&Se.dispose()}));var de,je=I("apply"),we=function(Se){de||(de=Se)},ie=[];return ae.forEach((function(Se){if(Se.apply){var Ae=Se.apply(we);if(Ae)for(var He=0;He<Ae.length;He++)ie.push(Ae[He])}})),Promise.all([te,je]).then((function(){return de?I("fail").then((function(){throw de})):g?K(W).then((function(Se){return ie.forEach((function(Ae){Se.indexOf(Ae)<0&&Se.push(Ae)})),Se})):I("idle").then((function(){return ie}))}))}function z(){if(g)return m||(m=[]),Object.keys(u.hmrI).forEach((function(W){g.forEach((function(ae){u.hmrI[W](ae,m)}))})),g=void 0,!0}u.hmrD=b,u.i.push((function(W){var ae,Q,te,de,je=W.module,we=(function(ie,Se){var Ae=w[Se];if(!Ae)return ie;var He=function(ce){if(Ae.hot.active){if(w[ce]){var $e=w[ce].parents;$e.indexOf(Se)===-1&&$e.push(Se)}else E=[Se],h=ce;Ae.children.indexOf(ce)===-1&&Ae.children.push(ce)}else console.warn("[HMR] unexpected require("+ce+") from disposed module "+Se),E=[];return ie(ce)},ue=function(ce){return{configurable:!0,enumerable:!0,get:function(){return ie[ce]},set:function($e){ie[ce]=$e}}};for(var ne in ie)Object.prototype.hasOwnProperty.call(ie,ne)&&ne!=="e"&&Object.defineProperty(He,ne,ue(ne));return He.e=function(ce,$e){return(function(me){switch(k){case"ready":I("prepare");case"prepare":return R++,me.then(F,F),me;default:return me}})(ie.e(ce,$e))},He})(W.require,W.id);je.hot=(ae=W.id,Q=je,de={_acceptedDependencies:{},_acceptedErrorHandlers:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:te=h!==ae,_requireSelf:function(){E=Q.parents.slice(),h=te?void 0:ae,u(ae)},active:!0,accept:function(ie,Se,Ae){if(ie===void 0)de._selfAccepted=!0;else if(typeof ie=="function")de._selfAccepted=ie;else if(typeof ie=="object"&&ie!==null)for(var He=0;He<ie.length;He++)de._acceptedDependencies[ie[He]]=Se||function(){},de._acceptedErrorHandlers[ie[He]]=Ae;else de._acceptedDependencies[ie]=Se||function(){},de._acceptedErrorHandlers[ie]=Ae},decline:function(ie){if(ie===void 0)de._selfDeclined=!0;else if(typeof ie=="object"&&ie!==null)for(var Se=0;Se<ie.length;Se++)de._declinedDependencies[ie[Se]]=!0;else de._declinedDependencies[ie]=!0},dispose:function(ie){de._disposeHandlers.push(ie)},addDisposeHandler:function(ie){de._disposeHandlers.push(ie)},removeDisposeHandler:function(ie){var Se=de._disposeHandlers.indexOf(ie);Se>=0&&de._disposeHandlers.splice(Se,1)},invalidate:function(){switch(this._selfInvalidated=!0,k){case"idle":m=[],Object.keys(u.hmrI).forEach((function(ie){u.hmrI[ie](ae,m)})),I("ready");break;case"ready":Object.keys(u.hmrI).forEach((function(ie){u.hmrI[ie](ae,m)}));break;case"prepare":case"check":case"dispose":case"apply":(g=g||[]).push(ae)}},check:H,apply:V,status:function(ie){if(!ie)return k;A.push(ie)},addStatusHandler:function(ie){A.push(ie)},removeStatusHandler:function(ie){var Se=A.indexOf(ie);Se>=0&&A.splice(Se,1)},data:b[ae]},h=void 0,de),je.parents=E,je.children=[],E=[],W.require=we})),u.hmrC={},u.hmrI={}})(),u.p="",(()=>{var h,m,g,b,w,E=u.hmrS_jsonp=u.hmrS_jsonp||{792:0},A={};function k(M,I){return h=I,new Promise(((F,H)=>{A[M]=F;var V=u.p+u.hu(M),K=new Error;u.l(V,(z=>{if(A[M]){A[M]=void 0;var W=z&&(z.type==="load"?"missing":z.type),ae=z&&z.target&&z.target.src;K.message="Loading hot update chunk "+M+` failed.
|
||
(`+W+": "+ae+")",K.name="ChunkLoadError",K.type=W,K.request=ae,H(K)}}))}))}function R(M){function I(ne){for(var ce=[ne],$e={},me=ce.map((function(at){return{chain:[at],id:at}}));me.length>0;){var Xe=me.pop(),Oe=Xe.id,Te=Xe.chain,Ke=u.c[Oe];if(Ke&&(!Ke.hot._selfAccepted||Ke.hot._selfInvalidated)){if(Ke.hot._selfDeclined)return{type:"self-declined",chain:Te,moduleId:Oe};if(Ke.hot._main)return{type:"unaccepted",chain:Te,moduleId:Oe};for(var se=0;se<Ke.parents.length;se++){var Ne=Ke.parents[se],Fe=u.c[Ne];if(Fe){if(Fe.hot._declinedDependencies[Oe])return{type:"declined",chain:Te.concat([Ne]),moduleId:Oe,parentId:Ne};ce.indexOf(Ne)===-1&&(Fe.hot._acceptedDependencies[Oe]?($e[Ne]||($e[Ne]=[]),F($e[Ne],[Oe])):(delete $e[Ne],ce.push(Ne),me.push({chain:Te.concat([Ne]),id:Ne})))}}}}return{type:"accepted",moduleId:ne,outdatedModules:ce,outdatedDependencies:$e}}function F(ne,ce){for(var $e=0;$e<ce.length;$e++){var me=ce[$e];ne.indexOf(me)===-1&&ne.push(me)}}u.f&&delete u.f.jsonpHmr,m=void 0;var H={},V=[],K={},z=function(ne){console.warn("[HMR] unexpected require("+ne.id+") to disposed module")};for(var W in g)if(u.o(g,W)){var ae=g[W],Q=ae?I(W):{type:"disposed",moduleId:W},te=!1,de=!1,je=!1,we="";switch(Q.chain&&(we=`
|
||
Update propagation: `+Q.chain.join(" -> ")),Q.type){case"self-declined":M.onDeclined&&M.onDeclined(Q),M.ignoreDeclined||(te=new Error("Aborted because of self decline: "+Q.moduleId+we));break;case"declined":M.onDeclined&&M.onDeclined(Q),M.ignoreDeclined||(te=new Error("Aborted because of declined dependency: "+Q.moduleId+" in "+Q.parentId+we));break;case"unaccepted":M.onUnaccepted&&M.onUnaccepted(Q),M.ignoreUnaccepted||(te=new Error("Aborted because "+W+" is not accepted"+we));break;case"accepted":M.onAccepted&&M.onAccepted(Q),de=!0;break;case"disposed":M.onDisposed&&M.onDisposed(Q),je=!0;break;default:throw new Error("Unexception type "+Q.type)}if(te)return{error:te};if(de)for(W in K[W]=ae,F(V,Q.outdatedModules),Q.outdatedDependencies)u.o(Q.outdatedDependencies,W)&&(H[W]||(H[W]=[]),F(H[W],Q.outdatedDependencies[W]));je&&(F(V,[Q.moduleId]),K[W]=z)}g=void 0;for(var ie,Se=[],Ae=0;Ae<V.length;Ae++){var He=V[Ae],ue=u.c[He];ue&&(ue.hot._selfAccepted||ue.hot._main)&&K[He]!==z&&!ue.hot._selfInvalidated&&Se.push({module:He,require:ue.hot._requireSelf,errorHandler:ue.hot._selfAccepted})}return{dispose:function(){var ne;b.forEach((function(Ne){delete E[Ne]})),b=void 0;for(var ce,$e=V.slice();$e.length>0;){var me=$e.pop(),Xe=u.c[me];if(Xe){var Oe={},Te=Xe.hot._disposeHandlers;for(Ae=0;Ae<Te.length;Ae++)Te[Ae].call(null,Oe);for(u.hmrD[me]=Oe,Xe.hot.active=!1,delete u.c[me],delete H[me],Ae=0;Ae<Xe.children.length;Ae++){var Ke=u.c[Xe.children[Ae]];Ke&&(ne=Ke.parents.indexOf(me))>=0&&Ke.parents.splice(ne,1)}}}for(var se in H)if(u.o(H,se)&&(Xe=u.c[se]))for(ie=H[se],Ae=0;Ae<ie.length;Ae++)ce=ie[Ae],(ne=Xe.children.indexOf(ce))>=0&&Xe.children.splice(ne,1)},apply:function(ne){for(var ce in K)u.o(K,ce)&&(u.m[ce]=K[ce]);for(var $e=0;$e<w.length;$e++)w[$e](u);for(var me in H)if(u.o(H,me)){var Xe=u.c[me];if(Xe){ie=H[me];for(var Oe=[],Te=[],Ke=[],se=0;se<ie.length;se++){var Ne=ie[se],Fe=Xe.hot._acceptedDependencies[Ne],at=Xe.hot._acceptedErrorHandlers[Ne];if(Fe){if(Oe.indexOf(Fe)!==-1)continue;Oe.push(Fe),Te.push(at),Ke.push(Ne)}}for(var gt=0;gt<Oe.length;gt++)try{Oe[gt].call(null,ie)}catch(Ft){if(typeof Te[gt]=="function")try{Te[gt](Ft,{moduleId:me,dependencyId:Ke[gt]})}catch(qe){M.onErrored&&M.onErrored({type:"accept-error-handler-errored",moduleId:me,dependencyId:Ke[gt],error:qe,originalError:Ft}),M.ignoreErrored||(ne(qe),ne(Ft))}else M.onErrored&&M.onErrored({type:"accept-errored",moduleId:me,dependencyId:Ke[gt],error:Ft}),M.ignoreErrored||ne(Ft)}}}for(var Ot=0;Ot<Se.length;Ot++){var Lt=Se[Ot],Rt=Lt.module;try{Lt.require(Rt)}catch(Ft){if(typeof Lt.errorHandler=="function")try{Lt.errorHandler(Ft,{moduleId:Rt,module:u.c[Rt]})}catch(qe){M.onErrored&&M.onErrored({type:"self-accept-error-handler-errored",moduleId:Rt,error:qe,originalError:Ft}),M.ignoreErrored||(ne(qe),ne(Ft))}else M.onErrored&&M.onErrored({type:"self-accept-errored",moduleId:Rt,error:Ft}),M.ignoreErrored||ne(Ft)}}return V}}}self.webpackHotUpdaterapidoc=(M,I,F)=>{for(var H in I)u.o(I,H)&&(g[H]=I[H],h&&h.push(H));F&&w.push(F),A[M]&&(A[M](),A[M]=void 0)},u.hmrI.jsonp=function(M,I){g||(g={},w=[],b=[],I.push(R)),u.o(g,M)||(g[M]=u.m[M])},u.hmrC.jsonp=function(M,I,F,H,V,K){V.push(R),m={},b=I,g=F.reduce((function(z,W){return z[W]=!1,z}),{}),w=[],M.forEach((function(z){u.o(E,z)&&E[z]!==void 0?(H.push(k(z,K)),m[z]=!0):m[z]=!1})),u.f&&(u.f.jsonpHmr=function(z,W){m&&u.o(m,z)&&!m[z]&&(W.push(k(z)),m[z]=!0)})},u.hmrM=()=>{if(typeof fetch>"u")throw new Error("No browser support: need fetch API");return fetch(u.p+u.hmrF()).then((M=>{if(M.status!==404){if(!M.ok)throw new Error("Failed to fetch update manifest "+M.statusText);return M.json()}}))}})(),u(557)})()),H3}Uwe();const Kwe=()=>{const e=T.useRef(null),{theme:r,systemTheme:s,setTheme:o}=K_(),[u,h]=T.useState(""),[m,g]=T.useState("auto");T.useEffect(()=>{(()=>{const A=localStorage.getItem("autoglue.org");A&&h(A)})()},[]),T.useEffect(()=>{const E=e.current;if(!E)return;let A="light";if(m==="light"?A="light":m==="dark"?A="dark":A=(r==="system"?s:r)==="dark"?"dark":"light",E.setAttribute("theme",A),typeof window<"u"){const k=`${window.location.origin}/api/v1`;E.setAttribute("default-api-server",k)}u?(E.setAttribute("api-key-name","X-ORG-ID"),E.setAttribute("api-key-location","header"),E.setAttribute("api-key-value",u)):E.removeAttribute("api-key-value")},[r,s,m,u]);const b=()=>{const E=u.trim();localStorage.setItem("autoglue.org",E);const A=e.current;A&&(E?A.setAttribute("api-key-value",E):A.removeAttribute("api-key-value"))},w=()=>{localStorage.removeItem("autoglue.org"),h("");const E=e.current;E&&E.removeAttribute("api-key-value")};return c.jsxs("div",{className:"flex h-[100svh] flex-col",children:[c.jsxs(ya,{className:"rounded-none border-b",children:[c.jsx(ol,{className:"py-3",children:c.jsxs(ll,{className:"flex flex-wrap items-center justify-between gap-4 text-base",children:[c.jsx("span",{children:"AutoGlue API Docs"}),c.jsx("div",{className:"flex items-center gap-2 text-xs",children:c.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-muted-foreground",children:"Docs theme"}),c.jsxs(_n,{value:m,onValueChange:E=>{const A=E;g(A),o(A==="auto"?"system":E)},children:[c.jsx(Nn,{className:"h-8 w-[120px]",children:c.jsx($n,{})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"auto",children:"Auto (match app)"}),c.jsx(Ct,{value:"light",children:"Light"}),c.jsx(Ct,{value:"dark",children:"Dark"})]})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-muted-foreground",children:"Org ID (X-ORG-ID)"}),c.jsx(mt,{className:"h-8 w-80",value:u,onChange:E=>h(E.target.value),placeholder:"org_..."}),c.jsx(Pe,{size:"sm",onClick:b,children:"Save"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:w,children:"Reset"})]})]})})]})}),c.jsxs(ho,{className:"text-muted-foreground py-0 pb-2 text-xs",children:["Requests from ",c.jsx("code",{children:"<rapi-doc>"})," will include:",c.jsx("code",{className:"ml-1",children:"Cookie: ag_jwt=…"})," and"," ",c.jsxs("code",{className:"ml-1",children:["X-ORG-ID=",u]}),!u&&c.jsx(c.Fragment,{children:" (set an Org ID above to send an X-ORG-ID header)"})]})]}),c.jsx("rapi-doc",{ref:e,id:"autoglue-docs","spec-url":"/swagger/openapi.json","render-style":"read","show-header":"false","persist-auth":"true","allow-advanced-search":"true","schema-description-expanded":"true","allow-schema-description-expand-toggle":"false","allow-spec-file-download":"true","allow-spec-file-load":"false","allow-spec-url-load":"false","allow-try":"true","schema-style":"tree","fetch-credentials":"include"})]})},gb=_te(),yb={listJobs:(e={})=>ct(async()=>await gb.adminListArcherJobs(e)),enqueue:e=>ct(async()=>await gb.adminEnqueueArcherJob({dtoEnqueueRequest:e})),retryJob:e=>ct(async()=>await gb.adminRetryArcherJob({id:e})),cancelJob:e=>ct(async()=>await gb.adminCancelArcherJob({id:e})),listQueues:()=>ct(async()=>await gb.adminListArcherQueues())},Vwe=[Da.queued,Da.running,Da.succeeded,Da.failed,Da.canceled,Da.retrying,Da.scheduled],Hwe={queued:"bg-amber-100 text-amber-800",running:"bg-sky-100 text-sky-800",succeeded:"bg-emerald-100 text-emerald-800",failed:"bg-red-100 text-red-800",canceled:"bg-zinc-200 text-zinc-700",retrying:"bg-orange-100 text-orange-800",scheduled:"bg-violet-100 text-violet-800"};function X3(e){if(!e)return"—";const r=new Date(e);return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(r)}function Gwe(e,r=300){const[s,o]=T.useState(e);return T.useEffect(()=>{const u=setTimeout(()=>o(e),r);return()=>clearTimeout(u)},[e,r]),s}const Xwe=()=>{const e=Ms(),[r,s]=T.useState(""),[o,u]=T.useState(""),[h,m]=T.useState(""),g=Gwe(h,300),[b,w]=T.useState(1),[E,A]=T.useState(25),R=Un({queryKey:["archer","jobs",{status:r,queue:o,q:g,page:b,pageSize:E}],queryFn:()=>yb.listJobs({status:r||void 0,queue:o||void 0,q:g||void 0,page:b,pageSize:E}),placeholderData:Q=>Q,staleTime:1e4}),M=Un({queryKey:["archer","queues"],queryFn:()=>yb.listQueues(),staleTime:3e4}),I=Wt({mutationFn:Q=>yb.enqueue(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),F=Wt({mutationFn:Q=>yb.retryJob(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),H=Wt({mutationFn:Q=>yb.cancelJob(Q),onSuccess:()=>e.invalidateQueries({queryKey:["archer","jobs"]})}),V=R.isFetching,K=R.data,z=K?.items??[],W=K?.total??0,ae=Math.max(1,Math.ceil(W/E));return c.jsxs("div",{className:"container mx-auto space-y-6 p-6",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold",children:"Archer Jobs"}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"Inspect, enqueue, retry and cancel background jobs."})]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Zwe,{onSubmit:Q=>I.mutateAsync(Q),submitting:I.isPending}),c.jsxs(Pe,{variant:"secondary",onClick:()=>e.invalidateQueries({queryKey:["archer","jobs"]}),disabled:V,children:[V?c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}):c.jsx(LJ,{className:"mr-2 h-4 w-4"}),"Refresh"]})]})]}),c.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:M.data?.map(Q=>c.jsxs(ya,{children:[c.jsx(ol,{children:c.jsx(ll,{className:"text-base",children:Q.name})}),c.jsxs(ho,{className:"grid grid-cols-2 gap-2 text-sm",children:[c.jsx(yj,{label:"Pending",value:Q.pending??0}),c.jsx(yj,{label:"Running",value:Q.running??0}),c.jsx(yj,{label:"Failed",value:Q.failed??0}),c.jsx(yj,{label:"Scheduled",value:Q.scheduled??0})]})]},Q.name))}),c.jsxs(ya,{children:[c.jsx(ol,{children:c.jsx(ll,{children:"Filters"})}),c.jsxs(ho,{className:"grid gap-3 md:grid-cols-4",children:[c.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[c.jsx(mt,{placeholder:"Search id, queue, error, payload…",value:h,onChange:Q=>{m(Q.target.value),w(1)},onKeyDown:Q=>Q.key==="Enter"&&e.invalidateQueries({queryKey:["archer","jobs"]})}),h&&c.jsx(Pe,{variant:"ghost",size:"icon",onClick:()=>m(""),children:c.jsx(W_,{className:"h-4 w-4"})}),c.jsxs(Pe,{onClick:()=>e.invalidateQueries({queryKey:["archer","jobs"]}),children:[c.jsx(va,{className:"mr-2 h-4 w-4"})," Search"]})]}),c.jsxs(_n,{value:r||"all",onValueChange:Q=>{s(Q==="all"?"":Q),w(1)},children:[c.jsx(Nn,{children:c.jsx($n,{placeholder:"All statuses"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"all",children:"All statuses"}),Vwe.map(Q=>c.jsx(Ct,{value:Q,children:Q},Q))]})]}),c.jsx(mt,{placeholder:"Queue (optional)",value:o,onChange:Q=>{u(Q.target.value),w(1)}}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Gs,{className:"whitespace-nowrap",children:"Page size"}),c.jsxs(_n,{value:String(E),onValueChange:Q=>{A(Number(Q)),w(1)},children:[c.jsx(Nn,{className:"w-[120px]",children:c.jsx($n,{})}),c.jsx(Dn,{children:[10,25,50,100].map(Q=>c.jsx(Ct,{value:String(Q),children:Q},Q))})]})]})]})]}),c.jsx(ya,{children:c.jsxs(ho,{className:"p-0",children:[c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"ID"}),c.jsx(St,{children:"Queue"}),c.jsx(St,{children:"Status"}),c.jsx(St,{children:"Attempts"}),c.jsx(St,{children:"Run At"}),c.jsx(St,{children:"Updated"}),c.jsx(St,{className:"pr-4 text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[R.isLoading&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:7,className:"text-muted-foreground py-8 text-center",children:"Loading…"})}),R.isError&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:7,className:"py-8 text-center text-red-600",children:"Failed to load jobs"})}),!R.isLoading&&z.length===0&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:7,className:"text-muted-foreground py-8 text-center",children:"No jobs match your filters."})}),z.map(Q=>{const te=Q.status??Da.queued;return c.jsxs(Qt,{children:[c.jsx(dt,{children:c.jsx("code",{className:"text-xs",children:Q.id})}),c.jsx(dt,{children:c.jsx(rr,{variant:"secondary",children:Q.queue})}),c.jsx(dt,{children:c.jsx("span",{className:vt("rounded-md px-2 py-0.5 text-xs",Hwe[te]),children:te})}),c.jsx(dt,{children:Q.max_attempts?`${Q.attempts}/${Q.max_attempts}`:Q.attempts}),c.jsx(dt,{children:X3(Q.run_at)}),c.jsx(dt,{children:X3(Q.updated_at??Q.created_at)}),c.jsx(dt,{className:"text-right",children:c.jsxs("div",{className:"flex justify-end gap-2",children:[(te===Da.failed||te===Da.canceled)&&c.jsx(Pe,{size:"sm",variant:"outline",disabled:F.isPending||!Q.id,onClick:()=>{Q.id&&F.mutate(Q.id)},children:"Retry"}),(te===Da.queued||te===Da.running||te===Da.scheduled)&&c.jsx(Pe,{size:"sm",variant:"outline",disabled:H.isPending||!Q.id,onClick:()=>{Q.id&&H.mutate(Q.id)},children:"Cancel"}),c.jsx(Ywe,{job:Q})]})})]},Q.id)})]})]}),c.jsxs("div",{className:"flex items-center justify-between border-t p-3 text-sm",children:[c.jsxs("div",{children:["Page ",b," of ",ae," • ",W," total"]}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Pe,{variant:"outline",disabled:b<=1||R.isFetching,onClick:()=>w(Q=>Math.max(1,Q-1)),children:"Prev"}),c.jsx(Pe,{variant:"outline",disabled:b>=ae||R.isFetching,onClick:()=>w(Q=>Q+1),children:"Next"})]})]})]})})]})};function yj({label:e,value:r}){return c.jsxs("div",{className:"bg-muted/30 rounded-lg border p-3",children:[c.jsx("div",{className:"text-muted-foreground text-xs",children:e}),c.jsx("div",{className:"text-lg font-semibold",children:r})]})}function Ywe({job:e}){return c.jsxs(dn,{children:[c.jsx(Ai,{asChild:!0,children:c.jsx(Pe,{size:"sm",variant:"ghost",children:"Details"})}),c.jsxs(hn,{className:"max-w-2xl",children:[c.jsx(pn,{children:c.jsxs(fn,{children:["Job ",e.id]})}),c.jsxs("div",{className:"grid gap-3",children:[e.last_error&&c.jsxs(ya,{children:[c.jsx(ol,{children:c.jsx(ll,{className:"text-sm",children:"Last error"})}),c.jsx(ho,{children:c.jsx("pre",{className:"overflow-auto text-xs whitespace-pre-wrap",children:e.last_error})})]}),c.jsxs(ya,{children:[c.jsx(ol,{children:c.jsx(ll,{className:"text-sm",children:"Payload"})}),c.jsx(ho,{children:c.jsx("pre",{className:"overflow-auto text-xs whitespace-pre-wrap",children:JSON.stringify(e.payload,null,2)})})]})]}),c.jsx(gn,{children:c.jsx(Yj,{asChild:!0,children:c.jsx(Pe,{variant:"secondary",children:"Close"})})})]})]})}function Zwe({onSubmit:e,submitting:r}){const[s,o]=T.useState(!1),[u,h]=T.useState(""),[m,g]=T.useState(""),[b,w]=T.useState("{}"),[E,A]=T.useState(""),k=u&&m&&!r;async function R(){const M=b?JSON.parse(b):void 0;await e({queue:u,type:m,payload:M,run_at:E||void 0}),o(!1),h(""),g(""),w("{}"),A("")}return c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{children:[c.jsx(qa,{className:"mr-2 h-4 w-4"})," Enqueue"]})}),c.jsxs(hn,{children:[c.jsx(pn,{children:c.jsx(fn,{children:"Enqueue Job"})}),c.jsxs("div",{className:"grid gap-3",children:[c.jsxs("div",{className:"grid gap-2",children:[c.jsx(Gs,{children:"Queue"}),c.jsx(mt,{value:u,onChange:M=>h(M.target.value),placeholder:"e.g. bootstrap_bastion"})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx(Gs,{children:"Type"}),c.jsx(mt,{value:m,onChange:M=>g(M.target.value),placeholder:"e.g. bootstrap_bastion"})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx(Gs,{children:"Payload (JSON)"}),c.jsx(nl,{value:b,onChange:M=>w(M.target.value),className:"min-h-[120px] font-mono text-xs"})]}),c.jsxs("div",{className:"grid gap-2",children:[c.jsx(Gs,{children:"Run at (optional)"}),c.jsx(mt,{type:"datetime-local",value:E,onChange:M=>A(M.target.value)})]})]}),c.jsxs(gn,{children:[c.jsx(Yj,{asChild:!0,children:c.jsx(Pe,{variant:"secondary",children:"Cancel"})}),c.jsxs(Pe,{onClick:R,disabled:!k,children:[r?c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}):null,"Enqueue"]})]})]})]})}const vb=Rte(),Mb={listLabels:()=>ct(async()=>await vb.listLabels()),createLabel:e=>ct(async()=>await vb.createLabel({dtoCreateLabelRequest:e})),getLabel:e=>ct(async()=>await vb.getLabel({id:e})),deleteLabel:e=>ct(async()=>{await vb.deleteLabel({id:e})}),updateLabel:(e,r)=>ct(async()=>await vb.updateLabel({id:e,dtoUpdateLabelRequest:r}))},kB=Is({key:Sn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:Sn().trim().optional()}),Jwe=kB.partial();function Wwe({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}`;return c.jsxs(rr,{variant:"secondary",className:"font-mono text-xs",children:[c.jsx(jC,{className:"mr-1 h-3 w-3"}),r]})}const Qwe=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(null),[b,w]=T.useState(null),E=Ms(),A=Un({queryKey:["labels"],queryFn:()=>Mb.listLabels()}),k=hr({resolver:fr(kB),defaultValues:{key:"",value:""}}),R=Wt({mutationFn:z=>Mb.createLabel(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["labels"]}),k.reset(),o(!1),Ge.success("Label Created Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while creating Label")}}),M=z=>{R.mutate(z)},I=hr({resolver:fr(Jwe),defaultValues:{}}),F=Wt({mutationFn:({id:z,values:W})=>Mb.updateLabel(z,W),onSuccess:async()=>{await E.invalidateQueries({queryKey:["labels"]}),I.reset(),h(!1),Ge.success("Label Updated Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while updating Label")}}),H=z=>{w(z.id),I.reset({key:z.key,value:z.value}),h(!0)},V=Wt({mutationFn:z=>Mb.deleteLabel(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["labels"]}),g(null),Ge.success("Label Deleted Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while deleting Label")}}),K=T.useMemo(()=>{const z=A.data??[],W=e.trim().toLowerCase();return W?z.filter(ae=>ae.key?.toLowerCase().includes(W)||ae.value?.toLowerCase().includes(W)):z},[e,A.data]);return A.isLoading?c.jsx("div",{className:"p-6",children:"Loading labels…"}):A.error?c.jsx("div",{className:"p-6 text-red-500",children:"Error loading labels."}):c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Labels"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search labels",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Label"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create Label"})}),c.jsx(mr,{...k,children:c.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[c.jsx(ft,{control:k.control,name:"key",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Key"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"environment",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:k.control,name:"value",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Value"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"dev",...z})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Key"}),c.jsx(St,{children:"Value"}),c.jsx(St,{children:"Label"}),c.jsx(St,{className:"w-[180px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[K.map(z=>c.jsxs(Qt,{children:[c.jsx(dt,{children:z.key}),c.jsx(dt,{children:z.value}),c.jsx(dt,{children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Wwe,{t:z}),c.jsx("code",{className:"text-muted-foreground text-xs",children:za(z.id,6)})]})}),c.jsx(dt,{children:c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>H(z),children:[c.jsx(uc,{className:"mr-2 h-4 w-4"})," Edit"]}),c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:V.isPending&&m===z.id,children:V.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),K.length===0&&c.jsx(Qt,{children:c.jsxs(dt,{colSpan:4,className:"text-muted-foreground py-10 text-center",children:[c.jsx(Rg,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No labels match your search."]})})]})]})})}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Label"})}),c.jsx(mr,{...I,children:c.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&F.mutate({id:b,values:z})}),children:[c.jsx(ft,{control:I.control,name:"key",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Key"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"dedicated",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"value",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Value (optional)"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"gpu",...z})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:F.isPending,children:F.isPending?"Saving…":"Save changes"})]})]})})]})}),c.jsx(dn,{open:!!m,onOpenChange:z=>!z&&g(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete label"})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this label?"}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>m&&V.mutate(m),disabled:V.isPending,children:V.isPending?"Deleting…":"Delete"})]})]})})]})},RB=Is({name:Sn().trim().min(1,"Name is required").max(120,"Max 120 chars"),kind:Fa(["glueops","public"]).default("public"),public_ip_address:Sn().trim().min(1,"Public IP/hostname is required").max(255,"Max 255 chars"),private_ip_address:Sn().trim().min(1,"Private IP/hostname is required").max(255,"Max 255 chars")}),e0e=RB.partial();function t0e({lb:e}){return c.jsxs(rr,{variant:"secondary",className:"font-mono text-xs",children:[c.jsx(RJ,{className:"mr-1 h-3 w-3"}),e.name," · ",e.kind," · ",e.public_ip_address," → ",e.private_ip_address]})}const n0e=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(null),[b,w]=T.useState(null),E=Ms(),A=Un({queryKey:["loadBalancers"],queryFn:()=>$b.listLoadBalancers()}),k=hr({resolver:fr(RB),defaultValues:{name:"",kind:"public",public_ip_address:"",private_ip_address:""}}),R=Wt({mutationFn:z=>$b.createLoadBalancer(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["loadBalancers"]}),k.reset(),o(!1),Ge.success("Load balancer created successfully.")},onError:z=>{Ge.error(z?.message??"There was an error while creating the load balancer")}}),M=z=>{R.mutate(z)},I=hr({resolver:fr(e0e),defaultValues:{}}),F=Wt({mutationFn:({id:z,values:W})=>$b.updateLoadBalancer(z,W),onSuccess:async()=>{await E.invalidateQueries({queryKey:["loadBalancers"]}),I.reset(),h(!1),Ge.success("Load balancer updated successfully.")},onError:z=>{Ge.error(z?.message??"There was an error while updating the load balancer")}}),H=z=>{w(z.id),I.reset({name:z.name??"",kind:z.kind??"public",public_ip_address:z.public_ip_address??"",private_ip_address:z.private_ip_address??""}),h(!0)},V=Wt({mutationFn:z=>$b.deleteLoadBalancer(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["loadBalancers"]}),g(null),Ge.success("Load balancer deleted successfully.")},onError:z=>{Ge.error(z?.message??"There was an error while deleting the load balancer")}}),K=T.useMemo(()=>{const z=A.data??[],W=e.trim().toLowerCase();return W?z.filter(ae=>ae.name?.toLowerCase().includes(W)||ae.kind?.toLowerCase().includes(W)||ae.public_ip_address?.toLowerCase().includes(W)||ae.private_ip_address?.toLowerCase().includes(W)):z},[e,A.data]);return A.isLoading?c.jsx("div",{className:"p-6",children:"Loading load balancers…"}):A.error?c.jsx("div",{className:"p-6 text-red-500",children:"Error loading load balancers."}):c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Load Balancers"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search load balancers",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Load Balancer"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create Load Balancer"})}),c.jsx(mr,{...k,children:c.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[c.jsx(ft,{control:k.control,name:"name",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"apps-lb-01",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:k.control,name:"kind",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Kind"}),c.jsx(bt,{children:c.jsxs(_n,{onValueChange:z.onChange,value:z.value??"public",children:[c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select kind"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"public",children:"Public"}),c.jsx(Ct,{value:"glueops",children:"GlueOps"})]})]})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:k.control,name:"public_ip_address",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Public IP"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"1.2.3.4",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:k.control,name:"private_ip_address",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Private IP"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"10.0.30.10",...z})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:R.isPending,children:R.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Name"}),c.jsx(St,{children:"Kind"}),c.jsx(St,{children:"Public IP / Hostname"}),c.jsx(St,{children:"Private IP / Hostname"}),c.jsx(St,{children:"Summary"}),c.jsx(St,{className:"w-[220px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[K.map(z=>c.jsxs(Qt,{children:[c.jsx(dt,{children:z.name}),c.jsx(dt,{children:z.kind}),c.jsx(dt,{children:z.public_ip_address}),c.jsx(dt,{children:z.private_ip_address}),c.jsx(dt,{children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(t0e,{lb:z}),z.id&&c.jsx("code",{className:"text-muted-foreground text-xs",children:za(z.id,6)})]})}),c.jsx(dt,{children:c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>H(z),children:[c.jsx(uc,{className:"mr-2 h-4 w-4"})," Edit"]}),c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:V.isPending&&m===z.id,children:V.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),K.length===0&&c.jsx(Qt,{children:c.jsxs(dt,{colSpan:6,className:"text-muted-foreground py-10 text-center",children:[c.jsx(Rg,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No load balancers match your search."]})})]})]})})}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Load Balancer"})}),c.jsx(mr,{...I,children:c.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&F.mutate({id:b,values:z})}),children:[c.jsx(ft,{control:I.control,name:"name",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"apps-lb-01",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"kind",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Kind"}),c.jsx(bt,{children:c.jsxs(_n,{onValueChange:z.onChange,value:z.value??"public",children:[c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select kind"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"public",children:"Public"}),c.jsx(Ct,{value:"glueops",children:"GlueOps"})]})]})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"public_ip_address",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Public IP / Hostname"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"1.2.3.4 or apps.example.com",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"private_ip_address",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Private IP / Hostname"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"10.0.30.10",...z})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:F.isPending,children:F.isPending?"Saving…":"Save changes"})]})]})})]})}),c.jsx(dn,{open:!!m,onOpenChange:z=>!z&&g(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete load balancer"})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this load balancer?"}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>m&&V.mutate(m),disabled:V.isPending,children:V.isPending?"Deleting…":"Delete"})]})]})})]})};function r0e(e,r="gsot-auth",s=520,o=640){const u=window.top.outerHeight/2+window.top.screenY-o/2,h=window.top.outerWidth/2+window.top.screenX-s/2;return window.open(e,r,`toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=${s},height=${o},top=${u},left=${h}`)}async function s0e(e){const r=new URLSearchParams({mode:"spa",origin:window.location.origin}),s=await fetch(`${Q_}/auth/${e}/start?`+r,{method:"POST"});if(!s.ok)throw new Error("Failed to start auth");return(await s.json()).auth_url}const Y3=()=>{const e=NY(),r=B_(),s=T.useMemo(()=>{const u=new URLSearchParams(r.search).get("to")||"/me";try{const h=new URL(u,window.location.origin);return h.origin===window.location.origin?h.pathname+h.search:"/me"}catch{return"/me"}},[r.search]);T.useEffect(()=>{Xs.get()?.access_token&&e(s,{replace:!0})},[e,s]),T.useEffect(()=>{const u=h=>{if(!(typeof h.data=="object"&&h.data?.type==="autoglue:auth"))return;const g=h.data.payload;Xs.set(g),e(s,{replace:!0})};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)},[e,s]);const o=async u=>{const h=await s0e(u);r0e(h)||alert("Please allow popups to sign in.")};return c.jsx("div",{className:"mx-auto flex items-center justify-center p-4",children:c.jsxs(ya,{className:"w-full max-w-md",children:[c.jsxs(ol,{children:[c.jsx(ll,{className:"text-lg md:text-xl",children:"Sign In"}),c.jsx(M_,{className:"text-xs md:text-sm",children:"Continue with a provider below to access your account."})]}),c.jsx(ho,{children:c.jsx("div",{className:"grid gap-4",children:c.jsx("div",{className:vt("flex w-full items-center gap-2","flex-col justify-between"),children:c.jsxs(Pe,{variant:"outline",className:"w-full gap-2",onClick:()=>o("google"),children:[c.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"0.98em",height:"1em",viewBox:"0 0 256 262","aria-hidden":"true",focusable:"false",children:[c.jsx("path",{fill:"#4285F4",d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027"}),c.jsx("path",{fill:"#34A853",d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1"}),c.jsx("path",{fill:"#FBBC05",d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z"}),c.jsx("path",{fill:"#EB4335",d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251"})]}),"Sign in with Google"]})})})})]})})},i0e=CC(),a0e={create:e=>ct(async()=>i0e.createOrg({handlersOrgCreateReq:e}))},o0e=Is({display_name:Sn().min(2,"Too short").max(100,"Too long")}),l0e=Is({name:Sn().min(2,"Too short").max(100,"Too long"),expires_in_hours:tw().min(1).max(43800)}),c0e=Is({name:Sn().min(2,"Too short").max(100,"Too long"),domain:Sn().trim().toLowerCase().optional().or(nw("")).refine(e=>!e||/^[a-z0-9.-]+\.[a-z]{2,}$/i.test(e),"Invalid domain (e.g. example.com)")}),u0e=()=>{const e=Ms(),r=Un({queryKey:["me"],queryFn:()=>wp.getMe()}),s=hr({resolver:fr(o0e),defaultValues:{display_name:""},values:r.data?{display_name:r.data.display_name??""}:void 0}),o=Wt({mutationFn:K=>wp.updateMe(K),onSuccess:()=>{e.invalidateQueries({queryKey:["me"]}),Ge.success("Profile updated")},onError:K=>Ge.error(K?.message??"Update failed")}),u=Un({queryKey:["me","api-keys"],queryFn:()=>wp.listKeys()}),[h,m]=T.useState(!1),[g,b]=T.useState(null),w=hr({resolver:fr(l0e),defaultValues:{name:"",expires_in_hours:720}}),E=Wt({mutationFn:K=>wp.createKey({name:K.name,expires_in_hours:K.expires_in_hours}),onSuccess:K=>{b(K),m(!1),e.invalidateQueries({queryKey:["me","api-keys"]}),Ge.success("API key created")},onError:K=>Ge.error(K?.message??"Failed to create key")}),[A,k]=T.useState(null),R=Wt({mutationFn:K=>wp.deleteKey(K),onSuccess:()=>{e.invalidateQueries({queryKey:["me","api-keys"]}),k(null),Ge.success("Key deleted")},onError:K=>Ge.error(K?.message??"Failed to delete key")}),M=T.useMemo(()=>r.data?.emails?.find(K=>K.is_primary)?.email??r.data?.primary_email??"",[r.data]),[I,F]=T.useState(!1),H=hr({resolver:fr(c0e),defaultValues:{name:"",domain:""}}),V=Wt({mutationFn:K=>a0e.create({name:K.name.trim(),domain:K.domain?.trim()?K.domain.trim().toLowerCase():void 0}),onSuccess:()=>{F(!1),H.reset(),e.invalidateQueries({queryKey:["me"]}),Ge.success("Organization created")},onError:K=>Ge.error(K?.message??"Failed to create organization")});return r.isLoading?c.jsx("div",{className:"p-6",children:"Loading…"}):r.error?c.jsx("div",{className:"text-destructive p-6",children:"Failed to load profile"}):c.jsxs("div",{className:"space-y-6 p-6",children:[c.jsxs(ya,{children:[c.jsxs(ol,{children:[c.jsx(ll,{children:"Profile"}),c.jsx(M_,{children:"Manage your personal information."})]}),c.jsx(ho,{children:c.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(Gs,{children:"Email"}),c.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:M||"—"})]}),c.jsxs("div",{children:[c.jsx(Gs,{children:"ID"}),c.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:r.data?.id||"—"}),c.jsx("div",{className:"text-muted-foreground mt-1 text-sm",children:"Share this ID with the organization owner of the Organization to join"})]}),c.jsx(mr,{...s,children:c.jsxs("form",{className:"space-y-4",onSubmit:s.handleSubmit(K=>o.mutate(K)),children:[c.jsx(ft,{control:s.control,name:"display_name",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Display name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"Your name",...K})}),c.jsx(pt,{})]})}),c.jsx(Pe,{type:"submit",disabled:o.isPending,children:"Save"})]})})]}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Gs,{children:"Organizations"}),c.jsxs(dn,{open:I,onOpenChange:F,children:[c.jsx(Ai,{asChild:!0,children:c.jsx(Pe,{size:"sm",children:"New Organization"})}),c.jsxs(hn,{children:[c.jsxs(pn,{children:[c.jsx(fn,{children:"Create organization"}),c.jsx(rT,{children:"Give it a name, and optionally assign your company domain."})]}),c.jsx(mr,{...H,children:c.jsxs("form",{className:"space-y-4",onSubmit:H.handleSubmit(K=>V.mutate(K)),children:[c.jsx(ft,{control:H.control,name:"name",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"Acme Inc.",...K})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:H.control,name:"domain",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Domain (optional)"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"acme.com",...K})}),c.jsx(pt,{})]})}),c.jsxs(gn,{children:[c.jsx(Yj,{asChild:!0,children:c.jsx(Pe,{type:"button",variant:"outline",children:"Cancel"})}),c.jsx(Pe,{type:"submit",disabled:V.isPending,children:"Create"})]})]})})]})]})]}),c.jsx("div",{className:"rounded-md border",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Id"}),c.jsx(St,{children:"Name"}),c.jsx(St,{children:"Domain"})]})}),c.jsxs(Qs,{children:[r.data?.organizations?.map(K=>c.jsxs(Qt,{children:[c.jsx(dt,{children:K.id}),c.jsx(dt,{children:K.name}),c.jsx(dt,{children:K.domain??"—"})]},K.id)),(!r.data?.organizations||r.data.organizations.length===0)&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:2,className:"text-muted-foreground",children:"No organizations"})})]})]})})]})]})})]}),c.jsx(Ab,{}),c.jsxs(ya,{children:[c.jsxs(ol,{className:"flex flex-row items-center justify-between space-y-0",children:[c.jsxs("div",{children:[c.jsx(ll,{children:"User API Keys"}),c.jsx(M_,{children:"Personal keys for API access."})]}),c.jsxs(dn,{open:h,onOpenChange:m,children:[c.jsx(Ai,{asChild:!0,children:c.jsx(Pe,{children:"New Key"})}),c.jsxs(hn,{children:[c.jsxs(pn,{children:[c.jsx(fn,{children:"Create API Key"}),c.jsx(rT,{children:"Give it a label and expiry."})]}),c.jsx(mr,{...w,children:c.jsxs("form",{className:"space-y-4",onSubmit:w.handleSubmit(K=>E.mutate(K)),children:[c.jsx(ft,{control:w.control,name:"name",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Label"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"CI script, local dev, ...",...K})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:w.control,name:"expires_in_hours",render:({field:K})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Expires in hours"}),c.jsx(bt,{children:c.jsx(mt,{type:"number",inputMode:"numeric",step:1,min:1,placeholder:"e.g. 720",...K,onChange:z=>K.onChange(z.target.value===""?"":Number(z.target.value))})}),c.jsx(pt,{})]})}),c.jsxs(gn,{children:[c.jsx(Yj,{asChild:!0,children:c.jsx(Pe,{type:"button",variant:"outline",children:"Cancel"})}),c.jsx(Pe,{type:"submit",disabled:E.isPending,children:"Create"})]})]})})]})]})]}),c.jsx(ho,{children:c.jsx("div",{className:"overflow-x-auto rounded-md border",children:c.jsxs(Js,{className:"text-sm",children:[c.jsx(pve,{children:"Your user-scoped API keys."}),c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Label"}),c.jsx(St,{children:"Created"}),c.jsx(St,{children:"Expires"}),c.jsx(St,{children:"Last used"}),c.jsx(St,{className:"w-24"})]})}),c.jsxs(Qs,{children:[u.data?.map(K=>c.jsxs(Qt,{children:[c.jsx(dt,{children:K.name??"—"}),c.jsx(dt,{children:new Date(K.created_at).toLocaleString()}),c.jsx(dt,{children:K.expires_at?new Date(K.expires_at).toLocaleString():"—"}),c.jsx(dt,{children:K.last_used_at?new Date(K.last_used_at).toLocaleString():"—"}),c.jsx(dt,{className:"text-right",children:c.jsxs(uC,{open:A===K.id,onOpenChange:z=>!z&&k(null),children:[c.jsx(dC,{asChild:!0,children:c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>k(K.id),children:"Delete"})}),c.jsxs(hC,{children:[c.jsxs(pC,{children:[c.jsx(mC,{children:"Delete this key?"}),c.jsx(gC,{children:"This action cannot be undone. Requests using this key will stop working."})]}),c.jsxs(fC,{children:[c.jsx(vC,{children:"Cancel"}),c.jsx(yC,{onClick:()=>R.mutate(K.id),children:"Delete"})]})]})]})})]},K.id)),(!u.data||u.data.length===0)&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:5,className:"text-muted-foreground",children:"No API keys yet."})})]})]})})})]}),c.jsx(dn,{open:!!g,onOpenChange:K=>!K&&b(null),children:c.jsxs(hn,{children:[c.jsxs(pn,{children:[c.jsx(fn,{children:"Copy your new API key"}),c.jsx(rT,{children:"This is only shown once. Store it securely."})]}),c.jsx("div",{className:"rounded-md border p-3 font-mono text-sm break-all",children:g?.plain??"—"}),c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>{const K=g?.plain;K&&(navigator.clipboard.writeText(K),Ge.success("Copied"))},children:"Copy"}),c.jsx(Pe,{onClick:()=>b(null),children:"Done"})]})]})})]})},xb=kte(),Ib={listTaints:()=>ct(async()=>await xb.listTaints()),createTaint:e=>ct(async()=>await xb.createTaint({dtoCreateTaintRequest:e})),getTaint:e=>ct(async()=>await xb.getTaint({id:e})),deleteTaint:e=>ct(async()=>{await xb.deleteTaint({id:e})}),updateTaint:(e,r)=>ct(async()=>await xb.updateTaint({id:e,dtoUpdateTaintRequest:r}))},d0e=["master","worker"];function Z3({status:e}){const r=e==="ready"?"default":e==="provisioning"?"secondary":e==="failed"?"destructive":"outline";return c.jsx(rr,{variant:r,className:"capitalize",children:e||"unknown"})}function mu(e,r){return(e??"").toLowerCase().includes(r)}function RT(e){const{open:r,title:s,onOpenChange:o,items:u,initialSelectedIds:h,onSave:m,columns:g,allowItem:b}=e,[w,E]=T.useState(""),[A,k]=T.useState(new Set(h)),[R,M]=T.useState(!1);T.useEffect(()=>{k(new Set(h)),E("")},[h,r]);const I=T.useMemo(()=>{const V=w.trim().toLowerCase();return u.filter(K=>b&&!b(K)?!1:V?mu(K.name,V)||mu(K.key,V)||mu(K.value,V)||mu(K.effect,V)||mu(K.hostname,V)||mu(K.private_ip_address,V)||mu(K.public_ip_address,V)||mu(K.role,V)||mu(K.status,V):!0)},[u,w,b]),F=h,H=Array.from(A).some(V=>!F.has(V))||Array.from(F).some(V=>!A.has(V));return c.jsx(dn,{open:r,onOpenChange:o,children:c.jsxs(hn,{className:"sm:max-w-3xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:s})}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:w,onChange:V=>E(V.target.value),placeholder:"Search…",className:"pl-8"})]}),c.jsx("div",{className:"max-h-[50vh] overflow-auto rounded border",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{className:"w-[48px]"}),g.map((V,K)=>c.jsx(St,{children:V.header},K))]})}),c.jsxs(Qs,{children:[I.map(V=>{const K=V.id,z=A.has(K);return c.jsxs(Qt,{children:[c.jsx(dt,{className:"text-center align-middle",children:c.jsx("input",{type:"checkbox",className:"h-4 w-4",checked:z,onChange:W=>{const ae=new Set(A);W.target.checked?ae.add(K):ae.delete(K),k(ae)}})}),g.map((W,ae)=>c.jsx(dt,{children:W.render(V)},ae))]},K)}),I.length===0&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:1+g.length,className:"text-muted-foreground py-8 text-center",children:"No items found."})})]})]})}),c.jsxs("div",{className:"text-muted-foreground text-sm",children:["Selected: ",c.jsx("span",{className:"text-foreground font-medium",children:A.size})]})]}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),disabled:R,children:"Close"}),c.jsx(Pe,{onClick:async()=>{const V=[],K=[];for(const z of A)F.has(z)||V.push(z);for(const z of F)A.has(z)||K.push(z);try{M(!0),await m({toAttach:V,toDetach:K}),o(!1)}finally{M(!1)}},disabled:R||!H,children:R?"Saving…":"Save changes"})]})]})})}const TB=Is({name:Sn().trim().min(1,"Name is required").max(120,"Max 120 chars"),role:Fa(d0e)}),h0e=TB.partial();function p0e(){const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(!1),[b,w]=T.useState(null),[E,A]=T.useState(null),[k,R]=T.useState(!1),[M,I]=T.useState(null),[F,H]=T.useState(new Set),[V,K]=T.useState(new Set),[z,W]=T.useState(""),[ae,Q]=T.useState(!1),[te,de]=T.useState(!1),[je,we]=T.useState(!1),[ie,Se]=T.useState(null),[Ae,He]=T.useState(new Set),[ue,ne]=T.useState(new Set),[ce,$e]=T.useState(new Set),me=Ms(),Xe=Un({queryKey:["node-pools"],queryFn:()=>Na.listNodePools()}),Oe=Un({queryKey:["servers"],queryFn:()=>mg.listServers()}),Te=Un({queryKey:["annotations"],queryFn:()=>_b.listAnnotations()}),Ke=Un({queryKey:["labels"],queryFn:()=>Mb.listLabels()}),se=Un({queryKey:["taints"],queryFn:()=>Ib.listTaints()}),Ne=hr({resolver:fr(TB),defaultValues:{name:"",role:"worker"}}),Fe=Wt({mutationFn:qe=>Na.createNodePool(qe),onSuccess:async()=>{await me.invalidateQueries({queryKey:["node-pools"]}),Ne.reset({name:"",role:"worker"}),o(!1),Ge.success("Node pool created.")},onError:qe=>Ge.error(qe?.message??"Unable to create node pool.")}),at=qe=>Fe.mutate(qe),gt=hr({resolver:fr(h0e),defaultValues:{name:void 0,role:void 0}});T.useEffect(()=>{b?gt.reset({name:b.name,role:b.role}):gt.reset({name:void 0,role:void 0})},[b]);const Ot=Wt({mutationFn:async qe=>{if(!b)return;const Bt={};return qe.name!==b.name&&(Bt.name=qe.name),qe.role!==b.role&&(Bt.role=qe.role),await Na.updateNodePool(b.id,Bt)},onSuccess:async()=>{await me.invalidateQueries({queryKey:["node-pools"]}),h(!1),w(null),Ge.success("Node pool updated.")},onError:qe=>Ge.error(qe?.message??"Unable to update node pool.")}),Lt=qe=>Ot.mutate(qe),Rt=Wt({mutationFn:async()=>{E&&await Na.deleteNodePool(E.id)},onSuccess:async()=>{await me.invalidateQueries({queryKey:["node-pools"]}),g(!1),A(null),Ge.success("Node pool deleted.")},onError:qe=>Ge.error(qe?.message??"Unable to delete node pool.")}),Ft=T.useMemo(()=>{const qe=Xe.data??[],Bt=e.trim().toLowerCase();return Bt?qe.filter(kt=>kt.name?.toLowerCase().includes(Bt)||kt.role?.toLowerCase().includes(Bt)):qe},[e,Xe.data]);return Xe.isLoading?c.jsx("div",{className:"p-6",children:"Loading node pools…"}):Xe.error?c.jsxs("div",{className:"p-6 text-red-500",children:["Error loading node pools.",c.jsx("pre",{className:"bg-muted mt-3 rounded p-3 text-xs",children:JSON.stringify(Xe.error,null,2)})]}):c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Node Pools"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:qe=>r(qe.target.value),placeholder:"Search node pools",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Node Pool"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create Node Pool"})}),c.jsx(mr,{...Ne,children:c.jsxs("form",{className:"space-y-4",onSubmit:Ne.handleSubmit(at),children:[c.jsx(ft,{control:Ne.control,name:"name",render:({field:qe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"master-pool",...qe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:Ne.control,name:"role",render:({field:qe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Role"}),c.jsxs(_n,{onValueChange:Bt=>Ne.setValue("role",Bt,{shouldDirty:!0,shouldValidate:!0}),value:qe.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select role"})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"master",children:"master"}),c.jsx(Ct,{value:"worker",children:"worker"})]})]}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:Ne.formState.isSubmitting,children:Ne.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Name"}),c.jsx(St,{children:"Role"}),c.jsx(St,{children:"Servers"}),c.jsx(St,{children:"Annotations"}),c.jsx(St,{children:"Labels"}),c.jsx(St,{children:"Taints"}),c.jsx(St,{className:"w-[180px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[Ft.map(qe=>{const Bt=Array.isArray(qe.servers)?qe.servers.length:0;return c.jsxs(Qt,{children:[c.jsx(dt,{className:"font-medium",children:qe.name}),c.jsx(dt,{className:"font-medium",children:qe.role}),c.jsx(dt,{children:c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(qe.servers||[]).slice(0,6).map(kt=>c.jsxs(rr,{variant:"secondary",className:"gap-1",children:[c.jsx(J_,{className:"h-3 w-3"}),kt.hostname||kt.private_ip_address,c.jsx("span",{className:"ml-1",children:kt.role}),kt.status&&c.jsx("span",{className:"ml-1",children:c.jsx(Z3,{status:kt.status})})]},kt.id)),Bt===0&&c.jsx("span",{className:"text-muted-foreground",children:"No servers"}),Bt>6&&c.jsxs("span",{className:"text-muted-foreground",children:["+",Bt-6," more"]}),c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{I(qe);const kt=new Set((qe.servers||[]).map(G=>G.id));H(new Set(kt)),K(new Set(kt)),W(""),R(!0)},children:[c.jsx(KE,{className:"mr-2 h-4 w-4"}),"Manage Servers"]})]})}),c.jsx(dt,{children:c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(qe.annotations||[]).slice(0,6).map(kt=>c.jsxs(rr,{variant:"outline",className:"gap-1",children:[kt.key,":",kt.value]},kt.id)),(qe.annotations||[]).length===0&&c.jsx("span",{className:"text-muted-foreground",children:"No annotations"}),(qe.annotations||[]).length>6&&c.jsxs("span",{className:"text-muted-foreground",children:["+",(qe.annotations||[]).length-6," more"]}),c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{Se(qe),ne(new Set((qe.annotations||[]).map(kt=>kt.id))),de(!0)},children:[c.jsx(KE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),c.jsx(dt,{children:c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(qe.labels||[]).slice(0,6).map(kt=>c.jsxs(rr,{variant:"secondary",className:"gap-1",children:[kt.key,":",kt.value]},kt.id)),(qe.labels||[]).length===0&&c.jsx("span",{className:"text-muted-foreground",children:"No labels"}),(qe.labels||[]).length>6&&c.jsxs("span",{className:"text-muted-foreground",children:["+",(qe.labels||[]).length-6," more"]}),c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{Se(qe),He(new Set((qe.labels||[]).map(kt=>kt.id))),Q(!0)},children:[c.jsx(KE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),c.jsx(dt,{children:c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(qe.taints||[]).slice(0,6).map(kt=>c.jsxs(rr,{variant:"outline",className:"gap-1",children:[kt.key,":",kt.value,kt.effect?c.jsxs("span",{className:"ml-1",children:["(",kt.effect,")"]}):null]},kt.id)),(qe.taints||[]).length===0&&c.jsx("span",{className:"text-muted-foreground",children:"No taints"}),(qe.taints||[]).length>6&&c.jsxs("span",{className:"text-muted-foreground",children:["+",(qe.taints||[]).length-6," more"]}),c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>{Se(qe),$e(new Set((qe.taints||[]).map(kt=>kt.id))),we(!0)},children:[c.jsx(KE,{className:"mr-2 h-4 w-4"}),"Manage"]})]})}),c.jsx(dt,{className:"text-right",children:c.jsxs(C$,{children:[c.jsx(A$,{asChild:!0,children:c.jsx(Pe,{size:"icon",variant:"ghost",className:"h-8 w-8",children:c.jsx(Z_,{className:"h-4 w-4"})})}),c.jsxs(O$,{align:"end",children:[c.jsxs(kp,{onClick:()=>{w(qe),h(!0)},children:[c.jsx(uc,{className:"mr-2 h-4 w-4"})," Edit"]}),c.jsxs(kp,{className:"text-red-600 focus:text-red-600",onClick:()=>{A(qe),g(!0)},children:[c.jsx(wg,{className:"mr-2 h-4 w-4"})," Delete"]})]})]})})]},qe.id)}),Ft.length===0&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:7,className:"text-muted-foreground py-10 text-center",children:"No node pools found."})})]})]})})}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit Node Pool"})}),c.jsx(mr,{...gt,children:c.jsxs("form",{className:"space-y-4",onSubmit:gt.handleSubmit(Lt),children:[c.jsx(ft,{control:gt.control,name:"name",render:({field:qe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"pool-name",...qe})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:gt.control,name:"role",render:({field:qe})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Role"}),c.jsxs(_n,{onValueChange:Bt=>gt.setValue("role",Bt,{shouldDirty:!0,shouldValidate:!0}),value:qe.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select role"})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"master",children:"master"}),c.jsx(Ct,{value:"worker",children:"worker"})]})]}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>{h(!1),w(null)},children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:gt.formState.isSubmitting,children:gt.formState.isSubmitting?"Saving…":"Save changes"})]})]})})]})}),c.jsx(dn,{open:m,onOpenChange:g,children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete node pool"})}),c.jsxs("p",{className:"text-muted-foreground text-sm",children:["This will permanently delete"," ",c.jsx("span",{className:"text-foreground font-medium",children:E?.name}),"."]}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>{g(!1),A(null)},children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>Rt.mutate(),disabled:Rt.isPending,children:Rt.isPending?"Deleting…":"Delete"})]})]})}),c.jsx(dn,{open:k,onOpenChange:R,children:c.jsxs(hn,{className:"sm:max-w-3xl",children:[c.jsx(pn,{children:c.jsxs(fn,{children:["Manage Servers",M?` — ${M.name}`:""]})}),c.jsxs("div",{className:"space-y-3",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:z,onChange:qe=>W(qe.target.value),placeholder:"Search by hostname, IP or role…",className:"pl-8"})]}),c.jsx("div",{className:"max-h-[50vh] overflow-auto rounded border",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{className:"w-[48px]"}),c.jsx(St,{children:"Hostname"}),c.jsx(St,{children:"Private IP"}),c.jsx(St,{children:"Public IP"}),c.jsx(St,{children:"Role"}),c.jsx(St,{children:"Status"})]})}),c.jsxs(Qs,{children:[(Oe.data??[]).filter(qe=>{if(M?.role&&!bve(M.role,qe.role))return!1;const Bt=z.trim().toLowerCase();return Bt?(qe.hostname??"").toLowerCase().includes(Bt)||(qe.private_ip_address??"").toLowerCase().includes(Bt)||(qe.public_ip_address??"").toLowerCase().includes(Bt)||(qe.role??"").toLowerCase().includes(Bt):!0}).map(qe=>{const Bt=qe.id,kt=F.has(Bt);return c.jsxs(Qt,{children:[c.jsx(dt,{className:"text-center align-middle",children:c.jsx("input",{type:"checkbox",className:"h-4 w-4",checked:kt,onChange:G=>{const On=new Set(F);G.target.checked?On.add(Bt):On.delete(Bt),H(On)}})}),c.jsx(dt,{className:"font-medium",children:qe.hostname||"—"}),c.jsx(dt,{children:qe.private_ip_address||"—"}),c.jsx(dt,{children:qe.public_ip_address||"—"}),c.jsx(dt,{className:"capitalize",children:qe.role||"—"}),c.jsx(dt,{children:c.jsx(Z3,{status:qe.status})})]},Bt)}),(Oe.data??[]).length===0&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:6,className:"text-muted-foreground py-8 text-center",children:Oe.isLoading?"Loading servers…":"No servers found."})})]})]})}),c.jsxs("div",{className:"text-muted-foreground text-sm",children:["Selected: ",c.jsx("span",{className:"text-foreground font-medium",children:F.size})]})]}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>{R(!1),I(null),H(new Set),K(new Set),W("")},children:"Close"}),c.jsx(Pe,{onClick:async()=>{if(!M)return;const qe=M.id,Bt=[],kt=[];for(const G of F)V.has(G)||Bt.push(G);for(const G of V)F.has(G)||kt.push(G);try{Bt.length>0&&await Na.attachNodePoolServer(qe,{server_ids:Bt});for(const G of kt)await Na.detachNodePoolServers(qe,G);await me.invalidateQueries({queryKey:["node-pools"]}),await me.invalidateQueries({queryKey:["servers"]}),Ge.success("Servers updated for node pool."),R(!1),I(null),H(new Set),K(new Set),W("")}catch(G){Ge.error(G?.message??"Failed to update servers.")}},disabled:Oe.isLoading,children:"Save changes"})]})]})}),c.jsx(RT,{open:ae,onOpenChange:qe=>{Q(qe),qe||Se(null)},title:`Manage Labels${ie?` — ${ie.name}`:""}`,items:(Ke.data??[]).map(qe=>({id:qe.id,key:qe.key,value:qe.value,name:`${qe.key}:${qe.value}`})),initialSelectedIds:Ae,columns:[{header:"Key",render:qe=>c.jsx("span",{className:"font-medium",children:qe.key})},{header:"Value",render:qe=>qe.value??"—"}],onSave:async({toAttach:qe,toDetach:Bt})=>{if(!ie)return;const kt=ie.id;try{qe.length>0&&await Na.attachNodePoolLabels(kt,{label_ids:qe});for(const G of Bt)await Na.detachNodePoolLabels(kt,G);await me.invalidateQueries({queryKey:["node-pools"]}),Ge.success("Labels updated for node pool.")}catch(G){throw Ge.error(G?.message??"Failed to update labels."),G}}}),c.jsx(RT,{open:te,onOpenChange:qe=>{de(qe),qe||Se(null)},title:`Manage Annotations${ie?` — ${ie.name}`:""}`,items:(Te.data??[]).map(qe=>({id:qe.id,key:qe.key,value:qe.value,name:`${qe.key}:${qe.value}`})),initialSelectedIds:ue,columns:[{header:"Key",render:qe=>c.jsx("span",{className:"font-medium",children:qe.key})},{header:"Value",render:qe=>qe.value??"—"}],onSave:async({toAttach:qe,toDetach:Bt})=>{if(!ie)return;const kt=ie.id;try{qe.length>0&&await Na.attachNodePoolAnnotations(kt,{annotation_ids:qe});for(const G of Bt)await Na.detachNodePoolAnnotations(kt,G);await me.invalidateQueries({queryKey:["node-pools"]}),Ge.success("Annotations updated for node pool.")}catch(G){throw Ge.error(G?.message??"Failed to update annotations."),G}}}),c.jsx(RT,{open:je,onOpenChange:qe=>{we(qe),qe||Se(null)},title:`Manage Taints${ie?` — ${ie.name}`:""}`,items:(se.data??[]).map(qe=>({id:qe.id,key:qe.key,value:qe.value,effect:qe.effect,name:`${qe.key}:${qe.value}`})),initialSelectedIds:ce,columns:[{header:"Key",render:qe=>c.jsx("span",{className:"font-medium",children:qe.key})},{header:"Value",render:qe=>qe.value??"—"},{header:"Effect",render:qe=>qe.effect??"—"}],onSave:async({toAttach:qe,toDetach:Bt})=>{if(!ie)return;const kt=ie.id;try{qe.length>0&&await Na.attachNodePoolTaints(kt,{taint_ids:qe});for(const G of Bt)await Na.detachNodePoolTaints(kt,G);await me.invalidateQueries({queryKey:["node-pools"]}),Ge.success("Taints updated for node pool.")}catch(G){throw Ge.error(G?.message??"Failed to update taints."),G}}})]})}const f0e=Is({name:Sn(),expires_in_hours:tw().int().min(1).max(43800)}),m0e=()=>{const e=CC(),r=Ms(),s=rl.get(),o=Un({enabled:!!s,queryKey:["org:keys",s],queryFn:()=>ct(()=>e.listOrgKeys({id:s}))}),u=hr({resolver:fr(f0e),defaultValues:{name:"",expires_in_hours:720}}),[h,m]=T.useState(null),g=Wt({mutationFn:w=>e.createOrgKey({id:s,handlersOrgKeyCreateReq:w}),onSuccess:w=>{r.invalidateQueries({queryKey:["org:keys",s]}),m({key:w.org_key,secret:w.org_secret}),Ge.success("Key created"),u.reset({name:"",expires_in_hours:720})},onError:w=>Ge.error(w?.message??"Failed to create key")}),b=Wt({mutationFn:w=>e.deleteOrgKey({id:s,keyId:w}),onSuccess:()=>{r.invalidateQueries({queryKey:["org:keys",s]}),Ge.success("Key deleted")},onError:w=>Ge.error(w?.message??"Failed to delete key")});return s?o.isLoading?c.jsx("p",{children:"Loading..."}):o.error?c.jsx("p",{className:"text-destructive",children:"Failed to load keys."}):c.jsxs(ya,{children:[c.jsx(ol,{children:c.jsx(ll,{children:"Org API Keys"})}),c.jsxs(ho,{className:"space-y-6",children:[c.jsx(mr,{...u,children:c.jsxs("form",{onSubmit:u.handleSubmit(w=>g.mutate(w)),className:"grid grid-cols-1 items-end gap-3 md:grid-cols-12",children:[c.jsx("div",{className:"md:col-span-6",children:c.jsx(ft,{control:u.control,name:"name",render:({field:w})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"automation-bot",...w})}),c.jsx(pt,{})]})})}),c.jsx("div",{className:"md:col-span-4",children:c.jsx(ft,{control:u.control,name:"expires_in_hours",render:({field:w})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Expires In (hours)"}),c.jsx(bt,{children:c.jsx(mt,{type:"number",placeholder:"e.g. 720",...w,value:w.value??"",onChange:E=>{const A=E.target.value;w.onChange(A===""?void 0:Number(A))}})}),c.jsx(pt,{})]})})}),c.jsx("div",{className:"md:col-span-2",children:c.jsx(Pe,{type:"submit",className:"w-full",disabled:g.isPending,children:"Create"})})]})}),c.jsx("div",{className:"overflow-x-auto rounded-md border",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Name"}),c.jsx(St,{children:"Scope"}),c.jsx(St,{children:"Created"}),c.jsx(St,{children:"Expires"}),c.jsx(St,{children:"Status"}),c.jsx(St,{className:"w-28"})]})}),c.jsxs(Qs,{children:[o.data?.map(w=>c.jsxs(Qt,{children:[c.jsx(dt,{children:w.name??"-"}),c.jsx(dt,{children:w.scope}),c.jsx(dt,{children:new Date(w.created_at).toLocaleString()}),c.jsx(dt,{children:w.expires_at?new Date(w.expires_at).toLocaleString():"-"}),c.jsx(dt,{children:(()=>{const E=w.expires_at?new Date(w.expires_at)<=new Date:!1;return w.revoked?c.jsx(rr,{variant:"destructive",className:"font-mono",children:"Revoked"}):E?c.jsx(rr,{variant:"outline",className:"font-mono",children:"Expired"}):c.jsx(rr,{variant:"secondary",className:"font-mono",children:"Active"})})()}),c.jsx(dt,{className:"text-right",children:c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>b.mutate(w.id),children:"Delete"})})]},w.id)),o.data?.length===0&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:5,className:"text-muted-foreground p-4",children:"No keys."})})]})]})}),c.jsx(dn,{open:!!h,onOpenChange:w=>!w&&m(null),children:c.jsxs(hn,{children:[c.jsx(pn,{children:c.jsx(fn,{children:"Copy your credentials"})}),c.jsxs("div",{className:"space-y-2",children:[c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground mb-1 text-xs",children:"Org Key"}),c.jsx(mt,{readOnly:!0,value:h?.key??"",onFocus:w=>w.currentTarget.select()})]}),c.jsxs("div",{children:[c.jsx("div",{className:"text-muted-foreground mb-1 text-xs",children:"Org Secret"}),c.jsx(mt,{readOnly:!0,value:h?.secret??"",onFocus:w=>w.currentTarget.select()})]}),c.jsx("p",{className:"text-muted-foreground text-xs",children:"This secret is shown once. Store it securely."})]}),c.jsx(gn,{children:c.jsx(Pe,{onClick:()=>m(null),children:"Done"})})]})})]})]}):c.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."})},g0e=Is({user_id:L6("Invalid UUID"),role:Fa(["owner","admin","member"])}),y0e=()=>{const e=CC(),r=Ms(),s=rl.get(),[o,u]=T.useState(null),h=Un({enabled:!!s,queryKey:["org:members",s],queryFn:()=>ct(()=>e.listMembers({id:s}))}),m=T.useMemo(()=>(h.data??[]).filter(k=>k.role==="owner").length,[h.data]),g=hr({resolver:fr(g0e),defaultValues:{user_id:"",role:"member"}}),b=Wt({mutationFn:k=>e.addOrUpdateMember({id:s,handlersMemberUpsertReq:k}),onSuccess:()=>{Ge.success("Member added/updated"),r.invalidateQueries({queryKey:["org:members",s]}),g.reset({user_id:"",role:"member"})},onError:k=>Ge.error(k?.message??"Failed")}),w=Wt({mutationFn:k=>e.removeMember({id:s,userId:k}),onSuccess:()=>{Ge.success("Member removed"),r.invalidateQueries({queryKey:["org:members",s]})},onError:k=>Ge.error(k?.message??"Failed")}),E=Wt({mutationFn:({userId:k,role:R})=>e.addOrUpdateMember({id:s,handlersMemberUpsertReq:{user_id:k,role:R}}),onMutate:async({userId:k,role:R})=>{u(k),await r.cancelQueries({queryKey:["org:members",s]});const M=r.getQueryData(["org:members",s]);return r.setQueryData(["org:members",s],(I=[])=>I.map(F=>F.user_id===k?{...F,role:R}:F)),{prev:M}},onError:(k,R,M)=>{M?.prev&&r.setQueryData(["org:members",s],M.prev),Ge.error(k?.message??"Failed to update role")},onSuccess:()=>{Ge.success("Role updated")},onSettled:()=>{u(null),r.invalidateQueries({queryKey:["org:members",s]})}}),A=k=>!(k.role==="owner"&&m<=1);return s?h.isLoading?c.jsx("p",{children:"Loading..."}):h.error?c.jsx("p",{className:"text-destructive",children:"Failed to load members."}):c.jsxs(ya,{children:[c.jsx(ol,{children:c.jsx(ll,{children:"Members"})}),c.jsxs(ho,{className:"space-y-6",children:[c.jsx(mr,{...g,children:c.jsxs("form",{className:"grid grid-cols-1 items-end gap-3 md:grid-cols-12",onSubmit:g.handleSubmit(k=>b.mutate(k)),children:[c.jsx("div",{className:"md:col-span-6",children:c.jsx(ft,{control:g.control,name:"user_id",render:({field:k})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"User ID"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"UUID",...k})}),c.jsx(pt,{})]})})}),c.jsx("div",{className:"md:col-span-4",children:c.jsx(ft,{control:g.control,name:"role",render:({field:k})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Role"}),c.jsxs(_n,{onValueChange:k.onChange,value:k.value,children:[c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select role"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"member",children:"member"}),c.jsx(Ct,{value:"admin",children:"admin"}),c.jsx(Ct,{value:"owner",children:"owner"})]})]}),c.jsx(pt,{})]})})}),c.jsx("div",{className:"md:col-span-2",children:c.jsx(Pe,{type:"submit",className:"w-full",disabled:b.isPending,children:"Save"})})]})}),c.jsx("div",{className:"overflow-x-auto rounded-md border",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Id"}),c.jsx(St,{children:"User"}),c.jsx(St,{children:"Role"}),c.jsx(St,{className:"w-28"})]})}),c.jsxs(Qs,{children:[h.data?.map(k=>{const R=o===k.user_id;return c.jsxs(Qt,{className:"align-middle",children:[c.jsx(dt,{className:"font-mono text-xs",children:k.user_id}),c.jsx(dt,{children:k.email}),c.jsx(dt,{className:"capitalize",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs(_n,{value:k.role,onValueChange:M=>{if(k.role!==M){if(k.role==="owner"&&M!=="owner"&&!A(k)){Ge.error("You cannot demote the last owner.");return}E.mutate({userId:k.user_id,role:M})}},disabled:R,children:[c.jsx(Nn,{className:"h-8 w-[140px]",children:c.jsx($n,{})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"member",children:"member"}),c.jsx(Ct,{value:"admin",children:"admin"}),c.jsx(Ct,{value:"owner",children:"owner"})]})]}),R&&c.jsx(ys,{className:"h-4 w-4 animate-spin"})]})}),c.jsx(dt,{className:"text-right",children:c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>w.mutate(k.user_id),disabled:k.role==="owner"&&m<=1,title:k.role==="owner"&&m<=1?"Cannot remove the last owner":"",children:"Remove"})})]},k.user_id)}),h.data?.length===0&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:3,className:"text-muted-foreground p-4",children:"No members."})})]})]})})]})]}):c.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."})},v0e=Is({name:Sn().min(1,"Required"),domain:Sn().optional()}),x0e=()=>{const e=CC(),r=Ms(),s=rl.get(),o=Un({enabled:!!s,queryKey:["org",s],queryFn:()=>ct(()=>e.getOrg({id:s}))}),u=hr({resolver:fr(v0e),defaultValues:{name:"",domain:""}});T.useEffect(()=>{o.data&&u.reset({name:o.data.name??"",domain:o.data.domain??""})},[o.data,u]);const h=Wt({mutationFn:b=>e.updateOrg({id:s,handlersOrgUpdateReq:b}),onSuccess:()=>{r.invalidateQueries({queryKey:["org",s]}),Ge.success("Organization updated")},onError:b=>Ge.error(b?.message??"Update failed")}),m=Wt({mutationFn:()=>e.deleteOrg({id:s}),onSuccess:()=>{Ge.success("Organization deleted"),rl.set(""),r.invalidateQueries({queryKey:["orgs:mine"]})},onError:b=>Ge.error(b?.message??"Delete failed")});if(!s)return c.jsx("p",{className:"text-muted-foreground",children:"Pick an organization."});if(o.isLoading)return c.jsx("p",{children:"Loading..."});if(o.error)return c.jsx("p",{className:"text-destructive",children:"Failed to load."});const g=b=>{const w={};b.name!==o.data?.name&&(w.name=b.name);const E=b.domain?.trim()||void 0;(E??null)!==(o.data?.domain??null)&&(w.domain=E),Object.keys(w).length!==0&&h.mutate(w)};return c.jsxs(ya,{children:[c.jsx(ol,{children:c.jsx(ll,{children:"Organization Settings"})}),c.jsx(ho,{className:"space-y-6",children:c.jsx(mr,{...u,children:c.jsxs("form",{className:"space-y-4",onSubmit:u.handleSubmit(g),children:[c.jsx(ft,{control:u.control,name:"name",render:({field:b})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{...b})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:u.control,name:"domain",render:({field:b})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Domain (optional)"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"acme.com",...b})}),c.jsx(pt,{})]})}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Pe,{type:"submit",disabled:h.isPending,children:"Save"}),c.jsx(Pe,{type:"button",variant:"destructive",onClick:()=>m.mutate(),disabled:m.isPending,children:"Delete Org"})]})]})})})]})},vj=Ate();function b0e(){const e=Xs.getAccessToken(),r=rl.get();return{...e?{Authorization:`Bearer ${e}`}:{},...r?{"X-Org-ID":r}:{}}}async function TT(e,r={}){return fetch(e,{...r,headers:{...r.headers,...b0e()},credentials:"include"})}const rg={listSshKeys:()=>ct(async()=>await vj.listPublicSshKeys()),createSshKey:e=>ct(async()=>await vj.createSSHKey({dtoCreateSSHRequest:e})),getSshKeyById:e=>ct(async()=>await vj.getSSHKey({id:e})),revealSshKeyById:e=>ct(async()=>{const r=new URL(`/api/v1/ssh/${e}`,window.location.origin);r.searchParams.set("reveal","true");const s=await TT(r.toString());if(!s.ok)throw new Error(`Failed to reveal key: ${s.statusText}`);return await s.json()}),deleteSshKey:e=>ct(async()=>{await vj.deleteSSHKey({id:e})}),downloadJson:(e,r)=>ct(async()=>{const s=new URL(`/api/v1/ssh/${e}/download`,window.location.origin);s.searchParams.set("part",r),s.searchParams.set("mode","json");const o=await TT(s.toString());if(!o.ok)throw new Error(`Download failed: ${o.statusText}`);return await o.json()}),downloadBlob:(e,r)=>ct(async()=>{const s=new URL(`/api/v1/ssh/${e}/download`,window.location.origin);s.searchParams.set("part",r);const o=await TT(s.toString());if(!o.ok)throw new Error(`Download failed: ${o.statusText}`);const u=o.headers.get("Content-Disposition")||"",m=/filename="([^"]+)"/i.exec(u)?.[1]??"ssh-key-download",g=await o.blob();return{filename:m,blob:g}})},xj=43200,J3=1440,W3=Symbol.for("constructDateFrom");function k$(e,r){return typeof e=="function"?e(r):e&&typeof e=="object"&&W3 in e?e[W3](r):e instanceof Date?new e.constructor(r):new Date(r)}function Xd(e,r){return k$(e,e)}let w0e={};function S0e(){return w0e}function Q3(e){const r=Xd(e),s=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return s.setUTCFullYear(r.getFullYear()),+e-+s}function R$(e,...r){const s=k$.bind(null,e||r.find(o=>typeof o=="object"));return r.map(s)}function Tj(e,r){const s=+Xd(e)-+Xd(r);return s<0?-1:s>0?1:s}function E0e(e){return k$(e,Date.now())}function j0e(e,r,s){const[o,u]=R$(s?.in,e,r),h=o.getFullYear()-u.getFullYear(),m=o.getMonth()-u.getMonth();return h*12+m}function C0e(e){return r=>{const o=(e?Math[e]:Math.trunc)(r);return o===0?0:o}}function A0e(e,r){return+Xd(e)-+Xd(r)}function O0e(e,r){const s=Xd(e);return s.setHours(23,59,59,999),s}function k0e(e,r){const s=Xd(e),o=s.getMonth();return s.setFullYear(s.getFullYear(),o+1,0),s.setHours(23,59,59,999),s}function R0e(e,r){const s=Xd(e);return+O0e(s)==+k0e(s)}function T0e(e,r,s){const[o,u,h]=R$(s?.in,e,e,r),m=Tj(u,h),g=Math.abs(j0e(u,h));if(g<1)return 0;u.getMonth()===1&&u.getDate()>27&&u.setDate(30),u.setMonth(u.getMonth()-m*g);let b=Tj(u,h)===-m;R0e(o)&&g===1&&Tj(o,h)===1&&(b=!1);const w=m*(g-+b);return w===0?0:w}function _0e(e,r,s){const o=A0e(e,r)/1e3;return C0e(s?.roundingMethod)(o)}const $0e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},N0e=(e,r,s)=>{let o;const u=$0e[e];return typeof u=="string"?o=u:r===1?o=u.one:o=u.other.replace("{{count}}",r.toString()),s?.addSuffix?s.comparison&&s.comparison>0?"in "+o:o+" ago":o};function _T(e){return(r={})=>{const s=r.width?String(r.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}const D0e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},P0e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},M0e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},I0e={date:_T({formats:D0e,defaultWidth:"full"}),time:_T({formats:P0e,defaultWidth:"full"}),dateTime:_T({formats:M0e,defaultWidth:"full"})},z0e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},L0e=(e,r,s,o)=>z0e[e];function bb(e){return(r,s)=>{const o=s?.context?String(s.context):"standalone";let u;if(o==="formatting"&&e.formattingValues){const m=e.defaultFormattingWidth||e.defaultWidth,g=s?.width?String(s.width):m;u=e.formattingValues[g]||e.formattingValues[m]}else{const m=e.defaultWidth,g=s?.width?String(s.width):e.defaultWidth;u=e.values[g]||e.values[m]}const h=e.argumentCallback?e.argumentCallback(r):r;return u[h]}}const F0e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},q0e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},B0e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},U0e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},K0e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},V0e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},H0e=(e,r)=>{const s=Number(e),o=s%100;if(o>20||o<10)switch(o%10){case 1:return s+"st";case 2:return s+"nd";case 3:return s+"rd"}return s+"th"},G0e={ordinalNumber:H0e,era:bb({values:F0e,defaultWidth:"wide"}),quarter:bb({values:q0e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bb({values:B0e,defaultWidth:"wide"}),day:bb({values:U0e,defaultWidth:"wide"}),dayPeriod:bb({values:K0e,defaultWidth:"wide",formattingValues:V0e,defaultFormattingWidth:"wide"})};function wb(e){return(r,s={})=>{const o=s.width,u=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],h=r.match(u);if(!h)return null;const m=h[0],g=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],b=Array.isArray(g)?Y0e(g,A=>A.test(m)):X0e(g,A=>A.test(m));let w;w=e.valueCallback?e.valueCallback(b):b,w=s.valueCallback?s.valueCallback(w):w;const E=r.slice(m.length);return{value:w,rest:E}}}function X0e(e,r){for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&r(e[s]))return s}function Y0e(e,r){for(let s=0;s<e.length;s++)if(r(e[s]))return s}function Z0e(e){return(r,s={})=>{const o=r.match(e.matchPattern);if(!o)return null;const u=o[0],h=r.match(e.parsePattern);if(!h)return null;let m=e.valueCallback?e.valueCallback(h[0]):h[0];m=s.valueCallback?s.valueCallback(m):m;const g=r.slice(u.length);return{value:m,rest:g}}}const J0e=/^(\d+)(th|st|nd|rd)?/i,W0e=/\d+/i,Q0e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},eSe={any:[/^b/i,/^(a|c)/i]},tSe={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nSe={any:[/1/i,/2/i,/3/i,/4/i]},rSe={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},sSe={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},iSe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},aSe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},oSe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},lSe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},cSe={ordinalNumber:Z0e({matchPattern:J0e,parsePattern:W0e,valueCallback:e=>parseInt(e,10)}),era:wb({matchPatterns:Q0e,defaultMatchWidth:"wide",parsePatterns:eSe,defaultParseWidth:"any"}),quarter:wb({matchPatterns:tSe,defaultMatchWidth:"wide",parsePatterns:nSe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wb({matchPatterns:rSe,defaultMatchWidth:"wide",parsePatterns:sSe,defaultParseWidth:"any"}),day:wb({matchPatterns:iSe,defaultMatchWidth:"wide",parsePatterns:aSe,defaultParseWidth:"any"}),dayPeriod:wb({matchPatterns:oSe,defaultMatchWidth:"any",parsePatterns:lSe,defaultParseWidth:"any"})},uSe={code:"en-US",formatDistance:N0e,formatLong:I0e,formatRelative:L0e,localize:G0e,match:cSe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dSe(e,r,s){const o=S0e(),u=s?.locale??o.locale??uSe,h=2520,m=Tj(e,r);if(isNaN(m))throw new RangeError("Invalid time value");const g=Object.assign({},s,{addSuffix:s?.addSuffix,comparison:m}),[b,w]=R$(s?.in,...m>0?[r,e]:[e,r]),E=_0e(w,b),A=(Q3(w)-Q3(b))/1e3,k=Math.round((E-A)/60);let R;if(k<2)return s?.includeSeconds?E<5?u.formatDistance("lessThanXSeconds",5,g):E<10?u.formatDistance("lessThanXSeconds",10,g):E<20?u.formatDistance("lessThanXSeconds",20,g):E<40?u.formatDistance("halfAMinute",0,g):E<60?u.formatDistance("lessThanXMinutes",1,g):u.formatDistance("xMinutes",1,g):k===0?u.formatDistance("lessThanXMinutes",1,g):u.formatDistance("xMinutes",k,g);if(k<45)return u.formatDistance("xMinutes",k,g);if(k<90)return u.formatDistance("aboutXHours",1,g);if(k<J3){const M=Math.round(k/60);return u.formatDistance("aboutXHours",M,g)}else{if(k<h)return u.formatDistance("xDays",1,g);if(k<xj){const M=Math.round(k/J3);return u.formatDistance("xDays",M,g)}else if(k<xj*2)return R=Math.round(k/xj),u.formatDistance("aboutXMonths",R,g)}if(R=T0e(w,b),R<12){const M=Math.round(k/xj);return u.formatDistance("xMonths",M,g)}else{const M=R%12,I=Math.trunc(R/12);return M<3?u.formatDistance("aboutXYears",I,g):M<9?u.formatDistance("overXYears",I,g):u.formatDistance("almostXYears",I+1,g)}}function hSe(e,r){return dSe(e,E0e(e),r)}const _B=["master","worker","bastion"],_j=["pending","provisioning","ready","failed"],$B=Is({hostname:Sn().trim().max(60,"Max 60 chars"),public_ip_address:Sn().trim().optional().or(nw("")),private_ip_address:Sn().trim().min(1,"Private IP address required"),role:Fa(_B),ssh_key_id:L6("Pick a valid SSH key"),ssh_user:Sn().trim().min(1,"SSH user is required"),status:Fa(_j).default("pending")}).refine(e=>e.role!=="bastion"||e.public_ip_address&&e.public_ip_address.trim()!=="",{message:"Public IP required for bastion",path:["public_ip_address"]}),pSe=$B.partial();function fSe({status:e}){const r=e==="ready"?"default":e==="provisioning"?"secondary":e==="failed"?"destructive":"outline";return c.jsx(rr,{variant:r,className:"capitalize",children:e})}const mSe=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(null),[b,w]=T.useState(""),[E,A]=T.useState(""),[k,R]=T.useState(null),M=Ms(),I=Un({queryKey:["servers"],queryFn:()=>mg.listServers()}),F=Un({queryKey:["ssh_keys"],queryFn:()=>rg.listSshKeys()}),H=T.useMemo(()=>{const me=new Map;for(const Xe of F.data??[]){const Oe=Xe.name?Xe.name:"Unnamed key",Te=Xe.fingerprint?za(Xe.fingerprint,8):"";me.set(Xe.id,Te?`${Oe} — ${Te}`:Oe)}return me},[F.data]),V=hr({resolver:fr($B),defaultValues:{hostname:"",private_ip_address:"",public_ip_address:"",role:"worker",ssh_key_id:"",ssh_user:"",status:"pending"},mode:"onChange"}),z=pg({control:V.control,name:"role"})==="bastion",ae=pg({control:V.control,name:"public_ip_address"})?.trim()??"",Q=z&&ae==="",te=Wt({mutationFn:me=>mg.createServer(me),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),V.reset(),o(!1),Ge.success("Server created successfully")},onError:me=>{Ge.error(me?.message??"Failed to create server")}}),de=hr({resolver:fr(pSe),defaultValues:{},mode:"onChange"}),je=pg({control:de.control,name:"role"}),we=pg({control:de.control,name:"public_ip_address"}),ie=je==="bastion",Se=we?.trim()??"",Ae=ie&&Se==="",He=Wt({mutationFn:({id:me,values:Xe})=>mg.updateServer(me,Xe),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),h(!1),R(null),Ge.success("Server updated successfully")},onError:me=>{Ge.error(me?.message??"Failed to update server")}}),ue=Wt({mutationFn:me=>mg.deleteServer(me),onSuccess:async()=>{await M.invalidateQueries({queryKey:["servers"]}),g(null),Ge.success("Server deleted successfully")},onError:me=>{Ge.error(me?.message??"Failed to delete server")}}),ne=T.useMemo(()=>{const me=I.data??[],Xe=e.trim().toLowerCase(),Oe=Xe?me.filter(se=>se.hostname?.toLowerCase().includes(Xe)||se.public_ip_address?.toLowerCase().includes(Xe)||se.private_ip_address?.toLowerCase().includes(Xe)||se.role?.toLowerCase().includes(Xe)||se.ssh_user?.toLowerCase().includes(Xe)):me,Te=E?Oe.filter(se=>se.role===E):Oe;return b?Te.filter(se=>se.status===b):Te},[e,E,b,I.data]),ce=me=>{te.mutate(me)},$e=me=>{R(me.id),de.reset({hostname:me.hostname??"",public_ip_address:me.public_ip_address??"",private_ip_address:me.private_ip_address??"",role:me.role??"worker",ssh_key_id:me.ssh_key_id??"",ssh_user:me.ssh_user??"",status:me.status??"pending"}),h(!0)};return F.data?.length===0?c.jsx("div",{className:"p-6",children:"Please create an SSH key for your organization first."}):I.isLoading?c.jsx("div",{className:"p-6",children:"Loading servers…"}):I.error?c.jsx("div",{className:"p-6 text-red-500",children:"Error loading servers."}):c.jsxs(cw,{children:[c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Servers"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:me=>r(me.target.value),placeholder:"Search hostname, Public IP, Private IP, role, user…",className:"w-64 pl-8"})]}),c.jsxs(_n,{value:E||"all",onValueChange:me=>A(me==="all"?"":me),children:[c.jsx(Nn,{className:"w-36",children:c.jsx($n,{placeholder:"Role (all)"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"all",children:"All roles"}),_B.map(me=>c.jsx(Ct,{value:me,children:me},me))]})]}),c.jsxs(_n,{value:b||"all",onValueChange:me=>w(me==="all"?"":me),children:[c.jsx(Nn,{className:"w-40",children:c.jsx($n,{placeholder:"Status (all)"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"all",children:"All statuses"})," ",_j.map(me=>c.jsx(Ct,{value:me,children:me},me))]})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create Server"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create server"})}),c.jsx(mr,{...V,children:c.jsxs("form",{className:"space-y-4",onSubmit:V.handleSubmit(ce),children:[c.jsx(ft,{control:V.control,name:"hostname",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Hostname"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"worker-01",...me})}),c.jsx(pt,{})]})}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsx(ft,{control:V.control,name:"public_ip_address",render:({field:me})=>c.jsxs(ot,{children:[c.jsxs(lt,{className:"flex items-center justify-between",children:[c.jsx("span",{children:"Public IP Address"}),c.jsx("span",{className:vt("rounded-full px-2 py-0.5 text-xs",z?"bg-amber-100 text-amber-900":"bg-muted text-muted-foreground"),children:z?"Required for bastion":"Optional"})]}),c.jsx(bt,{children:c.jsx(mt,{placeholder:z?"Required for bastion (e.g. 34.12.56.78)":"34.12.56.78","aria-required":z,"aria-invalid":Q||!!V.formState.errors.public_ip_address,required:z,...me,className:vt(Q&&"border-destructive focus-visible:ring-destructive")})}),z&&c.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:["Bastion nodes must have a"," ",c.jsx("span",{className:"font-medium",children:"Public IP"}),"."]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:V.control,name:"private_ip_address",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Private IP Address"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"192.168.10.1",...me})}),c.jsx(pt,{})]})})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsx(ft,{control:V.control,name:"role",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Role"}),c.jsxs(_n,{onValueChange:Xe=>V.setValue("role",Xe,{shouldDirty:!0,shouldValidate:!0}),value:me.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select role"})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"master",children:"master"}),c.jsx(Ct,{value:"worker",children:"worker"}),c.jsx(Ct,{value:"bastion",children:"bastion — requires Public IP"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:V.control,name:"ssh_user",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"SSH user"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"ubuntu",...me})}),c.jsx(pt,{})]})})]}),c.jsx(ft,{control:V.control,name:"ssh_key_id",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"SSH key"}),c.jsxs(_n,{onValueChange:me.onChange,value:me.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:F.data?.length?"Select SSH key":"No SSH keys found"})})}),c.jsx(Dn,{children:F.data.map(Xe=>c.jsxs(Ct,{value:Xe.id,children:[Xe.name?Xe.name:"Unnamed key"," —"," ",za(Xe.fingerprint,8)]},Xe.id))})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:V.control,name:"status",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Initial status"}),c.jsxs(_n,{onValueChange:me.onChange,value:me.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"pending"})})}),c.jsx(Dn,{children:_j.map(Xe=>c.jsx(Ct,{value:Xe,children:Xe},Xe))})]}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:te.isPending||V.formState.isSubmitting||!V.formState.isValid,children:te.isPending?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Hostname"}),c.jsx(St,{children:"IP address"}),c.jsx(St,{children:"Role"}),c.jsx(St,{children:"SSH user"}),c.jsx(St,{children:"SSH key"}),c.jsx(St,{children:"Status"}),c.jsx(St,{children:"Created"}),c.jsx(St,{className:"w-[220px] text-right",children:"Actions"})]})}),c.jsx(Qs,{children:ne.length===0?c.jsx(Qt,{children:c.jsx(dt,{colSpan:8,className:"text-muted-foreground py-10 text-center text-sm",children:"No servers found."})}):ne.map(me=>c.jsxs(Qt,{children:[c.jsx(dt,{className:"font-medium",children:me.hostname}),c.jsx(dt,{children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("span",{className:vt("tabular-nums",!me.public_ip_address&&"text-muted-foreground"),children:me.public_ip_address||"—"}),c.jsx("span",{className:"text-muted-foreground tabular-nums",children:me.private_ip_address})]})}),c.jsx(dt,{className:"capitalize",children:c.jsx("span",{className:vt(me.role==="bastion"&&"rounded bg-amber-50 px-2 py-0.5 dark:bg-amber-900"),children:me.role})}),c.jsx(dt,{className:"tabular-nums",children:me.ssh_user}),c.jsx(dt,{className:"truncate",children:H.get(me.ssh_key_id)??"—"}),c.jsx(dt,{children:c.jsx(fSe,{status:me.status??"pending"})}),c.jsx(dt,{title:me.created_at,children:me.created_at?`${hSe(new Date(me.created_at),{addSuffix:!0})}`:"—"}),c.jsx(dt,{className:"text-right",children:c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>$e(me),children:"Edit"}),c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>g(me.id),disabled:ue.isPending&&m===me.id,children:ue.isPending&&m===me.id?"Deleting…":"Delete"})]})})]},me.id))})]})})})]}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit server"})}),c.jsx(mr,{...de,children:c.jsxs("form",{className:"space-y-4",onSubmit:de.handleSubmit(me=>{k&&He.mutate({id:k,values:me})}),children:[c.jsx(ft,{control:de.control,name:"hostname",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Hostname"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"worker-01",...me})}),c.jsx(pt,{})]})}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsx(ft,{control:de.control,name:"public_ip_address",render:({field:me})=>c.jsxs(ot,{children:[c.jsxs(lt,{className:"flex items-center justify-between",children:[c.jsx("span",{children:"Public IP Address"}),c.jsx("span",{className:vt("rounded-full px-2 py-0.5 text-xs",ie?"bg-amber-100 text-amber-900":"bg-muted text-muted-foreground"),children:ie?"Required for bastion":"Optional"})]}),c.jsx(bt,{children:c.jsx(mt,{placeholder:ie?"Required for bastion (e.g. 34.12.56.78)":"34.12.56.78","aria-required":ie,"aria-invalid":Ae||!!de.formState.errors.public_ip_address,required:ie,...me,className:vt(Ae&&"border-destructive focus-visible:ring-destructive")})}),ie&&c.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 p-2 text-xs text-amber-900",children:["Bastion nodes must have a ",c.jsx("span",{className:"font-medium",children:"Public IP"}),"."]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:de.control,name:"private_ip_address",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Private IP Address"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"192.168.10.1",...me})}),c.jsx(pt,{})]})})]}),c.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[c.jsx(ft,{control:de.control,name:"role",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Role"}),c.jsxs(_n,{onValueChange:Xe=>de.setValue("role",Xe,{shouldDirty:!0,shouldValidate:!0}),value:me.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select role"})})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"master",children:"master"}),c.jsx(Ct,{value:"worker",children:"worker"}),c.jsx(Ct,{value:"bastion",children:"bastion — requires Public IP"})]})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:de.control,name:"ssh_user",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"SSH user"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"ubuntu",...me})}),c.jsx(pt,{})]})})]}),c.jsx(ft,{control:de.control,name:"ssh_key_id",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"SSH key"}),c.jsxs(_n,{onValueChange:me.onChange,value:me.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select SSH key"})})}),c.jsx(Dn,{children:F.data.map(Xe=>c.jsxs(Ct,{value:Xe.id,children:[Xe.name?Xe.name:"Unnamed key"," — ",za(Xe.fingerprint,8)]},Xe.id))})]}),c.jsx(pt,{})]})}),c.jsx(ft,{control:de.control,name:"status",render:({field:me})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Status"}),c.jsxs(_n,{onValueChange:me.onChange,value:me.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"pending"})})}),c.jsx(Dn,{children:_j.map(Xe=>c.jsx(Ct,{value:Xe,children:Xe},Xe))})]}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:He.isPending,children:He.isPending?"Saving…":"Save changes"})]})]})})]})}),c.jsx(dn,{open:!!m,onOpenChange:me=>!me&&g(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete server"})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this server?"}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>m&&ue.mutate(m),disabled:ue.isPending,children:ue.isPending?"Deleting…":"Delete"})]})]})})]})},gSe=Is({name:Sn().trim().min(1,"Name is required").max(100,"Max 100 characters"),comment:Sn().trim().min(1,"Comment is required").max(100,"Max 100 characters"),bits:Fa(["2048","3072","4096"]).optional(),type:Fa(["rsa","ed25519"]).optional()});function ySe(e,r){const s=URL.createObjectURL(e),o=document.createElement("a");o.href=s,o.download=r,document.body.appendChild(o),o.click(),o.remove(),URL.revokeObjectURL(s)}function $T(e,r="Copied"){navigator.clipboard.writeText(e).then(()=>Ge.success(r)).catch(()=>Ge.error("Copy failed"))}function vSe(e){return e?.split(/\s+/)?.[0]??"ssh-key"}const xSe=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(null),[m,g]=T.useState(null),b=Ms(),w=Un({queryKey:["ssh"],queryFn:()=>rg.listSshKeys()}),E=hr({resolver:fr(gSe),defaultValues:{name:"",comment:"",type:"rsa",bits:"4096"}}),A=pg({control:E.control,name:"type"}),k=Wt({mutationFn:async F=>{const H={name:F.name,comment:F.comment,bits:F.type==="rsa"&&F.bits?Number(F.bits):void 0,type:F.type};return await rg.createSshKey(H)},onSuccess:()=>{b.invalidateQueries({queryKey:["ssh"]}),o(!1),E.reset({name:"",comment:"",type:"rsa",bits:"4096"}),Ge.success("SSH Key created")},onError:F=>Ge.error(F?.message??"SSH Key creation failed")}),R=Wt({mutationFn:F=>rg.revealSshKeyById(F),onSuccess:F=>h(F),onError:F=>Ge.error(F?.message??"Failed to reveal key")}),M=Wt({mutationFn:F=>rg.deleteSshKey(F),onSuccess:async()=>{await b.invalidateQueries({queryKey:["ssh"]}),g(null),Ge.success("SSH Key deleted")},onError:F=>Ge.error(F?.message??"Delete failed")}),I=T.useMemo(()=>{const F=e.trim().toLowerCase();return F?(w.data??[]).filter(H=>H.name?.toLowerCase().includes(F)||H.fingerprint?.toLowerCase().includes(F)||H.public_key?.toLowerCase().includes(F)):w.data??[]},[e,w.data]);return w.isLoading?c.jsx("div",{className:"p-6",children:"Loading SSH Keys…"}):w.error?c.jsx("div",{className:"p-6 text-red-500",children:"Error Loading SSH Keys"}):c.jsx(cw,{children:c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"flex items-center justify-between gap-3",children:[c.jsx("h1",{className:"text-2xl font-bold",children:"SSH Keys"}),c.jsx("div",{className:"w-full max-w-sm",children:c.jsx(mt,{value:e,onChange:F=>r(F.target.value),placeholder:"Search by name, fingerprint or key"})}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"}),"Create New Keypair"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create SSH Keypair"})}),c.jsx(mr,{...E,children:c.jsxs("form",{onSubmit:E.handleSubmit(F=>k.mutate(F)),className:"space-y-4",children:[c.jsx(ft,{control:E.control,name:"name",render:({field:F})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Name"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"e.g., CI deploy key",...F})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:E.control,name:"comment",render:({field:F})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Comment"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"e.g., deploy@autoglue",...F})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:E.control,name:"type",render:({field:F})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Type"}),c.jsx(bt,{children:c.jsxs(_n,{value:F.value,onValueChange:H=>{F.onChange(H),H==="ed25519"?E.setValue("bits",void 0):E.setValue("bits","4096")},children:[c.jsx(Nn,{className:"w-[180px]",children:c.jsx($n,{placeholder:"Select a ssh key type"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"rsa",children:"RSA"}),c.jsx(Ct,{value:"ed25519",children:"ED25519"})]})]})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:E.control,name:"bits",render:({field:F})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Key size"}),c.jsx(bt,{children:c.jsxs(_n,{value:F.value,disabled:A==="ed25519",onValueChange:F.onChange,children:[c.jsx(Nn,{className:"w-[180px]",children:c.jsx($n,{placeholder:"RSA only"})}),c.jsxs(Dn,{children:[c.jsx(Ct,{value:"2048",children:"2048"}),c.jsx(Ct,{value:"3072",children:"3072"}),c.jsx(Ct,{value:"4096",children:"4096"})]})]})}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),disabled:k.isPending,children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:k.isPending,children:k.isPending?c.jsxs(c.Fragment,{children:[c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating…"]}):"Create"})]})]})})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Name"}),c.jsx(St,{children:"Public Key"}),c.jsx(St,{children:"Fingerprint"}),c.jsx(St,{children:"Created"}),c.jsx(St,{className:"w-[160px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[I.map(F=>{const H=vSe(F.public_key);return c.jsxs(Qt,{children:[c.jsx(dt,{className:"font-medium",children:F.name||"—"}),c.jsx(dt,{children:c.jsxs(Uj,{children:[c.jsx(Kj,{asChild:!0,children:c.jsx(rr,{variant:"secondary",className:"whitespace-nowrap",children:H})}),c.jsx(Vj,{className:"max-w-[70vw]",children:c.jsx("div",{className:"max-w-full",children:c.jsx("p",{className:"font-mono text-xs break-all",children:F.public_key})})})]})}),c.jsx(dt,{className:"font-mono text-xs",children:F.fingerprint}),c.jsx(dt,{children:F.created_at?new Date(F.created_at).toLocaleString(void 0,{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"}):"—"}),c.jsxs(dt,{className:"space-x-2 text-right",children:[c.jsx(Pe,{size:"sm",variant:"outline",onClick:()=>$T(F.public_key??"","Public key copied"),children:"Copy Pub"}),c.jsx(Pe,{size:"sm",variant:"outline",onClick:()=>$T(F.fingerprint??"","Fingerprint copied"),children:"Copy FP"}),c.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>R.mutate(F.id),children:[c.jsx(LT,{className:"mr-1 h-4 w-4"}),"Reveal"]}),c.jsxs(Pe,{size:"sm",variant:"outline",onClick:async()=>{try{const{filename:V,blob:K}=await rg.downloadBlob(F.id,"both");ySe(K,V)}catch(V){Ge.error(V?.message??"Download failed")}},children:[c.jsx(nJ,{className:"mr-1 h-4 w-4"}),"Download"]}),c.jsxs(Pe,{size:"sm",variant:"destructive",onClick:()=>g(F.id),children:[c.jsx(wg,{className:"mr-1 h-4 w-4"}),"Delete"]})]})]},F.id)}),I.length===0&&c.jsx(Qt,{children:c.jsx(dt,{colSpan:5,className:"text-muted-foreground py-10 text-center",children:"No SSH Keys"})})]})]})})}),c.jsx(dn,{open:!!u,onOpenChange:F=>!F&&h(null),children:c.jsxs(hn,{className:"sm:max-w-2xl",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Private Key (read-only)"})}),c.jsx("div",{className:"space-y-3",children:c.jsxs("div",{className:"text-sm",children:[c.jsx("div",{className:"font-medium",children:u?.name??"SSH key"}),c.jsx("div",{className:"text-muted-foreground font-mono text-xs",children:u?.fingerprint}),c.jsx(nl,{readOnly:!0,className:"h-64 w-full rounded-md border p-3 font-mono text-xs",value:u?.private_key??""}),c.jsx("div",{className:"flex justify-end",children:c.jsx(Pe,{onClick:()=>u?.private_key&&$T(u.private_key,"Private key copied"),children:"Copy"})})]})})]})}),c.jsx(dn,{open:!!m,onOpenChange:F=>!F&&g(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete SSH Key"})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This will permanently delete the keypair. This action cannot be undone."}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>m&&M.mutate(m),disabled:M.isPending,children:M.isPending?c.jsxs(c.Fragment,{children:[c.jsx(ys,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting…"]}):"Delete"})]})]})})]})})},F_=["NoSchedule","PreferNoSchedule","NoExecute"],NB=Is({key:Sn().trim().min(1,"Key is required").max(120,"Max 120 chars"),value:Sn().trim().optional(),effect:Fa(F_)}),bSe=NB.partial();function wSe({t:e}){const r=`${e.key}${e.value?`=${e.value}`:""}${e.effect?`:${e.effect}`:""}`;return c.jsxs(rr,{variant:"secondary",className:"font-mono text-xs",children:[c.jsx(jC,{className:"mr-1 h-3 w-3"}),r]})}const SSe=()=>{const[e,r]=T.useState(""),[s,o]=T.useState(!1),[u,h]=T.useState(!1),[m,g]=T.useState(null),[b,w]=T.useState(null),E=Ms(),A=Un({queryKey:["taints"],queryFn:()=>Ib.listTaints()}),k=hr({resolver:fr(NB),defaultValues:{key:"",value:"",effect:void 0}}),R=Wt({mutationFn:z=>Ib.createTaint(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["taints"]}),k.reset(),o(!1),Ge.success("Taint Created Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while creating Taint")}}),M=z=>{R.mutate(z)},I=hr({resolver:fr(bSe),defaultValues:{}}),F=Wt({mutationFn:({id:z,values:W})=>Ib.updateTaint(z,W),onSuccess:async()=>{await E.invalidateQueries({queryKey:["taints"]}),I.reset(),h(!1),Ge.success("Taint Updated Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while updating Taint")}}),H=z=>{w(z.id),I.reset({key:z.key,value:z.value,effect:z.effect}),h(!0)},V=Wt({mutationFn:z=>Ib.deleteTaint(z),onSuccess:async()=>{await E.invalidateQueries({queryKey:["taints"]}),g(null),Ge.success("Taint Deleted Successfully.")},onError:z=>{Ge.error(z.message??"There was an error while deleting Taint")}}),K=T.useMemo(()=>{const z=A.data??[],W=e.trim().toLowerCase();return W?z.filter(ae=>ae.key?.toLowerCase().includes(W)||ae.value?.toLowerCase().includes(W)||ae.effect?.toLowerCase().includes(W)):z},[e,A.data]);return A.isLoading?c.jsx("div",{className:"p-6",children:"Loading taints…"}):A.error?c.jsx("div",{className:"p-6 text-red-500",children:"Error loading taints."}):c.jsxs("div",{className:"space-y-4 p-6",children:[c.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[c.jsx("h1",{className:"mb-4 text-2xl font-bold",children:"Taints"}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsxs("div",{className:"relative",children:[c.jsx(va,{className:"absolute top-2.5 left-2 h-4 w-4 opacity-60"}),c.jsx(mt,{value:e,onChange:z=>r(z.target.value),placeholder:"Search taints",className:"w-64 pl-8"})]}),c.jsxs(dn,{open:s,onOpenChange:o,children:[c.jsx(Ai,{asChild:!0,children:c.jsxs(Pe,{onClick:()=>o(!0),children:[c.jsx(qa,{className:"mr-2 h-4 w-4"})," Create Taint"]})}),c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Create taint"})}),c.jsx(mr,{...k,children:c.jsxs("form",{className:"space-y-4",onSubmit:k.handleSubmit(M),children:[c.jsx(ft,{control:k.control,name:"key",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Key"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"dedicated",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:k.control,name:"value",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Value (optional)"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"gpu",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:k.control,name:"effect",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Effect"}),c.jsxs(_n,{onValueChange:z.onChange,value:z.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select effect"})})}),c.jsx(Dn,{children:F_.map(W=>c.jsx(Ct,{value:W,children:W},W))})]}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:k.formState.isSubmitting,children:k.formState.isSubmitting?"Creating…":"Create"})]})]})})]})]})]})]}),c.jsx("div",{className:"bg-background overflow-hidden rounded-2xl border shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs(Js,{children:[c.jsx(Ws,{children:c.jsxs(Qt,{children:[c.jsx(St,{children:"Taint"}),c.jsx(St,{className:"w-[180px] text-right",children:"Actions"})]})}),c.jsxs(Qs,{children:[K.map(z=>c.jsxs(Qt,{children:[c.jsx(dt,{children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(wSe,{t:z}),c.jsx("code",{className:"text-muted-foreground text-xs",children:za(z.id,6)})]})}),c.jsx(dt,{children:c.jsxs("div",{className:"flex justify-end gap-2",children:[c.jsxs(Pe,{variant:"outline",size:"sm",onClick:()=>H(z),children:[c.jsx(uc,{className:"mr-2 h-4 w-4"})," Edit"]}),c.jsx(Pe,{variant:"destructive",size:"sm",onClick:()=>g(z.id),disabled:V.isPending&&m===z.id,children:V.isPending&&m===z.id?"Deleting…":"Delete"})]})})]},z.id)),K.length===0&&c.jsx(Qt,{children:c.jsxs(dt,{colSpan:3,className:"text-muted-foreground py-10 text-center",children:[c.jsx(Rg,{className:"mx-auto mb-2 h-6 w-6 opacity-60"}),"No taints match your search."]})})]})]})})}),c.jsx(dn,{open:u,onOpenChange:h,children:c.jsxs(hn,{className:"sm:max-w-lg",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Edit taint"})}),c.jsx(mr,{...I,children:c.jsxs("form",{className:"space-y-4",onSubmit:I.handleSubmit(z=>{b&&F.mutate({id:b,values:z})}),children:[c.jsx(ft,{control:I.control,name:"key",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Key"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"dedicated",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"value",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Value (optional)"}),c.jsx(bt,{children:c.jsx(mt,{placeholder:"gpu",...z})}),c.jsx(pt,{})]})}),c.jsx(ft,{control:I.control,name:"effect",render:({field:z})=>c.jsxs(ot,{children:[c.jsx(lt,{children:"Effect"}),c.jsxs(_n,{onValueChange:z.onChange,value:z.value,children:[c.jsx(bt,{children:c.jsx(Nn,{children:c.jsx($n,{placeholder:"Select effect"})})}),c.jsx(Dn,{children:F_.map(W=>c.jsx(Ct,{value:W,children:W},W))})]}),c.jsx(pt,{})]})}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{type:"button",variant:"outline",onClick:()=>h(!1),children:"Cancel"}),c.jsx(Pe,{type:"submit",disabled:F.isPending,children:F.isPending?"Saving…":"Save changes"})]})]})})]})}),c.jsx(dn,{open:!!m,onOpenChange:z=>!z&&g(null),children:c.jsxs(hn,{className:"sm:max-w-md",children:[c.jsx(pn,{children:c.jsx(fn,{children:"Delete taint"})}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"This action cannot be undone. Are you sure you want to delete this taint?"}),c.jsxs(gn,{className:"gap-2",children:[c.jsx(Pe,{variant:"outline",onClick:()=>g(null),children:"Cancel"}),c.jsx(Pe,{variant:"destructive",onClick:()=>m&&V.mutate(m),disabled:V.isPending,children:V.isPending?"Deleting…":"Delete"})]})]})})]})};function ESe(){return c.jsxs(DY,{children:[c.jsx(ns,{path:"/login",element:c.jsx(Y3,{})}),c.jsx(ns,{path:"/docs",element:c.jsx(Kwe,{})}),c.jsx(ns,{element:c.jsx(ope,{}),children:c.jsxs(ns,{element:c.jsx(ipe,{}),children:[c.jsx(ns,{path:"/me",element:c.jsx(u0e,{})}),c.jsx(ns,{path:"/org/settings",element:c.jsx(x0e,{})}),c.jsx(ns,{path:"/org/members",element:c.jsx(y0e,{})}),c.jsx(ns,{path:"/org/api-keys",element:c.jsx(m0e,{})}),c.jsx(ns,{path:"/ssh",element:c.jsx(xSe,{})}),c.jsx(ns,{path:"/servers",element:c.jsx(mSe,{})}),c.jsx(ns,{path:"/taints",element:c.jsx(SSe,{})}),c.jsx(ns,{path:"/labels",element:c.jsx(Qwe,{})}),c.jsx(ns,{path:"/annotations",element:c.jsx(xve,{})}),c.jsx(ns,{path:"/node-pools",element:c.jsx(p0e,{})}),c.jsx(ns,{path:"/credentials",element:c.jsx(Pwe,{})}),c.jsx(ns,{path:"/dns",element:c.jsx(Bwe,{})}),c.jsx(ns,{path:"/load-balancers",element:c.jsx(n0e,{})}),c.jsx(ns,{path:"/clusters",element:c.jsx(wxe,{})}),c.jsx(ns,{path:"/admin/jobs",element:c.jsx(Xwe,{})}),c.jsx(ns,{path:"/admin/actions",element:c.jsx(gve,{})})]})}),c.jsx(ns,{path:"*",element:c.jsx(Y3,{})})]})}DW.createRoot(document.getElementById("root")).render(c.jsx(T.StrictMode,{children:c.jsx(PY,{children:c.jsx(RW,{children:c.jsx(ESe,{})})})}));
|
||
//# sourceMappingURL=index-GteqH5KT.js.map
|