windows-development-sandbox 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/config.example.json +6 -0
  2. package/dist/app/features/access/access.run.js +1 -1
  3. package/dist/app/features/accounts/accounts.def.js +4 -3
  4. package/dist/app/features/defs.d.ts +3 -1
  5. package/dist/app/features/defs.js +26 -12
  6. package/dist/app/features/sandbox/sandbox.def.js +9 -5
  7. package/dist/app/features/sessions/sessions.def.js +1 -1
  8. package/dist/bin/agent-sandbox.js +2 -2
  9. package/dist/bin/{chunk-HTQT5SBY.js → chunk-QLGGAG3D.js} +98 -79
  10. package/dist/bin/{chunk-D7CM63BS.js → chunk-REE3EMHD.js} +105 -41
  11. package/dist/bin/{chunk-RQ4BWBYX.js → chunk-XYUVIVJT.js} +1 -1
  12. package/dist/bin/claude-host.js +2 -2
  13. package/dist/bin/claude-sbx.js +2 -2
  14. package/dist/bin/codex-sbx.js +2 -2
  15. package/dist/bin/gemini-sbx.js +2 -2
  16. package/dist/bin/sandbox.js +2 -2
  17. package/dist/bin/sbx-hide.js +2 -2
  18. package/dist/bin/sbx-show.js +2 -2
  19. package/dist/cli/commands/web.js +1 -1
  20. package/dist/cli/index.js +4 -1
  21. package/dist/cli/report.d.ts +7 -0
  22. package/dist/cli/report.js +31 -0
  23. package/dist/core/config/defaults.js +1 -0
  24. package/dist/core/detect/toolchains.d.ts +1 -0
  25. package/dist/core/detect/toolchains.js +7 -0
  26. package/dist/core/schema/config.d.ts +21 -0
  27. package/dist/core/schema/sandbox.js +1 -1
  28. package/dist/core/schema/toolchains.d.ts +6 -0
  29. package/dist/core/schema/toolchains.js +10 -0
  30. package/dist/guest/boot/boot.js +2 -0
  31. package/dist/guest/setup/browser-gpu.d.ts +1 -0
  32. package/dist/guest/setup/browser-gpu.js +18 -0
  33. package/dist/guest/toolchains/native/rust-extras.js +3 -1
  34. package/dist/guest/toolchains/native/unreal.d.ts +9 -0
  35. package/dist/guest/toolchains/native/unreal.js +186 -0
  36. package/dist/guest/toolchains/native/vcruntime.d.ts +3 -0
  37. package/dist/guest/toolchains/native/vcruntime.js +2 -2
  38. package/dist/guest/toolchains/plan.js +10 -2
  39. package/dist/host/engines/hcs/live-folders.js +1 -1
  40. package/dist/host/github/token.js +1 -1
  41. package/dist/host/profile/accounts.js +1 -1
  42. package/dist/host/profile/agent-accounts.js +1 -1
  43. package/dist/host/profile/plugin-share.d.ts +5 -0
  44. package/dist/host/profile/plugin-share.js +22 -1
  45. package/dist/host/secrets/secret-store.d.ts +3 -3
  46. package/dist/host/secrets/secret-store.js +37 -10
  47. package/dist/host/vpn/login.js +1 -1
  48. package/dist/runtime/agent.js +16 -1
  49. package/dist/runtime/daemon.js +522 -337
  50. package/dist/runtime/db.js +17 -1
  51. package/dist/runtime/main.js +669 -472
  52. package/dist/runtime/netproxy.js +16 -1
  53. package/dist/runtime/view.js +16 -1
  54. package/dist/selftest/accounts.test.js +29 -0
  55. package/dist/selftest/app.test.js +2 -2
  56. package/dist/selftest/detect.test.js +7 -0
  57. package/dist/selftest/live-network.test.js +5 -0
  58. package/dist/selftest/support/fixtures.d.ts +6 -0
  59. package/dist/shared/channel/schema.d.ts +18 -0
  60. package/dist/web/index.html +2 -2
  61. package/dist/web/main-JTH3FT4O.js +221 -0
  62. package/dist/web/{main-UAQPI5XD.css → main-XT7T6ODM.css} +1 -1
  63. package/native/csharp/HcsHost/AssemblyInfo.cs +3 -3
  64. package/native/csharp/HostTools/AssemblyInfo.cs +3 -3
  65. package/native/csharp/HostTools/Program.cs +6 -1
  66. package/native/csharp/HostTools/Protect.cs +41 -0
  67. package/native/csharp/StorageHelper/AssemblyInfo.cs +3 -3
  68. package/package.json +1 -1
  69. package/schemas/config.schema.json +34 -1
  70. package/schemas/sandbox-config.schema.json +34 -1
  71. package/dist/web/main-7DJZ2M27.js +0 -221
@@ -0,0 +1,221 @@
1
+ var Qre=Object.create;var gy=Object.defineProperty;var Yre=Object.getOwnPropertyDescriptor;var Jre=Object.getOwnPropertyNames;var eoe=Object.getPrototypeOf,toe=Object.prototype.hasOwnProperty;var FF=e=>{throw TypeError(e)};var roe=(e,t,r)=>t in e?gy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var _a=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},Is=(e,t)=>{for(var r in t)gy(e,r,{get:t[r],enumerable:!0})},ooe=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jre(t))!toe.call(e,o)&&o!==r&&gy(e,o,{get:()=>t[o],enumerable:!(n=Yre(t,o))||n.enumerable});return e};var b=(e,t,r)=>(r=e!=null?Qre(eoe(e)):{},ooe(t||!e||!e.__esModule?gy(r,"default",{value:e,enumerable:!0}):r,e));var Ft=(e,t,r)=>roe(e,typeof t!="symbol"?t+"":t,r),v2=(e,t,r)=>t.has(e)||FF("Cannot "+r);var L=(e,t,r)=>(v2(e,t,"read from private field"),r?r.call(e):t.get(e)),Re=(e,t,r)=>t.has(e)?FF("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),me=(e,t,r,n)=>(v2(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),rt=(e,t,r)=>(v2(e,t,"access private method"),r);var Fh=(e,t,r,n)=>({set _(o){me(e,t,o,r)},get _(){return L(e,t,n)}});var XF=_a(st=>{"use strict";var Lh=Symbol.for("react.element"),noe=Symbol.for("react.portal"),ioe=Symbol.for("react.fragment"),aoe=Symbol.for("react.strict_mode"),soe=Symbol.for("react.profiler"),loe=Symbol.for("react.provider"),coe=Symbol.for("react.context"),doe=Symbol.for("react.forward_ref"),uoe=Symbol.for("react.suspense"),foe=Symbol.for("react.memo"),moe=Symbol.for("react.lazy"),MF=Symbol.iterator;function poe(e){return e===null||typeof e!="object"?null:(e=MF&&e[MF]||e["@@iterator"],typeof e=="function"?e:null)}var UF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},VF=Object.assign,HF={};function xf(e,t,r){this.props=e,this.context=t,this.refs=HF,this.updater=r||UF}xf.prototype.isReactComponent={};xf.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};xf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function WF(){}WF.prototype=xf.prototype;function b2(e,t,r){this.props=e,this.context=t,this.refs=HF,this.updater=r||UF}var y2=b2.prototype=new WF;y2.constructor=b2;VF(y2,xf.prototype);y2.isPureReactComponent=!0;var BF=Array.isArray,ZF=Object.prototype.hasOwnProperty,_2={current:null},GF={key:!0,ref:!0,__self:!0,__source:!0};function qF(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)ZF.call(t,n)&&!GF.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(n in s=e.defaultProps,s)o[n]===void 0&&(o[n]=s[n]);return{$$typeof:Lh,type:e,key:i,ref:a,props:o,_owner:_2.current}}function hoe(e,t){return{$$typeof:Lh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function I2(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lh}function goe(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var jF=/\/+/g;function x2(e,t){return typeof e=="object"&&e!==null&&e.key!=null?goe(""+e.key):t.toString(36)}function by(e,t,r,n,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Lh:case noe:a=!0}}if(a)return a=e,o=o(a),e=n===""?"."+x2(a,0):n,BF(o)?(r="",e!=null&&(r=e.replace(jF,"$&/")+"/"),by(o,t,r,"",function(c){return c})):o!=null&&(I2(o)&&(o=hoe(o,r+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(jF,"$&/")+"/")+e)),t.push(o)),1;if(a=0,n=n===""?".":n+":",BF(e))for(var s=0;s<e.length;s++){i=e[s];var l=n+x2(i,s);a+=by(i,t,r,l,o)}else if(l=poe(e),typeof l=="function")for(e=l.call(e),s=0;!(i=e.next()).done;)i=i.value,l=n+x2(i,s++),a+=by(i,t,r,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function xy(e,t,r){if(e==null)return e;var n=[],o=0;return by(e,n,"","",function(i){return t.call(r,i,o++)}),n}function voe(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var jo={current:null},yy={transition:null},xoe={ReactCurrentDispatcher:jo,ReactCurrentBatchConfig:yy,ReactCurrentOwner:_2};function KF(){throw Error("act(...) is not supported in production builds of React.")}st.Children={map:xy,forEach:function(e,t,r){xy(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return xy(e,function(){t++}),t},toArray:function(e){return xy(e,function(t){return t})||[]},only:function(e){if(!I2(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};st.Component=xf;st.Fragment=ioe;st.Profiler=soe;st.PureComponent=b2;st.StrictMode=aoe;st.Suspense=uoe;st.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xoe;st.act=KF;st.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=VF({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=_2.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)ZF.call(t,l)&&!GF.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];n.children=s}return{$$typeof:Lh,type:e.type,key:o,ref:i,props:n,_owner:a}};st.createContext=function(e){return e={$$typeof:coe,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:loe,_context:e},e.Consumer=e};st.createElement=qF;st.createFactory=function(e){var t=qF.bind(null,e);return t.type=e,t};st.createRef=function(){return{current:null}};st.forwardRef=function(e){return{$$typeof:doe,render:e}};st.isValidElement=I2;st.lazy=function(e){return{$$typeof:moe,_payload:{_status:-1,_result:e},_init:voe}};st.memo=function(e,t){return{$$typeof:foe,type:e,compare:t===void 0?null:t}};st.startTransition=function(e){var t=yy.transition;yy.transition={};try{e()}finally{yy.transition=t}};st.unstable_act=KF;st.useCallback=function(e,t){return jo.current.useCallback(e,t)};st.useContext=function(e){return jo.current.useContext(e)};st.useDebugValue=function(){};st.useDeferredValue=function(e){return jo.current.useDeferredValue(e)};st.useEffect=function(e,t){return jo.current.useEffect(e,t)};st.useId=function(){return jo.current.useId()};st.useImperativeHandle=function(e,t,r){return jo.current.useImperativeHandle(e,t,r)};st.useInsertionEffect=function(e,t){return jo.current.useInsertionEffect(e,t)};st.useLayoutEffect=function(e,t){return jo.current.useLayoutEffect(e,t)};st.useMemo=function(e,t){return jo.current.useMemo(e,t)};st.useReducer=function(e,t,r){return jo.current.useReducer(e,t,r)};st.useRef=function(e){return jo.current.useRef(e)};st.useState=function(e){return jo.current.useState(e)};st.useSyncExternalStore=function(e,t,r){return jo.current.useSyncExternalStore(e,t,r)};st.useTransition=function(){return jo.current.useTransition()};st.version="18.3.1"});var D=_a((OCe,QF)=>{"use strict";QF.exports=XF()});var yL=_a(Py=>{"use strict";var joe=D(),Uoe=Symbol.for("react.element"),Voe=Symbol.for("react.fragment"),Hoe=Object.prototype.hasOwnProperty,Woe=joe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zoe={key:!0,ref:!0,__self:!0,__source:!0};function bL(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)Hoe.call(t,n)&&!Zoe.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:Uoe,type:e,key:i,ref:a,props:o,_owner:Woe.current}}Py.Fragment=Voe;Py.jsx=bL;Py.jsxs=bL});var O=_a((Q2e,_L)=>{"use strict";_L.exports=yL()});var hB=_a(Lt=>{"use strict";function gP(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,o=e[n];if(0<Xy(o,t))e[n]=t,e[r]=o,r=n;else break e}}function qi(e){return e.length===0?null:e[0]}function Yy(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,o=e.length,i=o>>>1;n<i;){var a=2*(n+1)-1,s=e[a],l=a+1,c=e[l];if(0>Xy(s,r))l<o&&0>Xy(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(l<o&&0>Xy(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function Xy(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(aB=performance,Lt.unstable_now=function(){return aB.now()}):(mP=Date,sB=mP.now(),Lt.unstable_now=function(){return mP.now()-sB});var aB,mP,sB,Pa=[],Ol=[],Nne=1,li=null,Do=3,Jy=!1,Pd=!1,ig=!1,dB=typeof setTimeout=="function"?setTimeout:null,uB=typeof clearTimeout=="function"?clearTimeout:null,lB=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function vP(e){for(var t=qi(Ol);t!==null;){if(t.callback===null)Yy(Ol);else if(t.startTime<=e)Yy(Ol),t.sortIndex=t.expirationTime,gP(Pa,t);else break;t=qi(Ol)}}function xP(e){if(ig=!1,vP(e),!Pd)if(qi(Pa)!==null)Pd=!0,yP(bP);else{var t=qi(Ol);t!==null&&_P(xP,t.startTime-e)}}function bP(e,t){Pd=!1,ig&&(ig=!1,uB(ag),ag=-1),Jy=!0;var r=Do;try{for(vP(t),li=qi(Pa);li!==null&&(!(li.expirationTime>t)||e&&!pB());){var n=li.callback;if(typeof n=="function"){li.callback=null,Do=li.priorityLevel;var o=n(li.expirationTime<=t);t=Lt.unstable_now(),typeof o=="function"?li.callback=o:li===qi(Pa)&&Yy(Pa),vP(t)}else Yy(Pa);li=qi(Pa)}if(li!==null)var i=!0;else{var a=qi(Ol);a!==null&&_P(xP,a.startTime-t),i=!1}return i}finally{li=null,Do=r,Jy=!1}}var e_=!1,Qy=null,ag=-1,fB=5,mB=-1;function pB(){return!(Lt.unstable_now()-mB<fB)}function pP(){if(Qy!==null){var e=Lt.unstable_now();mB=e;var t=!0;try{t=Qy(!0,e)}finally{t?ng():(e_=!1,Qy=null)}}else e_=!1}var ng;typeof lB=="function"?ng=function(){lB(pP)}:typeof MessageChannel<"u"?(hP=new MessageChannel,cB=hP.port2,hP.port1.onmessage=pP,ng=function(){cB.postMessage(null)}):ng=function(){dB(pP,0)};var hP,cB;function yP(e){Qy=e,e_||(e_=!0,ng())}function _P(e,t){ag=dB(function(){e(Lt.unstable_now())},t)}Lt.unstable_IdlePriority=5;Lt.unstable_ImmediatePriority=1;Lt.unstable_LowPriority=4;Lt.unstable_NormalPriority=3;Lt.unstable_Profiling=null;Lt.unstable_UserBlockingPriority=2;Lt.unstable_cancelCallback=function(e){e.callback=null};Lt.unstable_continueExecution=function(){Pd||Jy||(Pd=!0,yP(bP))};Lt.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fB=0<e?Math.floor(1e3/e):5};Lt.unstable_getCurrentPriorityLevel=function(){return Do};Lt.unstable_getFirstCallbackNode=function(){return qi(Pa)};Lt.unstable_next=function(e){switch(Do){case 1:case 2:case 3:var t=3;break;default:t=Do}var r=Do;Do=t;try{return e()}finally{Do=r}};Lt.unstable_pauseExecution=function(){};Lt.unstable_requestPaint=function(){};Lt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Do;Do=e;try{return t()}finally{Do=r}};Lt.unstable_scheduleCallback=function(e,t,r){var n=Lt.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=r+o,e={id:Nne++,callback:t,priorityLevel:e,startTime:r,expirationTime:o,sortIndex:-1},r>n?(e.sortIndex=r,gP(Ol,e),qi(Pa)===null&&e===qi(Ol)&&(ig?(uB(ag),ag=-1):ig=!0,_P(xP,r-n))):(e.sortIndex=o,gP(Pa,e),Pd||Jy||(Pd=!0,yP(bP))),e};Lt.unstable_shouldYield=pB;Lt.unstable_wrapCallback=function(e){var t=Do;return function(){var r=Do;Do=t;try{return e.apply(this,arguments)}finally{Do=r}}}});var vB=_a((REe,gB)=>{"use strict";gB.exports=hB()});var _9=_a(Zn=>{"use strict";var Fne=D(),Hn=vB();function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var S7=new Set,Dg={};function Bd(e,t){tm(e,t),tm(e+"Capture",t)}function tm(e,t){for(Dg[e]=t,e=0;e<t.length;e++)S7.add(t[e])}var As=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HP=Object.prototype.hasOwnProperty,Lne=/^[: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]*$/,xB={},bB={};function Mne(e){return HP.call(bB,e)?!0:HP.call(xB,e)?!1:Lne.test(e)?bB[e]=!0:(xB[e]=!0,!1)}function Bne(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function jne(e,t,r,n){if(t===null||typeof t>"u"||Bne(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Wo(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var mo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mo[e]=new Wo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mo[t]=new Wo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mo[e]=new Wo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mo[e]=new Wo(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){mo[e]=new Wo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mo[e]=new Wo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mo[e]=new Wo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mo[e]=new Wo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mo[e]=new Wo(e,5,!1,e.toLowerCase(),null,!1,!1)});var N6=/[\-:]([a-z])/g;function F6(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(N6,F6);mo[t]=new Wo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(N6,F6);mo[t]=new Wo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(N6,F6);mo[t]=new Wo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mo[e]=new Wo(e,1,!1,e.toLowerCase(),null,!1,!1)});mo.xlinkHref=new Wo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mo[e]=new Wo(e,1,!1,e.toLowerCase(),null,!0,!0)});function L6(e,t,r,n){var o=mo.hasOwnProperty(t)?mo[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(jne(t,r,o,n)&&(r=null),n||o===null?Mne(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):o.mustUseProperty?e[o.propertyName]=r===null?o.type===3?!1:"":r:(t=o.attributeName,n=o.attributeNamespace,r===null?e.removeAttribute(t):(o=o.type,r=o===3||o===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Fs=Fne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,t_=Symbol.for("react.element"),Ff=Symbol.for("react.portal"),Lf=Symbol.for("react.fragment"),M6=Symbol.for("react.strict_mode"),WP=Symbol.for("react.profiler"),k7=Symbol.for("react.provider"),C7=Symbol.for("react.context"),B6=Symbol.for("react.forward_ref"),ZP=Symbol.for("react.suspense"),GP=Symbol.for("react.suspense_list"),j6=Symbol.for("react.memo"),Nl=Symbol.for("react.lazy"),P7=Symbol.for("react.offscreen"),yB=Symbol.iterator;function sg(e){return e===null||typeof e!="object"?null:(e=yB&&e[yB]||e["@@iterator"],typeof e=="function"?e:null)}var cr=Object.assign,IP;function hg(e){if(IP===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);IP=t&&t[1]||""}return`
2
+ `+IP+e}var wP=!1;function SP(e,t){if(!e||wP)return"";wP=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var n=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){n=c}e.call(t.prototype)}else{try{throw Error()}catch(c){n=c}e()}}catch(c){if(c&&n&&typeof c.stack=="string"){for(var o=c.stack.split(`
3
+ `),i=n.stack.split(`
4
+ `),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(a!==1||s!==1)do if(a--,s--,0>s||o[a]!==i[s]){var l=`
5
+ `+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{wP=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?hg(e):""}function Une(e){switch(e.tag){case 5:return hg(e.type);case 16:return hg("Lazy");case 13:return hg("Suspense");case 19:return hg("SuspenseList");case 0:case 2:case 15:return e=SP(e.type,!1),e;case 11:return e=SP(e.type.render,!1),e;case 1:return e=SP(e.type,!0),e;default:return""}}function qP(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Lf:return"Fragment";case Ff:return"Portal";case WP:return"Profiler";case M6:return"StrictMode";case ZP:return"Suspense";case GP:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case C7:return(e.displayName||"Context")+".Consumer";case k7:return(e._context.displayName||"Context")+".Provider";case B6:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case j6:return t=e.displayName||null,t!==null?t:qP(e.type)||"Memo";case Nl:t=e._payload,e=e._init;try{return qP(e(t))}catch{}}return null}function Vne(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return qP(t);case 8:return t===M6?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Xl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function D7(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hne(e){var t=D7(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function r_(e){e._valueTracker||(e._valueTracker=Hne(e))}function R7(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=D7(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function T_(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function KP(e,t){var r=t.checked;return cr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function _B(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Xl(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function T7(e,t){t=t.checked,t!=null&&L6(e,"checked",t,!1)}function XP(e,t){T7(e,t);var r=Xl(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?QP(e,t.type,r):t.hasOwnProperty("defaultValue")&&QP(e,t.type,Xl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function IB(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function QP(e,t,r){(t!=="number"||T_(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var gg=Array.isArray;function Kf(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Xl(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function YP(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(ie(91));return cr({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function wB(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(ie(92));if(gg(r)){if(1<r.length)throw Error(ie(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Xl(r)}}function E7(e,t){var r=Xl(t.value),n=Xl(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function SB(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function $7(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function JP(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$7(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var o_,A7=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,o){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(o_=o_||document.createElement("div"),o_.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=o_.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rg(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var bg={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wne=["Webkit","ms","Moz","O"];Object.keys(bg).forEach(function(e){Wne.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),bg[t]=bg[e]})});function O7(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||bg.hasOwnProperty(e)&&bg[e]?(""+t).trim():t+"px"}function z7(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=O7(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var Zne=cr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function e6(e,t){if(t){if(Zne[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function t6(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 r6=null;function U6(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var o6=null,Xf=null,Qf=null;function kB(e){if(e=Gg(e)){if(typeof o6!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=n0(t),o6(e.stateNode,e.type,t))}}function N7(e){Xf?Qf?Qf.push(e):Qf=[e]:Xf=e}function F7(){if(Xf){var e=Xf,t=Qf;if(Qf=Xf=null,kB(e),t)for(e=0;e<t.length;e++)kB(t[e])}}function L7(e,t){return e(t)}function M7(){}var kP=!1;function B7(e,t,r){if(kP)return e(t,r);kP=!0;try{return L7(e,t,r)}finally{kP=!1,(Xf!==null||Qf!==null)&&(M7(),F7())}}function Tg(e,t){var r=e.stateNode;if(r===null)return null;var n=n0(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(ie(231,t,typeof r));return r}var n6=!1;if(As)try{zf={},Object.defineProperty(zf,"passive",{get:function(){n6=!0}}),window.addEventListener("test",zf,zf),window.removeEventListener("test",zf,zf)}catch{n6=!1}var zf;function Gne(e,t,r,n,o,i,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(r,c)}catch(d){this.onError(d)}}var yg=!1,E_=null,$_=!1,i6=null,qne={onError:function(e){yg=!0,E_=e}};function Kne(e,t,r,n,o,i,a,s,l){yg=!1,E_=null,Gne.apply(qne,arguments)}function Xne(e,t,r,n,o,i,a,s,l){if(Kne.apply(this,arguments),yg){if(yg){var c=E_;yg=!1,E_=null}else throw Error(ie(198));$_||($_=!0,i6=c)}}function jd(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function j7(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function CB(e){if(jd(e)!==e)throw Error(ie(188))}function Qne(e){var t=e.alternate;if(!t){if(t=jd(e),t===null)throw Error(ie(188));return t!==e?null:e}for(var r=e,n=t;;){var o=r.return;if(o===null)break;var i=o.alternate;if(i===null){if(n=o.return,n!==null){r=n;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===r)return CB(o),e;if(i===n)return CB(o),t;i=i.sibling}throw Error(ie(188))}if(r.return!==n.return)r=o,n=i;else{for(var a=!1,s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a){for(s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a)throw Error(ie(189))}}if(r.alternate!==n)throw Error(ie(190))}if(r.tag!==3)throw Error(ie(188));return r.stateNode.current===r?e:t}function U7(e){return e=Qne(e),e!==null?V7(e):null}function V7(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=V7(e);if(t!==null)return t;e=e.sibling}return null}var H7=Hn.unstable_scheduleCallback,PB=Hn.unstable_cancelCallback,Yne=Hn.unstable_shouldYield,Jne=Hn.unstable_requestPaint,Ir=Hn.unstable_now,eie=Hn.unstable_getCurrentPriorityLevel,V6=Hn.unstable_ImmediatePriority,W7=Hn.unstable_UserBlockingPriority,A_=Hn.unstable_NormalPriority,tie=Hn.unstable_LowPriority,Z7=Hn.unstable_IdlePriority,e0=null,Ea=null;function rie(e){if(Ea&&typeof Ea.onCommitFiberRoot=="function")try{Ea.onCommitFiberRoot(e0,e,void 0,(e.current.flags&128)===128)}catch{}}var Ji=Math.clz32?Math.clz32:iie,oie=Math.log,nie=Math.LN2;function iie(e){return e>>>=0,e===0?32:31-(oie(e)/nie|0)|0}var n_=64,i_=4194304;function vg(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function O_(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=vg(s):(i&=a,i!==0&&(n=vg(i)))}else a=r&~o,a!==0?n=vg(a):i!==0&&(n=vg(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Ji(t),o=1<<r,n|=e[r],t&=~o;return n}function aie(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sie(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Ji(i),s=1<<a,l=o[a];l===-1?((s&r)===0||(s&n)!==0)&&(o[a]=aie(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}function a6(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function G7(){var e=n_;return n_<<=1,(n_&4194240)===0&&(n_=64),e}function CP(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Wg(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ji(t),e[t]=r}function lie(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var o=31-Ji(r),i=1<<o;t[o]=0,n[o]=-1,e[o]=-1,r&=~i}}function H6(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Ji(r),o=1<<n;o&t|e[n]&t&&(e[n]|=t),r&=~o}}var Dt=0;function q7(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var K7,W6,X7,Q7,Y7,s6=!1,a_=[],Ul=null,Vl=null,Hl=null,Eg=new Map,$g=new Map,Ll=[],cie="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 submit".split(" ");function DB(e,t){switch(e){case"focusin":case"focusout":Ul=null;break;case"dragenter":case"dragleave":Vl=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":Eg.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$g.delete(t.pointerId)}}function lg(e,t,r,n,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Gg(t),t!==null&&W6(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function die(e,t,r,n,o){switch(t){case"focusin":return Ul=lg(Ul,e,t,r,n,o),!0;case"dragenter":return Vl=lg(Vl,e,t,r,n,o),!0;case"mouseover":return Hl=lg(Hl,e,t,r,n,o),!0;case"pointerover":var i=o.pointerId;return Eg.set(i,lg(Eg.get(i)||null,e,t,r,n,o)),!0;case"gotpointercapture":return i=o.pointerId,$g.set(i,lg($g.get(i)||null,e,t,r,n,o)),!0}return!1}function J7(e){var t=Td(e.target);if(t!==null){var r=jd(t);if(r!==null){if(t=r.tag,t===13){if(t=j7(r),t!==null){e.blockedOn=t,Y7(e.priority,function(){X7(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function y_(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=l6(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);r6=n,r.target.dispatchEvent(n),r6=null}else return t=Gg(r),t!==null&&W6(t),e.blockedOn=r,!1;t.shift()}return!0}function RB(e,t,r){y_(e)&&r.delete(t)}function uie(){s6=!1,Ul!==null&&y_(Ul)&&(Ul=null),Vl!==null&&y_(Vl)&&(Vl=null),Hl!==null&&y_(Hl)&&(Hl=null),Eg.forEach(RB),$g.forEach(RB)}function cg(e,t){e.blockedOn===t&&(e.blockedOn=null,s6||(s6=!0,Hn.unstable_scheduleCallback(Hn.unstable_NormalPriority,uie)))}function Ag(e){function t(o){return cg(o,e)}if(0<a_.length){cg(a_[0],e);for(var r=1;r<a_.length;r++){var n=a_[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ul!==null&&cg(Ul,e),Vl!==null&&cg(Vl,e),Hl!==null&&cg(Hl,e),Eg.forEach(t),$g.forEach(t),r=0;r<Ll.length;r++)n=Ll[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Ll.length&&(r=Ll[0],r.blockedOn===null);)J7(r),r.blockedOn===null&&Ll.shift()}var Yf=Fs.ReactCurrentBatchConfig,z_=!0;function fie(e,t,r,n){var o=Dt,i=Yf.transition;Yf.transition=null;try{Dt=1,Z6(e,t,r,n)}finally{Dt=o,Yf.transition=i}}function mie(e,t,r,n){var o=Dt,i=Yf.transition;Yf.transition=null;try{Dt=4,Z6(e,t,r,n)}finally{Dt=o,Yf.transition=i}}function Z6(e,t,r,n){if(z_){var o=l6(e,t,r,n);if(o===null)AP(e,t,n,N_,r),DB(e,n);else if(die(o,e,t,r,n))n.stopPropagation();else if(DB(e,n),t&4&&-1<cie.indexOf(e)){for(;o!==null;){var i=Gg(o);if(i!==null&&K7(i),i=l6(e,t,r,n),i===null&&AP(e,t,n,N_,r),i===o)break;o=i}o!==null&&n.stopPropagation()}else AP(e,t,n,null,r)}}var N_=null;function l6(e,t,r,n){if(N_=null,e=U6(n),e=Td(e),e!==null)if(t=jd(e),t===null)e=null;else if(r=t.tag,r===13){if(e=j7(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return N_=e,null}function e8(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(eie()){case V6:return 1;case W7:return 4;case A_:case tie:return 16;case Z7:return 536870912;default:return 16}default:return 16}}var Bl=null,G6=null,__=null;function t8(){if(__)return __;var e,t=G6,r=t.length,n,o="value"in Bl?Bl.value:Bl.textContent,i=o.length;for(e=0;e<r&&t[e]===o[e];e++);var a=r-e;for(n=1;n<=a&&t[r-n]===o[i-n];n++);return __=o.slice(e,1<n?1-n:void 0)}function I_(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function s_(){return!0}function TB(){return!1}function Wn(e){function t(r,n,o,i,a){this._reactName=r,this._targetInst=o,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?s_:TB,this.isPropagationStopped=TB,this}return cr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=s_)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=s_)},persist:function(){},isPersistent:s_}),t}var lm={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},q6=Wn(lm),Zg=cr({},lm,{view:0,detail:0}),pie=Wn(Zg),PP,DP,dg,t0=cr({},Zg,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:K6,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==dg&&(dg&&e.type==="mousemove"?(PP=e.screenX-dg.screenX,DP=e.screenY-dg.screenY):DP=PP=0,dg=e),PP)},movementY:function(e){return"movementY"in e?e.movementY:DP}}),EB=Wn(t0),hie=cr({},t0,{dataTransfer:0}),gie=Wn(hie),vie=cr({},Zg,{relatedTarget:0}),RP=Wn(vie),xie=cr({},lm,{animationName:0,elapsedTime:0,pseudoElement:0}),bie=Wn(xie),yie=cr({},lm,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_ie=Wn(yie),Iie=cr({},lm,{data:0}),$B=Wn(Iie),wie={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sie={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"},kie={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cie(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kie[e])?!!t[e]:!1}function K6(){return Cie}var Pie=cr({},Zg,{key:function(e){if(e.key){var t=wie[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=I_(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sie[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:K6,charCode:function(e){return e.type==="keypress"?I_(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?I_(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Die=Wn(Pie),Rie=cr({},t0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AB=Wn(Rie),Tie=cr({},Zg,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:K6}),Eie=Wn(Tie),$ie=cr({},lm,{propertyName:0,elapsedTime:0,pseudoElement:0}),Aie=Wn($ie),Oie=cr({},t0,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zie=Wn(Oie),Nie=[9,13,27,32],X6=As&&"CompositionEvent"in window,_g=null;As&&"documentMode"in document&&(_g=document.documentMode);var Fie=As&&"TextEvent"in window&&!_g,r8=As&&(!X6||_g&&8<_g&&11>=_g),OB=" ",zB=!1;function o8(e,t){switch(e){case"keyup":return Nie.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function n8(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mf=!1;function Lie(e,t){switch(e){case"compositionend":return n8(t);case"keypress":return t.which!==32?null:(zB=!0,OB);case"textInput":return e=t.data,e===OB&&zB?null:e;default:return null}}function Mie(e,t){if(Mf)return e==="compositionend"||!X6&&o8(e,t)?(e=t8(),__=G6=Bl=null,Mf=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return r8&&t.locale!=="ko"?null:t.data;default:return null}}var Bie={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 NB(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Bie[e.type]:t==="textarea"}function i8(e,t,r,n){N7(n),t=F_(t,"onChange"),0<t.length&&(r=new q6("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var Ig=null,Og=null;function jie(e){g8(e,0)}function r0(e){var t=Uf(e);if(R7(t))return e}function Uie(e,t){if(e==="change")return t}var a8=!1;As&&(As?(c_="oninput"in document,c_||(TP=document.createElement("div"),TP.setAttribute("oninput","return;"),c_=typeof TP.oninput=="function"),l_=c_):l_=!1,a8=l_&&(!document.documentMode||9<document.documentMode));var l_,c_,TP;function FB(){Ig&&(Ig.detachEvent("onpropertychange",s8),Og=Ig=null)}function s8(e){if(e.propertyName==="value"&&r0(Og)){var t=[];i8(t,Og,e,U6(e)),B7(jie,t)}}function Vie(e,t,r){e==="focusin"?(FB(),Ig=t,Og=r,Ig.attachEvent("onpropertychange",s8)):e==="focusout"&&FB()}function Hie(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return r0(Og)}function Wie(e,t){if(e==="click")return r0(t)}function Zie(e,t){if(e==="input"||e==="change")return r0(t)}function Gie(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ta=typeof Object.is=="function"?Object.is:Gie;function zg(e,t){if(ta(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var o=r[n];if(!HP.call(t,o)||!ta(e[o],t[o]))return!1}return!0}function LB(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function MB(e,t){var r=LB(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=LB(r)}}function l8(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?l8(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function c8(){for(var e=window,t=T_();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=T_(e.document)}return t}function Q6(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qie(e){var t=c8(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&l8(r.ownerDocument.documentElement,r)){if(n!==null&&Q6(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=MB(r,i);var a=MB(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Kie=As&&"documentMode"in document&&11>=document.documentMode,Bf=null,c6=null,wg=null,d6=!1;function BB(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;d6||Bf==null||Bf!==T_(n)||(n=Bf,"selectionStart"in n&&Q6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),wg&&zg(wg,n)||(wg=n,n=F_(c6,"onSelect"),0<n.length&&(t=new q6("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Bf)))}function d_(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var jf={animationend:d_("Animation","AnimationEnd"),animationiteration:d_("Animation","AnimationIteration"),animationstart:d_("Animation","AnimationStart"),transitionend:d_("Transition","TransitionEnd")},EP={},d8={};As&&(d8=document.createElement("div").style,"AnimationEvent"in window||(delete jf.animationend.animation,delete jf.animationiteration.animation,delete jf.animationstart.animation),"TransitionEvent"in window||delete jf.transitionend.transition);function o0(e){if(EP[e])return EP[e];if(!jf[e])return e;var t=jf[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in d8)return EP[e]=t[r];return e}var u8=o0("animationend"),f8=o0("animationiteration"),m8=o0("animationstart"),p8=o0("transitionend"),h8=new Map,jB="abort auxClick 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(" ");function Yl(e,t){h8.set(e,t),Bd(t,[e])}for(u_=0;u_<jB.length;u_++)f_=jB[u_],UB=f_.toLowerCase(),VB=f_[0].toUpperCase()+f_.slice(1),Yl(UB,"on"+VB);var f_,UB,VB,u_;Yl(u8,"onAnimationEnd");Yl(f8,"onAnimationIteration");Yl(m8,"onAnimationStart");Yl("dblclick","onDoubleClick");Yl("focusin","onFocus");Yl("focusout","onBlur");Yl(p8,"onTransitionEnd");tm("onMouseEnter",["mouseout","mouseover"]);tm("onMouseLeave",["mouseout","mouseover"]);tm("onPointerEnter",["pointerout","pointerover"]);tm("onPointerLeave",["pointerout","pointerover"]);Bd("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bd("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bd("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bd("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bd("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bd("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xg="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(" "),Xie=new Set("cancel close invalid load scroll toggle".split(" ").concat(xg));function HB(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Xne(n,t,void 0,e),e.currentTarget=null}function g8(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],o=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var a=n.length-1;0<=a;a--){var s=n[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;HB(o,s,c),i=l}else for(a=0;a<n.length;a++){if(s=n[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;HB(o,s,c),i=l}}}if($_)throw e=i6,$_=!1,i6=null,e}function qt(e,t){var r=t[h6];r===void 0&&(r=t[h6]=new Set);var n=e+"__bubble";r.has(n)||(v8(t,e,2,!1),r.add(n))}function $P(e,t,r){var n=0;t&&(n|=4),v8(r,e,n,t)}var m_="_reactListening"+Math.random().toString(36).slice(2);function Ng(e){if(!e[m_]){e[m_]=!0,S7.forEach(function(r){r!=="selectionchange"&&(Xie.has(r)||$P(r,!1,e),$P(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[m_]||(t[m_]=!0,$P("selectionchange",!1,t))}}function v8(e,t,r,n){switch(e8(t)){case 1:var o=fie;break;case 4:o=mie;break;default:o=Z6}r=o.bind(null,t,r,e),o=void 0,!n6||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),n?o!==void 0?e.addEventListener(t,r,{capture:!0,passive:o}):e.addEventListener(t,r,!0):o!==void 0?e.addEventListener(t,r,{passive:o}):e.addEventListener(t,r,!1)}function AP(e,t,r,n,o){var i=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(a===4)for(a=n.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;a=a.return}for(;s!==null;){if(a=Td(s),a===null)return;if(l=a.tag,l===5||l===6){n=i=a;continue e}s=s.parentNode}}n=n.return}B7(function(){var c=i,d=U6(r),u=[];e:{var f=h8.get(e);if(f!==void 0){var m=q6,p=e;switch(e){case"keypress":if(I_(r)===0)break e;case"keydown":case"keyup":m=Die;break;case"focusin":p="focus",m=RP;break;case"focusout":p="blur",m=RP;break;case"beforeblur":case"afterblur":m=RP;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=EB;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=gie;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Eie;break;case u8:case f8:case m8:m=bie;break;case p8:m=Aie;break;case"scroll":m=pie;break;case"wheel":m=zie;break;case"copy":case"cut":case"paste":m=_ie;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=AB}var g=(t&4)!==0,y=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var x=c,_;x!==null;){_=x;var I=_.stateNode;if(_.tag===5&&I!==null&&(_=I,v!==null&&(I=Tg(x,v),I!=null&&g.push(Fg(x,I,_)))),y)break;x=x.return}0<g.length&&(f=new m(f,p,null,r,d),u.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&r!==r6&&(p=r.relatedTarget||r.fromElement)&&(Td(p)||p[Os]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(p=r.relatedTarget||r.toElement,m=c,p=p?Td(p):null,p!==null&&(y=jd(p),p!==y||p.tag!==5&&p.tag!==6)&&(p=null)):(m=null,p=c),m!==p)){if(g=EB,I="onMouseLeave",v="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(g=AB,I="onPointerLeave",v="onPointerEnter",x="pointer"),y=m==null?f:Uf(m),_=p==null?f:Uf(p),f=new g(I,x+"leave",m,r,d),f.target=y,f.relatedTarget=_,I=null,Td(d)===c&&(g=new g(v,x+"enter",p,r,d),g.target=_,g.relatedTarget=y,I=g),y=I,m&&p)t:{for(g=m,v=p,x=0,_=g;_;_=Nf(_))x++;for(_=0,I=v;I;I=Nf(I))_++;for(;0<x-_;)g=Nf(g),x--;for(;0<_-x;)v=Nf(v),_--;for(;x--;){if(g===v||v!==null&&g===v.alternate)break t;g=Nf(g),v=Nf(v)}g=null}else g=null;m!==null&&WB(u,f,m,g,!1),p!==null&&y!==null&&WB(u,y,p,g,!0)}}e:{if(f=c?Uf(c):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var S=Uie;else if(NB(f))if(a8)S=Zie;else{S=Hie;var w=Vie}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=Wie);if(S&&(S=S(e,c))){i8(u,S,r,d);break e}w&&w(e,f,c),e==="focusout"&&(w=f._wrapperState)&&w.controlled&&f.type==="number"&&QP(f,"number",f.value)}switch(w=c?Uf(c):window,e){case"focusin":(NB(w)||w.contentEditable==="true")&&(Bf=w,c6=c,wg=null);break;case"focusout":wg=c6=Bf=null;break;case"mousedown":d6=!0;break;case"contextmenu":case"mouseup":case"dragend":d6=!1,BB(u,r,d);break;case"selectionchange":if(Kie)break;case"keydown":case"keyup":BB(u,r,d)}var P;if(X6)e:{switch(e){case"compositionstart":var $="onCompositionStart";break e;case"compositionend":$="onCompositionEnd";break e;case"compositionupdate":$="onCompositionUpdate";break e}$=void 0}else Mf?o8(e,r)&&($="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&($="onCompositionStart");$&&(r8&&r.locale!=="ko"&&(Mf||$!=="onCompositionStart"?$==="onCompositionEnd"&&Mf&&(P=t8()):(Bl=d,G6="value"in Bl?Bl.value:Bl.textContent,Mf=!0)),w=F_(c,$),0<w.length&&($=new $B($,e,null,r,d),u.push({event:$,listeners:w}),P?$.data=P:(P=n8(r),P!==null&&($.data=P)))),(P=Fie?Lie(e,r):Mie(e,r))&&(c=F_(c,"onBeforeInput"),0<c.length&&(d=new $B("onBeforeInput","beforeinput",null,r,d),u.push({event:d,listeners:c}),d.data=P))}g8(u,t)})}function Fg(e,t,r){return{instance:e,listener:t,currentTarget:r}}function F_(e,t){for(var r=t+"Capture",n=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Tg(e,r),i!=null&&n.unshift(Fg(e,i,o)),i=Tg(e,t),i!=null&&n.push(Fg(e,i,o))),e=e.return}return n}function Nf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function WB(e,t,r,n,o){for(var i=t._reactName,a=[];r!==null&&r!==n;){var s=r,l=s.alternate,c=s.stateNode;if(l!==null&&l===n)break;s.tag===5&&c!==null&&(s=c,o?(l=Tg(r,i),l!=null&&a.unshift(Fg(r,l,s))):o||(l=Tg(r,i),l!=null&&a.push(Fg(r,l,s)))),r=r.return}a.length!==0&&e.push({event:t,listeners:a})}var Qie=/\r\n?/g,Yie=/\u0000|\uFFFD/g;function ZB(e){return(typeof e=="string"?e:""+e).replace(Qie,`
6
+ `).replace(Yie,"")}function p_(e,t,r){if(t=ZB(t),ZB(e)!==t&&r)throw Error(ie(425))}function L_(){}var u6=null,f6=null;function m6(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var p6=typeof setTimeout=="function"?setTimeout:void 0,Jie=typeof clearTimeout=="function"?clearTimeout:void 0,GB=typeof Promise=="function"?Promise:void 0,eae=typeof queueMicrotask=="function"?queueMicrotask:typeof GB<"u"?function(e){return GB.resolve(null).then(e).catch(tae)}:p6;function tae(e){setTimeout(function(){throw e})}function OP(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),Ag(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);Ag(t)}function Wl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function qB(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var cm=Math.random().toString(36).slice(2),Ta="__reactFiber$"+cm,Lg="__reactProps$"+cm,Os="__reactContainer$"+cm,h6="__reactEvents$"+cm,rae="__reactListeners$"+cm,oae="__reactHandles$"+cm;function Td(e){var t=e[Ta];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Os]||r[Ta]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=qB(e);e!==null;){if(r=e[Ta])return r;e=qB(e)}return t}e=r,r=e.parentNode}return null}function Gg(e){return e=e[Ta]||e[Os],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Uf(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ie(33))}function n0(e){return e[Lg]||null}var g6=[],Vf=-1;function Jl(e){return{current:e}}function Kt(e){0>Vf||(e.current=g6[Vf],g6[Vf]=null,Vf--)}function Mt(e,t){Vf++,g6[Vf]=e.current,e.current=t}var Ql={},$o=Jl(Ql),yn=Jl(!1),zd=Ql;function rm(e,t){var r=e.type.contextTypes;if(!r)return Ql;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function _n(e){return e=e.childContextTypes,e!=null}function M_(){Kt(yn),Kt($o)}function KB(e,t,r){if($o.current!==Ql)throw Error(ie(168));Mt($o,t),Mt(yn,r)}function x8(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ie(108,Vne(e)||"Unknown",o));return cr({},r,n)}function B_(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ql,zd=$o.current,Mt($o,e),Mt(yn,yn.current),!0}function XB(e,t,r){var n=e.stateNode;if(!n)throw Error(ie(169));r?(e=x8(e,t,zd),n.__reactInternalMemoizedMergedChildContext=e,Kt(yn),Kt($o),Mt($o,e)):Kt(yn),Mt(yn,r)}var Rs=null,i0=!1,zP=!1;function b8(e){Rs===null?Rs=[e]:Rs.push(e)}function nae(e){i0=!0,b8(e)}function ec(){if(!zP&&Rs!==null){zP=!0;var e=0,t=Dt;try{var r=Rs;for(Dt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Rs=null,i0=!1}catch(o){throw Rs!==null&&(Rs=Rs.slice(e+1)),H7(V6,ec),o}finally{Dt=t,zP=!1}}return null}var Hf=[],Wf=0,j_=null,U_=0,ci=[],di=0,Nd=null,Ts=1,Es="";function Dd(e,t){Hf[Wf++]=U_,Hf[Wf++]=j_,j_=e,U_=t}function y8(e,t,r){ci[di++]=Ts,ci[di++]=Es,ci[di++]=Nd,Nd=e;var n=Ts;e=Es;var o=32-Ji(n)-1;n&=~(1<<o),r+=1;var i=32-Ji(t)+o;if(30<i){var a=o-o%5;i=(n&(1<<a)-1).toString(32),n>>=a,o-=a,Ts=1<<32-Ji(t)+o|r<<o|n,Es=i+e}else Ts=1<<i|r<<o|n,Es=e}function Y6(e){e.return!==null&&(Dd(e,1),y8(e,1,0))}function J6(e){for(;e===j_;)j_=Hf[--Wf],Hf[Wf]=null,U_=Hf[--Wf],Hf[Wf]=null;for(;e===Nd;)Nd=ci[--di],ci[di]=null,Es=ci[--di],ci[di]=null,Ts=ci[--di],ci[di]=null}var Vn=null,Un=null,tr=!1,Yi=null;function _8(e,t){var r=ui(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function QB(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Vn=e,Un=Wl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Vn=e,Un=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Nd!==null?{id:Ts,overflow:Es}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ui(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Vn=e,Un=null,!0):!1;default:return!1}}function v6(e){return(e.mode&1)!==0&&(e.flags&128)===0}function x6(e){if(tr){var t=Un;if(t){var r=t;if(!QB(e,t)){if(v6(e))throw Error(ie(418));t=Wl(r.nextSibling);var n=Vn;t&&QB(e,t)?_8(n,r):(e.flags=e.flags&-4097|2,tr=!1,Vn=e)}}else{if(v6(e))throw Error(ie(418));e.flags=e.flags&-4097|2,tr=!1,Vn=e}}}function YB(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Vn=e}function h_(e){if(e!==Vn)return!1;if(!tr)return YB(e),tr=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!m6(e.type,e.memoizedProps)),t&&(t=Un)){if(v6(e))throw I8(),Error(ie(418));for(;t;)_8(e,t),t=Wl(t.nextSibling)}if(YB(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ie(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Un=Wl(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Un=null}}else Un=Vn?Wl(e.stateNode.nextSibling):null;return!0}function I8(){for(var e=Un;e;)e=Wl(e.nextSibling)}function om(){Un=Vn=null,tr=!1}function e4(e){Yi===null?Yi=[e]:Yi.push(e)}var iae=Fs.ReactCurrentBatchConfig;function ug(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(ie(309));var n=r.stateNode}if(!n)throw Error(ie(147,e));var o=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var s=o.refs;a===null?delete s[i]:s[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(ie(284));if(!r._owner)throw Error(ie(290,e))}return e}function g_(e,t){throw e=Object.prototype.toString.call(t),Error(ie(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function JB(e){var t=e._init;return t(e._payload)}function w8(e){function t(v,x){if(e){var _=v.deletions;_===null?(v.deletions=[x],v.flags|=16):_.push(x)}}function r(v,x){if(!e)return null;for(;x!==null;)t(v,x),x=x.sibling;return null}function n(v,x){for(v=new Map;x!==null;)x.key!==null?v.set(x.key,x):v.set(x.index,x),x=x.sibling;return v}function o(v,x){return v=Kl(v,x),v.index=0,v.sibling=null,v}function i(v,x,_){return v.index=_,e?(_=v.alternate,_!==null?(_=_.index,_<x?(v.flags|=2,x):_):(v.flags|=2,x)):(v.flags|=1048576,x)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,x,_,I){return x===null||x.tag!==6?(x=UP(_,v.mode,I),x.return=v,x):(x=o(x,_),x.return=v,x)}function l(v,x,_,I){var S=_.type;return S===Lf?d(v,x,_.props.children,I,_.key):x!==null&&(x.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Nl&&JB(S)===x.type)?(I=o(x,_.props),I.ref=ug(v,x,_),I.return=v,I):(I=R_(_.type,_.key,_.props,null,v.mode,I),I.ref=ug(v,x,_),I.return=v,I)}function c(v,x,_,I){return x===null||x.tag!==4||x.stateNode.containerInfo!==_.containerInfo||x.stateNode.implementation!==_.implementation?(x=VP(_,v.mode,I),x.return=v,x):(x=o(x,_.children||[]),x.return=v,x)}function d(v,x,_,I,S){return x===null||x.tag!==7?(x=Od(_,v.mode,I,S),x.return=v,x):(x=o(x,_),x.return=v,x)}function u(v,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return x=UP(""+x,v.mode,_),x.return=v,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case t_:return _=R_(x.type,x.key,x.props,null,v.mode,_),_.ref=ug(v,null,x),_.return=v,_;case Ff:return x=VP(x,v.mode,_),x.return=v,x;case Nl:var I=x._init;return u(v,I(x._payload),_)}if(gg(x)||sg(x))return x=Od(x,v.mode,_,null),x.return=v,x;g_(v,x)}return null}function f(v,x,_,I){var S=x!==null?x.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return S!==null?null:s(v,x,""+_,I);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case t_:return _.key===S?l(v,x,_,I):null;case Ff:return _.key===S?c(v,x,_,I):null;case Nl:return S=_._init,f(v,x,S(_._payload),I)}if(gg(_)||sg(_))return S!==null?null:d(v,x,_,I,null);g_(v,_)}return null}function m(v,x,_,I,S){if(typeof I=="string"&&I!==""||typeof I=="number")return v=v.get(_)||null,s(x,v,""+I,S);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case t_:return v=v.get(I.key===null?_:I.key)||null,l(x,v,I,S);case Ff:return v=v.get(I.key===null?_:I.key)||null,c(x,v,I,S);case Nl:var w=I._init;return m(v,x,_,w(I._payload),S)}if(gg(I)||sg(I))return v=v.get(_)||null,d(x,v,I,S,null);g_(x,I)}return null}function p(v,x,_,I){for(var S=null,w=null,P=x,$=x=0,B=null;P!==null&&$<_.length;$++){P.index>$?(B=P,P=null):B=P.sibling;var W=f(v,P,_[$],I);if(W===null){P===null&&(P=B);break}e&&P&&W.alternate===null&&t(v,P),x=i(W,x,$),w===null?S=W:w.sibling=W,w=W,P=B}if($===_.length)return r(v,P),tr&&Dd(v,$),S;if(P===null){for(;$<_.length;$++)P=u(v,_[$],I),P!==null&&(x=i(P,x,$),w===null?S=P:w.sibling=P,w=P);return tr&&Dd(v,$),S}for(P=n(v,P);$<_.length;$++)B=m(P,v,$,_[$],I),B!==null&&(e&&B.alternate!==null&&P.delete(B.key===null?$:B.key),x=i(B,x,$),w===null?S=B:w.sibling=B,w=B);return e&&P.forEach(function(H){return t(v,H)}),tr&&Dd(v,$),S}function g(v,x,_,I){var S=sg(_);if(typeof S!="function")throw Error(ie(150));if(_=S.call(_),_==null)throw Error(ie(151));for(var w=S=null,P=x,$=x=0,B=null,W=_.next();P!==null&&!W.done;$++,W=_.next()){P.index>$?(B=P,P=null):B=P.sibling;var H=f(v,P,W.value,I);if(H===null){P===null&&(P=B);break}e&&P&&H.alternate===null&&t(v,P),x=i(H,x,$),w===null?S=H:w.sibling=H,w=H,P=B}if(W.done)return r(v,P),tr&&Dd(v,$),S;if(P===null){for(;!W.done;$++,W=_.next())W=u(v,W.value,I),W!==null&&(x=i(W,x,$),w===null?S=W:w.sibling=W,w=W);return tr&&Dd(v,$),S}for(P=n(v,P);!W.done;$++,W=_.next())W=m(P,v,$,W.value,I),W!==null&&(e&&W.alternate!==null&&P.delete(W.key===null?$:W.key),x=i(W,x,$),w===null?S=W:w.sibling=W,w=W);return e&&P.forEach(function(K){return t(v,K)}),tr&&Dd(v,$),S}function y(v,x,_,I){if(typeof _=="object"&&_!==null&&_.type===Lf&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case t_:e:{for(var S=_.key,w=x;w!==null;){if(w.key===S){if(S=_.type,S===Lf){if(w.tag===7){r(v,w.sibling),x=o(w,_.props.children),x.return=v,v=x;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Nl&&JB(S)===w.type){r(v,w.sibling),x=o(w,_.props),x.ref=ug(v,w,_),x.return=v,v=x;break e}r(v,w);break}else t(v,w);w=w.sibling}_.type===Lf?(x=Od(_.props.children,v.mode,I,_.key),x.return=v,v=x):(I=R_(_.type,_.key,_.props,null,v.mode,I),I.ref=ug(v,x,_),I.return=v,v=I)}return a(v);case Ff:e:{for(w=_.key;x!==null;){if(x.key===w)if(x.tag===4&&x.stateNode.containerInfo===_.containerInfo&&x.stateNode.implementation===_.implementation){r(v,x.sibling),x=o(x,_.children||[]),x.return=v,v=x;break e}else{r(v,x);break}else t(v,x);x=x.sibling}x=VP(_,v.mode,I),x.return=v,v=x}return a(v);case Nl:return w=_._init,y(v,x,w(_._payload),I)}if(gg(_))return p(v,x,_,I);if(sg(_))return g(v,x,_,I);g_(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,x!==null&&x.tag===6?(r(v,x.sibling),x=o(x,_),x.return=v,v=x):(r(v,x),x=UP(_,v.mode,I),x.return=v,v=x),a(v)):r(v,x)}return y}var nm=w8(!0),S8=w8(!1),V_=Jl(null),H_=null,Zf=null,t4=null;function r4(){t4=Zf=H_=null}function o4(e){var t=V_.current;Kt(V_),e._currentValue=t}function b6(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Jf(e,t){H_=e,t4=Zf=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(bn=!0),e.firstContext=null)}function mi(e){var t=e._currentValue;if(t4!==e)if(e={context:e,memoizedValue:t,next:null},Zf===null){if(H_===null)throw Error(ie(308));Zf=e,H_.dependencies={lanes:0,firstContext:e}}else Zf=Zf.next=e;return t}var Ed=null;function n4(e){Ed===null?Ed=[e]:Ed.push(e)}function k8(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,n4(t)):(r.next=o.next,o.next=r),t.interleaved=r,zs(e,n)}function zs(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Fl=!1;function i4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function C8(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function $s(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zl(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(vt&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,zs(e,r)}return o=n.interleaved,o===null?(t.next=t,n4(n)):(t.next=o.next,o.next=t),n.interleaved=t,zs(e,r)}function w_(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,H6(e,r)}}function e7(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function W_(e,t,r,n){var o=e.updateQueue;Fl=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(i!==null){var u=o.baseState;a=0,d=c=l=null,s=i;do{var f=s.lane,m=s.eventTime;if((n&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(f=t,m=r,g.tag){case 1:if(p=g.payload,typeof p=="function"){u=p.call(m,u,f);break e}u=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=g.payload,f=typeof p=="function"?p.call(m,u,f):p,f==null)break e;u=cr({},u,f);break e;case 2:Fl=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else m={eventTime:m,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=m,l=u):d=d.next=m,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(d===null&&(l=u),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Ld|=a,e.lanes=a,e.memoizedState=u}}function t7(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],o=n.callback;if(o!==null){if(n.callback=null,n=r,typeof o!="function")throw Error(ie(191,o));o.call(n)}}}var qg={},$a=Jl(qg),Mg=Jl(qg),Bg=Jl(qg);function $d(e){if(e===qg)throw Error(ie(174));return e}function a4(e,t){switch(Mt(Bg,t),Mt(Mg,e),Mt($a,qg),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:JP(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=JP(t,e)}Kt($a),Mt($a,t)}function im(){Kt($a),Kt(Mg),Kt(Bg)}function P8(e){$d(Bg.current);var t=$d($a.current),r=JP(t,e.type);t!==r&&(Mt(Mg,e),Mt($a,r))}function s4(e){Mg.current===e&&(Kt($a),Kt(Mg))}var sr=Jl(0);function Z_(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var NP=[];function l4(){for(var e=0;e<NP.length;e++)NP[e]._workInProgressVersionPrimary=null;NP.length=0}var S_=Fs.ReactCurrentDispatcher,FP=Fs.ReactCurrentBatchConfig,Fd=0,lr=null,Or=null,qr=null,G_=!1,Sg=!1,jg=0,aae=0;function Ro(){throw Error(ie(321))}function c4(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ta(e[r],t[r]))return!1;return!0}function d4(e,t,r,n,o,i){if(Fd=i,lr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,S_.current=e===null||e.memoizedState===null?dae:uae,e=r(n,o),Sg){i=0;do{if(Sg=!1,jg=0,25<=i)throw Error(ie(301));i+=1,qr=Or=null,t.updateQueue=null,S_.current=fae,e=r(n,o)}while(Sg)}if(S_.current=q_,t=Or!==null&&Or.next!==null,Fd=0,qr=Or=lr=null,G_=!1,t)throw Error(ie(300));return e}function u4(){var e=jg!==0;return jg=0,e}function Ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qr===null?lr.memoizedState=qr=e:qr=qr.next=e,qr}function pi(){if(Or===null){var e=lr.alternate;e=e!==null?e.memoizedState:null}else e=Or.next;var t=qr===null?lr.memoizedState:qr.next;if(t!==null)qr=t,Or=e;else{if(e===null)throw Error(ie(310));Or=e,e={memoizedState:Or.memoizedState,baseState:Or.baseState,baseQueue:Or.baseQueue,queue:Or.queue,next:null},qr===null?lr.memoizedState=qr=e:qr=qr.next=e}return qr}function Ug(e,t){return typeof t=="function"?t(e):t}function LP(e){var t=pi(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=Or,o=n.baseQueue,i=r.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}n.baseQueue=o=i,r.pending=null}if(o!==null){i=o.next,n=n.baseState;var s=a=null,l=null,c=i;do{var d=c.lane;if((Fd&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:e(n,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=u,a=n):l=l.next=u,lr.lanes|=d,Ld|=d}c=c.next}while(c!==null&&c!==i);l===null?a=n:l.next=s,ta(n,t.memoizedState)||(bn=!0),t.memoizedState=n,t.baseState=a,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){o=e;do i=o.lane,lr.lanes|=i,Ld|=i,o=o.next;while(o!==e)}else o===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function MP(e){var t=pi(),r=t.queue;if(r===null)throw Error(ie(311));r.lastRenderedReducer=e;var n=r.dispatch,o=r.pending,i=t.memoizedState;if(o!==null){r.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);ta(i,t.memoizedState)||(bn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function D8(){}function R8(e,t){var r=lr,n=pi(),o=t(),i=!ta(n.memoizedState,o);if(i&&(n.memoizedState=o,bn=!0),n=n.queue,f4($8.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||qr!==null&&qr.memoizedState.tag&1){if(r.flags|=2048,Vg(9,E8.bind(null,r,n,o,t),void 0,null),Kr===null)throw Error(ie(349));(Fd&30)!==0||T8(r,t,o)}return o}function T8(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=lr.updateQueue,t===null?(t={lastEffect:null,stores:null},lr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function E8(e,t,r,n){t.value=r,t.getSnapshot=n,A8(t)&&O8(e)}function $8(e,t,r){return r(function(){A8(t)&&O8(e)})}function A8(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ta(e,r)}catch{return!0}}function O8(e){var t=zs(e,1);t!==null&&ea(t,e,1,-1)}function r7(e){var t=Ra();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ug,lastRenderedState:e},t.queue=e,e=e.dispatch=cae.bind(null,lr,e),[t.memoizedState,e]}function Vg(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=lr.updateQueue,t===null?(t={lastEffect:null,stores:null},lr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function z8(){return pi().memoizedState}function k_(e,t,r,n){var o=Ra();lr.flags|=e,o.memoizedState=Vg(1|t,r,void 0,n===void 0?null:n)}function a0(e,t,r,n){var o=pi();n=n===void 0?null:n;var i=void 0;if(Or!==null){var a=Or.memoizedState;if(i=a.destroy,n!==null&&c4(n,a.deps)){o.memoizedState=Vg(t,r,i,n);return}}lr.flags|=e,o.memoizedState=Vg(1|t,r,i,n)}function o7(e,t){return k_(8390656,8,e,t)}function f4(e,t){return a0(2048,8,e,t)}function N8(e,t){return a0(4,2,e,t)}function F8(e,t){return a0(4,4,e,t)}function L8(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function M8(e,t,r){return r=r!=null?r.concat([e]):null,a0(4,4,L8.bind(null,t,e),r)}function m4(){}function B8(e,t){var r=pi();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&c4(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function j8(e,t){var r=pi();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&c4(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function U8(e,t,r){return(Fd&21)===0?(e.baseState&&(e.baseState=!1,bn=!0),e.memoizedState=r):(ta(r,t)||(r=G7(),lr.lanes|=r,Ld|=r,e.baseState=!0),t)}function sae(e,t){var r=Dt;Dt=r!==0&&4>r?r:4,e(!0);var n=FP.transition;FP.transition={};try{e(!1),t()}finally{Dt=r,FP.transition=n}}function V8(){return pi().memoizedState}function lae(e,t,r){var n=ql(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},H8(e))W8(t,r);else if(r=k8(e,t,r,n),r!==null){var o=Ho();ea(r,e,n,o),Z8(r,t,n)}}function cae(e,t,r){var n=ql(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(H8(e))W8(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,ta(s,a)){var l=t.interleaved;l===null?(o.next=o,n4(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}r=k8(e,t,o,n),r!==null&&(o=Ho(),ea(r,e,n,o),Z8(r,t,n))}}function H8(e){var t=e.alternate;return e===lr||t!==null&&t===lr}function W8(e,t){Sg=G_=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Z8(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,H6(e,r)}}var q_={readContext:mi,useCallback:Ro,useContext:Ro,useEffect:Ro,useImperativeHandle:Ro,useInsertionEffect:Ro,useLayoutEffect:Ro,useMemo:Ro,useReducer:Ro,useRef:Ro,useState:Ro,useDebugValue:Ro,useDeferredValue:Ro,useTransition:Ro,useMutableSource:Ro,useSyncExternalStore:Ro,useId:Ro,unstable_isNewReconciler:!1},dae={readContext:mi,useCallback:function(e,t){return Ra().memoizedState=[e,t===void 0?null:t],e},useContext:mi,useEffect:o7,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,k_(4194308,4,L8.bind(null,t,e),r)},useLayoutEffect:function(e,t){return k_(4194308,4,e,t)},useInsertionEffect:function(e,t){return k_(4,2,e,t)},useMemo:function(e,t){var r=Ra();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ra();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=lae.bind(null,lr,e),[n.memoizedState,e]},useRef:function(e){var t=Ra();return e={current:e},t.memoizedState=e},useState:r7,useDebugValue:m4,useDeferredValue:function(e){return Ra().memoizedState=e},useTransition:function(){var e=r7(!1),t=e[0];return e=sae.bind(null,e[1]),Ra().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=lr,o=Ra();if(tr){if(r===void 0)throw Error(ie(407));r=r()}else{if(r=t(),Kr===null)throw Error(ie(349));(Fd&30)!==0||T8(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,o7($8.bind(null,n,i,e),[e]),n.flags|=2048,Vg(9,E8.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ra(),t=Kr.identifierPrefix;if(tr){var r=Es,n=Ts;r=(n&~(1<<32-Ji(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=jg++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=aae++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},uae={readContext:mi,useCallback:B8,useContext:mi,useEffect:f4,useImperativeHandle:M8,useInsertionEffect:N8,useLayoutEffect:F8,useMemo:j8,useReducer:LP,useRef:z8,useState:function(){return LP(Ug)},useDebugValue:m4,useDeferredValue:function(e){var t=pi();return U8(t,Or.memoizedState,e)},useTransition:function(){var e=LP(Ug)[0],t=pi().memoizedState;return[e,t]},useMutableSource:D8,useSyncExternalStore:R8,useId:V8,unstable_isNewReconciler:!1},fae={readContext:mi,useCallback:B8,useContext:mi,useEffect:f4,useImperativeHandle:M8,useInsertionEffect:N8,useLayoutEffect:F8,useMemo:j8,useReducer:MP,useRef:z8,useState:function(){return MP(Ug)},useDebugValue:m4,useDeferredValue:function(e){var t=pi();return Or===null?t.memoizedState=e:U8(t,Or.memoizedState,e)},useTransition:function(){var e=MP(Ug)[0],t=pi().memoizedState;return[e,t]},useMutableSource:D8,useSyncExternalStore:R8,useId:V8,unstable_isNewReconciler:!1};function Xi(e,t){if(e&&e.defaultProps){t=cr({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function y6(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:cr({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var s0={isMounted:function(e){return(e=e._reactInternals)?jd(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ho(),o=ql(e),i=$s(n,o);i.payload=t,r!=null&&(i.callback=r),t=Zl(e,i,o),t!==null&&(ea(t,e,o,n),w_(t,e,o))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ho(),o=ql(e),i=$s(n,o);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Zl(e,i,o),t!==null&&(ea(t,e,o,n),w_(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ho(),n=ql(e),o=$s(r,n);o.tag=2,t!=null&&(o.callback=t),t=Zl(e,o,n),t!==null&&(ea(t,e,n,r),w_(t,e,n))}};function n7(e,t,r,n,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,a):t.prototype&&t.prototype.isPureReactComponent?!zg(r,n)||!zg(o,i):!0}function G8(e,t,r){var n=!1,o=Ql,i=t.contextType;return typeof i=="object"&&i!==null?i=mi(i):(o=_n(t)?zd:$o.current,n=t.contextTypes,i=(n=n!=null)?rm(e,o):Ql),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=s0,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function i7(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&s0.enqueueReplaceState(t,t.state,null)}function _6(e,t,r,n){var o=e.stateNode;o.props=r,o.state=e.memoizedState,o.refs={},i4(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=mi(i):(i=_n(t)?zd:$o.current,o.context=rm(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(y6(e,t,i,r),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&s0.enqueueReplaceState(o,o.state,null),W_(e,r,o,n),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function am(e,t){try{var r="",n=t;do r+=Une(n),n=n.return;while(n);var o=r}catch(i){o=`
7
+ Error generating stack: `+i.message+`
8
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function BP(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function I6(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var mae=typeof WeakMap=="function"?WeakMap:Map;function q8(e,t,r){r=$s(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){X_||(X_=!0,$6=n),I6(e,t)},r}function K8(e,t,r){r=$s(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){I6(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){I6(e,t),typeof n!="function"&&(Gl===null?Gl=new Set([this]):Gl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),r}function a7(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new mae;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=Pae.bind(null,e,t,r),t.then(e,e))}function s7(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function l7(e,t,r,n,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=$s(-1,1),t.tag=2,Zl(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var pae=Fs.ReactCurrentOwner,bn=!1;function Vo(e,t,r,n){t.child=e===null?S8(t,null,r,n):nm(t,e.child,r,n)}function c7(e,t,r,n,o){r=r.render;var i=t.ref;return Jf(t,o),n=d4(e,t,r,n,i,o),r=u4(),e!==null&&!bn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ns(e,t,o)):(tr&&r&&Y6(t),t.flags|=1,Vo(e,t,n,o),t.child)}function d7(e,t,r,n,o){if(e===null){var i=r.type;return typeof i=="function"&&!_4(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,X8(e,t,i,n,o)):(e=R_(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var a=i.memoizedProps;if(r=r.compare,r=r!==null?r:zg,r(a,n)&&e.ref===t.ref)return Ns(e,t,o)}return t.flags|=1,e=Kl(i,n),e.ref=t.ref,e.return=t,t.child=e}function X8(e,t,r,n,o){if(e!==null){var i=e.memoizedProps;if(zg(i,n)&&e.ref===t.ref)if(bn=!1,t.pendingProps=n=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(bn=!0);else return t.lanes=e.lanes,Ns(e,t,o)}return w6(e,t,r,n,o)}function Q8(e,t,r){var n=t.pendingProps,o=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(qf,jn),jn|=r;else{if((r&1073741824)===0)return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Mt(qf,jn),jn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,Mt(qf,jn),jn|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,Mt(qf,jn),jn|=n;return Vo(e,t,o,r),t.child}function Y8(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function w6(e,t,r,n,o){var i=_n(r)?zd:$o.current;return i=rm(t,i),Jf(t,o),r=d4(e,t,r,n,i,o),n=u4(),e!==null&&!bn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ns(e,t,o)):(tr&&n&&Y6(t),t.flags|=1,Vo(e,t,r,o),t.child)}function u7(e,t,r,n,o){if(_n(r)){var i=!0;B_(t)}else i=!1;if(Jf(t,o),t.stateNode===null)C_(e,t),G8(t,r,n),_6(t,r,n,o),n=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=r.contextType;typeof c=="object"&&c!==null?c=mi(c):(c=_n(r)?zd:$o.current,c=rm(t,c));var d=r.getDerivedStateFromProps,u=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||l!==c)&&i7(t,a,n,c),Fl=!1;var f=t.memoizedState;a.state=f,W_(t,n,a,o),l=t.memoizedState,s!==n||f!==l||yn.current||Fl?(typeof d=="function"&&(y6(t,r,d,n),l=t.memoizedState),(s=Fl||n7(t,r,s,n,f,l,c))?(u||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),a.props=n,a.state=l,a.context=c,n=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{a=t.stateNode,C8(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Xi(t.type,s),a.props=c,u=t.pendingProps,f=a.context,l=r.contextType,typeof l=="object"&&l!==null?l=mi(l):(l=_n(r)?zd:$o.current,l=rm(t,l));var m=r.getDerivedStateFromProps;(d=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==u||f!==l)&&i7(t,a,n,l),Fl=!1,f=t.memoizedState,a.state=f,W_(t,n,a,o);var p=t.memoizedState;s!==u||f!==p||yn.current||Fl?(typeof m=="function"&&(y6(t,r,m,n),p=t.memoizedState),(c=Fl||n7(t,r,c,n,f,p,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,p,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,p,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=p),a.props=n,a.state=p,a.context=l,n=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return S6(e,t,r,n,i,o)}function S6(e,t,r,n,o,i){Y8(e,t);var a=(t.flags&128)!==0;if(!n&&!a)return o&&XB(t,r,!1),Ns(e,t,i);n=t.stateNode,pae.current=t;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&a?(t.child=nm(t,e.child,null,i),t.child=nm(t,null,s,i)):Vo(e,t,s,i),t.memoizedState=n.state,o&&XB(t,r,!0),t.child}function J8(e){var t=e.stateNode;t.pendingContext?KB(e,t.pendingContext,t.pendingContext!==t.context):t.context&&KB(e,t.context,!1),a4(e,t.containerInfo)}function f7(e,t,r,n,o){return om(),e4(o),t.flags|=256,Vo(e,t,r,n),t.child}var k6={dehydrated:null,treeContext:null,retryLane:0};function C6(e){return{baseLanes:e,cachePool:null,transitions:null}}function e9(e,t,r){var n=t.pendingProps,o=sr.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Mt(sr,o&1),e===null)return x6(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=n.children,e=n.fallback,i?(n=t.mode,i=t.child,a={mode:"hidden",children:a},(n&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=a):i=d0(a,n,0,null),e=Od(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=C6(r),t.memoizedState=k6,e):p4(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return hae(e,t,a,n,s,o,r);if(i){i=n.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:n.children};return(a&1)===0&&t.child!==o?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=Kl(o,l),n.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=Kl(s,i):(i=Od(i,a,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,a=e.child.memoizedState,a=a===null?C6(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~r,t.memoizedState=k6,n}return i=e.child,e=i.sibling,n=Kl(i,{mode:"visible",children:n.children}),(t.mode&1)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function p4(e,t){return t=d0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function v_(e,t,r,n){return n!==null&&e4(n),nm(t,e.child,null,r),e=p4(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hae(e,t,r,n,o,i,a){if(r)return t.flags&256?(t.flags&=-257,n=BP(Error(ie(422))),v_(e,t,a,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,o=t.mode,n=d0({mode:"visible",children:n.children},o,0,null),i=Od(i,o,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,(t.mode&1)!==0&&nm(t,e.child,null,a),t.child.memoizedState=C6(a),t.memoizedState=k6,i);if((t.mode&1)===0)return v_(e,t,a,null);if(o.data==="$!"){if(n=o.nextSibling&&o.nextSibling.dataset,n)var s=n.dgst;return n=s,i=Error(ie(419)),n=BP(i,n,void 0),v_(e,t,a,n)}if(s=(a&e.childLanes)!==0,bn||s){if(n=Kr,n!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(n.suspendedLanes|a))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,zs(e,o),ea(n,e,o,-1))}return y4(),n=BP(Error(ie(421))),v_(e,t,a,n)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Dae.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Un=Wl(o.nextSibling),Vn=t,tr=!0,Yi=null,e!==null&&(ci[di++]=Ts,ci[di++]=Es,ci[di++]=Nd,Ts=e.id,Es=e.overflow,Nd=t),t=p4(t,n.children),t.flags|=4096,t)}function m7(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),b6(e.return,t,r)}function jP(e,t,r,n,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=o)}function t9(e,t,r){var n=t.pendingProps,o=n.revealOrder,i=n.tail;if(Vo(e,t,n.children,r),n=sr.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&m7(e,r,t);else if(e.tag===19)m7(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Mt(sr,n),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(r=t.child,o=null;r!==null;)e=r.alternate,e!==null&&Z_(e)===null&&(o=r),r=r.sibling;r=o,r===null?(o=t.child,t.child=null):(o=r.sibling,r.sibling=null),jP(t,!1,o,r,i);break;case"backwards":for(r=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Z_(e)===null){t.child=o;break}e=o.sibling,o.sibling=r,r=o,o=e}jP(t,!0,r,null,i);break;case"together":jP(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function C_(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ns(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Ld|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(ie(153));if(t.child!==null){for(e=t.child,r=Kl(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Kl(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function gae(e,t,r){switch(t.tag){case 3:J8(t),om();break;case 5:P8(t);break;case 1:_n(t.type)&&B_(t);break;case 4:a4(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,o=t.memoizedProps.value;Mt(V_,n._currentValue),n._currentValue=o;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Mt(sr,sr.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?e9(e,t,r):(Mt(sr,sr.current&1),e=Ns(e,t,r),e!==null?e.sibling:null);Mt(sr,sr.current&1);break;case 19:if(n=(r&t.childLanes)!==0,(e.flags&128)!==0){if(n)return t9(e,t,r);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Mt(sr,sr.current),n)break;return null;case 22:case 23:return t.lanes=0,Q8(e,t,r)}return Ns(e,t,r)}var r9,P6,o9,n9;r9=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};P6=function(){};o9=function(e,t,r,n){var o=e.memoizedProps;if(o!==n){e=t.stateNode,$d($a.current);var i=null;switch(r){case"input":o=KP(e,o),n=KP(e,n),i=[];break;case"select":o=cr({},o,{value:void 0}),n=cr({},n,{value:void 0}),i=[];break;case"textarea":o=YP(e,o),n=YP(e,n),i=[];break;default:typeof o.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=L_)}e6(r,n);var a;r=null;for(c in o)if(!n.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Dg.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(s=o?.[c],n.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(r||(r={}),r[a]=l[a])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Dg.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&qt("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};n9=function(e,t,r,n){r!==n&&(t.flags|=4)};function fg(e,t){if(!tr)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function To(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags&14680064,n|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)r|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function vae(e,t,r){var n=t.pendingProps;switch(J6(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return To(t),null;case 1:return _n(t.type)&&M_(),To(t),null;case 3:return n=t.stateNode,im(),Kt(yn),Kt($o),l4(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(h_(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Yi!==null&&(z6(Yi),Yi=null))),P6(e,t),To(t),null;case 5:s4(t);var o=$d(Bg.current);if(r=t.type,e!==null&&t.stateNode!=null)o9(e,t,r,n,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(ie(166));return To(t),null}if(e=$d($a.current),h_(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[Ta]=t,n[Lg]=i,e=(t.mode&1)!==0,r){case"dialog":qt("cancel",n),qt("close",n);break;case"iframe":case"object":case"embed":qt("load",n);break;case"video":case"audio":for(o=0;o<xg.length;o++)qt(xg[o],n);break;case"source":qt("error",n);break;case"img":case"image":case"link":qt("error",n),qt("load",n);break;case"details":qt("toggle",n);break;case"input":_B(n,i),qt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},qt("invalid",n);break;case"textarea":wB(n,i),qt("invalid",n)}e6(r,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var s=i[a];a==="children"?typeof s=="string"?n.textContent!==s&&(i.suppressHydrationWarning!==!0&&p_(n.textContent,s,e),o=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&p_(n.textContent,s,e),o=["children",""+s]):Dg.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&qt("scroll",n)}switch(r){case"input":r_(n),IB(n,i,!0);break;case"textarea":r_(n),SB(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=L_)}n=o,t.updateQueue=n,n!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=$7(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Ta]=t,e[Lg]=n,r9(e,t,!1,!1),t.stateNode=e;e:{switch(a=t6(r,n),r){case"dialog":qt("cancel",e),qt("close",e),o=n;break;case"iframe":case"object":case"embed":qt("load",e),o=n;break;case"video":case"audio":for(o=0;o<xg.length;o++)qt(xg[o],e);o=n;break;case"source":qt("error",e),o=n;break;case"img":case"image":case"link":qt("error",e),qt("load",e),o=n;break;case"details":qt("toggle",e),o=n;break;case"input":_B(e,n),o=KP(e,n),qt("invalid",e);break;case"option":o=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},o=cr({},n,{value:void 0}),qt("invalid",e);break;case"textarea":wB(e,n),o=YP(e,n),qt("invalid",e);break;default:o=n}e6(r,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?z7(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&A7(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Rg(e,l):typeof l=="number"&&Rg(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Dg.hasOwnProperty(i)?l!=null&&i==="onScroll"&&qt("scroll",e):l!=null&&L6(e,i,l,a))}switch(r){case"input":r_(e),IB(e,n,!1);break;case"textarea":r_(e),SB(e);break;case"option":n.value!=null&&e.setAttribute("value",""+Xl(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Kf(e,!!n.multiple,i,!1):n.defaultValue!=null&&Kf(e,!!n.multiple,n.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=L_)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return To(t),null;case 6:if(e&&t.stateNode!=null)n9(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(ie(166));if(r=$d(Bg.current),$d($a.current),h_(t)){if(n=t.stateNode,r=t.memoizedProps,n[Ta]=t,(i=n.nodeValue!==r)&&(e=Vn,e!==null))switch(e.tag){case 3:p_(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&p_(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Ta]=t,t.stateNode=n}return To(t),null;case 13:if(Kt(sr),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(tr&&Un!==null&&(t.mode&1)!==0&&(t.flags&128)===0)I8(),om(),t.flags|=98560,i=!1;else if(i=h_(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(ie(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(ie(317));i[Ta]=t}else om(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;To(t),i=!1}else Yi!==null&&(z6(Yi),Yi=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(sr.current&1)!==0?zr===0&&(zr=3):y4())),t.updateQueue!==null&&(t.flags|=4),To(t),null);case 4:return im(),P6(e,t),e===null&&Ng(t.stateNode.containerInfo),To(t),null;case 10:return o4(t.type._context),To(t),null;case 17:return _n(t.type)&&M_(),To(t),null;case 19:if(Kt(sr),i=t.memoizedState,i===null)return To(t),null;if(n=(t.flags&128)!==0,a=i.rendering,a===null)if(n)fg(i,!1);else{if(zr!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Z_(e),a!==null){for(t.flags|=128,fg(i,!1),n=a.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Mt(sr,sr.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ir()>sm&&(t.flags|=128,n=!0,fg(i,!1),t.lanes=4194304)}else{if(!n)if(e=Z_(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),fg(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!tr)return To(t),null}else 2*Ir()-i.renderingStartTime>sm&&r!==1073741824&&(t.flags|=128,n=!0,fg(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ir(),t.sibling=null,r=sr.current,Mt(sr,n?r&1|2:r&1),t):(To(t),null);case 22:case 23:return b4(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(jn&1073741824)!==0&&(To(t),t.subtreeFlags&6&&(t.flags|=8192)):To(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function xae(e,t){switch(J6(t),t.tag){case 1:return _n(t.type)&&M_(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return im(),Kt(yn),Kt($o),l4(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return s4(t),null;case 13:if(Kt(sr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));om()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Kt(sr),null;case 4:return im(),null;case 10:return o4(t.type._context),null;case 22:case 23:return b4(),null;case 24:return null;default:return null}}var x_=!1,Eo=!1,bae=typeof WeakSet=="function"?WeakSet:Set,Ie=null;function Gf(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){hr(e,t,n)}else r.current=null}function D6(e,t,r){try{r()}catch(n){hr(e,t,n)}}var p7=!1;function yae(e,t){if(u6=z_,e=c8(),Q6(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var m;u!==r||o!==0&&u.nodeType!==3||(s=a+o),u!==i||n!==0&&u.nodeType!==3||(l=a+n),u.nodeType===3&&(a+=u.nodeValue.length),(m=u.firstChild)!==null;)f=u,u=m;for(;;){if(u===e)break t;if(f===r&&++c===o&&(s=a),f===i&&++d===n&&(l=a),(m=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=m}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(f6={focusedElem:e,selectionRange:r},z_=!1,Ie=t;Ie!==null;)if(t=Ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ie=e;else for(;Ie!==null;){t=Ie;try{var p=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var g=p.memoizedProps,y=p.memoizedState,v=t.stateNode,x=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Xi(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(I){hr(t,t.return,I)}if(e=t.sibling,e!==null){e.return=t.return,Ie=e;break}Ie=t.return}return p=p7,p7=!1,p}function kg(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&D6(t,r,i)}o=o.next}while(o!==n)}}function l0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function R6(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function i9(e){var t=e.alternate;t!==null&&(e.alternate=null,i9(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ta],delete t[Lg],delete t[h6],delete t[rae],delete t[oae])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function a9(e){return e.tag===5||e.tag===3||e.tag===4}function h7(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||a9(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function T6(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=L_));else if(n!==4&&(e=e.child,e!==null))for(T6(e,t,r),e=e.sibling;e!==null;)T6(e,t,r),e=e.sibling}function E6(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(E6(e,t,r),e=e.sibling;e!==null;)E6(e,t,r),e=e.sibling}var uo=null,Qi=!1;function zl(e,t,r){for(r=r.child;r!==null;)s9(e,t,r),r=r.sibling}function s9(e,t,r){if(Ea&&typeof Ea.onCommitFiberUnmount=="function")try{Ea.onCommitFiberUnmount(e0,r)}catch{}switch(r.tag){case 5:Eo||Gf(r,t);case 6:var n=uo,o=Qi;uo=null,zl(e,t,r),uo=n,Qi=o,uo!==null&&(Qi?(e=uo,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):uo.removeChild(r.stateNode));break;case 18:uo!==null&&(Qi?(e=uo,r=r.stateNode,e.nodeType===8?OP(e.parentNode,r):e.nodeType===1&&OP(e,r),Ag(e)):OP(uo,r.stateNode));break;case 4:n=uo,o=Qi,uo=r.stateNode.containerInfo,Qi=!0,zl(e,t,r),uo=n,Qi=o;break;case 0:case 11:case 14:case 15:if(!Eo&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&D6(r,t,a),o=o.next}while(o!==n)}zl(e,t,r);break;case 1:if(!Eo&&(Gf(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){hr(r,t,s)}zl(e,t,r);break;case 21:zl(e,t,r);break;case 22:r.mode&1?(Eo=(n=Eo)||r.memoizedState!==null,zl(e,t,r),Eo=n):zl(e,t,r);break;default:zl(e,t,r)}}function g7(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new bae),t.forEach(function(n){var o=Rae.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function Ki(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var o=r[n];try{var i=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:uo=s.stateNode,Qi=!1;break e;case 3:uo=s.stateNode.containerInfo,Qi=!0;break e;case 4:uo=s.stateNode.containerInfo,Qi=!0;break e}s=s.return}if(uo===null)throw Error(ie(160));s9(i,a,o),uo=null,Qi=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){hr(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)l9(t,e),t=t.sibling}function l9(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ki(t,e),Da(e),n&4){try{kg(3,e,e.return),l0(3,e)}catch(g){hr(e,e.return,g)}try{kg(5,e,e.return)}catch(g){hr(e,e.return,g)}}break;case 1:Ki(t,e),Da(e),n&512&&r!==null&&Gf(r,r.return);break;case 5:if(Ki(t,e),Da(e),n&512&&r!==null&&Gf(r,r.return),e.flags&32){var o=e.stateNode;try{Rg(o,"")}catch(g){hr(e,e.return,g)}}if(n&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=r!==null?r.memoizedProps:i,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&T7(o,i),t6(s,a);var c=t6(s,i);for(a=0;a<l.length;a+=2){var d=l[a],u=l[a+1];d==="style"?z7(o,u):d==="dangerouslySetInnerHTML"?A7(o,u):d==="children"?Rg(o,u):L6(o,d,u,c)}switch(s){case"input":XP(o,i);break;case"textarea":E7(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var m=i.value;m!=null?Kf(o,!!i.multiple,m,!1):f!==!!i.multiple&&(i.defaultValue!=null?Kf(o,!!i.multiple,i.defaultValue,!0):Kf(o,!!i.multiple,i.multiple?[]:"",!1))}o[Lg]=i}catch(g){hr(e,e.return,g)}}break;case 6:if(Ki(t,e),Da(e),n&4){if(e.stateNode===null)throw Error(ie(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){hr(e,e.return,g)}}break;case 3:if(Ki(t,e),Da(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ag(t.containerInfo)}catch(g){hr(e,e.return,g)}break;case 4:Ki(t,e),Da(e);break;case 13:Ki(t,e),Da(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(v4=Ir())),n&4&&g7(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Eo=(c=Eo)||d,Ki(t,e),Eo=c):Ki(t,e),Da(e),n&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&(e.mode&1)!==0)for(Ie=e,d=e.child;d!==null;){for(u=Ie=d;Ie!==null;){switch(f=Ie,m=f.child,f.tag){case 0:case 11:case 14:case 15:kg(4,f,f.return);break;case 1:Gf(f,f.return);var p=f.stateNode;if(typeof p.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(g){hr(n,r,g)}}break;case 5:Gf(f,f.return);break;case 22:if(f.memoizedState!==null){x7(u);continue}}m!==null?(m.return=f,Ie=m):x7(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{o=u.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=u.stateNode,l=u.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=O7("display",a))}catch(g){hr(e,e.return,g)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(g){hr(e,e.return,g)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Ki(t,e),Da(e),n&4&&g7(e);break;case 21:break;default:Ki(t,e),Da(e)}}function Da(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(a9(r)){var n=r;break e}r=r.return}throw Error(ie(160))}switch(n.tag){case 5:var o=n.stateNode;n.flags&32&&(Rg(o,""),n.flags&=-33);var i=h7(e);E6(e,i,o);break;case 3:case 4:var a=n.stateNode.containerInfo,s=h7(e);T6(e,s,a);break;default:throw Error(ie(161))}}catch(l){hr(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _ae(e,t,r){Ie=e,c9(e,t,r)}function c9(e,t,r){for(var n=(e.mode&1)!==0;Ie!==null;){var o=Ie,i=o.child;if(o.tag===22&&n){var a=o.memoizedState!==null||x_;if(!a){var s=o.alternate,l=s!==null&&s.memoizedState!==null||Eo;s=x_;var c=Eo;if(x_=a,(Eo=l)&&!c)for(Ie=o;Ie!==null;)a=Ie,l=a.child,a.tag===22&&a.memoizedState!==null?b7(o):l!==null?(l.return=a,Ie=l):b7(o);for(;i!==null;)Ie=i,c9(i,t,r),i=i.sibling;Ie=o,x_=s,Eo=c}v7(e,t,r)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,Ie=i):v7(e,t,r)}}function v7(e){for(;Ie!==null;){var t=Ie;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Eo||l0(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Eo)if(r===null)n.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Xi(t.type,r.memoizedProps);n.componentDidUpdate(o,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&t7(t,i,n);break;case 3:var a=t.updateQueue;if(a!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}t7(t,a,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&Ag(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(ie(163))}Eo||t.flags&512&&R6(t)}catch(f){hr(t,t.return,f)}}if(t===e){Ie=null;break}if(r=t.sibling,r!==null){r.return=t.return,Ie=r;break}Ie=t.return}}function x7(e){for(;Ie!==null;){var t=Ie;if(t===e){Ie=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Ie=r;break}Ie=t.return}}function b7(e){for(;Ie!==null;){var t=Ie;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{l0(4,t)}catch(l){hr(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var o=t.return;try{n.componentDidMount()}catch(l){hr(t,o,l)}}var i=t.return;try{R6(t)}catch(l){hr(t,i,l)}break;case 5:var a=t.return;try{R6(t)}catch(l){hr(t,a,l)}}}catch(l){hr(t,t.return,l)}if(t===e){Ie=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Ie=s;break}Ie=t.return}}var Iae=Math.ceil,K_=Fs.ReactCurrentDispatcher,h4=Fs.ReactCurrentOwner,fi=Fs.ReactCurrentBatchConfig,vt=0,Kr=null,Rr=null,fo=0,jn=0,qf=Jl(0),zr=0,Hg=null,Ld=0,c0=0,g4=0,Cg=null,xn=null,v4=0,sm=1/0,Ds=null,X_=!1,$6=null,Gl=null,b_=!1,jl=null,Q_=0,Pg=0,A6=null,P_=-1,D_=0;function Ho(){return(vt&6)!==0?Ir():P_!==-1?P_:P_=Ir()}function ql(e){return(e.mode&1)===0?1:(vt&2)!==0&&fo!==0?fo&-fo:iae.transition!==null?(D_===0&&(D_=G7()),D_):(e=Dt,e!==0||(e=window.event,e=e===void 0?16:e8(e.type)),e)}function ea(e,t,r,n){if(50<Pg)throw Pg=0,A6=null,Error(ie(185));Wg(e,r,n),((vt&2)===0||e!==Kr)&&(e===Kr&&((vt&2)===0&&(c0|=r),zr===4&&Ml(e,fo)),In(e,n),r===1&&vt===0&&(t.mode&1)===0&&(sm=Ir()+500,i0&&ec()))}function In(e,t){var r=e.callbackNode;sie(e,t);var n=O_(e,e===Kr?fo:0);if(n===0)r!==null&&PB(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&PB(r),t===1)e.tag===0?nae(y7.bind(null,e)):b8(y7.bind(null,e)),eae(function(){(vt&6)===0&&ec()}),r=null;else{switch(q7(n)){case 1:r=V6;break;case 4:r=W7;break;case 16:r=A_;break;case 536870912:r=Z7;break;default:r=A_}r=v9(r,d9.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function d9(e,t){if(P_=-1,D_=0,(vt&6)!==0)throw Error(ie(327));var r=e.callbackNode;if(em()&&e.callbackNode!==r)return null;var n=O_(e,e===Kr?fo:0);if(n===0)return null;if((n&30)!==0||(n&e.expiredLanes)!==0||t)t=Y_(e,n);else{t=n;var o=vt;vt|=2;var i=f9();(Kr!==e||fo!==t)&&(Ds=null,sm=Ir()+500,Ad(e,t));do try{kae();break}catch(s){u9(e,s)}while(!0);r4(),K_.current=i,vt=o,Rr!==null?t=0:(Kr=null,fo=0,t=zr)}if(t!==0){if(t===2&&(o=a6(e),o!==0&&(n=o,t=O6(e,o))),t===1)throw r=Hg,Ad(e,0),Ml(e,n),In(e,Ir()),r;if(t===6)Ml(e,n);else{if(o=e.current.alternate,(n&30)===0&&!wae(o)&&(t=Y_(e,n),t===2&&(i=a6(e),i!==0&&(n=i,t=O6(e,i))),t===1))throw r=Hg,Ad(e,0),Ml(e,n),In(e,Ir()),r;switch(e.finishedWork=o,e.finishedLanes=n,t){case 0:case 1:throw Error(ie(345));case 2:Rd(e,xn,Ds);break;case 3:if(Ml(e,n),(n&130023424)===n&&(t=v4+500-Ir(),10<t)){if(O_(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){Ho(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=p6(Rd.bind(null,e,xn,Ds),t);break}Rd(e,xn,Ds);break;case 4:if(Ml(e,n),(n&4194240)===n)break;for(t=e.eventTimes,o=-1;0<n;){var a=31-Ji(n);i=1<<a,a=t[a],a>o&&(o=a),n&=~i}if(n=o,n=Ir()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Iae(n/1960))-n,10<n){e.timeoutHandle=p6(Rd.bind(null,e,xn,Ds),n);break}Rd(e,xn,Ds);break;case 5:Rd(e,xn,Ds);break;default:throw Error(ie(329))}}}return In(e,Ir()),e.callbackNode===r?d9.bind(null,e):null}function O6(e,t){var r=Cg;return e.current.memoizedState.isDehydrated&&(Ad(e,t).flags|=256),e=Y_(e,t),e!==2&&(t=xn,xn=r,t!==null&&z6(t)),e}function z6(e){xn===null?xn=e:xn.push.apply(xn,e)}function wae(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var o=r[n],i=o.getSnapshot;o=o.value;try{if(!ta(i(),o))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ml(e,t){for(t&=~g4,t&=~c0,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ji(t),n=1<<r;e[r]=-1,t&=~n}}function y7(e){if((vt&6)!==0)throw Error(ie(327));em();var t=O_(e,0);if((t&1)===0)return In(e,Ir()),null;var r=Y_(e,t);if(e.tag!==0&&r===2){var n=a6(e);n!==0&&(t=n,r=O6(e,n))}if(r===1)throw r=Hg,Ad(e,0),Ml(e,t),In(e,Ir()),r;if(r===6)throw Error(ie(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Rd(e,xn,Ds),In(e,Ir()),null}function x4(e,t){var r=vt;vt|=1;try{return e(t)}finally{vt=r,vt===0&&(sm=Ir()+500,i0&&ec())}}function Md(e){jl!==null&&jl.tag===0&&(vt&6)===0&&em();var t=vt;vt|=1;var r=fi.transition,n=Dt;try{if(fi.transition=null,Dt=1,e)return e()}finally{Dt=n,fi.transition=r,vt=t,(vt&6)===0&&ec()}}function b4(){jn=qf.current,Kt(qf)}function Ad(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Jie(r)),Rr!==null)for(r=Rr.return;r!==null;){var n=r;switch(J6(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&M_();break;case 3:im(),Kt(yn),Kt($o),l4();break;case 5:s4(n);break;case 4:im();break;case 13:Kt(sr);break;case 19:Kt(sr);break;case 10:o4(n.type._context);break;case 22:case 23:b4()}r=r.return}if(Kr=e,Rr=e=Kl(e.current,null),fo=jn=t,zr=0,Hg=null,g4=c0=Ld=0,xn=Cg=null,Ed!==null){for(t=0;t<Ed.length;t++)if(r=Ed[t],n=r.interleaved,n!==null){r.interleaved=null;var o=n.next,i=r.pending;if(i!==null){var a=i.next;i.next=o,n.next=a}r.pending=n}Ed=null}return e}function u9(e,t){do{var r=Rr;try{if(r4(),S_.current=q_,G_){for(var n=lr.memoizedState;n!==null;){var o=n.queue;o!==null&&(o.pending=null),n=n.next}G_=!1}if(Fd=0,qr=Or=lr=null,Sg=!1,jg=0,h4.current=null,r===null||r.return===null){zr=1,Hg=t,Rr=null;break}e:{var i=e,a=r.return,s=r,l=t;if(t=fo,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=s,u=d.tag;if((d.mode&1)===0&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=s7(a);if(m!==null){m.flags&=-257,l7(m,a,s,i,t),m.mode&1&&a7(i,c,t),t=m,l=c;var p=t.updateQueue;if(p===null){var g=new Set;g.add(l),t.updateQueue=g}else p.add(l);break e}else{if((t&1)===0){a7(i,c,t),y4();break e}l=Error(ie(426))}}else if(tr&&s.mode&1){var y=s7(a);if(y!==null){(y.flags&65536)===0&&(y.flags|=256),l7(y,a,s,i,t),e4(am(l,s));break e}}i=l=am(l,s),zr!==4&&(zr=2),Cg===null?Cg=[i]:Cg.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=q8(i,l,t);e7(i,v);break e;case 1:s=l;var x=i.type,_=i.stateNode;if((i.flags&128)===0&&(typeof x.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Gl===null||!Gl.has(_)))){i.flags|=65536,t&=-t,i.lanes|=t;var I=K8(i,s,t);e7(i,I);break e}}i=i.return}while(i!==null)}p9(r)}catch(S){t=S,Rr===r&&r!==null&&(Rr=r=r.return);continue}break}while(!0)}function f9(){var e=K_.current;return K_.current=q_,e===null?q_:e}function y4(){(zr===0||zr===3||zr===2)&&(zr=4),Kr===null||(Ld&268435455)===0&&(c0&268435455)===0||Ml(Kr,fo)}function Y_(e,t){var r=vt;vt|=2;var n=f9();(Kr!==e||fo!==t)&&(Ds=null,Ad(e,t));do try{Sae();break}catch(o){u9(e,o)}while(!0);if(r4(),vt=r,K_.current=n,Rr!==null)throw Error(ie(261));return Kr=null,fo=0,zr}function Sae(){for(;Rr!==null;)m9(Rr)}function kae(){for(;Rr!==null&&!Yne();)m9(Rr)}function m9(e){var t=g9(e.alternate,e,jn);e.memoizedProps=e.pendingProps,t===null?p9(e):Rr=t,h4.current=null}function p9(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=vae(r,t,jn),r!==null){Rr=r;return}}else{if(r=xae(r,t),r!==null){r.flags&=32767,Rr=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{zr=6,Rr=null;return}}if(t=t.sibling,t!==null){Rr=t;return}Rr=t=e}while(t!==null);zr===0&&(zr=5)}function Rd(e,t,r){var n=Dt,o=fi.transition;try{fi.transition=null,Dt=1,Cae(e,t,r,n)}finally{fi.transition=o,Dt=n}return null}function Cae(e,t,r,n){do em();while(jl!==null);if((vt&6)!==0)throw Error(ie(327));r=e.finishedWork;var o=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(ie(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(lie(e,i),e===Kr&&(Rr=Kr=null,fo=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||b_||(b_=!0,v9(A_,function(){return em(),null})),i=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||i){i=fi.transition,fi.transition=null;var a=Dt;Dt=1;var s=vt;vt|=4,h4.current=null,yae(e,r),l9(r,e),qie(f6),z_=!!u6,f6=u6=null,e.current=r,_ae(r,e,o),Jne(),vt=s,Dt=a,fi.transition=i}else e.current=r;if(b_&&(b_=!1,jl=e,Q_=o),i=e.pendingLanes,i===0&&(Gl=null),rie(r.stateNode,n),In(e,Ir()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],n(o.value,{componentStack:o.stack,digest:o.digest});if(X_)throw X_=!1,e=$6,$6=null,e;return(Q_&1)!==0&&e.tag!==0&&em(),i=e.pendingLanes,(i&1)!==0?e===A6?Pg++:(Pg=0,A6=e):Pg=0,ec(),null}function em(){if(jl!==null){var e=q7(Q_),t=fi.transition,r=Dt;try{if(fi.transition=null,Dt=16>e?16:e,jl===null)var n=!1;else{if(e=jl,jl=null,Q_=0,(vt&6)!==0)throw Error(ie(331));var o=vt;for(vt|=4,Ie=e.current;Ie!==null;){var i=Ie,a=i.child;if((Ie.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(Ie=c;Ie!==null;){var d=Ie;switch(d.tag){case 0:case 11:case 15:kg(8,d,i)}var u=d.child;if(u!==null)u.return=d,Ie=u;else for(;Ie!==null;){d=Ie;var f=d.sibling,m=d.return;if(i9(d),d===c){Ie=null;break}if(f!==null){f.return=m,Ie=f;break}Ie=m}}}var p=i.alternate;if(p!==null){var g=p.child;if(g!==null){p.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}Ie=i}}if((i.subtreeFlags&2064)!==0&&a!==null)a.return=i,Ie=a;else e:for(;Ie!==null;){if(i=Ie,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:kg(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,Ie=v;break e}Ie=i.return}}var x=e.current;for(Ie=x;Ie!==null;){a=Ie;var _=a.child;if((a.subtreeFlags&2064)!==0&&_!==null)_.return=a,Ie=_;else e:for(a=x;Ie!==null;){if(s=Ie,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:l0(9,s)}}catch(S){hr(s,s.return,S)}if(s===a){Ie=null;break e}var I=s.sibling;if(I!==null){I.return=s.return,Ie=I;break e}Ie=s.return}}if(vt=o,ec(),Ea&&typeof Ea.onPostCommitFiberRoot=="function")try{Ea.onPostCommitFiberRoot(e0,e)}catch{}n=!0}return n}finally{Dt=r,fi.transition=t}}return!1}function _7(e,t,r){t=am(r,t),t=q8(e,t,1),e=Zl(e,t,1),t=Ho(),e!==null&&(Wg(e,1,t),In(e,t))}function hr(e,t,r){if(e.tag===3)_7(e,e,r);else for(;t!==null;){if(t.tag===3){_7(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Gl===null||!Gl.has(n))){e=am(r,e),e=K8(t,e,1),t=Zl(t,e,1),e=Ho(),t!==null&&(Wg(t,1,e),In(t,e));break}}t=t.return}}function Pae(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ho(),e.pingedLanes|=e.suspendedLanes&r,Kr===e&&(fo&r)===r&&(zr===4||zr===3&&(fo&130023424)===fo&&500>Ir()-v4?Ad(e,0):g4|=r),In(e,t)}function h9(e,t){t===0&&((e.mode&1)===0?t=1:(t=i_,i_<<=1,(i_&130023424)===0&&(i_=4194304)));var r=Ho();e=zs(e,t),e!==null&&(Wg(e,t,r),In(e,r))}function Dae(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),h9(e,r)}function Rae(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ie(314))}n!==null&&n.delete(t),h9(e,r)}var g9;g9=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||yn.current)bn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return bn=!1,gae(e,t,r);bn=(e.flags&131072)!==0}else bn=!1,tr&&(t.flags&1048576)!==0&&y8(t,U_,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;C_(e,t),e=t.pendingProps;var o=rm(t,$o.current);Jf(t,r),o=d4(null,t,n,e,o,r);var i=u4();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,_n(n)?(i=!0,B_(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,i4(t),o.updater=s0,t.stateNode=o,o._reactInternals=t,_6(t,n,e,r),t=S6(null,t,n,!0,i,r)):(t.tag=0,tr&&i&&Y6(t),Vo(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(C_(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=Eae(n),e=Xi(n,e),o){case 0:t=w6(null,t,n,e,r);break e;case 1:t=u7(null,t,n,e,r);break e;case 11:t=c7(null,t,n,e,r);break e;case 14:t=d7(null,t,n,Xi(n.type,e),r);break e}throw Error(ie(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Xi(n,o),w6(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Xi(n,o),u7(e,t,n,o,r);case 3:e:{if(J8(t),e===null)throw Error(ie(387));n=t.pendingProps,i=t.memoizedState,o=i.element,C8(e,t),W_(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=am(Error(ie(423)),t),t=f7(e,t,n,r,o);break e}else if(n!==o){o=am(Error(ie(424)),t),t=f7(e,t,n,r,o);break e}else for(Un=Wl(t.stateNode.containerInfo.firstChild),Vn=t,tr=!0,Yi=null,r=S8(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(om(),n===o){t=Ns(e,t,r);break e}Vo(e,t,n,r)}t=t.child}return t;case 5:return P8(t),e===null&&x6(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,m6(n,o)?a=null:i!==null&&m6(n,i)&&(t.flags|=32),Y8(e,t),Vo(e,t,a,r),t.child;case 6:return e===null&&x6(t),null;case 13:return e9(e,t,r);case 4:return a4(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=nm(t,null,n,r):Vo(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Xi(n,o),c7(e,t,n,o,r);case 7:return Vo(e,t,t.pendingProps,r),t.child;case 8:return Vo(e,t,t.pendingProps.children,r),t.child;case 12:return Vo(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Mt(V_,n._currentValue),n._currentValue=a,i!==null)if(ta(i.value,a)){if(i.children===o.children&&!yn.current){t=Ns(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=$s(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),b6(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ie(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),b6(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Vo(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Jf(t,r),o=mi(o),n=n(o),t.flags|=1,Vo(e,t,n,r),t.child;case 14:return n=t.type,o=Xi(n,t.pendingProps),o=Xi(n.type,o),d7(e,t,n,o,r);case 15:return X8(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:Xi(n,o),C_(e,t),t.tag=1,_n(n)?(e=!0,B_(t)):e=!1,Jf(t,r),G8(t,n,o),_6(t,n,o,r),S6(null,t,n,!0,e,r);case 19:return t9(e,t,r);case 22:return Q8(e,t,r)}throw Error(ie(156,t.tag))};function v9(e,t){return H7(e,t)}function Tae(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,r,n){return new Tae(e,t,r,n)}function _4(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Eae(e){if(typeof e=="function")return _4(e)?1:0;if(e!=null){if(e=e.$$typeof,e===B6)return 11;if(e===j6)return 14}return 2}function Kl(e,t){var r=e.alternate;return r===null?(r=ui(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function R_(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")_4(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Lf:return Od(r.children,o,i,t);case M6:a=8,o|=8;break;case WP:return e=ui(12,r,t,o|2),e.elementType=WP,e.lanes=i,e;case ZP:return e=ui(13,r,t,o),e.elementType=ZP,e.lanes=i,e;case GP:return e=ui(19,r,t,o),e.elementType=GP,e.lanes=i,e;case P7:return d0(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k7:a=10;break e;case C7:a=9;break e;case B6:a=11;break e;case j6:a=14;break e;case Nl:a=16,n=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=ui(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function Od(e,t,r,n){return e=ui(7,e,n,t),e.lanes=r,e}function d0(e,t,r,n){return e=ui(22,e,n,t),e.elementType=P7,e.lanes=r,e.stateNode={isHidden:!1},e}function UP(e,t,r){return e=ui(6,e,null,t),e.lanes=r,e}function VP(e,t,r){return t=ui(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $ae(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=CP(0),this.expirationTimes=CP(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=CP(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function I4(e,t,r,n,o,i,a,s,l){return e=new $ae(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ui(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},i4(i),e}function Aae(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ff,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function x9(e){if(!e)return Ql;e=e._reactInternals;e:{if(jd(e)!==e||e.tag!==1)throw Error(ie(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(_n(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(ie(171))}if(e.tag===1){var r=e.type;if(_n(r))return x8(e,r,t)}return t}function b9(e,t,r,n,o,i,a,s,l){return e=I4(r,n,!0,e,o,i,a,s,l),e.context=x9(null),r=e.current,n=Ho(),o=ql(r),i=$s(n,o),i.callback=t??null,Zl(r,i,o),e.current.lanes=o,Wg(e,o,n),In(e,n),e}function u0(e,t,r,n){var o=t.current,i=Ho(),a=ql(o);return r=x9(r),t.context===null?t.context=r:t.pendingContext=r,t=$s(i,a),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=Zl(o,t,a),e!==null&&(ea(e,o,a,i),w_(e,o,a)),a}function J_(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function I7(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function w4(e,t){I7(e,t),(e=e.alternate)&&I7(e,t)}function Oae(){return null}var y9=typeof reportError=="function"?reportError:function(e){console.error(e)};function S4(e){this._internalRoot=e}f0.prototype.render=S4.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ie(409));u0(e,t,null,null)};f0.prototype.unmount=S4.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Md(function(){u0(null,e,null,null)}),t[Os]=null}};function f0(e){this._internalRoot=e}f0.prototype.unstable_scheduleHydration=function(e){if(e){var t=Q7();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ll.length&&t!==0&&t<Ll[r].priority;r++);Ll.splice(r,0,e),r===0&&J7(e)}};function k4(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function w7(){}function zae(e,t,r,n,o){if(o){if(typeof n=="function"){var i=n;n=function(){var c=J_(a);i.call(c)}}var a=b9(t,n,e,0,null,!1,!1,"",w7);return e._reactRootContainer=a,e[Os]=a.current,Ng(e.nodeType===8?e.parentNode:e),Md(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof n=="function"){var s=n;n=function(){var c=J_(l);s.call(c)}}var l=I4(e,0,!1,null,null,!1,!1,"",w7);return e._reactRootContainer=l,e[Os]=l.current,Ng(e.nodeType===8?e.parentNode:e),Md(function(){u0(t,l,r,n)}),l}function p0(e,t,r,n,o){var i=r._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var s=o;o=function(){var l=J_(a);s.call(l)}}u0(t,a,e,o)}else a=zae(r,t,e,o,n);return J_(a)}K7=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=vg(t.pendingLanes);r!==0&&(H6(t,r|1),In(t,Ir()),(vt&6)===0&&(sm=Ir()+500,ec()))}break;case 13:Md(function(){var n=zs(e,1);if(n!==null){var o=Ho();ea(n,e,1,o)}}),w4(e,1)}};W6=function(e){if(e.tag===13){var t=zs(e,134217728);if(t!==null){var r=Ho();ea(t,e,134217728,r)}w4(e,134217728)}};X7=function(e){if(e.tag===13){var t=ql(e),r=zs(e,t);if(r!==null){var n=Ho();ea(r,e,t,n)}w4(e,t)}};Q7=function(){return Dt};Y7=function(e,t){var r=Dt;try{return Dt=e,t()}finally{Dt=r}};o6=function(e,t,r){switch(t){case"input":if(XP(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var o=n0(n);if(!o)throw Error(ie(90));R7(n),XP(n,o)}}}break;case"textarea":E7(e,r);break;case"select":t=r.value,t!=null&&Kf(e,!!r.multiple,t,!1)}};L7=x4;M7=Md;var Nae={usingClientEntryPoint:!1,Events:[Gg,Uf,n0,N7,F7,x4]},mg={findFiberByHostInstance:Td,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Fae={bundleType:mg.bundleType,version:mg.version,rendererPackageName:mg.rendererPackageName,rendererConfig:mg.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Fs.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=U7(e),e===null?null:e.stateNode},findFiberByHostInstance:mg.findFiberByHostInstance||Oae,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(pg=__REACT_DEVTOOLS_GLOBAL_HOOK__,!pg.isDisabled&&pg.supportsFiber))try{e0=pg.inject(Fae),Ea=pg}catch{}var pg;Zn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nae;Zn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!k4(t))throw Error(ie(200));return Aae(e,t,null,r)};Zn.createRoot=function(e,t){if(!k4(e))throw Error(ie(299));var r=!1,n="",o=y9;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=I4(e,1,!1,null,null,r,!1,n,o),e[Os]=t.current,Ng(e.nodeType===8?e.parentNode:e),new S4(t)};Zn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ie(188)):(e=Object.keys(e).join(","),Error(ie(268,e)));return e=U7(t),e=e===null?null:e.stateNode,e};Zn.flushSync=function(e){return Md(e)};Zn.hydrate=function(e,t,r){if(!m0(t))throw Error(ie(200));return p0(null,e,t,!0,r)};Zn.hydrateRoot=function(e,t,r){if(!k4(e))throw Error(ie(405));var n=r!=null&&r.hydratedSources||null,o=!1,i="",a=y9;if(r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),t=b9(t,null,e,1,r??null,o,!1,i,a),e[Os]=t.current,Ng(e),n)for(e=0;e<n.length;e++)r=n[e],o=r._getVersion,o=o(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new f0(t)};Zn.render=function(e,t,r){if(!m0(t))throw Error(ie(200));return p0(null,e,t,!1,r)};Zn.unmountComponentAtNode=function(e){if(!m0(e))throw Error(ie(40));return e._reactRootContainer?(Md(function(){p0(null,null,e,!1,function(){e._reactRootContainer=null,e[Os]=null})}),!0):!1};Zn.unstable_batchedUpdates=x4;Zn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!m0(r))throw Error(ie(200));if(e==null||e._reactInternals===void 0)throw Error(ie(38));return p0(e,t,r,!1,n)};Zn.version="18.3.1-next-f1338f8080-20240426"});var tc=_a((EEe,w9)=>{"use strict";function I9(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I9)}catch(e){console.error(e)}}I9(),w9.exports=_9()});var mG=_a(PT=>{"use strict";var fG=tc();PT.createRoot=fG.createRoot,PT.hydrateRoot=fG.hydrateRoot;var Gdt});var qY=_a((J_t,GY)=>{"use strict";GY.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,o,i;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(o=n;o--!==0;)if(!e(t[o],r[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(r).length)return!1;for(o=n;o--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=n;o--!==0;){var a=i[o];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var vn=function(){return vn=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},vn.apply(this,arguments)};function vy(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function LF(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ky=b(D());var So=b(D());var ud="right-scroll-bar-position",fd="width-before-scroll-bar",w2="with-scroll-bars-hidden",S2="--removed-body-scroll-bar-size";function _y(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var YF=b(D());function JF(e,t){var r=(0,YF.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Iy=b(D());var boe=typeof window<"u"?Iy.useLayoutEffect:Iy.useEffect,eL=new WeakMap;function k2(e,t){var r=JF(t||null,function(n){return e.forEach(function(o){return _y(o,n)})});return boe(function(){var n=eL.get(r);if(n){var o=new Set(n),i=new Set(e),a=r.current;o.forEach(function(s){i.has(s)||_y(s,null)}),i.forEach(function(s){o.has(s)||_y(s,a)})}eL.set(r,e)},[e]),r}function yoe(e){return e}function _oe(e,t){t===void 0&&(t=yoe);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var d=a;a=[],d.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){a.push(d),c()},filter:function(d){return a=a.filter(d),r}}}};return o}function C2(e){e===void 0&&(e={});var t=_oe(null);return t.options=vn({async:!0,ssr:!1},e),t}var tL=b(D()),rL=function(e){var t=e.sideCar,r=vy(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return tL.createElement(n,vn({},r))};rL.isSideCarExport=!0;function P2(e,t){return e.useMedium(t),rL}var wy=C2();var D2=function(){},Mh=So.forwardRef(function(e,t){var r=So.useRef(null),n=So.useState({onScrollCapture:D2,onWheelCapture:D2,onTouchMoveCapture:D2}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,m=e.noRelative,p=e.noIsolation,g=e.inert,y=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,_=e.gapMode,I=vy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,w=k2([r,t]),P=vn(vn({},I),o);return So.createElement(So.Fragment,null,d&&So.createElement(S,{sideCar:wy,removeScrollBar:c,shards:u,noRelative:m,noIsolation:p,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:r,gapMode:_}),a?So.cloneElement(So.Children.only(s),vn(vn({},P),{ref:w})):So.createElement(x,vn({},P,{className:l,ref:w}),s))});Mh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Mh.classNames={fullWidth:fd,zeroRight:ud};var Zt=b(D());var yf=b(D());var iL=b(D());var oL;var nL=function(){if(oL)return oL;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ioe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nL();return t&&e.setAttribute("nonce",t),e}function woe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Soe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var R2=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Ioe())&&(woe(t,r),Soe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var T2=function(){var e=R2();return function(t,r){iL.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var Bh=function(){var e=T2(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t};var koe={left:0,top:0,right:0,gap:0},E2=function(e){return parseInt(e||"",10)||0},Coe=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[E2(r),E2(n),E2(o)]},$2=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return koe;var t=Coe(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}};var Poe=Bh(),bf="data-scroll-locked",Doe=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
9
+ .`.concat(w2,` {
10
+ overflow: hidden `).concat(n,`;
11
+ padding-right: `).concat(s,"px ").concat(n,`;
12
+ }
13
+ body[`).concat(bf,`] {
14
+ overflow: hidden `).concat(n,`;
15
+ overscroll-behavior: contain;
16
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
17
+ padding-left: `.concat(o,`px;
18
+ padding-top: `).concat(i,`px;
19
+ padding-right: `).concat(a,`px;
20
+ margin-left:0;
21
+ margin-top:0;
22
+ margin-right: `).concat(s,"px ").concat(n,`;
23
+ `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
24
+ }
25
+
26
+ .`).concat(ud,` {
27
+ right: `).concat(s,"px ").concat(n,`;
28
+ }
29
+
30
+ .`).concat(fd,` {
31
+ margin-right: `).concat(s,"px ").concat(n,`;
32
+ }
33
+
34
+ .`).concat(ud," .").concat(ud,` {
35
+ right: 0 `).concat(n,`;
36
+ }
37
+
38
+ .`).concat(fd," .").concat(fd,` {
39
+ margin-right: 0 `).concat(n,`;
40
+ }
41
+
42
+ body[`).concat(bf,`] {
43
+ `).concat(S2,": ").concat(s,`px;
44
+ }
45
+ `)},aL=function(){var e=parseInt(document.body.getAttribute(bf)||"0",10);return isFinite(e)?e:0},Roe=function(){yf.useEffect(function(){return document.body.setAttribute(bf,(aL()+1).toString()),function(){var e=aL()-1;e<=0?document.body.removeAttribute(bf):document.body.setAttribute(bf,e.toString())}},[])},A2=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Roe();var i=yf.useMemo(function(){return $2(o)},[o]);return yf.createElement(Poe,{styles:Doe(i,!t,o,r?"":"!important")})};var O2=!1;if(typeof window<"u")try{jh=Object.defineProperty({},"passive",{get:function(){return O2=!0,!0}}),window.addEventListener("test",jh,jh),window.removeEventListener("test",jh,jh)}catch{O2=!1}var jh,md=O2?{passive:!1}:!1;var Toe=function(e){return e.tagName==="TEXTAREA"},sL=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Toe(e)&&r[t]==="visible")},Eoe=function(e){return sL(e,"overflowY")},$oe=function(e){return sL(e,"overflowX")},z2=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=lL(e,n);if(o){var i=cL(e,n),a=i[1],s=i[2];if(a>s)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Aoe=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Ooe=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},lL=function(e,t){return e==="v"?Eoe(t):$oe(t)},cL=function(e,t){return e==="v"?Aoe(t):Ooe(t)},zoe=function(e,t){return e==="h"&&t==="rtl"?-1:1},dL=function(e,t,r,n,o){var i=zoe(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),c=!1,d=a>0,u=0,f=0;do{if(!s)break;var m=cL(e,s),p=m[0],g=m[1],y=m[2],v=g-y-i*p;(p||v)&&lL(e,s)&&(u+=v,f+=p);var x=s.parentNode;s=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(o&&Math.abs(u)<1||!o&&a>u)||!d&&(o&&Math.abs(f)<1||!o&&-a>f))&&(c=!0),c};var Sy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uL=function(e){return[e.deltaX,e.deltaY]},fL=function(e){return e&&"current"in e?e.current:e},Noe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Foe=function(e){return`
46
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
47
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
48
+ `)},Loe=0,_f=[];function mL(e){var t=Zt.useRef([]),r=Zt.useRef([0,0]),n=Zt.useRef(),o=Zt.useState(Loe++)[0],i=Zt.useState(Bh)[0],a=Zt.useRef(e);Zt.useEffect(function(){a.current=e},[e]),Zt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=LF([e.lockRef.current],(e.shards||[]).map(fL),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=Zt.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var v=Sy(g),x=r.current,_="deltaX"in g?g.deltaX:x[0]-v[0],I="deltaY"in g?g.deltaY:x[1]-v[1],S,w=g.target,P=Math.abs(_)>Math.abs(I)?"h":"v";if("touches"in g&&P==="h"&&w.type==="range")return!1;var $=window.getSelection(),B=$&&$.anchorNode,W=B?B===w||B.contains(w):!1;if(W)return!1;var H=z2(P,w);if(!H)return!0;if(H?S=P:(S=P==="v"?"h":"v",H=z2(P,w)),!H)return!1;if(!n.current&&"changedTouches"in g&&(_||I)&&(n.current=S),!S)return!0;var K=n.current||S;return dL(K,y,g,K==="h"?_:I,!0)},[]),l=Zt.useCallback(function(g){var y=g;if(!(!_f.length||_f[_f.length-1]!==i)){var v="deltaY"in y?uL(y):Sy(y),x=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&Noe(S.delta,v)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var _=(a.current.shards||[]).map(fL).filter(Boolean).filter(function(S){return S.contains(y.target)}),I=_.length>0?s(y,_[0]):!a.current.noIsolation;I&&y.cancelable&&y.preventDefault()}}},[]),c=Zt.useCallback(function(g,y,v,x){var _={name:g,delta:y,target:v,should:x,shadowParent:Moe(v)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(I){return I!==_})},1)},[]),d=Zt.useCallback(function(g){r.current=Sy(g),n.current=void 0},[]),u=Zt.useCallback(function(g){c(g.type,uL(g),g.target,s(g,e.lockRef.current))},[]),f=Zt.useCallback(function(g){c(g.type,Sy(g),g.target,s(g,e.lockRef.current))},[]);Zt.useEffect(function(){return _f.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",l,md),document.addEventListener("touchmove",l,md),document.addEventListener("touchstart",d,md),function(){_f=_f.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,md),document.removeEventListener("touchmove",l,md),document.removeEventListener("touchstart",d,md)}},[]);var m=e.removeScrollBar,p=e.inert;return Zt.createElement(Zt.Fragment,null,p?Zt.createElement(i,{styles:Foe(o)}):null,m?Zt.createElement(A2,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Moe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var pL=P2(wy,mL);var hL=ky.forwardRef(function(e,t){return ky.createElement(Mh,vn({},e,{ref:t,sideCar:pL}))});hL.classNames=Mh.classNames;var Hi=hL;function gt(e){return Object.keys(e)}function N2(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Uh(e,t){let r={...e},n=t;return N2(e)&&N2(t)&&Object.keys(t).forEach(o=>{N2(n[o])&&o in e?r[o]=Uh(r[o],n[o]):r[o]=n[o]}),r}function gL(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Boe(e){return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:e.match(/^calc\((.*?)\)$/)?.[1].split("*")[0].trim()}function Dl(e){let t=Boe(e);return typeof t=="number"?t:typeof t=="string"?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?Number(t.replace("rem",""))*16:t.includes("em")?Number(t.replace("em",""))*16:Number(t):NaN}function F2(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function vL(e,{shouldScale:t=!1}={}){function r(n){if(n===0||n==="0")return`0${e}`;if(typeof n=="number"){let o=`${n/16}${e}`;return t?F2(o):o}if(typeof n=="string"){if(n===""||n.startsWith("calc(")||n.startsWith("clamp(")||n.includes("rgba("))return n;if(n.includes(","))return n.split(",").map(i=>r(i)).join(",");if(n.includes(" "))return n.split(" ").map(i=>r(i)).join(" ");if(n.includes(e))return t?F2(n):n;let o=n.replace("px","");if(!Number.isNaN(Number(o))){let i=`${Number(o)/16}${e}`;return t?F2(i):i}}return n}return r}var Z=vL("rem",{shouldScale:!0}),pd=vL("em");function ws(e){return Object.keys(e).reduce((t,r)=>(e[r]!==void 0&&(t[r]=e[r]),t),{})}function Cy(e){if(typeof e=="number")return!0;if(typeof e=="string"){if(e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!=="")return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(n=>t.test(n))}return!1}var xL=b(D(),1);function ko(e){return Array.isArray(e)||e===null?!1:typeof e=="object"?e.type!==xL.Fragment:!1}var IL=b(O(),1),Dy=b(D(),1);function Gt(e){let t=(0,Dy.createContext)(null);return[({children:o,value:i})=>(0,IL.jsx)(t.Provider,{value:i,children:o}),()=>{let o=(0,Dy.useContext)(t);if(o===null)throw new Error(e);return o}]}var wL=b(O(),1),Ry=b(D(),1);function Co(e=null){let t=(0,Ry.createContext)(e);return[({children:o,value:i})=>(0,wL.jsx)(t.Provider,{value:i,children:o}),()=>(0,Ry.useContext)(t)]}function If(e,t){let r=e;for(;(r=r.parentElement)&&!r.matches(t););return r}function Goe(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].disabled)return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].disabled)return n}return e}function qoe(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].disabled)return n}return e}function Koe(e,t,r){return If(e,r)===If(t,r)}function SL({parentSelector:e,siblingSelector:t,onKeyDown:r,loop:n=!0,activateOnFocus:o=!1,dir:i="rtl",orientation:a}){return s=>{r?.(s);let l=Array.from(If(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(p=>Koe(s.currentTarget,p,e)),c=l.findIndex(p=>s.currentTarget===p),d=qoe(c,l,n),u=Goe(c,l,n),f=i==="rtl"?u:d,m=i==="rtl"?d:u;switch(s.key){case"ArrowRight":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[f].focus(),o&&l[f].click());break}case"ArrowLeft":{a==="horizontal"&&(s.stopPropagation(),s.preventDefault(),l[m].focus(),o&&l[m].click());break}case"ArrowUp":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[u].focus(),o&&l[u].click());break}case"ArrowDown":{a==="vertical"&&(s.stopPropagation(),s.preventDefault(),l[d].focus(),o&&l[d].click());break}case"Home":{s.stopPropagation(),s.preventDefault(),!l[0].disabled&&l[0].focus();break}case"End":{s.stopPropagation(),s.preventDefault();let p=l.length-1;!l[p].disabled&&l[p].focus();break}}}}var Xoe={app:100,modal:200,popover:300,overlay:400,max:9999};function Et(e){return Xoe[e]}var hd=()=>{};function kL(e,t={active:!0}){return typeof e!="function"||!t.active?t.onKeyDown||hd:r=>{r.key==="Escape"&&(e(r),t.onTrigger?.())}}function xe(e,t="size",r=!0){if(e!==void 0)return Cy(e)?r?Z(e):e:`var(--${t}-${e})`}function Ot(e){return xe(e,"mantine-spacing")}function Ee(e){return e===void 0?"var(--mantine-radius-default)":xe(e,"mantine-radius")}function Pt(e){return xe(e,"mantine-font-size")}function CL(e){return xe(e,"mantine-line-height",!1)}function wf(e){if(e)return xe(e,"mantine-shadow",!1)}function Mn(e,t){return r=>{e?.(r),t?.(r)}}function Sf(e,t){return e in t?Dl(t[e]):Dl(e)}function Vh(e,t){let r=e.map(n=>({value:n,px:Sf(n,t)}));return r.sort((n,o)=>n.px-o.px),r}function gd(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function PL(e,t,r){return r?Array.from(If(r,t)?.querySelectorAll(e)||[]).findIndex(n=>n===r):null}var DL=b(D(),1);function RL(){let[e,t]=(0,DL.useState)(-1);return[e,{setHovered:t,resetHovered:()=>t(-1)}]}function Rl(e,t,r){return t===void 0&&r===void 0?e:t!==void 0&&r===void 0?Math.max(e,t):Math.min(t===void 0&&r!==void 0?e:Math.max(e,t),r)}function Po(e="mantine-"){return`${e}${Math.random().toString(36).slice(2,11)}`}function TL(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let r=Object.keys(e),{length:n}=r;if(n!==Object.keys(t).length)return!1;for(let o=0;o<n;o+=1){let i=r[o];if(!(i in t)||e[i]!==t[i]&&!(Number.isNaN(e[i])&&Number.isNaN(t[i])))return!1}return!0}var kf=b(D(),1);function Wi(e){let t=(0,kf.useRef)(e);return(0,kf.useEffect)(()=>{t.current=e}),(0,kf.useMemo)(()=>(...r)=>t.current?.(...r),[])}var vd=b(D(),1);function Ss(e,t){let r=typeof t=="number"?t:t.delay,n=typeof t=="number"?!1:t.flushOnUnmount,o=Wi(e),i=(0,vd.useRef)(0),a=(0,vd.useRef)(()=>{}),s=Object.assign((0,vd.useCallback)((...l)=>{window.clearTimeout(i.current);let c=()=>{i.current!==0&&(i.current=0,o(...l))};a.current=c,s.flush=c,i.current=window.setTimeout(c,r)},[o,r]),{flush:a.current});return(0,vd.useEffect)(()=>()=>{window.clearTimeout(i.current),n&&s.flush()},[s,n]),s}var Ty=b(D(),1),EL=["mousedown","touchstart"];function L2(e,t,r){let n=(0,Ty.useRef)(null);return(0,Ty.useEffect)(()=>{let o=i=>{let{target:a}=i??{};if(Array.isArray(r)){let s=a?.hasAttribute("data-ignore-outside-clicks")||!document.body.contains(a)&&a.tagName!=="HTML";r.every(c=>!!c&&!i.composedPath().includes(c))&&!s&&e()}else n.current&&!n.current.contains(a)&&e()};return(t||EL).forEach(i=>document.addEventListener(i,o)),()=>{(t||EL).forEach(i=>document.removeEventListener(i,o))}},[n,e,r]),n}var Ey=b(D(),1);function M2({timeout:e=2e3}={}){let[t,r]=(0,Ey.useState)(null),[n,o]=(0,Ey.useState)(!1),[i,a]=(0,Ey.useState)(null),s=d=>{window.clearTimeout(i),a(window.setTimeout(()=>o(!1),e)),o(d)};return{copy:d=>{"clipboard"in navigator?navigator.clipboard.writeText(d).then(()=>s(!0)).catch(u=>r(u)):r(new Error("useClipboard: navigator.clipboard is not supported"))},reset:()=>{o(!1),r(null),window.clearTimeout(i)},error:t,copied:n}}var Cf=b(D(),1);function Qoe(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function Yoe(e,t){return typeof window<"u"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function xd(e,t,{getInitialValueInEffect:r}={getInitialValueInEffect:!0}){let[n,o]=(0,Cf.useState)(r?t:Yoe(e)),i=(0,Cf.useRef)(null);return(0,Cf.useEffect)(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),o(i.current.matches),Qoe(i.current,a=>o(a.matches))},[e]),n}function Hh(e,t){return xd("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}var $y=b(D(),1),Uo=typeof document<"u"?$y.useLayoutEffect:$y.useEffect;var $L=b(D(),1);var Wh=b(D(),1);function yr(e,t){let r=(0,Wh.useRef)(!1);(0,Wh.useEffect)(()=>()=>{r.current=!1},[]),(0,Wh.useEffect)(()=>{if(r.current)return e();r.current=!0},t)}function Zh({opened:e,shouldReturnFocus:t=!0}){let r=(0,$L.useRef)(null),n=()=>{r.current&&"focus"in r.current&&typeof r.current.focus=="function"&&r.current?.focus({preventScroll:!0})};return yr(()=>{let o=-1,i=a=>{a.key==="Tab"&&window.clearTimeout(o)};return document.addEventListener("keydown",i),e?r.current=document.activeElement:t&&(o=window.setTimeout(n,10)),()=>{window.clearTimeout(o),document.removeEventListener("keydown",i)}},[e,t]),n}var Pf=b(D(),1);var Joe=/input|select|textarea|button|object/,B2="a, input, select, textarea, button, object, [tabindex]";function ene(e){return e.style.display==="none"}function tne(e){if(e.getAttribute("aria-hidden")||e.getAttribute("hidden")||e.getAttribute("type")==="hidden")return!1;let r=e;for(;r&&!(r===document.body||r.nodeType===11);){if(ene(r))return!1;r=r.parentNode}return!0}function AL(e){let t=e.getAttribute("tabindex");return t===null&&(t=void 0),parseInt(t,10)}function Ay(e){let t=e.nodeName.toLowerCase(),r=!Number.isNaN(AL(e));return(Joe.test(t)&&!e.disabled||e instanceof HTMLAnchorElement&&e.href||r)&&tne(e)}function j2(e){let t=AL(e);return(Number.isNaN(t)||t>=0)&&Ay(e)}function OL(e){return Array.from(e.querySelectorAll(B2)).filter(j2)}function zL(e,t){let r=OL(e);if(!r.length){t.preventDefault();return}let n=r[t.shiftKey?0:r.length-1],o=e.getRootNode(),i=n===o.activeElement||e===o.activeElement,a=o.activeElement;if(a.tagName==="INPUT"&&a.getAttribute("type")==="radio"&&(i=r.filter(d=>d.getAttribute("type")==="radio"&&d.getAttribute("name")===a.getAttribute("name")).includes(n)),!i)return;t.preventDefault();let l=r[t.shiftKey?r.length-1:0];l&&l.focus()}function U2(e=!0){let t=(0,Pf.useRef)(null),r=o=>{let i=o.querySelector("[data-autofocus]");if(!i){let a=Array.from(o.querySelectorAll(B2));i=a.find(j2)||a.find(Ay)||null,!i&&Ay(o)&&(i=o)}i&&i.focus({preventScroll:!0})},n=(0,Pf.useCallback)(o=>{e&&o!==null&&t.current!==o&&(o?(setTimeout(()=>{o.getRootNode()&&r(o)}),t.current=o):t.current=null)},[e]);return(0,Pf.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>r(t.current));let o=i=>{i.key==="Tab"&&t.current&&zL(t.current,i)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e]),n}var NL=b(D(),1),rne=e=>(e+1)%1e6;function V2(){let[,e]=(0,NL.useReducer)(rne,0);return e}var ML=b(D(),1);var FL=b(D(),1),one=FL.default.useId||(()=>{});function LL(){let e=one();return e?`mantine-${e.replace(/:/g,"")}`:""}function bt(e){let t=LL(),[r,n]=(0,ML.useState)(t);return Uo(()=>{n(Po())},[]),typeof e=="string"?e:typeof window>"u"?t:r}var ks=b(D(),1);var BL=b(D(),1);function Tl(e,t,r){(0,BL.useEffect)(()=>(window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)),[e,t])}function nne(e,t="use-local-storage"){try{return JSON.stringify(e)}catch{throw new Error(`@mantine/hooks ${t}: Failed to serialize the value`)}}function jL(e){try{return e&&JSON.parse(e)}catch{return e}}function UL(e){return{getItem:o=>{try{return window[e].getItem(o)}catch{return console.warn("use-local-storage: Failed to get value from storage, localStorage is blocked"),null}},setItem:(o,i)=>{try{window[e].setItem(o,i)}catch{console.warn("use-local-storage: Failed to set value to storage, localStorage is blocked")}},removeItem:o=>{try{window[e].removeItem(o)}catch{console.warn("use-local-storage: Failed to remove value from storage, localStorage is blocked")}}}}function VL(e,t){let r=e==="localStorage"?"mantine-local-storage":"mantine-session-storage",{getItem:n,setItem:o,removeItem:i}=UL(e);return function({key:s,defaultValue:l,getInitialValueInEffect:c=!0,sync:d=!0,deserialize:u=jL,serialize:f=m=>nne(m,t)}){let m=(0,ks.useCallback)(x=>{let _;try{_=typeof window>"u"||!(e in window)||window[e]===null||!!x}catch{_=!0}if(_)return l;let I=n(s);return I!==null?u(I):l},[s,l]),[p,g]=(0,ks.useState)(m(c)),y=(0,ks.useCallback)(x=>{x instanceof Function?g(_=>{let I=x(_);return o(s,f(I)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:x(_)}})),I}):(o(s,f(x)),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:x}})),g(x))},[s]),v=(0,ks.useCallback)(()=>{i(s),window.dispatchEvent(new CustomEvent(r,{detail:{key:s,value:l}}))},[]);return Tl("storage",x=>{d&&x.storageArea===window[e]&&x.key===s&&g(u(x.newValue??void 0))}),Tl(r,x=>{d&&x.detail.key===s&&g(x.detail.value)}),(0,ks.useEffect)(()=>{l!==void 0&&p===void 0&&y(l)},[l,p,y]),(0,ks.useEffect)(()=>{let x=m();x!==void 0&&y(x)},[s]),[p===void 0?l:p,y,v]}}function HL(e){let{getItem:t}=UL(e);return function({key:n,defaultValue:o,deserialize:i=jL}){let a;try{a=typeof window>"u"||!(e in window)||window[e]===null}catch{a=!0}if(a)return o;let s=t(n);return s!==null?i(s):o}}function H2(e){return VL("localStorage","use-local-storage")(e)}var ine=HL("localStorage");var WL=b(D(),1);function bd(e,t){if(typeof e=="function")return e(t);typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function Oy(...e){let t=new Map;return r=>{if(e.forEach(n=>{let o=bd(n,r);o&&t.set(n,o)}),t.size>0)return()=>{e.forEach(n=>{let o=t.get(n);o?o():bd(n,null)}),t.clear()}}}function We(...e){return(0,WL.useCallback)(Oy(...e),e)}var ZL=b(D(),1);function ot({value:e,defaultValue:t,finalValue:r,onChange:n=()=>{}}){let[o,i]=(0,ZL.useState)(t!==void 0?t:r),a=(s,...l)=>{i(s),n?.(s,...l)};return e!==void 0?[e,n,!0]:[o,a,!1]}function Cs(e,t){return xd("(prefers-reduced-motion: reduce)",e,t)}var Gh=b(D(),1);function ane(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!TL(e[r],t[r]))return!1;return!0}function sne(e){let t=(0,Gh.useRef)([]),r=(0,Gh.useRef)(0);return ane(t.current,e)||(t.current=e,r.current+=1),[r.current]}function W2(e,t){(0,Gh.useEffect)(e,sne(t))}var qL=b(D(),1);var lne={" ":"space",ArrowLeft:"arrowleft",ArrowRight:"arrowright",ArrowUp:"arrowup",ArrowDown:"arrowdown",Escape:"esc",Esc:"esc",Enter:"enter",Tab:"tab",Backspace:"backspace",Delete:"delete",Insert:"insert",Home:"home",End:"end",PageUp:"pageup",PageDown:"pagedown","+":"plus","-":"minus","*":"asterisk","/":"slash"};function zy(e){let t=e.replace("Key","").toLowerCase();return lne[e]||t}function cne(e){let t=e.toLowerCase().split("+").map(i=>i.trim()),r={alt:t.includes("alt"),ctrl:t.includes("ctrl"),meta:t.includes("meta"),mod:t.includes("mod"),shift:t.includes("shift"),plus:t.includes("[plus]")},n=["alt","ctrl","meta","shift","mod"],o=t.find(i=>!n.includes(i));return{...r,key:o==="[plus]"?"+":o}}function dne(e,t,r){let{alt:n,ctrl:o,meta:i,mod:a,shift:s,key:l}=e,{altKey:c,ctrlKey:d,metaKey:u,shiftKey:f,key:m,code:p}=t;if(n!==c)return!1;if(a){if(!d&&!u)return!1}else if(o!==d||i!==u)return!1;return s!==f?!1:!!(l&&(r?zy(p)===zy(l):zy(m??p)===zy(l)))}function GL(e,t){return r=>dne(cne(e),r,t)}function une(e,t,r=!1){return e.target instanceof HTMLElement?(r||!e.target.isContentEditable)&&!t.includes(e.target.tagName):!0}function qh(e,t=["INPUT","TEXTAREA","SELECT"],r=!1){(0,qL.useEffect)(()=>{let n=o=>{e.forEach(([i,a,s={preventDefault:!0,usePhysicalKeys:!1}])=>{GL(i,s.usePhysicalKeys)(o)&&une(o,t,r)&&(s.preventDefault&&o.preventDefault(),a(o))})};return document.documentElement.addEventListener("keydown",n),()=>document.documentElement.removeEventListener("keydown",n)},[e])}var Zi=b(D(),1);function KL(){let e=window.document;return e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement}function fne(){let e=window.document;return typeof e.exitFullscreen=="function"?e.exitFullscreen():typeof e.msExitFullscreen=="function"?e.msExitFullscreen():typeof e.webkitExitFullscreen=="function"?e.webkitExitFullscreen():typeof e.mozCancelFullScreen=="function"?e.mozCancelFullScreen():null}function mne(e){let t=e;return t.requestFullscreen?.()||t.msRequestFullscreen?.()||t.webkitEnterFullscreen?.()||t.webkitRequestFullscreen?.()||t.mozRequestFullscreen?.()}var XL=["","webkit","moz","ms"];function QL(e,{onFullScreen:t,onError:r}){return XL.forEach(n=>{e.addEventListener(`${n}fullscreenchange`,t),e.addEventListener(`${n}fullscreenerror`,r)}),()=>{XL.forEach(n=>{e.removeEventListener(`${n}fullscreenchange`,t),e.removeEventListener(`${n}fullscreenerror`,r)})}}function Z2(){let[e,t]=(0,Zi.useState)(!1),r=(0,Zi.useRef)(null),n=(0,Zi.useCallback)(s=>{t(s.target===KL())},[t]),o=(0,Zi.useCallback)(s=>{t(!1),console.error(`[@mantine/hooks] use-fullscreen: Error attempting full-screen mode method: ${s} (${s.target})`)},[t]),i=(0,Zi.useCallback)(async()=>{KL()?await fne():await mne(r.current)},[]),a=(0,Zi.useCallback)(s=>{s===null?r.current=window.document.documentElement:r.current=s},[]);return(0,Zi.useEffect)(()=>{if(!r.current&&window.document)return r.current=window.document.documentElement,QL(r.current,{onFullScreen:n,onError:o});if(r.current)return QL(r.current,{onFullScreen:n,onError:o})},[r.current]),{ref:a,toggle:i,fullscreen:e}}var Df=b(D(),1);function G2(e=!1,t){let{onOpen:r,onClose:n}=t||{},[o,i]=(0,Df.useState)(e),a=(0,Df.useCallback)(()=>{i(c=>c||(r?.(),!0))},[r]),s=(0,Df.useCallback)(()=>{i(c=>c&&(n?.(),!1))},[n]),l=(0,Df.useCallback)(()=>{o?s():a()},[s,a,o]);return[o,{open:a,close:s,toggle:l}]}var yd=b(D(),1);function q2(e,t,r={autoInvoke:!1}){let n=(0,yd.useRef)(null),o=(0,yd.useCallback)((...a)=>{n.current||(n.current=window.setTimeout(()=>{e(a),n.current=null},t))},[t]),i=(0,yd.useCallback)(()=>{n.current&&(window.clearTimeout(n.current),n.current=null)},[]);return(0,yd.useEffect)(()=>(r.autoInvoke&&o(),i),[i,o]),{start:o,clear:i}}var Ny=b(D(),1);function K2(e){let t=(0,Ny.useRef)(void 0);return(0,Ny.useEffect)(()=>{t.current=e},[e]),t.current}var Kh=b(D(),1);function X2(e,t,r){let n=(0,Kh.useRef)(null),o=(0,Kh.useRef)(null);return(0,Kh.useEffect)(()=>{let i=typeof r=="function"?r():r;return(i||o.current)&&(n.current=new MutationObserver(e),n.current.observe(i||o.current,t)),()=>{n.current?.disconnect()}},[e,t]),o}var Fy=b(D(),1);function Q2(){let[e,t]=(0,Fy.useState)(!1);return(0,Fy.useEffect)(()=>t(!0),[]),e}function pne(e,t){window.dispatchEvent(new CustomEvent(e,{detail:t}))}function Y2(e){function t(n){let o=Object.keys(n).reduce((i,a)=>(i[`${e}:${a}`]=s=>n[a](s.detail),i),{});Uo(()=>(Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i]),window.addEventListener(i,o[i])}),()=>Object.keys(o).forEach(i=>{window.removeEventListener(i,o[i])})),[o])}function r(n){return(...o)=>pne(`${e}:${String(n)}`,o[0])}return[t,r]}function Ly(){return typeof process<"u"&&process.env?"production":"development"}var J2=b(D(),1);function El(e){let t=J2.default.version;return typeof J2.default.version!="string"||t.startsWith("18.")?e?.ref:e?.props?.ref}function YL(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=YL(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function hne(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=YL(e))&&(n&&(n+=" "),n+=t);return n}var Ke=hne;var gne={};function vne(e){let t={};return e.forEach(r=>{Object.entries(r).forEach(([n,o])=>{t[n]?t[n]=Ke(t[n],o):t[n]=o})}),t}function Gi({theme:e,classNames:t,props:r,stylesCtx:n}){let i=(Array.isArray(t)?t:[t]).map(a=>typeof a=="function"?a(e,r,n):a||gne);return vne(i)}function Ia({theme:e,styles:t,props:r,stylesCtx:n}){return(Array.isArray(t)?t:[t]).reduce((i,a)=>typeof a=="function"?{...i,...a(e,r,n)}:{...i,...a},{})}var WDe=b(D(),1),ZDe=b(O(),1);var My=b(D(),1),Rf=(0,My.createContext)(null);function wa(){let e=(0,My.useContext)(Rf);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function JL(){return wa().cssVariablesResolver}function eM(){return wa().classNamesPrefix}function $l(){return wa().getStyleNonce}function tM(){return wa().withStaticClasses}function rM(){return wa().headless}function oM(){return wa().stylesTransform?.sx}function nM(){return wa().stylesTransform?.styles}function By(){return wa().env||"default"}var y4e=b(D(),1),_4e=b(O(),1);var u4e=b(D(),1),f4e=b(O(),1);function xne(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function bne(e){let t=e.replace("#","");if(t.length===3){let a=t.split("");t=[a[0],a[0],a[1],a[1],a[2],a[2]].join("")}if(t.length===8){let a=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a}}let r=parseInt(t,16),n=r>>16&255,o=r>>8&255,i=r&255;return{r:n,g:o,b:i,a:1}}function yne(e){let[t,r,n,o]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:r,b:n,a:o===void 0?1:o}}function _ne(e){let t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,r=e.match(t);if(!r)return{r:0,g:0,b:0,a:1};let n=parseInt(r[1],10),o=parseInt(r[2],10)/100,i=parseInt(r[3],10)/100,a=r[5]?parseFloat(r[5]):void 0,s=(1-Math.abs(2*i-1))*o,l=n/60,c=s*(1-Math.abs(l%2-1)),d=i-s/2,u,f,m;return l>=0&&l<1?(u=s,f=c,m=0):l>=1&&l<2?(u=c,f=s,m=0):l>=2&&l<3?(u=0,f=s,m=c):l>=3&&l<4?(u=0,f=c,m=s):l>=4&&l<5?(u=c,f=0,m=s):(u=s,f=0,m=c),{r:Math.round((u+d)*255),g:Math.round((f+d)*255),b:Math.round((m+d)*255),a:a||1}}function Tf(e){return xne(e)?bne(e):e.startsWith("rgb")?yne(e):e.startsWith("hsl")?_ne(e):{r:0,g:0,b:0,a:1}}function Xh(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r,g:n,b:o,a:i}=Tf(e),a=1-t,s=l=>Math.round(l*a);return`rgba(${s(r)}, ${s(n)}, ${s(o)}, ${i})`}function Ps(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function eP(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Ine(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function wne(e){if(e.startsWith("oklch("))return(Ine(e)||0)/100;let{r:t,g:r,b:n}=Tf(e),o=t/255,i=r/255,a=n/255,s=eP(o),l=eP(i),c=eP(a);return .2126*s+.7152*l+.0722*c}function Ef(e,t=.179){return e.startsWith("var(")?!1:wne(e)>t}function _r({color:e,theme:t,colorScheme:r}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:r==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Ef(r==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:r==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Ef(r==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Ef(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[n,o]=e.split("."),i=o?Number(o):void 0,a=n in t.colors;if(a){let s=i!==void 0?t.colors[n][i]:t.colors[n][Ps(t,r||"light")];return{color:n,value:s,shade:i,isThemeColor:a,isLight:Ef(s,t.luminanceThreshold),variable:o?`--mantine-color-${n}-${i}`:`--mantine-color-${n}-filled`}}return{color:e,value:e,isThemeColor:a,isLight:Ef(e,t.luminanceThreshold),shade:i,variable:void 0}}function Ze(e,t){let r=_r({color:e||t.primaryColor,theme:t});return r.variable?`var(${r.variable})`:e}function Qh(e,t){let r={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},n=Ze(r.from,t),o=Ze(r.to,t);return`linear-gradient(${r.deg}deg, ${n} 0%, ${o} 100%)`}function ai(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){let i=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${i}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);let{r,g:n,b:o}=Tf(e);return`rgba(${r}, ${n}, ${o}, ${t})`}var _d=ai;var iM=({color:e,theme:t,variant:r,gradient:n,autoContrast:o})=>{let i=_r({color:e,theme:t}),a=typeof o=="boolean"?o:t.autoContrast;if(r==="filled"){let s=a&&i.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:s,border:`${Z(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:s,border:`${Z(1)} solid transparent`}:{background:e,hover:Xh(e,.1),color:s,border:`${Z(1)} solid transparent`}}if(r==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${Z(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:ai(s,.1),hover:ai(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Z(1)} solid transparent`}}return{background:ai(e,.1),hover:ai(e,.12),color:e,border:`${Z(1)} solid transparent`}}if(r==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${Z(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:ai(t.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Z(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:ai(e,.05),color:e,border:`${Z(1)} solid ${e}`};if(r==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${Z(1)} solid transparent`};let s=t.colors[i.color][i.shade];return{background:"transparent",hover:ai(s,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Z(1)} solid transparent`}}return{background:"transparent",hover:ai(e,.12),color:e,border:`${Z(1)} solid transparent`}}return r==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${Z(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${Z(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${Z(1)} solid transparent`}:r==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:Xh(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${Z(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Xh(t.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${Z(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:Xh(t.white,.01),color:e,border:`${Z(1)} solid transparent`}:r==="gradient"?{background:Qh(n,t),hover:Qh(n,t),color:"var(--mantine-color-white)",border:"none"}:r==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${Z(1)} solid var(--mantine-color-default-border)`}:{}};var aM={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};var sM="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",Yh={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:aM,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:iM,autoContrast:!1,luminanceThreshold:.3,fontFamily:sM,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:sM,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:Z(34),lineHeight:"1.3"},h2:{fontSize:Z(26),lineHeight:"1.35"},h3:{fontSize:Z(22),lineHeight:"1.4"},h4:{fontSize:Z(18),lineHeight:"1.45"},h5:{fontSize:Z(16),lineHeight:"1.5"},h6:{fontSize:Z(14),lineHeight:"1.5"}}},fontSizes:{xs:Z(12),sm:Z(14),md:Z(16),lg:Z(18),xl:Z(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:Z(2),sm:Z(4),md:Z(8),lg:Z(16),xl:Z(32)},spacing:{xs:Z(10),sm:Z(12),md:Z(16),lg:Z(20),xl:Z(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), 0 ${Z(1)} ${Z(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(10)} ${Z(15)} ${Z(-5)}, rgba(0, 0, 0, 0.04) 0 ${Z(7)} ${Z(7)} ${Z(-5)}`,md:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(20)} ${Z(25)} ${Z(-5)}, rgba(0, 0, 0, 0.04) 0 ${Z(10)} ${Z(10)} ${Z(-5)}`,lg:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(28)} ${Z(23)} ${Z(-7)}, rgba(0, 0, 0, 0.04) 0 ${Z(12)} ${Z(12)} ${Z(-7)}`,xl:`0 ${Z(1)} ${Z(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${Z(36)} ${Z(28)} ${Z(-7)}, rgba(0, 0, 0, 0.04) 0 ${Z(17)} ${Z(17)} ${Z(-7)}`},other:{},components:{}};var Al=b(O(),1);function tP(e){return e==="auto"||e==="dark"||e==="light"}function lM({key:e="mantine-color-scheme-value"}={}){let t;return{get:r=>{if(typeof window>"u")return r;try{let n=window.localStorage.getItem(e);return tP(n)?n:r}catch{return r}},set:r=>{try{window.localStorage.setItem(e,r)}catch(n){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",n)}},subscribe:r=>{t=n=>{n.storageArea===window.localStorage&&n.key===e&&tP(n.newValue)&&r(n.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}var pM=b(O(),1);var L4e=b(D(),1);var fM=b(O(),1),Id=b(D(),1);var R4e=b(D(),1),T4e=b(O(),1);var Sne="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more \u2013 https://mantine.dev/theming/colors/#primary-color",cM="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function rP(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function dM(e){if(!(e.primaryColor in e.colors))throw new Error(Sne);if(typeof e.primaryShade=="object"&&(!rP(e.primaryShade.dark)||!rP(e.primaryShade.light)))throw new Error(cM);if(typeof e.primaryShade=="number"&&!rP(e.primaryShade))throw new Error(cM)}function uM(e,t){if(!t)return dM(e),e;let r=Uh(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(r.headings.fontFamily=t.fontFamily),dM(r),r}var jy=(0,Id.createContext)(null),mM=()=>(0,Id.useContext)(jy)||Yh;function ft(){let e=(0,Id.useContext)(jy);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function Jh({theme:e,children:t,inherit:r=!0}){let n=mM(),o=(0,Id.useMemo)(()=>uM(r?n:Yh,e),[e,n,r]);return(0,fM.jsx)(jy.Provider,{value:o,children:t})}Jh.displayName="@mantine/core/MantineThemeProvider";function hM(){let e=ft(),t=$l(),r=gt(e.breakpoints).reduce((n,o)=>{let i=e.breakpoints[o].includes("px"),a=Dl(e.breakpoints[o]),s=i?`${a-.1}px`:pd(a-.1),l=i?`${a}px`:pd(a);return`${n}@media (max-width: ${s}) {.mantine-visible-from-${o} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${o} {display: none !important;}}`},"");return(0,pM.jsx)("style",{"data-mantine-styles":"classes",nonce:t?.(),dangerouslySetInnerHTML:{__html:r}})}var yM=b(O(),1);function Uy(e){return Object.entries(e).map(([t,r])=>`${t}: ${r};`).join("")}function $f(e,t){return(Array.isArray(e)?e:[e]).reduce((n,o)=>`${o}{${n}}`,t)}function gM(e,t){let r=Uy(e.variables),n=r?$f(t,r):"",o=Uy(e.dark),i=Uy(e.light),a=o?t===":host"?$f(`${t}([data-mantine-color-scheme="dark"])`,o):$f(`${t}[data-mantine-color-scheme="dark"]`,o):"",s=i?t===":host"?$f(`${t}([data-mantine-color-scheme="light"])`,i):$f(`${t}[data-mantine-color-scheme="light"]`,i):"";return`${n}${a}${s}`}var pDe=b(D(),1),hDe=b(O(),1);var aDe=b(D(),1),sDe=b(O(),1);function Bn({color:e,theme:t,autoContrast:r}){return(typeof r=="boolean"?r:t.autoContrast)&&_r({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function oP(e,t){return Bn({color:e.colors[e.primaryColor][Ps(e,t)],theme:e,autoContrast:null})}var Q4e=b(D(),1),Y4e=b(O(),1);function eg({theme:e,color:t,colorScheme:r,name:n=t,withColorValues:o=!0}){if(!e.colors[t])return{};if(r==="light"){let s=Ps(e,"light"),l={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-filled)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${s===9?8:s+1})`,[`--mantine-color-${n}-light`]:_d(e.colors[t][s],.1),[`--mantine-color-${n}-light-hover`]:_d(e.colors[t][s],.12),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${s})`,[`--mantine-color-${n}-outline-hover`]:_d(e.colors[t][s],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...l}:l}let i=Ps(e,"dark"),a={[`--mantine-color-${n}-text`]:`var(--mantine-color-${n}-4)`,[`--mantine-color-${n}-filled`]:`var(--mantine-color-${n}-${i})`,[`--mantine-color-${n}-filled-hover`]:`var(--mantine-color-${n}-${i===9?8:i+1})`,[`--mantine-color-${n}-light`]:_d(e.colors[t][Math.max(0,i-2)],.15),[`--mantine-color-${n}-light-hover`]:_d(e.colors[t][Math.max(0,i-2)],.2),[`--mantine-color-${n}-light-color`]:`var(--mantine-color-${n}-${Math.max(i-5,0)})`,[`--mantine-color-${n}-outline`]:`var(--mantine-color-${n}-${Math.max(i-4,0)})`,[`--mantine-color-${n}-outline-hover`]:_d(e.colors[t][Math.max(i-4,0)],.05)};return o?{[`--mantine-color-${n}-0`]:e.colors[t][0],[`--mantine-color-${n}-1`]:e.colors[t][1],[`--mantine-color-${n}-2`]:e.colors[t][2],[`--mantine-color-${n}-3`]:e.colors[t][3],[`--mantine-color-${n}-4`]:e.colors[t][4],[`--mantine-color-${n}-5`]:e.colors[t][5],[`--mantine-color-${n}-6`]:e.colors[t][6],[`--mantine-color-${n}-7`]:e.colors[t][7],[`--mantine-color-${n}-8`]:e.colors[t][8],[`--mantine-color-${n}-9`]:e.colors[t][9],...a}:a}var tDe=b(D(),1),rDe=b(O(),1);function vM(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Af(e,t,r){gt(t).forEach(n=>Object.assign(e,{[`--mantine-${r}-${n}`]:t[n]}))}var Vy=e=>{let t=Ps(e,"light"),r=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:Z(e.defaultRadius),n={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":r,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":oP(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":oP(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};Af(n.variables,e.breakpoints,"breakpoint"),Af(n.variables,e.spacing,"spacing"),Af(n.variables,e.fontSizes,"font-size"),Af(n.variables,e.lineHeights,"line-height"),Af(n.variables,e.shadows,"shadow"),Af(n.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((i,a)=>{n.variables[`--mantine-primary-color-${a}`]=`var(--mantine-color-${e.primaryColor}-${a})`}),gt(e.colors).forEach(i=>{let a=e.colors[i];if(vM(a)){Object.assign(n.light,eg({theme:e,name:a.name,color:a.light,colorScheme:"light",withColorValues:!0})),Object.assign(n.dark,eg({theme:e,name:a.name,color:a.dark,colorScheme:"dark",withColorValues:!0}));return}a.forEach((s,l)=>{n.variables[`--mantine-color-${i}-${l}`]=s}),Object.assign(n.light,eg({theme:e,color:i,colorScheme:"light",withColorValues:!1})),Object.assign(n.dark,eg({theme:e,color:i,colorScheme:"dark",withColorValues:!1}))});let o=e.headings.sizes;return gt(o).forEach(i=>{n.variables[`--mantine-${i}-font-size`]=o[i].fontSize,n.variables[`--mantine-${i}-line-height`]=o[i].lineHeight,n.variables[`--mantine-${i}-font-weight`]=o[i].fontWeight||e.headings.fontWeight}),n};function xM({theme:e,generator:t}){let r=Vy(e),n=t?.(e);return n?Uh(r,n):r}var bDe=b(D(),1),yDe=b(O(),1);var nP=Vy(Yh);function bM(e){let t={variables:{},light:{},dark:{}};return gt(e.variables).forEach(r=>{nP.variables[r]!==e.variables[r]&&(t.variables[r]=e.variables[r])}),gt(e.light).forEach(r=>{nP.light[r]!==e.light[r]&&(t.light[r]=e.light[r])}),gt(e.dark).forEach(r=>{nP.dark[r]!==e.dark[r]&&(t.dark[r]=e.dark[r])}),t}function kne(e){return`
49
+ ${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
50
+ ${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
51
+ `}function iP({cssVariablesSelector:e,deduplicateCssVariables:t}){let r=ft(),n=$l(),o=JL(),i=xM({theme:r,generator:o}),a=e===":root"&&t,s=a?bM(i):i,l=gM(s,e);return l?(0,yM.jsx)("style",{"data-mantine-styles":!0,nonce:n?.(),dangerouslySetInnerHTML:{__html:`${l}${a?"":kne(e)}`}}):null}iP.displayName="@mantine/CssVariables";var MDe=b(D(),1);function _M(){let e=console.error;console.error=(...t)=>{t.length>1&&typeof t[0]=="string"&&t[0].toLowerCase().includes("extra attributes from the server")&&typeof t[1]=="string"&&t[1].toLowerCase().includes("data-mantine-color-scheme")||e(...t)}}var Sa=b(D(),1);function Of(e,t){let r=typeof window<"u"&&"matchMedia"in window&&window.matchMedia("(prefers-color-scheme: dark)")?.matches,n=e!=="auto"?e:r?"dark":"light";t()?.setAttribute("data-mantine-color-scheme",n)}function IM({manager:e,defaultColorScheme:t,getRootElement:r,forceColorScheme:n}){let o=(0,Sa.useRef)(null),[i,a]=(0,Sa.useState)(()=>e.get(t)),s=n||i,l=(0,Sa.useCallback)(d=>{n||(Of(d,r),a(d),e.set(d))},[e.set,s,n]),c=(0,Sa.useCallback)(()=>{a(t),Of(t,r),e.clear()},[e.clear,t]);return(0,Sa.useEffect)(()=>(e.subscribe(l),e.unsubscribe),[e.subscribe,e.unsubscribe]),Uo(()=>{Of(e.get(t),r)},[]),(0,Sa.useEffect)(()=>{if(n)return Of(n,r),()=>{};n===void 0&&Of(i,r),typeof window<"u"&&"matchMedia"in window&&(o.current=window.matchMedia("(prefers-color-scheme: dark)"));let d=u=>{i==="auto"&&Of(u.matches?"dark":"light",r)};return o.current?.addEventListener("change",d),()=>o.current?.removeEventListener("change",d)},[i,n]),{colorScheme:s,setColorScheme:l,clearColorScheme:c}}function wM({respectReducedMotion:e,getRootElement:t}){Uo(()=>{e&&t()?.setAttribute("data-respect-reduced-motion","true")},[e])}_M();function Hy({theme:e,children:t,getStyleNonce:r,withStaticClasses:n=!0,withGlobalClasses:o=!0,deduplicateCssVariables:i=!0,withCssVariables:a=!0,cssVariablesSelector:s=":root",classNamesPrefix:l="mantine",colorSchemeManager:c=lM(),defaultColorScheme:d="light",getRootElement:u=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:m,stylesTransform:p,env:g}){let{colorScheme:y,setColorScheme:v,clearColorScheme:x}=IM({defaultColorScheme:d,forceColorScheme:m,manager:c,getRootElement:u});return wM({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:u}),(0,Al.jsx)(Rf.Provider,{value:{colorScheme:y,setColorScheme:v,clearColorScheme:x,getRootElement:u,classNamesPrefix:l,getStyleNonce:r,cssVariablesResolver:f,cssVariablesSelector:s,withStaticClasses:n,stylesTransform:p,env:g},children:(0,Al.jsxs)(Jh,{theme:e,children:[a&&(0,Al.jsx)(iP,{cssVariablesSelector:s,deduplicateCssVariables:i}),o&&(0,Al.jsx)(hM,{}),t]})})}Hy.displayName="@mantine/core/MantineProvider";function SM({children:e,theme:t}){return(0,Al.jsx)(Rf.Provider,{value:{colorScheme:"auto",setColorScheme:()=>{},clearColorScheme:()=>{},getRootElement:()=>document.documentElement,classNamesPrefix:"mantine",cssVariablesSelector:":root",withStaticClasses:!1,headless:!0},children:(0,Al.jsx)(Jh,{theme:t,children:e})})}SM.displayName="@mantine/core/HeadlessMantineProvider";function Zr({classNames:e,styles:t,props:r,stylesCtx:n}){let o=ft();return{resolvedClassNames:Gi({theme:o,classNames:e,props:r,stylesCtx:n||void 0}),resolvedStyles:Ia({theme:o,styles:t,props:r,stylesCtx:n||void 0})}}var Cne={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function kM({theme:e,options:t,unstyled:r}){return Ke(t?.focusable&&!r&&(e.focusClassName||Cne[e.focusRing]),t?.active&&!r&&e.activeClassName)}var LRe=b(D(),1),MRe=b(O(),1);function CM({selector:e,stylesCtx:t,options:r,props:n,theme:o}){return Gi({theme:o,classNames:r?.classNames,props:r?.props||n,stylesCtx:t})[e]}function aP({selector:e,stylesCtx:t,theme:r,classNames:n,props:o}){return Gi({theme:r,classNames:n,props:o,stylesCtx:t})[e]}function PM({rootSelector:e,selector:t,className:r}){return e===t?r:void 0}function DM({selector:e,classes:t,unstyled:r}){return r?void 0:t[e]}function RM({themeName:e,classNamesPrefix:t,selector:r,withStaticClass:n}){return n===!1?[]:e.map(o=>`${t}-${o}-${r}`)}function TM({themeName:e,theme:t,selector:r,props:n,stylesCtx:o}){return e.map(i=>Gi({theme:t,classNames:t.components[i]?.classNames,props:n,stylesCtx:o})?.[r])}function EM({options:e,classes:t,selector:r,unstyled:n}){return e?.variant&&!n?t[`${r}--${e.variant}`]:void 0}function $M({theme:e,options:t,themeName:r,selector:n,classNamesPrefix:o,classNames:i,classes:a,unstyled:s,className:l,rootSelector:c,props:d,stylesCtx:u,withStaticClasses:f,headless:m,transformedStyles:p}){return Ke(kM({theme:e,options:t,unstyled:s||m}),TM({theme:e,themeName:r,selector:n,props:d,stylesCtx:u}),EM({options:t,classes:a,selector:n,unstyled:s}),aP({selector:n,stylesCtx:u,theme:e,classNames:i,props:d}),aP({selector:n,stylesCtx:u,theme:e,classNames:p,props:d}),CM({selector:n,stylesCtx:u,options:t,props:d,theme:e}),PM({rootSelector:c,selector:n,className:l}),DM({selector:n,classes:a,unstyled:s||m}),f&&!m&&RM({themeName:r,classNamesPrefix:o,selector:n,withStaticClass:t?.withStaticClass}),t?.className)}function AM({theme:e,themeName:t,props:r,stylesCtx:n,selector:o}){return t.map(i=>Ia({theme:e,styles:e.components[i]?.styles,props:r,stylesCtx:n})[o]).reduce((i,a)=>({...i,...a}),{})}function Wy({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...Wy({style:n,theme:t})}),{}):typeof e=="function"?e(t):e??{}}var wRe=b(D(),1),SRe=b(O(),1);function OM(e){return e.reduce((t,r)=>(r&&Object.keys(r).forEach(n=>{t[n]={...t[n],...ws(r[n])}}),t),{})}function zM({vars:e,varsResolver:t,theme:r,props:n,stylesCtx:o,selector:i,themeName:a,headless:s}){return OM([s?{}:t?.(r,n,o),...a.map(l=>r.components?.[l]?.vars?.(r,n,o)),e?.(r,n,o)])?.[i]}function NM({theme:e,themeName:t,selector:r,options:n,props:o,stylesCtx:i,rootSelector:a,styles:s,style:l,vars:c,varsResolver:d,headless:u,withStylesTransform:f}){return{...!f&&AM({theme:e,themeName:t,props:o,stylesCtx:i,selector:r}),...!f&&Ia({theme:e,styles:s,props:o,stylesCtx:i})[r],...!f&&Ia({theme:e,styles:n?.styles,props:n?.props||o,stylesCtx:i})[r],...zM({theme:e,props:o,stylesCtx:i,vars:c,varsResolver:d,selector:r,themeName:t,headless:u}),...a===r?Wy({style:l,theme:e}):null,...Wy({style:n?.style,theme:e})}}var ARe=b(D(),1),ORe=b(O(),1);function FM({props:e,stylesCtx:t,themeName:r}){let n=ft(),o=nM()?.();return{getTransformedStyles:a=>o?[...a.map(l=>o(l,{props:e,theme:n,ctx:t})),...r.map(l=>o(n.components[l]?.styles,{props:e,theme:n,ctx:t}))].filter(Boolean):[],withStylesTransform:!!o}}function Q({name:e,classes:t,props:r,stylesCtx:n,className:o,style:i,rootSelector:a="root",unstyled:s,classNames:l,styles:c,vars:d,varsResolver:u}){let f=ft(),m=eM(),p=tM(),g=rM(),y=(Array.isArray(e)?e:[e]).filter(_=>_),{withStylesTransform:v,getTransformedStyles:x}=FM({props:r,stylesCtx:n,themeName:y});return(_,I)=>({className:$M({theme:f,options:I,themeName:y,selector:_,classNamesPrefix:m,classNames:l,classes:t,unstyled:s,className:o,rootSelector:a,props:r,stylesCtx:n,withStaticClasses:p,headless:g,transformedStyles:x([I?.styles,c])}),style:NM({theme:f,themeName:y,selector:_,options:I,props:r,stylesCtx:n,rootSelector:a,styles:c,style:i,vars:d,varsResolver:u,headless:g,withStylesTransform:v})})}function ka(e,t){return typeof e=="boolean"?e:t.autoContrast}var Ca=b(D(),1);var qRe=b(O(),1);function LM(e){let t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(n=>n.remove())}function wd({keepTransitions:e}={}){let t=(0,Ca.useRef)(hd),r=(0,Ca.useRef)(-1),n=(0,Ca.useContext)(Rf),o=$l(),i=(0,Ca.useRef)(o?.());if(!n)throw new Error("[@mantine/core] MantineProvider was not found in tree");let a=u=>{n.setColorScheme(u),t.current=e?()=>{}:LM(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},s=()=>{n.clearColorScheme(),t.current=e?()=>{}:LM(i.current),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current?.()},10)},l=Hh("light",{getInitialValueInEffect:!1}),c=n.colorScheme==="auto"?l:n.colorScheme,d=(0,Ca.useCallback)(()=>a(c==="light"?"dark":"light"),[a,c]);return(0,Ca.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(r.current)},[]),{colorScheme:n.colorScheme,setColorScheme:a,clearColorScheme:s,toggleColorScheme:d}}function Sd(e,t={getInitialValueInEffect:!0}){let r=Hh(e,t),{colorScheme:n}=wd();return n==="auto"?r:n}var rTe=b(D(),1),oTe=b(O(),1);function z(e,t,r){let n=ft(),o=n.components[e]?.defaultProps,i=typeof o=="function"?o(n):o;return{...t,...i,...ws(r)}}var BM=b(O(),1),mTe=b(D(),1);var lTe=b(D(),1),cTe=b(O(),1);function Zy(e){return gt(e).reduce((t,r)=>e[r]!==void 0?`${t}${gL(r)}:${e[r]};`:t,"").trim()}function MM({selector:e,styles:t,media:r,container:n}){let o=t?Zy(t):"",i=Array.isArray(r)?r.map(s=>`@media${s.query}{${e}{${Zy(s.styles)}}}`):[],a=Array.isArray(n)?n.map(s=>`@container ${s.query}{${e}{${Zy(s.styles)}}}`):[];return`${o?`${e}{${o}}`:""}${i.join("")}${a.join("")}`.trim()}function kd(e){let t=$l();return(0,BM.jsx)("style",{"data-mantine-styles":"inline",nonce:t?.(),dangerouslySetInnerHTML:{__html:MM(e)}})}var xTe=b(D(),1),bTe=b(O(),1);function Gr(e){let{m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:g,pr:y,pe:v,ps:x,bd:_,bg:I,c:S,opacity:w,ff:P,fz:$,fw:B,lts:W,ta:H,lh:K,fs:T,tt:k,td:E,w:C,miw:A,maw:R,h:N,mih:U,mah:G,bgsz:oe,bgp:ve,bgr:pe,bga:Y,pos:ne,top:we,left:se,bottom:Ae,right:He,inset:et,display:dt,flex:Fe,hiddenFrom:Jt,visibleFrom:er,lightHidden:co,darkHidden:he,sx:fe,...Se}=e;return{styleProps:ws({m:t,mx:r,my:n,mt:o,mb:i,ml:a,mr:s,me:l,ms:c,p:d,px:u,py:f,pt:m,pb:p,pl:g,pr:y,pe:v,ps:x,bd:_,bg:I,c:S,opacity:w,ff:P,fz:$,fw:B,lts:W,ta:H,lh:K,fs:T,tt:k,td:E,w:C,miw:A,maw:R,h:N,mih:U,mah:G,bgsz:oe,bgp:ve,bgr:pe,bga:Y,pos:ne,top:we,left:se,bottom:Ae,right:He,inset:et,display:dt,flex:Fe,hiddenFrom:Jt,visibleFrom:er,lightHidden:co,darkHidden:he,sx:fe}),rest:Se}}var jM={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"size",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};var oEe=b(D(),1),nEe=b(O(),1);var PTe=b(D(),1),DTe=b(O(),1);var wTe=b(D(),1),STe=b(O(),1);function tg(e,t){let r=_r({color:e,theme:t});return r.color==="dimmed"?"var(--mantine-color-dimmed)":r.color==="bright"?"var(--mantine-color-bright)":r.variable?`var(${r.variable})`:r.color}function UM(e,t){let r=_r({color:e,theme:t});return r.isThemeColor&&r.shade===void 0?`var(--mantine-color-${r.color}-text)`:tg(e,t)}function VM(e,t){if(typeof e=="number")return Z(e);if(typeof e=="string"){let[r,n,...o]=e.split(" ").filter(a=>a.trim()!==""),i=`${Z(r)}`;return n&&(i+=` ${n}`),o.length>0&&(i+=` ${tg(o.join(" "),t)}`),i.trim()}return e}var HM={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function WM(e){return typeof e=="string"&&e in HM?HM[e]:e}var ATe=b(D(),1),OTe=b(O(),1);var Pne=["h1","h2","h3","h4","h5","h6"];function ZM(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&Pne.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"?Z(e):typeof e=="string"?Z(e):e}function GM(e){return e}var Dne=["h1","h2","h3","h4","h5","h6"];function qM(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&Dne.includes(e)?`var(--mantine-${e}-line-height)`:e}var MTe=b(D(),1),BTe=b(O(),1);function KM(e){return typeof e=="number"?Z(e):e}var VTe=b(D(),1),HTe=b(O(),1);function XM(e,t){if(typeof e=="number")return Z(e);if(typeof e=="string"){let r=e.replace("-","");if(!(r in t.spacing))return Z(e);let n=`--mantine-spacing-${r}`;return e.startsWith("-")?`calc(var(${n}) * -1)`:`var(${n})`}return e}var Gy={color:tg,textColor:UM,fontSize:ZM,spacing:XM,identity:GM,size:KM,lineHeight:qM,fontFamily:WM,border:VM};function QM(e){return e.replace("(min-width: ","").replace("em)","")}function YM({media:e,...t}){let n=Object.keys(e).sort((o,i)=>Number(QM(o))-Number(QM(i))).map(o=>({query:o,styles:e[o]}));return{...t,media:n}}function Rne(e){if(typeof e!="object"||e===null)return!1;let t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function Tne(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function Ene(e){return typeof e=="object"&&e!==null?gt(e).filter(t=>t!=="base"):[]}function $ne(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function JM({styleProps:e,data:t,theme:r}){return YM(gt(e).reduce((n,o)=>{if(o==="hiddenFrom"||o==="visibleFrom"||o==="sx")return n;let i=t[o],a=Array.isArray(i.property)?i.property:[i.property],s=Tne(e[o]);if(!Rne(e[o]))return a.forEach(c=>{n.inlineStyles[c]=Gy[i.type](s,r)}),n;n.hasResponsiveStyles=!0;let l=Ene(e[o]);return a.forEach(c=>{s&&(n.styles[c]=Gy[i.type](s,r)),l.forEach(d=>{let u=`(min-width: ${r.breakpoints[d]})`;n.media[u]={...n.media[u],[c]:Gy[i.type]($ne(e[o],d),r)}})}),n},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}var eB=b(D(),1);function qy(){return`__m__-${(0,eB.useId)().replace(/:/g,"")}`}function rg(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...rg(n,t)}),{}):typeof e=="function"?e(t):e??{}}var Cd=b(O(),1),oB=b(D(),1);function tB(e){return e.startsWith("data-")?e:`data-${e}`}function Ane(e){return Object.keys(e).reduce((t,r)=>{let n=e[r];return n===void 0||n===""||n===!1||n===null||(t[tB(r)]=e[r]),t},{})}function sP(e){return e?typeof e=="string"?{[tB(e)]:!0}:Array.isArray(e)?[...e].reduce((t,r)=>({...t,...sP(r)}),{}):Ane(e):null}function lP(e,t){return Array.isArray(e)?[...e].reduce((r,n)=>({...r,...lP(n,t)}),{}):typeof e=="function"?e(t):e??{}}function rB({theme:e,style:t,vars:r,styleProps:n}){let o=lP(t,e),i=lP(r,e);return{...o,...i,...n}}var nB=(0,oB.forwardRef)(({component:e,style:t,__vars:r,className:n,variant:o,mod:i,size:a,hiddenFrom:s,visibleFrom:l,lightHidden:c,darkHidden:d,renderRoot:u,__size:f,...m},p)=>{let g=ft(),y=e||"div",{styleProps:v,rest:x}=Gr(m),I=oM()?.()?.(v.sx),S=qy(),w=JM({styleProps:v,theme:g,data:jM}),P={ref:p,style:rB({theme:g,style:t,vars:r,styleProps:w.inlineStyles}),className:Ke(n,I,{[S]:w.hasResponsiveStyles,"mantine-light-hidden":c,"mantine-dark-hidden":d,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${l}`]:l}),"data-variant":o,"data-size":Cy(a)?void 0:a||void 0,size:f,...sP(i),...x};return(0,Cd.jsxs)(Cd.Fragment,{children:[w.hasResponsiveStyles&&(0,Cd.jsx)(kd,{selector:`.${S}`,styles:w.styles,media:w.media}),typeof u=="function"?u(P):(0,Cd.jsx)(y,{...P})]})});nB.displayName="@mantine/core/Box";var F=nB;var cP=b(O(),1),Ky=b(D(),1);function dP(e){return e}function uP(e){let t=e;return r=>{let n=(0,Ky.forwardRef)((o,i)=>(0,cP.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n}}function M(e){let t=(0,Ky.forwardRef)(e);return t.extend=dP,t.withProps=r=>{let n=(0,Ky.forwardRef)((o,i)=>(0,cP.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}var iB=b(O(),1),fP=b(D(),1);function nt(e){let t=(0,fP.forwardRef)(e);return t.withProps=r=>{let n=(0,fP.forwardRef)((o,i)=>(0,iB.jsx)(t,{...r,...o,ref:i}));return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=dP,t}var One=b(O(),1),og=b(D(),1);var zne=(0,og.createContext)({dir:"ltr",toggleDirection:()=>{},setDirection:()=>{}});function si(){return(0,og.useContext)(zne)}var P4=b(O(),1);var zEe=b(D(),1);var dm=b(D(),1),S9=b(tc(),1);function Lae(e){if(!e||typeof e=="string")return 0;let t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function C4(e){return e?.current?e.current.scrollHeight:"auto"}var Kg=typeof window<"u"&&window.requestAnimationFrame;function k9({transitionDuration:e,transitionTimingFunction:t="ease",onTransitionEnd:r=()=>{},opened:n}){let o=(0,dm.useRef)(null),i=0,a={height:0,overflow:"hidden"},[s,l]=(0,dm.useState)(n?{}:a),c=p=>{(0,S9.flushSync)(()=>l(p))},d=p=>{c(g=>({...g,...p}))};function u(p){let g=e||Lae(p);return{transition:`height ${g}ms ${t}, opacity ${g}ms ${t}`}}yr(()=>{typeof Kg=="function"&&Kg(n?()=>{d({willChange:"height",display:"block",overflow:"hidden"}),Kg(()=>{let p=C4(o);d({...u(p),height:p})})}:()=>{let p=C4(o);d({...u(p),willChange:"height",height:p}),Kg(()=>d({height:i,overflow:"hidden"}))})},[n]);let f=p=>{if(!(p.target!==o.current||p.propertyName!=="height"))if(n){let g=C4(o);g===s.height?c({}):d({height:g}),r()}else s.height===i&&(c(a),r())};function m({style:p={},refKey:g="ref",...y}={}){let v=y[g],x={"aria-hidden":!n,...y,[g]:Oy(o,v),onTransitionEnd:f,style:{boxSizing:"border-box",...p,...s}};return dm.default.version.startsWith("18")?n||(x.inert=""):x.inert=!n,x}return m}var Mae={transitionDuration:200,transitionTimingFunction:"ease",animateOpacity:!0},um=M((e,t)=>{let{children:r,in:n,transitionDuration:o,transitionTimingFunction:i,style:a,onTransitionEnd:s,animateOpacity:l,...c}=z("Collapse",Mae,e),d=ft(),u=Cs(),m=(d.respectReducedMotion?u:!1)?0:o,p=k9({opened:n,transitionDuration:m,transitionTimingFunction:i,onTransitionEnd:s});return m===0?n?(0,P4.jsx)(F,{...c,children:r}):null:(0,P4.jsx)(F,{...p({style:{opacity:n||!l?1:0,transition:l?`opacity ${m}ms ${i}`:"none",...rg(a,d)},ref:t,...c}),children:r})});um.displayName="@mantine/core/Collapse";var vi=b(O(),1),lc=b(D(),1);var de=b(D(),1),gm=b(D(),1);function g0(){return typeof window<"u"}function rc(e){return C9(e)?(e.nodeName||"").toLowerCase():"#document"}function po(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Oa(e){var t;return(t=(C9(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function C9(e){return g0()?e instanceof Node||e instanceof po(e).Node:!1}function Bt(e){return g0()?e instanceof Element||e instanceof po(e).Element:!1}function wn(e){return g0()?e instanceof HTMLElement||e instanceof po(e).HTMLElement:!1}function h0(e){return!g0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof po(e).ShadowRoot}function Xg(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Gn(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&o!=="inline"&&o!=="contents"}function P9(e){return/^(table|td|th)$/.test(rc(e))}function Qg(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}var Bae=/transform|translate|scale|rotate|perspective|filter/,jae=/paint|layout|strict|content/,Ud=e=>!!e&&e!=="none",D4;function v0(e){let t=Bt(e)?Gn(e):e;return Ud(t.transform)||Ud(t.translate)||Ud(t.scale)||Ud(t.rotate)||Ud(t.perspective)||!fm()&&(Ud(t.backdropFilter)||Ud(t.filter))||Bae.test(t.willChange||"")||jae.test(t.contain||"")}function D9(e){let t=Aa(e);for(;wn(t)&&!Ls(t);){if(v0(t))return t;if(Qg(t))return null;t=Aa(t)}return null}function fm(){return D4==null&&(D4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),D4}function Ls(e){return/^(html|body|#document)$/.test(rc(e))}function Gn(e){return po(e).getComputedStyle(e)}function Yg(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Aa(e){if(rc(e)==="html")return e;let t=e.assignedSlot||e.parentNode||h0(e)&&e.host||Oa(e);return h0(t)?t.host:t}function R9(e){let t=Aa(e);return Ls(t)?(e.ownerDocument||e).body:wn(t)&&Xg(t)?t:R9(t)}function Zo(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=R9(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=po(o);if(i){let s=x0(a);return t.concat(a,a.visualViewport||[],Xg(o)?o:[],s&&r?Zo(s):[])}else return t.concat(o,Zo(o,[],r))}function x0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function R4(e){let t=e.activeElement;for(;((r=t)==null||(r=r.shadowRoot)==null?void 0:r.activeElement)!=null;){var r;t=t.shadowRoot.activeElement}return t}function mm(e,t){if(!e||!t)return!1;let r=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(r&&h0(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function T4(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function E4(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function E9(e){return Uae()?!1:!T9()&&e.width===0&&e.height===0||T9()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function $9(){return/apple/i.test(navigator.vendor)}function T9(){let e=/android/i;return e.test(T4())||e.test(E4())}function A9(){return T4().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Uae(){return E4().includes("jsdom/")}function b0(e,t){let r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function O9(e){return"nativeEvent"in e}function z9(e){return e.matches("html,body")}function oc(e){return e?.ownerDocument||document}function y0(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let r=e;return r.target!=null&&t.contains(r.target)}function Vd(e){return"composedPath"in e?e.composedPath()[0]:e.target}var Vae="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function N9(e){return wn(e)&&e.matches(Vae)}var qn=Math.min,Sn=Math.max,ev=Math.round,tv=Math.floor,za=e=>({x:e,y:e}),Hae={left:"right",right:"left",bottom:"top",top:"bottom"};function $4(e,t,r){return Sn(e,qn(t,r))}function Na(e,t){return typeof e=="function"?e(t):e}function ra(e){return e.split("-")[0]}function Hd(e){return e.split("-")[1]}function I0(e){return e==="x"?"y":"x"}function w0(e){return e==="y"?"height":"width"}function hi(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function S0(e){return I0(hi(e))}function M9(e,t,r){r===void 0&&(r=!1);let n=Hd(e),o=S0(e),i=w0(o),a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Jg(a)),[a,Jg(a)]}function B9(e){let t=Jg(e);return[_0(e),t,_0(t)]}function _0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var F9=["left","right"],L9=["right","left"],Wae=["top","bottom"],Zae=["bottom","top"];function Gae(e,t,r){switch(e){case"top":case"bottom":return r?t?L9:F9:t?F9:L9;case"left":case"right":return t?Wae:Zae;default:return[]}}function j9(e,t,r,n){let o=Hd(e),i=Gae(ra(e),r==="start",n);return o&&(i=i.map(a=>a+"-"+o),t&&(i=i.concat(i.map(_0)))),i}function Jg(e){let t=ra(e);return Hae[t]+e.slice(t.length)}function qae(e){var t,r,n,o;return{top:(t=e.top)!=null?t:0,right:(r=e.right)!=null?r:0,bottom:(n=e.bottom)!=null?n:0,left:(o=e.left)!=null?o:0}}function k0(e){return typeof e!="number"?qae(e):{top:e,right:e,bottom:e,left:e}}function oa(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}var kj=b(tc(),1);function U9(e,t,r){let{reference:n,floating:o}=e,i=hi(t),a=S0(t),s=w0(a),l=ra(t),c=i==="y",d=n.x+n.width/2-o.width/2,u=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2,m;switch(l){case"top":m={x:d,y:n.y-o.height};break;case"bottom":m={x:d,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:u};break;case"left":m={x:n.x-o.width,y:u};break;default:m={x:n.x,y:n.y}}let p=Hd(t);return p&&(m[a]+=f*(p==="end"?1:-1)*(r&&c?-1:1)),m}async function V9(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:m=0}=Na(t,e),p=k0(m),y=s[f?u==="floating"?"reference":"floating":u],v=oa(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:d,strategy:l})),x=u==="floating"?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),I=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},S=oa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:_,strategy:l}):x);return{top:(v.top-S.top+p.top)/I.y,bottom:(S.bottom-v.bottom+p.bottom)/I.y,left:(v.left-S.left+p.left)/I.x,right:(S.right-v.right+p.right)/I.x}}var Kae=50,H9=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=a.detectOverflow?a:{...a,detectOverflow:V9},l=await(a.isRTL==null?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=U9(c,n,l),f=n,m=0,p={};for(let g=0;g<i.length;g++){let y=i[g];if(!y)continue;let{name:v,fn:x}=y,{x:_,y:I,data:S,reset:w}=await x({x:d,y:u,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});d=_??d,u=I??u,p[v]={...p[v],...S},w&&m<Kae&&(m++,typeof w=="object"&&(w.placement&&(f=w.placement),w.rects&&(c=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:d,y:u}=U9(c,f,l)),g=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:p}},W9=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Na(e,t)||{};if(c==null)return{};let u=k0(d),f={x:r,y:n},m=S0(o),p=w0(m),g=await a.getDimensions(c),y=m==="y",v=y?"top":"left",x=y?"bottom":"right",_=y?"clientHeight":"clientWidth",I=i.reference[p]+i.reference[m]-f[m]-i.floating[p],S=f[m]-i.reference[m],w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c)),P=w?w[_]:0;(!P||!await(a.isElement==null?void 0:a.isElement(w)))&&(P=s.floating[_]||i.floating[p]);let $=I/2-S/2,B=P/2-g[p]/2-1,W=qn(u[v],B),H=qn(u[x],B),K=P-g[p]-H,T=P/2-g[p]/2+$,k=$4(W,T,K),E=!l.arrow&&Hd(o)!=null&&T!==k&&i.reference[p]/2-(T<W?W:H)-g[p]/2<0,C=E?T<W?T-W:T-K:0;return{[m]:f[m]+C,data:{[m]:k,centerOffset:T-k-C,...E&&{alignmentOffset:C}},reset:E}}});var Z9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...y}=Na(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let v=ra(o),x=hi(s),_=ra(s)===s,I=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=f||(_||!g?[Jg(s)]:B9(s)),w=p!=="none";!f&&w&&S.push(...j9(s,g,p,I));let P=[s,...S],$=await l.detectOverflow(t,y),B=[],W=((n=i.flip)==null?void 0:n.overflows)||[];if(d&&B.push($[v]),u){let k=M9(o,a,I);B.push($[k[0]],$[k[1]])}if(W=[...W,{placement:o,overflows:B}],!B.every(k=>k<=0)){var H,K;let k=(((H=i.flip)==null?void 0:H.index)||0)+1,E=P[k];if(E&&(!(u==="alignment"?x!==hi(E):!1)||W.every(R=>hi(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:k,overflows:W},reset:{placement:E}};let C=(K=W.filter(A=>A.overflows[0]<=0).sort((A,R)=>A.overflows[1]-R.overflows[1])[0])==null?void 0:K.placement;if(!C)switch(m){case"bestFit":{var T;let A=(T=W.filter(R=>{if(w){let N=hi(R.placement);return N===x||N==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(N=>N>0).reduce((N,U)=>N+U,0)]).sort((R,N)=>R[1]-N[1])[0])==null?void 0:T[0];A&&(C=A);break}case"initialPlacement":C=s;break}if(o!==C)return{reset:{placement:C}}}return{}}}};function G9(e){let t=qn(...e.map(i=>i.left)),r=qn(...e.map(i=>i.top)),n=Sn(...e.map(i=>i.right)),o=Sn(...e.map(i=>i.bottom));return{x:t,y:r,width:n-t,height:o-r}}function Xae(e){let t=e.slice().sort((o,i)=>o.y-i.y),r=[],n=null;for(let o=0;o<t.length;o++){let i=t[o];!n||i.y-n.y>n.height/2?r.push([i]):r[r.length-1].push(i),n=i}return r.map(o=>oa(G9(o)))}var q9=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){let{placement:r,elements:n,rects:o,platform:i,strategy:a}=t,{padding:s=2,x:l,y:c}=Na(e,t),d=Array.from(await(i.getClientRects==null?void 0:i.getClientRects(n.reference))||[]);if(!d.length)return{};let u=Xae(d),f=oa(G9(d)),m=k0(s);function p(){if(u.length===2&&(u[0].left>u[1].right||u[1].left>u[0].right)&&l!=null&&c!=null)return u.find(y=>l>y.left-m.left&&l<y.right+m.right&&c>y.top-m.top&&c<y.bottom+m.bottom)||f;if(u.length>=2){if(hi(r)==="y"){let w=u[0],P=u[u.length-1],$=ra(r)==="top",B=w.top,W=P.bottom,H=$?w.left:P.left,K=$?w.right:P.right;return oa({x:H,y:B,width:K-H,height:W-B})}let y=ra(r)==="left",v=Sn(...u.map(w=>w.right)),x=qn(...u.map(w=>w.left)),_=u.filter(w=>y?w.left===x:w.right===v),I=_[0].top,S=_[_.length-1].bottom;return oa({x,y:I,width:v-x,height:S-I})}return f}let g=await i.getElementRects({reference:{getBoundingClientRect:p},floating:n.floating,strategy:a});return o.reference.x!==g.reference.x||o.reference.y!==g.reference.y||o.reference.width!==g.reference.width||o.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},K9=new Set(["left","top"]);async function Qae(e,t){let{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=ra(r),s=Hd(r),l=hi(r)==="y",c=K9.has(a)?-1:1,d=i&&l?-1:1,u=Na(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof p=="number"&&(m=s==="end"?p*-1:p),l?{x:m*d,y:f*c}:{x:f*c,y:m*d}}var X9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:a,middlewareData:s}=t,l=await Qae(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Q9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:x=>{let{x:_,y:I}=x;return{x:_,y:I}}},...c}=Na(e,t),d={x:r,y:n},u=await i.detectOverflow(t,c),f=hi(o),m=I0(f),p=d[m],g=d[f],y=(x,_)=>$4(_+u[x==="y"?"top":"left"],_,_-u[x==="y"?"bottom":"right"]);a&&(p=y(m,p)),s&&(g=y(f,g));let v=l.fn({...t,[m]:p,[f]:g});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[f]:s}}}}}},Y9=function(e){return e===void 0&&(e={}),{options:e,fn(t){var r,n;let{x:o,y:i,placement:a,rects:s,middlewareData:l}=t,{offset:c=0,mainAxis:d=!0,crossAxis:u=!0}=Na(e,t),f={x:o,y:i},m=hi(a),p=I0(m),g=f[p],y=f[m],v=Na(c,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(r=v.mainAxis)!=null?r:0,crossAxis:(n=v.crossAxis)!=null?n:0};if(d){let S=p==="y"?"height":"width",w=s.reference[p]-s.floating[S]+x.mainAxis,P=s.reference[p]+s.reference[S]-x.mainAxis;g<w?g=w:g>P&&(g=P)}if(u){var _,I;let S=p==="y"?"width":"height",w=K9.has(ra(a)),P=s.reference[m]-s.floating[S]+(w&&((_=l.offset)==null?void 0:_[m])||0)+(w?0:x.crossAxis),$=s.reference[m]+s.reference[S]+(w?0:((I=l.offset)==null?void 0:I[m])||0)-(w?x.crossAxis:0);y<P?y=P:y>$&&(y=$)}return{[p]:g,[m]:y}}}},J9=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){let{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=Na(e,t),l=await o.detectOverflow(t,s),c=ra(r),d=Hd(r),u=hi(r)==="y",{width:f,height:m}=n.floating,p,g;c==="top"||c==="bottom"?(p=c,g=d===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=c,p=d==="end"?"top":"bottom");let y=m-l.top-l.bottom,v=f-l.left-l.right,x=qn(m-l[p],y),_=qn(f-l[g],v),I=t.middlewareData.shift,S=!I,w=x,P=_;I!=null&&I.enabled.x&&(P=v),I!=null&&I.enabled.y&&(w=y),S&&!d&&(u?P=f-2*Sn(l.left,l.right):w=m-2*Sn(l.top,l.bottom)),await a({...t,availableWidth:P,availableHeight:w});let $=await o.getDimensions(i.floating);return f!==$.width||m!==$.height?{reset:{rects:!0}}:{}}}};function rj(e){let t=Gn(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=wn(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=ev(r)!==i||ev(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function O4(e){return Bt(e)?e:e.contextElement}function pm(e){let t=O4(e);if(!wn(t))return za(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=rj(t),a=(i?ev(r.width):r.width)/n,s=(i?ev(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}var Yae=za(0);function oj(e){let t=po(e);return!fm()||!t.visualViewport?Yae:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jae(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===po(e)}function Wd(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),i=O4(e),a=za(1);t&&(n?Bt(n)&&(a=pm(n)):a=pm(e));let s=Jae(i,r,n)?oj(i):za(0),l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,u=o.height/a.y;if(i&&n){let f=po(i),m=Bt(n)?po(n):n,p=f,g=x0(p);for(;g&&m!==p;){let y=pm(g),v=g.getBoundingClientRect(),x=Gn(g),_=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*y.x,I=v.top+(g.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,c*=y.y,d*=y.x,u*=y.y,l+=_,c+=I,p=po(g),g=x0(p)}}return oa({width:d,height:u,x:l,y:c})}function C0(e,t){let r=Yg(e).scrollLeft;return t?t.left+r:Wd(Oa(e)).left+r}function nj(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-C0(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ese(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i=o==="fixed",a=Oa(n),s=t?Qg(t.floating):!1;if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=za(1),d=za(0),u=wn(n);if((u||!i)&&((rc(n)!=="body"||Xg(a))&&(l=Yg(n)),u)){let m=Wd(n);c=pm(n),d.x=m.x+n.clientLeft,d.y=m.y+n.clientTop}let f=a&&!u&&!i?nj(a,l):za(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function tse(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function rse(e){let t=Yg(e),r=e.ownerDocument.body,n=Sn(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=Sn(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight),i=-t.scrollLeft+C0(e),a=-t.scrollTop;return Gn(r).direction==="rtl"&&(i+=Sn(e.clientWidth,r.clientWidth)-n),{width:n,height:o,x:i,y:a}}var ose=25;function nse(e,t,r){r===void 0&&(r="viewport");let n=r==="layoutViewport",o=po(e),i=Oa(e),a=o.visualViewport,s=i.clientWidth,l=i.clientHeight,c=0,d=0;if(a){let f=!fm()||t==="fixed";n?f||(c=-a.offsetLeft,d=-a.offsetTop):(s=a.width,l=a.height,f&&(c=a.offsetLeft,d=a.offsetTop))}if(C0(i)<=0){let f=i.ownerDocument,m=f.body,p=getComputedStyle(m),g=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(i.clientWidth-m.clientWidth-g),v=getComputedStyle(i).scrollbarGutter==="stable both-edges"?y/2:y;v<=ose&&(s-=v)}return{width:s,height:l,x:c,y:d}}function ise(e,t){let r=Wd(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=pm(e),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:a,height:s,x:l,y:c}}function ej(e,t,r){let n;if(t==="viewport"||t==="layoutViewport")n=nse(e,r,t);else if(t==="document")n=rse(Oa(e));else if(Bt(t))n=ise(t,r);else{let o=oj(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return oa(n)}function ase(e,t){let r=t.get(e);if(r)return r;let n=Zo(e,[],!1).filter(s=>Bt(s)&&rc(s)!=="body"),o=null,i=Gn(e).position==="fixed",a=i?Aa(e):e;for(;Bt(a)&&!Ls(a);){let s=Gn(a),l=v0(a),c=o?o.position:i?"fixed":"";!l&&(c==="fixed"||c==="absolute"&&s.position==="static")?n=n.filter(u=>u!==a):o=s,a=Aa(a)}return t.set(e,n),n}function sse(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,a=[...r==="clippingAncestors"?Qg(t)?[]:ase(t,this._c):[].concat(r),n],s=ej(t,a[0],o),l=s.top,c=s.right,d=s.bottom,u=s.left;for(let f=1;f<a.length;f++){let m=ej(t,a[f],o);l=Sn(m.top,l),c=qn(m.right,c),d=qn(m.bottom,d),u=Sn(m.left,u)}return{width:c-u,height:d-l,x:u,y:l}}function lse(e){let{width:t,height:r}=rj(e);return{width:t,height:r}}function cse(e,t,r){let n=wn(t),o=Oa(t),i=r==="fixed",a=Wd(e,!0,i,t),s={scrollLeft:0,scrollTop:0},l=za(0);if((n||!i)&&((rc(t)!=="body"||Xg(o))&&(s=Yg(t)),n)){let f=Wd(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}!n&&o&&(l.x=C0(o));let c=o&&!n&&!i?nj(o,s):za(0),d=a.left+s.scrollLeft-l.x-c.x,u=a.top+s.scrollTop-l.y-c.y;return{x:d,y:u,width:a.width,height:a.height}}function A4(e){return Gn(e).position==="static"}function tj(e,t){if(!wn(e)||Gn(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Oa(e)===r&&(r=r.ownerDocument.body),r}function ij(e,t){let r=po(e);if(Qg(e))return r;if(!wn(e)){let o=Aa(e);for(;o&&!Ls(o);){if(Bt(o)&&!A4(o))return o;o=Aa(o)}return r}let n=tj(e,t);for(;n&&P9(n)&&A4(n);)n=tj(n,t);return n&&Ls(n)&&A4(n)&&!v0(n)?r:n||D9(e)||r}var dse=async function(e){let t=this.getOffsetParent||ij,r=this.getDimensions,n=await r(e.floating);return{reference:cse(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function use(e){return Gn(e).direction==="rtl"}var z4={convertOffsetParentRelativeRectToViewportRelativeRect:ese,getDocumentElement:Oa,getClippingRect:sse,getOffsetParent:ij,getElementRects:dse,getClientRects:tse,getDimensions:lse,getScale:pm,isElement:Bt,isRTL:use};function aj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fse(e,t,r){let n=null,o,i=Oa(e);function a(){var d;clearTimeout(o),(d=n)==null||d.disconnect(),n=null}function s(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),a();let f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:y}=f;if(d||t(),!g||!y)return;let v=tv(p),x=tv(i.clientWidth-(m+g)),_=tv(i.clientHeight-(p+y)),I=tv(m),w={rootMargin:-v+"px "+-x+"px "+-_+"px "+-I+"px",threshold:Sn(0,qn(1,u))||1},P=!0;function $(B){let W=B[0].intersectionRatio;if(!aj(f,e.getBoundingClientRect()))return s();if(W!==u){if(!P)return s();W?s(!1,W):o=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{n=new IntersectionObserver($,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver($,w)}n.observe(e)}let l=po(e),c=()=>s(r);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),a()}}function P0(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=O4(e),d=o||i?[...c?Zo(c):[],...t?Zo(t):[]]:[];d.forEach(v=>{o&&v.addEventListener("scroll",r),i&&v.addEventListener("resize",r)});let u=c&&s?fse(c,r,i):null,f=-1,m=null;a&&(m=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(t)})),r()}),c&&!l&&m.observe(c),t&&m.observe(t));let p,g=l?Wd(e):null;l&&y();function y(){let v=Wd(e);g&&!aj(g,v)&&r(),g=v,p=requestAnimationFrame(y)}return r(),()=>{var v;d.forEach(x=>{o&&x.removeEventListener("scroll",r),i&&x.removeEventListener("resize",r)}),u?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var sj=X9;var lj=Q9,cj=Z9,dj=J9;var N4=W9,uj=q9,fj=Y9,D0=(e,t,r)=>{let n=new Map,o=r??{},i={...z4,...o.platform,_c:n};return H9(e,t,{...o,platform:i})};var Tr=b(D(),1),hj=b(D(),1),gj=b(tc(),1),mse=typeof document<"u",pse=function(){},R0=mse?hj.useLayoutEffect:pse;function T0(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!T0(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!T0(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function mj(e,t){let r=vj(e);return Math.round(t*r)/r}function F4(e){let t=Tr.useRef(e);return R0(()=>{t.current=e}),t}function xj(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,u]=Tr.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=Tr.useState(n);T0(f,n)||m(n);let[p,g]=Tr.useState(null),[y,v]=Tr.useState(null),x=Tr.useCallback(R=>{R!==w.current&&(w.current=R,g(R))},[]),_=Tr.useCallback(R=>{R!==P.current&&(P.current=R,v(R))},[]),I=i||p,S=a||y,w=Tr.useRef(null),P=Tr.useRef(null),$=Tr.useRef(d),B=l!=null,W=F4(l),H=F4(o),K=F4(c),T=Tr.useCallback(()=>{if(!w.current||!P.current)return;let R={placement:t,strategy:r,middleware:f};H.current&&(R.platform=H.current),D0(w.current,P.current,R).then(N=>{let U={...N,isPositioned:K.current!==!1};k.current&&!T0($.current,U)&&($.current=U,gj.flushSync(()=>{u(U)}))})},[f,t,r,H,K]);R0(()=>{c===!1&&$.current.isPositioned&&($.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);let k=Tr.useRef(!1);R0(()=>(k.current=!0,()=>{k.current=!1}),[]),R0(()=>{if(I&&(w.current=I),S&&(P.current=S),I&&S){if(W.current)return W.current(I,S,T);T()}},[I,S,T,W,B]);let E=Tr.useMemo(()=>({reference:w,floating:P,setReference:x,setFloating:_}),[x,_]),C=Tr.useMemo(()=>({reference:I,floating:S}),[I,S]),A=Tr.useMemo(()=>{let R={position:r,left:0,top:0};if(!C.floating)return R;let N=mj(C.floating,d.x),U=mj(C.floating,d.y);return s?{...R,transform:"translate("+N+"px, "+U+"px)",...vj(C.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:U}},[r,s,C.floating,d.x,d.y]);return Tr.useMemo(()=>({...d,update:T,refs:E,elements:C,floatingStyles:A}),[d,T,E,C,A])}var hse=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?N4({element:n.current,padding:o}).fn(r):{}:n?N4({element:n,padding:o}).fn(r):{}}}},hm=(e,t)=>{let r=sj(e);return{name:r.name,fn:r.fn,options:[e,t]}},Zd=(e,t)=>{let r=lj(e);return{name:r.name,fn:r.fn,options:[e,t]}},E0=(e,t)=>({fn:fj(e).fn,options:[e,t]}),Gd=(e,t)=>{let r=cj(e);return{name:r.name,fn:r.fn,options:[e,t]}},L4=(e,t)=>{let r=dj(e);return{name:r.name,fn:r.fn,options:[e,t]}};var nc=(e,t)=>{let r=uj(e);return{name:r.name,fn:r.fn,options:[e,t]}},rv=(e,t)=>{let r=hse(e);return{name:r.name,fn:r.fn,options:[e,t]}};function Cj(e){return de.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})},e)}var Pj={...de},gse=Pj.useInsertionEffect,vse=gse||(e=>e());function Ms(e){let t=de.useRef(()=>{});return vse(()=>{t.current=e}),de.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var xse="ArrowUp",bse="ArrowDown",yse="ArrowLeft",_se="ArrowRight";var Fa=typeof document<"u"?gm.useLayoutEffect:gm.useEffect;var Ise=[yse,_se],wse=[xse,bse],b$e=[...Ise,...wse];var bj=!1,Sse=0,yj=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Sse++;function kse(){let[e,t]=de.useState(()=>bj?yj():void 0);return Fa(()=>{e==null&&t(yj())},[]),de.useEffect(()=>{bj=!0},[]),e}var Cse=Pj.useId,Dj=Cse||kse;function Pse(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}var Dse=de.createContext(null),Rse=de.createContext(null),V4=()=>{var e;return((e=de.useContext(Dse))==null?void 0:e.id)||null},H4=()=>de.useContext(Rse);function W4(e){return"data-floating-ui-"+e}function M4(e){let t=(0,gm.useRef)(e);return Fa(()=>{t.current=e}),t}var _j=W4("safe-polygon");function $0(e,t,r){return r&&!b0(r)?0:typeof e=="number"?e:e?.[t]}function Rj(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:u=0,move:f=!0}=t,m=H4(),p=V4(),g=M4(c),y=M4(l),v=M4(r),x=de.useRef(),_=de.useRef(-1),I=de.useRef(),S=de.useRef(-1),w=de.useRef(!0),P=de.useRef(!1),$=de.useRef(()=>{}),B=de.useRef(!1),W=de.useCallback(()=>{var A;let R=(A=o.current.openEvent)==null?void 0:A.type;return R?.includes("mouse")&&R!=="mousedown"},[o]);de.useEffect(()=>{if(!s)return;function A(R){let{open:N}=R;N||(clearTimeout(_.current),clearTimeout(S.current),w.current=!0,B.current=!1)}return i.on("openchange",A),()=>{i.off("openchange",A)}},[s,i]),de.useEffect(()=>{if(!s||!g.current||!r)return;function A(N){W()&&n(!1,N,"hover")}let R=oc(a.floating).documentElement;return R.addEventListener("mouseleave",A),()=>{R.removeEventListener("mouseleave",A)}},[a.floating,r,n,s,g,W]);let H=de.useCallback(function(A,R,N){R===void 0&&(R=!0),N===void 0&&(N="hover");let U=$0(y.current,"close",x.current);U&&!I.current?(clearTimeout(_.current),_.current=window.setTimeout(()=>n(!1,A,N),U)):R&&(clearTimeout(_.current),n(!1,A,N))},[y,n]),K=Ms(()=>{$.current(),I.current=void 0}),T=Ms(()=>{if(P.current){let A=oc(a.floating).body;A.style.pointerEvents="",A.removeAttribute(_j),P.current=!1}}),k=Ms(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);de.useEffect(()=>{if(!s)return;function A(G){if(clearTimeout(_.current),w.current=!1,d&&!b0(x.current)||u>0&&!$0(y.current,"open"))return;let oe=$0(y.current,"open",x.current);oe?_.current=window.setTimeout(()=>{v.current||n(!0,G,"hover")},oe):r||n(!0,G,"hover")}function R(G){if(k())return;$.current();let oe=oc(a.floating);if(clearTimeout(S.current),B.current=!1,g.current&&o.current.floatingContext){r||clearTimeout(_.current),I.current=g.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),K(),k()||H(G,!0,"safe-polygon")}});let pe=I.current;oe.addEventListener("mousemove",pe),$.current=()=>{oe.removeEventListener("mousemove",pe)};return}(x.current!=="touch"||!mm(a.floating,G.relatedTarget))&&H(G)}function N(G){k()||o.current.floatingContext&&(g.current==null||g.current({...o.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){T(),K(),k()||H(G)}})(G))}if(Bt(a.domReference)){var U;let G=a.domReference;return r&&G.addEventListener("mouseleave",N),(U=a.floating)==null||U.addEventListener("mouseleave",N),f&&G.addEventListener("mousemove",A,{once:!0}),G.addEventListener("mouseenter",A),G.addEventListener("mouseleave",R),()=>{var oe;r&&G.removeEventListener("mouseleave",N),(oe=a.floating)==null||oe.removeEventListener("mouseleave",N),f&&G.removeEventListener("mousemove",A),G.removeEventListener("mouseenter",A),G.removeEventListener("mouseleave",R)}}},[a,s,e,d,u,f,H,K,T,n,r,v,m,y,g,o,k]),Fa(()=>{var A;if(s&&r&&(A=g.current)!=null&&A.__options.blockPointerEvents&&W()){P.current=!0;let N=a.floating;if(Bt(a.domReference)&&N){var R;let U=oc(a.floating).body;U.setAttribute(_j,"");let G=a.domReference,oe=m==null||(R=m.nodesRef.current.find(ve=>ve.id===p))==null||(R=R.context)==null?void 0:R.elements.floating;return oe&&(oe.style.pointerEvents=""),U.style.pointerEvents="none",G.style.pointerEvents="auto",N.style.pointerEvents="auto",()=>{U.style.pointerEvents="",G.style.pointerEvents="",N.style.pointerEvents=""}}}},[s,r,p,a,m,g,W]),Fa(()=>{r||(x.current=void 0,B.current=!1,K(),T())},[r,K,T]),de.useEffect(()=>()=>{K(),clearTimeout(_.current),clearTimeout(S.current),T()},[s,a.domReference,K,T]);let E=de.useMemo(()=>{function A(R){x.current=R.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(R){let{nativeEvent:N}=R;function U(){!w.current&&!v.current&&n(!0,N,"hover")}d&&!b0(x.current)||r||u===0||B.current&&R.movementX**2+R.movementY**2<2||(clearTimeout(S.current),x.current==="touch"?U():(B.current=!0,S.current=window.setTimeout(U,u)))}}},[d,n,r,v,u]),C=de.useMemo(()=>({onMouseEnter(){clearTimeout(_.current)},onMouseLeave(A){k()||H(A.nativeEvent,!1)}}),[H,k]);return de.useMemo(()=>s?{reference:E,floating:C}:{},[s,E,C])}var U4=()=>{},Tj=de.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:U4,setState:U4,isInstantPhase:!1}),Tse=()=>de.useContext(Tj);function Ej(e){let{children:t,delay:r,timeoutMs:n=0}=e,[o,i]=de.useReducer((l,c)=>({...l,...c}),{delay:r,timeoutMs:n,initialDelay:r,currentId:null,isInstantPhase:!1}),a=de.useRef(null),s=de.useCallback(l=>{i({currentId:l})},[]);return Fa(()=>{o.currentId?a.current===null?a.current=o.currentId:o.isInstantPhase||i({isInstantPhase:!0}):(o.isInstantPhase&&i({isInstantPhase:!1}),a.current=null)},[o.currentId,o.isInstantPhase]),de.createElement(Tj.Provider,{value:de.useMemo(()=>({...o,setState:i,setCurrentId:s}),[o,s])},t)}function $j(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,floatingId:o}=e,{id:i,enabled:a=!0}=t,s=i??o,l=Tse(),{currentId:c,setCurrentId:d,initialDelay:u,setState:f,timeoutMs:m}=l;return Fa(()=>{a&&c&&(f({delay:{open:1,close:$0(u,"close")}}),c!==s&&n(!1))},[a,s,n,f,c,u]),Fa(()=>{function p(){n(!1),f({delay:u,currentId:null})}if(a&&c&&!r&&c===s){if(m){let g=window.setTimeout(p,m);return()=>{clearTimeout(g)}}p()}},[a,r,f,c,s,n,u,m]),Fa(()=>{a&&(d===U4||!r||d(s))},[a,r,d,s]),l}function B4(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),r=r.concat(n);return r}var Ese="data-floating-ui-focusable";var $se={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ase={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ij=e=>{var t,r;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(r=e?.outsidePress)!=null?r:!0}};function Aj(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:f=!1,bubbles:m,capture:p}=t,g=H4(),y=Ms(typeof l=="function"?l:()=>!1),v=typeof l=="function"?y:l,x=de.useRef(!1),_=de.useRef(!1),{escapeKey:I,outsidePress:S}=Ij(m),{escapeKey:w,outsidePress:P}=Ij(p),$=de.useRef(!1),B=Ms(E=>{var C;if(!r||!a||!s||E.key!=="Escape"||$.current)return;let A=(C=i.current.floatingContext)==null?void 0:C.nodeId,R=g?B4(g.nodesRef.current,A):[];if(!I&&(E.stopPropagation(),R.length>0)){let N=!0;if(R.forEach(U=>{var G;if((G=U.context)!=null&&G.open&&!U.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}n(!1,O9(E)?E.nativeEvent:E,"escape-key")}),W=Ms(E=>{var C;let A=()=>{var R;B(E),(R=Vd(E))==null||R.removeEventListener("keydown",A)};(C=Vd(E))==null||C.addEventListener("keydown",A)}),H=Ms(E=>{var C;let A=x.current;x.current=!1;let R=_.current;if(_.current=!1,c==="click"&&R||A||typeof v=="function"&&!v(E))return;let N=Vd(E),U="["+W4("inert")+"]",G=oc(o.floating).querySelectorAll(U),oe=Bt(N)?N:null;for(;oe&&!Ls(oe);){let ne=Aa(oe);if(Ls(ne)||!Bt(ne))break;oe=ne}if(G.length&&Bt(N)&&!z9(N)&&!mm(N,o.floating)&&Array.from(G).every(ne=>!mm(oe,ne)))return;if(wn(N)&&k){let ne=N.clientWidth>0&&N.scrollWidth>N.clientWidth,we=N.clientHeight>0&&N.scrollHeight>N.clientHeight,se=we&&E.offsetX>N.clientWidth;if(we&&Gn(N).direction==="rtl"&&(se=E.offsetX<=N.offsetWidth-N.clientWidth),se||ne&&E.offsetY>N.clientHeight)return}let ve=(C=i.current.floatingContext)==null?void 0:C.nodeId,pe=g&&B4(g.nodesRef.current,ve).some(ne=>{var we;return y0(E,(we=ne.context)==null?void 0:we.elements.floating)});if(y0(E,o.floating)||y0(E,o.domReference)||pe)return;let Y=g?B4(g.nodesRef.current,ve):[];if(Y.length>0){let ne=!0;if(Y.forEach(we=>{var se;if((se=we.context)!=null&&se.open&&!we.context.dataRef.current.__outsidePressBubbles){ne=!1;return}}),!ne)return}n(!1,E,"outside-press")}),K=Ms(E=>{var C;let A=()=>{var R;H(E),(R=Vd(E))==null||R.removeEventListener(c,A)};(C=Vd(E))==null||C.addEventListener(c,A)});de.useEffect(()=>{if(!r||!a)return;i.current.__escapeKeyBubbles=I,i.current.__outsidePressBubbles=S;let E=-1;function C(G){n(!1,G,"ancestor-scroll")}function A(){window.clearTimeout(E),$.current=!0}function R(){E=window.setTimeout(()=>{$.current=!1},fm()?5:0)}let N=oc(o.floating);s&&(N.addEventListener("keydown",w?W:B,w),N.addEventListener("compositionstart",A),N.addEventListener("compositionend",R)),v&&N.addEventListener(c,P?K:H,P);let U=[];return f&&(Bt(o.domReference)&&(U=Zo(o.domReference)),Bt(o.floating)&&(U=U.concat(Zo(o.floating))),!Bt(o.reference)&&o.reference&&o.reference.contextElement&&(U=U.concat(Zo(o.reference.contextElement)))),U=U.filter(G=>{var oe;return G!==((oe=N.defaultView)==null?void 0:oe.visualViewport)}),U.forEach(G=>{G.addEventListener("scroll",C,{passive:!0})}),()=>{s&&(N.removeEventListener("keydown",w?W:B,w),N.removeEventListener("compositionstart",A),N.removeEventListener("compositionend",R)),v&&N.removeEventListener(c,P?K:H,P),U.forEach(G=>{G.removeEventListener("scroll",C)}),window.clearTimeout(E)}},[i,o,s,v,c,r,n,f,a,I,S,B,w,W,H,P,K]),de.useEffect(()=>{x.current=!1},[v,c]);let T=de.useMemo(()=>({onKeyDown:B,[$se[u]]:E=>{d&&n(!1,E.nativeEvent,"reference-press")}}),[B,n,d,u]),k=de.useMemo(()=>({onKeyDown:B,onMouseDown(){_.current=!0},onMouseUp(){_.current=!0},[Ase[c]]:()=>{x.current=!0}}),[B,c]);return de.useMemo(()=>a?{reference:T,floating:k}:{},[a,T,k])}function Ose(e){let{open:t=!1,onOpenChange:r,elements:n}=e,o=Dj(),i=de.useRef({}),[a]=de.useState(()=>Pse()),s=V4()!=null,[l,c]=de.useState(n.reference),d=Ms((m,p,g)=>{i.current.openEvent=m?p:void 0,a.emit("openchange",{open:m,event:p,reason:g,nested:s}),r?.(m,p,g)}),u=de.useMemo(()=>({setPositionReference:c}),[]),f=de.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return de.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:f,events:a,floatingId:o,refs:u}),[t,d,f,a,o,u])}function vm(e){e===void 0&&(e={});let{nodeId:t}=e,r=Ose({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,a]=de.useState(null),[s,l]=de.useState(null),d=o?.domReference||i,u=de.useRef(null),f=H4();Fa(()=>{d&&(u.current=d)},[d]);let m=xj({...e,elements:{...o,...s&&{reference:s}}}),p=de.useCallback(_=>{let I=Bt(_)?{getBoundingClientRect:()=>_.getBoundingClientRect(),contextElement:_}:_;l(I),m.refs.setReference(I)},[m.refs]),g=de.useCallback(_=>{(Bt(_)||_===null)&&(u.current=_,a(_)),(Bt(m.refs.reference.current)||m.refs.reference.current===null||_!==null&&!Bt(_))&&m.refs.setReference(_)},[m.refs]),y=de.useMemo(()=>({...m.refs,setReference:g,setPositionReference:p,domReference:u}),[m.refs,g,p]),v=de.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),x=de.useMemo(()=>({...m,...n,refs:y,elements:v,nodeId:t}),[m,y,v,t,n]);return Fa(()=>{n.dataRef.current.floatingContext=x;let _=f?.nodesRef.current.find(I=>I.id===t);_&&(_.context=x)}),de.useMemo(()=>({...m,context:x,refs:y,elements:v}),[m,y,v,x])}function Oj(e,t){t===void 0&&(t={});let{open:r,onOpenChange:n,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=de.useRef(!1),d=de.useRef(),u=de.useRef(!0);de.useEffect(()=>{if(!s)return;let m=po(a.domReference);function p(){!r&&wn(a.domReference)&&a.domReference===R4(oc(a.domReference))&&(c.current=!0)}function g(){u.current=!0}return m.addEventListener("blur",p),m.addEventListener("keydown",g,!0),()=>{m.removeEventListener("blur",p),m.removeEventListener("keydown",g,!0)}},[a.domReference,r,s]),de.useEffect(()=>{if(!s)return;function m(p){let{reason:g}=p;(g==="reference-press"||g==="escape-key")&&(c.current=!0)}return o.on("openchange",m),()=>{o.off("openchange",m)}},[o,s]),de.useEffect(()=>()=>{clearTimeout(d.current)},[]);let f=de.useMemo(()=>({onPointerDown(m){E9(m.nativeEvent)||(u.current=!1)},onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;let p=Vd(m.nativeEvent);if(l&&Bt(p))try{if($9()&&A9())throw Error();if(!p.matches(":focus-visible"))return}catch{if(!u.current&&!N9(p))return}n(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;let p=m.relatedTarget,g=m.nativeEvent,y=Bt(p)&&p.hasAttribute(W4("focus-guard"))&&p.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{var v;let x=R4(a.domReference?a.domReference.ownerDocument:document);!p&&x===a.domReference||mm((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||mm(a.domReference,x)||y||n(!1,g,"focus")})}}),[i,a.domReference,n,l]);return de.useMemo(()=>s?{reference:f}:{},[s,f])}var wj="active",Sj="selected";function j4(e,t,r){let n=new Map,o=r==="item",i=e;if(o&&e){let{[wj]:a,[Sj]:s,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[Ese]:""},...i,...t.map(a=>{let s=a?a[r]:null;return typeof s=="function"?e?s(e):null:s}).concat(e).reduce((a,s)=>(s&&Object.entries(s).forEach(l=>{let[c,d]=l;if(!(o&&[wj,Sj].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof d=="function"){var u;(u=n.get(c))==null||u.push(d),a[c]=function(){for(var f,m=arguments.length,p=new Array(m),g=0;g<m;g++)p[g]=arguments[g];return(f=n.get(c))==null?void 0:f.map(y=>y(...p)).find(y=>y!==void 0)}}}else a[c]=d}),a),{})}}function zj(e){e===void 0&&(e=[]);let t=e.map(s=>s?.reference),r=e.map(s=>s?.floating),n=e.map(s=>s?.item),o=de.useCallback(s=>j4(s,e,"reference"),t),i=de.useCallback(s=>j4(s,e,"floating"),r),a=de.useCallback(s=>j4(s,e,"item"),n);return de.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a}),[o,i,a])}var zse=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Nj(e,t){var r;t===void 0&&(t={});let{open:n,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=(r=zse.get(a))!=null?r:a,l=Dj(),d=V4()!=null,u=de.useMemo(()=>s==="tooltip"||a==="label"?{["aria-"+(a==="label"?"labelledby":"describedby")]:n?o:void 0}:{"aria-expanded":n?"true":"false","aria-haspopup":s==="alertdialog"?"dialog":s,"aria-controls":n?o:void 0,...s==="listbox"&&{role:"combobox"},...s==="menu"&&{id:l},...s==="menu"&&d&&{role:"menuitem"},...a==="select"&&{"aria-autocomplete":"none"},...a==="combobox"&&{"aria-autocomplete":"list"}},[s,o,d,n,l,a]),f=de.useMemo(()=>{let p={id:o,...s&&{role:s}};return s==="tooltip"||a==="label"?p:{...p,...s==="menu"&&{"aria-labelledby":l}}},[s,o,l,a]),m=de.useCallback(p=>{let{active:g,selected:y}=p,v={role:"option",...g&&{id:o+"-option"}};switch(a){case"select":return{...v,"aria-selected":g&&y};case"combobox":return{...v,...g&&{"aria-selected":!0}}}return{}},[o,a]);return de.useMemo(()=>i?{reference:u,floating:f,item:m}:{},[i,u,f,m])}var Z4=b(O(),1),xm=b(D(),1);var I$e=b(D(),1);var S$e=b(O(),1);var[Fj,dr]=Gt("ScrollArea.Root component was not found in tree");function Bs(e,t){let r=Wi(t);Uo(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var Nse=(0,xm.forwardRef)((e,t)=>{let{style:r,...n}=e,o=dr(),[i,a]=(0,xm.useState)(0),[s,l]=(0,xm.useState)(0),c=!!(i&&s);return Bs(o.scrollbarX,()=>{let d=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(d),l(d)}),Bs(o.scrollbarY,()=>{let d=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(d),a(d)}),c?(0,Z4.jsx)("div",{...n,ref:t,style:{...r,width:i,height:s}}):null}),Lj=(0,xm.forwardRef)((e,t)=>{let r=dr(),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,Z4.jsx)(Nse,{...e,ref:t}):null});var G4=b(O(),1),gi=b(D(),1);var Fse={scrollHideDelay:1e3,type:"hover"},q4=(0,gi.forwardRef)((e,t)=>{let r=z("ScrollAreaRoot",Fse,e),{type:n,scrollHideDelay:o,scrollbars:i,...a}=r,[s,l]=(0,gi.useState)(null),[c,d]=(0,gi.useState)(null),[u,f]=(0,gi.useState)(null),[m,p]=(0,gi.useState)(null),[g,y]=(0,gi.useState)(null),[v,x]=(0,gi.useState)(0),[_,I]=(0,gi.useState)(0),[S,w]=(0,gi.useState)(!1),[P,$]=(0,gi.useState)(!1),B=We(t,W=>l(W));return(0,G4.jsx)(Fj,{value:{type:n,scrollHideDelay:o,scrollArea:s,viewport:c,onViewportChange:d,content:u,onContentChange:f,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:S,onScrollbarXEnabledChange:w,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:P,onScrollbarYEnabledChange:$,onCornerWidthChange:x,onCornerHeightChange:I},children:(0,G4.jsx)(F,{...a,ref:B,__vars:{"--sa-corner-width":i!=="xy"?"0px":`${v}px`,"--sa-corner-height":i!=="xy"?"0px":`${_}px`}})})});q4.displayName="@mantine/core/ScrollAreaRoot";var nv=b(O(),1),L0=b(D(),1);var Vj=b(O(),1),F0=b(D(),1);var eD=b(O(),1),qd=b(D(),1);function A0(e,t){let r=e/t;return Number.isNaN(r)?0:r}function ic(e){let t=A0(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function O0(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Lse(e,[t,r]){return Math.min(r,Math.max(t,e))}function K4(e,t,r="ltr"){let n=ic(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],c=Lse(e,l);return O0([0,a],[0,s])(c)}function Mj(e,t,r,n="ltr"){let o=ic(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,u=n==="ltr"?[0,d]:[d*-1,0];return O0([l,c],u)(e)}var jj=b(O(),1),ac=b(D(),1);function z0(e,t){return e>0&&e<t}function na(e){return e?parseInt(e,10):0}var Q4=b(O(),1),Ma=b(D(),1);function La(e,t,{checkForDefaultPrevented:r=!0}={}){return n=>{e?.(n),(r===!1||!n.defaultPrevented)&&t?.(n)}}var Q$e=b(D(),1);var J$e=b(O(),1);var[Bj,X4]=Gt("ScrollAreaScrollbar was not found in tree");var N0=(0,Ma.forwardRef)((e,t)=>{let{sizes:r,hasThumb:n,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:s,onDragScroll:l,onWheelScroll:c,onResize:d,...u}=e,f=dr(),[m,p]=(0,Ma.useState)(null),g=We(t,$=>p($)),y=(0,Ma.useRef)(null),v=(0,Ma.useRef)(""),{viewport:x}=f,_=r.content-r.viewport,I=Wi(c),S=Wi(s),w=Ss(d,10),P=$=>{if(y.current){let B=$.clientX-y.current.left,W=$.clientY-y.current.top;l({x:B,y:W})}};return(0,Ma.useEffect)(()=>{let $=B=>{let W=B.target;m?.contains(W)&&I(B,_)};return document.addEventListener("wheel",$,{passive:!1}),()=>document.removeEventListener("wheel",$,{passive:!1})},[x,m,_,I]),(0,Ma.useEffect)(S,[r,S]),Bs(m,w),Bs(f.content,w),(0,Q4.jsx)(Bj,{value:{scrollbar:m,hasThumb:n,onThumbChange:Wi(o),onThumbPointerUp:Wi(i),onThumbPositionChange:S,onThumbPointerDown:Wi(a)},children:(0,Q4.jsx)("div",{...u,ref:g,"data-mantine-scrollbar":!0,style:{position:"absolute",...u.style},onPointerDown:La(e.onPointerDown,$=>{$.preventDefault(),$.button===0&&($.target.setPointerCapture($.pointerId),y.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",P($))}),onPointerMove:La(e.onPointerMove,P),onPointerUp:La(e.onPointerUp,$=>{let B=$.target;B.hasPointerCapture($.pointerId)&&($.preventDefault(),B.releasePointerCapture($.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=v.current,y.current=null}})})});var Y4=(0,ac.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=dr(),[s,l]=(0,ac.useState)(),c=(0,ac.useRef)(null),d=We(t,c,a.onScrollbarXChange);return(0,ac.useEffect)(()=>{c.current&&l(getComputedStyle(c.current))},[c]),(0,jj.jsx)(N0,{"data-orientation":"horizontal",...i,ref:d,sizes:r,style:{...o,"--sa-thumb-width":`${ic(r)}px`},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(m),z0(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:na(s.paddingLeft),paddingEnd:na(s.paddingRight)}})}})});Y4.displayName="@mantine/core/ScrollAreaScrollbarX";var Uj=b(O(),1),sc=b(D(),1);var J4=(0,sc.forwardRef)((e,t)=>{let{sizes:r,onSizesChange:n,style:o,...i}=e,a=dr(),[s,l]=(0,sc.useState)(),c=(0,sc.useRef)(null),d=We(t,c,a.onScrollbarYChange);return(0,sc.useEffect)(()=>{c.current&&l(window.getComputedStyle(c.current))},[]),(0,Uj.jsx)(N0,{...i,"data-orientation":"vertical",ref:d,sizes:r,style:{"--sa-thumb-height":`${ic(r)}px`,...o},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(a.viewport){let m=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(m),z0(m,f)&&u.preventDefault()}},onResize:()=>{c.current&&a.viewport&&s&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:na(s.paddingTop),paddingEnd:na(s.paddingBottom)}})}})});J4.displayName="@mantine/core/ScrollAreaScrollbarY";var Kd=(0,qd.forwardRef)((e,t)=>{let{orientation:r="vertical",...n}=e,{dir:o}=si(),i=dr(),a=(0,qd.useRef)(null),s=(0,qd.useRef)(0),[l,c]=(0,qd.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=A0(l.viewport,l.content),u={...n,sizes:l,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:m=>{a.current=m},onThumbPointerUp:()=>{s.current=0},onThumbPointerDown:m=>{s.current=m}},f=(m,p)=>Mj(m,s.current,l,p);return r==="horizontal"?(0,eD.jsx)(Y4,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollLeft,p=K4(m,l,o);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=f(m,o))}}):r==="vertical"?(0,eD.jsx)(J4,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let m=i.viewport.scrollTop,p=K4(m,l);l.scrollbar.size===0?a.current.style.setProperty("--thumb-opacity","0"):a.current.style.setProperty("--thumb-opacity","1"),a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=f(m))}}):null});Kd.displayName="@mantine/core/ScrollAreaScrollbarVisible";var ov=(0,F0.forwardRef)((e,t)=>{let r=dr(),{forceMount:n,...o}=e,[i,a]=(0,F0.useState)(!1),s=e.orientation==="horizontal",l=Ss(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?c:d)}},10);return Bs(r.viewport,l),Bs(r.content,l),n||i?(0,Vj.jsx)(Kd,{"data-state":i?"visible":"hidden",...o,ref:t}):null});ov.displayName="@mantine/core/ScrollAreaScrollbarAuto";var Hj=b(O(),1),bm=b(D(),1);var tD=(0,bm.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=dr(),[i,a]=(0,bm.useState)(!1);return(0,bm.useEffect)(()=>{let{scrollArea:s}=o,l=0;if(s){let c=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),r||i?(0,Hj.jsx)(ov,{"data-state":i?"visible":"hidden",...n,ref:t}):null});tD.displayName="@mantine/core/ScrollAreaScrollbarHover";var Wj=b(O(),1),Xd=b(D(),1);var Zj=(0,Xd.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=dr(),i=e.orientation==="horizontal",[a,s]=(0,Xd.useState)("hidden"),l=Ss(()=>s("idle"),100);return(0,Xd.useEffect)(()=>{if(a==="idle"){let c=window.setTimeout(()=>s("hidden"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay]),(0,Xd.useEffect)(()=>{let{viewport:c}=o,d=i?"scrollLeft":"scrollTop";if(c){let u=c[d],f=()=>{let m=c[d];u!==m&&(s("scrolling"),l()),u=m};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,i,l]),r||a!=="hidden"?(0,Wj.jsx)(Kd,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:La(e.onPointerEnter,()=>s("interacting")),onPointerLeave:La(e.onPointerLeave,()=>s("idle"))}):null});var M0=(0,L0.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=dr(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return(0,L0.useEffect)(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?(0,nv.jsx)(tD,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,nv.jsx)(Zj,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,nv.jsx)(ov,{...n,ref:t,forceMount:r}):o.type==="always"?(0,nv.jsx)(Kd,{...n,ref:t}):null});M0.displayName="@mantine/core/ScrollAreaScrollbar";var rD=b(O(),1),Qd=b(D(),1);function Gj(e,t=()=>{}){let r={left:e.scrollLeft,top:e.scrollTop},n=0;return(function o(){let i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)})(),()=>window.cancelAnimationFrame(n)}var qj=(0,Qd.forwardRef)((e,t)=>{let{style:r,...n}=e,o=dr(),i=X4(),{onThumbPositionChange:a}=i,s=We(t,d=>i.onThumbChange(d)),l=(0,Qd.useRef)(void 0),c=Ss(()=>{l.current&&(l.current(),l.current=void 0)},100);return(0,Qd.useEffect)(()=>{let{viewport:d}=o;if(d){let u=()=>{if(c(),!l.current){let f=Gj(d,a);l.current=f,a()}};return a(),d.addEventListener("scroll",u),()=>d.removeEventListener("scroll",u)}},[o.viewport,c,a]),(0,rD.jsx)("div",{"data-state":i.hasThumb?"visible":"hidden",...n,ref:s,style:{width:"var(--sa-thumb-width)",height:"var(--sa-thumb-height)",...r},onPointerDownCapture:La(e.onPointerDownCapture,d=>{let f=d.target.getBoundingClientRect(),m=d.clientX-f.left,p=d.clientY-f.top;i.onThumbPointerDown({x:m,y:p})}),onPointerUp:La(e.onPointerUp,i.onThumbPointerUp)})});qj.displayName="@mantine/core/ScrollAreaThumb";var B0=(0,Qd.forwardRef)((e,t)=>{let{forceMount:r,...n}=e,o=X4();return r||o.hasThumb?(0,rD.jsx)(qj,{ref:t,...n}):null});B0.displayName="@mantine/core/ScrollAreaThumb";var oD=b(O(),1),Kj=b(D(),1);var nD=(0,Kj.forwardRef)(({children:e,style:t,...r},n)=>{let o=dr(),i=We(n,o.onViewportChange);return(0,oD.jsx)(F,{...r,ref:i,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t},children:(0,oD.jsx)("div",{style:{minWidth:"100%"},ref:o.onContentChange,children:e})})});nD.displayName="@mantine/core/ScrollAreaViewport";var j0={root:"m_d57069b5",viewport:"m_c0783ff9",viewportInner:"m_f8f631dd",scrollbar:"m_c44ba933",thumb:"m_d8b5e363",corner:"m_21657268"};var Xj={scrollHideDelay:1e3,type:"hover",scrollbars:"xy"},Mse=(e,{scrollbarSize:t,overscrollBehavior:r})=>({root:{"--scrollarea-scrollbar-size":Z(t),"--scrollarea-over-scroll-behavior":r}}),Nr=M((e,t)=>{let r=z("ScrollArea",Xj,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,scrollbarSize:l,vars:c,type:d,scrollHideDelay:u,viewportProps:f,viewportRef:m,onScrollPositionChange:p,children:g,offsetScrollbars:y,scrollbars:v,onBottomReached:x,onTopReached:_,overscrollBehavior:I,...S}=r,[w,P]=(0,lc.useState)(!1),[$,B]=(0,lc.useState)(!1),[W,H]=(0,lc.useState)(!1),K=Q({name:"ScrollArea",props:r,classes:j0,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:Mse}),T=(0,lc.useRef)(null),k=Cj([m,T]);return(0,lc.useEffect)(()=>{if(!T.current||y!=="present")return;let E=T.current,C=new ResizeObserver(()=>{let{scrollHeight:A,clientHeight:R,scrollWidth:N,clientWidth:U}=E;B(A>R),H(N>U)});return C.observe(E),()=>C.disconnect()},[T,y]),(0,vi.jsxs)(q4,{type:d==="never"?"always":d,scrollHideDelay:u,ref:t,scrollbars:v,...K("root"),...S,children:[(0,vi.jsx)(nD,{...f,...K("viewport",{style:f?.style}),ref:k,"data-offset-scrollbars":y===!0?"xy":y||void 0,"data-scrollbars":v||void 0,"data-horizontal-hidden":y==="present"&&!W?"true":void 0,"data-vertical-hidden":y==="present"&&!$?"true":void 0,onScroll:E=>{f?.onScroll?.(E),p?.({x:E.currentTarget.scrollLeft,y:E.currentTarget.scrollTop});let{scrollTop:C,scrollHeight:A,clientHeight:R}=E.currentTarget;C-(A-R)>=-.6&&x?.(),C===0&&_?.()},children:g}),(v==="xy"||v==="x")&&(0,vi.jsx)(M0,{...K("scrollbar"),orientation:"horizontal","data-hidden":d==="never"||y==="present"&&!W?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,vi.jsx)(B0,{...K("thumb")})}),(v==="xy"||v==="y")&&(0,vi.jsx)(M0,{...K("scrollbar"),orientation:"vertical","data-hidden":d==="never"||y==="present"&&!$?!0:void 0,forceMount:!0,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),children:(0,vi.jsx)(B0,{...K("thumb")})}),(0,vi.jsx)(Lj,{...K("corner"),"data-hovered":w||void 0,"data-hidden":d==="never"||void 0})]})});Nr.displayName="@mantine/core/ScrollArea";var U0=M((e,t)=>{let{children:r,classNames:n,styles:o,scrollbarSize:i,scrollHideDelay:a,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,scrollbars:g,style:y,vars:v,onBottomReached:x,onTopReached:_,...I}=z("ScrollAreaAutosize",Xj,e);return(0,vi.jsx)(F,{...I,ref:t,style:[{display:"flex",overflow:"auto"},y],children:(0,vi.jsx)(F,{style:{display:"flex",flexDirection:"column",flex:1},children:(0,vi.jsx)(Nr,{classNames:n,styles:o,scrollHideDelay:a,scrollbarSize:i,type:s,dir:l,offsetScrollbars:c,viewportRef:d,onScrollPositionChange:u,unstyled:f,variant:m,viewportProps:p,vars:v,scrollbars:g,onBottomReached:x,onTopReached:_,children:r})})})});Nr.classes=j0;U0.displayName="@mantine/core/ScrollAreaAutosize";U0.classes=j0;Nr.Autosize=U0;var Qj=b(O(),1),S5e=b(D(),1);var iD={root:"m_87cf2631"};var Bse={__staticSelector:"UnstyledButton"},It=nt((e,t)=>{let r=z("UnstyledButton",Bse,e),{className:n,component:o="button",__staticSelector:i,unstyled:a,classNames:s,styles:l,style:c,...d}=r,u=Q({name:i,props:r,classes:iD,className:n,style:c,classNames:s,styles:l,unstyled:a});return(0,Qj.jsx)(F,{...u("root",{focusable:!0}),component:o,ref:t,type:o==="button"?"button":void 0,...d})});It.classes=iD;It.displayName="@mantine/core/UnstyledButton";var Yj=b(O(),1),A5e=b(D(),1);var aD={root:"m_515a97f8"};var jse={},V0=M((e,t)=>{let r=z("VisuallyHidden",jse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,...c}=r,d=Q({name:"VisuallyHidden",classes:aD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return(0,Yj.jsx)(F,{component:"span",ref:t,...d("root"),...c})});V0.classes=aD;V0.displayName="@mantine/core/VisuallyHidden";var Jj=b(O(),1),U5e=b(D(),1);var sD={root:"m_1b7284a3"};var Use={},Vse=(e,{radius:t,shadow:r})=>({root:{"--paper-radius":t===void 0?void 0:Ee(t),"--paper-shadow":wf(r)}}),ia=nt((e,t)=>{let r=z("Paper",Use,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,withBorder:l,vars:c,radius:d,shadow:u,variant:f,mod:m,...p}=r,g=Q({name:"Paper",props:r,classes:sD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:Vse});return(0,Jj.jsx)(F,{ref:t,mod:[{"data-with-border":l},m],...g("root"),variant:f,...p})});ia.classes=sD;ia.displayName="@mantine/core/Paper";var wm=b(O(),1),Ba=b(D(),1);function H0(e,t){if(e==="rtl"&&(t.includes("right")||t.includes("left"))){let[r,n]=t.split("-"),o=r==="right"?"left":"right";return n===void 0?o:`${o}-${n}`}return t}var oU=b(O(),1),nU=b(D(),1);function eU(e,t,r,n){return e==="center"||n==="center"?{top:t}:e==="end"?{bottom:r}:e==="start"?{top:r}:{}}function tU(e,t,r,n,o){return e==="center"||n==="center"?{left:t}:e==="end"?{[o==="ltr"?"right":"left"]:r}:e==="start"?{[o==="ltr"?"left":"right"]:r}:{}}var Hse={bottom:"borderTopLeftRadius",left:"borderTopRightRadius",right:"borderBottomLeftRadius",top:"borderBottomRightRadius"};function rU({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,arrowX:i,arrowY:a,dir:s}){let[l,c="center"]=e.split("-"),d={width:t,height:t,transform:"rotate(45deg)",position:"absolute",[Hse[l]]:n},u=-t/2;return l==="left"?{...d,...eU(c,a,r,o),right:u,borderLeftColor:"transparent",borderBottomColor:"transparent",clipPath:"polygon(100% 0, 0 0, 100% 100%)"}:l==="right"?{...d,...eU(c,a,r,o),left:u,borderRightColor:"transparent",borderTopColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 100%)"}:l==="top"?{...d,...tU(c,i,r,o,s),bottom:u,borderTopColor:"transparent",borderLeftColor:"transparent",clipPath:"polygon(0 100%, 100% 100%, 100% 0)"}:l==="bottom"?{...d,...tU(c,i,r,o,s),top:u,borderBottomColor:"transparent",borderRightColor:"transparent",clipPath:"polygon(0 100%, 0 0, 100% 0)"}:{}}var iv=(0,nU.forwardRef)(({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,visible:i,arrowX:a,arrowY:s,style:l,...c},d)=>{let{dir:u}=si();return i?(0,oU.jsx)("div",{...c,ref:d,style:{...l,...rU({position:e,arrowSize:t,arrowOffset:r,arrowRadius:n,arrowPosition:o,dir:u,arrowX:a,arrowY:s})}}):null});iv.displayName="@mantine/core/FloatingArrow";var iU=b(O(),1);var iOe=b(D(),1);var lD={root:"m_9814e45f"};var Wse={zIndex:Et("modal")},Zse=(e,{gradient:t,color:r,backgroundOpacity:n,blur:o,radius:i,zIndex:a})=>({root:{"--overlay-bg":t||(r!==void 0||n!==void 0)&&ai(r||"#000",n??.6)||void 0,"--overlay-filter":o?`blur(${Z(o)})`:void 0,"--overlay-radius":i===void 0?void 0:Ee(i),"--overlay-z-index":a?.toString()}}),ym=nt((e,t)=>{let r=z("Overlay",Wse,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,fixed:c,center:d,children:u,radius:f,zIndex:m,gradient:p,blur:g,color:y,backgroundOpacity:v,mod:x,..._}=r,I=Q({name:"Overlay",props:r,classes:lD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Zse});return(0,iU.jsx)(F,{ref:t,...I("root"),mod:[{center:d,fixed:c},x],..._,children:u})});ym.classes=lD;ym.displayName="@mantine/core/Overlay";var W0=b(O(),1),Z0=b(D(),1),aU=b(tc(),1);function cD(e){let t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}function Gse({target:e,reuseTargetNode:t,...r}){if(e)return typeof e=="string"?document.querySelector(e)||cD(r):e;if(t){let n=document.querySelector("[data-mantine-shared-portal-node]");if(n)return n;let o=cD(r);return o.setAttribute("data-mantine-shared-portal-node","true"),document.body.appendChild(o),o}return cD(r)}var qse={},dD=M((e,t)=>{let{children:r,target:n,reuseTargetNode:o,...i}=z("Portal",qse,e),[a,s]=(0,Z0.useState)(!1),l=(0,Z0.useRef)(null);return Uo(()=>(s(!0),l.current=Gse({target:n,reuseTargetNode:o,...i}),bd(t,l.current),!n&&!o&&l.current&&document.body.appendChild(l.current),()=>{!n&&!o&&l.current&&document.body.removeChild(l.current)}),[n]),!a||!l.current?null:(0,aU.createPortal)((0,W0.jsx)(W0.Fragment,{children:r}),l.current)});dD.displayName="@mantine/core/Portal";var av=b(O(),1),_Oe=b(D(),1);var kn=M(({withinPortal:e=!0,children:t,...r},n)=>By()==="test"||!e?(0,av.jsx)(av.Fragment,{children:t}):(0,av.jsx)(dD,{ref:n,...r,children:t}));kn.displayName="@mantine/core/OptionalPortal";var _m=b(O(),1),zOe=b(D(),1);var sv=e=>({in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:`scale(.9) translateY(${e==="bottom"?10:-10}px)`},transitionProperty:"transform, opacity"}),lv={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:"opacity"},"fade-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(30px)"},transitionProperty:"opacity, transform"},"fade-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-30px)"},transitionProperty:"opacity, transform"},"fade-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(30px)"},transitionProperty:"opacity, transform"},"fade-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-30px)"},transitionProperty:"opacity, transform"},scale:{in:{opacity:1,transform:"scale(1)"},out:{opacity:0,transform:"scale(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-y":{in:{opacity:1,transform:"scaleY(1)"},out:{opacity:0,transform:"scaleY(0)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"scale-x":{in:{opacity:1,transform:"scaleX(1)"},out:{opacity:0,transform:"scaleX(0)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"skew-up":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(-20px) skew(-10deg, -5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"skew-down":{in:{opacity:1,transform:"translateY(0) skew(0deg, 0deg)"},out:{opacity:0,transform:"translateY(20px) skew(-10deg, -5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-left":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(-5deg)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"rotate-right":{in:{opacity:1,transform:"translateY(0) rotate(0deg)"},out:{opacity:0,transform:"translateY(20px) rotate(5deg)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-down":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(-100%)"},common:{transformOrigin:"top"},transitionProperty:"transform, opacity"},"slide-up":{in:{opacity:1,transform:"translateY(0)"},out:{opacity:0,transform:"translateY(100%)"},common:{transformOrigin:"bottom"},transitionProperty:"transform, opacity"},"slide-left":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(100%)"},common:{transformOrigin:"left"},transitionProperty:"transform, opacity"},"slide-right":{in:{opacity:1,transform:"translateX(0)"},out:{opacity:0,transform:"translateX(-100%)"},common:{transformOrigin:"right"},transitionProperty:"transform, opacity"},pop:{...sv("bottom"),common:{transformOrigin:"center center"}},"pop-bottom-left":{...sv("bottom"),common:{transformOrigin:"bottom left"}},"pop-bottom-right":{...sv("bottom"),common:{transformOrigin:"bottom right"}},"pop-top-left":{...sv("top"),common:{transformOrigin:"top left"}},"pop-top-right":{...sv("top"),common:{transformOrigin:"top right"}}};var sU={entering:"in",entered:"in",exiting:"out",exited:"out","pre-exiting":"out","pre-entering":"out"};function lU({transition:e,state:t,duration:r,timingFunction:n}){let o={WebkitBackfaceVisibility:"hidden",willChange:"transform, opacity",transitionDuration:`${r}ms`,transitionTimingFunction:n};return typeof e=="string"?e in lv?{transitionProperty:lv[e].transitionProperty,...o,...lv[e].common,...lv[e][sU[t]]}:{}:{transitionProperty:e.transitionProperty,...o,...e.common,...e[sU[t]]}}var js=b(D(),1),cU=b(tc(),1);var EOe=b(O(),1);function dU({duration:e,exitDuration:t,timingFunction:r,mounted:n,onEnter:o,onExit:i,onEntered:a,onExited:s,enterDelay:l,exitDelay:c}){let d=ft(),u=Cs(),f=d.respectReducedMotion?u:!1,[m,p]=(0,js.useState)(f?0:e),[g,y]=(0,js.useState)(n?"entered":"exited"),v=(0,js.useRef)(-1),x=(0,js.useRef)(-1),_=(0,js.useRef)(-1);function I(){window.clearTimeout(v.current),window.clearTimeout(x.current),cancelAnimationFrame(_.current)}let S=P=>{I();let $=P?o:i,B=P?a:s,W=f?0:P?e:t;p(W),W===0?(typeof $=="function"&&$(),typeof B=="function"&&B(),y(P?"entered":"exited")):_.current=requestAnimationFrame(()=>{cU.default.flushSync(()=>{y(P?"pre-entering":"pre-exiting")}),_.current=requestAnimationFrame(()=>{typeof $=="function"&&$(),y(P?"entering":"exiting"),v.current=window.setTimeout(()=>{typeof B=="function"&&B(),y(P?"entered":"exited")},W)})})},w=P=>{if(I(),typeof(P?l:c)!="number"){S(P);return}x.current=window.setTimeout(()=>{S(P)},P?l:c)};return yr(()=>{w(n)},[n]),(0,js.useEffect)(()=>()=>{I()},[]),{transitionDuration:m,transitionStatus:g,transitionTimingFunction:r||"ease"}}function Go({keepMounted:e,transition:t="fade",duration:r=250,exitDuration:n=r,mounted:o,children:i,timingFunction:a="ease",onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f}){let m=By(),{transitionDuration:p,transitionStatus:g,transitionTimingFunction:y}=dU({mounted:o,exitDuration:n,duration:r,timingFunction:a,onExit:s,onEntered:l,onEnter:c,onExited:d,enterDelay:u,exitDelay:f});return p===0||m==="test"?o?(0,_m.jsx)(_m.Fragment,{children:i({})}):e?i({display:"none"}):null:g==="exited"?e?i({display:"none"}):null:(0,_m.jsx)(_m.Fragment,{children:i(lU({transition:t,duration:p,state:g,timingFunction:y}))})}Go.displayName="@mantine/core/Transition";var jOe=b(D(),1);var VOe=b(O(),1);var[uU,G0]=Gt("Popover component was not found in the tree");var Yd=b(O(),1);var e3e=b(D(),1);var fU=b(O(),1),mU=b(D(),1);function Im({children:e,active:t=!0,refProp:r="ref",innerRef:n}){let o=U2(t),i=We(o,n);return ko(e)?(0,mU.cloneElement)(e,{[r]:i}):e}function pU(e){return(0,fU.jsx)(V0,{tabIndex:-1,"data-autofocus":!0,...e})}Im.displayName="@mantine/core/FocusTrap";pU.displayName="@mantine/core/FocusTrapInitialFocus";Im.InitialFocus=pU;var q0={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};var Kse={},K0=M((e,t)=>{let r=z("PopoverDropdown",Kse,e),{className:n,style:o,vars:i,children:a,onKeyDownCapture:s,variant:l,classNames:c,styles:d,...u}=r,f=G0(),m=Zh({opened:f.opened,shouldReturnFocus:f.returnFocus}),p=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:"dialog",tabIndex:-1}:{},g=We(t,f.floating);return f.disabled?null:(0,Yd.jsx)(kn,{...f.portalProps,withinPortal:f.withinPortal,children:(0,Yd.jsx)(Go,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||"fade",duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,exitDuration:typeof f.transitionProps?.exitDuration=="number"?f.transitionProps.exitDuration:f.transitionProps?.duration,children:y=>(0,Yd.jsx)(Im,{active:f.trapFocus&&f.opened,innerRef:g,children:(0,Yd.jsxs)(F,{...p,...u,variant:l,onKeyDownCapture:kL(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:m,onKeyDown:s}),"data-position":f.placement,"data-fixed":f.floatingStrategy==="fixed"||void 0,...f.getStyles("dropdown",{className:n,props:r,classNames:c,styles:d,style:[{...y,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width==="target"?void 0:Z(f.width)},f.resolvedStyles.dropdown,d?.dropdown,o]}),children:[a,(0,Yd.jsx)(iv,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles("arrow",{props:r,classNames:c,styles:d})})]})})})})});K0.classes=q0;K0.displayName="@mantine/core/PopoverDropdown";var hU=b(D(),1);var g3e=b(O(),1);var Xse={refProp:"ref",popupType:"dialog"},uD=M((e,t)=>{let{children:r,refProp:n,popupType:o,...i}=z("PopoverTarget",Xse,e);if(!ko(r))throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let a=i,s=G0(),l=We(s.reference,El(r),t),c=s.withRoles?{"aria-haspopup":o,"aria-expanded":s.opened,"aria-controls":s.getDropdownId(),id:s.getTargetId()}:{};return(0,hU.cloneElement)(r,{...a,...c,...s.targetProps,className:Ke(s.targetProps.className,a.className,r.props.className),[n]:l,...s.controlled?null:{onClick:s.onToggle}})});uD.displayName="@mantine/core/PopoverTarget";var gU=b(D(),1);var X0=b(D(),1);function Q0({opened:e,floating:t,position:r,positionDependencies:n}){let[o,i]=(0,X0.useState)(0);(0,X0.useEffect)(()=>{if(t.refs.reference.current&&t.refs.floating.current&&e)return P0(t.refs.reference.current,t.refs.floating.current,t.update)},[t.refs.reference.current,t.refs.floating.current,e,o,r]),yr(()=>{t.update()},n),yr(()=>{i(a=>a+1)},[e])}function Qse(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Yse(e,t){let r=Qse(e.middlewares),n=[hm(e.offset)];return r.shift&&n.push(Zd(typeof r.shift=="boolean"?{limiter:E0(),padding:5}:{limiter:E0(),padding:5,...r.shift})),r.flip&&n.push(typeof r.flip=="boolean"?Gd():Gd(r.flip)),r.inline&&n.push(typeof r.inline=="boolean"?nc():nc(r.inline)),n.push(rv({element:e.arrowRef,padding:e.arrowOffset})),(r.size||e.width==="target")&&n.push(L4({...typeof r.size=="boolean"?{}:r.size,apply({rects:o,availableWidth:i,availableHeight:a,...s}){let c=t().refs.floating.current?.style??{};r.size&&(typeof r.size=="object"&&r.size.apply?r.size.apply({rects:o,availableWidth:i,availableHeight:a,...s}):Object.assign(c,{maxWidth:`${i}px`,maxHeight:`${a}px`})),e.width==="target"&&Object.assign(c,{width:`${o.reference.width}px`})}})),n}function vU(e){let[t,r]=ot({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),n=(0,gU.useRef)(t),o=()=>{t&&!e.disabled&&r(!1)},i=()=>!e.disabled&&r(!t),a=vm({strategy:e.strategy,placement:e.position,middleware:Yse(e,()=>a)});return Q0({opened:t,position:e.position,positionDependencies:e.positionDependencies||[],floating:a}),yr(()=>{e.onPositionChange?.(a.placement)},[a.placement]),yr(()=>{t!==n.current&&(t?e.onOpen?.():e.onClose?.()),n.current=t},[t,e.onClose,e.onOpen]),{floating:a,controlled:typeof e.opened=="boolean",opened:t,onClose:o,onToggle:i}}var Jse={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,clickOutsideEvents:["mousedown","touchstart"],zIndex:Et("popover"),__staticSelector:"Popover",width:"max-content"},ele=(e,{radius:t,shadow:r})=>({dropdown:{"--popover-radius":t===void 0?void 0:Ee(t),"--popover-shadow":wf(r)}});function Xr(e){let t=z("Popover",Jse,e),{children:r,position:n,offset:o,onPositionChange:i,positionDependencies:a,opened:s,transitionProps:l,onExitTransitionEnd:c,onEnterTransitionEnd:d,width:u,middlewares:f,withArrow:m,arrowSize:p,arrowOffset:g,arrowRadius:y,arrowPosition:v,unstyled:x,classNames:_,styles:I,closeOnClickOutside:S,withinPortal:w,portalProps:P,closeOnEscape:$,clickOutsideEvents:B,trapFocus:W,onClose:H,onDismiss:K,onOpen:T,onChange:k,zIndex:E,radius:C,shadow:A,id:R,defaultOpened:N,__staticSelector:U,withRoles:G,disabled:oe,returnFocus:ve,variant:pe,keepMounted:Y,vars:ne,floatingStrategy:we,withOverlay:se,overlayProps:Ae,...He}=t,et=Q({name:U,props:t,classes:q0,classNames:_,styles:I,unstyled:x,rootSelector:"dropdown",vars:ne,varsResolver:ele}),{resolvedStyles:dt}=Zr({classNames:_,styles:I,props:t}),Fe=(0,Ba.useRef)(null),[Jt,er]=(0,Ba.useState)(null),[co,he]=(0,Ba.useState)(null),{dir:fe}=si(),Se=bt(R),ze=vU({middlewares:f,width:u,position:H0(fe,n),offset:typeof o=="number"?o+(m?p/2:0):o,arrowRef:Fe,arrowOffset:g,onPositionChange:i,positionDependencies:a,opened:s,defaultOpened:N,onChange:k,onOpen:T,onClose:H,onDismiss:K,strategy:we,disabled:oe});L2(()=>{S&&(ze.onClose(),K?.())},B,[Jt,co]);let Ye=(0,Ba.useCallback)(Te=>{er(Te),ze.floating.refs.setReference(Te)},[ze.floating.refs.setReference]),Me=(0,Ba.useCallback)(Te=>{he(Te),ze.floating.refs.setFloating(Te)},[ze.floating.refs.setFloating]),tt=(0,Ba.useCallback)(()=>{l?.onExited?.(),c?.()},[l?.onExited,c]),ue=(0,Ba.useCallback)(()=>{l?.onEntered?.(),d?.()},[l?.onEntered,d]);return(0,wm.jsxs)(uU,{value:{returnFocus:ve,disabled:oe,controlled:ze.controlled,reference:Ye,floating:Me,x:ze.floating.x,y:ze.floating.y,arrowX:ze.floating?.middlewareData?.arrow?.x,arrowY:ze.floating?.middlewareData?.arrow?.y,opened:ze.opened,arrowRef:Fe,transitionProps:{...l,onExited:tt,onEntered:ue},width:u,withArrow:m,arrowSize:p,arrowOffset:g,arrowRadius:y,arrowPosition:v,placement:ze.floating.placement,trapFocus:W,withinPortal:w,portalProps:P,zIndex:E,radius:C,shadow:A,closeOnEscape:$,onDismiss:K,onClose:ze.onClose,onToggle:ze.onToggle,getTargetId:()=>`${Se}-target`,getDropdownId:()=>`${Se}-dropdown`,withRoles:G,targetProps:He,__staticSelector:U,classNames:_,styles:I,unstyled:x,variant:pe,keepMounted:Y,getStyles:et,resolvedStyles:dt,floatingStrategy:we},children:[r,se&&(0,wm.jsx)(Go,{transition:"fade",mounted:ze.opened,duration:l?.duration||250,exitDuration:l?.exitDuration||250,children:Te=>(0,wm.jsx)(kn,{withinPortal:w,children:(0,wm.jsx)(ym,{...Ae,...et("overlay",{className:Ae?.className,style:[Te,Ae?.style]})})})})]})}Xr.Target=uD;Xr.Dropdown=K0;Xr.displayName="@mantine/core/Popover";Xr.extend=e=>e;var Jd=b(O(),1),Lze=b(D(),1);var hD=b(O(),1),aze=b(D(),1);var Sm=b(O(),1),xU=b(D(),1);var qo={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};var fD=(0,xU.forwardRef)(({className:e,...t},r)=>(0,Sm.jsxs)(F,{component:"span",className:Ke(qo.barsLoader,e),...t,ref:r,children:[(0,Sm.jsx)("span",{className:qo.bar}),(0,Sm.jsx)("span",{className:qo.bar}),(0,Sm.jsx)("span",{className:qo.bar})]}));fD.displayName="@mantine/core/Bars";var km=b(O(),1),bU=b(D(),1);var mD=(0,bU.forwardRef)(({className:e,...t},r)=>(0,km.jsxs)(F,{component:"span",className:Ke(qo.dotsLoader,e),...t,ref:r,children:[(0,km.jsx)("span",{className:qo.dot}),(0,km.jsx)("span",{className:qo.dot}),(0,km.jsx)("span",{className:qo.dot})]}));mD.displayName="@mantine/core/Dots";var yU=b(O(),1),_U=b(D(),1);var pD=(0,_U.forwardRef)(({className:e,...t},r)=>(0,yU.jsx)(F,{component:"span",className:Ke(qo.ovalLoader,e),...t,ref:r}));pD.displayName="@mantine/core/Oval";var gD={bars:fD,oval:pD,dots:mD},tle={loaders:gD,type:"oval"},rle=(e,{size:t,color:r})=>({root:{"--loader-size":xe(t,"loader-size"),"--loader-color":r?Ze(r,e):void 0}}),ho=M((e,t)=>{let r=z("Loader",tle,e),{size:n,color:o,type:i,vars:a,className:s,style:l,classNames:c,styles:d,unstyled:u,loaders:f,variant:m,children:p,...g}=r,y=Q({name:"Loader",props:r,classes:qo,className:s,style:l,classNames:c,styles:d,unstyled:u,vars:a,varsResolver:rle});return p?(0,hD.jsx)(F,{...y("root"),ref:t,...g,children:p}):(0,hD.jsx)(F,{...y("root"),ref:t,component:f[i],variant:m,size:n,...g})});ho.defaultLoaders=gD;ho.classes=qo;ho.displayName="@mantine/core/Loader";var wU=b(O(),1);var _ze=b(D(),1);var Us={root:"m_8d3f4000",icon:"m_8d3afb97",loader:"m_302b9fb1",group:"m_1a0f1b21",groupSection:"m_437b6484"};var IU={orientation:"horizontal"},ole=(e,{borderWidth:t})=>({group:{"--ai-border-width":Z(t)}}),Y0=M((e,t)=>{let r=z("ActionIconGroup",IU,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ActionIconGroup",IU,e),p=Q({name:"ActionIconGroup",props:r,classes:Us,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:ole,rootSelector:"group"});return(0,wU.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});Y0.classes=Us;Y0.displayName="@mantine/core/ActionIconGroup";var kU=b(O(),1),Rze=b(D(),1);var SU={},nle=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":xe(a,"section-height"),"--section-padding-x":xe(a,"section-padding-x"),"--section-fz":Pt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},J0=M((e,t)=>{let r=z("ActionIconGroupSection",SU,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ActionIconGroupSection",SU,e),p=Q({name:"ActionIconGroupSection",props:r,classes:Us,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:nle,rootSelector:"groupSection"});return(0,kU.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});J0.classes=Us;J0.displayName="@mantine/core/ActionIconGroupSection";var ile={},ale=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ai-size":xe(t,"ai-size"),"--ai-radius":r===void 0?void 0:Ee(r),"--ai-bg":i||n?s.background:void 0,"--ai-hover":i||n?s.hover:void 0,"--ai-hover-color":i||n?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":i||n?s.border:void 0}}},xt=nt((e,t)=>{let r=z("ActionIcon",ile,e),{className:n,unstyled:o,variant:i,classNames:a,styles:s,style:l,loading:c,loaderProps:d,size:u,color:f,radius:m,__staticSelector:p,gradient:g,vars:y,children:v,disabled:x,"data-disabled":_,autoContrast:I,mod:S,...w}=r,P=Q({name:["ActionIcon",p],props:r,className:n,style:l,classes:Us,classNames:a,styles:s,unstyled:o,vars:y,varsResolver:ale});return(0,Jd.jsxs)(It,{...P("root",{active:!x&&!c&&!_}),...w,unstyled:o,variant:i,size:u,disabled:x||c,ref:t,mod:[{loading:c,disabled:x||_},S],children:[(0,Jd.jsx)(Go,{mounted:!!c,transition:"slide-down",duration:150,children:$=>(0,Jd.jsx)(F,{component:"span",...P("loader",{style:$}),"aria-hidden":!0,children:(0,Jd.jsx)(ho,{color:"var(--ai-color)",size:"calc(var(--ai-size) * 0.55)",...d})})}),(0,Jd.jsx)(F,{component:"span",mod:{loading:c},...P("icon"),children:v})]})});xt.classes=Us;xt.displayName="@mantine/core/ActionIcon";xt.Group=Y0;xt.GroupSection=J0;var vD=b(O(),1),CU=b(D(),1),xD=(0,CU.forwardRef)(({size:e="var(--cb-icon-size, 70%)",style:t,...r},n)=>(0,vD.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:n,...r,children:(0,vD.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));xD.displayName="@mantine/core/CloseIcon";var eI=b(O(),1);var tNe=b(D(),1);var bD={root:"m_86a44da5","root--subtle":"m_220c80f2"};var sle={variant:"subtle"},lle=(e,{size:t,radius:r,iconSize:n})=>({root:{"--cb-size":xe(t,"cb-size"),"--cb-radius":r===void 0?void 0:Ee(r),"--cb-icon-size":Z(n)}}),xi=nt((e,t)=>{let r=z("CloseButton",sle,e),{iconSize:n,children:o,vars:i,radius:a,className:s,classNames:l,style:c,styles:d,unstyled:u,"data-disabled":f,disabled:m,variant:p,icon:g,mod:y,__staticSelector:v,...x}=r,_=Q({name:v||"CloseButton",props:r,className:s,style:c,classes:bD,classNames:l,styles:d,unstyled:u,vars:i,varsResolver:lle});return(0,eI.jsxs)(It,{ref:t,...x,unstyled:u,variant:p,disabled:m,mod:[{disabled:m||f},y],..._("root",{variant:p,active:!m&&!f}),children:[g||(0,eI.jsx)(xD,{}),o]})});xi.classes=bD;xi.displayName="@mantine/core/CloseButton";var RU=b(O(),1),mNe=b(D(),1);var PU=b(D(),1);function DU(e){return PU.Children.toArray(e).filter(Boolean)}var yD={root:"m_4081bf90"};var cle={preventGrowOverflow:!0,gap:"md",align:"center",justify:"flex-start",wrap:"wrap"},dle=(e,{grow:t,preventGrowOverflow:r,gap:n,align:o,justify:i,wrap:a},{childWidth:s})=>({root:{"--group-child-width":t&&r?s:void 0,"--group-gap":Ot(n),"--group-align":o,"--group-justify":i,"--group-wrap":a}}),Ce=M((e,t)=>{let r=z("Group",cle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,children:l,gap:c,align:d,justify:u,wrap:f,grow:m,preventGrowOverflow:p,vars:g,variant:y,__size:v,mod:x,..._}=r,I=DU(l),S=I.length,w=Ot(c??"md"),$={childWidth:`calc(${100/S}% - (${w} - ${w} / ${S}))`},B=Q({name:"Group",props:r,stylesCtx:$,className:o,style:i,classes:yD,classNames:n,styles:a,unstyled:s,vars:g,varsResolver:dle});return(0,RU.jsx)(F,{...B("root"),ref:t,variant:y,mod:[{grow:m},x],size:v,..._,children:I})});Ce.classes=yD;Ce.displayName="@mantine/core/Group";var cv=b(O(),1),AU=b(D(),1);var wNe=b(D(),1);var kNe=b(O(),1);var[TU,Qr]=Gt("ModalBase component was not found in tree");var _D=b(D(),1);var Cm=b(D(),1);function EU({opened:e,transitionDuration:t}){let[r,n]=(0,Cm.useState)(e),o=(0,Cm.useRef)(-1),a=Cs()?0:t;return(0,Cm.useEffect)(()=>(e?(n(!0),window.clearTimeout(o.current)):a===0?n(!1):o.current=window.setTimeout(()=>n(!1),a),()=>window.clearTimeout(o.current)),[e,a]),r}function $U({id:e,transitionProps:t,opened:r,trapFocus:n,closeOnEscape:o,onClose:i,returnFocus:a}){let s=bt(e),[l,c]=(0,_D.useState)(!1),[d,u]=(0,_D.useState)(!1),f=typeof t?.duration=="number"?t?.duration:200,m=EU({opened:r,transitionDuration:f});return Tl("keydown",p=>{p.key==="Escape"&&o&&!p.isComposing&&r&&p.target?.getAttribute("data-mantine-stop-propagation")!=="true"&&i()},{capture:!0}),Zh({opened:r,shouldReturnFocus:n&&a}),{_id:s,titleMounted:l,bodyMounted:d,shouldLockScroll:m,setTitleMounted:c,setBodyMounted:u}}var ID=(0,AU.forwardRef)(({keepMounted:e,opened:t,onClose:r,id:n,transitionProps:o,onExitTransitionEnd:i,onEnterTransitionEnd:a,trapFocus:s,closeOnEscape:l,returnFocus:c,closeOnClickOutside:d,withinPortal:u,portalProps:f,lockScroll:m,children:p,zIndex:g,shadow:y,padding:v,__vars:x,unstyled:_,removeScrollProps:I,...S},w)=>{let{_id:P,titleMounted:$,bodyMounted:B,shouldLockScroll:W,setTitleMounted:H,setBodyMounted:K}=$U({id:n,transitionProps:o,opened:t,trapFocus:s,closeOnEscape:l,onClose:r,returnFocus:c}),{key:T,...k}=I||{};return(0,cv.jsx)(kn,{...f,withinPortal:u,children:(0,cv.jsx)(TU,{value:{opened:t,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:i,onEnterTransitionEnd:a,transitionProps:{...o,keepMounted:e},getTitleId:()=>`${P}-title`,getBodyId:()=>`${P}-body`,titleMounted:$,bodyMounted:B,setTitleMounted:H,setBodyMounted:K,trapFocus:s,closeOnEscape:l,zIndex:g,unstyled:_},children:(0,cv.jsx)(Hi,{enabled:W&&m,...k,children:(0,cv.jsx)(F,{ref:w,...S,__vars:{...x,"--mb-z-index":(g||Et("modal")).toString(),"--mb-shadow":wf(y),"--mb-padding":Ot(v)},children:p})},T)})})});ID.displayName="@mantine/core/ModalBase";var NU=b(O(),1),FU=b(D(),1);var OU=b(D(),1);function zU(){let e=Qr();return(0,OU.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var aa={title:"m_615af6c9",header:"m_b5489c3c",inner:"m_60c222c7",content:"m_fd1ab0aa",close:"m_606cb269",body:"m_5df29311"};var wD=(0,FU.forwardRef)(({className:e,...t},r)=>{let n=zU(),o=Qr();return(0,NU.jsx)(F,{ref:r,...t,id:n,className:Ke({[aa.body]:!o.unstyled},e)})});wD.displayName="@mantine/core/ModalBaseBody";var LU=b(O(),1),MU=b(D(),1);var SD=(0,MU.forwardRef)(({className:e,onClick:t,...r},n)=>{let o=Qr();return(0,LU.jsx)(xi,{ref:n,...r,onClick:i=>{o.onClose(),t?.(i)},className:Ke({[aa.close]:!o.unstyled},e),unstyled:o.unstyled})});SD.displayName="@mantine/core/ModalBaseCloseButton";var dv=b(O(),1),BU=b(D(),1);var kD=(0,BU.forwardRef)(({transitionProps:e,className:t,innerProps:r,onKeyDown:n,style:o,...i},a)=>{let s=Qr();return(0,dv.jsx)(Go,{mounted:s.opened,transition:"pop",...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:l=>(0,dv.jsx)("div",{...r,className:Ke({[aa.inner]:!s.unstyled},r.className),children:(0,dv.jsx)(Im,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,dv.jsx)(ia,{...i,component:"section",role:"dialog",tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[o,l],className:Ke({[aa.content]:!s.unstyled},t),unstyled:s.unstyled,children:i.children})})})})});kD.displayName="@mantine/core/ModalBaseContent";var jU=b(O(),1),UU=b(D(),1);var CD=(0,UU.forwardRef)(({className:e,...t},r)=>{let n=Qr();return(0,jU.jsx)(F,{component:"header",ref:r,className:Ke({[aa.header]:!n.unstyled},e),...t})});CD.displayName="@mantine/core/ModalBaseHeader";var PD=b(O(),1),HU=b(D(),1);var ule={duration:200,timingFunction:"ease",transition:"fade"};function VU(e){let t=Qr();return{...ule,...t.transitionProps,...e}}var DD=(0,HU.forwardRef)(({onClick:e,transitionProps:t,style:r,visible:n,...o},i)=>{let a=Qr(),s=VU(t);return(0,PD.jsx)(Go,{mounted:n!==void 0?n:a.opened,...s,transition:"fade",children:l=>(0,PD.jsx)(ym,{ref:i,fixed:!0,style:[r,l],zIndex:a.zIndex,unstyled:a.unstyled,onClick:c=>{e?.(c),a.closeOnClickOutside&&a.onClose()},...o})})});DD.displayName="@mantine/core/ModalBaseOverlay";var GU=b(O(),1),qU=b(D(),1);var WU=b(D(),1);function ZU(){let e=Qr();return(0,WU.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}var RD=(0,qU.forwardRef)(({className:e,...t},r)=>{let n=ZU(),o=Qr();return(0,GU.jsx)(F,{component:"h2",ref:r,className:Ke({[aa.title]:!o.unstyled},e),...t,id:n})});RD.displayName="@mantine/core/ModalBaseTitle";var tI=b(O(),1);function KU({children:e}){return(0,tI.jsx)(tI.Fragment,{children:e})}var eu=b(O(),1);var YLe=b(D(),1);var TFe=b(D(),1),EFe=b(O(),1);var[XU,QU]=Co({size:"sm"});var YU=b(O(),1),zFe=b(D(),1);var fle={},TD=M((e,t)=>{let r=z("InputClearButton",fle,e),{size:n,variant:o,vars:i,classNames:a,styles:s,...l}=r,c=QU(),{resolvedClassNames:d,resolvedStyles:u}=Zr({classNames:a,styles:s,props:r});return(0,YU.jsx)(xi,{variant:o||"transparent",ref:t,size:n||c?.size||"sm",classNames:d,styles:u,__staticSelector:"InputClearButton",...l})});TD.displayName="@mantine/core/InputClearButton";var tV=b(O(),1);var XFe=b(D(),1);var VFe=b(D(),1),HFe=b(O(),1);var[JU,bi]=Co({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0});var Yr={wrapper:"m_6c018570",input:"m_8fb7ebe7",section:"m_82577fc2",placeholder:"m_88bacfd0",root:"m_46b77525",label:"m_8fdc1311",required:"m_78a94662",error:"m_8f816625",description:"m_fe47ce59"};var eV={},mle=(e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${Pt(t)} - ${Z(2)})`}}),Pm=M((e,t)=>{let r=z("InputDescription",eV,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=z("InputDescription",eV,r),p=bi(),g=Q({name:["InputWrapper",d],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"description",vars:l,varsResolver:mle}),y=u&&p?.getStyles||g;return(0,tV.jsx)(F,{component:"p",ref:t,variant:f,size:c,...y("description",p?.getStyles?{className:o,style:i}:void 0),...m})});Pm.classes=Yr;Pm.displayName="@mantine/core/InputDescription";var rV=b(O(),1);var sLe=b(D(),1);var ple={},hle=(e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${Pt(t)} - ${Z(2)})`}}),Dm=M((e,t)=>{let r=z("InputError",ple,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,__staticSelector:d,__inheritStyles:u=!0,variant:f,...m}=r,p=Q({name:["InputWrapper",d],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"error",vars:l,varsResolver:hle}),g=bi(),y=u&&g?.getStyles||p;return(0,rV.jsx)(F,{component:"p",ref:t,variant:f,size:c,...y("error",g?.getStyles?{className:o,style:i}:void 0),...m})});Dm.classes=Yr;Dm.displayName="@mantine/core/InputError";var rI=b(O(),1),vLe=b(D(),1);var oV={labelElement:"label"},gle=(e,{size:t})=>({label:{"--input-label-size":Pt(t),"--input-asterisk-color":void 0}}),Rm=M((e,t)=>{let r=z("InputLabel",oV,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,labelElement:c,size:d,required:u,htmlFor:f,onMouseDown:m,children:p,__staticSelector:g,variant:y,mod:v,...x}=z("InputLabel",oV,r),_=Q({name:["InputWrapper",g],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"label",vars:l,varsResolver:gle}),I=bi(),S=I?.getStyles||_;return(0,rI.jsxs)(F,{...S("label",I?.getStyles?{className:o,style:i}:void 0),component:c,variant:y,size:d,ref:t,htmlFor:c==="label"?f:void 0,mod:[{required:u},v],onMouseDown:w=>{m?.(w),!w.defaultPrevented&&w.detail>1&&w.preventDefault()},...x,children:[p,u&&(0,rI.jsx)("span",{...S("required"),"aria-hidden":!0,children:" *"})]})});Rm.classes=Yr;Rm.displayName="@mantine/core/InputLabel";var iV=b(O(),1),PLe=b(D(),1);var nV={},oI=M((e,t)=>{let r=z("InputPlaceholder",nV,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,variant:d,error:u,mod:f,...m}=z("InputPlaceholder",nV,r),p=Q({name:["InputPlaceholder",c],props:r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"placeholder"});return(0,iV.jsx)(F,{...p("placeholder"),mod:[{error:!!u},f],component:"span",variant:d,ref:t,...m})});oI.classes=Yr;oI.displayName="@mantine/core/InputPlaceholder";var Tm=b(O(),1),nI=b(D(),1);function aV(e,{hasDescription:t,hasError:r}){let n=e.findIndex(l=>l==="input"),o=e.slice(0,n),i=e.slice(n+1),a=t&&o.includes("description")||r&&o.includes("error");return{offsetBottom:t&&i.includes("description")||r&&i.includes("error"),offsetTop:a}}var vle={labelElement:"label",inputContainer:e=>e,inputWrapperOrder:["label","description","input","error"]},xle=(e,{size:t})=>({label:{"--input-label-size":Pt(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${Pt(t)} - ${Z(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${Pt(t)} - ${Z(2)})`}}),iI=M((e,t)=>{let r=z("InputWrapper",vle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,variant:d,__staticSelector:u,inputContainer:f,inputWrapperOrder:m,label:p,error:g,description:y,labelProps:v,descriptionProps:x,errorProps:_,labelElement:I,children:S,withAsterisk:w,id:P,required:$,__stylesApiProps:B,mod:W,...H}=r,K=Q({name:["InputWrapper",u],props:B||r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:xle}),T={size:c,variant:d,__staticSelector:u},k=bt(P),E=typeof w=="boolean"?w:$,C=_?.id||`${k}-error`,A=x?.id||`${k}-description`,R=k,N=!!g&&typeof g!="boolean",U=!!y,G=`${N?C:""} ${U?A:""}`,oe=G.trim().length>0?G.trim():void 0,ve=v?.id||`${k}-label`,pe=p&&(0,Tm.jsx)(Rm,{labelElement:I,id:ve,htmlFor:R,required:E,...T,...v,children:p},"label"),Y=U&&(0,Tm.jsx)(Pm,{...x,...T,size:x?.size||T.size,id:x?.id||A,children:y},"description"),ne=(0,Tm.jsx)(nI.Fragment,{children:f(S)},"input"),we=N&&(0,nI.createElement)(Dm,{..._,...T,size:_?.size||T.size,key:"error",id:_?.id||C},g),se=m.map(Ae=>{switch(Ae){case"label":return pe;case"input":return ne;case"description":return Y;case"error":return we;default:return null}});return(0,Tm.jsx)(JU,{value:{getStyles:K,describedBy:oe,inputId:R,labelId:ve,...aV(m,{hasDescription:U,hasError:N})},children:(0,Tm.jsx)(F,{ref:t,variant:d,size:c,mod:[{error:!!g},W],...K("root"),...H,children:se})})});iI.classes=Yr;iI.displayName="@mantine/core/InputWrapper";var ble={variant:"default",leftSectionPointerEvents:"none",rightSectionPointerEvents:"none",withAria:!0,withErrorStyles:!0},yle=(e,t,r)=>({wrapper:{"--input-margin-top":r.offsetTop?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-margin-bottom":r.offsetBottom?"calc(var(--mantine-spacing-xs) / 2)":void 0,"--input-height":xe(t.size,"input-height"),"--input-fz":Pt(t.size),"--input-radius":t.radius===void 0?void 0:Ee(t.radius),"--input-left-section-width":t.leftSectionWidth!==void 0?Z(t.leftSectionWidth):void 0,"--input-right-section-width":t.rightSectionWidth!==void 0?Z(t.rightSectionWidth):void 0,"--input-padding-y":t.multiline?xe(t.size,"input-padding-y"):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}}),mt=nt((e,t)=>{let r=z("Input",ble,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,required:l,__staticSelector:c,__stylesApiProps:d,size:u,wrapperProps:f,error:m,disabled:p,leftSection:g,leftSectionProps:y,leftSectionWidth:v,rightSection:x,rightSectionProps:_,rightSectionWidth:I,rightSectionPointerEvents:S,leftSectionPointerEvents:w,variant:P,vars:$,pointer:B,multiline:W,radius:H,id:K,withAria:T,withErrorStyles:k,mod:E,inputSize:C,__clearSection:A,__clearable:R,__defaultRightSection:N,...U}=r,{styleProps:G,rest:oe}=Gr(U),ve=bi(),pe={offsetBottom:ve?.offsetBottom,offsetTop:ve?.offsetTop},Y=Q({name:["Input",c],props:d||r,classes:Yr,className:o,style:i,classNames:n,styles:a,unstyled:s,stylesCtx:pe,rootSelector:"wrapper",vars:$,varsResolver:yle}),ne=T?{required:l,disabled:p,"aria-invalid":!!m,"aria-describedby":ve?.describedBy,id:ve?.inputId||K}:{},we=x||R&&A||N;return(0,eu.jsx)(XU,{value:{size:u||"sm"},children:(0,eu.jsxs)(F,{...Y("wrapper"),...G,...f,mod:[{error:!!m&&k,pointer:B,disabled:p,multiline:W,"data-with-right-section":!!we,"data-with-left-section":!!g},E],variant:P,size:u,children:[g&&(0,eu.jsx)("div",{...y,"data-position":"left",...Y("section",{className:y?.className,style:y?.style}),children:g}),(0,eu.jsx)(F,{component:"input",...oe,...ne,ref:t,required:l,mod:{disabled:p,error:!!m&&k},variant:P,__size:C,...Y("input")}),we&&(0,eu.jsx)("div",{..._,"data-position":"right",...Y("section",{className:_?.className,style:_?.style}),children:we})]})})});mt.classes=Yr;mt.Wrapper=iI;mt.Label=Rm;mt.Error=Dm;mt.Description=Pm;mt.Placeholder=oI;mt.ClearButton=TD;mt.displayName="@mantine/core/Input";var gMe=b(D(),1),vMe=b(O(),1);function sV(e,t,r){let n=z(e,t,r),{label:o,description:i,error:a,required:s,classNames:l,styles:c,className:d,unstyled:u,__staticSelector:f,__stylesApiProps:m,errorProps:p,labelProps:g,descriptionProps:y,wrapperProps:v,id:x,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:$,vars:B,mod:W,...H}=n,{styleProps:K,rest:T}=Gr(H),k={label:o,description:i,error:a,required:s,classNames:l,className:d,__staticSelector:f,__stylesApiProps:m||n,errorProps:p,labelProps:g,descriptionProps:y,unstyled:u,styles:c,size:_,style:I,inputContainer:S,inputWrapperOrder:w,withAsterisk:P,variant:$,id:x,mod:W,...v};return{...T,classNames:l,styles:c,unstyled:u,wrapperProps:{...k,...K},inputProps:{required:s,classNames:l,styles:c,unstyled:u,size:_,__staticSelector:f,__stylesApiProps:m||n,error:a,variant:$,id:x}}}var ED=b(O(),1),IMe=b(D(),1);var _le={__staticSelector:"InputBase",withAria:!0},rr=nt((e,t)=>{let{inputProps:r,wrapperProps:n,...o}=sV("InputBase",_le,e);return(0,ED.jsx)(mt.Wrapper,{...n,children:(0,ED.jsx)(mt,{...r,...o,ref:t})})});rr.classes={...mt.classes,...mt.Wrapper.classes};rr.displayName="@mantine/core/InputBase";var cV=b(O(),1),dV=b(D(),1);var ja=b(D(),1);var RMe=b(O(),1);function Ile(e,t){if(!t||!e)return!1;let r=t.parentNode;for(;r!=null;){if(r===e)return!0;r=r.parentNode}return!1}function lV({target:e,parent:t,ref:r,displayAfterTransitionEnd:n}){let o=(0,ja.useRef)(-1),[i,a]=(0,ja.useState)(!1),[s,l]=(0,ja.useState)(typeof n=="boolean"?n:!1),c=()=>{if(!e||!t||!r.current)return;let m=e.getBoundingClientRect(),p=t.getBoundingClientRect(),g=window.getComputedStyle(e),y=window.getComputedStyle(t),v=na(g.borderTopWidth)+na(y.borderTopWidth),x=na(g.borderLeftWidth)+na(y.borderLeftWidth),_={top:m.top-p.top-v,left:m.left-p.left-x,width:m.width,height:m.height};r.current.style.transform=`translateY(${_.top}px) translateX(${_.left}px)`,r.current.style.width=`${_.width}px`,r.current.style.height=`${_.height}px`},d=()=>{window.clearTimeout(o.current),r.current&&(r.current.style.transitionDuration="0ms"),c(),o.current=window.setTimeout(()=>{r.current&&(r.current.style.transitionDuration="")},30)},u=(0,ja.useRef)(null),f=(0,ja.useRef)(null);return(0,ja.useEffect)(()=>{if(c(),e)return u.current=new ResizeObserver(d),u.current.observe(e),t&&(f.current=new ResizeObserver(d),f.current.observe(t)),()=>{u.current?.disconnect(),f.current?.disconnect()}},[t,e]),(0,ja.useEffect)(()=>{if(t){let m=p=>{Ile(p.target,t)&&(d(),l(!1))};return t.addEventListener("transitionend",m),()=>{t.removeEventListener("transitionend",m)}}},[t]),q2(()=>{Ly()!=="test"&&a(!0)},20,{autoInvoke:!0}),X2(m=>{m.forEach(p=>{p.type==="attributes"&&p.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:s}}var $D={root:"m_96b553a6"};var wle={},Sle=(e,{transitionDuration:t})=>({root:{"--transition-duration":typeof t=="number"?`${t}ms`:t}}),aI=M((e,t)=>{let r=z("FloatingIndicator",wle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,target:c,parent:d,transitionDuration:u,mod:f,displayAfterTransitionEnd:m,...p}=r,g=Q({name:"FloatingIndicator",classes:$D,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Sle}),y=(0,dV.useRef)(null),{initialized:v,hidden:x}=lV({target:c,parent:d,ref:y,displayAfterTransitionEnd:m}),_=We(t,y);return!c||!d?null:(0,cV.jsx)(F,{ref:_,mod:[{initialized:v,hidden:x},f],...g("root"),...p})});aI.displayName="@mantine/core/FloatingIndicator";aI.classes=$D;var AD=b(O(),1);var WMe=b(D(),1);function OD({style:e,size:t=16,...r}){return(0,AD.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...e,width:Z(t),height:Z(t),display:"block"},...r,children:(0,AD.jsx)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}OD.displayName="@mantine/core/AccordionChevron";var Ua=b(O(),1);var XMe=b(D(),1);var zD={root:"m_66836ed3",wrapper:"m_a5d60502",body:"m_667c2793",title:"m_6a03f287",label:"m_698f4f23",icon:"m_667f2a6a",message:"m_7fa78076",closeButton:"m_87f54839"};var kle={},Cle=(e,{radius:t,color:r,variant:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:n||"light",autoContrast:o});return{root:{"--alert-radius":t===void 0?void 0:Ee(t),"--alert-bg":r||n?i.background:void 0,"--alert-color":i.color,"--alert-bd":r||n?i.border:void 0}}},Cn=M((e,t)=>{let r=z("Alert",kle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,title:u,children:f,id:m,icon:p,withCloseButton:g,onClose:y,closeButtonLabel:v,variant:x,autoContrast:_,...I}=r,S=Q({name:"Alert",classes:zD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Cle}),w=bt(m),P=u&&`${w}-title`||void 0,$=`${w}-body`;return(0,Ua.jsx)(F,{id:w,...S("root",{variant:x}),variant:x,ref:t,...I,role:"alert","aria-describedby":$,"aria-labelledby":P,children:(0,Ua.jsxs)("div",{...S("wrapper"),children:[p&&(0,Ua.jsx)("div",{...S("icon"),children:p}),(0,Ua.jsxs)("div",{...S("body"),children:[u&&(0,Ua.jsx)("div",{...S("title"),"data-with-close-button":g||void 0,children:(0,Ua.jsx)("span",{id:P,...S("label"),children:u})}),f&&(0,Ua.jsx)("div",{id:$,...S("message"),"data-variant":x,children:f})]}),g&&(0,Ua.jsx)(xi,{...S("closeButton"),onClick:y,variant:"transparent",size:16,iconSize:16,"aria-label":v,unstyled:s})]})})});Cn.classes=zD;Cn.displayName="@mantine/core/Alert";var fV=b(O(),1);var yBe=b(D(),1);var uV=b(O(),1),sBe=b(D(),1);var ND={root:"m_b6d8b162"};function Ple(e){if(e==="start")return"start";if(e==="end"||e)return"end"}var Dle={inherit:!1},Rle=(e,{variant:t,lineClamp:r,gradient:n,size:o,color:i})=>({root:{"--text-fz":Pt(o),"--text-lh":CL(o),"--text-gradient":t==="gradient"?Qh(n,e):void 0,"--text-line-clamp":typeof r=="number"?r.toString():void 0,"--text-color":i?Ze(i,e):void 0}}),ge=nt((e,t)=>{let r=z("Text",Dle,e),{lineClamp:n,truncate:o,inline:i,inherit:a,gradient:s,span:l,__staticSelector:c,vars:d,className:u,style:f,classNames:m,styles:p,unstyled:g,variant:y,mod:v,size:x,..._}=r,I=Q({name:["Text",c],props:r,classes:ND,className:u,style:f,classNames:m,styles:p,unstyled:g,vars:d,varsResolver:Rle});return(0,uV.jsx)(F,{...I("root",{focusable:!0}),ref:t,component:l?"span":"p",variant:y,mod:[{"data-truncate":Ple(o),"data-line-clamp":typeof n=="number","data-inline":i,"data-inherit":a},v],size:x,..._})});ge.classes=ND;ge.displayName="@mantine/core/Text";var FD={root:"m_849cf0da"};var Tle={underline:"hover"},uv=nt((e,t)=>{let{underline:r,className:n,unstyled:o,mod:i,...a}=z("Anchor",Tle,e);return(0,fV.jsx)(ge,{component:"a",ref:t,className:Ke({[FD.root]:!o},n),...a,mod:[{underline:r},i],__staticSelector:"Anchor",unstyled:o})});uv.classes=FD;uv.displayName="@mantine/core/Anchor";var fv=b(O(),1),X8e=b(D(),1);var CBe=b(D(),1);var DBe=b(O(),1);var[mV,yi]=Gt("AppShell was not found in tree");var pV=b(O(),1),$Be=b(D(),1);var Ko={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};var Ele={},sI=M((e,t)=>{let r=z("AppShellAside",Ele,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=yi();return m.disabled?null:(0,pV.jsx)(F,{component:"aside",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("aside",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-aside-z-index":`calc(${d??m.zIndex} + 1)`}})});sI.classes=Ko;sI.displayName="@mantine/core/AppShellAside";var hV=b(O(),1);var UBe=b(D(),1);var $le={},lI=M((e,t)=>{let r=z("AppShellFooter",$le,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=yi();return m.disabled?null:(0,hV.jsx)(F,{component:"footer",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("footer",{className:Ke({[Hi.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-footer-z-index":(d??m.zIndex)?.toString()}})});lI.classes=Ko;lI.displayName="@mantine/core/AppShellFooter";var gV=b(O(),1);var QBe=b(D(),1);var Ale={},cI=M((e,t)=>{let r=z("AppShellHeader",Ale,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=yi();return m.disabled?null:(0,gV.jsx)(F,{component:"header",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("header",{className:Ke({[Hi.classNames.zeroRight]:m.offsetScrollbars},o),classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-header-z-index":(d??m.zIndex)?.toString()}})});cI.classes=Ko;cI.displayName="@mantine/core/AppShellHeader";var vV=b(O(),1),n7e=b(D(),1);var Ole={},dI=M((e,t)=>{let r=z("AppShellMain",Ole,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=yi();return(0,vV.jsx)(F,{component:"main",ref:t,...c.getStyles("main",{className:o,style:i,classNames:n,styles:a}),...l})});dI.classes=Ko;dI.displayName="@mantine/core/AppShellMain";var SV=b(O(),1),k8e=b(D(),1);var h8e=b(D(),1),g8e=b(O(),1);var v7e=b(D(),1),x7e=b(O(),1);function Va(e){return typeof e=="object"?e.base:e}function Ha(e){let t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function Wa(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function xV({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,aside:n,theme:o}){let i=n?.width,a="translateX(var(--app-shell-aside-width))",s="translateX(calc(var(--app-shell-aside-width) * -1))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-aside-width"]="100%",r[n?.breakpoint]["--app-shell-aside-offset"]="0px"),Ha(i)){let l=Z(Va(i));e["--app-shell-aside-width"]=l,e["--app-shell-aside-offset"]=l}if(Wa(i)&&(typeof i.base<"u"&&(e["--app-shell-aside-width"]=Z(i.base),e["--app-shell-aside-offset"]=Z(i.base)),gt(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-aside-width"]=Z(i[l]),t[l]["--app-shell-aside-offset"]=Z(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-aside-transform"]=a,t[l]["--app-shell-aside-transform-rtl"]=s,t[l]["--app-shell-aside-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=Sf(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-aside-width"]="100%",r[l]["--app-shell-aside-offset"]="0px",r[l]["--app-shell-aside-transform"]=a,r[l]["--app-shell-aside-transform-rtl"]=s}}var P7e=b(D(),1),D7e=b(O(),1);function bV({baseStyles:e,minMediaStyles:t,footer:r}){let n=r?.height,o="translateY(var(--app-shell-footer-height))",i=r?.offset??!0;if(Ha(n)){let a=Z(Va(n));e["--app-shell-footer-height"]=a,i&&(e["--app-shell-footer-offset"]=a)}Wa(n)&&(typeof n.base<"u"&&(e["--app-shell-footer-height"]=Z(n.base),i&&(e["--app-shell-footer-offset"]=Z(n.base))),gt(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=Z(n[a]),i&&(t[a]["--app-shell-footer-offset"]=Z(n[a])))})),r?.collapsed&&(e["--app-shell-footer-transform"]=o,e["--app-shell-footer-offset"]="0px !important")}var N7e=b(D(),1),F7e=b(O(),1);function yV({baseStyles:e,minMediaStyles:t,header:r}){let n=r?.height,o="translateY(calc(var(--app-shell-header-height) * -1))",i=r?.offset??!0;if(Ha(n)){let a=Z(Va(n));e["--app-shell-header-height"]=a,i&&(e["--app-shell-header-offset"]=a)}Wa(n)&&(typeof n.base<"u"&&(e["--app-shell-header-height"]=Z(n.base),i&&(e["--app-shell-header-offset"]=Z(n.base))),gt(n).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=Z(n[a]),i&&(t[a]["--app-shell-header-offset"]=Z(n[a])))})),r?.collapsed&&(e["--app-shell-header-transform"]=o,e["--app-shell-header-offset"]="0px !important")}var W7e=b(D(),1),Z7e=b(O(),1);function _V({baseStyles:e,minMediaStyles:t,maxMediaStyles:r,navbar:n,theme:o}){let i=n?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",s="translateX(var(--app-shell-navbar-width))";if(n?.breakpoint&&!n?.collapsed?.mobile&&(r[n?.breakpoint]=r[n?.breakpoint]||{},r[n?.breakpoint]["--app-shell-navbar-width"]="100%",r[n?.breakpoint]["--app-shell-navbar-offset"]="0px"),Ha(i)){let l=Z(Va(i));e["--app-shell-navbar-width"]=l,e["--app-shell-navbar-offset"]=l}if(Wa(i)&&(typeof i.base<"u"&&(e["--app-shell-navbar-width"]=Z(i.base),e["--app-shell-navbar-offset"]=Z(i.base)),gt(i).forEach(l=>{l!=="base"&&(t[l]=t[l]||{},t[l]["--app-shell-navbar-width"]=Z(i[l]),t[l]["--app-shell-navbar-offset"]=Z(i[l]))})),n?.collapsed?.desktop){let l=n.breakpoint;t[l]=t[l]||{},t[l]["--app-shell-navbar-transform"]=a,t[l]["--app-shell-navbar-transform-rtl"]=s,t[l]["--app-shell-navbar-offset"]="0px !important"}if(n?.collapsed?.mobile){let l=Sf(n.breakpoint,o.breakpoints)-.1;r[l]=r[l]||{},r[l]["--app-shell-navbar-width"]="100%",r[l]["--app-shell-navbar-offset"]="0px",r[l]["--app-shell-navbar-transform"]=a,r[l]["--app-shell-navbar-transform-rtl"]=s}}var i8e=b(D(),1),a8e=b(O(),1);var J7e=b(D(),1),e8e=b(O(),1);function uI(e){return Number(e)===0?"0px":Ot(e)}function IV({padding:e,baseStyles:t,minMediaStyles:r}){Ha(e)&&(t["--app-shell-padding"]=uI(Va(e))),Wa(e)&&(e.base&&(t["--app-shell-padding"]=uI(e.base)),gt(e).forEach(n=>{n!=="base"&&(r[n]=r[n]||{},r[n]["--app-shell-padding"]=uI(e[n]))}))}function wV({navbar:e,header:t,footer:r,aside:n,padding:o,theme:i}){let a={},s={},l={};_V({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,navbar:e,theme:i}),xV({baseStyles:l,minMediaStyles:a,maxMediaStyles:s,aside:n,theme:i}),yV({baseStyles:l,minMediaStyles:a,header:t}),bV({baseStyles:l,minMediaStyles:a,footer:r}),IV({baseStyles:l,minMediaStyles:a,padding:o});let c=Vh(gt(a),i.breakpoints).map(f=>({query:`(min-width: ${pd(f.px)})`,styles:a[f.value]})),d=Vh(gt(s),i.breakpoints).map(f=>({query:`(max-width: ${pd(f.px)})`,styles:s[f.value]})),u=[...c,...d];return{baseStyles:l,media:u}}function kV({navbar:e,header:t,aside:r,footer:n,padding:o}){let i=ft(),a=wa(),{media:s,baseStyles:l}=wV({navbar:e,header:t,footer:n,aside:r,padding:o,theme:i});return(0,SV.jsx)(kd,{media:s,styles:l,selector:a.cssVariablesSelector})}var CV=b(O(),1),$8e=b(D(),1);var zle={},fI=M((e,t)=>{let r=z("AppShellNavbar",zle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,withBorder:c,zIndex:d,mod:u,...f}=r,m=yi();return m.disabled?null:(0,CV.jsx)(F,{component:"nav",ref:t,mod:[{"with-border":c??m.withBorder},u],...m.getStyles("navbar",{className:o,classNames:n,styles:a,style:i}),...f,__vars:{"--app-shell-navbar-z-index":`calc(${d??m.zIndex} + 1)`}})});fI.classes=Ko;fI.displayName="@mantine/core/AppShellNavbar";var PV=b(O(),1),B8e=b(D(),1);var Nle={},mI=nt((e,t)=>{let r=z("AppShellSection",Nle,e),{classNames:n,className:o,style:i,styles:a,vars:s,grow:l,mod:c,...d}=r,u=yi();return(0,PV.jsx)(F,{ref:t,mod:[{grow:l},c],...u.getStyles("section",{className:o,style:i,classNames:n,styles:a}),...d})});mI.classes=Ko;mI.displayName="@mantine/core/AppShellSection";var cc=b(D(),1);function DV({transitionDuration:e,disabled:t}){let[r,n]=(0,cc.useState)(!0),o=(0,cc.useRef)(-1),i=(0,cc.useRef)(-1);return Tl("resize",()=>{n(!0),clearTimeout(o.current),o.current=window.setTimeout(()=>(0,cc.startTransition)(()=>{n(!1)}),200)}),Uo(()=>{n(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,cc.startTransition)(()=>{n(!1)}),e||0)},[t,e]),r}var Fle={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Et("app")},Lle=(e,{transitionDuration:t,transitionTimingFunction:r})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":r}}),Fr=M((e,t)=>{let r=z("AppShell",Fle,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,navbar:c,withBorder:d,padding:u,transitionDuration:f,transitionTimingFunction:m,header:p,zIndex:g,layout:y,disabled:v,aside:x,footer:_,offsetScrollbars:I=y!=="alt",mod:S,...w}=r,P=Q({name:"AppShell",classes:Ko,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Lle}),$=DV({disabled:v,transitionDuration:f});return(0,fv.jsxs)(mV,{value:{getStyles:P,withBorder:d,zIndex:g,disabled:v,offsetScrollbars:I},children:[(0,fv.jsx)(kV,{navbar:c,header:p,aside:x,footer:_,padding:u}),(0,fv.jsx)(F,{ref:t,...P("root"),mod:[{resizing:$,layout:y,disabled:v},S],...w})]})});Fr.classes=Ko;Fr.displayName="@mantine/core/AppShell";Fr.Navbar=fI;Fr.Header=cI;Fr.Main=dI;Fr.Aside=sI;Fr.Footer=lI;Fr.Section=mI;function RV(e){return typeof e=="string"?{value:e,label:e}:"value"in e&&!("label"in e)?{value:e.value,label:e.value,disabled:e.disabled}:typeof e=="number"?{value:e.toString(),label:e.toString()}:"group"in e?{group:e.group,items:e.items.map(t=>RV(t))}:e}function Em(e){return e?e.map(t=>RV(t)):[]}function tu(e){return e.reduce((t,r)=>"group"in r?{...t,...tu(r.items)}:(t[r.value]=r,t),{})}var LD=b(O(),1),v9e=b(D(),1);var Xt={dropdown:"m_88b62a41",search:"m_985517d8",options:"m_b2821a6e",option:"m_92253aa5",empty:"m_2530cd1d",header:"m_858f94bd",footer:"m_82b967cb",group:"m_254f3e4f",groupLabel:"m_2bb2e9e5",chevron:"m_2943220b",optionsDropdownOption:"m_390b5f4",optionsDropdownCheckIcon:"m_8ee53fc2"};var Mle={error:null},Ble=(e,{size:t,color:r})=>({chevron:{"--combobox-chevron-size":xe(t,"combobox-chevron-size"),"--combobox-chevron-color":r?Ze(r,e):void 0}}),pI=M((e,t)=>{let r=z("ComboboxChevron",Mle,e),{size:n,error:o,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,mod:u,...f}=r,m=Q({name:"ComboboxChevron",classes:Xt,props:r,style:i,className:a,classNames:s,styles:l,unstyled:c,vars:d,varsResolver:Ble,rootSelector:"chevron"});return(0,LD.jsx)(F,{component:"svg",...f,...m("chevron"),size:n,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",mod:["combobox-chevron",{error:o},u],ref:t,children:(0,LD.jsx)("path",{d:"M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})});pI.classes=Xt;pI.displayName="@mantine/core/ComboboxChevron";var HD=b(O(),1);var PUe=b(D(),1);var P9e=b(D(),1);var R9e=b(O(),1);var[TV,or]=Gt("Combobox component was not found in tree");var EV=b(O(),1),$V=b(D(),1);var MD=(0,$V.forwardRef)(({size:e,onMouseDown:t,onClick:r,onClear:n,...o},i)=>(0,EV.jsx)(mt.ClearButton,{ref:i,tabIndex:-1,"aria-hidden":!0,...o,onMouseDown:a=>{a.preventDefault(),t?.(a)},onClick:a=>{n(),r?.(a)}}));MD.displayName="@mantine/core/ComboboxClearButton";var AV=b(O(),1),z9e=b(D(),1);var jle={},hI=M((e,t)=>{let{classNames:r,styles:n,className:o,style:i,hidden:a,...s}=z("ComboboxDropdown",jle,e),l=or();return(0,AV.jsx)(Xr.Dropdown,{...s,ref:t,role:"presentation","data-hidden":a||void 0,...l.getStyles("dropdown",{className:o,style:i,classNames:r,styles:n})})});hI.classes=Xt;hI.displayName="@mantine/core/ComboboxDropdown";var OV=b(O(),1);var H9e=b(D(),1);var Ule={refProp:"ref"},BD=M((e,t)=>{let{children:r,refProp:n}=z("ComboboxDropdownTarget",Ule,e);if(or(),!ko(r))throw new Error("Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return(0,OV.jsx)(Xr.Target,{ref:t,refProp:n,children:r})});BD.displayName="@mantine/core/ComboboxDropdownTarget";var zV=b(O(),1),Q9e=b(D(),1);var Vle={},gI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxEmpty",Vle,e),l=or();return(0,zV.jsx)(F,{ref:t,...l.getStyles("empty",{className:n,classNames:r,styles:i,style:o}),...s})});gI.classes=Xt;gI.displayName="@mantine/core/ComboboxEmpty";var FV=b(D(),1);var cje=b(O(),1);var NV=b(D(),1);function $m({onKeyDown:e,withKeyboardNavigation:t,withAriaAttributes:r,withExpandedAttribute:n,targetType:o,autoComplete:i}){let a=or(),[s,l]=(0,NV.useState)(null),c=u=>{if(e?.(u),!a.readOnly&&t){if(u.nativeEvent.isComposing)return;if(u.nativeEvent.code==="ArrowDown"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectNextOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="ArrowUp"&&(u.preventDefault(),a.store.dropdownOpened?l(a.store.selectPreviousOption()):(a.store.openDropdown("keyboard"),l(a.store.selectActiveOption()),a.store.updateSelectedOptionIndex("selected",{scrollIntoView:!0}))),u.nativeEvent.code==="Enter"||u.nativeEvent.code==="NumpadEnter"){if(u.nativeEvent.keyCode===229)return;let f=a.store.getSelectedOptionIndex();a.store.dropdownOpened&&f!==-1?(u.preventDefault(),a.store.clickSelectedOption()):o==="button"&&(u.preventDefault(),a.store.openDropdown("keyboard"))}u.key==="Escape"&&a.store.closeDropdown("keyboard"),u.nativeEvent.code==="Space"&&o==="button"&&(u.preventDefault(),a.store.toggleDropdown("keyboard"))}};return{...r?{"aria-haspopup":"listbox","aria-expanded":n&&!!(a.store.listId&&a.store.dropdownOpened)||void 0,"aria-controls":a.store.dropdownOpened?a.store.listId:void 0,"aria-activedescendant":a.store.dropdownOpened&&s||void 0,autoComplete:i,"data-expanded":a.store.dropdownOpened||void 0,"data-mantine-stop-propagation":a.store.dropdownOpened||void 0}:{},onKeyDown:c}}var Hle={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},jD=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxEventsTarget",Hle,e);if(!ko(r))throw new Error("Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let d=or(),u=$m({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l});return(0,FV.cloneElement)(r,{...u,...c,[n]:We(t,d.store.targetRef,El(r))})});jD.displayName="@mantine/core/ComboboxEventsTarget";var LV=b(O(),1),vje=b(D(),1);var Wle={},vI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxFooter",Wle,e),l=or();return(0,LV.jsx)(F,{ref:t,...l.getStyles("footer",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});vI.classes=Xt;vI.displayName="@mantine/core/ComboboxFooter";var xI=b(O(),1),kje=b(D(),1);var Zle={},bI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,children:s,label:l,...c}=z("ComboboxGroup",Zle,e),d=or();return(0,xI.jsxs)(F,{ref:t,...d.getStyles("group",{className:n,classNames:r,style:o,styles:i}),...c,children:[l&&(0,xI.jsx)("div",{...d.getStyles("groupLabel",{classNames:r,styles:i}),children:l}),s]})});bI.classes=Xt;bI.displayName="@mantine/core/ComboboxGroup";var MV=b(O(),1),Aje=b(D(),1);var Gle={},yI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ComboboxHeader",Gle,e),l=or();return(0,MV.jsx)(F,{ref:t,...l.getStyles("header",{className:n,classNames:r,style:o,styles:i}),...s,onMouseDown:c=>{c.preventDefault()}})});yI.classes=Xt;yI.displayName="@mantine/core/ComboboxHeader";var BV=b(O(),1);function UD({value:e,valuesDivider:t=",",...r}){return(0,BV.jsx)("input",{type:"hidden",value:Array.isArray(e)?e.join(t):e||"",...r})}UD.displayName="@mantine/core/ComboboxHiddenInput";var jV=b(O(),1),UV=b(D(),1);var qle={},_I=M((e,t)=>{let r=z("ComboboxOption",qle,e),{classNames:n,className:o,style:i,styles:a,vars:s,onClick:l,id:c,active:d,onMouseDown:u,onMouseOver:f,disabled:m,selected:p,mod:g,...y}=r,v=or(),x=(0,UV.useId)(),_=c||x;return(0,jV.jsx)(F,{...v.getStyles("option",{className:o,classNames:n,styles:a,style:i}),...y,ref:t,id:_,mod:["combobox-option",{"combobox-active":d,"combobox-disabled":m,"combobox-selected":p},g],role:"option",onClick:I=>{m?I.preventDefault():(v.onOptionSubmit?.(r.value,r),l?.(I))},onMouseDown:I=>{I.preventDefault(),u?.(I)},onMouseOver:I=>{v.resetSelectionOnOptionHover&&v.store.resetSelectedOption(),f?.(I)}})});_I.classes=Xt;_I.displayName="@mantine/core/ComboboxOption";var VV=b(O(),1),HV=b(D(),1);var Kle={},II=M((e,t)=>{let r=z("ComboboxOptions",Kle,e),{classNames:n,className:o,style:i,styles:a,id:s,onMouseDown:l,labelledBy:c,...d}=r,u=or(),f=bt(s);return(0,HV.useEffect)(()=>{u.store.setListId(f)},[f]),(0,VV.jsx)(F,{ref:t,...u.getStyles("options",{className:o,style:i,classNames:n,styles:a}),...d,id:f,role:"listbox","aria-labelledby":c,onMouseDown:m=>{m.preventDefault(),l?.(m)}})});II.classes=Xt;II.displayName="@mantine/core/ComboboxOptions";var WV=b(O(),1);var nUe=b(D(),1);var Xle={withAriaAttributes:!0,withKeyboardNavigation:!0},wI=M((e,t)=>{let r=z("ComboboxSearch",Xle,e),{classNames:n,styles:o,unstyled:i,vars:a,withAriaAttributes:s,onKeyDown:l,withKeyboardNavigation:c,size:d,...u}=r,f=or(),m=f.getStyles("search"),p=$m({targetType:"input",withAriaAttributes:s,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:l,autoComplete:"off"});return(0,WV.jsx)(mt,{ref:We(t,f.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},o],size:d||f.size,...p,...u,__staticSelector:"Combobox"})});wI.classes=Xt;wI.displayName="@mantine/core/ComboboxSearch";var ZV=b(O(),1),GV=b(D(),1);var Qle={refProp:"ref",targetType:"input",withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:"off"},VD=M((e,t)=>{let{children:r,refProp:n,withKeyboardNavigation:o,withAriaAttributes:i,withExpandedAttribute:a,targetType:s,autoComplete:l,...c}=z("ComboboxTarget",Qle,e);if(!ko(r))throw new Error("Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let d=or(),u=$m({targetType:s,withAriaAttributes:i,withKeyboardNavigation:o,withExpandedAttribute:a,onKeyDown:r.props.onKeyDown,autoComplete:l}),f=(0,GV.cloneElement)(r,{...u,...c});return(0,ZV.jsx)(Xr.Target,{ref:We(t,d.store.targetRef),children:f})});VD.displayName="@mantine/core/ComboboxTarget";var zt=b(D(),1);function qV(e,t,r){for(let n=e-1;n>=0;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=t.length-1;n>-1;n-=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function KV(e,t,r){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n;if(r){for(let n=0;n<t.length;n+=1)if(!t[n].hasAttribute("data-combobox-disabled"))return n}return e}function XV(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute("data-combobox-disabled"))return t;return-1}function dc({defaultOpened:e,opened:t,onOpenedChange:r,onDropdownClose:n,onDropdownOpen:o,loop:i=!0,scrollBehavior:a="instant"}={}){let[s,l]=ot({value:t,defaultValue:e,finalValue:!1,onChange:r}),c=(0,zt.useRef)(null),d=(0,zt.useRef)(-1),u=(0,zt.useRef)(null),f=(0,zt.useRef)(null),m=(0,zt.useRef)(-1),p=(0,zt.useRef)(-1),g=(0,zt.useRef)(-1),y=(0,zt.useCallback)((C="unknown")=>{s||(l(!0),o?.(C))},[l,o,s]),v=(0,zt.useCallback)((C="unknown")=>{s&&(l(!1),n?.(C))},[l,n,s]),x=(0,zt.useCallback)((C="unknown")=>{s?v(C):y(C)},[v,y,s]),_=(0,zt.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-selected]`);C?.removeAttribute("data-combobox-selected"),C?.removeAttribute("aria-selected")},[]),I=(0,zt.useCallback)(C=>{let R=document.getElementById(c.current)?.querySelectorAll("[data-combobox-option]");if(!R)return null;let N=C>=R.length?0:C<0?R.length-1:C;return d.current=N,R?.[N]&&!R[N].hasAttribute("data-combobox-disabled")?(_(),R[N].setAttribute("data-combobox-selected","true"),R[N].setAttribute("aria-selected","true"),R[N].scrollIntoView({block:"nearest",behavior:a}),R[N].id):null},[a,_]),S=(0,zt.useCallback)(()=>{let C=document.querySelector(`#${c.current} [data-combobox-active]`);if(C){let A=document.querySelectorAll(`#${c.current} [data-combobox-option]`),R=Array.from(A).findIndex(N=>N===C);return I(R)}return I(0)},[I]),w=(0,zt.useCallback)(()=>I(KV(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),P=(0,zt.useCallback)(()=>I(qV(d.current,document.querySelectorAll(`#${c.current} [data-combobox-option]`),i)),[I,i]),$=(0,zt.useCallback)(()=>I(XV(document.querySelectorAll(`#${c.current} [data-combobox-option]`))),[I]),B=(0,zt.useCallback)((C="selected",A)=>{g.current=window.setTimeout(()=>{let R=document.querySelectorAll(`#${c.current} [data-combobox-option]`),N=Array.from(R).findIndex(U=>U.hasAttribute(`data-combobox-${C}`));d.current=N,A?.scrollIntoView&&R[N]?.scrollIntoView({block:"nearest",behavior:a})},0)},[]),W=(0,zt.useCallback)(()=>{d.current=-1,_()},[_]),H=(0,zt.useCallback)(()=>{document.querySelectorAll(`#${c.current} [data-combobox-option]`)?.[d.current]?.click()},[]),K=(0,zt.useCallback)(C=>{c.current=C},[]),T=(0,zt.useCallback)(()=>{m.current=window.setTimeout(()=>u.current.focus(),0)},[]),k=(0,zt.useCallback)(()=>{p.current=window.setTimeout(()=>f.current.focus(),0)},[]),E=(0,zt.useCallback)(()=>d.current,[]);return(0,zt.useEffect)(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(p.current),window.clearTimeout(g.current)},[]),{dropdownOpened:s,openDropdown:y,closeDropdown:v,toggleDropdown:x,selectedOptionIndex:d.current,getSelectedOptionIndex:E,selectOption:I,selectFirstOption:$,selectActiveOption:S,selectNextOption:w,selectPreviousOption:P,resetSelectedOption:W,updateSelectedOptionIndex:B,listId:c.current,setListId:K,clickSelectedOption:H,searchRef:u,focusSearchInput:T,targetRef:f,focusTarget:k}}var Yle={keepMounted:!0,withinPortal:!0,resetSelectionOnOptionHover:!1,width:"target",transitionProps:{transition:"fade",duration:0}},Jle=(e,{size:t,dropdownPadding:r})=>({options:{"--combobox-option-fz":Pt(t),"--combobox-option-padding":xe(t,"combobox-option-padding")},dropdown:{"--combobox-padding":r===void 0?void 0:Z(r),"--combobox-option-fz":Pt(t),"--combobox-option-padding":xe(t,"combobox-option-padding")}});function Ve(e){let t=z("Combobox",Yle,e),{classNames:r,styles:n,unstyled:o,children:i,store:a,vars:s,onOptionSubmit:l,onClose:c,size:d,dropdownPadding:u,resetSelectionOnOptionHover:f,__staticSelector:m,readOnly:p,...g}=t,y=dc(),v=a||y,x=Q({name:m||"Combobox",classes:Xt,props:t,classNames:r,styles:n,unstyled:o,vars:s,varsResolver:Jle}),_=()=>{c?.(),v.closeDropdown()};return(0,HD.jsx)(TV,{value:{getStyles:x,store:v,onOptionSubmit:l,size:d,resetSelectionOnOptionHover:f,readOnly:p},children:(0,HD.jsx)(Xr,{opened:v.dropdownOpened,...g,onChange:I=>!I&&_(),withRoles:!1,unstyled:o,children:i})})}var ece=e=>e;Ve.extend=ece;Ve.classes=Xt;Ve.displayName="@mantine/core/Combobox";Ve.Target=VD;Ve.Dropdown=hI;Ve.Options=II;Ve.Option=_I;Ve.Search=wI;Ve.Empty=gI;Ve.Chevron=pI;Ve.Footer=vI;Ve.Header=yI;Ve.EventsTarget=jD;Ve.DropdownTarget=BD;Ve.Group=bI;Ve.ClearButton=MD;Ve.HiddenInput=UD;var Xo=b(O(),1);var zm=b(O(),1),$I=b(D(),1);var uc=b(O(),1),QV=b(D(),1);var WD={root:"m_5f75b09e",body:"m_5f6e695e",labelWrapper:"m_d3ea56bb",label:"m_8ee546b8",description:"m_328f68c0",error:"m_8e8a99cc"};var SI=WD,ru=(0,QV.forwardRef)(({__staticSelector:e,__stylesApiProps:t,className:r,classNames:n,styles:o,unstyled:i,children:a,label:s,description:l,id:c,disabled:d,error:u,size:f,labelPosition:m="left",bodyElement:p="div",labelElement:g="label",variant:y,style:v,vars:x,mod:_,...I},S)=>{let w=Q({name:e,props:t,className:r,style:v,classes:WD,classNames:n,styles:o,unstyled:i});return(0,uc.jsx)(F,{...w("root"),ref:S,__vars:{"--label-fz":Pt(f),"--label-lh":xe(f,"label-lh")},mod:[{"label-position":m},_],variant:y,size:f,...I,children:(0,uc.jsxs)(F,{component:p,htmlFor:p==="label"?c:void 0,...w("body"),children:[a,(0,uc.jsxs)("div",{...w("labelWrapper"),"data-disabled":d||void 0,children:[s&&(0,uc.jsx)(F,{component:g,htmlFor:g==="label"?c:void 0,...w("label"),"data-disabled":d||void 0,children:s}),l&&(0,uc.jsx)(mt.Description,{size:f,__inheritStyles:!1,...w("description"),children:l}),u&&typeof u!="boolean"&&(0,uc.jsx)(mt.Error,{size:f,__inheritStyles:!1,...w("error"),children:u})]})]})})});ru.displayName="@mantine/core/InlineInput";var GD=b(O(),1);var mVe=b(D(),1);var kI=b(D(),1),YV=(0,kI.createContext)(null),JV=YV.Provider,CI=()=>(0,kI.useContext)(YV);var aVe=b(D(),1),sVe=b(O(),1);var[eH,tH]=Co();var ZD={card:"m_26775b0a"};var tce={withBorder:!0},rce=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),PI=M((e,t)=>{let r=z("CheckboxCard",tce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,defaultChecked:p,onChange:g,...y}=r,v=Q({name:"CheckboxCard",classes:ZD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:rce,rootSelector:"card"}),x=CI(),_=typeof c=="boolean"?c:x?x.value.includes(f||""):void 0,[I,S]=ot({value:_,defaultValue:p,finalValue:!1,onChange:g});return(0,GD.jsx)(eH,{value:{checked:I},children:(0,GD.jsx)(It,{ref:t,mod:[{"with-border":u,checked:I},d],...v("card"),...y,role:"checkbox","aria-checked":I,onClick:w=>{m?.(w),x?.onChange(f||""),S(!I)}})})});PI.displayName="@mantine/core/CheckboxCard";PI.classes=ZD;var DI=b(O(),1);var RVe=b(D(),1);var mv=b(O(),1);var SVe=b(D(),1);function Am({children:e,role:t}){let r=bi();return r?(0,mv.jsx)("div",{role:t,"aria-labelledby":r.labelId,"aria-describedby":r.describedBy,children:e}):(0,mv.jsx)(mv.Fragment,{children:e})}var oce={},RI=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("CheckboxGroup",oce,e),[d,u]=ot({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,DI.jsx)(JV,{value:{value:d,onChange:m=>{let p=typeof m=="string"?m:m.currentTarget.value;!l&&u(d.includes(p)?d.filter(g=>g!==p):[...d,p])},size:i},children:(0,DI.jsx)(mt.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"CheckboxGroup",children:(0,DI.jsx)(Am,{role:"group",children:s})})})});RI.classes=mt.Wrapper.classes;RI.displayName="@mantine/core/CheckboxGroup";var XD=b(O(),1),UVe=b(D(),1);var Om=b(O(),1);var LVe=b(D(),1);function qD({size:e,style:t,...r}){let n=e!==void 0?{width:Z(e),height:Z(e),...t}:t;return(0,Om.jsx)("svg",{viewBox:"0 0 10 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,"aria-hidden":!0,...r,children:(0,Om.jsx)("path",{d:"M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function TI({indeterminate:e,...t}){return e?(0,Om.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 6","aria-hidden":!0,...t,children:(0,Om.jsx)("rect",{width:"32",height:"6",fill:"currentColor",rx:"3"})}):(0,Om.jsx)(qD,{...t})}var KD={indicator:"m_5e5256ee",icon:"m_1b1c543a","indicator--outline":"m_76e20374"};var nce={icon:TI},ice=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=_r({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--checkbox-size":xe(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:Ze(r,e),"--checkbox-icon-color":o?Ze(o,e):ka(a,e)?Bn({color:r,theme:e,autoContrast:a}):void 0}}},EI=M((e,t)=>{let r=z("CheckboxIndicator",nce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,indeterminate:d,radius:u,color:f,iconColor:m,autoContrast:p,checked:g,mod:y,variant:v,disabled:x,..._}=r,I=c,S=Q({name:"CheckboxIndicator",classes:KD,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ice,rootSelector:"indicator"}),w=tH(),P=typeof g=="boolean"||typeof d=="boolean"?g||d:w?.checked||!1;return(0,XD.jsx)(F,{ref:t,...S("indicator",{variant:v}),variant:v,mod:[{checked:P,disabled:x},y],..._,children:(0,XD.jsx)(I,{indeterminate:d,...S("icon")})})});EI.displayName="@mantine/core/CheckboxIndicator";EI.classes=KD;var QD={root:"m_bf2d988c",inner:"m_26062bec",input:"m_26063560",icon:"m_bf295423","input--outline":"m_215c4542"};var ace={labelPosition:"right",icon:TI},sce=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=_r({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--checkbox-size":xe(n,"checkbox-size"),"--checkbox-radius":t===void 0?void 0:Ee(t),"--checkbox-color":i==="outline"?l:Ze(r,e),"--checkbox-icon-color":o?Ze(o,e):ka(a,e)?Bn({color:r,theme:e,autoContrast:a}):void 0}}},Vs=M((e,t)=>{let r=z("Checkbox",ace,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,id:u,size:f,radius:m,wrapperProps:p,checked:g,labelPosition:y,description:v,error:x,disabled:_,variant:I,indeterminate:S,icon:w,rootRef:P,iconColor:$,onChange:B,autoContrast:W,mod:H,...K}=r,T=CI(),k=f||T?.size,E=w,C=Q({name:"Checkbox",props:r,classes:QD,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:sce}),{styleProps:A,rest:R}=Gr(K),N=bt(u),U=T?{checked:T.value.includes(R.value),onChange:ve=>{T.onChange(ve),B?.(ve)}}:{},G=(0,$I.useRef)(null),oe=t||G;return(0,$I.useEffect)(()=>{oe&&"current"in oe&&oe.current&&(oe.current.indeterminate=S||!1)},[S,oe]),(0,zm.jsx)(ru,{...C("root"),__staticSelector:"Checkbox",__stylesApiProps:r,id:N,size:k,labelPosition:y,label:d,description:v,error:x,disabled:_,classNames:n,styles:a,unstyled:s,"data-checked":U.checked||g||void 0,variant:I,ref:P,mod:H,...A,...p,children:(0,zm.jsxs)(F,{...C("inner"),mod:{"data-label-position":y},children:[(0,zm.jsx)(F,{component:"input",id:N,ref:oe,checked:g,disabled:_,mod:{error:!!x,indeterminate:S},...C("input",{focusable:!0,variant:I}),onChange:B,...R,...U,type:"checkbox"}),(0,zm.jsx)(E,{indeterminate:S,...C("icon")})]})})});Vs.classes={...QD,...SI};Vs.displayName="@mantine/core/Checkbox";Vs.Group=RI;Vs.Indicator=EI;Vs.Card=PI;function _i(e){return"group"in e}function YD({options:e,search:t,limit:r}){let n=t.trim().toLowerCase(),o=[];for(let i=0;i<e.length;i+=1){let a=e[i];if(o.length===r)return o;_i(a)&&o.push({group:a.group,items:YD({options:a.items,search:t,limit:r-o.length})}),_i(a)||a.label.toLowerCase().includes(n)&&o.push(a)}return o}function rH(e){if(e.length===0)return!0;for(let t of e)if(!("group"in t)||t.items.length>0)return!1;return!0}function JD(e,t=new Set){if(Array.isArray(e))for(let r of e)if(_i(r))JD(r.items,t);else{if(typeof r.value>"u")throw new Error("[@mantine/core] Each option must have value property");if(typeof r.value!="string")throw new Error(`[@mantine/core] Option value must be a string, other data formats are not supported, got ${typeof r.value}`);if(t.has(r.value))throw new Error(`[@mantine/core] Duplicate options are not supported. Option with value "${r.value}" was provided more than once`);t.add(r.value)}}function lce(e,t){return Array.isArray(e)?e.includes(t):e===t}function oH({data:e,withCheckIcon:t,value:r,checkIconPosition:n,unstyled:o,renderOption:i}){if(!_i(e)){let s=lce(r,e.value),l=t&&s&&(0,Xo.jsx)(qD,{className:Xt.optionsDropdownCheckIcon}),c=(0,Xo.jsxs)(Xo.Fragment,{children:[n==="left"&&l,(0,Xo.jsx)("span",{children:e.label}),n==="right"&&l]});return(0,Xo.jsx)(Ve.Option,{value:e.value,disabled:e.disabled,className:Ke({[Xt.optionsDropdownOption]:!o}),"data-reverse":n==="right"||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof i=="function"?i({option:e,checked:s}):c})}let a=e.items.map(s=>(0,Xo.jsx)(oH,{data:s,value:r,unstyled:o,withCheckIcon:t,checkIconPosition:n,renderOption:i},s.value));return(0,Xo.jsx)(Ve.Group,{label:e.group,children:a})}function Nm({data:e,hidden:t,hiddenWhenEmpty:r,filter:n,search:o,limit:i,maxDropdownHeight:a,withScrollArea:s=!0,filterOptions:l=!0,withCheckIcon:c=!1,value:d,checkIconPosition:u,nothingFoundMessage:f,unstyled:m,labelId:p,renderOption:g,scrollAreaProps:y,"aria-label":v}){JD(e);let _=typeof o=="string"?(n||YD)({options:e,search:l?o:"",limit:i??1/0}):e,I=rH(_),S=_.map(w=>(0,Xo.jsx)(oH,{data:w,withCheckIcon:c,value:d,checkIconPosition:u,unstyled:m,renderOption:g},_i(w)?w.group:w.value));return(0,Xo.jsx)(Ve.Dropdown,{hidden:t||r&&I,"data-composed":!0,children:(0,Xo.jsxs)(Ve.Options,{labelledBy:p,"aria-label":v,children:[s?(0,Xo.jsx)(Nr.Autosize,{mah:a??220,type:"scroll",scrollbarSize:"var(--combobox-padding)",offsetScrollbars:"y",...y,children:S}):S,I&&f&&(0,Xo.jsx)(Ve.Empty,{children:f})]})})}var pv=b(O(),1),zI=b(D(),1);var eR=b(O(),1),UHe=b(D(),1);var AI=b(D(),1),nH=(0,AI.createContext)(null),iH=nH.Provider;function aH(){return{withinGroup:!!(0,AI.useContext)(nH)}}var Fm={group:"m_11def92b",root:"m_f85678b6",image:"m_11f8ac07",placeholder:"m_104cd71f"};var cce={},dce=(e,{spacing:t})=>({group:{"--ag-spacing":Ot(t)}}),OI=M((e,t)=>{let r=z("AvatarGroup",cce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,spacing:c,...d}=r,u=Q({name:"AvatarGroup",classes:Fm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:dce,rootSelector:"group"});return(0,eR.jsx)(iH,{value:!0,children:(0,eR.jsx)(F,{ref:t,...u("group"),...d})})});OI.classes=Fm;OI.displayName="@mantine/core/AvatarGroup";var tR=b(O(),1);function sH(e){return(0,tR.jsx)("svg",{...e,"data-avatar-placeholder-icon":!0,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,tR.jsx)("path",{d:"M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}function uce(e){let t=0;for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);t=(t<<5)-t+n,t|=0}return t}var fce=["blue","cyan","grape","green","indigo","lime","orange","pink","red","teal","violet"];function lH(e,t=fce){let r=uce(e),n=Math.abs(r)%t.length;return t[n]}function cH(e,t=2){let r=e.split(" ");return r.length===1?e.slice(0,t).toUpperCase():r.map(n=>n[0]).slice(0,t).join("").toUpperCase()}var mce={},pce=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a,name:s,allowedInitialsColors:l})=>{let c=i==="initials"&&typeof s=="string"?lH(s,l):i,d=e.variantColorResolver({color:c||"gray",theme:e,gradient:o,variant:n||"light",autoContrast:a});return{root:{"--avatar-size":xe(t,"avatar-size"),"--avatar-radius":r===void 0?void 0:Ee(r),"--avatar-bg":c||n?d.background:void 0,"--avatar-color":c||n?d.color:void 0,"--avatar-bd":c||n?d.border:void 0}}},ou=nt((e,t)=>{let r=z("Avatar",mce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,src:c,alt:d,radius:u,color:f,gradient:m,imageProps:p,children:g,autoContrast:y,mod:v,name:x,allowedInitialsColors:_,...I}=r,S=aH(),[w,P]=(0,zI.useState)(!c),$=Q({name:"Avatar",props:r,classes:Fm,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:pce});return(0,zI.useEffect)(()=>P(!c),[c]),(0,pv.jsx)(F,{...$("root"),mod:[{"within-group":S.withinGroup},v],ref:t,...I,children:w?(0,pv.jsx)("span",{...$("placeholder"),title:d,children:g||typeof x=="string"&&cH(x)||(0,pv.jsx)(sH,{})}):(0,pv.jsx)("img",{...p,...$("image"),src:c,alt:d,onError:B=>{P(!0),p?.onError?.(B)}})})});ou.classes=Fm;ou.displayName="@mantine/core/Avatar";ou.Group=OI;var Lm=b(O(),1),hWe=b(D(),1);var rR={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};var hce={},gce=(e,{radius:t,color:r,gradient:n,variant:o,size:i,autoContrast:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:a});return{root:{"--badge-height":xe(i,"badge-height"),"--badge-padding-x":xe(i,"badge-padding-x"),"--badge-fz":xe(i,"badge-fz"),"--badge-radius":t===void 0?void 0:Ee(t),"--badge-bg":r||o?s.background:void 0,"--badge-color":r||o?s.color:void 0,"--badge-bd":r||o?s.border:void 0,"--badge-dot-color":o==="dot"?Ze(r,e):void 0}}},Ii=nt((e,t)=>{let r=z("Badge",hce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,radius:c,color:d,gradient:u,leftSection:f,rightSection:m,children:p,variant:g,fullWidth:y,autoContrast:v,circle:x,mod:_,...I}=r,S=Q({name:"Badge",props:r,classes:rR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:gce});return(0,Lm.jsxs)(F,{variant:g,mod:[{block:y,circle:x,"with-right-section":!!m,"with-left-section":!!f},_],...S("root",{variant:g}),ref:t,...I,children:[f&&(0,Lm.jsx)("span",{...S("section"),"data-position":"left",children:f}),(0,Lm.jsx)("span",{...S("label"),children:p}),m&&(0,Lm.jsx)("span",{...S("section"),"data-position":"right",children:m})]})});Ii.classes=rR;Ii.displayName="@mantine/core/Badge";var NI=b(O(),1);var PWe=b(D(),1);var oR={root:"m_fea6bf1a",burger:"m_d4fb9cad"};var vce={},xce=(e,{color:t,size:r,lineSize:n,transitionDuration:o,transitionTimingFunction:i})=>({root:{"--burger-color":t?Ze(t,e):void 0,"--burger-size":xe(r,"burger-size"),"--burger-line-size":n?Z(n):void 0,"--burger-transition-duration":o===void 0?void 0:`${o}ms`,"--burger-transition-timing-function":i}}),hv=M((e,t)=>{let r=z("Burger",vce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,children:d,transitionDuration:u,transitionTimingFunction:f,lineSize:m,...p}=r,g=Q({name:"Burger",classes:oR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:xce});return(0,NI.jsxs)(It,{...g("root"),ref:t,...p,children:[(0,NI.jsx)(F,{mod:["reduce-motion",{opened:c}],...g("burger")}),d]})});hv.classes=oR;hv.displayName="@mantine/core/Burger";var Za=b(O(),1);var nZe=b(D(),1);var uH=b(O(),1);var BWe=b(D(),1);var Hs={root:"m_77c9d27d",inner:"m_80f1301b",label:"m_811560b9",section:"m_a74036a",loader:"m_a25b86ee",group:"m_80d6d844",groupSection:"m_70be2a01"};var dH={orientation:"horizontal"},bce=(e,{borderWidth:t})=>({group:{"--button-border-width":Z(t)}}),FI=M((e,t)=>{let r=z("ButtonGroup",dH,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,orientation:l,vars:c,borderWidth:d,variant:u,mod:f,...m}=z("ButtonGroup",dH,e),p=Q({name:"ButtonGroup",props:r,classes:Hs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:c,varsResolver:bce,rootSelector:"group"});return(0,uH.jsx)(F,{...p("group"),ref:t,variant:u,mod:[{"data-orientation":l},f],role:"group",...m})});FI.classes=Hs;FI.displayName="@mantine/core/ButtonGroup";var mH=b(O(),1),qWe=b(D(),1);var fH={},yce=(e,{radius:t,color:r,gradient:n,variant:o,autoContrast:i,size:a})=>{let s=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:i});return{groupSection:{"--section-height":xe(a,"section-height"),"--section-padding-x":xe(a,"section-padding-x"),"--section-fz":a?.includes("compact")?Pt(a.replace("compact-","")):Pt(a),"--section-radius":t===void 0?void 0:Ee(t),"--section-bg":r||o?s.background:void 0,"--section-color":s.color,"--section-bd":r||o?s.border:void 0}}},LI=M((e,t)=>{let r=z("ButtonGroupSection",fH,e),{className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,variant:c,gradient:d,radius:u,autoContrast:f,...m}=z("ButtonGroupSection",fH,e),p=Q({name:"ButtonGroupSection",props:r,classes:Hs,className:n,style:o,classNames:i,styles:a,unstyled:s,vars:l,varsResolver:yce,rootSelector:"groupSection"});return(0,mH.jsx)(F,{...p("groupSection"),ref:t,variant:c,...m})});LI.classes=Hs;LI.displayName="@mantine/core/ButtonGroupSection";var _ce={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${Z(1)}))`},out:{opacity:0,transform:"translate(-50%, -200%)"},common:{transformOrigin:"center"},transitionProperty:"transform, opacity"},Ice={},wce=(e,{radius:t,color:r,gradient:n,variant:o,size:i,justify:a,autoContrast:s})=>{let l=e.variantColorResolver({color:r||e.primaryColor,theme:e,gradient:n,variant:o||"filled",autoContrast:s});return{root:{"--button-justify":a,"--button-height":xe(i,"button-height"),"--button-padding-x":xe(i,"button-padding-x"),"--button-fz":i?.includes("compact")?Pt(i.replace("compact-","")):Pt(i),"--button-radius":t===void 0?void 0:Ee(t),"--button-bg":r||o?l.background:void 0,"--button-hover":r||o?l.hover:void 0,"--button-color":l.color,"--button-bd":r||o?l.border:void 0,"--button-hover-color":r||o?l.hoverColor:void 0}}},lt=nt((e,t)=>{let r=z("Button",Ice,e),{style:n,vars:o,className:i,color:a,disabled:s,children:l,leftSection:c,rightSection:d,fullWidth:u,variant:f,radius:m,loading:p,loaderProps:g,gradient:y,classNames:v,styles:x,unstyled:_,"data-disabled":I,autoContrast:S,mod:w,...P}=r,$=Q({name:"Button",props:r,classes:Hs,className:i,style:n,classNames:v,styles:x,unstyled:_,vars:o,varsResolver:wce}),B=!!c,W=!!d;return(0,Za.jsxs)(It,{ref:t,...$("root",{active:!s&&!p&&!I}),unstyled:_,variant:f,disabled:s||p,mod:[{disabled:s||I,loading:p,block:u,"with-left-section":B,"with-right-section":W},w],...P,children:[(0,Za.jsx)(Go,{mounted:!!p,transition:_ce,duration:150,children:H=>(0,Za.jsx)(F,{component:"span",...$("loader",{style:H}),"aria-hidden":!0,children:(0,Za.jsx)(ho,{color:"var(--button-color)",size:"calc(var(--button-height) / 1.8)",...g})})}),(0,Za.jsxs)("span",{...$("inner"),children:[c&&(0,Za.jsx)(F,{component:"span",...$("section"),mod:{position:"left"},children:c}),(0,Za.jsx)(F,{component:"span",mod:{loading:p},...$("label"),children:l}),d&&(0,Za.jsx)(F,{component:"span",...$("section"),mod:{position:"right"},children:d})]})]})});lt.classes=Hs;lt.displayName="@mantine/core/Button";lt.Group=FI;lt.GroupSection=LI;var nR=b(O(),1),MI=b(D(),1);var xZe=b(D(),1);var yZe=b(O(),1);var[pH,hH]=Gt("Card component was not found in tree");var gH=b(O(),1),SZe=b(D(),1);var gv={root:"m_e615b15f",section:"m_599a2148"};var Sce={},vv=nt((e,t)=>{let r=z("CardSection",Sce,e),{classNames:n,className:o,style:i,styles:a,vars:s,withBorder:l,inheritPadding:c,mod:d,...u}=r,f=hH();return(0,gH.jsx)(F,{ref:t,mod:[{"with-border":l,"inherit-padding":c},d],...f.getStyles("section",{className:o,style:i,styles:a,classNames:n}),...u})});vv.classes=gv;vv.displayName="@mantine/core/CardSection";var kce={},Cce=(e,{padding:t})=>({root:{"--card-padding":Ot(t)}}),wr=nt((e,t)=>{let r=z("Card",kce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,padding:d,...u}=r,f=Q({name:"Card",props:r,classes:gv,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Cce}),m=MI.Children.toArray(c),p=m.map((g,y)=>typeof g=="object"&&g&&"type"in g&&g.type===vv?(0,MI.cloneElement)(g,{"data-first-section":y===0||void 0,"data-last-section":y===m.length-1||void 0}):g);return(0,nR.jsx)(pH,{value:{getStyles:f},children:(0,nR.jsx)(ia,{ref:t,unstyled:s,...f("root"),...u,children:p})})});wr.classes=gv;wr.displayName="@mantine/core/Card";wr.Section=vv;var vH=b(O(),1),VZe=b(D(),1);var iR={root:"m_4451eb3a"};var Pce={},nu=nt((e,t)=>{let r=z("Center",Pce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,inline:c,mod:d,...u}=r,f=Q({name:"Center",props:r,classes:iR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l});return(0,vH.jsx)(F,{ref:t,mod:[{inline:c},d],...f("root"),...u})});nu.classes=iR;nu.displayName="@mantine/core/Center";var BI=b(O(),1);var YZe=b(D(),1);var Dce={timeout:1e3};function jI(e){let{children:t,timeout:r,value:n,...o}=z("CopyButton",Dce,e),i=M2({timeout:r});return(0,BI.jsx)(BI.Fragment,{children:t({copy:()=>i.copy(n),copied:i.copied,...o})})}jI.displayName="@mantine/core/CopyButton";var sR=b(O(),1),oGe=b(D(),1);var aR={root:"m_3eebeb36",label:"m_9e365f20"};var Rce={orientation:"horizontal"},Tce=(e,{color:t,variant:r,size:n})=>({root:{"--divider-color":t?Ze(t,e):void 0,"--divider-border-style":r,"--divider-size":xe(n,"divider-size")}}),xv=M((e,t)=>{let r=z("Divider",Rce,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,orientation:d,label:u,labelPosition:f,mod:m,...p}=r,g=Q({name:"Divider",classes:aR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Tce});return(0,sR.jsx)(F,{ref:t,mod:[{orientation:d,"with-label":!!u},m],...g("root"),...p,role:"separator",children:u&&(0,sR.jsx)(F,{component:"span",mod:{position:f},...g("label"),children:u})})});xv.classes=aR;xv.displayName="@mantine/core/Divider";var bv=b(D(),1);function xH({open:e,close:t,openDelay:r,closeDelay:n}){let o=(0,bv.useRef)(-1),i=(0,bv.useRef)(-1),a=()=>{window.clearTimeout(o.current),window.clearTimeout(i.current)},s=()=>{a(),r===0||r===void 0?e():o.current=window.setTimeout(e,r)},l=()=>{a(),n===0||n===void 0?t():i.current=window.setTimeout(t,n)};return(0,bv.useEffect)(()=>a,[]),{openDropdown:s,closeDropdown:l}}var VI=b(O(),1),TGe=b(D(),1);var bH=b(O(),1),yGe=b(D(),1);var pGe=b(D(),1),hGe=b(O(),1);function lR({color:e,theme:t,defaultShade:r}){let n=_r({color:e,theme:t});return n.isThemeColor?n.shade===void 0?`var(--mantine-color-${n.color}-${r})`:`var(${n.variable})`:e}var cR={root:"m_bcb3f3c2"};var Ece={color:"yellow"},$ce=(e,{color:t})=>({root:{"--mark-bg-dark":lR({color:t,theme:e,defaultShade:5}),"--mark-bg-light":lR({color:t,theme:e,defaultShade:2})}}),UI=M((e,t)=>{let r=z("Mark",Ece,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,variant:d,...u}=r,f=Q({name:"Mark",props:r,className:o,style:i,classes:cR,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:$ce});return(0,bH.jsx)(F,{component:"mark",ref:t,variant:d,...f("root"),...u})});UI.classes=cR;UI.displayName="@mantine/core/Mark";function yH(e){return e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&")}function _H(e,t){if(t==null)return[{chunk:e,highlighted:!1}];let r=Array.isArray(t)?t.map(yH):yH(t);if(!(Array.isArray(r)?r.filter(s=>s.trim().length>0).length>0:r.trim()!==""))return[{chunk:e,highlighted:!1}];let o=typeof r=="string"?r.trim():r.filter(s=>s.trim().length!==0).map(s=>s.trim()).sort((s,l)=>l.length-s.length).join("|"),i=new RegExp(`(${o})`,"gi");return e.split(i).map(s=>({chunk:s,highlighted:i.test(s)})).filter(({chunk:s})=>s)}var Ace={},yv=nt((e,t)=>{let{unstyled:r,children:n,highlight:o,highlightStyles:i,color:a,...s}=z("Highlight",Ace,e),l=_H(n,o);return(0,VI.jsx)(ge,{unstyled:r,ref:t,...s,__staticSelector:"Highlight",children:l.map(({chunk:c,highlighted:d},u)=>d?(0,VI.jsx)(UI,{unstyled:r,color:a,style:i,"data-highlight":c,children:c},u):(0,VI.jsx)("span",{children:c},u))})});yv.classes=ge.classes;yv.displayName="@mantine/core/Highlight";var OH=b(O(),1),zH=b(D(),1);var AH=b(O(),1);function Mm(){return Mm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mm.apply(null,arguments)}function Bm(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var sa=b(D());var SH=b(D());var IH=b(D()),wH=IH.useLayoutEffect;var kH=function(t){var r=SH.default.useRef(t);return wH(function(){r.current=t}),r};var dR=b(D()),CH=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},PH=function(t,r){var n=dR.default.useRef();return dR.default.useCallback(function(o){t.current=o,n.current&&CH(n.current,null),n.current=r,r&&CH(r,o)},[r])};var DH={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Oce=function(t){Object.keys(DH).forEach(function(r){t.style.setProperty(r,DH[r],"important")})},RH=Oce,Qo=null,TH=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function zce(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),Qo||(Qo=document.createElement("textarea"),Qo.setAttribute("tabindex","-1"),Qo.setAttribute("aria-hidden","true"),RH(Qo)),Qo.parentNode===null&&document.body.appendChild(Qo);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(f){var m=f;Qo.style[m]=a[m]}),RH(Qo),Qo.value=t;var l=TH(Qo,e);Qo.value=t,l=TH(Qo,e),Qo.value="x";var c=Qo.scrollHeight-o,d=c*r;s==="border-box"&&(d=d+o+i),l=Math.max(d,l);var u=c*n;return s==="border-box"&&(u=u+o+i),l=Math.min(u,l),[l,c]}var EH=function(){},Nce=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Fce=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Lce=!!document.documentElement.currentStyle,Mce=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=Nce(Fce,r),o=n.boxSizing;if(o==="")return null;Lce&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},Bce=Mce;function uR(e,t,r){var n=kH(r);sa.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var jce=function(t,r){uR(document.body,"reset",function(n){t.current.form===n.target&&r(n)})},Uce=function(t){uR(window,"resize",t)},Vce=function(t){uR(document.fonts,"loadingdone",t)},Hce=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Wce=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?EH:a,l=t.onHeightChange,c=l===void 0?EH:l,d=Bm(t,Hce),u=d.value!==void 0,f=sa.useRef(null),m=PH(f,r),p=sa.useRef(0),g=sa.useRef(),y=function(){var _=f.current,I=n&&g.current?g.current:Bce(_);if(I){g.current=I;var S=zce(I,_.value||_.placeholder||"x",i,o),w=S[0],P=S[1];p.current!==w&&(p.current=w,_.style.setProperty("height",w+"px","important"),c(w,{rowHeight:P}))}},v=function(_){u||y(),s(_)};return sa.useLayoutEffect(y),jce(f,function(){if(!u){var x=f.current.value;requestAnimationFrame(function(){var _=f.current;_&&x!==_.value&&y()})}}),Uce(y),Vce(y),sa.createElement("textarea",Mm({},d,{onChange:v,ref:m}))},$H=sa.forwardRef(Wce);var XGe=b(D(),1);var Zce={},HI=M((e,t)=>{let{autosize:r,maxRows:n,minRows:o,__staticSelector:i,resize:a,...s}=z("Textarea",Zce,e),l=r&&Ly()!=="test";return(0,AH.jsx)(rr,{component:l?$H:"textarea",ref:t,...s,__staticSelector:i||"Textarea",multiline:!0,"data-no-overflow":r&&n===void 0||void 0,__vars:{"--input-resize":a},...l?{maxRows:n,minRows:o}:{}})});HI.classes=rr.classes;HI.displayName="@mantine/core/Textarea";function fR(e,t){if(typeof e=="string"&&e.trim().length===0)return!0;try{return t(e),!0}catch{return!1}}var Gce={serialize:JSON.stringify,deserialize:JSON.parse},_v=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,formatOnBlur:i,validationError:a,serialize:s,deserialize:l,onFocus:c,onBlur:d,readOnly:u,error:f,...m}=z("JsonInput",Gce,e),[p,g]=ot({value:r,defaultValue:n,finalValue:"",onChange:o}),[y,v]=(0,zH.useState)(fR(p,l));return(0,OH.jsx)(HI,{value:p,onChange:I=>g(I.currentTarget.value),onFocus:I=>{c?.(I),v(!0)},onBlur:I=>{typeof d=="function"&&d(I);let S=fR(I.currentTarget.value,l);i&&!u&&S&&I.currentTarget.value.trim()!==""&&g(s(l(I.currentTarget.value),null,2)),v(S)},ref:t,readOnly:u,...m,autoComplete:"off",__staticSelector:"JsonInput",error:y?f:a||!0,"data-monospace":!0})});_v.classes=rr.classes;_v.displayName="@mantine/core/JsonInput";var pR=b(O(),1),UH=b(D(),1);var fqe=b(D(),1);var pqe=b(O(),1);var[NH,Ga]=Gt("Menu component was not found in the tree");var FH=b(O(),1),xqe=b(D(),1);var la={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504"};var qce={},WI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuDivider",qce,e),l=Ga();return(0,FH.jsx)(F,{ref:t,...l.getStyles("divider",{className:n,style:o,styles:i,classNames:r}),...s})});WI.classes=la;WI.displayName="@mantine/core/MenuDivider";var ZI=b(O(),1),LH=b(D(),1);var Kce={},GI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,onMouseEnter:s,onMouseLeave:l,onKeyDown:c,children:d,...u}=z("MenuDropdown",Kce,e),f=(0,LH.useRef)(null),m=Ga(),p=Mn(c,v=>{(v.key==="ArrowUp"||v.key==="ArrowDown")&&(v.preventDefault(),f.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),g=Mn(s,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.openDropdown()),y=Mn(l,()=>(m.trigger==="hover"||m.trigger==="click-hover")&&m.closeDropdown());return(0,ZI.jsxs)(Xr.Dropdown,{...u,onMouseEnter:g,onMouseLeave:y,role:"menu","aria-orientation":"vertical",ref:We(t,f),...m.getStyles("dropdown",{className:n,style:o,styles:i,classNames:r,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:p,children:[m.withInitialFocusPlaceholder&&(0,ZI.jsx)("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});GI.classes=la;GI.displayName="@mantine/core/MenuDropdown";var jm=b(O(),1),MH=b(D(),1);var Xce={},qI=nt((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,color:s,closeMenuOnClick:l,leftSection:c,rightSection:d,children:u,disabled:f,"data-disabled":m,...p}=z("MenuItem",Xce,e),g=Ga(),y=ft(),{dir:v}=si(),x=(0,MH.useRef)(null),_=g.getItemIndex(x.current),I=p,S=Mn(I.onMouseLeave,()=>g.setHovered(-1)),w=Mn(I.onMouseEnter,()=>g.setHovered(g.getItemIndex(x.current))),P=Mn(I.onClick,()=>{m||(typeof l=="boolean"?l&&g.closeDropdownImmediately():g.closeOnItemClick&&g.closeDropdownImmediately())}),$=Mn(I.onFocus,()=>g.setHovered(g.getItemIndex(x.current))),B=s?y.variantColorResolver({color:s,theme:y,variant:"light"}):void 0,W=s?_r({color:s,theme:y}):null;return(0,jm.jsxs)(It,{...p,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,onFocus:$,...g.getStyles("item",{className:n,style:o,styles:i,classNames:r}),ref:We(x,t),role:"menuitem",disabled:f,"data-menu-item":!0,"data-disabled":f||m||void 0,"data-hovered":g.hovered===_?!0:void 0,"data-mantine-stop-propagation":!0,onMouseEnter:w,onMouseLeave:S,onClick:P,onKeyDown:SL({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:g.loop,dir:v,orientation:"vertical",onKeyDown:I.onKeyDown}),__vars:{"--menu-item-color":W?.isThemeColor&&W?.shade===void 0?`var(--mantine-color-${W.color}-6)`:B?.color,"--menu-item-hover":B?.hover},children:[c&&(0,jm.jsx)("div",{...g.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"left",children:c}),u&&(0,jm.jsx)("div",{...g.getStyles("itemLabel",{styles:i,classNames:r}),children:u}),d&&(0,jm.jsx)("div",{...g.getStyles("itemSection",{styles:i,classNames:r}),"data-position":"right",children:d})]})});qI.classes=la;qI.displayName="@mantine/core/MenuItem";var BH=b(O(),1),qqe=b(D(),1);var Qce={},KI=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("MenuLabel",Qce,e),l=Ga();return(0,BH.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,styles:i,classNames:r}),...s})});KI.classes=la;KI.displayName="@mantine/core/MenuLabel";var jH=b(O(),1),XI=b(D(),1);var Yce={refProp:"ref"},mR=(0,XI.forwardRef)((e,t)=>{let{children:r,refProp:n,...o}=z("MenuTarget",Yce,e);if(!ko(r))throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");let i=Ga(),a=r.props,s=Mn(a.onClick,()=>{i.trigger==="click"?i.toggleDropdown():i.trigger==="click-hover"&&(i.setOpenedViaClick(!0),i.opened||i.openDropdown())}),l=Mn(a.onMouseEnter,()=>(i.trigger==="hover"||i.trigger==="click-hover")&&i.openDropdown()),c=Mn(a.onMouseLeave,()=>{(i.trigger==="hover"||i.trigger==="click-hover"&&!i.openedViaClick)&&i.closeDropdown()});return(0,jH.jsx)(Xr.Target,{refProp:n,popupType:"menu",ref:t,...o,children:(0,XI.cloneElement)(r,{onClick:s,onMouseEnter:l,onMouseLeave:c,"data-expanded":i.opened?!0:void 0})})});mR.displayName="@mantine/core/MenuTarget";var Jce={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function Jr(e){let t=z("Menu",Jce,e),{children:r,onOpen:n,onClose:o,opened:i,defaultOpened:a,trapFocus:s,onChange:l,closeOnItemClick:c,loop:d,closeOnEscape:u,trigger:f,openDelay:m,closeDelay:p,classNames:g,styles:y,unstyled:v,variant:x,vars:_,menuItemTabIndex:I,keepMounted:S,withInitialFocusPlaceholder:w,...P}=t,$=Q({name:"Menu",classes:la,props:t,classNames:g,styles:y,unstyled:v}),[B,{setHovered:W,resetHovered:H}]=RL(),[K,T]=ot({value:i,defaultValue:a,finalValue:!1,onChange:l}),[k,E]=(0,UH.useState)(!1),C=()=>{T(!1),E(!1),K&&o?.()},A=()=>{T(!0),!K&&n?.()},R=()=>{K?C():A()},{openDropdown:N,closeDropdown:U}=xH({open:A,close:C,closeDelay:p,openDelay:m}),G=pe=>PL("[data-menu-item]","[data-menu-dropdown]",pe),{resolvedClassNames:oe,resolvedStyles:ve}=Zr({classNames:g,styles:y,props:t});return yr(()=>{H()},[K]),(0,pR.jsx)(NH,{value:{getStyles:$,opened:K,toggleDropdown:R,getItemIndex:G,hovered:B,setHovered:W,openedViaClick:k,setOpenedViaClick:E,closeOnItemClick:c,closeDropdown:f==="click"?C:U,openDropdown:f==="click"?A:N,closeDropdownImmediately:C,loop:d,trigger:f,unstyled:v,menuItemTabIndex:I,withInitialFocusPlaceholder:w},children:(0,pR.jsx)(Xr,{...P,opened:K,onChange:R,defaultOpened:a,trapFocus:S?!1:s,closeOnEscape:u,__staticSelector:"Menu",classNames:oe,styles:ve,unstyled:v,variant:x,keepMounted:S,children:r})})}Jr.extend=e=>e;Jr.withProps=uP(Jr);Jr.classes=la;Jr.displayName="@mantine/core/Menu";Jr.Item=qI;Jr.Label=KI;Jr.Dropdown=GI;Jr.Target=mR;Jr.Divider=WI;var Ws=b(O(),1),QH=b(D(),1);var HH=b(O(),1),AKe=b(D(),1);var PKe=b(D(),1);var RKe=b(O(),1);var[VH,wi]=Gt("Modal component was not found in tree");var go={root:"m_9df02822",content:"m_54c44539",inner:"m_1f958f16",header:"m_d0e2b9cd"};var ede={},Iv=M((e,t)=>{let r=z("ModalBody",ede,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=wi();return(0,HH.jsx)(wD,{ref:t,...c.getStyles("body",{classNames:n,style:i,styles:a,className:o}),...l})});Iv.classes=go;Iv.displayName="@mantine/core/ModalBody";var WH=b(O(),1),jKe=b(D(),1);var tde={},wv=M((e,t)=>{let r=z("ModalCloseButton",tde,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=wi();return(0,WH.jsx)(SD,{ref:t,...c.getStyles("close",{classNames:n,style:i,styles:a,className:o}),...l})});wv.classes=go;wv.displayName="@mantine/core/ModalCloseButton";var hR=b(O(),1);var XKe=b(D(),1);var rde={},Sv=M((e,t)=>{let r=z("ModalContent",rde,e),{classNames:n,className:o,style:i,styles:a,vars:s,children:l,__hidden:c,...d}=r,u=wi(),f=u.scrollAreaComponent||KU;return(0,hR.jsx)(kD,{...u.getStyles("content",{className:o,style:i,styles:a,classNames:n}),innerProps:u.getStyles("inner",{className:o,style:i,styles:a,classNames:n}),"data-full-screen":u.fullScreen||void 0,"data-modal-content":!0,"data-hidden":c||void 0,ref:t,...d,children:(0,hR.jsx)(f,{style:{maxHeight:u.fullScreen?"100dvh":`calc(100dvh - (${Z(u.yOffset)} * 2))`},children:l})})});Sv.classes=go;Sv.displayName="@mantine/core/ModalContent";var ZH=b(O(),1),iXe=b(D(),1);var ode={},kv=M((e,t)=>{let r=z("ModalHeader",ode,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=wi();return(0,ZH.jsx)(CD,{ref:t,...c.getStyles("header",{classNames:n,style:i,styles:a,className:o}),...l})});kv.classes=go;kv.displayName="@mantine/core/ModalHeader";var GH=b(O(),1),mXe=b(D(),1);var nde={},Cv=M((e,t)=>{let r=z("ModalOverlay",nde,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=wi();return(0,GH.jsx)(DD,{ref:t,...c.getStyles("overlay",{classNames:n,style:i,styles:a,className:o}),...l})});Cv.classes=go;Cv.displayName="@mantine/core/ModalOverlay";var gR=b(O(),1);var IXe=b(D(),1);var ide={__staticSelector:"Modal",closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Et("modal"),transitionProps:{duration:200,transition:"fade-down"},yOffset:"5dvh"},ade=(e,{radius:t,size:r,yOffset:n,xOffset:o})=>({root:{"--modal-radius":t===void 0?void 0:Ee(t),"--modal-size":xe(r,"modal-size"),"--modal-y-offset":Z(n),"--modal-x-offset":Z(o)}}),Pv=M((e,t)=>{let r=z("ModalRoot",ide,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,yOffset:c,scrollAreaComponent:d,radius:u,fullScreen:f,centered:m,xOffset:p,__staticSelector:g,...y}=r,v=Q({name:g,classes:go,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ade});return(0,gR.jsx)(VH,{value:{yOffset:c,scrollAreaComponent:d,getStyles:v,fullScreen:f},children:(0,gR.jsx)(ID,{ref:t,...v("root"),"data-full-screen":f||void 0,"data-centered":m||void 0,"data-offset-scrollbars":d===Nr.Autosize||void 0,unstyled:s,...y})})});Pv.classes=go;Pv.displayName="@mantine/core/ModalRoot";var qH=b(O(),1),vR=b(D(),1);var[sde,KH]=Co();function xR({children:e}){let[t,r]=(0,vR.useState)([]),[n,o]=(0,vR.useState)(Et("modal"));return(0,qH.jsx)(sde,{value:{stack:t,addModal:(i,a)=>{r(s=>[...new Set([...s,i])]),o(s=>typeof a=="number"&&typeof s=="number"?Math.max(s,a):s)},removeModal:i=>r(a=>a.filter(s=>s!==i)),getZIndex:i=>`calc(${n} + ${t.indexOf(i)} + 1)`,currentId:t[t.length-1],maxZIndex:n},children:e})}xR.displayName="@mantine/core/ModalStack";var XH=b(O(),1),LXe=b(D(),1);var lde={},Dv=M((e,t)=>{let r=z("ModalTitle",lde,e),{classNames:n,className:o,style:i,styles:a,vars:s,...l}=r,c=wi();return(0,XH.jsx)(RD,{ref:t,...c.getStyles("title",{classNames:n,style:i,styles:a,className:o}),...l})});Dv.classes=go;Dv.displayName="@mantine/core/ModalTitle";var cde={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Et("modal"),transitionProps:{duration:200,transition:"fade-down"},withOverlay:!0,withCloseButton:!0},vo=M((e,t)=>{let{title:r,withOverlay:n,overlayProps:o,withCloseButton:i,closeButtonProps:a,children:s,radius:l,opened:c,stackId:d,zIndex:u,...f}=z("Modal",cde,e),m=KH(),p=!!r||i,g=m&&d?{closeOnEscape:m.currentId===d,trapFocus:m.currentId===d,zIndex:m.getZIndex(d)}:{},y=n===!1?!1:d&&m?m.currentId===d:c;return(0,QH.useEffect)(()=>{m&&d&&(c?m.addModal(d,u||Et("modal")):m.removeModal(d))},[c,d,u]),(0,Ws.jsxs)(Pv,{ref:t,radius:l,opened:c,zIndex:m&&d?m.getZIndex(d):u,...f,...g,children:[n&&(0,Ws.jsx)(Cv,{visible:y,transitionProps:m&&d?{duration:0}:void 0,...o}),(0,Ws.jsxs)(Sv,{radius:l,__hidden:m&&d&&c?d!==m.currentId:!1,children:[p&&(0,Ws.jsxs)(kv,{children:[r&&(0,Ws.jsx)(Dv,{children:r}),i&&(0,Ws.jsx)(wv,{...a})]}),(0,Ws.jsx)(Iv,{children:s})]})]})});vo.classes=go;vo.displayName="@mantine/core/Modal";vo.Root=Pv;vo.Overlay=Cv;vo.Content=Sv;vo.Body=Iv;vo.Header=kv;vo.Title=Dv;vo.CloseButton=wv;vo.Stack=xR;var Ao=b(O(),1),nW=b(D(),1);var Rv=b(O(),1),DQe=b(D(),1);var aQe=b(D(),1),sQe=b(O(),1);var[YH,Um]=Co();var uQe=b(D(),1),fQe=b(O(),1);var[JH,eW]=Co();var bR=b(O(),1),vQe=b(D(),1);var Vm={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};var dde={},ude=(e,{gap:t},{size:r})=>({group:{"--pg-gap":t!==void 0?xe(t):xe(r,"pg-gap")}}),QI=M((e,t)=>{let r=z("PillGroup",dde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,disabled:d,...u}=r,m=Um()?.size||c||void 0,p=Q({name:"PillGroup",classes:Vm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:ude,stylesCtx:{size:m},rootSelector:"group"});return(0,bR.jsx)(JH,{value:{size:m,disabled:d},children:(0,bR.jsx)(F,{ref:t,size:m,...p("group"),...u})})});QI.classes=Vm;QI.displayName="@mantine/core/PillGroup";var fde={variant:"default"},mde=(e,{radius:t},{size:r})=>({root:{"--pill-fz":xe(r,"pill-fz"),"--pill-height":xe(r,"pill-height"),"--pill-radius":t===void 0?void 0:Ee(t)}}),Zs=M((e,t)=>{let r=z("Pill",fde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,variant:c,children:d,withRemoveButton:u,onRemove:f,removeButtonProps:m,radius:p,size:g,disabled:y,mod:v,...x}=r,_=eW(),I=Um(),S=g||_?.size||void 0,w=I?.variant==="filled"?"contrast":c||"default",P=Q({name:"Pill",classes:Vm,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:mde,stylesCtx:{size:S}});return(0,Rv.jsxs)(F,{component:"span",ref:t,variant:w,size:S,...P("root",{variant:w}),mod:[{"with-remove":u&&!y,disabled:y||_?.disabled},v],...x,children:[(0,Rv.jsx)("span",{...P("label"),children:d}),u&&(0,Rv.jsx)(xi,{variant:"transparent",radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:s,...m,...P("remove",{className:m?.className,style:m?.style}),onMouseDown:$=>{$.preventDefault(),$.stopPropagation(),m?.onMouseDown?.($)},onClick:$=>{$.stopPropagation(),f?.(),m?.onClick?.($)}})]})});Zs.classes=Vm;Zs.displayName="@mantine/core/Pill";Zs.Group=QI;var _R=b(O(),1),rW=b(D(),1);var tW=b(O(),1);var VQe=b(D(),1);var yR={field:"m_45c4369d"};var pde={type:"visible"},YI=M((e,t)=>{let r=z("PillsInputField",pde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,type:c,disabled:d,id:u,pointer:f,mod:m,...p}=r,g=Um(),y=bi(),v=Q({name:"PillsInputField",classes:yR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,rootSelector:"field"}),x=d||g?.disabled;return(0,tW.jsx)(F,{component:"input",ref:We(t,g?.fieldRef),"data-type":c,disabled:x,mod:[{disabled:x,pointer:f},m],...v("field"),...p,id:y?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":y?.describedBy,type:"text",onMouseDown:_=>!f&&_.stopPropagation()})});YI.classes=yR;YI.displayName="@mantine/core/PillsInputField";var hde={},fc=M((e,t)=>{let r=z("PillsInput",hde,e),{children:n,onMouseDown:o,onClick:i,size:a,disabled:s,__staticSelector:l,error:c,variant:d,...u}=r,f=(0,rW.useRef)(null);return(0,_R.jsx)(YH,{value:{fieldRef:f,size:a,disabled:s,hasError:!!c,variant:d},children:(0,_R.jsx)(rr,{size:a,error:c,variant:d,component:"div",ref:t,onMouseDown:m=>{m.preventDefault(),o?.(m),f.current?.focus()},onClick:m=>{m.preventDefault(),m.currentTarget.closest("fieldset")?.disabled||(f.current?.focus(),i?.(m))},...u,multiline:!0,disabled:s,__staticSelector:l||"PillsInput",withAria:!1,children:n})})});fc.displayName="@mantine/core/PillsInput";fc.Field=YI;var aYe=b(O(),1);var lYe=b(D(),1);function oW({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(_i(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.value.toLowerCase().trim())===-1)}):r.indexOf(i.value.toLowerCase().trim())===-1&&o.push(i),o),[])}var gde={maxValues:1/0,withCheckIcon:!0,checkIconPosition:"left",hiddenInputValuesDivider:","},iu=M((e,t)=>{let r=z("MultiSelect",gde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,variant:p,data:g,dropdownOpened:y,defaultDropdownOpened:v,onDropdownOpen:x,onDropdownClose:_,selectFirstOptionOnChange:I,onOptionSubmit:S,comboboxProps:w,filter:P,limit:$,withScrollArea:B,maxDropdownHeight:W,searchValue:H,defaultSearchValue:K,onSearchChange:T,readOnly:k,disabled:E,onFocus:C,onBlur:A,radius:R,rightSection:N,rightSectionWidth:U,rightSectionPointerEvents:G,rightSectionProps:oe,leftSection:ve,leftSectionWidth:pe,leftSectionPointerEvents:Y,leftSectionProps:ne,inputContainer:we,inputWrapperOrder:se,withAsterisk:Ae,labelProps:He,descriptionProps:et,errorProps:dt,wrapperProps:Fe,description:Jt,label:er,error:co,maxValues:he,searchable:fe,nothingFoundMessage:Se,withCheckIcon:ze,checkIconPosition:Ye,hidePickedOptions:Me,withErrorStyles:tt,name:ue,form:Te,id:br,clearable:gn,clearButtonProps:Mo,hiddenInputProps:Wt,placeholder:Pr,hiddenInputValuesDivider:_s,required:pf,mod:hf,renderOption:gf,onRemove:Dr,onClear:kl,scrollAreaProps:Cl,chevronColor:$h,...Ah}=r,Oh=bt(br),vf=Em(g),Pl=tu(vf),ar=dc({opened:y,defaultOpened:v,onDropdownOpen:x,onDropdownClose:()=>{_?.(),ar.resetSelectedOption()}}),{styleProps:u2,rest:{type:Xre,autoComplete:f2,...m2}}=Gr(Ah),[ut,Ln]=ot({value:d,defaultValue:u,finalValue:[],onChange:f}),[ii,p2]=ot({value:H,defaultValue:K,finalValue:"",onChange:T}),Vi=ke=>{p2(ke),ar.resetSelectedOption()},dd=Q({name:"MultiSelect",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:zh,resolvedStyles:Nh}=Zr({props:r,styles:a,classNames:n}),my=ke=>{m?.(ke),ke.key===" "&&!fe&&(ke.preventDefault(),ar.toggleDropdown()),ke.key==="Backspace"&&ii.length===0&&ut.length>0&&(Dr?.(ut[ut.length-1]),Ln(ut.slice(0,ut.length-1)))},h2=ut.map((ke,Bo)=>(0,Ao.jsx)(Zs,{withRemoveButton:!k&&!Pl[ke]?.disabled,onRemove:()=>{Ln(ut.filter(ya=>ke!==ya)),Dr?.(ke)},unstyled:s,disabled:E,...dd("pill"),children:Pl[ke]?.label||ke},`${ke}-${Bo}`));(0,nW.useEffect)(()=>{I&&ar.selectFirstOption()},[I,ii]);let py=(0,Ao.jsx)(Ve.ClearButton,{...Mo,onClear:()=>{kl?.(),Ln([]),Vi("")}}),g2=oW({data:vf,value:ut}),hy=gn&&ut.length>0&&!E&&!k;return(0,Ao.jsxs)(Ao.Fragment,{children:[(0,Ao.jsxs)(Ve,{store:ar,classNames:zh,styles:Nh,unstyled:s,size:c,readOnly:k,__staticSelector:"MultiSelect",onOptionSubmit:ke=>{S?.(ke),Vi(""),ar.updateSelectedOptionIndex("selected"),ut.includes(Pl[ke].value)?(Ln(ut.filter(Bo=>Bo!==Pl[ke].value)),Dr?.(Pl[ke].value)):ut.length<he&&Ln([...ut,Pl[ke].value])},...w,children:[(0,Ao.jsx)(Ve.DropdownTarget,{children:(0,Ao.jsx)(fc,{...u2,__staticSelector:"MultiSelect",classNames:zh,styles:Nh,unstyled:s,size:c,className:o,style:i,variant:p,disabled:E,radius:R,__defaultRightSection:(0,Ao.jsx)(Ve.Chevron,{size:c,error:co,unstyled:s,color:$h}),__clearSection:py,__clearable:hy,rightSection:N,rightSectionPointerEvents:G||(py?"all":"none"),rightSectionWidth:U,rightSectionProps:oe,leftSection:ve,leftSectionWidth:pe,leftSectionPointerEvents:Y,leftSectionProps:ne,inputContainer:we,inputWrapperOrder:se,withAsterisk:Ae,labelProps:He,descriptionProps:et,errorProps:dt,wrapperProps:Fe,description:Jt,label:er,error:co,withErrorStyles:tt,__stylesApiProps:{...r,rightSectionPointerEvents:G||(hy?"all":"none"),multiline:!0},pointer:!fe,onClick:()=>fe?ar.openDropdown():ar.toggleDropdown(),"data-expanded":ar.dropdownOpened||void 0,id:Oh,required:pf,mod:hf,children:(0,Ao.jsxs)(Zs.Group,{disabled:E,unstyled:s,...dd("pillsList"),children:[h2,(0,Ao.jsx)(Ve.EventsTarget,{autoComplete:f2,children:(0,Ao.jsx)(fc.Field,{...m2,ref:t,id:Oh,placeholder:Pr,type:!fe&&!Pr?"hidden":"visible",...dd("inputField"),unstyled:s,onFocus:ke=>{C?.(ke),fe&&ar.openDropdown()},onBlur:ke=>{A?.(ke),ar.closeDropdown(),Vi("")},onKeyDown:my,value:ii,onChange:ke=>{Vi(ke.currentTarget.value),fe&&ar.openDropdown(),I&&ar.selectFirstOption()},disabled:E,readOnly:k||!fe,pointer:!fe})})]})})}),(0,Ao.jsx)(Nm,{data:Me?g2:vf,hidden:k||E,filter:P,search:ii,limit:$,hiddenWhenEmpty:!Se,withScrollArea:B,maxDropdownHeight:W,filterOptions:fe,value:ut,checkIconPosition:Ye,withCheckIcon:ze,nothingFoundMessage:Se,unstyled:s,labelId:er?`${Oh}-label`:void 0,"aria-label":er?void 0:Ah["aria-label"],renderOption:gf,scrollAreaProps:Cl})]}),(0,Ao.jsx)(Ve.HiddenInput,{name:ue,valuesDivider:_s,value:ut,form:Te,disabled:E,...Wt})]})});iu.classes={...rr.classes,...Ve.classes};iu.displayName="@mantine/core/MultiSelect";var Pn=b(O(),1);var TYe=b(D(),1);var IR={root:"m_f0824112",description:"m_57492dcc",section:"m_690090b5",label:"m_1f6ac4c4",body:"m_f07af9d2",children:"m_e17b862f",chevron:"m_1fd8a00b"};var vde={},xde=(e,{variant:t,color:r,childrenOffset:n,autoContrast:o})=>{let i=e.variantColorResolver({color:r||e.primaryColor,theme:e,variant:t||"light",autoContrast:o});return{root:{"--nl-bg":r||t?i.background:void 0,"--nl-hover":r||t?i.hover:void 0,"--nl-color":r||t?i.color:void 0},children:{"--nl-offset":Ot(n)}}},mc=nt((e,t)=>{let r=z("NavLink",vde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,opened:c,defaultOpened:d,onChange:u,children:f,onClick:m,active:p,disabled:g,leftSection:y,rightSection:v,label:x,description:_,disableRightSectionRotation:I,noWrap:S,childrenOffset:w,onKeyDown:P,autoContrast:$,mod:B,...W}=r,H=Q({name:"NavLink",props:r,classes:IR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:xde}),[K,T]=ot({value:c,defaultValue:d,finalValue:!1,onChange:u}),k=!!f,E=C=>{m?.(C),k&&(C.preventDefault(),T(!K))};return(0,Pn.jsxs)(Pn.Fragment,{children:[(0,Pn.jsxs)(It,{...H("root"),component:"a",ref:t,onClick:E,onKeyDown:C=>{P?.(C),C.nativeEvent.code==="Space"&&k&&(C.preventDefault(),T(!K))},unstyled:s,mod:[{disabled:g,active:p,expanded:K},B],...W,children:[y&&(0,Pn.jsx)(F,{component:"span",...H("section"),mod:{position:"left"},children:y}),(0,Pn.jsxs)(F,{...H("body"),mod:{"no-wrap":S},children:[(0,Pn.jsx)(F,{component:"span",...H("label"),children:x}),(0,Pn.jsx)(F,{component:"span",mod:{active:p},...H("description"),children:_})]}),(k||v!==void 0)&&(0,Pn.jsx)(F,{...H("section"),component:"span",mod:{rotate:K&&!I,position:"right"},children:k?v!==void 0?v:(0,Pn.jsx)(OD,{...H("chevron")}):v})]}),k&&(0,Pn.jsx)(um,{in:K,...H("collapse"),children:(0,Pn.jsx)("div",{...H("children"),children:f})})]})});mc.classes=IR;mc.displayName="@mantine/core/NavLink";var Gs=b(O(),1),VYe=b(D(),1);var wR={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};var bde={withCloseButton:!0},yde=(e,{radius:t,color:r})=>({root:{"--notification-radius":t===void 0?void 0:Ee(t),"--notification-color":r?Ze(r,e):void 0}}),au=M((e,t)=>{let r=z("Notification",bde,e),{className:n,color:o,radius:i,loading:a,withCloseButton:s,withBorder:l,title:c,icon:d,children:u,onClose:f,closeButtonProps:m,classNames:p,style:g,styles:y,unstyled:v,variant:x,vars:_,mod:I,loaderProps:S,role:w,...P}=r,$=Q({name:"Notification",classes:wR,props:r,className:n,style:g,classNames:p,styles:y,unstyled:v,vars:_,varsResolver:yde});return(0,Gs.jsxs)(F,{...$("root"),mod:[{"data-with-icon":!!d||a,"data-with-border":l},I],ref:t,variant:x,role:w||"alert",...P,children:[d&&!a&&(0,Gs.jsx)("div",{...$("icon"),children:d}),a&&(0,Gs.jsx)(ho,{size:28,color:o,...S,...$("loader")}),(0,Gs.jsxs)("div",{...$("body"),children:[c&&(0,Gs.jsx)("div",{...$("title"),children:c}),(0,Gs.jsx)(F,{...$("description"),mod:{"data-with-title":!!c},children:u})]}),s&&(0,Gs.jsx)(xi,{iconSize:16,color:"gray",...m,unstyled:v,onClick:f,...$("closeButton")})]})});au.classes=wR;au.displayName="@mantine/core/Notification";var jt=b(D());function dW(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}var Hm;(function(e){e.event="event",e.props="prop"})(Hm||(Hm={}));function pc(){}function _de(e){var t,r=void 0;return function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t&&n.length===t.length&&n.every(function(i,a){return i===t[a]})||(t=n,r=e.apply(void 0,n)),r}}function Tv(e){return!!(e||"").match(/\d/)}function hc(e){return e==null}function Ide(e){return typeof e=="number"&&isNaN(e)}function uW(e){return hc(e)||Ide(e)||typeof e=="number"&&!isFinite(e)}function fW(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function wde(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Sde(e,t,r){var n=wde(r),o=e.search(/[1-9]/);return o=o===-1?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}function iW(e){var t=(0,jt.useRef)(e);t.current=e;var r=(0,jt.useRef)(function(){for(var n=[],o=arguments.length;o--;)n[o]=arguments[o];return t.current.apply(t,n)});return r.current}function kR(e,t){t===void 0&&(t=!0);var r=e[0]==="-",n=r&&t;e=e.replace("-","");var o=e.split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNegation:r,addNegation:n}}function kde(e){if(!e)return e;var t=e[0]==="-";t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return(t?"-":"")+n+(o?"."+o:"")}function mW(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function aW(e,t){return Array(t+1).join(e)}function pW(e){var t=e+"",r=t[0]==="-"?"-":"";r&&(t=t.substring(1));var n=t.split(/[eE]/g),o=n[0],i=n[1];if(i=Number(i),!i)return r+o;o=o.replace(".","");var a=1+i,s=o.length;return a<0?o="0."+aW("0",Math.abs(a))+o:a>=s?o=o+aW("0",a-s):o=(o.substring(0,a)||"0")+"."+o.substring(a),r+o}function sW(e,t,r){if(["","-"].indexOf(e)!==-1)return e;var n=(e.indexOf(".")!==-1||r)&&t,o=kR(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNegation,l=parseFloat("0."+(a||"0")),c=a.length<=t?"0."+a:l.toFixed(t),d=c.split("."),u=i;i&&Number(d[0])&&(u=i.split("").reverse().reduce(function(g,y,v){return g.length>v?(Number(g[0])+Number(y)).toString()+g.substring(1,g.length):y+g},d[0]));var f=mW(d[1]||"",t,r),m=s?"-":"",p=n?".":"";return""+m+u+p+f}function su(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var hW=_de(function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{from:{start:r,end:o-n},to:{start:r,end:i-n}}}),Cde=function(e,t){var r=Math.min(e.selectionStart,t);return{from:{start:r,end:e.selectionEnd},to:{start:r,end:t}}};function Pde(e,t,r){return Math.min(Math.max(e,t),r)}function SR(e){return Math.max(e.selectionStart,e.selectionEnd)}function Dde(){return typeof navigator<"u"&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Rde(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Tde(e){var t=e.currentValue,r=e.formattedValue,n=e.currentValueIndex,o=e.formattedValueIndex;return t[n]===r[o]}function Ede(e,t,r,n,o,i,a){a===void 0&&(a=Tde);var s=o.findIndex(function(I){return I}),l=e.slice(0,s);!t&&!r.startsWith(l)&&(t=l,r=l+r,n=n+l.length);for(var c=r.length,d=e.length,u={},f=new Array(c),m=0;m<c;m++){f[m]=-1;for(var p=0,g=d;p<g;p++){var y=a({currentValue:r,lastValue:t,formattedValue:e,currentValueIndex:m,formattedValueIndex:p});if(y&&u[p]!==!0){f[m]=p,u[p]=!0;break}}}for(var v=n;v<c&&(f[v]===-1||!i(r[v]));)v++;var x=v===c||f[v]===-1?d:f[v];for(v=n-1;v>0&&f[v]===-1;)v--;var _=v===-1||f[v]===-1?0:f[v]+1;return _>x?x:n-_<x-n?_:x}function lW(e,t,r,n){var o=e.length;if(t=Pde(t,0,o),n==="left"){for(;t>=0&&!r[t];)t--;t===-1&&(t=r.indexOf(!0))}else{for(;t<=o&&!r[t];)t++;t>o&&(t=r.lastIndexOf(!0))}return t===-1&&(t=o),t}function $de(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),r=0,n=t.length;r<n;r++)t[r]=!!(Tv(e[r])||Tv(e[r-1]));return t}function gW(e,t,r,n,o,i){i===void 0&&(i=pc);var a=iW(function(p,g){var y,v;return uW(p)?(v="",y=""):typeof p=="number"||g?(v=typeof p=="number"?pW(p):p,y=n(v)):(v=o(p,void 0),y=n(v)),{formattedValue:y,numAsString:v}}),s=(0,jt.useState)(function(){return a(hc(e)?t:e,r)}),l=s[0],c=s[1],d=iW(function(p,g){p.formattedValue!==l.formattedValue&&c({formattedValue:p.formattedValue,numAsString:p.value}),i(p,g)}),u=e,f=r;hc(e)&&(u=l.numAsString,f=!0);var m=a(u,f);return(0,jt.useMemo)(function(){c(m)},[m.formattedValue]),(0,jt.useEffect)(function(){if(!hc(t)&&hc(e)&&l.formattedValue!==""){var p=parseFloat(l.numAsString);d({formattedValue:l.formattedValue,value:l.numAsString,floatValue:isNaN(p)?void 0:p},{event:void 0,source:Hm.props})}},[]),[l,d]}function Ade(e){return e.replace(/[^0-9]/g,"")}function Ode(e){return e}function zde(e){var t=e.type;t===void 0&&(t="text");var r=e.displayType;r===void 0&&(r="input");var n=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format;a===void 0&&(a=Ode);var s=e.removeFormatting;s===void 0&&(s=Ade);var l=e.defaultValue,c=e.valueIsNumericString,d=e.onValueChange,u=e.isAllowed,f=e.onChange;f===void 0&&(f=pc);var m=e.onKeyDown;m===void 0&&(m=pc);var p=e.onMouseUp;p===void 0&&(p=pc);var g=e.onFocus;g===void 0&&(g=pc);var y=e.onBlur;y===void 0&&(y=pc);var v=e.value,x=e.getCaretBoundary;x===void 0&&(x=$de);var _=e.isValidInputCharacter;_===void 0&&(_=Tv);var I=e.isCharacterSame,S=dW(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),w=gW(v,l,!!c,a,s,d),P=w[0],$=P.formattedValue,B=P.numAsString,W=w[1],H=(0,jt.useRef)(),K=(0,jt.useRef)({formattedValue:$,numAsString:B}),T=function(he,fe){K.current={formattedValue:he.formattedValue,numAsString:he.value},W(he,fe)},k=(0,jt.useState)(!1),E=k[0],C=k[1],A=(0,jt.useRef)(null),R=(0,jt.useRef)({setCaretTimeout:null,focusTimeout:null});(0,jt.useEffect)(function(){return C(!0),function(){clearTimeout(R.current.setCaretTimeout),clearTimeout(R.current.focusTimeout)}},[]);var N=a,U=function(he,fe){var Se=parseFloat(fe);return{formattedValue:he,value:fe,floatValue:isNaN(Se)?void 0:Se}},G=function(he,fe,Se){he.selectionStart===0&&he.selectionEnd===he.value.length||(su(he,fe),R.current.setCaretTimeout=setTimeout(function(){he.value===Se&&he.selectionStart!==fe&&su(he,fe)},0))},oe=function(he,fe,Se){return lW(he,fe,x(he),Se)},ve=function(he,fe,Se){var ze=x(fe),Ye=Ede(fe,$,he,Se,ze,_,I);return Ye=lW(fe,Ye,ze),Ye},pe=function(he){var fe=he.formattedValue;fe===void 0&&(fe="");var Se=he.input,ze=he.source,Ye=he.event,Me=he.numAsString,tt;if(Se){var ue=he.inputValue||Se.value,Te=SR(Se);Se.value=fe,tt=ve(ue,fe,Te),tt!==void 0&&G(Se,tt,fe)}fe!==$&&T(U(fe,Me),{event:Ye,source:ze})};(0,jt.useEffect)(function(){var he=K.current,fe=he.formattedValue,Se=he.numAsString;($!==fe||B!==Se)&&T(U($,B),{event:void 0,source:Hm.props})},[$,B]);var Y=A.current?SR(A.current):void 0,ne=typeof window<"u"?jt.useLayoutEffect:jt.useEffect;ne(function(){var he=A.current;if($!==K.current.formattedValue&&he){var fe=ve(K.current.formattedValue,$,Y);he.value=$,G(he,fe,$)}},[$]);var we=function(he,fe,Se){var ze=fe.target,Ye=H.current?Cde(H.current,ze.selectionEnd):hW($,he),Me=Object.assign(Object.assign({},Ye),{lastValue:$}),tt=s(he,Me),ue=N(tt);if(tt=s(ue,void 0),u&&!u(U(ue,tt))){var Te=fe.target,br=SR(Te),gn=ve(he,$,br);return Te.value=$,G(Te,gn,$),!1}return pe({formattedValue:ue,numAsString:tt,inputValue:he,event:fe,source:Se,input:fe.target}),!0},se=function(he,fe){fe===void 0&&(fe=0);var Se=he.selectionStart,ze=he.selectionEnd;H.current={selectionStart:Se,selectionEnd:ze+fe}},Ae=function(he){var fe=he.target,Se=fe.value,ze=we(Se,he,Hm.event);ze&&f(he),H.current=void 0},He=function(he){var fe=he.target,Se=he.key,ze=fe.selectionStart,Ye=fe.selectionEnd,Me=fe.value;Me===void 0&&(Me="");var tt;Se==="ArrowLeft"||Se==="Backspace"?tt=Math.max(ze-1,0):Se==="ArrowRight"?tt=Math.min(ze+1,Me.length):Se==="Delete"&&(tt=ze);var ue=0;Se==="Delete"&&ze===Ye&&(ue=1);var Te=Se==="ArrowLeft"||Se==="ArrowRight";if(tt===void 0||ze!==Ye&&!Te){m(he),se(fe,ue);return}var br=tt;if(Te){var gn=Se==="ArrowLeft"?"left":"right";br=oe(Me,tt,gn),br!==tt&&he.preventDefault()}else Se==="Delete"&&!_(Me[tt])?br=oe(Me,tt,"right"):Se==="Backspace"&&!_(Me[tt])&&(br=oe(Me,tt,"left"));br!==tt&&G(fe,br,Me),m(he),se(fe,ue)},et=function(he){var fe=he.target,Se=function(){var ze=fe.selectionStart,Ye=fe.selectionEnd,Me=fe.value;if(Me===void 0&&(Me=""),ze===Ye){var tt=oe(Me,ze);tt!==ze&&G(fe,tt,Me)}};Se(),requestAnimationFrame(function(){Se()}),p(he),se(fe)},dt=function(he){he.persist&&he.persist();var fe=he.target,Se=he.currentTarget;A.current=fe,R.current.focusTimeout=setTimeout(function(){var ze=fe.selectionStart,Ye=fe.selectionEnd,Me=fe.value;Me===void 0&&(Me="");var tt=oe(Me,ze);tt!==ze&&!(ze===0&&Ye===Me.length)&&G(fe,tt,Me),g(Object.assign(Object.assign({},he),{currentTarget:Se}))},0)},Fe=function(he){A.current=null,clearTimeout(R.current.focusTimeout),clearTimeout(R.current.setCaretTimeout),y(he)},Jt=E&&Dde()?"numeric":void 0,er=Object.assign({inputMode:Jt},S,{type:t,value:$,onChange:Ae,onKeyDown:He,onMouseUp:et,onFocus:dt,onBlur:Fe});if(r==="text")return o?jt.default.createElement(jt.default.Fragment,null,o($,S)||null):jt.default.createElement("span",Object.assign({},S,{ref:i}),$);if(n){var co=n;return jt.default.createElement(co,Object.assign({},er,{ref:i}))}return jt.default.createElement("input",Object.assign({},er,{ref:i}))}function cW(e,t){var r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix;o===void 0&&(o="");var i=t.suffix;i===void 0&&(i="");var a=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s="thousand"),e===""||e==="-")return e;var l=JI(t),c=l.thousandSeparator,d=l.decimalSeparator,u=r!==0&&e.indexOf(".")!==-1||r&&n,f=kR(e,a),m=f.beforeDecimal,p=f.afterDecimal,g=f.addNegation;return r!==void 0&&(p=mW(p,r,!!n)),c&&(m=Sde(m,c,s)),o&&(m=o+m),i&&(p=p+i),g&&(m="-"+m),e=m+(u&&d||"")+p,e}function JI(e){var t=e.decimalSeparator;t===void 0&&(t=".");var r=e.thousandSeparator,n=e.allowedDecimalSeparators;return r===!0&&(r=","),n||(n=[t,"."]),{decimalSeparator:t,thousandSeparator:r,allowedDecimalSeparators:n}}function Nde(e,t){e===void 0&&(e="");var r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}function Fde(e,t){return new RegExp("(^-)|[0-9]|"+fW(e),t?"g":void 0)}function Lde(e,t,r){return e===""?!0:!t?.match(/\d/)&&!r?.match(/\d/)&&typeof e=="string"&&!isNaN(Number(e))}function Mde(e,t,r){var n;t===void 0&&(t=Rde(e));var o=r.allowNegative,i=r.prefix;i===void 0&&(i="");var a=r.suffix;a===void 0&&(a="");var s=r.decimalScale,l=t.from,c=t.to,d=c.start,u=c.end,f=JI(r),m=f.allowedDecimalSeparators,p=f.decimalSeparator,g=e[u]===p;if(Tv(e)&&(e===i||e===a)&&t.lastValue==="")return e;if(u-d===1&&m.indexOf(e[d])!==-1){var y=s===0?"":p;e=e.substring(0,d)+y+e.substring(d+1,e.length)}var v=function(A,R,N){var U=!1,G=!1;i.startsWith("-")?U=!1:A.startsWith("--")?(U=!1,G=!0):a.startsWith("-")&&A.length===a.length?U=!1:A[0]==="-"&&(U=!0);var oe=U?1:0;return G&&(oe=2),oe&&(A=A.substring(oe),R-=oe,N-=oe),{value:A,start:R,end:N,hasNegation:U}},x=v(e,d,u),_=x.hasNegation;n=x,e=n.value,d=n.start,u=n.end;var I=v(t.lastValue,l.start,l.end),S=I.start,w=I.end,P=I.value,$=e.substring(d,u);e.length&&P.length&&(S>P.length-a.length||w<i.length)&&!($&&a.startsWith($))&&(e=P);var B=0;e.startsWith(i)?B+=i.length:d<i.length&&(B=d),e=e.substring(B),u-=B;var W=e.length,H=e.length-a.length;e.endsWith(a)?W=H:(u>H||u>e.length-a.length)&&(W=u),e=e.substring(0,W),e=Nde(_?"-"+e:e,o),e=(e.match(Fde(p,!0))||[]).join("");var K=e.indexOf(p);e=e.replace(new RegExp(fW(p),"g"),function(A,R){return R===K?".":""});var T=kR(e,o),k=T.beforeDecimal,E=T.afterDecimal,C=T.addNegation;return c.end-c.start<l.end-l.start&&k===""&&g&&!parseFloat(E)&&(e=C?"-":""),e}function Bde(e,t){var r=t.prefix;r===void 0&&(r="");var n=t.suffix;n===void 0&&(n="");var o=Array.from({length:e.length+1}).map(function(){return!0}),i=e[0]==="-";o.fill(!1,0,Math.min(r.length+(i?1:0),e.length));var a=e.length;return o.fill(!1,a-n.length+1,a+1),o}function jde(e){var t=JI(e),r=t.thousandSeparator,n=t.decimalSeparator,o=e.prefix;o===void 0&&(o="");var i=e.allowNegative;if(i===void 0&&(i=!0),r===n)throw new Error(`
52
+ Decimal separator can't be same as thousand separator.
53
+ thousandSeparator: `+r+` (thousandSeparator = {true} is same as thousandSeparator = ",")
54
+ decimalSeparator: `+n+` (default value for decimalSeparator is .)
55
+ `);return o.startsWith("-")&&i&&(console.error(`
56
+ Prefix can't start with '-' when allowNegative is true.
57
+ prefix: `+o+`
58
+ allowNegative: `+i+`
59
+ `),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}function Ude(e){e=jde(e);var t=e.decimalSeparator,r=e.allowedDecimalSeparators,n=e.thousandsGroupStyle,o=e.suffix,i=e.allowNegative,a=e.allowLeadingZeros,s=e.onKeyDown;s===void 0&&(s=pc);var l=e.onBlur;l===void 0&&(l=pc);var c=e.thousandSeparator,d=e.decimalScale,u=e.fixedDecimalScale,f=e.prefix;f===void 0&&(f="");var m=e.defaultValue,p=e.value,g=e.valueIsNumericString,y=e.onValueChange,v=dW(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),x=JI(e),_=x.decimalSeparator,I=x.allowedDecimalSeparators,S=function(N){return cW(N,e)},w=function(N,U){return Mde(N,U,e)},P=hc(p)?m:p,$=g??Lde(P,f,o);hc(p)?hc(m)||($=$||typeof m=="number"):$=$||typeof p=="number";var B=function(N){return uW(N)?N:(typeof N=="number"&&(N=pW(N)),$&&typeof d=="number"?sW(N,d,!!u):N)},W=gW(B(p),B(m),!!$,S,w,y),H=W[0],K=H.numAsString,T=H.formattedValue,k=W[1],E=function(N){var U=N.target,G=N.key,oe=U.selectionStart,ve=U.selectionEnd,pe=U.value;if(pe===void 0&&(pe=""),(G==="Backspace"||G==="Delete")&&ve<f.length&&pe!=="-"){N.preventDefault();return}if(oe!==ve){s(N);return}G==="Backspace"&&pe[0]==="-"&&oe===f.length+1&&i&&su(U,1),d&&u&&(G==="Backspace"&&pe[oe-1]===_?(su(U,oe-1),N.preventDefault()):G==="Delete"&&pe[oe]===_&&N.preventDefault()),I?.includes(G)&&pe[oe]===_&&su(U,oe+1);var Y=c===!0?",":c;G==="Backspace"&&pe[oe-1]===Y&&su(U,oe-1),G==="Delete"&&pe[oe]===Y&&su(U,oe+1),s(N)},C=function(N){var U=K;if(U.match(/\d/g)||(U=""),a||(U=kde(U)),u&&d&&(U=sW(U,d,u)),U!==K){var G=cW(U,e);k({formattedValue:G,value:U,floatValue:parseFloat(U)},{event:N,source:Hm.event})}l(N)},A=function(N){return N===_?!0:Tv(N)},R=function(N){var U=N.currentValue,G=N.lastValue,oe=N.formattedValue,ve=N.currentValueIndex,pe=N.formattedValueIndex,Y=U[ve],ne=oe[pe],we=hW(G,U),se=we.to,Ae=function(He){return w(He).indexOf(".")+f.length};return p===0&&u&&d&&U[se.start]===_&&Ae(U)<ve&&Ae(oe)>pe?!1:ve>=se.start&&ve<se.end&&I&&I.includes(Y)&&ne===_?!0:Y===ne};return Object.assign(Object.assign({},v),{value:T,valueIsNumericString:!1,isValidInputCharacter:A,isCharacterSame:R,onValueChange:k,format:S,removeFormatting:w,getCaretBoundary:function(N){return Bde(N,e)},onKeyDown:E,onBlur:C})}function vW(e){var t=Ude(e);return jt.default.createElement(zde,Object.assign({},t))}var gc=b(O(),1),Wm=b(D(),1);var CR=b(O(),1);function PR({direction:e,style:t,...r}){return(0,CR.jsx)("svg",{style:{width:"var(--ni-chevron-size)",height:"var(--ni-chevron-size)",transform:e==="up"?"rotate(180deg)":void 0,...t},viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:(0,CR.jsx)("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}var ew={root:"m_e2f5cd4e",controls:"m_95e17d22",control:"m_80b4b171"};var Vde=/^(0\.0*|-0(\.0*)?)$/,Hde=/^-?0\d+(\.\d+)?\.?$/;function RR(e){return typeof e=="string"&&e!==""&&!Number.isNaN(Number(e))}function DR(e){return typeof e=="number"?e<Number.MAX_SAFE_INTEGER:e===""||RR(e)&&Number(e)<Number.MAX_SAFE_INTEGER}function Wde(e){return e.toString().replace(".","").length}function Zde(e,t){return(typeof e=="number"?e<Number.MAX_SAFE_INTEGER:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&Wde(t)<14&&t!==""}function xW(e,t,r){if(e===void 0)return!0;let n=t===void 0||e>=t,o=r===void 0||e<=r;return n&&o}var Gde={step:1,clampBehavior:"blur",allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0},qde=(e,{size:t})=>({controls:{"--ni-chevron-size":xe(t,"ni-chevron-size")}});function Kde(e,t,r){let n=e.toString().replace(/^0+/,""),o=parseFloat(n);return Number.isNaN(o)?n:o>Number.MAX_SAFE_INTEGER?t!==void 0?String(t):n:Rl(o,r,t)}var lu=M((e,t)=>{let r=z("NumberInput",Gde,e),{className:n,classNames:o,styles:i,unstyled:a,vars:s,onChange:l,onValueChange:c,value:d,defaultValue:u,max:f,min:m,step:p,hideControls:g,rightSection:y,isAllowed:v,clampBehavior:x,onBlur:_,allowDecimal:I,decimalScale:S,onKeyDown:w,onKeyDownCapture:P,handlersRef:$,startValue:B,disabled:W,rightSectionPointerEvents:H,allowNegative:K,readOnly:T,size:k,rightSectionWidth:E,stepHoldInterval:C,stepHoldDelay:A,allowLeadingZeros:R,withKeyboardEvents:N,trimLeadingZeroesOnBlur:U,...G}=r,oe=Q({name:"NumberInput",classes:ew,props:r,classNames:o,styles:i,unstyled:a,vars:s,varsResolver:qde}),{resolvedClassNames:ve,resolvedStyles:pe}=Zr({classNames:o,styles:i,props:r}),[Y,ne]=ot({value:d,defaultValue:u,finalValue:"",onChange:l}),we=A!==void 0&&C!==void 0,se=(0,Wm.useRef)(null),Ae=(0,Wm.useRef)(null),He=(0,Wm.useRef)(0),et=(ue,Te)=>{Te.source==="event"&&ne(Zde(ue.floatValue,ue.value)&&!Vde.test(ue.value)&&!(R&&Hde.test(ue.value))?ue.floatValue:ue.value),c?.(ue,Te)},dt=ue=>{let Te=String(ue).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Te?Math.max(0,(Te[1]?Te[1].length:0)-(Te[2]?+Te[2]:0)):0},Fe=ue=>{se.current&&typeof ue<"u"&&se.current.setSelectionRange(ue,ue)},Jt=(0,Wm.useRef)(hd);Jt.current=()=>{if(!DR(Y))return;let ue,Te=dt(Y),br=dt(p),gn=Math.max(Te,br),Mo=10**gn;if(!RR(Y)&&(typeof Y!="number"||Number.isNaN(Y)))ue=Rl(B,m,f);else if(f!==void 0){let Pr=(Math.round(Number(Y)*Mo)+Math.round(p*Mo))/Mo;ue=Pr<=f?Pr:f}else ue=(Math.round(Number(Y)*Mo)+Math.round(p*Mo))/Mo;let Wt=ue.toFixed(gn);ne(parseFloat(Wt)),c?.({floatValue:parseFloat(Wt),formattedValue:Wt,value:Wt},{source:"increment"}),setTimeout(()=>Fe(se.current?.value.length),0)};let er=(0,Wm.useRef)(hd);er.current=()=>{if(!DR(Y))return;let ue,Te=m!==void 0?m:K?Number.MIN_SAFE_INTEGER:0,br=dt(Y),gn=dt(p),Mo=Math.max(br,gn),Wt=10**Mo;if(!RR(Y)&&typeof Y!="number"||Number.isNaN(Y))ue=Rl(B,Te,f);else{let _s=(Math.round(Number(Y)*Wt)-Math.round(p*Wt))/Wt;ue=Te!==void 0&&_s<Te?Te:_s}let Pr=ue.toFixed(Mo);ne(parseFloat(Pr)),c?.({floatValue:parseFloat(Pr),formattedValue:Pr,value:Pr},{source:"decrement"}),setTimeout(()=>Fe(se.current?.value.length),0)};let co=ue=>{w?.(ue),!(T||!N)&&(ue.key==="ArrowUp"&&(ue.preventDefault(),Jt.current()),ue.key==="ArrowDown"&&(ue.preventDefault(),er.current()))},he=ue=>{if(P?.(ue),ue.key==="Backspace"){let Te=se.current;Te.selectionStart===0&&Te.selectionStart===Te.selectionEnd&&(ue.preventDefault(),window.setTimeout(()=>Fe(0),0))}},fe=ue=>{let Te=Y;x==="blur"&&typeof Te=="number"&&(Te=Rl(Te,m,f)),U&&typeof Te=="string"&&dt(Te)<15&&(Te=Kde(Te,f,m)),Y!==Te&&ne(Te),_?.(ue)};bd($,{increment:Jt.current,decrement:er.current});let Se=ue=>{ue?Jt.current():er.current(),He.current+=1},ze=ue=>{if(Se(ue),we){let Te=typeof C=="number"?C:C(He.current);Ae.current=window.setTimeout(()=>ze(ue),Te)}},Ye=(ue,Te)=>{ue.preventDefault(),se.current?.focus(),Se(Te),we&&(Ae.current=window.setTimeout(()=>ze(Te),A))},Me=()=>{Ae.current&&window.clearTimeout(Ae.current),Ae.current=null,He.current=0},tt=(0,gc.jsxs)("div",{...oe("controls"),children:[(0,gc.jsx)(It,{...oe("control"),tabIndex:-1,"aria-hidden":!0,disabled:W||typeof Y=="number"&&f!==void 0&&Y>=f,mod:{direction:"up"},onMouseDown:ue=>ue.preventDefault(),onPointerDown:ue=>{Ye(ue,!0)},onPointerUp:Me,onPointerLeave:Me,children:(0,gc.jsx)(PR,{direction:"up"})}),(0,gc.jsx)(It,{...oe("control"),tabIndex:-1,"aria-hidden":!0,disabled:W||typeof Y=="number"&&m!==void 0&&Y<=m,mod:{direction:"down"},onMouseDown:ue=>ue.preventDefault(),onPointerDown:ue=>{Ye(ue,!1)},onPointerUp:Me,onPointerLeave:Me,children:(0,gc.jsx)(PR,{direction:"down"})})]});return(0,gc.jsx)(rr,{component:vW,allowNegative:K,className:Ke(ew.root,n),size:k,...G,readOnly:T,disabled:W,value:Y,getInputRef:We(t,se),onValueChange:et,rightSection:g||T||!DR(Y)?y:y||tt,classNames:ve,styles:pe,unstyled:a,__staticSelector:"NumberInput",decimalScale:I?S:0,onKeyDown:co,onKeyDownCapture:he,rightSectionPointerEvents:H??(W?"none":void 0),rightSectionWidth:E??`var(--ni-right-section-width-${k||"sm"})`,allowLeadingZeros:R,onBlur:fe,isAllowed:ue=>x==="strict"?v?v(ue)&&xW(ue.floatValue,m,f):xW(ue.floatValue,m,f):v?v(ue):!0})});lu.classes={...rr.classes,...ew};lu.displayName="@mantine/core/NumberInput";var Zm=b(O(),1);var IJe=b(D(),1);var TR=b(O(),1),bW=({reveal:e})=>(0,TR.jsx)("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"var(--psi-icon-size)",height:"var(--psi-icon-size)"},children:(0,TR.jsx)("path",{d:e?"M13.3536 2.35355C13.5488 2.15829 13.5488 1.84171 13.3536 1.64645C13.1583 1.45118 12.8417 1.45118 12.6464 1.64645L10.6828 3.61012C9.70652 3.21671 8.63759 3 7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C0.902945 9.08812 2.02314 10.1861 3.36061 10.9323L1.64645 12.6464C1.45118 12.8417 1.45118 13.1583 1.64645 13.3536C1.84171 13.5488 2.15829 13.5488 2.35355 13.3536L4.31723 11.3899C5.29348 11.7833 6.36241 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C14.0971 5.9119 12.9769 4.81391 11.6394 4.06771L13.3536 2.35355ZM9.90428 4.38861C9.15332 4.1361 8.34759 4 7.5 4C4.80285 4 2.52952 5.37816 1.09622 7.50001C1.87284 8.6497 2.89609 9.58106 4.09974 10.1931L9.90428 4.38861ZM5.09572 10.6114L10.9003 4.80685C12.1039 5.41894 13.1272 6.35031 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11C6.65241 11 5.84668 10.8639 5.09572 10.6114Z":"M7.5 11C4.80285 11 2.52952 9.62184 1.09622 7.50001C2.52952 5.37816 4.80285 4 7.5 4C10.1971 4 12.4705 5.37816 13.9038 7.50001C12.4705 9.62183 10.1971 11 7.5 11ZM7.5 3C4.30786 3 1.65639 4.70638 0.0760002 7.23501C-0.0253338 7.39715 -0.0253334 7.60288 0.0760014 7.76501C1.65639 10.2936 4.30786 12 7.5 12C10.6921 12 13.3436 10.2936 14.924 7.76501C15.0253 7.60288 15.0253 7.39715 14.924 7.23501C13.3436 4.70638 10.6921 3 7.5 3ZM7.5 9.5C8.60457 9.5 9.5 8.60457 9.5 7.5C9.5 6.39543 8.60457 5.5 7.5 5.5C6.39543 5.5 5.5 6.39543 5.5 7.5C5.5 8.60457 6.39543 9.5 7.5 9.5Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})});var tw={root:"m_f61ca620",input:"m_ccf8da4c",innerInput:"m_f2d85dd2",visibilityToggle:"m_b1072d44"};var Xde={visibilityToggleIcon:bW},Qde=(e,{size:t})=>({root:{"--psi-icon-size":xe(t,"psi-icon-size"),"--psi-button-size":xe(t,"psi-button-size")}}),vc=M((e,t)=>{let r=z("PasswordInput",Xde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,required:c,error:d,leftSection:u,disabled:f,id:m,variant:p,inputContainer:g,description:y,label:v,size:x,errorProps:_,descriptionProps:I,labelProps:S,withAsterisk:w,inputWrapperOrder:P,wrapperProps:$,radius:B,rightSection:W,rightSectionWidth:H,rightSectionPointerEvents:K,leftSectionWidth:T,visible:k,defaultVisible:E,onVisibilityChange:C,visibilityToggleIcon:A,visibilityToggleButtonProps:R,rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withErrorStyles:oe,mod:ve,...pe}=r,Y=bt(m),[ne,we]=ot({value:k,defaultValue:E,finalValue:!1,onChange:C}),se=()=>we(!ne),Ae=Q({name:"PasswordInput",classes:tw,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Qde}),{resolvedClassNames:He,resolvedStyles:et}=Zr({classNames:n,styles:a,props:r}),{styleProps:dt,rest:Fe}=Gr(pe),Jt=A,er=_?.id||`${Y}-error`,co=I?.id||`${Y}-description`,Se=`${!!d&&typeof d!="boolean"?er:""} ${!!y?co:""}`,ze=Se.trim().length>0?Se.trim():void 0,Ye=(0,Zm.jsx)(xt,{...Ae("visibilityToggle"),disabled:f,radius:B,"aria-hidden":!R,tabIndex:-1,...R,variant:R?.variant??"subtle",color:"gray",unstyled:s,onTouchEnd:Me=>{Me.preventDefault(),R?.onTouchEnd?.(Me),se()},onMouseDown:Me=>{Me.preventDefault(),R?.onMouseDown?.(Me),se()},onKeyDown:Me=>{R?.onKeyDown?.(Me),Me.key===" "&&(Me.preventDefault(),se())},children:(0,Zm.jsx)(Jt,{reveal:ne})});return(0,Zm.jsx)(mt.Wrapper,{required:c,id:Y,label:v,error:d,description:y,size:x,classNames:He,styles:et,__staticSelector:"PasswordInput",unstyled:s,withAsterisk:w,inputWrapperOrder:P,inputContainer:g,variant:p,labelProps:{...S,htmlFor:Y},descriptionProps:{...I,id:co},errorProps:{..._,id:er},mod:ve,...Ae("root"),...dt,...$,children:(0,Zm.jsx)(mt,{component:"div",error:d,leftSection:u,size:x,classNames:{...He,input:Ke(tw.input,He.input)},styles:et,radius:B,disabled:f,__staticSelector:"PasswordInput",rightSectionWidth:H,rightSection:W??Ye,variant:p,unstyled:s,leftSectionWidth:T,rightSectionPointerEvents:K||"all",rightSectionProps:N,leftSectionProps:U,leftSectionPointerEvents:G,withAria:!1,withErrorStyles:oe,children:(0,Zm.jsx)("input",{required:c,"data-invalid":!!d||void 0,"data-with-left-section":!!u||void 0,...Ae("innerInput"),disabled:f,id:Y,ref:t,...Fe,"aria-describedby":ze,autoComplete:Fe.autoComplete||"off",type:ne?"text":"password"})})})});vc.classes={...rr.classes,...tw};vc.displayName="@mantine/core/PasswordInput";var $R=b(O(),1),xet=b(D(),1);var _W=b(O(),1),jJe=b(D(),1);var zJe=b(D(),1);var FJe=b(O(),1);var[yW,rw]=Gt("Progress.Root component was not found in tree");var qs={root:"m_db6d6462",section:"m_2242eb65","stripes-animation":"m_81a374bd",label:"m_91e40b74"};var Yde={},ow=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,...s}=z("ProgressLabel",Yde,e),l=rw();return(0,_W.jsx)(F,{ref:t,...l.getStyles("label",{className:n,style:o,classNames:r,styles:i}),...s})});ow.classes=qs;ow.displayName="@mantine/core/ProgressLabel";var ER=b(O(),1),KJe=b(D(),1);var Jde={},eue=(e,{size:t,radius:r,transitionDuration:n})=>({root:{"--progress-size":xe(t,"progress-size"),"--progress-radius":r===void 0?void 0:Ee(r),"--progress-transition-duration":typeof n=="number"?`${n}ms`:void 0}}),Ev=M((e,t)=>{let r=z("ProgressRoot",Jde,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,transitionDuration:d,...u}=r,f=Q({name:"Progress",classes:qs,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:eue});return(0,ER.jsx)(yW,{value:{getStyles:f,autoContrast:c},children:(0,ER.jsx)(F,{ref:t,...f("root"),...u})})});Ev.classes=qs;Ev.displayName="@mantine/core/ProgressRoot";var IW=b(O(),1),iet=b(D(),1);var tue={withAria:!0},$v=M((e,t)=>{let{classNames:r,className:n,style:o,styles:i,vars:a,value:s,withAria:l,color:c,striped:d,animated:u,mod:f,...m}=z("ProgressSection",tue,e),p=rw(),g=ft(),y=l?{role:"progressbar","aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":s,"aria-valuetext":`${s}%`}:{};return(0,IW.jsx)(F,{ref:t,...p.getStyles("section",{className:n,classNames:r,styles:i,style:o}),...m,...y,mod:[{striped:d||u,animated:u},f],__vars:{"--progress-section-width":`${s}%`,"--progress-section-color":Ze(c,g),"--progress-label-color":ka(p.autoContrast,g)?Bn({color:c,theme:g,autoContrast:p.autoContrast}):void 0}})});$v.classes=qs;$v.displayName="@mantine/core/ProgressSection";var rue={},xc=M((e,t)=>{let r=z("Progress",rue,e),{value:n,classNames:o,styles:i,vars:a,color:s,striped:l,animated:c,"aria-label":d,...u}=r,{resolvedClassNames:f,resolvedStyles:m}=Zr({classNames:o,styles:i,props:r});return(0,$R.jsx)(Ev,{ref:t,classNames:f,styles:m,vars:a,...u,children:(0,$R.jsx)($v,{value:n,color:s,striped:l,animated:c,"aria-label":d})})});xc.classes=qs;xc.displayName="@mantine/core/Progress";xc.Section=$v;xc.Root=Ev;xc.Label=ow;var Gm=b(O(),1);var Rtt=b(D(),1);var OR=b(O(),1),Bet=b(D(),1);var Ret=b(D(),1),Tet=b(O(),1);var[wW,nw]=Co();var Oet=b(D(),1),zet=b(O(),1);var[SW,kW]=Co();var AR={card:"m_9dc8ae12"};var oue={withBorder:!0},nue=(e,{radius:t})=>({card:{"--card-radius":Ee(t)}}),iw=M((e,t)=>{let r=z("RadioCard",oue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,checked:c,mod:d,withBorder:u,value:f,onClick:m,name:p,onKeyDown:g,...y}=r,v=Q({name:"RadioCard",classes:AR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:nue,rootSelector:"card"}),{dir:x}=si(),_=nw(),I=typeof c=="boolean"?c:_?.value===f||!1,S=p||_?.name,w=P=>{if(g?.(P),["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(P.nativeEvent.code)){P.preventDefault();let $=Array.from(document.querySelectorAll(`[role="radio"][name="${S||"__mantine"}"]`)),B=$.findIndex(K=>K===P.target),W=B+1>=$.length?0:B+1,H=B-1<0?$.length-1:B-1;P.nativeEvent.code==="ArrowDown"&&($[W].focus(),$[W].click()),P.nativeEvent.code==="ArrowUp"&&($[H].focus(),$[H].click()),P.nativeEvent.code==="ArrowLeft"&&($[x==="ltr"?H:W].focus(),$[x==="ltr"?H:W].click()),P.nativeEvent.code==="ArrowRight"&&($[x==="ltr"?W:H].focus(),$[x==="ltr"?W:H].click())}};return(0,OR.jsx)(SW,{value:{checked:I},children:(0,OR.jsx)(It,{ref:t,mod:[{"with-border":u,checked:I},d],...v("card"),...y,role:"radio","aria-checked":I,name:S,onClick:P=>{m?.(P),_?.onChange(f||"")},onKeyDown:w})})});iw.displayName="@mantine/core/RadioCard";iw.classes=AR;var aw=b(O(),1);var Jet=b(D(),1);var iue={},sw=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,name:l,readOnly:c,...d}=z("RadioGroup",iue,e),u=bt(l),[f,m]=ot({value:r,defaultValue:n,finalValue:"",onChange:o});return(0,aw.jsx)(wW,{value:{value:f,onChange:g=>!c&&m(typeof g=="string"?g:g.currentTarget.value),size:i,name:u},children:(0,aw.jsx)(mt.Wrapper,{size:i,ref:t,...a,...d,labelElement:"div",__staticSelector:"RadioGroup",children:(0,aw.jsx)(Am,{role:"radiogroup",children:s})})})});sw.classes=mt.Wrapper.classes;sw.displayName="@mantine/core/RadioGroup";var zR=b(O(),1);var ltt=b(D(),1);function lw({size:e,style:t,...r}){return(0,zR.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 5 5",style:{width:Z(e),height:Z(e),...t},"aria-hidden":!0,...r,children:(0,zR.jsx)("circle",{cx:"2.5",cy:"2.5",r:"2.5",fill:"currentColor"})})}var FR=b(O(),1),ftt=b(D(),1);var NR={indicator:"m_717d7ff6",icon:"m_3e4da632","indicator--outline":"m_2980836c"};var aue={icon:lw},sue=(e,{radius:t,color:r,size:n,iconColor:o,variant:i,autoContrast:a})=>{let s=_r({color:r||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{indicator:{"--radio-size":xe(n,"radio-size"),"--radio-radius":t===void 0?void 0:Ee(t),"--radio-color":i==="outline"?l:Ze(r,e),"--radio-icon-size":xe(n,"radio-icon-size"),"--radio-icon-color":o?Ze(o,e):ka(a,e)?Bn({color:r,theme:e,autoContrast:a}):void 0}}},cw=M((e,t)=>{let r=z("RadioIndicator",aue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,icon:c,radius:d,color:u,iconColor:f,autoContrast:m,checked:p,mod:g,variant:y,disabled:v,...x}=r,_=c,I=Q({name:"RadioIndicator",classes:NR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:sue,rootSelector:"indicator"}),S=kW(),w=typeof p=="boolean"?p:S?.checked||!1;return(0,FR.jsx)(F,{ref:t,...I("indicator",{variant:y}),variant:y,mod:[{checked:w,disabled:v},g],...x,children:(0,FR.jsx)(_,{...I("icon")})})});cw.displayName="@mantine/core/RadioIndicator";cw.classes=NR;var LR={root:"m_f3f1af94",inner:"m_89c4f5e4",icon:"m_f3ed6b2b",radio:"m_8a3dbb89","radio--outline":"m_1bfe9d39"};var lue={labelPosition:"right"},cue=(e,{size:t,radius:r,color:n,iconColor:o,variant:i,autoContrast:a})=>{let s=_r({color:n||e.primaryColor,theme:e}),l=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color;return{root:{"--radio-size":xe(t,"radio-size"),"--radio-radius":r===void 0?void 0:Ee(r),"--radio-color":i==="outline"?l:Ze(n,e),"--radio-icon-color":o?Ze(o,e):ka(a,e)?Bn({color:n,theme:e,autoContrast:a}):void 0,"--radio-icon-size":xe(t,"radio-icon-size")}}},Ks=M((e,t)=>{let r=z("Radio",lue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,id:c,size:d,label:u,labelPosition:f,description:m,error:p,radius:g,color:y,variant:v,disabled:x,wrapperProps:_,icon:I=lw,rootRef:S,iconColor:w,onChange:P,mod:$,...B}=r,W=Q({name:"Radio",classes:LR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:cue}),H=nw(),K=H?.size??d,T=r.size?d:K,{styleProps:k,rest:E}=Gr(B),C=bt(c),A=H?{checked:H.value===E.value,name:E.name??H.name,onChange:R=>{H.onChange(R),P?.(R)}}:{};return(0,Gm.jsx)(ru,{...W("root"),__staticSelector:"Radio",__stylesApiProps:r,id:C,size:T,labelPosition:f,label:u,description:m,error:p,disabled:x,classNames:n,styles:a,unstyled:s,"data-checked":A.checked||void 0,variant:v,ref:S,mod:$,...k,..._,children:(0,Gm.jsxs)(F,{...W("inner"),mod:{"label-position":f},children:[(0,Gm.jsx)(F,{...W("radio",{focusable:!0,variant:v}),onChange:P,...E,...A,component:"input",mod:{error:!!p},ref:t,id:C,disabled:x,type:"radio"}),(0,Gm.jsx)(I,{...W("icon"),"aria-hidden":!0})]})})});Ks.classes=LR;Ks.displayName="@mantine/core/Radio";Ks.Group=sw;Ks.Card=iw;Ks.Indicator=cw;var Xs=b(O(),1),pw=b(D(),1);var due={duration:100,transition:"fade"};function CW(e,t){return{...due,...t,...e}}var cu=b(O(),1),DW=b(D(),1);var bc=b(D(),1);function PW({offset:e,position:t,defaultOpened:r}){let[n,o]=(0,bc.useState)(r),i=(0,bc.useRef)(null),{x:a,y:s,elements:l,refs:c,update:d,placement:u}=vm({placement:t,middleware:[Zd({crossAxis:!0,padding:5,rootBoundary:"document"})]}),f=u.includes("right")?e:t.includes("left")?e*-1:0,m=u.includes("bottom")?e:t.includes("top")?e*-1:0,p=(0,bc.useCallback)(({clientX:g,clientY:y})=>{c.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:g,y,left:g+f,top:y+m,right:g,bottom:y}}})},[l.reference]);return(0,bc.useEffect)(()=>{if(c.floating.current){let g=i.current;g.addEventListener("mousemove",p);let y=Zo(c.floating.current);return y.forEach(v=>{v.addEventListener("scroll",d)}),()=>{g.removeEventListener("mousemove",p),y.forEach(v=>{v.removeEventListener("scroll",d)})}}},[l.reference,c.floating.current,d,p,n]),{handleMouseMove:p,x:a,y:s,opened:n,setOpened:o,boundaryRef:i,floating:c.setFloating}}var qm={tooltip:"m_1b3c8819",arrow:"m_f898399f"};var uue={refProp:"ref",withinPortal:!0,offset:10,defaultOpened:!1,position:"right",zIndex:Et("popover")},fue=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?Ze(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),dw=M((e,t)=>{let r=z("TooltipFloating",uue,e),{children:n,refProp:o,withinPortal:i,style:a,className:s,classNames:l,styles:c,unstyled:d,radius:u,color:f,label:m,offset:p,position:g,multiline:y,zIndex:v,disabled:x,defaultOpened:_,variant:I,vars:S,portalProps:w,...P}=r,$=ft(),B=Q({name:"TooltipFloating",props:r,classes:qm,className:s,style:a,classNames:l,styles:c,unstyled:d,rootSelector:"tooltip",vars:S,varsResolver:fue}),{handleMouseMove:W,x:H,y:K,opened:T,boundaryRef:k,floating:E,setOpened:C}=PW({offset:p,position:g,defaultOpened:_});if(!ko(n))throw new Error("[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");let A=We(k,El(n),t),R=n.props,N=G=>{R.onMouseEnter?.(G),W(G),C(!0)},U=G=>{R.onMouseLeave?.(G),C(!1)};return(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsx)(kn,{...w,withinPortal:i,children:(0,cu.jsx)(F,{...P,...B("tooltip",{style:{...rg(a,$),zIndex:v,display:!x&&T?"block":"none",top:(K&&Math.round(K))??"",left:(H&&Math.round(H))??""}}),variant:I,ref:E,mod:{multiline:y},children:m})}),(0,DW.cloneElement)(n,{...R,[o]:A,onMouseEnter:N,onMouseLeave:U})]})});dw.classes=qm;dw.displayName="@mantine/core/TooltipFloating";var MR=b(O(),1);var xrt=b(D(),1);var uw=b(D(),1),RW=(0,uw.createContext)(!1),TW=RW.Provider,EW=()=>(0,uw.useContext)(RW);var mue={openDelay:0,closeDelay:0};function fw(e){let{openDelay:t,closeDelay:r,children:n}=z("TooltipGroup",mue,e);return(0,MR.jsx)(TW,{value:!0,children:(0,MR.jsx)(Ej,{delay:{open:t,close:r},children:n})})}fw.displayName="@mantine/core/TooltipGroup";fw.extend=e=>e;var mw=b(D(),1);function pue(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function hue(e){let t=pue(e.middlewares),r=[hm(e.offset)];return t.shift&&r.push(Zd(typeof t.shift=="boolean"?{padding:8}:{padding:8,...t.shift})),t.flip&&r.push(typeof t.flip=="boolean"?Gd():Gd(t.flip)),r.push(rv({element:e.arrowRef,padding:e.arrowOffset})),t.inline?r.push(typeof t.inline=="boolean"?nc():nc(t.inline)):e.inline&&r.push(nc()),r}function $W(e){let[t,r]=(0,mw.useState)(e.defaultOpened),o=typeof e.opened=="boolean"?e.opened:t,i=EW(),a=bt(),s=(0,mw.useCallback)(w=>{r(w),w&&x(a)},[a]),{x:l,y:c,context:d,refs:u,update:f,placement:m,middlewareData:{arrow:{x:p,y:g}={}}}=vm({strategy:e.strategy,placement:e.position,open:o,onOpenChange:s,middleware:hue(e)}),{delay:y,currentId:v,setCurrentId:x}=$j(d,{id:a}),{getReferenceProps:_,getFloatingProps:I}=zj([Rj(d,{enabled:e.events?.hover,delay:i?y:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch}),Oj(d,{enabled:e.events?.focus,visibleOnly:!0}),Nj(d,{role:"tooltip"}),Aj(d,{enabled:typeof e.opened>"u"})]);Q0({opened:o,position:e.position,positionDependencies:e.positionDependencies,floating:{refs:u,update:f}}),yr(()=>{e.onPositionChange?.(m)},[m]);let S=o&&v&&v!==a;return{x:l,y:c,arrowX:p,arrowY:g,reference:u.setReference,floating:u.setFloating,getFloatingProps:I,getReferenceProps:_,isGroupPhase:S,opened:o,placement:m}}var AW={position:"top",refProp:"ref",withinPortal:!0,inline:!1,defaultOpened:!1,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:"side",offset:5,transitionProps:{duration:100,transition:"fade"},events:{hover:!0,focus:!1,touch:!1},zIndex:Et("popover"),positionDependencies:[],middlewares:{flip:!0,shift:!0,inline:!1}},gue=(e,{radius:t,color:r})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Ee(t),"--tooltip-bg":r?Ze(r,e):void 0,"--tooltip-color":r?"var(--mantine-color-white)":void 0}}),ht=M((e,t)=>{let r=z("Tooltip",AW,e),{children:n,position:o,refProp:i,label:a,openDelay:s,closeDelay:l,onPositionChange:c,opened:d,defaultOpened:u,withinPortal:f,radius:m,color:p,classNames:g,styles:y,unstyled:v,style:x,className:_,withArrow:I,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:$,offset:B,transitionProps:W,multiline:H,events:K,zIndex:T,disabled:k,positionDependencies:E,onClick:C,onMouseEnter:A,onMouseLeave:R,inline:N,variant:U,keepMounted:G,vars:oe,portalProps:ve,mod:pe,floatingStrategy:Y,middlewares:ne,...we}=z("Tooltip",AW,r),{dir:se}=si(),Ae=(0,pw.useRef)(null),He=$W({position:H0(se,o),closeDelay:l,openDelay:s,onPositionChange:c,opened:d,defaultOpened:u,events:K,arrowRef:Ae,arrowOffset:w,offset:typeof B=="number"?B+(I?S/2:0):B,positionDependencies:[...E,n],inline:N,strategy:Y,middlewares:ne}),et=Q({name:"Tooltip",props:r,classes:qm,className:_,style:x,classNames:g,styles:y,unstyled:v,rootSelector:"tooltip",vars:oe,varsResolver:gue});if(!ko(n))throw new Error("[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported");let dt=We(He.reference,El(n),t),Fe=CW(W,{duration:100,transition:"fade"}),Jt=n.props;return(0,Xs.jsxs)(Xs.Fragment,{children:[(0,Xs.jsx)(kn,{...ve,withinPortal:f,children:(0,Xs.jsx)(Go,{...Fe,keepMounted:G,mounted:!k&&!!He.opened,duration:He.isGroupPhase?10:Fe.duration,children:er=>(0,Xs.jsxs)(F,{...we,"data-fixed":Y==="fixed"||void 0,variant:U,mod:[{multiline:H},pe],...He.getFloatingProps({ref:He.floating,className:et("tooltip").className,style:{...et("tooltip").style,...er,zIndex:T,top:He.y??0,left:He.x??0}}),children:[a,(0,Xs.jsx)(iv,{ref:Ae,arrowX:He.arrowX,arrowY:He.arrowY,visible:I,position:He.placement,arrowSize:S,arrowOffset:w,arrowRadius:P,arrowPosition:$,...et("arrow")})]})})}),(0,pw.cloneElement)(n,He.getReferenceProps({onClick:C,onMouseEnter:A,onMouseLeave:R,onMouseMove:r.onMouseMove,onPointerDown:r.onPointerDown,onPointerEnter:r.onPointerEnter,className:Ke(_,Jt.className),...Jt,[i]:dt}))]})});ht.classes=qm;ht.displayName="@mantine/core/Tooltip";ht.Floating=dw;ht.Group=fw;var Av=b(O(),1),yc=b(D(),1);var BR={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};var vue={withItemsBorders:!0},xue=(e,{radius:t,color:r,transitionDuration:n,size:o,transitionTimingFunction:i})=>({root:{"--sc-radius":t===void 0?void 0:Ee(t),"--sc-color":r?Ze(r,e):void 0,"--sc-shadow":r?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":n===void 0?void 0:`${n}ms`,"--sc-transition-timing-function":i,"--sc-padding":xe(o,"sc-padding"),"--sc-font-size":Pt(o)}}),du=M((e,t)=>{let r=z("SegmentedControl",vue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,data:c,value:d,defaultValue:u,onChange:f,size:m,name:p,disabled:g,readOnly:y,fullWidth:v,orientation:x,radius:_,color:I,transitionDuration:S,transitionTimingFunction:w,variant:P,autoContrast:$,withItemsBorders:B,mod:W,...H}=r,K=Q({name:"SegmentedControl",props:r,classes:BR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:xue}),T=ft(),k=c.map(se=>typeof se=="string"?{label:se,value:se}:se),E=Q2(),[C,A]=(0,yc.useState)(Po()),[R,N]=(0,yc.useState)(null),[U,G]=(0,yc.useState)({}),oe=(se,Ae)=>{U[Ae]=se,G(U)},[ve,pe]=ot({value:d,defaultValue:u,finalValue:Array.isArray(c)?k.find(se=>!se.disabled)?.value??c[0]?.value??null:null,onChange:f}),Y=bt(p),ne=k.map(se=>(0,yc.createElement)(F,{...K("control"),mod:{active:ve===se.value,orientation:x},key:se.value},(0,yc.createElement)("input",{...K("input"),disabled:g||se.disabled,type:"radio",name:Y,value:se.value,id:`${Y}-${se.value}`,checked:ve===se.value,onChange:()=>!y&&pe(se.value),"data-focus-ring":T.focusRing,key:`${se.value}-input`}),(0,yc.createElement)(F,{component:"label",...K("label"),mod:{active:ve===se.value&&!(g||se.disabled),disabled:g||se.disabled,"read-only":y},htmlFor:`${Y}-${se.value}`,ref:Ae=>oe(Ae,se.value),__vars:{"--sc-label-color":I!==void 0?Bn({color:I,theme:T,autoContrast:$}):void 0},key:`${se.value}-label`},(0,Av.jsx)("span",{...K("innerLabel"),children:se.label})))),we=We(t,se=>N(se));return W2(()=>{A(Po())},[c.length]),c.length===0?null:(0,Av.jsxs)(F,{...K("root"),variant:P,size:m,ref:we,mod:[{"full-width":v,orientation:x,initialized:E,"with-items-borders":B},W],...H,role:"radiogroup","data-disabled":g,children:[typeof ve=="string"&&(0,Av.jsx)(aI,{target:U[ve],parent:R,component:"span",transitionDuration:"var(--sc-transition-duration)",...K("indicator")},C),ne]})});du.classes=BR;du.displayName="@mantine/core/SegmentedControl";var Si=b(O(),1),uu=b(D(),1);var bue={searchable:!1,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:"left"},Kn=M((e,t)=>{let r=z("Select",bue,e),{classNames:n,styles:o,unstyled:i,vars:a,dropdownOpened:s,defaultDropdownOpened:l,onDropdownClose:c,onDropdownOpen:d,onFocus:u,onBlur:f,onClick:m,onChange:p,data:g,value:y,defaultValue:v,selectFirstOptionOnChange:x,onOptionSubmit:_,comboboxProps:I,readOnly:S,disabled:w,filter:P,limit:$,withScrollArea:B,maxDropdownHeight:W,size:H,searchable:K,rightSection:T,checkIconPosition:k,withCheckIcon:E,nothingFoundMessage:C,name:A,form:R,searchValue:N,defaultSearchValue:U,onSearchChange:G,allowDeselect:oe,error:ve,rightSectionPointerEvents:pe,id:Y,clearable:ne,clearButtonProps:we,hiddenInputProps:se,renderOption:Ae,onClear:He,autoComplete:et,scrollAreaProps:dt,__defaultRightSection:Fe,__clearSection:Jt,__clearable:er,chevronColor:co,...he}=r,fe=(0,uu.useMemo)(()=>Em(g),[g]),Se=(0,uu.useMemo)(()=>tu(fe),[fe]),ze=bt(Y),[Ye,Me,tt]=ot({value:y,defaultValue:v,finalValue:null,onChange:p}),ue=typeof Ye=="string"?Se[Ye]:void 0,Te=K2(ue),[br,gn,Mo]=ot({value:N,defaultValue:U,finalValue:ue?ue.label:"",onChange:G}),Wt=dc({opened:s,defaultOpened:l,onDropdownOpen:()=>{d?.(),Wt.updateSelectedOptionIndex("active",{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),Wt.resetSelectedOption()}}),Pr=Dr=>{gn(Dr),Wt.resetSelectedOption()},{resolvedClassNames:_s,resolvedStyles:pf}=Zr({props:r,styles:o,classNames:n});(0,uu.useEffect)(()=>{x&&Wt.selectFirstOption()},[x,br]),(0,uu.useEffect)(()=>{y===null&&Pr(""),typeof y=="string"&&ue&&(Te?.value!==ue.value||Te?.label!==ue.label)&&Pr(ue.label)},[y,ue]),(0,uu.useEffect)(()=>{!tt&&!Mo&&Pr(typeof Ye=="string"&&Se[Ye]?.label||"")},[g,Ye]);let hf=(0,Si.jsx)(Ve.ClearButton,{...we,onClear:()=>{Me(null,null),Pr(""),He?.()}}),gf=ne&&!!Ye&&!w&&!S;return(0,Si.jsxs)(Si.Fragment,{children:[(0,Si.jsxs)(Ve,{store:Wt,__staticSelector:"Select",classNames:_s,styles:pf,unstyled:i,readOnly:S,onOptionSubmit:Dr=>{_?.(Dr);let kl=oe&&Se[Dr].value===Ye?null:Se[Dr],Cl=kl?kl.value:null;Cl!==Ye&&Me(Cl,kl),!tt&&Pr(typeof Cl=="string"&&kl?.label||""),Wt.closeDropdown()},size:H,...I,children:[(0,Si.jsx)(Ve.Target,{targetType:K?"input":"button",autoComplete:et,children:(0,Si.jsx)(rr,{id:ze,ref:t,__defaultRightSection:(0,Si.jsx)(Ve.Chevron,{size:H,error:ve,unstyled:i,color:co}),__clearSection:hf,__clearable:gf,rightSection:T,rightSectionPointerEvents:pe||(gf?"all":"none"),...he,size:H,__staticSelector:"Select",disabled:w,readOnly:S||!K,value:br,onChange:Dr=>{Pr(Dr.currentTarget.value),Wt.openDropdown(),x&&Wt.selectFirstOption()},onFocus:Dr=>{K&&Wt.openDropdown(),u?.(Dr)},onBlur:Dr=>{K&&Wt.closeDropdown(),Pr(Ye!=null&&Se[Ye]?.label||""),f?.(Dr)},onClick:Dr=>{K?Wt.openDropdown():Wt.toggleDropdown(),m?.(Dr)},classNames:_s,styles:pf,unstyled:i,pointer:!K,error:ve})}),(0,Si.jsx)(Nm,{data:fe,hidden:S||w,filter:P,search:br,limit:$,hiddenWhenEmpty:!C,withScrollArea:B,maxDropdownHeight:W,filterOptions:K&&ue?.label!==br,value:Ye,checkIconPosition:k,withCheckIcon:E,nothingFoundMessage:C,unstyled:i,labelId:he.label?`${ze}-label`:void 0,"aria-label":he.label?void 0:he["aria-label"],renderOption:Ae,scrollAreaProps:dt})]}),(0,Si.jsx)(Ve.HiddenInput,{value:Ye,name:A,form:R,disabled:w,...se})]})});Kn.classes={...rr.classes,...Ve.classes};Kn.displayName="@mantine/core/Select";var ki=b(O(),1),Oot=b(D(),1);var UR=b(O(),1);var kot=b(D(),1);function OW({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=ft(),i=t===void 0?e:t,a=ws({"--sg-spacing-x":Ot(gd(e)),"--sg-spacing-y":Ot(gd(i)),"--sg-cols":gd(r)?.toString()}),s=gt(o.breakpoints).reduce((d,u)=>(d[u]||(d[u]={}),typeof e=="object"&&e[u]!==void 0&&(d[u]["--sg-spacing-x"]=Ot(e[u])),typeof i=="object"&&i[u]!==void 0&&(d[u]["--sg-spacing-y"]=Ot(i[u])),typeof r=="object"&&r[u]!==void 0&&(d[u]["--sg-cols"]=r[u]),d),{}),c=Vh(gt(s),o.breakpoints).filter(d=>gt(s[d.value]).length>0).map(d=>({query:`(min-width: ${o.breakpoints[d.value]})`,styles:s[d.value]}));return(0,UR.jsx)(kd,{styles:a,media:c,selector:n})}function jR(e){return typeof e=="object"&&e!==null?gt(e):[]}function yue(e){return e.sort((t,r)=>Dl(t)-Dl(r))}function _ue({spacing:e,verticalSpacing:t,cols:r}){let n=Array.from(new Set([...jR(e),...jR(t),...jR(r)]));return yue(n)}function zW({spacing:e,verticalSpacing:t,cols:r,selector:n}){let o=t===void 0?e:t,i=ws({"--sg-spacing-x":Ot(gd(e)),"--sg-spacing-y":Ot(gd(o)),"--sg-cols":gd(r)?.toString()}),a=_ue({spacing:e,verticalSpacing:t,cols:r}),s=a.reduce((c,d)=>(c[d]||(c[d]={}),typeof e=="object"&&e[d]!==void 0&&(c[d]["--sg-spacing-x"]=Ot(e[d])),typeof o=="object"&&o[d]!==void 0&&(c[d]["--sg-spacing-y"]=Ot(o[d])),typeof r=="object"&&r[d]!==void 0&&(c[d]["--sg-cols"]=r[d]),c),{}),l=a.map(c=>({query:`simple-grid (min-width: ${c})`,styles:s[c]}));return(0,UR.jsx)(kd,{styles:i,container:l,selector:n})}var VR={container:"m_925c2d2c",root:"m_2415a157"};var Iue={cols:1,spacing:"md",type:"media"},Ov=M((e,t)=>{let r=z("SimpleGrid",Iue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,cols:c,verticalSpacing:d,spacing:u,type:f,...m}=r,p=Q({name:"SimpleGrid",classes:VR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l}),g=qy();return f==="container"?(0,ki.jsxs)(ki.Fragment,{children:[(0,ki.jsx)(zW,{...r,selector:`.${g}`}),(0,ki.jsx)("div",{...p("container"),children:(0,ki.jsx)(F,{ref:t,...p("root",{className:g}),...m})})]}):(0,ki.jsxs)(ki.Fragment,{children:[(0,ki.jsx)(OW,{...r,selector:`.${g}`}),(0,ki.jsx)(F,{ref:t,...p("root",{className:g}),...m})]})});Ov.classes=VR;Ov.displayName="@mantine/core/SimpleGrid";var NW=b(O(),1);var Zot=b(D(),1);var HR={root:"m_18320242","skeleton-fade":"m_299c329c"};var wue={visible:!0,animate:!0},Sue=(e,{width:t,height:r,radius:n,circle:o})=>({root:{"--skeleton-height":Z(r),"--skeleton-width":o?Z(r):Z(t),"--skeleton-radius":o?"1000px":n===void 0?void 0:Ee(n)}}),Dn=M((e,t)=>{let r=z("Skeleton",wue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,width:c,height:d,circle:u,visible:f,radius:m,animate:p,mod:g,...y}=r,v=Q({name:"Skeleton",classes:HR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Sue});return(0,NW.jsx)(F,{ref:t,...v("root"),mod:[{visible:f,animate:p},g],...y})});Dn.classes=HR;Dn.displayName="@mantine/core/Skeleton";var FW=b(O(),1),rnt=b(D(),1);var WR={root:"m_6d731127"};var kue={gap:"md",align:"stretch",justify:"flex-start"},Cue=(e,{gap:t,align:r,justify:n})=>({root:{"--stack-gap":Ot(t),"--stack-align":r,"--stack-justify":n}}),Ne=M((e,t)=>{let r=z("Stack",kue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,align:c,justify:d,gap:u,variant:f,...m}=r,p=Q({name:"Stack",props:r,classes:WR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Cue});return(0,FW.jsx)(F,{ref:t,...p("root"),variant:f,...m})});Ne.classes=WR;Ne.displayName="@mantine/core/Stack";var fu=b(O(),1);var wnt=b(D(),1);var hw=b(D(),1),LW=(0,hw.createContext)(null),MW=LW.Provider,BW=()=>(0,hw.useContext)(LW);var gw=b(O(),1);var mnt=b(D(),1);var Pue={},vw=M((e,t)=>{let{value:r,defaultValue:n,onChange:o,size:i,wrapperProps:a,children:s,readOnly:l,...c}=z("SwitchGroup",Pue,e),[d,u]=ot({value:r,defaultValue:n,finalValue:[],onChange:o});return(0,gw.jsx)(MW,{value:{value:d,onChange:m=>{let p=m.currentTarget.value;!l&&u(d.includes(p)?d.filter(g=>g!==p):[...d,p])},size:i},children:(0,gw.jsx)(mt.Wrapper,{size:i,ref:t,...a,...c,labelElement:"div",__staticSelector:"SwitchGroup",children:(0,gw.jsx)(Am,{role:"group",children:s})})})});vw.classes=mt.Wrapper.classes;vw.displayName="@mantine/core/SwitchGroup";var ZR={root:"m_5f93f3bb",input:"m_926b4011",track:"m_9307d992",thumb:"m_93039a1d",trackLabel:"m_8277e082"};var Due={labelPosition:"right"},Rue=(e,{radius:t,color:r,size:n})=>({root:{"--switch-radius":t===void 0?void 0:Ee(t),"--switch-height":xe(n,"switch-height"),"--switch-width":xe(n,"switch-width"),"--switch-thumb-size":xe(n,"switch-thumb-size"),"--switch-label-font-size":xe(n,"switch-label-font-size"),"--switch-track-label-padding":xe(n,"switch-track-label-padding"),"--switch-color":r?Ze(r,e):void 0}}),qa=M((e,t)=>{let r=z("Switch",Due,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,color:c,label:d,offLabel:u,onLabel:f,id:m,size:p,radius:g,wrapperProps:y,thumbIcon:v,checked:x,defaultChecked:_,onChange:I,labelPosition:S,description:w,error:P,disabled:$,variant:B,rootRef:W,mod:H,...K}=r,T=BW(),k=p||T?.size,E=Q({name:"Switch",props:r,classes:ZR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Rue}),{styleProps:C,rest:A}=Gr(K),R=bt(m),N=T?{checked:T.value.includes(A.value),onChange:T.onChange}:{},[U,G]=ot({value:N.checked??x,defaultValue:_,finalValue:!1});return(0,fu.jsxs)(ru,{...E("root"),__staticSelector:"Switch",__stylesApiProps:r,id:R,size:k,labelPosition:S,label:d,description:w,error:P,disabled:$,bodyElement:"label",labelElement:"span",classNames:n,styles:a,unstyled:s,"data-checked":N.checked||x||void 0,variant:B,ref:W,mod:H,...C,...y,children:[(0,fu.jsx)("input",{...A,disabled:$,checked:U,"data-checked":N.checked||x||void 0,onChange:oe=>{T?N.onChange?.(oe):I?.(oe),G(oe.currentTarget.checked)},id:R,ref:t,type:"checkbox",role:"switch",...E("input")}),(0,fu.jsxs)(F,{"aria-hidden":"true",component:"span",mod:{error:P,"label-position":S,"without-labels":!f&&!u},...E("track"),children:[(0,fu.jsx)(F,{component:"span",mod:"reduce-motion",...E("thumb"),children:v}),(0,fu.jsx)("span",{...E("trackLabel"),children:U?f:u})]})]})});qa.classes={...ZR,...SI};qa.displayName="@mantine/core/Switch";qa.Group=vw;var kw=b(O(),1);var dit=b(D(),1);var VW=b(O(),1),Vnt=b(D(),1);var Fnt=b(D(),1);var Mnt=b(O(),1);var[jW,UW]=Gt("Table component was not found in the tree");var _c={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Tue(e,t){if(!t)return;let r={};return t.columnBorder&&e.withColumnBorders&&(r["data-with-column-border"]=!0),t.rowBorder&&e.withRowBorders&&(r["data-with-row-border"]=!0),t.striped&&e.striped&&(r["data-striped"]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(r["data-hover"]=!0),t.captionSide&&e.captionSide&&(r["data-side"]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(r["data-sticky"]=!0),r}function mu(e,t){let r=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,n=M((o,i)=>{let a=z(r,{},o),{classNames:s,className:l,style:c,styles:d,...u}=a,f=UW();return(0,VW.jsx)(F,{component:e,ref:i,...Tue(f,t),...f.getStyles(e,{className:l,classNames:s,style:c,styles:d,props:a}),...u})});return n.displayName=`@mantine/core/${r}`,n.classes=_c,n}var zv=mu("th",{columnBorder:!0}),xw=mu("td",{columnBorder:!0}),Km=mu("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),bw=mu("thead",{stickyHeader:!0}),yw=mu("tbody"),_w=mu("tfoot"),Iw=mu("caption",{captionSide:!0});var Yo=b(O(),1);function ww({data:e}){return(0,Yo.jsxs)(Yo.Fragment,{children:[e.caption&&(0,Yo.jsx)(Iw,{children:e.caption}),e.head&&(0,Yo.jsx)(bw,{children:(0,Yo.jsx)(Km,{children:e.head.map((t,r)=>(0,Yo.jsx)(zv,{children:t},r))})}),e.body&&(0,Yo.jsx)(yw,{children:e.body.map((t,r)=>(0,Yo.jsx)(Km,{children:t.map((n,o)=>(0,Yo.jsx)(xw,{children:n},o))},r))}),e.foot&&(0,Yo.jsx)(_w,{children:(0,Yo.jsx)(Km,{children:e.foot.map((t,r)=>(0,Yo.jsx)(zv,{children:t},r))})})]})}ww.displayName="@mantine/core/TableDataRenderer";var GR=b(O(),1);var eit=b(D(),1);var Eue={type:"scrollarea"},$ue=(e,{minWidth:t,maxHeight:r,type:n})=>({scrollContainer:{"--table-min-width":Z(t),"--table-max-height":Z(r),"--table-overflow":n==="native"?"auto":void 0}}),Sw=M((e,t)=>{let r=z("TableScrollContainer",Eue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,children:c,minWidth:d,maxHeight:u,type:f,scrollAreaProps:m,...p}=r,g=Q({name:"TableScrollContainer",classes:_c,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:$ue,rootSelector:"scrollContainer"});return(0,GR.jsx)(F,{component:f==="scrollarea"?Nr:"div",...f==="scrollarea"?u?{offsetScrollbars:"xy",...m}:{offsetScrollbars:"x",...m}:{},ref:t,...g("scrollContainer"),...p,children:(0,GR.jsx)("div",{...g("scrollContainerInner"),children:c})})});Sw.classes=_c;Sw.displayName="@mantine/core/TableScrollContainer";var Aue={withRowBorders:!0,verticalSpacing:7},Oue=(e,{layout:t,captionSide:r,horizontalSpacing:n,verticalSpacing:o,borderColor:i,stripedColor:a,highlightOnHoverColor:s,striped:l,highlightOnHover:c,stickyHeaderOffset:d,stickyHeader:u})=>({table:{"--table-layout":t,"--table-caption-side":r,"--table-horizontal-spacing":Ot(n),"--table-vertical-spacing":Ot(o),"--table-border-color":i?Ze(i,e):void 0,"--table-striped-color":l&&a?Ze(a,e):void 0,"--table-highlight-on-hover-color":c&&s?Ze(s,e):void 0,"--table-sticky-header-offset":u?Z(d):void 0}}),ur=M((e,t)=>{let r=z("Table",Aue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,horizontalSpacing:c,verticalSpacing:d,captionSide:u,stripedColor:f,highlightOnHoverColor:m,striped:p,highlightOnHover:g,withColumnBorders:y,withRowBorders:v,withTableBorder:x,borderColor:_,layout:I,variant:S,data:w,children:P,stickyHeader:$,stickyHeaderOffset:B,mod:W,tabularNums:H,...K}=r,T=Q({name:"Table",props:r,className:o,style:i,classes:_c,classNames:n,styles:a,unstyled:s,rootSelector:"table",vars:l,varsResolver:Oue});return(0,kw.jsx)(jW,{value:{getStyles:T,stickyHeader:$,striped:p===!0?"odd":p||void 0,highlightOnHover:g,withColumnBorders:y,withRowBorders:v,captionSide:u||"bottom"},children:(0,kw.jsx)(F,{component:"table",variant:S,ref:t,mod:[{"data-with-table-border":x,"data-tabular-nums":H},W],...T("table"),...K,children:P||!!w&&(0,kw.jsx)(ww,{data:w})})})});ur.classes=_c;ur.displayName="@mantine/core/Table";ur.Td=xw;ur.Th=zv;ur.Tr=Km;ur.Thead=bw;ur.Tbody=yw;ur.Tfoot=_w;ur.Caption=Iw;ur.ScrollContainer=Sw;ur.DataRenderer=ww;var Jo=b(O(),1),Cw=b(D(),1);var Sit=b(O(),1);var Cit=b(D(),1);function HW({data:e,value:t}){let r=t.map(o=>o.trim().toLowerCase());return e.reduce((o,i)=>(_i(i)?o.push({group:i.group,items:i.items.filter(a=>r.indexOf(a.label.toLowerCase().trim())===-1)}):r.indexOf(i.label.toLowerCase().trim())===-1&&o.push(i),o),[])}function zue(e,t){return e?t.split(new RegExp(`[${e.join("")}]`)).map(r=>r.trim()).filter(r=>r!==""):[t]}function qR({splitChars:e,allowDuplicates:t,maxTags:r,value:n,currentTags:o}){let i=zue(e,n),a=t?[...o,...i]:[...new Set([...o,...i])];return r?a.slice(0,r):a}var Nue={maxTags:1/0,allowDuplicates:!1,acceptValueOnBlur:!0,splitChars:[","],hiddenInputValuesDivider:","},Ic=M((e,t)=>{let r=z("TagsInput",Nue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,size:c,value:d,defaultValue:u,onChange:f,onKeyDown:m,maxTags:p,allowDuplicates:g,onDuplicate:y,variant:v,data:x,dropdownOpened:_,defaultDropdownOpened:I,onDropdownOpen:S,onDropdownClose:w,selectFirstOptionOnChange:P,onOptionSubmit:$,comboboxProps:B,filter:W,limit:H,withScrollArea:K,maxDropdownHeight:T,searchValue:k,defaultSearchValue:E,onSearchChange:C,readOnly:A,disabled:R,splitChars:N,onFocus:U,onBlur:G,onPaste:oe,radius:ve,rightSection:pe,rightSectionWidth:Y,rightSectionPointerEvents:ne,rightSectionProps:we,leftSection:se,leftSectionWidth:Ae,leftSectionPointerEvents:He,leftSectionProps:et,inputContainer:dt,inputWrapperOrder:Fe,withAsterisk:Jt,required:er,labelProps:co,descriptionProps:he,errorProps:fe,wrapperProps:Se,description:ze,label:Ye,error:Me,withErrorStyles:tt,name:ue,form:Te,id:br,clearable:gn,clearButtonProps:Mo,hiddenInputProps:Wt,hiddenInputValuesDivider:Pr,mod:_s,renderOption:pf,onRemove:hf,onClear:gf,scrollAreaProps:Dr,acceptValueOnBlur:kl,...Cl}=r,$h=bt(br),Ah=Em(x),Oh=tu(Ah),vf=(0,Cw.useRef)(null),Pl=We(vf,t),ar=dc({opened:_,defaultOpened:I,onDropdownOpen:S,onDropdownClose:()=>{w?.(),ar.resetSelectedOption()}}),{styleProps:u2,rest:{type:Xre,autoComplete:f2,...m2}}=Gr(Cl),[ut,Ln]=ot({value:d,defaultValue:u,finalValue:[],onChange:f}),[ii,p2]=ot({value:k,defaultValue:E,finalValue:"",onChange:C}),Vi=ke=>{p2(ke),ar.resetSelectedOption()},dd=Q({name:"TagsInput",classes:{},props:r,classNames:n,styles:a,unstyled:s}),{resolvedClassNames:zh,resolvedStyles:Nh}=Zr({props:r,styles:a,classNames:n}),my=ke=>{let Bo=ut.some(ya=>ya.toLowerCase()===ke.toLowerCase());Bo&&y?.(ke),(!Bo||Bo&&g)&&ut.length<p&&($?.(ke),Vi(""),ke.length>0&&Ln([...ut,ke]))},h2=ke=>{if(m?.(ke),ke.isPropagationStopped())return;let Bo=ii.trim(),{length:ya}=Bo;if(N.includes(ke.key)&&ya>0&&(Ln(qR({splitChars:N,allowDuplicates:g,maxTags:p,value:ii,currentTags:ut})),Vi(""),ke.preventDefault()),ke.key==="Enter"&&ya>0&&!ke.nativeEvent.isComposing){if(ke.preventDefault(),!!document.querySelector(`#${ar.listId} [data-combobox-option][data-combobox-selected]`))return;my(Bo)}ke.key==="Backspace"&&ya===0&&ut.length>0&&!ke.nativeEvent.isComposing&&(hf?.(ut[ut.length-1]),Ln(ut.slice(0,ut.length-1)))},py=ke=>{if(oe?.(ke),ke.preventDefault(),ke.clipboardData){let Bo=ke.clipboardData.getData("text/plain");Ln(qR({splitChars:N,allowDuplicates:g,maxTags:p,value:`${ii}${Bo}`,currentTags:ut})),Vi("")}},g2=ut.map((ke,Bo)=>(0,Jo.jsx)(Zs,{withRemoveButton:!A,onRemove:()=>{let ya=ut.slice();ya.splice(Bo,1),Ln(ya),hf?.(ke)},unstyled:s,disabled:R,...dd("pill"),children:ke},`${ke}-${Bo}`));(0,Cw.useEffect)(()=>{P&&ar.selectFirstOption()},[P,ut,ii]);let hy=(0,Jo.jsx)(Ve.ClearButton,{...Mo,onClear:()=>{Ln([]),Vi(""),vf.current?.focus(),ar.openDropdown(),gf?.()}});return(0,Jo.jsxs)(Jo.Fragment,{children:[(0,Jo.jsxs)(Ve,{store:ar,classNames:zh,styles:Nh,unstyled:s,size:c,readOnly:A,__staticSelector:"TagsInput",onOptionSubmit:ke=>{$?.(ke),Vi(""),ut.length<p&&Ln([...ut,Oh[ke].label]),ar.resetSelectedOption()},...B,children:[(0,Jo.jsx)(Ve.DropdownTarget,{children:(0,Jo.jsx)(fc,{...u2,__staticSelector:"TagsInput",classNames:zh,styles:Nh,unstyled:s,size:c,className:o,style:i,variant:v,disabled:R,radius:ve,rightSection:pe,__clearSection:hy,__clearable:gn&&ut.length>0&&!R&&!A,rightSectionWidth:Y,rightSectionPointerEvents:ne,rightSectionProps:we,leftSection:se,leftSectionWidth:Ae,leftSectionPointerEvents:He,leftSectionProps:et,inputContainer:dt,inputWrapperOrder:Fe,withAsterisk:Jt,required:er,labelProps:co,descriptionProps:he,errorProps:fe,wrapperProps:Se,description:ze,label:Ye,error:Me,withErrorStyles:tt,__stylesApiProps:{...r,multiline:!0},id:$h,mod:_s,children:(0,Jo.jsxs)(Zs.Group,{disabled:R,unstyled:s,...dd("pillsList"),children:[g2,(0,Jo.jsx)(Ve.EventsTarget,{autoComplete:f2,children:(0,Jo.jsx)(fc.Field,{...m2,ref:Pl,...dd("inputField"),unstyled:s,onKeyDown:h2,onFocus:ke=>{U?.(ke),ar.openDropdown()},onBlur:ke=>{G?.(ke),kl&&my(ii),ar.closeDropdown()},onPaste:py,value:ii,onChange:ke=>Vi(ke.currentTarget.value),required:er&&ut.length===0,disabled:R,readOnly:A,id:$h})})]})})}),(0,Jo.jsx)(Nm,{data:HW({data:Ah,value:ut}),hidden:A||R,filter:W,search:ii,limit:H,hiddenWhenEmpty:!0,withScrollArea:K,maxDropdownHeight:T,unstyled:s,labelId:Ye?`${$h}-label`:void 0,"aria-label":Ye?void 0:Cl["aria-label"],renderOption:pf,scrollAreaProps:Dr})]}),(0,Jo.jsx)(Ve.HiddenInput,{name:ue,form:Te,value:ut,valuesDivider:Pr,disabled:R,...Wt})]})});Ic.classes={...rr.classes,...Ve.classes};Ic.displayName="@mantine/core/TagsInput";var WW=b(O(),1),qit=b(D(),1);var Fue={},Rt=M((e,t)=>{let r=z("TextInput",Fue,e);return(0,WW.jsx)(rr,{component:"input",ref:t,...r,__staticSelector:"TextInput"})});Rt.classes=rr.classes;Rt.displayName="@mantine/core/TextInput";var ZW=b(O(),1),tat=b(D(),1);var KR={root:"m_7341320d"};var Lue={},Mue=(e,{size:t,radius:r,variant:n,gradient:o,color:i,autoContrast:a})=>{let s=e.variantColorResolver({color:i||e.primaryColor,theme:e,gradient:o,variant:n||"filled",autoContrast:a});return{root:{"--ti-size":xe(t,"ti-size"),"--ti-radius":r===void 0?void 0:Ee(r),"--ti-bg":i||n?s.background:void 0,"--ti-color":i||n?s.color:void 0,"--ti-bd":i||n?s.border:void 0}}},Ka=M((e,t)=>{let r=z("ThemeIcon",Lue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,autoContrast:c,...d}=r,u=Q({name:"ThemeIcon",classes:KR,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Mue});return(0,ZW.jsx)(F,{ref:t,...u("root"),...d})});Ka.classes=KR;Ka.displayName="@mantine/core/ThemeIcon";var qW=b(O(),1),gat=b(D(),1);var uat=b(D(),1),fat=b(O(),1);var Bue=["h1","h2","h3","h4","h5","h6"],jue=["xs","sm","md","lg","xl"];function GW(e,t){let r=t!==void 0?t:`h${e}`;return Bue.includes(r)?{fontSize:`var(--mantine-${r}-font-size)`,fontWeight:`var(--mantine-${r}-font-weight)`,lineHeight:`var(--mantine-${r}-line-height)`}:jue.includes(r)?{fontSize:`var(--mantine-font-size-${r})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:Z(r),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var XR={root:"m_8a5d1357"};var Uue={order:1},Vue=(e,{order:t,size:r,lineClamp:n,textWrap:o})=>{let i=GW(t,r);return{root:{"--title-fw":i.fontWeight,"--title-lh":i.lineHeight,"--title-fz":i.fontSize,"--title-line-clamp":typeof n=="number"?n.toString():void 0,"--title-text-wrap":o}}},Xn=M((e,t)=>{let r=z("Title",Uue,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,order:l,vars:c,size:d,variant:u,lineClamp:f,textWrap:m,mod:p,...g}=r,y=Q({name:"Title",props:r,classes:XR,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:c,varsResolver:Vue});return[1,2,3,4,5,6].includes(l)?(0,qW.jsx)(F,{...y("root"),component:`h${l}`,variant:u,ref:t,mod:[{order:l,"data-line-clamp":typeof f=="number"},p],size:d,...g}):null});Xn.classes=XR;Xn.displayName="@mantine/core/Title";var Xm=b(O(),1),Ci=b(D(),1);var Qs=b(O(),1);var XW=b(D(),1);var KW=b(D(),1),Nv=(0,KW.createContext)(null);Nv.displayName="@mantine/modals/ModalsContext";function QW(){let e=(0,XW.useContext)(Nv);if(!e)throw new Error("[@mantine/modals] useModals hook was called outside of context, wrap your app with ModalsProvider component");return e}function YW({id:e,cancelProps:t,confirmProps:r,labels:n={cancel:"",confirm:""},closeOnConfirm:o=!0,closeOnCancel:i=!0,groupProps:a,onCancel:s,onConfirm:l,children:c}){let{cancel:d,confirm:u}=n,f=QW(),m=g=>{typeof t?.onClick=="function"&&t?.onClick(g),typeof s=="function"&&s(),i&&f.closeModal(e)},p=g=>{typeof r?.onClick=="function"&&r?.onClick(g),typeof l=="function"&&l(),o&&f.closeModal(e)};return(0,Qs.jsxs)(Qs.Fragment,{children:[c&&(0,Qs.jsx)(F,{mb:"md",children:c}),(0,Qs.jsxs)(Ce,{mt:c?0:"md",justify:"flex-end",...a,children:[(0,Qs.jsx)(lt,{variant:"default",...t,onClick:m,children:t?.children||d}),(0,Qs.jsx)(lt,{...r,onClick:p,children:r?.children||u})]})]})}var[JW,pu]=Y2("mantine-modals"),eZ=e=>{let t=e.modalId||Po();return pu("openModal")({...e,modalId:t}),t},tZ=e=>{let t=e.modalId||Po();return pu("openConfirmModal")({...e,modalId:t}),t},rZ=e=>{let t=e.modalId||Po();return pu("openContextModal")({...e,modalId:t}),t},oZ=pu("closeModal"),nZ=pu("closeAllModals"),iZ=e=>pu("updateModal")(e),aZ=e=>pu("updateContextModal")(e),Xa={open:eZ,close:oZ,closeAll:nZ,openConfirmModal:tZ,openContextModal:rZ,updateModal:iZ,updateContextModal:aZ};function sZ(e,t){t&&e.type==="confirm"&&e.props.onCancel?.(),e.props.onClose?.()}function lZ(e,t){switch(t.type){case"OPEN":return{current:t.modal,modals:[...e.modals,t.modal]};case"CLOSE":{let r=e.modals.find(o=>o.id===t.modalId);if(!r)return e;sZ(r,t.canceled);let n=e.modals.filter(o=>o.id!==t.modalId);return{current:n[n.length-1]||e.current,modals:n}}case"CLOSE_ALL":return e.modals.length?(e.modals.concat().reverse().forEach(r=>{sZ(r,t.canceled)}),{current:e.current,modals:[]}):e;case"UPDATE":{let{modalId:r,newProps:n}=t,o=e.modals.map(a=>a.id!==r?a:a.type==="content"||a.type==="confirm"?{...a,props:{...a.props,...n}}:a.type==="context"?{...a,props:{...a.props,...n,innerProps:{...a.props.innerProps,...n.innerProps}}}:a),i=e.current?.id===r&&o.find(a=>a.id===r)||e.current;return{...e,modals:o,current:i}}default:return e}}function Hue(e){if(!e)return{confirmProps:{},modalProps:{}};let{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d,...u}=e;return{confirmProps:{id:t,children:r,onCancel:n,onConfirm:o,closeOnConfirm:i,closeOnCancel:a,cancelProps:s,confirmProps:l,groupProps:c,labels:d},modalProps:{id:t,...u}}}function QR({children:e,modalProps:t,labels:r,modals:n}){let[o,i]=(0,Ci.useReducer)(lZ,{modals:[],current:null}),a=(0,Ci.useRef)(o);a.current=o;let s=(0,Ci.useCallback)(x=>{i({type:"CLOSE_ALL",canceled:x})},[a,i]),l=(0,Ci.useCallback)(({modalId:x,..._})=>{let I=x||Po();return i({type:"OPEN",modal:{id:I,type:"content",props:_}}),I},[i]),c=(0,Ci.useCallback)(({modalId:x,..._})=>{let I=x||Po();return i({type:"OPEN",modal:{id:I,type:"confirm",props:_}}),I},[i]),d=(0,Ci.useCallback)((x,{modalId:_,...I})=>{let S=_||Po();return i({type:"OPEN",modal:{id:S,type:"context",props:I,ctx:x}}),S},[i]),u=(0,Ci.useCallback)((x,_)=>{i({type:"CLOSE",modalId:x,canceled:_})},[a,i]),f=(0,Ci.useCallback)(({modalId:x,..._})=>{i({type:"UPDATE",modalId:x,newProps:_})},[i]),m=(0,Ci.useCallback)(({modalId:x,..._})=>{i({type:"UPDATE",modalId:x,newProps:_})},[i]);JW({openModal:l,openConfirmModal:c,openContextModal:({modal:x,..._})=>d(x,_),closeModal:u,closeContextModal:u,closeAllModals:s,updateModal:f,updateContextModal:m});let p={modalProps:t||{},modals:o.modals,openModal:l,openConfirmModal:c,openContextModal:d,closeModal:u,closeContextModal:u,closeAll:s,updateModal:f,updateContextModal:m},g=()=>{let x=a.current.current;switch(x?.type){case"context":{let{innerProps:_,...I}=x.props,S=n[x.ctx];return{modalProps:I,content:(0,Xm.jsx)(S,{innerProps:_,context:p,id:x.id})}}case"confirm":{let{modalProps:_,confirmProps:I}=Hue(x.props);return{modalProps:_,content:(0,Xm.jsx)(YW,{...I,id:x.id,labels:x.props.labels||r})}}case"content":{let{children:_,...I}=x.props;return{modalProps:I,content:_}}default:return{modalProps:{},content:null}}},{modalProps:y,content:v}=g();return(0,Xm.jsxs)(Nv.Provider,{value:p,children:[(0,Xm.jsx)(vo,{zIndex:Et("modal")+1,...t,...y,opened:o.modals.length>0,onClose:()=>u(o.current?.id),children:v}),e]})}var cZ=b(D(),1);function Fv(e){let t=e,r=!1,n=new Set;return{getState(){return t},updateState(o){t=typeof o=="function"?o(t):o},setState(o){this.updateState(o),n.forEach(i=>i(t))},initialize(o){r||(t=o,r=!0)},subscribe(o){return n.add(o),()=>n.delete(o)}}}function Lv(e){return(0,cZ.useSyncExternalStore)(e.subscribe,()=>e.getState(),()=>e.getState())}function Wue(e,t,r){let n=[],o=[],i={};for(let a of e){let s=a.position||t;i[s]=i[s]||0,i[s]+=1,i[s]<=r?o.push(a):n.push(a)}return{notifications:o,queue:n}}var dZ=()=>Fv({notifications:[],queue:[],defaultPosition:"bottom-right",limit:5}),Ys=dZ(),YR=(e=Ys)=>Lv(e);function hu(e,t){let r=e.getState(),n=t([...r.notifications,...r.queue]),o=Wue(n,r.defaultPosition,r.limit);e.setState({notifications:o.notifications,queue:o.queue,limit:r.limit,defaultPosition:r.defaultPosition})}function uZ(e,t=Ys){let r=e.id||Po();return hu(t,n=>e.id&&n.some(o=>o.id===e.id)?n:[...n,{...e,id:r}]),r}function Pw(e,t=Ys){return hu(t,r=>r.filter(n=>n.id===e?(n.onClose?.(n),!1):!0)),e}function fZ(e,t=Ys){return hu(t,r=>r.map(n=>n.id===e.id?{...n,...e}:n)),e.id}function mZ(e=Ys){hu(e,()=>[])}function pZ(e=Ys){hu(e,t=>t.slice(0,e.getState().limit))}var en={show:uZ,hide:Pw,update:fZ,clean:mZ,cleanQueue:pZ,updateState:hu};var xo=b(O(),1),Vv=b(D(),1);function Dw(e,t){return Dw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Dw(e,t)}function Rw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Dw(e,t)}var Mv=b(D()),Bv=b(tc());var JR={disabled:!1};var hZ=b(D()),Qm=hZ.default.createContext(null);var gZ=function(t){return t.scrollTop};var jv="unmounted",gu="exited",vu="entering",Jm="entered",eT="exiting",Js=(function(e){Rw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=o,s=a&&!a.isMounting?n.enter:n.appear,l;return i.appearStatus=null,n.in?s?(l=gu,i.appearStatus=vu):l=Jm:n.unmountOnExit||n.mountOnEnter?l=jv:l=gu,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===jv?{status:gu}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==vu&&a!==Jm&&(i=vu):(a===vu||a===Jm)&&(i=eT)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},r.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===vu){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Bv.default.findDOMNode(this);a&&gZ(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===gu&&this.setState({status:jv})},r.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[Bv.default.findDOMNode(this),s],c=l[0],d=l[1],u=this.getTimeouts(),f=s?u.appear:u.enter;if(!o&&!a||JR.disabled){this.safeSetState({status:Jm},function(){i.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:vu},function(){i.props.onEntering(c,d),i.onTransitionEnd(f,function(){i.safeSetState({status:Jm},function(){i.props.onEntered(c,d)})})})},r.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Bv.default.findDOMNode(this);if(!i||JR.disabled){this.safeSetState({status:gu},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:eT},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:gu},function(){o.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},r.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},r.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Bv.default.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===jv)return null;var i=this.props,a=i.children,s=i.in,l=i.mountOnEnter,c=i.unmountOnExit,d=i.appear,u=i.enter,f=i.exit,m=i.timeout,p=i.addEndListener,g=i.onEnter,y=i.onEntering,v=i.onEntered,x=i.onExit,_=i.onExiting,I=i.onExited,S=i.nodeRef,w=Bm(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Mv.default.createElement(Qm.Provider,{value:null},typeof a=="function"?a(o,w):Mv.default.cloneElement(Mv.default.Children.only(a),w))},t})(Mv.default.Component);Js.contextType=Qm;Js.propTypes={};function Ym(){}Js.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ym,onEntering:Ym,onEntered:Ym,onExit:Ym,onExiting:Ym,onExited:Ym};Js.UNMOUNTED=jv;Js.EXITED=gu;Js.ENTERING=vu;Js.ENTERED=Jm;Js.EXITING=eT;var tT=Js;function vZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Uv=b(D());var Pi=b(D());function Tw(e,t){var r=function(i){return t&&(0,Pi.isValidElement)(i)?t(i):i},n=Object.create(null);return e&&Pi.Children.map(e,function(o){return o}).forEach(function(o){n[o.key]=r(o)}),n}function Zue(e,t){e=e||{},t=t||{};function r(d){return d in t?t[d]:e[d]}var n=Object.create(null),o=[];for(var i in e)i in t?o.length&&(n[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(n[l])for(a=0;a<n[l].length;a++){var c=n[l][a];s[n[l][a]]=r(c)}s[l]=r(l)}for(a=0;a<o.length;a++)s[o[a]]=r(o[a]);return s}function xu(e,t,r){return r[t]!=null?r[t]:e.props[t]}function xZ(e,t){return Tw(e.children,function(r){return(0,Pi.cloneElement)(r,{onExited:t.bind(null,r),in:!0,appear:xu(r,"appear",e),enter:xu(r,"enter",e),exit:xu(r,"exit",e)})})}function bZ(e,t,r){var n=Tw(e.children),o=Zue(t,n);return Object.keys(o).forEach(function(i){var a=o[i];if((0,Pi.isValidElement)(a)){var s=i in t,l=i in n,c=t[i],d=(0,Pi.isValidElement)(c)&&!c.props.in;l&&(!s||d)?o[i]=(0,Pi.cloneElement)(a,{onExited:r.bind(null,a),in:!0,exit:xu(a,"exit",e),enter:xu(a,"enter",e)}):!l&&s&&!d?o[i]=(0,Pi.cloneElement)(a,{in:!1}):l&&s&&(0,Pi.isValidElement)(c)&&(o[i]=(0,Pi.cloneElement)(a,{onExited:r.bind(null,a),in:c.props.in,exit:xu(a,"exit",e),enter:xu(a,"enter",e)}))}}),o}var Gue=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},que={component:"div",childFactory:function(t){return t}},rT=(function(e){Rw(t,e);function t(n,o){var i;i=e.call(this,n,o)||this;var a=i.handleExited.bind(vZ(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var r=t.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(o,i){var a=i.children,s=i.handleExited,l=i.firstRender;return{children:l?xZ(o,s):bZ(o,a,s),firstRender:!1}},r.handleExited=function(o,i){var a=Tw(this.props.children);o.key in a||(o.props.onExited&&o.props.onExited(i),this.mounted&&this.setState(function(s){var l=Mm({},s.children);return delete l[o.key],{children:l}}))},r.render=function(){var o=this.props,i=o.component,a=o.childFactory,s=Bm(o,["component","childFactory"]),l=this.state.contextValue,c=Gue(this.state.children).map(a);return delete s.appear,delete s.enter,delete s.exit,i===null?Uv.default.createElement(Qm.Provider,{value:l},c):Uv.default.createElement(Qm.Provider,{value:l},Uv.default.createElement(i,s,c))},t})(Uv.default.Component);rT.propTypes={};rT.defaultProps=que;var wc=rT;var oT=["bottom-center","bottom-left","bottom-right","top-center","top-left","top-right"];function yZ(e,t){return e.reduce((r,n)=>(r[n.position||t].push(n),r),oT.reduce((r,n)=>(r[n]=[],r),{}))}var _Z={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},Kue={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function IZ({state:e,maxHeight:t,position:r,transitionDuration:n}){let[o,i]=r.split("-"),a=i==="center"?`${o}-center`:i,s={opacity:0,maxHeight:t,transform:_Z[a],transitionDuration:`${n}ms, ${n}ms, ${n}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:Kue[a]},c={opacity:0,maxHeight:0,transform:_Z[a]};return{...s,...{entering:l,entered:l,exiting:c,exited:c}[e]}}var SZ=b(O(),1),bu=b(D(),1);function wZ(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}var nT=(0,bu.forwardRef)(({data:e,onHide:t,autoClose:r,...n},o)=>{let{autoClose:i,message:a,...s}=e,l=wZ(r,e.autoClose),c=(0,bu.useRef)(-1),d=()=>window.clearTimeout(c.current),u=()=>{t(e.id),d()},f=()=>{typeof l=="number"&&(c.current=window.setTimeout(u,l))};return(0,bu.useEffect)(()=>{e.onOpen?.(e)},[]),(0,bu.useEffect)(()=>(f(),d),[l]),(0,SZ.jsx)(au,{...n,...s,onClose:u,ref:o,onMouseEnter:d,onMouseLeave:f,children:a})});nT.displayName="@mantine/notifications/NotificationContainer";var iT={root:"m_b37d9ac7",notification:"m_5ed0edd0"};var Xue=tT,Que={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:Et("overlay"),store:Ys,withinPortal:!0},Yue=(e,{zIndex:t,containerWidth:r})=>({root:{"--notifications-z-index":t?.toString(),"--notifications-container-width":Z(r)}}),ca=M((e,t)=>{let r=z("Notifications",Que,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,position:c,autoClose:d,transitionDuration:u,containerWidth:f,notificationMaxHeight:m,limit:p,zIndex:g,store:y,portalProps:v,withinPortal:x,..._}=r,I=ft(),S=YR(y),w=V2(),P=Cs(),$=(0,Vv.useRef)({}),B=(0,Vv.useRef)(0),H=(I.respectReducedMotion?P:!1)?1:u,K=Q({name:"Notifications",classes:iT,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s,vars:l,varsResolver:Yue});(0,Vv.useEffect)(()=>{y?.updateState(E=>({...E,limit:p||5,defaultPosition:c}))},[p,c]),yr(()=>{S.notifications.length>B.current&&setTimeout(()=>w(),0),B.current=S.notifications.length},[S.notifications]);let T=yZ(S.notifications,c),k=oT.reduce((E,C)=>(E[C]=T[C].map(({style:A,...R})=>(0,xo.jsx)(Xue,{timeout:H,onEnter:()=>$.current[R.id].offsetHeight,nodeRef:{current:$.current[R.id]},children:N=>(0,xo.jsx)(nT,{ref:U=>{$.current[R.id]=U},data:R,onHide:U=>Pw(U,y),autoClose:d,...K("notification",{style:{...IZ({state:N,position:C,transitionDuration:H,maxHeight:m}),...A}})})},R.id)),E),{});return(0,xo.jsxs)(kn,{withinPortal:x,...v,children:[(0,xo.jsx)(F,{...K("root"),"data-position":"top-center",ref:t,..._,children:(0,xo.jsx)(wc,{children:k["top-center"]})}),(0,xo.jsx)(F,{...K("root"),"data-position":"top-left",..._,children:(0,xo.jsx)(wc,{children:k["top-left"]})}),(0,xo.jsx)(F,{...K("root",{className:Hi.classNames.fullWidth}),"data-position":"top-right",..._,children:(0,xo.jsx)(wc,{children:k["top-right"]})}),(0,xo.jsx)(F,{...K("root",{className:Hi.classNames.fullWidth}),"data-position":"bottom-right",..._,children:(0,xo.jsx)(wc,{children:k["bottom-right"]})}),(0,xo.jsx)(F,{...K("root"),"data-position":"bottom-left",..._,children:(0,xo.jsx)(wc,{children:k["bottom-left"]})}),(0,xo.jsx)(F,{...K("root"),"data-position":"bottom-center",..._,children:(0,xo.jsx)(wc,{children:k["bottom-center"]})})]})});ca.classes=iT;ca.displayName="@mantine/notifications/Notifications";ca.show=en.show;ca.hide=en.hide;ca.update=en.update;ca.clean=en.clean;ca.cleanQueue=en.cleanQueue;ca.updateState=en.updateState;var ep=b(D(),1),kZ=b(O(),1),aT=ep.createContext(void 0),tp=e=>{let t=ep.useContext(aT);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sT=({client:e,children:t})=>(ep.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,kZ.jsx)(aT.Provider,{value:e,children:t}));var Jue={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Sc,lT,CZ,efe=(CZ=class{constructor(){Re(this,Sc,Jue);Re(this,lT,!1)}setTimeoutProvider(e){me(this,Sc,e)}setTimeout(e,t){return L(this,Sc).setTimeout(e,t)}clearTimeout(e){L(this,Sc).clearTimeout(e)}setInterval(e,t){return L(this,Sc).setInterval(e,t)}clearInterval(e){L(this,Sc).clearInterval(e)}},Sc=new WeakMap,lT=new WeakMap,CZ),Qa=new efe;function PZ(e){setTimeout(e,0)}var dT=typeof window>"u"||"Deno"in globalThis;function Sr(){}function TZ(e,t){return typeof e=="function"?e(t):e}function Ew(e){return typeof e=="number"&&e>=0&&e!==1/0}function $w(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nt(e,t){return typeof e=="function"?e(t):e}function Aw(e,t){let{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(n){if(t.queryHash!==Hv(a,t.options))return!1}else if(!kc(t.queryKey,a))return!1}if(r!=="all"){let l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function Ow(e,t){let{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(yu(t.options.mutationKey)!==yu(i))return!1}else if(!kc(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||o&&!o(t))}function Hv(e,t){return(t?.queryKeyHashFn||yu)(e)}function yu(e){return JSON.stringify(e,(t,r)=>cT(r)?Object.keys(r).sort().reduce((n,o)=>(n[o]=r[o],n),{}):r)}function kc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!kc(e[n],t[n]))return!1;return!0}let r=Object.keys(t);for(let n of r)if(!kc(e[n],t[n]))return!1;return!0}return!1}var tfe=Object.prototype.hasOwnProperty;function uT(e,t,r=0){if(e===t)return e;if(r>500)return t;let n=DZ(e)&&DZ(t);if(!n&&!(cT(e)&&cT(t)))return t;let o=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,s=n?new Array(a):{},l=0;for(let c=0;c<a;c++){let d=n?c:i[c],u=e[d],f=t[d];if(u===f){s[d]=u,(n?c<o:tfe.call(e,d))&&l++;continue}if(u===null||f===null||typeof u!="object"||typeof f!="object"){s[d]=f;continue}let m=uT(u,f,r+1);s[d]=m,m===u&&l++}return o===a&&l===o?e:s}function zw(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function DZ(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function cT(e){if(!RZ(e))return!1;let t=Object.getPrototypeOf(e),r=t?.constructor;if(r===void 0)return!0;if(typeof r!="function")return!1;let n=r.prototype;return!(!RZ(n)||!n.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function RZ(e){return Object.prototype.toString.call(e)==="[object Object]"}function EZ(e){return new Promise(t=>{Qa.setTimeout(t,e)})}function Wv(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?uT(e,t):t}function $Z(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function AZ(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var rp=Symbol();function Nw(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===rp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Fw(e,t){return typeof e=="function"?e(...t):!!e}function OZ(e,t,r){let n=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),n||(n=!0,o.aborted?r():o.addEventListener("abort",r,{once:!0})),o)}),e}var rfe=()=>dT,op=()=>rfe();var Ya=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(){}};var _u,Cc,np,zZ,ofe=(zZ=class extends Ya{constructor(){super();Re(this,_u);Re(this,Cc);Re(this,np);me(this,np,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){L(this,Cc)||this.setEventListener(L(this,np))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Cc))==null||t.call(this),me(this,Cc,void 0))}setEventListener(t){var r;me(this,np,t),(r=L(this,Cc))==null||r.call(this),me(this,Cc,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){L(this,_u)!==t&&(me(this,_u,t),this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){return typeof L(this,_u)=="boolean"?L(this,_u):globalThis.document?.visibilityState!=="hidden"}},_u=new WeakMap,Cc=new WeakMap,np=new WeakMap,zZ),ip=new ofe;var NZ=PZ;function nfe(){let e=[],t=0,r=s=>{s()},n=s=>{s()},o=NZ,i=s=>{t?e.push(s):o(()=>{r(s)})},a=()=>{let s=e;e=[],s.length&&o(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{o=s}}}var Qt=nfe();var ap,Pc,sp,FZ,ife=(FZ=class extends Ya{constructor(){super();Re(this,ap,!0);Re(this,Pc);Re(this,sp);me(this,sp,t=>{if(typeof window<"u"&&window.addEventListener){let r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){L(this,Pc)||this.setEventListener(L(this,sp))}onUnsubscribe(){var t;this.hasListeners()||((t=L(this,Pc))==null||t.call(this),me(this,Pc,void 0))}setEventListener(t){var r;me(this,sp,t),(r=L(this,Pc))==null||r.call(this),me(this,Pc,t(this.setOnline.bind(this)))}setOnline(t){L(this,ap)!==t&&(me(this,ap,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return L(this,ap)}},ap=new WeakMap,Pc=new WeakMap,sp=new WeakMap,FZ),lp=new ife;function afe(e){return Math.min(1e3*2**e,3e4)}function fT(e){return(e??"online")==="online"?lp.isOnline():!0}var Lw=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Mw(e){let t=!1,r=0,n,o="pending",i,a,s=new Promise((x,_)=>{i=x,a=_});s.catch(Sr);let l=()=>o!=="pending",c=x=>{if(!l()){let _=new Lw(x);g(_),e.onCancel?.(_)}},d=()=>{t=!0},u=()=>{t=!1},f=()=>ip.isFocused()&&(e.networkMode==="always"||lp.isOnline())&&e.canRun(),m=()=>fT(e.networkMode)&&e.canRun(),p=x=>{l()||(n?.(),o="resolved",i(x))},g=x=>{l()||(n?.(),o="rejected",a(x))},y=x=>new Promise(_=>{n=I=>{(l()||x())&&_(I)},e.onPause?.()}).then(()=>{n=void 0,l()||e.onContinue?.()}),v=()=>{if(l())return;let x,_=r===0?e.initialPromise:void 0;try{x=_??e.fn()}catch(I){x=Promise.reject(I)}Promise.resolve(x).then(p).catch(I=>{if(l())return;let S=e.retry??(op()?0:3),w=e.retryDelay??afe,P=typeof w=="function"?w(r,I):w,$=S===!0||typeof S=="number"&&r<S||typeof S=="function"&&S(r,I);if(t||!$){g(I);return}r++,e.onFail?.(r,I),EZ(P).then(()=>f()?void 0:y(f)).then(()=>{t?g(I):v()})})};return{promise:s,status:()=>o,cancel:c,continue:()=>(n?.(),s),cancelRetry:d,continueRetry:u,canStart:m,start:()=>(m()?v():y(m).then(v),s)}}var Iu,LZ,Bw=(LZ=class{constructor(){Re(this,Iu)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ew(this.gcTime)&&me(this,Iu,Qa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(op()?1/0:3e5))}clearGcTimeout(){L(this,Iu)!==void 0&&(Qa.clearTimeout(L(this,Iu)),me(this,Iu,void 0))}},Iu=new WeakMap,LZ);function BZ(e){return{onFetch:(t,r)=>{let n=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],a=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},l=0,c=async()=>{let d=!1,u=p=>{OZ(p,()=>t.signal,()=>d=!0)},f=Nw(t.options,t.fetchOptions),m=async(p,g,y)=>{if(d)return Promise.reject(t.signal.reason);if(g==null&&p.pages.length)return Promise.resolve(p);let x=(()=>{let w={client:t.client,queryKey:t.queryKey,pageParam:g,direction:y?"backward":"forward",meta:t.options.meta};return u(w),w})(),_=await f(x),{maxPages:I}=t.options,S=y?AZ:$Z;return{pages:S(p.pages,_,I),pageParams:S(p.pageParams,g,I)}};if(o&&i.length){let p=o==="backward",g=p?sfe:MZ,y={pages:i,pageParams:a};s=await m(y,g(n,y),p)}else{let p=e??i.length;do{let g=l===0?a[0]??n.initialPageParam:MZ(n,s);if(l>0&&g==null)break;s=await m(s,g),l++}while(l<p)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function MZ(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function sfe(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var cp,wu,dp,Di,Su,Lr,Zv,ku,da,el,VZ,HZ=(VZ=class extends Bw{constructor(t){super();Re(this,da);Re(this,cp);Re(this,wu);Re(this,dp);Re(this,Di);Re(this,Su);Re(this,Lr);Re(this,Zv);Re(this,ku);me(this,ku,!1),me(this,Zv,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,Su,t.client),me(this,Di,L(this,Su).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,wu,UZ(this.options)),this.state=t.state??L(this,wu),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return L(this,cp)}get promise(){return L(this,Lr)?.promise}setOptions(t){if(this.options={...L(this,Zv),...t},t?._type&&me(this,cp,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let r=UZ(this.options);r.data!==void 0&&(this.setState(jZ(r.data,r.dataUpdatedAt)),me(this,wu,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&L(this,Di).remove(this)}setData(t,r){let n=Wv(this.state.data,t,this.options);return rt(this,da,el).call(this,{data:n,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),n}setState(t){rt(this,da,el).call(this,{type:"setState",state:t})}cancel(t){let r=L(this,Lr)?.promise;return L(this,Lr)?.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return L(this,wu)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Nt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Nt(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$w(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),L(this,Lr)?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),L(this,Lr)?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),L(this,Di).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){let r=this.observers.indexOf(t);r!==-1&&(this.observers.splice(r,1),this.observers.length||(L(this,Lr)&&(L(this,ku)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?L(this,Lr).cancel({revert:!0}):L(this,Lr).cancelRetry()),this.scheduleGc()),L(this,Di).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,da,el).call(this,{type:"invalidate"})}async fetch(t,r){if(this.state.fetchStatus!=="idle"&&L(this,Lr)?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(L(this,Lr))return L(this,Lr).continueRetry(),L(this,Lr).promise}if(t&&this.setOptions(t),!this.options.queryFn){let c=this.observers.find(d=>d.options.queryFn);c&&this.setOptions(c.options)}let n=new AbortController,o=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(me(this,ku,!0),n.signal)})},i=()=>{let c=Nw(this.options,r),u=(()=>{let f={client:L(this,Su),queryKey:this.queryKey,meta:this.meta};return o(f),f})();return me(this,ku,!1),this.options.persister?this.options.persister(c,u,this):c(u)},s=(()=>{let c={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:L(this,Su),state:this.state,fetchFn:i};return o(c),c})();(L(this,cp)==="infinite"?BZ(this.options.pages):this.options.behavior)?.onFetch(s,this),me(this,dp,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==s.fetchOptions?.meta)&&rt(this,da,el).call(this,{type:"fetch",meta:s.fetchOptions?.meta});let l=me(this,Lr,Mw({initialPromise:r?.initialPromise,fn:s.fetchFn,onCancel:c=>{c instanceof Lw&&c.revert&&this.setState({...L(this,dp),fetchStatus:"idle"}),n.abort()},onFail:(c,d)=>{rt(this,da,el).call(this,{type:"failed",failureCount:c,error:d})},onPause:()=>{rt(this,da,el).call(this,{type:"pause"})},onContinue:()=>{rt(this,da,el).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{let c=await l.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),L(this,Di).config.onSuccess?.(c,this),L(this,Di).config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof Lw){if(c.silent)return L(this,Lr).promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw rt(this,da,el).call(this,{type:"error",error:c}),L(this,Di).config.onError?.(c,this),L(this,Di).config.onSettled?.(this.state.data,c,this),c}finally{L(this,Lr)===l&&me(this,Lr,void 0),this.scheduleGc()}}},cp=new WeakMap,wu=new WeakMap,dp=new WeakMap,Di=new WeakMap,Su=new WeakMap,Lr=new WeakMap,Zv=new WeakMap,ku=new WeakMap,da=new WeakSet,el=function(t){let r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...mT(n.data,this.options),fetchMeta:t.meta??null};case"success":let o={...n,...jZ(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return me(this,dp,t.manual?o:void 0),o;case"error":let i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Qt.batch(()=>{this.observers.slice().forEach(n=>{n.onQueryUpdate()}),L(this,Di).notify({query:this,type:"updated",action:t})})},VZ);function mT(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:fT(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jZ(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function UZ(e){let t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var tn,pt,qv,rn,Cu,up,tl,Kv,fp,mp,Pu,Du,Dc,pp,yt,Gv,pT,hT,gT,vT,xT,bT,yT,_T,GZ,wT=(GZ=class extends Ya{constructor(t,r){super();Re(this,yt);Re(this,tn);Re(this,pt);Re(this,qv);Re(this,rn);Re(this,Cu);Re(this,up);Re(this,tl);Re(this,Kv);Re(this,fp);Re(this,mp);Re(this,Pu);Re(this,Du);Re(this,Dc);Re(this,pp,new Set);this.options=r,me(this,tn,t),me(this,tl,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(L(this,pt).addObserver(this),WZ(L(this,pt),this.options)?rt(this,yt,Gv).call(this):this.updateResult(),rt(this,yt,xT).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return IT(L(this,pt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return IT(L(this,pt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,yt,bT).call(this),rt(this,yt,yT).call(this),L(this,pt).removeObserver(this)}setOptions(t){let r=this.options,n=L(this,pt);if(this.options=L(this,tn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,L(this,pt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,yt,_T).call(this),L(this,pt).setOptions(this.options),r._defaulted&&!zw(this.options,r)&&L(this,tn).getQueryCache().notify({type:"observerOptionsUpdated",query:L(this,pt),observer:this});let o=this.hasListeners();o&&ZZ(L(this,pt),n,this.options,r)&&rt(this,yt,Gv).call(this),this.updateResult(),o&&(L(this,pt)!==n||Nt(this.options.enabled,L(this,pt))!==Nt(r.enabled,L(this,pt))||Nt(this.options.staleTime,L(this,pt))!==Nt(r.staleTime,L(this,pt)))&&rt(this,yt,hT).call(this);let i=rt(this,yt,gT).call(this);o&&(L(this,pt)!==n||Nt(this.options.enabled,L(this,pt))!==Nt(r.enabled,L(this,pt))||i!==L(this,Dc))&&rt(this,yt,vT).call(this,i)}getOptimisticResult(t){let r=L(this,tn).getQueryCache().build(L(this,tn),t),n=this.createResult(r,t);return zw(this.getCurrentResult(),n)||(me(this,rn,n),me(this,up,this.options),me(this,Cu,L(this,pt).state)),n}getCurrentResult(){return L(this,rn)}trackResult(t,r){return new Proxy(t,{get:(n,o)=>(this.trackProp(o),r?.(o),Reflect.get(n,o))})}trackProp(t){L(this,pp).add(t)}getCurrentQuery(){return L(this,pt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let r=L(this,tn).defaultQueryOptions(t),n=L(this,tn).getQueryCache().build(L(this,tn),r),o=()=>{},i,a=new Promise(s=>{i=s,o=L(this,tn).getQueryCache().subscribe(l=>{l.type==="updated"&&l.query.queryHash===n.queryHash&&n.state.data!==void 0&&(o(),s(this.createResult(n,r)))})});return Promise.race([n.fetch().then(()=>{let s=this.createResult(n,r);return i?.(s),s}).finally(()=>{o()}),a])}fetch(t){return rt(this,yt,Gv).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),L(this,rn)))}createResult(t,r){let n=L(this,pt),o=this.options,i=L(this,rn),a=L(this,Cu),s=L(this,up),l=t!==n?t.state:L(this,qv),{state:c}=t,d={...c},u=!1,f;if(r._optimisticResults){let w=this.hasListeners(),P=!w&&WZ(t,r),$=w&&ZZ(t,n,r,o);(P||$)&&(d={...d,...mT(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:p,status:g}=d;f=d.data;let y=!1;if(r.placeholderData!==void 0&&f===void 0&&g==="pending"){let w;i?.isPlaceholderData&&r.placeholderData===s?.placeholderData?(w=i.data,y=!0):w=typeof r.placeholderData=="function"?r.placeholderData(L(this,mp)?.state.data,L(this,mp)):r.placeholderData,w!==void 0&&(g="success",f=Wv(i?.data,w,r),u=!0)}if(r.select&&f!==void 0&&!y)if(i&&f===a?.data&&r.select===L(this,Kv))f=L(this,fp);else try{me(this,Kv,r.select),f=r.select(f),f=Wv(i?.data,f,r),me(this,fp,f),me(this,tl,null)}catch(w){me(this,tl,w)}else f===void 0&&me(this,tl,null);L(this,tl)&&(m=L(this,tl),f=L(this,fp),p=Date.now(),g="error",u=!1);let v=d.fetchStatus==="fetching",x=g==="pending",_=g==="error",I=x&&v,S=f!==void 0;return{status:g,fetchStatus:d.fetchStatus,isPending:x,isSuccess:g==="success",isError:_,isInitialLoading:I,isLoading:I,data:f,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:p,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:_&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:u,isRefetchError:_&&S,isStale:ST(t,r),refetch:this.refetch,isEnabled:Nt(r.enabled,t)!==!1}}updateResult(){let t=L(this,rn),r=this.createResult(L(this,pt),this.options);if(me(this,Cu,L(this,pt).state),me(this,up,this.options),L(this,Cu).data!==void 0&&me(this,mp,L(this,pt)),zw(r,t))return;me(this,rn,r);let o=(()=>{if(!t)return!0;let{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!L(this,pp).size)return!0;let s=new Set(a??L(this,pp));return this.options.throwOnError&&s.add("error"),Object.keys(L(this,rn)).some(l=>{let c=l;return L(this,rn)[c]!==t[c]&&s.has(c)})})();Qt.batch(()=>{o&&this.listeners.forEach(i=>{i(L(this,rn))}),L(this,tn).getQueryCache().notify({query:L(this,pt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,yt,xT).call(this)}},tn=new WeakMap,pt=new WeakMap,qv=new WeakMap,rn=new WeakMap,Cu=new WeakMap,up=new WeakMap,tl=new WeakMap,Kv=new WeakMap,fp=new WeakMap,mp=new WeakMap,Pu=new WeakMap,Du=new WeakMap,Dc=new WeakMap,pp=new WeakMap,yt=new WeakSet,Gv=function(t){rt(this,yt,_T).call(this);let r=L(this,pt).fetch(this.options,t);return t?.throwOnError||(r=r.catch(Sr)),r},pT=function(t){return!op()&&Nt(this.options.enabled,L(this,pt))!==!1&&Ew(t)},hT=function(){rt(this,yt,bT).call(this);let t=Nt(this.options.staleTime,L(this,pt));if(L(this,rn).isStale||!rt(this,yt,pT).call(this,t))return;let r=$w(L(this,rn).dataUpdatedAt,t)+1;me(this,Pu,Qa.setTimeout(()=>{L(this,rn).isStale||this.updateResult()},r))},gT=function(){return Nt(this.options.refetchInterval,L(this,pt))??!1},vT=function(t){rt(this,yt,yT).call(this),me(this,Dc,t),!(L(this,Dc)===0||!rt(this,yt,pT).call(this,L(this,Dc)))&&me(this,Du,Qa.setInterval(()=>{(this.options.refetchIntervalInBackground||ip.isFocused())&&rt(this,yt,Gv).call(this)},L(this,Dc)))},xT=function(){rt(this,yt,hT).call(this),rt(this,yt,vT).call(this,rt(this,yt,gT).call(this))},bT=function(){L(this,Pu)!==void 0&&(Qa.clearTimeout(L(this,Pu)),me(this,Pu,void 0))},yT=function(){L(this,Du)!==void 0&&(Qa.clearInterval(L(this,Du)),me(this,Du,void 0))},_T=function(){let t=L(this,tn).getQueryCache().build(L(this,tn),this.options);if(t===L(this,pt))return;let r=L(this,pt);me(this,pt,t),me(this,qv,t.state),this.hasListeners()&&(r?.removeObserver(this),t.addObserver(this))},GZ);function lfe(e,t){return Nt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Nt(t.retryOnMount,e)===!1)}function WZ(e,t){return lfe(e,t)||e.state.data!==void 0&&IT(e,t,t.refetchOnMount)}function IT(e,t,r){if(Nt(t.enabled,e)!==!1&&Nt(t.staleTime,e)!=="static"){let n=Nt(r,e);return n==="always"||n!==!1&&ST(e,t)}return!1}function ZZ(e,t,r,n){return(e!==t||Nt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&ST(e,r)}function ST(e,t){return Nt(t.enabled,e)!==!1&&e.isStaleByTime(Nt(t.staleTime,e))}var Xv,Ja,Oo,Ru,es,Rc,qZ,KZ=(qZ=class extends Bw{constructor(t){super();Re(this,es);Re(this,Xv);Re(this,Ja);Re(this,Oo);Re(this,Ru);me(this,Xv,t.client),this.mutationId=t.mutationId,me(this,Oo,t.mutationCache),me(this,Ja,[]),this.state=t.state||cfe(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){L(this,Ja).includes(t)||(L(this,Ja).push(t),this.clearGcTimeout(),L(this,Oo).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,Ja,L(this,Ja).filter(r=>r!==t)),this.scheduleGc(),L(this,Oo).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){L(this,Ja).length||(this.state.status==="pending"?this.scheduleGc():L(this,Oo).remove(this))}continue(){return L(this,Ru)?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){let r=()=>{rt(this,es,Rc).call(this,{type:"continue"})},n={client:L(this,Xv),meta:this.options.meta,mutationKey:this.options.mutationKey},o=me(this,Ru,Mw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{rt(this,es,Rc).call(this,{type:"failed",failureCount:s,error:l})},onPause:()=>{rt(this,es,Rc).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>L(this,Oo).canRun(this)})),i=this.state.status==="pending",a=!o.canStart();try{if(i)r();else{rt(this,es,Rc).call(this,{type:"pending",variables:t,isPaused:a}),L(this,Oo).config.onMutate&&await L(this,Oo).config.onMutate(t,this,n);let l=await this.options.onMutate?.(t,n);l!==this.state.context&&rt(this,es,Rc).call(this,{type:"pending",context:l,variables:t,isPaused:a})}let s=await o.start();return await L(this,Oo).config.onSuccess?.(s,t,this.state.context,this,n),await this.options.onSuccess?.(s,t,this.state.context,n),await L(this,Oo).config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,t,this.state.context,n),rt(this,es,Rc).call(this,{type:"success",data:s}),s}catch(s){try{await L(this,Oo).config.onError?.(s,t,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,t,this.state.context,n)}catch(l){Promise.reject(l)}try{await L(this,Oo).config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,t,this.state.context,n)}catch(l){Promise.reject(l)}throw rt(this,es,Rc).call(this,{type:"error",error:s}),s}finally{L(this,Ru)===o&&me(this,Ru,void 0),L(this,Oo).runNext(this)}}},Xv=new WeakMap,Ja=new WeakMap,Oo=new WeakMap,Ru=new WeakMap,es=new WeakSet,Rc=function(t){let r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Qt.batch(()=>{L(this,Ja).forEach(n=>{n.onMutationUpdate(t)}),L(this,Oo).notify({mutation:this,type:"updated",action:t})})},qZ);function cfe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var rl,ua,Qv,XZ,QZ=(XZ=class extends Ya{constructor(t={}){super();Re(this,rl);Re(this,ua);Re(this,Qv);this.config=t,me(this,rl,new Set),me(this,ua,new Map),me(this,Qv,0)}build(t,r,n){let o=new KZ({client:t,mutationCache:this,mutationId:++Fh(this,Qv)._,options:t.defaultMutationOptions(r),state:n});return this.add(o),o}add(t){L(this,rl).add(t);let r=jw(t);if(typeof r=="string"){let n=L(this,ua).get(r);n?n.push(t):L(this,ua).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(L(this,rl).delete(t)){let r=jw(t);if(typeof r=="string"){let n=L(this,ua).get(r);if(n)if(n.length>1){let o=n.indexOf(t);o!==-1&&n.splice(o,1)}else n[0]===t&&L(this,ua).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){let r=jw(t);if(typeof r=="string"){let n=L(this,ua).get(r)?.find(o=>o.state.status==="pending");return!n||n===t}else return!0}runNext(t){let r=jw(t);return typeof r=="string"?L(this,ua).get(r)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Qt.batch(()=>{L(this,rl).forEach(t=>{this.notify({type:"removed",mutation:t})}),L(this,rl).clear(),L(this,ua).clear()})}getAll(){return Array.from(L(this,rl))}find(t){let r={exact:!0,...t};return this.getAll().find(n=>Ow(r,n))}findAll(t={}){return this.getAll().filter(r=>Ow(t,r))}notify(t){Qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){let t=this.getAll().filter(r=>r.state.isPaused);return Qt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Sr))))}},rl=new WeakMap,ua=new WeakMap,Qv=new WeakMap,XZ);function jw(e){return e.options.scope?.id}var ts,YZ,JZ=(YZ=class extends Ya{constructor(t={}){super();Re(this,ts);this.config=t,me(this,ts,new Map)}build(t,r,n){let o=r.queryKey,i=r.queryHash??Hv(o,r),a=this.get(i);return a||(a=new HZ({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){L(this,ts).has(t.queryHash)||(L(this,ts).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){L(this,ts).get(t.queryHash)===t&&(t.destroy(),L(this,ts).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return L(this,ts).get(t)}getAll(){return[...L(this,ts).values()]}find(t){let r={exact:!0,...t};return this.getAll().find(n=>Aw(r,n))}findAll(t={}){let r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Aw(t,n)):r}notify(t){Qt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ts=new WeakMap,YZ);var fr,Tc,Ec,hp,gp,$c,vp,xp,eG,kT=(eG=class{constructor(e={}){Re(this,fr);Re(this,Tc);Re(this,Ec);Re(this,hp);Re(this,gp);Re(this,$c);Re(this,vp);Re(this,xp);me(this,fr,e.queryCache||new JZ),me(this,Tc,e.mutationCache||new QZ),me(this,Ec,e.defaultOptions||{}),me(this,hp,new Map),me(this,gp,new Map),me(this,$c,0)}mount(){Fh(this,$c)._++,L(this,$c)===1&&(me(this,vp,ip.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,fr).onFocus())})),me(this,xp,lp.subscribe(async e=>{e&&(await this.resumePausedMutations(),L(this,fr).onOnline())})))}unmount(){var e,t;Fh(this,$c)._--,L(this,$c)===0&&((e=L(this,vp))==null||e.call(this),me(this,vp,void 0),(t=L(this,xp))==null||t.call(this),me(this,xp,void 0))}isFetching(e){return L(this,fr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return L(this,Tc).findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,fr).get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=L(this,fr).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Nt(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return L(this,fr).findAll(e).map(({queryKey:t,state:r})=>[t,r.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),o=L(this,fr).get(n.queryHash)?.state.data,i=TZ(t,o);if(i!==void 0)return L(this,fr).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Qt.batch(()=>L(this,fr).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return L(this,fr).get(t.queryHash)?.state}removeQueries(e){let t=L(this,fr);Qt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){let r=L(this,fr);return Qt.batch(()=>{let n=r.findAll(e),o=new Set(n);return n.forEach(i=>{i.reset()}),this.refetchQueries({type:"active",predicate:i=>o.has(i)},t)})}cancelQueries(e,t={}){let r={revert:!0,...t},n=Qt.batch(()=>L(this,fr).findAll(e).map(o=>o.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return Qt.batch(()=>(L(this,fr).findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0},n=Qt.batch(()=>L(this,fr).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let i=o.fetch(void 0,r);return r.throwOnError||(i=i.catch(Sr)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Sr)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,fr).build(this,t),n=r.isStaleByTime(Nt(t.staleTime,r))?await r.fetch(t):r.state.data,o=t.select;return o?o(n):n}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=L(this,fr).build(this,t);return r.isStaleByTime(Nt(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return lp.isOnline()?L(this,Tc).resumePausedMutations():Promise.resolve()}getQueryCache(){return L(this,fr)}getMutationCache(){return L(this,Tc)}getDefaultOptions(){return L(this,Ec)}setDefaultOptions(e){me(this,Ec,e)}setQueryDefaults(e,t){L(this,hp).set(yu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...L(this,hp).values()],r={};return t.forEach(n=>{kc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){L(this,gp).set(yu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...L(this,gp).values()],r={};return t.forEach(n=>{kc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...L(this,Ec).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Hv(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===rp&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...L(this,Ec).mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){L(this,fr).clear(),L(this,Tc).clear()}},fr=new WeakMap,Tc=new WeakMap,Ec=new WeakMap,hp=new WeakMap,gp=new WeakMap,$c=new WeakMap,vp=new WeakMap,xp=new WeakMap,eG);var Uw=b(D(),1),tG=Uw.createContext(!1),rG=()=>Uw.useContext(tG),Pdt=tG.Provider;var Yv=b(D(),1),dfe=b(O(),1);function ufe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ffe=Yv.createContext(ufe()),oG=()=>Yv.useContext(ffe);var nG=b(D(),1);var iG=(e,t,r)=>{let n=r?.state.error&&typeof e.throwOnError=="function"?Fw(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||n)&&(t.isReset()||(e.retryOnMount=!1))},aG=e=>{nG.useEffect(()=>{e.clearReset()},[e])},sG=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(o&&e.data===void 0||Fw(r,[e.error,n]));var lG=e=>{if(e.suspense){let r=o=>o==="static"?o:Math.max(o??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...o)=>r(n(...o)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},cG=(e,t)=>e?.suspense&&t.isPending,dG=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});var Ac=b(D(),1);function uG(e,t,r){let n=rG(),o=oG(),i=tp(r),a=i.defaultQueryOptions(e),s=i.getQueryCache().get(a.queryHash),l=e.subscribed!==!1;a._optimisticResults=n?"isRestoring":l?"optimistic":void 0,lG(a),iG(a,o,s),aG(o);let[c]=Ac.useState(()=>new t(i,a)),d=c.getOptimisticResult(a),u=!n&&l;if(Ac.useSyncExternalStore(Ac.useCallback(f=>{let m=u?c.subscribe(Qt.batchCalls(f)):Sr;return c.updateResult(),m},[c,u]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),Ac.useEffect(()=>{c.setOptions(a)},[a,c]),cG(a,d))throw dG(a,c,o);if(sG({result:d,errorResetBoundary:o,throwOnError:a.throwOnError,query:s,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:c.trackResult(d)}function CT(e,t){return uG(e,wT,t)}var Kre=b(mG(),1);var l2=b(D(),1);var h={};Is(h,{$brand:()=>jT,$input:()=>uA,$output:()=>dA,INVALID:()=>an,NEVER:()=>BT,TimePrecision:()=>IA,ZodAny:()=>cO,ZodArray:()=>mO,ZodBase64:()=>L1,ZodBase64URL:()=>M1,ZodBigInt:()=>rh,ZodBigIntFormat:()=>U1,ZodBoolean:()=>th,ZodCIDRv4:()=>N1,ZodCIDRv6:()=>F1,ZodCUID:()=>R1,ZodCUID2:()=>T1,ZodCatch:()=>OO,ZodCodec:()=>Gx,ZodCompileAsyncError:()=>ma,ZodCompileUnsupportedError:()=>it,ZodCreditCard:()=>tO,ZodCustom:()=>qx,ZodCustomStringFormat:()=>Gu,ZodDate:()=>jx,ZodDefault:()=>DO,ZodDiscriminatedUnion:()=>hO,ZodE164:()=>B1,ZodEmail:()=>k1,ZodEmoji:()=>P1,ZodEnum:()=>Yp,ZodError:()=>Dge,ZodExactOptional:()=>Z1,ZodFile:()=>SO,ZodFirstPartyTypeKind:()=>qO,ZodFunction:()=>HO,ZodGUID:()=>C1,ZodIBAN:()=>rO,ZodIPv4:()=>O1,ZodIPv6:()=>z1,ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,ZodInstanceOf:()=>GO,ZodIntersection:()=>gO,ZodIssueCode:()=>Ege,ZodJWT:()=>j1,ZodKSUID:()=>A1,ZodLazy:()=>jO,ZodLiteral:()=>wO,ZodMAC:()=>eO,ZodMap:()=>_O,ZodNaN:()=>NO,ZodNanoID:()=>D1,ZodNever:()=>uO,ZodNonOptional:()=>G1,ZodNull:()=>sO,ZodNullable:()=>PO,ZodNumber:()=>eh,ZodNumberFormat:()=>qu,ZodObject:()=>Vx,ZodOptional:()=>Wx,ZodPipe:()=>Zx,ZodPrefault:()=>TO,ZodPreprocess:()=>FO,ZodPromise:()=>VO,ZodReadonly:()=>LO,ZodRealError:()=>An,ZodRecord:()=>Qp,ZodSet:()=>IO,ZodString:()=>Jp,ZodStringFormat:()=>Tt,ZodSuccess:()=>AO,ZodSymbol:()=>iO,ZodTemplateLiteral:()=>BO,ZodTransform:()=>kO,ZodTuple:()=>xO,ZodType:()=>qe,ZodULID:()=>E1,ZodURL:()=>Bx,ZodUUID:()=>is,ZodUndefined:()=>aO,ZodUnion:()=>Hx,ZodUnknown:()=>dO,ZodVoid:()=>fO,ZodXID:()=>$1,ZodXor:()=>pO,_ZodString:()=>S1,_default:()=>RO,_function:()=>GX,any:()=>SX,array:()=>Ux,base64:()=>nX,base64url:()=>iX,bigint:()=>bX,boolean:()=>nO,catch:()=>zO,check:()=>qX,cidrv4:()=>rX,cidrv6:()=>oX,clone:()=>wt,codec:()=>VX,coerce:()=>XO,compile:()=>hA,config:()=>gr,core:()=>sl,creditCard:()=>sX,cuid:()=>qK,cuid2:()=>KK,currencyCode:()=>mX,custom:()=>KX,date:()=>CX,decode:()=>G5,decodeAsync:()=>K5,deepPartial:()=>lQ,describe:()=>XX,discriminatedUnion:()=>$X,e164:()=>aX,email:()=>LK,emoji:()=>ZK,encode:()=>Z5,encodeAsync:()=>q5,endsWith:()=>Bp,enum:()=>H1,exactOptional:()=>CO,file:()=>MX,flattenError:()=>cx,float32:()=>hX,float64:()=>gX,formatError:()=>dx,fromJSONSchema:()=>aQ,function:()=>GX,getDiscriminatedOption:()=>L$,getErrorMap:()=>Age,globalRegistry:()=>yo,gt:()=>os,gte:()=>Yn,guid:()=>MK,hash:()=>pX,hex:()=>fX,hostname:()=>uX,httpUrl:()=>WK,iban:()=>lX,includes:()=>Lp,input:()=>dQ,instanceof:()=>YX,int:()=>I1,int32:()=>vX,int64:()=>yX,intersection:()=>vO,invertCodec:()=>HX,ipv4:()=>JK,ipv6:()=>tX,iso:()=>Kx,json:()=>eQ,jwt:()=>cX,keyof:()=>PX,ksuid:()=>YK,lazy:()=>UO,length:()=>Uu,literal:()=>LX,locales:()=>Tx,looseObject:()=>TX,looseRecord:()=>OX,lowercase:()=>Np,lt:()=>rs,lte:()=>Qn,mac:()=>eX,map:()=>zX,maxLength:()=>ju,maxSize:()=>Lc,memoizer:()=>Dx,meta:()=>QX,mime:()=>Up,minLength:()=>al,minSize:()=>ns,multipleOf:()=>Fc,nan:()=>UX,nanoid:()=>GK,nativeEnum:()=>FX,negative:()=>u1,never:()=>V1,nonnegative:()=>m1,nonoptional:()=>$O,nonpositive:()=>f1,normalize:()=>Vp,null:()=>lO,nullable:()=>Mx,nullish:()=>BX,number:()=>oO,object:()=>DX,optional:()=>Wu,output:()=>uQ,overwrite:()=>pa,parse:()=>U5,parseAsync:()=>V5,partialRecord:()=>AX,pipe:()=>w1,positive:()=>d1,prefault:()=>EO,preprocess:()=>tQ,prettifyError:()=>WT,promise:()=>ZX,properties:()=>jp,property:()=>p1,readonly:()=>MO,record:()=>yO,refine:()=>WO,regex:()=>zp,regexes:()=>Ei,registry:()=>MS,safeDecode:()=>Q5,safeDecodeAsync:()=>J5,safeEncode:()=>X5,safeEncodeAsync:()=>Y5,safeParse:()=>H5,safeParseAsync:()=>W5,set:()=>NX,setErrorMap:()=>$ge,size:()=>Bu,slugify:()=>Gp,startsWith:()=>Mp,strictObject:()=>RX,string:()=>Lx,stringFormat:()=>dX,stringbool:()=>JX,success:()=>jX,superRefine:()=>ZO,symbol:()=>IX,templateLiteral:()=>WX,toJSONSchema:()=>x1,toLowerCase:()=>Wp,toUpperCase:()=>Zp,toZod:()=>Jv,transform:()=>W1,treeifyError:()=>HT,trim:()=>Hp,tuple:()=>bO,uint32:()=>xX,uint64:()=>_X,ulid:()=>XK,undefined:()=>wX,union:()=>oh,unknown:()=>Hu,uppercase:()=>Fp,url:()=>HK,util:()=>J,uuid:()=>BK,uuidv4:()=>jK,uuidv6:()=>UK,uuidv7:()=>VK,validate:()=>ux,validateAsync:()=>fx,void:()=>kX,withParser:()=>BS,xid:()=>QK,xor:()=>EX});var sl={};Is(sl,{$ZodAny:()=>T$,$ZodArray:()=>z$,$ZodAsyncError:()=>En,$ZodBase64:()=>x$,$ZodBase64URL:()=>b$,$ZodBigInt:()=>kS,$ZodBigIntFormat:()=>C$,$ZodBoolean:()=>Ix,$ZodCIDRv4:()=>g$,$ZodCIDRv6:()=>v$,$ZodCUID:()=>n$,$ZodCUID2:()=>i$,$ZodCatch:()=>eA,$ZodCheck:()=>$t,$ZodCheckBigIntFormat:()=>EE,$ZodCheckEndsWith:()=>VE,$ZodCheckGreaterThan:()=>cS,$ZodCheckIncludes:()=>jE,$ZodCheckLengthEquals:()=>FE,$ZodCheckLessThan:()=>lS,$ZodCheckLowerCase:()=>ME,$ZodCheckMaxLength:()=>zE,$ZodCheckMaxSize:()=>$E,$ZodCheckMimeType:()=>ZE,$ZodCheckMinLength:()=>NE,$ZodCheckMinSize:()=>AE,$ZodCheckMultipleOf:()=>RE,$ZodCheckNumberFormat:()=>TE,$ZodCheckOverwrite:()=>GE,$ZodCheckProperties:()=>WE,$ZodCheckProperty:()=>HE,$ZodCheckRegex:()=>LE,$ZodCheckSizeEquals:()=>OE,$ZodCheckStartsWith:()=>UE,$ZodCheckStringFormat:()=>Tp,$ZodCheckUpperCase:()=>BE,$ZodCodec:()=>Sx,$ZodCreditCard:()=>_$,$ZodCustom:()=>sA,$ZodCustomStringFormat:()=>S$,$ZodCyclicError:()=>$S,$ZodDate:()=>O$,$ZodDefault:()=>X$,$ZodDiscriminatedUnion:()=>M$,$ZodE164:()=>y$,$ZodEmail:()=>YE,$ZodEmoji:()=>r$,$ZodEncodeError:()=>Nc,$ZodEnum:()=>H$,$ZodError:()=>lx,$ZodExactOptional:()=>q$,$ZodFile:()=>Z$,$ZodFunction:()=>iA,$ZodGUID:()=>XE,$ZodIBAN:()=>I$,$ZodIPv4:()=>m$,$ZodIPv6:()=>p$,$ZodISODate:()=>d$,$ZodISODateTime:()=>c$,$ZodISODuration:()=>f$,$ZodISOTime:()=>u$,$ZodIntersection:()=>B$,$ZodJWT:()=>w$,$ZodKSUID:()=>l$,$ZodLazy:()=>kx,$ZodLiteral:()=>W$,$ZodMAC:()=>h$,$ZodMap:()=>U$,$ZodNaN:()=>tA,$ZodNanoID:()=>o$,$ZodNever:()=>$$,$ZodNonOptional:()=>Y$,$ZodNull:()=>R$,$ZodNullable:()=>K$,$ZodNumber:()=>SS,$ZodNumberFormat:()=>k$,$ZodObject:()=>qG,$ZodObjectJIT:()=>N$,$ZodOptional:()=>PS,$ZodPipe:()=>DS,$ZodPrefault:()=>Q$,$ZodPreprocess:()=>rA,$ZodPromise:()=>aA,$ZodReadonly:()=>oA,$ZodRealError:()=>$n,$ZodRecord:()=>j$,$ZodRegistry:()=>LS,$ZodSet:()=>V$,$ZodString:()=>zu,$ZodStringFormat:()=>St,$ZodSuccess:()=>J$,$ZodSymbol:()=>P$,$ZodTemplateLiteral:()=>nA,$ZodTransform:()=>G$,$ZodTuple:()=>CS,$ZodType:()=>je,$ZodULID:()=>a$,$ZodURL:()=>t$,$ZodUUID:()=>QE,$ZodUndefined:()=>D$,$ZodUnion:()=>wx,$ZodUnknown:()=>E$,$ZodVoid:()=>A$,$ZodXID:()=>s$,$ZodXor:()=>F$,$brand:()=>jT,$constructor:()=>j,$input:()=>uA,$output:()=>dA,Doc:()=>Ou,INVALID:()=>an,JSONSchema:()=>zK,JSONSchemaGenerator:()=>b1,NEVER:()=>BT,TimePrecision:()=>IA,URL_BAD_FORMAT:()=>JE,URL_UNPARSEABLE:()=>vx,ZodCompileAsyncError:()=>ma,ZodCompileUnsupportedError:()=>it,_any:()=>MA,_array:()=>ZA,_base64:()=>a1,_base64url:()=>s1,_bigint:()=>$A,_boolean:()=>TA,_catch:()=>gge,_check:()=>bK,_cidrv4:()=>n1,_cidrv6:()=>i1,_coercedBigint:()=>AA,_coercedBoolean:()=>EA,_coercedDate:()=>HA,_coercedNumber:()=>SA,_coercedString:()=>xA,_creditCard:()=>yA,_cuid:()=>QS,_cuid2:()=>YS,_custom:()=>qA,_date:()=>VA,_decode:()=>Qw,_decodeAsync:()=>Jw,_default:()=>mge,_discriminatedUnion:()=>tge,_e164:()=>l1,_email:()=>VS,_emoji:()=>KS,_encode:()=>Xw,_encodeAsync:()=>Yw,_endsWith:()=>Bp,_enum:()=>sge,_file:()=>GA,_float32:()=>CA,_float64:()=>PA,_gt:()=>os,_gte:()=>Yn,_guid:()=>HS,_iban:()=>_A,_includes:()=>Lp,_int:()=>kA,_int32:()=>DA,_int64:()=>OA,_intersection:()=>rge,_ipv4:()=>r1,_ipv6:()=>o1,_isoDate:()=>Ax,_isoDateTime:()=>$x,_isoDuration:()=>zx,_isoTime:()=>Ox,_jwt:()=>c1,_ksuid:()=>t1,_lazy:()=>yge,_length:()=>Uu,_literal:()=>cge,_lowercase:()=>Np,_lt:()=>rs,_lte:()=>Qn,_mac:()=>bA,_map:()=>ige,_max:()=>Qn,_maxLength:()=>ju,_maxSize:()=>Lc,_mime:()=>Up,_min:()=>Yn,_minLength:()=>al,_minSize:()=>ns,_multipleOf:()=>Fc,_nan:()=>WA,_nanoid:()=>XS,_nativeEnum:()=>lge,_negative:()=>u1,_never:()=>jA,_nonnegative:()=>m1,_nonoptional:()=>pge,_nonpositive:()=>f1,_normalize:()=>Vp,_null:()=>LA,_nullable:()=>fge,_number:()=>wA,_optional:()=>uge,_overwrite:()=>pa,_parse:()=>kp,_parseAsync:()=>Pp,_pipe:()=>vge,_positive:()=>d1,_promise:()=>_ge,_properties:()=>jp,_property:()=>p1,_readonly:()=>xge,_record:()=>nge,_refine:()=>KA,_regex:()=>zp,_safeDecode:()=>tS,_safeDecodeAsync:()=>oS,_safeEncode:()=>eS,_safeEncodeAsync:()=>rS,_safeParse:()=>Dp,_safeParseAsync:()=>Rp,_set:()=>age,_size:()=>Bu,_slugify:()=>Gp,_startsWith:()=>Mp,_string:()=>vA,_stringFormat:()=>Vu,_stringbool:()=>JA,_success:()=>hge,_superRefine:()=>XA,_symbol:()=>NA,_templateLiteral:()=>bge,_toLowerCase:()=>Wp,_toUpperCase:()=>Zp,_transform:()=>dge,_trim:()=>Hp,_tuple:()=>oge,_uint32:()=>RA,_uint64:()=>zA,_ulid:()=>JS,_undefined:()=>FA,_union:()=>Jhe,_unknown:()=>BA,_uppercase:()=>Fp,_url:()=>Ex,_uuid:()=>WS,_uuidv4:()=>ZS,_uuidv6:()=>GS,_uuidv7:()=>qS,_void:()=>UA,_xid:()=>e1,_xor:()=>ege,base64Charset:()=>bS,base64urlCharset:()=>_x,canParseURL:()=>e$,clone:()=>wt,compile:()=>hA,compileFn:()=>jS,config:()=>gr,createStandardJSONSchemaMethod:()=>qp,createToJSONSchemaMethod:()=>t5,decode:()=>ome,decodeAsync:()=>ime,describe:()=>QA,encode:()=>rme,encodeAsync:()=>nme,extractDefs:()=>Bc,finalize:()=>jc,flattenError:()=>cx,formatError:()=>dx,getDiscriminatedOption:()=>L$,globalConfig:()=>eo,globalRegistry:()=>yo,handleUnrepresentable:()=>Mr,initializeContext:()=>Mc,isBackEdge:()=>OS,isRecursiveSchema:()=>AS,isValidBase64:()=>yx,isValidBase64URL:()=>yS,isValidCIDRv6:()=>xS,isValidCreditCard:()=>_S,isValidIBAN:()=>IS,isValidIPv6:()=>bx,isValidJWT:()=>wS,locales:()=>Tx,memoizer:()=>Dx,mergeValues:()=>Ep,meta:()=>YA,parse:()=>Cp,parseAsync:()=>Kw,parseURLObject:()=>WG,prettifyError:()=>WT,process:()=>kt,processSchema:()=>kt,regexes:()=>Ei,registry:()=>MS,safeDecode:()=>sme,safeDecodeAsync:()=>cme,safeEncode:()=>ame,safeEncodeAsync:()=>lme,safeParse:()=>Qfe,safeParseAsync:()=>Yfe,standardProps:()=>pS,stripTabAndNewline:()=>xx,toDotPath:()=>SG,toJSONSchema:()=>x1,toZod:()=>Jv,treeifyError:()=>HT,urlHostnameOk:()=>gS,urlProtocolOk:()=>vS,util:()=>J,validate:()=>ux,validateAsync:()=>fx,validateURL:()=>hS,version:()=>qE,withParser:()=>BS});var J={};Is(J,{BIGINT_FORMAT_RANGES:()=>nx,CONSTANT_CATCH:()=>Gw,Class:()=>TT,NUMBER_FORMAT_RANGES:()=>ox,aborted:()=>nn,allowsEval:()=>AT,assert:()=>vfe,assertEqual:()=>mfe,assertIs:()=>hfe,assertNever:()=>gfe,assertNotEqual:()=>pfe,assignProp:()=>bo,attachSchema:()=>Zw,base64ToUint8Array:()=>xG,base64urlToUint8Array:()=>Nfe,cached:()=>Ip,captureStackTrace:()=>Hw,cleanEnum:()=>zfe,cleanRegex:()=>nl,clone:()=>wt,cloneDef:()=>yfe,codePointLength:()=>$u,constantCatch:()=>LT,createTransparentProxy:()=>Cfe,defineLazy:()=>ET,defineLazyInternal:()=>Xe,derived:()=>Bfe,esc:()=>on,escapeRegex:()=>Ti,explicitlyAborted:()=>NT,extend:()=>Rfe,finalizeIssue:()=>Tn,floatSafeRemainder:()=>ex,getElementAtPath:()=>_fe,getEnumValues:()=>yp,getLengthableOrigin:()=>ax,getParsedType:()=>kfe,getSizableOrigin:()=>ix,hexToUint8Array:()=>Lfe,hide:()=>sx,installLazyProp:()=>Hfe,isObject:()=>Eu,isPlainObject:()=>Ri,issue:()=>Sp,joinValues:()=>V,jsonStringifyReplacer:()=>_p,members:()=>FT,merge:()=>Efe,mergeDefs:()=>fa,normalizeParams:()=>ae,nullish:()=>Vw,numKeys:()=>Sfe,objectClone:()=>xfe,omit:()=>Dfe,optionalKeys:()=>zT,own:()=>zc,parsedType:()=>te,partial:()=>$fe,pick:()=>Pfe,prefixIssues:()=>Rn,primitiveTypes:()=>OT,promiseAllObject:()=>Ife,propertyKeyTypes:()=>rx,randomString:()=>wfe,rawShape:()=>wp,required:()=>Afe,safeExtend:()=>Tfe,shallowClone:()=>tx,slugify:()=>$T,stringifyPrimitive:()=>ee,toZod:()=>Jv,uint8ArrayToBase64:()=>bG,uint8ArrayToBase64url:()=>Ffe,uint8ArrayToHex:()=>Mfe,unwrapMessage:()=>bp});function mfe(e){return e}function pfe(e){return e}function Jv(){return e=>e}function hfe(e){}function gfe(e){throw new Error("Unexpected value in exhaustive check")}function vfe(e){}function yp(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function V(e,t="|"){return e.map(r=>ee(r)).join(t)}function _p(e,t){return typeof t=="bigint"?t.toString():t}var RT=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function Ip(e){return new RT(e)}function Vw(e){return e==null}function nl(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ex(e,t){let r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}var pG=Symbol("evaluating");function ET(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==pG)return n===void 0&&(n=pG,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function xfe(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function bo(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function wp(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function ol(e){return wp(e._zod.def)??e._zod.def.shape}function hG(e,t,r){Object.defineProperty(e,t,{get(){let n=r();return bo(this,t,n),n},enumerable:!0,configurable:!0})}function gG(e,t,r){t in e?bo(e,t,r):e[t]=r}function Tu(e,t,r,n){let o=ol(t);for(let i of r){let a=Object.getOwnPropertyDescriptor(o,i);a.enumerable&&(a.get?hG(e,i,()=>{let s=t._zod.def.shape[i];return n?n(s,i):s}):gG(e,i,n?n(a.value,i):a.value))}}function bfe(e,t){for(let r of Reflect.ownKeys(t)){let n=Object.getOwnPropertyDescriptor(t,r);n.enumerable&&(n.get?hG(e,r,()=>t[r]):gG(e,r,n.value))}}function fa(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function yfe(e){return fa(e._zod.def)}function _fe(e,t){return t?t.reduce((r,n)=>r?.[n],e):e}function Ife(e){let t=Object.keys(e),r=t.map(n=>e[n]);return Promise.all(r).then(n=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=n[i];return o})}function wfe(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<e;n++)r+=t[Math.floor(Math.random()*t.length)];return r}function on(e){return JSON.stringify(e)}function $T(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Hw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Eu(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var AT=Ip(()=>{if(eo.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ri(e){if(Eu(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Eu(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function tx(e){return Ri(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Sfe(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var kfe=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},rx=new Set(["string","number","symbol"]),OT=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ti(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function wt(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function ae(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Cfe(e){let t;return new Proxy({},{get(r,n,o){return t??(t=e()),Reflect.get(t,n,o)},set(r,n,o,i){return t??(t=e()),Reflect.set(t,n,o,i)},has(r,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(r,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(r,n,o){return t??(t=e()),Reflect.defineProperty(t,n,o)}})}function ee(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function zT(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var ox={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]},nx={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Pfe(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i={};return Tu(i,e,Ww(e,t)),wt(e,fa(r,{shape:i,checks:[]}))}function Ww(e,t){let r=ol(e),n=[];for(let o of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);t[o]&&n.push(o)}return n}function Dfe(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=new Set(Ww(e,t)),a={};return Tu(a,e,Reflect.ownKeys(ol(e)).filter(s=>!i.has(s))),wt(e,fa(r,{shape:a,checks:[]}))}function Rfe(e,t){if(!Ri(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let o=ol(e);for(let i of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(o,i)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return wt(e,fa(e._zod.def,{shape:vG(e,t)}))}function vG(e,t){let r={};return Tu(r,e,Reflect.ownKeys(ol(e))),bfe(r,t),r}function Tfe(e,t){if(!Ri(t))throw new Error("Invalid input to safeExtend: expected a plain object");return wt(e,fa(e._zod.def,{shape:vG(e,t)}))}function Efe(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Tu(r,e,Reflect.ownKeys(ol(e))),Tu(r,t,Reflect.ownKeys(ol(t)));let n=fa(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return wt(e,n)}function $fe(e,t,r,n="partial"){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);let s=r?new Set(Ww(t,r)):void 0,l={};return Tu(l,t,Reflect.ownKeys(ol(t)),e&&((c,d)=>s&&!s.has(d)?c:new e({type:"optional",innerType:c}))),wt(t,fa(t._zod.def,{shape:l,checks:[]}))}function Afe(e,t,r){let n=r?new Set(Ww(t,r)):void 0,o={};return Tu(o,t,Reflect.ownKeys(ol(t)),(i,a)=>n&&!n.has(a)?i:new e({type:"nonoptional",innerType:i})),wt(t,fa(t._zod.def,{shape:o}))}function nn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function NT(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function Rn(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function bp(e){return typeof e=="string"?e:e?.message}function Zw(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function Tn(e,t,r){var n;let o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);let i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:bp(e.inst?._zod.def?.error?.(e))??bp(i?.(e))??bp(t?.error?.(e))??bp(r.customError?.(e))??bp(r.localeError?.(e))??"Invalid input",s={};for(let l of Object.keys(e))l==="inst"||l==="schema"||l==="continue"||l==="input"||l==="__proto__"||(s[l]=e[l]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function ix(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var Ofe=/[\uD800-\uDBFF]/;function $u(e){let t=e.length;if(!Ofe.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function ax(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function te(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Sp(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function zfe(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function xG(e){let t=atob(e),r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return r}function bG(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function Nfe(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return xG(t+r)}function Ffe(e){return bG(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Lfe(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let n=0;n<t.length;n+=2)r[n/2]=Number.parseInt(t.slice(n,n+2),16);return r}function Mfe(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var TT=class{constructor(...t){}};function FT(e,t){for(let r in t){let n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):jfe(e,r,n.value)}}function zc(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function sx(e,t,r){return zc(e,t,r,!1)}function Bfe(e,t){for(let r in e){let n=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return zc(this,r,n(this))},set(o){zc(this,r,o)}})}return t}function jfe(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:zc(this,t,r.bind(this))},set(n){zc(this,t,n)}})}function Ufe(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var DT,Oc=!1,Vfe={configurable:!0,get(){Oc=!0}};function Xe(e,t,r){let n=Object.getPrototypeOf(e._zod);if(t in n&&DT!==e._zod){DT=void 0;return}DT=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,Vfe);let o=Oc;Oc=!1;try{let i=r(this);return Oc?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),Oc=Oc||o,i}catch(i){throw delete this[t],Oc=Oc||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function Hfe(e,t,r,n){let o=Ufe(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){let i={configurable:!0,writable:!0,enumerable:n,value:void 0};return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var Gw="~constantCatch";function LT(e){let t=()=>e;return t[Gw]=!0,t}var yG,BT=Object.freeze({status:"aborted"}),MT={value:void 0,enumerable:!1},_G="captureStackTrace"in Error?Error:null;function Wfe(e){let t=_G;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return _G=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function j(e,t,r,n){let o={};function i(f){this.def=f,this.constr=u,this.traits=new Set}i.prototype=o;let a=r,s=a&&new WeakSet;function l(f,m){if(f._zod){if(f._zod.traits.has(e))return}else{MT.value=new i(m);try{Object.defineProperty(f,"_zod",MT)}finally{MT.value=void 0}}if(f._zod.traits.add(e),t(f,m),s){let g=Object.getPrototypeOf(f),y=f._zod.constr.prototype,v=g;for(;v&&v!==y;)v=Object.getPrototypeOf(v);let x=v??g;s.has(x)||(s.add(x),FT(x,a))}let p=u.prototype;for(let g in p)Object.prototype.hasOwnProperty.call(p,g)&&(g in f||(f[g]=p[g].bind(f)))}let c=n?.Parent??Object;class d extends c{}Object.defineProperty(d,"name",{value:e});function u(f){let m=n?.Parent?Wfe(d):this;l(m,f);let p=m._zod.deferred;if(p){for(let y of p)y();m._zod.deferred=void 0}let g=globalThis.__zod_globalConfig?.postProcessor;return g&&g(m),m}return Object.defineProperty(u,"init",{value:l}),Object.defineProperty(u,Symbol.hasInstance,{value:f=>n?.Parent&&f instanceof n.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(u,"name",{value:e}),u}var jT=Symbol("zod_brand"),En=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Nc=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(yG=globalThis).__zod_globalConfig??(yG.__zod_globalConfig={});var eo=globalThis.__zod_globalConfig;function gr(e){return e&&Object.assign(eo,e),eo}function Zfe(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,_p,2)),e.message}function Gfe(e){this._zod.message=e}var qfe={get:Zfe,set:Gfe,enumerable:!0,configurable:!0},VT={value:void 0,enumerable:!1},IG=new WeakSet([Object.prototype,Error.prototype]),wG=(e,t)=>{e.name="$ZodError",VT.value=t,Object.defineProperty(e,"issues",VT),VT.value=void 0,Object.defineProperty(e,"message",qfe);let r=Object.getPrototypeOf(e);IG.has(r)||(IG.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},lx=j("$ZodError",wG),$n=j("$ZodError",wG,void 0,{Parent:Error});function Kfe(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function cx(e,t=r=>r.message){let r={},n=[];for(let o of e.issues)o.path.length>0?Kfe(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function dx(e,t=r=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>n({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")n({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")n({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let l=r,c=0;for(;c<s.length;){let d=s[c],u=c===s.length-1;if(d==="_errors"){u&&l._errors.push(t(a)),c++;continue}Object.prototype.hasOwnProperty.call(l,d)||Object.defineProperty(l,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=l[d];u&&f._errors.push(t(a)),l=f,c++}}}};return n(e),r}function HT(e,t=r=>r.message){let r={errors:[]},n=(o,i=[])=>{var a;for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>n({issues:l},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let l=[...i,...s.path];if(l.length===0){r.errors.push(t(s));continue}let c=r,d=0;for(;d<l.length;){let u=l[d],f=d===l.length-1;typeof u=="string"?(c.properties??(c.properties={}),Object.prototype.hasOwnProperty.call(c.properties,u)||Object.defineProperty(c.properties,u,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),c=c.properties[u]):(c.items??(c.items=[]),(a=c.items)[u]??(a[u]={errors:[]}),c=c.items[u]),f&&c.errors.push(t(s)),d++}}};return n(e),r}function SG(e){let t=[],r=e.map(n=>typeof n=="object"?n.key:n);for(let n of r)typeof n=="number"?t.push(`[${n}]`):typeof n=="symbol"?t.push(`[${JSON.stringify(String(n))}]`):/[^\w$]/.test(n)?t.push(`[${JSON.stringify(n)}]`):(t.length&&t.push("."),t.push(n));return t.join("")}function WT(e){let t=[],r=[...e.issues].sort((n,o)=>(n.path??[]).length-(o.path??[]).length);for(let n of r)t.push(`\u2716 ${n.message}`),n.path?.length&&t.push(` \u2192 at ${SG(n.path)}`);return t.join(`
60
+ `)}function qw(e,t){return{callee:t?.callee??e,Err:t?.Err}}var kp=e=>{let t=(r,n,o,i)=>{let a=o?{...o,async:!1}:{async:!1},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new En;if(s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Tn(c,a,gr())));throw Hw(l,i?.callee??t),l}return s.value};return t},Cp=kp($n),Pp=e=>{let t=async(r,n,o,i)=>{let a=o?{...o,async:!0}:{async:!0},s=r._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let l=new(i?.Err??e)(s.issues.map(c=>Tn(c,a,gr())));throw Hw(l,i?.callee??t),l}return s.value};return t},Kw=Pp($n),Dp=e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new En;return i.issues.length?kG(e,i.issues,o):{success:!0,data:i.value}},Qfe=Dp($n);function kG(e,t,r){let n;return{success:!1,get error(){return n||(n=new e(t.map(o=>Tn(o,r,gr()))),t=void 0,r=void 0),n},set error(o){n=o,t=void 0,r=void 0}}}var Rp=e=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?kG(e,i.issues,o):{success:!0,data:i.value}},Yfe=Rp($n),Jfe=Symbol.for("zod.compile.invalid"),eme=Symbol.for("zod.compile.fallback"),ux=((e,t,r)=>{let n=e._zod.bag.validator;if(n!==void 0){if(n(t)!==Jfe)return!0;if(n.definite===!0&&r===void 0)return!1}return tme(e,t,r)});function tme(e,t,r){let n=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun,i;if(o?(n[eme]=!0,i=o({value:t,issues:[]},n)):i=e._zod.run({value:t,issues:[]},n),i instanceof Promise)throw new En;return i.issues.length===0}var fx=async(e,t,r)=>{let n=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},o=e._zod.run({value:t,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length===0},Xw=e=>{let t=kp(e),r=(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return t(n,o,s,qw(r,a))};return r},rme=Xw($n),Qw=e=>{let t=kp(e),r=(n,o,i,a)=>t(n,o,i,qw(r,a));return r},ome=Qw($n),Yw=e=>{let t=Pp(e),r=async(n,o,i,a)=>{let s=i?{...i,direction:"backward"}:{direction:"backward"};return await t(n,o,s,qw(r,a))};return r},nme=Yw($n),Jw=e=>{let t=Pp(e),r=async(n,o,i,a)=>await t(n,o,i,qw(r,a));return r},ime=Jw($n),eS=e=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Dp(e)(t,r,o)},ame=eS($n),tS=e=>(t,r,n)=>Dp(e)(t,r,n),sme=tS($n),rS=e=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Rp(e)(t,r,o)},lme=rS($n),oS=e=>async(t,r,n)=>Rp(e)(t,r,n),cme=oS($n);var Ei={};Is(Ei,{anyString:()=>xE,base64:()=>cE,base64url:()=>dE,bigint:()=>yE,boolean:()=>_E,browserEmail:()=>vme,cidrv4:()=>sE,cidrv6:()=>lE,creditCard:()=>nS,cuid:()=>GT,cuid2:()=>qT,currencyCode:()=>pE,date:()=>hE,datetime:()=>vE,domain:()=>fE,duration:()=>eE,e164:()=>mE,email:()=>rE,emoji:()=>oE,extendedDuration:()=>dme,guid:()=>tE,hex:()=>CE,hostname:()=>uE,html5Email:()=>pme,httpProtocol:()=>mx,iban:()=>iS,idnEmail:()=>gme,integer:()=>px,ipv4:()=>nE,ipv6:()=>iE,ksuid:()=>QT,lowercase:()=>SE,mac:()=>aE,md5_base64:()=>_me,md5_base64url:()=>Ime,md5_hex:()=>yme,nanoid:()=>YT,nanoidOfLength:()=>JT,null:()=>IE,number:()=>il,rfc5322Email:()=>hme,sha1_base64:()=>Sme,sha1_base64url:()=>kme,sha1_hex:()=>wme,sha256_base64:()=>Pme,sha256_base64url:()=>Dme,sha256_hex:()=>Cme,sha384_base64:()=>Tme,sha384_base64url:()=>Eme,sha384_hex:()=>Rme,sha512_base64:()=>Ame,sha512_base64url:()=>Ome,sha512_hex:()=>$me,string:()=>bE,time:()=>gE,ulid:()=>KT,undefined:()=>wE,unicodeEmail:()=>CG,uppercase:()=>kE,uuid:()=>Au,uuid4:()=>ume,uuid6:()=>fme,uuid7:()=>mme,xid:()=>XT});var GT=/^[cC][0-9a-z]{6,}$/,qT=/^[0-9a-z]+$/,KT=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,XT=/^[0-9a-vA-V]{20}$/,QT=/^[A-Za-z0-9]{27}$/,YT=/^[a-zA-Z0-9_-]{21}$/;function JT(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var eE=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,dme=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,tE=/^([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})$/,Au=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)$/,ume=Au(4),fme=Au(6),mme=Au(7),rE=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pme=/^[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])?)*$/,hme=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,CG=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,gme=CG,vme=/^[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])?)*$/,xme="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function oE(){return new RegExp(xme,"u")}var nE=/^(?:(?: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])$/,iE=/^(([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}|:))$/,aE=e=>{let t=Ti(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},sE=/^((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])$/,lE=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dE=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,uE=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,fE=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,mx=/^https?$/,mE=/^\+[1-9]\d{6,14}$/,nS=/^\d(?:[ -]?\d){11,18}$/,pE=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,iS=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,PG="(?:(?:\\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])))";function bme(e){return new RegExp(`^${e}$`)}var hE=bme(PG);function ZT(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gE(e){return new RegExp(`^${ZT(e)}$`)}function vE(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${ZT({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${ZT({precision:e.precision})}`:r;return new RegExp(`^${PG}T(?:${n})$`)}var xE=/^[\s\S]{0,}$/,bE=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},yE=/^-?\d+n?$/,px=/^-?\d+$/,il=/^-?\d+(?:\.\d+)?$/,_E=/^(?:true|false)$/i,IE=/^null$/i;var wE=/^undefined$/i;var SE=/^[^A-Z]*$/,kE=/^[^a-z]*$/,CE=/^[0-9a-fA-F]*$/;function hx(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function gx(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var yme=/^[0-9a-fA-F]{32}$/,_me=hx(22,"=="),Ime=gx(22),wme=/^[0-9a-fA-F]{40}$/,Sme=hx(27,"="),kme=gx(27),Cme=/^[0-9a-fA-F]{64}$/,Pme=hx(43,"="),Dme=gx(43),Rme=/^[0-9a-fA-F]{96}$/,Tme=hx(64,""),Eme=gx(64),$me=/^[0-9a-fA-F]{128}$/,Ame=hx(86,"=="),Ome=gx(86);var $t=j("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),PE=e=>{let t=e.value;return!Vw(t)&&t.size!==void 0},DE=e=>{let t=e.value;return!Vw(t)&&t.length!==void 0},aS={number:"number",bigint:"bigint",object:"date"},lS=j("$ZodCheckLessThan",(e,t)=>{$t.init(e,t);let r=aS[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:aS[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cS=j("$ZodCheckGreaterThan",(e,t)=>{$t.init(e,t);let r=aS[typeof t.value];e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:aS[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),RE=j("$ZodCheckMultipleOf",(e,t)=>{$t.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):ex(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),TE=j("$ZodCheckNumberFormat",(e,t)=>{$t.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=ox[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}s<o&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),EE=j("$ZodCheckBigIntFormat",(e,t)=>{$t.init(e,t);let[r,n]=nx[t.format];e._zod.check=o=>{let i=o.value;i<r&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>n&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!t.abort})}}),$E=j("$ZodCheckMaxSize",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=PE),e._zod.check=n=>{let o=n.value;o.size<=t.maximum||n.issues.push({origin:ix(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),AE=j("$ZodCheckMinSize",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=PE),e._zod.check=n=>{let o=n.value;o.size>=t.minimum||n.issues.push({origin:ix(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),OE=j("$ZodCheckSizeEquals",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=PE),e._zod.check=n=>{let o=n.value,i=o.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:ix(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),zE=j("$ZodCheckMaxLength",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=DE),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?$u(o):i)<=t.maximum)return;let s=ax(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),NE=j("$ZodCheckMinLength",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=DE),e._zod.check=n=>{let o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?$u(o):i)>=t.minimum)return;let s=ax(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),FE=j("$ZodCheckLengthEquals",(e,t)=>{var r;$t.init(e,t),(r=e._zod.def).when??(r.when=DE),e._zod.check=n=>{let o=n.value,i=o.length,a=typeof o=="string"&&i>=t.length&&i<=t.length*2?$u(o):i;if(a===t.length)return;let s=ax(o),l=a>t.length;n.issues.push({origin:s,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Tp=j("$ZodCheckStringFormat",(e,t)=>{var r,n;$t.init(e,t),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),LE=j("$ZodCheckRegex",(e,t)=>{Tp.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ME=j("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=SE),Tp.init(e,t)}),BE=j("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=kE),Tp.init(e,t)}),jE=j("$ZodCheckIncludes",(e,t)=>{$t.init(e,t);let r=Ti(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),UE=j("$ZodCheckStartsWith",(e,t)=>{$t.init(e,t);let r=new RegExp(`^${Ti(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),VE=j("$ZodCheckEndsWith",(e,t)=>{$t.init(e,t);let r=new RegExp(`.*${Ti(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function sS(e,t,r){e.issues.length&&t.issues.push(...Rn(r,e.issues))}var HE=j("$ZodCheckProperty",(e,t)=>{$t.init(e,t),e._zod.check=r=>{let n=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(o=>sS(o,r,t.property));sS(n,r,t.property)}}),WE=j("$ZodCheckProperties",(e,t)=>{$t.init(e,t),sx(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=n=>{if(n.value==null){n.issues.push({expected:"object",code:"invalid_type",input:n.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let o=n.value,i;for(let[a,s]of r){let l=s._zod.run({value:o[a],issues:[]},{});l instanceof Promise?(i??(i=[]),i.push(l.then(c=>sS(c,n,a)))):sS(l,n,a)}if(i)return Promise.all(i).then(()=>{})}}),ZE=j("$ZodCheckMimeType",(e,t)=>{$t.init(e,t);let r=new Set(t.mime);e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),GE=j("$ZodCheckOverwrite",(e,t)=>{$t.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ou=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let n=t.split(`
61
+ `).filter(a=>a),o=Math.min(...n.map(a=>a.length-a.trimStart().length)),i=n.map(a=>a.slice(o)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
62
+ ${r.join(`
63
+ `)}
64
+ };`)(...Object.values(this.closed))}};var qE={major:4,minor:6,patch:5};var je=j("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=qE;let n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(let i of o)for(let a of i._zod.onattach)a(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(s,l,c)=>{if(s.memo)return s;let d=nn(s),u;for(let f of l){if(f._zod.def.when){if(NT(s)||!f._zod.def.when(s))continue}else if(d)continue;let m=s.issues.length,p=f._zod.check(s);if(p instanceof Promise&&c?.async===!1)throw new En;if(u||p instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await p,s.issues.length!==m&&(Zw(s.issues,m,e),d||(d=nn(s,m)))});else{if(s.issues.length===m)continue;Zw(s.issues,m,e),d||(d=nn(s,m))}}return u?u.then(()=>s):s},a=(s,l,c)=>{if(nn(s))return s.aborted=!0,s;let d=i(l,o,c);if(d instanceof Promise){if(c.async===!1)throw new En;return d.then(u=>e._zod.parse(u,c))}return e._zod.parse(d,c)};e._zod.run=(s,l)=>{if(l.skipChecks)return e._zod.parse(s,l);if(l.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return d instanceof Promise?d.then(u=>a(u,s,l)):a(d,s,l)}let c=e._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new En;return c.then(d=>i(d,o,l))}return i(c,o,l)}}},{get"~standard"(){return sx(this,"~standard",pS(this))},set"~standard"(e){zc(this,"~standard",e)}}),HG=(e,t)=>e.issues.length?{issues:e.issues.map(r=>Tn(r,t,gr()))}:{value:e.value};async function zme(e,t){let r={async:!0};return HG(await e._zod.run({value:t,issues:[]},r),r)}function pS(e){return{validate:t=>{let r={async:!1};try{let n=e._zod.run({value:t,issues:[]},r);if(!(n instanceof Promise))return HG(n,r)}catch{}return zme(e,t)},vendor:"zod",version:1}}var zu=j("$ZodString",(e,t)=>{je.init(e,t),e._zod.pattern=t.pattern??xE,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),St=j("$ZodStringFormat",(e,t)=>{Tp.init(e,t),zu.init(e,t)}),XE=j("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=tE),St.init(e,t)}),QE=j("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Au(n))}else t.pattern??(t.pattern=Au());St.init(e,t)}),YE=j("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=rE),St.init(e,t)}),JE=1,vx=2;function e$(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function hS(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?e$(e)||vx:WG(e,t)}function WG(e,t){if(!t.normalize&&t.protocol?.source===mx.source&&!/^https?:\/\//i.test(e))return JE;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??vx}return new URL(e)}catch{return vx}}var Nme=/[\t\n\r]/g;function xx(e){return e.replace(Nme,"")}function gS(e,t){return t.lastIndex=0,t.test(e.hostname)}function vS(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var t$=j("$ZodURL",(e,t)=>{St.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=hS(n,t);if(o===JE){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===vx){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(o===!0){r.value=xx(n);return}t.hostname&&!gS(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!vS(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:xx(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),r$=j("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=oE()),St.init(e,t)}),o$=j("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?YT:JT(t.length)),St.init(e,t)}),n$=j("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=GT),St.init(e,t)}),i$=j("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=qT),St.init(e,t)}),a$=j("$ZodULID",(e,t)=>{t.pattern??(t.pattern=KT),St.init(e,t)}),s$=j("$ZodXID",(e,t)=>{t.pattern??(t.pattern=XT),St.init(e,t)}),l$=j("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=QT),St.init(e,t)}),c$=j("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=vE(t)),St.init(e,t)}),d$=j("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=hE),St.init(e,t)}),u$=j("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=gE(t)),St.init(e,t)}),f$=j("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=eE),St.init(e,t)}),m$=j("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=nE),St.init(e,t)}),Fme=/^[0-9a-fA-F:.]+$/;function bx(e){return Fme.test(e)?e$(`http://[${e}]`):!1}var p$=j("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=iE),St.init(e,t),e._zod.check=r=>{bx(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),h$=j("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=aE(t.delimiter)),St.init(e,t)}),g$=j("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=sE),St.init(e,t)});function xS(e){let t=e.split("/");if(t.length!==2)return!1;let[r,n]=t;if(!n)return!1;let o=Number(n);return`${o}`!==n||o<0||o>128?!1:bx(r)}var v$=j("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=lE),St.init(e,t),e._zod.check=r=>{xS(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function yx(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var bS=/^[0-9a-zA-Z+/]*={0,2}$/,x$=j("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=bS),St.init(e,t),e._zod.check=r=>{yx(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),_x=/^[A-Za-z0-9_-]*$/;function yS(e){if(!_x.test(e))return!1;let t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return yx(r)}var b$=j("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=_x),St.init(e,t),e._zod.check=r=>{yS(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),y$=j("$ZodE164",(e,t)=>{t.pattern??(t.pattern=mE),St.init(e,t)}),Lme=/[- ]/g;function Mme(e){let t=e.length,r=1,n=0;for(;t;){let o=e.charCodeAt(--t)-48;r^=1,n+=r?[0,2,4,6,8,1,3,5,7,9][o]:o}return n%10===0}function _S(e){return nS.test(e)?Mme(e.replace(Lme,"")):!1}var _$=j("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=nS),St.init(e,t),e._zod.check=r=>{_S(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function Bme(e){let t=0,r=e.length;for(let n=4;n<r;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}for(let n=0;n<4;n++){let o=e.charCodeAt(n);t=(o>=65?t*100+(o-55):t*10+(o-48))%97}return t===1}function IS(e){return iS.test(e)?Bme(e):!1}var I$=j("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=iS),St.init(e,t),e._zod.check=r=>{IS(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function wS(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var w$=j("$ZodJWT",(e,t)=>{St.init(e,t),e._zod.check=r=>{wS(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),S$=j("$ZodCustomStringFormat",(e,t)=>{St.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),SS=j("$ZodNumber",(e,t)=>{je.init(e,t),e._zod.pattern=il,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),k$=j("$ZodNumberFormat",(e,t)=>{TE.init(e,t),SS.init(e,t)}),Ix=j("$ZodBoolean",(e,t)=>{je.init(e,t),e._zod.pattern=_E,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),kS=j("$ZodBigInt",(e,t)=>{je.init(e,t),e._zod.pattern=yE,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),C$=j("$ZodBigIntFormat",(e,t)=>{EE.init(e,t),kS.init(e,t)}),P$=j("$ZodSymbol",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:o,inst:e}),r}}),D$=j("$ZodUndefined",(e,t)=>{je.init(e,t),e._zod.pattern=wE,e._zod.values=new Set([void 0]),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),r}}),R$=j("$ZodNull",(e,t)=>{je.init(e,t),e._zod.pattern=IE,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{let o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),T$=j("$ZodAny",(e,t)=>{je.init(e,t),e._zod.parse=r=>r}),E$=j("$ZodUnknown",(e,t)=>{je.init(e,t),e._zod.parse=r=>r}),$$=j("$ZodNever",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),A$=j("$ZodVoid",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),O$=j("$ZodDate",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function RG(e,t,r){e.issues.length&&t.issues.push(...Rn(r,e.issues)),t.value[r]=e.value}var z$=j("$ZodArray",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);let a=[],s=o?.abortEarly;for(let l=0;l<i.length;l++){let c=i[l],d=t.element._zod.run({value:c,issues:[]},o);if(d instanceof Promise)a.push(d.then(u=>RG(u,n,l)));else if(RG(d,n,l),s&&d.issues.length!==0&&nn(d))break}return a.length?Promise.all(a).then(()=>n):n}});function mS(e,t,r,n,o,i){let a=r in n,s=i==="optional";if(!(!a&&s&&o==="optional")){if(e.issues.length){if(o!==void 0&&s&&!a)return;t.issues.push(...Rn(r,e.issues))}if(!a&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(a||o==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var jme=[];function ZG(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:jme,o=n.length?[...t,...n]:t;for(let a of o)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let i=zT(e.shape);return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function GG(e,t,r,n,o,i,a){let s=[],l=o.keySet,c=o.catchall._zod,d=c.def.type,u=c.optin,f=c.optout,m=0;for(let p in t){if(a&&r.issues.length!==m){if(nn(r,m))break;m=r.issues.length}if(l.has(p))continue;if(p==="__proto__"){d==="never"&&s.push(p);continue}if(d==="never"){s.push(p);continue}let g=c.run({value:t[p],issues:[]},n);g instanceof Promise?e.push(g.then(y=>mS(y,r,p,t,u,f))):mS(g,r,p,t,u,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var qG=j("$ZodObject",(e,t)=>{je.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),n=r?.get?r.get.raw:t.shape??{};if(n){let c=()=>{let d={...n};return Object.defineProperty(t,"shape",{value:d}),c.raw=d,d};c.raw=n,Object.defineProperty(t,"shape",{get:c})}let o=Ip(()=>ZG(t));Xe(e,"propValues",c=>{let d=c.def.shape,u={};for(let f in d){let m=d[f]._zod;if(m.values){Object.prototype.hasOwnProperty.call(u,f)||bo(u,f,new Set);for(let p of m.values)u[f].add(p);m.optin!==void 0&&u[f].add(void 0)}}return u});let i=Eu,a=t.catchall,s,l=eo.memoizer;l?.attach(e),e._zod.parse=(c,d)=>{s??(s=o.value);let u=c.value;if(!i(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),c;c.value=l?l.alloc(e,c,{},d):{};let f=[],m=s.shape,p=d?.abortEarly,g=c.issues.length;for(let y of s.allKeys){if(p&&c.issues.length!==g){if(nn(c,g))break;g=c.issues.length}if(y==="__proto__")continue;let v=m[y],x=v._zod.optin,_=v._zod.optout,I=v._zod.run({value:u[y],issues:[]},d);I instanceof Promise?f.push(I.then(S=>mS(S,c,y,u,x,_))):mS(I,c,y,u,x,_)}return a?GG(f,u,c,d,o.value,e,p===!0):f.length?Promise.all(f).then(()=>c):c}}),N$=j("$ZodObjectJIT",(e,t)=>{qG.init(e,t);let r=e._zod.parse,n=Ip(()=>ZG(t)),o=eo.memoizer,i=m=>{let p=n.value,g=p.symbolKeys,y=new Ou(["payload","ctx"],{shape:m,inst:e,memo:o,syms:g}),v=S=>`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`,x=(S,w)=>`
65
+ let ${S}_ab = false;
66
+ for (let i = 0; i < ${S}.issues.length; i++) {
67
+ const iss = ${S}.issues[i];
68
+ iss.path = iss.path ? [${w}, ...iss.path] : [${w}];
69
+ payload.issues.push(iss);
70
+ if (iss.continue !== true) ${S}_ab = true;
71
+ }
72
+ if (${S}_ab && ctx && ctx.abortEarly) {
73
+ payload.value = newResult;
74
+ return payload;
75
+ }`;y.write("const input = payload.value;");let _=Object.create(null),I=0;for(let S of p.allKeys)_[S]=`key_${I++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let S of p.allKeys){if(S==="__proto__")continue;let w=_[S],P=typeof S=="symbol"?`syms[${g.indexOf(S)}]`:on(S),$=`${P} in input`,B=m[S],W=B?._zod?.optin,H=W!==void 0,K=B?._zod?.optout==="optional";if(y.write(`const ${w} = ${v(P)};`),H&&K){let T=W==="optional"?`${w}_present`:`${w}.value !== undefined || ${w}_present`;y.write(`
76
+ const ${w}_present = ${$};
77
+ if (!${w}.issues.length || ${w}_present) {
78
+ if (${w}.issues.length) {${x(w,P)}
79
+ }
80
+
81
+ if (${T}) {
82
+ newResult[${P}] = ${w}.value;
83
+ }
84
+ }
85
+
86
+ `)}else H?(y.write(`
87
+ if (${w}.issues.length) {${x(w,P)}
88
+ }
89
+ `),W==="defaulted"?y.write(`newResult[${P}] = ${w}.value;`):y.write(`
90
+ if (${w}.value !== undefined || ${$}) {
91
+ newResult[${P}] = ${w}.value;
92
+ }
93
+ `)):y.write(`
94
+ const ${w}_present = ${$};
95
+ if (${w}.issues.length) {${x(w,P)}
96
+ }
97
+ if (!${w}_present && !${w}.issues.length) {
98
+ payload.issues.push({
99
+ code: "invalid_type",
100
+ expected: "nonoptional",
101
+ input: undefined,
102
+ path: [${P}]
103
+ });
104
+ if (ctx && ctx.abortEarly) {
105
+ payload.value = newResult;
106
+ return payload;
107
+ }
108
+ }
109
+
110
+ if (${w}_present) {
111
+ newResult[${P}] = ${w}.value;
112
+ }
113
+
114
+ `)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()},a,s=Eu,l=!eo.jitless,d=l&&AT.value,u=t.catchall,f;e._zod.parse=(m,p)=>{f??(f=n.value);let g=m.value;return s(g)?l&&d&&p?.async===!1&&p.jitless!==!0?(a||(a=i(t.shape)),m=a(m,p),u?GG([],g,m,p,f,e,p?.abortEarly===!0):m):r(m,p):(m.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),m)}});function TG(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter(i=>!nn(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Tn(a,n,gr())))}),t)}var wx=j("$ZodUnion",(e,t)=>{je.init(e,t),Xe(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Xe(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Xe(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),Xe(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){let o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>nl(i.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);if(l instanceof Promise)a.push(l),i=!0;else{if(l.issues.length===0)return l;a.push(l)}}return i?Promise.all(a).then(s=>TG(s,n,e,o)):TG(a,n,e,o)}});function EG(e,t,r,n){let o=[];for(let i=0;i<e.length;i++)e[i].issues.length===0&&o.push(i);return o.length===1?(t.value=e[o[0]].value,t):(o.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>Tn(a,n,gr())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:o}),t)}var F$=j("$ZodXor",(e,t)=>{wx.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,a=[];for(let s of t.options){let l=s._zod.run({value:n.value,issues:[]},o);l instanceof Promise?(a.push(l),i=!0):a.push(l)}return i?Promise.all(a).then(s=>EG(s,n,e,o)):EG(a,n,e,o)}});function L$(e,t){let r=e._zod,n=r.bag.optionsMap;n||(n=KG(r.def),r.bag.optionsMap=n);let o=n.get(t);if(o===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return o}function KG(e){let t=new Map;for(let r of e.options){let n=r._zod.propValues?.[e.discriminator];if(!n||n.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let o of n)if(t.has(o)){if(o!==void 0)throw new Error(`Duplicate discriminator value "${String(o)}"`);t.set(o,null)}else t.set(o,r)}return t}var M$=j("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,wx.init(e,t);let r=e._zod.parse;Xe(e,"propValues",o=>{let i={},a=0;for(let s of o.def.options){let l=s._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);l[o.def.discriminator]?.has(void 0)&&a++;for(let[c,d]of Object.entries(l)){Object.prototype.hasOwnProperty.call(i,c)||bo(i,c,new Set);for(let u of d)i[c].add(u)}}return!o.def.unionFallback&&a>1&&i[o.def.discriminator]?.delete(void 0),i}),t.options.forEach((o,i)=>{let a=wp(o._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});let n=Ip(()=>KG(t));e._zod.parse=(o,i)=>{let a=o.value;if(!Eu(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;let s=a?.[t.discriminator],l=n.value.get(s);return l&&(s!==void 0||i.direction!=="backward")?l._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()).filter(c=>n.value.get(c)!==null),input:a,path:[t.discriminator],inst:e}),o)}}),B$=j("$ZodIntersection",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),a=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,c])=>$G(r,l,c)):$G(r,i,a)}});function Ep(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ri(e)&&Ri(t)){let r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(let i of n){if(i==="__proto__")continue;let a=Ep(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],a=Ep(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function $G(e,t,r){let n=new Map,o,i=new Map,a=(c,d)=>{let u;if(c.code==="unrecognized_keys"&&!c.path?.length)o??(o=c),u=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){let f=String(c.path[0]);i.has(f)||i.set(f,c),u=[f]}else return!1;for(let f of u)n.has(f)||n.set(f,{}),n.get(f)[d]=!0;return!0};for(let c of t.issues)a(c,"l")||e.issues.push(c);for(let c of r.issues)a(c,"r")||e.issues.push(c);let s=[...n].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(s.length){let c=o?s.filter(d=>o.keys.includes(d)):[];c.length&&e.issues.push({...o,keys:c});for(let d of s)!c.includes(d)&&i.has(d)&&e.issues.push(i.get(d))}let l=Ep(t.value,r.value);if(!l.valid){if(nn(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`)}return e.value=l.data,e}var CS=j("$ZodTuple",(e,t)=>{je.init(e,t);let r=t.items,n=eo.memoizer;n?.attach(e),e._zod.parse=(o,i)=>{let a=o.value;if(!Array.isArray(a))return o.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=n?n.alloc(e,o,[],i):[];let s=[],l=AG(r,"optin"),c=AG(r,"optout");if(!t.rest){if(a.length<l)return o.issues.push({code:"too_small",minimum:l,inclusive:!0,input:a,inst:e,origin:"array"}),o;a.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}let d=new Array(r.length),u=t.rest?i?.abortEarly:void 0,f=!1;for(let m=0;m<r.length;m++){let p=r[m]._zod.run({value:a[m],issues:[]},i);p instanceof Promise?s.push(p.then(g=>{d[m]=g})):(d[m]=p,u&&!f&&p.issues.length&&(f=nn(p)))}if(t.rest&&!f){let m=r.length-1,p=a.slice(r.length),g=o.issues.length;for(let y of p){if(u&&o.issues.length!==g){if(nn(o,g))break;g=o.issues.length}m++;let v=t.rest._zod.run({value:y,issues:[]},i);v instanceof Promise?s.push(v.then(x=>OG(x,o,m))):OG(v,o,m)}}return s.length?Promise.all(s).then(()=>zG(d,o,r,a,c)):zG(d,o,r,a,c)}});function AG(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function OG(e,t,r){e.issues.length&&t.issues.push(...Rn(r,e.issues)),t.value[r]=e.value}function zG(e,t,r,n,o){for(let i=0;i<r.length;i++){let a=e[i],s=i<n.length;if(!s&&i>=o&&r[i]._zod.optin==="optional"){t.value.length=i;break}if(a.issues.length){if(!s&&i>=o){t.value.length=i;break}t.issues.push(...Rn(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=n.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var j$=j("$ZodRecord",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!Ri(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};let l=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){if(l.add(typeof d=="number"?d.toString():d),d==="__proto__")continue;let u=t.keyType._zod.run({value:d,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(p=>Tn(p,o,gr())),input:d,path:[d],inst:e});continue}let f=u.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[d],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Rn(d,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Rn(d,m.issues)),n.value[f]=m.value)}let c;for(let d in i)if(!l.has(d))if(t.mode==="loose"){if(d==="__proto__")continue;n.value[d]=i[d]}else c=c??[],c.push(d);c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let l;for(let c of Reflect.ownKeys(i)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,c))continue;let d=t.keyType._zod.run({value:c,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&il.test(c)&&d.issues.length){let p=t.keyType._zod.run({value:Number(c),issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[c]=i[c]:s?(l=l??[],l.push(c)):n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>Tn(p,o,gr())),input:c,path:[c],inst:e});continue}let f=d.value;if(f==="__proto__")continue;let m=t.valueType._zod.run({value:i[c],issues:[]},o);m instanceof Promise?a.push(m.then(p=>{p.issues.length&&n.issues.push(...Rn(c,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...Rn(c,m.issues)),n.value[f]=m.value)}l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:l,continue:!0})}return a.length?Promise.all(a).then(()=>n):n}}),U$=j("$ZodMap",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let a=[];n.value=r?r.alloc(e,n,new Map,o):new Map;let s=o?.abortEarly,l=n.issues.length;for(let[c,d]of i){if(s&&n.issues.length!==l){if(nn(n,l))break;l=n.issues.length}let u=t.keyType._zod.run({value:c,issues:[]},o),f=t.valueType._zod.run({value:d,issues:[]},o);u instanceof Promise||f instanceof Promise?a.push(Promise.all([u,f]).then(([m,p])=>{NG(m,p,n,c,i,e,o)})):NG(u,f,n,c,i,e,o)}return a.length?Promise.all(a).then(()=>n):n}});function NG(e,t,r,n,o,i,a){e.issues.length&&(rx.has(typeof n)?r.issues.push(...Rn(n,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:o,inst:i,issues:e.issues.map(s=>Tn(s,a,gr()))})),t.issues.length&&(rx.has(typeof n)?r.issues.push(...Rn(n,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:o,inst:i,key:n,issues:t.issues.map(s=>Tn(s,a,gr()))})),r.value.set(e.value,t.value)}var V$=j("$ZodSet",(e,t)=>{je.init(e,t);let r=eo.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let a=[];n.value=r?r.alloc(e,n,new Set,o):new Set;let s=o?.abortEarly,l=n.issues.length;for(let c of i){if(s&&n.issues.length!==l){if(nn(n,l))break;l=n.issues.length}let d=t.valueType._zod.run({value:c,issues:[]},o);d instanceof Promise?a.push(d.then(u=>FG(u,n))):FG(d,n)}return a.length?Promise.all(a).then(()=>n):n}});function FG(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var H$=j("$ZodEnum",(e,t)=>{je.init(e,t);let r=yp(t.entries),n=new Set(r);e._zod.values=n,Xe(e,"pattern",o=>{let i=yp(o.def.entries).filter(a=>rx.has(typeof a));return new RegExp(i.length?`^(${i.map(a=>Ti(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,i)=>{let a=o.value;return n.has(a)||o.issues.push({code:"invalid_value",values:r,input:a,inst:e}),o}}),W$=j("$ZodLiteral",(e,t)=>{je.init(e,t);let r=new Set(t.values);e._zod.values=r,Xe(e,"pattern",n=>{let o=n.def.values;return new RegExp(o.length?`^(${o.map(i=>typeof i=="string"?Ti(i):i?Ti(i.toString()):String(i)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),Z$=j("$ZodFile",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),G$=j("$ZodTransform",(e,t)=>{je.init(e,t),e._zod.optin="optional",eo.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nc(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(r.value=a,r));if(o instanceof Promise)throw new En;return r.value=o,r}});function LG(e,t){return e.value=t.issues.length?void 0:t.value,e}var PS=j("$ZodOptional",(e,t)=>{je.init(e,t),Xe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",Xe(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),Xe(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${nl(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>LG(r,i)):LG(r,o)}return t.innerType._zod.run(r,n)}}),q$=j("$ZodExactOptional",(e,t)=>{PS.init(e,t),Xe(e,"values",r=>r.def.innerType._zod.values),Xe(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),K$=j("$ZodNullable",(e,t)=>{je.init(e,t),Xe(e,"optin",r=>r.def.innerType._zod.optin),Xe(e,"optout",r=>r.def.innerType._zod.optout),Xe(e,"pattern",r=>{let n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${nl(n.source)}|null)$`):void 0}),Xe(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),X$=j("$ZodDefault",(e,t)=>{je.init(e,t),e._zod.optin="defaulted",Xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>MG(i,t)):MG(o,t)}});function MG(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Q$=j("$ZodPrefault",(e,t)=>{je.init(e,t),e._zod.optin="defaulted",Xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),Y$=j("$ZodNonOptional",(e,t)=>{je.init(e,t),Xe(e,"values",r=>{let n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>BG(i,e)):BG(o,e)}});function BG(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var J$=j("$ZodSuccess",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nc("ZodSuccess");let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>(r.value=i.issues.length===0,r)):(r.value=o.issues.length===0,r)}});function jG(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>Tn(o,n,gr()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var eA=j("$ZodCatch",(e,t)=>{je.init(e,t),Xe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Xe(e,"optout",r=>r.def.innerType._zod.optout),Xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>jG(r,i,t,n)):jG(r,o,t,n)}}),tA=j("$ZodNaN",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),DS=j("$ZodPipe",(e,t)=>{je.init(e,t),Xe(e,"values",r=>r.def.in._zod.values),Xe(e,"optin",r=>r.def.in._zod.optin),Xe(e,"optout",r=>r.def.out._zod.optout),Xe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>dS(a,t.in,n)):dS(i,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>dS(i,t.out,n)):dS(o,t.out,n)}});function dS(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Sx=j("$ZodCodec",(e,t)=>{je.init(e,t),Xe(e,"values",r=>r.def.in._zod.values),Xe(e,"optin",r=>r.def.in._zod.optin),Xe(e,"optout",r=>r.def.out._zod.optout),Xe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let i=t.in._zod.run(r,n);return i instanceof Promise?i.then(a=>uS(a,t,n)):uS(i,t,n)}else{let i=t.out._zod.run(r,n);return i instanceof Promise?i.then(a=>uS(a,t,n)):uS(i,t,n)}}});function uS(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let o=t.transform(e.value,e);return o instanceof Promise?o.then(i=>fS(e,i,t.out,r)):fS(e,o,t.out,r)}else{let o=t.reverseTransform(e.value,e);return o instanceof Promise?o.then(i=>fS(e,i,t.in,r)):fS(e,o,t.in,r)}}function fS(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var rA=j("$ZodPreprocess",(e,t)=>{DS.init(e,t)}),oA=j("$ZodReadonly",(e,t)=>{je.init(e,t),Xe(e,"propValues",r=>r.def.innerType._zod.propValues),Xe(e,"values",r=>r.def.innerType._zod.values),Xe(e,"optin",r=>r.def.innerType?._zod?.optin),Xe(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(UG):UG(o)}});function UG(e){return e.memo||(e.value=Object.freeze(e.value)),e}function Ume(e){let t=e._zod.def,r=t.pattern,n=!!t.format?.includes("int"),o,i;for(let s of t.checks??[]){let l=s._zod.def;l.pattern&&(r=l.pattern),n||(n=!!l.format?.includes("int"));let c=l.minimum??l.length,d=l.maximum??l.length;c!==void 0&&(o===void 0||c>o)&&(o=c),d!==void 0&&(i===void 0||d<i)&&(i=d)}if(r)return r.source;if(o!==void 0&&i!==void 0&&o>i)return"(?!)";if(o!==void 0||i!==void 0)return bE({minimum:o,maximum:i}).source;let a=e._zod.pattern;return(n&&a===il?px:a)?.source}function KE(e){let t=e._zod.def,r=e._zod.pattern?.source,n=t.innerType??e._zod.innerType;if(n){let o=n._zod.pattern?.source,i=KE(n);return r&&o&&i&&i!==o?r.replace(nl(o),()=>nl(i)):r}if(t.options){let o=t.options.map(KE);if(o.every(Boolean))return`^(${o.map(i=>nl(i)).join("|")})$`}return Ume(e)}var nA=j("$ZodTemplateLiteral",(e,t)=>{je.init(e,t);let r=[];for(let n of t.parts)if(typeof n=="object"&&n!==null){let o=KE(n);if(!o)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);r.push(nl(o))}else if(n===null||OT.has(typeof n))r.push(Ti(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(n,o)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:e,expected:"string",code:"invalid_type"}),n):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),n)}),iA=j("$ZodFunction",(e,t)=>(je.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...n){let o=e._def.input?Cp(e._def.input,n):n,i=Reflect.apply(r,this,o);return e._def.output?Cp(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...n){let o=e._def.input?await Kw(e._def.input,n):n,i=await Reflect.apply(r,this,o);return e._def.output?await Kw(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let n=e.constructor;return Array.isArray(r[0])?new n({type:"function",input:new CS({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new n({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let n=e.constructor;return new n({type:"function",input:e._def.input,output:r})},e)),aA=j("$ZodPromise",(e,t)=>{je.init(e,t),e._zod.parse=(r,n)=>Promise.resolve(r.value).then(o=>t.innerType._zod.run({value:o,issues:[]},n))}),kx=j("$ZodLazy",(e,t)=>{je.init(e,t),ET(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),Xe(e,"pattern",r=>r.innerType?._zod?.pattern),Xe(e,"propValues",r=>r.innerType?._zod?.propValues),Xe(e,"optin",r=>r.innerType?._zod?.optin??void 0),Xe(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,n)=>e._zod.innerType._zod.run(r,n)}),sA=j("$ZodCustom",(e,t)=>{$t.init(e,t),je.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>VG(i,r,n,e));VG(o,r,n,e)}});function VG(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(Sp(o))}}var $S=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},cA="~memo",QG=[];function YG(e){return e!==null&&typeof e=="object"}function lA(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var JG=new WeakMap,$p=0,ES=1,Cx=2;function Px(e,t,r){let n=JG.get(e);if(n!==void 0)return n?Cx:$p;if(t.has(e))return Cx;t.add(e);let o=$p,i=d=>{if(o!==Cx&&d?._zod){let u=Px(d,t,r);u>o&&(o=u)}},a=(d,u)=>{let f=$p;for(let m of Reflect.ownKeys(d)){let p=Object.getOwnPropertyDescriptor(d,m);if(u&&!p.enumerable)continue;let g=p.get?ES:p.value?._zod?Px(p.value,t,r):$p;g>f&&(f=g)}return f},s=d=>{d>o&&(o=d)},l=e._zod.def,c=l.type;switch(c){case"object":{let d=wp(l);s(d?a(d,!0):ES),i(l.catchall);break}case"array":i(l.element);break;case"tuple":for(let d of l.items)i(d);i(l.rest);break;case"record":case"map":i(l.keyType),i(l.valueType);break;case"set":i(l.valueType);break;case"union":for(let d of l.options)i(d);break;case"intersection":i(l.left),i(l.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":i(l.innerType);break;case"pipe":i(l.in),i(l.out);break;case"function":i(l.input),i(l.output);break;case"lazy":{let d=l._cachedInner??(r?e._zod.innerType:void 0);s(d?Px(d,t,!1):ES);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let d in l){let u=Object.getOwnPropertyDescriptor(l,d);if(!u||u.get)continue;let f=u.value;if(!(!f||typeof f!="object")){if(f._zod)i(f);else if(Array.isArray(f))for(let m of f)i(m)}}}return t.delete(e),Vme(e,o)}function Vme(e,t){return t!==ES&&JG.set(e,t===Cx),t}function AS(e){return Px(e,new Set,!0)!==$p}function Hme(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var RS,TS=[],Wme={alloc(e,t,r){let n=RS;if(!n)return r;RS=void 0;let o={value:r,issues:null};return n.set(t.value,o),TS.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&OS(i,o.value))throw new $S;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n=!1,o,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(l,c)=>{if(r===void 0){let v=Px(e,new Set,!1);if(v===$p)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(l,c);v===Cx||n?r=!0:n=!0}let d=l.value;if(!YG(d))return a(l,c);let u=c[cA];u||(u={buckets:new WeakMap,backEdges:void 0},c[cA]=u);let f;o===c?f=i:(f=Hme(u,e),o=c,i=f);let m=f.get(d);if(m)return l.value=m.value,m.issues?m.issues.length&&l.issues.push(...lA(m.issues)):(l.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(m.value)),l;RS=f;let p=TS.length,g=a(l,c);RS=void 0;let y=TS.length>p?TS.pop():void 0;return g instanceof Promise?g.then(v=>(y&&(y.issues=v.issues.length?lA(v.issues):QG),v)):(y&&(y.issues=g.issues.length?lA(g.issues):QG),g)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Dx(){return Wme}function OS(e,t){let r=e[cA]?.backEdges;return r!==void 0&&YG(t)&&r.has(t)}var Tx={};Is(Tx,{ar:()=>eq,az:()=>tq,be:()=>oq,bg:()=>nq,bn:()=>iq,ca:()=>aq,ckb:()=>sq,cs:()=>lq,da:()=>cq,de:()=>dq,el:()=>uq,en:()=>zS,eo:()=>fq,es:()=>mq,fa:()=>pq,fi:()=>hq,fr:()=>gq,frCA:()=>vq,gu:()=>xq,he:()=>bq,hi:()=>yq,hr:()=>_q,hu:()=>Iq,hy:()=>Sq,id:()=>kq,is:()=>Cq,it:()=>Pq,ja:()=>Dq,ka:()=>Rq,kh:()=>Tq,km:()=>NS,kn:()=>Eq,ko:()=>$q,lt:()=>Oq,mk:()=>zq,ms:()=>Nq,ne:()=>Fq,nl:()=>Lq,nn:()=>Mq,no:()=>Bq,ota:()=>jq,pl:()=>Vq,ps:()=>Uq,pt:()=>Hq,ptBR:()=>Wq,ro:()=>Zq,ru:()=>qq,sk:()=>Kq,sl:()=>Xq,sv:()=>Qq,ta:()=>Yq,tg:()=>Jq,th:()=>eK,tk:()=>tK,tr:()=>rK,ua:()=>oK,uk:()=>FS,ur:()=>nK,uz:()=>iK,vi:()=>aK,yo:()=>cK,zhCN:()=>sK,zhTW:()=>lK});var Zme=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${ee(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function eq(){return{localeError:Zme()}}var Gme=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${ee(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function tq(){return{localeError:Gme()}}function rq(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var qme=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},n={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${ee(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=rq(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=rq(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${o.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function oq(){return{localeError:qme()}}var Kme=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${ee(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function nq(){return{localeError:Kme()}}var Xme=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(o){return e[o]??null}let r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${i}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return o.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${ee(o.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${V(o.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${o.origin??"\u09AE\u09BE\u09A8"} ${i}${o.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${o.origin} ${i}${o.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${i.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:i.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${i.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${o.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${o.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${o.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function iq(){return{localeError:Xme()}}var Qme=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${ee(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${V(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",a=t(o.origin);return a?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(o.origin);return a?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}};function aq(){return{localeError:Qme()}}var Yme=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(o){return e[o]??null}let r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},n={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a,l=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(d=>s.endsWith(d))?"\u06CC\u06D5":"\u06D5",c=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${i} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${c?"":l}`}case"invalid_value":return o.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${ee(o.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${V(o.values,"|")}`;case"too_big":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${o.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let i=t(o.origin);return i?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} ${i.unit} ${i.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${o.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${i.prefix}"`:i.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${i.suffix}"`:i.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${i.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:i.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${i.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[i.format]??o.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${o.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${o.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function sq(){return{localeError:Yme()}}var Jme=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${ee(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function lq(){return{localeError:Jme()}}var epe=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${ee(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${o.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}};function cq(){return{localeError:epe()}}var tpe=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"},map:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},n={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${ee(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}};function dq(){return{localeError:tpe()}}var rpe=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(o){return e[o]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${ee(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function uq(){return{localeError:rpe()}}var ope=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,a){return i==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):n[i]??i}return i=>{switch(i.code){case"invalid_type":{let a=o(i.expected),s=te(i.input),l=o(s,i.input);return`Invalid input: expected ${a}, received ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${ee(i.values[0])}`:`Invalid option: expected one of ${V(i.values,"|")}`;case"too_big":{let a=i.exact?"exactly ":i.inclusive?"<=":"<",s=t(i.origin);return s?`Too big: expected ${i.origin??"value"} to have ${a}${i.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${a}${i.maximum.toString()}`}case"too_small":{let a=i.exact?"exactly ":i.inclusive?">=":">",s=t(i.origin);return s?`Too small: expected ${i.origin} to have ${a}${i.minimum.toString()} ${s.unit}`:`Too small: expected ${i.origin} to be ${a}${i.minimum.toString()}`}case"invalid_format":{let a=i;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${V(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function zS(){return{localeError:ope()}}var npe=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},n={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${ee(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function fq(){return{localeError:npe()}}var ipe=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},n={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${ee(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${o.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${o.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${n[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${n[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}};function mq(){return{localeError:ipe()}}var ape=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${ee(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${V(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${V(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function pq(){return{localeError:ape()}}var spe=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${ee(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${V(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function hq(){return{localeError:spe()}}var lpe=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instance de ${o.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${ee(o.values[0])} attendu`:`Option invalide : une valeur parmi ${V(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Trop grand : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Trop petit : ${n[o.origin]??"valeur"} doit ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : ${n[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function gq(){return{localeError:lpe()}}var cpe=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${ee(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",a=t(o.origin);return a?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",a=t(o.origin);return a?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${V(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}};function vq(){return{localeError:cpe()}}var dpe=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(o){return e[o]??null}let r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${i}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return o.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${ee(o.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${V(o.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${o.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${i}${o.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${o.origin} ${i}${o.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${i.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:i.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${i.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${o.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${o.keys.length>1?"\u0A93":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${o.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function xq(){return{localeError:dpe()}}var upe=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=c=>c?e[c]:void 0,n=c=>{let d=r(c);return d?d.label:c??e.unknown.label},o=c=>`\u05D4${n(c)}`,i=c=>(r(c)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=c=>c?t[c]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return c=>{switch(c.code){case"invalid_type":{let d=c.expected,u=l[d??""]??n(d),f=te(c.input),m=l[f]??e[f]?.label??f;return/^[A-Z]/.test(c.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${c.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${u}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}case"invalid_value":{if(c.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${ee(c.values[0])}`;let d=c.values.map(m=>ee(m));if(c.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let u=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${u}`}case"too_big":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.maximum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${c.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",g=c.inclusive?`${c.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${c.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let f=c.inclusive?"<=":"<",m=i(c.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.maximum.toString()}`}case"too_small":{let d=a(c.origin),u=o(c.origin??"value");if(c.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${c.minimum.toString()} ${d?.unit??""} ${c.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(c.origin==="number"){let p=c.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${c.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${c.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}`}if(c.origin==="array"||c.origin==="set"){let p=c.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(c.minimum===1&&c.inclusive){let y=(c.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let g=c.inclusive?`${c.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${c.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${u} ${p} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`.trim()}let f=c.inclusive?">=":">",m=i(c.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${u} ${m} ${f}${c.minimum.toString()}`}case"invalid_format":{let d=c;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let u=s[d.format],f=u?.label??d.format,p=(u?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${p}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${c.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${c.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${c.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${V(c.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(c.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function bq(){return{localeError:upe()}}var fpe=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${ee(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${i}${o.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum} \u0939\u094B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} \u092E\u0947\u0902 ${i}${o.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${o.origin} ${i}${o.minimum} \u0939\u094B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${i.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${i.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${i.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${o.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${o.keys.length>1?"\u092F\u093E\u0901":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${o.origin} \u092E\u0947\u0902`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function yq(){return{localeError:fpe()}}var mpe=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(o){return e[o]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},n={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${ee(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${o.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=n[o.origin]??o.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${o.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${n[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${n[o.origin]??o.origin}`;default:return"Neispravan unos"}}};function _q(){return{localeError:mpe()}}var ppe=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},n={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${ee(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Iq(){return{localeError:ppe()}}function wq(e,t,r){return Math.abs(e)===1?t:r}function Ap(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var hpe=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},n={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${ee(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=wq(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ap(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ap(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=wq(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ap(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ap(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${V(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ap(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Ap(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Sq(){return{localeError:hpe()}}var gpe=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${ee(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}};function kq(){return{localeError:gpe()}}var vpe=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},n={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${ee(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${V(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function Cq(){return{localeError:vpe()}}var xpe=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${ee(o.values[0])}`:`Opzione non valida: atteso uno tra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${V(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}};function Pq(){return{localeError:xpe()}}var bpe=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},n={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${ee(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${V(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(o.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(o.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Dq(){return{localeError:bpe()}}var ype=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},n={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${ee(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${V(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Rq(){return{localeError:ype()}}var _pe=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},n={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${ee(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${V(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function NS(){return{localeError:_pe()}}function Tq(){return NS()}var Ipe=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(o){return e[o]??null}let r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${i}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${ee(o.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${i}${o.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${i.prefix}"`:i.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${i.suffix}"`:i.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${i.includes}"`:i.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${i.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${o.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${o.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function Eq(){return{localeError:Ipe()}}var wpe=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"},map:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${ee(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${V(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${a}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(o.origin),l=s?.unit??"\uC694\uC18C";return s?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${l} ${i}${a}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${V(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function $q(){return{localeError:wpe()}}var Rx=e=>e.charAt(0).toUpperCase()+e.slice(1);function Aq(e){let t=Math.abs(e),r=t%10,n=t%100;return n>=11&&n<=19||r===0?"many":r===1?"one":"few"}var Spe=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,i,a,s){let l=e[o]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},n={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${ee(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${V(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=n[o.origin]??o.origin,a=t(o.origin,Aq(Number(o.maximum)),o.inclusive??!1,"smaller");if(a?.verb)return`${Rx(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.maximum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Rx(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.maximum.toString()} ${a?.unit}`}case"too_small":{let i=n[o.origin]??o.origin,a=t(o.origin,Aq(Number(o.minimum)),o.inclusive??!1,"bigger");if(a?.verb)return`${Rx(i??o.origin??"reik\u0161m\u0117")} ${a.verb} ${o.minimum.toString()} ${a.unit??"element\u0173"}`;let s=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Rx(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${o.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${V(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=n[o.origin]??o.origin;return`${Rx(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Oq(){return{localeError:Spe()}}var kpe=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},n={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${ee(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function zq(){return{localeError:kpe()}}var Cpe=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${ee(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Terlalu besar: dijangka ${o.origin??"nilai"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Terlalu kecil: dijangka ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${V(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}};function Nq(){return{localeError:Cpe()}}var Ppe=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(o){return e[o]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${i}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return o.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${ee(o.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} \u092E\u093E ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${o.origin??"\u092E\u093E\u0928"} ${i}${o.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} \u092E\u093E ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${o.origin} ${i}${o.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${i.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:i.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${i.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${o.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${o.keys.length>1?"\u0939\u0930\u0942":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${o.origin} \u092E\u093E`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${o.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Fq(){return{localeError:Ppe()}}var Dpe=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},n={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${ee(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin),s=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin),s=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}};function Lq(){return{localeError:Dpe()}}var Rpe=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tal",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventa instanceof ${o.expected}, fekk ${s}`:`Ugyldig input: forventa ${i}, fekk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventa ${ee(o.values[0])}`:`Ugyldig val: forventa eitt av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function Mq(){return{localeError:Rpe()}}var Tpe=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${ee(o.values[0])}`:`Ugyldig valg: forventet en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}};function Bq(){return{localeError:Tpe()}}var Epe=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},n={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${ee(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function jq(){return{localeError:Epe()}}var $pe=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},n={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${ee(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${V(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${V(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Uq(){return{localeError:$pe()}}var Ape=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},n={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${ee(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${V(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Vq(){return{localeError:Ape()}}var Ope=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tuplo",articles:n.masculine},record:{name:"registo",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"ficheiro",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=te(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${ee(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Demasiado grande: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Demasiado pequeno: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Demasiado pequeno: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Hq(){return{localeError:Ope()}}var zpe=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},n={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},o={string:{name:"texto",articles:n.masculine},number:{name:"n\xFAmero",articles:n.masculine},int:{name:"n\xFAmero inteiro",articles:n.masculine},boolean:{name:"valor booleano",articles:n.masculine},bigint:{name:"n\xFAmero bigint",articles:n.masculine},symbol:{name:"s\xEDmbolo",articles:n.masculine},undefined:{name:'valor "undefined"',articles:n.masculine},null:{name:'valor "nulo"',articles:n.masculine},never:{name:'valor "never"',articles:n.masculine},void:{name:'valor "void"',articles:n.masculine},date:{name:"data",articles:n.feminine},array:{name:"vetor",articles:n.masculine},object:{name:"objeto",articles:n.masculine},tuple:{name:"tupla",articles:n.feminine},record:{name:"registro",articles:n.masculine},map:{name:"mapa",articles:n.masculine},set:{name:"conjunto",articles:n.masculine},file:{name:"arquivo",articles:n.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:n.masculine},nan:{name:'valor "NaN"',articles:n.masculine},function:{name:"fun\xE7\xE3o",articles:n.feminine}};function i(a,s){let l=o[a]??{name:`valor "${a}"`,articles:n.masculine};return`${l.articles[s]} ${l.name}`}return a=>{switch(a.code){case"invalid_type":{let s=i(a.expected,"indefinite"),l=te(a.input),c=i(l,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${c}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${ee(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${V(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",l=t(a.origin);return l?`Grande demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${l.unit??"elementos"}`:`Grande demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",l=t(a.origin);return l?`Pequeno demais: esperava que ${i(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${l.unit??"elementos"}`:`Pequeno demais: esperava que ${i(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${V(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(l=>`'${l}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${i(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function Wq(){return{localeError:zpe()}}var Npe=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(o){return e[o]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},n={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${ee(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Prea mic: a\u0219teptat ca ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${V(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}};function Zq(){return{localeError:Npe()}}function Gq(e,t,r,n){let o=Math.abs(e),i=o%10,a=o%100;return a>=11&&a<=19?n:i===1?t:i>=2&&i<=4?r:n}var Fpe=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${ee(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);if(a){let s=Number(o.maximum),l=Gq(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);if(a){let s=Number(o.minimum),l=Gq(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function qq(){return{localeError:Fpe()}}var Lpe=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(o){return e[o]??null}let r={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},n={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${o.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${i}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${ee(o.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED ma\u0165 ${i}${o.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED by\u0165 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${i.includes}"`:i.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${V(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}};function Kq(){return{localeError:Lpe()}}var Mpe=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},n={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${ee(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${V(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}};function Xq(){return{localeError:Mpe()}}var Bpe=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},n={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${ee(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${V(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Qq(){return{localeError:Bpe()}}var jpe=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},n={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${ee(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${V(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Yq(){return{localeError:jpe()}}var Upe=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},n={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${i} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return o.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${ee(o.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${V(o.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${o.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${i}${o.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${o.origin} \u0431\u043E\u044F\u0434 ${i}${o.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:i.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${i.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:i.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${i.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:i.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${i.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${r[i.format]??o.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${o.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${o.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${V(o.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${o.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${o.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function Jq(){return{localeError:Upe()}}var Vpe=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},n={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${ee(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(o.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${V(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function eK(){return{localeError:Vpe()}}var Hpe=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(o){return e[o]??null}let r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${i} \xFDerine ${s} alyndy`}case"invalid_value":return o.values.length===1?`N\xE4dogry baha: ${ee(o.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${o.origin??"baha"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`N\xE4dogry setir: "${i.prefix}" bilen ba\u015Flamaly`:i.format==="ends_with"?`N\xE4dogry setir: "${i.suffix}" bilen gutarmaly`:i.format==="includes"?`N\xE4dogry setir: "${i.includes}" saklamaly`:i.format==="regex"?`N\xE4dogry setir: ${i.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[i.format]??o.format}`}case"not_multiple_of":return`N\xE4dogry san: ${o.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${o.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function tK(){return{localeError:Hpe()}}var Wpe=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${ee(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function rK(){return{localeError:Wpe()}}var Zpe=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},n={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${ee(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${V(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function FS(){return{localeError:Zpe()}}function oK(){return FS()}var Gpe=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},n={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${ee(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${V(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${V(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function nK(){return{localeError:Gpe()}}var qpe=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},n={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${ee(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function iK(){return{localeError:qpe()}}var Kpe=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},n={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${ee(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${o.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${a.verb} ${i}${o.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${V(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function aK(){return{localeError:Kpe()}}var Xpe=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},n={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${ee(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${V(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function sK(){return{localeError:Xpe()}}var Qpe=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},n={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${ee(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${V(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function lK(){return{localeError:Qpe()}}var Ype=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"},map:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},n={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,a=te(o.input),s=n[a]??a;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${ee(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${V(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",a=t(o.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${a.verb} ${i}${o.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",a=t(o.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${a.verb} ${i}${o.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${V(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function cK(){return{localeError:Ype()}}var dK,dA=Symbol("ZodOutput"),uA=Symbol("ZodInput"),LS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function MS(){return new LS}(dK=globalThis).__zod_globalRegistry??(dK.__zod_globalRegistry=MS());var yo=globalThis.__zod_globalRegistry;var an=Symbol.for("zod.compile.invalid"),uK=Symbol.for("zod.compile.fallback"),ma=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},it=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function ehe(e,t){try{return jS(e,{assertOnly:!0})}catch{return t}}function hA(e,t){try{let r=jS(e),n=BS(e,r);return n._zod.bag.validator=ehe(e,r),n}catch(r){if(t?.strict)throw r;return e}}function BS(e,t){if(AS(e))throw new it("a schema whose subtree contains a reference cycle");let r=wt(e),n=e._zod.run,o=n.__originalRun??n,i=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[uK]||s&&OS(s,a.value))return o(a,s);let l=t(a.value);return l!==an?(a.value=l,a):(s&&(s[uK]=!0),o(a,s))};return i.__originalRun=o,r._zod.bag.fallbackRun=o,r._zod.bag.validator=t,r._zod.run=i,n.__originalRun||the(r,e,t),r}function the(e,t,r){let n=e,o=t;if(typeof o.safeParse=="function"){let i=o.safeParse;n.safeParse=(a,s)=>{let l=r(a);return l!==an?{success:!0,data:l}:i(a,s)}}if(typeof o.parse=="function"){let i=o.parse;n.parse=(a,s)=>{let l=r(a);return l!==an?l:i(a,s)}}}function jS(e,t){let r=!0;try{r=AS(e)}catch{}if(r)throw new it("a schema whose subtree contains a reference cycle");let n={constants:new Map,constantCounter:0,varCounter:0,definite:!0},o=new Ou(["input"]),i=nr(o,n,e,"input",!t?.assertOnly);o.write(i===null?"return true;":`return ${i};`);let a=["INVALID",...n.constants.keys()],s=[an,...n.constants.values()],l=o.content.join(`
115
+ `),c=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
116
+ ${l}`:l:"",d=Function,u=`return (input) => {
117
+ ${l}
118
+ }`,f;try{f=new d(...a,u)(...s)}catch(m){throw new it(`this schema (generated code failed to evaluate: ${m.message})`)}return t?.debug&&(f.code=c),f.definite=n.definite,f}function Le(e,t){for(let[n,o]of e.constants)if(o===t)return n;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function Lu(e,t){return e.definite=!1,Le(e,t)}function $e(e){return`v${e.varCounter++}`}function rhe(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return an;let n=r;return n.issues.length===0?n.value:an}function zo(e,t,r,n,o=!0){let i=e.content.length,a=t.constants.size,s=t.constantCounter,l=t.varCounter;try{return nr(e,t,r,n,o)}catch(c){if(!(c instanceof it)||!c.islandable)throw c;if(e.content.length=i,t.constants.size>a){let d=Array.from(t.constants.keys()).slice(a);for(let u of d)t.constants.delete(u)}return t.constantCounter=s,t.varCounter=l,ohe(e,t,r,n)}}function ohe(e,t,r,n){t.definite=!1;let o=Le(t,r),i=Le(t,rhe),a=$e(t);return e.write(`const ${a} = ${i}(${o}, ${n});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var nhe=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function ihe(e,t,r,n){let o=r._zod.def.checks;if(!o||o.length===0)return n;let i=n;for(let a of o){let s=a._zod.def;if(s.when&&!nhe.has(s.check))throw new it('check with a custom "when" condition');switch(s.check){case"greater_than":ahe(e,t,s,i);break;case"less_than":she(e,t,s,i);break;case"multiple_of":lhe(e,t,s,i);break;case"number_format":vK(e,s,i);break;case"min_length":{let l=Nu(s.minimum,"min_length"),c=fA(e,t,i,`${i}.length >= ${l} && ${i}.length < ${s.minimum*2}`);e.write(`if (${c} < ${l}) return INVALID;`);break}case"max_length":{let l=Nu(s.maximum,"max_length"),c=fA(e,t,i,`${i}.length > ${l}`);e.write(`if (${c} > ${l}) return INVALID;`);break}case"length_equals":{let l=Nu(s.length,"length_equals"),c=fA(e,t,i,`${i}.length >= ${l} && ${i}.length <= ${s.length*2}`);e.write(`if (${c} !== ${l}) return INVALID;`);break}case"min_size":e.write(`if (${i}.size < ${Nu(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${i}.size > ${Nu(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${i}.size !== ${Nu(s.size,"size_equals")}) return INVALID;`);break;case"string_format":i=xK(e,t,s,i);break;case"custom":i=phe(e,t,a,i);break;case"bigint_format":che(e,s,i);break;case"mime_type":dhe(e,t,s,i);break;case"property":fhe(e,t,s,i);break;case"properties":uhe(e,t,s,i);break;case"overwrite":{let l=$e(t);mhe(e,t,a,i,l),i=l;break}default:throw new it(`check type ${s.check}`)}}return i}function fA(e,t,r,n){let o=Le(t,$u),i=$e(t);return e.write(`const ${i} = typeof ${r} === "string" && ${n} ? ${o}(${r}) : ${r}.length;`),i}function Nu(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new it(`${t} bound of type ${typeof e}`);return`${e}`}function gK(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new it("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new it("comparison check with Invalid Date bound");return Le(e,t)}throw new it(`comparison check bound of type ${typeof t}`)}function ahe(e,t,r,n){let o=r.inclusive?"<":"<=";e.write(`if (${n} ${o} ${gK(t,r.value)}) return INVALID;`)}function she(e,t,r,n){let o=r.inclusive?">":">=";e.write(`if (${n} ${o} ${gK(t,r.value)}) return INVALID;`)}function lhe(e,t,r,n){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new it("multiple_of check with a zero divisor");e.write(`if (${n} % ${r.value}n !== 0n) return INVALID;`)}else{let o=Le(t,ex);e.write(`if (${o}(${n}, ${Nu(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function vK(e,t,r){let n=t.format;switch(n){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new it(`number format ${n}`)}}function che(e,t,r){let n=t.format;if(n)switch(n){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new it(`bigint format ${n}`)}}function dhe(e,t,r,n){let o=r.mime;if(o&&o.length>0){let i=Le(t,new Set(o));e.write(`if (!${i}.has(${n}.type)) return INVALID;`)}}function uhe(e,t,r,n){if(r.when)throw new it('check with a custom "when" condition');e.write(`if (${n} == null) return INVALID;`);let o=r.shape;for(let i of Reflect.ownKeys(o)){let a=typeof i=="symbol"?Le(t,i):on(i),s=$e(t);e.write(`const ${s} = ${n}[${a}];`),zo(e,t,o[i],s,!1)}}function fhe(e,t,r,n){let o=`${n}[${JSON.stringify(r.property)}]`;nr(e,t,r.schema,o)}function mhe(e,t,r,n,o){let i=r._zod.def.tx;if(!i)throw new it("overwrite check without a transform function");if(Mu(i))throw new ma("z.compile: async overwrite transforms are not supported");let a=Le(t,i);e.write(`const ${o} = ${a}(${n});`)}function mA(){throw new En}function gA(e){this.issues.push(e)}function phe(e,t,r,n){let o=r._zod.def;if(o.fn){if(Mu(o.fn))throw new ma("z.compile: async .refine() predicates are not supported");let i=Lu(t,o.fn),a=Le(t,mA),s=$e(t);return e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),n}if(r._zod.check){if(Mu(r._zod.check))throw new ma("z.compile: async .superRefine() / check functions are not supported");let i=r._zod.check,s=Lu(t,c=>{let d={value:c,issues:[],addIssue:gA};return i(d)instanceof Promise&&mA(),d.issues.length===0?d.value:an}),l=$e(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}throw new it("custom check without a predicate or check function")}var hhe=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function xK(e,t,r,n,o=!0){let i=r.format;if(i==="base64"){let c=Le(t,yx);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="base64url"){let c=Le(t,yS);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="jwt"){let c=Le(t,wS),d=Le(t,r.alg??null);return e.write(`if (!${c}(${n}, ${d})) return INVALID;`),n}if(i==="ipv6"){let c=Le(t,bx);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="cidrv6"){let c=Le(t,xS);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="credit_card"){let c=Le(t,_S);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(i==="iban"){let c=Le(t,IS);return e.write(`if (!${c}(${n})) return INVALID;`),n}let a=r;if(i==="url"||i==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let c=Le(t,hS),d=Le(t,r),u=$e(t),f=$e(t);if(e.write(`const ${u} = ${n}.trim();`),e.write(`const ${f} = ${c}(${u}, ${d});`),e.write(`if (typeof ${f} === "number") return INVALID;`),a.hostname!==void 0){let g=Le(t,gS);e.write(`if (!${g}(${f}, ${d}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let g=Le(t,vS);e.write(`if (!${g}(${f}, ${d}.protocol)) return INVALID;`)}if(!o)return null;let m=$e(t),p=a.normalize?`${f}.href`:`${Le(t,xx)}(${u})`;return e.write(`const ${m} = ${p};`),m}let s=r.fn;if(s){if(Mu(s))throw new it(`async string format ${i}`);let c=Le(t,s);return e.write(`if (!${c}(${n})) return INVALID;`),n}if(hhe.has(i)&&r.pattern){let c=Le(t,r.pattern);return e.write(`${c}.lastIndex = 0;`),e.write(`if (!${c}.test(${n})) return INVALID;`),n}let l=r.format;switch(l){case"regex":throw new it("regex format without a pattern");case"lowercase":e.write(`if (${n} !== ${n}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${n} !== ${n}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${n}.includes(${on(r.includes)})) return INVALID;`);break;case"starts_with":{let c=r.prefix;e.write(`if (${n}.slice(0, ${c.length}) !== ${on(c)}) return INVALID;`);break}case"ends_with":{let c=r.suffix;e.write(`if (${n}.slice(-${c.length}) !== ${on(c)}) return INVALID;`);break}default:throw new it(`string format ${l}`)}return n}function nr(e,t,r,n,o=!0){let i=r._zod.def,a=i.type;if(i.coerce)throw new it(`coercion (z.coerce.${a}())`);let s=o||!!i.checks?.length,l;switch(a){case"string":l=ghe(e,t,r,n,s);break;case"number":l=vhe(e,r,n);break;case"boolean":l=xhe(e,n);break;case"bigint":l=bhe(e,r,n);break;case"symbol":l=yhe(e,n);break;case"undefined":l=_he(e,n);break;case"null":l=Ihe(e,n);break;case"any":case"unknown":l=n;break;case"never":e.write("return INVALID;"),l=n;break;case"void":l=whe(e,n);break;case"nan":l=She(e,n);break;case"date":l=khe(e,n);break;case"object":l=Che(e,t,r,n,s);break;case"optional":l=Phe(e,t,r,n,s);break;case"nullable":l=The(e,t,r,n,s);break;case"array":l=Ehe(e,t,r,n,s);break;case"literal":l=$he(e,t,r,n);break;case"enum":l=Ahe(e,t,r,n);break;case"readonly":{let c=mK(e,t,r,n),d=$e(t);e.write(`const ${d} = Object.freeze(${c});`),l=d;break}case"success":mK(e,t,r,n),l="true";break;case"default":case"prefault":l=Ohe(e,t,r,n);break;case"nonoptional":l=zhe(e,t,r,n);break;case"tuple":l=Nhe(e,t,r,n);break;case"union":l=Fhe(e,t,r,n);break;case"intersection":l=Bhe(e,t,r,n);break;case"record":l=jhe(e,t,r,n);break;case"map":l=Vhe(e,t,r,n);break;case"set":l=Hhe(e,t,r,n);break;case"file":l=Whe(e,n);break;case"template_literal":l=Zhe(e,t,r,n);break;case"lazy":l=Ghe(e,t,r,n);break;case"pipe":l=qhe(e,t,r,n);break;case"custom":l=Khe(e,t,r,n);break;case"transform":l=Yhe(e,t,r,n);break;case"catch":l=Qhe(e,t,r,n);break;default:throw new it(`schema type ${a}`)}return l===null?null:ihe(e,t,r,l)}function ghe(e,t,r,n,o=!0){e.write(`if (typeof ${n} !== "string") return INVALID;`);let i=r._zod.def;return i.format===void 0?n:xK(e,t,i,n,o)}function vhe(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let n=t._zod.def;return n.check==="number_format"&&n.format&&vK(e,{format:n.format},r),r}function xhe(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function bhe(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let n=t._zod.def;if(n.format)switch(n.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function yhe(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function _he(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Ihe(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function whe(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function She(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function khe(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function Che(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (typeof ${n} !== "object" || ${n} === null || Array.isArray(${n})) return INVALID;`);let a=i.shape,s=Object.keys(a),l=Object.getOwnPropertySymbols(a),c=l.length?[...s,...l]:s,d=x=>typeof x=="symbol"?Le(t,x):on(x),u=x=>typeof x=="symbol"?`[${d(x)}]`:on(x),f=a;if(s.includes("__proto__"))throw new it('object shape key "__proto__"');let m=new Map;for(let x of c){let _=f[x],I=d(x),S=$e(t);if(e.write(`const ${S} = ${n}[${I}];`),_._zod.optin!==void 0){let w=$e(t);e.write(`let ${w} = (() => {`),e.indented(P=>{let $=zo(P,t,_,S);P.write(`return ${$};`)}),e.write("})();"),_._zod.optout==="optional"?(e.write(`if (${w} === INVALID) {`),e.indented(P=>{P.write(`if (${I} in ${n}) return INVALID;`),P.write(`${w} = undefined;`)}),e.write("}")):e.write(`if (${w} === INVALID) return INVALID;`),m.set(x,w)}else{Rhe(_)&&e.write(`if (!(${I} in ${n})) return INVALID;`);let w=zo(e,t,_,S,o);w!==null&&m.set(x,w)}}let p=i.catchall,g="none";if(p){let x=p._zod.def.type;if(x==="never"){let _=s.map(I=>`k !== ${on(I)}`).join(" && ")||"true";e.write(`for (const k in ${n}) {`),e.indented(I=>{I.write(`if (${_}) return INVALID;`)}),e.write("}")}else(x==="unknown"||x==="any")&&!p._zod.def.checks?.length?g="passthrough":g="schema"}let y=$e(t),v=c.some(x=>fK(f[x])||pA(f[x]));if(!o){if(g==="schema"){let x=s.length>0?Le(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{_.write('if (k === "__proto__") continue;'),x&&_.write(`if (${x}.has(k)) continue;`);let I=$e(t);_.write(`const ${I} = ${n}[k];`),zo(_,t,p,I,!1)}),e.write("}")}return null}if(v){e.write(`const ${y} = {};`);for(let x of c){let _=d(x),I=m.get(x);pA(f[x])?e.write(`if (${_} in ${n}) ${y}[${_}] = ${I};`):fK(f[x])?e.write(`if (${I} !== undefined || ${_} in ${n}) ${y}[${_}] = ${I};`):e.write(`${y}[${_}] = ${I};`)}}else{let x=c.map(_=>`${u(_)}: ${m.get(_)}`).join(", ");e.write(`const ${y} = { ${x} };`)}if(g!=="none"){let x=s.length>0?Le(t,new Set(s)):null;e.write(`for (const k in ${n}) {`),e.indented(_=>{if(_.write('if (k === "__proto__") continue;'),x&&_.write(`if (${x}.has(k)) continue;`),g==="passthrough")_.write(`${y}[k] = ${n}[k];`);else{let I=$e(t);_.write(`const ${I} = ${n}[k];`);let S=zo(_,t,p,I);_.write(`${y}[k] = ${S};`)}}),e.write("}")}return y}function Phe(e,t,r,n,o=!0){let i=r._zod.def;if(Dhe(r))return nr(e,t,i.innerType,n,o);if(i.innerType._zod.optin==="defaulted"){let s=$e(t),l=$e(t);return e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(c=>{c.write(`const ${l} = (() => {`),c.indented(d=>{let u=nr(d,t,i.innerType,n);d.write(`return ${u};`)}),c.write("})();"),c.write(`if (${l} !== INVALID) ${s} = ${l};`)}),e.write("} else {"),e.indented(c=>{let d=nr(c,t,i.innerType,n);c.write(`${s} = ${d};`)}),e.write("}"),s}let a=o?$e(t):null;return a&&e.write(`let ${a};`),e.write(`if (${n} !== undefined) {`),e.indented(s=>{let l=nr(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function Dhe(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function Rhe(e){return e._zod.optin===void 0&&Fu(e)}function Fu(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?Fu(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?Fu(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(Fu):!0;case"intersection":return!t.left||!t.right?!0:Fu(t.left)&&Fu(t.right);case"pipe":return t.in?Fu(t.in):!0;default:return!0}}function pA(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function fK(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Op(e)}function Op(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Op(t.innerType):!0;case"union":return t.options?t.options.some(Op):!0;case"intersection":return!t.left||!t.right||Op(t.left)||Op(t.right);case"pipe":return t.out?Op(t.out):!0;default:return!0}}function The(e,t,r,n,o=!0){let i=r._zod.def,a=o?$e(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${n} !== null) {`),e.indented(s=>{let l=nr(s,t,i.innerType,n,o);a&&l!==null&&s.write(`${a} = ${l};`)}),e.write("}"),a}function Ehe(e,t,r,n,o=!0){let i=r._zod.def;e.write(`if (!Array.isArray(${n})) return INVALID;`);let a=o?$e(t):null,s=$e(t),l=$e(t);return a&&e.write(`const ${a} = new Array(${n}.length);`),e.write(`for (let ${s} = 0; ${s} < ${n}.length; ${s}++) {`),e.indented(c=>{c.write(`const ${l} = ${n}[${s}];`);let d=zo(c,t,i.element,l,o);a&&d!==null&&c.write(`${a}[${s}] = ${d};`)}),e.write("}"),a}function $he(e,t,r,n){let i=r._zod.def.values;if(i.length!==1){let s=Le(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}let a=i[0];if(typeof a=="number"&&Number.isNaN(a)){let s=Le(t,new Set(i));return e.write(`if (!${s}.has(${n})) return INVALID;`),n}if(typeof a=="string")e.write(`if (${n} !== ${on(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${n} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${n} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${n} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${n} !== ${a}n) return INVALID;`);else throw new it(`literal type ${typeof a}`);return n}function Ahe(e,t,r,n){let o=r._zod.values;if(!o)throw new it("enum schema without enumerated values");let i=Le(t,o);return e.write(`if (!${i}.has(${n})) return INVALID;`),n}function mK(e,t,r,n){let o=r._zod.def;return nr(e,t,o.innerType,n)}function Ohe(e,t,r,n){let o=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return nr(e,t,o.innerType,n);let l=Le(t,a),c=$e(t);return e.write(`let ${c} = ${n};`),e.write(`if (${n} === undefined) ${c} = ${l}();`),nr(e,t,o.innerType,c)}let s=$e(t);if(a){let l=Le(t,a),c=Le(t,tx);e.write(`let ${s};`),e.write(`if (${n} === undefined) {`),e.indented(d=>{d.write(`${s} = ${c}(${l}());`)}),e.write("} else {"),e.indented(d=>{let u=nr(d,t,o.innerType,n);d.write(`${s} = ${u} === undefined ? ${c}(${l}()) : ${u};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${n} !== undefined) {`),e.indented(l=>{let c=nr(l,t,o.innerType,n);l.write(`${s} = ${c};`)}),e.write("}");return s}function zhe(e,t,r,n){let o=r._zod.def,i=nr(e,t,o.innerType,n),a=$e(t);return e.write(`const ${a} = ${i};`),e.write(`if (${a} === undefined) return INVALID;`),a}function Nhe(e,t,r,n){let o=r._zod.def,i=o.items,a=o.rest;e.write(`if (!Array.isArray(${n})) return INVALID;`);let s=pK(i,"optin"),l=pK(i,"optout");a?e.write(`if (${n}.length < ${s}) return INVALID;`):e.write(`if (${n}.length < ${s} || ${n}.length > ${i.length}) return INVALID;`);let c=$e(t);e.write(`const ${c} = [];`);for(let d=0;d<i.length;d++){let u=i[d];if(d>=l)e.write(`if (${c}.length === ${d}) {`),e.indented(f=>{f.write(`if (${d} < ${n}.length) {`),f.indented(m=>{let p=$e(t);m.write(`const ${p} = ${n}[${d}];`);let g=zo(m,t,u,p);m.write(`${c}[${d}] = ${g};`)}),f.write("} else {"),f.indented(m=>{if(pA(u)){m.write(`${c}.length = ${d};`);return}let p=$e(t),g=$e(t);m.write(`const ${p} = undefined;`),m.write(`const ${g} = (() => {`),m.indented(y=>{let v=zo(y,t,u,p);y.write(`return ${v};`)}),m.write("})();"),m.write(`if (${g} === INVALID || ${g} === undefined) ${c}.length = ${d};`),m.write(`else ${c}[${d}] = ${g};`)}),f.write("}")}),e.write("}");else{let f=$e(t);e.write(`const ${f} = ${n}[${d}];`);let m=zo(e,t,u,f);e.write(`${c}[${d}] = ${m};`)}}if(a){let d=$e(t),u=$e(t);e.write(`for (let ${d} = ${i.length}; ${d} < ${n}.length; ${d}++) {`),e.indented(f=>{f.write(`const ${u} = ${n}[${d}];`);let m=zo(f,t,a,u);f.write(`${c}[${d}] = ${m};`)}),e.write("}")}return c}function pK(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function Fhe(e,t,r,n){let o=r._zod.def,i=o.options;if(o.discriminator)return Lhe(e,t,o,n);if(o.inclusive===!1)throw new it("exclusive unions (z.xor)");if(i.length===0)return e.write("return INVALID;"),n;if(i.length===1)return nr(e,t,i[0],n);if(i.every(l=>l._zod.def.type==="literal"&&!l._zod.def.checks?.length)){let l=new Set(i.flatMap(d=>d._zod.def.values)),c=Le(t,l);return e.write(`if (!${c}.has(${n})) return INVALID;`),n}let s=$e(t);e.write(`let ${s};`);for(let l=0;l<i.length;l++){let c=i[l];l===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(d=>{let u=nr(d,t,c,n);d.write(`return ${u};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function Lhe(e,t,r,n){if(r.unionFallback)throw new it("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),n;let o=$e(t),i=$e(t);e.write(`const ${o} = ${n}?.[${on(r.discriminator)}];`),e.write(`let ${i};`);let a=!0,s=new Set;for(let l of r.options){let c=l._zod.propValues?.[r.discriminator];if(!c||c.size===0)throw new it("discriminated union option without static discriminator values");for(let f of c){if(s.has(f))throw new it(`duplicate discriminator value ${String(f)}`);s.add(f)}let d=Array.from(c,f=>Mhe(t,o,f)),u=a?"if":"else if";e.write(`${u} (${d.join(" || ")}) {`),e.indented(f=>{let m=nr(f,t,l,n);f.write(`${i} = ${m};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),i}function Mhe(e,t,r){if(typeof r=="string")return`${t} === ${on(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let n=Le(e,r);return`${t} === ${n}`}throw new it(`literal discriminator value ${String(r)}`)}function Bhe(e,t,r,n){let o=r._zod.def;t.definite=!1;let i=zo(e,t,o.left,n),a=zo(e,t,o.right,n),s=Le(t,Ep),l=$e(t);return e.write(`const ${l} = ${s}(${i}, ${a});`),e.write(`if (!${l}.valid) return INVALID;`),`${l}.data`}function jhe(e,t,r,n){let o=r._zod.def,i=Le(t,Ri);e.write(`if (!${i}(${n})) return INVALID;`);let a=$e(t),s=$e(t),l=$e(t);e.write(`const ${a} = {};`);let c=o,d=c.partial?void 0:o.keyType._zod.values;if(d){let m=[];for(let g of d){if(!(typeof g=="string"||typeof g=="number"||typeof g=="symbol"))throw new it(`record key value ${String(g)}`);let y=typeof g=="number"?g.toString():g;if(y==="__proto__")throw new it('record key "__proto__"');m.push(y);let v=Le(t,g),x=nr(e,t,o.keyType,v),_=$e(t);e.write(`const ${_} = ${n}[${Uhe(t,y)}];`);let I=zo(e,t,o.valueType,_);e.write(`${a}[${x}] = ${I};`)}let p=Le(t,new Set(m));return e.write(`for (const ${s} in ${n}) {`),e.indented(g=>{g.write(`if (${p}.has(${s})) continue;`),c.mode==="loose"?g.write(`if (${s} !== "__proto__") ${a}[${s}] = ${n}[${s}];`):g.write("return INVALID;")}),e.write("}"),a}let u=o.keyType._zod.def;if(!(u.type==="string"&&u.format===void 0&&!u.coerce&&(u.checks?.length??0)===0)){let m=o.mode==="loose",p=jS(o.keyType);p.definite===!1&&(t.definite=!1);let g=Le(t,p),y=Le(t,il),v=$e(t);return hK(e,t,n,s,x=>{x.write(`let ${v} = ${g}(${s});`),x.write(`if (${v} === INVALID && typeof ${s} === "string" && ${y}.test(${s})) ${v} = ${g}(Number(${s}));`),m?x.write(`if (${v} === INVALID) { ${a}[${s}] = ${n}[${s}]; continue; }`):x.write(`if (${v} === INVALID) return INVALID;`),x.write(`if (${v} === "__proto__") continue;`);let _=$e(t);x.write(`const ${_} = ${n}[${s}];`);let I=zo(x,t,o.valueType,_);x.write(`${a}[${v}] = ${I};`)}),a}return hK(e,t,n,s,m=>{m.write(`const ${l} = ${n}[${s}];`);let p=zo(m,t,o.valueType,l);m.write(`${a}[${s}] = ${p};`)},"return INVALID;"),a}function hK(e,t,r,n,o,i){let a=Le(t,Object.prototype.propertyIsEnumerable),s=$e(t),l=$e(t),c=$e(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${l} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${c} = 0; ${c} < ${l}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${l}[${c}];`),d.write(`if (${n} === "__proto__" || !${a}.call(${r}, ${n})) continue;`),o(d)}),e.write("}"),e.write(`for (let ${c} = 0; ${c} < ${s}.length; ${c}++) {`),e.indented(d=>{d.write(`const ${n} = ${s}[${c}];`),d.write(`if (!${a}.call(${r}, ${n})) continue;`),i?d.write(i):o(d)}),e.write("}")}function Uhe(e,t){return typeof t=="string"?on(t):Le(e,t)}function Vhe(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Map)) return INVALID;`);let i=$e(t),a=$e(t),s=$e(t);return e.write(`const ${i} = new Map();`),e.write(`for (const [${a}, ${s}] of ${n}) {`),e.indented(l=>{let c=nr(l,t,o.keyType,a),d=nr(l,t,o.valueType,s);l.write(`${i}.set(${c}, ${d});`)}),e.write("}"),i}function Hhe(e,t,r,n){let o=r._zod.def;e.write(`if (!(${n} instanceof Set)) return INVALID;`);let i=$e(t),a=$e(t);return e.write(`const ${i} = new Set();`),e.write(`for (const ${a} of ${n}) {`),e.indented(s=>{let l=nr(s,t,o.valueType,a);s.write(`${i}.add(${l});`)}),e.write("}"),i}function Whe(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function Zhe(e,t,r,n){e.write(`if (typeof ${n} !== "string") return INVALID;`);let o=r._zod.pattern;if(o){let i=Le(t,o);e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${n})) return INVALID;`)}return n}function Ghe(e,t,r,n){let o=r._zod.def,i=Lu(t,o.getter),a=Le(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(l=>{l.write(`const inner = ${i}();`),l.write(`${a}.parser = function(input) {`),l.indented(c=>{c.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),c.write("return result.issues.length === 0 ? result.value : INVALID;")}),l.write("};")}),e.write("}");let s=$e(t);return e.write(`const ${s} = ${a}.parser(${n});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function qhe(e,t,r,n){let o=r._zod.def,i=nr(e,t,o.in,n);if(o.transform){if(Mu(o.transform))throw new ma("z.compile: async transforms in pipes are not supported");let a=o.transform,l=Lu(t,d=>{let u={value:d,issues:[],addIssue:gA},f=a(d,u);return f instanceof Promise?an:u.issues.length===0?f:an}),c=$e(t);return e.write(`const ${c} = ${l}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),nr(e,t,o.out,c)}else return nr(e,t,o.out,i)}function Mu(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function Khe(e,t,r,n){let o=r._zod.def;if(o.fn){if(Mu(o.fn))throw new ma("z.compile: async custom predicates are not supported");let i=Lu(t,o.fn),a=Le(t,mA),s=$e(t);e.write(`const ${s} = ${i}(${n});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new it("custom schema without a predicate function");return n}function Xhe(e,t,r){let n=e._zod.run({value:r,issues:[]},{});if(n&&typeof n.then=="function")return an;let o=n;return o.issues.length===0?o.value:t()}function Qhe(e,t,r,n){let o=r._zod.def;if(!o.catchValue[Gw])throw new it("catch with a callback (only a constant catch value compiles)",!1);let i=$e(t);e.write(`let ${i} = (() => {`),e.indented(c=>{let d=zo(c,t,o.innerType,n);c.write(`return ${d};`)}),e.write("})();");let a=Le(t,o.innerType),s=Lu(t,o.catchValue),l=Le(t,Xhe);return e.write(`if (${i} === INVALID) {`),e.indented(c=>{c.write(`${i} = ${l}(${a}, ${s}, ${n});`),c.write(`if (${i} === INVALID) return INVALID;`)}),e.write("}"),i}function Yhe(e,t,r,n){let o=r._zod.def;if(o.transform){if(Mu(o.transform))throw new ma("z.compile: async transforms are not supported");let i=o.transform,s=Lu(t,c=>{let d={value:c,issues:[],addIssue:gA},u=i(c,d);return u instanceof Promise?an:d.issues.length===0?u:an}),l=$e(t);return e.write(`const ${l} = ${s}(${n});`),e.write(`if (${l} === INVALID) return INVALID;`),l}return n}function US(e){return e.checks&&(e.checks=[...e.checks]),e}function vA(e,t){return new e(US({type:"string",...ae(t)}))}function xA(e,t){return new e(US({type:"string",coerce:!0,...ae(t)}))}function VS(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...ae(t)})}function HS(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...ae(t)})}function WS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...ae(t)})}function ZS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ae(t)})}function GS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ae(t)})}function qS(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ae(t)})}function Ex(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ae(t)})}function KS(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...ae(t)})}function XS(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...ae(t)})}function QS(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...ae(t)})}function YS(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...ae(t)})}function JS(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...ae(t)})}function e1(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...ae(t)})}function t1(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...ae(t)})}function r1(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...ae(t)})}function o1(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...ae(t)})}function bA(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...ae(t)})}function n1(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ae(t)})}function i1(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ae(t)})}function a1(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...ae(t)})}function s1(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...ae(t)})}function l1(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...ae(t)})}function yA(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...ae(t)})}function _A(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...ae(t)})}function c1(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...ae(t)})}var IA={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function $x(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ae(t)})}function Ax(e,t){return new e({type:"string",format:"date",check:"string_format",...ae(t)})}function Ox(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...ae(t)})}function zx(e,t){return new e({type:"string",format:"duration",check:"string_format",...ae(t)})}function wA(e,t){return new e(US({type:"number",checks:[],...ae(t)}))}function SA(e,t){return new e(US({type:"number",coerce:!0,checks:[],...ae(t)}))}function kA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ae(t)})}function CA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...ae(t)})}function PA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...ae(t)})}function DA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...ae(t)})}function RA(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...ae(t)})}function TA(e,t){return new e({type:"boolean",...ae(t)})}function EA(e,t){return new e({type:"boolean",coerce:!0,...ae(t)})}function $A(e,t){return new e({type:"bigint",...ae(t)})}function AA(e,t){return new e({type:"bigint",coerce:!0,...ae(t)})}function OA(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...ae(t)})}function zA(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...ae(t)})}function NA(e,t){return new e({type:"symbol",...ae(t)})}function FA(e,t){return new e({type:"undefined",...ae(t)})}function LA(e,t){return new e({type:"null",...ae(t)})}function MA(e){return new e({type:"any"})}function BA(e){return new e({type:"unknown"})}function jA(e,t){return new e({type:"never",...ae(t)})}function UA(e,t){return new e({type:"void",...ae(t)})}function VA(e,t){return new e({type:"date",...ae(t)})}function HA(e,t){return new e({type:"date",coerce:!0,...ae(t)})}function WA(e,t){return new e({type:"nan",...ae(t)})}function rs(e,t){return new lS({check:"less_than",...ae(t),value:e,inclusive:!1})}function Qn(e,t){return new lS({check:"less_than",...ae(t),value:e,inclusive:!0})}function os(e,t){return new cS({check:"greater_than",...ae(t),value:e,inclusive:!1})}function Yn(e,t){return new cS({check:"greater_than",...ae(t),value:e,inclusive:!0})}function d1(e){return os(0,e)}function u1(e){return rs(0,e)}function f1(e){return Qn(0,e)}function m1(e){return Yn(0,e)}function Fc(e,t){return new RE({check:"multiple_of",...ae(t),value:e})}function Lc(e,t){return new $E({check:"max_size",...ae(t),maximum:e})}function ns(e,t){return new AE({check:"min_size",...ae(t),minimum:e})}function Bu(e,t){return new OE({check:"size_equals",...ae(t),size:e})}function ju(e,t){return new zE({check:"max_length",...ae(t),maximum:e})}function al(e,t){return new NE({check:"min_length",...ae(t),minimum:e})}function Uu(e,t){return new FE({check:"length_equals",...ae(t),length:e})}function zp(e,t){return new LE({check:"string_format",format:"regex",...ae(t),pattern:e})}function Np(e){return new ME({check:"string_format",format:"lowercase",...ae(e)})}function Fp(e){return new BE({check:"string_format",format:"uppercase",...ae(e)})}function Lp(e,t){return new jE({check:"string_format",format:"includes",...ae(t),includes:e})}function Mp(e,t){return new UE({check:"string_format",format:"starts_with",...ae(t),prefix:e})}function Bp(e,t){return new VE({check:"string_format",format:"ends_with",...ae(t),suffix:e})}function p1(e,t,r){return new HE({check:"property",property:e,schema:t,...ae(r)})}function jp(e,t){return new WE({check:"properties",shape:e,...ae(t)})}function Up(e,t){return new ZE({check:"mime_type",mime:e,...ae(t)})}function pa(e){return new GE({check:"overwrite",tx:e})}function Vp(e){return pa(t=>t.normalize(e))}function Hp(){return pa(e=>e.trim())}function Wp(){return pa(e=>e.toLowerCase())}function Zp(){return pa(e=>e.toUpperCase())}function Gp(){return pa(e=>$T(e))}function ZA(e,t,r){return new e({type:"array",element:t,...ae(r)})}function Jhe(e,t,r){return new e({type:"union",options:t,...ae(r)})}function ege(e,t,r){return new e({type:"union",options:t,inclusive:!1,...ae(r)})}function tge(e,t,r,n){return new e({type:"union",options:r,discriminator:t,...ae(n)})}function rge(e,t,r){return new e({type:"intersection",left:t,right:r})}function oge(e,t,r,n){let o=r instanceof je,i=o?n:r,a=o?r:null;return new e({type:"tuple",items:t,rest:a,...ae(i)})}function nge(e,t,r,n){return new e({type:"record",keyType:t,valueType:r,...ae(n)})}function ige(e,t,r,n){return new e({type:"map",keyType:t,valueType:r,...ae(n)})}function age(e,t,r){return new e({type:"set",valueType:t,...ae(r)})}function sge(e,t,r){let n=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:n,...ae(r)})}function lge(e,t,r){return new e({type:"enum",entries:t,...ae(r)})}function cge(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...ae(r)})}function GA(e,t){return new e({type:"file",...ae(t)})}function dge(e,t){return new e({type:"transform",transform:t})}function uge(e,t){return new e({type:"optional",innerType:t})}function fge(e,t){return new e({type:"nullable",innerType:t})}function mge(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():tx(r)}})}function pge(e,t,r){return new e({type:"nonoptional",innerType:t,...ae(r)})}function hge(e,t){return new e({type:"success",innerType:t})}function gge(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:LT(r)})}function vge(e,t,r){return new e({type:"pipe",in:t,out:r})}function xge(e,t){return new e({type:"readonly",innerType:t})}function bge(e,t,r){return new e({type:"template_literal",parts:t,...ae(r)})}function yge(e,t){return new e({type:"lazy",getter:t})}function _ge(e,t){return new e({type:"promise",innerType:t})}function qA(e,t,r){let n=ae(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}function KA(e,t,r){return new e({type:"custom",check:"custom",fn:t,...ae(r)})}function XA(e,t){let r=bK(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Sp(o,n.value,r._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(Sp(i))}},e(n.value,n)),t);return r}function bK(e,t){let r=new $t({check:"custom",...ae(t)});return r._zod.check=e,r}function QA(e){let t=new $t({check:"describe"});return t._zod.onattach=[r=>{let n=yo.get(r)??{};yo.add(r,{...n,description:e})}],t._zod.check=()=>{},t}function YA(e){let t=new $t({check:"meta"});return t._zod.onattach=[r=>{let n=yo.get(r)??{};yo.add(r,{...n,...e})}],t._zod.check=()=>{},t}function JA(e,t){let r=ae(t),n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(m=>typeof m=="string"?m.toLowerCase():m),o=o.map(m=>typeof m=="string"?m.toLowerCase():m));let i=new Set(n),a=new Set(o),s=e.Codec??Sx,l=e.Boolean??Ix,c=e.String??zu,d=new c({type:"string",error:r.error}),u=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:d,out:u,transform:((m,p)=>{let g=m;return r.case!=="sensitive"&&(g=g.toLowerCase()),i.has(g)?!0:a.has(g)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:p.value,inst:f,continue:!1}),{})}),reverseTransform:((m,p)=>m===!0?n[0]||"true":o[0]||"false"),error:r.error});return f._zod.bag.truthy=n,f._zod.bag.falsy=o,f._zod.bag.case=r.case??"insensitive",f}function Vu(e,t,r,n={}){let o=ae(n),i={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...o};return r instanceof RegExp&&(i.pattern=r),new e(i)}function Nx(e,...t){for(let r of t)for(let n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&bo(e,n,r[n]);return e}function Mc(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??yo,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Mr(e,t,r,n,o){let i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function kt(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let f=a.schema,m=t.processors[o.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);m(e,t,f,d)}let u=e._zod.parent;u&&(a.ref||(a.ref=u),kt(u,t,d),t.seen.get(u).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Nx(a.schema,l),t.io==="input"&&sn(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function yK(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Bc(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let n=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=n.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,a[0])}}let o=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let u=e.external.registry.get(a[0])?.id,f=e.external.uri??(p=>p);if(u)return{ref:f(u)};let m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${f("__shared")}#/${s}/${yK(m)}`}}let l="#",c=`${l}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:l};let d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+yK(d)}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:c}=o(a);s.def={...s.schema},c&&(s.defId=c);let d=s.schema;for(let u in d)delete d[u];d.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
119
+
120
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(t!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}s.count>1&&e.reused==="ref"&&i(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function wK(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let n of t){if(!n||typeof n!="object")return;wK(n);let o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;let i=n.type;for(let a of Array.isArray(i)?i:[i]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var SK=new Set(["type","properties","required","additionalProperties"]),_K=["oneOf","anyOf"];function IK(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function e5(e){let t=[];for(let i of e){if(typeof i!="object"||i.type!=="object")return null;for(let a in i)if(!SK.has(a))return null;t.push(i)}let r={},n=new Set;for(let i of t){for(let a in i.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let c of t){let d=c.properties?.[a]??IK(c);d!=null&&(s.some(u=>JSON.stringify(u)===JSON.stringify(d))||s.push(d))}let l=s.length===1?s[0]:e5(s)??{allOf:s};bo(r,a,l)}for(let a of i.required??[])n.add(a)}let o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{let i=[];for(let a of t){let s=IK(a);s&&!i.some(l=>JSON.stringify(l)===JSON.stringify(s))&&i.push(s)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Ige(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let o of SK)if(o in e)return;let r=t.filter(o=>_K.some(i=>Array.isArray(o[i]))),n=null;if(!r.length)n=e5(t);else{let o=r[0],i=_K.find(l=>Array.isArray(o[l]));if(Object.keys(o).length!==1)return;let a=t.filter(l=>l!==o),s=o[i].map(l=>e5([...a,l]));if(s.some(l=>!l))return;n={[i]:s}}n&&(delete e.allOf,Nx(e,n))}function jc(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=s=>{let l=e.seen.get(s);if(l.ref===null)return;let c=l.def??l.schema,d={...c},u=l.ref;if(l.ref=null,u){n(u);let m=e.seen.get(u),p=m.schema;if(p.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(p)):Nx(c,p),Nx(c,d),s._zod.parent===u)for(let y in c)y==="$ref"||y==="allOf"||y in d||delete c[y];if(p.$ref&&m.def)for(let y in c)y==="$ref"||y==="allOf"||y in m.def&&JSON.stringify(c[y])===JSON.stringify(m.def[y])&&delete c[y]}let f=s._zod.parent;if(f&&f!==u){n(f);let m=e.seen.get(f);if(m?.schema.$ref&&(c.$ref=m.schema.$ref,m.def))for(let p in c)p==="$ref"||p==="allOf"||p in m.def&&JSON.stringify(c[p])===JSON.stringify(m.def[p])&&delete c[p]}e.override({zodSchema:s,jsonSchema:c,path:l.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())n(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())wK(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let l of e.seen.values())for(let c of[l.schema,l.def]){let d=c?.allOf;if(!Array.isArray(d))continue;let u=s.get(d);u?u.push(c):s.set(d,[c])}for(let l of e.intersections)for(let c of s.get(l)??[])Ige(c)}}let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(s)}Nx(o,r.defId?r.schema:r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,bo(a,l.defId,l.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?o.$defs=a:o.definitions=a);try{let s=JSON.parse(JSON.stringify(o));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:qp(t,"input",e.processors),output:qp(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function sn(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return sn(n.element,r);if(n.type==="set")return sn(n.valueType,r);if(n.type==="lazy")return sn(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return sn(n.innerType,r);if(n.type==="intersection")return sn(n.left,r)||sn(n.right,r);if(n.type==="record"||n.type==="map")return sn(n.keyType,r)||sn(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:sn(n.in,r)||sn(n.out,r);if(n.type==="object"){for(let o in n.shape)if(sn(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(sn(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(sn(o,r))return!0;return!!(n.rest&&sn(n.rest,r))}return!1}var t5=(e,t={})=>r=>{let n=Mc({...r,processors:t});return kt(e,n),Bc(n,e),jc(n,e)},qp=(e,t,r={})=>n=>{let{libraryOptions:o,target:i}=n??{},a=Mc({...o??{},target:i,io:t,processors:r});return kt(e,a),Bc(a,e),jc(a,e)};var Kp=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},Xp=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},kK=(e,t)=>{Kp(e,"minimum",t),Xp(e,"maximum",t)},RK=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},TK=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},EK=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},$K=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},CK=(e,t)=>Kp(e,"minimum",t.minimum),PK=(e,t)=>Xp(e,"maximum",t.maximum),DK=e=>(t,r)=>{$K(t,r.format);let[n,o]=e[r.format];Kp(t,"minimum",n),Xp(t,"maximum",o)},wge={greater_than:(e,t)=>Kp(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>Xp(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>RK(e,t.value),number_format:DK(ox),bigint_format:DK(nx),min_length:CK,max_length:PK,length_equals:(e,t)=>kK(e,t.length),min_size:CK,max_size:PK,size_equals:(e,t)=>kK(e,t.size),string_format:(e,t)=>{$K(e,t.format),t.pattern&&TK(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>EK(e,t.mime)};function Br(e){let t={},r=e._zod.def,n=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let i of n)wge[i._zod.def.check]?.(t,i._zod.def);let o=e._zod.bag;o.minimum!==void 0&&Kp(t,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&Kp(t,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&Xp(t,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&Xp(t,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&RK(t,o.multipleOf),o.format!==void 0&&(t.format??(t.format=o.format),o.format.includes("int")&&(t.isInt=!0)),o.mime&&EK(t,o.mime);for(let i of o.patterns??[])TK(t,i);return t}var Sge={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},kge=new Map([[bS,cE],[_x,dE]]),AK=e=>kge.get(e)??e,n5=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:a,format:s,patterns:l,contentEncoding:c,laxFormat:d}=Br(e);if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),s&&(o.format=Sge[s]??s,o.format===""&&delete o.format,(s==="time"||d)&&delete o.format),c&&(o.contentEncoding=c),l&&l.size>0){let u=[...l].map(AK);u.length===1?o.pattern=u[0].source:u.length>1&&(o.allOf=[...u.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},i5=(e,t,r,n)=>{let o=r,{minimum:i,maximum:a,multipleOf:s,exclusiveMaximum:l,exclusiveMinimum:c,isInt:d}=Br(e);o.type=d?"integer":"number";let u=typeof c=="number"&&c>=(i??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";if(u?m?(o.minimum=c,o.exclusiveMinimum=!0):o.exclusiveMinimum=c:typeof i=="number"&&(o.minimum=i),f?m?(o.maximum=l,o.exclusiveMaximum=!0):o.exclusiveMaximum=l:typeof a=="number"&&(o.maximum=a),s){let p=new Set;for(let v of s)Number.isFinite(v)&&v!==0?p.add(Math.abs(v)):Mr(e,t,o,n,`A multipleOf divisor of ${v} cannot be represented in JSON Schema`);let[g,...y]=p;g!==void 0&&(o.multipleOf=g),y.length&&(o.allOf=[...o.allOf??[],...y.map(v=>({multipleOf:v}))])}},a5=(e,t,r,n)=>{r.type="boolean"},s5=(e,t,r,n)=>{Mr(e,t,r,n,"BigInt cannot be represented in JSON Schema")},l5=(e,t,r,n)=>{Mr(e,t,r,n,"Symbols cannot be represented in JSON Schema")},c5=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},d5=(e,t,r,n)=>{Mr(e,t,r,n,"Undefined cannot be represented in JSON Schema")},u5=(e,t,r,n)=>{Mr(e,t,r,n,"Void cannot be represented in JSON Schema")},f5=(e,t,r,n)=>{r.not={}},m5=(e,t,r,n)=>{},p5=(e,t,r,n)=>{},h5=(e,t,r,n)=>{Mr(e,t,r,n,"Date cannot be represented in JSON Schema")},g5=(e,t,r,n)=>{let o=e._zod.def,i=yp(o.entries);if(i.length===0){r.not={};return}i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},v5=(e,t,r,n)=>{let o=e._zod.def;if(o.values.length===0){r.not={};return}let i=[];for(let a of o.values)if(a===void 0){if(Mr(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Mr(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},x5=(e,t,r,n)=>{Mr(e,t,r,n,"NaN cannot be represented in JSON Schema")},b5=(e,t,r,n)=>{let o=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},y5=(e,t,r,n)=>{let o=r;o.type="string",o.format="binary",o.contentEncoding="binary";let{minimum:i,maximum:a,mime:s}=Br(e);i!==void 0&&(o.minLength=i),a!==void 0&&(o.maxLength=a),s&&(s.length===0?o.not={}:s.length===1?o.contentMediaType=s[0]:o.anyOf=s.map(l=>({contentMediaType:l})))},_5=(e,t,r,n)=>{r.type="boolean"},I5=(e,t,r,n)=>{Mr(e,t,r,n,"Custom types cannot be represented in JSON Schema")},w5=(e,t,r,n)=>{Mr(e,t,r,n,"Function types cannot be represented in JSON Schema")},S5=(e,t,r,n)=>{Mr(e,t,r,n,"Transforms cannot be represented in JSON Schema")},k5=(e,t,r,n)=>{Mr(e,t,r,n,"Map cannot be represented in JSON Schema")},C5=(e,t,r,n)=>{Mr(e,t,r,n,"Set cannot be represented in JSON Schema")},P5=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:a,maximum:s}=Br(e);typeof a=="number"&&(o.minItems=a),typeof s=="number"&&(o.maxItems=s),o.type="array",o.items=kt(i.element,t,{...n,path:[...n.path,"items"]})};function Fx(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?Fx(t.out):t.type==="catch"?Fx(t.innerType):e._zod.optin}var D5=(e,t,r,n)=>{let o=r,i=e._zod.def,a=i.shape;if(Object.getOwnPropertySymbols(a).length&&Mr(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(let c in a)bo(o.properties,c,kt(a[c],t,{...n,path:[...n.path,"properties",c]}));let l=[];for(let c of Object.keys(a)){let d=i.shape[c];(t.io==="input"?Fx(d)===void 0:d._zod.optout===void 0)&&l.push(c)}l.length>0&&(o.required=l),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=kt(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},g1=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,a=o.options.map((s,l)=>kt(s,t,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?r.oneOf=a:r.anyOf=a},R5=(e,t,r,n)=>{let o=e._zod.def,i=kt(o.left,t,{...n,path:[...n.path,"allOf",0]}),a=kt(o.right,t,{...n,path:[...n.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=l,t.intersections.push(l)},T5=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((g,y)=>kt(g,t,{...n,path:[...n.path,a,y]})),c=i.rest?kt(i.rest,t,{...n,path:[...n.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null,d=i.items.length;for(;d>0;){let g=i.items[d-1];if(!(t.io==="input"?Fx(g)!==void 0:g._zod.optout==="optional"))break;d--}let u=i.items.length,f=!i.rest;t.target==="draft-2020-12"?(o.prefixItems=l,f?o.items=!1:c&&(o.items=c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):t.target==="openapi-3.0"?(o.items={anyOf:l},c&&o.items.anyOf.push(c),d>0&&(o.minItems=d),f&&(o.maxItems=u)):(o.items=l,f?o.additionalItems=!1:c&&(o.additionalItems=c),d>0&&(o.minItems=d),f&&(o.maxItems=u));let{minimum:m,maximum:p}=Br(e);typeof m=="number"&&(o.minItems=m),typeof p=="number"&&(o.maxItems=p)};function r5(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let p=e.get(t)?.def;if(!p)return t;let g=r5(e,p,r);return g===p?t:g}for(let p of["anyOf","oneOf"]){let g=t[p];if(!Array.isArray(g))continue;let y=g.map(v=>r5(e,v,r));y.some((v,x)=>v!==g[x])&&(t={...t,[p]:y})}let n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(p=>p==="number"||p==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(p=>typeof p=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:l,exclusiveMaximum:c,multipleOf:d,format:u,id:f,...m}=t;return m.enum?m.enum=m.enum.map(p=>typeof p=="number"?String(p):p):typeof m.const=="number"&&(m.const=String(m.const)),o&&(m.type="string",i||(m.pattern=(n.includes("number")?il:px).source)),m}var o5=new WeakMap;function Cge(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let r=new Map;for(let n of o5.get(e)??[]){let o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;let a=r5(t,i,new Set);a!==i&&r.set(i,a)}if(r.size)for(let n of e.seen.values())for(let o of[n.schema,n.def]){let i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var E5=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let a=i.keyType,s=Br(a).patterns;if(i.mode==="loose"&&s&&s.size>0){let d=kt(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let u of s)bo(o.patternProperties,AK(u).source,d)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=kt(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let d=o5.get(t);d||(d=[],o5.set(t,d),t.deferred.push(()=>Cge(t))),d.push(e)}o.additionalProperties=kt(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let l=a._zod.values,c=t.io==="input"&&Fx(i.valueType)!==void 0;if(l&&!i.partial&&!c){let d=[...l].filter(u=>typeof u=="string"||typeof u=="number");d.length>0&&(o.required=d.map(String))}},$5=(e,t,r,n)=>{let o=e._zod.def,i=kt(o.innerType,t,n),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},A5=(e,t,r,n)=>{let o=e._zod.def;kt(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},O5=Symbol();function OK(e,t,r,n,o){let i=!1,a=JSON.stringify(e,(s,l)=>typeof l!="bigint"?l:(i=!0,null));return i?(Mr(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),O5):JSON.parse(a)}var z5=(e,t,r,n)=>{let o=e._zod.def;kt(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a=OK(o.defaultValue,e,t,r,n);a!==O5&&(r.default=a)},N5=(e,t,r,n)=>{let o=e._zod.def;kt(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;let a=OK(o.defaultValue,e,t,r,n);a!==O5&&(r._prefault=a)},F5=(e,t,r,n)=>{let o=e._zod.def;kt(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch{Mr(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},L5=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?o.out:o.in:o.out;kt(a,t,n);let s=t.seen.get(e);s.ref=a},M5=(e,t,r,n)=>{let o=e._zod.def;kt(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},B5=(e,t,r,n)=>{let o=e._zod.def;kt(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},v1=(e,t,r,n)=>{let o=e._zod.def;kt(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},j5=(e,t,r,n)=>{let o=e._zod.innerType;kt(o,t,n);let i=t.seen.get(e);i.ref=o},h1={string:n5,number:i5,boolean:a5,bigint:s5,symbol:l5,null:c5,undefined:d5,void:u5,never:f5,any:m5,unknown:p5,date:h5,enum:g5,literal:v5,nan:x5,template_literal:b5,file:y5,success:_5,custom:I5,function:w5,transform:S5,map:k5,set:C5,array:P5,object:D5,union:g1,intersection:R5,tuple:T5,record:E5,nullable:$5,nonoptional:A5,default:z5,prefault:N5,catch:F5,pipe:L5,readonly:M5,promise:B5,optional:v1,lazy:j5};function x1(e,t){if("_idmap"in e){let n=e,o=Mc({...t,processors:h1}),i={};for(let l of n._idmap.entries()){let[c,d]=l;kt(d,o)}let a={},s={registry:n,uri:t?.uri,defs:i};o.external=s;for(let l of n._idmap.entries()){let[c,d]=l;Bc(o,d),bo(a,c,jc(o,d))}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:i}}return{schemas:a}}let r=Mc({...t,processors:h1});return kt(e,r),Bc(r,e),jc(r,e)}var b1=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=Mc({processors:h1,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return kt(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Bc(this.ctx,t);let n=jc(this.ctx,t),{"~standard":o,...i}=n;return i}};var zK={};var nh={};Is(nh,{ZodAny:()=>cO,ZodArray:()=>mO,ZodBase64:()=>L1,ZodBase64URL:()=>M1,ZodBigInt:()=>rh,ZodBigIntFormat:()=>U1,ZodBoolean:()=>th,ZodCIDRv4:()=>N1,ZodCIDRv6:()=>F1,ZodCUID:()=>R1,ZodCUID2:()=>T1,ZodCatch:()=>OO,ZodCodec:()=>Gx,ZodCreditCard:()=>tO,ZodCustom:()=>qx,ZodCustomStringFormat:()=>Gu,ZodDate:()=>jx,ZodDefault:()=>DO,ZodDiscriminatedUnion:()=>hO,ZodE164:()=>B1,ZodEmail:()=>k1,ZodEmoji:()=>P1,ZodEnum:()=>Yp,ZodExactOptional:()=>Z1,ZodFile:()=>SO,ZodFunction:()=>HO,ZodGUID:()=>C1,ZodIBAN:()=>rO,ZodIPv4:()=>O1,ZodIPv6:()=>z1,ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,ZodInstanceOf:()=>GO,ZodIntersection:()=>gO,ZodJWT:()=>j1,ZodKSUID:()=>A1,ZodLazy:()=>jO,ZodLiteral:()=>wO,ZodMAC:()=>eO,ZodMap:()=>_O,ZodNaN:()=>NO,ZodNanoID:()=>D1,ZodNever:()=>uO,ZodNonOptional:()=>G1,ZodNull:()=>sO,ZodNullable:()=>PO,ZodNumber:()=>eh,ZodNumberFormat:()=>qu,ZodObject:()=>Vx,ZodOptional:()=>Wx,ZodPipe:()=>Zx,ZodPrefault:()=>TO,ZodPreprocess:()=>FO,ZodPromise:()=>VO,ZodReadonly:()=>LO,ZodRecord:()=>Qp,ZodSet:()=>IO,ZodString:()=>Jp,ZodStringFormat:()=>Tt,ZodSuccess:()=>AO,ZodSymbol:()=>iO,ZodTemplateLiteral:()=>BO,ZodTransform:()=>kO,ZodTuple:()=>xO,ZodType:()=>qe,ZodULID:()=>E1,ZodURL:()=>Bx,ZodUUID:()=>is,ZodUndefined:()=>aO,ZodUnion:()=>Hx,ZodUnknown:()=>dO,ZodVoid:()=>fO,ZodXID:()=>$1,ZodXor:()=>pO,_ZodString:()=>S1,_default:()=>RO,_function:()=>GX,any:()=>SX,array:()=>Ux,base64:()=>nX,base64url:()=>iX,bigint:()=>bX,boolean:()=>nO,catch:()=>zO,check:()=>qX,cidrv4:()=>rX,cidrv6:()=>oX,codec:()=>VX,creditCard:()=>sX,cuid:()=>qK,cuid2:()=>KK,currencyCode:()=>mX,custom:()=>KX,date:()=>CX,describe:()=>XX,discriminatedUnion:()=>$X,e164:()=>aX,email:()=>LK,emoji:()=>ZK,enum:()=>H1,exactOptional:()=>CO,file:()=>MX,float32:()=>hX,float64:()=>gX,function:()=>GX,guid:()=>MK,hash:()=>pX,hex:()=>fX,hostname:()=>uX,httpUrl:()=>WK,iban:()=>lX,instanceof:()=>YX,int:()=>I1,int32:()=>vX,int64:()=>yX,intersection:()=>vO,invertCodec:()=>HX,ipv4:()=>JK,ipv6:()=>tX,json:()=>eQ,jwt:()=>cX,keyof:()=>PX,ksuid:()=>YK,lazy:()=>UO,literal:()=>LX,looseObject:()=>TX,looseRecord:()=>OX,mac:()=>eX,map:()=>zX,meta:()=>QX,nan:()=>UX,nanoid:()=>GK,nativeEnum:()=>FX,never:()=>V1,nonoptional:()=>$O,null:()=>lO,nullable:()=>Mx,nullish:()=>BX,number:()=>oO,object:()=>DX,optional:()=>Wu,partialRecord:()=>AX,pipe:()=>w1,prefault:()=>EO,preprocess:()=>tQ,promise:()=>ZX,readonly:()=>MO,record:()=>yO,refine:()=>WO,set:()=>NX,strictObject:()=>RX,string:()=>Lx,stringFormat:()=>dX,stringbool:()=>JX,success:()=>jX,superRefine:()=>ZO,symbol:()=>IX,templateLiteral:()=>WX,transform:()=>W1,tuple:()=>bO,uint32:()=>xX,uint64:()=>_X,ulid:()=>XK,undefined:()=>wX,union:()=>oh,unknown:()=>Hu,url:()=>HK,uuid:()=>BK,uuidv4:()=>jK,uuidv6:()=>UK,uuidv7:()=>VK,void:()=>kX,xid:()=>QK,xor:()=>EX});var y1={};Is(y1,{endsWith:()=>Bp,gt:()=>os,gte:()=>Yn,includes:()=>Lp,length:()=>Uu,lowercase:()=>Np,lt:()=>rs,lte:()=>Qn,maxLength:()=>ju,maxSize:()=>Lc,mime:()=>Up,minLength:()=>al,minSize:()=>ns,multipleOf:()=>Fc,negative:()=>u1,nonnegative:()=>m1,nonpositive:()=>f1,normalize:()=>Vp,overwrite:()=>pa,positive:()=>d1,properties:()=>jp,property:()=>p1,regex:()=>zp,size:()=>Bu,slugify:()=>Gp,startsWith:()=>Mp,toLowerCase:()=>Wp,toUpperCase:()=>Zp,trim:()=>Hp,uppercase:()=>Fp});var NK=new WeakSet([Object.prototype,Error.prototype]);function _1(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var FK=(e,t)=>{lx.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);NK.has(r)||(NK.add(r),_1(r,"format",n=>o=>dx(n,o)),_1(r,"flatten",n=>o=>cx(n,o)),_1(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,_p,2)}),_1(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,_p,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Dge=j("ZodError",FK),An=j("ZodError",FK,void 0,{Parent:Error});var U5=kp(An),V5=Pp(An),H5=Dp(An),W5=Rp(An),Z5=Xw(An),G5=Qw(An),q5=Yw(An),K5=Jw(An),X5=eS(An),Q5=tS(An),Y5=rS(An),J5=oS(An);function Tge(){eo.localeError||gr(zS())}function Zu(){eo.memoizer||gr({memoizer:Dx()})}var qe=j("ZodType",(e,t)=>(Tge(),je.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(J.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return wt(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(WO(e,t))},superRefine(e,t){return this.check(ZO(e,t))},overwrite(e){return this.check(pa(e))},optional(){return Wu(this)},exactOptional(){return CO(this)},nullable(){return Mx(this)},nullish(){return Wu(Mx(this))},nonoptional(e){return $O(this,e)},array(){return Ux(this)},or(e){return oh([this,e])},and(e){return vO(this,e)},transform(e){return w1(this,W1(e))},default(e){return RO(this,e)},prefault(e){return EO(this,e)},catch(e){return zO(this,e)},pipe(e){return w1(this,e)},readonly(){return MO(this)},describe(e){let t=this.clone();return yo.add(t,{description:e}),t},meta(...e){if(e.length===0)return yo.get(this);let t=this.clone();return yo.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return J.hide(this,"~standard",{...pS(this),jsonSchema:{input:qp(this,"input"),output:qp(this,"output")}})},set"~standard"(e){J.own(this,"~standard",e)},parse:function e(t,r){return U5(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await V5(this,t,r,{callee:e})},safeParse(e,t){return H5(this,e,t)},async safeParseAsync(e,t){return W5(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){J.own(this,"spa",e)},validate(e,t){return ux(this,e,t)},validateAsync(e,t){return fx(this,e,t)},encode:function e(t,r){return Z5(this,t,r,{callee:e})},decode:function e(t,r){return G5(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await q5(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await K5(this,t,r,{callee:e})},safeEncode(e,t){return X5(this,e,t)},safeDecode(e,t){return Q5(this,e,t)},async safeEncodeAsync(e,t){return Y5(this,e,t)},async safeDecodeAsync(e,t){return J5(this,e,t)},toJSONSchema(e){return t5(this,{})(e)},get description(){return yo.get(this)?.description},get _def(){return this._zod.def}}),S1=j("_ZodString",(e,t)=>{zu.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>n5(e,r,n,o)},J.derived({format:e=>Br(e).format??null,minLength:e=>Br(e).minimum??null,maxLength:e=>Br(e).maximum??null},{regex(...e){return this.check(zp(...e))},includes(...e){return this.check(Lp(...e))},startsWith(...e){return this.check(Mp(...e))},endsWith(...e){return this.check(Bp(...e))},min(...e){return this.check(al(...e))},max(...e){return this.check(ju(...e))},length(...e){return this.check(Uu(...e))},nonempty(...e){return this.check(al(1,...e))},lowercase(e){return this.check(Np(e))},uppercase(e){return this.check(Fp(e))},trim(){return this.check(Hp())},normalize(...e){return this.check(Vp(...e))},toLowerCase(){return this.check(Wp())},toUpperCase(){return this.check(Zp())},slugify(){return this.check(Gp())}})),Jp=j("ZodString",(e,t)=>{zu.init(e,t),S1.init(e,t)},{email(e){return this.check(VS(k1,e))},url(e){return this.check(Ex(Bx,e))},jwt(e){return this.check(c1(j1,e))},emoji(e){return this.check(KS(P1,e))},guid(e){return this.check(HS(C1,e))},uuid(e){return this.check(WS(is,e))},uuidv4(e){return this.check(ZS(is,e))},uuidv6(e){return this.check(GS(is,e))},uuidv7(e){return this.check(qS(is,e))},nanoid(e){return this.check(XS(D1,e))},cuid(e){return this.check(QS(R1,e))},cuid2(e){return this.check(YS(T1,e))},ulid(e){return this.check(JS(E1,e))},base64(e){return this.check(a1(L1,e))},base64url(e){return this.check(s1(M1,e))},xid(e){return this.check(e1($1,e))},ksuid(e){return this.check(t1(A1,e))},ipv4(e){return this.check(r1(O1,e))},ipv6(e){return this.check(o1(z1,e))},cidrv4(e){return this.check(n1(N1,e))},cidrv6(e){return this.check(i1(F1,e))},e164(e){return this.check(l1(B1,e))},datetime(e){return this.check($x(Uc,e))},date(e){return this.check(Ax(Vc,e))},time(e){return this.check(Ox(Hc,e))},duration(e){return this.check(zx(Wc,e))}});function Lx(e){return vA(Jp,e)}var Tt=j("ZodStringFormat",(e,t)=>{St.init(e,t),S1.init(e,t)}),Uc=j("ZodISODateTime",(e,t)=>{c$.init(e,t),Tt.init(e,t)}),Vc=j("ZodISODate",(e,t)=>{d$.init(e,t),Tt.init(e,t)}),Hc=j("ZodISOTime",(e,t)=>{u$.init(e,t),Tt.init(e,t)}),Wc=j("ZodISODuration",(e,t)=>{f$.init(e,t),Tt.init(e,t)}),k1=j("ZodEmail",(e,t)=>{YE.init(e,t),Tt.init(e,t)});function LK(e){return VS(k1,e)}var C1=j("ZodGUID",(e,t)=>{XE.init(e,t),Tt.init(e,t)});function MK(e){return HS(C1,e)}var is=j("ZodUUID",(e,t)=>{QE.init(e,t),Tt.init(e,t)});function BK(e){return WS(is,e)}function jK(e){return ZS(is,e)}function UK(e){return GS(is,e)}function VK(e){return qS(is,e)}var Bx=j("ZodURL",(e,t)=>{t$.init(e,t),Tt.init(e,t)});function HK(e){return Ex(Bx,e)}function WK(e){return Ex(Bx,{protocol:mx,hostname:fE,...J.normalizeParams(e)})}var P1=j("ZodEmoji",(e,t)=>{r$.init(e,t),Tt.init(e,t)});function ZK(e){return KS(P1,e)}var D1=j("ZodNanoID",(e,t)=>{o$.init(e,t),Tt.init(e,t)});function GK(e){return XS(D1,e)}var R1=j("ZodCUID",(e,t)=>{n$.init(e,t),Tt.init(e,t)});function qK(e){return QS(R1,e)}var T1=j("ZodCUID2",(e,t)=>{i$.init(e,t),Tt.init(e,t)});function KK(e){return YS(T1,e)}var E1=j("ZodULID",(e,t)=>{a$.init(e,t),Tt.init(e,t)});function XK(e){return JS(E1,e)}var $1=j("ZodXID",(e,t)=>{s$.init(e,t),Tt.init(e,t)});function QK(e){return e1($1,e)}var A1=j("ZodKSUID",(e,t)=>{l$.init(e,t),Tt.init(e,t)});function YK(e){return t1(A1,e)}var O1=j("ZodIPv4",(e,t)=>{m$.init(e,t),Tt.init(e,t)});function JK(e){return r1(O1,e)}var eO=j("ZodMAC",(e,t)=>{h$.init(e,t),Tt.init(e,t)});function eX(e){return bA(eO,e)}var z1=j("ZodIPv6",(e,t)=>{p$.init(e,t),Tt.init(e,t)});function tX(e){return o1(z1,e)}var N1=j("ZodCIDRv4",(e,t)=>{g$.init(e,t),Tt.init(e,t)});function rX(e){return n1(N1,e)}var F1=j("ZodCIDRv6",(e,t)=>{v$.init(e,t),Tt.init(e,t)});function oX(e){return i1(F1,e)}var L1=j("ZodBase64",(e,t)=>{x$.init(e,t),Tt.init(e,t)});function nX(e){return a1(L1,e)}var M1=j("ZodBase64URL",(e,t)=>{b$.init(e,t),Tt.init(e,t)});function iX(e){return s1(M1,e)}var B1=j("ZodE164",(e,t)=>{y$.init(e,t),Tt.init(e,t)});function aX(e){return l1(B1,e)}var tO=j("ZodCreditCard",(e,t)=>{_$.init(e,t),Tt.init(e,t)});function sX(e){return yA(tO,e)}var rO=j("ZodIBAN",(e,t)=>{I$.init(e,t),Tt.init(e,t)});function lX(e){return _A(rO,e)}var j1=j("ZodJWT",(e,t)=>{w$.init(e,t),Tt.init(e,t)});function cX(e){return c1(j1,e)}var Gu=j("ZodCustomStringFormat",(e,t)=>{S$.init(e,t),Tt.init(e,t)});function dX(e,t,r={}){return Vu(Gu,e,t,r)}function uX(e){return Vu(Gu,"hostname",uE,e)}function fX(e){return Vu(Gu,"hex",CE,e)}function mX(e){return Vu(Gu,"currency_code",pE,e)}function pX(e,t){let r=t?.enc??"hex",n=`${e}_${r}`,o=Ei[n];if(!o)throw new Error(`Unrecognized hash format: ${n}`);return Vu(Gu,n,o,t)}var eh=j("ZodNumber",(e,t)=>{SS.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>i5(e,r,n,o),e.isFinite=!0},J.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=Br(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=Br(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=Br(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>Br(e).format??null},{gt(e,t){return this.check(os(e,t))},gte(e,t){return this.check(Yn(e,t))},min(e,t){return this.check(Yn(e,t))},lt(e,t){return this.check(rs(e,t))},lte(e,t){return this.check(Qn(e,t))},max(e,t){return this.check(Qn(e,t))},int(e){return this.check(I1(e))},safe(e){return this.check(I1(e))},positive(e){return this.check(os(0,e))},nonnegative(e){return this.check(Yn(0,e))},negative(e){return this.check(rs(0,e))},nonpositive(e){return this.check(Qn(0,e))},multipleOf(e,t){return this.check(Fc(e,t))},step(e,t){return this.check(Fc(e,t))},finite(){return this}}));function oO(e){return wA(eh,e)}var qu=j("ZodNumberFormat",(e,t)=>{k$.init(e,t),eh.init(e,t)});function I1(e){return kA(qu,e)}function hX(e){return CA(qu,e)}function gX(e){return PA(qu,e)}function vX(e){return DA(qu,e)}function xX(e){return RA(qu,e)}var th=j("ZodBoolean",(e,t)=>{Ix.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>a5(e,r,n,o)});function nO(e){return TA(th,e)}var rh=j("ZodBigInt",(e,t)=>{kS.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>s5(e,r,n,o)},J.derived({minValue:e=>Br(e).minimum??null,maxValue:e=>Br(e).maximum??null,format:e=>Br(e).format??null},{gte(e,t){return this.check(Yn(e,t))},min(e,t){return this.check(Yn(e,t))},gt(e,t){return this.check(os(e,t))},lt(e,t){return this.check(rs(e,t))},lte(e,t){return this.check(Qn(e,t))},max(e,t){return this.check(Qn(e,t))},positive(e){return this.check(os(BigInt(0),e))},negative(e){return this.check(rs(BigInt(0),e))},nonpositive(e){return this.check(Qn(BigInt(0),e))},nonnegative(e){return this.check(Yn(BigInt(0),e))},multipleOf(e,t){return this.check(Fc(e,t))}}));function bX(e){return $A(rh,e)}var U1=j("ZodBigIntFormat",(e,t)=>{C$.init(e,t),rh.init(e,t)});function yX(e){return OA(U1,e)}function _X(e){return zA(U1,e)}var iO=j("ZodSymbol",(e,t)=>{P$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>l5(e,r,n,o)});function IX(e){return NA(iO,e)}var aO=j("ZodUndefined",(e,t)=>{D$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>d5(e,r,n,o)});function wX(e){return FA(aO,e)}var sO=j("ZodNull",(e,t)=>{R$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>c5(e,r,n,o)});function lO(e){return LA(sO,e)}var cO=j("ZodAny",(e,t)=>{T$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>m5(e,r,n,o)});function SX(){return MA(cO)}var dO=j("ZodUnknown",(e,t)=>{E$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>p5(e,r,n,o)});function Hu(){return BA(dO)}var uO=j("ZodNever",(e,t)=>{$$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>f5(e,r,n,o)});function V1(e){return jA(uO,e)}var fO=j("ZodVoid",(e,t)=>{A$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>u5(e,r,n,o)});function kX(e){return UA(fO,e)}var jx=j("ZodDate",(e,t)=>{O$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>h5(e,r,n,o),e.min=(r,n)=>e.check(Yn(r,n)),e.max=(r,n)=>e.check(Qn(r,n))},J.derived({minDate:e=>{let{minimum:t}=Br(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=Br(e);return t?new Date(t):null}},{}));function CX(e){return VA(jx,e)}var mO=j("ZodArray",(e,t)=>{Zu(),z$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>P5(e,r,n,o),e.element=t.element},{min(e,t){return this.check(al(e,t))},nonempty(e){return this.check(al(1,e))},max(e,t){return this.check(ju(e,t))},length(e,t){return this.check(Uu(e,t))},unwrap(){return this.element}});function Ux(e,t){return ZA(mO,e,t)}function PX(e){let t=e._zod.def.shape;return H1(Object.keys(t))}var Vx=j("ZodObject",(e,t)=>{Zu(),N$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>D5(e,r,n,o),J.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return H1(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(J.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(J.mergeDefs(this._zod.def,{catchall:Hu()}))},loose(){return this.clone(J.mergeDefs(this._zod.def,{catchall:Hu()}))},strict(){return this.clone(J.mergeDefs(this._zod.def,{catchall:V1()}))},strip(){return this.clone(J.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return J.extend(this,e)},safeExtend(e){return J.safeExtend(this,e)},merge(e){return J.merge(this,e)},pick(e){return J.pick(this,e)},omit(e){return J.omit(this,e)},partial(...e){return J.partial(Wx,this,e[0])},exactPartial(...e){return J.partial(Z1,this,e[0],"exactPartial")},required(...e){return J.required(G1,this,e[0])}});function DX(e,t){let r={type:"object",shape:e??{},...J.normalizeParams(t)};return new Vx(r)}function RX(e,t){return new Vx({type:"object",shape:e,catchall:V1(),...J.normalizeParams(t)})}function TX(e,t){return new Vx({type:"object",shape:e,catchall:Hu(),...J.normalizeParams(t)})}var Hx=j("ZodUnion",(e,t)=>{wx.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>g1(e,r,n,o),e.options=t.options});function oh(e,t){return new Hx({type:"union",options:e,...J.normalizeParams(t)})}var pO=j("ZodXor",(e,t)=>{Hx.init(e,t),F$.init(e,t),e._zod.processJSONSchema=(r,n,o)=>g1(e,r,n,o),e.options=t.options});function EX(e,t){return new pO({type:"union",options:e,inclusive:!1,...J.normalizeParams(t)})}var hO=j("ZodDiscriminatedUnion",(e,t)=>{Hx.init(e,t),M$.init(e,t)});function $X(e,t,r){return new hO({type:"union",options:t,discriminator:e,...J.normalizeParams(r)})}var gO=j("ZodIntersection",(e,t)=>{B$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>R5(e,r,n,o)});function vO(e,t){return new gO({type:"intersection",left:e,right:t})}var xO=j("ZodTuple",(e,t)=>{Zu(),CS.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>T5(e,r,n,o)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new Wx({type:"optional",innerType:t}))})}});function bO(e,t,r){let n=t instanceof je,o=n?r:t,i=n?t:null;return new xO({type:"tuple",items:e,rest:i,...J.normalizeParams(o)})}var Qp=j("ZodRecord",(e,t)=>{Zu(),j$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>E5(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function yO(e,t,r){return!t||!t._zod?new Qp({type:"record",keyType:Lx(),valueType:e,...J.normalizeParams(t)}):new Qp({type:"record",keyType:e,valueType:t,...J.normalizeParams(r)})}function AX(e,t,r){return new Qp({type:"record",keyType:e,valueType:t,...J.normalizeParams(r),partial:!0})}function OX(e,t,r){return new Qp({type:"record",keyType:e,valueType:t,mode:"loose",...J.normalizeParams(r)})}var _O=j("ZodMap",(e,t)=>{Zu(),U$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>k5(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(ns(...r)),e.nonempty=r=>e.check(ns(1,r)),e.max=(...r)=>e.check(Lc(...r)),e.size=(...r)=>e.check(Bu(...r))});function zX(e,t,r){return new _O({type:"map",keyType:e,valueType:t,...J.normalizeParams(r)})}var IO=j("ZodSet",(e,t)=>{Zu(),V$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>C5(e,r,n,o),e.min=(...r)=>e.check(ns(...r)),e.nonempty=r=>e.check(ns(1,r)),e.max=(...r)=>e.check(Lc(...r)),e.size=(...r)=>e.check(Bu(...r))});function NX(e,t){return new IO({type:"set",valueType:e,...J.normalizeParams(t)})}var Yp=j("ZodEnum",(e,t)=>{H$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(n,o,i)=>g5(e,n,o,i),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let a of n)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Yp({...t,checks:[],...J.normalizeParams(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let a of n)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Yp({...t,checks:[],...J.normalizeParams(o),entries:i})}});function H1(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Yp({type:"enum",entries:r,...J.normalizeParams(t)})}function FX(e,t){return new Yp({type:"enum",entries:e,...J.normalizeParams(t)})}var wO=j("ZodLiteral",(e,t)=>{W$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>v5(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function LX(e,t){return new wO({type:"literal",values:Array.isArray(e)?e:[e],...J.normalizeParams(t)})}var SO=j("ZodFile",(e,t)=>{Z$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>y5(e,r,n,o),e.min=(r,n)=>e.check(ns(r,n)),e.max=(r,n)=>e.check(Lc(r,n)),e.mime=(r,n)=>e.check(Up(Array.isArray(r)?r:[r],n))});function MX(e){return GA(SO,e)}var kO=j("ZodTransform",(e,t)=>{Zu(),G$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>S5(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Nc(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(J.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(J.issue(a))}};let o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function W1(e){return new kO({type:"transform",transform:e})}var Wx=j("ZodOptional",(e,t)=>{PS.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>v1(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Wu(e){return new Wx({type:"optional",innerType:e})}var Z1=j("ZodExactOptional",(e,t)=>{q$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>v1(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function CO(e){return new Z1({type:"optional",innerType:e})}var PO=j("ZodNullable",(e,t)=>{K$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Mx(e){return new PO({type:"nullable",innerType:e})}function BX(e){return Wu(Mx(e))}var DO=j("ZodDefault",(e,t)=>{X$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>z5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function RO(e,t){return new DO({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():J.shallowClone(t)}})}var TO=j("ZodPrefault",(e,t)=>{Q$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>N5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function EO(e,t){return new TO({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():J.shallowClone(t)}})}var G1=j("ZodNonOptional",(e,t)=>{Y$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>A5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function $O(e,t){return new G1({type:"nonoptional",innerType:e,...J.normalizeParams(t)})}var AO=j("ZodSuccess",(e,t)=>{J$.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function jX(e){return new AO({type:"success",innerType:e})}var OO=j("ZodCatch",(e,t)=>{eA.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>F5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function zO(e,t){return new OO({type:"catch",innerType:e,catchValue:typeof t=="function"?t:J.constantCatch(t)})}var NO=j("ZodNaN",(e,t)=>{tA.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>x5(e,r,n,o)});function UX(e){return WA(NO,e)}var Zx=j("ZodPipe",(e,t)=>{DS.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>L5(e,r,n,o),e.in=t.in,e.out=t.out});function w1(e,t){return new Zx({type:"pipe",in:e,out:t})}var Gx=j("ZodCodec",(e,t)=>{Zx.init(e,t),Sx.init(e,t)});function VX(e,t,r){return new Gx({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function HX(e){let t=e._zod.def;return new Gx({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var FO=j("ZodPreprocess",(e,t)=>{Zx.init(e,t),rA.init(e,t)}),LO=j("ZodReadonly",(e,t)=>{oA.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>M5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function MO(e){return new LO({type:"readonly",innerType:e})}var BO=j("ZodTemplateLiteral",(e,t)=>{nA.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>b5(e,r,n,o)});function WX(e,t){return new BO({type:"template_literal",parts:e,...J.normalizeParams(t)})}var jO=j("ZodLazy",(e,t)=>{kx.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>j5(e,r,n,o),e.unwrap=()=>e._zod.def.getter()});function UO(e){return new jO({type:"lazy",getter:e})}var VO=j("ZodPromise",(e,t)=>{aA.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>B5(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function ZX(e){return new VO({type:"promise",innerType:e})}var HO=j("ZodFunction",(e,t)=>{iA.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>w5(e,r,n,o)});function GX(e){return new HO({type:"function",input:Array.isArray(e?.input)?bO(e?.input):e?.input??Ux(Hu()),output:e?.output??Hu()})}var qx=j("ZodCustom",(e,t)=>{sA.init(e,t),qe.init(e,t),e._zod.processJSONSchema=(r,n,o)=>I5(e,r,n,o)});function qX(e){let t=new $t({check:"custom"});return t._zod.check=e,t}function KX(e,t){return qA(qx,e??(()=>!0),t)}function WO(e,t={}){return KA(qx,e,t)}function ZO(e,t){return XA(e,t)}var XX=QA,QX=YA,GO=j("ZodInstanceOf",(e,t)=>{qx.init(e,t)},{properties(e,t){return this.check(jp(e,t))}});function YX(e,t={}){let r=new GO({type:"custom",check:"custom",fn:n=>n instanceof e,abort:!0,...J.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=n=>{n.value instanceof e||n.issues.push({code:"invalid_type",expected:e.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var JX=(...e)=>JA({Codec:Gx,Boolean:th,String:Jp},...e);function eQ(e){let t=UO(()=>oh([Lx(e),oO(),nO(),lO(),Ux(t),yO(Lx(),t)]));return t}function tQ(e,t){return new FO({type:"pipe",in:W1(e),out:t})}var Ege={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function $ge(e){gr({customError:e})}function Age(){return gr().customError}var qO;qO||(qO={});var Kx={};Is(Kx,{ZodISODate:()=>Vc,ZodISODateTime:()=>Uc,ZodISODuration:()=>Wc,ZodISOTime:()=>Hc,date:()=>zge,datetime:()=>Oge,duration:()=>Fge,time:()=>Nge});function Oge(e){return $x(Uc,e)}function zge(e){return Ax(Vc,e)}function Nge(e){return Ox(Hc,e)}function Fge(e){return zx(Wc,e)}var be={...nh,...y1,iso:Kx},Lge=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Mge(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function rQ(e,t){return e.map((r,n)=>n<t?r:r.optional())}function Bge(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function jge(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let n=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===n){let o=r[1]===void 0?void 0:Bge(r[1]);if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function Uge(e,t){return be.transform(n=>n).check(n=>{let o=n.value;if(typeof o!="object"||o===null||Array.isArray(o))return;let i=Object.getOwnPropertyNames(o);if(t.minProperties!==void 0&&i.length<t.minProperties&&n.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:o,inst:e,continue:!0}),t.maxProperties!==void 0&&i.length>t.maxProperties&&n.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:o,inst:e,continue:!0}),t.keySchema)for(let a of i){let s=t.keySchema.safeParse(a);s.success||n.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function KO(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let n=String(e);return`${r[0]}${n.length}:${n}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let i=[];for(let a of e){let s=KO(a,t);if(s===null)return null;i.push(s)}return`a${i.length}:[${i.join(",")}]`}let n=Object.keys(e).sort(),o=[];for(let i of n){let a=KO(e[i],t);if(a===null)return null;o.push(`${i.length}:${i}=${a}`)}return`o${o.length}:{${o.join(",")}}`}finally{t.delete(e)}}var Vge=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Hge=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function Xx(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(Xx):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>Vge.has(t)?Xx(r):!Hge.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(Xx))}function oQ(e){return e===1?"element":"elements"}function Wge(e,t){return be.transform(n=>n).check(n=>{let o=n.value;if(Array.isArray(o)){if(t.uniqueItems===!0){let i=new Map;for(let a=0;a<o.length;a++){let s=KO(o[a],new Set);if(s===null)continue;let l=i.get(s);if(l===void 0){i.set(s,a);continue}n.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${l}`,input:o,path:[a],continue:!0})}}if(t.containsSchema){let i=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let l of o)if(t.containsSchema.safeParse(l).success&&++s>=a)break;s<i&&n.issues.push({code:"custom",message:`Array must contain at least ${i} matching ${oQ(i)}; found ${s}`,input:o,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&n.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${oQ(t.maxContains)}`,input:o,continue:!0})}}}).pipe(e)}function nQ(e,t){if(e!==!1)return e===void 0||e===!0?be.any():ln(e,t)}var Zge=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function iQ(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return be.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return be.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=jge(o,t),a=ln(i,t);return t.refs.set(o,a),t.processing.delete(o),a}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return be.null();if(o.length===0)return be.never();if(o.length===1)return be.literal(o[0]);if(o.every(a=>typeof a=="string"))return be.enum(o);let i=o.map(a=>be.literal(a));return i.length<2?i[0]:be.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return be.literal(e.const);let r=e.type;if(Array.isArray(r)){let o=r.map(i=>{let a={...e,type:i};return iQ(a,t)});return o.length===0?be.never():o.length===1?o[0]:be.union(o)}if(!r)return be.any();let n;switch(r){case"string":{let o=be.string();if(e.format){let i=e.format;i==="email"?o=o.check(be.email()):i==="uri"||i==="uri-reference"?o=o.check(be.url()):i==="uuid"||i==="guid"?o=o.check(be.uuid()):i==="date-time"?o=o.check(be.iso.datetime({offset:!0})):i==="date"?o=o.check(be.iso.date()):i==="time"?o=o.check(be.regex(Zge)):i==="duration"?o=o.check(be.iso.duration()):i==="hostname"?o=o.check(be.hostname()):i==="ipv4"?o=o.check(be.ipv4()):i==="ipv6"?o=o.check(be.ipv6()):i==="mac"?o=o.check(be.mac()):i==="cidr"?o=o.check(be.cidrv4()):i==="cidr-v6"?o=o.check(be.cidrv6()):i==="base64"?o=o.check(be.base64()):i==="base64url"?o=o.check(be.base64url()):i==="e164"?o=o.check(be.e164()):i==="credit_card"?o=o.check(be.creditCard()):i==="iban"?o=o.check(be.iban()):i==="jwt"?o=o.check(be.jwt()):i==="emoji"?o=o.check(be.emoji()):i==="nanoid"?o=o.check(be.nanoid()):i==="cuid"?o=o.check(be.cuid()):i==="cuid2"?o=o.check(be.cuid2()):i==="ulid"?o=o.check(be.ulid()):i==="xid"?o=o.check(be.xid()):i==="ksuid"&&(o=o.check(be.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),n=o;break}case"number":case"integer":{let o=r==="integer"?be.number().int():be.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),n=o;break}case"boolean":{n=be.boolean();break}case"null":{n=be.null();break}case"object":{let o={},i=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?ln(e.additionalProperties,t):void 0;for(let[u,f]of Object.entries(i)){let m=ln(f,t);bo(o,u,a.has(u)?m:m.optional())}if(e.patternProperties){let u=e.patternProperties,f=Object.keys(u),m=[];for(let g of f){let y=ln(u[g],t),v=be.string().regex(new RegExp(g));m.push(be.looseRecord(v,y))}let p=[];if(Object.keys(o).length>0&&p.push(be.object(o).passthrough()),p.push(...m),p.length===0)n=be.object({}).passthrough();else if(p.length===1)n=p[0];else{let g=be.intersection(p[0],p[1]);for(let y=2;y<p.length;y++)g=be.intersection(g,p[y]);n=g}if(e.additionalProperties===!1){let g=Object.keys(o),y=f.map(x=>new RegExp(x)),v=n;n=n.check(x=>{if(!Ri(x.value))return;let _=[];for(let I of Object.keys(x.value))g.includes(I)||y.some(S=>S.test(I))||_.push(I);_.length&&x.issues.push({code:"unrecognized_keys",keys:_,input:x.value,inst:v})})}}else{let u=be.object(o);e.additionalProperties===!1?n=u.strict():s?n=u.catchall(s):n=u.passthrough()}let l=e.propertyNames!==void 0&&e.propertyNames!==!0,c=typeof e.minProperties=="number"?e.minProperties:void 0,d=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(l||c!==void 0||d!==void 0){let u;if(l){let f=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;u=ln(f,t)}n=Uge(n,{keySchema:u,minProperties:c,maxProperties:d})}break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(u=>ln(u,t)),l=rQ(s,a),c=Array.isArray(i)?void 0:nQ(i,t),d=be.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(be.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(be.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=typeof e.minItems=="number"?e.minItems:0,s=i.map(u=>ln(u,t)),l=rQ(s,a),c=nQ(e.additionalItems,t),d=be.tuple(l);n=c?d.rest(c):d,typeof e.minItems=="number"&&(n=n.check(be.minLength(e.minItems))),typeof e.maxItems=="number"&&(n=n.check(be.maxLength(e.maxItems)))}else if(i!==void 0){let a=ln(i,t),s=be.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),n=s}else n=be.array(be.any());(e.uniqueItems===!0||e.contains!==void 0)&&(n=Wge(n,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?ln(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return n}function ln(e,t){if(typeof e=="boolean")return e?be.any():be.never();let r=iQ(e,t),n=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(c=>ln(c,t)),l=be.union(s);r=n?be.intersection(r,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(c=>ln(c,t)),l=be.xor(s);r=n?be.intersection(r,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=n?r:be.any();else{let s=n?r:ln(e.allOf[0],t),l=n?0:1;for(let c=l;c<e.allOf.length;c++)s=be.intersection(s,ln(e.allOf[c],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=be.nullable(r)),e.readOnly===!0&&(r=be.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(o[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(o[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!Xx(e.propertyNames)&&(o.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(o[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!Xx(e.contains)&&(o.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(o[s]=e[s])}for(let s of Object.keys(e))Lge.has(s)||bo(o,s,e[s]);return Object.keys(o).length>0&&t.registry.add(r,o),e.description&&(r=r.describe(e.description)),r}function aQ(e,t){if(typeof e=="boolean")return e?be.any():be.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let n=Mge(r,t?.defaultTarget),o=r.$defs||r.definitions||{},i={version:n,defs:o,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??yo};return ln(r,i)}var sQ=Symbol("z.visit/resolving");function Qx(e,t){let r=typeof t=="function"?t:(a,s)=>{let l=t[a._zod.def.type];return l?l(a,s):a},n=new Map;function o(a){let s=n.get(a);if(s===sQ)return new kx({type:"lazy",getter:()=>n.get(a)});if(s!==void 0)return s;n.set(a,sQ);let l=i(a),c=r(l,l!==a);return n.set(a,c),c}function i(a){let s=a._zod.def,l=s.type;switch(l){case"object":{let c=s.shape,d=Object.keys(c),u=!1,f={};for(let p of d){let g=o(c[p]);g!==c[p]&&(u=!0),f[p]=g}let m=s.catchall;return s.catchall&&(m=o(s.catchall),m!==s.catchall&&(u=!0)),u?wt(a,{...s,shape:f,catchall:m}):a}case"array":{let c=o(s.element);return c===s.element?a:wt(a,{...s,element:c})}case"tuple":{let c=s.items,d=!1,u=[];for(let m of c){let p=o(m);p!==m&&(d=!0),u.push(p)}let f=s.rest;return s.rest&&(f=o(s.rest),f!==s.rest&&(d=!0)),d?wt(a,{...s,items:u,rest:f}):a}case"record":case"map":{let c=o(s.keyType),d=o(s.valueType);return c===s.keyType&&d===s.valueType?a:wt(a,{...s,keyType:c,valueType:d})}case"set":{let c=o(s.valueType);return c===s.valueType?a:wt(a,{...s,valueType:c})}case"union":{let c=s.options,d=!1,u=[];for(let f of c){let m=o(f);m!==f&&(d=!0),u.push(m)}return d?wt(a,{...s,options:u}):a}case"intersection":{let c=o(s.left),d=o(s.right);return c===s.left&&d===s.right?a:wt(a,{...s,left:c,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let c=o(s.innerType);return c===s.innerType?a:wt(a,{...s,innerType:c})}case"pipe":{let c=o(s.in),d=o(s.out);return c===s.in&&d===s.out?a:wt(a,{...s,in:c,out:d})}case"function":{let c=o(s.input),d=o(s.output);return c===s.input&&d===s.output?a:wt(a,{...s,input:c,output:d})}case"lazy":{let c=s.getter,{_cachedInner:d,...u}=s;return wt(a,{...u,getter:()=>o(c())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return o(e)}function lQ(e){return Qx(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:oh(r.options)}})}function Gge(e,t){if(!t?.length)return e;let r=e._zod.def;return wt(e,fa(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function cQ(e){return Gge(e.out,e.checks)}function qge(e){return e.in._zod.traits.has("$ZodTransform")?cQ(e):e.in}function dQ(e){return Qx(e,{pipe:t=>qge(t._zod.def),default:(t,r)=>r?Wu(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function uQ(e){return Qx(e,{pipe:t=>cQ(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var XO={};Is(XO,{bigint:()=>Yge,boolean:()=>Qge,date:()=>Jge,number:()=>Xge,string:()=>Kge});function Kge(e){return xA(Jp,e)}function Xge(e){return SA(eh,e)}function Qge(e){return EA(th,e)}function Yge(e){return AA(rh,e)}function Jge(e){return HA(jx,e)}var fQ={view:0,control:1,owner:2};function eve(e){return e.kind==="owner"?"owner":e.role}function QO(e,t){return fQ[eve(e)]>=fQ[t]}function mQ(e,t){let r=e.access;if(r===void 0)return e.kind==="query"?"view":"owner";if(typeof r=="string")return r;try{return r(t)}catch{return"owner"}}var Yx=class extends Error{constructor(r,n){super(r);Ft(this,"fix",n);this.name="UserError"}},pQ=(e,t)=>{throw new Yx(e,t)};var tve=h.enum(["user","cancelled","invalid","bug"]),hQ=h.strictObject({kind:tve,message:h.string().max(2e3),fix:h.string().max(2e3).optional()}),Jx=class extends Error{constructor(t="Nothing changed."){super(t),this.name="Cancelled"}};function YO(e){return e.kind==="cancelled"?new Jx(e.message):new Yx(e.message,e.fix)}function gQ(e){return e.issues.map(t=>(t.path.length?t.path.join(".")+": ":"")+t.message).join("; ")}function _e(e){return{...e,cli:e.cli,kind:"operation"}}function Ge(e){return{...e,cli:e.cli,kind:"query"}}function ct(e){return{...e,kind:"view"}}function rve(e,t){let r=e.input.safeParse(t??{});return r.success||pQ("That does not work for "+e.title.toLowerCase()+": "+gQ(r.error)),r.data}function vQ(e,t){let r=e.inputs?.(t)??{};return Object.fromEntries(Object.entries(e.queries).map(([n,o])=>[n,rve(o,r[n])]))}var ove=new Set(["$schema"]),ha=class e{constructor(t){Ft(this,"schema");this.schema=t}get inner(){let t=this.schema;for(;;){let r=t._zod.def;if(["optional","default","nullable","prefault","readonly"].includes(r.type)&&r.innerType)t=r.innerType;else if(r.type==="pipe"&&r.in)t=r.in;else return t}}get type(){return this.inner._zod.def.type}get isSection(){return this.type==="object"&&!!this.inner.shape}get description(){return this.schema.description??this.inner.description}get min(){return this.inner.minValue??void 0}get max(){return this.inner.maxValue??void 0}get integer(){return!!this.inner.isInt}get secret(){let t=r=>r.meta?.();return t(this.schema)?.secret===!0||t(this.inner)?.secret===!0}get optional(){return["optional","default"].includes(this.schema._zod.def.type)}rangeText(){let t=(this.inner._zod.def.checks??[]).map(l=>l._zod.def),r=t.find(l=>l.check==="greater_than"),n=t.find(l=>l.check==="less_than"),o=r?.value,i=n?.value;if(o!==void 0&&i!==void 0&&r?.inclusive!==!1&&n?.inclusive!==!1)return o+" to "+i;let a=o===void 0?"":(r?.inclusive===!1?"more than ":"at least ")+o,s=i===void 0?"":(n?.inclusive===!1?"less than ":"at most ")+i;return[a,s].filter(Boolean).join(" and ")}children(){return Object.entries(this.inner.shape??{}).filter(([t])=>!ove.has(t)).map(([t,r])=>[t,new e(r)])}child(t){let r=this.inner.shape?.[t];return r?new e(r):void 0}leaves(t=[]){return this.children().flatMap(([r,n])=>n.isSection?n.leaves([...t,r]):[{key:[...t,r],node:n}])}get element(){let t=this.inner._zod.def;return t.type==="array"&&t.element?new e(t.element):t.type==="record"&&t.valueType?new e(t.valueType):void 0}get options(){return(this.inner._zod.def.options??[]).map(t=>new e(t))}get choices(){let t=this.inner._zod.def;return t.type==="enum"?Object.values(t.entries??{}):t.type==="literal"?t.values??[]:[]}get editor(){let t=this.type;if(t==="boolean")return"boolean";if(t==="enum"||t==="literal")return"choice";if(t==="union")return this.options.every(n=>["literal","enum","boolean"].includes(n.type))?"choice":"union";if(t==="number"||t==="string")return t;let r=this.element;return t==="array"&&r?r.type==="string"?"string-list":r.type==="enum"?"choice-list":r.type==="object"?"object-list":"json":t==="record"&&r?["string","number","boolean"].includes(r.type)?"string-map":r.type==="object"?"object-map":"json":t==="object"?"object":"json"}get choiceValues(){return this.type!=="union"?this.choices:this.options.flatMap(t=>t.type==="boolean"?[!0,!1]:t.choices)}get openOption(){return this.options.find(t=>!["literal","enum","boolean"].includes(t.type))}initial(){let t=this.schema._zod.def;if(t.type==="default")return structuredClone(t.defaultValue);switch(this.type){case"boolean":return!1;case"number":return this.min??0;case"string":return"";case"enum":case"literal":return this.choices[0];case"union":return this.options[0]?.initial();case"array":return[];case"record":return{};case"object":return Object.fromEntries(this.children().filter(([,r])=>!["optional","default"].includes(r.schema._zod.def.type)).map(([r,n])=>[r,n.initial()]));default:return null}}check(t){let r=this.schema.safeParse(t);return r.success?!0:r.error.issues.map(n=>(n.path.length?n.path.join(".")+": ":"")+n.message).join("; ")}};function _o(e,t=Date.now()){let r=Math.max(0,Math.round((t-new Date(e).getTime())/1e3));return Number.isNaN(r)?"":r<45?"just now":r<3600?Math.round(r/60)+" min ago":r<86400?Math.round(r/3600)+" h ago":Math.round(r/86400)+" d ago"}function Er(e,t,r=t+"s"){return e+" "+(e===1?t:r)}var nve=new Set(["mb","gb","cpu","gpu","jdk","sdk","id","url","ui","npm","msvc","uv","api","ssh","vm","io"]),ive={harness:"agent",harnesses:"agents"};function Ku(e){let t=["B","KB","MB","GB","TB"],r=e<=0?0:Math.min(t.length-1,Math.floor(Math.log(e)/Math.log(1024))),n=e/1024**r;return(r===0?String(e):n.toFixed(n<10?1:0))+" "+t[r]}function xQ(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").split(" ").filter(Boolean).map(r=>ive[r.toLowerCase()]??r).map((r,n)=>{let o=r.toLowerCase();return nve.has(o)?r.toUpperCase():n===0?r[0].toUpperCase()+r.slice(1):o}).join(" ")}var ave=["boolean","enum","number","text","secret","path","list","map","object","json"],sve=h.union([h.string(),h.number(),h.boolean()]),Zc=h.lazy(()=>h.strictObject({name:h.string(),key:h.array(h.string()),kind:h.enum(ave),label:h.string(),help:h.string().optional(),optional:h.boolean(),default:h.unknown().optional(),choices:h.array(h.strictObject({value:sve,label:h.string()})).optional(),open:Zc.optional(),min:h.number().optional(),max:h.number().optional(),integer:h.boolean().optional(),range:h.string().optional(),pathKind:h.enum(["dir","file"]).optional(),literals:h.array(h.string()).optional(),element:Zc.optional(),fields:h.array(Zc).optional()})),bQ={"storage.root":"dir","projects.roots":"dir","projects.exclude":"dir","projects.declinedRoots":"dir","claudeProfile.hostDir":"dir","claudeProfile.globalStateFile":"file",scripts:"file"};function lve(e){let t=e.join("."),r=e[e.length-1]??"";if(bQ[t])return bQ[t];if(e[0]==="mappings"&&r==="host"||r==="hostDir"||/(Dir|Folder)$/.test(r))return"dir";if(/File$/.test(r))return"file"}function cve(e){return/"auto"/.test(e.description??"")?["auto"]:[]}function dve(e){return e===!0?"On":e===!1?"Off":String(e)}function yQ(e){return e!==void 0&&Number.isFinite(e)&&Math.abs(e)<Number.MAX_SAFE_INTEGER}function uve(e){let t=e.schema._zod.def;return t.type==="default"?t.defaultValue:void 0}function as(e,t=[],r){let n=e instanceof ha?e:new ha(e),o=t[t.length-1]??"",i={name:o,key:[...t],label:r??(o?xQ(o):""),...n.description?{help:n.description}:{},optional:n.optional},a=uve(n),s=l=>a===void 0?{}:{default:l?a===""?"":"***":a};switch(n.editor){case"boolean":return{...i,kind:"boolean",...s(!1)};case"choice":case"union":{let l=n.openOption;return{...i,kind:"enum",...s(!1),choices:n.choiceValues.filter(c=>["string","number","boolean"].includes(typeof c)).map(c=>({value:c,label:dve(c)})),...l?{open:as(l,t,i.label)}:{}}}case"number":{let l=n.rangeText();return{...i,kind:"number",...s(!1),...yQ(n.min)?{min:n.min}:{},...yQ(n.max)?{max:n.max}:{},...n.integer?{integer:!0}:{},...l?{range:l}:{}}}case"string":{if(n.secret)return{...i,kind:"secret",...s(!0)};let l=lve(t);return l?{...i,kind:"path",...s(!1),pathKind:l,literals:cve(n)}:{...i,kind:"text",...s(!1)}}case"string-list":case"choice-list":case"object-list":return{...i,kind:"list",...s(!1),element:as(n.element,t,"Entry")};case"string-map":case"object-map":return{...i,kind:"map",...s(n.element?.secret??!1),element:fve(n,t)};case"object":return{...i,kind:"object",...s(!1),fields:q1(n,t)};default:return{...i,kind:"json",...s(!1)}}}function fve(e,t){return as(e.element,[...t,"*"],"Value")}function q1(e,t=[]){return(e instanceof ha?e:new ha(e)).children().map(([n,o])=>as(o,[...t,n]))}function mve(e){if(typeof e!="object"||e===null||Array.isArray(e))return String(e);let t=e;return typeof t.host=="string"&&typeof t.guest=="string"?t.host+" \u2192 "+t.guest+(t.readOnly?" (read-only)":""):Object.values(t).filter(n=>typeof n=="string"&&n!=="").slice(0,2).join(" \xB7 ")||"{ "+Object.keys(t).join(", ")+" }"}function JO(e,t){return e.length>t?e.slice(0,Math.max(0,t-1))+"\u2026":e}function K1(e,t,r=60){if(e===void 0)return{text:"not set",tone:"muted"};if(t?.kind==="secret")return e===""?{text:"(empty)",tone:"muted"}:{text:"***"};if(e===!0)return{text:"On",tone:"ok"};if(e===!1)return{text:"Off",tone:"muted"};if(e===null)return{text:"none",tone:"muted"};if(typeof e=="string")return e===""?{text:"(empty)",tone:"muted"}:{text:JO(e,r)};if(typeof e=="number")return{text:String(e)};if(Array.isArray(e))return e.length===0?{text:"none",tone:"muted"}:{text:JO(e.length+" \xB7 "+e.map(o=>typeof o=="object"?mve(o):String(o)).join(", "),r)};let n=Object.keys(e);return n.length?{text:JO(n.length+" \xB7 "+n.join(", "),r)}:{text:"none",tone:"muted"}}function X1(e,t){if(t===void 0||t==="")return e.optional||e.kind==="text"?void 0:"Required.";if(e.kind==="number"){let r=typeof t=="number"?t:Number(t);if(!Number.isFinite(r))return"Enter a number.";if(e.integer&&!Number.isInteger(r))return"Enter a whole number.";if(e.min!==void 0&&r<e.min||e.max!==void 0&&r>e.max)return e.range?"Use "+e.range+".":"Out of range."}if(e.kind==="enum"&&!e.open&&!e.choices?.some(r=>r.value===t))return"Choose one."}var ih=h.array(h.string()).optional(),_Q=h.strictObject({value:h.string(),label:h.string(),description:h.string().optional()}),Q1=h.strictObject({message:h.string(),fix:h.string()}),pve=h.strictObject({kind:h.literal("confirm"),title:h.string(),lines:ih,yes:h.string().optional(),danger:h.boolean().optional(),typed:h.string().optional(),implied:h.boolean().optional(),skipWithYes:h.boolean().optional(),noTerminal:h.strictObject({message:h.string(),fix:h.string()}).optional()}),hve=h.strictObject({kind:h.literal("choose"),title:h.string(),lines:ih,choices:h.array(_Q).min(1),initial:h.string().optional(),noTerminal:Q1.optional()}),gve=h.strictObject({kind:h.literal("text"),title:h.string(),lines:ih,initial:h.string().optional(),allowEmpty:h.boolean().optional(),problem:h.string().optional(),noTerminal:Q1.optional()}),vve=h.strictObject({kind:h.literal("secret"),title:h.string(),lines:ih,problem:h.string().optional()}),xve=h.strictObject({kind:h.literal("path"),title:h.string(),lines:ih,pathKind:h.enum(["dir","file"]),initial:h.string().optional(),literals:h.array(h.string()).optional(),problem:h.string().optional(),noTerminal:Q1.optional()}),bve=h.strictObject({kind:h.literal("checklist"),title:h.string(),lines:ih,choices:h.array(_Q),checked:h.array(h.string()).optional(),noTerminal:Q1.optional()}),IQ=h.discriminatedUnion("kind",[pve,hve,gve,vve,xve,bve]),Jpt={confirm:h.boolean(),choose:h.string().max(1e3).optional(),text:h.string().max(1e4).optional(),secret:h.string().max(1e4).optional(),path:h.string().max(2e3).optional(),checklist:h.array(h.string().max(1e3)).max(1e3).optional()};async function e3(e,t,r){for(let n=t;;){let o=await e(n);if(o===void 0||!r)return o;let i=r(o);if(i===!0)return o;n={...n,problem:i}}}function yve(e,t){return{progress:r=>t.progress(r),log:(r,n)=>t.log(r,n),confirm:r=>e({...r,kind:"confirm"}),choose:r=>e({...r,kind:"choose"}),text:({validate:r,...n})=>e3(e,{...n,kind:"text"},r),secret:({validate:r,...n})=>e3(e,{...n,kind:"secret"},r),path:({validate:r,...n})=>e3(e,{...n,kind:"path"},r),checklist:r=>e({...r,kind:"checklist"})}}var eht=yve(e=>Promise.reject(new Error("A query asked a question: "+e.title)),{progress:()=>{},log:()=>{}});var ss=h.string().regex(/^[A-Za-z0-9_-]{1,64}$/),wQ=h.string().regex(/^[a-z][A-Za-z0-9]*(\.[a-z][A-Za-z0-9]*)+$/).max(80),_ve=h.enum(["ok","warn","danger","muted","accent"]),Ive=h.strictObject({t:h.literal("call"),id:ss,op:wQ,input:h.unknown()}),wve=h.strictObject({t:h.literal("answer"),id:ss,value:h.unknown()}),Sve=h.strictObject({t:h.literal("subscribe"),id:ss,query:wQ,input:h.unknown()}),kve=h.strictObject({t:h.literal("unsubscribe"),id:ss}),iht=h.discriminatedUnion("t",[Ive,wve,Sve,kve]),SQ=h.discriminatedUnion("t",[h.strictObject({t:h.literal("progress"),id:ss,text:h.string()}),h.strictObject({t:h.literal("log"),id:ss,text:h.string(),tone:_ve.optional()}),h.strictObject({t:h.literal("ask"),id:ss,question:IQ}),h.strictObject({t:h.literal("result"),id:ss,output:h.unknown()}),h.strictObject({t:h.literal("error"),id:ss,error:hQ}),h.strictObject({t:h.literal("data"),id:ss,output:h.unknown()})]);function le(e,t,r={}){return{kind:"operation",op:e.id,input:t,label:e.title,...e.danger?{danger:!0}:{},...r}}function On(e,t,r={}){return{kind:"link",target:e,label:t,...r}}function kQ(e){return e.sections.some(t=>(t.facts?.length??0)>0||(t.items?.length??0)>0||(t.text?.length??0)>0)}var CQ=h.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),Cve=h.object({name:h.string().describe("The agent"),ready:h.boolean().describe("Installed in the sandbox already (starts without an install)"),isDefault:h.boolean().describe("The agent that starts by default"),removable:h.boolean().describe("You added it (built-in agents cannot be removed)")}),Pve=h.object({folder:h.string().describe("The folder a start works on (the current folder)"),defaultAgent:h.string().describe("The default agent"),agents:h.array(Cve).describe("Every agent in your settings, built in or added")}),t3=Ge({id:"agents.list",title:"Agents",summary:"the agents you can start, and which one is the default",input:h.object({}),output:Pve,surfaces:{except:{cli:"sandbox config list shows the agents (harnesses) and the default (defaultHarness)"}}}),r3=_e({id:"agents.start",access:"control",title:"Start an agent",summary:"start an agent in a project of the running sandbox",input:h.object({agent:CQ.describe("The agent to start"),project:CQ.optional().describe("The project of the running sandbox (asked when there are several)")}),output:h.object({session:h.string().describe("The new session"),message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox <agent> and sandbox launch start agents on the command line (they boot the sandbox and can attach the terminal)",menu:"the menu starts agents with launch, which can boot the sandbox and attach this terminal"}}}),Y1=_e({id:"agents.add",title:"Add an agent\u2026",summary:"add an agent by its npm or Python package, or a program on this PC",input:h.object({}),output:h.object({name:h.string().describe("The new agent"),message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses adds agents on the command line"}}}),J1=_e({id:"agents.makeDefault",title:"Make default",summary:"make an agent the one that starts by default",input:h.object({name:h.string().describe("The agent")}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"sandbox config set defaultHarness <name> does this on the command line"}}}),ek=_e({id:"agents.remove",title:"Remove",summary:"take an agent you added out of your settings",input:h.object({name:h.string().describe("The agent")}),output:h.object({message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox config set harnesses removes agents on the command line"}}});function Dve(e){return e.split(/[\\/]/).pop()??e}function Rve(e,t){let r=e.removable?e.isDefault?" You added it. Make another agent the default to remove it.":" You added it.":"";return"Starts "+e.name+" in "+t+"."+(e.isDefault?" It is the default agent.":"")+r}function Tve(e){return e.removable&&!e.isDefault?"x removes it.":void 0}function Eve(e,t){return{id:"agent:"+e.name,label:e.name,hint:e.ready?"ready":"installs on first start",tone:e.ready?"ok":"muted",icon:e.name,badges:e.isDefault?[{text:"default",tone:"accent"}]:[],description:Rve(e,t),keys:Tve(e),primary:On({kind:"start-agent",agent:e.name},"Start "+e.name,{verb:"start"}),actions:[...e.isDefault?[]:[le(J1,{name:e.name},{key:"d",verb:"make default",importance:1})],...e.removable&&!e.isDefault?[le(ek,{name:e.name},{key:"x",verb:"remove",importance:1})]:[]]}}function $ve(e){let t=Dve(e.folder),r=[...e.agents].sort((n,o)=>Number(o.isDefault)-Number(n.isDefault));return{title:"Agents",sections:[{id:"start",title:"Start in "+t,cards:!0,items:[...r.map(n=>Eve(n,t)),{id:"add",label:"Add an agent\u2026",description:"Add another agent by its npm or Python package, or a program on this PC. It is saved in your settings and appears in this list.",primary:le(Y1,{},{verb:"add"})}]}]}}var PQ=ct({id:"agents",title:"Agents",summary:"The agents you can start: start one, add one, choose the default.",queries:{agents:t3},operations:[r3,Y1,J1,ek],build:({agents:e})=>$ve(e)});var ah=h.string().default("claude").describe("whose login: an agent that keeps one (default: claude)"),tb=h.string().optional().describe("account name"),Ave=h.object({name:h.string().describe("The saved login"),email:h.string().nullable().describe("Its email, when the agent says"),isDefault:h.boolean().describe("New launches start with it"),isActive:h.boolean().describe("The sandbox uses it now"),savedAt:h.string().describe("When it was saved (ISO time)")}),Ove=h.object({name:h.string().describe("The agent"),kept:h.boolean().describe("Its login can be saved and switched"),canSavePc:h.boolean().describe("This PC's login can be saved"),accounts:h.array(Ave).describe("Its saved logins (empty when not kept)")}),zve=h.object({agent:h.string().describe("The agent asked for (the command line table shows only it)"),agents:h.array(Ove).describe("Every agent, Claude first")}),o3=h.object({message:h.string().describe("What happened")});function Nve(e){let t=e.agents.find(i=>i.name===e.agent)?.accounts??[];if(!t.length)return e.agent==="claude"?"No saved accounts. Sign in inside the sandbox, then: sandbox account save <name> (or --from-host to save this PC's login)":"No saved "+e.agent+" accounts. Sign in inside the sandbox, then: sandbox account save <name> --agent "+e.agent;let r=[["","NAME","EMAIL","SAVED"],...t.map(i=>[(i.isActive?"*":" ")+(i.isDefault?"D":" "),i.name,i.email??"-",i.savedAt.slice(0,16).replace("T"," ")])],n=r[0].map((i,a)=>Math.max(...r.map(s=>s[a].length)));return[...r.map(i=>i.map((a,s)=>s===i.length-1?a:a.padEnd(n[s]+2)).join("")),"","* = active in the sandbox D = default for new launches"].join(`
121
+ `)}var n3=Ge({id:"accounts.list",title:"Accounts",summary:"Claude logins: list, save, use, set the default, remove",input:h.object({agent:ah}),output:zve,text:Nve,cli:{name:"account",action:"list",json:!0,flags:{agent:{flag:"--agent",value:"name",choices:"harnesses",label:"Agent"}},shapeJson:e=>e.agents.find(t=>t.name===e.agent)?.accounts??[]}}),eb=_e({id:"accounts.save",title:"Save the sandbox's login",summary:"save the sandbox's (or this PC's) login under a name",input:h.object({agent:ah,name:tb,fromHost:h.boolean().default(!1).describe("(save) save this PC's login instead of the sandbox's")}),output:h.object({name:h.string().describe("The saved login"),message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"account",action:"save",positional:["name"],flags:{agent:{flag:"--agent"},fromHost:{flag:"--from-host"}}}}),tk=_e({id:"accounts.use",title:"Use this login",summary:"make the sandbox use a saved login (running sessions restart)",input:h.object({agent:ah,name:tb,noRestart:h.boolean().default(!1).describe("(use) do not restart running sessions")}),output:h.object({lines:h.array(h.string()).describe("What happened, line by line")}),text:e=>e.lines.join(`
122
+ `),cli:{name:"account",action:"use",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),rk=_e({id:"accounts.default",title:"Make default",summary:"the login every launch starts with; the sandbox switches to it now too",input:h.object({agent:ah,name:tb,noRestart:h.boolean().default(!1).describe("(default) do not restart running sessions")}),output:o3,text:e=>e.message,cli:{name:"account",action:"default",positional:["name"],flags:{agent:{flag:"--agent"},noRestart:{flag:"--no-restart"}}}}),ok=_e({id:"accounts.rename",title:"Rename\u2026",summary:"give a saved login another name (it keeps working)",input:h.object({agent:ah,name:tb,to:h.string().optional().describe("(rename) the new name")}),output:o3,text:e=>e.message,cli:{name:"account",action:"rename",positional:["name"],flags:{agent:{flag:"--agent"},to:{flag:"--to"}}}}),nk=_e({id:"accounts.remove",title:"Remove\u2026",summary:"delete a saved login (you would sign in again)",danger:!0,input:h.object({agent:ah,name:tb}),output:o3,text:e=>e.message,cli:{name:"account",action:"remove",positional:["name"],flags:{agent:{flag:"--agent"}},yes:"(remove) do not ask first"}});function Fve(e){return[{id:"@save-sandbox",label:"+ Save the sandbox's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login you signed in with inside the sandbox, under a name you choose.",primary:le(eb,{agent:e.name,fromHost:!1},{verb:"save",label:"Save the sandbox's login"})},...e.canSavePc?[{id:"@save-pc",label:"+ Save this PC's login\u2026",group:"Save a login",description:"Saves the "+e.name+" login of this PC, under a name you choose.",primary:le(eb,{agent:e.name,fromHost:!0},{verb:"save",label:"Save this PC's login"})}]:[]]}function Lve(e,t){let r=[t.isActive?"in the sandbox":"",t.isDefault?"default":""].filter(Boolean).join(" \xB7 ");return{id:e.name+":"+t.name,label:t.name,group:"Saved logins",icon:e.name,hint:r,badges:[...t.isActive?[{text:"in the sandbox",tone:"ok"}]:[],...t.isDefault?[{text:"default",tone:"accent"}]:[]],description:t.isActive?"The sandbox uses this login now.":"Choose it to make the sandbox use this login.",details:["Agent "+e.name,"Email "+(t.email??"-"),"Saved "+t.savedAt.slice(0,16).replace("T"," ")],...t.isActive?{}:{primary:le(tk,{agent:e.name,name:t.name},{verb:"use"})},actions:[le(rk,{agent:e.name,name:t.name},{key:"d",verb:"make default",importance:1}),le(ok,{agent:e.name,name:t.name},{key:"r",verb:"rename",importance:2}),le(nk,{agent:e.name,name:t.name},{key:"x",verb:"remove",importance:1})]}}function Mve(e){return e.kept?{id:e.name,title:e.name,summary:e.accounts.length?Er(e.accounts.length,"saved login"):"no saved login yet",cards:!0,items:[...Fve(e),...e.accounts.map(t=>Lve(e,t))]}:{id:e.name,title:e.name,summary:"not kept between sandboxes",items:[{id:"info:"+e.name,label:"This agent's login is not kept between sandboxes",tone:"muted",description:"Sign in again in each new sandbox, or use an API key in the agent\u2019s environment."}]}}function Bve(e){return{title:"Accounts",sections:e.agents.map(Mve)}}var DQ=ct({id:"accounts",title:"Accounts",summary:'Logins saved on this PC for each agent. Every launch starts with the default; "Use this login" switches now.',queries:{accounts:n3},operations:[eb,tk,rk,ok,nk],build:({accounts:e})=>Bve(e)});var jve=h.object({name:h.string(),path:h.string(),kind:h.enum(["dir","file"])}),Uve=h.object({path:h.string(),parent:h.string().nullable(),entries:h.array(jve),truncated:h.boolean(),places:h.array(h.object({label:h.string(),path:h.string()}))}),sh=Ge({id:"files.browse",access:"owner",title:"Browse folders",summary:"list what is in a folder of this PC, to pick a folder or a file",input:h.object({path:h.string().max(1024).optional().describe("The folder (none: only the places to start from)"),files:h.boolean().default(!1).describe("List files too, not only folders")}),output:Uve,surfaces:{except:{cli:"a path is typed on the command line",menu:"the menu asks for a path as text and checks it"}}});var Vve=h.object({bytes:h.number().describe("Bytes counted"),files:h.number().describe("Files counted"),partial:h.boolean().describe("The count stopped at its limit: there is at least this much")}),Hve=h.object({root:h.string().describe("The folder your saved data is in"),exists:h.boolean().describe("It exists"),holdsData:h.boolean().describe("Something is in it"),measured:Vve.nullable().describe("Its size; null when not measured"),size:h.string().describe('Its size in words; "nothing in it yet" when empty; "not measured yet" when not counted'),defaultRoot:h.string().describe("The default folder"),defaultInUse:h.boolean().describe("The default folder is the one in use"),otherFoldersWithData:h.array(h.string()).describe("Other folders that hold data")}),i3=Ge({id:"storage.show",title:"Data folder",summary:"where your saved data lives",input:h.object({measure:h.boolean().default(!0).describe("add up its size (big folders take a moment)")}),output:Hve,text:e=>["Your saved data is in: "+e.root," "+e.size,"The default folder is: "+e.defaultRoot+(e.defaultInUse?" (in use)":""),...e.otherFoldersWithData.map(t=>"Another folder with data: "+t),"","Move it with: sandbox storage move <folder> (or switch without moving: sandbox storage use <folder>)","What takes the space: sandbox data"].join(`
123
+ `),cli:{name:"storage",action:"show",json:!0,shapeJson:e=>({root:e.root,exists:e.exists,...e.measured??{bytes:0,files:0,partial:!1},defaultRoot:e.defaultRoot,otherFoldersWithData:e.otherFoldersWithData})}}),Wve=h.object({from:h.string().describe("The old folder"),to:h.string().describe("The new folder"),copied:h.boolean().describe("It was copied (another drive)"),files:h.number().describe("Files moved"),bytes:h.number().describe("Bytes moved"),pinned:h.string().describe("What storage.root now says"),removedOld:h.boolean().describe("The old folder is gone"),notes:h.array(h.string()).describe("Extra notes"),message:h.string().describe("What happened")}),ik=_e({id:"storage.move",title:"Move the data\u2026",summary:"move your saved data to another folder",input:h.object({folder:h.string().optional().describe("the folder to move to"),keepOld:h.boolean().default(!1).describe("copy instead of moving: the old folder stays (needs room for both)")}),output:Wve,text:e=>e.message,cli:{name:"storage",action:"move",positional:["folder"],flags:{keepOld:{flag:"--keep-old"}},json:!0,shapeJson:({message:e,...t})=>t}}),ak=_e({id:"storage.use",title:"Use another folder\u2026",summary:"use another folder for your saved data, without moving it",input:h.object({folder:h.string().optional().describe("the folder to use")}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"use",positional:["folder"]}}),lh=_e({id:"storage.change",title:"Data folder",summary:"pick another folder for your saved data, then move it there or switch to it",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,surfaces:{except:{cli:"the command line has storage move <folder> and storage use <folder>"}}}),Zve=h.object({setting:h.enum(["off","vhdx"]).describe("storage.contained"),maxGb:h.number().describe("storage.containedMaxGb"),available:h.boolean().describe("This PC can use it"),reasons:h.array(h.string()).describe("Why not"),fixes:h.array(h.string()).describe("What would fix it"),image:h.string().describe("The disk image file"),imageExists:h.boolean().describe("It exists"),imageBytes:h.number().nullable().describe("Its size on disk"),mountFolder:h.string().describe("Where it is mounted"),recordedMounted:h.boolean().describe("The record says it is mounted"),holders:h.number().describe("Sandboxes using it"),mountedNow:h.boolean().nullable().describe("It is mounted now (null: not checked)")}),a3=Ge({id:"storage.containedStatus",title:"Contained storage (beta)",summary:"(beta) the disk image for tools, state and logs",input:h.object({}),output:Zve,text:e=>["Contained storage (beta, untested on a real PC)"," setting: storage.contained = "+e.setting+" (limit "+e.maxGb+" GB)"," this PC: "+(e.available?"can use it":"cannot use it: "+e.reasons.join(" ")+" "+e.fixes.join(" "))," image: "+e.image+(e.imageExists?" ("+Ku(e.imageBytes??0)+" on disk)":" (not made yet)")," mount folder: "+e.mountFolder,...e.mountedNow===null?[]:[" mounted now: "+(e.mountedNow?"yes":"no")+(e.recordedMounted!==e.mountedNow?" (the record says "+(e.recordedMounted?"yes":"no")+"; sandbox doctor looks into it)":"")],"","Turn it on with: sandbox storage contained on Turn it off with: sandbox storage contained off"].join(`
124
+ `),cli:{name:"storage",action:"contained status",json:!0,shapeJson:({fixes:e,...t})=>t}}),sk=_e({id:"storage.containedOn",title:"Turn contained storage on\u2026",summary:"(beta) keep tools, state and logs in a disk image",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained on"}}),lk=_e({id:"storage.containedOff",title:"Turn contained storage off\u2026",summary:"(beta) move tools, state and logs back into plain folders",danger:!0,input:h.object({}),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"storage",action:"contained off"}});function Gve(e,t){let r={id:"folder",title:"Data folder",description:"Where your tools, logins, history and logs are kept between sandboxes.",facts:[{id:"folder",label:"Folder",value:e.root},{id:"size",label:"Size",value:e.size},{id:"default",label:"Default folder",value:e.defaultRoot+(e.defaultInUse?" (in use)":"")},...e.otherFoldersWithData.map((o,i)=>({id:"other:"+i,label:"Other folder with data",value:o}))],actions:[le(ik,{}),le(ak,{})]},n={id:"contained",title:"Contained storage (beta)",description:"Beta, and not yet tested on a real PC: keeps the sandbox tools, state and logs in one disk image file.",facts:[{id:"setting",label:"Turned on",value:t.setting==="vhdx"?"yes":"no",tone:t.setting==="vhdx"?"ok":"muted"},{id:"pc",label:"This PC",value:t.available?"can use it":"cannot use it",tone:t.available?"ok":"warn",...t.available?{}:{description:[...t.reasons,...t.fixes].join(" ")}},{id:"image",label:"Image",value:t.imageExists?Ku(t.imageBytes??0)+" on disk":"not made yet",description:t.image},{id:"mount",label:"Mount folder",value:t.mountFolder},{id:"mounted",label:"Mounted now",value:t.mountedNow===null?"not checked":t.mountedNow?"yes":"no"}],actions:t.setting==="off"?[le(sk,{})]:[le(lk,{})]};return{title:"Storage",sections:[r,n]}}var RQ=ct({id:"storage",title:"Storage",summary:"Where your saved data lives: move it, switch folders, (beta) a disk image.",queries:{storage:i3,contained:a3},operations:[lh,ik,ak,sk,lk],pickers:[sh],inputs:()=>({storage:{measure:!0}}),build:({storage:e,contained:t})=>Gve(e,t)});var ck=h.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),s3=h.string().regex(/^[A-Za-z0-9_$-]+(\.[A-Za-z0-9_$-]+)*$/).max(200).describe("The setting, e.g. sandbox.memoryMb"),qve=h.object({id:h.string().describe("The setting, e.g. sandbox.memoryMb"),key:h.array(h.string()),label:h.string(),category:h.string(),section:h.string().optional(),field:Zc,value:h.unknown(),set:h.boolean(),yours:h.unknown(),yoursSet:h.boolean(),inProject:h.unknown().optional(),default:h.unknown().optional(),locked:h.boolean()}),Kve=h.object({scope:ck,file:h.string().describe("The file this scope edits"),exists:h.boolean(),dataFolder:h.string().optional(),exportFile:h.string().optional().describe("Where an export goes by default (full path; your own settings only)"),categories:h.array(h.object({id:h.string(),label:h.string(),description:h.string()})),rows:h.array(qve)}),l3=Ge({id:"settings.list",title:"Settings",summary:"every setting with its value, by category",input:h.object({scope:ck.default("user")}),output:Kve,cli:{name:"config",action:"list",json:!0}}),EQ=Ge({id:"settings.get",title:"Get a setting",summary:"show one setting (secrets as ***)",input:h.object({key:s3}),output:h.object({key:h.string(),value:h.unknown()}),text:e=>typeof e.value=="string"?e.value:JSON.stringify(e.value,null,2),surfaces:{except:{menu:"Settings shows every value",web:"the Settings page shows every value"}},cli:{name:"config",action:"get",positional:["key"]}}),Xve=["attach.","resume."];function $Q(e){let t=e??{},r=typeof t.key=="string"?t.key:"";return(t.scope===void 0||t.scope==="user")&&Xve.some(o=>r.startsWith(o)&&r.length>o.length)?"control":"owner"}var Jn=_e({id:"settings.set",access:$Q,title:"Change a setting",summary:"change one setting (text is read like the command line: true/on, numbers, JSON)",input:h.object({scope:ck.default("user"),key:s3,value:h.unknown().describe("The new value")}),output:h.object({key:h.string(),changed:h.boolean(),message:h.string()}),text:e=>e.message,cli:{name:"config",action:"set",positional:["key","value"]}}),dk=_e({id:"settings.reset",access:$Q,title:"Reset a setting",summary:"put one setting back to its default (in a project file: remove it)",input:h.object({scope:ck.default("user"),key:s3}),output:h.object({key:h.string(),changed:h.boolean(),message:h.string()}),text:e=>e.message,cli:{name:"config",action:"reset",positional:["key"]}}),AQ=h.string().max(2e3).regex(/\.json$/i,"The file name should end in .json."),rb=_e({id:"settings.export",title:"Export settings\u2026",summary:"write the settings you changed to a .json file to share (no secrets, no data folder, no paths of this PC)",input:h.object({settingsFile:AQ.optional().describe("(export, import) the .json file; default sandbox-settings.json in the current folder"),withPaths:h.boolean().default(!1).describe("(export) keep folders and files of this PC in the file")}),output:h.object({file:h.string().describe("The file written (full path)"),leftOut:h.array(h.string()).describe('What was left out, one "<key> (<why>)" each'),pathsLeftOut:h.boolean().describe("A folder or file of this PC was left out (and --with-paths was not given)")}),text:e=>["Wrote "+e.file+" (only what differs from the defaults).",...e.leftOut.length?["Left out:",...e.leftOut.map(t=>" "+t)]:[],...e.pathsLeftOut?["Keep this PC's folders and files in the file with --with-paths."]:[]].join(`
125
+ `),cli:{name:"config",action:"export",positional:["settingsFile"],flags:{withPaths:{flag:"--with-paths"}}}}),ob=_e({id:"settings.import",title:"Import settings\u2026",summary:"read a shared settings file, show what it would change, and apply it after one yes",input:h.object({settingsFile:AQ.optional().describe("(export, import) the .json file")}),output:h.object({changed:h.number().describe("How many settings changed"),message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"config",action:"import",positional:["settingsFile"]}});function TQ(e,t){return{...as(new ha(e.input).child("settingsFile"),["settingsFile"]),label:t,optional:!1}}function Qve(e,t){let r=n=>K1(n,e.field,40).text;return["Setting "+e.id,"All projects "+r(e.yours)+(e.yoursSet?" (your file)":" (built-in default)"),"This project "+(e.inProject===void 0?"not set":r(e.inProject)),...t==="user"?["Default "+r(e.default)]:[],...t==="project"&&e.locked?["A project can only make this stricter than your own setting."]:[]]}function Yve(e,t){let r=t==="project"&&!e.set?"all projects: "+K1(e.yours,e.field,40).text:K1(e.value,e.field).text,n=e.field.kind==="secret"?"":e.value;return{id:e.id,label:e.label,hint:r,...e.set?{tone:t==="project"?"accent":"ok",badges:[{text:"changed",tone:"accent"}]}:{},description:e.field.help,group:e.section,details:Qve(e,t),keywords:e.id,code:e.id,cells:{setting:e.id,value:r},primary:le(Jn,{scope:t,key:e.id},{label:"Change",verb:"edit",inline:!0,fields:[{...e.field,name:"value",label:e.label}],initial:{value:n}}),actions:e.set?[le(dk,{scope:t,key:e.id},{label:t==="project"?"Remove":"Reset to default",verb:"reset",key:"r"})]:[]}}function Jve(e){return{id:"@data-folder",label:"Data folder",hint:e,cells:{setting:"storage.root",value:e},description:"Where your tools, logins, history and logs are kept between sandboxes. Move it with sandbox storage move <folder>.",primary:le(lh,{},{label:"Data folder",verb:"change"})}}function exe(e){let t=e.categories.map(r=>({id:r.id,title:r.label,description:r.description,columns:[{key:"setting",label:"SETTING"},{key:"value",label:"VALUE"}],columnsOn:"cli",items:[...e.rows.filter(n=>n.category===r.id).map(n=>Yve(n,e.scope)),...r.id==="general"&&e.dataFolder?[Jve(e.dataFolder)]:[]]}));return{title:"Settings",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only what a project may set; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:e.scope==="user"?[le(rb,{},{verb:"export",fields:[TQ(rb,"Where to write the settings file")],initial:{settingsFile:e.exportFile},description:"Write the settings you changed to a .json file you can share with a team. Secrets, the data folder and folders or files of this PC are left out."}),le(ob,{},{verb:"import",fields:[TQ(ob,"Which settings file")],description:"Read a settings file someone shared, see what it would change, and apply it once you say yes. Secrets, the data folder and paths in it are never taken."})]:[]}}var OQ=ct({id:"settings",title:"Settings",summary:"Every setting, for all projects or just this project, with its value, default and description.",queries:{settings:l3},operations:[Jn,dk,rb,ob,lh],pickers:[sh],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({settings:{scope:e.scope}}),build:({settings:e})=>exe(e)});var uk=h.enum(["user","project"]).describe("Your own settings (all projects) or this folder's .sandbox-config.json (this project)"),txe=[{id:"agents",label:"Agent add-ons",description:"Plug-ins for the agents: rtk and Headroom save tokens, claude-mem gives Claude a memory, ccusage reports token use, Playwright, Context7 and REA add MCP servers. Only your own settings turn them on (except REA).",members:["agents"]},{id:"editors",label:"Editors & docs",description:"Code and text editors (VS Code is on by default), plus diagrams and document conversion.",members:["editors","diagrams"]},{id:"clients",label:"DB & API clients",description:"GUIs for the sandbox databases, tools to send HTTP, REST and GraphQL requests, and to inspect traffic.",members:["databases","api","network"]},{id:"tools",label:"Git & utilities",description:"Git GUIs and terminal UIs, archives, file search and comparing, process tools, and decompilers.",members:["git","utilities","reversing"]},{id:"cli",label:"Command-line & cloud",description:"Small developer tools (JSON, search, builds, media ...) and tools for clouds and Kubernetes.",members:["cli","cloud"]},{id:"play",label:"Browsers & games",description:"Browsers for testing web apps, and game engines and editors (they draw with OpenGL on the CPU).",members:["browsers","gamedev"]}];var rxe=h.object({id:h.string().describe("The app"),name:h.string().describe("Its name"),about:h.string().describe("What it is for"),group:h.string().describe("The group it is listed under (APP_GROUPS id)"),size:h.string().describe("Its download size"),cli:h.boolean().describe("A command-line tool (on PATH), not a desktop app"),mesa:h.boolean().describe("Needs OpenGL on the CPU (Mesa)"),fullGitOnly:h.boolean().describe("Only with full git access"),plugsInto:h.string().optional().describe("Which agents an add-on plugs into, and how"),service:h.boolean().optional().describe("Started by the sandbox or the agent (a proxy, an MCP server)"),setting:h.string().optional().describe("The setting it stands for (VS Code, Windows Terminal)"),settingField:Zc.optional(),settingValue:h.unknown().optional(),installed:h.boolean().describe("Downloaded already into the data folder"),on:h.boolean().describe("Installed in every sandbox of this scope")}),oxe=h.object({id:h.string().describe("Its key in apps.custom"),name:h.string().describe("Its name"),from:h.string().describe('"From the latest <repo> release." or "From <url>"'),cli:h.boolean().describe("A command-line tool")}),nxe=h.object({scope:uk,file:h.string().describe("The file this scope edits"),exists:h.boolean().describe("The file exists already"),apps:h.array(rxe).describe("The catalogue entries this scope can change"),custom:h.array(oxe).describe("Your own programs (your own scope only)"),customValue:h.unknown().optional().describe("apps.custom as saved, to edit (your own scope only)"),customField:Zc.optional().describe("The Field of apps.custom (your own scope only)")}),c3=Ge({id:"apps.list",title:"Apps",summary:"the apps catalogue: what every sandbox installs",input:h.object({scope:uk.default("user")}),output:nxe,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),fk=_e({id:"apps.toggle",title:"Install in every sandbox",summary:"turn an app of the catalogue on or off for this scope",input:h.object({scope:uk.default("user"),id:h.string().max(100).describe("The app"),on:h.boolean().describe("Install it (true) or not (false)")}),output:h.object({message:h.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.install / apps.custom"}}}),mk=_e({id:"apps.setCustom",title:"Your own programs",summary:"change your own programs (apps.custom)",input:h.object({scope:uk.default("user"),value:h.unknown().describe("Programs of your own: a GitHub release or a download link, and the program to start.")}),output:h.object({message:h.string().describe("What changed")}),text:e=>e.message,surfaces:{except:{cli:"apps are settings: sandbox config set apps.custom"}}}),pk=_e({id:"apps.request",access:"control",title:"Request an app\u2026",summary:"open a prefilled GitHub request for an app that is not in the list",input:h.object({}),output:h.object({url:h.string().describe("The request page")}),text:e=>"Opened the request form in your browser: "+e.url,surfaces:{except:{cli:"a request is filed on GitHub; the address is in docs"}}});function ixe(e){return[...e.size!==""?[{label:"Download",text:"~"+e.size+" once, kept in C:\\AgentData\\tools\\"+(e.setting?"":"apps\\")+e.id+(e.installed?" (downloaded already)":"")},{label:"Starts",text:e.service?"by the sandbox or the agent (no shortcut, not on PATH)":e.cli?"from a terminal (on PATH)":"from the desktop or Start > Sandbox apps"}]:[],...e.plugsInto?[{label:"Plugs in",text:e.plugsInto}]:[],...e.mesa?[{label:"Graphics",text:"OpenGL on the CPU (Mesa) is added for it"}]:[],...e.fullGitOnly?[{label:"",text:"Needs full git access (Settings > Projects & setup > Git): it pushes with its own git.",warn:!0}]:[],...e.setting?[{label:"Setting",text:e.setting}]:[]]}function axe(e){return ixe(e).map(t=>(t.label?t.label.padEnd(10):"")+t.text)}function sxe(e){return{name:"on",key:["apps","install"],kind:"boolean",label:e.name,optional:!1}}function lxe(e,t){let r=e.setting&&e.settingField?le(Jn,{scope:"user",key:e.setting},{label:"Change",verb:"change",inline:!0,fields:[{...e.settingField,name:"value",label:e.name}],initial:{value:e.settingValue}}):le(fk,{scope:t,id:e.id},{label:e.on?"Turn off":"Turn on",verb:"tick",inline:!0,fields:[sxe(e)],initial:{on:e.on}});return{id:e.id,label:e.name,description:e.about,code:e.id,keywords:e.id,details:axe(e),...e.on?{tone:"ok"}:{},primary:r}}function cxe(e){return{id:"custom-"+e.id,label:e.name,description:e.from,hint:e.cli?"command line":"desktop",disabled:"Your own programs are always installed; change or remove them with Your own programs."}}function dxe(e){let t=txe.map(n=>({id:n.id,title:n.label,description:n.description,items:e.apps.filter(o=>o.group===n.id).map(o=>lxe(o,e.scope))})).filter(n=>(n.items?.length??0)>0);e.scope==="user"&&t.push({id:"custom",title:"Your own programs",description:"Programs you added yourself, from a GitHub release or a download link.",items:e.custom.map(cxe)});let r=e.scope==="user";return{title:"Apps",categories:!0,notice:{text:"Editing "+e.file+(e.exists?"":" (created when you save)")+(e.scope==="project"?": only apps from the list; needs your approval at the next launch":""),tone:e.scope==="project"?"accent":"muted"},sections:t,actions:r?[...e.customField?[le(mk,{scope:"user"},{key:"c",verb:"your own programs",fields:[{...e.customField,name:"value",label:"Your own programs"}],initial:{value:e.customValue}})]:[],le(pk,{},{key:"r",verb:"request an app"})]:[]}}var zQ=ct({id:"apps",title:"Apps",summary:"Tick the apps every sandbox should have. Each downloads once and is kept.",queries:{apps:c3},operations:[fk,mk,pk,Jn],tabs:{param:"scope",choices:[{value:"user",label:"All projects"},{value:"project",label:"This project"}]},inputs:e=>({apps:{scope:e.scope}}),build:({apps:e})=>dxe(e)});var $i={desktop:"desktop window",gpu:"GPU",clipboard:"clipboard",audio:"audio",video:"camera",printers:"printers",liveFolderAdd:"add folders while running",attachedDisks:"attached disks",multipleInstances:"several at once",hvsocket:"Hyper-V sockets"},uxe=Object.keys($i),fxe="see docs/design/engines.md",NQ=h.enum(["windows-sandbox","hcs"]).describe("The engine"),mxe=h.object({desktop:h.boolean().describe($i.desktop),gpu:h.boolean().describe($i.gpu),clipboard:h.boolean().describe($i.clipboard),audio:h.boolean().describe($i.audio),video:h.boolean().describe($i.video),printers:h.boolean().describe($i.printers),liveFolderAdd:h.boolean().describe($i.liveFolderAdd),attachedDisks:h.boolean().describe($i.attachedDisks),multipleInstances:h.boolean().describe($i.multipleInstances),hvsocket:h.boolean().describe($i.hvsocket)}),pxe=h.object({available:h.boolean().describe("This PC can run it"),reasons:h.array(h.string()).describe("Why not, in plain words"),fixes:h.array(h.string()).describe("The command that fixes each reason (never run for you)")}).describe("Whether this PC can run it"),FQ=h.object({id:NQ,inUse:h.boolean().describe("The setting sandbox.engine names it"),capabilities:mxe.describe("What it can do"),check:pxe}),hxe=h.object({engine:NQ.describe("The engine in use (the setting sandbox.engine)"),engines:h.array(FQ).describe("Every engine")});function gxe(e){if(e.check.available){let r=[e.id+" can be used on this PC."];return e.id==="hcs"&&r.push("HCS is in alpha: starting it is not enabled yet (docs/design/engines.md)."),r.join(`
126
+ `)}let t=[e.id+" cannot be used on this PC yet:"];return e.check.reasons.forEach((r,n)=>{t.push(""," "+(n+1)+". "+r," To fix: "+(e.check.fixes[n]??fxe))}),t.push("","Nothing was changed. These commands change Windows, so they are yours to run (or not)."),t.join(`
127
+ `)}var d3=Ge({id:"engine.status",title:"Engine",summary:"the engine in use and what each engine can do on this PC",input:h.object({}),output:hxe,cli:{name:"engine",action:"show",json:!0}}),LQ=Ge({id:"engine.check",title:"Check an engine",summary:"what this PC lacks for an engine, and the commands that would fix it",input:h.object({engine:h.string().default("hcs").describe("the engine to check")}),output:FQ,surfaces:{except:{menu:"the Engine category shows every engine and its check with the fixes (engine.status)",web:"the Engine page shows every engine and its check with the fixes (engine.status)"}},text:gxe,cli:{name:"engine",action:"check",positional:["engine"],json:!0,exitCode:e=>e.check.available?0:1}}),vxe=h.object({id:h.string().describe("The compute system"),kind:h.string().describe("Container or VirtualMachine (the utility VM)"),state:h.string().describe("What it is doing"),since:h.string().nullable().describe("When it was created (ISO time), when HCS says")}),xxe=h.object({available:h.boolean().describe("HCS could be asked"),message:h.string().describe("What was found, or why nothing is listed"),systems:h.array(vxe).describe("Ours that are running now")}),u3=Ge({id:"engine.leftovers",title:"HCS systems left running",summary:"list the HCS compute systems this tool left running (a crashed command can leave one up)",input:h.object({}),output:xxe,cli:{name:"engine",action:"leftovers",json:!0}}),hk=_e({id:"engine.clean",title:"Stop the leftover systems\u2026",summary:"stop the HCS compute systems this tool left running (frees their memory; nothing else is touched)",input:h.object({}),output:h.object({available:h.boolean().describe("HCS could be asked"),stopped:h.number().describe("How many were stopped"),failed:h.number().describe("How many could not be stopped"),message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"engine",action:"clean"}});function bxe(e){return{id:"leftover:"+e.id,label:e.id,hint:e.state+(e.since?" started "+_o(e.since):""),tone:"warn",details:["System "+e.id,"Kind "+e.kind,"State "+e.state,...e.since?["Created "+e.since]:[]]}}function yxe(e){return e.systems.length?[{id:"leftovers",title:"HCS systems left running",summary:Er(e.systems.length,"system")+" (they hold memory; a sandbox running on purpose is listed too)",items:e.systems.map(bxe),actions:[le(hk,{},{key:"x",verb:"stop them",importance:1})]}]:[]}function _xe(e){let t=uxe.map(n=>{let o=e.capabilities[n];return{id:n,label:$i[n],value:o?"yes":"no",...o?{}:{tone:"muted"}}}),r=[...e.check.reasons.map((n,o)=>({id:"reason:"+o,label:n,tone:"warn"})),...e.check.fixes.map((n,o)=>({id:"fix:"+o,label:"Fix: "+n}))];return{id:e.id,title:e.id+(e.id==="hcs"?" (alpha)":"")+(e.inUse?" (in use)":""),summary:e.check.available?"can be used on this PC":"cannot be used yet",facts:t,items:r}}function Ixe(e,t){return{title:"Engine",notice:{text:"Engine in use: "+e.engine+" (setting: sandbox.engine)"},sections:[...e.engines.map(_xe),...t?yxe(t):[]]}}var MQ=ct({id:"engine",title:"Engine",summary:"What runs your sandbox, and what each engine can do on this PC.",queries:{engines:d3,leftovers:u3},operations:[hk],build:({engines:e,leftovers:t})=>Ixe(e,t)});var jQ="sandbox doctor and sandbox repair are hand-written renderers of this run (lines redrawn in place, --json alone, repair before the settings load)",wxe=h.enum(["ok","fixed","needs-you","warn","skipped"]).describe("What the check found"),Sxe=h.object({id:h.string().describe("The check"),group:h.string().describe("Its heading (This PC, Install ...)"),name:h.string().describe("What was checked"),status:wxe,detail:h.string().describe("What was found"),means:h.string().optional().describe("What it means for you"),fix:h.string().optional().describe("What to do yourself"),plan:h.string().optional().describe("What repair would change"),lines:h.array(h.string()).optional().describe("More lines (a diff, folders)"),fixable:h.boolean().describe("Repair can mend it"),timedOut:h.boolean().optional().describe("It took too long"),applied:h.object({done:h.string(),before:h.string(),after:h.string()}).optional().describe("What a fix changed"),error:h.string().optional().describe("Why a fix did not work")}),UQ=h.object({total:h.number().describe("Checks that ran"),ok:h.number().describe("Checks that are fine"),fixed:h.number().describe("Problems repair fixed"),warn:h.number().describe("Warnings"),needsYou:h.number().describe("Problems you need to fix"),skipped:h.number().describe("Checks that did not run"),fixable:h.number().describe("Problems repair can still mend")}).describe("How many checks ended how"),kxe=h.object({name:h.string().describe("What was looked at"),status:h.enum(["ok","warn","action"]).describe("OK, a warning, or something to do"),detail:h.string().describe("What was found")}),Cxe=h.object({at:h.string().describe("When it ran (ISO time)"),mode:h.enum(["check","repair"]).describe("A check or a repair"),checks:h.array(Sxe).describe("The results"),summary:UQ,details:h.array(h.tuple([h.string(),h.string()])).describe("The doctor details: name and value"),setup:h.object({checks:h.array(kxe),canEnable:h.boolean().describe("Windows Sandbox can be turned on from here"),error:h.string().nullable().describe("Why the setup could not be read")}).nullable().describe("What sandbox setup found"),log:h.string().nullable().describe("The repair log, if one was written")});function VQ(e){return[e.ok+" ok",e.fixed&&e.fixed+" fixed",e.needsYou&&e.needsYou+" "+(e.needsYou===1?"needs":"need")+" you",e.warn&&e.warn+(e.warn===1?" warning":" warnings"),e.skipped&&e.skipped+" skipped"].filter(Boolean).join(", ")}var Pxe={ok:"[ok]",fixed:"[fixed]",warn:"[!]","needs-you":"[x]",skipped:"[-]"},ch={ok:void 0,fixed:"accent",warn:"warn","needs-you":"danger",skipped:"muted"},f3=6;function Dxe(e){let t={text:" "+Pxe[e.status]+" "+e.name+": "+e.detail+(e.timedOut?" (took too long)":""),...ch[e.status]?{tone:ch[e.status]}:{}};if(e.status==="ok")return[t];let r=[t];e.means&&r.push({text:" What it means: "+e.means}),e.fixable&&e.plan?r.push({text:" Fix: sandbox repair will "+e.plan}):e.fix&&r.push({text:" Fix: "+e.fix});let n=e.lines??[];for(let o of n.slice(0,f3))r.push({text:" "+o});return n.length>f3&&r.push({text:" ... and "+(n.length-f3)+" more"}),r}var BQ={ok:"OK",fixed:"FIXED","needs-you":"NEEDS YOU",warn:"WARNING",skipped:"SKIPPED"};function Rxe(e,t){return e.length<=t?e:e.slice(0,t-1)+"\u2026"}var HQ=h.object({summary:UQ,changed:h.boolean().describe("Fixes were applied"),log:h.string().nullable().describe("The repair log, if one was written")}),m3=Ge({id:"health.last",title:"Health",summary:"the last check or repair of this PC and the sandbox",input:h.object({}),output:h.object({last:Cxe.nullable().describe("Nothing yet: no check has run")}),surfaces:{except:{cli:"the command line prints results as it checks (sandbox doctor)"}}}),nb=_e({id:"health.check",access:"control",title:"Check this PC",summary:"check this PC, the install, your settings and the sandbox (changes nothing)",input:h.object({harness:h.string().optional().describe("agent to check")}),output:HQ,text:e=>"Summary: "+VQ(e.summary),surfaces:{except:{cli:jQ}}}),ib=_e({id:"health.repair",title:"Run the checks and fix what can be fixed",summary:"find and fix problems (install, data folder, settings, stale state, half-installed tools)",input:h.object({}),output:HQ,danger:!0,text:e=>"Summary: "+VQ(e.summary)+(e.log?". Log: "+e.log:". No log was written (the storage folder does not exist yet)."),surfaces:{except:{cli:jQ}}}),gk=_e({id:"health.enableSandbox",title:"Turn on Windows Sandbox",summary:"turn on the Windows Sandbox feature (Windows asks for admin permission; restart to finish)",input:h.object({}),output:h.object({message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,surfaces:{except:{cli:"sandbox setup asks and turns it on (hand-written: it also offers to restart Windows)",web:"Windows asks for admin permission on this PC; use the menu or sandbox setup"}}});function Txe(e){return e.checks.map((t,r)=>{let n=t.detail+(t.timedOut?" (took too long)":""),o=Dxe(t).slice(1).map(a=>a.text.trim()).filter(a=>!a.startsWith("What it means: ")),i=t.status==="ok"?[]:["Found: "+n,...o];return{id:"repair:"+r,label:t.name,hint:BQ[t.status],...ch[t.status]?{tone:ch[t.status]}:{},badges:[{text:BQ[t.status],...ch[t.status]?{tone:ch[t.status]}:{}}],description:t.means??(i.length?void 0:n),...i.length?{details:i}:{}}})}var Exe={ok:"OK",warn:"WARNING",action:"NEEDS YOU"};function $xe(e){let t=e.last,r=le(nb,{},{verb:"check"}),n=le(ib,{},{verb:"check and fix"});if(!t)return{title:"Health",sections:[{id:"doctor",title:"Doctor",cards:!0,items:[{id:"health:check",label:"Check this PC",description:"Looks at this PC: Windows features, the install, the folders and the sandbox. It takes a few seconds, so it only runs when you ask.",primary:r}]},{id:"repair",title:"Repair",cards:!0,items:[{id:"repair:run",label:"Run the checks and fix what can be fixed",description:"Checks the install, data folder, settings and sandbox, lists what it would change, and asks before it fixes anything.",primary:n}]}]};let o=!!t.setup?.canEnable,i=[{id:"status",summary:(t.mode==="repair"?"Last repair ":"Last check ")+_o(t.at),...t.log?{notes:[{text:"Log: "+t.log,tone:"muted"}]}:{}},{id:"doctor",title:"Doctor",items:t.details.map(([a,s],l)=>({id:"doctor:"+l,label:a,hint:Rxe(s,50),...s.length>50?{description:s}:{}}))},{id:"repair",title:"Repair",items:Txe(t)}];if(t.setup){let a=t.setup;i.push({id:"setup",title:"Set up this PC",items:a.error?[{id:"setup:error",label:a.error}]:a.checks.map((s,l)=>({id:"setup:"+l,label:s.name,hint:s.detail,tone:s.status==="ok"?"ok":s.status==="warn"?"warn":"danger",badges:[{text:Exe[s.status],tone:s.status==="ok"?"ok":s.status==="warn"?"warn":"danger"}]})),notes:o?[{text:"Turn Windows Sandbox on from the menu or with sandbox setup.",tone:"muted",only:"web"}]:[]})}return{title:"Health",sections:i,actions:[le(ib,{},{key:"f",verb:"check and fix",importance:1}),le(nb,{},{key:"l",verb:t?"check again":"check",importance:2}),...o?[le(gk,{},{key:"e",verb:"turn on Windows Sandbox",importance:3})]:[]]}}var WQ=ct({id:"health",title:"Health",summary:"Checks this PC and your settings, repairs problems, and sets up Windows Sandbox.",queries:{last:m3},operations:[nb,ib,gk],build:({last:e})=>$xe(e)});var ZQ=["tools","databases","state","logs","data","host"],Axe={tools:"Toolchains",databases:"Databases",state:"Agent state",logs:"Logs",data:"Other",host:"On this PC"},Oxe=h.object({area:h.enum(ZQ).describe("Which kind of data it is"),name:h.string().describe("The folder as listed (tools: its name; others: area/name)"),path:h.string().describe("Its full path on this PC"),bytes:h.number().describe("Its size in bytes (links count 0)"),size:h.string().describe("Its size in words, e.g. 1.5 KB"),target:h.string().nullable().describe("What sandbox data clean calls it; null when it is kept on purpose")}),zxe=h.object({drive:h.string().describe("The drive, e.g. C:\\"),totalBytes:h.number().describe("Its size in bytes"),freeBytes:h.number().describe("Free bytes"),usedBytes:h.number().describe("Used bytes"),holdsStorage:h.boolean().describe("The sandbox keeps its files on this drive"),used:h.string().describe("Used, in words"),usedPercent:h.number().describe("Used, in percent of the size (rounded)"),free:h.string().describe("Free, in words"),total:h.string().describe("Size, in words")}),Nxe=h.object({dataPath:h.string().describe("The data folder (C:\\AgentData inside the sandbox)"),storageRoot:h.string().describe("The storage folder that holds it"),totalBytes:h.number().describe("Everything listed, in bytes"),total:h.string().describe("Everything listed, in words"),storageShare:h.string().describe('"<- sandbox storage (<total> of it)": the note on the storage drive'),areaTotals:h.record(h.string(),h.string()).describe("Each area's total in words"),entries:h.array(Oxe).describe("What is stored, by area, biggest first"),disks:h.array(zxe).describe("This PC's drives")}),p3=Ge({id:"data.show",title:"Stored data",summary:"show what is kept between sandboxes (tools, databases, logins, logs), or delete some of it",input:h.object({}),output:Nxe,cli:{name:"data",action:"show",json:!0,shapeJson:e=>({dataPath:e.dataPath,storageRoot:e.storageRoot,totalBytes:e.totalBytes,entries:e.entries.map(({area:t,name:r,path:n,bytes:o})=>({area:t,name:r,path:n,bytes:o})),disks:e.disks.map(({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i})=>({drive:t,totalBytes:r,freeBytes:n,usedBytes:o,holdsStorage:i}))})}}),GQ=h.object({message:h.string().describe("What happened")}),vk=_e({id:"data.clean",title:"Delete stored data\u2026",summary:"delete chosen parts of what is kept between sandboxes",input:h.object({targets:h.array(h.string()).default([]).describe("what to clean, e.g. tools/go databases logs")}),output:GQ.extend({freedBytes:h.number().describe("Bytes freed (0 when nothing was removed)")}),danger:!0,text:e=>e.message,next:e=>e.freedBytes>0?"sandbox data (see what is left)":void 0,cli:{name:"data",action:"clean",positional:["targets"]}}),qQ=h.object({days:h.number().int().min(1).default(7).describe("launch folders older than this many days")}),xk=_e({id:"data.prune",title:"Clean up\u2026",summary:"delete old launch folders, logs and leftovers",input:qQ,output:GQ.extend({removed:h.boolean().describe("Something was deleted")}),text:e=>e.message,next:e=>e.removed?"sandbox data (see what else is saved, and clean it)":void 0,cli:{name:"clean",group:"Data",flags:{days:{flag:"--days",value:"n"}},yes:"do not ask before deleting"}}),Fxe=as(new ha(qQ).child("days"),["days"]);function Lxe(e){let t={id:"disks",title:"Disks",columns:[{key:"drive",label:"DRIVE"},{key:"used",label:"USED"},{key:"free",label:"FREE"},{key:"size",label:"SIZE"},{key:"note",label:""}],columnsOn:"cli",items:e.disks.map(i=>({id:"disk:"+i.drive,label:i.drive,hint:i.used+" used \xB7 "+i.free+" free of "+i.total,...i.holdsStorage?{description:"The sandbox keeps its files on this drive."}:{},cells:{drive:i.drive,used:i.used+" ("+i.usedPercent+"%)",free:i.free,size:i.total,note:i.holdsStorage?e.storageShare:""}})),notes:[{text:"Persistent data for the sandbox: "+e.dataPath+" (C:\\AgentData inside)"}]},r=i=>ZQ.indexOf(i),n=[...e.entries].sort((i,a)=>r(i.area)-r(a.area)||a.bytes-i.bytes),o={id:"kept",title:"What the sandbox keeps",summary:e.total+" in all",columns:[{key:"kind",label:"KIND"},{key:"name",label:"NAME"},{key:"size",label:"SIZE"},{key:"folder",label:"FOLDER"}],items:n.map(i=>{let a=i.target?le(vk,{targets:[i.target]},{label:"Delete",key:"x",verb:"delete"}):void 0;return{id:"entry:"+i.name,label:i.name,hint:i.size,cells:{kind:Axe[i.area],name:i.name,size:i.size,folder:i.path},...a?{primary:a}:{}}}),actions:[le(xk,{},{label:"Clean up\u2026",verb:"choose what",description:"Delete caches, old sandboxes and other leftovers (the clean command, with its options).",fields:[Fxe]})],notes:[...e.entries.length?[]:[{text:"Nothing stored yet. Toolchains, databases and agent logins appear here after the first start."}],...Mxe(e),{text:"Free space with: sandbox data clean <target...> (e.g. tools/go, databases/postgres-18, logs, launches)",tone:"muted",only:"cli"}]};return{title:"Data",sections:[t,o]}}function Mxe(e){let t=e.entries.filter(r=>!r.target).map(r=>r.name);return t.length?[{text:"Kept on this PC on purpose, not deleted here: "+t.join(", ")+"."}]:[]}var KQ=ct({id:"data",title:"Data",summary:"What the sandbox keeps between runs, and deleting parts of it.",queries:{data:p3},operations:[vk,xk],build:({data:e})=>Lxe(e)});var Bxe=h.object({name:h.string().describe("The project"),host:h.string().describe("Its folder on this PC"),guest:h.string().describe("Its folder in the sandbox"),mechanism:h.string().describe("How it got into the sandbox (launch, root, boot, wsb or hcs)"),here:h.boolean().describe("The project of the current folder"),setup:h.object({phase:h.string(),message:h.string()}).describe("How far its setup is"),databases:h.array(h.object({database:h.string(),port:h.number(),state:h.string()})),sessions:h.array(h.object({id:h.string(),harness:h.string(),viewers:h.string(),started:h.string()})),repoGuard:h.array(h.string()).describe("Repo guard findings in its folder")}),jxe=h.object({running:h.boolean().describe("A Windows Sandbox is running"),phase:h.string().describe("What it is doing (ready, provisioning ...)"),message:h.string().optional().describe("Its last message"),headless:h.boolean().optional().describe("Its window is hidden"),startedAt:h.number().nullable().describe("When it started (ms), if known"),daemon:h.string().describe("The sandbox helper's answer"),account:h.string().nullable().describe("The Claude login it uses"),syncWatcher:h.boolean().describe("The background history sync runs")}),Uxe=h.object({shared:h.object({line:h.string().describe('"Running, started by alice (shared with you)"'),limited:h.boolean().describe("Not shared with you: nothing more is shown"),startedBy:h.string().nullable().describe("Whose it is")}).optional(),sandbox:jxe,here:h.object({folder:h.string(),project:h.string().nullable(),guest:h.string().nullable()}),roots:h.array(h.object({host:h.string(),guest:h.string()})),projects:h.array(Bxe),otherSessions:h.array(h.object({id:h.string(),harness:h.string(),cwd:h.string()})),repoGuard:h.object({guarded:h.number(),findings:h.array(h.string())})}),XQ=h.object({message:h.string().describe("What happened")});function QQ(e){return e.running&&e.startedAt?_o(e.startedAt).replace(" ago",""):null}var h3=Ge({id:"sandbox.status",title:"Sandbox status",summary:"show what the sandbox is doing",input:h.object({}),output:Uxe,live:{everyMs:2500},cli:{name:"status",group:"Sessions",json:!0,shapeJson:e=>{if(e.shared?.limited)return{sandbox:{running:!0,shared:!1,startedBy:e.shared.startedBy}};let t=e.sandbox;return{sandbox:{...e.shared?.startedBy?{startedBy:e.shared.startedBy,shared:!0}:{},running:t.running,phase:t.phase,message:t.message,headless:t.headless,uptime:QQ(t),daemon:t.daemon,account:t.account,syncWatcher:t.syncWatcher},here:e.here,roots:e.roots,projects:e.projects,otherSessions:e.otherSessions,repoGuard:e.repoGuard}}}}),bk=_e({id:"sandbox.showWindow",access:"control",title:"Show the window",summary:"show the sandbox window",input:h.object({}),output:XQ,text:e=>e.message,cli:{name:"show",group:"Sessions"}}),yk=_e({id:"sandbox.hideWindow",access:"control",title:"Hide the window",summary:"hide the sandbox window (it keeps running)",input:h.object({}),output:XQ,text:e=>e.message,cli:{name:"hide",group:"Sessions"}}),_k=_e({id:"sandbox.stop",access:"control",title:"Stop the sandbox\u2026",summary:"shut the sandbox down (every project's sessions end)",input:h.object({}),output:h.object({stopped:h.boolean().describe("It was asked to shut down"),message:h.string()}),danger:!0,text:e=>e.message,cli:{name:"stop",group:"Agents",yes:"do not ask when other projects' sessions would end"}}),Vxe={launch:"started from here",root:"in a project root",boot:"mapped at start",wsb:"wsb share",hcs:"live folder through HCS, alpha"};function Hxe(e){return{id:"project:"+e.name,label:e.name,icon:"project",hint:e.host+" -> "+e.guest+" ("+(Vxe[e.mechanism]??"wsb share")+")",marked:e.here,details:["Setup: "+e.setup.phase+(e.setup.phase==="ready"?"":" - "+e.setup.message),...e.databases.length?["Databases: "+e.databases.map(t=>t.database+" :"+t.port+" "+t.state).join(", ")]:[],...e.sessions.map(t=>"Session: "+t.harness+" "+t.id+", "+t.viewers+", started "+_o(t.started)),...e.repoGuard.map(t=>"Guard: "+t)]}}function Wxe(e){let t=e.sandbox,r=e.projects.reduce((o,i)=>o+i.sessions.length,0)+e.otherSessions.length,n=(o,i,a,s={})=>({id:o,label:i,value:a,...s});return[...e.shared?.startedBy?[n("owner","Started by",e.shared.startedBy)]:[],n("state","State",t.running?t.message||t.phase:"not running",{tone:t.running?t.phase==="ready"?"ok":"warn":"muted"}),...t.running?[n("window","Window",t.headless?"hidden (sandbox show opens it)":"shown"),n("uptime","Uptime",QQ(t)??"-"),n("helper","Helper",t.daemon==="-"?"-":t.daemon.startsWith("pong")?"Responding":t.daemon),n("sessions","Sessions",String(r))]:[],n("account","Account",t.account??"none selected (sandbox account use)"),n("sync","Background sync",t.syncWatcher?"on":"off")]}function Zxe(e){let t=e.roots.map(n=>({id:"root:"+n.host,label:"root",icon:"folder",hint:n.host+" -> "+n.guest+" (every project in it opens without a restart)"})),r=e.projects.some(n=>n.here);return{id:"projects",title:"Projects",items:[...e.projects.map(Hxe),...t],notes:[r?{text:"* = the project of this folder",tone:"muted"}:{text:e.here.folder+" is not in this sandbox (start it here: sandbox claude)",tone:"muted"}]}}function Gxe(e){let t=e.repoGuard.findings;return{id:"guard",title:"Repo guard",summary:"Watching "+Er(e.repoGuard.guarded,"folder")+". "+(t.length?Er(t.length,"change")+" from the sandbox were blocked:":"Nothing from the sandbox needed blocking."),items:t.slice(-10).map((r,n)=>({id:"guard:"+n,label:r,tone:"warn"}))}}function qxe(e){let t=e.shared?{text:e.shared.line+(e.shared.limited?"":". Its window is on their desktop; use its agents here."),tone:"accent"}:void 0;if(e.shared?.limited)return{title:"Sandbox",notice:t,sections:[]};let r=e.sandbox.running,n={id:"status",title:"Status",facts:Wxe(e),actions:r?[e.sandbox.headless?le(bk,{},{key:"w",verb:"show",importance:3}):le(yk,{},{key:"h",verb:"hide",importance:3}),le(_k,{},{key:"x",verb:"stop",importance:1})]:[]},o={id:"other-sessions",title:"Other sessions",items:e.otherSessions.map(i=>({id:"session:"+i.id,label:"session "+i.id,hint:i.harness+" "+i.cwd}))};return{title:"Sandbox",notice:t,sections:[n,...r?[Zxe(e)]:[],...o.items?.length?[o]:[],Gxe(e)]}}var YQ=ct({id:"sandbox",title:"Sandbox",summary:"Status, projects and controls of the running sandbox.",queries:{status:h3},operations:[bk,yk,_k],build:({status:e})=>qxe(e)});var Kxe=h.object({folder:h.string().describe("The project folder on this PC"),here:h.boolean().describe("The folder you are in is inside it"),known:h.boolean().describe("Started with this tool before"),root:h.string().nullable().describe("The project root it is in, if any"),excluded:h.boolean().describe("Excluded from the projects mapped at every start"),mappedAtStart:h.boolean().describe("Mapped at every start"),running:h.string().nullable().describe("Its name and how it got into the running sandbox, if it is there")}),Xxe=h.object({all:h.boolean().describe("Every project is mapped at every start (except excluded ones)"),roots:h.array(h.string()).describe("Folders of projects, each opened without a restart"),exclude:h.array(h.string()).describe("Folders left out of the projects mapped at every start"),projects:h.array(Kxe).describe("Every project worth listing")}),dh=h.object({message:h.string().describe("What happened")}),Ik=e=>h.string().optional().describe(e+" (. = this folder; asked when left out)"),g3=Ge({id:"projects.list",title:"Projects",summary:"list your projects, roots and the all-projects setting",input:h.object({}),output:Xxe,cli:{name:"projects",action:"list",json:!0}}),wk=_e({id:"projects.choose",title:"Choose the projects mapped at every start\u2026",summary:"tick the projects mapped at every start; the rest are excluded",input:h.object({}),output:dh,text:e=>e.message,cli:{name:"projects",action:"choose"}}),ab=_e({id:"projects.add",title:"Add a project\u2026",summary:"remember a project folder",input:h.object({projectFolder:Ik("The project folder")}),output:h.object({message:h.string().describe("What happened"),next:h.string().optional().describe("What to do next, when mapping all projects is off")}),text:e=>e.next?e.message+`
128
+ `+e.next:e.message,cli:{name:"projects",action:"add",positional:["projectFolder"]}}),Sk=_e({id:"projects.remove",title:"Forget project",summary:"forget a project (nothing in the folder is touched)",input:h.object({projectFolder:Ik("The project folder")}),output:dh,danger:!0,text:e=>e.message,cli:{name:"projects",action:"remove",positional:["projectFolder"]}}),kk=_e({id:"projects.include",title:"Include",summary:"map a project at every start again",input:h.object({projectFolder:Ik("The project folder")}),output:dh,text:e=>e.message,cli:{name:"projects",action:"include",positional:["projectFolder"]}}),Ck=_e({id:"projects.exclude",title:"Exclude",summary:"leave a project out of the projects mapped at every start",input:h.object({projectFolder:Ik("The project folder")}),output:dh,text:e=>e.message,cli:{name:"projects",action:"exclude",positional:["projectFolder"]}}),Pk=_e({id:"projects.all",title:"Map all projects at every start",summary:"map every project at every start, or not",input:h.object({state:h.enum(["on","off"]).optional().describe("on or off (left out: say which it is)")}),output:dh,text:e=>e.message,cli:{name:"projects",action:"all",positional:["state"]}}),Xu=_e({id:"projects.roots",title:"Project roots",summary:"list, add or remove project roots",input:h.object({change:h.enum(["list","add","remove"]).default("list").describe("list, add or remove"),rootFolder:h.string().optional().describe("(add, remove) the folder that holds your projects")}),output:dh,text:e=>e.message,cli:{name:"projects",action:"roots",positional:["change","rootFolder"]}}),JQ=q1(Xu.input).find(e=>e.name==="rootFolder"),Qxe=q1(ab.input).find(e=>e.name==="projectFolder"),Yxe="Every project in this folder (also new ones) opens without a restart.";function eY(e){return e.root?"root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"}function Jxe(e){return{id:"project:"+e.folder,label:e.folder,marked:e.here,icon:"project",hint:e.running??(e.root?"in a root":e.excluded?"excluded":e.mappedAtStart?"mapped":"-"),description:e.here?"This is the folder you started the menu in.":void 0,details:["At start: "+eY(e),"In the sandbox: "+(e.running??"not open")],cells:{here:e.here?"*":"",folder:e.folder,atStart:eY(e),running:e.running??"-"},actions:[le(Sk,{projectFolder:e.folder},{key:"f",verb:"forget project",importance:1}),e.excluded?le(kk,{projectFolder:e.folder}):le(Ck,{projectFolder:e.folder})]}}function ebe(e){return{id:"root:"+e,label:e,hint:"root",icon:"folder",description:Yxe,keys:"f removes the root.",actions:[le(Xu,{change:"remove",rootFolder:e},{label:"Remove the root",key:"f",verb:"remove root",importance:1})]}}function tbe(e){let t={id:"settings",facts:[{id:"all",label:"All projects",value:e.all?"on (every project below is mapped at every start, except excluded ones)":"off"},{id:"roots",label:"Roots",value:e.roots.length?e.roots.join(", "):"none (sandbox projects roots add <folder>)"}],actions:[le(Pk,{state:e.all?"off":"on"},{label:e.all?"Stop mapping all projects":"Map all projects at every start"})],notes:[{text:"sandbox projects all on|off",tone:"muted",only:"cli"}]},r={id:"roots",title:"Project roots",items:[{id:"@add-root",label:"+ Add a project root\u2026",description:"Pick a folder that holds your projects: every project in it (also new ones) opens without a restart.",primary:le(Xu,{change:"add"},{label:"Choose the folder\u2026",verb:"choose folder",fields:[JQ]})},...e.roots.map(ebe)]},n={id:"projects",title:"Projects",columns:[{key:"here",label:""},{key:"folder",label:"FOLDER"},{key:"atStart",label:"AT START"},{key:"running",label:"RUNNING SANDBOX"}],columnsOn:"cli",items:e.projects.map(Jxe),notes:e.projects.length===0?[{text:"No projects yet: start one with sandbox claude in its folder.",tone:"muted"}]:[{text:"* = this folder. Choose with: sandbox projects choose",tone:"muted",only:"cli"}]};return{title:"Projects",sections:[t,r,n],actions:[le(wk,{},{label:"Choose\u2026"}),le(ab,{},{fields:[Qxe]}),le(Xu,{change:"add"},{label:"Add a project root\u2026",key:"a",verb:"add root",importance:1,fields:[JQ]})]}}var tY=ct({id:"projects",title:"Projects",summary:"The projects a sandbox opens without a restart: roots, your projects, all or chosen.",queries:{projects:g3},operations:[wk,ab,Sk,kk,Ck,Pk,Xu],build:({projects:e})=>tbe(e)});var Dk="@crash",rbe=1e3,oY="sandbox logs is hand-written: --follow prints new lines until Ctrl+C; it reads this same query (readQuery)",obe=h.object({name:h.string().describe("The log file"),path:h.string().describe("Where it is on this PC"),bytes:h.number().describe("Its size in bytes"),modified:h.number().describe("When it was last written (ms)")}),nbe=h.object({folder:h.string().describe("The folder the logs are in"),files:h.array(obe).describe("The log files, newest first"),crash:h.boolean().describe("A crash report exists")}),ibe=h.object({name:h.string().describe("The log shown, or @crash for the last crash report (empty: there are no logs)"),file:h.string().describe("Its full path (empty: there are no logs)"),text:h.string().describe("The text read, made safe for a terminal"),next:h.number().describe("Where to read on from next time (bytes)")}),v3=Ge({id:"logs.list",title:"Logs",summary:"list the sandbox's own logs",input:h.object({}),output:nbe,surfaces:{except:{cli:oY}}}),x3=Ge({id:"logs.tail",title:"Log",summary:"the end of one log, followed as it grows",input:h.object({name:h.string().max(200).optional().describe("The log to show (default: the newest), or @crash for the last crash report"),from:h.number().int().min(0).default(0).describe("Read on from this byte (0: the end of the log)"),lines:h.number().int().min(1).max(1e3).default(120).describe("How many lines of the end to show")}),output:ibe,live:{everyMs:1e3},surfaces:{except:{cli:oY}}}),rY={text:"showing",tone:"accent"};function abe(e){let t=e.split(`
129
+ `);return t.length&&t[t.length-1]===""&&t.pop(),t.slice(-rbe)}function sbe(e,t){let r=t?.file?t:void 0,n=e.files.map(i=>({id:"log:"+i.name,label:i.name,hint:Ku(i.bytes)+" "+_o(i.modified),keys:"Enter shows the end of this log in the terminal.",primary:On({kind:"view",view:"logs",params:{name:i.name}},"Show",{verb:"show"}),...r?.name===i.name?{badges:[rY]}:{}}));e.crash&&n.push({id:"log:"+Dk,label:"Last crash report",description:"What Windows logged, this PC and the sandbox memory when the sandbox last ended in a crash.",primary:On({kind:"view",view:"logs",params:{name:Dk}},"Show",{verb:"show"}),...r?.name===Dk?{badges:[rY]}:{}});let o=r?[{id:"tail",title:r.name===Dk?"Last crash report":r.name,summary:r.file,text:abe(r.text)}]:[];return{title:"Logs",sections:[{id:"files",items:n},...o],actions:[On({kind:"command",argv:["logs","--follow"]},"Follow the newest log",{key:"f",verb:"follow in the terminal",importance:2})],empty:{title:"No logs yet",text:"Logs appear after the first start.",cliText:"No sandbox logs yet."}}}var nY=ct({id:"logs",title:"Logs",summary:"The sandbox's own logs: pick one to see its end as it grows.",queries:{files:v3,tail:x3},operations:[],params:["name"],inputs:e=>({tail:e.name?{name:e.name}:{}}),build:({files:e,tail:t})=>sbe(e,t)});var lbe=["proc","file","commit","session","guard","note","remote"],I3=["all","proc","file","commit","session","guard","remote"],iY=[1,3,7,14,30],Rk="none",cbe=240,dbe={proc:"command",file:"file",commit:"commit",session:"session",guard:"GUARD",note:"note",remote:"remote"},ube=h.object({time:h.string().describe("When it happened (ISO time)"),kind:h.enum(lbe).describe("proc: a program started; file: changed in a project; commit; session; guard: the repo guard; note; remote: what another Windows user or a paired device did in the web UI"),what:h.string().describe("The program, the file, the commit message, the agent, or what happened"),command:h.string().optional().describe("A program's command line (secrets hidden)"),parent:h.string().optional().describe("The program that started it"),action:h.string().optional().describe("file: change or rename; session: start or end; commit: commit, amend, merge, cherry-pick ..."),folder:h.string().optional().describe("The project folder on this PC"),project:h.string().optional().describe("The project"),session:h.string().optional().describe("The agent session it belongs to (missing: not known)"),agent:h.string().optional().describe("That session's agent"),linked:h.enum(["process","only-session"]).optional().describe("How it was linked: process = by the programs the session started; only-session = the only session running in that project then (likely, not proven)"),count:h.number().int().describe("How many times it happened in that minute"),sha:h.string().optional().describe("A commit's id"),author:h.string().optional().describe("A commit's author; for remote: who did it")}),Tk=h.object({commands:h.number().int().describe("Programs started"),files:h.number().int().describe("Files changed (each file once)"),commits:h.number().int().describe("Commits")}),fbe=Tk.extend({id:h.string().describe("The session"),agent:h.string().describe("Its agent"),project:h.string().describe("Its project"),started:h.string().describe("Its first event (ISO time)"),ended:h.string().optional().describe("When it ended, if that was recorded"),last:h.string().optional().describe("The last command it ran")}),mbe=Tk.extend({agent:h.string().describe("The agent"),sessions:h.number().int().describe("Its sessions")}),pbe=h.object({enabled:h.boolean().describe("The audit log is on (audit.enabled)"),keepDays:h.number().int().describe("Days it is kept (audit.days)"),maxMb:h.number().int().describe("Most space it may take (audit.maxMb)"),bytes:h.number().describe("Space it takes now"),folder:h.string().describe("Where it is on this PC"),filter:h.object({days:h.number().int(),kind:h.enum(I3),session:h.string().optional(),agent:h.string().optional(),project:h.string().optional(),grep:h.string().optional()}),matched:h.number().int(),events:h.array(ube).describe("The events, newest first"),totals:Tk.extend({events:h.number().int(),sessions:h.number().int()}),agents:h.array(mbe),sessions:h.array(fbe).describe("The sessions in the period, newest first"),unlinked:Tk}),w3=Ge({id:"audit.list",title:"Activity",summary:"what your agents did: programs started, files changed, commits, sessions, repo guard",input:h.object({days:h.number().int().min(1).max(30).default(1).describe("the last n days (1: the last 24 hours)"),kind:h.enum(I3).default("all").describe("only proc, file, commit, session or guard events"),session:h.string().max(64).optional().describe("only the events of this session (its id or the start of it; none: not linked to a session)"),agent:h.string().max(64).optional().describe("only this agent's events"),project:h.string().max(128).optional().describe("only this project's events"),grep:h.string().max(200).optional().describe("only events containing this text"),limit:h.number().int().min(1).max(5e3).default(300).describe("show at most this many events (the newest)")}),output:pbe,live:{everyMs:15e3},cli:{name:"audit",group:"Health",json:!0,flags:{days:{flag:"--days",value:"n"},kind:{flag:"--kind",value:"kind"},session:{flag:"--session",value:"id"},agent:{flag:"--agent",value:"name"},project:{flag:"--project",value:"name"},grep:{flag:"--grep",value:"text"},limit:{flag:"--limit",value:"n",advanced:!0}},shapeJson:e=>[...e.events].reverse(),examples:["sandbox audit --days 7 --kind commit",'sandbox audit --session 4f2c --grep "git push"']}});function y3(e,t=Date.now()){let r=new Date(e);if(Number.isNaN(r.getTime()))return e;let n=a=>String(a).padStart(2,"0");return new Date(t).toDateString()===r.toDateString()?n(r.getHours())+":"+n(r.getMinutes())+":"+n(r.getSeconds()):["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r.getMonth()]+" "+r.getDate()+" "+n(r.getHours())+":"+n(r.getMinutes())}function sY(e){return e.slice(0,8)}function hbe(e){switch(e.kind){case"proc":return e.command||e.what;case"file":return(e.action==="rename"?"added/removed ":"changed ")+e.what;case"commit":return(e.sha?e.sha.slice(0,7)+" ":"")+e.what+(e.action&&e.action!=="commit"?" ("+e.action+")":"");case"session":return e.what+(e.action==="end"?" ended":" started")+(e.project?" in "+e.project:"");case"remote":return(e.author??"someone")+": "+e.what+(e.action&&e.action!=="ok"?" ("+e.action+")":"");default:return e.what}}function aY(e){return e.agent?e.agent+(e.linked==="only-session"?"?":""):"-"}function _3(e,t=cbe){return e.length>t?e.slice(0,t-1)+"\u2026":e}function gbe(e,t){let r=hbe(e)+(e.count>1?" \xD7"+e.count:""),n=[...e.session?["Session "+e.session+(e.linked==="only-session"?" (likely)":"")]:[],...e.project?["Project "+e.project]:[],...e.kind==="proc"&&e.command&&e.what!==e.command?["Program "+e.what]:[],...e.parent?["Started by "+e.parent]:[],...e.author?["Author "+e.author]:[],...e.sha?["Commit "+e.sha]:[],...e.folder&&e.kind!=="session"?["Folder "+e.folder]:[]];return{id:"event:"+t,label:_3(r),hint:y3(e.time)+" "+aY(e),tone:e.kind==="guard"?"warn":void 0,details:n,keywords:[e.session,e.project,e.agent,e.kind,e.author].filter(Boolean).join(" "),cells:{time:y3(e.time),agent:aY(e),kind:dbe[e.kind],what:_3(r)}}}function S3(e,t){return{days:String(e.filter.days),kind:e.filter.kind,...t}}function lY(e){return Er(e.commands,"command")+", "+Er(e.files,"file")+", "+Er(e.commits,"commit")}function vbe(e,t){return{id:"session:"+t.id,label:t.agent+" "+t.project,icon:t.agent,hint:"started "+_o(t.started)+(t.ended?", ended "+_o(t.ended):""),badges:[...t.commits?[{text:Er(t.commits,"commit"),tone:"accent"}]:[],...t.ended?[{text:"ended",tone:"muted"}]:[]],details:["Did "+lY(t),...t.last?["Last "+_3(t.last,120)]:[],"Session "+t.id],keywords:t.id,cells:{session:sY(t.id),agent:t.agent,project:t.project,started:y3(t.started),commands:String(t.commands),files:String(t.files),commits:String(t.commits)},primary:On({kind:"view",view:"audit",params:S3(e,{session:t.id})},"Show",{verb:"show",description:"Only what this session did."})}}function xbe(e){let t=e.unlinked;return{id:"session:"+Rk,label:"Not linked to a session",icon:"session",description:"What the sandbox ran itself (setup, services), and changes made while no session or several ran in that project.",details:["Did "+lY(t)],cells:{session:Rk,agent:"-",project:"-",started:"",commands:String(t.commands),files:String(t.files),commits:String(t.commits)},primary:On({kind:"view",view:"audit",params:S3(e,{session:Rk})},"Show",{verb:"show",description:"Only what no session can be linked to."})}}function b3(e){let t=e.filter,r=t.session?e.sessions.find(n=>n.id===t.session):void 0;return[t.session===Rk?"not linked to a session":t.session?"session "+sY(t.session)+(r?" ("+r.agent+", "+r.project+")":""):"",t.agent?"agent "+t.agent:"",t.project?"project "+t.project:"",t.grep?'containing "'+t.grep+'"':""].filter(Boolean).join(", ")}function bbe(e,t,r){return t.length?[{id:"sessions",title:"Sessions",summary:Er(e.sessions.length,"session")+" "+r,cards:!0,columnsOn:"cli",columns:[{key:"session",label:"SESSION"},{key:"agent",label:"AGENT"},{key:"project",label:"PROJECT"},{key:"started",label:"STARTED"},{key:"commands",label:"COMMANDS"},{key:"files",label:"FILES"},{key:"commits",label:"COMMITS"}],items:t,notes:[{text:"Only one session: sandbox audit --session <id>",tone:"muted",only:"cli"}]}]:[]}function ybe(e){let t=e.filter,r=t.days===1?"in the last 24 hours":"in the last "+t.days+" days",n=!!(t.session||t.agent||t.project||t.grep),o=On({kind:"view",view:"audit",params:S3(e,{})},"Show everything",{verb:"show"}),i=le(Jn,{key:"audit.enabled",value:!0},{label:"Turn the audit log on",verb:"start",key:"o",importance:1}),a=e.totals,s=a.events?[{id:"events",label:"Events",value:String(a.events)},{id:"commands",label:"Commands",value:String(a.commands)},{id:"files",label:"Files changed",value:String(a.files)},{id:"commits",label:"Commits",value:String(a.commits),...a.commits?{tone:"accent"}:{}},{id:"sessions",label:"Sessions",value:String(a.sessions)}]:[],l=t.session||e.agents.length<1?[]:e.agents.map(p=>({id:"agent:"+p.agent,label:p.agent,value:Er(p.commands,"command"),details:[Er(p.files,"file")+", "+Er(p.commits,"commit"),Er(p.sessions,"session")]})),c={text:"The log takes "+Ku(e.bytes)+" of "+e.maxMb+" MB and keeps "+Er(e.keepDays,"day")+", on this PC where the sandbox cannot reach it ("+e.folder+").",tone:"muted"},d=t.session!==void 0?[]:[...e.sessions.map(p=>vbe(e,p)),...e.unlinked.commands||e.unlinked.files||e.unlinked.commits?[xbe(e)]:[]],u=e.events.map(gbe),f=e.events.some(p=>p.linked==="only-session"),m=[...n?[{id:"filter",title:"Filtered",summary:b3(e),actions:[o]}]:[],{id:"summary",facts:s},...l.length?[{id:"agents",title:"By agent",facts:l}]:[],...bbe(e,d,r),{id:"events",title:"Events",summary:e.matched>u.length?"the newest "+u.length+" of "+e.matched:Er(e.matched,"event")+" "+r,columns:[{key:"time",label:"TIME"},{key:"agent",label:"AGENT"},{key:"kind",label:"KIND"},{key:"what",label:"WHAT"}],items:u,notes:[c,...f?[{text:"? = the only session running in that project then (likely, not proven)",tone:"muted"}]:[],...e.matched>u.length?[{text:"More: sandbox audit --limit <n>, or narrow it down.",tone:"muted",only:"cli"}]:[]]}];return{title:"Activity",...e.enabled?{}:{notice:{text:"The audit log is off: nothing new is recorded.",tone:"warn"}},sections:m,actions:e.enabled?[]:[i],empty:{title:n?"Nothing matches":e.enabled?"Nothing recorded "+r:"The audit log is off",text:n?"No events "+r+" for "+b3(e)+".":e.enabled?"What your agents run, change and commit appears here while a sandbox runs.":"Turn it on to keep a record of what your agents run, change and commit (kept "+Er(e.keepDays,"day")+" on this PC).",action:n?o:e.enabled?void 0:i,cliText:e.enabled?"Nothing in the audit log "+r+(n?" for "+b3(e):"")+".":"The audit log is off. Turn it on in the menu (Settings > Security & privacy > Audit log) or with: sandbox config set audit.enabled true"}}}var cY=ct({id:"audit",title:"Activity",summary:"What your agents ran, changed and committed, from the audit log on this PC.",queries:{audit:w3},operations:[Jn],filters:[{param:"kind",label:"Kind",choices:[{value:"all",label:"Everything"},{value:"proc",label:"Commands"},{value:"file",label:"Files"},{value:"commit",label:"Commits"},{value:"session",label:"Sessions"},{value:"guard",label:"Repo guard"}]},{param:"days",label:"Period",choices:iY.map(e=>({value:String(e),label:e===1?"24 hours":e+" days"}))}],params:["session","agent","project","grep"],inputs:e=>({audit:{days:iY.find(t=>String(t)===e.days)??1,kind:I3.find(t=>t===e.kind)??"all",...e.session?{session:e.session}:{},...e.agent?{agent:e.agent}:{},...e.project?{project:e.project}:{},...e.grep?{grep:e.grep}:{}}}),build:({audit:e})=>ybe(e)});var _be=h.object({viewers:h.number(),remote:h.number()}),Ibe=h.object({id:h.string().describe("The session"),launchId:h.string(),harness:h.string().describe("The agent, or the shell (pwsh, powershell, cmd)"),kind:h.enum(["agent","shell"]).optional(),cwd:h.string().describe("Its folder in the sandbox"),project:h.string().optional(),phase:h.enum(["starting","running","exited","failed"]).describe("What it is doing"),message:h.string(),updatedAt:h.string(),startedAt:h.string().describe("When it started"),conversation:h.string().optional(),exitCode:h.number().optional(),projectName:h.string().optional().describe("The project it runs in"),here:h.boolean().optional().describe("In the project of the current folder"),viewers:_be.nullable().optional(),canOpen:h.boolean()}),wbe=h.object({sandboxRunning:h.boolean(),defaultAgent:h.string(),wide:h.boolean(),owner:h.string().optional(),sessions:h.array(Ibe)});function dY(e){return e===void 0?"-":e===null?"unknown (older session)":e.remote+" here, "+(e.viewers-e.remote)+" in sandbox"}function Sbe(e){let t=(r,n)=>r.startedAt<n.startedAt?1:-1;return[...e.filter(r=>r.here).sort(t),...e.filter(r=>!r.here).sort(t)]}var k3=Ge({id:"sessions.list",title:"Sessions",summary:"list sessions (agents and shells) and who is attached",input:h.object({wide:h.boolean().default(!1).describe("also show each session's folder")}),output:wbe,live:{everyMs:2500},cli:{name:"sessions",group:"Sessions",json:!0,flags:{wide:{flag:"--wide",noMenu:!0}},shapeJson:e=>e.sessions.map(({canOpen:t,...r})=>r)}}),Ek=_e({id:"sessions.restart",access:"control",title:"Restart agents",summary:"restart this project's running agents in place; they resume their conversation",input:h.object({harness:h.string().optional().describe("only this agent"),all:h.boolean().default(!1).describe("every project's sessions, not only this folder's")}),output:h.object({message:h.string().describe("The sandbox's answer")}),text:e=>e.message,cli:{name:"restart",group:"Agents",flags:{harness:{flag:"--harness",shownAs:"--agent",value:"name",choices:"harnesses"},all:{flag:"--all"}}}}),kbe=h.string().regex(/^[A-Za-z0-9_.-]{1,64}$/),Cbe=h.string().regex(/^[A-Za-z0-9_-]{1,64}$/),Pbe=["auto","pwsh","powershell","cmd"];function Dbe(e){return{kind:"terminal",session:e.session}}var $k=_e({id:"sessions.shell",title:"New shell",summary:"open PowerShell or cmd in a project of the running sandbox, as a session you can attach to",input:h.object({project:kbe.optional().describe("The project of the running sandbox (default: this folder's, else asked)"),shell:h.enum(Pbe).default("auto").describe("The shell: pwsh, powershell or cmd (default: pwsh if present)")}),output:h.object({session:h.string().describe("The new session"),shell:h.string().describe("The shell it runs"),message:h.string().describe("What happened")}),access:"owner",text:e=>e.message,opens:Dbe,cli:{name:"shell",group:"Sessions",positional:["project"],flags:{shell:{flag:"--shell",value:"name",choices:["pwsh","powershell","cmd"]}},json:!0,examples:["sandbox shell PowerShell in this folder's project, in this terminal (Ctrl+] detaches)","sandbox shell api --shell cmd cmd in the project api"]}}),Ak=_e({id:"sessions.close",title:"Close",summary:"end a running session (an agent or a shell) and every program it started",input:h.object({session:Cbe.describe("The session to close")}),output:h.object({message:h.string().describe("The sandbox's answer")}),access:"control",danger:!0,text:e=>e.message,cli:{name:"close",group:"Sessions",positional:["session"],examples:["sandbox close 4f2c9a"]}});function Rbe(e,t){let r=e.phase+(e.exitCode!==void 0?" ("+e.exitCode+")":""),n=e.phase==="running";return{id:e.id,label:(e.kind==="shell"?e.harness+" (shell)":e.harness)+" "+(e.projectName??"-"),hint:r+" "+_o(e.startedAt),badges:[{text:e.phase,tone:n?"ok":e.phase==="failed"?"danger":"muted"}],group:e.here?"This folder's project":"Other sessions",marked:e.here,icon:e.harness,description:n?"Opens this session's terminal (in a terminal, Ctrl+] detaches; the session keeps running). x closes it.":void 0,details:["Session "+e.id,"Folder "+e.cwd,"Attached "+dY(e.viewers)],cells:{here:e.here?"*":"",id:e.id,agent:e.harness,project:e.projectName??"-",state:r,attached:dY(e.viewers),...t?{folder:e.cwd}:{},started:_o(e.startedAt)},...n&&e.canOpen?{primary:On({kind:"terminal",session:e.id},"Open",{verb:"attach"})}:{},...n?{actions:[le(Ak,{session:e.id},{key:"x",verb:"close",importance:1})]}:{},...n?{}:{disabled:"This session has ended."},...n&&!e.canOpen?{disabled:"Not reachable from this PC."}:{}}}function Tbe(e){let t=Sbe(e.sessions),r=e.defaultAgent,n=On({kind:"start-agent",agent:r},"Start "+r,{verb:"start"}),o=t.length&&!t.some(i=>i.phase==="running"||i.phase==="starting")?[{id:"start",actions:[{...n,description:"Starts "+r+" in this folder."}]}]:[];return{title:"Sessions",...e.owner?{notice:{text:e.owner,tone:"accent"}}:{},sections:[{id:"sessions",cards:!0,columns:[{key:"here",label:""},{key:"id",label:"ID"},{key:"agent",label:"AGENT"},{key:"project",label:"PROJECT"},{key:"state",label:"STATE"},{key:"attached",label:"ATTACHED"},...e.wide?[{key:"folder",label:"FOLDER"}]:[],{key:"started",label:"STARTED"}],items:t.map(i=>Rbe(i,e.wide)),notes:[...t.some(i=>i.here)?[{text:"* = the project of this folder",tone:"muted"}]:[],...e.wide?[]:[{text:"Folders: sandbox sessions --wide",tone:"muted",only:"cli"}]]},...o],actions:[...e.sandboxRunning?[{...n,label:"New session",key:"n",verb:"new session",importance:1}]:[],...e.sandboxRunning?[le($k,{shell:"auto"},{key:"s",verb:"new shell",importance:1,description:"Opens PowerShell in a project of the sandbox, as a session like the agents."})]:[],...t.length?[le(Ek,{all:!1},{key:"r",verb:"restart agents",importance:1})]:[],On({kind:"command",argv:["resume"]},"Reopen last sessions",{key:"o",verb:"reopen last sessions",importance:2})],empty:{title:e.sandboxRunning?"No sessions":"No sandbox is running",text:e.sandboxRunning?"No agent is running. Start "+r+" in this folder.":"Starting "+r+" starts the sandbox too; its session is listed here.",action:n,cliText:"No sessions. Start one with: sandbox claude"}}}var uY=ct({id:"sessions",title:"Sessions",summary:"Agent and shell sessions in the running sandbox.",queries:{sessions:k3},operations:[Ek,$k,Ak],build:({sessions:e})=>Tbe(e)});var Ebe=h.enum(["nordvpn","openvpn-file","wireguard-file"]).describe("Which VPN (setting vpn.provider)"),$be=h.enum(["none","saved","unreadable"]).describe("Whether a login is saved and can be opened by you"),Abe=["The VPN is an alpha: a tunnel carrying traffic is not confirmed yet (docs/vpn.md lists what still needs checking).","The agent in the sandbox can read the VPN login (a service login you can revoke) and can turn the tunnel off, because it is the administrator there.","Free VPNs see all your traffic: use one you trust."];var Obe=h.object({enabled:h.boolean().describe("The VPN is on (setting vpn.enabled)"),provider:Ebe,protocol:h.enum(["udp","tcp"]).describe("udp or tcp (setting vpn.protocol)"),country:h.string().describe("The NordVPN country; empty = the best server anywhere"),killSwitch:h.boolean().describe("No internet when the tunnel fails (setting vpn.killSwitch)"),login:$be,loginSavedAt:h.string().nullable().describe("When the login was saved (the date and time, never the login)"),running:h.object({level:h.enum(["ok","warn","bad"]).describe("How the tunnel is doing"),text:h.string().describe("What the sandbox reported")}).nullable().describe("The running sandbox's tunnel, when one runs with the VPN on")}),C3=Ge({id:"vpn.status",title:"VPN",summary:"the VPN settings, whether a login is saved, and the running tunnel",input:h.object({tunnel:h.boolean().default(!0).describe("also ask the running sandbox how its tunnel is doing (one request to api.ipify.org)")}),output:Obe,cli:{name:"vpn",action:"status",json:!0}}),Ok=_e({id:"vpn.login",title:"Save the VPN login\u2026",summary:"save the VPN login (typed hidden, kept encrypted, never printed)",input:h.object({}).strict(),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"vpn",action:"login"}}),zk=_e({id:"vpn.logout",title:"Delete the VPN login",summary:"delete the saved VPN login",input:h.object({}).strict(),output:h.object({deleted:h.boolean().describe("A login was saved and is gone"),message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"vpn",action:"logout"}}),zbe={nordvpn:"NordVPN","wireguard-file":"your own WireGuard .conf","openvpn-file":"your own .ovpn file"},Nbe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},Fbe={none:"warn",saved:"ok",unreadable:"danger"},Lbe={ok:"ok",warn:"warn",bad:"danger"};function Mbe(e){let t=e.provider==="wireguard-file",r=e.loginSavedAt?" "+e.loginSavedAt.slice(0,10):"",n=[e.enabled?{id:"vpn",label:"VPN",value:"on",tone:"ok"}:{id:"vpn",label:"VPN",value:"off (applies from the next start)",tone:"muted"},{id:"provider",label:"Provider",value:zbe[e.provider]},{id:"protocol",label:"Protocol",value:e.protocol},{id:"country",label:"Country",value:e.country||"best available"},e.killSwitch?{id:"killSwitch",label:"Kill switch",value:"on (no internet if the tunnel fails)"}:{id:"killSwitch",label:"Kill switch",value:"off",tone:"warn"},t?{id:"login",label:"Login",value:"not needed (the keys are in your config)",tone:"muted"}:{id:"login",label:"Login",value:Nbe[e.login]+r,tone:Fbe[e.login]},...e.running?[{id:"running",label:"Running now",value:e.running.text,tone:Lbe[e.running.level]}]:[]],o=[...!t&&e.login==="none"?[{text:"Next: sandbox vpn login",tone:"muted",only:"cli"}]:[],...e.login==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox vpn login",tone:"muted"}]:[],...Abe.map(l=>({text:l,tone:"warn"}))],a=[le(Jn,{scope:"user",key:"vpn.enabled",value:!e.enabled},{label:e.enabled?"Turn the VPN off":"Turn the VPN on",verb:e.enabled?"turn off":"turn on",key:"o"}),...t?[]:[le(Ok,{},{key:"v",verb:"save login"}),...e.login!=="none"?[le(zk,{},{key:"x",verb:"delete login"})]:[]]];return{title:"VPN",sections:[{id:"vpn",facts:n,notes:o,actions:a}]}}var fY=ct({id:"vpn",title:"VPN",summary:"The sandbox's VPN: whether it is on, the saved login, and the tunnel.",queries:{status:C3},operations:[Ok,zk,Jn],build:({status:e})=>Mbe(e)});var Bbe="https://github.com/settings/personal-access-tokens/new",vgt=["Open "+Bbe+" (a fine-grained personal access token).",'Under "Repository access" choose "Only select repositories" and pick only the ones the agent should reach.',"Give only the permissions it needs, for example Contents (read and write), Pull requests (read and write) and Actions (read).","Set an expiry date, then generate the token and copy it."],jbe=["The agent in the sandbox can read the token and use it for everything it allows: limit it to some repositories and permissions.",'It is handed over only with github.shareToken on and git access "full". Revoke it on GitHub whenever you like.'],Ube=h.enum(["none","saved","unreadable"]).describe("Whether a token is saved and can be opened by you"),Vbe=h.object({shareToken:h.boolean().describe("Sandboxes get the token (setting github.shareToken)"),gitAccess:h.enum(["full","readonly","none"]).describe("Git access in your settings (provisioning.git.access)"),token:Ube,kind:h.enum(["fine-grained","classic"]).nullable().describe("What kind of token is saved (never the token)"),savedAt:h.string().nullable().describe("When the token was saved (the date and time, never the token)")}),P3=Ge({id:"github.status",title:"GitHub",summary:"whether sandboxes get your GitHub token, and whether one is saved (never the token)",input:h.object({}).strict(),output:Vbe,cli:{name:"github",action:"status",json:!0}}),Nk=_e({id:"github.login",title:"Save the GitHub token\u2026",summary:"save a GitHub token for sandboxes (typed hidden, kept encrypted, never printed)",input:h.object({}).strict(),output:h.object({message:h.string().describe("What happened")}),text:e=>e.message,cli:{name:"github",action:"login"}}),Fk=_e({id:"github.logout",title:"Delete the GitHub token",summary:"delete the saved GitHub token",input:h.object({}).strict(),output:h.object({deleted:h.boolean().describe("A token was saved and is gone"),message:h.string().describe("What happened")}),danger:!0,text:e=>e.message,cli:{name:"github",action:"logout"}}),Hbe={none:"not saved",saved:"saved (encrypted)",unreadable:"cannot be read"},Wbe={none:"warn",saved:"ok",unreadable:"danger"},Zbe={"fine-grained":"fine-grained",classic:"classic (reaches every repository you can: a fine-grained token is safer)"};function Gbe(e){let t=e.savedAt?" "+e.savedAt.slice(0,10):"",r=[e.shareToken?{id:"share",label:"Share with sandboxes",value:"on",tone:"ok"}:{id:"share",label:"Share with sandboxes",value:"off (turn on: sandbox config set github.shareToken true)"},e.gitAccess==="full"?{id:"gitAccess",label:"Git access",value:"full"}:{id:"gitAccess",label:"Git access",value:e.gitAccess+' (the token is only handed over with "full")',tone:"warn"},{id:"token",label:"Token",value:Hbe[e.token]+t,tone:Wbe[e.token]},...e.kind?[{id:"kind",label:"Kind",value:Zbe[e.kind],...e.kind==="classic"?{tone:"warn"}:{}}]:[]],n=[...e.token==="none"?[{text:"Next: sandbox github login",tone:"muted",only:"cli"}]:[],...e.token==="unreadable"?[{text:"Only the Windows user that saved it can read it. Save it again: sandbox github login",tone:"muted"}]:[],...jbe.map(a=>({text:a,tone:"muted"}))],o=[le(Nk,{},{key:"g",verb:"save token"}),...e.token!=="none"?[le(Fk,{},{key:"x",verb:"delete token"})]:[]];return{title:"GitHub",sections:[{id:"github",facts:r,notes:n,actions:o}]}}var mY=ct({id:"github",title:"GitHub",summary:"A GitHub token for sandboxes: whether they get it, and the saved token.",queries:{status:P3},operations:[Nk,Fk],build:({status:e})=>Gbe(e)});var qbe=h.object({version:h.string().describe("The version that failed"),reason:h.string().describe("Why it failed, in one sentence")}),Kbe=h.object({managed:h.boolean().describe("Installed by the installer, so it can update itself"),version:h.string().describe("The version installed"),scope:h.enum(["user","machine"]).nullable().describe("Installed for you, or for everyone on this PC"),autoUpdate:h.boolean().describe("New versions install by themselves"),autoOffText:h.string().nullable().describe("Why automatic updates were turned off, if they were"),previous:h.string().nullable().describe("The version an update replaced (roll back goes there)"),failed:qbe.nullable().describe("The last update that failed"),npmCommand:h.string().describe("How an npm install is updated"),error:h.string().nullable().describe("Why the status could not be read"),settings:h.object({pending:h.array(h.string()).describe('Each change still to make, as "name: what it does"'),error:h.string().nullable().describe("Why your saved settings could not be read")}).describe("Changes still to make to your saved settings")}),D3=Ge({id:"updates.status",title:"Updates",summary:"which version is installed and what your saved settings still need",input:h.object({}),output:Kbe,surfaces:{except:{cli:"no command shows this page; sandbox update --check and --version cover the command line"}}}),pY=h.object({line:h.string().describe("What happened, in one sentence")}),ls=_e({id:"updates.update",title:"Update now",summary:"install the newest version, or check, go back, or switch automatic updates",input:h.object({check:h.boolean().default(!1).describe("only look whether a newer version exists"),rollback:h.boolean().default(!1).describe("go back to the version before the last update"),auto:h.enum(["on","off"]).optional().describe("install new versions by themselves (for everyone on this PC: needs an admin terminal)"),unattended:h.boolean().default(!1).describe("used by automatic updates: no questions, short output"),feed:h.string().optional().describe("take the release from this folder (a feed.json and the package) instead of GitHub")}),output:pY.extend({latest:h.string().nullable().describe("The newer version a check found")}),danger:!0,text:e=>e.line,cli:{name:"update",group:"Health",flags:{check:{flag:"--check"},rollback:{flag:"--rollback"},auto:{flag:"--auto",value:"on|off"},unattended:{flag:"--unattended",noMenu:!0,advanced:!0},feed:{flag:"--feed",value:"folder",noMenu:!0,advanced:!0}},yes:"(--rollback) do not ask first"}}),sb=_e({id:"updates.migrate",title:"Update saved settings",summary:"bring your saved settings up to date with this version",input:h.object({dryRun:h.boolean().default(!1).describe("only list what would change"),restore:h.string().optional().describe("put back the files saved before an update (a folder under <storage>\\backups)")}),output:pY,text:e=>e.line,cli:{name:"migrate",group:"Health",flags:{dryRun:{flag:"--dry-run"},restore:{flag:"--restore",value:"backup",advanced:!0}},yes:"(--restore) do not ask first"}}),Gc=(e,t,r={})=>({id:"updates:"+e,label:t,...r});function Xbe(e,t){let r=e.managed&&!e.error,n=e.scope==="machine",o=e.autoUpdate?"off":"on",i=le(ls,{rollback:!0},{label:"Roll back",verb:"go back"}),a={id:"program",title:"This program",notes:[{text:"After an update this page still runs the version it started with; sandbox web open (or the next sandbox start) starts the new one.",tone:"muted",only:"web"}],items:e.error?[{id:"updates:error",label:e.error,tone:"danger"}]:e.managed?[Gc("version","Version",{hint:e.version,description:"Installed "+(n?"for everyone on this PC":"for you")+"."}),Gc("latest","Newest version",{hint:t??"not looked yet",tone:t?"warn":"muted",keys:t?"Enter installs it.":"Enter looks on GitHub for a newer version.",primary:t?le(ls,{},{label:"Install "+t,verb:"install"}):le(ls,{check:!0},{label:"Check now",verb:"look",danger:!1})}),Gc("auto","Automatic updates",{hint:e.autoUpdate?"on":"off",tone:e.autoUpdate?"ok":"muted",description:n?"For everyone: needs an admin terminal.":"A new version installs once a day, even while a sandbox runs (it keeps its version until it restarts).",keys:"Enter switches them.",primary:le(ls,{auto:o},{label:"Automatic updates "+o,verb:"switch",danger:!1}),actions:[le(ls,{auto:o},{key:"a",label:"Automatic updates "+o,verb:"automatic on/off",danger:!1})]}),...e.autoOffText?[Gc("autooff","Automatic updates turned off",{hint:"off",tone:"warn",description:e.autoOffText})]:[],...e.previous?[Gc("previous","Previous version",{hint:e.previous,keys:"Enter goes back to it.",primary:i,actions:[{...i,key:"r",verb:"roll back"}]})]:[],...e.failed?[Gc("failed","Last failed update",{hint:e.failed.version,tone:"danger",description:"It is not tried again until a newer version is released.",details:[e.failed.reason]})]:[]]:[Gc("version","Version",{hint:e.version,description:"Installed with npm, so npm updates it: "+e.npmCommand}),Gc("npm","Update",{hint:"with npm",tone:"muted",description:"Run "+e.npmCommand+" in a terminal."})]},s=e.settings.pending,c={id:"settings",title:"Saved settings",items:e.settings.error?[{id:"settings:error",label:e.settings.error,tone:"danger"}]:s.length?s.map((d,u)=>({id:"settings:"+u,label:d.split(":")[0],hint:"to update",tone:"warn",description:"A backup is kept first.",keys:"Enter updates your saved settings.",details:[d],primary:le(sb,{},{label:"Update saved settings",verb:"update"}),actions:[le(sb,{},{key:"s",label:"Update saved settings",verb:"update saved settings"})]})):[{id:"settings:none",label:"Up to date",hint:"OK",tone:"ok",description:"Nothing to update."}]};return{title:"Updates",sections:[a,c],actions:r?[le(ls,{check:!0},{key:"c",label:"Check now",verb:"check now",danger:!1}),le(ls,{},{key:"u",label:"Update now",verb:"update now"})]:[]}}var hY=ct({id:"updates",title:"Updates",summary:"Which version is installed, installing a newer one, and bringing your saved settings up to date.",queries:{status:D3},operations:[ls,sb],build:({status:e})=>Xbe(e,null)});var Lk={except:{web:"the page is the web UI"}},Qbe=h.object({running:h.boolean().describe("The web UI server answers"),port:h.number().nullable().describe("Its port on 127.0.0.1, when it runs"),address:h.string().nullable().describe("Its address (without the login token), when it runs"),lanAddress:h.string().nullable().optional().describe("Its address on your network for paired devices (LAN mode), when it listens there"),lanFingerprint:h.string().nullable().optional().describe("The LAN certificate's SHA-256 fingerprint"),lanProblem:h.string().nullable().optional().describe("Why LAN mode is on but not listening")}),Ybe=h.object({message:h.string().describe("What happened")}),R3=Ge({id:"web.status",title:"Web UI",summary:"whether the web UI server runs, and its address",input:h.object({}),output:Qbe,surfaces:Lk,text:e=>e.running&&e.port?"The web UI is running at http://127.0.0.1:"+e.port+"/ (sandbox web open signs you in)."+(e.lanAddress?`
130
+ On your network: `+e.lanAddress+" (certificate "+e.lanFingerprint+")":"")+(e.lanProblem?`
131
+ LAN mode is on but not listening: `+e.lanProblem:""):"The web UI is not running (sandbox web start).",cli:{name:"web",action:"status",json:!0}}),Mk=_e({id:"web.start",title:"Start the web UI",summary:"start the web UI server in the background (this PC only)",input:h.object({}),output:h.object({port:h.number().describe("Its port"),message:h.string().describe("What happened")}),surfaces:Lk,text:e=>e.message,cli:{name:"web",action:"start"}}),Bk=_e({id:"web.open",title:"Open the web UI",summary:"start the web UI if needed and open it in your browser, signed in",input:h.object({}),output:Ybe,surfaces:Lk,text:e=>e.message,cli:{name:"web",action:"open"}}),jk=_e({id:"web.stop",title:"Stop the web UI",summary:"stop the web UI server",input:h.object({}),output:h.object({stopped:h.boolean().describe("It was running and stopped"),message:h.string().describe("What happened")}),surfaces:Lk,text:e=>e.message,cli:{name:"web",action:"stop"}});function Jbe(e){let t=le(Bk,{},{key:"o",verb:"open"}),r=le(Mk,{},{key:"s",verb:"start"}),n=le(jk,{},{key:"x",verb:"stop"});return{title:"Web UI",sections:[{id:"web",facts:[{id:"running",label:"Running",value:e.running?"yes":"no",tone:e.running?"ok":"muted"},...e.address?[{id:"address",label:"Address",value:e.address+" (this PC only)"}]:[],...e.lanAddress?[{id:"lan",label:"On your network",value:e.lanAddress,description:"Type this into the phone, then enter the code from Remote access > Allow a new device.",details:e.lanFingerprint?["Certificate "+e.lanFingerprint]:void 0}]:[],...e.lanProblem?[{id:"lan-problem",label:"LAN mode",value:e.lanProblem,tone:"warn"}]:[]],actions:e.running?[t,n]:[r,t],notes:[{text:"Loopback only, behind a token. Open signs you in.",tone:"muted"}]}]}}var gY=ct({id:"web",title:"Web UI",summary:"The web UI server on this PC: start, open, stop.",queries:{status:R3},operations:[Mk,Bk,jk],build:({status:e})=>Jbe(e)});var cb=h.enum(["view","control"]),eye=h.object({id:h.string().describe("Its id (for revoke)"),name:h.string().describe("The name it gave itself"),role:cb.describe("view or control"),address:h.string().describe("The address it was allowed from"),createdAt:h.string().describe("When it was allowed (ISO time)"),expiresAt:h.string().describe("When it is signed out (ISO time)"),lastSeen:h.string().nullable().describe("When it was last used (ISO time)")}),tye=h.object({id:h.string().describe("Its id (for revoke)"),user:h.string().describe("The Windows user (DOMAIN\\name)"),createdAt:h.string().describe("When they signed in"),expiresAt:h.string().describe("When they are signed out")}),rye=h.object({lan:h.object({enabled:h.boolean().describe("web.remote.lan.enabled"),running:h.boolean().describe("The web UI listens on your network now"),address:h.string().nullable().describe("What a phone types: https://<address>:<port>"),fingerprint:h.string().nullable().describe("The certificate's SHA-256 fingerprint"),problem:h.string().nullable().describe("Why it is on but not listening"),network:h.string().nullable().describe("The network it was turned on for")}),windowsSignIn:h.boolean().describe("web.remote.windowsSignIn"),users:h.array(h.object({name:h.string(),role:cb})).describe("web.remote.users"),rememberDays:h.number().describe("web.remote.rememberDays"),devices:h.array(eye),windows:h.array(tye).describe("Windows users signed in to the web UI now"),pending:h.object({role:cb,expiresAt:h.string()}).nullable().describe("A device code waiting to be typed (the code itself is never kept)"),codeVoided:h.boolean().describe("The last code was voided after too many wrong tries")}),E3=Ge({id:"access.status",title:"Remote access",summary:"devices on your network and other Windows users who may use your web UI",input:h.object({}),output:rye,access:"owner",live:{everyMs:5e3},text:e=>(e.lan.running&&e.lan.address?"On your network: "+e.lan.address:"LAN mode is off")+". "+e.devices.length+" device"+(e.devices.length===1?"":"s")+", "+e.windows.length+" Windows sign-in"+(e.windows.length===1?"":"s")+".",cli:{name:"web",action:"devices",json:!0}}),db=_e({id:"access.allowDevice",title:"Allow a new device",summary:"show a one-time code that a phone or tablet on your network types to sign in (5 minutes)",input:h.object({role:cb.default("view").describe("What the device may do: view (look) or control (everything but access)")}),output:h.object({code:h.string().describe("The one-time code (ABCD-EFGH)"),expiresAt:h.string().describe("When it runs out"),role:cb,address:h.string().nullable().describe("What the device opens"),fingerprint:h.string().nullable().describe("The certificate's fingerprint, to compare on the device")}),access:"owner",keepResult:!0,text:e=>"Code "+e.code+" (5 minutes, "+e.role+"). On the device open "+(e.address??"the address on your network")+" and type the code."+(e.fingerprint?" Its certificate should be "+e.fingerprint.slice(0,23)+"...":""),cli:{name:"web",action:"allow-device",flags:{role:{flag:"--role",value:"view|control",choices:["view","control"]}}}}),ub=_e({id:"access.revoke",title:"Sign out",summary:"sign out one device or Windows user now (its open pages close)",input:h.object({id:h.string().regex(/^[0-9a-f]{16}$/).describe("The id from sandbox web devices")}),output:h.object({message:h.string()}),access:"owner",text:e=>e.message,cli:{name:"web",action:"revoke",positional:["id"]}}),Uk=_e({id:"access.revokeAll",title:"Sign out everyone",summary:"sign out every device and Windows user now, and void a code that was not used",input:h.object({}),output:h.object({message:h.string()}),access:"owner",danger:!0,text:e=>e.message,cli:{name:"web",action:"revoke-all",yes:"sign everyone out without asking"}}),Vk=_e({id:"access.lanOn",title:"Turn on LAN mode",summary:"let devices you allow use the web UI on your network (adds a firewall rule; Windows asks once)",input:h.object({}),output:h.object({message:h.string(),address:h.string()}),access:"owner",text:e=>e.message,cli:{name:"web",action:"lan-on"}}),Hk=_e({id:"access.lanOff",title:"Turn off LAN mode",summary:"stop listening on your network, remove the firewall rule and sign out every device",input:h.object({}),output:h.object({message:h.string()}),access:"owner",danger:!0,text:e=>e.message,cli:{name:"web",action:"lan-off",yes:"turn it off without asking"}}),vY=864e5;function T3(e,t){let r=Date.parse(e)-t;return Number.isFinite(r)?r>=vY?"in "+Math.round(r/vY)+" days":r>=36e5?"in "+Math.round(r/36e5)+" hours":"in "+Math.max(1,Math.round(r/6e4))+" minutes":"?"}function lb(e){return e?e.slice(0,16).replace("T"," "):"not yet"}function oye(e,t=Date.now()){let r=le(db,{},{key:"a",verb:"allow",fields:[{...as(db.input.shape.role,["role"]),name:"role",label:"Role"}],initial:{role:"view"}}),n=e.devices.map(a=>({id:"device:"+a.id,label:a.name,hint:a.role,tone:a.role==="control"?"accent":void 0,icon:"device",description:"From "+a.address+", signed out "+T3(a.expiresAt,t)+".",details:["Allowed "+lb(a.createdAt),"Last seen "+lb(a.lastSeen),"Ends "+lb(a.expiresAt),"Id "+a.id],keys:"x signs it out.",actions:[le(ub,{id:a.id},{key:"x",verb:"sign out",label:"Sign out "+a.name})]})),o=e.windows.map(a=>({id:"windows:"+a.id,label:a.user,hint:e.users.find(s=>a.user.toLowerCase().endsWith("\\"+s.name.toLowerCase())||a.user.toLowerCase()===s.name.toLowerCase())?.role??"not on the list",description:"Signed in with Windows, signed out "+T3(a.expiresAt,t)+".",details:["Signed in "+lb(a.createdAt),"Ends "+lb(a.expiresAt),"Id "+a.id],keys:"x signs them out.",actions:[le(ub,{id:a.id},{key:"x",verb:"sign out",label:"Sign out "+a.user})]})),i=e.lan;return{title:"Remote access",notice:{text:"Anyone you let in acts as you: control can read what your agents can read, logins included. Local network only, never the internet.",tone:"warn"},sections:[{id:"lan",title:"Devices on your network",facts:[{id:"lan-mode",label:"LAN mode",value:i.running?"on":i.enabled?"on, not listening":"off",tone:i.running?"ok":i.enabled?"warn":"muted",description:i.problem??void 0},...i.address?[{id:"lan-address",label:"On your network",value:i.address,description:"Type this into the phone's browser. The first time it warns about the certificate: compare it with the one below. A warning after that means stop."}]:[],...i.fingerprint?[{id:"lan-cert",label:"Certificate",value:i.fingerprint}]:[],...e.pending?[{id:"pending",label:"Code waiting",value:"for a "+e.pending.role+" device, "+T3(e.pending.expiresAt,t),tone:"accent"}]:[],...e.codeVoided?[{id:"voided",label:"Last code",value:"voided after too many wrong tries",tone:"warn",description:"Someone on your network may have tried to guess it. Make a new one when you are ready."}]:[],{id:"remember",label:"Stays signed in",value:e.rememberDays+" days (web.remote.rememberDays)"}],items:n,actions:i.enabled?[r,le(Hk,{},{key:"f",verb:"LAN off"})]:[le(Vk,{},{key:"n",verb:"LAN on"})],notes:n.length?[]:[{text:"No devices yet.",tone:"muted"}]},{id:"windows",title:"Other Windows users of this PC",facts:[{id:"windows-sign-in",label:"Windows sign-in",value:e.windowsSignIn?"on":"off",tone:e.windowsSignIn?"ok":"muted",description:"They run sandbox remote (or sandbox remote --browser) as themselves. Turn on web.remote.windowsSignIn and list them in web.remote.users (Settings)."},...e.users.map((a,s)=>({id:"user-"+s,label:a.name,value:a.role}))],items:o}],actions:[le(Uk,{},{key:"X",verb:"sign out all"})]}}var xY=ct({id:"access",title:"Remote access",summary:"Devices on your network and other Windows users of this PC: allow, see, sign out.",queries:{status:E3},operations:[db,ub,Uk,Vk,Hk],build:({status:e})=>oye(e)});var bY=[hk,bk,yk,_k,Ek,$k,Ak,r3,Y1,J1,ek,Jn,dk,rb,ob,eb,tk,rk,ok,nk,fk,mk,pk,wk,ab,Sk,kk,Ck,Pk,Xu,nb,ib,gk,vk,xk,ls,sb,ik,ak,lh,sk,lk,Mk,Bk,jk,Ok,zk,Nk,Fk,db,ub,Uk,Vk,Hk],yY=[h3,k3,t3,l3,EQ,sh,n3,c3,g3,m3,p3,i3,a3,v3,x3,w3,D3,d3,LQ,u3,R3,C3,P3,E3],nye=[YQ,uY,PQ,OQ,DQ,zQ,tY,WQ,KQ,RQ,nY,cY,hY,MQ,gY,fY,mY,xY],Ggt=[...bY,...yY];function qc(e){return bY.find(t=>t.id===e)}function ll(e){return yY.find(t=>t.id===e)}function $3(e){return nye.find(t=>t.id===e)}function Qu(e){return e.flatMap(t=>[t,...Qu(t.children??[])])}function Wk(e,t){return Qu(e).find(r=>r.children?.some(n=>n.view===t))}function _Y(e,t){return Qu(e).find(r=>r.embeds?.some(n=>n.view===t))}var cs=[{label:"Workspace",children:[{label:"Agents",view:"agents"},{label:"Sessions",view:"sessions"},{label:"Activity",view:"audit"}]},{label:"Sandbox",children:[{label:"Overview",view:"sandbox"},{label:"Projects",view:"projects"},{label:"Apps",view:"apps"}]},{label:"Configuration",children:[{label:"Settings",view:"settings",embeds:[{label:"VPN",view:"vpn"},{label:"GitHub",view:"github"}]},{label:"Accounts",view:"accounts"},{label:"Remote access",view:"access"}]},{label:"Maintenance",children:[{label:"Updates",view:"updates"},{label:"Data",view:"data"},{label:"Storage",view:"storage"},{label:"Health",view:"health"},{label:"Logs",view:"logs"},{label:"Engine",view:"engine"},{label:"More",elsewhere:"The less common commands are in the menu (sandbox > Maintenance)."}]}];var Yu={kind:"owner"};function IY(e){Yu=e==="owner"?{kind:"owner"}:{kind:"device",id:"",name:"",role:e}}function wY(){return Yu.kind==="owner"}function SY(){return Yu.kind==="owner"?"Signed in as owner":Yu.kind==="device"&&Yu.role==="control"?"Signed in \xB7 full control":"Signed in \xB7 view only"}function kY(e){if(e.kind==="link")return e.target.kind!=="start-agent"||QO(Yu,"control");let t=qc(e.op);return t!==void 0&&QO(Yu,mQ(t,e.input))}var CY="x-sandbox-web";var A3=class extends Error{constructor(r,n){super(n);Ft(this,"status",r)}};async function uh(e,t,r){let n=await fetch(t,{method:e,credentials:"same-origin",headers:{[CY]:"1",...r===void 0?{}:{"Content-Type":"application/json"}},body:r===void 0?void 0:JSON.stringify(r)}),o=await n.json().catch(()=>null);if(!n.ok){let i=o?.error;throw new A3(n.status,typeof i=="string"?i:"The server said "+n.status)}return o}var fh={login:e=>uh("POST","/api/login",{token:e}),loginOnce:e=>uh("POST","/api/login/once",{token:e}),pair:(e,t)=>uh("POST","/api/pair",{code:e,name:t}),me:()=>uh("GET","/api/me"),info:()=>uh("GET","/api/info"),sessions:()=>uh("GET","/api/sessions")};var mh=b(D(),1);var PY={outline:{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"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var X=(e,t,r,n)=>{let o=(0,mh.forwardRef)(({color:i="currentColor",size:a=24,stroke:s=2,title:l,className:c,children:d,...u},f)=>(0,mh.createElement)("svg",{ref:f,...PY[e],width:a,height:a,className:["tabler-icon",`tabler-icon-${t}`,c].filter(Boolean).join(" "),...e==="filled"?{fill:i}:{strokeWidth:s,stroke:i},...u},[l&&(0,mh.createElement)("title",{key:"svg-title"},l),...n.map(([m,p])=>(0,mh.createElement)(m,p)),...Array.isArray(d)?d:[d]]));return o.displayName=`${r}`,o};var aye=[["path",{d:"M3 12h4l3 8l4 -16l3 8h4",key:"svg-0"}]],O3=X("outline","activity","Activity",aye);var sye=[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]],z3=X("outline","adjustments","Adjustments",sye);var lye=[["path",{d:"M12 9v4",key:"svg-0"}],["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]],Kc=X("outline","alert-triangle","AlertTriangle",lye);var cye=[["path",{d:"M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-0"}],["path",{d:"M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-1"}],["path",{d:"M14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4",key:"svg-2"}],["path",{d:"M14 7l6 0",key:"svg-3"}],["path",{d:"M17 4l0 6",key:"svg-4"}]],N3=X("outline","apps","Apps",cye);var dye=[["path",{d:"M9 14l-4 -4l4 -4",key:"svg-0"}],["path",{d:"M5 10h11a4 4 0 1 1 0 8h-1",key:"svg-1"}]],F3=X("outline","arrow-back-up","ArrowBackUp",dye);var uye=[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M5 12l6 6",key:"svg-1"}],["path",{d:"M5 12l6 -6",key:"svg-2"}]],L3=X("outline","arrow-left","ArrowLeft",uye);var fye=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]],M3=X("outline","arrow-up","ArrowUp",fye);var mye=[["path",{d:"M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5",key:"svg-0"}],["path",{d:"M12 12l8 -4.5",key:"svg-1"}],["path",{d:"M12 12l0 9",key:"svg-2"}],["path",{d:"M12 12l-8 -4.5",key:"svg-3"}]],Xc=X("outline","box","Box",mye);var pye=[["path",{d:"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5",key:"svg-0"}]],B3=X("outline","brand-github","BrandGithub",pye);var hye=[["path",{d:"M5 12l5 5l10 -10",key:"svg-0"}]],fb=X("outline","check","Check",hye);var gye=[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]],mb=X("outline","chevron-down","ChevronDown",gye);var vye=[["path",{d:"M9 6l6 6l-6 6",key:"svg-0"}]],j3=X("outline","chevron-right","ChevronRight",vye);var xye=[["path",{d:"M6 15l6 -6l6 6",key:"svg-0"}]],U3=X("outline","chevron-up","ChevronUp",xye);var bye=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l6 0",key:"svg-1"}]],V3=X("outline","circle-minus","CircleMinus",bye);var yye=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M9 12h6",key:"svg-1"}],["path",{d:"M12 9v6",key:"svg-2"}]],H3=X("outline","circle-plus","CirclePlus",yye);var _ye=[["path",{d:"M19 18a3.5 3.5 0 0 0 0 -7h-1a5 4.5 0 0 0 -11 -2a4.6 4.4 0 0 0 -2.1 8.4",key:"svg-0"}],["path",{d:"M12 13l0 9",key:"svg-1"}],["path",{d:"M9 19l3 3l3 -3",key:"svg-2"}]],pb=X("outline","cloud-download","CloudDownload",_ye);var Iye=[["path",{d:"M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]],W3=X("outline","copy","Copy",Iye);var wye=[["path",{d:"M5 6a1 1 0 0 1 1 -1h12a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-12a1 1 0 0 1 -1 -1l0 -12",key:"svg-0"}],["path",{d:"M9 9h6v6h-6l0 -6",key:"svg-1"}],["path",{d:"M3 10h2",key:"svg-2"}],["path",{d:"M3 14h2",key:"svg-3"}],["path",{d:"M10 3v2",key:"svg-4"}],["path",{d:"M14 3v2",key:"svg-5"}],["path",{d:"M21 10h-2",key:"svg-6"}],["path",{d:"M21 14h-2",key:"svg-7"}],["path",{d:"M14 21v-2",key:"svg-8"}],["path",{d:"M10 21v-2",key:"svg-9"}]],Z3=X("outline","cpu","Cpu",wye);var Sye=[["path",{d:"M4 6a8 3 0 1 0 16 0a8 3 0 1 0 -16 0",key:"svg-0"}],["path",{d:"M4 6v6a8 3 0 0 0 16 0v-6",key:"svg-1"}],["path",{d:"M4 12v6a8 3 0 0 0 16 0v-6",key:"svg-2"}]],Zk=X("outline","database","Database",Sye);var kye=[["path",{d:"M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M14 4l0 4l-6 0l0 -4",key:"svg-2"}]],hb=X("outline","device-floppy","DeviceFloppy",kye);var Cye=[["path",{d:"M12.5 21h-4.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v7",key:"svg-0"}],["path",{d:"M16 19h6",key:"svg-1"}],["path",{d:"M19 16v6",key:"svg-2"}],["path",{d:"M11 4h2",key:"svg-3"}],["path",{d:"M12 17v.01",key:"svg-4"}]],G3=X("outline","device-mobile-plus","DeviceMobilePlus",Cye);var Pye=[["path",{d:"M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14",key:"svg-0"}],["path",{d:"M11 4h2",key:"svg-1"}],["path",{d:"M12 17v.01",key:"svg-2"}]],q3=X("outline","device-mobile","DeviceMobile",Pye);var Dye=[["path",{d:"M13 9a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-6a1 1 0 0 1 -1 -1v-10",key:"svg-0"}],["path",{d:"M18 8v-3a1 1 0 0 0 -1 -1h-13a1 1 0 0 0 -1 1v12a1 1 0 0 0 1 1h9",key:"svg-1"}],["path",{d:"M16 9h2",key:"svg-2"}]],K3=X("outline","devices","Devices",Dye);var Rye=[["path",{d:"M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-0"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],X3=X("outline","dots","Dots",Rye);var Tye=[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]],Q3=X("outline","eye-off","EyeOff",Tye);var Eye=[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]],Y3=X("outline","eye","Eye",Eye);var $ye=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M11.5 21h-4.5a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v5m-5 6h7m-3 -3l3 3l-3 3",key:"svg-1"}]],J3=X("outline","file-export","FileExport",$ye);var Aye=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M5 13v-8a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-5.5m-9.5 -2h7m-3 -3l3 3l-3 3",key:"svg-1"}]],ez=X("outline","file-import","FileImport",Aye);var Oye=[["path",{d:"M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M12 10.5v1.5",key:"svg-1"}],["path",{d:"M12 16v1.5",key:"svg-2"}],["path",{d:"M15.031 12.25l-1.299 .75",key:"svg-3"}],["path",{d:"M10.268 15l-1.3 .75",key:"svg-4"}],["path",{d:"M15 15.803l-1.285 -.773",key:"svg-5"}],["path",{d:"M10.285 12.97l-1.285 -.773",key:"svg-6"}],["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-7"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-8"}]],tz=X("outline","file-settings","FileSettings",Oye);var zye=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]],rz=X("outline","file-text","FileText",zye);var Nye=[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",key:"svg-1"}]],oz=X("outline","file","File",Nye);var Fye=[["path",{d:"M11 19h-6a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M20 21l2 -2l-2 -2",key:"svg-1"}],["path",{d:"M17 17l-2 2l2 2",key:"svg-2"}]],gb=X("outline","folder-code","FolderCode",Fye);var Lye=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],vb=X("outline","folder-open","FolderOpen",Lye);var Mye=[["path",{d:"M13 19h-8a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v4",key:"svg-0"}],["path",{d:"M16 22l5 -5",key:"svg-1"}],["path",{d:"M21 21.5v-4.5h-4.5",key:"svg-2"}]],nz=X("outline","folder-share","FolderShare",Mye);var Bye=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],xb=X("outline","folder","Folder",Bye);var jye=[["path",{d:"M9 3h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2",key:"svg-0"}],["path",{d:"M17 16v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2",key:"svg-1"}]],bb=X("outline","folders","Folders",jye);var Uye=[["path",{d:"M19.5 13.572l-7.5 7.428l-2.896 -2.868m-6.117 -8.104a5 5 0 0 1 9.013 -3.022a5 5 0 1 1 7.5 6.572",key:"svg-0"}],["path",{d:"M3 13h2l2 3l2 -6l1 3h3",key:"svg-1"}]],iz=X("outline","heartbeat","Heartbeat",Uye);var Vye=[["path",{d:"M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",key:"svg-0"}],["path",{d:"M4 13h3l3 3h4l3 -3h3",key:"svg-1"}]],az=X("outline","inbox","Inbox",Vye);var Hye=[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]],yb=X("outline","info-circle","InfoCircle",Hye);var Wye=[["path",{d:"M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-0"}],["path",{d:"M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-1"}],["path",{d:"M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1",key:"svg-2"}],["path",{d:"M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1",key:"svg-3"}]],sz=X("outline","layout-dashboard","LayoutDashboard",Wye);var Zye=[["path",{d:"M3.5 5.5l1.5 1.5l2.5 -2.5",key:"svg-0"}],["path",{d:"M3.5 11.5l1.5 1.5l2.5 -2.5",key:"svg-1"}],["path",{d:"M3.5 17.5l1.5 1.5l2.5 -2.5",key:"svg-2"}],["path",{d:"M11 6l9 0",key:"svg-3"}],["path",{d:"M11 12l9 0",key:"svg-4"}],["path",{d:"M11 18l9 0",key:"svg-5"}]],Gk=X("outline","list-check","ListCheck",Zye);var Gye=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],lz=X("outline","lock","Lock",Gye);var qye=[["path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2",key:"svg-0"}],["path",{d:"M9 12h12l-3 -3",key:"svg-1"}],["path",{d:"M18 15l3 -3",key:"svg-2"}]],cz=X("outline","logout","Logout",qye);var Kye=[["path",{d:"M4 8v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M4 16v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M16 20h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],dz=X("outline","maximize","Maximize",Kye);var Xye=[["path",{d:"M8 9h8",key:"svg-0"}],["path",{d:"M8 13h6",key:"svg-1"}],["path",{d:"M12.01 18.594l-4.01 2.406v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v5.5",key:"svg-2"}],["path",{d:"M16 19h6",key:"svg-3"}],["path",{d:"M19 16v6",key:"svg-4"}]],uz=X("outline","message-plus","MessagePlus",Xye);var Qye=[["path",{d:"M15 19v-2a2 2 0 0 1 2 -2h2",key:"svg-0"}],["path",{d:"M15 5v2a2 2 0 0 0 2 2h2",key:"svg-1"}],["path",{d:"M5 15h2a2 2 0 0 1 2 2v2",key:"svg-2"}],["path",{d:"M5 9h2a2 2 0 0 0 2 -2v-2",key:"svg-3"}]],fz=X("outline","minimize","Minimize",Qye);var Yye=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008",key:"svg-0"}]],_b=X("outline","moon","Moon",Yye);var Jye=[["path",{d:"M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4",key:"svg-0"}],["path",{d:"M13.5 6.5l4 4",key:"svg-1"}]],Ib=X("outline","pencil","Pencil",Jye);var e_e=[["path",{d:"M7 4v16l13 -8l-13 -8",key:"svg-0"}]],qk=X("outline","player-play","PlayerPlay",e_e);var t_e=[["path",{d:"M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10",key:"svg-0"}]],mz=X("outline","player-stop","PlayerStop",t_e);var r_e=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M5 12l14 0",key:"svg-1"}]],cl=X("outline","plus","Plus",r_e);var o_e=[["path",{d:"M7 6a7.75 7.75 0 1 0 10 0",key:"svg-0"}],["path",{d:"M12 4l0 8",key:"svg-1"}]],pz=X("outline","power","Power",o_e);var n_e=[["path",{d:"M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4",key:"svg-0"}],["path",{d:"M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4",key:"svg-1"}]],wb=X("outline","refresh","Refresh",n_e);var i_e=[["path",{d:"M3.06 13a9 9 0 1 0 .49 -4.087",key:"svg-0"}],["path",{d:"M3 4.001v5h5",key:"svg-1"}],["path",{d:"M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-2"}]],hz=X("outline","restore","Restore",i_e);var a_e=[["path",{d:"M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]],gz=X("outline","robot","Robot",a_e);var s_e=[["path",{d:"M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]],cn=X("outline","search","Search",s_e);var l_e=[["path",{d:"M3 7a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-2",key:"svg-0"}],["path",{d:"M3 15a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -2",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}],["path",{d:"M11 8h6",key:"svg-4"}],["path",{d:"M11 16h6",key:"svg-5"}]],vz=X("outline","server-2","Server2",l_e);var c_e=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],xz=X("outline","settings","Settings",c_e);var d_e=[["path",{d:"M12 3a12 12 0 0 0 8.5 3a12 12 0 0 1 -8.5 15a12 12 0 0 1 -8.5 -15a12 12 0 0 0 8.5 -3",key:"svg-0"}],["path",{d:"M11 11a1 1 0 1 0 2 0a1 1 0 1 0 -2 0",key:"svg-1"}],["path",{d:"M12 12l0 2.5",key:"svg-2"}]],bz=X("outline","shield-lock","ShieldLock",d_e);var u_e=[["path",{d:"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245",key:"svg-0"}]],yz=X("outline","star","Star",u_e);var f_e=[["path",{d:"M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],_z=X("outline","sun","Sun",f_e);var m_e=[["path",{d:"M8 9l3 3l-3 3",key:"svg-0"}],["path",{d:"M13 15l3 0",key:"svg-1"}],["path",{d:"M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12",key:"svg-2"}]],Ai=X("outline","terminal-2","Terminal2",m_e);var p_e=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M21 12h-6",key:"svg-2"}]],Iz=X("outline","text-decrease","TextDecrease",p_e);var h_e=[["path",{d:"M4 19v-10.5a3.5 3.5 0 1 1 7 0v10.5",key:"svg-0"}],["path",{d:"M4 13h7",key:"svg-1"}],["path",{d:"M18 9v6",key:"svg-2"}],["path",{d:"M21 12h-6",key:"svg-3"}]],wz=X("outline","text-increase","TextIncrease",h_e);var g_e=[["path",{d:"M7 10h3v-3l-3.5 -3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1 -3 3l-6 -6a6 6 0 0 1 -8 -8l3.5 3.5",key:"svg-0"}]],Sb=X("outline","tool","Tool",g_e);var v_e=[["path",{d:"M4 7l16 0",key:"svg-0"}],["path",{d:"M10 11l0 6",key:"svg-1"}],["path",{d:"M14 11l0 6",key:"svg-2"}],["path",{d:"M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12",key:"svg-3"}],["path",{d:"M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3",key:"svg-4"}]],Qc=X("outline","trash","Trash",v_e);var x_e=[["path",{d:"M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]],Sz=X("outline","users","Users",x_e);var b_e=[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]],Ju=X("outline","x","X",b_e);var kb=b(D(),1);var at=b(O(),1);function y_e(){let e=navigator.userAgent;return/iPhone/.test(e)?"iPhone":/iPad/.test(e)?"iPad":/Android/.test(e)?/Mobile/.test(e)?"Android phone":"Android tablet":/Macintosh/.test(e)?"Mac":/Windows/.test(e)?"Windows PC":"Device"}function __e({text:e}){return(0,at.jsxs)("span",{className:"command-chip",children:[e,(0,at.jsx)(jI,{value:e,children:({copied:t,copy:r})=>(0,at.jsx)(ht,{label:t?"Copied":"Copy",children:(0,at.jsx)(xt,{size:"sm","aria-label":"Copy "+e,onClick:r,children:t?(0,at.jsx)(fb,{size:14}):(0,at.jsx)(W3,{size:14})})})})]})}function I_e(){return(0,at.jsxs)(Ne,{gap:"md",align:"center",ta:"center",children:[(0,at.jsx)(Ka,{size:48,radius:"md",variant:"light",children:(0,at.jsx)(lz,{size:24,stroke:1.6})}),(0,at.jsxs)(Ne,{gap:6,align:"center",children:[(0,at.jsx)(Xn,{order:2,children:"Sign in to Sandbox"}),(0,at.jsx)(ge,{c:"dimmed",size:"sm",maw:340,children:"For your security, the web UI opens signed in from a terminal on this PC. Run:"})]}),(0,at.jsx)(__e,{text:"sandbox web open"}),(0,at.jsxs)(ge,{c:"dimmed",size:"xs",maw:340,children:["Another Windows user of this PC, if the owner allowed it, runs"," ",(0,at.jsx)(ge,{span:!0,ff:"monospace",size:"xs",children:"sandbox remote --browser"})," ","instead."]})]})}function w_e({onSignedIn:e}){let[t,r]=(0,kb.useState)(""),[n,o]=(0,kb.useState)(y_e),[i,a]=(0,kb.useState)(null),[s,l]=(0,kb.useState)(!1),c=async()=>{l(!0),a(null);try{await fh.pair(t,n),e()}catch(d){a(d instanceof Error?d.message:"Sign-in failed. Check the code and try again.")}finally{l(!1)}};return(0,at.jsx)("form",{onSubmit:d=>{d.preventDefault(),c()},children:(0,at.jsxs)(Ne,{gap:"sm",children:[(0,at.jsxs)(Ne,{gap:4,align:"center",ta:"center",children:[(0,at.jsx)(Ka,{size:48,radius:"md",variant:"light",children:(0,at.jsx)(q3,{size:24,stroke:1.6})}),(0,at.jsx)(Xn,{order:2,mt:6,children:"Sign in this device"}),(0,at.jsx)(ge,{c:"dimmed",size:"sm",children:"On the PC, open Remote access and choose Allow a new device, then enter the code it shows."})]}),(0,at.jsx)(Rt,{label:"Pairing code",placeholder:"ABCD-EFGH",value:t,onChange:d=>r(d.currentTarget.value.toUpperCase()),autoCapitalize:"characters",autoComplete:"one-time-code",spellCheck:!1,maxLength:12,styles:{input:{fontFamily:"var(--mantine-font-family-monospace)",letterSpacing:2,fontSize:20}},"data-autofocus":!0}),(0,at.jsx)(Rt,{label:"Name for this device",description:"Shown in the PC\u2019s list of devices.",value:n,onChange:d=>o(d.currentTarget.value),maxLength:40}),i&&(0,at.jsx)(Cn,{color:"red",variant:"light",children:i}),(0,at.jsx)(lt,{type:"submit",loading:s,disabled:t.replace(/[\s-]/g,"").length!==8,children:"Sign in"}),(0,at.jsx)(ge,{c:"dimmed",size:"xs",ta:"center",children:"A certificate warning the first time is expected. If it appears again later, stop and ask the owner of the PC."})]})})}function DY({onSignedIn:e}){let t=location.protocol==="https:"||location.hash==="#device";return(0,at.jsx)("main",{className:"signin-page",children:(0,at.jsxs)(Ne,{gap:"lg",align:"center",w:"100%",maw:420,children:[(0,at.jsxs)(Ce,{gap:10,children:[(0,at.jsx)("div",{className:"brand-mark","aria-hidden":"true",children:(0,at.jsx)(Xc,{size:16,stroke:2})}),(0,at.jsx)(ge,{fw:650,children:"Sandbox"})]}),(0,at.jsx)(wr,{w:"100%",p:"xl",children:t?(0,at.jsx)(w_e,{onSignedIn:e}):(0,at.jsx)(I_e,{})})]})})}var Bi=b(D(),1);var nJ=b(D(),1);var Kk=b(D(),1),S_e="sessions";function k_e(e,t=""){let r=/^\/s\/([A-Za-z0-9_-]{1,64})\/?$/.exec(e);if(r)return{page:"terminal",id:r[1]};let n=/^\/v\/([a-z][a-z0-9-]{0,40})\/?$/.exec(e),o=Object.fromEntries(new URLSearchParams(t));return{page:"view",view:n?n[1]:S_e,params:o}}function Io(e,t={}){let r=new URLSearchParams(t).toString();return"/v/"+e+(r?"?"+r:"")}function $r(e){history.pushState(null,"",e),window.dispatchEvent(new PopStateEvent("popstate"))}function RY(){let[e,t]=(0,Kk.useState)({path:location.pathname,search:location.search});return(0,Kk.useEffect)(()=>{let r=()=>t({path:location.pathname,search:location.search});return window.addEventListener("popstate",r),()=>window.removeEventListener("popstate",r)},[]),k_e(e.path,e.search)}var us=b(D(),1);var Yk=b(D(),1);var ds=b(D(),1);var _t=b(O(),1),C_e={ask:()=>Promise.resolve(void 0)};function TY(e,t){if(!t||!/^[A-Za-z]:\\|^\\\\/.test(t))return;if(e==="dir")return t;let r=t.lastIndexOf("\\");return r>2?t.slice(0,r):t.slice(0,3)}function P_e({kind:e,initial:t,done:r}){let n=Qk(),[o,i]=(0,ds.useState)(null),[a,s]=(0,ds.useState)(TY(e,t)??""),[l,c]=(0,ds.useState)(e==="file"?t??null:null),[d,u]=(0,ds.useState)(null),[f,m]=(0,ds.useState)(!1),p=(0,ds.useCallback)(v=>{m(!0),u(null),D_e(n,v,e==="file").then(x=>{i(x),s(x.path),c(null),m(!1)},x=>{u(x instanceof Error?x.message:"That folder cannot be opened."),m(!1)})},[n,e]);(0,ds.useEffect)(()=>p(TY(e,t)),[p,e,t]);let g=e==="dir"?l??o?.path??"":l??"",y=v=>{v.key==="Enter"&&(v.preventDefault(),p(a.trim()||void 0))};return(0,_t.jsxs)(Ne,{gap:"sm",children:[(0,_t.jsxs)(Ce,{gap:"xs",wrap:"nowrap",children:[(0,_t.jsx)(ht,{label:"Up one folder",children:(0,_t.jsx)(xt,{size:"lg",variant:"default","aria-label":"Up one folder",disabled:!o?.path,onClick:()=>p(o?.parent??void 0),children:(0,_t.jsx)(M3,{size:16})})}),(0,_t.jsx)(Rt,{style:{flex:1},value:a,placeholder:"Type a path and press Enter",onChange:v=>s(v.currentTarget.value),onKeyDown:y,ff:"monospace","aria-label":"Folder",rightSection:f?(0,_t.jsx)(ho,{size:14}):null})]}),d&&(0,_t.jsx)(Cn,{color:"red",variant:"light",p:"xs",children:d}),(0,_t.jsxs)(Ce,{align:"stretch",gap:"sm",wrap:"nowrap",children:[(0,_t.jsxs)(Ne,{gap:2,w:170,visibleFrom:"xs",style:{flex:"none"},children:[(0,_t.jsx)(ge,{size:"xs",fw:650,c:"dimmed",tt:"uppercase",px:6,pb:4,children:"Places"}),(o?.places??[]).map(v=>(0,_t.jsxs)("div",{className:"picker-entry",onClick:()=>p(v.path),title:v.path,children:[v.label.endsWith(":")?(0,_t.jsx)(hb,{size:16}):(0,_t.jsx)(gb,{size:16}),(0,_t.jsx)(ge,{size:"sm",truncate:!0,children:v.label})]},v.path))]}),(0,_t.jsxs)(Nr,{className:"picker-list",style:{flex:1},type:"auto",children:[!o?.path&&(0,_t.jsx)(ge,{size:"sm",c:"dimmed",p:"md",children:"Pick a place on the left, or type a path."}),o?.path&&o.entries.length===0&&(0,_t.jsx)(ge,{size:"sm",c:"dimmed",p:"md",children:e==="dir"?"No folders in here.":"Nothing in here."}),o?.entries.map(v=>(0,_t.jsxs)("div",{className:"picker-entry","data-selected":l===v.path,onClick:()=>c(v.path),onDoubleClick:()=>v.kind==="dir"?p(v.path):r(v.path),children:[v.kind==="dir"?(0,_t.jsx)(xb,{size:16,color:"var(--mantine-color-yellow-6)"}):(0,_t.jsx)(oz,{size:16,color:"var(--app-muted)"}),(0,_t.jsx)(ge,{size:"sm",truncate:!0,children:v.name})]},v.path)),o?.truncated&&(0,_t.jsx)(ge,{size:"xs",c:"dimmed",p:"sm",children:"Only the first entries are shown: type the rest of the path."})]})]}),(0,_t.jsxs)(Ce,{justify:"space-between",wrap:"nowrap",gap:"sm",children:[(0,_t.jsx)(ge,{size:"xs",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:g||(e==="file"?"Pick a file":"Pick a folder")}),(0,_t.jsxs)(Ce,{gap:"xs",wrap:"nowrap",style:{flex:"none"},children:[(0,_t.jsx)(lt,{variant:"default",onClick:()=>r(void 0),children:"Cancel"}),(0,_t.jsx)(lt,{disabled:!g,onClick:()=>r(g),children:e==="dir"?"Choose this folder":"Choose"})]})]})]})}function D_e(e,t,r){return e.call("files.browse",{path:t,files:r},C_e)}function Xk(e,t,r){return new Promise(n=>{let o=!1,i=s=>{o||(o=!0,Xa.close(a),n(s))},a=Xa.open({title:r??(e==="dir"?"Choose a folder":"Choose a file"),size:"xl",onClose:()=>i(void 0),children:(0,_t.jsx)(P_e,{kind:e,initial:t,done:i})})})}var Ct=b(O(),1);function EY(e){return e.kind==="confirm"?!1:void 0}function R_e({question:e,said:t,done:r}){let[n,o]=(0,Yk.useState)(e.kind==="text"||e.kind==="path"?e.initial??"":""),[i,a]=(0,Yk.useState)(e.kind==="choose"?e.initial??e.choices[0]?.value??"":""),[s,l]=(0,Yk.useState)(e.kind==="checklist"?[...e.checked??[]]:[]),c=[...t,...e.lines??[]],d="problem"in e?e.problem:void 0,u=e.kind!=="confirm"||!e.typed||n.trim().toLowerCase()===e.typed;return(0,Ct.jsx)("form",{onSubmit:m=>{m.preventDefault(),e.kind==="confirm"?r(u):e.kind==="choose"?r(i):e.kind==="checklist"?r(s):r(n===""&&e.kind==="text"&&!e.allowEmpty?void 0:n)},children:(0,Ct.jsxs)(Ne,{gap:"sm",children:[e.kind==="confirm"&&e.danger?(0,Ct.jsxs)(Ce,{gap:"sm",wrap:"nowrap",align:"flex-start",children:[(0,Ct.jsx)(Ka,{color:"red",variant:"light",size:36,radius:"md",style:{flex:"none"},children:(0,Ct.jsx)(Kc,{size:20,stroke:1.7})}),(0,Ct.jsx)(Ne,{gap:4,style:{minWidth:0},children:c.length?c.map((m,p)=>(0,Ct.jsx)(ge,{size:"sm",children:m},p)):(0,Ct.jsx)(ge,{size:"sm",c:"dimmed",children:"Check that this is what you want before you continue."})})]}):c.map((m,p)=>(0,Ct.jsx)(ge,{size:"sm",children:m},p)),d&&(0,Ct.jsx)(Cn,{color:"orange",variant:"light",p:"xs",children:d}),e.kind==="confirm"&&e.typed&&(0,Ct.jsx)(Rt,{label:'Type "'+e.typed+'" to confirm',value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="choose"&&(0,Ct.jsx)(Ks.Group,{value:i,onChange:a,children:(0,Ct.jsx)(Ne,{gap:"xs",children:e.choices.map(m=>(0,Ct.jsx)(Ks,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="checklist"&&(0,Ct.jsx)(Vs.Group,{value:s,onChange:l,children:(0,Ct.jsx)(Ne,{gap:"xs",children:e.choices.map(m=>(0,Ct.jsx)(Vs,{value:m.value,label:m.label,description:m.description},m.value))})}),e.kind==="text"&&(0,Ct.jsx)(Rt,{value:n,onChange:m=>o(m.currentTarget.value),"data-autofocus":!0}),e.kind==="path"&&(0,Ct.jsxs)(Ce,{gap:"xs",wrap:"nowrap",align:"flex-end",children:[(0,Ct.jsx)(Rt,{style:{flex:1},ff:"monospace",value:n,onChange:m=>o(m.currentTarget.value),description:"The full path of a "+(e.pathKind==="file"?"file":"folder")+" on this PC","data-autofocus":!0}),(0,Ct.jsx)(ht,{label:e.pathKind==="file"?"Choose a file":"Choose a folder",children:(0,Ct.jsx)(xt,{variant:"default",size:36,"aria-label":"Browse",onClick:()=>{Xk(e.pathKind,n||void 0).then(m=>m&&o(m))},children:(0,Ct.jsx)(vb,{size:18,stroke:1.6})})})]}),e.kind==="secret"&&(0,Ct.jsx)(vc,{value:n,onChange:m=>o(m.currentTarget.value),autoComplete:"new-password","data-autofocus":!0}),(0,Ct.jsxs)(Ce,{justify:"flex-end",mt:"xs",children:[(0,Ct.jsx)(lt,{variant:"default",onClick:()=>r(EY(e)),children:"Cancel"}),(0,Ct.jsx)(lt,{type:"submit",color:e.kind==="confirm"&&e.danger?"red":void 0,disabled:!u,children:e.kind==="confirm"?e.yes??"Yes":"Continue"})]})]})})}function $Y(e,t=[]){return new Promise(r=>{let n=!1,o=a=>{n||(n=!0,Xa.close(i),r(a))},i=Xa.open({title:e.title,centered:!0,onClose:()=>o(EY(e)),children:(0,Ct.jsx)(R_e,{question:e,said:t,done:o})})})}var zY=b(O(),1),AY=(0,us.createContext)(null);function OY({client:e,children:t}){return(0,zY.jsx)(AY.Provider,{value:e,children:t})}function Qk(){let e=(0,us.useContext)(AY);if(!e)throw new Error("useRpc needs an RpcProvider");return e}var T_e={ask:()=>Promise.resolve(void 0)};function ga(e,t){let r=Qk(),n=tp(),o=e.live!==void 0,i=JSON.stringify(t??{}),[a,s]=(0,us.useState)(null),l=CT({queryKey:[e.id,i],queryFn:()=>r.call(e.id,t,T_e),enabled:!o});(0,us.useEffect)(()=>{if(o)return r.subscribe(e.id,JSON.parse(i),d=>{s(null),n.setQueryData([e.id,i],d)},s)},[r,n,e.id,i,o]);let c=a??l.error;return{data:l.data,error:c,pending:l.data===void 0&&!c}}function Jk(){let e=Qk(),t=tp();return(0,us.useCallback)(async(r,n={},o={})=>{let i=qc(r.op),a="op-"+Date.now(),s=[],l=!1;try{let c=await e.call(r.op,{...r.input,...n},{progress:f=>{let m={id:a,title:r.label,message:f,loading:!0,autoClose:!1};l?en.update(m):en.show(m),l=!0},log:f=>s.push(f),ask:f=>$Y(f,s.splice(0))}),d=i?.text?.(c)??"Done.",u={id:a,title:o.inline?void 0:r.label,message:d,color:"green",loading:!1,autoClose:i?.keepResult?!1:o.inline?2500:5e3};return l?en.update(u):en.show(u),{ok:!0,text:d,output:c}}catch(c){if(l&&en.hide(a),c instanceof Jx)return{ok:!1,cancelled:!0,message:"Cancelled."};let d=c instanceof Error?c.message:"It did not work.",u=c.fix??(s.length?s.join(" "):void 0);return o.inline||en.show({title:d,message:u,color:"red",autoClose:1e4}),{ok:!1,message:d,fix:u}}finally{await t.invalidateQueries()}},[e,t])}var dn=b(D(),1);var eC=b(D(),1);function E_e(e){if(!/^[0-9a-zA-Z-]+$/.test(e))throw new Error(`[@mantine/use-form] Form name "${e}" is invalid, it should contain only letters, numbers and dashes`)}var $_e=typeof window<"u"?eC.useLayoutEffect:eC.useEffect;function wo(e,t){$_e(()=>{if(e)return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[e])}function NY(e,t){e&&E_e(e),wo(`mantine-form:${e}:set-field-value`,r=>t.setFieldValue(r.detail.path,r.detail.value)),wo(`mantine-form:${e}:set-values`,r=>t.setValues(r.detail)),wo(`mantine-form:${e}:set-initial-values`,r=>t.setInitialValues(r.detail)),wo(`mantine-form:${e}:set-errors`,r=>t.setErrors(r.detail)),wo(`mantine-form:${e}:set-field-error`,r=>t.setFieldError(r.detail.path,r.detail.error)),wo(`mantine-form:${e}:clear-field-error`,r=>t.clearFieldError(r.detail)),wo(`mantine-form:${e}:clear-errors`,t.clearErrors),wo(`mantine-form:${e}:reset`,t.reset),wo(`mantine-form:${e}:validate`,t.validate),wo(`mantine-form:${e}:validate-field`,r=>t.validateField(r.detail)),wo(`mantine-form:${e}:reorder-list-item`,r=>t.reorderListItem(r.detail.path,r.detail.payload)),wo(`mantine-form:${e}:remove-list-item`,r=>t.removeListItem(r.detail.path,r.detail.index)),wo(`mantine-form:${e}:insert-list-item`,r=>t.insertListItem(r.detail.path,r.detail.item,r.detail.index)),wo(`mantine-form:${e}:set-dirty`,r=>t.setDirty(r.detail)),wo(`mantine-form:${e}:set-touched`,r=>t.setTouched(r.detail)),wo(`mantine-form:${e}:reset-dirty`,r=>t.resetDirty(r.detail)),wo(`mantine-form:${e}:reset-touched`,t.resetTouched)}function FY(e){return t=>{if(!t)e(t);else if(typeof t=="function")e(t);else if(typeof t=="object"&&"nativeEvent"in t){let{currentTarget:r}=t;r instanceof HTMLInputElement?r.type==="checkbox"?e(r.checked):e(r.value):(r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&e(r.value)}else e(t)}}var dl=b(D(),1);function Cb(e){return e===null||typeof e!="object"?{}:Object.keys(e).reduce((t,r)=>{let n=e[r];return n!=null&&n!==!1&&(t[r]=n),t},{})}function LY(e){let[t,r]=(0,dl.useState)(Cb(e)),n=(0,dl.useRef)(t),o=(0,dl.useCallback)(l=>{r(c=>{let d=Cb(typeof l=="function"?l(c):l);return n.current=d,d})},[]),i=(0,dl.useCallback)(()=>o({}),[]),a=(0,dl.useCallback)(l=>{n.current[l]!==void 0&&o(c=>{let d={...c};return delete d[l],d})},[t]),s=(0,dl.useCallback)((l,c)=>{c==null||c===!1?a(l):n.current[l]!==c&&o(d=>({...d,[l]:c}))},[t]);return{errorsState:t,setErrors:o,clearErrors:i,setFieldError:s,clearFieldError:a}}var Db=b(D(),1);function Pb(e,t){if(t===null||typeof t!="object")return{};let r={...t};return Object.keys(t).forEach(n=>{n.includes(`${String(e)}.`)&&delete r[n]}),r}function MY(e,t){let r=e.substring(t.length+1).split(".")[0];return parseInt(r,10)}function kz(e,t,r,n){if(t===void 0)return r;let o=`${String(e)}`,i=r;n===-1&&(i=Pb(`${o}.${t}`,i));let a={...i},s=new Set;return Object.entries(i).filter(([l])=>{if(!l.startsWith(`${o}.`))return!1;let c=MY(l,o);return Number.isNaN(c)?!1:c>=t}).forEach(([l,c])=>{let d=MY(l,o),u=l.replace(`${o}.${d}`,`${o}.${d+n}`);a[u]=c,s.add(u),s.has(l)||delete a[l]}),a}function BY(e,{from:t,to:r},n){let o=`${e}.${t}`,i=`${e}.${r}`,a={...n},s=new Set;return Object.keys(n).forEach(l=>{if(s.has(l))return;let c,d;if(l.startsWith(o)?(c=l,d=l.replace(o,i)):l.startsWith(i)&&(c=l.replace(i,o),d=l),c&&d){let u=a[c],f=a[d];f===void 0?delete a[c]:a[c]=f,u===void 0?delete a[d]:a[d]=u,s.add(c),s.add(d)}}),a}function jY(e,t,r){typeof r.value=="object"&&(r.value=ef(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function ef(e){if(typeof e!="object")return e;var t=0,r,n,o,i=Object.prototype.toString.call(e);if(i==="[object Object]"?o=Object.create(e.__proto__||null):i==="[object Array]"?o=Array(e.length):i==="[object Set]"?(o=new Set,e.forEach(function(a){o.add(ef(a))})):i==="[object Map]"?(o=new Map,e.forEach(function(a,s){o.set(ef(s),ef(a))})):i==="[object Date]"?o=new Date(+e):i==="[object RegExp]"?o=new RegExp(e.source,e.flags):i==="[object DataView]"?o=new e.constructor(ef(e.buffer)):i==="[object ArrayBuffer]"?o=e.slice(0):i.slice(-6)==="Array]"&&(o=new e.constructor(e)),o){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)jY(o,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(o,r=n[t])&&o[r]===e[r]||jY(o,r,Object.getOwnPropertyDescriptor(e,r))}return o||e}function tC(e){return typeof e!="string"?[]:e.split(".")}function Ut(e,t){let r=tC(e);if(r.length===0||typeof t!="object"||t===null)return;let n=t[r[0]];for(let o=1;o<r.length&&n!=null;o+=1)n=n[r[o]];return n}function fs(e,t,r){let n=tC(e);if(n.length===0)return r;let o=ef(r);if(n.length===1)return o[n[0]]=t,o;let i=o[n[0]];for(let a=1;a<n.length-1;a+=1){if(i===void 0)return o;i=i[n[a]]}return i[n[n.length-1]]=t,o}function UY(e,{from:t,to:r},n){let o=Ut(e,n);if(!Array.isArray(o))return n;let i=[...o],a=o[t];return i.splice(t,1),i.splice(r,0,a),fs(e,i,n)}function VY(e,t,r,n){let o=Ut(e,n);if(!Array.isArray(o))return n;let i=[...o];return i.splice(typeof r=="number"?r:i.length,0,t),fs(e,i,n)}function HY(e,t,r){let n=Ut(e,r);return Array.isArray(n)?fs(e,n.filter((o,i)=>i!==t),r):r}function WY(e,t,r,n){let o=Ut(e,n);if(!Array.isArray(o)||o.length<=r)return n;let i=[...o];return i[r]=t,fs(e,i,n)}function ZY({$values:e,$errors:t,$status:r}){let n=(0,Db.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>BY(s,l,c)),e.setValues({values:UY(s,l,e.refValues.current),updateState:!0})},[]),o=(0,Db.useCallback)((s,l)=>{r.clearFieldDirty(s),t.setErrors(c=>kz(s,l,c,-1)),e.setValues({values:HY(s,l,e.refValues.current),updateState:!0})},[]),i=(0,Db.useCallback)((s,l,c)=>{r.clearFieldDirty(s),t.setErrors(d=>kz(s,c,d,1)),e.setValues({values:VY(s,l,c,e.refValues.current),updateState:!0})},[]),a=(0,Db.useCallback)((s,l,c)=>{r.clearFieldDirty(s),e.setValues({values:WY(s,c,l,e.refValues.current),updateState:!0})},[]);return{reorderListItem:n,removeListItem:o,insertListItem:i,replaceListItem:a}}var jr=b(D(),1),Rb=b(qY(),1);function ph(e,t){let r=Object.keys(e);if(typeof t=="string"){let n=r.filter(o=>o.startsWith(`${t}.`));return e[t]||n.some(o=>e[o])||!1}return r.some(n=>e[n])}function KY({initialDirty:e,initialTouched:t,mode:r,$values:n}){let[o,i]=(0,jr.useState)(t),[a,s]=(0,jr.useState)(e),l=(0,jr.useRef)(t),c=(0,jr.useRef)(e),d=(0,jr.useCallback)(w=>{let P=typeof w=="function"?w(l.current):w;l.current=P,r==="controlled"&&i(P)},[]),u=(0,jr.useCallback)((w,P=!1)=>{let $=typeof w=="function"?w(c.current):w;c.current=$,(r==="controlled"||P)&&s($)},[]),f=(0,jr.useCallback)(()=>d({}),[]),m=(0,jr.useCallback)(w=>{let P=w?{...n.refValues.current,...w}:n.refValues.current;n.setValuesSnapshot(P),u({})},[]),p=(0,jr.useCallback)((w,P)=>{d($=>ph($,w)===P?$:{...$,[w]:P})},[]),g=(0,jr.useCallback)((w,P,$)=>{u(B=>ph(B,w)===P?B:{...B,[w]:P},$)},[]),y=(0,jr.useCallback)((w,P)=>{let $=ph(c.current,w),B=!(0,Rb.default)(Ut(w,n.getValuesSnapshot()),P),W=Pb(w,c.current);W[w]=B,u(W,$!==B)},[]),v=(0,jr.useCallback)(w=>ph(l.current,w),[]),x=(0,jr.useCallback)(w=>u(P=>{if(typeof w!="string")return P;let $=Pb(w,P);return delete $[w],(0,Rb.default)($,P)?P:$}),[]),_=(0,jr.useCallback)(w=>{if(w){let $=Ut(w,c.current);if(typeof $=="boolean")return $;let B=Ut(w,n.refValues.current),W=Ut(w,n.valuesSnapshot.current);return!(0,Rb.default)(B,W)}return Object.keys(c.current).length>0?ph(c.current):!(0,Rb.default)(n.refValues.current,n.valuesSnapshot.current)},[]),I=(0,jr.useCallback)(()=>c.current,[]),S=(0,jr.useCallback)(()=>l.current,[]);return{touchedState:o,dirtyState:a,touchedRef:l,dirtyRef:c,setTouched:d,setDirty:u,resetDirty:m,resetTouched:f,isTouched:v,setFieldTouched:p,setFieldDirty:g,setTouchedState:i,setDirtyState:s,clearFieldDirty:x,isDirty:_,getDirty:I,getTouched:S,setCalculatedFieldDirty:y}}var zn=b(D(),1);function XY({initialValues:e,onValuesChange:t,mode:r}){let n=(0,zn.useRef)(!1),[o,i]=(0,zn.useState)(e||{}),a=(0,zn.useRef)(o),s=(0,zn.useRef)(o),l=(0,zn.useCallback)(({values:g,subscribers:y,updateState:v=!0,mergeWithPreviousValues:x=!0})=>{let _=a.current,I=g instanceof Function?g(a.current):g,S=x?{..._,...I}:I;a.current=S,v&&i(S),t?.(S,_),y?.filter(Boolean).forEach(w=>w({updatedValues:S,previousValues:_}))},[t]),c=(0,zn.useCallback)(g=>{let y=Ut(g.path,a.current),v=g.value instanceof Function?g.value(y):g.value;if(y!==v){let x=a.current,_=fs(g.path,v,a.current);l({values:_,updateState:g.updateState}),g.subscribers?.filter(Boolean).forEach(I=>I({path:g.path,updatedValues:_,previousValues:x}))}},[l]),d=(0,zn.useCallback)(g=>{s.current=g},[]),u=(0,zn.useCallback)((g,y)=>{n.current||(n.current=!0,l({values:g,updateState:r==="controlled"}),d(g),y())},[l]),f=(0,zn.useCallback)(()=>{l({values:s.current,updateState:!0,mergeWithPreviousValues:!1})},[l]),m=(0,zn.useCallback)(()=>a.current,[]),p=(0,zn.useCallback)(()=>s.current,[]);return{initialized:n,stateValues:o,refValues:a,valuesSnapshot:s,setValues:l,setFieldValue:c,resetValues:f,setValuesSnapshot:d,initialize:u,getValues:m,getValuesSnapshot:p}}var tf=b(D(),1);function QY({$status:e}){let t=(0,tf.useRef)({}),r=(0,tf.useCallback)((o,i)=>{(0,tf.useEffect)(()=>(t.current[o]=t.current[o]||[],t.current[o].push(i),()=>{t.current[o]=t.current[o].filter(a=>a!==i)}),[i])},[]),n=(0,tf.useCallback)(o=>t.current[o]?t.current[o].map(i=>a=>i({previousValue:Ut(o,a.previousValues),value:Ut(o,a.updatedValues),touched:e.isTouched(o),dirty:e.isDirty(o)})):[],[]);return{subscribers:t,watch:r,getFieldSubscribers:n}}function Cz(e,t){return e?`${e}-${t.toString()}`:t.toString()}var rC=Symbol("root-rule");function YY(e){let t=Cb(e);return{hasErrors:Object.keys(t).length>0,errors:t}}function Pz(e,t,r="",n={}){return typeof e!="object"||e===null?n:Object.keys(e).reduce((o,i)=>{let a=e[i],s=`${r===""?"":`${r}.`}${i}`,l=Ut(s,t),c=!1;return typeof a=="function"&&(o[s]=a(l,t,s)),typeof a=="object"&&Array.isArray(l)&&(c=!0,l.forEach((d,u)=>Pz(a,t,`${s}.${u}`,o)),rC in a&&(o[s]=a[rC](l,t,s))),typeof a=="object"&&typeof l=="object"&&l!==null&&(c||Pz(a,t,s,o),rC in a&&(o[s]=a[rC](l,t,s))),o},n)}function Tb(e,t){return YY(typeof e=="function"?e(t):Pz(e,t))}function Eb(e,t,r){if(typeof e!="string")return{hasError:!1,error:null};let n=Tb(t,r),o=Object.keys(n.errors).find(i=>e.split(".").every((a,s)=>a===i.split(".")[s]));return{hasError:!!o,error:o?n.errors[o]:null}}var JY="__MANTINE_FORM_INDEX__";function Dz(e,t){return t?typeof t=="boolean"?t:Array.isArray(t)?t.includes(e.replace(/[.][0-9]+/g,`.${JY}`)):!1:!1}function Rz({name:e,mode:t="controlled",initialValues:r,initialErrors:n={},initialDirty:o={},initialTouched:i={},clearInputErrorOnChange:a=!0,validateInputOnChange:s=!1,validateInputOnBlur:l=!1,onValuesChange:c,transformValues:d=g=>g,enhanceGetInputProps:u,validate:f,onSubmitPreventDefault:m="always",touchTrigger:p="change"}={}){let g=LY(n),y=XY({initialValues:r,onValuesChange:c,mode:t}),v=KY({initialDirty:o,initialTouched:i,$values:y,mode:t}),x=ZY({$values:y,$errors:g,$status:v}),_=QY({$status:v}),[I,S]=(0,dn.useState)(0),[w,P]=(0,dn.useState)({}),[$,B]=(0,dn.useState)(!1),W=(0,dn.useCallback)(()=>{y.resetValues(),g.clearErrors(),v.resetDirty(),v.resetTouched(),t==="uncontrolled"&&S(Y=>Y+1)},[]),H=(0,dn.useCallback)(Y=>{a&&g.clearErrors(),t==="uncontrolled"&&S(ne=>ne+1),Object.keys(_.subscribers.current).forEach(ne=>{let we=Ut(ne,y.refValues.current),se=Ut(ne,Y);we!==se&&_.getFieldSubscribers(ne).forEach(Ae=>Ae({previousValues:Y,updatedValues:y.refValues.current}))})},[a]),K=(0,dn.useCallback)(Y=>{let ne=y.refValues.current;y.initialize(Y,()=>t==="uncontrolled"&&S(we=>we+1)),H(ne)},[H]),T=(0,dn.useCallback)((Y,ne,we)=>{let se=Dz(Y,s),Ae=ne instanceof Function?ne(Ut(Y,y.refValues.current)):ne;v.setCalculatedFieldDirty(Y,Ae),p==="change"&&v.setFieldTouched(Y,!0),!se&&a&&g.clearFieldError(Y),y.setFieldValue({path:Y,value:ne,updateState:t==="controlled",subscribers:[..._.getFieldSubscribers(Y),se?He=>{let et=Eb(Y,f,He.updatedValues);et.hasError?g.setFieldError(Y,et.error):g.clearFieldError(Y)}:null,we?.forceUpdate!==!1&&t!=="controlled"?()=>P(He=>({...He,[Y]:(He[Y]||0)+1})):null]})},[c,f]),k=(0,dn.useCallback)(Y=>{let ne=y.refValues.current;y.setValues({values:Y,updateState:t==="controlled"}),H(ne)},[c,H]),E=(0,dn.useCallback)(()=>{let Y=Tb(f,y.refValues.current);return g.setErrors(Y.errors),Y},[f]),C=(0,dn.useCallback)(Y=>{let ne=Eb(Y,f,y.refValues.current);return ne.hasError?g.setFieldError(Y,ne.error):g.clearFieldError(Y),ne},[f]),A=(Y,{type:ne="input",withError:we=!0,withFocus:se=!0,...Ae}={})=>{let et={onChange:FY(dt=>T(Y,dt,{forceUpdate:!1})),"data-path":Cz(e,Y)};return we&&(et.error=g.errorsState[Y]),ne==="checkbox"?et[t==="controlled"?"checked":"defaultChecked"]=Ut(Y,y.refValues.current):et[t==="controlled"?"value":"defaultValue"]=Ut(Y,y.refValues.current),se&&(et.onFocus=()=>v.setFieldTouched(Y,!0),et.onBlur=()=>{if(Dz(Y,l)){let dt=Eb(Y,f,y.refValues.current);dt.hasError?g.setFieldError(Y,dt.error):g.clearFieldError(Y)}}),Object.assign(et,u?.({inputProps:et,field:Y,options:{type:ne,withError:we,withFocus:se,...Ae},form:pe}))},R=(Y,ne)=>we=>{m==="always"&&we?.preventDefault();let se=E();if(se.hasErrors)m==="validation-failed"&&we?.preventDefault(),ne?.(se.errors,y.refValues.current,we);else{let Ae=Y?.(d(y.refValues.current),we);Ae instanceof Promise&&(B(!0),Ae.finally(()=>B(!1)))}},N=Y=>d(Y||y.refValues.current),U=(0,dn.useCallback)(Y=>{Y.preventDefault(),W()},[]),G=(0,dn.useCallback)(Y=>Y?!Eb(Y,f,y.refValues.current).hasError:!Tb(f,y.refValues.current).hasErrors,[f]),oe=Y=>`${I}-${Y}-${w[Y]||0}`,ve=(0,dn.useCallback)(Y=>document.querySelector(`[data-path="${Cz(e,Y)}"]`),[]),pe={watch:_.watch,initialized:y.initialized.current,values:y.stateValues,getValues:y.getValues,getInitialValues:y.getValuesSnapshot,setInitialValues:y.setValuesSnapshot,initialize:K,setValues:k,setFieldValue:T,submitting:$,setSubmitting:B,errors:g.errorsState,setErrors:g.setErrors,setFieldError:g.setFieldError,clearFieldError:g.clearFieldError,clearErrors:g.clearErrors,resetDirty:v.resetDirty,setTouched:v.setTouched,setDirty:v.setDirty,isTouched:v.isTouched,resetTouched:v.resetTouched,isDirty:v.isDirty,getTouched:v.getTouched,getDirty:v.getDirty,reorderListItem:x.reorderListItem,insertListItem:x.insertListItem,removeListItem:x.removeListItem,replaceListItem:x.replaceListItem,reset:W,validate:E,validateField:C,getInputProps:A,onSubmit:R,onReset:U,isValid:G,getTransformedValues:N,key:oe,getInputNode:ve};return NY(e,pe),pe}function eJ(e,t){return r=>{try{return Cp(e,r),{}}catch(n){if(n instanceof lx){let o={};return t?.errorPriority==="first"&&n.issues.reverse(),n.issues.forEach(i=>{o[i.path.join(".")]=i.message}),o}throw n}}}var $b=b(D(),1);var Pe=b(O(),1),oC="@custom";function tJ(e){return(e.choices??[]).map(t=>({value:String(t.value),label:t.label}))}function rJ(e,t){return e.choices?.find(r=>String(r.value)===t)?.value}function A_e({field:e,value:t,onChange:r,error:n}){let o=e.choices?.some(l=>l.value===t)??!1,[i,a]=(0,$b.useState)(!o&&t!==void 0&&e.open!==void 0),s=[...tJ(e),...e.open?[{value:oC,label:"Custom\u2026"}]:[]];return(0,Pe.jsxs)(Ne,{gap:"xs",children:[(0,Pe.jsx)(Kn,{label:e.label,description:e.help,data:s,value:i?oC:o?String(t):null,error:i?void 0:n,allowDeselect:!1,onChange:l=>{a(l===oC),l!==oC&&r(rJ(e,l))}}),i&&e.open&&(0,Pe.jsx)(iC,{field:{...e.open,label:"Your own value",help:void 0},value:t,onChange:r,error:n})]})}function Ab({field:e,value:t,onPick:r}){let n=e.pathKind??e.element?.pathKind??"dir";return(0,Pe.jsx)(ht,{label:n==="file"?"Choose a file":"Choose a folder",children:(0,Pe.jsx)(xt,{variant:"default",size:32,"aria-label":"Browse",onClick:()=>{Xk(n,t,e.label).then(o=>o&&r(o))},children:(0,Pe.jsx)(vb,{size:18,stroke:1.6})})})}function oJ({field:e,value:t,onChange:r}){let n=t&&typeof t=="object"&&!Array.isArray(t)?t:{};return(0,Pe.jsx)(Ne,{gap:"xs",children:(e.fields??[]).map(o=>(0,Pe.jsx)(iC,{field:o,value:n[o.name],onChange:i=>{let a={...n};i===void 0||i===""?delete a[o.name]:a[o.name]=i,r(a)}},o.name))})}function O_e({field:e,value:t,onChange:r,error:n}){let o=Array.isArray(t)?t:[],i=e.element,a=s=>r(s);return(0,Pe.jsxs)(Ne,{gap:"xs",children:[(0,Pe.jsxs)("div",{children:[(0,Pe.jsx)(ge,{size:"sm",fw:500,children:e.label}),e.help&&(0,Pe.jsx)(ge,{size:"xs",c:"dimmed",children:e.help})]}),o.length===0&&(0,Pe.jsx)(ge,{size:"sm",c:"dimmed",fs:"italic",children:"None yet."}),o.map((s,l)=>(0,Pe.jsxs)(wr,{padding:"sm",withBorder:!0,children:[(0,Pe.jsxs)(Ce,{justify:"space-between",align:"center",mb:6,children:[(0,Pe.jsxs)(ge,{size:"xs",c:"dimmed",fw:500,children:[i.label," ",l+1]}),(0,Pe.jsx)(lt,{size:"compact-xs",variant:"subtle",color:"red",leftSection:(0,Pe.jsx)(Qc,{size:13}),onClick:()=>a(o.filter((c,d)=>d!==l)),children:"Remove"})]}),(0,Pe.jsx)(oJ,{field:i,value:s,onChange:c=>a(o.map((d,u)=>u===l?c:d))})]},l)),(0,Pe.jsx)(Ce,{children:(0,Pe.jsx)(lt,{size:"xs",variant:"default",leftSection:(0,Pe.jsx)(cl,{size:14}),onClick:()=>a([...o,{}]),children:"Add"})}),n&&(0,Pe.jsx)(ge,{size:"xs",c:"red",children:n})]})}function z_e({field:e,value:t,onChange:r,error:n}){let o=t&&typeof t=="object"&&!Array.isArray(t)?t:{},[i,a]=(0,$b.useState)(()=>Object.entries(o).map(([c,d])=>[c,String(d)])),s=e.element?.kind==="secret",l=c=>{a(c),r(Object.fromEntries(c.filter(([d])=>d.trim()!=="").map(([d,u])=>[d.trim(),u])))};return(0,Pe.jsxs)(Ne,{gap:"xs",children:[(0,Pe.jsxs)("div",{children:[(0,Pe.jsx)(ge,{size:"sm",fw:500,children:e.label}),e.help&&(0,Pe.jsx)(ge,{size:"xs",c:"dimmed",children:e.help})]}),i.map(([c,d],u)=>(0,Pe.jsxs)(Ce,{gap:"xs",wrap:"nowrap",align:"center",children:[(0,Pe.jsx)(Rt,{placeholder:"NAME",value:c,style:{flex:"0 0 38%"},styles:{input:{fontFamily:"var(--mantine-font-family-monospace)"}},onChange:f=>l(i.map((m,p)=>p===u?[f.currentTarget.value,m[1]]:m))}),s?(0,Pe.jsx)(vc,{placeholder:"value",value:d,style:{flex:1},autoComplete:"off",onChange:f=>l(i.map((m,p)=>p===u?[m[0],f.currentTarget.value]:m))}):(0,Pe.jsx)(Rt,{placeholder:"value",value:d,style:{flex:1},onChange:f=>l(i.map((m,p)=>p===u?[m[0],f.currentTarget.value]:m))}),(0,Pe.jsx)(ht,{label:"Remove",children:(0,Pe.jsx)(xt,{color:"red","aria-label":"Remove",onClick:()=>l(i.filter((f,m)=>m!==u)),children:(0,Pe.jsx)(Qc,{size:15})})})]},u)),(0,Pe.jsx)(Ce,{children:(0,Pe.jsx)(lt,{size:"xs",variant:"default",leftSection:(0,Pe.jsx)(cl,{size:14}),onClick:()=>a([...i,["",""]]),children:"Add"})}),n&&(0,Pe.jsx)(ge,{size:"xs",c:"red",children:n})]})}function nC({field:e,value:t,onChange:r,error:n}){let[o,i]=(0,$b.useState)(t===void 0?"":JSON.stringify(t,null,2)),[a,s]=(0,$b.useState)();return(0,Pe.jsx)(_v,{label:e.label,description:e.help,value:o,error:a??n,formatOnBlur:!0,autosize:!0,minRows:3,onChange:l=>{i(l);try{r(l.trim()===""?void 0:JSON.parse(l)),s(void 0)}catch{s("This is not valid JSON yet.")}}})}function iC(e){let{field:t,value:r,onChange:n,error:o}=e,i={label:t.label,description:t.help,error:o};switch(t.kind){case"boolean":return(0,Pe.jsx)(qa,{label:t.label,description:t.help,checked:r===!0,error:o,onChange:a=>n(a.currentTarget.checked)});case"enum":return(0,Pe.jsx)(A_e,{...e});case"number":return(0,Pe.jsx)(lu,{...i,value:typeof r=="number"?r:"",min:t.min,max:t.max,allowDecimal:!t.integer,placeholder:t.range,onChange:a=>n(typeof a=="number"?a:void 0)});case"secret":return(0,Pe.jsx)(vc,{...i,value:typeof r=="string"?r:"",placeholder:"Type a new value",autoComplete:"off",onChange:a=>n(a.currentTarget.value)});case"path":return(0,Pe.jsxs)(Ce,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,Pe.jsx)(Rt,{...i,style:{flex:1},styles:{input:{fontFamily:"var(--mantine-font-family-monospace)"}},placeholder:t.literals?.length?t.literals.join(" or ")+", or a path":"C:\\\u2026",value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)}),(0,Pe.jsx)(Ab,{field:t,value:typeof r=="string"?r:void 0,onPick:n})]});case"text":return(0,Pe.jsx)(Rt,{...i,value:typeof r=="string"?r:"",onChange:a=>n(a.currentTarget.value)});case"list":{let a=Array.isArray(r)?r.map(s=>String(s)):[];return t.element?.kind==="enum"?(0,Pe.jsx)(iu,{...i,data:tJ(t.element),value:a,onChange:s=>n(s.map(l=>rJ(t.element,l)??l))}):t.element?.kind==="path"?(0,Pe.jsxs)(Ce,{gap:"xs",align:"flex-end",wrap:"nowrap",children:[(0,Pe.jsx)(Ic,{...i,style:{flex:1},value:a,onChange:n,clearable:!0}),(0,Pe.jsx)(Ab,{field:t,value:void 0,onPick:s=>n(a.includes(s)?a:[...a,s])})]}):t.element?.kind==="text"?(0,Pe.jsx)(Ic,{...i,value:a,onChange:n,clearable:!0}):t.element?.kind==="object"&&t.element.fields?.length?(0,Pe.jsx)(O_e,{...e}):(0,Pe.jsx)(nC,{...e})}case"object":return t.fields?.length?(0,Pe.jsx)(oJ,{...e}):(0,Pe.jsx)(nC,{...e});case"map":return t.element?.kind==="text"||t.element?.kind==="secret"?(0,Pe.jsx)(z_e,{...e}):(0,Pe.jsx)(nC,{...e});default:return(0,Pe.jsx)(nC,{...e})}}var ul=b(O(),1);function N_e(e){let t=qc(e.op)?.input,r=(e.fields??[]).map(o=>o.name);if(!(t instanceof h.ZodObject)||!r.length)return;let n=t.shape;return h.object(Object.fromEntries(r.filter(o=>n[o]).map(o=>[o,n[o]])))}function F_e(e){return e.inline||!e.label?"Save":e.label.replace(/\s*(…|\.\.\.)$/,"")}function L_e({action:e,submit:t,cancel:r}){let n=e.fields??[],o=N_e(e),i=o?eJ(o):void 0,a=Rz({mode:"controlled",initialValues:{...e.initial},validate:s=>{let l={};for(let c of n){let d=X1(c,s[c.name]);d&&(l[c.name]=d)}return{...i?i(s):{},...l}}});return(0,ul.jsx)("form",{onSubmit:a.onSubmit(t),children:(0,ul.jsxs)(Ne,{gap:"md",children:[n.map(s=>(0,ul.jsx)(iC,{field:s,value:a.values[s.name],error:a.errors[s.name],onChange:l=>a.setFieldValue(s.name,l)},s.name)),(0,ul.jsxs)(Ce,{justify:"flex-end",children:[(0,ul.jsx)(lt,{variant:"default",onClick:r,children:"Cancel"}),(0,ul.jsx)(lt,{type:"submit",color:e.danger?"red":void 0,children:F_e(e)})]})]})})}function aC(e){return new Promise(t=>{let r=!1,n=a=>{r||(r=!0,Xa.close(i),t(a))},o=e.fields??[],i=Xa.open({title:o.length===1?o[0].label:e.label,centered:!0,onClose:()=>n(void 0),children:(0,ul.jsx)(L_e,{action:e,submit:n,cancel:()=>n(void 0)})})})}var No=b(O(),1),M_e={attach:Ai,open:Ai,start:qk,stop:mz,restart:wb,reopen:wb,reset:hz,make:yz,remove:Qc,delete:Qc,edit:Ib,change:Ib,show:Y3,hide:Q3,add:cl,new:cl,forget:Ju,include:H3,exclude:V3,rename:Ib,use:fb,save:hb,choose:Gk,close:Ju,end:Ju,sign:cz,check:wb,update:pb,roll:F3,export:J3,import:ez,allow:G3,turn:pz,move:nz,clean:Qc,run:qk,repair:Sb,request:uz,map:bb,pick:Gk};function B_e(e){let t=e?.session;return typeof t=="string"?t:void 0}function Tz(e){let t=(e.verb??e.label).split(/\s+/)[0].toLowerCase();return M_e[t]}function rf(e){return e.kind==="operation"&&e.danger===!0}function Oi(e){return e!==void 0&&!(e.kind==="link"&&e.target.kind==="command")&&kY(e)}function of(){let e=Jk();return(0,nJ.useCallback)(async t=>{if(t.kind==="operation"){let n=t.fields?.length?await aC(t):{};if(!n)return;let o=await e(t,n),i=o.ok?qc(t.op)?.opens?.(o.output):void 0;return i?.kind==="terminal"&&$r("/s/"+i.session),o}let r=t.target;if(r.kind==="terminal")$r("/s/"+r.session);else if(r.kind==="start-agent"){let n={kind:"operation",op:"agents.start",label:"Start "+r.agent,input:{agent:r.agent}},o=await e(n),i=o.ok?B_e(o.output):void 0;return i&&$r("/s/"+i),o}else r.kind==="view"&&$r(Io(r.view,r.params))},[e])}function fl({action:e,primary:t=!1,...r}){let n=of();if(!Oi(e))return null;let o=rf(e),i=Tz(e),a=o?r.variant==="subtle"?"subtle":"default":t?"filled":r.variant,s=(0,No.jsx)(lt,{leftSection:i?(0,No.jsx)(i,{size:16,stroke:1.8}):void 0,onClick:l=>{l.stopPropagation(),n(e)},...r,variant:a??"default",color:o?"red":r.color,className:o?"danger-button":void 0,children:e.label});return e.description?(0,No.jsx)(ht,{label:e.description,children:s}):s}function iJ({action:e}){let t=of();if(!Oi(e))return null;let r=Tz(e);return r?(0,No.jsx)(ht,{label:e.label,children:(0,No.jsx)(xt,{"aria-label":e.label,color:rf(e)?"red":"gray",onClick:n=>{n.stopPropagation(),t(e)},children:(0,No.jsx)(r,{size:16,stroke:1.7})})}):(0,No.jsx)(lt,{size:"compact-sm",variant:"default",className:rf(e)?"danger-button":void 0,color:rf(e)?"red":void 0,onClick:n=>{n.stopPropagation(),t(e)},children:e.label})}function aJ({actions:e}){let t=of(),r=e.filter(Oi);return r.length?(0,No.jsxs)(Jr,{position:"bottom-end",children:[(0,No.jsx)(Jr.Target,{children:(0,No.jsx)(xt,{"aria-label":"More actions",onClick:n=>n.stopPropagation(),children:(0,No.jsx)(X3,{size:16})})}),(0,No.jsx)(Jr.Dropdown,{children:r.map((n,o)=>{let i=Tz(n);return(0,No.jsx)(Jr.Item,{color:rf(n)?"red":void 0,leftSection:i?(0,No.jsx)(i,{size:15}):void 0,onClick:()=>{t(n)},children:n.label},o)})})]}):null}var sC=b(O(),1),lC={Agents:gz,Sessions:Ai,Activity:O3,Sandbox:Xc,Overview:sz,Projects:bb,Apps:N3,Settings:xz,Accounts:Sz,"Remote access":K3,Maintenance:Sb,Updates:pb,Data:Zk,Storage:vz,Health:iz,Logs:rz,Engine:Z3,VPN:bz,GitHub:B3},j_e={project:gb,folder:xb,database:Zk,session:Ai,pwsh:Ai,powershell:Ai,cmd:Ai},U_e={claude:"orange",codex:"dark",gemini:"blue",opencode:"gray",qwen:"violet",crush:"pink",copilot:"teal",kilo:"yellow",amp:"red",cline:"cyan",continue:"grape",kimi:"indigo",aider:"green",deepseek:"blue",reasonix:"lime"};function nf({name:e,size:t=36}){let r=j_e[e];return r?(0,sC.jsx)(ou,{size:t,radius:"md",color:"indigo",variant:"light",children:(0,sC.jsx)(r,{size:t*.55,stroke:1.6})}):(0,sC.jsx)(ou,{size:t,radius:"md",color:U_e[e]??"indigo",variant:"filled",fw:700,children:e.slice(0,1).toUpperCase()})}var V_e=2,H_e=1,sJ=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),o=Math.max(0,parseInt(r.getPropertyValue("width"))),i=window.getComputedStyle(this._terminal.element),a={top:parseInt(i.getPropertyValue("padding-top")),bottom:parseInt(i.getPropertyValue("padding-bottom")),right:parseInt(i.getPropertyValue("padding-right")),left:parseInt(i.getPropertyValue("padding-left"))},s=a.top+a.bottom,l=a.right+a.left,c=n-s,d=o-l-t;return{cols:Math.max(V_e,Math.floor(d/e.css.cell.width)),rows:Math.max(H_e,Math.floor(c/e.css.cell.height))}}};var W_e=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?lJ.isErrorNoTelemetry(e)?new lJ(e.message+`
132
+
133
+ `+e.stack):new Error(e.message+`
134
+
135
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},Z_e=new W_e;function Ez(e){G_e(e)||Z_e.onUnexpectedError(e)}var Oz="Canceled";function G_e(e){return e instanceof q_e?!0:e instanceof Error&&e.name===Oz&&e.message===Oz}var q_e=class extends Error{constructor(){super(Oz),this.name=this.message}},lJ=class zz extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof zz)return t;let r=new zz;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function K_e(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var X_e=class yJ{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(yJ.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=K_e(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};X_e.assertInvariants=!1;var Nz;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Nz||(Nz={}));function Q_e(e,t){return(r,n)=>t(e(r),e(n))}var Y_e=(e,t)=>e-t,cJ=class Fz{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new Fz(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new Fz(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||Nz.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};cJ.empty=new cJ(e=>{});function J_e(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var dJ,uJ,fIt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[dJ]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(uJ=Symbol.iterator,dJ=Symbol.toStringTag,uJ)](){return this.values()}},e0e=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function t0e(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var Lz;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*g(...I){for(let S of I)yield*S}e.concat=g;function y(I,S,w){let P=w;for(let $ of I)P=S(P,$);return P}e.reduce=y;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let $=0;$<S;$++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(Lz||(Lz={}));var r0e=!1,gh=null,o0e=class _J{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:_J.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
136
+ `).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new e0e;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
137
+ `),l)}n.sort(Q_e(l=>l.idx,Y_e));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
138
+ `)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
139
+ `)),p=J_e([...m].map(g=>o(g)[u]),g=>g);delete p[c[u]];for(let[g,y]of Object.entries(p))d.unshift(` - stacktraces of ${y.length} other leaks continue with ${g}`);d.unshift(f)}a+=`
140
+
141
+
142
+ ==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
143
+ ${d.join(`
144
+ `)}
145
+ ============================================================
146
+
147
+ `}return n.length>t&&(a+=`
148
+
149
+
150
+ ... and ${n.length-t} more leaking disposables
151
+
152
+ `),{leaks:n,details:a}}};o0e.idx=0;function n0e(e){gh=e}if(r0e){let e="__is_disposable_tracked__";n0e(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==ps.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==ps.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function gC(e){return gh?.trackDisposable(e),e}function vC(e){gh?.markAsDisposed(e)}function zb(e,t){gh?.setParent(e,t)}function i0e(e,t){if(gh)for(let r of e)gh.setParent(r,t)}function Ob(e){if(Lz.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function IJ(...e){let t=vh(()=>Ob(e));return i0e(e,t),t}function vh(e){let t=gC({dispose:t0e(()=>{vC(t),e()})});return t}var wJ=class SJ{constructor(){this._toDispose=new Set,this._isDisposed=!1,gC(this)}dispose(){this._isDisposed||(vC(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ob(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return zb(t,this),this._isDisposed?SJ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),zb(t,null))}};wJ.DISABLE_DISPOSED_WARNING=!1;var Wz=wJ,ps=class{constructor(){this._store=new Wz,gC(this),zb(this._store,this)}dispose(){vC(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};ps.None=Object.freeze({dispose(){}});var pC=class{constructor(){this._isDisposed=!1,gC(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&zb(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,vC(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&zb(e,null),e}},fJ=class Mz{constructor(t){this.element=t,this.next=Mz.Undefined,this.prev=Mz.Undefined}};fJ.Undefined=new fJ(void 0);var a0e=globalThis.performance&&typeof globalThis.performance.now=="function",s0e=class kJ{static create(t){return new kJ(t)}constructor(t){this._now=a0e&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},l0e=!1,mJ=!1,c0e=!1,hC;(e=>{e.None=()=>ps.None;function t(T){if(c0e){let{onDidAddListener:k}=T,E=Uz.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),E.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,E=null,C)=>{let A=!1,R;return R=T(N=>{if(!A)return R?R.dispose():A=!0,k.call(E,N)},null,C),A&&R.dispose(),R}}e.once=n;function o(T,k,E){return d((C,A=null,R)=>T(N=>C.call(A,k(N)),null,R),E)}e.map=o;function i(T,k,E){return d((C,A=null,R)=>T(N=>{k(N),C.call(A,N)},null,R),E)}e.forEach=i;function a(T,k,E){return d((C,A=null,R)=>T(N=>k(N)&&C.call(A,N),null,R),E)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,E=null,C)=>{let A=IJ(...T.map(R=>R(N=>k.call(E,N))));return u(A,C)}}e.any=l;function c(T,k,E,C){let A=E;return o(T,R=>(A=k(A,R),A),C)}e.reduce=c;function d(T,k){let E,C={onWillAddFirstListener(){E=T(A.fire,A)},onDidRemoveLastListener(){E?.dispose()}};k||t(C);let A=new ms(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,E=100,C=!1,A=!1,R,N){let U,G,oe,ve=0,pe,Y={leakWarningThreshold:R,onWillAddFirstListener(){U=T(we=>{ve++,G=k(G,we),C&&!oe&&(ne.fire(G),G=void 0),pe=()=>{let se=G;G=void 0,oe=void 0,(!C||ve>1)&&ne.fire(se),ve=0},typeof E=="number"?(clearTimeout(oe),oe=setTimeout(pe,E)):oe===void 0&&(oe=0,queueMicrotask(pe))})},onWillRemoveListener(){A&&ve>0&&pe?.()},onDidRemoveLastListener(){pe=void 0,U.dispose()}};N||t(Y);let ne=new ms(Y);return N?.add(ne),ne.event}e.debounce=f;function m(T,k=0,E){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,E)}e.accumulate=m;function p(T,k=(C,A)=>C===A,E){let C=!0,A;return a(T,R=>{let N=C||!k(R,A);return C=!1,A=R,N},E)}e.latch=p;function g(T,k,E){return[e.filter(T,k,E),e.filter(T,C=>!k(C),E)]}e.split=g;function y(T,k=!1,E=[],C){let A=E.slice(),R=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(R);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new ms({onWillAddFirstListener(){R||(R=T(G=>U.fire(G)),C&&C.add(R))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return C&&C.add(U),U.event}e.buffer=y;function v(T,k){return(E,C,A)=>{let R=k(new _);return T(function(N){let U=R.evaluate(N);U!==x&&E.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(E=>(k(E),E)),this}filter(k){return this.steps.push(E=>k(E)?E:x),this}reduce(k,E){let C=E;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=(E,C)=>E===C){let E=!0,C;return this.steps.push(A=>{let R=E||!k(A,C);return E=!1,C=A,R?A:x}),this}evaluate(k){for(let E of this.steps)if(k=E(k),k===x)break;return k}}function I(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.on(k,C),R=()=>T.removeListener(k,C),N=new ms({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromNodeEventEmitter=I;function S(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.addEventListener(k,C),R=()=>T.removeEventListener(k,C),N=new ms({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new ms;return T.then(E=>{k.fire(E)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function $(T,k){return T(E=>k.fire(E))}e.forward=$;function B(T,k,E){return k(E),T(C=>k(C))}e.runAndSubscribe=B;class W{constructor(k,E){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};E||t(C),this.emitter=new ms(C),E&&E.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,E){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function H(T,k){return new W(T,k).emitter.event}e.fromObservable=H;function K(T){return(k,E,C)=>{let A=0,R=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),R&&(R=!1,k.call(E)))},handlePossibleChange(){},handleChange(){R=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof Wz?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(hC||(hC={}));var Bz=class jz{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${jz._idPool++}`,jz.all.add(this)}start(t){this._stopWatch=new s0e,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};Bz.all=new Set,Bz._idPool=0;var d0e=Bz,pJ=-1,CJ=class PJ{constructor(t,r,n=(PJ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new f0e(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};CJ._idPool=1;var u0e=CJ,Uz=class DJ{constructor(t){this.value=t}static create(){let t=new Error;return new DJ(t.stack??"")}print(){console.warn(this.value.split(`
153
+ `).slice(2).join(`
154
+ `))}},f0e=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},m0e=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},p0e=0,dC=class{constructor(e){this.value=e,this.id=p0e++}},h0e=2,g0e=(e,t)=>{if(e instanceof dC)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},uC;if(l0e){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
155
+ `)),e.length=0)},3e3),uC=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var ms=class{constructor(e){this._size=0,this._options=e,this._leakageMon=pJ>0||this._options?.leakWarningThreshold?new u0e(e?.onListenerError??Ez,this._options?.leakWarningThreshold??pJ):void 0,this._perfMon=this._options?._profName?new d0e(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(mJ){let e=this._listeners;queueMicrotask(()=>{g0e(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new m0e(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Ez)(c),ps.None}if(this._disposed)return ps.None;t&&(e=e.bind(t));let n=new dC(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=Uz.create(),o=this._leakageMon.check(n.stack,this._size+1)),mJ&&(n.stack=i??Uz.create()),this._listeners?this._listeners instanceof dC?(this._deliveryQueue??(this._deliveryQueue=new v0e),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=vh(()=>{uC?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof Wz?r.add(a):Array.isArray(r)&&r.push(a),uC){let s=new Error().stack.split(`
156
+ `).slice(2,3).join(`
157
+ `).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);uC.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*h0e<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Ez;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof dC)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},v0e=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},RJ=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),hJ;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof x0e?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:hC.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:RJ})})(hJ||(hJ={}));var x0e=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?RJ:(this._emitter||(this._emitter=new ms),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},hh="en",Vz=!1,Hz=!1,fC=!1,b0e=!1,y0e=!1,TJ=!1,_0e=!1,I0e=!1,w0e=!1,S0e=!1,cC,mC=hh,gJ=hh,k0e,ml,pl=globalThis,ei;typeof pl.vscode<"u"&&typeof pl.vscode.process<"u"?ei=pl.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ei=process);var EJ=typeof ei?.versions?.electron=="string",C0e=EJ&&ei?.type==="renderer";if(typeof ei=="object"){Vz=ei.platform==="win32",Hz=ei.platform==="darwin",fC=ei.platform==="linux",b0e=fC&&!!ei.env.SNAP&&!!ei.env.SNAP_REVISION,_0e=EJ,w0e=!!ei.env.CI||!!ei.env.BUILD_ARTIFACTSTAGINGDIRECTORY,cC=hh,mC=hh;let e=ei.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);cC=t.userLocale,gJ=t.osLocale,mC=t.resolvedLanguage||hh,k0e=t.languagePack?.translationsConfigFile}catch{}y0e=!0}else typeof navigator=="object"&&!C0e?(ml=navigator.userAgent,Vz=ml.indexOf("Windows")>=0,Hz=ml.indexOf("Macintosh")>=0,I0e=(ml.indexOf("Macintosh")>=0||ml.indexOf("iPad")>=0||ml.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,fC=ml.indexOf("Linux")>=0,S0e=ml?.indexOf("Mobi")>=0,TJ=!0,mC=globalThis._VSCODE_NLS_LANGUAGE||hh,cC=navigator.language.toLowerCase(),gJ=cC):console.error("Unable to resolve platform.");var $z=0;Hz?$z=1:Vz?$z=3:fC&&($z=2);var P0e=TJ&&typeof pl.importScripts=="function",mIt=P0e?pl.origin:void 0,hs=ml,Yc=mC,vJ;(e=>{function t(){return Yc}e.value=t;function r(){return Yc.length===2?Yc==="en":Yc.length>=3?Yc[0]==="e"&&Yc[1]==="n"&&Yc[2]==="-":!1}e.isDefaultVariant=r;function n(){return Yc==="en"}e.isDefault=n})(vJ||(vJ={}));var D0e=typeof pl.postMessage=="function"&&!pl.importScripts,R0e=(()=>{if(D0e){let e=[];pl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),pl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),T0e=!!(hs&&hs.indexOf("Chrome")>=0),pIt=!!(hs&&hs.indexOf("Firefox")>=0),hIt=!!(!T0e&&hs&&hs.indexOf("Safari")>=0),gIt=!!(hs&&hs.indexOf("Edg/")>=0),vIt=!!(hs&&hs.indexOf("Android")>=0);function $J(e,t=0,r){let n=setTimeout(()=>{e(),r&&o.dispose()},t),o=vh(()=>{clearTimeout(n),r?.deleteAndLeak(o)});return r?.add(o),o}var E0e,Az;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?Az=(e,t)=>{R0e(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:Az=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},E0e=e=>Az(globalThis,e)})();var xJ;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(xJ||(xJ={}));var bJ=class zi{static fromArray(t){return new zi(r=>{r.emitMany(t)})}static fromPromise(t){return new zi(async r=>{r.emitMany(await t)})}static fromPromises(t){return new zi(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new zi(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new ms,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await hC.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new zi(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return zi.map(this,t)}static filter(t,r){return new zi(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return zi.filter(this,t)}static coalesce(t){return zi.filter(t,r=>!!r)}coalesce(){return zi.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return zi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};bJ.EMPTY=bJ.fromArray([]);var $0e=class extends ps{constructor(e){super(),this._terminal=e,this._linesCacheTimeout=this._register(new pC),this._linesCacheDisposables=this._register(new pC),this._register(vh(()=>this._destroyLinesCache()))}initLinesCache(){this._linesCache||(this._linesCache=new Array(this._terminal.buffer.active.length),this._linesCacheDisposables.value=IJ(this._terminal.onLineFeed(()=>this._destroyLinesCache()),this._terminal.onCursorMove(()=>this._destroyLinesCache()),this._terminal.onResize(()=>this._destroyLinesCache()))),this._linesCacheTimeout.value=$J(()=>this._destroyLinesCache(),15e3)}_destroyLinesCache(){this._linesCache=void 0,this._linesCacheDisposables.clear(),this._linesCacheTimeout.clear()}getLineFromCache(e){return this._linesCache?.[e]}setLineInCache(e,t){this._linesCache&&(this._linesCache[e]=t)}translateBufferLineToStringWithWrap(e,t){let r=[],n=[0],o=this._terminal.buffer.active.getLine(e);for(;o;){let i=this._terminal.buffer.active.getLine(e+1),a=i?i.isWrapped:!1,s=o.translateToString(!a&&t);if(a&&i){let l=o.getCell(o.length-1);l&&l.getCode()===0&&l.getWidth()===1&&i.getCell(0)?.getWidth()===2&&(s=s.slice(0,-1))}if(r.push(s),a)n.push(n[n.length-1]+s.length);else break;e++,o=i}return[r.join(""),n]}},A0e=class{get cachedSearchTerm(){return this._cachedSearchTerm}set cachedSearchTerm(e){this._cachedSearchTerm=e}get lastSearchOptions(){return this._lastSearchOptions}set lastSearchOptions(e){this._lastSearchOptions=e}isValidSearchTerm(e){return!!(e&&e.length>0)}didOptionsChange(e){return this._lastSearchOptions?e?this._lastSearchOptions.caseSensitive!==e.caseSensitive||this._lastSearchOptions.regex!==e.regex||this._lastSearchOptions.wholeWord!==e.wholeWord:!1:!0}shouldUpdateHighlighting(e,t){return t?.decorations?this._cachedSearchTerm===void 0||e!==this._cachedSearchTerm||this.didOptionsChange(t):!1}clearCachedTerm(){this._cachedSearchTerm=void 0}reset(){this._cachedSearchTerm=void 0,this._lastSearchOptions=void 0}},O0e=class{constructor(e,t){this._terminal=e,this._lineCache=t}find(e,t,r,n){if(!e||e.length===0){this._terminal.clearSelection();return}if(r>this._terminal.cols)throw new Error(`Invalid col: ${r} to search in terminal of ${this._terminal.cols} cols`);this._lineCache.initLinesCache();let o={startRow:t,startCol:r},i=this._findInLine(e,o,n);if(!i)for(let a=t+1;a<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=a,o.startCol=0,i=this._findInLine(e,o,n),!i);a++);return i}findNextWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=0,i=0;n&&(r===e?(o=n.end.x,i=n.end.y):(o=n.start.x,i=n.start.y)),this._lineCache.initLinesCache();let a={startRow:i,startCol:o},s=this._findInLine(e,a,t);if(!s)for(let l=i+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);if(!s&&i!==0)for(let l=0;l<i&&(a.startRow=l,a.startCol=0,s=this._findInLine(e,a,t),!s);l++);return!s&&n&&(a.startRow=n.start.y,a.startCol=0,s=this._findInLine(e,a,t)),s}findPreviousWithSelection(e,t,r){if(!e||e.length===0){this._terminal.clearSelection();return}let n=this._terminal.getSelectionPosition();this._terminal.clearSelection();let o=this._terminal.buffer.active.baseY+this._terminal.rows-1,i=this._terminal.cols,a=!0;this._lineCache.initLinesCache();let s={startRow:o,startCol:i},l;if(n&&(s.startRow=o=n.start.y,s.startCol=i=n.start.x,r!==e&&(l=this._findInLine(e,s,t,!1),l||(s.startRow=o=n.end.y,s.startCol=i=n.end.x))),l||(l=this._findInLine(e,s,t,a)),!l){s.startCol=Math.max(s.startCol,this._terminal.cols);for(let c=o-1;c>=0&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);}if(!l&&o!==this._terminal.buffer.active.baseY+this._terminal.rows-1)for(let c=this._terminal.buffer.active.baseY+this._terminal.rows-1;c>=o&&(s.startRow=c,l=this._findInLine(e,s,t,a),!l);c--);return l}_isWholeWord(e,t,r){return(e===0||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e-1]))&&(e+r.length===t.length||" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?".includes(t[e+r.length]))}_findInLine(e,t,r={},n=!1){let o=t.startRow,i=t.startCol;if(this._terminal.buffer.active.getLine(o)?.isWrapped){if(n){t.startCol+=this._terminal.cols;return}return t.startRow--,t.startCol+=this._terminal.cols,this._findInLine(e,t,r)}let a=this._lineCache.getLineFromCache(o);a||(a=this._lineCache.translateBufferLineToStringWithWrap(o,!0),this._lineCache.setLineInCache(o,a));let[s,l]=a,c=this._bufferColsToStringOffset(o,i),d=e,u=s;r.regex||(d=r.caseSensitive?e:e.toLowerCase(),u=r.caseSensitive?s:s.toLowerCase());let f=-1;if(r.regex){let m=RegExp(d,r.caseSensitive?"g":"gi"),p;if(n)for(;p=m.exec(u.slice(0,c));)f=m.lastIndex-p[0].length,e=p[0],m.lastIndex-=e.length-1;else p=m.exec(u.slice(c)),p&&p[0].length>0&&(f=c+(m.lastIndex-p[0].length),e=p[0])}else n?c-d.length>=0&&(f=u.lastIndexOf(d,c-d.length)):f=u.indexOf(d,c);if(f>=0){if(r.wholeWord&&!this._isWholeWord(f,u,e))return;let m=0;for(;m<l.length-1&&f>=l[m+1];)m++;let p=m;for(;p<l.length-1&&f+e.length>=l[p+1];)p++;let g=f-l[m],y=f+e.length-l[p],v=this._stringLengthToBufferSize(o+m,g),x=this._stringLengthToBufferSize(o+p,y)-v+this._terminal.cols*(p-m);return{term:e,col:v,row:o+m,size:x}}}_stringLengthToBufferSize(e,t){let r=this._terminal.buffer.active.getLine(e);if(!r)return 0;for(let n=0;n<t;n++){let o=r.getCell(n);if(!o)break;let i=o.getChars();i.length>1&&(t-=i.length-1);let a=r.getCell(n+1);a&&a.getWidth()===0&&t++}return t}_bufferColsToStringOffset(e,t){let r=e,n=0,o=this._terminal.buffer.active.getLine(r);for(;t>0&&o;){for(let i=0;i<t&&i<this._terminal.cols;i++){let a=o.getCell(i);if(!a)break;a.getWidth()&&(n+=a.getCode()===0?1:a.getChars().length)}if(r++,o=this._terminal.buffer.active.getLine(r),o&&!o.isWrapped)break;t-=this._terminal.cols}return n}},z0e=class extends ps{constructor(e){super(),this._terminal=e,this._highlightDecorations=[],this._highlightedLines=new Set,this._register(vh(()=>this.clearHighlightDecorations()))}createHighlightDecorations(e,t){this.clearHighlightDecorations();for(let r of e){let n=this._createResultDecorations(r,t,!1);if(n)for(let o of n)this._storeDecoration(o,r)}}createActiveDecoration(e,t){let r=this._createResultDecorations(e,t,!0);if(r)return{decorations:r,match:e,dispose(){Ob(r)}}}clearHighlightDecorations(){Ob(this._highlightDecorations),this._highlightDecorations=[],this._highlightedLines.clear()}_storeDecoration(e,t){this._highlightedLines.add(e.marker.line),this._highlightDecorations.push({decoration:e,match:t,dispose(){e.dispose()}})}_applyStyles(e,t,r){e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline=`1px solid ${t}`)),r&&e.classList.add("xterm-find-active-result-decoration")}_createResultDecorations(e,t,r){let n=[],o=e.col,i=e.size,a=-this._terminal.buffer.active.baseY-this._terminal.buffer.active.cursorY+e.row;for(;i>0;){let l=Math.min(this._terminal.cols-o,i);n.push([a,o,l]),o=0,i-=l,a++}let s=[];for(let l of n){let c=this._terminal.registerMarker(l[0]),d=this._terminal.registerDecoration({marker:c,x:l[1],width:l[2],backgroundColor:r?t.activeMatchBackground:t.matchBackground,overviewRulerOptions:this._highlightedLines.has(c.line)?void 0:{color:r?t.activeMatchColorOverviewRuler:t.matchOverviewRuler,position:"center"}});if(d){let u=[];u.push(c),u.push(d.onRender(f=>this._applyStyles(f,r?t.activeMatchBorder:t.matchBorder,!1))),u.push(d.onDispose(()=>Ob(u))),s.push(d)}}return s.length===0?void 0:s}},N0e=class extends ps{constructor(){super(...arguments),this._searchResults=[],this._onDidChangeResults=this._register(new ms)}get onDidChangeResults(){return this._onDidChangeResults.event}get searchResults(){return this._searchResults}get selectedDecoration(){return this._selectedDecoration}set selectedDecoration(e){this._selectedDecoration=e}updateResults(e,t){this._searchResults=e.slice(0,t)}clearResults(){this._searchResults=[]}clearSelectedDecoration(){this._selectedDecoration&&(this._selectedDecoration.dispose(),this._selectedDecoration=void 0)}findResultIndex(e){for(let t=0;t<this._searchResults.length;t++){let r=this._searchResults[t];if(r.row===e.row&&r.col===e.col&&r.size===e.size)return t}return-1}fireResultsChanged(e){if(!e)return;let t=-1;this._selectedDecoration&&(t=this.findResultIndex(this._selectedDecoration.match)),this._onDidChangeResults.fire({resultIndex:t,resultCount:this._searchResults.length})}reset(){this.clearSelectedDecoration(),this.clearResults()}},AJ=class extends ps{constructor(e){super(),this._highlightTimeout=this._register(new pC),this._lineCache=this._register(new pC),this._state=new A0e,this._resultTracker=this._register(new N0e),this._highlightLimit=e?.highlightLimit??1e3}get onDidChangeResults(){return this._resultTracker.onDidChangeResults}activate(e){this._terminal=e,this._lineCache.value=new $0e(e),this._engine=new O0e(e,this._lineCache.value),this._decorationManager=new z0e(e),this._register(this._terminal.onWriteParsed(()=>this._updateMatches())),this._register(this._terminal.onResize(()=>this._updateMatches())),this._register(vh(()=>this.clearDecorations()))}_updateMatches(){this._highlightTimeout.clear(),this._state.cachedSearchTerm&&this._state.lastSearchOptions?.decorations&&(this._highlightTimeout.value=$J(()=>{let e=this._state.cachedSearchTerm;this._state.clearCachedTerm(),this.findPrevious(e,{...this._state.lastSearchOptions,incremental:!0},{noScroll:!0})},200))}clearDecorations(e){this._resultTracker.clearSelectedDecoration(),this._decorationManager?.clearHighlightDecorations(),this._resultTracker.clearResults(),e||this._state.clearCachedTerm()}clearActiveDecoration(){this._resultTracker.clearSelectedDecoration()}findNext(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findNextAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_highlightAllMatches(e,t){if(!this._terminal||!this._engine||!this._decorationManager)throw new Error("Cannot use addon until it has been loaded");if(!this._state.isValidSearchTerm(e)){this.clearDecorations();return}this.clearDecorations(!0);let r=[],n,o=this._engine.find(e,0,0,t);for(;o&&(n?.row!==o.row||n?.col!==o.col)&&!(r.length>=this._highlightLimit);)n=o,r.push(n),o=this._engine.find(e,n.col+n.term.length>=this._terminal.cols?n.row+1:n.row,n.col+n.term.length>=this._terminal.cols?0:n.col+1,t);this._resultTracker.updateResults(r,this._highlightLimit),t.decorations&&this._decorationManager.createHighlightDecorations(r,t.decorations)}_findNextAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findNextWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}findPrevious(e,t,r){if(!this._terminal||!this._engine)throw new Error("Cannot use addon until it has been loaded");this._state.lastSearchOptions=t,this._state.shouldUpdateHighlighting(e,t)&&this._highlightAllMatches(e,t);let n=this._findPreviousAndSelect(e,t,r);return this._fireResults(t),this._state.cachedSearchTerm=e,n}_fireResults(e){this._resultTracker.fireResultsChanged(!!e?.decorations)}_findPreviousAndSelect(e,t,r){if(!this._terminal||!this._engine)return!1;if(!this._state.isValidSearchTerm(e))return this._terminal.clearSelection(),this.clearDecorations(),!1;let n=this._engine.findPreviousWithSelection(e,t,this._state.cachedSearchTerm);return this._selectResult(n,t?.decorations,r?.noScroll)}_selectResult(e,t,r){if(!this._terminal||!this._decorationManager)return!1;if(this._resultTracker.clearSelectedDecoration(),!e)return this._terminal.clearSelection(),!1;if(this._terminal.select(e.col,e.row,e.size),t){let n=this._decorationManager.createActiveDecoration(e,t);n&&(this._resultTracker.selectedDecoration=n)}if(!r&&(e.row>=this._terminal.buffer.active.viewportY+this._terminal.rows||e.row<this._terminal.buffer.active.viewportY)){let n=e.row-this._terminal.buffer.active.viewportY;n-=Math.floor(this._terminal.rows/2),this._terminal.scrollLines(n)}return!0}};var Zz=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],F0e=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Ur;function L0e(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var M0e=class{constructor(){if(this.version="6",!Ur){Ur=new Uint8Array(65536),Ur.fill(1),Ur[0]=0,Ur.fill(0,1,32),Ur.fill(0,127,160),Ur.fill(2,4352,4448),Ur[9001]=2,Ur[9002]=2,Ur.fill(2,11904,42192),Ur[12351]=1,Ur.fill(2,44032,55204),Ur.fill(2,63744,64256),Ur.fill(2,65040,65050),Ur.fill(2,65072,65136),Ur.fill(2,65280,65377),Ur.fill(2,65504,65511);for(let e=0;e<Zz.length;++e)Ur.fill(0,Zz[e][0],Zz[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Ur[e]:L0e(e,F0e)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=_C.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return _C.createPropertyValue(0,r,n)}},B0e=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?OJ.isErrorNoTelemetry(e)?new OJ(e.message+`
158
+
159
+ `+e.stack):new Error(e.message+`
160
+
161
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},j0e=new B0e;function Gz(e){U0e(e)||j0e.onUnexpectedError(e)}var Xz="Canceled";function U0e(e){return e instanceof V0e?!0:e instanceof Error&&e.name===Xz&&e.message===Xz}var V0e=class extends Error{constructor(){super(Xz),this.name=this.message}},OJ=class Qz extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Qz)return t;let r=new Qz;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}};function H0e(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}function W0e(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var Z0e=class VJ{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(VJ.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=W0e(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};Z0e.assertInvariants=!1;var Yz;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(Yz||(Yz={}));function G0e(e,t){return(r,n)=>t(e(r),e(n))}var q0e=(e,t)=>e-t,zJ=class Jz{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new Jz(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new Jz(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||Yz.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};zJ.empty=new zJ(e=>{});function K0e(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var NJ,FJ,LIt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[NJ]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(FJ=Symbol.iterator,NJ=Symbol.toStringTag,FJ)](){return this.values()}},X0e=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}},eN;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*g(...I){for(let S of I)yield*S}e.concat=g;function y(I,S,w){let P=w;for(let $ of I)P=S(P,$);return P}e.reduce=y;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let $=0;$<S;$++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(eN||(eN={}));var Q0e=!1,xh=null,Y0e=class HJ{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:HJ.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
162
+ `).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new X0e;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
163
+ `),l)}n.sort(G0e(l=>l.idx,q0e));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
164
+ `)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
165
+ `)),p=K0e([...m].map(g=>o(g)[u]),g=>g);delete p[c[u]];for(let[g,y]of Object.entries(p))d.unshift(` - stacktraces of ${y.length} other leaks continue with ${g}`);d.unshift(f)}a+=`
166
+
167
+
168
+ ==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
169
+ ${d.join(`
170
+ `)}
171
+ ============================================================
172
+
173
+ `}return n.length>t&&(a+=`
174
+
175
+
176
+ ... and ${n.length-t} more leaking disposables
177
+
178
+ `),{leaks:n,details:a}}};Y0e.idx=0;function J0e(e){xh=e}if(Q0e){let e="__is_disposable_tracked__";J0e(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==bh.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==bh.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function aN(e){return xh?.trackDisposable(e),e}function sN(e){xh?.markAsDisposed(e)}function tN(e,t){xh?.setParent(e,t)}function eIe(e,t){if(xh)for(let r of e)xh.setParent(r,t)}function WJ(e){if(eN.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function tIe(...e){let t=ZJ(()=>WJ(e));return eIe(e,t),t}function ZJ(e){let t=aN({dispose:H0e(()=>{sN(t),e()})});return t}var GJ=class qJ{constructor(){this._toDispose=new Set,this._isDisposed=!1,aN(this)}dispose(){this._isDisposed||(sN(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{WJ(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return tN(t,this),this._isDisposed?qJ.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),tN(t,null))}};GJ.DISABLE_DISPOSED_WARNING=!1;var lN=GJ,bh=class{constructor(){this._store=new lN,aN(this),tN(this._store,this)}dispose(){sN(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};bh.None=Object.freeze({dispose(){}});var LJ=class rN{constructor(t){this.element=t,this.next=rN.Undefined,this.prev=rN.Undefined}};LJ.Undefined=new LJ(void 0);var rIe=globalThis.performance&&typeof globalThis.performance.now=="function",oIe=class KJ{static create(t){return new KJ(t)}constructor(t){this._now=rIe&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},nIe=!1,MJ=!1,iIe=!1,BJ;(e=>{e.None=()=>bh.None;function t(T){if(iIe){let{onDidAddListener:k}=T,E=iN.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),E.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,E=null,C)=>{let A=!1,R;return R=T(N=>{if(!A)return R?R.dispose():A=!0,k.call(E,N)},null,C),A&&R.dispose(),R}}e.once=n;function o(T,k,E){return d((C,A=null,R)=>T(N=>C.call(A,k(N)),null,R),E)}e.map=o;function i(T,k,E){return d((C,A=null,R)=>T(N=>{k(N),C.call(A,N)},null,R),E)}e.forEach=i;function a(T,k,E){return d((C,A=null,R)=>T(N=>k(N)&&C.call(A,N),null,R),E)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,E=null,C)=>{let A=tIe(...T.map(R=>R(N=>k.call(E,N))));return u(A,C)}}e.any=l;function c(T,k,E,C){let A=E;return o(T,R=>(A=k(A,R),A),C)}e.reduce=c;function d(T,k){let E,C={onWillAddFirstListener(){E=T(A.fire,A)},onDidRemoveLastListener(){E?.dispose()}};k||t(C);let A=new Jc(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,E=100,C=!1,A=!1,R,N){let U,G,oe,ve=0,pe,Y={leakWarningThreshold:R,onWillAddFirstListener(){U=T(we=>{ve++,G=k(G,we),C&&!oe&&(ne.fire(G),G=void 0),pe=()=>{let se=G;G=void 0,oe=void 0,(!C||ve>1)&&ne.fire(se),ve=0},typeof E=="number"?(clearTimeout(oe),oe=setTimeout(pe,E)):oe===void 0&&(oe=0,queueMicrotask(pe))})},onWillRemoveListener(){A&&ve>0&&pe?.()},onDidRemoveLastListener(){pe=void 0,U.dispose()}};N||t(Y);let ne=new Jc(Y);return N?.add(ne),ne.event}e.debounce=f;function m(T,k=0,E){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,E)}e.accumulate=m;function p(T,k=(C,A)=>C===A,E){let C=!0,A;return a(T,R=>{let N=C||!k(R,A);return C=!1,A=R,N},E)}e.latch=p;function g(T,k,E){return[e.filter(T,k,E),e.filter(T,C=>!k(C),E)]}e.split=g;function y(T,k=!1,E=[],C){let A=E.slice(),R=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(R);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new Jc({onWillAddFirstListener(){R||(R=T(G=>U.fire(G)),C&&C.add(R))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return C&&C.add(U),U.event}e.buffer=y;function v(T,k){return(E,C,A)=>{let R=k(new _);return T(function(N){let U=R.evaluate(N);U!==x&&E.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(E=>(k(E),E)),this}filter(k){return this.steps.push(E=>k(E)?E:x),this}reduce(k,E){let C=E;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=(E,C)=>E===C){let E=!0,C;return this.steps.push(A=>{let R=E||!k(A,C);return E=!1,C=A,R?A:x}),this}evaluate(k){for(let E of this.steps)if(k=E(k),k===x)break;return k}}function I(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.on(k,C),R=()=>T.removeListener(k,C),N=new Jc({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromNodeEventEmitter=I;function S(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.addEventListener(k,C),R=()=>T.removeEventListener(k,C),N=new Jc({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new Jc;return T.then(E=>{k.fire(E)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function $(T,k){return T(E=>k.fire(E))}e.forward=$;function B(T,k,E){return k(E),T(C=>k(C))}e.runAndSubscribe=B;class W{constructor(k,E){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};E||t(C),this.emitter=new Jc(C),E&&E.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,E){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function H(T,k){return new W(T,k).emitter.event}e.fromObservable=H;function K(T){return(k,E,C)=>{let A=0,R=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),R&&(R=!1,k.call(E)))},handlePossibleChange(){},handleChange(){R=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof lN?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(BJ||(BJ={}));var oN=class nN{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${nN._idPool++}`,nN.all.add(this)}start(t){this._stopWatch=new oIe,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};oN.all=new Set,oN._idPool=0;var aIe=oN,jJ=-1,XJ=class QJ{constructor(t,r,n=(QJ._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new lIe(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};XJ._idPool=1;var sIe=XJ,iN=class YJ{constructor(t){this.value=t}static create(){let t=new Error;return new YJ(t.stack??"")}print(){console.warn(this.value.split(`
179
+ `).slice(2).join(`
180
+ `))}},lIe=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},cIe=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},dIe=0,xC=class{constructor(e){this.value=e,this.id=dIe++}},uIe=2,fIe=(e,t)=>{if(e instanceof xC)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},bC;if(nIe){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
181
+ `)),e.length=0)},3e3),bC=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var Jc=class{constructor(e){this._size=0,this._options=e,this._leakageMon=jJ>0||this._options?.leakWarningThreshold?new sIe(e?.onListenerError??Gz,this._options?.leakWarningThreshold??jJ):void 0,this._perfMon=this._options?._profName?new aIe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(MJ){let e=this._listeners;queueMicrotask(()=>{fIe(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new cIe(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||Gz)(c),bh.None}if(this._disposed)return bh.None;t&&(e=e.bind(t));let n=new xC(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=iN.create(),o=this._leakageMon.check(n.stack,this._size+1)),MJ&&(n.stack=i??iN.create()),this._listeners?this._listeners instanceof xC?(this._deliveryQueue??(this._deliveryQueue=new mIe),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=ZJ(()=>{bC?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof lN?r.add(a):Array.isArray(r)&&r.push(a),bC){let s=new Error().stack.split(`
182
+ `).slice(2,3).join(`
183
+ `).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);bC.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*uIe<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||Gz;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof xC)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},mIe=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},_C=class yC{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Jc,this.onChange=this._onChange.event;let t=new M0e;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=yC.extractWidth(s);yC.extractShouldJoin(s)&&(l-=yC.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},qz=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],pIe=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],Kz=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],hIe=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]],hl;function UJ(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var gIe=class{constructor(){if(this.version="11",!hl){hl=new Uint8Array(65536),hl.fill(1),hl[0]=0,hl.fill(0,1,32),hl.fill(0,127,160);for(let e=0;e<qz.length;++e)hl.fill(0,qz[e][0],qz[e][1]+1);for(let e=0;e<Kz.length;++e)hl.fill(2,Kz[e][0],Kz[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?hl[e]:UJ(e,pIe)?0:UJ(e,hIe)?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=_C.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return _C.createPropertyValue(0,r,n)}},JJ=class{activate(e){e.unicode.register(new gIe)}dispose(){}};var vIe=class{constructor(e,t,r,n={}){this._terminal=e,this._regex=t,this._handler=r,this._options=n}provideLinks(e,t){let r=bIe.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(r))}_addCallbacks(e){return e.map(t=>(t.leave=this._options.leave,t.hover=(r,n)=>{if(this._options.hover){let{range:o}=t;this._options.hover(r,n,o)}},t))}};function xIe(e){try{let t=new URL(e),r=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(r.toLocaleLowerCase())}catch{return!1}}var bIe=class IC{static computeLink(t,r,n,o){let i=new RegExp(r.source,(r.flags||"")+"g"),[a,s]=IC._getWindowedLineStrings(t-1,n),l=a.join(""),c,d=[];for(;c=i.exec(l);){let u=c[0];if(!xIe(u))continue;let[f,m]=IC._mapStrIdx(n,s,0,c.index),[p,g]=IC._mapStrIdx(n,f,m,u.length);if(f===-1||m===-1||p===-1||g===-1)continue;let y={start:{x:m+1,y:f+1},end:{x:g,y:p+1}};d.push({range:y,text:u,activate:o})}return d}static _getWindowedLineStrings(t,r){let n,o=t,i=t,a=0,s="",l=[];if(n=r.buffer.active.getLine(t)){let c=n.translateToString(!0);if(n.isWrapped&&c[0]!==" "){for(a=0;(n=r.buffer.active.getLine(--o))&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),!(!n.isWrapped||s.indexOf(" ")!==-1)););l.reverse()}for(l.push(c),a=0;(n=r.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(s=n.translateToString(!0),a+=s.length,l.push(s),s.indexOf(" ")===-1););}return[l,o]}static _mapStrIdx(t,r,n,o){let i=t.buffer.active,a=i.getNullCell(),s=n;for(;o;){let l=i.getLine(r);if(!l)return[-1,-1];for(let c=s;c<l.length;++c){l.getCell(c,a);let d=a.getChars();if(a.getWidth()&&(o-=d.length||1,c===l.length-1&&d==="")){let u=i.getLine(r+1);u&&u.isWrapped&&(u.getCell(0,a),a.getWidth()===2&&(o+=1))}if(o<0)return[r,c]}r++,s=0}return[r,s]}},yIe=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function _Ie(e,t){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}var eee=class{constructor(e=_Ie,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,r=t.urlRegex||yIe;this._linkProvider=this._terminal.registerLinkProvider(new vIe(this._terminal,r,this._handler,t))}dispose(){this._linkProvider?.dispose()}};var ste=Object.defineProperty,IIe=Object.getOwnPropertyDescriptor,wIe=(e,t)=>{for(var r in t)ste(e,r,{get:t[r],enumerable:!0})},xr=(e,t,r,n)=>{for(var o=n>1?void 0:n?IIe(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&ste(t,r,o),o},ye=(e,t)=>(r,n)=>t(r,n,e),tee="Terminal input",kN={get:()=>tee,set:e=>tee=e},ree="Too much output to announce, navigate to rows manually to read",CN={get:()=>ree,set:e=>ree=e};function SIe(e){return e.replace(/\r?\n/g,"\r")}function kIe(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function CIe(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function PIe(e,t,r,n){if(e.stopPropagation(),e.clipboardData){let o=e.clipboardData.getData("text/plain");lte(o,t,r,n)}}function lte(e,t,r,n){e=SIe(e),e=kIe(e,r.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function cte(e,t,r){let n=r.getBoundingClientRect(),o=e.clientX-n.left-10,i=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${o}px`,t.style.top=`${i}px`,t.style.zIndex="1000",t.focus()}function oee(e,t,r,n,o){cte(e,t,r),o&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function nd(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function WC(e,t=0,r=e.length){let n="";for(let o=t;o<r;++o){let i=e[o];i>65535?(i-=65536,n+=String.fromCharCode((i>>10)+55296)+String.fromCharCode(i%1024+56320)):n+=String.fromCharCode(i)}return n}var DIe=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o=0;if(this._interim){let i=e.charCodeAt(o++);56320<=i&&i<=57343?t[n++]=(this._interim-55296)*1024+i-56320+65536:(t[n++]=this._interim,t[n++]=i),this._interim=0}for(let i=o;i<r;++i){let a=e.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=r)return this._interim=a,n;let s=e.charCodeAt(i);56320<=s&&s<=57343?t[n++]=(a-55296)*1024+s-56320+65536:(t[n++]=a,t[n++]=s);continue}a!==65279&&(t[n++]=a)}return n}},RIe=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let n=0,o,i,a,s,l=0,c=0;if(this.interim[0]){let f=!1,m=this.interim[0];m&=(m&224)===192?31:(m&240)===224?15:7;let p=0,g;for(;(g=this.interim[++p]&63)&&p<4;)m<<=6,m|=g;let y=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,v=y-p;for(;c<v;){if(c>=r)return 0;if(g=e[c++],(g&192)!==128){c--,f=!0;break}else this.interim[p++]=g,m<<=6,m|=g&63}f||(y===2?m<128?c--:t[n++]=m:y===3?m<2048||m>=55296&&m<=57343||m===65279||(t[n++]=m):m<65536||m>1114111||(t[n++]=m)),this.interim.fill(0)}let d=r-4,u=c;for(;u<r;){for(;u<d&&!((o=e[u])&128)&&!((i=e[u+1])&128)&&!((a=e[u+2])&128)&&!((s=e[u+3])&128);)t[n++]=o,t[n++]=i,t[n++]=a,t[n++]=s,u+=4;if(o=e[u++],o<128)t[n++]=o;else if((o&224)===192){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(l=(o&31)<<6|i&63,l<128){u--;continue}t[n++]=l}else if((o&240)===224){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(l=(o&15)<<12|(i&63)<<6|a&63,l<2048||l>=55296&&l<=57343||l===65279)continue;t[n++]=l}else if((o&248)===240){if(u>=r)return this.interim[0]=o,n;if(i=e[u++],(i&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,n;if(a=e[u++],(a&192)!==128){u--;continue}if(u>=r)return this.interim[0]=o,this.interim[1]=i,this.interim[2]=a,n;if(s=e[u++],(s&192)!==128){u--;continue}if(l=(o&7)<<18|(i&63)<<12|(a&63)<<6|s&63,l<65536||l>1114111)continue;t[n++]=l}}return n}},dte="",id=" ",oy=class ute{constructor(){this.fg=0,this.bg=0,this.extended=new NC}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new ute;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},NC=class fte{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new fte(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},Mi=class mte extends oy{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new NC,this.combinedData=""}static fromCharData(t){let r=new mte;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?nd(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let o=t[1].charCodeAt(1);56320<=o&&o<=57343?this.content=(n-55296)*1024+o-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},nee="di$target",PN="di$dependencies",cN=new Map;function TIe(e){return e[PN]||[]}function ao(e){if(cN.has(e))return cN.get(e);let t=function(r,n,o){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");EIe(t,r,o)};return t._id=e,cN.set(e,t),t}function EIe(e,t,r){t[nee]===t?t[PN].push({id:e,index:r}):(t[PN]=[{id:e,index:r}],t[nee]=t)}var un=ao("BufferService"),pte=ao("CoreMouseService"),mf=ao("CoreService"),$Ie=ao("CharsetService"),mF=ao("InstantiationService"),hte=ao("LogService"),fn=ao("OptionsService"),gte=ao("OscLinkService"),AIe=ao("UnicodeService"),ny=ao("DecorationService"),DN=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let n=[],o=this._optionsService.rawOptions.linkHandler,i=new Mi,a=r.getTrimmedLength(),s=-1,l=-1,c=!1;for(let d=0;d<a;d++)if(!(l===-1&&!r.hasContent(d))){if(r.loadCell(d,i),i.hasExtendedAttrs()&&i.extended.urlId)if(l===-1){l=d,s=i.extended.urlId;continue}else c=i.extended.urlId!==s;else l!==-1&&(c=!0);if(c||l!==-1&&d===a-1){let u=this._oscLinkService.getLinkData(s)?.uri;if(u){let f={start:{x:l+1,y:e},end:{x:d+(!c&&d===a-1?1:0),y:e}},m=!1;if(!o?.allowNonHttpProtocols)try{let p=new URL(u);["http:","https:"].includes(p.protocol)||(m=!0)}catch{m=!0}m||n.push({text:u,range:f,activate:(p,g)=>o?o.activate(p,g,f):OIe(p,g),hover:(p,g)=>o?.hover?.(p,g,f),leave:(p,g)=>o?.leave?.(p,g,f)})}c=!1,i.hasExtendedAttrs()&&i.extended.urlId?(l=d,s=i.extended.urlId):(l=-1,s=-1)}}t(n)}};DN=xr([ye(0,un),ye(1,fn),ye(2,gte)],DN);function OIe(e,t){if(confirm(`Do you want to navigate to ${t}?
184
+
185
+ WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var ZC=ao("CharSizeService"),yl=ao("CoreBrowserService"),pF=ao("MouseService"),_l=ao("RenderService"),zIe=ao("SelectionService"),vte=ao("CharacterJoinerService"),wh=ao("ThemeService"),xte=ao("LinkProviderService"),NIe=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?iee.isErrorNoTelemetry(e)?new iee(e.message+`
186
+
187
+ `+e.stack):new Error(e.message+`
188
+
189
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},FIe=new NIe;function DC(e){LIe(e)||FIe.onUnexpectedError(e)}var RN="Canceled";function LIe(e){return e instanceof MIe?!0:e instanceof Error&&e.name===RN&&e.message===RN}var MIe=class extends Error{constructor(){super(RN),this.name=this.message}};function BIe(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}var iee=class TN extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof TN)return t;let r=new TN;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},EN=class bte extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,bte.prototype)}};function jIe(e,t,r=0,n=e.length){let o=r,i=n;for(;o<i;){let a=Math.floor((o+i)/2);t(e[a])?o=a+1:i=a}return o-1}var UIe=class yte{constructor(t){this._array=t,this._findLastMonotonousLastIdx=0}findLastMonotonous(t){if(yte.assertInvariants){if(this._prevFindLastPredicate){for(let n of this._array)if(this._prevFindLastPredicate(n)&&!t(n))throw new Error("MonotonousArray: current predicate must be weaker than (or equal to) the previous predicate.")}this._prevFindLastPredicate=t}let r=jIe(this._array,t,this._findLastMonotonousLastIdx);return this._findLastMonotonousLastIdx=r+1,r===-1?void 0:this._array[r]}};UIe.assertInvariants=!1;function ti(e,t=0){return e[e.length-(1+t)]}var $N;(e=>{function t(i){return i<0}e.isLessThan=t;function r(i){return i<=0}e.isLessThanOrEqual=r;function n(i){return i>0}e.isGreaterThan=n;function o(i){return i===0}e.isNeitherLessOrGreaterThan=o,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})($N||($N={}));function VIe(e,t){return(r,n)=>t(e(r),e(n))}var HIe=(e,t)=>e-t,aee=class AN{constructor(t){this.iterate=t}forEach(t){this.iterate(r=>(t(r),!0))}toArray(){let t=[];return this.iterate(r=>(t.push(r),!0)),t}filter(t){return new AN(r=>this.iterate(n=>t(n)?r(n):!0))}map(t){return new AN(r=>this.iterate(n=>r(t(n))))}some(t){let r=!1;return this.iterate(n=>(r=t(n),!r)),r}findFirst(t){let r;return this.iterate(n=>t(n)?(r=n,!1):!0),r}findLast(t){let r;return this.iterate(n=>(t(n)&&(r=n),!0)),r}findLastMaxBy(t){let r,n=!0;return this.iterate(o=>((n||$N.isGreaterThan(t(o,r)))&&(n=!1,r=o),!0)),r}};aee.empty=new aee(e=>{});function WIe(e,t){let r=Object.create(null);for(let n of e){let o=t(n),i=r[o];i||(i=r[o]=[]),i.push(n)}return r}var see,lee,owt=class{constructor(e,t){this.toKey=t,this._map=new Map,this[see]="SetWithKey";for(let r of e)this.add(r)}get size(){return this._map.size}add(e){let t=this.toKey(e);return this._map.set(t,e),this}delete(e){return this._map.delete(this.toKey(e))}has(e){return this._map.has(this.toKey(e))}*entries(){for(let e of this._map.values())yield[e,e]}keys(){return this.values()}*values(){for(let e of this._map.values())yield e}clear(){this._map.clear()}forEach(e,t){this._map.forEach(r=>e.call(t,r,r,this))}[(lee=Symbol.iterator,see=Symbol.toStringTag,lee)](){return this.values()}},ZIe=class{constructor(){this.map=new Map}add(e,t){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(t)}delete(e,t){let r=this.map.get(e);r&&(r.delete(t),r.size===0&&this.map.delete(e))}forEach(e,t){let r=this.map.get(e);r&&r.forEach(t)}get(e){return this.map.get(e)||new Set}};function GIe(e,t){let r=this,n=!1,o;return function(){if(n)return o;if(n=!0,t)try{o=e.apply(r,arguments)}finally{t()}else o=e.apply(r,arguments);return o}}var ON;(e=>{function t(I){return I&&typeof I=="object"&&typeof I[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*o(I){yield I}e.single=o;function i(I){return t(I)?I:o(I)}e.wrap=i;function a(I){return I||r}e.from=a;function*s(I){for(let S=I.length-1;S>=0;S--)yield I[S]}e.reverse=s;function l(I){return!I||I[Symbol.iterator]().next().done===!0}e.isEmpty=l;function c(I){return I[Symbol.iterator]().next().value}e.first=c;function d(I,S){let w=0;for(let P of I)if(S(P,w++))return!0;return!1}e.some=d;function u(I,S){for(let w of I)if(S(w))return w}e.find=u;function*f(I,S){for(let w of I)S(w)&&(yield w)}e.filter=f;function*m(I,S){let w=0;for(let P of I)yield S(P,w++)}e.map=m;function*p(I,S){let w=0;for(let P of I)yield*S(P,w++)}e.flatMap=p;function*g(...I){for(let S of I)yield*S}e.concat=g;function y(I,S,w){let P=w;for(let $ of I)P=S(P,$);return P}e.reduce=y;function*v(I,S,w=I.length){for(S<0&&(S+=I.length),w<0?w+=I.length:w>I.length&&(w=I.length);S<w;S++)yield I[S]}e.slice=v;function x(I,S=Number.POSITIVE_INFINITY){let w=[];if(S===0)return[w,I];let P=I[Symbol.iterator]();for(let $=0;$<S;$++){let B=P.next();if(B.done)return[w,e.empty()];w.push(B.value)}return[w,{[Symbol.iterator](){return P}}]}e.consume=x;async function _(I){let S=[];for await(let w of I)S.push(w);return Promise.resolve(S)}e.asyncToArray=_})(ON||(ON={}));var qIe=!1,df=null,KIe=class _te{constructor(){this.livingDisposables=new Map}getDisposableData(t){let r=this.livingDisposables.get(t);return r||(r={parent:null,source:null,isSingleton:!1,value:t,idx:_te.idx++},this.livingDisposables.set(t,r)),r}trackDisposable(t){let r=this.getDisposableData(t);r.source||(r.source=new Error().stack)}setParent(t,r){let n=this.getDisposableData(t);n.parent=r}markAsDisposed(t){this.livingDisposables.delete(t)}markAsSingleton(t){this.getDisposableData(t).isSingleton=!0}getRootParent(t,r){let n=r.get(t);if(n)return n;let o=t.parent?this.getRootParent(this.getDisposableData(t.parent),r):t;return r.set(t,o),o}getTrackedDisposables(){let t=new Map;return[...this.livingDisposables.entries()].filter(([,r])=>r.source!==null&&!this.getRootParent(r,t).isSingleton).flatMap(([r])=>r)}computeLeakingDisposables(t=10,r){let n;if(r)n=r;else{let l=new Map,c=[...this.livingDisposables.values()].filter(u=>u.source!==null&&!this.getRootParent(u,l).isSingleton);if(c.length===0)return;let d=new Set(c.map(u=>u.value));if(n=c.filter(u=>!(u.parent&&d.has(u.parent))),n.length===0)throw new Error("There are cyclic diposable chains!")}if(!n)return;function o(l){function c(u,f){for(;u.length>0&&f.some(m=>typeof m=="string"?m===u[0]:u[0].match(m));)u.shift()}let d=l.source.split(`
190
+ `).map(u=>u.trim().replace("at ","")).filter(u=>u!=="");return c(d,["Error",/^trackDisposable \(.*\)$/,/^DisposableTracker.trackDisposable \(.*\)$/]),d.reverse()}let i=new ZIe;for(let l of n){let c=o(l);for(let d=0;d<=c.length;d++)i.add(c.slice(0,d).join(`
191
+ `),l)}n.sort(VIe(l=>l.idx,HIe));let a="",s=0;for(let l of n.slice(0,t)){s++;let c=o(l),d=[];for(let u=0;u<c.length;u++){let f=c[u];f=`(shared with ${i.get(c.slice(0,u+1).join(`
192
+ `)).size}/${n.length} leaks) at ${f}`;let m=i.get(c.slice(0,u).join(`
193
+ `)),p=WIe([...m].map(g=>o(g)[u]),g=>g);delete p[c[u]];for(let[g,y]of Object.entries(p))d.unshift(` - stacktraces of ${y.length} other leaks continue with ${g}`);d.unshift(f)}a+=`
194
+
195
+
196
+ ==================== Leaking disposable ${s}/${n.length}: ${l.value.constructor.name} ====================
197
+ ${d.join(`
198
+ `)}
199
+ ============================================================
200
+
201
+ `}return n.length>t&&(a+=`
202
+
203
+
204
+ ... and ${n.length-t} more leaking disposables
205
+
206
+ `),{leaks:n,details:a}}};KIe.idx=0;function XIe(e){df=e}if(qIe){let e="__is_disposable_tracked__";XIe(new class{trackDisposable(t){let r=new Error("Potentially leaked disposable").stack;setTimeout(()=>{t[e]||console.log(r)},3e3)}setParent(t,r){if(t&&t!==Qe.None)try{t[e]=!0}catch{}}markAsDisposed(t){if(t&&t!==Qe.None)try{t[e]=!0}catch{}}markAsSingleton(t){}})}function GC(e){return df?.trackDisposable(e),e}function qC(e){df?.markAsDisposed(e)}function Jb(e,t){df?.setParent(e,t)}function QIe(e,t){if(df)for(let r of e)df.setParent(r,t)}function cee(e){return df?.markAsSingleton(e),e}function uf(e){if(ON.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function YIe(...e){let t=Yt(()=>uf(e));return QIe(e,t),t}function Yt(e){let t=GC({dispose:GIe(()=>{qC(t),e()})});return t}var Ite=class wte{constructor(){this._toDispose=new Set,this._isDisposed=!1,GC(this)}dispose(){this._isDisposed||(qC(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{uf(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return Jb(t,this),this._isDisposed?wte.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),Jb(t,null))}};Ite.DISABLE_DISPOSED_WARNING=!1;var ad=Ite,Qe=class{constructor(){this._store=new ad,GC(this),Jb(this._store,this)}dispose(){qC(this),this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Qe.None=Object.freeze({dispose(){}});var Ih=class{constructor(){this._isDisposed=!1,GC(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){this._isDisposed||e===this._value||(this._value?.dispose(),e&&Jb(e,this),this._value=e)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,qC(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e&&Jb(e,null),e}},ni=typeof window=="object"?window:globalThis,zN=class NN{constructor(t){this.element=t,this.next=NN.Undefined,this.prev=NN.Undefined}};zN.Undefined=new zN(void 0);var mr=zN,dee=class{constructor(){this._first=mr.Undefined,this._last=mr.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===mr.Undefined}clear(){let e=this._first;for(;e!==mr.Undefined;){let t=e.next;e.prev=mr.Undefined,e.next=mr.Undefined,e=t}this._first=mr.Undefined,this._last=mr.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new mr(e);if(this._first===mr.Undefined)this._first=r,this._last=r;else if(t){let o=this._last;this._last=r,r.prev=o,o.next=r}else{let o=this._first;this._first=r,r.next=o,o.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==mr.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==mr.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==mr.Undefined&&e.next!==mr.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===mr.Undefined&&e.next===mr.Undefined?(this._first=mr.Undefined,this._last=mr.Undefined):e.next===mr.Undefined?(this._last=this._last.prev,this._last.next=mr.Undefined):e.prev===mr.Undefined&&(this._first=this._first.next,this._first.prev=mr.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==mr.Undefined;)yield e.element,e=e.next}},JIe=globalThis.performance&&typeof globalThis.performance.now=="function",ewe=class Ste{static create(t){return new Ste(t)}constructor(t){this._now=JIe&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},twe=!1,uee=!1,rwe=!1,io;(e=>{e.None=()=>Qe.None;function t(T){if(rwe){let{onDidAddListener:k}=T,E=MN.create(),C=0;T.onDidAddListener=()=>{++C===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),E.print()),k?.()}}}function r(T,k){return f(T,()=>{},0,void 0,!0,void 0,k)}e.defer=r;function n(T){return(k,E=null,C)=>{let A=!1,R;return R=T(N=>{if(!A)return R?R.dispose():A=!0,k.call(E,N)},null,C),A&&R.dispose(),R}}e.once=n;function o(T,k,E){return d((C,A=null,R)=>T(N=>C.call(A,k(N)),null,R),E)}e.map=o;function i(T,k,E){return d((C,A=null,R)=>T(N=>{k(N),C.call(A,N)},null,R),E)}e.forEach=i;function a(T,k,E){return d((C,A=null,R)=>T(N=>k(N)&&C.call(A,N),null,R),E)}e.filter=a;function s(T){return T}e.signal=s;function l(...T){return(k,E=null,C)=>{let A=YIe(...T.map(R=>R(N=>k.call(E,N))));return u(A,C)}}e.any=l;function c(T,k,E,C){let A=E;return o(T,R=>(A=k(A,R),A),C)}e.reduce=c;function d(T,k){let E,C={onWillAddFirstListener(){E=T(A.fire,A)},onDidRemoveLastListener(){E?.dispose()}};k||t(C);let A=new ce(C);return k?.add(A),A.event}function u(T,k){return k instanceof Array?k.push(T):k&&k.add(T),T}function f(T,k,E=100,C=!1,A=!1,R,N){let U,G,oe,ve=0,pe,Y={leakWarningThreshold:R,onWillAddFirstListener(){U=T(we=>{ve++,G=k(G,we),C&&!oe&&(ne.fire(G),G=void 0),pe=()=>{let se=G;G=void 0,oe=void 0,(!C||ve>1)&&ne.fire(se),ve=0},typeof E=="number"?(clearTimeout(oe),oe=setTimeout(pe,E)):oe===void 0&&(oe=0,queueMicrotask(pe))})},onWillRemoveListener(){A&&ve>0&&pe?.()},onDidRemoveLastListener(){pe=void 0,U.dispose()}};N||t(Y);let ne=new ce(Y);return N?.add(ne),ne.event}e.debounce=f;function m(T,k=0,E){return e.debounce(T,(C,A)=>C?(C.push(A),C):[A],k,void 0,!0,void 0,E)}e.accumulate=m;function p(T,k=(C,A)=>C===A,E){let C=!0,A;return a(T,R=>{let N=C||!k(R,A);return C=!1,A=R,N},E)}e.latch=p;function g(T,k,E){return[e.filter(T,k,E),e.filter(T,C=>!k(C),E)]}e.split=g;function y(T,k=!1,E=[],C){let A=E.slice(),R=T(G=>{A?A.push(G):U.fire(G)});C&&C.add(R);let N=()=>{A?.forEach(G=>U.fire(G)),A=null},U=new ce({onWillAddFirstListener(){R||(R=T(G=>U.fire(G)),C&&C.add(R))},onDidAddFirstListener(){A&&(k?setTimeout(N):N())},onDidRemoveLastListener(){R&&R.dispose(),R=null}});return C&&C.add(U),U.event}e.buffer=y;function v(T,k){return(E,C,A)=>{let R=k(new _);return T(function(N){let U=R.evaluate(N);U!==x&&E.call(C,U)},void 0,A)}}e.chain=v;let x=Symbol("HaltChainable");class _{constructor(){this.steps=[]}map(k){return this.steps.push(k),this}forEach(k){return this.steps.push(E=>(k(E),E)),this}filter(k){return this.steps.push(E=>k(E)?E:x),this}reduce(k,E){let C=E;return this.steps.push(A=>(C=k(C,A),C)),this}latch(k=(E,C)=>E===C){let E=!0,C;return this.steps.push(A=>{let R=E||!k(A,C);return E=!1,C=A,R?A:x}),this}evaluate(k){for(let E of this.steps)if(k=E(k),k===x)break;return k}}function I(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.on(k,C),R=()=>T.removeListener(k,C),N=new ce({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromNodeEventEmitter=I;function S(T,k,E=C=>C){let C=(...U)=>N.fire(E(...U)),A=()=>T.addEventListener(k,C),R=()=>T.removeEventListener(k,C),N=new ce({onWillAddFirstListener:A,onDidRemoveLastListener:R});return N.event}e.fromDOMEventEmitter=S;function w(T){return new Promise(k=>n(T)(k))}e.toPromise=w;function P(T){let k=new ce;return T.then(E=>{k.fire(E)},()=>{k.fire(void 0)}).finally(()=>{k.dispose()}),k.event}e.fromPromise=P;function $(T,k){return T(E=>k.fire(E))}e.forward=$;function B(T,k,E){return k(E),T(C=>k(C))}e.runAndSubscribe=B;class W{constructor(k,E){this._observable=k,this._counter=0,this._hasChanged=!1;let C={onWillAddFirstListener:()=>{k.addObserver(this)},onDidRemoveLastListener:()=>{k.removeObserver(this)}};E||t(C),this.emitter=new ce(C),E&&E.add(this.emitter)}beginUpdate(k){this._counter++}handlePossibleChange(k){}handleChange(k,E){this._hasChanged=!0}endUpdate(k){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function H(T,k){return new W(T,k).emitter.event}e.fromObservable=H;function K(T){return(k,E,C)=>{let A=0,R=!1,N={beginUpdate(){A++},endUpdate(){A--,A===0&&(T.reportChanges(),R&&(R=!1,k.call(E)))},handlePossibleChange(){},handleChange(){R=!0}};T.addObserver(N),T.reportChanges();let U={dispose(){T.removeObserver(N)}};return C instanceof ad?C.add(U):Array.isArray(C)&&C.push(U),U}}e.fromObservableLight=K})(io||(io={}));var FN=class LN{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${LN._idPool++}`,LN.all.add(this)}start(t){this._stopWatch=new ewe,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};FN.all=new Set,FN._idPool=0;var owe=FN,fee=-1,kte=class Cte{constructor(t,r,n=(Cte._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let o=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,o+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[i,a]=this.getMostFrequentStack(),s=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(s),console.warn(i);let l=new iwe(s,i);this._errorHandler(l)}return()=>{let i=this._stacks.get(t.value)||0;this._stacks.set(t.value,i-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,o]of this._stacks)(!t||r<o)&&(t=[n,o],r=o);return t}};kte._idPool=1;var nwe=kte,MN=class Pte{constructor(t){this.value=t}static create(){let t=new Error;return new Pte(t.stack??"")}print(){console.warn(this.value.split(`
207
+ `).slice(2).join(`
208
+ `))}},iwe=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},awe=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},swe=0,RC=class{constructor(e){this.value=e,this.id=swe++}},lwe=2,cwe=(e,t)=>{if(e instanceof RC)t(e);else for(let r=0;r<e.length;r++){let n=e[r];n&&t(n)}},TC;if(twe){let e=[];setInterval(()=>{e.length!==0&&(console.warn("[LEAKING LISTENERS] GC'ed these listeners that were NOT yet disposed:"),console.warn(e.join(`
209
+ `)),e.length=0)},3e3),TC=new FinalizationRegistry(t=>{typeof t=="string"&&e.push(t)})}var ce=class{constructor(e){this._size=0,this._options=e,this._leakageMon=fee>0||this._options?.leakWarningThreshold?new nwe(e?.onListenerError??DC,this._options?.leakWarningThreshold??fee):void 0,this._perfMon=this._options?._profName?new owe(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._deliveryQueue?.current===this&&this._deliveryQueue.reset(),this._listeners){if(uee){let e=this._listeners;queueMicrotask(()=>{cwe(e,t=>t.stack?.print())})}this._listeners=void 0,this._size=0}this._options?.onDidRemoveLastListener?.(),this._leakageMon?.dispose()}}get event(){return this._event??(this._event=(e,t,r)=>{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let s=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(s);let l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new awe(`${s}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||DC)(c),Qe.None}if(this._disposed)return Qe.None;t&&(e=e.bind(t));let n=new RC(e),o,i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=MN.create(),o=this._leakageMon.check(n.stack,this._size+1)),uee&&(n.stack=i??MN.create()),this._listeners?this._listeners instanceof RC?(this._deliveryQueue??(this._deliveryQueue=new dwe),this._listeners=[this._listeners,n]):this._listeners.push(n):(this._options?.onWillAddFirstListener?.(this),this._listeners=n,this._options?.onDidAddFirstListener?.(this)),this._size++;let a=Yt(()=>{TC?.unregister(a),o?.(),this._removeListener(n)});if(r instanceof ad?r.add(a):Array.isArray(r)&&r.push(a),TC){let s=new Error().stack.split(`
210
+ `).slice(2,3).join(`
211
+ `).trim(),l=/(file:|vscode-file:\/\/vscode-app)?(\/[^:]*:\d+:\d+)/.exec(s);TC.register(a,l?.[2]??s,a)}return a}),this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*lwe<=t.length){let o=0;for(let i=0;i<t.length;i++)t[i]?t[o++]=t[i]:n&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){if(!e)return;let r=this._options?.onListenerError||DC;if(!r){e.value(t);return}try{e.value(t)}catch(n){r(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){if(this._deliveryQueue?.current&&(this._deliverQueue(this._deliveryQueue),this._perfMon?.stop()),this._perfMon?.start(this._size),this._listeners)if(this._listeners instanceof RC)this._deliver(this._listeners,e);else{let t=this._deliveryQueue;t.enqueue(this,e,this._listeners.length),this._deliverQueue(t)}this._perfMon?.stop()}hasListeners(){return this._size>0}},dwe=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},BN=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new ce,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new ce,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};BN.INSTANCE=new BN;var hF=BN;function uwe(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}var iwt=hF.INSTANCE.onDidChangeZoomLevel;function fwe(e){return hF.INSTANCE.getZoomFactor(e)}var awt=hF.INSTANCE.onDidChangeFullscreen,Sh=typeof navigator=="object"?navigator.userAgent:"",jN=Sh.indexOf("Firefox")>=0,EC=Sh.indexOf("AppleWebKit")>=0,gF=Sh.indexOf("Chrome")>=0,Dte=!gF&&Sh.indexOf("Safari")>=0,swt=Sh.indexOf("Electron/")>=0,lwt=Sh.indexOf("Android")>=0,$C=!1;if(typeof ni.matchMedia=="function"){let e=ni.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=ni.matchMedia("(display-mode: fullscreen)");$C=e.matches,uwe(ni,e,({matches:r})=>{$C&&t.matches||($C=r)})}function mwe(){return $C}var _h="en",FC=!1,LC=!1,Kb=!1,pwe=!1,Rte=!1,Tte=!1,hwe=!1,gwe=!1,vwe=!1,xwe=!1,wC,AC=_h,mee=_h,bwe,vl,bl=globalThis,oi;typeof bl.vscode<"u"&&typeof bl.vscode.process<"u"?oi=bl.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(oi=process);var Ete=typeof oi?.versions?.electron=="string",ywe=Ete&&oi?.type==="renderer";if(typeof oi=="object"){FC=oi.platform==="win32",LC=oi.platform==="darwin",Kb=oi.platform==="linux",pwe=Kb&&!!oi.env.SNAP&&!!oi.env.SNAP_REVISION,hwe=Ete,vwe=!!oi.env.CI||!!oi.env.BUILD_ARTIFACTSTAGINGDIRECTORY,wC=_h,AC=_h;let e=oi.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);wC=t.userLocale,mee=t.osLocale,AC=t.resolvedLanguage||_h,bwe=t.languagePack?.translationsConfigFile}catch{}Rte=!0}else typeof navigator=="object"&&!ywe?(vl=navigator.userAgent,FC=vl.indexOf("Windows")>=0,LC=vl.indexOf("Macintosh")>=0,gwe=(vl.indexOf("Macintosh")>=0||vl.indexOf("iPad")>=0||vl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Kb=vl.indexOf("Linux")>=0,xwe=vl?.indexOf("Mobi")>=0,Tte=!0,AC=globalThis._VSCODE_NLS_LANGUAGE||_h,wC=navigator.language.toLowerCase(),mee=wC):console.error("Unable to resolve platform.");var dN=0;LC?dN=1:FC?dN=3:Kb&&(dN=2);var $te=FC,xs=LC,_we=Kb,uN=Rte,Iwe=Tte&&typeof bl.importScripts=="function",cwt=Iwe?bl.origin:void 0,bs=vl,ed=AC,pee;(e=>{function t(){return ed}e.value=t;function r(){return ed.length===2?ed==="en":ed.length>=3?ed[0]==="e"&&ed[1]==="n"&&ed[2]==="-":!1}e.isDefaultVariant=r;function n(){return ed==="en"}e.isDefault=n})(pee||(pee={}));var wwe=typeof bl.postMessage=="function"&&!bl.importScripts,Swe=(()=>{if(wwe){let e=[];bl.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,o=e.length;n<o;n++){let i=e[n];if(i.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),i.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),bl.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),kwe=!!(bs&&bs.indexOf("Chrome")>=0),dwt=!!(bs&&bs.indexOf("Firefox")>=0),uwt=!!(!kwe&&bs&&bs.indexOf("Safari")>=0),fwt=!!(bs&&bs.indexOf("Edg/")>=0),mwt=!!(bs&&bs.indexOf("Android")>=0),td=typeof navigator=="object"?navigator:{},pwt={clipboard:{writeText:uN||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(td&&td.clipboard&&td.clipboard.writeText),readText:uN||!!(td&&td.clipboard&&td.clipboard.readText)},keyboard:uN||mwe()?0:td.keyboard||Dte?1:2,touch:"ontouchstart"in ni||td.maxTouchPoints>0,pointerEvents:ni.PointerEvent&&("ontouchstart"in ni||navigator.maxTouchPoints>0)},vF=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},fN=new vF,hee=new vF,gee=new vF,Cwe=new Array(230),UN;(e=>{function t(s){return fN.keyCodeToStr(s)}e.toString=t;function r(s){return fN.strToKeyCode(s)}e.fromString=r;function n(s){return hee.keyCodeToStr(s)}e.toUserSettingsUS=n;function o(s){return gee.keyCodeToStr(s)}e.toUserSettingsGeneral=o;function i(s){return hee.strToKeyCode(s)||gee.strToKeyCode(s)}e.fromUserSettings=i;function a(s){if(s>=98&&s<=113)return null;switch(s){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return fN.keyCodeToStr(s)}e.toElectronAccelerator=a})(UN||(UN={}));var Pwe=class Ate{constructor(t,r,n,o,i){this.ctrlKey=t,this.shiftKey=r,this.altKey=n,this.metaKey=o,this.keyCode=i}equals(t){return t instanceof Ate&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",n=this.altKey?"1":"0",o=this.metaKey?"1":"0";return`K${t}${r}${n}${o}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new Dwe([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},Dwe=class{constructor(e){if(e.length===0)throw BIe("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function Rwe(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return UN.fromString(r)}let t=e.keyCode;if(t===3)return 7;if(jN)switch(t){case 59:return 85;case 60:if(_we)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(xs)return 57;break}else if(EC&&(xs&&t===93||!xs&&t===92))return 57;return Cwe[t]||0}var Twe=xs?256:2048,Ewe=512,$we=1024,Awe=xs?2048:256,VN=class{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState?.("AltGraph"),this.keyCode=Rwe(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=Twe),this.altKey&&(t|=Ewe),this.shiftKey&&(t|=$we),this.metaKey&&(t|=Awe),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new Pwe(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},vee=new WeakMap;function Owe(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var zwe=class{static getSameOriginWindowChain(e){let t=vee.get(e);if(!t){t=[],vee.set(e,t);let r=e,n;do n=Owe(r),n?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=n;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,n=0,o=this.getSameOriginWindowChain(e);for(let i of o){let a=i.window.deref();if(r+=a?.scrollY??0,n+=a?.scrollX??0,a===t||!i.iframeElement)break;let s=i.iframeElement.getBoundingClientRect();r+=s.top,n+=s.left}return{top:r,left:n}}},Vb=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=zwe.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},xee=class{constructor(e,t=0,r=0){this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let n=!1;if(gF){let o=navigator.userAgent.match(/Chrome\/(\d+)/);n=(o?parseInt(o[1]):123)<=122}if(e){let o=e,i=e,a=e.view?.devicePixelRatio||1;if(typeof o.wheelDeltaY<"u")n?this.deltaY=o.wheelDeltaY/(120*a):this.deltaY=o.wheelDeltaY/120;else if(typeof i.VERTICAL_AXIS<"u"&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?jN&&!xs?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")Dte&&$te?this.deltaX=-(o.wheelDeltaX/120):n?this.deltaX=o.wheelDeltaX/(120*a):this.deltaX=o.wheelDeltaX/120;else if(typeof i.HORIZONTAL_AXIS<"u"&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let s=e;s.deltaMode===s.DOM_DELTA_LINE?jN&&!xs?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*a):this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}},Ote=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),bee;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof Nwe?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:io.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Ote})})(bee||(bee={}));var Nwe=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Ote:(this._emitter||(this._emitter=new ce),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}};var xF=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new EN("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new EN("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},Fwe=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){this.disposable?.dispose(),this.disposable=void 0}cancelAndSet(e,t,r=globalThis){if(this.isDisposed)throw new EN("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=r.setInterval(()=>{e()},t);this.disposable=Yt(()=>{r.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},Lwe,mN;(function(){typeof globalThis.requestIdleCallback!="function"||typeof globalThis.cancelIdleCallback!="function"?mN=(e,t)=>{Swe(()=>{if(r)return;let n=Date.now()+15;t(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,n-Date.now())}}))});let r=!1;return{dispose(){r||(r=!0)}}}:mN=(e,t,r)=>{let n=e.requestIdleCallback(t,typeof r=="number"?{timeout:r}:void 0),o=!1;return{dispose(){o||(o=!0,e.cancelIdleCallback(n))}}},Lwe=e=>mN(globalThis,e)})();var yee;(e=>{async function t(n){let o,i=await Promise.all(n.map(a=>a.then(s=>s,s=>{o||(o=s)})));if(typeof o<"u")throw o;return i}e.settled=t;function r(n){return new Promise(async(o,i)=>{try{await n(o,i)}catch(a){i(a)}})}e.withAsyncBody=r})(yee||(yee={}));var _ee=class Fi{static fromArray(t){return new Fi(r=>{r.emitMany(t)})}static fromPromise(t){return new Fi(async r=>{r.emitMany(await t)})}static fromPromises(t){return new Fi(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new Fi(async r=>{await Promise.all(t.map(async n=>{for await(let o of n)r.emitOne(o)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new ce,queueMicrotask(async()=>{let n={emitOne:o=>this.emitOne(o),emitMany:o=>this.emitMany(o),reject:o=>this.reject(o)};try{await Promise.resolve(t(n)),this.resolve()}catch(o){this.reject(o)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await io.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,r){return new Fi(async n=>{for await(let o of t)n.emitOne(r(o))})}map(t){return Fi.map(this,t)}static filter(t,r){return new Fi(async n=>{for await(let o of t)r(o)&&n.emitOne(o)})}filter(t){return Fi.filter(this,t)}static coalesce(t){return Fi.filter(t,r=>!!r)}coalesce(){return Fi.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return Fi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};_ee.EMPTY=_ee.fromArray([]);function Mwe(e){return 55296<=e&&e<=56319}function Iee(e){return 56320<=e&&e<=57343}function Bwe(e,t){return(e-55296<<10)+(t-56320)+65536}function jwe(e){return bF(e,0)}function bF(e,t){switch(typeof e){case"object":return e===null?xl(349,t):Array.isArray(e)?Vwe(e,t):Hwe(e,t);case"string":return zte(e,t);case"boolean":return Uwe(e,t);case"number":return xl(e,t);case"undefined":return xl(937,t);default:return xl(617,t)}}function xl(e,t){return(t<<5)-t+e|0}function Uwe(e,t){return xl(e?433:863,t)}function zte(e,t){t=xl(149417,t);for(let r=0,n=e.length;r<n;r++)t=xl(e.charCodeAt(r),t);return t}function Vwe(e,t){return t=xl(104579,t),e.reduce((r,n)=>bF(n,r),t)}function Hwe(e,t){return t=xl(181387,t),Object.keys(e).sort().reduce((r,n)=>(r=zte(n,r),bF(e[n],r)),t)}function pN(e,t,r=32){let n=r-t,o=~((1<<n)-1);return(e<<t|(o&e)>>>n)>>>0}function wee(e,t=0,r=e.byteLength,n=0){for(let o=0;o<r;o++)e[t+o]=n}function Wwe(e,t,r="0"){for(;e.length<t;)e=r+e;return e}function Nb(e,t=32){return e instanceof ArrayBuffer?Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join(""):Wwe((e>>>0).toString(16),t/4)}var Zwe=class Nte{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(t){let r=t.length;if(r===0)return;let n=this._buff,o=this._buffLen,i=this._leftoverHighSurrogate,a,s;for(i!==0?(a=i,s=-1,i=0):(a=t.charCodeAt(0),s=0);;){let l=a;if(Mwe(a))if(s+1<r){let c=t.charCodeAt(s+1);Iee(c)?(s++,l=Bwe(a,c)):l=65533}else{i=a;break}else Iee(a)&&(l=65533);if(o=this._push(n,o,l),s++,s<r)a=t.charCodeAt(s);else break}this._buffLen=o,this._leftoverHighSurrogate=i}_push(t,r,n){return n<128?t[r++]=n:n<2048?(t[r++]=192|(n&1984)>>>6,t[r++]=128|(n&63)>>>0):n<65536?(t[r++]=224|(n&61440)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0):(t[r++]=240|(n&1835008)>>>18,t[r++]=128|(n&258048)>>>12,t[r++]=128|(n&4032)>>>6,t[r++]=128|(n&63)>>>0),r>=64&&(this._step(),r-=64,this._totalLen+=64,t[0]=t[64],t[1]=t[65],t[2]=t[66]),r}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),Nb(this._h0)+Nb(this._h1)+Nb(this._h2)+Nb(this._h3)+Nb(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,wee(this._buff,this._buffLen),this._buffLen>56&&(this._step(),wee(this._buff));let t=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(t/4294967296),!1),this._buffDV.setUint32(60,t%4294967296,!1),this._step()}_step(){let t=Nte._bigBlock32,r=this._buffDV;for(let u=0;u<64;u+=4)t.setUint32(u,r.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)t.setUint32(u,pN(t.getUint32(u-12,!1)^t.getUint32(u-32,!1)^t.getUint32(u-56,!1)^t.getUint32(u-64,!1),1),!1);let n=this._h0,o=this._h1,i=this._h2,a=this._h3,s=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=o&i|~o&a,c=1518500249):u<40?(l=o^i^a,c=1859775393):u<60?(l=o&i|o&a|i&a,c=2400959708):(l=o^i^a,c=3395469782),d=pN(n,5)+l+s+c+t.getUint32(u*4,!1)&4294967295,s=a,a=i,i=pN(o,30),o=n,n=d;this._h0=this._h0+n&4294967295,this._h1=this._h1+o&4294967295,this._h2=this._h2+i&4294967295,this._h3=this._h3+a&4294967295,this._h4=this._h4+s&4294967295}};Zwe._bigBlock32=new DataView(new ArrayBuffer(320));var{registerWindow:hwt,getWindow:xa,getDocument:gwt,getWindows:vwt,getWindowsCount:xwt,getWindowId:See,getWindowById:bwt,hasWindow:ywt,onDidRegisterWindow:Gwe,onWillUnregisterWindow:_wt,onDidUnregisterWindow:Iwt}=(function(){let e=new Map,t={window:ni,disposables:new ad};e.set(ni.vscodeWindowId,t);let r=new ce,n=new ce,o=new ce;function i(a,s){return(typeof a=="number"?e.get(a):void 0)??(s?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:o.event,onDidUnregisterWindow:n.event,registerWindow(a){if(e.has(a.vscodeWindowId))return Qe.None;let s=new ad,l={window:a,disposables:s.add(new ad)};return e.set(a.vscodeWindowId,l),s.add(Yt(()=>{e.delete(a.vscodeWindowId),n.fire(a)})),s.add(Be(a,to.BEFORE_UNLOAD,()=>{o.fire(a)})),r.fire(l),s},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:i,getWindow(a){let s=a;if(s?.ownerDocument?.defaultView)return s.ownerDocument.defaultView.window;let l=a;return l?.view?l.view.window:ni},getDocument(a){return xa(a).document}}})(),qwe=class{constructor(e,t,r,n){this._node=e,this._type=t,this._handler=r,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Be(e,t,r,n){return new qwe(e,t,r,n)}function Kwe(e,t){return function(r){return t(new Vb(e,r))}}function Xwe(e){return function(t){return e(new VN(t))}}var kee=function(e,t,r,n){let o=r;return t==="click"||t==="mousedown"||t==="contextmenu"?o=Kwe(xa(e),r):(t==="keydown"||t==="keypress"||t==="keyup")&&(o=Xwe(r)),Be(e,t,o,n)},Qwe,MC,Ywe=class extends Fwe{constructor(e){super(),this.defaultTarget=e&&xa(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},hN=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){DC(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,n=new Map,o=i=>{r.set(i,!1);let a=e.get(i)??[];for(t.set(i,a),e.set(i,[]),n.set(i,!0);a.length>0;)a.sort(hN.sort),a.shift().execute();n.set(i,!1)};MC=(i,a,s=0)=>{let l=See(i),c=new hN(a,s),d=e.get(l);return d||(d=[],e.set(l,d)),d.push(c),r.get(l)||(r.set(l,!0),i.requestAnimationFrame(()=>o(l))),c},Qwe=(i,a,s)=>{let l=See(i);if(n.get(l)){let c=new hN(a,s),d=t.get(l);return d||(d=[],t.set(l,d)),d.push(c),c}else return MC(i,a,s)}})();var Cee=class OC{constructor(t,r){this.width=t,this.height=r}with(t=this.width,r=this.height){return t!==this.width||r!==this.height?new OC(t,r):this}static is(t){return typeof t=="object"&&typeof t.height=="number"&&typeof t.width=="number"}static lift(t){return t instanceof OC?t:new OC(t.width,t.height)}static equals(t,r){return t===r?!0:!t||!r?!1:t.width===r.width&&t.height===r.height}};Cee.None=new Cee(0,0);function Jwe(e){let t=e.getBoundingClientRect(),r=xa(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var wwt=new class{constructor(){this.mutationObservers=new Map}observe(e,t,r){let n=this.mutationObservers.get(e);n||(n=new Map,this.mutationObservers.set(e,n));let o=jwe(r),i=n.get(o);if(i)i.users+=1;else{let a=new ce,s=new MutationObserver(c=>a.fire(c));s.observe(e,r);let l=i={users:1,observer:s,onDidMutate:a.event};t.add(Yt(()=>{l.users-=1,l.users===0&&(a.dispose(),s.disconnect(),n?.delete(o),n?.size===0&&this.mutationObservers.delete(e))})),n.set(o,i)}return i.onDidMutate}},to={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",PASTE:"paste",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:EC?"webkitAnimationStart":"animationstart",ANIMATION_END:EC?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:EC?"webkitAnimationIteration":"animationiteration"},eSe=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;function Fte(e,t,r,...n){let o=eSe.exec(t);if(!o)throw new Error("Bad use of emmet");let i=o[1]||"div",a;return e!=="http://www.w3.org/1999/xhtml"?a=document.createElementNS(e,i):a=document.createElement(i),o[3]&&(a.id=o[3]),o[4]&&(a.className=o[4].replace(/\./g," ").trim()),r&&Object.entries(r).forEach(([s,l])=>{typeof l>"u"||(/^on\w+$/.test(s)?a[s]=l:s==="selected"?l&&a.setAttribute(s,"true"):a.setAttribute(s,l))}),a.append(...n),a}function tSe(e,t,...r){return Fte("http://www.w3.org/1999/xhtml",e,t,...r)}tSe.SVG=function(e,t,...r){return Fte("http://www.w3.org/2000/svg",e,t,...r)};var rSe=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Nn(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Nn(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Nn(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Nn(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Nn(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Nn(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Nn(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Nn(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Nn(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Nn(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Nn(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Nn(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Nn(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Nn(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Nn(e){return typeof e=="number"?`${e}px`:e}function Xb(e){return new rSe(e)}var Lte=class{constructor(){this._hooks=new ad,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,n,o){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=o;let i=e;try{e.setPointerCapture(t),this._hooks.add(Yt(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{i=xa(e)}this._hooks.add(Be(i,to.POINTER_MOVE,a=>{if(a.buttons!==r){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Be(i,to.POINTER_UP,a=>this.stopMonitoring(!0)))}};function oSe(e,t,r){let n=null,o=null;if(typeof r.value=="function"?(n="value",o=r.value,o.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(n="get",o=r.get),!o)throw new Error("not supported");let i=`$memoize$${t}`;r[n]=function(...a){return this.hasOwnProperty(i)||Object.defineProperty(this,i,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,a)}),this[i]}}var va;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(va||(va={}));var Hb=class Fo extends Qe{constructor(){super(),this.dispatched=!1,this.targets=new dee,this.ignoreTargets=new dee,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(io.runAndSubscribe(Gwe,({window:t,disposables:r})=>{r.add(Be(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),r.add(Be(t.document,"touchend",n=>this.onTouchEnd(t,n))),r.add(Be(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:ni,disposables:this._store}))}static addTarget(t){if(!Fo.isTouchDevice())return Qe.None;Fo.INSTANCE||(Fo.INSTANCE=cee(new Fo));let r=Fo.INSTANCE.targets.push(t);return Yt(r)}static ignoreTarget(t){if(!Fo.isTouchDevice())return Qe.None;Fo.INSTANCE||(Fo.INSTANCE=cee(new Fo));let r=Fo.INSTANCE.ignoreTargets.push(t);return Yt(r)}static isTouchDevice(){return"ontouchstart"in ni||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,o=t.targetTouches.length;n<o;n++){let i=t.targetTouches.item(n);this.activeTouches[i.identifier]={id:i.identifier,initialTarget:i.target,initialTimeStamp:r,initialPageX:i.pageX,initialPageY:i.pageY,rollingTimestamps:[r],rollingPageX:[i.pageX],rollingPageY:[i.pageY]};let a=this.newGestureEvent(va.Start,i.target);a.pageX=i.pageX,a.pageY=i.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let n=Date.now(),o=Object.keys(this.activeTouches).length;for(let i=0,a=r.changedTouches.length;i<a;i++){let s=r.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("move of an UNKNOWN touch",s);continue}let l=this.activeTouches[s.identifier],c=Date.now()-l.initialTimeStamp;if(c<Fo.HOLD_DELAY&&Math.abs(l.initialPageX-ti(l.rollingPageX))<30&&Math.abs(l.initialPageY-ti(l.rollingPageY))<30){let d=this.newGestureEvent(va.Tap,l.initialTarget);d.pageX=ti(l.rollingPageX),d.pageY=ti(l.rollingPageY),this.dispatchEvent(d)}else if(c>=Fo.HOLD_DELAY&&Math.abs(l.initialPageX-ti(l.rollingPageX))<30&&Math.abs(l.initialPageY-ti(l.rollingPageY))<30){let d=this.newGestureEvent(va.Contextmenu,l.initialTarget);d.pageX=ti(l.rollingPageX),d.pageY=ti(l.rollingPageY),this.dispatchEvent(d)}else if(o===1){let d=ti(l.rollingPageX),u=ti(l.rollingPageY),f=ti(l.rollingTimestamps)-l.rollingTimestamps[0],m=d-l.rollingPageX[0],p=u-l.rollingPageY[0],g=[...this.targets].filter(y=>l.initialTarget instanceof Node&&y.contains(l.initialTarget));this.inertia(t,g,n,Math.abs(m)/f,m>0?1:-1,d,Math.abs(p)/f,p>0?1:-1,u)}this.dispatchEvent(this.newGestureEvent(va.End,l.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=r,n.tapCount=0,n}dispatchEvent(t){if(t.type===va.Tap){let r=new Date().getTime(),n=0;r-this._lastSetTapCountTime>Fo.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=r,t.tapCount=n}else(t.type===va.Change||t.type===va.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let r=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let o=0,i=t.initialTarget;for(;i&&i!==n;)o++,i=i.parentElement;r.push([o,n])}r.sort((n,o)=>n[0]-o[0]);for(let[n,o]of r)o.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,n,o,i,a,s,l,c){this.handle=MC(t,()=>{let d=Date.now(),u=d-n,f=0,m=0,p=!0;o+=Fo.SCROLL_FRICTION*u,s+=Fo.SCROLL_FRICTION*u,o>0&&(p=!1,f=i*o*u),s>0&&(p=!1,m=l*s*u);let g=this.newGestureEvent(va.Change);g.translationX=f,g.translationY=m,r.forEach(y=>y.dispatchEvent(g)),p||this.inertia(t,r,d,o,i,a+f,s,l,c+m)})}onTouchMove(t){let r=Date.now();for(let n=0,o=t.changedTouches.length;n<o;n++){let i=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(i.identifier))){console.warn("end of an UNKNOWN touch",i);continue}let a=this.activeTouches[i.identifier],s=this.newGestureEvent(va.Change,a.initialTarget);s.translationX=i.pageX-ti(a.rollingPageX),s.translationY=i.pageY-ti(a.rollingPageY),s.pageX=i.pageX,s.pageY=i.pageY,this.dispatchEvent(s),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(i.pageX),a.rollingPageY.push(i.pageY),a.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};Hb.SCROLL_FRICTION=-.005,Hb.HOLD_DELAY=700,Hb.CLEAR_TAP_COUNT_TIME=400,xr([oSe],Hb,"isTouchDevice",1);var nSe=Hb,yF=class extends Qe{onclick(e,t){this._register(Be(e,to.CLICK,r=>t(new Vb(xa(e),r))))}onmousedown(e,t){this._register(Be(e,to.MOUSE_DOWN,r=>t(new Vb(xa(e),r))))}onmouseover(e,t){this._register(Be(e,to.MOUSE_OVER,r=>t(new Vb(xa(e),r))))}onmouseleave(e,t){this._register(Be(e,to.MOUSE_LEAVE,r=>t(new Vb(xa(e),r))))}onkeydown(e,t){this._register(Be(e,to.KEY_DOWN,r=>t(new VN(r))))}onkeyup(e,t){this._register(Be(e,to.KEY_UP,r=>t(new VN(r))))}oninput(e,t){this._register(Be(e,to.INPUT,t))}onblur(e,t){this._register(Be(e,to.BLUR,t))}onfocus(e,t){this._register(Be(e,to.FOCUS,t))}onchange(e,t){this._register(Be(e,to.CHANGE,t))}ignoreGesture(e){return nSe.ignoreTarget(e)}},Pee=11,iSe=class extends yF{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=Pee+"px",this.domNode.style.height=Pee+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new Lte),this._register(kee(this.bgDomNode,to.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(kee(this.domNode,to.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new Ywe),this._pointerdownScheduleRepeatTimer=this._register(new xF)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,xa(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},aSe=class HN{constructor(t,r,n,o,i,a,s){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,n=n|0,o=o|0,i=i|0,a=a|0,s=s|0),this.rawScrollLeft=o,this.rawScrollTop=s,r<0&&(r=0),o+r>n&&(o=n-r),o<0&&(o=0),i<0&&(i=0),s+i>a&&(s=a-i),s<0&&(s=0),this.width=r,this.scrollWidth=n,this.scrollLeft=o,this.height=i,this.scrollHeight=a,this.scrollTop=s}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new HN(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new HN(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let n=this.width!==t.width,o=this.scrollWidth!==t.scrollWidth,i=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,s=this.scrollHeight!==t.scrollHeight,l=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:o,scrollLeftChanged:i,heightChanged:a,scrollHeightChanged:s,scrollTopChanged:l}}},sSe=class extends Qe{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new aSe(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let n;t?n=new Ree(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=Ree.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},Dee=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function gN(e,t){let r=t-e;return function(n){return e+r*dSe(n)}}function lSe(e,t,r){return function(n){return n<r?e(n/r):t((n-r)/(1-r))}}var Ree=class WN{constructor(t,r,n,o){this.from=t,this.to=r,this.duration=o,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,n){if(Math.abs(t-r)>2.5*n){let o,i;return t<r?(o=t+.75*n,i=r-.75*n):(o=t-.75*n,i=r+.75*n),lSe(gN(t,o),gN(i,r),.33)}return gN(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let n=this.scrollLeft(r),o=this.scrollTop(r);return new Dee(n,o,!1)}return new Dee(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,n){return WN.start(t,r,n)}static start(t,r,n){n=n+10;let o=Date.now()-10;return new WN(t,r,o,n)}};function cSe(e){return Math.pow(e,3)}function dSe(e){return 1-cSe(1-e)}var uSe=class extends Qe{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new xF)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode?.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(e?" fade":"")))}},fSe=140,Mte=class extends yF{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new uSe(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new Lte),this._shouldRender=!0,this.domNode=Xb(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Be(this.domNode.domNode,to.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new iSe(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,n){this.slider=Xb(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Be(this.slider.domNode,to.POINTER_DOWN,o=>{o.button===0&&(o.preventDefault(),this._sliderPointerDown(o))})),this.onclick(this.slider.domNode,o=>{o.leftButton&&o.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderPointerPosition(e);r<=o&&o<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let o=Jwe(this.domNode.domNode);t=e.pageX-o.left,r=e.pageY-o.top}let n=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,o=>{let i=this._sliderOrthogonalPointerPosition(o),a=Math.abs(i-r);if($te&&a>fSe){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let s=this._sliderPointerPosition(o)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(s))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},Bte=class ZN{constructor(t,r,n,o,i,a){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=o,this._scrollSize=i,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new ZN(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,n,o,i){let a=Math.max(0,n-t),s=Math.max(0,a-2*r),l=o>0&&o>n;if(!l)return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(n*s/o))),d=(s-c)/(o-n),u=i*d;return{computedAvailableSize:Math.round(a),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){let t=ZN._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,n=this._scrollPosition;return r<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},mSe=class extends Mte{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new Bte(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,o.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},pSe=class extends Mte{constructor(e,t,r){let n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new Bte(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},hSe=500,Tee=50,Eee=!0,gSe=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},GN=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,n=1,o=this._rear;do{let i=o===this._front?t:Math.pow(2,-n);if(t-=i,r+=this._memory[o].score*i,o===this._front)break;o=(this._capacity+o-1)%this._capacity,n++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(gF){let r=xa(t.browserEvent),n=fwe(r);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,n){let o=null,i=new gSe(t,r,n);this._front===-1&&this._rear===-1?(this._memory[0]=i,this._front=0,this._rear=0):(o=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=i),i.score=this._computeScore(i,o)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),r){let o=Math.abs(t.deltaX),i=Math.abs(t.deltaY),a=Math.abs(r.deltaX),s=Math.abs(r.deltaY),l=Math.max(Math.min(o,a),1),c=Math.max(Math.min(i,s),1),d=Math.max(o,a),u=Math.max(i,s);d%l===0&&u%c===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};GN.INSTANCE=new GN;var vSe=GN,xSe=class extends yF{constructor(e,t,r){super(),this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new ce),this.onWillScroll=this._onWillScroll.event,this._options=ySe(t),this._scrollable=r,this._register(this._scrollable.onScroll(o=>{this._onWillScroll.fire(o),this._onDidScroll(o),this._onScroll.fire(o)}));let n={onMouseWheel:o=>this._onMouseWheel(o),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new pSe(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new mSe(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=Xb(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=Xb(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=Xb(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,o=>this._onMouseOver(o)),this.onmouseleave(this._listenOnDomNode,o=>this._onMouseLeave(o)),this._hideTimeout=this._register(new xF),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=uf(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,xs&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new xee(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=uf(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new xee(r))};this._mouseWheelToDispose.push(Be(this._listenOnDomNode,to.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){if(e.browserEvent?.defaultPrevented)return;let t=vSe.INSTANCE;Eee&&t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,i=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&i+o===0?i=o=0:Math.abs(o)>=Math.abs(i)?i=0:o=0),this._options.flipAxes&&([o,i]=[i,o]);let a=!xs&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!i&&(i=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(i=i*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let s=this._scrollable.getFutureScrollPosition(),l={};if(o){let c=Tee*o,d=s.scrollTop-(c<0?Math.floor(c):Math.ceil(c));this._verticalScrollbar.writeScrollPosition(l,d)}if(i){let c=Tee*i,d=s.scrollLeft-(c<0?Math.floor(c):Math.ceil(c));this._horizontalScrollbar.writeScrollPosition(l,d)}l=this._scrollable.validateScrollPosition(l),(s.scrollLeft!==l.scrollLeft||s.scrollTop!==l.scrollTop)&&(Eee&&this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(l):this._scrollable.setScrollPositionNow(l),r=!0)}let n=r;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,n=r?" left":"",o=t?" top":"",i=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${i}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),hSe)}},bSe=class extends xSe{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function ySe(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,xs&&(t.className+=" mac"),t}var qN=class extends Qe{constructor(e,t,r,n,o,i,a,s){super(),this._bufferService=r,this._optionsService=a,this._renderService=s,this._onRequestScrollLines=this._register(new ce),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let l=this._register(new sSe({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>MC(n.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{l.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new bSe(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},l)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(o.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(io.runAndSubscribe(i.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=i.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Yt(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Yt(()=>this._styleElement.remove())),this._register(io.runAndSubscribe(i.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${i.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${i.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${i.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
212
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:this._optionsService.rawOptions.overviewRuler?.width||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};qN=xr([ye(2,un),ye(3,yl),ye(4,pte),ye(5,wh),ye(6,fn),ye(7,_l)],qN);var KN=class extends Qe{constructor(e,t,r,n,o){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=n,this._renderService=o,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(i=>this._removeDecoration(i))),this._register(Yt(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",e?.options?.layer==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){this._decorationElements.get(e)?.remove(),this._decorationElements.delete(e),e.dispose()}};KN=xr([ye(1,un),ye(2,yl),ye(3,ny),ye(4,_l)],KN);var _Se=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},gs={full:0,left:0,center:0,right:0},rd={full:0,left:0,center:0,right:0},Fb={full:0,left:0,center:0,right:0},BC=class extends Qe{constructor(e,t,r,n,o,i,a,s){super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=n,this._renderService=o,this._optionsService=i,this._themeService=a,this._coreBrowserService=s,this._colorZoneStore=new _Se,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement),this._register(Yt(()=>this._canvas?.remove()));let l=this._canvas.getContext("2d");if(l)this._ctx=l;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){return this._optionsService.options.overviewRuler?.width||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);rd.full=this._canvas.width,rd.left=e,rd.center=t,rd.right=e,this._refreshDrawHeightConstants(),Fb.full=1,Fb.left=1,Fb.center=1+rd.left,Fb.right=1+rd.left+rd.center}_refreshDrawHeightConstants(){gs.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);gs.left=t,gs.center=t,gs.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gs.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gs.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gs.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*gs.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Fb[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-gs[e.position||"full"]/2),rd[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+gs[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};BC=xr([ye(2,un),ye(3,ny),ye(4,_l),ye(5,fn),ye(6,wh),ye(7,yl)],BC);var re;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
213
+ `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL="\x7F"))(re||(re={}));var Qb;(e=>(e.PAD="\x80",e.HOP="\x81",e.BPH="\x82",e.NBH="\x83",e.IND="\x84",e.NEL="\x85",e.SSA="\x86",e.ESA="\x87",e.HTS="\x88",e.HTJ="\x89",e.VTS="\x8A",e.PLD="\x8B",e.PLU="\x8C",e.RI="\x8D",e.SS2="\x8E",e.SS3="\x8F",e.DCS="\x90",e.PU1="\x91",e.PU2="\x92",e.STS="\x93",e.CCH="\x94",e.MW="\x95",e.SPA="\x96",e.EPA="\x97",e.SOS="\x98",e.SGCI="\x99",e.SCI="\x9A",e.CSI="\x9B",e.ST="\x9C",e.OSC="\x9D",e.PM="\x9E",e.APC="\x9F"))(Qb||(Qb={}));var XN;(e=>e.ST=`${re.ESC}\\`)(XN||(XN={}));var QN=class{constructor(e,t,r,n,o,i){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=n,this._coreService=o,this._renderService=i,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${re.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,o=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=o+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let i=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(i.width,1)+"px",this._textarea.style.height=Math.max(i.height,1)+"px",this._textarea.style.lineHeight=i.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};QN=xr([ye(2,un),ye(3,fn),ye(4,mf),ye(5,_l)],QN);var ro=0,oo=0,no=0,vr=0,$ee={css:"#00000000",rgba:0},Cr;(e=>{function t(o,i,a,s){return s!==void 0?`#${af(o)}${af(i)}${af(a)}${af(s)}`:`#${af(o)}${af(i)}${af(a)}`}e.toCss=t;function r(o,i,a,s=255){return(o<<24|i<<16|a<<8|s)>>>0}e.toRgba=r;function n(o,i,a,s){return{css:e.toCss(o,i,a,s),rgba:e.toRgba(o,i,a,s)}}e.toColor=n})(Cr||(Cr={}));var Vt;(e=>{function t(l,c){if(vr=(c.rgba&255)/255,vr===1)return{css:c.css,rgba:c.rgba};let d=c.rgba>>24&255,u=c.rgba>>16&255,f=c.rgba>>8&255,m=l.rgba>>24&255,p=l.rgba>>16&255,g=l.rgba>>8&255;ro=m+Math.round((d-m)*vr),oo=p+Math.round((u-p)*vr),no=g+Math.round((f-g)*vr);let y=Cr.toCss(ro,oo,no),v=Cr.toRgba(ro,oo,no);return{css:y,rgba:v}}e.blend=t;function r(l){return(l.rgba&255)===255}e.isOpaque=r;function n(l,c,d){let u=Yb.ensureContrastRatio(l.rgba,c.rgba,d);if(u)return Cr.toColor(u>>24&255,u>>16&255,u>>8&255)}e.ensureContrastRatio=n;function o(l){let c=(l.rgba|255)>>>0;return[ro,oo,no]=Yb.toChannels(c),{css:Cr.toCss(ro,oo,no),rgba:c}}e.opaque=o;function i(l,c){return vr=Math.round(c*255),[ro,oo,no]=Yb.toChannels(l.rgba),{css:Cr.toCss(ro,oo,no,vr),rgba:Cr.toRgba(ro,oo,no,vr)}}e.opacity=i;function a(l,c){return vr=l.rgba&255,i(l,vr*c/255)}e.multiplyOpacity=a;function s(l){return[l.rgba>>24&255,l.rgba>>16&255,l.rgba>>8&255]}e.toColorRGB=s})(Vt||(Vt={}));var ir;(e=>{let t,r;try{let o=document.createElement("canvas");o.width=1,o.height=1;let i=o.getContext("2d",{willReadFrequently:!0});i&&(t=i,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function n(o){if(o.match(/#[\da-f]{3,8}/i))switch(o.length){case 4:return ro=parseInt(o.slice(1,2).repeat(2),16),oo=parseInt(o.slice(2,3).repeat(2),16),no=parseInt(o.slice(3,4).repeat(2),16),Cr.toColor(ro,oo,no);case 5:return ro=parseInt(o.slice(1,2).repeat(2),16),oo=parseInt(o.slice(2,3).repeat(2),16),no=parseInt(o.slice(3,4).repeat(2),16),vr=parseInt(o.slice(4,5).repeat(2),16),Cr.toColor(ro,oo,no,vr);case 7:return{css:o,rgba:(parseInt(o.slice(1),16)<<8|255)>>>0};case 9:return{css:o,rgba:parseInt(o.slice(1),16)>>>0}}let i=o.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(i)return ro=parseInt(i[1]),oo=parseInt(i[2]),no=parseInt(i[3]),vr=Math.round((i[5]===void 0?1:parseFloat(i[5]))*255),Cr.toColor(ro,oo,no,vr);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=o,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[ro,oo,no,vr]=t.getImageData(0,0,1,1).data,vr!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Cr.toRgba(ro,oo,no,vr),css:o}}e.toColor=n})(ir||(ir={}));var Lo;(e=>{function t(n){return r(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function r(n,o,i){let a=n/255,s=o/255,l=i/255,c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),d=s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4);return c*.2126+d*.7152+u*.0722}e.relativeLuminance2=r})(Lo||(Lo={}));var Yb;(e=>{function t(a,s){if(vr=(s&255)/255,vr===1)return s;let l=s>>24&255,c=s>>16&255,d=s>>8&255,u=a>>24&255,f=a>>16&255,m=a>>8&255;return ro=u+Math.round((l-u)*vr),oo=f+Math.round((c-f)*vr),no=m+Math.round((d-m)*vr),Cr.toRgba(ro,oo,no)}e.blend=t;function r(a,s,l){let c=Lo.relativeLuminance(a>>8),d=Lo.relativeLuminance(s>>8);if(gl(c,d)<l){if(d<c){let m=n(a,s,l),p=gl(c,Lo.relativeLuminance(m>>8));if(p<l){let g=o(a,s,l),y=gl(c,Lo.relativeLuminance(g>>8));return p>y?m:g}return m}let u=o(a,s,l),f=gl(c,Lo.relativeLuminance(u>>8));if(f<l){let m=n(a,s,l),p=gl(c,Lo.relativeLuminance(m>>8));return f>p?u:m}return u}}e.ensureContrastRatio=r;function n(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));for(;g<l&&(f>0||m>0||p>0);)f-=Math.max(0,Math.ceil(f*.1)),m-=Math.max(0,Math.ceil(m*.1)),p-=Math.max(0,Math.ceil(p*.1)),g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.reduceLuminance=n;function o(a,s,l){let c=a>>24&255,d=a>>16&255,u=a>>8&255,f=s>>24&255,m=s>>16&255,p=s>>8&255,g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));for(;g<l&&(f<255||m<255||p<255);)f=Math.min(255,f+Math.ceil((255-f)*.1)),m=Math.min(255,m+Math.ceil((255-m)*.1)),p=Math.min(255,p+Math.ceil((255-p)*.1)),g=gl(Lo.relativeLuminance2(f,m,p),Lo.relativeLuminance2(c,d,u));return(f<<24|m<<16|p<<8|255)>>>0}e.increaseLuminance=o;function i(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=i})(Yb||(Yb={}));function af(e){let t=e.toString(16);return t.length<2?"0"+t:t}function gl(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var ISe=class extends oy{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},jC=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new Mi}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],n=t.translateToString(!0),o=0,i=0,a=0,s=t.getFg(0),l=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==s||this._workCell.bg!==l){if(c-o>1){let d=this._getJoinedRanges(n,a,i,t,o);for(let u=0;u<d.length;u++)r.push(d[u])}o=c,a=i,s=this._workCell.fg,l=this._workCell.bg}i+=this._workCell.getChars().length||id.length}if(this._bufferService.cols-o>1){let c=this._getJoinedRanges(n,a,i,t,o);for(let d=0;d<c.length;d++)r.push(c[d])}return r}_getJoinedRanges(e,t,r,n,o){let i=e.substring(t,r),a=[];try{a=this._characterJoiners[0].handler(i)}catch(s){console.error(s)}for(let s=1;s<this._characterJoiners.length;s++)try{let l=this._characterJoiners[s].handler(i);for(let c=0;c<l.length;c++)jC._mergeRanges(a,l[c])}catch(l){console.error(l)}return this._stringRangesToCellRanges(a,n,o),a}_stringRangesToCellRanges(e,t,r){let n=0,o=!1,i=0,a=e[n];if(a){for(let s=r;s<this._bufferService.cols;s++){let l=t.getWidth(s),c=t.getString(s).length||id.length;if(l!==0){if(!o&&a[0]<=i&&(a[0]=s,o=!0),a[1]<=i){if(a[1]=s,a=e[++n],!a)break;a[0]<=i?(a[0]=s,o=!0):o=!1}i+=c}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let n=0;n<e.length;n++){let o=e[n];if(r){if(t[1]<=o[0])return e[n-1][1]=t[1],e;if(t[1]<=o[1])return e[n-1][1]=Math.max(t[1],o[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=o[0])return e.splice(n,0,t),e;if(t[1]<=o[1])return o[0]=Math.min(t[0],o[0]),e;t[0]<o[1]&&(o[0]=Math.min(t[0],o[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};jC=xr([ye(0,un)],jC);function wSe(e){return 57508<=e&&e<=57558}function SSe(e){return 9472<=e&&e<=9631}function kSe(e){return wSe(e)||SSe(e)}function CSe(){return{css:{canvas:SC(),cell:SC()},device:{canvas:SC(),cell:SC(),char:{width:0,height:0,left:0,top:0}}}}function SC(){return{width:0,height:0}}var YN=class{constructor(e,t,r,n,o,i,a){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=n,this._coreService=o,this._decorationService=i,this._themeService=a,this._workCell=new Mi,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,n,o,i,a,s,l,c,d){let u=[],f=this._characterJoinerService.getJoinedCharacters(t),m=this._themeService.colors,p=e.getNoBgTrimmedLength();r&&p<i+1&&(p=i+1);let g,y=0,v="",x=0,_=0,I=0,S=0,w=!1,P=0,$=!1,B=0,W=0,H=[],K=c!==-1&&d!==-1;for(let T=0;T<p;T++){e.loadCell(T,this._workCell);let k=this._workCell.getWidth();if(k===0)continue;let E=!1,C=T>=W,A=T,R=this._workCell;if(f.length>0&&T===f[0][0]&&C){let Fe=f.shift(),Jt=this._isCellInSelection(Fe[0],t);for(x=Fe[0]+1;x<Fe[1];x++)C&&(C=Jt===this._isCellInSelection(x,t));C&&(C=!r||i<Fe[0]||i>=Fe[1]),C?(E=!0,R=new ISe(this._workCell,e.translateToString(!0,Fe[0],Fe[1]),Fe[1]-Fe[0]),A=Fe[1]-1,k=R.getWidth()):W=Fe[1]}let N=this._isCellInSelection(T,t),U=r&&T===i,G=K&&T>=c&&T<=d,oe=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,Fe=>{oe=!0});let ve=R.getChars()||id;if(ve===" "&&(R.isUnderline()||R.isOverline())&&(ve="\xA0"),B=k*s-l.get(ve,R.isBold(),R.isItalic()),!g)g=this._document.createElement("span");else if(y&&(N&&$||!N&&!$&&R.bg===_)&&(N&&$&&m.selectionForeground||R.fg===I)&&R.extended.ext===S&&G===w&&B===P&&!U&&!E&&!oe&&C){R.isInvisible()?v+=id:v+=ve,y++;continue}else y&&(g.textContent=v),g=this._document.createElement("span"),y=0,v="";if(_=R.bg,I=R.fg,S=R.extended.ext,w=G,P=B,$=N,E&&i>=T&&i<=A&&(i=T),!this._coreService.isCursorHidden&&U&&this._coreService.isCursorInitialized){if(H.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&H.push("xterm-cursor-blink"),H.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(o)switch(o){case"outline":H.push("xterm-cursor-outline");break;case"block":H.push("xterm-cursor-block");break;case"bar":H.push("xterm-cursor-bar");break;case"underline":H.push("xterm-cursor-underline");break;default:break}}if(R.isBold()&&H.push("xterm-bold"),R.isItalic()&&H.push("xterm-italic"),R.isDim()&&H.push("xterm-dim"),R.isInvisible()?v=id:v=R.getChars()||id,R.isUnderline()&&(H.push(`xterm-underline-${R.extended.underlineStyle}`),v===" "&&(v="\xA0"),!R.isUnderlineColorDefault()))if(R.isUnderlineColorRGB())g.style.textDecorationColor=`rgb(${oy.toColorRGB(R.getUnderlineColor()).join(",")})`;else{let Fe=R.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&R.isBold()&&Fe<8&&(Fe+=8),g.style.textDecorationColor=m.ansi[Fe].css}R.isOverline()&&(H.push("xterm-overline"),v===" "&&(v="\xA0")),R.isStrikethrough()&&H.push("xterm-strikethrough"),G&&(g.style.textDecoration="underline");let pe=R.getFgColor(),Y=R.getFgColorMode(),ne=R.getBgColor(),we=R.getBgColorMode(),se=!!R.isInverse();if(se){let Fe=pe;pe=ne,ne=Fe;let Jt=Y;Y=we,we=Jt}let Ae,He,et=!1;this._decorationService.forEachDecorationAtCell(T,t,void 0,Fe=>{Fe.options.layer!=="top"&&et||(Fe.backgroundColorRGB&&(we=50331648,ne=Fe.backgroundColorRGB.rgba>>8&16777215,Ae=Fe.backgroundColorRGB),Fe.foregroundColorRGB&&(Y=50331648,pe=Fe.foregroundColorRGB.rgba>>8&16777215,He=Fe.foregroundColorRGB),et=Fe.options.layer==="top")}),!et&&N&&(Ae=this._coreBrowserService.isFocused?m.selectionBackgroundOpaque:m.selectionInactiveBackgroundOpaque,ne=Ae.rgba>>8&16777215,we=50331648,et=!0,m.selectionForeground&&(Y=50331648,pe=m.selectionForeground.rgba>>8&16777215,He=m.selectionForeground)),et&&H.push("xterm-decoration-top");let dt;switch(we){case 16777216:case 33554432:dt=m.ansi[ne],H.push(`xterm-bg-${ne}`);break;case 50331648:dt=Cr.toColor(ne>>16,ne>>8&255,ne&255),this._addStyle(g,`background-color:#${Aee((ne>>>0).toString(16),"0",6)}`);break;default:se?(dt=m.foreground,H.push("xterm-bg-257")):dt=m.background}switch(Ae||R.isDim()&&(Ae=Vt.multiplyOpacity(dt,.5)),Y){case 16777216:case 33554432:R.isBold()&&pe<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(pe+=8),this._applyMinimumContrast(g,dt,m.ansi[pe],R,Ae,void 0)||H.push(`xterm-fg-${pe}`);break;case 50331648:let Fe=Cr.toColor(pe>>16&255,pe>>8&255,pe&255);this._applyMinimumContrast(g,dt,Fe,R,Ae,He)||this._addStyle(g,`color:#${Aee(pe.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(g,dt,m.foreground,R,Ae,He)||se&&H.push("xterm-fg-257")}H.length&&(g.className=H.join(" "),H.length=0),!U&&!E&&!oe&&C?y++:g.textContent=v,B!==this.defaultSpacing&&(g.style.letterSpacing=`${B}px`),u.push(g),T=A}return g&&y&&(g.textContent=v),u}_applyMinimumContrast(e,t,r,n,o,i){if(this._optionsService.rawOptions.minimumContrastRatio===1||kSe(n.getCode()))return!1;let a=this._getContrastCache(n),s;if(!o&&!i&&(s=a.getColor(t.rgba,r.rgba)),s===void 0){let l=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);s=Vt.ensureContrastRatio(o||t,i||r,l),a.setColor((o||t).rgba,(i||r).rgba,s??null)}return s?(this._addStyle(e,`color:${s.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,n=this._selectionEnd;return!r||!n?!1:this._columnSelectMode?r[0]<=n[0]?e>=r[0]&&t>=r[1]&&e<n[0]&&t<=n[1]:e<r[0]&&t>=r[1]&&e>=n[0]&&t<=n[1]:t>r[1]&&t<n[1]||r[1]===n[1]&&t===r[1]&&e>=r[0]&&e<n[0]||r[1]<n[1]&&t===n[1]&&e<n[0]||r[1]<n[1]&&t===r[1]&&e>=r[0]}};YN=xr([ye(1,vte),ye(2,fn),ye(3,yl),ye(4,mf),ye(5,ny),ye(6,wh)],YN);function Aee(e,t,r){for(;e.length<r;)e=t+e;return e}var PSe=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontStyle="italic";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontWeight="bold",i.style.fontStyle="italic",this._measureElements=[r,n,o,i],this._container.appendChild(r),this._container.appendChild(n),this._container.appendChild(o),this._container.appendChild(i),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,r,n){e===this._font&&t===this._fontSize&&r===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,r){let n=0;if(!t&&!r&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let a=this._measure(e,0);return a>0&&(this._flat[n]=a),a}let o=e;t&&(o+="B"),r&&(o+="I");let i=this._holey.get(o);if(i===void 0){let a=0;t&&(a|=1),r&&(a|=2),i=this._measure(e,a),i>0&&this._holey.set(o,i)}return i}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},DSe=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,r,n=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let o=e.buffers.active.ydisp,i=t[1]-o,a=r[1]-o,s=Math.max(i,0),l=Math.min(a,e.rows-1);if(s>=e.rows||l<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=i,this.viewportEndRow=a,this.viewportCappedStartRow=s,this.viewportCappedEndRow=l,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function RSe(){return new DSe}var vN="xterm-dom-renderer-owner-",Ni="xterm-rows",kC="xterm-fg-",Oee="xterm-bg-",Lb="xterm-focus",CC="xterm-selection",TSe=1,JN=class extends Qe{constructor(e,t,r,n,o,i,a,s,l,c,d,u,f,m){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=n,this._viewportElement=o,this._helperContainer=i,this._linkifier2=a,this._charSizeService=l,this._optionsService=c,this._bufferService=d,this._coreService=u,this._coreBrowserService=f,this._themeService=m,this._terminalClass=TSe++,this._rowElements=[],this._selectionRenderModel=RSe(),this.onRequestRedraw=this._register(new ce).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Ni),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(CC),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=CSe(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(p=>this._injectCss(p))),this._injectCss(this._themeService.colors),this._rowFactory=s.createInstance(YN,document),this._element.classList.add(vN+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(p=>this._handleLinkHover(p))),this._register(this._linkifier2.onHideLinkUnderline(p=>this._handleLinkLeave(p))),this._register(Yt(()=>{this._element.classList.remove(vN+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new PSe(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Ni} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Ni} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Ni} .xterm-dim { color: ${Vt.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let r=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,o=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${o} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Ni}.${Lb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Ni}.${Lb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Ni}.${Lb} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${o} 1s step-end infinite;}${this._terminalSelector} .${Ni} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Ni} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Ni} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Ni} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Ni} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${CC} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${CC} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${CC} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[i,a]of e.ansi.entries())t+=`${this._terminalSelector} .${kC}${i} { color: ${a.css}; }${this._terminalSelector} .${kC}${i}.xterm-dim { color: ${Vt.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${Oee}${i} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${kC}257 { color: ${Vt.opaque(e.background).css}; }${this._terminalSelector} .${kC}257.xterm-dim { color: ${Vt.multiplyOpacity(Vt.opaque(e.background),.5).css}; }${this._terminalSelector} .${Oee}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Lb),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Lb),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,o=this._selectionRenderModel.viewportEndRow,i=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,s=this._document.createDocumentFragment();if(r){let l=e[0]>t[0];s.appendChild(this._createSelectionElement(i,l?t[0]:e[0],l?e[0]:t[0],a-i+1))}else{let l=n===i?e[0]:0,c=i===o?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(i,l,c));let d=a-i-1;if(s.appendChild(this._createSelectionElement(i+1,0,this._bufferService.cols,d)),i!==a){let u=o===a?t[0]:this._bufferService.cols;s.appendChild(this._createSelectionElement(a,0,u))}}this._selectionContainer.appendChild(s)}_createSelectionElement(e,t,r,n=1){let o=this._document.createElement("div"),i=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(r-t);return i+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-i),o.style.height=`${n*this.dimensions.css.cell.height}px`,o.style.top=`${e*this.dimensions.css.cell.height}px`,o.style.left=`${i}px`,o.style.width=`${a}px`,o}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,n=r.ybase+r.y,o=Math.min(r.x,this._bufferService.cols-1),i=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,s=this._optionsService.rawOptions.cursorInactiveStyle;for(let l=e;l<=t;l++){let c=l+r.ydisp,d=this._rowElements[l],u=r.lines.get(c);if(!d||!u)break;d.replaceChildren(...this._rowFactory.createRow(u,c,c===n,a,s,o,i,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${vN}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,n,o,i){r<0&&(e=0),n<0&&(t=0);let a=this._bufferService.rows-1;r=Math.max(Math.min(r,a),0),n=Math.max(Math.min(n,a),0),o=Math.min(o,this._bufferService.cols);let s=this._bufferService.buffer,l=s.ybase+s.y,c=Math.min(s.x,o-1),d=this._optionsService.rawOptions.cursorBlink,u=this._optionsService.rawOptions.cursorStyle,f=this._optionsService.rawOptions.cursorInactiveStyle;for(let m=r;m<=n;++m){let p=m+s.ydisp,g=this._rowElements[m],y=s.lines.get(p);if(!g||!y)break;g.replaceChildren(...this._rowFactory.createRow(y,p,p===l,u,f,c,d,this.dimensions.css.cell.width,this._widthCache,i?m===r?e:0:-1,i?(m===n?t:o)-1:-1))}}};JN=xr([ye(7,mF),ye(8,ZC),ye(9,fn),ye(10,un),ye(11,mf),ye(12,yl),ye(13,wh)],JN);var eF=class extends Qe{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new ce),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new $Se(this._optionsService))}catch{this._measureStrategy=this._register(new ESe(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};eF=xr([ye(2,fn)],eF);var jte=class extends Qe{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},ESe=class extends jte{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},$Se=class extends jte{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},ASe=class extends Qe{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new OSe(this._window)),this._onDprChange=this._register(new ce),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new ce),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(io.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Be(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Be(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},OSe=class extends Qe{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Ih),this._onDprChange=this._register(new ce),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Yt(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Be(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},zSe=class extends Qe{constructor(){super(),this.linkProviders=[],this._register(Yt(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function _F(e,t,r){let n=r.getBoundingClientRect(),o=e.getComputedStyle(r),i=parseInt(o.getPropertyValue("padding-left")),a=parseInt(o.getPropertyValue("padding-top"));return[t.clientX-n.left-i,t.clientY-n.top-a]}function NSe(e,t,r,n,o,i,a,s,l){if(!i)return;let c=_F(e,t,r);if(c)return c[0]=Math.ceil((c[0]+(l?a/2:0))/a),c[1]=Math.ceil(c[1]/s),c[0]=Math.min(Math.max(c[0],1),n+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),o),c}var tF=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,n,o){return NSe(window,e,t,r,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(e,t){let r=_F(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};tF=xr([ye(0,_l),ye(1,ZC)],tF);var FSe=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},Ute={};wIe(Ute,{getSafariVersion:()=>MSe,isChromeOS:()=>Zte,isFirefox:()=>Vte,isIpad:()=>BSe,isIphone:()=>jSe,isLegacyEdge:()=>LSe,isLinux:()=>IF,isMac:()=>UC,isNode:()=>KC,isSafari:()=>Hte,isWindows:()=>Wte});var KC=typeof process<"u"&&"title"in process,iy=KC?"node":navigator.userAgent,ay=KC?"node":navigator.platform,Vte=iy.includes("Firefox"),LSe=iy.includes("Edge"),Hte=/^((?!chrome|android).)*safari/i.test(iy);function MSe(){if(!Hte)return 0;let e=iy.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var UC=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(ay),BSe=ay==="iPad",jSe=ay==="iPhone",Wte=["Windows","Win16","Win32","WinCE"].includes(ay),IF=ay.indexOf("Linux")>=0,Zte=/\bCrOS\b/.test(iy),Gte=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,r=0,n=e.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),o=e.timeRemaining(),r*1.5>o){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=o}this.clear()}},USe=class extends Gte{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},VSe=class extends Gte{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},VC=!KC&&"requestIdleCallback"in window?VSe:USe,HSe=class{constructor(){this._queue=new VC}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},rF=class extends Qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=n,this._coreService=o,this._coreBrowserService=s,this._renderer=this._register(new Ih),this._pausedResizeTask=new HSe,this._observerDisposable=this._register(new Ih),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new ce),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new ce),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new ce),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new ce),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new FSe((c,d)=>this._renderRows(c,d),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new WSe(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Yt(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>this._renderer.value?.clear())),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(i.onDecorationRegistered(()=>this._fullRefresh())),this._register(i.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(l.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=Yt(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>this._renderer.value?.handleResize(e,t)):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(e,t,r){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,this._renderer.value?.handleSelectionChanged(e,t,r)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};rF=xr([ye(2,fn),ye(3,ZC),ye(4,mf),ye(5,ny),ye(6,un),ye(7,yl),ye(8,wh)],rF);var WSe=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function ZSe(e,t,r,n){let o=r.buffer.x,i=r.buffer.y;if(!r.buffer.hasScrollback)return KSe(o,i,e,t,r,n)+XC(i,t,r,n)+XSe(o,i,e,t,r,n);let a;if(i===t)return a=o>e?"D":"C",ty(Math.abs(o-e),ey(a,n));a=i>t?"D":"C";let s=Math.abs(i-t),l=qSe(i>t?e:o,r)+(s-1)*r.cols+1+GSe(i>t?o:e,r);return ty(l,ey(a,n))}function GSe(e,t){return e-1}function qSe(e,t){return t.cols-e}function KSe(e,t,r,n,o,i){return XC(t,n,o,i).length===0?"":ty(Kte(e,t,e,t-ff(t,o),!1,o).length,ey("D",i))}function XC(e,t,r,n){let o=e-ff(e,r),i=t-ff(t,r),a=Math.abs(o-i)-QSe(e,t,r);return ty(a,ey(qte(e,t),n))}function XSe(e,t,r,n,o,i){let a;XC(t,n,o,i).length>0?a=n-ff(n,o):a=t;let s=n,l=YSe(e,t,r,n,o,i);return ty(Kte(e,a,r,s,l==="C",o).length,ey(l,i))}function QSe(e,t,r){let n=0,o=e-ff(e,r),i=t-ff(t,r);for(let a=0;a<Math.abs(o-i);a++){let s=qte(e,t)==="A"?-1:1;r.buffer.lines.get(o+s*a)?.isWrapped&&n++}return n}function ff(e,t){let r=0,n=t.buffer.lines.get(e),o=n?.isWrapped;for(;o&&e>=0&&e<t.rows;)r++,n=t.buffer.lines.get(--e),o=n?.isWrapped;return r}function YSe(e,t,r,n,o,i){let a;return XC(r,n,o,i).length>0?a=n-ff(n,o):a=t,e<r&&a<=n||e>=r&&a<n?"C":"D"}function qte(e,t){return e>t?"A":"B"}function Kte(e,t,r,n,o,i){let a=e,s=t,l="";for(;(a!==r||s!==n)&&s>=0&&s<i.buffer.lines.length;)a+=o?1:-1,o&&a>i.cols-1?(l+=i.buffer.translateBufferLineToString(s,!1,e,a),a=0,e=0,s++):!o&&a<0&&(l+=i.buffer.translateBufferLineToString(s,!1,0,e+1),a=i.cols-1,e=a,s--);return l+i.buffer.translateBufferLineToString(s,!1,e,a)}function ey(e,t){let r=t?"O":"[";return re.ESC+r+e}function ty(e,t){e=Math.floor(e);let r="";for(let n=0;n<e;n++)r+=t;return r}var JSe=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function zee(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var xN=50,e1e=15,t1e=50,r1e=500,o1e="\xA0",n1e=new RegExp(o1e,"g"),oF=class extends Qe{constructor(e,t,r,n,o,i,a,s,l){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=n,this._coreService=o,this._mouseService=i,this._optionsService=a,this._renderService=s,this._coreBrowserService=l,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new Mi,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new ce),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new ce),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new ce),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new ce),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new JSe(this._bufferService),this._activeSelectionMode=0,this._register(Yt(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let o=e[0]<t[0]?e[0]:t[0],i=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let s=r.translateBufferLineToString(a,!0,o,i);n.push(s)}}else{let o=e[1]===t[1]?t[0]:void 0;n.push(r.translateBufferLineToString(e[1],!0,e[0],o));for(let i=e[1]+1;i<=t[1]-1;i++){let a=r.lines.get(i),s=r.translateBufferLineToString(i,!0);a?.isWrapped?n[n.length-1]+=s:n.push(s)}if(e[1]!==t[1]){let i=r.lines.get(t[1]),a=r.translateBufferLineToString(t[1],!0,0,t[0]);i&&i.isWrapped?n[n.length-1]+=a:n.push(a)}}return n.map(o=>o.replace(n1e," ")).join(Wte?`\r
214
+ `:`
215
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),IF&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n||!t?!1:this._areCoordsInSelection(t,r,n)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n?!1:this._areCoordsInSelection([e,t],r,n)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){let r=this._linkifier.currentLink?.link?.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=zee(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=_F(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-xN),xN),t/=xN,t/Math.abs(t)+Math.round(t*(e1e-1)))}shouldForceSelection(e){return UC?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),t1e)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(UC&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let n=r.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<r1e&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let n=ZSe(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let n=0;t>=n;n++){let o=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:o>1&&t!==n&&(r+=o-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let o=this._bufferService.buffer,i=o.lines.get(e[1]);if(!i)return;let a=o.translateBufferLineToString(e[1],!1),s=this._convertViewportColToCharacterIndex(i,e[0]),l=s,c=e[0]-s,d=0,u=0,f=0,m=0;if(a.charAt(s)===" "){for(;s>0&&a.charAt(s-1)===" ";)s--;for(;l<a.length&&a.charAt(l+1)===" ";)l++}else{let y=e[0],v=e[0];i.getWidth(y)===0&&(d++,y--),i.getWidth(v)===2&&(u++,v++);let x=i.getString(v).length;for(x>1&&(m+=x-1,l+=x-1);y>0&&s>0&&!this._isCharWordSeparator(i.loadCell(y-1,this._workCell));){i.loadCell(y-1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===0?(d++,y--):_>1&&(f+=_-1,s-=_-1),s--,y--}for(;v<i.length&&l+1<a.length&&!this._isCharWordSeparator(i.loadCell(v+1,this._workCell));){i.loadCell(v+1,this._workCell);let _=this._workCell.getChars().length;this._workCell.getWidth()===2?(u++,v++):_>1&&(m+=_-1,l+=_-1),l++,v++}}l++;let p=s+c-d+f,g=Math.min(this._bufferService.cols,l-s+d+u-f-m);if(!(!t&&a.slice(s,l).trim()==="")){if(r&&p===0&&i.getCodePoint(0)!==32){let y=o.lines.get(e[1]-1);if(y&&i.isWrapped&&y.getCodePoint(this._bufferService.cols-1)!==32){let v=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(v){let x=this._bufferService.cols-v.start;p-=x,g+=x}}}if(n&&p+g===this._bufferService.cols&&i.getCodePoint(this._bufferService.cols-1)!==32){let y=o.lines.get(e[1]+1);if(y?.isWrapped&&y.getCodePoint(0)!==32){let v=this._getWordAt([0,e[1]+1],!1,!1,!0);v&&(g+=v.length)}}return{start:p,length:g}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=zee(r,this._bufferService.cols)}};oF=xr([ye(3,un),ye(4,mf),ye(5,pF),ye(6,fn),ye(7,_l),ye(8,yl)],oF);var Nee=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Fee=class{constructor(){this._color=new Nee,this._css=new Nee}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Vr=Object.freeze((()=>{let e=[ir.toColor("#2e3436"),ir.toColor("#cc0000"),ir.toColor("#4e9a06"),ir.toColor("#c4a000"),ir.toColor("#3465a4"),ir.toColor("#75507b"),ir.toColor("#06989a"),ir.toColor("#d3d7cf"),ir.toColor("#555753"),ir.toColor("#ef2929"),ir.toColor("#8ae234"),ir.toColor("#fce94f"),ir.toColor("#729fcf"),ir.toColor("#ad7fa8"),ir.toColor("#34e2e2"),ir.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let n=t[r/36%6|0],o=t[r/6%6|0],i=t[r%6];e.push({css:Cr.toCss(n,o,i),rgba:Cr.toRgba(n,o,i)})}for(let r=0;r<24;r++){let n=8+r*10;e.push({css:Cr.toCss(n,n,n),rgba:Cr.toRgba(n,n,n)})}return e})()),sf=ir.toColor("#ffffff"),Wb=ir.toColor("#000000"),Lee=ir.toColor("#ffffff"),Mee=Wb,Mb={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},i1e=sf,nF=class extends Qe{constructor(e){super(),this._optionsService=e,this._contrastCache=new Fee,this._halfContrastCache=new Fee,this._onChangeColors=this._register(new ce),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:sf,background:Wb,cursor:Lee,cursorAccent:Mee,selectionForeground:void 0,selectionBackgroundTransparent:Mb,selectionBackgroundOpaque:Vt.blend(Wb,Mb),selectionInactiveBackgroundTransparent:Mb,selectionInactiveBackgroundOpaque:Vt.blend(Wb,Mb),scrollbarSliderBackground:Vt.opacity(sf,.2),scrollbarSliderHoverBackground:Vt.opacity(sf,.4),scrollbarSliderActiveBackground:Vt.opacity(sf,.5),overviewRulerBorder:sf,ansi:Vr.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=At(e.foreground,sf),t.background=At(e.background,Wb),t.cursor=Vt.blend(t.background,At(e.cursor,Lee)),t.cursorAccent=Vt.blend(t.background,At(e.cursorAccent,Mee)),t.selectionBackgroundTransparent=At(e.selectionBackground,Mb),t.selectionBackgroundOpaque=Vt.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=At(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Vt.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?At(e.selectionForeground,$ee):void 0,t.selectionForeground===$ee&&(t.selectionForeground=void 0),Vt.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Vt.opacity(t.selectionBackgroundTransparent,.3)),Vt.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Vt.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=At(e.scrollbarSliderBackground,Vt.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=At(e.scrollbarSliderHoverBackground,Vt.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=At(e.scrollbarSliderActiveBackground,Vt.opacity(t.foreground,.5)),t.overviewRulerBorder=At(e.overviewRulerBorder,i1e),t.ansi=Vr.slice(),t.ansi[0]=At(e.black,Vr[0]),t.ansi[1]=At(e.red,Vr[1]),t.ansi[2]=At(e.green,Vr[2]),t.ansi[3]=At(e.yellow,Vr[3]),t.ansi[4]=At(e.blue,Vr[4]),t.ansi[5]=At(e.magenta,Vr[5]),t.ansi[6]=At(e.cyan,Vr[6]),t.ansi[7]=At(e.white,Vr[7]),t.ansi[8]=At(e.brightBlack,Vr[8]),t.ansi[9]=At(e.brightRed,Vr[9]),t.ansi[10]=At(e.brightGreen,Vr[10]),t.ansi[11]=At(e.brightYellow,Vr[11]),t.ansi[12]=At(e.brightBlue,Vr[12]),t.ansi[13]=At(e.brightMagenta,Vr[13]),t.ansi[14]=At(e.brightCyan,Vr[14]),t.ansi[15]=At(e.brightWhite,Vr[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<r;n++)t.ansi[n+16]=At(e.extendedAnsi[n],Vr[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};nF=xr([ye(0,fn)],nF);function At(e,t){if(e!==void 0)try{return ir.toColor(e)}catch{}return t}var a1e=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},s1e=class{constructor(){this._services=new a1e,this._services.set(mF,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let r=TIe(e).sort((i,a)=>i.index-a.index),n=[];for(let i of r){let a=this._services.get(i.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${i.id._id}.`);n.push(a)}let o=r.length>0?r[0].index:t.length;if(t.length!==o)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},l1e={trace:0,debug:1,info:2,warn:3,error:4,off:5},c1e="xterm.js: ",iF=class extends Qe{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),d1e=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=l1e[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":c1e)+t,...r)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};iF=xr([ye(0,fn)],iF);var d1e,Bee=class extends Qe{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new ce),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new ce),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new ce),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...r){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let n=this._length+r.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let o=t-1;o>=0;o--)this.set(e+o+r,this.get(e+o));let n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+r,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Je=3,Ar=Object.freeze(new oy),PC=0,bN=2,Zb=class Xte{constructor(t,r,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Je);let o=r||Mi.fromCharData([0,dte,1,0]);for(let i=0;i<t;++i)this.setCell(i,o);this.length=t}get(t){let r=this._data[t*Je+0],n=r&2097151;return[this._data[t*Je+1],r&2097152?this._combined[t]:n?nd(n):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,r){this._data[t*Je+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*Je+0]=t|2097152|r[2]<<22):this._data[t*Je+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*Je+0]>>22}hasWidth(t){return this._data[t*Je+0]&12582912}getFg(t){return this._data[t*Je+1]}getBg(t){return this._data[t*Je+2]}hasContent(t){return this._data[t*Je+0]&4194303}getCodePoint(t){let r=this._data[t*Je+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*Je+0]&2097152}getString(t){let r=this._data[t*Je+0];return r&2097152?this._combined[t]:r&2097151?nd(r&2097151):""}isProtected(t){return this._data[t*Je+2]&536870912}loadCell(t,r){return PC=t*Je,r.content=this._data[PC+0],r.fg=this._data[PC+1],r.bg=this._data[PC+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Je+0]=r.content,this._data[t*Je+1]=r.fg,this._data[t*Je+2]=r.bg}setCellFromCodepoint(t,r,n,o){o.bg&268435456&&(this._extendedAttrs[t]=o.extended),this._data[t*Je+0]=r|n<<22,this._data[t*Je+1]=o.fg,this._data[t*Je+2]=o.bg}addCodepointToCell(t,r,n){let o=this._data[t*Je+0];o&2097152?this._combined[t]+=nd(r):o&2097151?(this._combined[t]=nd(o&2097151)+nd(r),o&=-2097152,o|=2097152):o=r|1<<22,n&&(o&=-12582913,o|=n<<22),this._data[t*Je+0]=o}insertCells(t,r,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length-t){let o=new Mi;for(let i=this.length-t-r-1;i>=0;--i)this.setCell(t+r+i,this.loadCell(t+i,o));for(let i=0;i<r;++i)this.setCell(t+i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,r,n){if(t%=this.length,r<this.length-t){let o=new Mi;for(let i=0;i<this.length-t-r;++i)this.setCell(t+i,this.loadCell(t+r+i,o));for(let i=this.length-r;i<this.length;++i)this.setCell(i,n)}else for(let o=t;o<this.length;++o)this.setCell(o,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,r,n,o=!1){if(o){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.setCell(t++,n)}resize(t,r){if(t===this.length)return this._data.length*4*bN<this._data.buffer.byteLength;let n=t*Je;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let o=new Uint32Array(n);o.set(this._data),this._data=o}for(let o=this.length;o<t;++o)this.setCell(o,r)}else{this._data=this._data.subarray(0,n);let o=Object.keys(this._combined);for(let a=0;a<o.length;a++){let s=parseInt(o[a],10);s>=t&&delete this._combined[s]}let i=Object.keys(this._extendedAttrs);for(let a=0;a<i.length;a++){let s=parseInt(i[a],10);s>=t&&delete this._extendedAttrs[s]}}return this.length=t,n*4*bN<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*bN<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new Xte(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Je+0]&4194303)return t+(this._data[t*Je+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Je+0]&4194303||this._data[t*Je+2]&50331648)return t+(this._data[t*Je+0]>>22);return 0}copyCellsFrom(t,r,n,o,i){let a=t._data;if(i)for(let l=o-1;l>=0;l--){for(let c=0;c<Je;c++)this._data[(n+l)*Je+c]=a[(r+l)*Je+c];a[(r+l)*Je+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}else for(let l=0;l<o;l++){for(let c=0;c<Je;c++)this._data[(n+l)*Je+c]=a[(r+l)*Je+c];a[(r+l)*Je+2]&268435456&&(this._extendedAttrs[n+l]=t._extendedAttrs[r+l])}let s=Object.keys(t._combined);for(let l=0;l<s.length;l++){let c=parseInt(s[l],10);c>=r&&(this._combined[c-r+n]=t._combined[c])}}translateToString(t,r,n,o){r=r??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),o&&(o.length=0);let i="";for(;r<n;){let a=this._data[r*Je+0],s=a&2097151,l=a&2097152?this._combined[r]:s?nd(s):id;if(i+=l,o)for(let c=0;c<l.length;++c)o.push(r);r+=a>>22||1}return o&&o.push(r),i}};function u1e(e,t,r,n,o,i){let a=[];for(let s=0;s<e.length-1;s++){let l=s,c=e.get(++l);if(!c.isWrapped)continue;let d=[e.get(s)];for(;l<e.length&&c.isWrapped;)d.push(c),c=e.get(++l);if(!i&&n>=s&&n<l){s+=d.length-1;continue}let u=0,f=ry(d,u,t),m=1,p=0;for(;m<d.length;){let y=ry(d,m,t),v=y-p,x=r-f,_=Math.min(v,x);d[u].copyCellsFrom(d[m],p,f,_,!1),f+=_,f===r&&(u++,f=0),p+=_,p===y&&(m++,p=0),f===0&&u!==0&&d[u-1].getWidth(r-1)===2&&(d[u].copyCellsFrom(d[u-1],r-1,f++,1,!1),d[u-1].setCell(r-1,o))}d[u].replaceCells(f,r,o);let g=0;for(let y=d.length-1;y>0&&(y>u||d[y].getTrimmedLength()===0);y--)g++;g>0&&(a.push(s+d.length-g),a.push(g)),s+=d.length-1}return a}function f1e(e,t){let r=[],n=0,o=t[n],i=0;for(let a=0;a<e.length;a++)if(o===a){let s=t[++n];e.onDeleteEmitter.fire({index:a-i,amount:s}),a+=s-1,i+=s,o=t[++n]}else r.push(a);return{layout:r,countRemoved:i}}function m1e(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.get(t[n]));for(let n=0;n<r.length;n++)e.set(n,r[n]);e.length=t.length}function p1e(e,t,r){let n=[],o=e.map((l,c)=>ry(e,c,t)).reduce((l,c)=>l+c),i=0,a=0,s=0;for(;s<o;){if(o-s<r){n.push(o-s);break}i+=r;let l=ry(e,a,t);i>l&&(i-=l,a++);let c=e[a].getWidth(i-1)===2;c&&i--;let d=c?r-1:r;n.push(d),s+=d}return n}function ry(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,o=e[t+1].getWidth(0)===2;return n&&o?r-1:r}var Qte=class Yte{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=Yte._nextId++,this._onDispose=this.register(new ce),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),uf(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};Qte._nextId=1;var h1e=Qte,Wr={},lf=Wr.B;Wr[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"};Wr.A={"#":"\xA3"};Wr.B=void 0;Wr[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"};Wr.C=Wr[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};Wr.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"};Wr.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"};Wr.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"};Wr.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"};Wr.E=Wr[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"};Wr.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"};Wr.H=Wr[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"};Wr["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"};var jee=4294967295,Uee=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=Ar.clone(),this.savedCharset=lf,this.markers=[],this._nullCell=Mi.fromCharData([0,dte,1,0]),this._whitespaceCell=Mi.fromCharData([0,id,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new VC,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Bee(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new NC),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new NC),this._whitespaceCell}getBlankLine(e,t){return new Zb(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>jee?jee:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=Ar);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Bee(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell(Ar),n=0,o=this._getCorrectBufferLength(t);if(o>this.lines.maxLength&&(this.lines.maxLength=o),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,r);let i=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Zb(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+i+1?(this.ybase--,i++,this.ydisp>0&&this.ydisp--):this.lines.push(new Zb(e,r)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(o<this.lines.maxLength){let a=this.lines.length-o;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=o}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),i&&(this.y+=i),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let i=0;i<this.lines.length;i++)n+=+this.lines.get(i).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=u1e(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(Ar),r);if(n.length>0){let o=f1e(this.lines,n);m1e(this.lines,o.layout),this._reflowLargerAdjustViewport(e,t,o.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let n=this.getNullCell(Ar),o=r;for(;o-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Zb(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(Ar),o=[],i=0;for(let a=this.lines.length-1;a>=0;a--){let s=this.lines.get(a);if(!s||!s.isWrapped&&s.getTrimmedLength()<=e)continue;let l=[s];for(;s.isWrapped&&a>0;)s=this.lines.get(--a),l.unshift(s);if(!r){let _=this.ybase+this.y;if(_>=a&&_<a+l.length)continue}let c=l[l.length-1].getTrimmedLength(),d=p1e(l,this._cols,e),u=d.length-l.length,f;this.ybase===0&&this.y!==this.lines.length-1?f=Math.max(0,this.y-this.lines.maxLength+u):f=Math.max(0,this.lines.length-this.lines.maxLength+u);let m=[];for(let _=0;_<u;_++){let I=this.getBlankLine(Ar,!0);m.push(I)}m.length>0&&(o.push({start:a+l.length+i,newLines:m}),i+=m.length),l.push(...m);let p=d.length-1,g=d[p];g===0&&(p--,g=d[p]);let y=l.length-u-1,v=c;for(;y>=0;){let _=Math.min(v,g);if(l[p]===void 0)break;if(l[p].copyCellsFrom(l[y],v-_,g-_,_,!0),g-=_,g===0&&(p--,g=d[p]),v-=_,v===0){y--;let I=Math.max(y,0);v=ry(l,I,this._cols)}}for(let _=0;_<l.length;_++)d[_]<e&&l[_].setCell(d[_],n);let x=u-f;for(;x-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+i)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+u,this.ybase+t-1)}if(o.length>0){let a=[],s=[];for(let g=0;g<this.lines.length;g++)s.push(this.lines.get(g));let l=this.lines.length,c=l-1,d=0,u=o[d];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+i);let f=0;for(let g=Math.min(this.lines.maxLength-1,l+i-1);g>=0;g--)if(u&&u.start>c+f){for(let y=u.newLines.length-1;y>=0;y--)this.lines.set(g--,u.newLines[y]);g++,a.push({index:c+1,amount:u.newLines.length}),f+=u.newLines.length,u=o[++d]}else this.lines.set(g,s[c--]);let m=0;for(let g=a.length-1;g>=0;g--)a[g].index+=m,this.lines.onInsertEmitter.fire(a[g]),m+=a[g].amount;let p=Math.max(0,l+i-this.lines.maxLength);p>0&&this.lines.onTrimEmitter.fire(p)}}translateBufferLineToString(e,t,r=0,n){let o=this.lines.get(e);return o?o.translateToString(t,r,n):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new h1e(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},g1e=class extends Qe{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new ce),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new Uee(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new Uee(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},Jte=2,ere=1,aF=class extends Qe{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new ce),this.onResize=this._onResize.event,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,Jte),this.rows=Math.max(e.rawOptions.rows||0,ere),this.buffers=this._register(new g1e(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=r.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let o=r.ybase+r.scrollTop,i=r.ybase+r.scrollBottom;if(r.scrollTop===0){let a=r.lines.isFull;i===r.lines.length-1?a?r.lines.recycle().copyFrom(n):r.lines.push(n.clone()):r.lines.splice(i+1,0,n.clone()),a?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let a=i-o+1;r.lines.shiftElements(o+1,a-1,-1),r.lines.set(i,n.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let n=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),n!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};aF=xr([ye(0,fn)],aF);var yh={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:UC,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},v1e=["normal","bold","100","200","300","400","500","600","700","800","900"],x1e=class extends Qe{constructor(e){super(),this._onOptionChange=this._register(new ce),this.onOptionChange=this._onOptionChange.event;let t={...yh};for(let r in e)if(r in t)try{let n=e[r];t[r]=this._sanitizeAndValidateOption(r,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Yt(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in yh))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,n)=>{if(!(r in yh))throw new Error(`No option with key "${r}"`);n=this._sanitizeAndValidateOption(r,n),this.rawOptions[r]!==n&&(this.rawOptions[r]=n,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let n={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=yh[e]),!b1e(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=yh[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=v1e.includes(t)?t:yh[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function b1e(e){return e==="block"||e==="underline"||e==="bar"}function Gb(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let n in e)r[n]=t<=1?e[n]:e[n]&&Gb(e[n],t-1);return r}var Vee=Object.freeze({insertMode:!1}),Hee=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),sF=class extends Qe{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new ce),this.onData=this._onData.event,this._onUserInput=this._register(new ce),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new ce),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new ce),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=Gb(Vee),this.decPrivateModes=Gb(Hee)}reset(){this.modes=Gb(Vee),this.decPrivateModes=Gb(Hee)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};sF=xr([ye(0,un),ye(1,hte),ye(2,fn)],sF);var Wee={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function yN(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var _N=String.fromCharCode,Zee={DEFAULT:e=>{let t=[yN(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${_N(t[0])}${_N(t[1])}${_N(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${yN(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${yN(e,!0)};${e.x};${e.y}${t}`}},lF=class extends Qe{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new ce),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(Wee))this.addProtocol(n,Wee[n]);for(let n of Object.keys(Zee))this.addEncoding(n,Zee[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let n=t/r,o=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=n+0,Math.abs(e.deltaY)<50&&(o*=.3),this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};lF=xr([ye(0,un),ye(1,mf),ye(2,fn)],lF);var IN=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],y1e=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Hr;function _1e(e,t){let r=0,n=t.length-1,o;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(o=r+n>>1,e>t[o][1])r=o+1;else if(e<t[o][0])n=o-1;else return!0;return!1}var I1e=class{constructor(){if(this.version="6",!Hr){Hr=new Uint8Array(65536),Hr.fill(1),Hr[0]=0,Hr.fill(0,1,32),Hr.fill(0,127,160),Hr.fill(2,4352,4448),Hr[9001]=2,Hr[9002]=2,Hr.fill(2,11904,42192),Hr[12351]=1,Hr.fill(2,44032,55204),Hr.fill(2,63744,64256),Hr.fill(2,65040,65050),Hr.fill(2,65072,65136),Hr.fill(2,65280,65377),Hr.fill(2,65504,65511);for(let e=0;e<IN.length;++e)Hr.fill(0,IN[e][0],IN[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Hr[e]:_1e(e,y1e)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let o=cf.extractWidth(t);o===0?n=!1:o>r&&(r=o)}return cf.createPropertyValue(0,r,n)}},cf=class zC{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new ce,this.onChange=this._onChange.event;let t=new I1e;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,o=t.length;for(let i=0;i<o;++i){let a=t.charCodeAt(i);if(55296<=a&&a<=56319){if(++i>=o)return r+this.wcwidth(a);let c=t.charCodeAt(i);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:r+=this.wcwidth(c)}let s=this.charProperties(a,n),l=zC.extractWidth(s);zC.extractShouldJoin(s)&&(l-=zC.extractWidth(n)),r+=l,n=s}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},w1e=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Gee(e){let t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1)?.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var Bb=2147483647,S1e=256,tre=class cF{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>S1e)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new cF;if(!t.length)return r;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let o=t[n];if(Array.isArray(o))for(let i=0;i<o.length;++i)r.addSubParam(o[i]);else r.addParam(o)}return r}clone(){let t=new cF(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,o))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Bb?Bb:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Bb?Bb:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-r>0?this._subParams.subarray(r,n):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let n=this._subParamsIdx[r]>>8,o=this._subParamsIdx[r]&255;o-n>0&&(t[r]=this._subParams.slice(n,o))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,o=n[r-1];n[r-1]=~o?Math.min(o*10+t,Bb):t}},jb=[],k1e=class{constructor(){this._state=0,this._active=jb,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=jb}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=jb,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||jb,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",WC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].end(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=jb,this._id=-1,this._state=0}}},ri=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=WC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},Ub=[],C1e=class{constructor(){this._handlers=Object.create(null),this._active=Ub,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Ub}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Ub,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Ub,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",WC(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,n=this._active.length-1,o=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;n>=0&&(r=this._active[n].unhook(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=Ub,this._ident=0}},qb=new tre;qb.addParam(0);var qee=class{constructor(e){this._handler=e,this._data="",this._params=qb,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():qb,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=WC(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=qb,this._data="",this._hitLimit=!1,r));return this._params=qb,this._data="",this._hitLimit=!1,t}},P1e=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,n){this.table[t<<8|e]=r<<4|n}addMany(e,t,r,n){for(let o=0;o<e.length;o++)this.table[t<<8|e[o]]=r<<4|n}},Li=160,D1e=(function(){let e=new P1e(4095),t=Array.apply(null,Array(256)).map((s,l)=>l),r=(s,l)=>t.slice(s,l),n=r(32,127),o=r(0,24);o.push(25),o.push.apply(o,r(28,32));let i=r(0,14),a;e.setDefault(1,0),e.addMany(n,0,2,0);for(a in i)e.addMany([24,26,153,154],a,3,0),e.addMany(r(128,144),a,3,0),e.addMany(r(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(o,0,3,0),e.addMany(o,1,3,1),e.add(127,1,0,1),e.addMany(o,8,0,8),e.addMany(o,3,3,3),e.add(127,3,0,3),e.addMany(o,4,3,4),e.add(127,4,0,4),e.addMany(o,6,3,6),e.addMany(o,5,3,5),e.add(127,5,0,5),e.addMany(o,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(o,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(o,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(o,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(o,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(o,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(o,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Li,0,2,0),e.add(Li,8,5,8),e.add(Li,6,0,6),e.add(Li,11,0,11),e.add(Li,13,13,13),e})(),R1e=class extends Qe{constructor(e=D1e){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new tre,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Yt(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new k1e),this._dcsParser=this._register(new C1e),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let o=0;o<e.intermediates.length;++o){let i=e.intermediates.charCodeAt(o);if(32>i||i>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=i}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=n,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let n=this._escHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let n=this._csiHandlers[r];return n.push(t),{dispose:()=>{let o=n.indexOf(t);o!==-1&&n.splice(o,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,r,n,o){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=n,this._parseStack.chunkPos=o}parse(e,t,r){let n=0,o=0,i=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,i=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let s=this._parseStack.handlers,l=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](this._params),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 4:if(r===!1&&l>-1){for(;l>=0&&(a=s[l](),a!==!0);l--)if(a instanceof Promise)return this._parseStack.handlerPos=l,a}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],a=this._oscParser.end(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,i=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let s=i;s<t;++s){switch(n=e[s],o=this._transitions.table[this.currentState<<8|(n<160?n:Li)],o>>4){case 2:for(let f=s+1;;++f){if(f>=t||(n=e[f])<32||n>126&&n<Li){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Li){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Li){this._printHandler(e,s,f),s=f-1;break}if(++f>=t||(n=e[f])<32||n>126&&n<Li){this._printHandler(e,s,f),s=f-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:s,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let l=this._csiHandlers[this._collect<<8|n],c=l?l.length-1:-1;for(;c>=0&&(a=l[c](this._params),a!==!0);c--)if(a instanceof Promise)return this._preserveStack(3,l,c,o,s),a;c<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++s<t&&(n=e[s])>47&&n<60);s--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let d=this._escHandlers[this._collect<<8|n],u=d?d.length-1:-1;for(;u>=0&&(a=d[u](),a!==!0);u--)if(a instanceof Promise)return this._preserveStack(4,d,u,o,s),a;u<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let f=s+1;;++f)if(f>=t||(n=e[f])===24||n===26||n===27||n>127&&n<Li){this._dcsParser.put(e,s,f),s=f-1;break}break;case 14:if(a=this._dcsParser.unhook(n!==24&&n!==26),a)return this._preserveStack(6,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let f=s+1;;f++)if(f>=t||(n=e[f])<32||n>127&&n<Li){this._oscParser.put(e,s,f),s=f-1;break}break;case 6:if(a=this._oscParser.end(n!==24&&n!==26),a)return this._preserveStack(5,[],0,o,s),a;n===27&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=o&15}}},T1e=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,E1e=/^[\da-f]+$/;function Kee(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=T1e.exec(t);if(r){let n=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/n*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/n*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),E1e.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,n=[0,0,0];for(let o=0;o<3;++o){let i=parseInt(t.slice(r*o,r*o+r),16);n[o]=r===1?i<<4:r===2?i:r===3?i>>4:i>>8}return n}}function wN(e,t){let r=e.toString(16),n=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function $1e(e,t=16){let[r,n,o]=e;return`rgb:${wN(r,t)}/${wN(n,t)}/${wN(o,t)}`}var A1e={"(":0,")":1,"*":2,"+":3,"-":1,".":2},od=131072,Xee=10;function Qee(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Yee=5e3,Jee=0,O1e=class extends Qe{constructor(e,t,r,n,o,i,a,s,l=new R1e){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=n,this._optionsService=o,this._oscLinkService=i,this._coreMouseService=a,this._unicodeService=s,this._parser=l,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new DIe,this._utf8Decoder=new RIe,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=Ar.clone(),this._eraseAttrDataInternal=Ar.clone(),this._onRequestBell=this._register(new ce),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new ce),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new ce),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new ce),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new ce),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new ce),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new ce),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new ce),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new ce),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new ce),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new ce),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new ce),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new ce),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new dF(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,d)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:d.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,d,u)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:d,data:u})}),this._parser.setDcsHandlerFallback((c,d,u)=>{d==="HOOK"&&(u=u.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:d,payload:u})}),this._parser.setPrintHandler((c,d,u)=>this.print(c,d,u)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler(re.BEL,()=>this.bell()),this._parser.setExecuteHandler(re.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(re.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(re.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(re.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(re.BS,()=>this.backspace()),this._parser.setExecuteHandler(re.HT,()=>this.tab()),this._parser.setExecuteHandler(re.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(re.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Qb.IND,()=>this.index()),this._parser.setExecuteHandler(Qb.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Qb.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new ri(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new ri(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new ri(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new ri(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new ri(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new ri(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new ri(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new ri(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new ri(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new ri(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new ri(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new ri(c=>this.restoreCursorColor(c))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let c in Wr)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new qee((c,d)=>this.requestStatusString(c,d)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),Yee))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${Yee} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,n=this._activeBuffer.x,o=this._activeBuffer.y,i=0,a=this._parseStack.paused;if(a){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;n=this._parseStack.cursorStartX,o=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>od&&(i=this._parseStack.position+od)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<od&&(this._parseBuffer=new Uint32Array(Math.min(e.length,od))),a||this._dirtyRowTracker.clearRange(),e.length>od)for(let c=i;c<e.length;c+=od){let d=c+od<e.length?c+od:e.length,u=typeof e=="string"?this._stringDecoder.decode(e.substring(c,d),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,d),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,u))return this._preserveStack(n,o,u,c),this._logSlowResolvingAsync(r),r}else if(!a){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,c))return this._preserveStack(n,o,c,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==n||this._activeBuffer.y!==o)&&this._onCursorMove.fire();let s=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),l=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);l<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(l,this._bufferService.rows-1),end:Math.min(s,this._bufferService.rows-1)})}print(e,t,r){let n,o,i=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,s=this._bufferService.cols,l=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,d=this._curAttrData,u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&u.getWidth(this._activeBuffer.x-1)===2&&u.setCellFromCodepoint(this._activeBuffer.x-1,0,1,d);let f=this._parser.precedingJoinState;for(let m=t;m<r;++m){if(n=e[m],n<127&&i){let v=i[String.fromCharCode(n)];v&&(n=v.charCodeAt(0))}let p=this._unicodeService.charProperties(n,f);o=cf.extractWidth(p);let g=cf.extractShouldJoin(p),y=g?cf.extractWidth(f):0;if(f=p,a&&this._onA11yChar.fire(nd(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+o-y>s){if(l){let v=u,x=this._activeBuffer.x-y;for(this._activeBuffer.x=y,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),u=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),y>0&&u instanceof Zb&&u.copyCellsFrom(v,x,0,y,!1);x<s;)v.setCellFromCodepoint(x++,0,1,d)}else if(this._activeBuffer.x=s-1,o===2)continue}if(g&&this._activeBuffer.x){let v=u.getWidth(this._activeBuffer.x-1)?1:2;u.addCodepointToCell(this._activeBuffer.x-v,n,o);for(let x=o-y;--x>=0;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d);continue}if(c&&(u.insertCells(this._activeBuffer.x,o-y,this._activeBuffer.getNullCell(d)),u.getWidth(s-1)===2&&u.setCellFromCodepoint(s-1,0,1,d)),u.setCellFromCodepoint(this._activeBuffer.x++,n,o,d),o>0)for(;--o;)u.setCellFromCodepoint(this._activeBuffer.x++,0,0,d)}this._parser.precedingJoinState=f,this._activeBuffer.x<s&&r-t>0&&u.getWidth(this._activeBuffer.x)===0&&!u.hasContent(this._activeBuffer.x)&&u.setCellFromCodepoint(this._activeBuffer.x,0,1,d),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>Qee(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new qee(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new ri(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);e.hasWidth(this._activeBuffer.x)&&!e.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,n=!1,o=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),o),n&&(i.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!this._activeBuffer.lines.get(this._activeBuffer.ybase+r)?.getTrimmedLength(););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let n=this._activeBuffer.lines.length-this._bufferService.rows;n>0&&(this._activeBuffer.lines.trimStart(n),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-n,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-n,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,o=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(o-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(Ar));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,n=cf.extractWidth(t),o=this._activeBuffer.x-n,i=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(o),a=new Uint32Array(i.length*r),s=0;for(let c=0;c<i.length;){let d=i.codePointAt(c)||0;a[s++]=d,c+=d>65535?2:1}let l=s;for(let c=1;c<r;++c)a.copyWithin(l,0,s),l+=s;return this.print(a,0,l),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(re.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(re.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(re.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(re.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(re.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,lf),this._charsetService.setgCharset(1,lf),this._charsetService.setgCharset(2,lf),this._charsetService.setgCharset(3,lf);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){let r;(g=>(g[g.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",g[g.SET=1]="SET",g[g.RESET=2]="RESET",g[g.PERMANENTLY_SET=3]="PERMANENTLY_SET",g[g.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(r||(r={}));let n=this._coreService.decPrivateModes,{activeProtocol:o,activeEncoding:i}=this._coreMouseService,a=this._coreService,{buffers:s,cols:l}=this._bufferService,{active:c,alt:d}=s,u=this._optionsService.rawOptions,f=(g,y)=>(a.triggerDataEvent(`${re.ESC}[${t?"":"?"}${g};${y}$y`),!0),m=g=>g?1:2,p=e.params[0];return t?p===2?f(p,4):p===4?f(p,m(a.modes.insertMode)):p===12?f(p,3):p===20?f(p,m(u.convertEol)):f(p,0):p===1?f(p,m(n.applicationCursorKeys)):p===3?f(p,u.windowOptions.setWinLines?l===80?2:l===132?1:0:0):p===6?f(p,m(n.origin)):p===7?f(p,m(n.wraparound)):p===8?f(p,3):p===9?f(p,m(o==="X10")):p===12?f(p,m(u.cursorBlink)):p===25?f(p,m(!a.isCursorHidden)):p===45?f(p,m(n.reverseWraparound)):p===66?f(p,m(n.applicationKeypad)):p===67?f(p,4):p===1e3?f(p,m(o==="VT200")):p===1002?f(p,m(o==="DRAG")):p===1003?f(p,m(o==="ANY")):p===1004?f(p,m(n.sendFocus)):p===1005?f(p,4):p===1006?f(p,m(i==="SGR")):p===1015?f(p,4):p===1016?f(p,m(i==="SGR_PIXELS")):p===1048?f(p,1):p===47||p===1047||p===1049?f(p,m(c===d)):p===2004?f(p,m(n.bracketedPasteMode)):p===2026?f(p,m(n.synchronizedOutput)):f(p,0)}_updateAttrColor(e,t,r,n,o){return t===2?(e|=50331648,e&=-16777216,e|=oy.fromColorRGB([r,n,o])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let n=[0,0,-1,0,0,0],o=0,i=0;do{if(n[i+o]=e.params[t+i],e.hasSubParams(t+i)){let a=e.getSubParams(t+i),s=0;do n[1]===5&&(o=1),n[i+s+1+o]=a[s];while(++s<a.length&&s+i+1+o<n.length);break}if(n[1]===5&&i+o>=2||n[1]===2&&i+o>=5)break;n[1]&&(o=1)}while(++i+t<e.length&&i+o<n.length);for(let a=2;a<n.length;++a)n[a]===-1&&(n[a]=0);switch(n[0]){case 38:r.fg=this._updateAttrColor(r.fg,n[1],n[3],n[4],n[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,n[1],n[3],n[4],n[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,n[1],n[3],n[4],n[5])}return i}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=Ar.fg,e.bg=Ar.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,r,n=this._curAttrData;for(let o=0;o<t;o++)r=e.params[o],r>=30&&r<=37?(n.fg&=-50331904,n.fg|=16777216|r-30):r>=40&&r<=47?(n.bg&=-50331904,n.bg|=16777216|r-40):r>=90&&r<=97?(n.fg&=-50331904,n.fg|=16777216|r-90|8):r>=100&&r<=107?(n.bg&=-50331904,n.bg|=16777216|r-100|8):r===0?this._processSGR0(n):r===1?n.fg|=134217728:r===3?n.bg|=67108864:r===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(o)?e.getSubParams(o)[0]:1,n)):r===5?n.fg|=536870912:r===7?n.fg|=67108864:r===8?n.fg|=1073741824:r===9?n.fg|=2147483648:r===2?n.bg|=134217728:r===21?this._processUnderline(2,n):r===22?(n.fg&=-134217729,n.bg&=-134217729):r===23?n.bg&=-67108865:r===24?(n.fg&=-268435457,this._processUnderline(0,n)):r===25?n.fg&=-536870913:r===27?n.fg&=-67108865:r===28?n.fg&=-1073741825:r===29?n.fg&=2147483647:r===39?(n.fg&=-67108864,n.fg|=Ar.fg&16777215):r===49?(n.bg&=-67108864,n.bg|=Ar.bg&16777215):r===38||r===48||r===58?o+=this._extractColor(e,o,n):r===53?n.bg|=1073741824:r===55?n.bg&=-1073741825:r===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):r===100?(n.fg&=-67108864,n.fg|=Ar.fg&16777215,n.bg&=-67108864,n.bg|=Ar.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${re.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${re.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${re.ESC}[?${t};${r}R`);break;case 15:break;case 25:break;case 26:break;case 53:break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=Ar.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Qee(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${re.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Xee&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Xee&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],r=e.split(";");for(;r.length>1;){let n=r.shift(),o=r.shift();if(/^\d+$/.exec(n)){let i=parseInt(n);if(ete(i))if(o==="?")t.push({type:0,index:i});else{let a=Kee(o);a&&t.push({type:1,index:i,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(r,n):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),n,o=r.findIndex(i=>i.startsWith("id="));return o!==-1&&(n=r[o].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let r=e.split(";");for(let n=0;n<r.length&&!(t>=this._specialColors.length);++n,++t)if(r[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let o=Kee(r[n]);o&&this._onColor.fire([{type:1,index:this._specialColors[t],color:o}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],r=e.split(";");for(let n=0;n<r.length;++n)if(/^\d+$/.exec(r[n])){let o=parseInt(r[n]);ete(o)&&t.push({type:2,index:o})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,lf),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(A1e[e[0]],Wr[e[1]]||lf),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=Ar.clone(),this._eraseAttrDataInternal=Ar.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new Mi;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(r);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=a=>(this._coreService.triggerDataEvent(`${re.ESC}${a}${re.ESC}\\`),!0),n=this._bufferService.buffer,o=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[o.cursorStyle]-(o.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},dF=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(Jee=e,e=t,t=Jee),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};dF=xr([ye(0,un)],dF);function ete(e){return 0<=e&&e<256}var z1e=5e7,tte=12,N1e=50,F1e=class extends Qe{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new ce),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>z1e)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],o=this._action(n,t);if(o){let a=s=>performance.now()-r>=tte?setTimeout(()=>this._innerWrite(0,s)):this._innerWrite(r,s);o.catch(s=>(queueMicrotask(()=>{throw s}),Promise.resolve(!1))).then(a);return}let i=this._callbacks[this._bufferOffset];if(i&&i(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-r>=tte)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>N1e&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},uF=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let s=t.addMarker(t.ybase+t.y),l={data:e,id:this._nextId++,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(l,s)),this._dataByLinkId.set(l.id,l),l.id}let r=e,n=this._getEntryIdKey(r),o=this._entriesWithId.get(n);if(o)return this.addLineToLink(o.id,t.ybase+t.y),o.id;let i=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[i]};return i.onDispose(()=>this._removeMarkerFromLink(a,i)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);r.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(r,n))}}getLinkData(e){return this._dataByLinkId.get(e)?.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};uF=xr([ye(0,un)],uF);var rte=!1,L1e=class extends Qe{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Ih),this._onBinary=this._register(new ce),this.onBinary=this._onBinary.event,this._onData=this._register(new ce),this.onData=this._onData.event,this._onLineFeed=this._register(new ce),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new ce),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new ce),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new ce),this._instantiationService=new s1e,this.optionsService=this._register(new x1e(e)),this._instantiationService.setService(fn,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(aF)),this._instantiationService.setService(un,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(iF)),this._instantiationService.setService(hte,this._logService),this.coreService=this._register(this._instantiationService.createInstance(sF)),this._instantiationService.setService(mf,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(lF)),this._instantiationService.setService(pte,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(cf)),this._instantiationService.setService(AIe,this.unicodeService),this._charsetService=this._instantiationService.createInstance(w1e),this._instantiationService.setService($Ie,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(uF),this._instantiationService.setService(gte,this._oscLinkService),this._inputHandler=this._register(new O1e(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(io.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(io.forward(this._bufferService.onResize,this._onResize)),this._register(io.forward(this.coreService.onData,this._onData)),this._register(io.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new F1e((t,r)=>this._inputHandler.parse(t,r))),this._register(io.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new ce),this._onScroll.event(e=>{this._onScrollApi?.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!rte&&(this._logService.warn("writeSync is unreliable and will be removed soon."),rte=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,Jte),t=Math.max(t,ere),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Gee.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(Gee(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Yt(()=>{for(let t of e)t.dispose()})}}},M1e={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function B1e(e,t,r,n){let o={type:0,cancel:!1,key:void 0},i=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?o.key=re.ESC+"OA":o.key=re.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?o.key=re.ESC+"OD":o.key=re.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?o.key=re.ESC+"OC":o.key=re.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?o.key=re.ESC+"OB":o.key=re.ESC+"[B");break;case 8:o.key=e.ctrlKey?"\b":re.DEL,e.altKey&&(o.key=re.ESC+o.key);break;case 9:if(e.shiftKey){o.key=re.ESC+"[Z";break}o.key=re.HT,o.cancel=!0;break;case 13:o.key=e.altKey?re.ESC+re.CR:re.CR,o.cancel=!0;break;case 27:o.key=re.ESC,e.altKey&&(o.key=re.ESC+re.ESC),o.cancel=!0;break;case 37:if(e.metaKey)break;i?o.key=re.ESC+"[1;"+(i+1)+"D":t?o.key=re.ESC+"OD":o.key=re.ESC+"[D";break;case 39:if(e.metaKey)break;i?o.key=re.ESC+"[1;"+(i+1)+"C":t?o.key=re.ESC+"OC":o.key=re.ESC+"[C";break;case 38:if(e.metaKey)break;i?o.key=re.ESC+"[1;"+(i+1)+"A":t?o.key=re.ESC+"OA":o.key=re.ESC+"[A";break;case 40:if(e.metaKey)break;i?o.key=re.ESC+"[1;"+(i+1)+"B":t?o.key=re.ESC+"OB":o.key=re.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(o.key=re.ESC+"[2~");break;case 46:i?o.key=re.ESC+"[3;"+(i+1)+"~":o.key=re.ESC+"[3~";break;case 36:i?o.key=re.ESC+"[1;"+(i+1)+"H":t?o.key=re.ESC+"OH":o.key=re.ESC+"[H";break;case 35:i?o.key=re.ESC+"[1;"+(i+1)+"F":t?o.key=re.ESC+"OF":o.key=re.ESC+"[F";break;case 33:e.shiftKey?o.type=2:e.ctrlKey?o.key=re.ESC+"[5;"+(i+1)+"~":o.key=re.ESC+"[5~";break;case 34:e.shiftKey?o.type=3:e.ctrlKey?o.key=re.ESC+"[6;"+(i+1)+"~":o.key=re.ESC+"[6~";break;case 112:i?o.key=re.ESC+"[1;"+(i+1)+"P":o.key=re.ESC+"OP";break;case 113:i?o.key=re.ESC+"[1;"+(i+1)+"Q":o.key=re.ESC+"OQ";break;case 114:i?o.key=re.ESC+"[1;"+(i+1)+"R":o.key=re.ESC+"OR";break;case 115:i?o.key=re.ESC+"[1;"+(i+1)+"S":o.key=re.ESC+"OS";break;case 116:i?o.key=re.ESC+"[15;"+(i+1)+"~":o.key=re.ESC+"[15~";break;case 117:i?o.key=re.ESC+"[17;"+(i+1)+"~":o.key=re.ESC+"[17~";break;case 118:i?o.key=re.ESC+"[18;"+(i+1)+"~":o.key=re.ESC+"[18~";break;case 119:i?o.key=re.ESC+"[19;"+(i+1)+"~":o.key=re.ESC+"[19~";break;case 120:i?o.key=re.ESC+"[20;"+(i+1)+"~":o.key=re.ESC+"[20~";break;case 121:i?o.key=re.ESC+"[21;"+(i+1)+"~":o.key=re.ESC+"[21~";break;case 122:i?o.key=re.ESC+"[23;"+(i+1)+"~":o.key=re.ESC+"[23~";break;case 123:i?o.key=re.ESC+"[24;"+(i+1)+"~":o.key=re.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?o.key=re.NUL:e.keyCode>=51&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?o.key=re.DEL:e.keyCode===219?o.key=re.ESC:e.keyCode===220?o.key=re.FS:e.keyCode===221&&(o.key=re.GS);else if((!r||n)&&e.altKey&&!e.metaKey){let a=M1e[e.keyCode]?.[e.shiftKey?1:0];if(a)o.key=re.ESC+a;else if(e.keyCode>=65&&e.keyCode<=90){let s=e.ctrlKey?e.keyCode-64:e.keyCode+32,l=String.fromCharCode(s);e.shiftKey&&(l=l.toUpperCase()),o.key=re.ESC+l}else if(e.keyCode===32)o.key=re.ESC+(e.ctrlKey?re.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let s=e.code.slice(3,4);e.shiftKey||(s=s.toLowerCase()),o.key=re.ESC+s,o.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(o.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?o.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(o.key=re.US),e.key==="@"&&(o.key=re.NUL));break}return o}var kr=0,j1e=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new VC,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new VC,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((o,i)=>this._getKey(o)-this._getKey(i)),t=0,r=0,n=new Array(this._array.length+this._insertedValues.length);for(let o=0;o<n.length;o++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(n[o]=e[t],t++):n[o]=this._array[r++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(kr=this._search(t),kr===-1)||this._getKey(this._array[kr])!==t)return!1;do if(this._array[kr]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(kr),!0;while(++kr<this._array.length&&this._getKey(this._array[kr])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((o,i)=>o-i),t=0,r=new Array(this._array.length-e.length),n=0;for(let o=0;o<this._array.length;o++)e[t]===o?t++:r[n++]=this._array[o];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(kr=this._search(e),!(kr<0||kr>=this._array.length)&&this._getKey(this._array[kr])===e))do yield this._array[kr];while(++kr<this._array.length&&this._getKey(this._array[kr])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(kr=this._search(e),!(kr<0||kr>=this._array.length)&&this._getKey(this._array[kr])===e))do t(this._array[kr]);while(++kr<this._array.length&&this._getKey(this._array[kr])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let n=t+r>>1,o=this._getKey(this._array[n]);if(o>e)r=n-1;else if(o<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},SN=0,ote=0,U1e=class extends Qe{constructor(){super(),this._decorations=new j1e(e=>e?.marker.line),this._onDecorationRegistered=this._register(new ce),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new ce),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Yt(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new V1e(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let n=0,o=0;for(let i of this._decorations.getKeyIterator(t))n=i.options.x??0,o=n+(i.options.width??1),e>=n&&e<o&&(!r||(i.options.layer??"bottom")===r)&&(yield i)}forEachDecorationAtCell(e,t,r,n){this._decorations.forEachByKey(t,o=>{SN=o.options.x??0,ote=SN+(o.options.width??1),e>=SN&&e<ote&&(!r||(o.options.layer??"bottom")===r)&&n(o)})}},V1e=class extends ad{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new ce),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new ce),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=ir.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=ir.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},H1e=1e3,W1e=class{constructor(e,t=H1e){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let o=n-this._lastRefreshMs,i=this._debounceThresholdMS-o;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},i)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},nte=20,ite=!1,HC=class extends Qe{constructor(e,t,r,n){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let o=this._coreBrowserService.mainDocument;this._accessibilityContainer=o.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=o.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let i=0;i<this._terminal.rows;i++)this._rowElements[i]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[i]);if(this._topBoundaryFocusListener=i=>this._handleBoundaryFocus(i,0),this._bottomBoundaryFocusListener=i=>this._handleBoundaryFocus(i,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=o.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new W1e(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");ite?(this._accessibilityContainer.classList.add("debug"),this._rowContainer.classList.add("debug"),this._debugRootContainer=o.createElement("div"),this._debugRootContainer.classList.add("xterm"),this._debugRootContainer.appendChild(o.createTextNode("------start a11y------")),this._debugRootContainer.appendChild(this._accessibilityContainer),this._debugRootContainer.appendChild(o.createTextNode("------end a11y------")),this._terminal.element.insertAdjacentElement("afterend",this._debugRootContainer)):this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(i=>this._handleResize(i.rows))),this._register(this._terminal.onRender(i=>this._refreshRows(i.start,i.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(i=>this._handleChar(i))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
216
+ `))),this._register(this._terminal.onA11yTab(i=>this._handleTab(i))),this._register(this._terminal.onKey(i=>this._handleKey(i.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Be(o,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Yt(()=>{ite?this._debugRootContainer.remove():this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<nte+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
217
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===nte+1&&(this._liveRegion.textContent+=CN.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,n=r.lines.length.toString();for(let o=e;o<=t;o++){let i=r.lines.get(r.ydisp+o),a=[],s=i?.translateToString(!0,void 0,void 0,a)||"",l=(r.ydisp+o+1).toString(),c=this._rowElements[o];c&&(s.length===0?(c.textContent="\xA0",this._rowColumns.set(c,[0,1])):(c.textContent=s,this._rowColumns.set(c,a)),c.setAttribute("aria-posinset",l),c.setAttribute("aria-setsize",n),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],o=r.getAttribute("aria-posinset"),i=t===0?"1":`${this._terminal.buffer.lines.length}`;if(o===i||e.relatedTarget!==n)return;let a,s;if(t===0?(a=r,s=this._rowElements.pop(),this._rowContainer.removeChild(s)):(a=this._rowElements.shift(),s=r,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),s.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let l=this._createAccessibilityTreeNode();this._rowElements.unshift(l),this._rowContainer.insertAdjacentElement("afterbegin",l)}else{let l=this._createAccessibilityTreeNode();this._rowElements.push(l),this._rowContainer.appendChild(l)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:n,offset:n.textContent?.length??0}),!this._rowContainer.contains(r.node))return;let o=({node:s,offset:l})=>{let c=s instanceof Text?s.parentNode:s,d=parseInt(c?.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let u=this._rowColumns.get(c);if(!u)return console.warn("columns is null. Race condition?"),null;let f=l<u.length?u[l]:u.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},i=o(t),a=o(r);if(!(!i||!a)){if(i.row>a.row||i.row===a.row&&i.column>=a.column)throw new Error("invalid range");this._terminal.select(i.column,i.row,(a.row-i.row)*this._terminal.cols-i.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let t=e.getBoundingClientRect().width,r=this._rowColumns.get(e)?.slice(-1)?.[0];if(!r)return;let n=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};HC=xr([ye(1,mF),ye(2,yl),ye(3,_l)],HC);var fF=class extends Qe{constructor(e,t,r,n,o){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=n,this._linkProviderService=o,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new ce),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new ce),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Yt(()=>{uf(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Be(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Be(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Be(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Be(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let n=0;n<r.length;n++){let o=r[n];if(o.classList.contains("xterm"))break;if(o.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){(!this._activeProviderReplies||!t)&&(this._activeProviderReplies?.forEach(n=>{n?.forEach(o=>{o.link.dispose&&o.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[n,o]of this._linkProviderService.linkProviders.entries())t?this._activeProviderReplies?.get(n)&&(r=this._checkLinkProviderResult(n,e,r)):o.provideLinks(e.y,i=>{if(this._isMouseOut)return;let a=i?.map(s=>({link:s}));this._activeProviderReplies?.set(n,a),r=this._checkLinkProviderResult(n,e,r),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let n=0;n<t.size;n++){let o=t.get(n);if(o)for(let i=0;i<o.length;i++){let a=o[i],s=a.link.range.start.y<e?0:a.link.range.start.x,l=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let c=s;c<=l;c++){if(r.has(c)){o.splice(i--,1);break}r.add(c)}}}}_checkLinkProviderResult(e,t,r){if(!this._activeProviderReplies)return r;let n=this._activeProviderReplies.get(e),o=!1;for(let i=0;i<e;i++)(!this._activeProviderReplies.has(i)||this._activeProviderReplies.get(i))&&(o=!0);if(!o&&n){let i=n.find(a=>this._linkAtPosition(a.link,t));i&&(r=!0,this._handleNewLink(i))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let i=0;i<this._activeProviderReplies.size;i++){let a=this._activeProviderReplies.get(i)?.find(s=>this._linkAtPosition(s.link,t));if(a){r=!0,this._handleNewLink(a);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&Z1e(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,uf(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:r=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:r=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let n=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=o&&(this._clearCurrentLink(n,o),this._lastMouseEvent)){let i=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);i&&this._askForLink(i,!1)}})))}_linkHover(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,n=this._bufferService.buffer.ydisp,o=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-n-1,r.end.x,r.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(o)}_linkLeave(e,t,r){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,o=t.y*this._bufferService.cols+t.x;return r<=o&&o<=n}_positionFromMouseEvent(e,t,r){let n=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,n,o){return{x1:e,y1:t,x2:r,y2:n,cols:this._bufferService.cols,fg:o}}};fF=xr([ye(1,pF),ye(2,_l),ye(3,un),ye(4,xte)],fF);function Z1e(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var G1e=class extends L1e{constructor(e={}){super(e),this._linkifier=this._register(new Ih),this.browser=Ute,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Ih),this._onCursorMove=this._register(new ce),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new ce),this.onKey=this._onKey.event,this._onRender=this._register(new ce),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new ce),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new ce),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new ce),this.onBell=this._onBell.event,this._onFocus=this._register(new ce),this._onBlur=this._register(new ce),this._onA11yCharEmitter=this._register(new ce),this._onA11yTabEmitter=this._register(new ce),this._onWillOpen=this._register(new ce),this._setup(),this._decorationService=this._instantiationService.createInstance(U1e),this._instantiationService.setService(ny,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(zSe),this._instantiationService.setService(xte,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(DN)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh(t?.start??0,t?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(io.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(io.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(io.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(io.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Yt(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,n="";switch(t.index){case 256:r="foreground",n="10";break;case 257:r="background",n="11";break;case 258:r="cursor",n="12";break;default:r="ansi",n="4;"+t.index}switch(t.type){case 0:let o=Vt.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${re.ESC}]${n};${$1e(o)}${XN.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(i=>i.ansi[t.index]=Cr.toColor(...t.color));else{let i=r;this._themeService.modifyColors(a=>a[i]=Cr.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(HC,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(re.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(re.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,o=t.getWidth(r),i=this._renderService.dimensions.css.cell.width*o,a=this.buffer.y*this._renderService.dimensions.css.cell.height,s=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=s+"px",this.textarea.style.top=a+"px",this.textarea.style.width=i+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Be(this.element,"copy",t=>{this.hasSelection()&&CIe(t,this._selectionService)}));let e=t=>PIe(t,this.textarea,this.coreService,this.optionsService);this._register(Be(this.textarea,"paste",e)),this._register(Be(this.element,"paste",e)),Vte?this._register(Be(this.element,"mousedown",t=>{t.button===2&&oee(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Be(this.element,"contextmenu",t=>{oee(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),IF&&this._register(Be(this.element,"auxclick",t=>{t.button===1&&cte(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Be(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Be(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Be(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Be(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Be(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Be(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Be(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Be(this.screenElement,"mousemove",o=>this.updateCursorStyle(o))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",kN.get()),Zte||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(ASe,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(yl,this._coreBrowserService),this._register(Be(this.textarea,"focus",o=>this._handleTextAreaFocus(o))),this._register(Be(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(eF,this._document,this._helperContainer),this._instantiationService.setService(ZC,this._charSizeService),this._themeService=this._instantiationService.createInstance(nF),this._instantiationService.setService(wh,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(jC),this._instantiationService.setService(vte,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(rF,this.rows,this.screenElement)),this._instantiationService.setService(_l,this._renderService),this._register(this._renderService.onRenderedViewportChange(o=>this._onRender.fire(o))),this.onResize(o=>this._renderService.resize(o.cols,o.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(QN,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(tF),this._instantiationService.setService(pF,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(fF,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(qN,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(o=>{super.scrollLines(o,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(oF,this.element,this.screenElement,n)),this._instantiationService.setService(zIe,this._selectionService),this._register(this._selectionService.onRequestScrollLines(o=>this.scrollLines(o.amount,o.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(o=>this._renderService.handleSelectionChanged(o.start,o.end,o.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(o=>{this.textarea.value=o,this.textarea.focus(),this.textarea.select()})),this._register(io.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(KN,this.screenElement)),this._register(Be(this.element,"mousedown",o=>this._selectionService.handleMouseDown(o))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(HC,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",o=>this._handleScreenReaderModeOptionChange(o))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(BC,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",o=>{!this._overviewRulerRenderer&&o&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(BC,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(JN,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(i){let a=e._mouseService.getMouseReportCoords(i,e.screenElement);if(!a)return!1;let s,l;switch(i.overrideType||i.type){case"mousemove":l=32,i.buttons===void 0?(s=3,i.button!==void 0&&(s=i.button<3?i.button:3)):s=i.buttons&1?0:i.buttons&4?1:i.buttons&2?2:3;break;case"mouseup":l=0,s=i.button<3?i.button:3;break;case"mousedown":l=1,s=i.button<3?i.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(i)===!1)return!1;let c=i.deltaY;if(c===0||e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return!1;l=c<0?0:1,s=4;break;default:return!1}return l===void 0||s===void 0||s>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:s,action:l,ctrl:i.ctrlKey,alt:i.altKey,shift:i.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o={mouseup:i=>(r(i),i.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(i)),wheel:i=>(r(i),this.cancel(i,!0)),mousedrag:i=>{i.buttons&&r(i)},mousemove:i=>{i.buttons||r(i)}};this._register(this.coreMouseService.onProtocolChange(i=>{i?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(i)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),i&8?n.mousemove||(t.addEventListener("mousemove",o.mousemove),n.mousemove=o.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),i&16?n.wheel||(t.addEventListener("wheel",o.wheel,{passive:!1}),n.wheel=o.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),i&2?n.mouseup||(n.mouseup=o.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),i&4?n.mousedrag||(n.mousedrag=o.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Be(t,"mousedown",i=>{if(i.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(i)))return r(i),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(i)})),this._register(Be(t,"wheel",i=>{if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(i)===!1)return!1;if(!this.buffer.hasScrollback){if(i.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr)===0)return this.cancel(i,!0);let a=re.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(i.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(a,!0),this.cancel(i,!0)}}},{passive:!1}))}refresh(e,t){this._renderService?.refreshRows(e,t)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){lte(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,t){this._selectionService?.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=B1e(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let n=this.rows-1;return this.scrollLines(r.type===2?-n:n),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===re.ETX||r.key===re.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(q1e(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){this._charSizeService?.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(Ar));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(re.ESC+"[I"):this.coreService.triggerDataEvent(re.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${re.ESC}[4;${r};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),o=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${re.ESC}[6;${o};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function q1e(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var K1e=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},X1e=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new Mi)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},ate=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new X1e(t)}getNullCell(){return new Mi}},Q1e=class extends Qe{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new ce),this.onBufferChange=this._onBufferChange.event,this._normal=new ate(this._core.buffers.normal,"normal"),this._alternate=new ate(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},Y1e=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,n)=>t(r,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},J1e=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},eke=["cols","rows"],vs=0,rre=class extends Qe{constructor(e){super(),this._core=this._register(new G1e(e)),this._addonManager=this._register(new K1e),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],r=(n,o)=>{this._checkReadonlyOptions(n),this._core.options[n]=o};for(let n in this._core.options){let o={get:t.bind(this,n),set:r.bind(this,n)};Object.defineProperty(this._publicOptions,n,o)}}_checkReadonlyOptions(e){if(eke.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new Y1e(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new J1e(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new Q1e(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
218
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return kN.get()},set promptLabel(e){kN.set(e)},get tooMuchOutput(){return CN.get()},set tooMuchOutput(e){CN.set(e)}}}_verifyIntegers(...e){for(vs of e)if(vs===1/0||isNaN(vs)||vs%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(vs of e)if(vs&&(vs===1/0||isNaN(vs)||vs%1!==0||vs<0))throw new Error("This API only accepts positive integers")}};var mn=b(D(),1);function ore(e){try{let t=JSON.parse(e);switch(t.t){case"ready":case"restarting":return{t:t.t};case"exit":return typeof t.code=="number"?{t:"exit",code:t.code}:null;case"error":return typeof t.message=="string"?{t:"error",message:t.message.slice(0,500)}:null;default:return null}}catch{return null}}var nre=[500,1e3,2e3,4e3,8e3],QC=class{constructor(t,r){Ft(this,"sessionId",t);Ft(this,"events",r);Ft(this,"socket",null);Ft(this,"timer");Ft(this,"attempt",0);Ft(this,"closed",!1);Ft(this,"finished",!1);Ft(this,"suspended",!1);Ft(this,"size",{cols:120,rows:30})}open(t,r){this.size={cols:t,rows:r},this.connect()}connect(){this.events.state(this.attempt===0?"connecting":"reconnecting");let r=(location.protocol==="https:"?"wss:":"ws:")+"//"+location.host+"/api/sessions/"+this.sessionId+"/terminal?cols="+this.size.cols+"&rows="+this.size.rows,n=new WebSocket(r);n.binaryType="arraybuffer",this.socket=n,n.onmessage=o=>{if(o.data instanceof ArrayBuffer){this.events.output(new Uint8Array(o.data));return}let i=typeof o.data=="string"?ore(o.data):null;i&&(i.t==="ready"?(this.attempt=0,this.events.reset(),this.events.state("connected")):i.t==="exit"?(this.finished=!0,this.events.state("ended","The agent exited (code "+i.code+").")):i.t==="error"&&(this.finished=!0,this.events.state("failed",i.message)))},n.onclose=()=>{if(this.socket!==n||(this.socket=null,this.closed||this.finished||this.suspended))return;let o=nre[Math.min(this.attempt,nre.length-1)];this.attempt++,this.events.state("reconnecting"),this.timer=window.setTimeout(()=>this.connect(),o)}}send(t){this.socket?.readyState===WebSocket.OPEN&&this.socket.send(t)}resize(t,r){this.size={cols:t,rows:r},this.socket?.readyState===WebSocket.OPEN&&this.socket.send(JSON.stringify({t:"resize",cols:t,rows:r}))}claim(t,r){this.resize(t,r)}suspend(){if(this.closed||this.finished)return;this.suspended=!0,window.clearTimeout(this.timer);let t=this.socket;this.socket=null,t?.close(1e3)}resume(){!this.suspended||this.closed||this.finished||(this.suspended=!1,this.attempt=0,this.connect())}close(){this.closed=!0,window.clearTimeout(this.timer),this.socket?.close(1e3),this.socket=null}};var cre=b(O(),1),ire={background:"#0e1015",foreground:"#e6e8ee",cursor:"#e6e8ee",selectionBackground:"#3b4252",black:"#1a1d24",brightBlack:"#6c7383"},are={background:"#ffffff",foreground:"#1f2328",cursor:"#1f2328",selectionBackground:"#c7d2fe",black:"#1f2328",brightBlack:"#6e7781"},YC=[11,12,13,14,15,16,18,20],tke=2*6e4,rke=120;function sre(e,t){/^https?:\/\//i.test(t)&&window.confirm(`Open this link in a new tab?
219
+
220
+ `+t.slice(0,300))&&window.open(t,"_blank","noopener,noreferrer")}var lre=(0,mn.forwardRef)(function({sessionId:t,fontSize:r,onState:n,onReady:o},i){let a=(0,mn.useRef)(null),s=(0,mn.useRef)(null),l=(0,mn.useRef)(null),c=(0,mn.useRef)(null),d=(0,mn.useRef)(()=>{}),u=Sd("dark")==="dark",f=(0,mn.useRef)(u),m=(0,mn.useRef)(r);return(0,mn.useImperativeHandle)(i,()=>({find:(p,g=!1)=>g?l.current?.findPrevious(p)??!1:l.current?.findNext(p)??!1,clearFind:()=>l.current?.clearDecorations(),type:p=>d.current(p),setFontSize:p=>{s.current&&(s.current.options.fontSize=p,c.current?.fit())},focus:()=>s.current?.focus()}),[]),(0,mn.useEffect)(()=>{let p=a.current;if(!p)return;let g=new sJ,y=new AJ,v=new rre({fontFamily:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, Menlo, monospace',fontSize:m.current,lineHeight:1.15,cursorBlink:!0,scrollback:1e4,allowProposedApi:!0,theme:f.current?ire:are,linkHandler:{activate:sre}});v.loadAddon(g),v.loadAddon(y),v.loadAddon(new eee(sre)),v.loadAddon(new JJ),v.unicode.activeVersion="11",v.open(p),v.attachCustomKeyEventHandler(H=>H.type!=="keydown"||!H.ctrlKey||H.shiftKey||H.altKey||H.key.toLowerCase()!=="c"||!v.hasSelection()?!0:(navigator.clipboard?.writeText(v.getSelection()).catch(()=>{}),v.clearSelection(),!1)),s.current=v,l.current=y,c.current=g,g.fit();let x=new QC(t,{state:n,output:H=>v.write(H),reset:()=>v.reset()}),_=new TextEncoder;d.current=H=>x.send(_.encode(H)),v.onData(H=>x.send(_.encode(H))),v.onBinary(H=>x.send(Uint8Array.from(H,K=>K.charCodeAt(0)))),v.onResize(({cols:H,rows:K})=>x.resize(H,K));let I,S=()=>{window.clearTimeout(I),I=window.setTimeout(()=>{let H=g.proposeDimensions();H&&(H.cols!==v.cols||H.rows!==v.rows)&&g.fit()},rke)},w=new ResizeObserver(S);w.observe(p);let P=()=>x.claim(v.cols,v.rows);v.textarea?.addEventListener("focus",P);let $,B=()=>{window.clearTimeout($),document.hidden?$=window.setTimeout(()=>x.suspend(),tke):x.resume()},W=()=>x.close();return document.addEventListener("visibilitychange",B),window.addEventListener("pagehide",W),o(()=>x.close()),x.open(v.cols,v.rows),v.focus(),()=>{window.clearTimeout($),window.clearTimeout(I),v.textarea?.removeEventListener("focus",P),document.removeEventListener("visibilitychange",B),window.removeEventListener("pagehide",W),w.disconnect(),x.close(),v.dispose(),s.current=null,l.current=null,c.current=null,d.current=()=>{}}},[t,n,o]),(0,mn.useEffect)(()=>{s.current&&(s.current.options.theme=u?ire:are)},[u]),(0,cre.jsx)("div",{ref:a,className:"terminal-host"})});var Ue=b(O(),1),oke=ll("sessions.list"),nke={connecting:{text:"Connecting",color:"gray"},connected:{text:"Connected",color:"green"},reconnecting:{text:"Reconnecting",color:"orange"},ended:{text:"Ended",color:"gray"},failed:{text:"Connection failed",color:"red"}},ike=[{label:"Esc",bytes:"\x1B"},{label:"Tab",bytes:" "},{label:"Ctrl+C",bytes:""},{label:"\u2191",bytes:"\x1B[A"},{label:"\u2193",bytes:"\x1B[B"},{label:"\u2190",bytes:"\x1B[D"},{label:"\u2192",bytes:"\x1B[C"},{label:"Enter",bytes:"\r"},{label:"Shift+Tab",bytes:"\x1B[Z"}];function ake({terminal:e,close:t}){let[r,n]=(0,Bi.useState)(""),[o,i]=(0,Bi.useState)(!1),a=l=>i(r!==""&&!e?.find(r,l)),s=()=>{e?.clearFind(),t(),e?.focus()};return(0,Ue.jsx)(ia,{className:"terminal-search",shadow:"md",p:6,withBorder:!0,children:(0,Ue.jsxs)(Ce,{gap:4,wrap:"nowrap",children:[(0,Ue.jsx)(Rt,{size:"xs",w:220,autoFocus:!0,placeholder:"Find in terminal",value:r,error:o,onChange:l=>n(l.currentTarget.value),onKeyDown:l=>{l.key==="Enter"&&a(l.shiftKey),l.key==="Escape"&&s()},"aria-label":"Find in the terminal"}),(0,Ue.jsx)(xt,{"aria-label":"Previous match",onClick:()=>a(!0),children:(0,Ue.jsx)(U3,{size:16})}),(0,Ue.jsx)(xt,{"aria-label":"Next match",onClick:()=>a(!1),children:(0,Ue.jsx)(mb,{size:16})}),(0,Ue.jsx)(xt,{"aria-label":"Close search",onClick:s,children:(0,Ue.jsx)(Ju,{size:16})})]})})}function dre({id:e}){let[t,r]=(0,Bi.useState)("connecting"),[n,o]=(0,Bi.useState)(),[i,a]=(0,Bi.useState)(!1),[s,l]=H2({key:"terminal-font-size",defaultValue:window.matchMedia("(max-width: 36em)").matches?11:14}),c=(0,Bi.useRef)(null),d=(0,Bi.useRef)(()=>{}),{toggle:u,fullscreen:f}=Z2(),m=xd("(pointer: coarse)"),g=ga(oke,{}).data?.sessions.find(w=>w.id===e),y=(0,Bi.useCallback)((w,P)=>{r(w),o(P)},[]),v=(0,Bi.useCallback)(w=>{d.current=w},[]),x=w=>{let P=YC.indexOf(s),$=YC[Math.max(0,Math.min(YC.length-1,(P<0?3:P)+w))];l($),c.current?.setFontSize($)};qh([["mod+shift+F",()=>a(!0)]],[],!0);let _=nke[t],I={kind:"operation",op:"sessions.close",label:"End session",verb:"end",input:{session:e},danger:!0,description:"Stop this session and every program it started"},S=()=>{d.current(),$r(Io("sessions"))};return(0,Ue.jsxs)("div",{className:"terminal-page",style:{position:"relative"},children:[(0,Ue.jsxs)(Ce,{gap:"sm",px:"sm",py:6,wrap:"nowrap",className:"terminal-toolbar",children:[(0,Ue.jsx)(ht,{label:"Back to sessions (the session keeps running)",children:(0,Ue.jsx)(xt,{size:"lg","aria-label":"Back to sessions",onClick:S,children:(0,Ue.jsx)(L3,{size:18})})}),g&&(0,Ue.jsx)(nf,{name:g.harness,size:28}),(0,Ue.jsxs)(F,{style:{minWidth:0},children:[(0,Ue.jsx)(ge,{fw:650,size:"sm",truncate:!0,lh:1.2,children:g?g.harness+" \xB7 "+(g.projectName??g.cwd):"Session "+e}),(0,Ue.jsx)(ge,{size:"xs",c:"dimmed",truncate:!0,lh:1.2,ff:"monospace",children:n??e})]}),(0,Ue.jsx)(Ii,{color:_.color,variant:"dot",style:{flex:"none"},visibleFrom:"sm",children:_.text}),(0,Ue.jsx)(ht,{label:_.text,children:(0,Ue.jsx)(F,{hiddenFrom:"sm",style:{flex:"none",display:"flex"},"aria-label":_.text,children:(0,Ue.jsx)("span",{className:"status-dot",style:{"--dot":"var(--mantine-color-"+_.color+"-6)"}})})}),(0,Ue.jsxs)(Ce,{gap:"xs",ml:"auto",wrap:"nowrap",children:[(0,Ue.jsxs)("div",{className:"terminal-tools",role:"toolbar","aria-label":"Terminal",children:[(0,Ue.jsx)(ht,{label:"Find (Ctrl+Shift+F)",children:(0,Ue.jsx)(xt,{"aria-label":"Find",onClick:()=>a(w=>!w),"data-active":i||void 0,children:(0,Ue.jsx)(cn,{size:16})})}),(0,Ue.jsx)(ht,{label:"Smaller text",children:(0,Ue.jsx)(xt,{"aria-label":"Smaller text",onClick:()=>x(-1),visibleFrom:"xs",children:(0,Ue.jsx)(Iz,{size:16})})}),(0,Ue.jsx)(ht,{label:"Larger text",children:(0,Ue.jsx)(xt,{"aria-label":"Larger text",onClick:()=>x(1),visibleFrom:"xs",children:(0,Ue.jsx)(wz,{size:16})})}),(0,Ue.jsx)(ht,{label:f?"Exit full screen":"Full screen",children:(0,Ue.jsx)(xt,{"aria-label":f?"Exit full screen":"Full screen",onClick:()=>{u()},children:f?(0,Ue.jsx)(fz,{size:16}):(0,Ue.jsx)(dz,{size:16})})})]}),g?.phase==="running"&&(0,Ue.jsx)(fl,{action:I,size:"xs"}),(0,Ue.jsx)(ht,{label:"Leave this page; the session keeps running",children:(0,Ue.jsx)(lt,{size:"xs",variant:"default",onClick:S,visibleFrom:"xs",children:"Detach"})})]})]}),i&&(0,Ue.jsx)(ake,{terminal:c.current,close:()=>a(!1)}),(0,Ue.jsx)(lre,{ref:c,sessionId:e,fontSize:s,onState:y,onReady:v}),m&&(0,Ue.jsx)("div",{className:"key-bar",role:"toolbar","aria-label":"Keys",children:ike.map(w=>(0,Ue.jsx)(lt,{size:"compact-sm",variant:"default",onClick:()=>{c.current?.type(w.bytes),c.current?.focus()},children:w.label},w.label))})]})}var _re=b(D(),1);var Fn=b(D(),1);var ys=b(D(),1);var kh=b(D(),1);var Ht=b(O(),1),wF="@custom";function ske(e){return["boolean","enum","number","text","path"].includes(e.kind)?!0:e.kind==="list"&&["enum","text","path"].includes(e.element?.kind??"")}function JC({action:e,summary:t}){let r=Jk(),n=e.fields?.[0],o=e.initial?.[n?.name??""],[i,a]=(0,kh.useState)(o),[s,l]=(0,kh.useState)(!1),[c,d]=(0,kh.useState)(null),u=JSON.stringify(o??null);if((0,kh.useEffect)(()=>a(JSON.parse(u)),[u]),!n)return null;let f=async y=>{if(JSON.stringify(y??null)===u)return;let v=X1(n,y);if(v){d(v);return}l(!0),d(null);let x=await r(e,{[n.name]:y},{inline:!0});l(!1),!x.ok&&!("cancelled"in x)&&(d(x.message+(x.fix?" "+x.fix:"")),a(JSON.parse(u)))},m=y=>{y.key==="Enter"&&f(i),y.key==="Escape"&&a(JSON.parse(u))},p=s?(0,Ht.jsx)(ho,{size:14}):void 0,g=c??void 0;if(!ske(n))return(0,Ht.jsxs)(Ce,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[t&&(0,Ht.jsx)(ge,{size:"sm",c:"dimmed",truncate:!0,children:t}),(0,Ht.jsx)(lt,{variant:"default",size:"xs",onClick:()=>{aC(e).then(async y=>{y&&await r(e,y,{inline:!0})})},children:n.kind==="secret"?"Set\u2026":"Edit\u2026"})]});switch(n.kind){case"boolean":return(0,Ht.jsxs)(Ne,{gap:4,align:"flex-end",children:[(0,Ht.jsxs)(Ce,{gap:"xs",children:[p,(0,Ht.jsx)(qa,{checked:i===!0,"aria-label":n.label,disabled:s,onChange:y=>{let v=y.currentTarget.checked;a(v),f(v)}})]}),g&&(0,Ht.jsx)(lke,{text:g})]});case"enum":{let y=(n.choices??[]).map(_=>({value:String(_.value),label:_.label})),v=n.choices?.some(_=>_.value===i)??!1,x=!v&&i!==void 0&&n.open!==void 0;return(0,Ht.jsxs)(Ne,{gap:6,children:[(0,Ht.jsx)(Kn,{"aria-label":n.label,data:[...y,...n.open?[{value:wF,label:"Custom\u2026"}]:[]],value:x?wF:v?String(i):null,rightSection:p,error:x?void 0:g,disabled:s,onChange:_=>{if(_===wF){a(n.open?.kind==="number"?n.open.min??0:"");return}let I=n.choices?.find(S=>String(S.value)===_)?.value;a(I),f(I)}}),x&&n.open&&(0,Ht.jsx)(ure,{field:n.open,value:i,error:g,onChange:a,onSave:f})]})}case"number":return(0,Ht.jsx)(ure,{field:n,value:i,error:g,onChange:a,onSave:f,busy:s});case"path":return(0,Ht.jsxs)(Ce,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Ht.jsx)(Rt,{style:{flex:1},"aria-label":n.label,ff:"monospace",size:"sm",value:typeof i=="string"?i:"",placeholder:n.literals?.length?n.literals.join(" or ")+", or a path":"C:\\\u2026",rightSection:p,error:g,onChange:y=>a(y.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m}),(0,Ht.jsx)(Ab,{field:n,value:typeof i=="string"?i:void 0,onPick:y=>{a(y),f(y)}})]});case"list":{let y=Array.isArray(i)?i.map(_=>String(_)):[],v=n.element;if(v?.kind==="enum")return(0,Ht.jsx)(iu,{"aria-label":n.label,data:(v.choices??[]).map(_=>({value:String(_.value),label:_.label})),value:y,error:g,rightSection:p,onChange:_=>{let I=_.map(S=>v.choices?.find(w=>String(w.value)===S)?.value??S);a(I),f(I)}});let x=_=>{a(_),f(_)};return(0,Ht.jsxs)(Ce,{gap:"xs",wrap:"nowrap",align:"flex-start",children:[(0,Ht.jsx)(Ic,{style:{flex:1},"aria-label":n.label,value:y,placeholder:y.length?void 0:"Type and press Enter",error:g,rightSection:p,onChange:x,clearable:!0}),v?.kind==="path"&&(0,Ht.jsx)(Ab,{field:n,value:void 0,onPick:_=>x(y.includes(_)?y:[...y,_])})]})}default:return(0,Ht.jsx)(Rt,{"aria-label":n.label,value:typeof i=="string"?i:"",rightSection:p,error:g,onChange:y=>a(y.currentTarget.value),onBlur:()=>{f(i)},onKeyDown:m})}}function ure({field:e,value:t,error:r,busy:n,onChange:o,onSave:i}){let a=s=>{s.key==="Enter"&&i(t)};return e.kind==="number"?(0,Ht.jsx)(lu,{"aria-label":e.label,value:typeof t=="number"?t:"",min:e.min,max:e.max,allowDecimal:!e.integer,thousandSeparator:",",placeholder:e.range,rightSection:n?(0,Ht.jsx)(ho,{size:14}):void 0,error:r,onChange:s=>o(typeof s=="number"?s:void 0),onBlur:()=>{i(t)},onKeyDown:a}):(0,Ht.jsx)(Rt,{"aria-label":e.label,value:typeof t=="string"?t:"",error:r,onChange:s=>o(s.currentTarget.value),onBlur:()=>{i(t)},onKeyDown:a})}function lke({text:e}){return(0,Ht.jsx)(ge,{size:"xs",c:"red",ta:"right",children:e})}var pr=b(O(),1);function SF(){return(0,pr.jsxs)(Ne,{gap:"lg","aria-busy":"true","aria-label":"Loading",children:[(0,pr.jsxs)(Ce,{justify:"space-between",children:[(0,pr.jsxs)(Ne,{gap:8,children:[(0,pr.jsx)(Dn,{h:26,w:180,radius:"md"}),(0,pr.jsx)(Dn,{h:14,w:320,radius:"md"})]}),(0,pr.jsx)(Dn,{h:34,w:120,radius:"md"})]}),[0,1].map(e=>(0,pr.jsx)(wr,{children:(0,pr.jsxs)(Ne,{gap:"sm",children:[(0,pr.jsx)(Dn,{h:16,w:140,radius:"md"}),(0,pr.jsx)(Dn,{h:12,radius:"md"}),(0,pr.jsx)(Dn,{h:12,w:"80%",radius:"md"}),(0,pr.jsx)(Dn,{h:12,w:"60%",radius:"md"})]})},e))]})}function Ch({title:e,text:t,icon:r=az,action:n,tone:o="neutral"}){return(0,pr.jsx)(wr,{py:48,children:(0,pr.jsx)(nu,{children:(0,pr.jsxs)(Ne,{gap:"sm",align:"center",maw:440,ta:"center",children:[(0,pr.jsx)(Ka,{size:52,radius:"xl",variant:"light",color:o==="danger"?"red":"indigo",children:(0,pr.jsx)(r,{size:26,stroke:1.6})}),e&&(0,pr.jsx)(Xn,{order:3,children:e}),(0,pr.jsx)(ge,{c:"dimmed",size:"sm",children:t}),n]})})})}function kF({message:e,fix:t,retry:r}){return(0,pr.jsx)(Ch,{tone:"danger",icon:Kc,title:e,text:t??"Try again in a moment.",action:r&&(0,pr.jsx)(lt,{variant:"default",onClick:r,children:"Try again"})})}var De=b(O(),1);function sy(e){return"item-"+e.replace(/[^A-Za-z0-9_-]/g,"_")}function cke(e){return(e.items??[]).filter(t=>t.badges?.length).length}function dke({item:e}){return!e.details?.length&&!e.code?null:(0,De.jsx)(ht,{label:(0,De.jsxs)(Ne,{gap:0,children:[e.code&&(0,De.jsx)(ge,{size:"xs",ff:"monospace",fw:700,children:e.code}),(e.details??[]).map((t,r)=>(0,De.jsx)(ge,{size:"xs",ff:"monospace",style:{whiteSpace:"pre"},children:t},r))]}),maw:480,position:"top-start",children:(0,De.jsx)(yb,{size:14,color:"var(--app-muted)",style:{flex:"none",cursor:"help"}})})}var uke=150;function fke({text:e}){let[t,r]=(0,ys.useState)(!1),n=e.length>uke;return(0,De.jsxs)(F,{mt:4,children:[(0,De.jsx)(ge,{size:"xs",c:"dimmed",lh:1.5,lineClamp:n&&!t?2:void 0,children:e}),n&&(0,De.jsx)(uv,{component:"button",type:"button",size:"xs",onClick:()=>r(!t),children:t?"Less":"More"})]})}function mke({item:e,flash:t}){let r=Oi(e.primary)&&!e.disabled?e.primary:void 0,n=r?.kind==="operation"&&r.inline?r:void 0,o=!!e.badges?.length;return(0,De.jsxs)("div",{className:"setting-row"+(t?" flash":""),id:sy(e.id),children:[(0,De.jsxs)(F,{style:{minWidth:0},children:[(0,De.jsxs)(Ce,{gap:6,wrap:"nowrap",children:[o&&(0,De.jsx)("span",{className:"modified-dot",title:"Changed from the default","aria-label":"Changed"}),(0,De.jsx)(ge,{fw:600,size:"sm",truncate:!0,children:e.label}),(0,De.jsx)(dke,{item:e})]}),e.description&&(0,De.jsx)(fke,{text:e.description}),e.disabled&&(0,De.jsx)(ge,{size:"xs",c:"dimmed",fs:"italic",mt:4,children:e.disabled})]}),(0,De.jsxs)(Ce,{gap:6,wrap:"nowrap",justify:"flex-end",align:"flex-start",children:[(0,De.jsx)(F,{style:{flex:1,minWidth:0},children:n?(0,De.jsx)(JC,{action:n,summary:e.hint}):(0,De.jsxs)(Ce,{justify:"flex-end",gap:"sm",wrap:"nowrap",children:[e.hint&&(0,De.jsx)(ht,{label:sd(e.hint),openDelay:400,maw:480,multiline:!0,children:(0,De.jsx)(ge,{size:"sm",c:"dimmed",ff:"monospace",truncate:!0,style:{minWidth:0},children:sd(e.hint)})}),r&&(0,De.jsx)(F,{style:{flex:"none"},children:(0,De.jsx)(fl,{action:r,size:"xs"})})]})}),(e.actions??[]).length>0&&(0,De.jsx)(F,{style:{flex:"none"},children:(0,De.jsx)(Ph,{actions:e.actions??[]})})]})]})}function pke({text:e}){let t=/[A-Za-z]:\\[^\s]+|\/[^\s]+/.exec(e)?.[0],r=t?t.split(/[\\/]/).pop():void 0;return(0,De.jsx)(ht,{label:e,openDelay:300,maw:560,multiline:!0,children:(0,De.jsxs)(Ce,{gap:6,wrap:"nowrap",mt:-8,style:{width:"fit-content",cursor:"default"},children:[(0,De.jsx)(tz,{size:15,color:"var(--app-muted)",style:{flex:"none"}}),(0,De.jsx)(ge,{size:"xs",c:"dimmed",children:r?"Saved in "+r:e})]})})}function CF(e,t=[]){let r=decodeURIComponent(location.hash.slice(1));if(r.startsWith("item-"))for(let n of e){let o=n.items?.find(i=>sy(i.id)===r);if(o)return{section:n.id,item:o.id}}return{section:e.find(n=>n.id===r)?.id??t.find(n=>n.id===r)?.id}}function fre({page:e,summary:t,eyebrow:r,toolbar:n,extras:o=[]}){let i=(0,ys.useMemo)(()=>e.sections.filter(v=>v.items?.length),[e]),[a,s]=(0,ys.useState)(()=>CF(i,o).section??i[0]?.id),[l,c]=(0,ys.useState)(()=>CF(i).item),[d,u]=(0,ys.useState)("");(0,ys.useEffect)(()=>{let v=()=>{let x=CF(i,o);x.section&&s(x.section),x.item&&(u(""),c(x.item))};return window.addEventListener("hashchange",v),()=>window.removeEventListener("hashchange",v)},[i,o]),(0,ys.useEffect)(()=>{if(!l)return;document.getElementById(sy(l))?.scrollIntoView({block:"center",behavior:"smooth"});let v=window.setTimeout(()=>c(void 0),1800);return()=>window.clearTimeout(v)},[l,a]);let f=o.find(v=>v.id===a),m=f?void 0:i.find(v=>v.id===a)??i[0],p=d.trim()?RF({...e,sections:i},d).sections:null,g=v=>{u(""),s(v),history.replaceState(null,"",location.pathname+location.search+"#"+v),window.scrollTo({top:0})},y=v=>(0,De.jsx)(mke,{item:v,flash:l===v.id},v.id);return(0,De.jsxs)(Ne,{gap:"lg",children:[(0,De.jsx)(DF,{title:e.title,summary:t,eyebrow:r,toolbar:n,actions:e.actions}),e.notice&&(0,De.jsx)(pke,{text:e.notice.text}),(0,De.jsxs)("div",{className:"category-layout",children:[(0,De.jsxs)(Ne,{gap:"sm",className:"category-nav",children:[(0,De.jsx)(Rt,{leftSection:(0,De.jsx)(cn,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:d,onChange:v=>u(v.currentTarget.value),"aria-label":"Search "+e.title.toLowerCase()}),(0,De.jsxs)(Ne,{gap:2,visibleFrom:"md",children:[i.map(v=>{let x=cke(v);return(0,De.jsx)(mc,{label:v.title,active:!p&&v.id===m?.id,onClick:()=>g(v.id),style:{borderRadius:"var(--mantine-radius-md)"},rightSection:x?(0,De.jsx)(Ii,{size:"xs",circle:!0,variant:"light",children:x}):null},v.id)}),o.length>0&&(0,De.jsx)(xv,{my:6}),o.map(v=>(0,De.jsx)(mc,{label:v.label,active:!p&&v.id===f?.id,onClick:()=>g(v.id),style:{borderRadius:"var(--mantine-radius-md)"}},v.id))]}),(0,De.jsx)(F,{hiddenFrom:"md",children:(0,De.jsx)(Kn,{"aria-label":"Category",data:[...i.map(v=>({value:v.id,label:v.title??v.id})),...o.map(v=>({value:v.id,label:v.label}))],value:f?.id??m?.id??null,onChange:v=>v&&g(v),comboboxProps:{withinPortal:!0}})})]}),(0,De.jsx)(Ne,{gap:"lg",style:{minWidth:0},children:p?p.length?p.map(v=>(0,De.jsxs)(Ne,{gap:"xs",children:[(0,De.jsxs)("div",{className:"group-label",children:[v.title," \xB7 ",v.items?.length??0]}),(0,De.jsx)(wr,{className:"list-card",children:(0,De.jsx)(e2,{items:v.items??[],render:y})})]},v.id)):(0,De.jsx)(Ch,{icon:cn,title:"No results",text:"Nothing matches \u201C"+d+"\u201D."}):f?(0,De.jsx)(PF.Provider,{value:!0,children:(0,De.jsx)(F,{children:f.node},f.id)}):m&&(0,De.jsxs)(Ne,{gap:"sm",children:[(0,De.jsxs)(F,{children:[(0,De.jsx)(Xn,{order:2,children:m.title}),m.description&&(0,De.jsx)(ge,{size:"sm",c:"dimmed",mt:4,children:m.description})]}),(0,De.jsx)(wr,{className:"list-card",children:(0,De.jsx)(e2,{items:m.items??[],render:y})})]})})]})]})}var hke={ok:"green",warn:"orange",danger:"red",muted:"gray",accent:"blue"};function Dh(e){return e?hke[e]:void 0}var q=b(O(),1),gke=12,TF=3;function sd(e){return e.replace(/ +-> +/g," \u2192 ").replace(/\s{2,}/g," \xB7 ")}function mre(e){if(!e.hint)return!1;let t=new Set((e.badges??[]).map(r=>r.text.toLowerCase()));return t.size?!sd(e.hint).split(" \xB7 ").every(r=>t.has(r.trim().toLowerCase())):!0}function vke(e){return e.kind==="link"&&e.target.kind==="start-agent"}var xke=new Set(["add","new","allow"]);function pre(e){let t=e.findIndex(vke);return t>=0?t:e.findIndex(r=>!rf(r)&&xke.has((r.verb??r.label).split(/\s+/)[0].toLowerCase()))}var PF=(0,Fn.createContext)(!1);function DF({title:e,summary:t,eyebrow:r,toolbar:n,actions:o=[]}){let i=(0,Fn.useContext)(PF),a=o.filter(Oi),s=pre(a);return(0,q.jsxs)("header",{className:i?"page-header embedded":"page-header",children:[(0,q.jsxs)(F,{className:"page-heading",children:[r&&!i&&r!==e&&(0,q.jsx)("div",{className:"page-eyebrow",children:r}),(0,q.jsx)(Xn,{order:i?2:1,children:e}),t&&(0,q.jsx)(ge,{c:"dimmed",size:"sm",mt:6,maw:720,children:t})]}),(n||a.length>0)&&(0,q.jsxs)(Ce,{gap:"xs",className:"page-toolbar",children:[n,a.map((l,c)=>(0,q.jsx)(fl,{action:l,primary:c===s},c))]})]})}function bke({note:e}){let t=e.tone==="warn"||e.tone==="danger";return(0,q.jsx)(Cn,{color:Dh(e.tone)??"gray",p:"sm",icon:t?(0,q.jsx)(Kc,{size:18}):(0,q.jsx)(yb,{size:18}),styles:{message:{fontSize:"var(--mantine-font-size-sm)"}},children:e.text})}var yke=/^[A-Za-z]:\\|^\\\\|^https?:\/\/|^([0-9A-F]{2}:){4}/,_ke=new Set(["yes","no","on","off","none","ready","shown","hidden","running","stopped"]);function Ike(e){return/^[a-z][a-z0-9 ,.'()-]*$/.test(e)&&(_ke.has(e)||e.includes(" "))?e.charAt(0).toUpperCase()+e.slice(1):e}function wke({fact:e}){let t=Dh(e.tone);return(0,q.jsxs)("div",{className:"fact-tile",title:e.description,children:[(0,q.jsx)("div",{className:"fact-label",children:e.label}),(0,q.jsxs)("div",{className:"fact-value",children:[t&&(0,q.jsx)("span",{className:"status-dot","aria-hidden":"true",style:{"--dot":`var(--mantine-color-${t}-6)`}}),(0,q.jsx)("span",{className:yke.test(e.value)?"machine":void 0,children:Ike(e.value)})]}),e.meter&&(0,q.jsx)(xc,{mt:10,size:6,radius:"xl",value:Math.min(100,e.meter.value/Math.max(1,e.meter.max)*100),color:t??"indigo","aria-label":e.label}),e.details?.map((r,n)=>(0,q.jsx)(ge,{size:"xs",c:"dimmed",mt:4,children:r},n))]})}function Ske({facts:e}){return(0,q.jsx)("div",{className:"facts-grid",children:e.map(t=>(0,q.jsx)(wke,{fact:t},t.id))})}function EF(e,t){return!!e&&!!t&&e.trim().toLowerCase()===t.trim().toLowerCase()}function hre(e){return{description:e.description&&!EF(e.description,e.hint)?e.description:void 0,details:(e.details??[]).filter(t=>!EF(t,e.hint)&&!EF(t,e.description))}}var kke=/^([A-Z][A-Za-z ]{1,24}):\s+(.+)$/,Cke=/^([A-Z][A-Za-z]*(?: [A-Za-z]+){0,3}) {2,}(.+)$/,Pke=/[\\/]|^(sandbox|npm) /;function Dke(e){let t=kke.exec(e)??Cke.exec(e);if(t)return{label:t[1].trim(),value:t[2].trim()}}function Rke({line:e}){let t=Dke(e);return t?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("dt",{children:t.label}),(0,q.jsx)("dd",{className:Pke.test(t.value)?"machine":void 0,children:t.value})]}):(0,q.jsx)("dd",{className:"detail-plain",children:e})}function gre({lines:e}){let[t,r]=(0,Fn.useState)(!1);if(!e.length)return null;let n=e.slice(0,TF),o=e.slice(TF),i=(a,s)=>(0,q.jsx)(Rke,{line:a},s);return(0,q.jsxs)(F,{mt:8,children:[(0,q.jsx)("dl",{className:"details",children:n.map(i)}),o.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(um,{in:t,children:(0,q.jsx)("dl",{className:"details",children:o.map((a,s)=>i(a,s+TF))})}),(0,q.jsxs)(It,{className:"more-toggle","aria-expanded":t,onClick:a=>{a.stopPropagation(),r(!t)},children:[t?(0,q.jsx)(mb,{size:12}):(0,q.jsx)(j3,{size:12}),t?"Show less":"Show "+o.length+" more"]})]})]})}function vre({item:e}){return(0,q.jsx)(q.Fragment,{children:e.badges?.map(t=>(0,q.jsx)(Ii,{size:"sm",color:Dh(t.tone)??"gray",children:t.text},t.text))})}function xre(){return(0,q.jsx)(Ii,{size:"sm",variant:"outline",color:"indigo",children:"This folder"})}function Tke({tone:e}){let t=e&&e!=="muted"?Dh(e):void 0;return t?(0,q.jsx)("span",{className:"status-dot","aria-hidden":"true",style:{"--dot":`var(--mantine-color-${t}-6)`}}):null}function Rh(e){return Oi(e.primary)&&!e.disabled?e.primary:void 0}function $F({action:e,hint:t,light:r}){return e.kind==="operation"&&e.inline?(0,q.jsx)(F,{miw:160,maw:300,onClick:n=>n.stopPropagation(),children:(0,q.jsx)(JC,{action:e,summary:t})}):(0,q.jsx)(fl,{action:e,size:"xs",variant:r?"light":"default"})}function Eke(e,t){return e.kind==="operation"&&t.kind==="operation"?e.op===t.op&&JSON.stringify(e.input)===JSON.stringify(t.input):e.kind==="link"&&t.kind==="link"?JSON.stringify(e.target)===JSON.stringify(t.target):!1}function t2(e,t){return(e??[]).filter(r=>!t||!Eke(r,t))}function Ph({actions:e}){let t=e.filter(Oi);return t.length>2?(0,q.jsx)(aJ,{actions:t}):(0,q.jsx)(q.Fragment,{children:t.map((r,n)=>(0,q.jsx)(iJ,{action:r},n))})}function $ke({item:e}){let t=of(),r=Rh(e),n=r?.kind==="link",{description:o,details:i}=hre(e),a=t2(e.actions,r);return(0,q.jsxs)("div",{className:"item-row"+(n?" clickable":""),tabIndex:n?0:void 0,role:n?"button":void 0,onClick:n?()=>{t(r)}:void 0,onKeyDown:n?s=>s.key==="Enter"&&void t(r):void 0,"data-disabled":e.disabled?!0:void 0,children:[(0,q.jsxs)(Ce,{gap:"sm",wrap:"nowrap",align:"flex-start",className:"item-main",children:[e.icon&&(0,q.jsx)(nf,{name:e.icon,size:32}),(0,q.jsxs)(F,{style:{minWidth:0,flex:1},children:[(0,q.jsxs)(Ce,{gap:8,wrap:"wrap",className:"item-title",children:[e.tone!=="muted"&&(0,q.jsx)(Tke,{tone:e.tone}),(0,q.jsx)(ge,{fw:600,size:"sm",c:e.tone==="muted"?"dimmed":void 0,style:{overflowWrap:"anywhere"},children:sd(e.label)}),e.marked&&(0,q.jsx)(xre,{}),(0,q.jsx)(vre,{item:e})]}),mre(e)&&(0,q.jsx)(ge,{size:"sm",c:"dimmed",mt:2,style:{overflowWrap:"anywhere"},children:sd(e.hint??"")}),o&&(0,q.jsx)(ge,{size:"xs",c:"dimmed",mt:2,children:o}),(0,q.jsx)(gre,{lines:i}),e.disabled&&(0,q.jsx)(ge,{size:"xs",c:"dimmed",fs:"italic",mt:4,children:e.disabled})]})]}),(a.length>0||r)&&(0,q.jsxs)(Ce,{gap:6,wrap:"nowrap",className:"row-actions",children:[(0,q.jsx)(Ph,{actions:a}),r&&(0,q.jsx)($F,{action:r,hint:e.hint,light:n})]})]})}function bre(e){return!!Rh(e)&&!e.hint&&!e.details?.length&&!e.badges?.length&&!e.marked&&!e.icon}function Ake({item:e}){let t=of(),r=Rh(e),n=r?.kind==="link";if(r&&bre(e))return(0,q.jsx)(wr,{padding:"md",title:e.description,className:"add-card",children:(0,q.jsxs)(Ce,{justify:"center",gap:6,children:[(0,q.jsx)(Ph,{actions:t2(e.actions,r)}),(0,q.jsx)($F,{action:r,light:!0})]})});let{details:o}=hre(e);return(0,q.jsx)(wr,{className:"item-card"+(n?" clickable":""),padding:"md",onClick:n?()=>{t(r)}:void 0,"data-disabled":e.disabled?!0:void 0,children:(0,q.jsxs)(Ne,{gap:"sm",h:"100%",children:[(0,q.jsxs)(Ce,{gap:"sm",wrap:"nowrap",align:"flex-start",children:[e.icon&&(0,q.jsx)(nf,{name:e.icon}),(0,q.jsxs)(F,{style:{minWidth:0,flex:1},children:[(0,q.jsx)(ge,{fw:650,size:"sm",style:{overflowWrap:"anywhere"},children:sd(e.label)}),mre(e)&&(0,q.jsx)(ge,{size:"xs",c:"dimmed",truncate:!0,mt:2,children:sd(e.hint??"")}),(e.marked||!!e.badges?.length)&&(0,q.jsxs)(Ce,{gap:4,mt:6,wrap:"wrap",children:[e.marked&&(0,q.jsx)(xre,{}),(0,q.jsx)(vre,{item:e})]})]})]}),(0,q.jsx)(gre,{lines:o}),e.disabled&&(0,q.jsx)(ge,{size:"xs",c:"dimmed",fs:"italic",children:e.disabled}),(r||e.actions?.length)&&(0,q.jsxs)(Ce,{justify:"flex-end",gap:6,mt:"auto",className:"card-actions",children:[(0,q.jsx)(Ph,{actions:t2(e.actions,r)}),r&&(0,q.jsx)($F,{action:r,hint:e.hint,light:!0})]})]})})}function Oke({section:e}){let t=e.columns??[],r=e.items??[],n=r.some(o=>Rh(o)||o.actions?.length);return(0,q.jsx)(ur.ScrollContainer,{minWidth:560,children:(0,q.jsxs)(ur,{highlightOnHover:!0,verticalSpacing:9,horizontalSpacing:"md",fz:"sm",className:"data-table",children:[(0,q.jsx)(ur.Thead,{children:(0,q.jsxs)(ur.Tr,{children:[t.map(o=>(0,q.jsx)(ur.Th,{children:o.label},o.key)),n&&(0,q.jsx)(ur.Th,{children:(0,q.jsx)("span",{className:"visually-hidden",children:"Actions"})})]})}),(0,q.jsx)(ur.Tbody,{children:r.map(o=>{let i=Rh(o);return(0,q.jsxs)(ur.Tr,{"data-disabled":o.disabled?!0:void 0,children:[t.map(a=>(0,q.jsx)(ur.Td,{children:o.cells?.[a.key]??""},a.key)),n&&(0,q.jsx)(ur.Td,{ta:"right",className:"row-actions-cell",children:(0,q.jsxs)(Ce,{gap:4,justify:"flex-end",wrap:"nowrap",children:[(0,q.jsx)(Ph,{actions:t2(o.actions,i)}),i&&(0,q.jsx)(fl,{action:i,size:"compact-sm",variant:"subtle"})]})})]},o.id)})})]})})}function e2({items:e,render:t=r=>(0,q.jsx)($ke,{item:r},r.id)}){let r=[],n;for(let o of e)o.group&&o.group!==n&&r.push((0,q.jsx)("div",{className:"group-heading",children:o.group},"g:"+o.group)),n=o.group,r.push(t(o));return(0,q.jsx)(q.Fragment,{children:r})}function zke({section:e,more:t=[]}){let r=[...(e.actions??[]).filter(Oi),...t];if(!e.title&&!e.summary&&!e.description&&!r.length)return null;let n=pre(r);return(0,q.jsxs)("div",{className:"section-header",children:[(0,q.jsxs)(F,{style:{minWidth:0,flex:"1 1 260px"},children:[e.title&&(0,q.jsxs)(Ce,{gap:8,wrap:"wrap",align:"baseline",children:[(0,q.jsx)(Xn,{order:3,children:e.title}),e.summary&&(0,q.jsx)(ge,{size:"sm",c:"dimmed",children:e.summary})]}),!e.title&&e.summary&&(0,q.jsx)(ge,{size:"sm",c:"dimmed",children:e.summary}),e.description&&(0,q.jsx)(ge,{size:"sm",c:"dimmed",mt:2,maw:760,children:e.description})]}),r.length>0&&(0,q.jsx)(Ce,{gap:"xs",children:r.map((o,i)=>(0,q.jsx)(fl,{action:o,primary:i===n,size:"xs"},i))})]})}function Nke({notes:e}){let t=e.filter(o=>(o.only===void 0||o.only==="web")&&!o.text.startsWith("* ="));if(!t.length)return null;let r=t.filter(o=>o.tone==="warn"||o.tone==="danger"),n=t.filter(o=>!r.includes(o));return(0,q.jsxs)(Ne,{gap:"xs",children:[r.length>0&&(0,q.jsx)(Cn,{color:r.some(o=>o.tone==="danger")?"red":"yellow",p:"sm",icon:(0,q.jsx)(Kc,{size:18}),children:(0,q.jsx)(Ne,{gap:4,children:r.map((o,i)=>(0,q.jsx)(ge,{size:"sm",children:o.text},i))})}),n.length>0&&(0,q.jsx)(Ne,{gap:2,className:"section-notes",children:n.map((o,i)=>(0,q.jsx)(ge,{size:"xs",c:Dh(o.tone)??"dimmed",children:o.text},i))})]})}function Fke({lines:e}){let t=(0,Fn.useRef)(null),r=e.join(`
221
+ `);return(0,Fn.useEffect)(()=>{let n=t.current;n&&(n.scrollTop=n.scrollHeight)},[r]),(0,q.jsx)("div",{className:"text-block",children:(0,q.jsx)(Nr,{h:420,viewportRef:t,type:"auto",children:(0,q.jsx)("pre",{children:r})})})}function Lke({section:e}){let t=e.items??[],r=e.facts??[],n=(e.actions??[]).filter(Oi),o=e.text??[];if(!r.length&&!t.length&&!n.length&&!e.summary&&!o.length)return null;let i=e.columns&&e.columnsOn!=="cli",a=e.cards?t.filter(bre):[],s=a.length?t.filter(c=>!a.includes(c)):t,l=a.flatMap(c=>{let d=Rh(c);return d?[d]:[]});return(0,q.jsx)("section",{className:"page-section",children:(0,q.jsxs)(Ne,{gap:"sm",children:[(0,q.jsx)(zke,{section:e,more:l}),r.length>0&&(0,q.jsx)(wr,{padding:0,children:(0,q.jsx)(Ske,{facts:r})}),o.length>0&&(0,q.jsx)(Fke,{lines:o}),s.length>0&&(e.cards?(0,q.jsx)(Ov,{cols:{base:1,sm:2,lg:3},spacing:"md",children:s.map(c=>(0,q.jsx)(Ake,{item:c},c.id))}):(0,q.jsx)(wr,{className:"list-card",children:i?(0,q.jsx)(Oke,{section:e}):(0,q.jsx)(e2,{items:t})})),(0,q.jsx)(Nke,{notes:e.notes??[]})]})})}function RF(e,t){let r=t.trim().toLowerCase();if(!r)return e;let n=o=>[o.label,o.hint,o.description,o.keywords,o.group,o.code].some(i=>i?.toLowerCase().includes(r));return{...e,sections:e.sections.map(o=>({...o,facts:[],actions:[],items:(o.items??[]).filter(n)})).filter(o=>o.items.length>0||(o.text?.length??0)>0)}}function yre({page:e,summary:t,eyebrow:r,toolbar:n,extras:o}){return e.categories?(0,q.jsx)(fre,{page:e,summary:t,eyebrow:r,toolbar:n,extras:o}):(0,q.jsx)(Mke,{page:e,summary:t,eyebrow:r,toolbar:n})}function Mke({page:e,summary:t,eyebrow:r,toolbar:n}){let o=of(),[i,a]=(0,Fn.useState)(""),s=(0,Fn.useMemo)(()=>e.sections.reduce((u,f)=>u+(f.items?.length??0),0),[e]),l=(0,Fn.useMemo)(()=>RF(e,i),[e,i]),c=e.empty,d=Oi(c?.action)?c?.action:void 0;return(0,q.jsxs)(Ne,{gap:"xl",children:[(0,q.jsx)(DF,{title:e.title,summary:t,eyebrow:r,toolbar:n,actions:e.actions}),e.notice&&(0,q.jsx)(bke,{note:e.notice}),s>gke&&(0,q.jsx)(Rt,{leftSection:(0,q.jsx)(cn,{size:16}),placeholder:"Search "+e.title.toLowerCase(),value:i,onChange:u=>a(u.currentTarget.value),"aria-label":"Search "+e.title.toLowerCase(),maw:420}),!kQ(e)&&c?(0,q.jsx)(Ch,{title:c.title,text:c.text,action:d&&(0,q.jsx)(lt,{mt:"xs",onClick:()=>{o(d)},children:d.label})}):l.sections.length?l.sections.map(u=>(0,q.jsx)(Lke,{section:u},u.id)):(0,q.jsx)(Ch,{icon:cn,title:"No results",text:"Nothing on this page matches \u201C"+i+"\u201D."})]})}var so=b(O(),1),Bke=200;function Ire(e,t){let r={};for(let i of e.params??[]){let a=t[i];typeof a=="string"&&a.length<=Bke&&(r[i]=a)}for(let i of e.filters??[]){let a=t[i.param];r[i.param]=i.choices.some(s=>s.value===a)?a:i.choices[0].value}let n=e.tabs;if(!n)return r;let o=t[n.param];return{...r,[n.param]:n.choices.some(i=>i.value===o)?o:n.choices[0].value}}function jke({view:e,params:t}){return(0,so.jsx)(so.Fragment,{children:(e.filters??[]).map(r=>(0,so.jsx)(Kn,{size:"sm",w:150,"aria-label":r.label,allowDeselect:!1,comboboxProps:{withinPortal:!0},data:r.choices.map(n=>({value:n.value,label:n.label})),value:t[r.param],onChange:n=>n&&$r(Io(e.id,{...t,[r.param]:n}))},r.param))})}function wre({view:e,params:t,extras:r}){let n=vQ(e,t),i=Object.keys(e.queries).map(f=>[f,ga(e.queries[f],n[f])]),a=i.find(([,f])=>f.error);if(a){let f=a[1].error;return(0,so.jsx)(kF,{message:f.message,fix:f.fix,retry:()=>location.reload()})}if(i.some(([,f])=>f.pending))return(0,so.jsx)(SF,{});let s=e.build(Object.fromEntries(i.map(([f,m])=>[f,m.data])),t),l=e.tabs,c=e.filters?.length?(0,so.jsx)(jke,{view:e,params:t}):null,d=l||c?(0,so.jsxs)(so.Fragment,{children:[c,l&&(0,so.jsx)(du,{size:"sm",data:l.choices.map(f=>({value:f.value,label:f.label})),value:t[l.param],onChange:f=>$r(Io(e.id,{[l.param]:f}))})]}):void 0,u=Wk(cs,e.id)?.label;return(0,so.jsx)(yre,{page:s,summary:e.summary,eyebrow:u,toolbar:d,extras:r})}function Uke({id:e}){let t=$3(e);return t?(0,so.jsx)(wre,{view:t,params:Ire(t,{})}):null}function Sre({view:e,params:t}){let r=_Y(cs,e);if((0,_re.useEffect)(()=>{r?.view&&$r(Io(r.view)+"#"+e)},[r,e]),r?.view)return(0,so.jsx)(SF,{});let n=$3(e);if(!n)return(0,so.jsx)(kF,{message:"Page not found",fix:"There is no page called \u201C"+e+"\u201D. Check the address, or pick a page from the sidebar."});let o=Ire(n,t),a=(Qu(cs).find(s=>s.view===e)?.embeds??[]).map(s=>({id:s.view,label:s.label,node:(0,so.jsx)(Uke,{id:s.view})}));return(0,so.jsx)(wre,{view:n,params:o,extras:a.length?a:void 0},e+JSON.stringify(o))}var kre=()=>Fv({opened:!1,empty:!1,selected:-1,listId:"",query:"",registeredActions:new Set}),AF=e=>Lv(e);function Th(e,t){let r=t.getState();t.setState({...r,...e(t.getState())})}function Cre(e){Th(()=>({opened:!0,selected:-1}),e)}function Pre(e){Th(()=>({opened:!1}),e)}function Dre(e){Th(t=>({opened:!t.opened,selected:t.opened?t.selected:-1}),e)}function Rre(e,t){t.updateState(r=>({...r,selected:e}))}function Vke(e,t){t.updateState(r=>({...r,listId:e}))}function r2(e,t=document){let r=t.querySelector(e);if(r)return r;let n=t instanceof ShadowRoot?t.host.children:t.children;for(let o=0;o<n.length;o+=1){let i=n[o];if(i.shadowRoot){let s=r2(e,i.shadowRoot);if(s)return s}let a=r2(e,i);if(a)return a}return null}function o2(e,t){let r=t.getState(),n=r.listId?r2(`#${r.listId}`):null,o=n?.querySelector("[data-selected]"),i=n?.querySelectorAll("[data-action]")??[],a=e===-1?i.length-1:e===i.length?0:e,s=Rl(a,0,i.length-1);return o?.removeAttribute("data-selected"),i[s]?.scrollIntoView({block:"nearest"}),i[s]?.setAttribute("data-selected","true"),Rre(s,t),s}function Hke(e){return o2(e.getState().selected+1,e)}function Wke(e){return o2(e.getState().selected-1,e)}function Zke(e){let t=e.getState();r2(`#${t.listId} [data-selected]`)?.click()}function Gke(e,t){let r=t.getState();return r.registeredActions.add(e),()=>{r.registeredActions.delete(e)}}function qke(e,t){Th(()=>({query:e}),t),Promise.resolve().then(()=>{o2(0,t),Th(r=>({empty:r.query.trim().length>0&&r.registeredActions.size===0||!1}),t)})}function Kke({clearQuery:e},t){t.updateState(r=>({...r,selected:-1,query:e?"":r.query,empty:e?!1:r.empty}))}var pn={open:Cre,close:Pre,toggle:Dre,updateState:Th,setSelectedAction:Rre,setListId:Vke,selectAction:o2,selectNextAction:Hke,selectPreviousAction:Wke,triggerSelectedAction:Zke,registerAction:Gke,setQuery:qke,clearSpotlightState:Kke};function Tre(){let e=kre();return[e,{open:()=>Cre(e),close:()=>Pre(e),toggle:()=>Dre(e)}]}var[n2,Il]=Tre(),{open:Xke,close:Qke,toggle:Yke}=Il;function i2(e){let t=e;return t.group!==void 0&&Array.isArray(t.actions)}var wl=b(O(),1);function Jke(e){return Array.isArray(e)?e.map(t=>t.trim()).join(",").toLowerCase().trim():typeof e=="string"?e.toLowerCase().trim():""}function eCe(e){return e.reduce((t,r)=>"actions"in r?[...t,...r.actions.map(n=>({...n,group:r.group}))]:[...t,r],[])}function tCe(e){let t={},r=[];return e.forEach(n=>{n.group?(t[n.group]||(t[n.group]={pushed:!1,data:{group:n.group,actions:[]}}),t[n.group].data.actions.push(n),t[n.group].pushed||(t[n.group].pushed=!0,r.push(t[n.group].data))):r.push(n)}),r}var Ere=(e,t)=>{let r=e.trim().toLowerCase(),n=[[],[]];return eCe(t).forEach(i=>{i.label?.toLowerCase().includes(r)?n[0].push(i):(i.description?.toLowerCase().includes(r)||Jke(i.keywords).includes(r))&&n[1].push(i)}),tCe(n.flat())};function OF(e,t){if(!Array.isArray(e))return[];let r=0;return e.reduce((n,o)=>{if(r>=t)return n;if(i2(o)){let i=OF(o.actions,t-r);n.push({group:o.group,actions:i}),r+=i.length}else n.push(o),r+=1;return n},[])}var Ui=b(O(),1);var[$re,ji]=Gt("Spotlight component was not found in tree");var lo={root:"m_d2b315db",content:"m_3cd250e0",body:"m_d2abce9b",search:"m_f366a061",actionsList:"m_6e463822",action:"m_d49bb8ef",actionBody:"m_3d475731",actionSection:"m_832642f6",actionLabel:"m_6c2a1345",actionDescription:"m_a6d9d78d",empty:"m_82f78f74",footer:"m_ddcaf054",actionsGroup:"m_5a3e5f7b"};var rCe={dimmedSections:!0,highlightQuery:!1},Eh=M((e,t)=>{let r=z("SpotlightAction",rCe,e),{className:n,style:o,classNames:i,styles:a,id:s,description:l,label:c,leftSection:d,rightSection:u,children:f,dimmedSections:m,highlightQuery:p,highlightColor:g,closeSpotlightOnTrigger:y,onClick:v,onMouseDown:x,keywords:_,vars:I,...S}=r,w=ji(),P={classNames:i,styles:a},$=p&&typeof c=="string"?(0,Ui.jsx)(yv,{component:"span",highlight:w.query,color:g,...w.getStyles("actionLabel",P),children:c}):(0,Ui.jsx)("span",{...w.getStyles("actionLabel",P),children:c});return(0,Ui.jsx)(It,{ref:t,"data-action":!0,...w.getStyles("action",{className:n,style:o,...P}),...S,onMouseDown:B=>{B.preventDefault(),x?.(B)},onClick:B=>{v?.(B),(y??w.closeOnActionTrigger)&&pn.close(w.store)},tabIndex:-1,children:f||(0,Ui.jsxs)(Ui.Fragment,{children:[d&&(0,Ui.jsx)(F,{component:"span",mod:{position:"left",dimmed:m},...w.getStyles("actionSection",P),children:d}),(0,Ui.jsxs)("span",{...w.getStyles("actionBody",P),children:[$,(0,Ui.jsx)("span",{...w.getStyles("actionDescription",P),children:l})]}),u&&(0,Ui.jsx)(F,{component:"span",mod:{position:"right",dimmed:m},...w.getStyles("actionSection",P),children:u})]})})});Eh.classes=lo;Eh.displayName="@mantine/spotlight/SpotlightAction";var Are=b(O(),1);var oCe={},ly=M((e,t)=>{let{className:r,style:n,styles:o,classNames:i,label:a,children:s,...l}=z("SpotlightActionsGroup",oCe,e),c=ji();return(0,Are.jsx)(F,{...c.getStyles("actionsGroup",{className:r,style:n,classNames:i,styles:o}),ref:t,...l,__vars:{"--spotlight-label":`'${a?.replace(/'/g,"\\'")}'`},children:s})});ly.classes=lo;ly.displayName="@mantine/core/SpotlightActionsGroup";var Ore=b(O(),1),a2=b(D(),1);var nCe={},cy=M((e,t)=>{let{className:r,style:n,id:o,children:i,vars:a,classNames:s,styles:l,...c}=z("SpotlightActionsList",nCe,e),d=ji(),u=`mantine-${(0,a2.useId)().replace(/:/g,"")}`,f=o||u;return(0,a2.useEffect)(()=>(pn.setListId(f,d.store),()=>pn.setListId("",d.store)),[]),(0,Ore.jsx)(Nr.Autosize,{...d.getStyles("actionsList",{className:r,style:n,classNames:s,styles:l}),ref:t,type:"scroll",scrollbarSize:"var(--spotlight-actions-list-padding)",offsetScrollbars:"y",id:f,...c,children:i})});cy.classes=lo;cy.displayName="@mantine/spotlight/SpotlightActionsList";var zre=b(O(),1);var iCe={},dy=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightEmpty",iCe,e),s=ji();return(0,zre.jsx)(F,{ref:t,...s.getStyles("empty",{classNames:o,styles:i,className:r,style:n}),...a})});dy.classes=lo;dy.displayName="@mantine/spotlight/SpotlightEmpty";var Nre=b(O(),1);var aCe={},s2=M((e,t)=>{let{className:r,style:n,classNames:o,styles:i,...a}=z("SpotlightFooter",aCe,e),s=ji();return(0,Nre.jsx)(F,{ref:t,...s.getStyles("footer",{className:r,classNames:o,style:n,styles:i}),...a})});s2.classes=lo;s2.displayName="@mantine/spotlight/SpotlightFooter";var zF=b(O(),1);function Fre(e,t){if(!e)return[];let r=()=>pn.open(t);return Array.isArray(e)?e.map(n=>[n,r]):[[e,r]]}var sCe={size:600,yOffset:80,zIndex:Et("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:n2,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",maxHeight:400,scrollable:!1},uy=M((e,t)=>{let r=z("SpotlightRoot",sCe,e),{classNames:n,className:o,style:i,styles:a,unstyled:s,vars:l,store:c,children:d,query:u,onQueryChange:f,transitionProps:m,clearQueryOnClose:p,shortcut:g,tagsToIgnore:y,triggerOnContentEditable:v,disabled:x,onSpotlightOpen:_,onSpotlightClose:I,forceOpened:S,closeOnActionTrigger:w,maxHeight:P,scrollable:$,...B}=r,W=ft(),{opened:H,query:K}=AF(c),T=u||K,k=C=>{f?.(C),pn.setQuery(C,c)},E=Q({name:"Spotlight",classes:lo,props:r,className:o,style:i,classNames:n,styles:a,unstyled:s});return qh(Fre(g,c),y,v),yr(()=>{H?_?.():I?.()},[H]),x?null:(0,zF.jsx)($re,{value:{getStyles:E,query:T,setQuery:k,store:c,closeOnActionTrigger:w},children:(0,zF.jsx)(vo,{ref:t,...B,withCloseButton:!1,opened:H||!!S,padding:0,onClose:()=>pn.close(c),className:o,style:i,classNames:Gi({theme:W,classNames:[lo,n],props:r,stylesCtx:void 0}),styles:Ia({theme:W,styles:a,props:r,stylesCtx:void 0}),transitionProps:{...m,onExited:()=>{p&&k(""),pn.clearSpotlightState({clearQuery:p},c),m?.onExited?.()}},__vars:{"--spotlight-max-height":$?Z(P):void 0},__staticSelector:"Spotlight","data-scrollable":$||void 0,children:d})})});uy.classes=lo;uy.displayName="@mantine/spotlight/SpotlightRoot";var Lre=b(O(),1),Mre=b(D(),1);var lCe={size:"lg"},fy=M((e,t)=>{let{classNames:r,styles:n,onKeyDown:o,onChange:i,vars:a,value:s,...l}=z("SpotlightSearch",lCe,e),c=ji(),d=c.getStyles("search"),[u,f]=(0,Mre.useState)(!1),m=p=>{o?.(p),!u&&(p.nativeEvent.code==="ArrowDown"&&(p.preventDefault(),pn.selectNextAction(c.store)),p.nativeEvent.code==="ArrowUp"&&(p.preventDefault(),pn.selectPreviousAction(c.store)),(p.nativeEvent.code==="Enter"||p.nativeEvent.code==="NumpadEnter")&&(p.preventDefault(),pn.triggerSelectedAction(c.store)))};return(0,Lre.jsx)(mt,{ref:t,classNames:[{input:d.className},r],styles:[{input:d.style},n],...l,value:s??c.query,onChange:p=>{c.setQuery(p.currentTarget.value),i?.(p)},onKeyDown:m,onCompositionStart:()=>f(!0),onCompositionEnd:()=>f(!1)})});fy.classes=lo;fy.displayName="@mantine/spotlight/SpotlightSearch";var cCe={size:600,yOffset:80,limit:1/0,zIndex:Et("max"),overlayProps:{backgroundOpacity:.35,blur:7},transitionProps:{duration:200,transition:"pop"},store:n2,filter:Ere,clearQueryOnClose:!0,closeOnActionTrigger:!0,shortcut:"mod + K",highlightQuery:!1},hn=M((e,t)=>{let r=z("Spotlight",cCe,e),{searchProps:n,filter:o,query:i,onQueryChange:a,actions:s,nothingFound:l,highlightQuery:c,limit:d,...u}=r,[f,m]=ot({value:i,defaultValue:"",finalValue:"",onChange:a}),p=OF(o(f,s),d).map(g=>{if(i2(g)){let y=g.actions.map(({id:v,...x})=>(0,wl.jsx)(Eh,{highlightQuery:c,...x},v));return(0,wl.jsx)(ly,{label:g.group,children:y},g.group)}return(0,wl.jsx)(Eh,{highlightQuery:c,...g},g.id)});return(0,wl.jsxs)(uy,{...u,query:f,onQueryChange:m,ref:t,children:[(0,wl.jsx)(fy,{...n}),(0,wl.jsxs)(cy,{children:[p,p.length===0&&l&&(0,wl.jsx)(dy,{children:l})]})]})});hn.classes=lo;hn.displayName="@mantine/spotlight/Spotlight";hn.Search=fy;hn.ActionsList=cy;hn.Action=Eh;hn.Empty=dy;hn.ActionsGroup=ly;hn.Footer=s2;hn.Root=uy;hn.open=Il.open;hn.close=Il.close;hn.toggle=Il.toggle;var Bre=b(D(),1);var Sl=b(O(),1),dCe=ll("sessions.list"),uCe=ll("settings.list");function jre(){let e=ga(dCe,{}).data,t=ga(uCe,{scope:"user"}).data,{setColorScheme:r}=wd(),n=Sd("light")==="dark",o=(0,Bre.useMemo)(()=>{let i=Qu(cs).filter(c=>c.view).map(c=>{let d=Wk(cs,c.view)?.label,u=lC[c.label]??cn;return{id:"view:"+c.view,label:c.label==="Overview"&&d?d+" overview":c.label,description:d?d+" \u203A "+c.label:void 0,keywords:d?[d]:void 0,leftSection:(0,Sl.jsx)(u,{size:18,stroke:1.6}),onClick:()=>$r(Io(c.view))}}),a=[{id:"new-session",label:"New session",description:"Start an agent in one of the sandbox\u2019s projects",leftSection:(0,Sl.jsx)(cl,{size:18}),onClick:()=>$r(Io("agents"))},{id:"scheme",label:n?"Switch to light mode":"Switch to dark mode",description:"Change the colour scheme of the web UI",leftSection:(0,Sl.jsx)(_b,{size:18}),onClick:()=>r(n?"light":"dark")}],s=(e?.sessions??[]).filter(c=>c.phase==="running"&&c.canOpen).map(c=>({id:"session:"+c.id,label:c.harness+" \xB7 "+(c.projectName??c.cwd),description:"Open the terminal \xB7 session "+c.id,keywords:[c.id,c.cwd],leftSection:(0,Sl.jsx)(nf,{name:c.harness,size:24}),rightSection:(0,Sl.jsx)(Ai,{size:16}),onClick:()=>$r("/s/"+c.id)})),l=(t?.rows??[]).map(c=>({id:"setting:"+c.id,label:c.label,description:c.id+(c.field.help?" \xB7 "+c.field.help:""),keywords:[c.id,c.category],leftSection:(0,Sl.jsx)(z3,{size:18,stroke:1.6}),onClick:()=>$r(Io("settings")+"#"+sy(c.id))}));return[{group:"Pages",actions:i},{group:"Commands",actions:a},...s.length?[{group:"Sessions",actions:s}]:[],...l.length?[{group:"Settings",actions:l}]:[]]},[e,t,n,r]);return(0,Sl.jsx)(hn,{actions:o,shortcut:["mod + K","/"],limit:12,highlightQuery:!0,scrollable:!0,maxHeight:480,nothingFound:"No pages, sessions or settings match",searchProps:{leftSection:(0,Sl.jsx)(cn,{size:18}),placeholder:"Search pages, sessions and settings\u2026"}})}var ba=b(O(),1),fCe=ll("sandbox.status");function mCe(e){let t=e.sandbox;if(e.shared?.limited)return{color:"gray",title:"Another user\u2019s sandbox",line:"Not shared with you",busy:!1};if(!t.running)return{color:"gray",title:"Stopped",line:"Starts with the next agent",busy:!1};let r=e.projects.reduce((i,a)=>i+a.sessions.length,0)+e.otherSessions.length,n=t.phase==="ready",o=t.startedAt?"Up "+_o(t.startedAt).replace(" ago",""):"Running";return{color:n?"green":"yellow",title:n?"Running":t.phase.charAt(0).toUpperCase()+t.phase.slice(1),line:o+" \xB7 "+r+(r===1?" session":" sessions"),busy:!n}}function Ure(){let{data:e,error:t}=ga(fCe,{}),r=e?mCe(e):t?{color:"red",title:"Not connected",line:"Check that sandbox web is running",busy:!1}:null;return(0,ba.jsx)(It,{onClick:()=>$r(Io("sandbox")),className:"status-card","aria-label":r?"Sandbox: "+r.title+", "+r.line+". Open the overview":"Sandbox status",children:r?(0,ba.jsxs)(Ce,{gap:"sm",wrap:"nowrap",children:[(0,ba.jsx)("span",{className:"status-dot"+(r.busy?" pulse":""),style:{"--dot":`var(--mantine-color-${r.color}-6)`}}),(0,ba.jsxs)(Ne,{gap:0,style:{minWidth:0,flex:1},children:[(0,ba.jsx)(ge,{size:"sm",fw:600,truncate:!0,lh:1.35,children:r.title}),(0,ba.jsx)(ge,{size:"xs",c:"dimmed",truncate:!0,children:r.line})]})]}):(0,ba.jsxs)(Ne,{gap:6,children:[(0,ba.jsx)(Dn,{h:12,w:"60%"}),(0,ba.jsx)(Dn,{h:10,w:"80%"})]})})}var Oe=b(O(),1),pCe=ll("sessions.list");function Vre(){return(0,Oe.jsxs)(Ce,{gap:10,wrap:"nowrap",children:[(0,Oe.jsx)("div",{className:"brand-mark","aria-hidden":"true",children:(0,Oe.jsx)(Xc,{size:16,stroke:2})}),(0,Oe.jsxs)(F,{style:{minWidth:0},children:[(0,Oe.jsx)(ge,{fw:650,size:"sm",lh:1.2,children:"Sandbox"}),(0,Oe.jsx)(ge,{size:"xs",c:"dimmed",lh:1.2,children:"Windows development sandbox"})]})]})}function hCe(){let{setColorScheme:e}=wd(),t=Sd("light")==="dark",r=t?"Switch to light mode":"Switch to dark mode";return(0,Oe.jsx)(ht,{label:r,children:(0,Oe.jsx)(xt,{size:"lg","aria-label":r,onClick:()=>e(t?"light":"dark"),children:t?(0,Oe.jsx)(_z,{size:17,stroke:1.7}):(0,Oe.jsx)(_b,{size:17,stroke:1.7})})})}function gCe(){return(0,Oe.jsxs)(It,{onClick:()=>Il.open(),className:"search-button","aria-label":"Search pages and settings",children:[(0,Oe.jsx)(cn,{size:15,stroke:1.8}),(0,Oe.jsx)("span",{className:"search-button-text",children:"Search"}),(0,Oe.jsx)("span",{className:"kbd-hint",children:"Ctrl K"})]})}function vCe(){return(ga(pCe,{}).data?.sessions??[]).filter(t=>t.phase==="running").length}function xCe({section:e,active:t,count:r,onPick:n}){let o=lC[e.label]??Xc,i=e.view;return(0,Oe.jsxs)("a",{href:Io(i),className:"nav-item","data-active":t||void 0,"aria-current":t?"page":void 0,onClick:a=>{a.preventDefault(),n(),$r(Io(i))},children:[(0,Oe.jsx)(o,{size:17,stroke:1.7,className:"nav-item-icon"}),(0,Oe.jsx)("span",{className:"nav-item-label",children:e.label}),r!==void 0&&r>0&&(0,Oe.jsx)("span",{className:"nav-count","aria-label":r+" running",children:r})]})}function bCe({active:e,onPick:t}){let r=vCe(),n=s=>!!s.view&&(s.view!=="access"||wY()),o=cs.filter(s=>s.view&&!s.children?.length).filter(n),i=cs.filter(s=>s.children?.length),a=s=>(0,Oe.jsx)(xCe,{section:s,active:s.view===e,count:s.view==="sessions"?r:void 0,onPick:t},s.label);return(0,Oe.jsx)("nav",{"aria-label":"Pages",children:(0,Oe.jsxs)(Ne,{gap:2,children:[o.map(a),i.map(s=>{let l=s.children??[],c=l.filter(u=>!u.view&&u.elsewhere),d=l.filter(n);return d.length?(0,Oe.jsxs)(F,{className:"nav-group",role:"group","aria-label":s.label,children:[(0,Oe.jsx)("div",{className:"nav-group-label",children:s.label}),d.map(a),c.map(u=>(0,Oe.jsx)(ht,{label:u.elsewhere,position:"right",maw:260,children:(0,Oe.jsx)(ge,{className:"nav-elsewhere",size:"xs",c:"dimmed",children:"More in the terminal menu"})},u.label))]},s.label):null})]})})}function NF({active:e,bare:t=!1,children:r}){let[n,{toggle:o,close:i}]=G2(!1);return(0,Oe.jsxs)(Fr,{header:{height:{base:56,sm:0}},navbar:{width:248,breakpoint:"sm",collapsed:{mobile:!n}},padding:0,children:[(0,Oe.jsx)(Fr.Header,{className:"app-header",hiddenFrom:"sm",children:(0,Oe.jsxs)(Ce,{h:"100%",px:"md",gap:"sm",justify:"space-between",wrap:"nowrap",children:[(0,Oe.jsxs)(Ce,{gap:"sm",wrap:"nowrap",children:[(0,Oe.jsx)(hv,{opened:n,onClick:o,size:"sm","aria-label":"Open navigation"}),(0,Oe.jsx)(Vre,{})]}),(0,Oe.jsx)(xt,{size:"lg","aria-label":"Search",onClick:()=>Il.open(),children:(0,Oe.jsx)(cn,{size:18})})]})}),(0,Oe.jsx)(Fr.Navbar,{className:"app-navbar","aria-label":"Main",children:(0,Oe.jsxs)(F,{className:"app-navbar-sticky",children:[(0,Oe.jsx)(Fr.Section,{px:"md",pt:"md",pb:"sm",visibleFrom:"sm",children:(0,Oe.jsx)(Vre,{})}),(0,Oe.jsx)(Fr.Section,{px:"sm",pt:{base:"sm",sm:0},pb:"xs",children:(0,Oe.jsx)(Ure,{})}),(0,Oe.jsx)(Fr.Section,{px:"sm",pb:"xs",visibleFrom:"sm",children:(0,Oe.jsx)(gCe,{})}),(0,Oe.jsx)(Fr.Section,{grow:!0,component:Nr,px:"sm",pb:"md",children:(0,Oe.jsx)(bCe,{active:e,onPick:i})}),(0,Oe.jsx)(Fr.Section,{className:"app-navbar-footer",children:(0,Oe.jsxs)(Ce,{justify:"space-between",wrap:"nowrap",gap:"xs",children:[(0,Oe.jsxs)(Ce,{gap:8,wrap:"nowrap",style:{minWidth:0},children:[(0,Oe.jsx)("span",{className:"status-dot",style:{"--dot":"var(--mantine-color-green-6)"}}),(0,Oe.jsx)(ge,{size:"xs",c:"dimmed",truncate:!0,children:SY()})]}),(0,Oe.jsx)(hCe,{})]})})]})}),(0,Oe.jsx)(Fr.Main,{className:"app-main",style:t?{display:"flex",height:"100dvh",paddingBottom:0}:void 0,children:t?r:(0,Oe.jsx)("div",{className:"app-content",children:r})}),(0,Oe.jsx)(jre,{})]})}var ld=b(O(),1);function yCe(e){let t=/^#k=([0-9a-f]{64})$/.exec(e);return t?t[1]:null}function _Ce(e){let t=/^#w=([0-9a-f]{64})$/.exec(e);return t?t[1]:null}async function Hre(){let e=yCe(location.hash),t=_Ce(location.hash);if(e||t){history.replaceState(null,"",location.pathname+location.search);try{e?await fh.login(e):t&&await fh.loginOnce(t)}catch{return"out"}}try{return IY((await fh.me()).access),"in"}catch{return"out"}}function Wre(){let[e,t]=(0,l2.useState)("checking"),r=RY();return(0,l2.useEffect)(()=>{Hre().then(t)},[]),e==="checking"?(0,ld.jsx)(nu,{h:"100dvh",children:(0,ld.jsx)(ho,{})}):e==="out"?(0,ld.jsx)(DY,{onSignedIn:()=>{Hre().then(t)}}):r.page==="terminal"?(0,ld.jsx)(NF,{active:"sessions",bare:!0,children:(0,ld.jsx)(dre,{id:r.id})}):(0,ld.jsx)(NF,{active:r.view,children:(0,ld.jsx)(Sre,{view:r.view,params:r.params})})}var Zre=[500,1e3,2e3,4e3,8e3],c2=class{constructor(){Ft(this,"socket",null);Ft(this,"attempt",0);Ft(this,"next",1);Ft(this,"queue",[]);Ft(this,"calls",new Map);Ft(this,"subscriptions",new Map);Ft(this,"shared",new Map);Ft(this,"listeners",new Set);Ft(this,"hidden",!1)}setHidden(t){if(t!==this.hidden){if(this.hidden=t,t){if(this.socket?.readyState===WebSocket.OPEN)for(let r of this.subscriptions.keys())this.send({t:"unsubscribe",id:r});return}if(this.socket?.readyState===WebSocket.OPEN)for(let[r,n]of this.subscriptions)this.send({t:"subscribe",id:r,query:n.query,input:n.input});else this.subscriptions.size&&this.connect()}}resume(){this.hidden=!1,this.connect()}release(){let t=this.socket;this.socket=null,t?.close(1e3),this.listeners.forEach(r=>r(!1))}onConnection(t){return this.listeners.add(t),()=>this.listeners.delete(t)}connect(){if(this.socket)return this.socket;let t=location.protocol==="https:"?"wss:":"ws:",r=new WebSocket(t+"//"+location.host+"/api/rpc");return this.socket=r,r.onopen=()=>{if(this.attempt=0,this.listeners.forEach(n=>n(!0)),!this.hidden)for(let[n,o]of this.subscriptions)this.send({t:"subscribe",id:n,query:o.query,input:o.input});for(let n of this.queue.splice(0))r.send(n)},r.onmessage=n=>{if(typeof n.data!="string")return;let o;try{o=JSON.parse(n.data)}catch{return}let i=SQ.safeParse(o);i.success&&this.receive(i.data)},r.onclose=n=>{if(this.socket!==r)return;this.socket=null,this.listeners.forEach(i=>i(!1));for(let i of this.calls.values())i.reject(new Error("The connection to the sandbox web server dropped."));if(this.calls.clear(),n.code===4e3||n.code===4001)return;let o=Zre[Math.min(this.attempt++,Zre.length-1)];window.setTimeout(()=>this.connect(),o)},r}send(t){let r=JSON.stringify(t),n=this.connect();n.readyState===WebSocket.OPEN?n.send(r):this.queue.push(r)}async receive(t){let r=this.subscriptions.get(t.id);if(r){t.t==="data"&&r.data(t.output),t.t==="error"&&r.error(YO(t.error));return}let n=this.calls.get(t.id);if(n)switch(t.t){case"progress":n.handlers.progress?.(t.text);return;case"log":n.handlers.log?.(t.text,t.tone);return;case"ask":{let o=await n.handlers.ask(t.question);this.send({t:"answer",id:t.id,value:o});return}case"result":this.calls.delete(t.id),n.resolve(t.output);return;case"error":this.calls.delete(t.id),n.reject(YO(t.error));return}}call(t,r,n){let o="c"+this.next++;return new Promise((i,a)=>{this.calls.set(o,{handlers:n,resolve:i,reject:a}),this.send({t:"call",id:o,op:t,input:r})})}subscribe(t,r,n,o){let i=t+"\0"+JSON.stringify(r??null),a=this.shared.get(i);if(a)a.last&&n(a.last.output);else{let c={id:"s"+this.next++,listeners:new Set,last:void 0};if(a=c,this.shared.set(i,c),this.subscriptions.set(c.id,{query:t,input:r,data:d=>{c.last={output:d};for(let u of[...c.listeners])u.data(d)},error:d=>{c.last=void 0;for(let u of[...c.listeners])u.error(d)}}),!this.hidden){let d=this.connect();d.readyState===WebSocket.OPEN&&d.send(JSON.stringify({t:"subscribe",id:c.id,query:t,input:r}))}}let s={data:n,error:o},l=a;return l.listeners.add(s),()=>{l.listeners.delete(s),!l.listeners.size&&(this.shared.delete(i),this.subscriptions.delete(l.id),this.socket?.readyState===WebSocket.OPEN&&this.send({t:"unsubscribe",id:l.id}))}}};var ICe=["#e7e9ee","#c5c9d3","#9ba1ae","#6d7484","#4b5161","#2f333d","#21242c","#191b22","#13151a","#0d0f13"],Gre={primaryColor:"indigo",primaryShade:{light:6,dark:5},colors:{dark:ICe},fontFamily:'"Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif',fontFamilyMonospace:'"Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, monospace',fontSizes:{xs:"0.75rem",sm:"0.8125rem",md:"0.875rem",lg:"1rem",xl:"1.125rem"},lineHeights:{xs:"1.45",sm:"1.5",md:"1.55",lg:"1.55",xl:"1.5"},spacing:{xs:"0.5rem",sm:"0.75rem",md:"1rem",lg:"1.5rem",xl:"2rem"},headings:{fontFamily:'"Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif',fontWeight:"650",sizes:{h1:{fontSize:"1.5rem",lineHeight:"1.25"},h2:{fontSize:"1.125rem",lineHeight:"1.35"},h3:{fontSize:"0.9375rem",lineHeight:"1.4"}}},radius:{xs:"4px",sm:"6px",md:"8px",lg:"10px",xl:"14px"},defaultRadius:"md",cursorType:"pointer",focusRing:"auto",respectReducedMotion:!0,components:{Alert:Cn.extend({defaultProps:{radius:"md",variant:"light"}}),Card:wr.extend({defaultProps:{withBorder:!0,radius:"lg",padding:"md",shadow:"none"}}),Paper:ia.extend({defaultProps:{radius:"lg"}}),Button:lt.extend({defaultProps:{radius:"md",size:"sm"}}),ActionIcon:xt.extend({defaultProps:{variant:"subtle",color:"gray",radius:"md"}}),Badge:Ii.extend({defaultProps:{radius:"xl",variant:"light",tt:"none",fw:600}}),Tooltip:ht.extend({defaultProps:{withArrow:!0,openDelay:300,multiline:!0,maw:320}}),Modal:vo.extend({defaultProps:{radius:"lg",centered:!0,padding:"lg",overlayProps:{blur:2,backgroundOpacity:.4},styles:{title:{fontWeight:650,fontSize:"var(--mantine-font-size-lg)"}}}}),Menu:Jr.extend({defaultProps:{radius:"md",shadow:"md",withinPortal:!0}}),NavLink:mc.extend({defaultProps:{variant:"light"}}),Notification:au.extend({defaultProps:{radius:"md",withBorder:!0}}),SegmentedControl:du.extend({defaultProps:{radius:"md"}}),Select:Kn.extend({defaultProps:{allowDeselect:!1,checkIconPosition:"right"}}),Switch:qa.extend({defaultProps:{size:"sm"}}),TextInput:Rt.extend({defaultProps:{spellCheck:!1}})}};var cd=b(O(),1),wCe=new kT({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}}),d2=new c2;document.addEventListener("visibilitychange",()=>d2.setHidden(document.hidden));window.addEventListener("pagehide",()=>d2.release());window.addEventListener("pageshow",e=>{e.persisted&&d2.resume()});var qre=document.getElementById("root");qre&&(0,Kre.createRoot)(qre).render((0,cd.jsx)(Hy,{theme:Gre,defaultColorScheme:"auto",children:(0,cd.jsx)(sT,{client:wCe,children:(0,cd.jsx)(OY,{client:d2,children:(0,cd.jsxs)(QR,{children:[(0,cd.jsx)(ca,{position:"bottom-right",limit:4}),(0,cd.jsx)(Wre,{})]})})})}));