@telepath-computer/television 0.1.124 → 0.1.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs
CHANGED
|
@@ -38070,7 +38070,7 @@ var LAYOUT_FULL_WIDTH_UNITS = 4;
|
|
|
38070
38070
|
var LAYOUT_FULL_HEIGHT_UNITS = 6;
|
|
38071
38071
|
var DEFAULT_LAYOUT_CARD_WIDTH = "auto";
|
|
38072
38072
|
var DEFAULT_LAYOUT_CARD_HEIGHT = "auto";
|
|
38073
|
-
var DEFAULT_LAYOUT_UNIT =
|
|
38073
|
+
var DEFAULT_LAYOUT_UNIT = 128;
|
|
38074
38074
|
var CARD_GAP = 16;
|
|
38075
38075
|
var CARD_WIDTH = DEFAULT_LAYOUT_UNIT * LAYOUT_FULL_WIDTH_UNITS + CARD_GAP * (LAYOUT_FULL_WIDTH_UNITS - 1);
|
|
38076
38076
|
var CARD_HEIGHT = DEFAULT_LAYOUT_UNIT * LAYOUT_FULL_HEIGHT_UNITS + CARD_GAP * (LAYOUT_FULL_HEIGHT_UNITS - 1);
|
|
@@ -55384,8 +55384,8 @@ function resolveVercelSkillsInstallerBin() {
|
|
|
55384
55384
|
return localRequire.resolve("skills/bin/cli.mjs");
|
|
55385
55385
|
}
|
|
55386
55386
|
function readCLIVersion() {
|
|
55387
|
-
if ("0.1.
|
|
55388
|
-
return "0.1.
|
|
55387
|
+
if ("0.1.125".length > 0) {
|
|
55388
|
+
return "0.1.125";
|
|
55389
55389
|
}
|
|
55390
55390
|
const devPackageJsonPath = import_node_path11.default.join(getDevPackageDir(), "package.json");
|
|
55391
55391
|
if (!(0, import_node_fs8.existsSync)(devPackageJsonPath)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Kw=Object.defineProperty;var rp=n=>{throw TypeError(n)};var Jw=(n,t,e)=>t in n?Kw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var g=(n,t,e)=>Jw(n,typeof t!="symbol"?t+"":t,e),gc=(n,t,e)=>t.has(n)||rp("Cannot "+e);var l=(n,t,e)=>(gc(n,t,"read from private field"),e?e.call(n):t.get(n)),w=(n,t,e)=>t.has(n)?rp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e),S=(n,t,e,r)=>(gc(n,t,"write to private field"),r?r.call(n,e):t.set(n,e),e),f=(n,t,e)=>(gc(n,t,"access private method"),e);var ip=(n,t,e,r)=>({set _(i){S(n,t,i,e)},get _(){return l(n,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function e(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=e(i);fetch(i.href,s)}})();var cr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qw(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),e}var sp=Object.prototype.toString,am=function(t){var e=sp.call(t),r=e==="[object Arguments]";return r||(r=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&sp.call(t.callee)==="[object Function]"),r},mc,op;function e0(){if(op)return mc;op=1;var n;if(!Object.keys){var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,r=am,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(v){var m=v.constructor;return m&&m.prototype===v},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if(typeof window>"u")return!1;for(var v in window)try{if(!u["$"+v]&&t.call(window,v)&&window[v]!==null&&typeof window[v]=="object")try{c(window[v])}catch{return!0}}catch{return!0}return!1}(),p=function(v){if(typeof window>"u"||!h)return c(v);try{return c(v)}catch{return!1}};n=function(m){var _=m!==null&&typeof m=="object",k=e.call(m)==="[object Function]",T=r(m),P=_&&e.call(m)==="[object String]",R=[];if(!_&&!k&&!T)throw new TypeError("Object.keys called on a non-object");var W=o&&k;if(P&&m.length>0&&!t.call(m,0))for(var N=0;N<m.length;++N)R.push(String(N));if(T&&m.length>0)for(var F=0;F<m.length;++F)R.push(String(F));else for(var Y in m)!(W&&Y==="prototype")&&t.call(m,Y)&&R.push(String(Y));if(s)for(var j=p(m),ae=0;ae<a.length;++ae)!(j&&a[ae]==="constructor")&&t.call(m,a[ae])&&R.push(a[ae]);return R}}return mc=n,mc}var t0=Array.prototype.slice,n0=am,ap=Object.keys,Aa=ap?function(t){return ap(t)}:e0(),lp=Object.keys;Aa.shim=function(){if(Object.keys){var t=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);t||(Object.keys=function(r){return n0(r)?lp(t0.call(r)):lp(r)})}else Object.keys=Aa;return Object.keys||Aa};var r0=Aa,$a=Object.defineProperty||!1;if($a)try{$a({},"a",{value:1})}catch{$a=!1}var Uo=$a,Sn=SyntaxError,X=TypeError,i0=Object.getOwnPropertyDescriptor,Ta=i0;if(Ta)try{Ta([],"length")}catch{Ta=null}var qi=Ta,cp=Uo,s0=Sn,Xr=X,up=qi,lm=function(t,e,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Xr("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new Xr("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Xr("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Xr("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Xr("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Xr("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,c=!!up&&up(t,e);if(cp)cp(t,e,{configurable:o===null&&c?c.configurable:!o,enumerable:i===null&&c?c.enumerable:!i,value:r,writable:s===null&&c?c.writable:!s});else if(a||!i&&!s&&!o)t[e]=r;else throw new s0("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},hu=Uo,cm=function(){return!!hu};cm.hasArrayLengthDefineBug=function(){if(!hu)return null;try{return hu([],"length",{value:1}).length!==1}catch{return!0}};var zl=cm,o0=r0,a0=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",l0=Object.prototype.toString,c0=Array.prototype.concat,hp=lm,u0=function(n){return typeof n=="function"&&l0.call(n)==="[object Function]"},um=zl(),h0=function(n,t,e,r){if(t in n){if(r===!0){if(n[t]===e)return}else if(!u0(r)||!r())return}um?hp(n,t,e,!0):hp(n,t,e)},hm=function(n,t){var e=arguments.length>2?arguments[2]:{},r=o0(t);a0&&(r=c0.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;i+=1)h0(n,r[i],t[r[i]],e[r[i]])};hm.supportsDescriptors=!!um;var Fr=hm,Ia={exports:{}};typeof self<"u"?Ia.exports=self:typeof window<"u"?Ia.exports=window:Ia.exports=Function("return this")();var dm=Ia.exports,d0=dm,pm=function(){return typeof cr!="object"||!cr||cr.Math!==Math||cr.Array!==Array?d0:cr},p0=Fr,f0=qi,g0=pm,m0=function(){var t=g0();if(p0.supportsDescriptors){var e=f0(t,"globalThis");(!e||e.configurable&&(e.enumerable||!e.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!0})}else(typeof globalThis!="object"||globalThis!==t)&&(t.globalThis=t);return t},v0=Fr,y0=dm,fm=pm,b0=m0,w0=fm(),gm=function(){return w0};v0(gm,{getPolyfill:fm,implementation:y0,shim:b0});var Ah=gm,_n=function(t){return!!t&&(typeof t=="function"||typeof t=="object")},$h=Object,mm=Error,S0=EvalError,_0=RangeError,Th=ReferenceError,k0=URIError,x0=Math.abs,E0=Math.floor,A0=Math.max,$0=Math.min,T0=Math.pow,I0=Math.round,Ih=Number.isNaN||function(t){return t!==t},C0=Ih,R0=function(t){return C0(t)||t===0?t:t<0?-1:1},Yi=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,e);if(a.value!==i||a.enumerable!==!0)return!1}return!0},dp=typeof Symbol<"u"&&Symbol,P0=Yi,Ch=function(){return typeof dp!="function"||typeof Symbol!="function"||typeof dp("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:P0()},vm=typeof Reflect<"u"&&Reflect.getPrototypeOf||null,D0=$h,ym=D0.getPrototypeOf||null,L0="Function.prototype.bind called on incompatible ",z0=Object.prototype.toString,O0=Math.max,M0="[object Function]",pp=function(t,e){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var s=0;s<e.length;s+=1)r[s+t.length]=e[s];return r},N0=function(t,e){for(var r=[],i=e,s=0;i<t.length;i+=1,s+=1)r[s]=t[i];return r},U0=function(n,t){for(var e="",r=0;r<n.length;r+=1)e+=n[r],r+1<n.length&&(e+=t);return e},F0=function(t){var e=this;if(typeof e!="function"||z0.apply(e)!==M0)throw new TypeError(L0+e);for(var r=N0(arguments,1),i,s=function(){if(this instanceof i){var h=e.apply(this,pp(r,arguments));return Object(h)===h?h:this}return e.apply(t,pp(r,arguments))},o=O0(0,e.length-r.length),a=[],c=0;c<o;c++)a[c]="$"+c;if(i=Function("binder","return function ("+U0(a,",")+"){ return binder.apply(this,arguments); }")(s),e.prototype){var u=function(){};u.prototype=e.prototype,i.prototype=new u,u.prototype=null}return i},H0=F0,Fo=Function.prototype.bind||H0,Rh=Function.prototype.call,Ph=Function.prototype.apply,W0=typeof Reflect<"u"&&Reflect&&Reflect.apply,Z0=Fo,V0=Ph,B0=Rh,j0=W0,bm=j0||Z0.call(B0,V0),G0=Fo,q0=X,Y0=Rh,X0=bm,Ol=function(t){if(t.length<1||typeof t[0]!="function")throw new q0("a function is required");return X0(G0,Y0,t)},K0=Ol,fp=qi,wm;try{wm=[].__proto__===Array.prototype}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var vc=!!wm&&fp&&fp(Object.prototype,"__proto__"),Sm=Object,gp=Sm.getPrototypeOf,J0=vc&&typeof vc.get=="function"?K0([vc.get]):typeof gp=="function"?function(t){return gp(t==null?t:Sm(t))}:!1,mp=vm,vp=ym,yp=J0,_m=mp?function(t){return mp(t)}:vp?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return vp(t)}:yp?function(t){return yp(t)}:null,Q0=Function.prototype.call,eS=Object.prototype.hasOwnProperty,tS=Fo,kn=tS.call(Q0,eS),q,nS=$h,rS=mm,iS=S0,sS=_0,oS=Th,Wi=Sn,mi=X,aS=k0,lS=x0,cS=E0,uS=A0,hS=$0,dS=T0,pS=I0,fS=R0,km=Function,yc=function(n){try{return km('"use strict"; return ('+n+").constructor;")()}catch{}},Os=qi,gS=Uo,bc=function(){throw new mi},mS=Os?function(){try{return arguments.callee,bc}catch{try{return Os(arguments,"callee").get}catch{return bc}}}():bc,Kr=Ch(),Ie=_m,vS=ym,yS=vm,xm=Ph,Ho=Rh,ni={},bS=typeof Uint8Array>"u"||!Ie?q:Ie(Uint8Array),Pr={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?q:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?q:ArrayBuffer,"%ArrayIteratorPrototype%":Kr&&Ie?Ie([][Symbol.iterator]()):q,"%AsyncFromSyncIteratorPrototype%":q,"%AsyncFunction%":ni,"%AsyncGenerator%":ni,"%AsyncGeneratorFunction%":ni,"%AsyncIteratorPrototype%":ni,"%Atomics%":typeof Atomics>"u"?q:Atomics,"%BigInt%":typeof BigInt>"u"?q:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?q:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?q:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?q:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":rS,"%eval%":eval,"%EvalError%":iS,"%Float16Array%":typeof Float16Array>"u"?q:Float16Array,"%Float32Array%":typeof Float32Array>"u"?q:Float32Array,"%Float64Array%":typeof Float64Array>"u"?q:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?q:FinalizationRegistry,"%Function%":km,"%GeneratorFunction%":ni,"%Int8Array%":typeof Int8Array>"u"?q:Int8Array,"%Int16Array%":typeof Int16Array>"u"?q:Int16Array,"%Int32Array%":typeof Int32Array>"u"?q:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Kr&&Ie?Ie(Ie([][Symbol.iterator]())):q,"%JSON%":typeof JSON=="object"?JSON:q,"%Map%":typeof Map>"u"?q:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Kr||!Ie?q:Ie(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":nS,"%Object.getOwnPropertyDescriptor%":Os,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?q:Promise,"%Proxy%":typeof Proxy>"u"?q:Proxy,"%RangeError%":sS,"%ReferenceError%":oS,"%Reflect%":typeof Reflect>"u"?q:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?q:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Kr||!Ie?q:Ie(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?q:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Kr&&Ie?Ie(""[Symbol.iterator]()):q,"%Symbol%":Kr?Symbol:q,"%SyntaxError%":Wi,"%ThrowTypeError%":mS,"%TypedArray%":bS,"%TypeError%":mi,"%Uint8Array%":typeof Uint8Array>"u"?q:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?q:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?q:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?q:Uint32Array,"%URIError%":aS,"%WeakMap%":typeof WeakMap>"u"?q:WeakMap,"%WeakRef%":typeof WeakRef>"u"?q:WeakRef,"%WeakSet%":typeof WeakSet>"u"?q:WeakSet,"%Function.prototype.call%":Ho,"%Function.prototype.apply%":xm,"%Object.defineProperty%":gS,"%Object.getPrototypeOf%":vS,"%Math.abs%":lS,"%Math.floor%":cS,"%Math.max%":uS,"%Math.min%":hS,"%Math.pow%":dS,"%Math.round%":pS,"%Math.sign%":fS,"%Reflect.getPrototypeOf%":yS};if(Ie)try{null.error}catch(n){var wS=Ie(Ie(n));Pr["%Error.prototype%"]=wS}var SS=function n(t){var e;if(t==="%AsyncFunction%")e=yc("async function () {}");else if(t==="%GeneratorFunction%")e=yc("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=yc("async function* () {}");else if(t==="%AsyncGenerator%"){var r=n("%AsyncGeneratorFunction%");r&&(e=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=n("%AsyncGenerator%");i&&Ie&&(e=Ie(i.prototype))}return Pr[t]=e,e},bp={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Wo=Fo,Qa=kn,_S=Wo.call(Ho,Array.prototype.concat),kS=Wo.call(xm,Array.prototype.splice),wp=Wo.call(Ho,String.prototype.replace),el=Wo.call(Ho,String.prototype.slice),xS=Wo.call(Ho,RegExp.prototype.exec),ES=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,AS=/\\(\\)?/g,$S=function(t){var e=el(t,0,1),r=el(t,-1);if(e==="%"&&r!=="%")throw new Wi("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&e!=="%")throw new Wi("invalid intrinsic syntax, expected opening `%`");var i=[];return wp(t,ES,function(s,o,a,c){i[i.length]=a?wp(c,AS,"$1"):o||s}),i},TS=function(t,e){var r=t,i;if(Qa(bp,r)&&(i=bp[r],r="%"+i[0]+"%"),Qa(Pr,r)){var s=Pr[r];if(s===ni&&(s=SS(r)),typeof s>"u"&&!e)throw new mi("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new Wi("intrinsic "+t+" does not exist!")},yt=function(t,e){if(typeof t!="string"||t.length===0)throw new mi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new mi('"allowMissing" argument must be a boolean');if(xS(/^%?[^%]*%?$/,t)===null)throw new Wi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=$S(t),i=r.length>0?r[0]:"",s=TS("%"+i+"%",e),o=s.name,a=s.value,c=!1,u=s.alias;u&&(i=u[0],kS(r,_S([0,1],u)));for(var h=1,p=!0;h<r.length;h+=1){var v=r[h],m=el(v,0,1),_=el(v,-1);if((m==='"'||m==="'"||m==="`"||_==='"'||_==="'"||_==="`")&&m!==_)throw new Wi("property names with quotes must have matching quotes");if((v==="constructor"||!p)&&(c=!0),i+="."+v,o="%"+i+"%",Qa(Pr,o))a=Pr[o];else if(a!=null){if(!(v in a)){if(!e)throw new mi("base intrinsic for "+t+" exists, but the property is not available.");return}if(Os&&h+1>=r.length){var k=Os(a,v);p=!!k,p&&"get"in k&&!("originalValue"in k.get)?a=k.get:a=a[v]}else p=Qa(a,v),a=a[v];p&&!c&&(Pr[o]=a)}}return a},wc,Sp;function Yn(){if(Sp)return wc;Sp=1;var n=yt,t=Ol,e=t([n("%String.prototype.indexOf%")]);return wc=function(i,s){var o=n(i,!!s);return typeof o=="function"&&e(i,".prototype.")>-1?t([o]):o},wc}var Sc,_p;function Dh(){if(_p)return Sc;_p=1;var n=yt,t=n("%Array%"),e=!t.isArray&&Yn()("Object.prototype.toString");return Sc=t.isArray||function(i){return e(i)==="[object Array]"},Sc}var IS=zl,kp=Uo,Em=IS.hasArrayLengthDefineBug(),CS=Em&&Dh(),RS=Yn(),PS=RS("Object.prototype.propertyIsEnumerable"),Lh=function(t,e,r,i,s,o){if(!kp){if(!t(o)||!o["[[Configurable]]"]||!o["[[Writable]]"]||s in i&&PS(i,s)!==!!o["[[Enumerable]]"])return!1;var a=o["[[Value]]"];return i[s]=a,e(i[s],a)}return Em&&s==="length"&&"[[Value]]"in o&&CS(i)&&i.length!==o["[[Value]]"]?(i.length=o["[[Value]]"],i.length===o["[[Value]]"]):(kp(i,s,r(o)),!0)},DS=X,cs=kn,LS={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0},Xi=function(t){if(!t||typeof t!="object")return!1;for(var e in t)if(cs(t,e)&&!LS[e])return!1;var r=cs(t,"[[Value]]")||cs(t,"[[Writable]]"),i=cs(t,"[[Get]]")||cs(t,"[[Set]]");if(r&&i)throw new DS("Property Descriptors may not be both accessor and data descriptors");return!0},Am=function(t){if(typeof t>"u")return t;var e={};return"[[Value]]"in t&&(e.value=t["[[Value]]"]),"[[Writable]]"in t&&(e.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(e.get=t["[[Get]]"]),"[[Set]]"in t&&(e.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(e.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(e.configurable=!!t["[[Configurable]]"]),e},zS=X,OS=Xi,MS=Am,$m=function(t){if(typeof t<"u"&&!OS(t))throw new zS("Assertion failed: `Desc` must be a Property Descriptor");return MS(t)},NS=X,xp=kn,US=Xi,Tm=function(t){if(typeof t>"u")return!1;if(!US(t))throw new NS("Assertion failed: `Desc` must be a Property Descriptor");return!(!xp(t,"[[Value]]")&&!xp(t,"[[Writable]]"))},Ki=function(t){return typeof t=="string"||typeof t=="symbol"},Ep=Ih,Im=function(t,e){return t===e?t===0?1/t===1/e:!0:Ep(t)&&Ep(e)},Ap=X,FS=_n,HS=Lh,WS=$m,ZS=Tm,VS=Ki,BS=Im,zh=function(t,e,r){if(!FS(t))throw new Ap("Assertion failed: Type(O) is not Object");if(!VS(e))throw new Ap("Assertion failed: P is not a Property Key");var i={"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0};return HS(ZS,BS,WS,t,e,i)},Cm=Function.prototype.toString,di=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,du,Ca;if(typeof di=="function"&&typeof Object.defineProperty=="function")try{du=Object.defineProperty({},"length",{get:function(){throw Ca}}),Ca={},di(function(){throw 42},null,du)}catch(n){n!==Ca&&(di=null)}else di=null;var jS=/^\s*class\b/,pu=function(t){try{var e=Cm.call(t);return jS.test(e)}catch{return!1}},_c=function(t){try{return pu(t)?!1:(Cm.call(t),!0)}catch{return!1}},Ra=Object.prototype.toString,GS="[object Object]",qS="[object Function]",YS="[object GeneratorFunction]",XS="[object HTMLAllCollection]",KS="[object HTML document.all class]",JS="[object HTMLCollection]",QS=typeof Symbol=="function"&&!!Symbol.toStringTag,e_=!(0 in[,]),fu=function(){return!1};if(typeof document=="object"){var t_=document.all;Ra.call(t_)===Ra.call(document.all)&&(fu=function(t){if((e_||!t)&&(typeof t>"u"||typeof t=="object"))try{var e=Ra.call(t);return(e===XS||e===KS||e===JS||e===GS)&&t("")==null}catch{}return!1})}var Rm=di?function(t){if(fu(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{di(t,null,du)}catch(e){if(e!==Ca)return!1}return!pu(t)&&_c(t)}:function(t){if(fu(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(QS)return _c(t);if(pu(t))return!1;var e=Ra.call(t);return e!==qS&&e!==YS&&!/^\[object HTML/.test(e)?!1:_c(t)},n_=Rm,r_=function(t){return!!t},Dt=kn,la=X,i_=_n,$p=n_,kc=r_,s_=function(t){if(!i_(t))throw new la("ToPropertyDescriptor requires an object");var e={};if(Dt(t,"enumerable")&&(e["[[Enumerable]]"]=kc(t.enumerable)),Dt(t,"configurable")&&(e["[[Configurable]]"]=kc(t.configurable)),Dt(t,"value")&&(e["[[Value]]"]=t.value),Dt(t,"writable")&&(e["[[Writable]]"]=kc(t.writable)),Dt(t,"get")){var r=t.get;if(typeof r<"u"&&!$p(r))throw new la("getter must be a function");e["[[Get]]"]=r}if(Dt(t,"set")){var i=t.set;if(typeof i<"u"&&!$p(i))throw new la("setter must be a function");e["[[Set]]"]=i}if((Dt(e,"[[Get]]")||Dt(e,"[[Set]]"))&&(Dt(e,"[[Value]]")||Dt(e,"[[Writable]]")))throw new la("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e},xc=X,o_=_n,Tp=Xi,a_=Lh,l_=$m,c_=Tm,u_=Ki,h_=Im,d_=s_,p_=function(t,e,r){if(!o_(t))throw new xc("Assertion failed: Type(O) is not Object");if(!u_(e))throw new xc("Assertion failed: P is not a Property Key");var i=Tp(r)?r:d_(r);if(!Tp(i))throw new xc("Assertion failed: Desc is not a valid Property Descriptor");return a_(c_,h_,l_,t,e,i)},Ip=X,f_=_n,g_=p_,m_=Ki,v_=function(t,e,r){if(!f_(t))throw new Ip("Assertion failed: Type(O) is not Object");if(!m_(e))throw new Ip("Assertion failed: P is not a Property Key");var i={"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0};return g_(t,e,i)},y_=typeof Reflect<"u"&&Reflect.setPrototypeOf||null,b_=$h,w_=b_.setPrototypeOf||null,S_=Ol,Cp=qi,__=X,Pm={};try{Pm.__proto__=null}catch(n){if(!n||typeof n!="object"||!("code"in n)||n.code!=="ERR_PROTO_ACCESS")throw n}var k_=!("toString"in Pm),Ec=Cp&&Cp(Object.prototype,"__proto__"),x_=k_&&(!!Ec&&typeof Ec.set=="function"&&S_([Ec.set])||function(t,e){if(t==null)throw new __("set Object.prototype.__proto__ called on null or undefined");return t.__proto__=e,e}),Rp=y_,E_=w_,Pp=x_,A_=X,$_=Rp?function(t,e){if(Rp(t,e))return t;throw new A_("Reflect.setPrototypeOf: failed to set [[Prototype]]")}:E_||(Pp?function(t,e){return Pp(t,e),t}:null),Dp=X,T_=_n,Lp=_m,I_=function(t){if(!T_(t))throw new Dp("Assertion failed: O must be an Object");if(!Lp)throw new Dp("This environment does not support fetching prototypes.");return Lp(t)},C_=X,R_=$_,P_=_n,D_=I_,L_=function(t,e){if(e!==null&&!P_(e))throw new C_("Assertion failed: V must be Object or Null");try{R_(t,e)}catch{return!1}return D_(t)===e},Ac=zh,zp=v_,Dm=L_,z_=zl(),Oh=mm;function Zo(n,t,e){var r=new Oh(e);return Dm(r,Pa),delete r.constructor,zp(r,"error",n),zp(r,"suppressed",t),r}z_&&Object.defineProperty(Zo,"prototype",{writable:!1});var Pa=Zo.prototype;if(!Ac(Pa,"constructor",Zo)||!Ac(Pa,"message","")||!Ac(Pa,"name","SuppressedError"))throw new Oh("unable to install SuppressedError.prototype properties; please report this!");Dm(Zo.prototype,Oh.prototype);var O_=Zo,M_=O_,Lm=function(){return typeof SuppressedError=="function"?SuppressedError:M_},N_=Fr,Op=Ah(),U_=Lm,F_=function(){var t=U_();return N_(Op,{SuppressedError:t},{SuppressedError:function(){return Op.SuppressedError!==t}}),t};F_();var H_=X,W_=Xi,Z_=Am,V_=function(t){if(typeof t<"u"&&!W_(t))throw new H_("Assertion failed: `Desc` must be a Property Descriptor");return Z_(t)},B_=X,Mp=kn,j_=Xi,G_=function(t){if(typeof t>"u")return!1;if(!j_(t))throw new B_("Assertion failed: `Desc` must be a Property Descriptor");return!(!Mp(t,"[[Value]]")&&!Mp(t,"[[Writable]]"))},Np=Ih,q_=function(t,e){return t===e?t===0?1/t===1/e:!0:Np(t)&&Np(e)},Ji=Rm,Y_=function(t){return!!t},Lt=kn,ca=X,X_=_n,Up=Ji,$c=Y_,K_=function(t){if(!X_(t))throw new ca("ToPropertyDescriptor requires an object");var e={};if(Lt(t,"enumerable")&&(e["[[Enumerable]]"]=$c(t.enumerable)),Lt(t,"configurable")&&(e["[[Configurable]]"]=$c(t.configurable)),Lt(t,"value")&&(e["[[Value]]"]=t.value),Lt(t,"writable")&&(e["[[Writable]]"]=$c(t.writable)),Lt(t,"get")){var r=t.get;if(typeof r<"u"&&!Up(r))throw new ca("getter must be a function");e["[[Get]]"]=r}if(Lt(t,"set")){var i=t.set;if(typeof i<"u"&&!Up(i))throw new ca("setter must be a function");e["[[Set]]"]=i}if((Lt(e,"[[Get]]")||Lt(e,"[[Set]]"))&&(Lt(e,"[[Value]]")||Lt(e,"[[Writable]]")))throw new ca("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e},Tc=X,J_=_n,Fp=Xi,Q_=Lh,ek=V_,tk=G_,nk=Ki,rk=q_,ik=K_,Vo=function(t,e,r){if(!J_(t))throw new Tc("Assertion failed: Type(O) is not Object");if(!nk(e))throw new Tc("Assertion failed: P is not a Property Key");var i=Fp(r)?r:ik(r);if(!Fp(i))throw new Tc("Assertion failed: Desc is not a valid Property Descriptor");return Q_(tk,rk,ek,t,e,i)},sk=Yi(),ok=sk?Symbol.dispose||Symbol("Symbol.dispose"):null,ak=Yi,lk=ok,Mh=function(){return ak()&&Symbol.dispose||lk},ck=Ch,uk=Vo,hk=Mh,dk=function(){var t=hk();return ck()&&uk(Symbol,"dispose",{"[[Configurable]]":!1,"[[Enumerable]]":!1,"[[Writable]]":!1,"[[Value]]":t}),t},pk=Yi(),fk=pk?Symbol.asyncDispose||Symbol("Symbol.asyncDispose"):null,gk=Yi,mk=fk,Nh=function(){return gk()&&Symbol.asyncDispose||mk},vk=Ch,yk=Vo,bk=Nh,wk=function(){var t=bk();return vk()&&yk(Symbol,"asyncDispose",{"[[Configurable]]":!1,"[[Enumerable]]":!1,"[[Writable]]":!1,"[[Value]]":t}),t},Sk=Dh(),_k=yt,kk=Yn(),xk=X,Ek=Sk,Ak=_k("%Reflect.apply%",!0)||kk("Function.prototype.apply"),Ml=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!Ek(r))throw new xk("Assertion failed: optional `argumentsList`, if provided, must be a List");return Ak(t,e,r)};const $k={},Tk=Object.freeze(Object.defineProperty({__proto__:null,default:$k},Symbol.toStringTag,{value:"Module"})),Ik=Qw(Tk);var Uh=typeof Map=="function"&&Map.prototype,Ic=Object.getOwnPropertyDescriptor&&Uh?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,tl=Uh&&Ic&&typeof Ic.get=="function"?Ic.get:null,Hp=Uh&&Map.prototype.forEach,Fh=typeof Set=="function"&&Set.prototype,Cc=Object.getOwnPropertyDescriptor&&Fh?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,nl=Fh&&Cc&&typeof Cc.get=="function"?Cc.get:null,Wp=Fh&&Set.prototype.forEach,Ck=typeof WeakMap=="function"&&WeakMap.prototype,Cs=Ck?WeakMap.prototype.has:null,Rk=typeof WeakSet=="function"&&WeakSet.prototype,Rs=Rk?WeakSet.prototype.has:null,Pk=typeof WeakRef=="function"&&WeakRef.prototype,Zp=Pk?WeakRef.prototype.deref:null,Dk=Boolean.prototype.valueOf,Lk=Object.prototype.toString,zk=Function.prototype.toString,Ok=String.prototype.match,Hh=String.prototype.slice,Hn=String.prototype.replace,Mk=String.prototype.toUpperCase,Vp=String.prototype.toLowerCase,zm=RegExp.prototype.test,Bp=Array.prototype.concat,Qt=Array.prototype.join,Nk=Array.prototype.slice,jp=Math.floor,gu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Rc=Object.getOwnPropertySymbols,mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ps=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Zi||!0)?Symbol.toStringTag:null,Om=Object.prototype.propertyIsEnumerable,Gp=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function qp(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||zm.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var r=n<0?-jp(-n):jp(n);if(r!==n){var i=String(r),s=Hh.call(t,i.length+1);return Hn.call(i,e,"$&_")+"."+Hn.call(Hn.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Hn.call(t,e,"$&_")}var vu=Ik,Yp=vu.custom,Xp=Um(Yp)?Yp:null,Mm={__proto__:null,double:'"',single:"'"},Uk={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},Qi=function n(t,e,r,i){var s=e||{};if(dn(s,"quoteStyle")&&!dn(Mm,s.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(dn(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=dn(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(dn(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(dn(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Hm(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return a?qp(t,c):c}if(typeof t=="bigint"){var u=String(t)+"n";return a?qp(t,u):u}var h=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=h&&h>0&&typeof t=="object")return yu(t)?"[Array]":"[Object]";var p=rx(s,r);if(typeof i>"u")i=[];else if(Fm(i,t)>=0)return"[Circular]";function v(Ct,xn,rc){if(xn&&(i=Nk.call(i),i.push(xn)),rc){var Qo={depth:s.depth};return dn(s,"quoteStyle")&&(Qo.quoteStyle=s.quoteStyle),n(Ct,Qo,r+1,i)}return n(Ct,s,r+1,i)}if(typeof t=="function"&&!Kp(t)){var m=qk(t),_=ua(t,v);return"[Function"+(m?": "+m:" (anonymous)")+"]"+(_.length>0?" { "+Qt.call(_,", ")+" }":"")}if(Um(t)){var k=Zi?Hn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):mu.call(t);return typeof t=="object"&&!Zi?us(k):k}if(ex(t)){for(var T="<"+Vp.call(String(t.nodeName)),P=t.attributes||[],R=0;R<P.length;R++)T+=" "+P[R].name+"="+Nm(Fk(P[R].value),"double",s);return T+=">",t.childNodes&&t.childNodes.length&&(T+="..."),T+="</"+Vp.call(String(t.nodeName))+">",T}if(yu(t)){if(t.length===0)return"[]";var W=ua(t,v);return p&&!nx(W)?"["+bu(W,p)+"]":"[ "+Qt.call(W,", ")+" ]"}if(Wk(t)){var N=ua(t,v);return!("cause"in Error.prototype)&&"cause"in t&&!Om.call(t,"cause")?"{ ["+String(t)+"] "+Qt.call(Bp.call("[cause]: "+v(t.cause),N),", ")+" }":N.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Qt.call(N,", ")+" }"}if(typeof t=="object"&&o){if(Xp&&typeof t[Xp]=="function"&&vu)return vu(t,{depth:h-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Yk(t)){var F=[];return Hp&&Hp.call(t,function(Ct,xn){F.push(v(xn,t,!0)+" => "+v(Ct,t))}),Jp("Map",tl.call(t),F,p)}if(Jk(t)){var Y=[];return Wp&&Wp.call(t,function(Ct){Y.push(v(Ct,t))}),Jp("Set",nl.call(t),Y,p)}if(Xk(t))return Pc("WeakMap");if(Qk(t))return Pc("WeakSet");if(Kk(t))return Pc("WeakRef");if(Vk(t))return us(v(Number(t)));if(jk(t))return us(v(gu.call(t)));if(Bk(t))return us(Dk.call(t));if(Zk(t))return us(v(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof cr<"u"&&t===cr)return"{ [object globalThis] }";if(!Hk(t)&&!Kp(t)){var j=ua(t,v),ae=Gp?Gp(t)===Object.prototype:t instanceof Object||t.constructor===Object,wt=t instanceof Object?"":"null prototype",Qn=!ae&&Ps&&Object(t)===t&&Ps in t?Hh.call(Xn(t),8,-1):wt?"Object":"",Re=ae||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",er=Re+(Qn||wt?"["+Qt.call(Bp.call([],Qn||[],wt||[]),": ")+"] ":"");return j.length===0?er+"{}":p?er+"{"+bu(j,p)+"}":er+"{ "+Qt.call(j,", ")+" }"}return String(t)};function Nm(n,t,e){var r=e.quoteStyle||t,i=Mm[r];return i+n+i}function Fk(n){return Hn.call(String(n),/"/g,""")}function Hr(n){return!Ps||!(typeof n=="object"&&(Ps in n||typeof n[Ps]<"u"))}function yu(n){return Xn(n)==="[object Array]"&&Hr(n)}function Hk(n){return Xn(n)==="[object Date]"&&Hr(n)}function Kp(n){return Xn(n)==="[object RegExp]"&&Hr(n)}function Wk(n){return Xn(n)==="[object Error]"&&Hr(n)}function Zk(n){return Xn(n)==="[object String]"&&Hr(n)}function Vk(n){return Xn(n)==="[object Number]"&&Hr(n)}function Bk(n){return Xn(n)==="[object Boolean]"&&Hr(n)}function Um(n){if(Zi)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!mu)return!1;try{return mu.call(n),!0}catch{}return!1}function jk(n){if(!n||typeof n!="object"||!gu)return!1;try{return gu.call(n),!0}catch{}return!1}var Gk=Object.prototype.hasOwnProperty||function(n){return n in this};function dn(n,t){return Gk.call(n,t)}function Xn(n){return Lk.call(n)}function qk(n){if(n.name)return n.name;var t=Ok.call(zk.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function Fm(n,t){if(n.indexOf)return n.indexOf(t);for(var e=0,r=n.length;e<r;e++)if(n[e]===t)return e;return-1}function Yk(n){if(!tl||!n||typeof n!="object")return!1;try{tl.call(n);try{nl.call(n)}catch{return!0}return n instanceof Map}catch{}return!1}function Xk(n){if(!Cs||!n||typeof n!="object")return!1;try{Cs.call(n,Cs);try{Rs.call(n,Rs)}catch{return!0}return n instanceof WeakMap}catch{}return!1}function Kk(n){if(!Zp||!n||typeof n!="object")return!1;try{return Zp.call(n),!0}catch{}return!1}function Jk(n){if(!nl||!n||typeof n!="object")return!1;try{nl.call(n);try{tl.call(n)}catch{return!0}return n instanceof Set}catch{}return!1}function Qk(n){if(!Rs||!n||typeof n!="object")return!1;try{Rs.call(n,Rs);try{Cs.call(n,Cs)}catch{return!0}return n instanceof WeakSet}catch{}return!1}function ex(n){return!n||typeof n!="object"?!1:typeof HTMLElement<"u"&&n instanceof HTMLElement?!0:typeof n.nodeName=="string"&&typeof n.getAttribute=="function"}function Hm(n,t){if(n.length>t.maxStringLength){var e=n.length-t.maxStringLength,r="... "+e+" more character"+(e>1?"s":"");return Hm(Hh.call(n,0,t.maxStringLength),t)+r}var i=Uk[t.quoteStyle||"single"];i.lastIndex=0;var s=Hn.call(Hn.call(n,i,"\\$1"),/[\x00-\x1f]/g,tx);return Nm(s,"single",t)}function tx(n){var t=n.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+Mk.call(t.toString(16))}function us(n){return"Object("+n+")"}function Pc(n){return n+" { ? }"}function Jp(n,t,e,r){var i=r?bu(e,r):Qt.call(e,", ");return n+" ("+t+") {"+i+"}"}function nx(n){for(var t=0;t<n.length;t++)if(Fm(n[t],`
|
|
2
2
|
`)>=0)return!1;return!0}function rx(n,t){var e;if(n.indent===" ")e=" ";else if(typeof n.indent=="number"&&n.indent>0)e=Qt.call(Array(n.indent+1)," ");else return null;return{base:e,prev:Qt.call(Array(t+1),e)}}function bu(n,t){if(n.length===0)return"";var e=`
|
|
3
3
|
`+t.prev+t.base;return e+Qt.call(n,","+e)+`
|
|
4
|
-
`+t.prev}function ua(n,t){var e=yu(n),r=[];if(e){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=dn(n,i)?t(n[i],n):""}var s=typeof Rc=="function"?Rc(n):[],o;if(Zi){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var c in n)dn(n,c)&&(e&&String(Number(c))===c&&c<n.length||Zi&&o["$"+c]instanceof Symbol||(zm.call(/[^\w$]/,c)?r.push(t(c,n)+": "+t(n[c],n)):r.push(c+": "+t(n[c],n))));if(typeof Rc=="function")for(var u=0;u<s.length;u++)Om.call(n,s[u])&&r.push("["+t(s[u])+"]: "+t(n[s[u]],n));return r}var ix=Qi,sx=X,Nl=function(n,t,e){for(var r=n,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,e||(i.next=n.next,n.next=i),i},ox=function(n,t){if(n){var e=Nl(n,t);return e&&e.value}},ax=function(n,t,e){var r=Nl(n,t);r?r.value=e:n.next={key:t,next:n.next,value:e}},lx=function(n,t){return n?!!Nl(n,t):!1},cx=function(n,t){if(n)return Nl(n,t,!0)},ux=function(){var t,e={assert:function(r){if(!e.has(r))throw new sx("Side channel does not contain "+ix(r))},delete:function(r){var i=t&&t.next,s=cx(t,r);return s&&i&&i===s&&(t=void 0),!!s},get:function(r){return ox(t,r)},has:function(r){return lx(t,r)},set:function(r,i){t||(t={next:void 0}),ax(t,r,i)}};return e},hx=yt,Bo=Yn(),dx=Qi,px=X,Qp=hx("%Map%",!0),fx=Bo("Map.prototype.get",!0),gx=Bo("Map.prototype.set",!0),mx=Bo("Map.prototype.has",!0),vx=Bo("Map.prototype.delete",!0),yx=Bo("Map.prototype.size",!0),Wm=!!Qp&&function(){var t,e={assert:function(r){if(!e.has(r))throw new px("Side channel does not contain "+dx(r))},delete:function(r){if(t){var i=vx(t,r);return yx(t)===0&&(t=void 0),i}return!1},get:function(r){if(t)return fx(t,r)},has:function(r){return t?mx(t,r):!1},set:function(r,i){t||(t=new Qp),gx(t,r,i)}};return e},bx=yt,Ul=Yn(),wx=Qi,ha=Wm,Sx=X,Jr=bx("%WeakMap%",!0),_x=Ul("WeakMap.prototype.get",!0),kx=Ul("WeakMap.prototype.set",!0),xx=Ul("WeakMap.prototype.has",!0),Ex=Ul("WeakMap.prototype.delete",!0),Ax=Jr?function(){var t,e,r={assert:function(i){if(!r.has(i))throw new Sx("Side channel does not contain "+wx(i))},delete:function(i){if(Jr&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Ex(t,i)}else if(ha&&e)return e.delete(i);return!1},get:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?_x(t,i):e&&e.get(i)},has:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?xx(t,i):!!e&&e.has(i)},set:function(i,s){Jr&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Jr),kx(t,i,s)):ha&&(e||(e=ha()),e.set(i,s))}};return r}:ha,$x=X,Tx=Qi,Ix=ux,Cx=Wm,Rx=Ax,Px=Rx||Cx||Ix,Dx=function(){var t,e={assert:function(r){if(!e.has(r))throw new $x("Side channel does not contain "+Tx(r))},delete:function(r){return!!t&&t.delete(r)},get:function(r){return t&&t.get(r)},has:function(r){return!!t&&t.has(r)},set:function(r,i){t||(t=Px()),t.set(r,i)}};return e},Lx=kn,hs=Dx(),an=X,Wh={assert:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");if(hs.assert(n),!Wh.has(n,t))throw new an("`"+t+"` is not present on `O`")},get:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");var e=hs.get(n);return e&&e["$"+t]},has:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");var e=hs.get(n);return!!e&&Lx(e,"$"+t)},set:function(n,t,e){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");var r=hs.get(n);r||(r={},hs.set(n,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(Wh);var Zh=Wh,Zm=Sn,Zn=Zh,jo=function n(t,e){if(!(this instanceof n))return new n(t,e);if(t!=="normal"&&t!=="break"&&t!=="continue"&&t!=="return"&&t!=="throw")throw new Zm('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');Zn.set(this,"[[Type]]",t),Zn.set(this,"[[Value]]",e)};jo.prototype.type=function(){return Zn.get(this,"[[Type]]")};jo.prototype.value=function(){return Zn.get(this,"[[Value]]")};jo.prototype["?"]=function(){var t=Zn.get(this,"[[Type]]"),e=Zn.get(this,"[[Value]]");if(t==="throw")throw e;return e};jo.prototype["!"]=function(){var t=Zn.get(this,"[[Type]]");if(t!=="normal")throw new Zm('Assertion failed: Completion Record is not of type "normal"');return Zn.get(this,"[[Value]]")};var Vh=jo,zx=Vh,Bh=function(t){return new zx("normal",t)},Dc,ef;function Ox(){if(ef)return Dc;ef=1;var n=Yi;return Dc=function(){return n()&&!!Symbol.toStringTag},Dc}var Mx=yt,tf=Mx("%Object.defineProperty%",!0),Nx=Ox()(),Ux=kn,Fx=X,da=Nx?Symbol.toStringTag:null,Vm=function(t,e){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new Fx("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");da&&(r||!Ux(t,da))&&(tf?tf(t,da,{configurable:!i,enumerable:!1,value:e,writable:!1}):t[da]=e)},Bm={exports:{}},Hx=yt,nf=lm,Wx=zl(),rf=qi,sf=X,Zx=Hx("%Math.floor%"),Vx=function(t,e){if(typeof t!="function")throw new sf("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||Zx(e)!==e)throw new sf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&rf){var o=rf(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!r)&&(Wx?nf(t,"length",e,!0,!0):nf(t,"length",e)),t},Bx=Fo,jx=Ph,Gx=bm,qx=function(){return Gx(Bx,jx,arguments)};(function(n){var t=Vx,e=Uo,r=Ol,i=qx;n.exports=function(o){var a=r(arguments),c=1+o.length-(arguments.length-1);return t(a,c>0?c:0,!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i})(Bm);var jh=Bm.exports,Yx=function(t,e){for(var r=0;r<t.length;r+=1)if(!e(t[r],r,t))return!1;return!0},Xx=Object,Kx=function(t){return t&&typeof t=="object"&&(typeof t["[[ResourceValue]]"]>"u"||Xx(t["[[ResourceValue]]"])===t["[[ResourceValue]]"])&&(t["[[Hint]]"]==="SYNC-DISPOSE"||t["[[Hint]]"]==="ASYNC-DISPOSE")&&(typeof t["[[DisposeMethod]]"]=="function"||typeof t["[[DisposeMethod]]"]>"u")},Jx=kn,Qx=Dh(),eE=Yx,tE=Kx,nE=function(t){return t&&typeof t=="object"&&Jx(t,"[[DisposableResourceStack]]")&&Qx(t["[[DisposableResourceStack]]"])&&(t["[[DisposableResourceStack]]"].length===0||eE(t["[[DisposableResourceStack]]"],tE))},rE=_n,iE=function(t){if(t===null)return"Null";if(typeof t>"u")return"Undefined";if(rE(t))return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},sE=iE,Gh=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":sE(t)},oE=X,aE=Qi,lE=Ki,cE=function(t,e){if(!lE(e))throw new oE("Assertion failed: P is not a Property Key, got "+aE(e));return t[e]},of=X,uE=cE,hE=Ji,dE=Ki,af=Qi,pE=function(t,e){if(!dE(e))throw new of("Assertion failed: P is not a Property Key");var r=uE(t,e);if(r!=null){if(!hE(r))throw new of(af(e)+" is not a function: "+af(r));return r}},wu={exports:{}},fE=yt,gE=fE,lf=gE("%Reflect.construct%",!0),rl=Vo;try{rl({},"",{"[[Get]]":function(){}})}catch{rl=null}if(rl&&lf){var cf={},uf={};rl(uf,"length",{"[[Get]]":function(){throw cf},"[[Enumerable]]":!0}),wu.exports=function(t){try{lf(t,uf)}catch(e){return e===cf}}}else wu.exports=function(t){return typeof t=="function"&&!!t.prototype};var mE=wu.exports,Lc=X,hf=Ji,vE=mE,yE=function(t){if(!vE(t))throw new Lc("C must be a constructor");var e={"[[Resolve]]":void 0,"[[Reject]]":void 0},r=new t(function(i,s){if(typeof e["[[Resolve]]"]<"u"||typeof e["[[Reject]]"]<"u")throw new Lc("executor has already been called");e["[[Resolve]]"]=i,e["[[Reject]]"]=s});if(!hf(e["[[Resolve]]"])||!hf(e["[[Reject]]"]))throw new Lc("executor must provide valid resolve and reject functions");return{"[[Promise]]":r,"[[Resolve]]":e["[[Resolve]]"],"[[Reject]]":e["[[Reject]]"]}},df=Sn,bE=X,zc=Ml,pf=pE,wE=yE,SE=Gh,ff=Mh(),gf=Nh(),_E=function(t,e){if(SE(t)!=="Object")throw new bE("`V` must be an Object");if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new df("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(e==="ASYNC-DISPOSE"&&gf&&(r=pf(t,gf)),!r){if(!ff)throw new df("`Symbol.dispose` is not supported");if(r=pf(t,ff),typeof r<"u")return function(){var i=this;if(e==="ASYNC-DISPOSE"){var s=wE(Promise);try{zc(r,i),zc(s["[[Resolve]]"],void 0,[void 0])}catch(o){s["[[Reject]]"](o)}return s["[[Promise]]"]}zc(r,i)}}return r},kE=Sn,Oc=X,xE=Ji,EE=Gh,AE=_E,$E=function(t,e){if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new kE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(arguments.length<3)if(t==null)t=void 0,r=void 0;else{if(typeof t<"u"&&EE(t)!=="Object")throw new Oc("`V` must be an Object, or `null` or `undefined`");if(r=AE(t,e),typeof r>"u")throw new Oc("dispose method must not be `undefined` on `V` when an object `V` is provided")}else if(r=arguments[2],!xE(r))throw new Oc("`method`, when provided, must be a function");return{"[[ResourceValue]]":t,"[[Hint]]":e,"[[DisposeMethod]]":r}},TE=Sn,pa=X,IE=nE,mf=$E,CE=Yn(),RE=CE("Array.prototype.push"),jm=function(t,e,r){if(!IE(t))throw new pa("Assertion failed: `disposeCapability` must be a DisposeCapability Record");if(r!=="SYNC-DISPOSE"&&r!=="ASYNC-DISPOSE")throw new TE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var i=arguments.length>3?arguments[3]:void 0;if(arguments.length>3&&typeof i!="function")throw new pa("Assertion failed: `method`, when present, must be a function");if(!t["[[DisposableResourceStack]]"])throw new pa("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");var s;if(arguments.length<4){if(e==null&&r==="SYNC_DISPOSE")return"UNUSED";s=mf(e,r)}else{if(typeof e<"u")throw new pa("Assertion failed: `V` must be undefined when `method` is present");s=mf(void 0,r,i)}return RE(t["[[DisposableResourceStack]]"],s),"UNUSED"},Mc,vf;function qh(){if(vf)return Mc;vf=1;var n=yt,t=jh,e=Sn,r=n("%Promise.resolve%",!0),i=r&&t(r);return Mc=function(o,a){if(!i)throw new e("This environment does not support Promises.");return i(o,a)},Mc}var Nc,yf;function PE(){if(yf)return Nc;yf=1;var n=yt,t=Sn,e=n("%Promise%",!0),r=Ml,i=qh(),s=Gh;return Nc=function(a,c,u){if(typeof a<"u"&&s(a)!=="Object")throw new t("Assertion failed: `V` must be `undefined` or an Object");if(c!=="SYNC-DISPOSE"&&c!=="ASYNC-DISPOSE")throw new t("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");if(typeof u<"u"&&typeof u!="function")throw new t("Assertion failed: `method` must be `undefined` or a function");var h=typeof u>"u"?u:r(u,a);if(c==="ASYNC-DISPOSE")return i(e,h)},Nc}var Uc,bf;function DE(){if(bf)return Uc;bf=1;var n=Vh;return Uc=function(e){return new n("throw",e)},Uc}var LE=yt,Fc=Sn,wf=X,zE=LE("%Promise%",!0),OE=Yn(),Sf=OE("Promise.prototype.then",!0),ME=Vh,_f=PE(),NE=Bh,UE=qh(),kf=DE(),FE=Lm(),Gm=function(t,e){if(!(e instanceof ME))throw new wf("`completion` must be a Completion Record");var r=t["[[DisposableResourceStack]]"];if(!r)throw new wf("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");for(var i,s=r.length-1;s>=0;s-=1)if(!i)i=r[s]["[[Hint]]"];else if(i!==r[s]["[[Hint]]"])throw new Fc("mixed hint stacks are not supported");for(var o=i==="ASYNC-DISPOSE"&&UE(zE,e),a=function(v){if(e.type()==="throw"){var m=e.value(),_=new FE(v,m);e=kf(_)}else e=kf(v)},c=i==="ASYNC-DISPOSE"&&function(m){return Sf(o,function(){var _=_f(m["[[ResourceValue]]"],m["[[Hint]]"],m["[[DisposeMethod]]"]);if(!_)throw new Fc("Assertion failed: non-`~ASYNC-DISPOSE~` resource returned a promise from Dispose");return Sf(_,NE)},a)},u=r.length-1;u>=0;u-=1)if(i==="ASYNC-DISPOSE")o=c(r[u]);else{var h=r[u];try{var p=_f(h["[[ResourceValue]]"],h["[[Hint]]"],h["[[DisposeMethod]]"]);if(p)throw new Fc("Assertion failed: `~SYNC-DISPOSE~` resource returned something from Dispose")}catch(v){a(v)}}return t["[[DisposableResourceStack]]"]=null,i==="ASYNC-DISPOSE"?o:e},qm=function(){var t=[];return{"[[DisposableResourceStack]]":t}},Fl=Th,Yh=X,HE=Ml,es=zh,WE=Vo,Ym=Ji,ZE=Bh,nt=Zh,VE=Vm,Xm=Fr.supportsDescriptors,BE=jh,Xh=jm,jE=Gm,Km=qm,xf=Mh(),ft=function n(){if(!(this instanceof n)||nt.has(this,"[[DisposableState]]")||nt.has(this,"[[DisposeCapability]]"))throw new Yh("can only be used with new");nt.set(this,"[[DisposableState]]","PENDING"),nt.set(this,"[[DisposeCapability]]",Km())},Jm=function(){var t=this;return nt.assert(t,"[[DisposableState]]"),nt.get(t,"[[DisposableState]]")==="DISPOSED"},Go=BE(Jm);Xm?WE(ft.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":Jm}):ft.prototype.disposed=!1;var Qm=function(t){nt.set(t,"[[DisposableState]]","DISPOSED"),Xm||(t.disposed=!0)};es(ft.prototype,"dispose",function(){var t=this;if(!Go(t))return Qm(t),jE(nt.get(t,"[[DisposeCapability]]"),ZE())["?"]()});es(ft.prototype,"use",function(t){var e=this;if(Go(e))throw new Fl("a disposed stack can not use anything new");return Xh(nt.get(e,"[[DisposeCapability]]"),t,"SYNC-DISPOSE"),t});es(ft.prototype,"adopt",function(t,e){var r=this;if(Go(r))throw new Fl("a disposed stack can not use anything new");if(!Ym(e))throw new Yh("`onDispose` must be a function");var i=function(){return HE(e,void 0,[t])};return Xh(nt.get(r,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",i),t});es(ft.prototype,"defer",function(t){var e=this;if(Go(e))throw new Fl("a disposed stack can not defer anything new");if(!Ym(t))throw new Yh("`onDispose` must be a function");Xh(nt.get(e,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",t)});es(ft.prototype,"move",function(){var t=this;if(Go(t))throw new Fl("a disposed stack can not use anything new");var e=new ft;return nt.set(e,"[[DisposeCapability]]",nt.get(t,"[[DisposeCapability]]")),nt.set(t,"[[DisposeCapability]]",Km()),Qm(t),e});xf&&es(ft.prototype,xf,ft.prototype.dispose);VE(ft.prototype,"DisposableStack");var GE=ft,qE=GE,YE=function(){return typeof DisposableStack=="function"?DisposableStack:qE},XE=Fr,KE=Ah(),JE=YE,QE=function(){var t=JE();return XE(KE,{DisposableStack:t},{DisposableStack:!0}),t},eA=yt,Hl=Th,Kh=X,Ef=eA("%Promise%",!0),Jh=jm,tA=Ml,ts=zh,nA=Vo,rA=Gm,ev=Ji,tv=qm,iA=Bh,Af=qh(),rt=Zh,sA=Vm,nv=Fr.supportsDescriptors,oA=jh,aA=Yn(),lA=aA("Promise.prototype.then",!0),$f=Nh(),gt=function n(){if(!(this instanceof n)||rt.has(this,"[[AsyncDisposableState]]")||rt.has(this,"[[DisposeCapability]]"))throw new Kh("can only be used with new");rt.set(this,"[[AsyncDisposableState]]","pending"),rt.set(this,"[[DisposeCapability]]",tv())},rv=function(){var t=this;return rt.assert(t,"[[AsyncDisposableState]]"),rt.get(t,"[[AsyncDisposableState]]")==="disposed"},qo=oA(rv);nv?nA(gt.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":rv}):gt.prototype.disposed=!1;var iv=function(t){rt.set(t,"[[AsyncDisposableState]]","disposed"),nv||(t.disposed=!0)};ts(gt.prototype,"disposeAsync",function(){var t=this;return qo(t)?Af(Ef):(iv(t),lA(Af(Ef,rA(rt.get(t,"[[DisposeCapability]]"),iA())),function(e){return e["?"]()}))});ts(gt.prototype,"use",function(t){var e=this;if(qo(e))throw new Hl("a disposed stack can not use anything new");return Jh(rt.get(e,"[[DisposeCapability]]"),t,"ASYNC-DISPOSE"),t});ts(gt.prototype,"adopt",function(t,e){var r=this;if(qo(r))throw new Hl("a disposed stack can not use anything new");if(!ev(e))throw new Kh("`onDisposeAsync` must be a function");var i=function(){return tA(e,void 0,[t])};return i.value=t,Jh(rt.get(r,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",i),t});ts(gt.prototype,"defer",function(t){var e=this;if(qo(e))throw new Hl("a disposed stack can not defer anything new");if(!ev(t))throw new Kh("`onDispose` must be a function");Jh(rt.get(e,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",t)});ts(gt.prototype,"move",function(){var t=this;if(qo(t))throw new Hl("a disposed stack can not use anything new");var e=new gt;return rt.set(e,"[[DisposeCapability]]",rt.get(t,"[[DisposeCapability]]")),rt.set(t,"[[DisposeCapability]]",tv()),iv(t),e});$f&&ts(gt.prototype,$f,gt.prototype.disposeAsync);sA(gt.prototype,"AsyncDisposableStack");var cA=gt,uA=cA,hA=function(){return typeof AsyncDisposableStack=="function"?AsyncDisposableStack:uA},dA=Fr,pA=Ah(),fA=hA,gA=function(){var t=fA();return dA(pA,{AsyncDisposableStack:t},{AsyncDisposableStack:!0}),t},mA=dk,vA=wk,yA=QE,bA=gA,wA=function(){mA(),vA(),yA(),bA()};wA();const Tf=new WeakMap;function SA(n){return(typeof n=="object"||typeof n=="function")&&n!==null&&"then"in n&&typeof n.then=="function"}function Qr(n){return typeof n=="string"?n:typeof n=="symbol"?n.description??n.toString():n.name||"(anonymous class)"}function If(){return new Error("register(Key, factory) requires a factory function. Wrap existing instances as () => instance.")}function _A(){return new Error("register(Key, factory) does not accept async factories. Await setup before registering.")}class kA{constructor(){g(this,"entries",new Map);g(this,"constructionStack",[])}register(t,e){if(e===void 0){if(typeof t!="function")throw If();this.validateClassRegistration(t),this.storeFactory(t,()=>this.instantiateClass(t));return}if(typeof e!="function")throw If();if(e.constructor.name==="AsyncFunction")throw _A();this.storeFactory(t,e)}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.factory)!==void 0}resolve(t){return this.resolveAny(t)}storeFactory(t,e){const r=this.getOrCreateEntry(t);r.factory=e,r.instance=void 0,r.error=void 0}validateClassRegistration(t){const e=Tf.get(t);if(e){if(t.length!==e.length)throw new Error(`${Qr(t)} cannot be registered with register(Class). @injectable(...) declared ${e.length} dependencies but constructor arity is ${t.length}. Use register(Key, () => value) instead.`);return}if(t.length!==0)throw new Error(`${Qr(t)} cannot be registered with register(Class). Undecorated classes must have zero required constructor parameters. Use register(Key, () => value) instead.`)}instantiateClass(t){const e=Tf.get(t);if(!e)return new t;const r=e.map(i=>this.resolveAny(i));return new t(...r)}resolveAny(t){return this.getOrCreateEntry(t).proxy}getOrCreateEntry(t){let e=this.entries.get(t);return e||(e={key:t},e.proxy=this.createProxy(e),this.entries.set(t,e),e)}createProxy(t){return new Proxy({},{get:(e,r)=>{if(r==="then")return;const i=this.getInstance(t),s=Reflect.get(i,r,i);return typeof s=="function"?s.bind(i):s},set:(e,r,i)=>{const s=this.getInstance(t);return Reflect.set(s,r,i,s)},has:(e,r)=>{const i=this.getInstance(t);return r in i}})}getInstance(t){if(t.instance)return t.instance;if(t.error)throw t.error;if(!t.factory)throw new Error(`${Qr(t.key)} was resolved but never registered`);const e=this.constructionStack.indexOf(t.key);if(e!==-1){const r=[...this.constructionStack.slice(e),t.key].map(i=>Qr(i)).join(" -> ");throw new Error(`Circular dependency detected: ${r}`)}this.constructionStack.push(t.key);try{const r=t.factory();if(SA(r))throw new Error(`Factory for ${Qr(t.key)} returned a Promise. Await setup before registering.`);if(typeof r!="object"||r===null)throw new Error(`Factory for ${Qr(t.key)} returned a non-object value. Wrap primitives in an object.`);return t.instance=r,r}catch(r){throw t.error=r,r}finally{this.constructionStack.pop()}}}const en=new kA,xA=.5,Cf=.1,Rf=8,EA=4,sv=3,ov=3,AA=4,dr=255,av=.2126,lv=.7152,cv=.0722;async function uv(n){const t=$A(n);if(!t)return"light";try{return await CA(n,t)>=xA?"light":"dark"}catch{return"light"}}function $A(n){if(typeof document.elementsFromPoint!="function")return null;const t=n.getBoundingClientRect(),e=t.left+t.width/2,r=t.top+t.height/2,i=document.elementsFromPoint(e,r);for(const s of i){if(!(s instanceof HTMLElement)||s===n||n.contains(s))continue;const o=window.getComputedStyle(s);if(TA(o))return s}return null}function TA(n){return n.backgroundImage&&n.backgroundImage!=="none"?!0:IA(n.backgroundColor)>0}function IA(n){if(!n)return 0;const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 0;const e=t[1].split(/[\s,/]+/).filter(Boolean);return e.length===AA?parseFloat(e[sv]):e.length===ov?1:0}async function CA(n,t){const e=n.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:fa((e.left-r.left)/r.width),y:fa((e.top-r.top)/r.height),width:fa(e.width/r.width),height:fa(e.height/r.height)},s=window.getComputedStyle(t),o=RA(s.backgroundImage);return o?DA({url:o,surfaceWidth:r.width,surfaceHeight:r.height,region:i}):LA(s.backgroundColor)}function RA(n){const t=n.match(/url\(\s*["']?([^"')]+)["']?\s*\)/);return t?t[1]:null}const Pf=new Map;function PA(n){let t=Pf.get(n);return t||(t=new Promise((e,r)=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>r(new Error(`Failed to load ${n}`)),i.src=n}),Pf.set(n,t),t)}async function DA(n){const t=await PA(n.url),e=Math.max(Rf,Math.ceil(n.surfaceWidth*Cf)),r=Math.max(Rf,Math.ceil(n.surfaceHeight*Cf)),i=document.createElement("canvas");i.width=e,i.height=r;const s=i.getContext("2d",{willReadFrequently:!0});if(!s)return 1;const o=n.surfaceWidth/n.surfaceHeight,a=t.naturalWidth/t.naturalHeight;let c,u;a>o?(u=r,c=r*a):(c=e,u=e/a);const h=(e-c)/2,p=(r-u)/2;s.drawImage(t,h,p,c,u);const v=Math.max(0,Math.floor(n.region.x*e)),m=Math.max(0,Math.floor(n.region.y*r)),_=Math.max(1,Math.min(e-v,Math.floor(n.region.width*e))),k=Math.max(1,Math.min(r-m,Math.floor(n.region.height*r))),T=s.getImageData(v,m,_,k).data;let P=0,R=0;for(let W=0;W<T.length;W+=EA){const N=T[W]/dr,F=T[W+1]/dr,Y=T[W+2]/dr,j=T[W+sv]/dr;P+=j*(av*N+lv*F+cv*Y),R+=1}return R>0?P/R:1}function LA(n){const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 1;const e=t[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);if(e.length<ov)return 1;const r=e[0]/dr,i=e[1]/dr,s=e[2]/dr;return av*r+lv*i+cv*s}function fa(n){return n<0?0:n>1?1:n}const zA=["ghost","glass"],Ms=[...zA.flatMap(n=>[`button[variant="${n}"]`,`segmented-control[variant="${n}"]`]),'[material="glass"]'].join(", "),ga=new WeakSet,Df=new WeakSet;function hv(n){if(Df.has(n))return;Df.add(n);for(const e of n.querySelectorAll(Ms))Hc(e);if(typeof MutationObserver!="function")return;new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const i of r.addedNodes)OA(i,Hc);else r.type==="attributes"&&r.target instanceof HTMLElement&&r.target.matches(Ms)&&Hc(r.target)}).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["variant","material"]})}function OA(n,t){if(n instanceof Element){n instanceof HTMLElement&&n.matches(Ms)&&t(n);for(const e of n.querySelectorAll(Ms))t(e)}}async function Hc(n){if(ga.has(n)||n.hasAttribute("tone"))return;ga.add(n);const t=await uv(n);if(!n.matches(Ms)){ga.delete(n);return}if(n.hasAttribute("tone")){ga.delete(n);return}n.setAttribute("tone",t)}const MA="*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;width:100%;height:100%}h1,h2,h3,h4,h5,h6,p,ul,ol,blockquote,pre,hr{margin:0}button,input,textarea,select{font:inherit;color:inherit}@font-face{font-family:Hind;src:url("+new URL("Hind-Variable-C47b_dt9.woff2",import.meta.url).href+') format("woff2-variations");font-weight:300 700;font-style:normal;font-display:swap}:root{--font-sans: "Hind", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;--font-brand: var(--font-sans);--font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;--font-weight-body: 500;--text-base: 13.5px;--text-scale: 1.125;--text-sm: round(calc(var(--text-base) / var(--text-scale)), 1px);--text-lg: round(calc(var(--text-base) * var(--text-scale)), 1px);--text-xl: round(calc(var(--text-lg) * var(--text-scale)), 1px);--leading-base: 1.5;--control-height-xs: 18px;--control-height-sm: 24px;--control-height-md: 28px;--control-height-lg: 32px;--space-2: 2px;--space-4: 4px;--space-6: 6px;--space-8: 8px;--space-12: 12px;--space-16: 16px;--space-20: 20px;--space-24: 24px;--space-32: 32px;--space-48: 48px;--space-64: 64px;--radius-4: 4px;--radius-8: 8px;--radius-12: 12px;--radius-16: 16px;--radius-24: 24px;--radius-full: 9999px;--layer-chrome: 100;--layer-panel: 500;--layer-overlay: 2000;--shadow-hairline: 0 0 0 .5px var(--color-border);--shadow-control: 0 1px 1px rgb(0 0 0 / .04), 0 2px 6px rgb(0 0 0 / .06);--alpha-50: 4%;--alpha-100: 8%;--alpha-150: 11%;--alpha-200: 15%;--alpha-300: 22%;--alpha-400: 30%;--alpha-500: 40%;--alpha-600: 50%;--alpha-700: 65%;--alpha-800: 80%;--alpha-900: 90%;--alpha-950: 95%;--tint-50: color-mix(in srgb, currentColor var(--alpha-50), transparent);--tint-100: color-mix(in srgb, currentColor var(--alpha-100), transparent);--tint-150: color-mix(in srgb, currentColor var(--alpha-150), transparent);--tint-200: color-mix(in srgb, currentColor var(--alpha-200), transparent);--tint-300: color-mix(in srgb, currentColor var(--alpha-300), transparent);--tint-400: color-mix(in srgb, currentColor var(--alpha-400), transparent);--tint-500: color-mix(in srgb, currentColor var(--alpha-500), transparent);--tint-600: color-mix(in srgb, currentColor var(--alpha-600), transparent);--tint-700: color-mix(in srgb, currentColor var(--alpha-700), transparent);--tint-800: color-mix(in srgb, currentColor var(--alpha-800), transparent);--tint-900: color-mix(in srgb, currentColor var(--alpha-900), transparent);--tint-950: color-mix(in srgb, currentColor var(--alpha-950), transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-300), transparent);--backdrop-blur-glass: blur(20px) saturate(1.4);--black: #000000;--white: #ffffff;--neutral-50: oklch(.985 0 0);--neutral-100: oklch(.97 0 0);--neutral-200: oklch(.923 0 0);--neutral-300: oklch(.869 0 0);--neutral-350: oklch(.79 0 0);--neutral-400: oklch(.709 0 0);--neutral-500: oklch(.553 0 0);--neutral-600: oklch(.444 0 0);--neutral-700: oklch(.374 0 0);--neutral-800: oklch(.268 0 0);--neutral-900: oklch(.216 0 0);--neutral-950: oklch(.147 0 0);--red-50: oklch(.969 .015 12.422);--red-100: oklch(.941 .03 12.58);--red-200: oklch(.892 .058 10.001);--red-300: oklch(.81 .117 11.638);--red-400: oklch(.712 .194 13.428);--red-500: oklch(.645 .246 16.439);--red-600: oklch(.586 .253 17.585);--red-700: oklch(.514 .222 16.935);--red-800: oklch(.455 .188 13.697);--red-900: oklch(.41 .159 10.272);--red-950: oklch(.271 .105 12.094);--orange-50: oklch(.98 .016 73.684);--orange-100: oklch(.954 .038 75.164);--orange-200: oklch(.901 .076 70.697);--orange-300: oklch(.837 .128 66.29);--orange-400: oklch(.75 .183 55.934);--orange-500: oklch(.705 .213 47.604);--orange-600: oklch(.646 .222 41.116);--orange-700: oklch(.553 .195 38.402);--orange-800: oklch(.47 .157 37.304);--orange-900: oklch(.408 .123 38.172);--orange-950: oklch(.266 .079 36.259);--yellow-50: oklch(.987 .026 102.212);--yellow-100: oklch(.973 .071 103.193);--yellow-200: oklch(.945 .129 101.54);--yellow-300: oklch(.905 .182 98.111);--yellow-400: oklch(.852 .199 91.936);--yellow-500: oklch(.795 .184 86.047);--yellow-600: oklch(.681 .162 75.834);--yellow-700: oklch(.554 .135 66.442);--yellow-800: oklch(.476 .114 61.907);--yellow-900: oklch(.421 .095 57.708);--yellow-950: oklch(.286 .066 53.813);--green-50: oklch(.979 .021 166.113);--green-100: oklch(.95 .052 163.051);--green-200: oklch(.905 .093 164.15);--green-300: oklch(.845 .143 164.978);--green-400: oklch(.765 .177 163.223);--green-500: oklch(.696 .17 162.48);--green-600: oklch(.596 .145 163.225);--green-700: oklch(.508 .118 165.612);--green-800: oklch(.432 .095 166.913);--green-900: oklch(.378 .077 168.94);--green-950: oklch(.262 .051 172.552);--blue-50: oklch(.97 .014 254.604);--blue-100: oklch(.932 .032 255.585);--blue-200: oklch(.882 .059 254.128);--blue-300: oklch(.809 .105 251.813);--blue-400: oklch(.707 .165 254.624);--blue-500: oklch(.623 .214 259.815);--blue-600: oklch(.546 .245 262.881);--blue-700: oklch(.488 .243 264.376);--blue-800: oklch(.424 .199 265.638);--blue-900: oklch(.379 .146 265.522);--blue-950: oklch(.282 .091 267.935);--purple-50: oklch(.969 .016 293.756);--purple-100: oklch(.943 .029 294.588);--purple-200: oklch(.894 .057 293.283);--purple-300: oklch(.811 .111 293.571);--purple-400: oklch(.702 .183 293.541);--purple-500: oklch(.606 .25 292.717);--purple-600: oklch(.541 .281 293.009);--purple-700: oklch(.491 .27 292.581);--purple-800: oklch(.432 .232 292.759);--purple-900: oklch(.38 .189 293.745);--purple-950: oklch(.283 .141 291.089)}@supports (corner-shape: squircle){:root{--radius-8: 10px;--radius-12: 15px;--radius-16: 20px;--radius-24: 30px}}:root[data-font=system]{--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif}:root{--color-bg: var(--neutral-50);--color-bg-muted: var(--neutral-100);--color-surface: var(--white);--color-surface-muted: var(--neutral-100);--color-interactive: var(--neutral-200);--color-interactive-hover: var(--neutral-300);--color-border: rgba(0, 0, 0, .1);--color-border-muted: rgba(0, 0, 0, .06);--color-text: var(--neutral-900);--color-text-muted: var(--neutral-500);--color-link: inherit;--color-focus-ring: var(--neutral-500);--color-overlay-backdrop: rgb(0 0 0 / .5);--color-highlight: rgb(255 255 255 / .5);--color-primary: var(--blue-500);--color-danger: var(--red-600);color-scheme:light}body{font-family:var(--font-sans);font-size:var(--text-base);font-weight:var(--font-weight-body);line-height:var(--leading-base);letter-spacing:.015em;color:var(--color-text);background:var(--color-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:var(--color-link);text-underline-offset:.15em;text-decoration-thickness:.08em}h1,h2,h3,h4,h5,h6{font-weight:600;color:inherit}code{font-family:var(--font-mono);font-size:.9em;background:var(--color-bg-muted);padding:var(--space-2) var(--space-4);border-radius:var(--radius-4)}pre{font-family:var(--font-mono);background:var(--color-bg-muted);padding:var(--space-12);border-radius:var(--radius-8);overflow-x:auto}pre code{background:none;padding:0}blockquote{padding-left:var(--space-16);border-left:3px solid var(--color-border);color:var(--color-text-muted)}hr{border:none;border-top:1px solid var(--color-border)}table{border-collapse:collapse}th,td{padding:var(--space-8) var(--space-12);border:1px solid var(--color-border);text-align:left}th{background:var(--color-bg-muted);font-weight:600}input,textarea{border:.5px solid var(--tint-300);border-radius:var(--radius-12);background:var(--tint-100);color:inherit;font:inherit;box-sizing:border-box;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease}input{height:var(--control-height-lg);padding:0 12px}textarea{padding:6px 10px;resize:none}input::placeholder,textarea::placeholder{color:var(--tint-500)}input:focus,textarea:focus{background:color-mix(in srgb,var(--white) var(--alpha-300),transparent);border-color:var(--color-primary);outline:none;box-shadow:0 0 0 1.5px var(--color-primary)}label.field{display:grid;gap:4px;font-size:13px}label.field>span{font-size:11.5px;font-weight:450;color:var(--tint-800)}@supports (corner-shape: squircle){*{corner-shape:squircle}}button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-6);box-sizing:border-box;height:var(--control-height-md);padding:0 14px 2px;font:inherit;cursor:default}button,segmented-control{background:var(--color-surface);border:.5px solid var(--tint-200);border-radius:var(--radius-12);box-shadow:var(--shadow-control);color:inherit}button:not([material]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}button:not([material]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}button[variant=primary]{background:var(--color-primary);border-color:#0000002e;color:var(--white)}button[variant=primary]:hover:not(:disabled){background:color-mix(in srgb,var(--color-primary) 92%,black)}button[variant=primary]:active:not(:disabled){background:color-mix(in srgb,var(--color-primary) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=danger]{background:var(--color-danger);border-color:#0000002e;color:var(--white)}button[variant=danger]:hover:not(:disabled){background:color-mix(in srgb,var(--color-danger) 92%,black)}button[variant=danger]:active:not(:disabled){background:color-mix(in srgb,var(--color-danger) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=ghost]{background:transparent;border-color:transparent;color:inherit;box-shadow:none}button[variant=ghost]:hover:not(:disabled){background:var(--tint-150);backdrop-filter:saturate(1.2);-webkit-backdrop-filter:saturate(1.2)}button[variant=ghost]:active:not(:disabled){background:var(--tint-300);backdrop-filter:saturate(1.4);-webkit-backdrop-filter:saturate(1.4);box-shadow:none}button[variant=ghost][data-active]:not(:disabled),button[variant=ghost][data-active]:hover:not(:disabled),button[variant=ghost][aria-pressed=true]:not(:disabled),button[variant=ghost][aria-pressed=true]:hover:not(:disabled),button[variant=ghost][aria-expanded=true]:not(:disabled),button[variant=ghost][aria-expanded=true]:hover:not(:disabled){background:var(--color-overlay-active);backdrop-filter:saturate(1.3);-webkit-backdrop-filter:saturate(1.3);box-shadow:none}button[variant=glass],segmented-control[variant=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);box-shadow:none}button[variant=glass]{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}button[variant=glass]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover));backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}button[variant=glass]:active:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}button[variant=glass][aria-pressed=true]:not(:disabled),button[variant=glass][aria-pressed=true]:hover:not(:disabled),button[variant=glass][aria-expanded=true]:not(:disabled),button[variant=glass][aria-expanded=true]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}[tone=dark] button[variant=glass],[tone=dark] segmented-control[variant=glass]{border-color:var(--tint-400)}button[material],segmented-control[material]{color:inherit;box-shadow:none}button[material]:hover:not(:disabled){background-image:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover))}button[material]:active:not(:disabled){background-image:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}[tone=dark] button[material],[tone=dark] segmented-control[material]{border-color:var(--tint-400)}button:disabled{background:var(--tint-300);border-color:transparent;color:var(--tint-700);box-shadow:none}button[variant=ghost]:disabled{background:transparent}:where([tone=dark]) button:not([variant]):not([material]):not(:disabled),:where([tone=dark]) button[variant=default]:not([material]):not(:disabled),:where([tone=dark]) segmented-control:not([variant]):not([material]),:where([tone=dark]) segmented-control[variant=default]:not([material]){background:var(--tint-200);border-color:var(--tint-300);box-shadow:inset 0 .5px 0 var(--tint-300)}:where([tone=dark]) button:not([variant]):hover:not(:disabled),:where([tone=dark]) button[variant=default]:hover:not(:disabled){background:var(--tint-300)}:where([tone=dark]) button:not([variant]):active:not(:disabled),:where([tone=dark]) button[variant=default]:active:not(:disabled){background:var(--tint-400);box-shadow:inset 0 1px 2px #0003}:where([tone=light]) button:not([variant]):not([material]):not(:disabled),:where([tone=light]) button[variant=default]:not([material]):not(:disabled),:where([tone=light]) segmented-control:not([variant]):not([material]),:where([tone=light]) segmented-control[variant=default]:not([material]){background:var(--color-surface);border-color:var(--tint-200);box-shadow:var(--shadow-control)}:where([tone=light]) button:not([variant]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}:where([tone=light]) button:not([variant]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button[size=sm],segmented-control[size=sm]{height:var(--control-height-sm)}button[size=sm][icon-only]{width:var(--control-height-sm)}button[size=xs]{height:var(--control-height-xs);padding:0 var(--space-6) 1px;border-radius:var(--radius-8)}button[size=xs][icon-only]{width:var(--control-height-xs);padding:0}button[icon-only]{width:var(--control-height-md);padding:0}[data-ui-icon]{display:inline-block;vertical-align:middle}[selectable],[selectable] *{user-select:text;-webkit-user-select:text}[unselectable],[unselectable] *{user-select:none;-webkit-user-select:none}.prose{line-height:var(--leading-base)}.prose h1{font-size:var(--text-xl);margin-bottom:var(--space-8)}.prose h2{font-size:var(--text-lg);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose h3,.prose h4,.prose h5,.prose h6{font-size:var(--text-base);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose p{margin:var(--space-12) 0}.prose ul,.prose ol{padding-left:var(--space-24);margin:var(--space-12) 0}.prose blockquote,.prose pre{margin:var(--space-12) 0}.prose hr{margin:var(--space-24) 0}.prose table{width:100%;margin:var(--space-12) 0}.prose img{max-width:100%;height:auto}.prose>:first-child{margin-top:0}.prose>:last-child{margin-bottom:0}[material=paper]{background:var(--white);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text)}[material=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}[material=glass-frosted]{background:color-mix(in srgb,var(--white) var(--alpha-800),transparent);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text);backdrop-filter:var(--backdrop-blur-glass);-webkit-backdrop-filter:var(--backdrop-blur-glass)}[tone=dark]{color:color-mix(in srgb,var(--white) var(--alpha-950),transparent);border-color:color-mix(in srgb,var(--white) var(--alpha-200),transparent);--color-overlay-hover: color-mix(in srgb, var(--white) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--white) var(--alpha-200), transparent)}[tone=dark][material=paper]{background:#000}[tone=dark][material=glass-frosted]{background:color-mix(in srgb,var(--black) 70%,transparent)}[tone=light]{color:var(--color-text);border-color:color-mix(in srgb,var(--black) var(--alpha-100),transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-50), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-100), transparent)}[level="1"]{box-shadow:0 12px 32px #00000024}[level="2"]{box-shadow:0 4px 6px -2px #0000001f,0 40px 60px -16px #00000038}dropdown-menu{position:relative;display:inline-block;color:inherit}dropdown-group{display:grid;gap:var(--space-4)}dropdown-label{display:block;padding:var(--space-4) var(--space-8);color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);font-weight:600;letter-spacing:.04em;text-transform:uppercase}dropdown-divider{display:block;height:1px;margin:2px 0;background:var(--color-border)}[data-dropdown-trigger][aria-expanded=true],[data-dropdown-trigger][aria-expanded=true]:hover,dropdown-menu[open]::part(trigger),dropdown-menu[open]::part(trigger):hover{background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}[data-dropdown-trigger-label],dropdown-menu::part(trigger-label){min-width:0}[data-dropdown-trigger-icon],dropdown-menu::part(trigger-icon){display:inline-flex;align-items:center;justify-content:center;flex:none;color:var(--color-text-muted);transform:translateY(1px)}dropdown-item:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}ui-popover.dropdown-popover::part(panel){min-width:192px;padding:var(--space-4)}.dropdown-list{display:flex;flex-direction:column;gap:2px}dropdown-item{display:flex;align-items:center;gap:var(--space-8);margin:0;padding:6px 12px;border-radius:var(--radius-8);font:inherit;line-height:1.2;color:inherit;font-weight:var(--font-weight-body);-webkit-user-select:none;user-select:none}dropdown-item>[data-ui-icon]{flex:none}dropdown-item[selected]{background:var(--color-overlay-active)}dropdown-item:hover,dropdown-item[action]:hover{background:var(--color-primary);color:var(--white)}dropdown-item[action]{color:inherit}dropdown-item[danger]{color:var(--color-danger)}dropdown-item[danger]:hover{background:var(--color-danger);color:var(--white)}editable-text{display:inline-block;max-width:100%;vertical-align:top}editable-text>.editable-text-span{display:inline-block;max-width:100%;outline:none;overflow:hidden;white-space:nowrap;cursor:inherit;vertical-align:top}editable-text:not([data-editing])>.editable-text-span{text-overflow:ellipsis}editable-text[data-editing]>.editable-text-span{cursor:text}modal-overlay{color:inherit}modal-overlay::part(backdrop){position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--layer-overlay);display:flex;align-items:center;justify-content:center;padding:var(--space-16);background:linear-gradient(to bottom,color-mix(in srgb,var(--black) var(--alpha-50),transparent),color-mix(in srgb,var(--black) var(--alpha-400),transparent));backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}panel-view{display:block}panel-view::part(panel){display:flex;flex-direction:column;gap:var(--space-16);color:var(--color-text)}panel-view::part(header){display:flex;align-items:center;justify-content:space-between;gap:var(--space-12)}panel-view::part(title){margin:0;font:inherit;font-size:var(--text-lg);font-weight:600;color:var(--color-text)}panel-view::part(button){display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;border:1px solid var(--color-border);border-radius:var(--radius-4);background:var(--color-surface);color:var(--color-text);box-shadow:none}panel-view::part(button):hover{background:var(--color-interactive-hover)}panel-view::part(button):focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}panel-view::part(icon){display:inline-flex;align-items:center;justify-content:center;flex:none}ui-popover{display:contents}ui-popover::part(panel){position:fixed;inset:0 auto auto 0;margin:0;min-width:192px;max-width:384px;padding:var(--space-16) var(--space-20);border-radius:var(--radius-12);outline:none;z-index:2000}segmented-control{display:inline-flex;align-items:stretch;box-sizing:border-box;height:var(--control-height-md)}segmented-control>button{height:auto}segmented-control[variant=ghost]{background:transparent;box-shadow:none}[tone=dark] segmented-control[variant=ghost]{border-color:var(--tint-400)}segmented-control>button{position:relative}segmented-control>button[icon-only]{width:auto;height:auto;padding:0 var(--space-6)}segmented-control>button:not([variant]):not(:disabled),[tone] segmented-control>button:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>button:last-child{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>button:not(:first-child):not(:last-child){border-radius:0}segmented-control>button:not([variant]):hover:not(:disabled),[tone] segmented-control>button:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>button:not([variant]):active:not(:disabled),[tone] segmented-control>button:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control>button:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>button:not(:last-child):after{background:var(--tint-400)}segmented-control>dropdown-menu{display:inline-flex;align-items:stretch;height:auto}segmented-control>dropdown-menu>[slot=trigger]{height:auto;position:relative}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>dropdown-menu:first-child>[slot=trigger]{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>dropdown-menu:last-child>[slot=trigger]{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>dropdown-menu:not(:first-child):not(:last-child)>[slot=trigger]{border-radius:0}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control[variant=glass]>button,segmented-control[variant=glass]>dropdown-menu{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}segmented-control[variant=glass]>button:not(:disabled):hover,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):hover){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled):active,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):active){backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}segmented-control[variant=glass]>button:not(:disabled)[aria-pressed=true],segmented-control[variant=glass]>button:not(:disabled)[aria-current]:not([aria-current=false]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-pressed=true]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-current]:not([aria-current=false])){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled)[aria-expanded=true],segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-expanded=true]){backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}segmented-control>dropdown-menu:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>dropdown-menu:not(:last-child):after{background:var(--tint-400)}ui-spinner{display:inline-flex;align-items:center;justify-content:center;line-height:0;color:inherit}ui-spinner .spin,.spin{display:inline-flex;animation:ui-spinner-spin 1s steps(8,end) infinite}@keyframes ui-spinner-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spin{animation:none}}system-modal{display:flex;flex-direction:column;width:min(400px,100%);box-sizing:border-box;padding:var(--space-32) var(--space-24);border-radius:var(--radius-12)}system-modal header{display:flex;flex-direction:column;align-items:center;gap:var(--space-16);text-align:center}system-modal header>hgroup{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);max-width:100%}system-modal header h2{margin:0;font-size:var(--text-lg);font-weight:600;letter-spacing:.01em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}system-modal header p{margin:0;font-size:var(--text-base);opacity:.7;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ui-pill{display:inline-block;vertical-align:baseline;margin:2px 0;padding:0 var(--space-8);font-size:var(--text-sm);font-weight:500;line-height:1.7;border-radius:var(--radius-full);border:1px solid var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900);white-space:nowrap}ui-pill[color=gray]{border-color:var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900)}ui-pill[color=red]{border-color:var(--red-200);background:var(--red-100);color:var(--red-950)}ui-pill[color=orange]{border-color:var(--orange-200);background:var(--orange-100);color:var(--orange-950)}ui-pill[color=yellow]{border-color:var(--yellow-200);background:var(--yellow-100);color:var(--yellow-950)}ui-pill[color=green]{border-color:var(--green-200);background:var(--green-100);color:var(--green-950)}ui-pill[color=blue]{border-color:var(--blue-200);background:var(--blue-100);color:var(--blue-950)}ui-pill[color=purple]{border-color:var(--purple-200);background:var(--purple-100);color:var(--purple-950)}',Qh=new CSSStyleSheet;Qh.replaceSync(MA);const ed=new CSSStyleSheet;try{document.adoptedStyleSheets=[...document.adoptedStyleSheets,Qh,ed]}catch{}hv(document);function dv(n){ed.replaceSync(n)}function il(){dv("")}function td(n){try{n.adoptedStyleSheets=[...n.adoptedStyleSheets,Qh,ed]}catch{}hv(n)}const NA=new Set(["target","currentTarget","eventPhase","defaultPrevented","isTrusted","timeStamp","srcElement","returnValue","cancelBubble","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","composedPath","stopPropagation","stopImmediatePropagation","preventDefault","initEvent"]);function UA(n){for(const t of Object.keys(n))if(NA.has(t))throw new Error(`Event payload key "${t}" is reserved; choose a different property name`)}function FA(n,t){UA(t);for(const e of Object.keys(t))Object.defineProperty(n,e,{value:t[e],writable:!0,enumerable:!0,configurable:!0})}function He(){class n extends Event{constructor(e,r){const{type:i,bubbles:s,cancelable:o,composed:a,...c}=r??{};if(i!==void 0)throw new Error('Do not pass "type" in init; use the constructor argument instead');super(e,{bubbles:s,cancelable:o,composed:a}),FA(this,c)}}return n}class tn extends globalThis.EventTarget{}function HA(n,t,e){const r=n.dispose.bind(n);n.dispose=()=>{if(!t())return e(),r()}}function Yo(n){var e;class t extends n{constructor(...s){super(...s);w(this,e,!1);HA(this,()=>l(this,e),()=>{S(this,e,!0)})}[Symbol.dispose](){this.dispose()}get disposed(){return l(this,e)}}return e=new WeakMap,t}const WA=He(),ZA=He(),VA=He(),Da=He(),BA=He(),Wc=He(),pv="0123456789ABCDEFGHJKMNPQRSTVWXYZ",sl=32,jA=16,fv=10,Lf=0xffffffffffff;var pr;(function(n){n.Base32IncorrectEncoding="B32_ENC_INVALID",n.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",n.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",n.EncodeTimeNegative="ENC_TIME_NEG",n.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",n.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",n.PRNGDetectFailure="PRNG_DETECT",n.ULIDInvalid="ULID_INVALID",n.Unexpected="UNEXPECTED",n.UUIDInvalid="UUID_INVALID"})(pr||(pr={}));class Ss extends Error{constructor(t,e){super(`${e} (${t})`),this.name="ULIDError",this.code=t}}function GA(n){const t=Math.floor(n()*sl)%sl;return pv.charAt(t)}function qA(n){const t=YA(),e=t&&(t.crypto||t.msCrypto)||null;if(typeof(e==null?void 0:e.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]/256};if(typeof(e==null?void 0:e.randomBytes)=="function")return()=>e.randomBytes(1).readUInt8()/256;throw new Ss(pr.PRNGDetectFailure,"Failed to find a reliable PRNG")}function YA(){return JA()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function XA(n,t){let e="";for(;n>0;n--)e=GA(t)+e;return e}function KA(n,t=fv){if(isNaN(n))throw new Ss(pr.EncodeTimeValueMalformed,`Time must be a number: ${n}`);if(n>Lf)throw new Ss(pr.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Lf}: ${n}`);if(n<0)throw new Ss(pr.EncodeTimeNegative,`Time must be positive: ${n}`);if(Number.isInteger(n)===!1)throw new Ss(pr.EncodeTimeValueMalformed,`Time must be an integer: ${n}`);let e,r="";for(let i=t;i>0;i--)e=n%sl,r=pv.charAt(e)+r,n=(n-e)/sl;return r}function JA(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Wl(n,t){const e=qA(),r=Date.now();return KA(r,fv)+XA(jA,e)}const Fe=4,ct=6,Ns=2,Su=2,nd=8,QA=ct,rd="auto",Vn="auto",Tn=120,zf=50,se=16,Dr=Tn*Fe+se*(Fe-1),Us=Tn*ct+se*(ct-1),e1=Dr+se*2,t1=200,n1=4,ma=150,r1=10,Of=2,Mf=8,i1=300,s1=4;function gv(n){return yv(n)}function mv(n,t){return yv(n.flatMap(e=>wv(e,t)))}function vv(n){const t=[],e=new Set;for(const r of n){if(r.type==="row"){t.push(`Top-level rows are invalid: ${r.id}`);continue}Sv(r,"strip",t,e)}return{valid:t.length===0,errors:t}}function fr(n){const t=gv(n),e=vv(t);if(!e.valid)throw new Error(`Invalid layout: ${e.errors.join("; ")}`);return{totalNodes:t.length,nodes:t.filter(r=>r.type!=="row").map(c1)}}function yv(n){const t=[];for(const e of n){const r=bv(e);for(const i of r){if(i.type==="row"){t.push(...i.children.map(bn));continue}t.push(i)}}return t}function bv(n){switch(n.type){case"card":return[bn(n)];case"row":{const t=n.children.map(bn);return t.length===0?[]:t.length===1?[t[0]]:[{...n,children:t}]}case"stack":{const t=[];for(const e of n.children){const r=bv(e);for(const i of r){if(i.type==="stack"){t.push(...i.children.map(_u));continue}if(i.type==="row"){t.push({...i,children:i.children.map(bn)});continue}t.push(bn(i))}}return t.length===0?[]:t.length===1?[_u(t[0])]:[{...n,children:t}]}}}function wv(n,t){switch(n.type){case"card":return n.artifactID===t?[]:[bn(n)];case"row":{const e=n.children.filter(r=>r.artifactID!==t).map(bn);return e.length===0?[]:e.length===1?[e[0]]:[{...n,children:e}]}case"stack":{const e=n.children.flatMap(r=>wv(r,t).filter(s=>s.type!=="stack"));return e.length===0?[]:e.length===1?[_u(e[0])]:[{...n,children:e}]}}}function Sv(n,t,e,r){switch(n.type){case"card":_v(n,t,e,r);return;case"row":o1(n,t,e,r);return;case"stack":a1(n,t,e,r);return}}function _v(n,t,e,r){id(n.id,e),typeof n.artifactID!="string"||n.artifactID.length===0?e.push(`Card ${n.id} is missing artifactID`):r.has(n.artifactID)?e.push(`Duplicate artifactID in layout: ${n.artifactID}`):r.add(n.artifactID),l1(n.width)||e.push(`Card ${n.id} width must be an integer in the range ${Ns}-${nd}`),kv(n.height)||e.push(`Card ${n.id} height must be an integer in the range 2-6 or "auto"`);const i=pi(n.width);t==="stack"&&i!==Fe&&e.push(`Stack child ${n.id} width must be ${Fe}`),t==="row"&&i<Ns&&e.push(`Row child ${n.id} must be at least 2 columns wide`)}function o1(n,t,e,r){if(id(n.id,e),t!=="stack"&&e.push(`Row ${n.id} may only appear inside a stack`),kv(n.height,s1)||e.push(`Row ${n.id} height must be an integer in the range 2-4 or "auto"`),!Array.isArray(n.children)||n.children.length===0){e.push(`Row ${n.id} must contain card nodes`);return}let i=0;for(const s of n.children){if(s.type!=="card"){e.push(`Row ${n.id} must contain only card nodes`);continue}_v(s,"row",e,r),i+=pi(s.width)}i!==Fe&&e.push(`Row ${n.id} children must sum to 4 columns`)}function a1(n,t,e,r){if(id(n.id,e),t!=="strip"&&e.push(`Invalid nested stack at ${n.id}; stack children cannot contain another nested stack`),!Array.isArray(n.children)||n.children.length===0){e.push(`Stack ${n.id} must contain at least one child`);return}let i=0,s=0;for(const a of n.children){if(a.type==="stack"){e.push(`Stack ${n.id} cannot contain another nested stack`);continue}if(Sv(a,"stack",e,r),a.height===Vn){s+=1;continue}i+=a.height}if(i>ct&&e.push(`Stack ${n.id} exceeds the 6-row budget`),s===0)return;const o=ct-i;if(o<s*Su||o%s!==0){e.push(`Stack ${n.id} has auto-height children that cannot resolve to whole height >= 2`);return}o/s<Su&&e.push(`Stack ${n.id} has auto-height children below the minimum row size`)}function id(n,t){(typeof n!="string"||n.length===0)&&t.push(`Node id must be a non-empty string: ${String(n)}`)}function l1(n){return n===rd||Number.isInteger(n)&&n>=Ns&&n<=nd}function kv(n,t=QA){return n===Vn||Number.isInteger(n)&&n>=Su&&n<=t}function pi(n){return n===rd?Fe:n}function c1(n){if(n.type==="card")return{id:n.id,type:"card",width:pi(n.width),cards:[{id:n.id,artifactID:n.artifactID,col:1,row:1,width:pi(n.width),height:xv(n.height,ct)}]};const t=u1(n.children),e=[];let r=1;for(let i=0;i<n.children.length;i+=1){const s=n.children[i],o=t[i];if(s.type==="card")e.push({id:s.id,artifactID:s.artifactID,col:1,row:r,width:Fe,height:o});else{let a=1;for(const c of s.children)e.push({id:c.id,artifactID:c.artifactID,col:a,row:r,width:pi(c.width),height:o}),a+=pi(c.width)}r+=o}return{id:n.id,type:"stack",width:e.reduce((i,s)=>Math.max(i,s.col+s.width-1),1),cards:e}}function u1(n){let t=0,e=0;for(const i of n)i.height===Vn?e+=1:t+=i.height;const r=e>0?(ct-t)/e:0;return n.map(i=>xv(i.height,r))}function xv(n,t){return n===Vn?t:n}function bn(n){return{...n}}function _u(n){return n.type==="card"?bn(n):{...n,children:n.children.map(bn)}}function Ev(n,t={}){return{id:t.id??Wl(),type:"card",artifactID:n,width:t.width??rd,height:t.height??Vn}}function Av(n,t){return n.some(e=>$v(e,t))}function $v(n,t){switch(n.type){case"card":return n.artifactID===t;case"row":return n.children.some(e=>e.artifactID===t);case"stack":return n.children.some(e=>$v(e,t))}}function Nf(n){return n.layout.flatMap(Tv)}function Tv(n){switch(n.type){case"card":return[n.artifactID];case"row":return n.children.map(t=>t.artifactID);case"stack":return n.children.flatMap(Tv)}}const le=He(),ku=He(),ei=He(),h1=He();function d1(n){class t extends Error{constructor(r,i){super(r),this.name=n,i&&Object.assign(this,i)}}return t}const Iv=d1("RequestError"),p1=200,f1=300;class g1{constructor(t,e){g(this,"serverURL");g(this,"token");this.serverURL=t.replace(/\/$/,""),this.token=e.token}async requestJSON(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0),s=await m1(i);if(!i.ok||i.status<p1||i.status>=f1)throw this.createError(typeof s.error=="string"?s.error:i.statusText,i.status);return s}async requestVoid(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0);if(!i.ok)throw this.createError(await Zc(i,i.statusText),i.status)}async requestText(t,e){const r=await this.request(t,e);if(!r.ok)throw this.createError(await Zc(r,r.statusText),r.status);return r.text()}async requestRawVoid(t,e,r){const i=await this.request(t,e,r,{"content-type":"text/plain"});if(!i.ok)throw this.createError(await Zc(i,i.statusText),i.status)}createError(t,e){const r={serverURL:this.serverURL};return e!==void 0&&(r.status=e),new Iv(t,r)}async request(t,e,r,i){const s=`${this.serverURL}${e}`;try{return await fetch(s,{method:t,headers:this.buildHeaders(i),body:r})}catch(o){throw this.createError(o instanceof Error?o.message:"Failed to reach server")}}buildHeaders(t){const e={...t??{}};return this.token&&(e.Authorization=`Bearer ${this.token}`),Object.keys(e).length>0?e:void 0}}async function m1(n){try{return await n.json()}catch{const t=await n.text().catch(()=>"");return t?{message:t}:{}}}async function Zc(n,t){try{const e=await n.json();if(typeof e.error=="string")return e.error;if(typeof e.message=="string")return e.message}catch{}return t}function v1(n){return n.map(t=>`${t.name} (${t.id})`).join(", ")}var Mt,yl,Cv;class y1{constructor(t){w(this,yl);w(this,Mt);S(this,Mt,t)}list(){return l(this,Mt).requestJSON("GET","/screens")}async get(t={}){const e=await f(this,yl,Cv).call(this,t.screenID);return l(this,Mt).requestJSON("GET",`/screens/${encodeURIComponent(e)}`)}create(t){const e={name:t.name};return t.id!==void 0&&(e.id=t.id),l(this,Mt).requestJSON("POST","/screens",e)}update(t){const{screenID:e,...r}=t;return l(this,Mt).requestJSON("PATCH",`/screens/${encodeURIComponent(e)}`,r)}remove(t){return l(this,Mt).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}`)}}Mt=new WeakMap,yl=new WeakSet,Cv=async function(t){if(t!==void 0)return t;const{screens:e}=await this.list();if(e.length===1)return e[0].id;throw l(this,Mt).createError(`screenID is required when multiple screens exist. Available screens: ${v1(e)}`)};var Ue;class b1{constructor(t){w(this,Ue);S(this,Ue,t)}create(t){const e={kind:t.kind,title:t.title};switch(t.kind){case"markdown":e.externalFilePath=t.externalFilePath;break;case"url":e.externalURL=t.externalURL;break;case"web-bundle":t.skipPending!==void 0&&(e.skipPending=t.skipPending);break}return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,Ue).requestJSON("POST","/artifacts",e)}list(t={}){const e=new URLSearchParams;t.screenID!==void 0&&e.set("screenID",t.screenID),t.unplaced&&e.set("unplaced","true");const r=e.toString();return l(this,Ue).requestJSON("GET",r?`/artifacts?${r}`:"/artifacts")}get(t){return l(this,Ue).requestJSON("GET",`/artifacts/${encodeURIComponent(t.artifactID)}`)}update(t){const e={};return t.title!==void 0&&(e.title=t.title),l(this,Ue).requestJSON("PATCH",`/artifacts/${encodeURIComponent(t.artifactID)}`,e)}edit(t){return l(this,Ue).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/edit`)}commitPending(t){return l(this,Ue).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/commit`)}abandonPending(t){return l(this,Ue).requestVoid("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/abandon`)}attach(t){return l(this,Ue).requestJSON("POST",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}detach(t){return l(this,Ue).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}delete(t){return l(this,Ue).requestJSON("DELETE",`/artifacts/${encodeURIComponent(t.artifactID)}`)}getContent(t){return l(this,Ue).requestText("GET",`/artifacts/${encodeURIComponent(t.artifactID)}/content`)}putContent(t){return l(this,Ue).requestRawVoid("PUT",`/artifacts/${encodeURIComponent(t.artifactID)}/content`,t.content)}}Ue=new WeakMap;var mr;class w1{constructor(t){w(this,mr);S(this,mr,t)}get(){return l(this,mr).requestJSON("GET","/display")}patch(t){const e={};return t.activeScreenID!==void 0&&(e.activeScreenID=t.activeScreenID),t.activeThemeName!==void 0&&(e.activeThemeName=t.activeThemeName),l(this,mr).requestVoid("PATCH","/display",e)}focus(t){const e={artifactID:t.artifactID};return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,mr).requestJSON("POST","/display/focus",e)}}mr=new WeakMap;var Bs;class S1{constructor(t){w(this,Bs);S(this,Bs,t)}async list(){const{views:t}=await l(this,Bs).requestJSON("GET","/views");return t}}Bs=new WeakMap;var pn;class _1{constructor(t,e={}){g(this,"screens");g(this,"artifacts");g(this,"display");g(this,"views");w(this,pn);S(this,pn,new g1(t,e)),this.screens=new y1(l(this,pn)),this.artifacts=new b1(l(this,pn)),this.display=new w1(l(this,pn)),this.views=new S1(l(this,pn))}health(){return l(this,pn).requestJSON("GET","/health")}}pn=new WeakMap;const k1={focusCommandInput:{label:"Focus Command Input",trigger:{key:"k",meta:!0}}},x1="Local",E1="store-";function be(n){return new URL(n).origin}function A1(n){return{servers:[{url:be(n),name:x1}],activeServerURL:null,activeScreenID:null,tabs:{},screens:{}}}function $1(n,t){return[...n.tabs[be(t)]??[]]}function T1(n,t,e){const r=be(t),i=n.tabs[r]??[];return i.includes(e)?n:{...n,tabs:{...n.tabs,[r]:[...i,e]}}}function I1(n,t,e){const r=be(t),i=n.tabs[r]??[],s=i.filter(a=>a!==e);if(s.length===i.length)return n;const o={...n.tabs};return s.length===0?delete o[r]:o[r]=s,{...n,tabs:o}}function C1(n,t,e=Date.now()){const r=n.screens[t]??{scrollPosition:0};return{...n,screens:{...n.screens,[t]:{...r,lastActivatedAt:e}}}}var vr,yr,br;class R1 extends tn{constructor(e,r,i={}){super();w(this,vr);w(this,yr);w(this,br);S(this,vr,`${E1}${e}`),S(this,yr,i.storage??P1());const s=l(this,yr).getItem(l(this,vr));s===null?(S(this,br,r),l(this,yr).setItem(l(this,vr),JSON.stringify(r))):S(this,br,D1(JSON.parse(s),r))}get(){return l(this,br)}set(e){S(this,br,e),l(this,yr).setItem(l(this,vr),JSON.stringify(e)),this.dispatchEvent(new le("change"))}}vr=new WeakMap,yr=new WeakMap,br=new WeakMap;function P1(){const n=globalThis.localStorage;if(!n)throw new Error("LocalStore: no storage adapter supplied and window.localStorage is unavailable");return n}function D1(n,t){return{servers:Array.isArray(n.servers)?n.servers:t.servers,activeServerURL:typeof n.activeServerURL=="string"||n.activeServerURL===null?n.activeServerURL:t.activeServerURL,activeScreenID:typeof n.activeScreenID=="string"||n.activeScreenID===null?n.activeScreenID:t.activeScreenID,tabs:n.tabs&&typeof n.tabs=="object"?n.tabs:t.tabs,screens:n.screens&&typeof n.screens=="object"?n.screens:t.screens}}const L1=Yo(tn);var wr,Je,Sr,Ve,Cn,Rn,te,ri,Rv,js,Pv,Dv,Lv,zv,xu,Eu,Au,Ov;class z1 extends L1{constructor(e){var i;super();w(this,te);g(this,"id");g(this,"server");w(this,wr);w(this,Je,new Map);w(this,Sr);w(this,Ve);w(this,Cn);w(this,Rn,null);w(this,js,e=>{if(this.disposed)return;const r=e.event;switch(r.type){case"screen-updated":r.screen.id===this.id&&f(this,te,Pv).call(this,r.screen);break;case"artifact-created":break;case"artifact-attached":r.screenID===this.id&&f(this,te,Dv).call(this,r.cardID,r.artifact);break;case"artifact-updated":f(this,te,Lv).call(this,r.artifact);break;case"artifact-removed":r.screenID===this.id&&f(this,te,zv).call(this,r.artifactID);break;case"artifact-content-changed":l(this,Je).has(r.artifactID)&&this.dispatchEvent(new h1("artifact-content-changed",{artifactID:r.artifactID}));break}});this.id=e.screen.id,this.server=e.server,S(this,wr,e.localStore),S(this,Sr,e.screen.name),S(this,Ve,structuredClone(e.screen.layout));const r=((i=l(this,wr).get().screens[this.id])==null?void 0:i.scrollPosition)??0;S(this,Cn,Math.max(0,r)),this.server.addEventListener("server-event",l(this,js)),f(this,te,Rv).call(this)}get name(){return l(this,Sr)}get layout(){return l(this,Ve)}get scrollPosition(){return l(this,Cn)}get artifacts(){return l(this,Je)}setScrollPosition(e){f(this,te,ri).call(this);const r=Math.max(0,e);r!==l(this,Cn)&&(S(this,Cn,r),f(this,te,Ov).call(this),this.dispatchEvent(new le("change")))}setLayout(e){f(this,te,ri).call(this);const r=gv(e);if(!vv(r).valid)return;const s=f(this,te,Eu).call(this);S(this,Ve,r),S(this,Rn,{layout:r,snapshot:s}),this.dispatchEvent(new le("change")),this.server.client.screens.update({screenID:this.id,layout:r.map(o=>structuredClone(o))}).catch(()=>{var o;this.disposed||((o=l(this,Rn))==null?void 0:o.layout)===r&&(S(this,Rn,null),f(this,te,Au).call(this,s),this.dispatchEvent(new le("change")))})}rename(e){f(this,te,ri).call(this),S(this,Sr,e),this.dispatchEvent(new le("change")),this.server.client.screens.update({screenID:this.id,name:e}).catch(()=>{})}async remove(){f(this,te,ri).call(this),await this.server.client.screens.remove({screenID:this.id})}removeArtifact(e){if(f(this,te,ri).call(this),!l(this,Je).has(e))return;const r=f(this,te,Eu).call(this);f(this,te,xu).call(this,e),this.dispatchEvent(new le("change")),this.server.client.artifacts.detach({artifactID:e,screenID:this.id}).catch(()=>{this.disposed||(f(this,te,Au).call(this,r),this.dispatchEvent(new le("change")))})}dispose(){this.server.removeEventListener("server-event",l(this,js))}}wr=new WeakMap,Je=new WeakMap,Sr=new WeakMap,Ve=new WeakMap,Cn=new WeakMap,Rn=new WeakMap,te=new WeakSet,ri=function(){if(this.disposed)throw new Error("ScreenModel is disposed")},Rv=async function(){try{const e=await this.server.client.screens.get({screenID:this.id});if(this.disposed)return;for(const r of e.artifacts)l(this,Je).set(r.id,r);this.dispatchEvent(new le("change"))}catch{}},js=new WeakMap,Pv=function(e){l(this,Rn)&&S(this,Rn,null),S(this,Sr,e.name),S(this,Ve,structuredClone(e.layout)),this.dispatchEvent(new le("change"))},Dv=function(e,r){Av(l(this,Ve),r.id)||S(this,Ve,[...l(this,Ve),Ev(r.id,{id:e})]),l(this,Je).set(r.id,r),this.dispatchEvent(new le("change"))},Lv=function(e){const r=l(this,Je).get(e.id);r&&(l(this,Je).set(e.id,{...r,...e}),this.dispatchEvent(new le("change")))},zv=function(e){f(this,te,xu).call(this,e)&&this.dispatchEvent(new le("change"))},xu=function(e){const r=l(this,Je).delete(e),i=Nf({layout:l(this,Ve)}).length,s=mv(l(this,Ve),e),o=Nf({layout:s}).length;return S(this,Ve,s),r||i!==o},Eu=function(){return{layout:structuredClone(l(this,Ve)),artifacts:new Map([...l(this,Je).entries()].map(([e,r])=>[e,structuredClone(r)]))}},Au=function(e){S(this,Ve,structuredClone(e.layout)),l(this,Je).clear();for(const[r,i]of e.artifacts)l(this,Je).set(r,structuredClone(i))},Ov=function(){const e=l(this,wr).get();l(this,wr).set({...e,screens:{...e.screens,[this.id]:{...e.screens[this.id],scrollPosition:l(this,Cn)}}})};const O1=Yo(tn);var Te,Be,Nt,Gs,qs,Ys,Ge,La,$u,ii;class M1 extends O1{constructor(e){super();w(this,Ge);w(this,Te);w(this,Be);w(this,Nt,null);w(this,Gs,()=>{this.disposed||f(this,Ge,La).call(this)});w(this,qs,()=>{this.disposed||f(this,Ge,La).call(this)});w(this,Ys,e=>{if(this.disposed)return;const r=e.event;if(r.type==="screen-removed"){this.removeTab(e.serverURL,r.screenID);const i=l(this,Te).get();i.activeServerURL===be(e.serverURL)&&i.activeScreenID===r.screenID&&f(this,Ge,ii).call(this,e.serverURL,null);return}if(r.type==="screen-changed"){if(r.screenID===null){f(this,Ge,ii).call(this,e.serverURL,null);return}const i=l(this,Be).servers.get(be(e.serverURL));if(!i||!i.screens.has(r.screenID))return;this.addTab(e.serverURL,r.screenID),f(this,Ge,ii).call(this,e.serverURL,r.screenID)}});S(this,Te,e.localStore),S(this,Be,e.serverManager),l(this,Te).addEventListener("change",l(this,Gs)),l(this,Be).addEventListener("change",l(this,qs)),l(this,Be).addEventListener("server-event",l(this,Ys)),f(this,Ge,La).call(this)}get activeScreen(){return l(this,Nt)}get screens(){const e=l(this,Te).get().screens,r=[];let i=0;for(const s of l(this,Be).servers.values())for(const o of s.screens.values())r.push({server:s,screen:o,local:e[o.id]??{scrollPosition:0},index:i}),i+=1;return r.sort((s,o)=>{const a=(o.local.lastActivatedAt??0)-(s.local.lastActivatedAt??0);return a===0?s.index-o.index:a}).map(({index:s,...o})=>o)}getTabs(e){const r=be(e),i=$1(l(this,Te).get(),r),s=l(this,Be).servers.get(r);return s?i.filter(o=>s.screens.has(o)):i}hasTab(e,r){return this.getTabs(e).includes(r)}addTab(e,r){const i=be(e),s=l(this,Be).servers.get(i);s&&!s.screens.has(r)||f(this,Ge,$u).call(this,T1(l(this,Te).get(),i,r))}removeTab(e,r){f(this,Ge,$u).call(this,I1(l(this,Te).get(),e,r))}setActive(e,r){const i=be(e),s=l(this,Be).servers.get(i);!s||!s.screens.has(r)||f(this,Ge,ii).call(this,i,r)&&s.client.display.patch({activeScreenID:r}).catch(()=>{})}clearActive(){const e=l(this,Te).get().activeServerURL;if(!e||!f(this,Ge,ii).call(this,e,null))return;const r=l(this,Be).servers.get(e);r==null||r.client.display.patch({activeScreenID:null}).catch(()=>{})}dispose(){var e;l(this,Te).removeEventListener("change",l(this,Gs)),l(this,Be).removeEventListener("change",l(this,qs)),l(this,Be).removeEventListener("server-event",l(this,Ys)),(e=l(this,Nt))==null||e.dispose(),S(this,Nt,null)}}Te=new WeakMap,Be=new WeakMap,Nt=new WeakMap,Gs=new WeakMap,qs=new WeakMap,Ys=new WeakMap,Ge=new WeakSet,La=function(){var c,u,h;const{activeServerURL:e,activeScreenID:r}=l(this,Te).get(),i=e?l(this,Be).servers.get(e)??null:null,s=i&&r?i.screens.get(r)??null:null,o=((c=l(this,Nt))==null?void 0:c.id)??null,a=(s==null?void 0:s.id)??null;o===a&&((u=l(this,Nt))==null?void 0:u.server)===i||((h=l(this,Nt))==null||h.dispose(),S(this,Nt,i&&s?new z1({screen:s,server:i,localStore:l(this,Te)}):null),i&&i.acpClient.setScreenContext(s?{screenID:s.id,screenName:s.name}:null),this.dispatchEvent(new WA("active-screen-changed")))},$u=function(e){e!==l(this,Te).get()&&(l(this,Te).set(e),this.dispatchEvent(new ZA("tabs-changed")))},ii=function(e,r){const i=be(e),s=l(this,Te).get();if(s.activeServerURL===i&&s.activeScreenID===r)return!1;const o=r===null?{...s,activeServerURL:i,activeScreenID:r}:C1({...s,activeServerURL:i,activeScreenID:r},r);return l(this,Te).set(o),!0};function A(n,t,e){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(n))return;a._zod.traits.add(n),t(a,c);const u=o.prototype,h=Object.keys(u);for(let p=0;p<h.length;p++){const v=h[p];v in a||(a[v]=u[v].bind(a))}}const i=(e==null?void 0:e.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:n});function o(a){var c;const u=e!=null&&e.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const h of u._zod.deferred)h();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var c,u;return e!=null&&e.Parent&&a instanceof e.Parent?!0:(u=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:u.has(n)}}),Object.defineProperty(o,"name",{value:n}),o}class vi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Mv extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Nv={};function Bn(n){return Nv}function Uv(n){const t=Object.values(n).filter(r=>typeof r=="number");return Object.entries(n).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Tu(n,t){return typeof t=="bigint"?t.toString():t}function sd(n){return{get value(){{const t=n();return Object.defineProperty(this,"value",{value:t}),t}}}}function od(n){return n==null}function ad(n){const t=n.startsWith("^")?1:0,e=n.endsWith("$")?n.length-1:n.length;return n.slice(t,e)}function N1(n,t){const e=(n.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c!=null&&c[1]&&(i=Number.parseInt(c[1]))}const s=e>i?e:i,o=Number.parseInt(n.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}const Uf=Symbol("evaluating");function ne(n,t,e){let r;Object.defineProperty(n,t,{get(){if(r!==Uf)return r===void 0&&(r=Uf,r=e()),r},set(i){Object.defineProperty(n,t,{value:i})},configurable:!0})}function Wr(n,t,e){Object.defineProperty(n,t,{value:e,writable:!0,enumerable:!0,configurable:!0})}function Kn(...n){const t={};for(const e of n){const r=Object.getOwnPropertyDescriptors(e);Object.assign(t,r)}return Object.defineProperties({},t)}function Ff(n){return JSON.stringify(n)}function U1(n){return n.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Fv="captureStackTrace"in Error?Error.captureStackTrace:(...n)=>{};function ol(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}const F1=sd(()=>{var n;if(typeof navigator<"u"&&((n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Vi(n){if(ol(n)===!1)return!1;const t=n.constructor;if(t===void 0||typeof t!="function")return!0;const e=t.prototype;return!(ol(e)===!1||Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")===!1)}function Hv(n){return Vi(n)?{...n}:Array.isArray(n)?[...n]:n}const H1=new Set(["string","number","symbol"]);function Bi(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jn(n,t,e){const r=new n._zod.constr(t??n._zod.def);return(!t||e!=null&&e.parent)&&(r._zod.parent=n),r}function M(n){const t=n;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0: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 W1(n){return Object.keys(n).filter(t=>n[t]._zod.optin==="optional"&&n[t]._zod.optout==="optional")}const Z1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function V1(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Kn(n._zod.def,{get shape(){const o={};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=e.shape[a])}return Wr(this,"shape",o),o},checks:[]});return Jn(n,s)}function B1(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Kn(n._zod.def,{get shape(){const o={...n._zod.def.shape};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return Wr(this,"shape",o),o},checks:[]});return Jn(n,s)}function j1(n,t){if(!Vi(t))throw new Error("Invalid input to extend: expected a plain object");const e=n._zod.def.checks;if(e&&e.length>0){const s=n._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Kn(n._zod.def,{get shape(){const s={...n._zod.def.shape,...t};return Wr(this,"shape",s),s}});return Jn(n,i)}function G1(n,t){if(!Vi(t))throw new Error("Invalid input to safeExtend: expected a plain object");const e=Kn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t};return Wr(this,"shape",r),r}});return Jn(n,e)}function q1(n,t){const e=Kn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t._zod.def.shape};return Wr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Jn(n,e)}function Y1(n,t,e){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Kn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(e)for(const u in e){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);e[u]&&(c[u]=n?new n({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=n?new n({type:"optional",innerType:a[u]}):a[u];return Wr(this,"shape",c),c},checks:[]});return Jn(t,o)}function X1(n,t,e){const r=Kn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(e)for(const o in e){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(s[o]=new n({type:"nonoptional",innerType:i[o]}))}else for(const o in i)s[o]=new n({type:"nonoptional",innerType:i[o]});return Wr(this,"shape",s),s}});return Jn(t,r)}function fi(n,t=0){var e;if(n.aborted===!0)return!0;for(let r=t;r<n.issues.length;r++)if(((e=n.issues[r])==null?void 0:e.continue)!==!0)return!0;return!1}function gi(n,t){return t.map(e=>{var r;return(r=e).path??(r.path=[]),e.path.unshift(n),e})}function va(n){return typeof n=="string"?n:n==null?void 0:n.message}function jn(n,t,e){var i,s,o,a,c,u;const r={...n,path:n.path??[]};if(!n.message){const h=va((o=(s=(i=n.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:o.call(s,n))??va((a=t==null?void 0:t.error)==null?void 0:a.call(t,n))??va((c=e.customError)==null?void 0:c.call(e,n))??va((u=e.localeError)==null?void 0:u.call(e,n))??"Invalid input";r.message=h}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function ld(n){return Array.isArray(n)?"array":typeof n=="string"?"string":"unknown"}function Fs(...n){const[t,e,r]=n;return typeof t=="string"?{message:t,code:"custom",input:e,inst:r}:{...t}}const Wv=(n,t)=>{n.name="$ZodError",Object.defineProperty(n,"_zod",{value:n._zod,enumerable:!1}),Object.defineProperty(n,"issues",{value:t,enumerable:!1}),n.message=JSON.stringify(t,Tu,2),Object.defineProperty(n,"toString",{value:()=>n.message,enumerable:!1})},Zv=A("$ZodError",Wv),Vv=A("$ZodError",Wv,{Parent:Error});function K1(n,t=e=>e.message){const e={},r=[];for(const i of n.issues)i.path.length>0?(e[i.path[0]]=e[i.path[0]]||[],e[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:e}}function J1(n,t=e=>e.message){const e={_errors:[]},r=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>r({issues:o}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)e._errors.push(t(s));else{let o=e,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],a++}}};return r(n),e}const cd=n=>(t,e,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise)throw new vi;if(o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>jn(c,s,Bn())));throw Fv(a,i==null?void 0:i.callee),a}return o.value},ud=n=>async(t,e,r,i)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>jn(c,s,Bn())));throw Fv(a,i==null?void 0:i.callee),a}return o.value},Zl=n=>(t,e,r)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:e,issues:[]},i);if(s instanceof Promise)throw new vi;return s.issues.length?{success:!1,error:new(n??Zv)(s.issues.map(o=>jn(o,i,Bn())))}:{success:!0,data:s.value}},Q1=Zl(Vv),Vl=n=>async(t,e,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:e,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new n(s.issues.map(o=>jn(o,i,Bn())))}:{success:!0,data:s.value}},e$=Vl(Vv),t$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return cd(n)(t,e,i)},n$=n=>(t,e,r)=>cd(n)(t,e,r),r$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ud(n)(t,e,i)},i$=n=>async(t,e,r)=>ud(n)(t,e,r),s$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zl(n)(t,e,i)},o$=n=>(t,e,r)=>Zl(n)(t,e,r),a$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vl(n)(t,e,i)},l$=n=>async(t,e,r)=>Vl(n)(t,e,r),c$=/^[cC][^\s-]{8,}$/,u$=/^[0-9a-z]+$/,h$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,d$=/^[0-9a-vA-V]{20}$/,p$=/^[A-Za-z0-9]{27}$/,f$=/^[a-zA-Z0-9_-]{21}$/,g$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,m$=/^([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})$/,Hf=n=>n?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${n}[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)$/,v$=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,y$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function b$(){return new RegExp(y$,"u")}const w$=/^(?:(?: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])$/,S$=/^(([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}|:))$/,_$=/^((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])$/,k$=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,x$=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bv=/^[A-Za-z0-9_-]*$/,E$=/^\+[1-9]\d{6,14}$/,jv="(?:(?:\\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])))",A$=new RegExp(`^${jv}$`);function Gv(n){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof n.precision=="number"?n.precision===-1?`${t}`:n.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${n.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $$(n){return new RegExp(`^${Gv(n)}$`)}function T$(n){const t=Gv({precision:n.precision}),e=["Z"];n.local&&e.push(""),n.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${e.join("|")})`;return new RegExp(`^${jv}T(?:${r})$`)}const I$=n=>{const t=n?`[\\s\\S]{${(n==null?void 0:n.minimum)??0},${(n==null?void 0:n.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},C$=/^-?\d+$/,qv=/^-?\d+(?:\.\d+)?$/,R$=/^(?:true|false)$/i,P$=/^[^A-Z]*$/,D$=/^[^a-z]*$/,it=A("$ZodCheck",(n,t)=>{var e;n._zod??(n._zod={}),n._zod.def=t,(e=n._zod).onattach??(e.onattach=[])}),Yv={number:"number",bigint:"bigint",object:"date"},Xv=A("$ZodCheckLessThan",(n,t)=>{it.init(n,t);const e=Yv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:e,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),Kv=A("$ZodCheckGreaterThan",(n,t)=>{it.init(n,t);const e=Yv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:e,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),L$=A("$ZodCheckMultipleOf",(n,t)=>{it.init(n,t),n._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),n._zod.check=e=>{if(typeof e.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof e.value=="bigint"?e.value%t.value===BigInt(0):N1(e.value,t.value)===0)||e.issues.push({origin:typeof e.value,code:"not_multiple_of",divisor:t.value,input:e.value,inst:n,continue:!t.abort})}}),z$=A("$ZodCheckNumberFormat",(n,t)=>{var o;it.init(n,t),t.format=t.format||"float64";const e=(o=t.format)==null?void 0:o.includes("int"),r=e?"int":"number",[i,s]=Z1[t.format];n._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=i,c.maximum=s,e&&(c.pattern=C$)}),n._zod.check=a=>{const c=a.value;if(e){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:n});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort});return}}c<i&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:n,continue:!t.abort}),c>s&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:n,continue:!t.abort})}}),O$=A("$ZodCheckMaxLength",(n,t)=>{var e;it.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!od(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),n._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const o=ld(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),M$=A("$ZodCheckMinLength",(n,t)=>{var e;it.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!od(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),n._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const o=ld(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),N$=A("$ZodCheckLengthEquals",(n,t)=>{var e;it.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!od(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),n._zod.check=r=>{const i=r.value,s=i.length;if(s===t.length)return;const o=ld(i),a=s>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:n,continue:!t.abort})}}),Bl=A("$ZodCheckStringFormat",(n,t)=>{var e,r;it.init(n,t),n._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(e=n._zod).check??(e.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:n,continue:!t.abort})}):(r=n._zod).check??(r.check=()=>{})}),U$=A("$ZodCheckRegex",(n,t)=>{Bl.init(n,t),n._zod.check=e=>{t.pattern.lastIndex=0,!t.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:"regex",input:e.value,pattern:t.pattern.toString(),inst:n,continue:!t.abort})}}),F$=A("$ZodCheckLowerCase",(n,t)=>{t.pattern??(t.pattern=P$),Bl.init(n,t)}),H$=A("$ZodCheckUpperCase",(n,t)=>{t.pattern??(t.pattern=D$),Bl.init(n,t)}),W$=A("$ZodCheckIncludes",(n,t)=>{it.init(n,t);const e=Bi(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${e}`:e);t.pattern=r,n._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),n._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:n,continue:!t.abort})}}),Z$=A("$ZodCheckStartsWith",(n,t)=>{it.init(n,t);const e=new RegExp(`^${Bi(t.prefix)}.*`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:n,continue:!t.abort})}}),V$=A("$ZodCheckEndsWith",(n,t)=>{it.init(n,t);const e=new RegExp(`.*${Bi(t.suffix)}$`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:n,continue:!t.abort})}}),B$=A("$ZodCheckOverwrite",(n,t)=>{it.init(n,t),n._zod.check=e=>{e.value=t.tx(e.value)}});class j${constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
4
|
+
`+t.prev}function ua(n,t){var e=yu(n),r=[];if(e){r.length=n.length;for(var i=0;i<n.length;i++)r[i]=dn(n,i)?t(n[i],n):""}var s=typeof Rc=="function"?Rc(n):[],o;if(Zi){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var c in n)dn(n,c)&&(e&&String(Number(c))===c&&c<n.length||Zi&&o["$"+c]instanceof Symbol||(zm.call(/[^\w$]/,c)?r.push(t(c,n)+": "+t(n[c],n)):r.push(c+": "+t(n[c],n))));if(typeof Rc=="function")for(var u=0;u<s.length;u++)Om.call(n,s[u])&&r.push("["+t(s[u])+"]: "+t(n[s[u]],n));return r}var ix=Qi,sx=X,Nl=function(n,t,e){for(var r=n,i;(i=r.next)!=null;r=i)if(i.key===t)return r.next=i.next,e||(i.next=n.next,n.next=i),i},ox=function(n,t){if(n){var e=Nl(n,t);return e&&e.value}},ax=function(n,t,e){var r=Nl(n,t);r?r.value=e:n.next={key:t,next:n.next,value:e}},lx=function(n,t){return n?!!Nl(n,t):!1},cx=function(n,t){if(n)return Nl(n,t,!0)},ux=function(){var t,e={assert:function(r){if(!e.has(r))throw new sx("Side channel does not contain "+ix(r))},delete:function(r){var i=t&&t.next,s=cx(t,r);return s&&i&&i===s&&(t=void 0),!!s},get:function(r){return ox(t,r)},has:function(r){return lx(t,r)},set:function(r,i){t||(t={next:void 0}),ax(t,r,i)}};return e},hx=yt,Bo=Yn(),dx=Qi,px=X,Qp=hx("%Map%",!0),fx=Bo("Map.prototype.get",!0),gx=Bo("Map.prototype.set",!0),mx=Bo("Map.prototype.has",!0),vx=Bo("Map.prototype.delete",!0),yx=Bo("Map.prototype.size",!0),Wm=!!Qp&&function(){var t,e={assert:function(r){if(!e.has(r))throw new px("Side channel does not contain "+dx(r))},delete:function(r){if(t){var i=vx(t,r);return yx(t)===0&&(t=void 0),i}return!1},get:function(r){if(t)return fx(t,r)},has:function(r){return t?mx(t,r):!1},set:function(r,i){t||(t=new Qp),gx(t,r,i)}};return e},bx=yt,Ul=Yn(),wx=Qi,ha=Wm,Sx=X,Jr=bx("%WeakMap%",!0),_x=Ul("WeakMap.prototype.get",!0),kx=Ul("WeakMap.prototype.set",!0),xx=Ul("WeakMap.prototype.has",!0),Ex=Ul("WeakMap.prototype.delete",!0),Ax=Jr?function(){var t,e,r={assert:function(i){if(!r.has(i))throw new Sx("Side channel does not contain "+wx(i))},delete:function(i){if(Jr&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Ex(t,i)}else if(ha&&e)return e.delete(i);return!1},get:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?_x(t,i):e&&e.get(i)},has:function(i){return Jr&&i&&(typeof i=="object"||typeof i=="function")&&t?xx(t,i):!!e&&e.has(i)},set:function(i,s){Jr&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Jr),kx(t,i,s)):ha&&(e||(e=ha()),e.set(i,s))}};return r}:ha,$x=X,Tx=Qi,Ix=ux,Cx=Wm,Rx=Ax,Px=Rx||Cx||Ix,Dx=function(){var t,e={assert:function(r){if(!e.has(r))throw new $x("Side channel does not contain "+Tx(r))},delete:function(r){return!!t&&t.delete(r)},get:function(r){return t&&t.get(r)},has:function(r){return!!t&&t.has(r)},set:function(r,i){t||(t=Px()),t.set(r,i)}};return e},Lx=kn,hs=Dx(),an=X,Wh={assert:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");if(hs.assert(n),!Wh.has(n,t))throw new an("`"+t+"` is not present on `O`")},get:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");var e=hs.get(n);return e&&e["$"+t]},has:function(n,t){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");var e=hs.get(n);return!!e&&Lx(e,"$"+t)},set:function(n,t,e){if(!n||typeof n!="object"&&typeof n!="function")throw new an("`O` is not an object");if(typeof t!="string")throw new an("`slot` must be a string");var r=hs.get(n);r||(r={},hs.set(n,r)),r["$"+t]=e}};Object.freeze&&Object.freeze(Wh);var Zh=Wh,Zm=Sn,Zn=Zh,jo=function n(t,e){if(!(this instanceof n))return new n(t,e);if(t!=="normal"&&t!=="break"&&t!=="continue"&&t!=="return"&&t!=="throw")throw new Zm('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"');Zn.set(this,"[[Type]]",t),Zn.set(this,"[[Value]]",e)};jo.prototype.type=function(){return Zn.get(this,"[[Type]]")};jo.prototype.value=function(){return Zn.get(this,"[[Value]]")};jo.prototype["?"]=function(){var t=Zn.get(this,"[[Type]]"),e=Zn.get(this,"[[Value]]");if(t==="throw")throw e;return e};jo.prototype["!"]=function(){var t=Zn.get(this,"[[Type]]");if(t!=="normal")throw new Zm('Assertion failed: Completion Record is not of type "normal"');return Zn.get(this,"[[Value]]")};var Vh=jo,zx=Vh,Bh=function(t){return new zx("normal",t)},Dc,ef;function Ox(){if(ef)return Dc;ef=1;var n=Yi;return Dc=function(){return n()&&!!Symbol.toStringTag},Dc}var Mx=yt,tf=Mx("%Object.defineProperty%",!0),Nx=Ox()(),Ux=kn,Fx=X,da=Nx?Symbol.toStringTag:null,Vm=function(t,e){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,i=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof i<"u"&&typeof i!="boolean")throw new Fx("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");da&&(r||!Ux(t,da))&&(tf?tf(t,da,{configurable:!i,enumerable:!1,value:e,writable:!1}):t[da]=e)},Bm={exports:{}},Hx=yt,nf=lm,Wx=zl(),rf=qi,sf=X,Zx=Hx("%Math.floor%"),Vx=function(t,e){if(typeof t!="function")throw new sf("`fn` is not a function");if(typeof e!="number"||e<0||e>4294967295||Zx(e)!==e)throw new sf("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in t&&rf){var o=rf(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(s=!1)}return(i||s||!r)&&(Wx?nf(t,"length",e,!0,!0):nf(t,"length",e)),t},Bx=Fo,jx=Ph,Gx=bm,qx=function(){return Gx(Bx,jx,arguments)};(function(n){var t=Vx,e=Uo,r=Ol,i=qx;n.exports=function(o){var a=r(arguments),c=1+o.length-(arguments.length-1);return t(a,c>0?c:0,!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i})(Bm);var jh=Bm.exports,Yx=function(t,e){for(var r=0;r<t.length;r+=1)if(!e(t[r],r,t))return!1;return!0},Xx=Object,Kx=function(t){return t&&typeof t=="object"&&(typeof t["[[ResourceValue]]"]>"u"||Xx(t["[[ResourceValue]]"])===t["[[ResourceValue]]"])&&(t["[[Hint]]"]==="SYNC-DISPOSE"||t["[[Hint]]"]==="ASYNC-DISPOSE")&&(typeof t["[[DisposeMethod]]"]=="function"||typeof t["[[DisposeMethod]]"]>"u")},Jx=kn,Qx=Dh(),eE=Yx,tE=Kx,nE=function(t){return t&&typeof t=="object"&&Jx(t,"[[DisposableResourceStack]]")&&Qx(t["[[DisposableResourceStack]]"])&&(t["[[DisposableResourceStack]]"].length===0||eE(t["[[DisposableResourceStack]]"],tE))},rE=_n,iE=function(t){if(t===null)return"Null";if(typeof t>"u")return"Undefined";if(rE(t))return"Object";if(typeof t=="number")return"Number";if(typeof t=="boolean")return"Boolean";if(typeof t=="string")return"String"},sE=iE,Gh=function(t){return typeof t=="symbol"?"Symbol":typeof t=="bigint"?"BigInt":sE(t)},oE=X,aE=Qi,lE=Ki,cE=function(t,e){if(!lE(e))throw new oE("Assertion failed: P is not a Property Key, got "+aE(e));return t[e]},of=X,uE=cE,hE=Ji,dE=Ki,af=Qi,pE=function(t,e){if(!dE(e))throw new of("Assertion failed: P is not a Property Key");var r=uE(t,e);if(r!=null){if(!hE(r))throw new of(af(e)+" is not a function: "+af(r));return r}},wu={exports:{}},fE=yt,gE=fE,lf=gE("%Reflect.construct%",!0),rl=Vo;try{rl({},"",{"[[Get]]":function(){}})}catch{rl=null}if(rl&&lf){var cf={},uf={};rl(uf,"length",{"[[Get]]":function(){throw cf},"[[Enumerable]]":!0}),wu.exports=function(t){try{lf(t,uf)}catch(e){return e===cf}}}else wu.exports=function(t){return typeof t=="function"&&!!t.prototype};var mE=wu.exports,Lc=X,hf=Ji,vE=mE,yE=function(t){if(!vE(t))throw new Lc("C must be a constructor");var e={"[[Resolve]]":void 0,"[[Reject]]":void 0},r=new t(function(i,s){if(typeof e["[[Resolve]]"]<"u"||typeof e["[[Reject]]"]<"u")throw new Lc("executor has already been called");e["[[Resolve]]"]=i,e["[[Reject]]"]=s});if(!hf(e["[[Resolve]]"])||!hf(e["[[Reject]]"]))throw new Lc("executor must provide valid resolve and reject functions");return{"[[Promise]]":r,"[[Resolve]]":e["[[Resolve]]"],"[[Reject]]":e["[[Reject]]"]}},df=Sn,bE=X,zc=Ml,pf=pE,wE=yE,SE=Gh,ff=Mh(),gf=Nh(),_E=function(t,e){if(SE(t)!=="Object")throw new bE("`V` must be an Object");if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new df("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(e==="ASYNC-DISPOSE"&&gf&&(r=pf(t,gf)),!r){if(!ff)throw new df("`Symbol.dispose` is not supported");if(r=pf(t,ff),typeof r<"u")return function(){var i=this;if(e==="ASYNC-DISPOSE"){var s=wE(Promise);try{zc(r,i),zc(s["[[Resolve]]"],void 0,[void 0])}catch(o){s["[[Reject]]"](o)}return s["[[Promise]]"]}zc(r,i)}}return r},kE=Sn,Oc=X,xE=Ji,EE=Gh,AE=_E,$E=function(t,e){if(e!=="SYNC-DISPOSE"&&e!=="ASYNC-DISPOSE")throw new kE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var r;if(arguments.length<3)if(t==null)t=void 0,r=void 0;else{if(typeof t<"u"&&EE(t)!=="Object")throw new Oc("`V` must be an Object, or `null` or `undefined`");if(r=AE(t,e),typeof r>"u")throw new Oc("dispose method must not be `undefined` on `V` when an object `V` is provided")}else if(r=arguments[2],!xE(r))throw new Oc("`method`, when provided, must be a function");return{"[[ResourceValue]]":t,"[[Hint]]":e,"[[DisposeMethod]]":r}},TE=Sn,pa=X,IE=nE,mf=$E,CE=Yn(),RE=CE("Array.prototype.push"),jm=function(t,e,r){if(!IE(t))throw new pa("Assertion failed: `disposeCapability` must be a DisposeCapability Record");if(r!=="SYNC-DISPOSE"&&r!=="ASYNC-DISPOSE")throw new TE("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");var i=arguments.length>3?arguments[3]:void 0;if(arguments.length>3&&typeof i!="function")throw new pa("Assertion failed: `method`, when present, must be a function");if(!t["[[DisposableResourceStack]]"])throw new pa("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");var s;if(arguments.length<4){if(e==null&&r==="SYNC_DISPOSE")return"UNUSED";s=mf(e,r)}else{if(typeof e<"u")throw new pa("Assertion failed: `V` must be undefined when `method` is present");s=mf(void 0,r,i)}return RE(t["[[DisposableResourceStack]]"],s),"UNUSED"},Mc,vf;function qh(){if(vf)return Mc;vf=1;var n=yt,t=jh,e=Sn,r=n("%Promise.resolve%",!0),i=r&&t(r);return Mc=function(o,a){if(!i)throw new e("This environment does not support Promises.");return i(o,a)},Mc}var Nc,yf;function PE(){if(yf)return Nc;yf=1;var n=yt,t=Sn,e=n("%Promise%",!0),r=Ml,i=qh(),s=Gh;return Nc=function(a,c,u){if(typeof a<"u"&&s(a)!=="Object")throw new t("Assertion failed: `V` must be `undefined` or an Object");if(c!=="SYNC-DISPOSE"&&c!=="ASYNC-DISPOSE")throw new t("Assertion failed: `hint` must be `~SYNC-DISPOSE~` or `~ASYNC-DISPOSE~`");if(typeof u<"u"&&typeof u!="function")throw new t("Assertion failed: `method` must be `undefined` or a function");var h=typeof u>"u"?u:r(u,a);if(c==="ASYNC-DISPOSE")return i(e,h)},Nc}var Uc,bf;function DE(){if(bf)return Uc;bf=1;var n=Vh;return Uc=function(e){return new n("throw",e)},Uc}var LE=yt,Fc=Sn,wf=X,zE=LE("%Promise%",!0),OE=Yn(),Sf=OE("Promise.prototype.then",!0),ME=Vh,_f=PE(),NE=Bh,UE=qh(),kf=DE(),FE=Lm(),Gm=function(t,e){if(!(e instanceof ME))throw new wf("`completion` must be a Completion Record");var r=t["[[DisposableResourceStack]]"];if(!r)throw new wf("Assertion failed: `disposeCapability.[[DisposableResourceStack]]` must not be ~EMPTY~");for(var i,s=r.length-1;s>=0;s-=1)if(!i)i=r[s]["[[Hint]]"];else if(i!==r[s]["[[Hint]]"])throw new Fc("mixed hint stacks are not supported");for(var o=i==="ASYNC-DISPOSE"&&UE(zE,e),a=function(v){if(e.type()==="throw"){var m=e.value(),_=new FE(v,m);e=kf(_)}else e=kf(v)},c=i==="ASYNC-DISPOSE"&&function(m){return Sf(o,function(){var _=_f(m["[[ResourceValue]]"],m["[[Hint]]"],m["[[DisposeMethod]]"]);if(!_)throw new Fc("Assertion failed: non-`~ASYNC-DISPOSE~` resource returned a promise from Dispose");return Sf(_,NE)},a)},u=r.length-1;u>=0;u-=1)if(i==="ASYNC-DISPOSE")o=c(r[u]);else{var h=r[u];try{var p=_f(h["[[ResourceValue]]"],h["[[Hint]]"],h["[[DisposeMethod]]"]);if(p)throw new Fc("Assertion failed: `~SYNC-DISPOSE~` resource returned something from Dispose")}catch(v){a(v)}}return t["[[DisposableResourceStack]]"]=null,i==="ASYNC-DISPOSE"?o:e},qm=function(){var t=[];return{"[[DisposableResourceStack]]":t}},Fl=Th,Yh=X,HE=Ml,es=zh,WE=Vo,Ym=Ji,ZE=Bh,nt=Zh,VE=Vm,Xm=Fr.supportsDescriptors,BE=jh,Xh=jm,jE=Gm,Km=qm,xf=Mh(),ft=function n(){if(!(this instanceof n)||nt.has(this,"[[DisposableState]]")||nt.has(this,"[[DisposeCapability]]"))throw new Yh("can only be used with new");nt.set(this,"[[DisposableState]]","PENDING"),nt.set(this,"[[DisposeCapability]]",Km())},Jm=function(){var t=this;return nt.assert(t,"[[DisposableState]]"),nt.get(t,"[[DisposableState]]")==="DISPOSED"},Go=BE(Jm);Xm?WE(ft.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":Jm}):ft.prototype.disposed=!1;var Qm=function(t){nt.set(t,"[[DisposableState]]","DISPOSED"),Xm||(t.disposed=!0)};es(ft.prototype,"dispose",function(){var t=this;if(!Go(t))return Qm(t),jE(nt.get(t,"[[DisposeCapability]]"),ZE())["?"]()});es(ft.prototype,"use",function(t){var e=this;if(Go(e))throw new Fl("a disposed stack can not use anything new");return Xh(nt.get(e,"[[DisposeCapability]]"),t,"SYNC-DISPOSE"),t});es(ft.prototype,"adopt",function(t,e){var r=this;if(Go(r))throw new Fl("a disposed stack can not use anything new");if(!Ym(e))throw new Yh("`onDispose` must be a function");var i=function(){return HE(e,void 0,[t])};return Xh(nt.get(r,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",i),t});es(ft.prototype,"defer",function(t){var e=this;if(Go(e))throw new Fl("a disposed stack can not defer anything new");if(!Ym(t))throw new Yh("`onDispose` must be a function");Xh(nt.get(e,"[[DisposeCapability]]"),void 0,"SYNC-DISPOSE",t)});es(ft.prototype,"move",function(){var t=this;if(Go(t))throw new Fl("a disposed stack can not use anything new");var e=new ft;return nt.set(e,"[[DisposeCapability]]",nt.get(t,"[[DisposeCapability]]")),nt.set(t,"[[DisposeCapability]]",Km()),Qm(t),e});xf&&es(ft.prototype,xf,ft.prototype.dispose);VE(ft.prototype,"DisposableStack");var GE=ft,qE=GE,YE=function(){return typeof DisposableStack=="function"?DisposableStack:qE},XE=Fr,KE=Ah(),JE=YE,QE=function(){var t=JE();return XE(KE,{DisposableStack:t},{DisposableStack:!0}),t},eA=yt,Hl=Th,Kh=X,Ef=eA("%Promise%",!0),Jh=jm,tA=Ml,ts=zh,nA=Vo,rA=Gm,ev=Ji,tv=qm,iA=Bh,Af=qh(),rt=Zh,sA=Vm,nv=Fr.supportsDescriptors,oA=jh,aA=Yn(),lA=aA("Promise.prototype.then",!0),$f=Nh(),gt=function n(){if(!(this instanceof n)||rt.has(this,"[[AsyncDisposableState]]")||rt.has(this,"[[DisposeCapability]]"))throw new Kh("can only be used with new");rt.set(this,"[[AsyncDisposableState]]","pending"),rt.set(this,"[[DisposeCapability]]",tv())},rv=function(){var t=this;return rt.assert(t,"[[AsyncDisposableState]]"),rt.get(t,"[[AsyncDisposableState]]")==="disposed"},qo=oA(rv);nv?nA(gt.prototype,"disposed",{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Get]]":rv}):gt.prototype.disposed=!1;var iv=function(t){rt.set(t,"[[AsyncDisposableState]]","disposed"),nv||(t.disposed=!0)};ts(gt.prototype,"disposeAsync",function(){var t=this;return qo(t)?Af(Ef):(iv(t),lA(Af(Ef,rA(rt.get(t,"[[DisposeCapability]]"),iA())),function(e){return e["?"]()}))});ts(gt.prototype,"use",function(t){var e=this;if(qo(e))throw new Hl("a disposed stack can not use anything new");return Jh(rt.get(e,"[[DisposeCapability]]"),t,"ASYNC-DISPOSE"),t});ts(gt.prototype,"adopt",function(t,e){var r=this;if(qo(r))throw new Hl("a disposed stack can not use anything new");if(!ev(e))throw new Kh("`onDisposeAsync` must be a function");var i=function(){return tA(e,void 0,[t])};return i.value=t,Jh(rt.get(r,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",i),t});ts(gt.prototype,"defer",function(t){var e=this;if(qo(e))throw new Hl("a disposed stack can not defer anything new");if(!ev(t))throw new Kh("`onDispose` must be a function");Jh(rt.get(e,"[[DisposeCapability]]"),void 0,"ASYNC-DISPOSE",t)});ts(gt.prototype,"move",function(){var t=this;if(qo(t))throw new Hl("a disposed stack can not use anything new");var e=new gt;return rt.set(e,"[[DisposeCapability]]",rt.get(t,"[[DisposeCapability]]")),rt.set(t,"[[DisposeCapability]]",tv()),iv(t),e});$f&&ts(gt.prototype,$f,gt.prototype.disposeAsync);sA(gt.prototype,"AsyncDisposableStack");var cA=gt,uA=cA,hA=function(){return typeof AsyncDisposableStack=="function"?AsyncDisposableStack:uA},dA=Fr,pA=Ah(),fA=hA,gA=function(){var t=fA();return dA(pA,{AsyncDisposableStack:t},{AsyncDisposableStack:!0}),t},mA=dk,vA=wk,yA=QE,bA=gA,wA=function(){mA(),vA(),yA(),bA()};wA();const Tf=new WeakMap;function SA(n){return(typeof n=="object"||typeof n=="function")&&n!==null&&"then"in n&&typeof n.then=="function"}function Qr(n){return typeof n=="string"?n:typeof n=="symbol"?n.description??n.toString():n.name||"(anonymous class)"}function If(){return new Error("register(Key, factory) requires a factory function. Wrap existing instances as () => instance.")}function _A(){return new Error("register(Key, factory) does not accept async factories. Await setup before registering.")}class kA{constructor(){g(this,"entries",new Map);g(this,"constructionStack",[])}register(t,e){if(e===void 0){if(typeof t!="function")throw If();this.validateClassRegistration(t),this.storeFactory(t,()=>this.instantiateClass(t));return}if(typeof e!="function")throw If();if(e.constructor.name==="AsyncFunction")throw _A();this.storeFactory(t,e)}has(t){var e;return((e=this.entries.get(t))==null?void 0:e.factory)!==void 0}resolve(t){return this.resolveAny(t)}storeFactory(t,e){const r=this.getOrCreateEntry(t);r.factory=e,r.instance=void 0,r.error=void 0}validateClassRegistration(t){const e=Tf.get(t);if(e){if(t.length!==e.length)throw new Error(`${Qr(t)} cannot be registered with register(Class). @injectable(...) declared ${e.length} dependencies but constructor arity is ${t.length}. Use register(Key, () => value) instead.`);return}if(t.length!==0)throw new Error(`${Qr(t)} cannot be registered with register(Class). Undecorated classes must have zero required constructor parameters. Use register(Key, () => value) instead.`)}instantiateClass(t){const e=Tf.get(t);if(!e)return new t;const r=e.map(i=>this.resolveAny(i));return new t(...r)}resolveAny(t){return this.getOrCreateEntry(t).proxy}getOrCreateEntry(t){let e=this.entries.get(t);return e||(e={key:t},e.proxy=this.createProxy(e),this.entries.set(t,e),e)}createProxy(t){return new Proxy({},{get:(e,r)=>{if(r==="then")return;const i=this.getInstance(t),s=Reflect.get(i,r,i);return typeof s=="function"?s.bind(i):s},set:(e,r,i)=>{const s=this.getInstance(t);return Reflect.set(s,r,i,s)},has:(e,r)=>{const i=this.getInstance(t);return r in i}})}getInstance(t){if(t.instance)return t.instance;if(t.error)throw t.error;if(!t.factory)throw new Error(`${Qr(t.key)} was resolved but never registered`);const e=this.constructionStack.indexOf(t.key);if(e!==-1){const r=[...this.constructionStack.slice(e),t.key].map(i=>Qr(i)).join(" -> ");throw new Error(`Circular dependency detected: ${r}`)}this.constructionStack.push(t.key);try{const r=t.factory();if(SA(r))throw new Error(`Factory for ${Qr(t.key)} returned a Promise. Await setup before registering.`);if(typeof r!="object"||r===null)throw new Error(`Factory for ${Qr(t.key)} returned a non-object value. Wrap primitives in an object.`);return t.instance=r,r}catch(r){throw t.error=r,r}finally{this.constructionStack.pop()}}}const en=new kA,xA=.5,Cf=.1,Rf=8,EA=4,sv=3,ov=3,AA=4,dr=255,av=.2126,lv=.7152,cv=.0722;async function uv(n){const t=$A(n);if(!t)return"light";try{return await CA(n,t)>=xA?"light":"dark"}catch{return"light"}}function $A(n){if(typeof document.elementsFromPoint!="function")return null;const t=n.getBoundingClientRect(),e=t.left+t.width/2,r=t.top+t.height/2,i=document.elementsFromPoint(e,r);for(const s of i){if(!(s instanceof HTMLElement)||s===n||n.contains(s))continue;const o=window.getComputedStyle(s);if(TA(o))return s}return null}function TA(n){return n.backgroundImage&&n.backgroundImage!=="none"?!0:IA(n.backgroundColor)>0}function IA(n){if(!n)return 0;const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 0;const e=t[1].split(/[\s,/]+/).filter(Boolean);return e.length===AA?parseFloat(e[sv]):e.length===ov?1:0}async function CA(n,t){const e=n.getBoundingClientRect(),r=t.getBoundingClientRect(),i={x:fa((e.left-r.left)/r.width),y:fa((e.top-r.top)/r.height),width:fa(e.width/r.width),height:fa(e.height/r.height)},s=window.getComputedStyle(t),o=RA(s.backgroundImage);return o?DA({url:o,surfaceWidth:r.width,surfaceHeight:r.height,region:i}):LA(s.backgroundColor)}function RA(n){const t=n.match(/url\(\s*["']?([^"')]+)["']?\s*\)/);return t?t[1]:null}const Pf=new Map;function PA(n){let t=Pf.get(n);return t||(t=new Promise((e,r)=>{const i=new Image;i.crossOrigin="anonymous",i.onload=()=>e(i),i.onerror=()=>r(new Error(`Failed to load ${n}`)),i.src=n}),Pf.set(n,t),t)}async function DA(n){const t=await PA(n.url),e=Math.max(Rf,Math.ceil(n.surfaceWidth*Cf)),r=Math.max(Rf,Math.ceil(n.surfaceHeight*Cf)),i=document.createElement("canvas");i.width=e,i.height=r;const s=i.getContext("2d",{willReadFrequently:!0});if(!s)return 1;const o=n.surfaceWidth/n.surfaceHeight,a=t.naturalWidth/t.naturalHeight;let c,u;a>o?(u=r,c=r*a):(c=e,u=e/a);const h=(e-c)/2,p=(r-u)/2;s.drawImage(t,h,p,c,u);const v=Math.max(0,Math.floor(n.region.x*e)),m=Math.max(0,Math.floor(n.region.y*r)),_=Math.max(1,Math.min(e-v,Math.floor(n.region.width*e))),k=Math.max(1,Math.min(r-m,Math.floor(n.region.height*r))),T=s.getImageData(v,m,_,k).data;let P=0,R=0;for(let W=0;W<T.length;W+=EA){const N=T[W]/dr,F=T[W+1]/dr,Y=T[W+2]/dr,j=T[W+sv]/dr;P+=j*(av*N+lv*F+cv*Y),R+=1}return R>0?P/R:1}function LA(n){const t=n.match(/rgba?\(([^)]+)\)/);if(!t)return 1;const e=t[1].split(/[\s,/]+/).filter(Boolean).map(parseFloat);if(e.length<ov)return 1;const r=e[0]/dr,i=e[1]/dr,s=e[2]/dr;return av*r+lv*i+cv*s}function fa(n){return n<0?0:n>1?1:n}const zA=["ghost","glass"],Ms=[...zA.flatMap(n=>[`button[variant="${n}"]`,`segmented-control[variant="${n}"]`]),'[material="glass"]'].join(", "),ga=new WeakSet,Df=new WeakSet;function hv(n){if(Df.has(n))return;Df.add(n);for(const e of n.querySelectorAll(Ms))Hc(e);if(typeof MutationObserver!="function")return;new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const i of r.addedNodes)OA(i,Hc);else r.type==="attributes"&&r.target instanceof HTMLElement&&r.target.matches(Ms)&&Hc(r.target)}).observe(n,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["variant","material"]})}function OA(n,t){if(n instanceof Element){n instanceof HTMLElement&&n.matches(Ms)&&t(n);for(const e of n.querySelectorAll(Ms))t(e)}}async function Hc(n){if(ga.has(n)||n.hasAttribute("tone"))return;ga.add(n);const t=await uv(n);if(!n.matches(Ms)){ga.delete(n);return}if(n.hasAttribute("tone")){ga.delete(n);return}n.setAttribute("tone",t)}const MA="*,*:before,*:after{box-sizing:border-box}html,body{margin:0;padding:0;width:100%;height:100%}h1,h2,h3,h4,h5,h6,p,ul,ol,blockquote,pre,hr{margin:0}button,input,textarea,select{font:inherit;color:inherit}@font-face{font-family:Hind;src:url("+new URL("Hind-Variable-C47b_dt9.woff2",import.meta.url).href+') format("woff2-variations");font-weight:300 700;font-style:normal;font-display:swap}:root{--font-sans: "Hind", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;--font-brand: var(--font-sans);--font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;--font-weight-body: 500;--text-base: 13.5px;--text-scale: 1.125;--text-sm: round(calc(var(--text-base) / var(--text-scale)), 1px);--text-lg: round(calc(var(--text-base) * var(--text-scale)), 1px);--text-xl: round(calc(var(--text-lg) * var(--text-scale)), 1px);--leading-base: 1.5;--control-height-xs: 18px;--control-height-sm: 24px;--control-height-md: 28px;--control-height-lg: 32px;--space-2: 2px;--space-4: 4px;--space-6: 6px;--space-8: 8px;--space-12: 12px;--space-16: 16px;--space-20: 20px;--space-24: 24px;--space-32: 32px;--space-48: 48px;--space-64: 64px;--radius-4: 4px;--radius-8: 8px;--radius-12: 12px;--radius-16: 16px;--radius-24: 24px;--radius-full: 9999px;--layer-chrome: 100;--layer-panel: 500;--layer-overlay: 2000;--shadow-hairline: 0 0 0 .5px var(--color-border);--shadow-control: 0 1px 1px rgb(0 0 0 / .04), 0 2px 6px rgb(0 0 0 / .06);--alpha-50: 4%;--alpha-100: 8%;--alpha-150: 11%;--alpha-200: 15%;--alpha-300: 22%;--alpha-400: 30%;--alpha-500: 40%;--alpha-600: 50%;--alpha-700: 65%;--alpha-800: 80%;--alpha-900: 90%;--alpha-950: 95%;--tint-50: color-mix(in srgb, currentColor var(--alpha-50), transparent);--tint-100: color-mix(in srgb, currentColor var(--alpha-100), transparent);--tint-150: color-mix(in srgb, currentColor var(--alpha-150), transparent);--tint-200: color-mix(in srgb, currentColor var(--alpha-200), transparent);--tint-300: color-mix(in srgb, currentColor var(--alpha-300), transparent);--tint-400: color-mix(in srgb, currentColor var(--alpha-400), transparent);--tint-500: color-mix(in srgb, currentColor var(--alpha-500), transparent);--tint-600: color-mix(in srgb, currentColor var(--alpha-600), transparent);--tint-700: color-mix(in srgb, currentColor var(--alpha-700), transparent);--tint-800: color-mix(in srgb, currentColor var(--alpha-800), transparent);--tint-900: color-mix(in srgb, currentColor var(--alpha-900), transparent);--tint-950: color-mix(in srgb, currentColor var(--alpha-950), transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-300), transparent);--backdrop-blur-glass: blur(20px) saturate(1.4);--black: #000000;--white: #ffffff;--neutral-50: oklch(.985 0 0);--neutral-100: oklch(.97 0 0);--neutral-200: oklch(.923 0 0);--neutral-300: oklch(.869 0 0);--neutral-350: oklch(.79 0 0);--neutral-400: oklch(.709 0 0);--neutral-500: oklch(.553 0 0);--neutral-600: oklch(.444 0 0);--neutral-700: oklch(.374 0 0);--neutral-800: oklch(.268 0 0);--neutral-900: oklch(.216 0 0);--neutral-950: oklch(.147 0 0);--red-50: oklch(.969 .015 12.422);--red-100: oklch(.941 .03 12.58);--red-200: oklch(.892 .058 10.001);--red-300: oklch(.81 .117 11.638);--red-400: oklch(.712 .194 13.428);--red-500: oklch(.645 .246 16.439);--red-600: oklch(.586 .253 17.585);--red-700: oklch(.514 .222 16.935);--red-800: oklch(.455 .188 13.697);--red-900: oklch(.41 .159 10.272);--red-950: oklch(.271 .105 12.094);--orange-50: oklch(.98 .016 73.684);--orange-100: oklch(.954 .038 75.164);--orange-200: oklch(.901 .076 70.697);--orange-300: oklch(.837 .128 66.29);--orange-400: oklch(.75 .183 55.934);--orange-500: oklch(.705 .213 47.604);--orange-600: oklch(.646 .222 41.116);--orange-700: oklch(.553 .195 38.402);--orange-800: oklch(.47 .157 37.304);--orange-900: oklch(.408 .123 38.172);--orange-950: oklch(.266 .079 36.259);--yellow-50: oklch(.987 .026 102.212);--yellow-100: oklch(.973 .071 103.193);--yellow-200: oklch(.945 .129 101.54);--yellow-300: oklch(.905 .182 98.111);--yellow-400: oklch(.852 .199 91.936);--yellow-500: oklch(.795 .184 86.047);--yellow-600: oklch(.681 .162 75.834);--yellow-700: oklch(.554 .135 66.442);--yellow-800: oklch(.476 .114 61.907);--yellow-900: oklch(.421 .095 57.708);--yellow-950: oklch(.286 .066 53.813);--green-50: oklch(.979 .021 166.113);--green-100: oklch(.95 .052 163.051);--green-200: oklch(.905 .093 164.15);--green-300: oklch(.845 .143 164.978);--green-400: oklch(.765 .177 163.223);--green-500: oklch(.696 .17 162.48);--green-600: oklch(.596 .145 163.225);--green-700: oklch(.508 .118 165.612);--green-800: oklch(.432 .095 166.913);--green-900: oklch(.378 .077 168.94);--green-950: oklch(.262 .051 172.552);--blue-50: oklch(.97 .014 254.604);--blue-100: oklch(.932 .032 255.585);--blue-200: oklch(.882 .059 254.128);--blue-300: oklch(.809 .105 251.813);--blue-400: oklch(.707 .165 254.624);--blue-500: oklch(.623 .214 259.815);--blue-600: oklch(.546 .245 262.881);--blue-700: oklch(.488 .243 264.376);--blue-800: oklch(.424 .199 265.638);--blue-900: oklch(.379 .146 265.522);--blue-950: oklch(.282 .091 267.935);--purple-50: oklch(.969 .016 293.756);--purple-100: oklch(.943 .029 294.588);--purple-200: oklch(.894 .057 293.283);--purple-300: oklch(.811 .111 293.571);--purple-400: oklch(.702 .183 293.541);--purple-500: oklch(.606 .25 292.717);--purple-600: oklch(.541 .281 293.009);--purple-700: oklch(.491 .27 292.581);--purple-800: oklch(.432 .232 292.759);--purple-900: oklch(.38 .189 293.745);--purple-950: oklch(.283 .141 291.089)}@supports (corner-shape: squircle){:root{--radius-8: 10px;--radius-12: 15px;--radius-16: 20px;--radius-24: 30px}}:root[data-font=system]{--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif}:root{--color-bg: var(--neutral-50);--color-bg-muted: var(--neutral-100);--color-surface: var(--white);--color-surface-muted: var(--neutral-100);--color-interactive: var(--neutral-200);--color-interactive-hover: var(--neutral-300);--color-border: rgba(0, 0, 0, .1);--color-border-muted: rgba(0, 0, 0, .06);--color-text: var(--neutral-900);--color-text-muted: var(--neutral-500);--color-link: inherit;--color-focus-ring: var(--neutral-500);--color-overlay-backdrop: rgb(0 0 0 / .5);--color-highlight: rgb(255 255 255 / .5);--color-primary: var(--blue-500);--color-danger: var(--red-600);color-scheme:light}body{font-family:var(--font-sans);font-size:var(--text-base);font-weight:var(--font-weight-body);line-height:var(--leading-base);letter-spacing:.015em;color:var(--color-text);background:var(--color-bg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{color:var(--color-link);text-underline-offset:.15em;text-decoration-thickness:.08em}h1,h2,h3,h4,h5,h6{font-weight:600;color:inherit}code{font-family:var(--font-mono);font-size:.9em;background:var(--color-bg-muted);padding:var(--space-2) var(--space-4);border-radius:var(--radius-4)}pre{font-family:var(--font-mono);background:var(--color-bg-muted);padding:var(--space-12);border-radius:var(--radius-8);overflow-x:auto}pre code{background:none;padding:0}blockquote{padding-left:var(--space-16);border-left:3px solid var(--color-border);color:var(--color-text-muted)}hr{border:none;border-top:1px solid var(--color-border)}table{border-collapse:collapse}th,td{padding:var(--space-8) var(--space-12);border:1px solid var(--color-border);text-align:left}th{background:var(--color-bg-muted);font-weight:600}input,textarea{border:.5px solid var(--tint-300);border-radius:var(--radius-12);background:var(--tint-100);color:inherit;font:inherit;box-sizing:border-box;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease}input{height:var(--control-height-lg);padding:0 12px}textarea{padding:6px 10px;resize:none}input::placeholder,textarea::placeholder{color:var(--tint-500)}input:focus,textarea:focus{background:color-mix(in srgb,var(--white) var(--alpha-300),transparent);border-color:var(--color-primary);outline:none;box-shadow:0 0 0 1.5px var(--color-primary)}label.field{display:grid;gap:4px;font-size:13px}label.field>span{font-size:11.5px;font-weight:450;color:var(--tint-800)}@supports (corner-shape: squircle){*{corner-shape:squircle}}button{display:inline-flex;align-items:center;justify-content:center;gap:var(--space-6);box-sizing:border-box;height:var(--control-height-md);padding:0 14px 2px;font:inherit;cursor:default}button,segmented-control{background:var(--color-surface);border:.5px solid var(--tint-200);border-radius:var(--radius-12);box-shadow:var(--shadow-control);color:inherit}button:not([material]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}button:not([material]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}button[variant=primary]{background:var(--color-primary);border-color:#0000002e;color:var(--white)}button[variant=primary]:hover:not(:disabled){background:color-mix(in srgb,var(--color-primary) 92%,black)}button[variant=primary]:active:not(:disabled){background:color-mix(in srgb,var(--color-primary) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=danger]{background:var(--color-danger);border-color:#0000002e;color:var(--white)}button[variant=danger]:hover:not(:disabled){background:color-mix(in srgb,var(--color-danger) 92%,black)}button[variant=danger]:active:not(:disabled){background:color-mix(in srgb,var(--color-danger) 82%,black);box-shadow:inset 0 1px 2px #0000002e}button[variant=ghost]{background:transparent;border-color:transparent;color:inherit;box-shadow:none}button[variant=ghost]:hover:not(:disabled){background:var(--tint-150);backdrop-filter:saturate(1.2);-webkit-backdrop-filter:saturate(1.2)}button[variant=ghost]:active:not(:disabled){background:var(--tint-300);backdrop-filter:saturate(1.4);-webkit-backdrop-filter:saturate(1.4);box-shadow:none}button[variant=ghost][data-active]:not(:disabled),button[variant=ghost][data-active]:hover:not(:disabled),button[variant=ghost][aria-pressed=true]:not(:disabled),button[variant=ghost][aria-pressed=true]:hover:not(:disabled),button[variant=ghost][aria-expanded=true]:not(:disabled),button[variant=ghost][aria-expanded=true]:hover:not(:disabled){background:var(--color-overlay-active);backdrop-filter:saturate(1.3);-webkit-backdrop-filter:saturate(1.3);box-shadow:none}button[variant=glass],segmented-control[variant=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);box-shadow:none}button[variant=glass]{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}button[variant=glass]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover));backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}button[variant=glass]:active:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}button[variant=glass][aria-pressed=true]:not(:disabled),button[variant=glass][aria-pressed=true]:hover:not(:disabled),button[variant=glass][aria-expanded=true]:not(:disabled),button[variant=glass][aria-expanded=true]:hover:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active));backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}[tone=dark] button[variant=glass],[tone=dark] segmented-control[variant=glass]{border-color:var(--tint-400)}button[material],segmented-control[material]{color:inherit;box-shadow:none}button[material]:hover:not(:disabled){background-image:linear-gradient(var(--color-overlay-hover),var(--color-overlay-hover))}button[material]:active:not(:disabled){background-image:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}[tone=dark] button[material],[tone=dark] segmented-control[material]{border-color:var(--tint-400)}button:disabled{background:var(--tint-300);border-color:transparent;color:var(--tint-700);box-shadow:none}button[variant=ghost]:disabled{background:transparent}:where([tone=dark]) button:not([variant]):not([material]):not(:disabled),:where([tone=dark]) button[variant=default]:not([material]):not(:disabled),:where([tone=dark]) segmented-control:not([variant]):not([material]),:where([tone=dark]) segmented-control[variant=default]:not([material]){background:var(--tint-200);border-color:var(--tint-300);box-shadow:inset 0 .5px 0 var(--tint-300)}:where([tone=dark]) button:not([variant]):hover:not(:disabled),:where([tone=dark]) button[variant=default]:hover:not(:disabled){background:var(--tint-300)}:where([tone=dark]) button:not([variant]):active:not(:disabled),:where([tone=dark]) button[variant=default]:active:not(:disabled){background:var(--tint-400);box-shadow:inset 0 1px 2px #0003}:where([tone=light]) button:not([variant]):not([material]):not(:disabled),:where([tone=light]) button[variant=default]:not([material]):not(:disabled),:where([tone=light]) segmented-control:not([variant]):not([material]),:where([tone=light]) segmented-control[variant=default]:not([material]){background:var(--color-surface);border-color:var(--tint-200);box-shadow:var(--shadow-control)}:where([tone=light]) button:not([variant]):hover:not(:disabled){background:color-mix(in srgb,var(--color-surface) 96%,black)}:where([tone=light]) button:not([variant]):active:not(:disabled){background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}button[size=sm],segmented-control[size=sm]{height:var(--control-height-sm)}button[size=sm][icon-only]{width:var(--control-height-sm)}button[size=xs]{height:var(--control-height-xs);padding:0 var(--space-6) 1px;border-radius:var(--radius-8)}button[size=xs][icon-only]{width:var(--control-height-xs);padding:0}button[icon-only]{width:var(--control-height-md);padding:0}[data-ui-icon]{display:inline-block;vertical-align:middle}[selectable],[selectable] *{user-select:text;-webkit-user-select:text}[unselectable],[unselectable] *{user-select:none;-webkit-user-select:none}.prose{line-height:var(--leading-base)}.prose h1{font-size:var(--text-xl);margin-bottom:var(--space-8)}.prose h2{font-size:var(--text-lg);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose h3,.prose h4,.prose h5,.prose h6{font-size:var(--text-base);margin-top:var(--space-24);margin-bottom:var(--space-8)}.prose p{margin:var(--space-12) 0}.prose ul,.prose ol{padding-left:var(--space-24);margin:var(--space-12) 0}.prose blockquote,.prose pre{margin:var(--space-12) 0}.prose hr{margin:var(--space-24) 0}.prose table{width:100%;margin:var(--space-12) 0}.prose img{max-width:100%;height:auto}.prose>:first-child{margin-top:0}.prose>:last-child{margin-bottom:0}[material=paper]{background:var(--white);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text)}[material=glass]{background:transparent;border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}[material=glass-frosted]{background:color-mix(in srgb,var(--white) var(--alpha-800),transparent);border:.5px solid color-mix(in srgb,var(--black) var(--alpha-100),transparent);color:var(--color-text);backdrop-filter:var(--backdrop-blur-glass);-webkit-backdrop-filter:var(--backdrop-blur-glass)}[tone=dark]{color:color-mix(in srgb,var(--white) var(--alpha-950),transparent);border-color:color-mix(in srgb,var(--white) var(--alpha-200),transparent);--color-overlay-hover: color-mix(in srgb, var(--white) var(--alpha-100), transparent);--color-overlay-active: color-mix(in srgb, var(--white) var(--alpha-200), transparent)}[tone=dark][material=paper]{background:#000}[tone=dark][material=glass-frosted]{background:color-mix(in srgb,var(--black) 70%,transparent)}[tone=light]{color:var(--color-text);border-color:color-mix(in srgb,var(--black) var(--alpha-100),transparent);--color-overlay-hover: color-mix(in srgb, var(--black) var(--alpha-50), transparent);--color-overlay-active: color-mix(in srgb, var(--black) var(--alpha-100), transparent)}[level="1"]{box-shadow:0 12px 32px #00000024}[level="2"]{box-shadow:0 4px 6px -2px #0000001f,0 40px 60px -16px #00000038}dropdown-menu{position:relative;display:inline-block;color:inherit}dropdown-group{display:grid;gap:var(--space-4)}dropdown-label{display:block;padding:var(--space-4) var(--space-8);color:var(--color-text-muted);font:inherit;font-size:var(--text-sm);font-weight:600;letter-spacing:.04em;text-transform:uppercase}dropdown-divider{display:block;height:1px;margin:2px 0;background:var(--color-border)}[data-dropdown-trigger][aria-expanded=true],[data-dropdown-trigger][aria-expanded=true]:hover,dropdown-menu[open]::part(trigger),dropdown-menu[open]::part(trigger):hover{background:color-mix(in srgb,var(--color-surface) 88%,black);box-shadow:inset 0 1px 2px #00000014}[data-dropdown-trigger-label],dropdown-menu::part(trigger-label){min-width:0}[data-dropdown-trigger-icon],dropdown-menu::part(trigger-icon){display:inline-flex;align-items:center;justify-content:center;flex:none;color:var(--color-text-muted);transform:translateY(1px)}dropdown-item:focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}ui-popover.dropdown-popover::part(panel){min-width:192px;padding:var(--space-4)}.dropdown-list{display:flex;flex-direction:column;gap:2px}dropdown-item{display:flex;align-items:center;gap:var(--space-8);margin:0;padding:6px 12px;border-radius:var(--radius-8);font:inherit;line-height:1.2;color:inherit;font-weight:var(--font-weight-body);-webkit-user-select:none;user-select:none}dropdown-item>[data-ui-icon]{flex:none}dropdown-item[selected]{background:var(--color-overlay-active)}dropdown-item:hover,dropdown-item[action]:hover{background:var(--color-primary);color:var(--white)}dropdown-item[action]{color:inherit}dropdown-item[danger]{color:var(--color-danger)}dropdown-item[danger]:hover{background:var(--color-danger);color:var(--white)}editable-text{display:inline-block;max-width:100%;vertical-align:top}editable-text>.editable-text-span{display:inline-block;max-width:100%;outline:none;overflow:hidden;white-space:nowrap;cursor:inherit;vertical-align:top}editable-text:not([data-editing])>.editable-text-span{text-overflow:ellipsis}editable-text[data-editing]>.editable-text-span{cursor:text}modal-overlay{color:inherit}modal-overlay::part(backdrop){position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--layer-overlay);display:flex;align-items:center;justify-content:center;padding:var(--space-16);background:linear-gradient(to bottom,color-mix(in srgb,var(--black) var(--alpha-50),transparent),color-mix(in srgb,var(--black) var(--alpha-400),transparent));backdrop-filter:blur(1px);-webkit-backdrop-filter:blur(1px)}panel-view{display:block}panel-view::part(panel){display:flex;flex-direction:column;gap:var(--space-16);color:var(--color-text)}panel-view::part(header){display:flex;align-items:center;justify-content:space-between;gap:var(--space-12)}panel-view::part(title){margin:0;font:inherit;font-size:var(--text-lg);font-weight:600;color:var(--color-text)}panel-view::part(button){display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;margin:0;border:1px solid var(--color-border);border-radius:var(--radius-4);background:var(--color-surface);color:var(--color-text);box-shadow:none}panel-view::part(button):hover{background:var(--color-interactive-hover)}panel-view::part(button):focus-visible{outline:2px solid var(--color-focus-ring);outline-offset:2px}panel-view::part(icon){display:inline-flex;align-items:center;justify-content:center;flex:none}ui-popover{display:contents}ui-popover::part(panel){position:fixed;inset:0 auto auto 0;margin:0;min-width:192px;max-width:384px;padding:var(--space-16) var(--space-20);border-radius:var(--radius-12);outline:none;z-index:2000}segmented-control{display:inline-flex;align-items:stretch;box-sizing:border-box;height:var(--control-height-md)}segmented-control>button{height:auto}segmented-control[variant=ghost]{background:transparent;box-shadow:none}[tone=dark] segmented-control[variant=ghost]{border-color:var(--tint-400)}segmented-control>button{position:relative}segmented-control>button[icon-only]{width:auto;height:auto;padding:0 var(--space-6)}segmented-control>button:not([variant]):not(:disabled),[tone] segmented-control>button:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>button:first-child{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>button:last-child{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>button:not(:first-child):not(:last-child){border-radius:0}segmented-control>button:not([variant]):hover:not(:disabled),[tone] segmented-control>button:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>button:not([variant]):active:not(:disabled),[tone] segmented-control>button:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>button:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>button:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control>button:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>button:not(:last-child):after{background:var(--tint-400)}segmented-control>dropdown-menu{display:inline-flex;align-items:stretch;height:auto}segmented-control>dropdown-menu>[slot=trigger]{height:auto;position:relative}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):not(:disabled){background:transparent;border:0;box-shadow:none}segmented-control>dropdown-menu:first-child>[slot=trigger]{border-top-right-radius:0;border-bottom-right-radius:0}segmented-control>dropdown-menu:last-child>[slot=trigger]{border-top-left-radius:0;border-bottom-left-radius:0}segmented-control>dropdown-menu:not(:first-child):not(:last-child)>[slot=trigger]{border-radius:0}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):hover:not(:disabled){background:var(--color-overlay-hover)}segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant]):active:not(:disabled){background:var(--color-overlay-active);box-shadow:none}segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-pressed=true]:not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-current]:not([aria-current=false]):not(:disabled),[tone] segmented-control>dropdown-menu>[slot=trigger]:not([variant])[aria-expanded=true]:not(:disabled){background:linear-gradient(var(--color-overlay-active),var(--color-overlay-active))}segmented-control[variant=glass]>button,segmented-control[variant=glass]>dropdown-menu{backdrop-filter:blur(20px) brightness(.95) saturate(1.5);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.5)}segmented-control[variant=glass]>button:not(:disabled):hover,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):hover){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled):active,segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled):active){backdrop-filter:blur(20px) brightness(.95) saturate(2.2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2.2)}segmented-control[variant=glass]>button:not(:disabled)[aria-pressed=true],segmented-control[variant=glass]>button:not(:disabled)[aria-current]:not([aria-current=false]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-pressed=true]),segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-current]:not([aria-current=false])){backdrop-filter:blur(20px) brightness(.95) saturate(1.8);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(1.8)}segmented-control[variant=glass]>button:not(:disabled)[aria-expanded=true],segmented-control[variant=glass]>dropdown-menu:has(>[slot=trigger]:not(:disabled)[aria-expanded=true]){backdrop-filter:blur(20px) brightness(.95) saturate(2);-webkit-backdrop-filter:blur(20px) brightness(.95) saturate(2)}segmented-control>dropdown-menu:not(:last-child):after{content:"";position:absolute;top:0;bottom:0;right:0;width:.5px;background:var(--tint-200);pointer-events:none}[tone=dark] segmented-control>dropdown-menu:not(:last-child):after{background:var(--tint-400)}ui-spinner{display:inline-flex;align-items:center;justify-content:center;line-height:0;color:inherit}ui-spinner .spin,.spin{display:inline-flex;animation:ui-spinner-spin 1s steps(8,end) infinite}@keyframes ui-spinner-spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion: reduce){.spin{animation:none}}system-modal{display:flex;flex-direction:column;width:min(400px,100%);box-sizing:border-box;padding:var(--space-32) var(--space-24);border-radius:var(--radius-12)}system-modal header{display:flex;flex-direction:column;align-items:center;gap:var(--space-16);text-align:center}system-modal header>hgroup{display:flex;flex-direction:column;align-items:center;gap:var(--space-4);max-width:100%}system-modal header h2{margin:0;font-size:var(--text-lg);font-weight:600;letter-spacing:.01em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}system-modal header p{margin:0;font-size:var(--text-base);opacity:.7;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}ui-pill{display:inline-block;vertical-align:baseline;margin:2px 0;padding:0 var(--space-8);font-size:var(--text-sm);font-weight:500;line-height:1.7;border-radius:var(--radius-full);border:1px solid var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900);white-space:nowrap}ui-pill[color=gray]{border-color:var(--neutral-300);background:var(--neutral-200);color:var(--neutral-900)}ui-pill[color=red]{border-color:var(--red-200);background:var(--red-100);color:var(--red-950)}ui-pill[color=orange]{border-color:var(--orange-200);background:var(--orange-100);color:var(--orange-950)}ui-pill[color=yellow]{border-color:var(--yellow-200);background:var(--yellow-100);color:var(--yellow-950)}ui-pill[color=green]{border-color:var(--green-200);background:var(--green-100);color:var(--green-950)}ui-pill[color=blue]{border-color:var(--blue-200);background:var(--blue-100);color:var(--blue-950)}ui-pill[color=purple]{border-color:var(--purple-200);background:var(--purple-100);color:var(--purple-950)}',Qh=new CSSStyleSheet;Qh.replaceSync(MA);const ed=new CSSStyleSheet;try{document.adoptedStyleSheets=[...document.adoptedStyleSheets,Qh,ed]}catch{}hv(document);function dv(n){ed.replaceSync(n)}function il(){dv("")}function td(n){try{n.adoptedStyleSheets=[...n.adoptedStyleSheets,Qh,ed]}catch{}hv(n)}const NA=new Set(["target","currentTarget","eventPhase","defaultPrevented","isTrusted","timeStamp","srcElement","returnValue","cancelBubble","NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","composedPath","stopPropagation","stopImmediatePropagation","preventDefault","initEvent"]);function UA(n){for(const t of Object.keys(n))if(NA.has(t))throw new Error(`Event payload key "${t}" is reserved; choose a different property name`)}function FA(n,t){UA(t);for(const e of Object.keys(t))Object.defineProperty(n,e,{value:t[e],writable:!0,enumerable:!0,configurable:!0})}function He(){class n extends Event{constructor(e,r){const{type:i,bubbles:s,cancelable:o,composed:a,...c}=r??{};if(i!==void 0)throw new Error('Do not pass "type" in init; use the constructor argument instead');super(e,{bubbles:s,cancelable:o,composed:a}),FA(this,c)}}return n}class tn extends globalThis.EventTarget{}function HA(n,t,e){const r=n.dispose.bind(n);n.dispose=()=>{if(!t())return e(),r()}}function Yo(n){var e;class t extends n{constructor(...s){super(...s);w(this,e,!1);HA(this,()=>l(this,e),()=>{S(this,e,!0)})}[Symbol.dispose](){this.dispose()}get disposed(){return l(this,e)}}return e=new WeakMap,t}const WA=He(),ZA=He(),VA=He(),Da=He(),BA=He(),Wc=He(),pv="0123456789ABCDEFGHJKMNPQRSTVWXYZ",sl=32,jA=16,fv=10,Lf=0xffffffffffff;var pr;(function(n){n.Base32IncorrectEncoding="B32_ENC_INVALID",n.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",n.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",n.EncodeTimeNegative="ENC_TIME_NEG",n.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",n.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",n.PRNGDetectFailure="PRNG_DETECT",n.ULIDInvalid="ULID_INVALID",n.Unexpected="UNEXPECTED",n.UUIDInvalid="UUID_INVALID"})(pr||(pr={}));class Ss extends Error{constructor(t,e){super(`${e} (${t})`),this.name="ULIDError",this.code=t}}function GA(n){const t=Math.floor(n()*sl)%sl;return pv.charAt(t)}function qA(n){const t=YA(),e=t&&(t.crypto||t.msCrypto)||null;if(typeof(e==null?void 0:e.getRandomValues)=="function")return()=>{const r=new Uint8Array(1);return e.getRandomValues(r),r[0]/256};if(typeof(e==null?void 0:e.randomBytes)=="function")return()=>e.randomBytes(1).readUInt8()/256;throw new Ss(pr.PRNGDetectFailure,"Failed to find a reliable PRNG")}function YA(){return JA()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function XA(n,t){let e="";for(;n>0;n--)e=GA(t)+e;return e}function KA(n,t=fv){if(isNaN(n))throw new Ss(pr.EncodeTimeValueMalformed,`Time must be a number: ${n}`);if(n>Lf)throw new Ss(pr.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Lf}: ${n}`);if(n<0)throw new Ss(pr.EncodeTimeNegative,`Time must be positive: ${n}`);if(Number.isInteger(n)===!1)throw new Ss(pr.EncodeTimeValueMalformed,`Time must be an integer: ${n}`);let e,r="";for(let i=t;i>0;i--)e=n%sl,r=pv.charAt(e)+r,n=(n-e)/sl;return r}function JA(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Wl(n,t){const e=qA(),r=Date.now();return KA(r,fv)+XA(jA,e)}const Fe=4,ct=6,Ns=2,Su=2,nd=8,QA=ct,rd="auto",Vn="auto",Tn=128,zf=50,se=16,Dr=Tn*Fe+se*(Fe-1),Us=Tn*ct+se*(ct-1),e1=Dr+se*2,t1=200,n1=4,ma=150,r1=10,Of=2,Mf=8,i1=300,s1=4;function gv(n){return yv(n)}function mv(n,t){return yv(n.flatMap(e=>wv(e,t)))}function vv(n){const t=[],e=new Set;for(const r of n){if(r.type==="row"){t.push(`Top-level rows are invalid: ${r.id}`);continue}Sv(r,"strip",t,e)}return{valid:t.length===0,errors:t}}function fr(n){const t=gv(n),e=vv(t);if(!e.valid)throw new Error(`Invalid layout: ${e.errors.join("; ")}`);return{totalNodes:t.length,nodes:t.filter(r=>r.type!=="row").map(c1)}}function yv(n){const t=[];for(const e of n){const r=bv(e);for(const i of r){if(i.type==="row"){t.push(...i.children.map(bn));continue}t.push(i)}}return t}function bv(n){switch(n.type){case"card":return[bn(n)];case"row":{const t=n.children.map(bn);return t.length===0?[]:t.length===1?[t[0]]:[{...n,children:t}]}case"stack":{const t=[];for(const e of n.children){const r=bv(e);for(const i of r){if(i.type==="stack"){t.push(...i.children.map(_u));continue}if(i.type==="row"){t.push({...i,children:i.children.map(bn)});continue}t.push(bn(i))}}return t.length===0?[]:t.length===1?[_u(t[0])]:[{...n,children:t}]}}}function wv(n,t){switch(n.type){case"card":return n.artifactID===t?[]:[bn(n)];case"row":{const e=n.children.filter(r=>r.artifactID!==t).map(bn);return e.length===0?[]:e.length===1?[e[0]]:[{...n,children:e}]}case"stack":{const e=n.children.flatMap(r=>wv(r,t).filter(s=>s.type!=="stack"));return e.length===0?[]:e.length===1?[_u(e[0])]:[{...n,children:e}]}}}function Sv(n,t,e,r){switch(n.type){case"card":_v(n,t,e,r);return;case"row":o1(n,t,e,r);return;case"stack":a1(n,t,e,r);return}}function _v(n,t,e,r){id(n.id,e),typeof n.artifactID!="string"||n.artifactID.length===0?e.push(`Card ${n.id} is missing artifactID`):r.has(n.artifactID)?e.push(`Duplicate artifactID in layout: ${n.artifactID}`):r.add(n.artifactID),l1(n.width)||e.push(`Card ${n.id} width must be an integer in the range ${Ns}-${nd}`),kv(n.height)||e.push(`Card ${n.id} height must be an integer in the range 2-6 or "auto"`);const i=pi(n.width);t==="stack"&&i!==Fe&&e.push(`Stack child ${n.id} width must be ${Fe}`),t==="row"&&i<Ns&&e.push(`Row child ${n.id} must be at least 2 columns wide`)}function o1(n,t,e,r){if(id(n.id,e),t!=="stack"&&e.push(`Row ${n.id} may only appear inside a stack`),kv(n.height,s1)||e.push(`Row ${n.id} height must be an integer in the range 2-4 or "auto"`),!Array.isArray(n.children)||n.children.length===0){e.push(`Row ${n.id} must contain card nodes`);return}let i=0;for(const s of n.children){if(s.type!=="card"){e.push(`Row ${n.id} must contain only card nodes`);continue}_v(s,"row",e,r),i+=pi(s.width)}i!==Fe&&e.push(`Row ${n.id} children must sum to 4 columns`)}function a1(n,t,e,r){if(id(n.id,e),t!=="strip"&&e.push(`Invalid nested stack at ${n.id}; stack children cannot contain another nested stack`),!Array.isArray(n.children)||n.children.length===0){e.push(`Stack ${n.id} must contain at least one child`);return}let i=0,s=0;for(const a of n.children){if(a.type==="stack"){e.push(`Stack ${n.id} cannot contain another nested stack`);continue}if(Sv(a,"stack",e,r),a.height===Vn){s+=1;continue}i+=a.height}if(i>ct&&e.push(`Stack ${n.id} exceeds the 6-row budget`),s===0)return;const o=ct-i;if(o<s*Su||o%s!==0){e.push(`Stack ${n.id} has auto-height children that cannot resolve to whole height >= 2`);return}o/s<Su&&e.push(`Stack ${n.id} has auto-height children below the minimum row size`)}function id(n,t){(typeof n!="string"||n.length===0)&&t.push(`Node id must be a non-empty string: ${String(n)}`)}function l1(n){return n===rd||Number.isInteger(n)&&n>=Ns&&n<=nd}function kv(n,t=QA){return n===Vn||Number.isInteger(n)&&n>=Su&&n<=t}function pi(n){return n===rd?Fe:n}function c1(n){if(n.type==="card")return{id:n.id,type:"card",width:pi(n.width),cards:[{id:n.id,artifactID:n.artifactID,col:1,row:1,width:pi(n.width),height:xv(n.height,ct)}]};const t=u1(n.children),e=[];let r=1;for(let i=0;i<n.children.length;i+=1){const s=n.children[i],o=t[i];if(s.type==="card")e.push({id:s.id,artifactID:s.artifactID,col:1,row:r,width:Fe,height:o});else{let a=1;for(const c of s.children)e.push({id:c.id,artifactID:c.artifactID,col:a,row:r,width:pi(c.width),height:o}),a+=pi(c.width)}r+=o}return{id:n.id,type:"stack",width:e.reduce((i,s)=>Math.max(i,s.col+s.width-1),1),cards:e}}function u1(n){let t=0,e=0;for(const i of n)i.height===Vn?e+=1:t+=i.height;const r=e>0?(ct-t)/e:0;return n.map(i=>xv(i.height,r))}function xv(n,t){return n===Vn?t:n}function bn(n){return{...n}}function _u(n){return n.type==="card"?bn(n):{...n,children:n.children.map(bn)}}function Ev(n,t={}){return{id:t.id??Wl(),type:"card",artifactID:n,width:t.width??rd,height:t.height??Vn}}function Av(n,t){return n.some(e=>$v(e,t))}function $v(n,t){switch(n.type){case"card":return n.artifactID===t;case"row":return n.children.some(e=>e.artifactID===t);case"stack":return n.children.some(e=>$v(e,t))}}function Nf(n){return n.layout.flatMap(Tv)}function Tv(n){switch(n.type){case"card":return[n.artifactID];case"row":return n.children.map(t=>t.artifactID);case"stack":return n.children.flatMap(Tv)}}const le=He(),ku=He(),ei=He(),h1=He();function d1(n){class t extends Error{constructor(r,i){super(r),this.name=n,i&&Object.assign(this,i)}}return t}const Iv=d1("RequestError"),p1=200,f1=300;class g1{constructor(t,e){g(this,"serverURL");g(this,"token");this.serverURL=t.replace(/\/$/,""),this.token=e.token}async requestJSON(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0),s=await m1(i);if(!i.ok||i.status<p1||i.status>=f1)throw this.createError(typeof s.error=="string"?s.error:i.statusText,i.status);return s}async requestVoid(t,e,r){const i=await this.request(t,e,r!==void 0?JSON.stringify(r):void 0,r!==void 0?{"content-type":"application/json"}:void 0);if(!i.ok)throw this.createError(await Zc(i,i.statusText),i.status)}async requestText(t,e){const r=await this.request(t,e);if(!r.ok)throw this.createError(await Zc(r,r.statusText),r.status);return r.text()}async requestRawVoid(t,e,r){const i=await this.request(t,e,r,{"content-type":"text/plain"});if(!i.ok)throw this.createError(await Zc(i,i.statusText),i.status)}createError(t,e){const r={serverURL:this.serverURL};return e!==void 0&&(r.status=e),new Iv(t,r)}async request(t,e,r,i){const s=`${this.serverURL}${e}`;try{return await fetch(s,{method:t,headers:this.buildHeaders(i),body:r})}catch(o){throw this.createError(o instanceof Error?o.message:"Failed to reach server")}}buildHeaders(t){const e={...t??{}};return this.token&&(e.Authorization=`Bearer ${this.token}`),Object.keys(e).length>0?e:void 0}}async function m1(n){try{return await n.json()}catch{const t=await n.text().catch(()=>"");return t?{message:t}:{}}}async function Zc(n,t){try{const e=await n.json();if(typeof e.error=="string")return e.error;if(typeof e.message=="string")return e.message}catch{}return t}function v1(n){return n.map(t=>`${t.name} (${t.id})`).join(", ")}var Mt,yl,Cv;class y1{constructor(t){w(this,yl);w(this,Mt);S(this,Mt,t)}list(){return l(this,Mt).requestJSON("GET","/screens")}async get(t={}){const e=await f(this,yl,Cv).call(this,t.screenID);return l(this,Mt).requestJSON("GET",`/screens/${encodeURIComponent(e)}`)}create(t){const e={name:t.name};return t.id!==void 0&&(e.id=t.id),l(this,Mt).requestJSON("POST","/screens",e)}update(t){const{screenID:e,...r}=t;return l(this,Mt).requestJSON("PATCH",`/screens/${encodeURIComponent(e)}`,r)}remove(t){return l(this,Mt).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}`)}}Mt=new WeakMap,yl=new WeakSet,Cv=async function(t){if(t!==void 0)return t;const{screens:e}=await this.list();if(e.length===1)return e[0].id;throw l(this,Mt).createError(`screenID is required when multiple screens exist. Available screens: ${v1(e)}`)};var Ue;class b1{constructor(t){w(this,Ue);S(this,Ue,t)}create(t){const e={kind:t.kind,title:t.title};switch(t.kind){case"markdown":e.externalFilePath=t.externalFilePath;break;case"url":e.externalURL=t.externalURL;break;case"web-bundle":t.skipPending!==void 0&&(e.skipPending=t.skipPending);break}return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,Ue).requestJSON("POST","/artifacts",e)}list(t={}){const e=new URLSearchParams;t.screenID!==void 0&&e.set("screenID",t.screenID),t.unplaced&&e.set("unplaced","true");const r=e.toString();return l(this,Ue).requestJSON("GET",r?`/artifacts?${r}`:"/artifacts")}get(t){return l(this,Ue).requestJSON("GET",`/artifacts/${encodeURIComponent(t.artifactID)}`)}update(t){const e={};return t.title!==void 0&&(e.title=t.title),l(this,Ue).requestJSON("PATCH",`/artifacts/${encodeURIComponent(t.artifactID)}`,e)}edit(t){return l(this,Ue).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/edit`)}commitPending(t){return l(this,Ue).requestJSON("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/commit`)}abandonPending(t){return l(this,Ue).requestVoid("POST",`/artifacts/${encodeURIComponent(t.artifactID)}/abandon`)}attach(t){return l(this,Ue).requestJSON("POST",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}detach(t){return l(this,Ue).requestJSON("DELETE",`/screens/${encodeURIComponent(t.screenID)}/artifacts/${encodeURIComponent(t.artifactID)}`)}delete(t){return l(this,Ue).requestJSON("DELETE",`/artifacts/${encodeURIComponent(t.artifactID)}`)}getContent(t){return l(this,Ue).requestText("GET",`/artifacts/${encodeURIComponent(t.artifactID)}/content`)}putContent(t){return l(this,Ue).requestRawVoid("PUT",`/artifacts/${encodeURIComponent(t.artifactID)}/content`,t.content)}}Ue=new WeakMap;var mr;class w1{constructor(t){w(this,mr);S(this,mr,t)}get(){return l(this,mr).requestJSON("GET","/display")}patch(t){const e={};return t.activeScreenID!==void 0&&(e.activeScreenID=t.activeScreenID),t.activeThemeName!==void 0&&(e.activeThemeName=t.activeThemeName),l(this,mr).requestVoid("PATCH","/display",e)}focus(t){const e={artifactID:t.artifactID};return t.screenID!==void 0&&(e.screenID=t.screenID),l(this,mr).requestJSON("POST","/display/focus",e)}}mr=new WeakMap;var Bs;class S1{constructor(t){w(this,Bs);S(this,Bs,t)}async list(){const{views:t}=await l(this,Bs).requestJSON("GET","/views");return t}}Bs=new WeakMap;var pn;class _1{constructor(t,e={}){g(this,"screens");g(this,"artifacts");g(this,"display");g(this,"views");w(this,pn);S(this,pn,new g1(t,e)),this.screens=new y1(l(this,pn)),this.artifacts=new b1(l(this,pn)),this.display=new w1(l(this,pn)),this.views=new S1(l(this,pn))}health(){return l(this,pn).requestJSON("GET","/health")}}pn=new WeakMap;const k1={focusCommandInput:{label:"Focus Command Input",trigger:{key:"k",meta:!0}}},x1="Local",E1="store-";function be(n){return new URL(n).origin}function A1(n){return{servers:[{url:be(n),name:x1}],activeServerURL:null,activeScreenID:null,tabs:{},screens:{}}}function $1(n,t){return[...n.tabs[be(t)]??[]]}function T1(n,t,e){const r=be(t),i=n.tabs[r]??[];return i.includes(e)?n:{...n,tabs:{...n.tabs,[r]:[...i,e]}}}function I1(n,t,e){const r=be(t),i=n.tabs[r]??[],s=i.filter(a=>a!==e);if(s.length===i.length)return n;const o={...n.tabs};return s.length===0?delete o[r]:o[r]=s,{...n,tabs:o}}function C1(n,t,e=Date.now()){const r=n.screens[t]??{scrollPosition:0};return{...n,screens:{...n.screens,[t]:{...r,lastActivatedAt:e}}}}var vr,yr,br;class R1 extends tn{constructor(e,r,i={}){super();w(this,vr);w(this,yr);w(this,br);S(this,vr,`${E1}${e}`),S(this,yr,i.storage??P1());const s=l(this,yr).getItem(l(this,vr));s===null?(S(this,br,r),l(this,yr).setItem(l(this,vr),JSON.stringify(r))):S(this,br,D1(JSON.parse(s),r))}get(){return l(this,br)}set(e){S(this,br,e),l(this,yr).setItem(l(this,vr),JSON.stringify(e)),this.dispatchEvent(new le("change"))}}vr=new WeakMap,yr=new WeakMap,br=new WeakMap;function P1(){const n=globalThis.localStorage;if(!n)throw new Error("LocalStore: no storage adapter supplied and window.localStorage is unavailable");return n}function D1(n,t){return{servers:Array.isArray(n.servers)?n.servers:t.servers,activeServerURL:typeof n.activeServerURL=="string"||n.activeServerURL===null?n.activeServerURL:t.activeServerURL,activeScreenID:typeof n.activeScreenID=="string"||n.activeScreenID===null?n.activeScreenID:t.activeScreenID,tabs:n.tabs&&typeof n.tabs=="object"?n.tabs:t.tabs,screens:n.screens&&typeof n.screens=="object"?n.screens:t.screens}}const L1=Yo(tn);var wr,Je,Sr,Ve,Cn,Rn,te,ri,Rv,js,Pv,Dv,Lv,zv,xu,Eu,Au,Ov;class z1 extends L1{constructor(e){var i;super();w(this,te);g(this,"id");g(this,"server");w(this,wr);w(this,Je,new Map);w(this,Sr);w(this,Ve);w(this,Cn);w(this,Rn,null);w(this,js,e=>{if(this.disposed)return;const r=e.event;switch(r.type){case"screen-updated":r.screen.id===this.id&&f(this,te,Pv).call(this,r.screen);break;case"artifact-created":break;case"artifact-attached":r.screenID===this.id&&f(this,te,Dv).call(this,r.cardID,r.artifact);break;case"artifact-updated":f(this,te,Lv).call(this,r.artifact);break;case"artifact-removed":r.screenID===this.id&&f(this,te,zv).call(this,r.artifactID);break;case"artifact-content-changed":l(this,Je).has(r.artifactID)&&this.dispatchEvent(new h1("artifact-content-changed",{artifactID:r.artifactID}));break}});this.id=e.screen.id,this.server=e.server,S(this,wr,e.localStore),S(this,Sr,e.screen.name),S(this,Ve,structuredClone(e.screen.layout));const r=((i=l(this,wr).get().screens[this.id])==null?void 0:i.scrollPosition)??0;S(this,Cn,Math.max(0,r)),this.server.addEventListener("server-event",l(this,js)),f(this,te,Rv).call(this)}get name(){return l(this,Sr)}get layout(){return l(this,Ve)}get scrollPosition(){return l(this,Cn)}get artifacts(){return l(this,Je)}setScrollPosition(e){f(this,te,ri).call(this);const r=Math.max(0,e);r!==l(this,Cn)&&(S(this,Cn,r),f(this,te,Ov).call(this),this.dispatchEvent(new le("change")))}setLayout(e){f(this,te,ri).call(this);const r=gv(e);if(!vv(r).valid)return;const s=f(this,te,Eu).call(this);S(this,Ve,r),S(this,Rn,{layout:r,snapshot:s}),this.dispatchEvent(new le("change")),this.server.client.screens.update({screenID:this.id,layout:r.map(o=>structuredClone(o))}).catch(()=>{var o;this.disposed||((o=l(this,Rn))==null?void 0:o.layout)===r&&(S(this,Rn,null),f(this,te,Au).call(this,s),this.dispatchEvent(new le("change")))})}rename(e){f(this,te,ri).call(this),S(this,Sr,e),this.dispatchEvent(new le("change")),this.server.client.screens.update({screenID:this.id,name:e}).catch(()=>{})}async remove(){f(this,te,ri).call(this),await this.server.client.screens.remove({screenID:this.id})}removeArtifact(e){if(f(this,te,ri).call(this),!l(this,Je).has(e))return;const r=f(this,te,Eu).call(this);f(this,te,xu).call(this,e),this.dispatchEvent(new le("change")),this.server.client.artifacts.detach({artifactID:e,screenID:this.id}).catch(()=>{this.disposed||(f(this,te,Au).call(this,r),this.dispatchEvent(new le("change")))})}dispose(){this.server.removeEventListener("server-event",l(this,js))}}wr=new WeakMap,Je=new WeakMap,Sr=new WeakMap,Ve=new WeakMap,Cn=new WeakMap,Rn=new WeakMap,te=new WeakSet,ri=function(){if(this.disposed)throw new Error("ScreenModel is disposed")},Rv=async function(){try{const e=await this.server.client.screens.get({screenID:this.id});if(this.disposed)return;for(const r of e.artifacts)l(this,Je).set(r.id,r);this.dispatchEvent(new le("change"))}catch{}},js=new WeakMap,Pv=function(e){l(this,Rn)&&S(this,Rn,null),S(this,Sr,e.name),S(this,Ve,structuredClone(e.layout)),this.dispatchEvent(new le("change"))},Dv=function(e,r){Av(l(this,Ve),r.id)||S(this,Ve,[...l(this,Ve),Ev(r.id,{id:e})]),l(this,Je).set(r.id,r),this.dispatchEvent(new le("change"))},Lv=function(e){const r=l(this,Je).get(e.id);r&&(l(this,Je).set(e.id,{...r,...e}),this.dispatchEvent(new le("change")))},zv=function(e){f(this,te,xu).call(this,e)&&this.dispatchEvent(new le("change"))},xu=function(e){const r=l(this,Je).delete(e),i=Nf({layout:l(this,Ve)}).length,s=mv(l(this,Ve),e),o=Nf({layout:s}).length;return S(this,Ve,s),r||i!==o},Eu=function(){return{layout:structuredClone(l(this,Ve)),artifacts:new Map([...l(this,Je).entries()].map(([e,r])=>[e,structuredClone(r)]))}},Au=function(e){S(this,Ve,structuredClone(e.layout)),l(this,Je).clear();for(const[r,i]of e.artifacts)l(this,Je).set(r,structuredClone(i))},Ov=function(){const e=l(this,wr).get();l(this,wr).set({...e,screens:{...e.screens,[this.id]:{...e.screens[this.id],scrollPosition:l(this,Cn)}}})};const O1=Yo(tn);var Te,Be,Nt,Gs,qs,Ys,Ge,La,$u,ii;class M1 extends O1{constructor(e){super();w(this,Ge);w(this,Te);w(this,Be);w(this,Nt,null);w(this,Gs,()=>{this.disposed||f(this,Ge,La).call(this)});w(this,qs,()=>{this.disposed||f(this,Ge,La).call(this)});w(this,Ys,e=>{if(this.disposed)return;const r=e.event;if(r.type==="screen-removed"){this.removeTab(e.serverURL,r.screenID);const i=l(this,Te).get();i.activeServerURL===be(e.serverURL)&&i.activeScreenID===r.screenID&&f(this,Ge,ii).call(this,e.serverURL,null);return}if(r.type==="screen-changed"){if(r.screenID===null){f(this,Ge,ii).call(this,e.serverURL,null);return}const i=l(this,Be).servers.get(be(e.serverURL));if(!i||!i.screens.has(r.screenID))return;this.addTab(e.serverURL,r.screenID),f(this,Ge,ii).call(this,e.serverURL,r.screenID)}});S(this,Te,e.localStore),S(this,Be,e.serverManager),l(this,Te).addEventListener("change",l(this,Gs)),l(this,Be).addEventListener("change",l(this,qs)),l(this,Be).addEventListener("server-event",l(this,Ys)),f(this,Ge,La).call(this)}get activeScreen(){return l(this,Nt)}get screens(){const e=l(this,Te).get().screens,r=[];let i=0;for(const s of l(this,Be).servers.values())for(const o of s.screens.values())r.push({server:s,screen:o,local:e[o.id]??{scrollPosition:0},index:i}),i+=1;return r.sort((s,o)=>{const a=(o.local.lastActivatedAt??0)-(s.local.lastActivatedAt??0);return a===0?s.index-o.index:a}).map(({index:s,...o})=>o)}getTabs(e){const r=be(e),i=$1(l(this,Te).get(),r),s=l(this,Be).servers.get(r);return s?i.filter(o=>s.screens.has(o)):i}hasTab(e,r){return this.getTabs(e).includes(r)}addTab(e,r){const i=be(e),s=l(this,Be).servers.get(i);s&&!s.screens.has(r)||f(this,Ge,$u).call(this,T1(l(this,Te).get(),i,r))}removeTab(e,r){f(this,Ge,$u).call(this,I1(l(this,Te).get(),e,r))}setActive(e,r){const i=be(e),s=l(this,Be).servers.get(i);!s||!s.screens.has(r)||f(this,Ge,ii).call(this,i,r)&&s.client.display.patch({activeScreenID:r}).catch(()=>{})}clearActive(){const e=l(this,Te).get().activeServerURL;if(!e||!f(this,Ge,ii).call(this,e,null))return;const r=l(this,Be).servers.get(e);r==null||r.client.display.patch({activeScreenID:null}).catch(()=>{})}dispose(){var e;l(this,Te).removeEventListener("change",l(this,Gs)),l(this,Be).removeEventListener("change",l(this,qs)),l(this,Be).removeEventListener("server-event",l(this,Ys)),(e=l(this,Nt))==null||e.dispose(),S(this,Nt,null)}}Te=new WeakMap,Be=new WeakMap,Nt=new WeakMap,Gs=new WeakMap,qs=new WeakMap,Ys=new WeakMap,Ge=new WeakSet,La=function(){var c,u,h;const{activeServerURL:e,activeScreenID:r}=l(this,Te).get(),i=e?l(this,Be).servers.get(e)??null:null,s=i&&r?i.screens.get(r)??null:null,o=((c=l(this,Nt))==null?void 0:c.id)??null,a=(s==null?void 0:s.id)??null;o===a&&((u=l(this,Nt))==null?void 0:u.server)===i||((h=l(this,Nt))==null||h.dispose(),S(this,Nt,i&&s?new z1({screen:s,server:i,localStore:l(this,Te)}):null),i&&i.acpClient.setScreenContext(s?{screenID:s.id,screenName:s.name}:null),this.dispatchEvent(new WA("active-screen-changed")))},$u=function(e){e!==l(this,Te).get()&&(l(this,Te).set(e),this.dispatchEvent(new ZA("tabs-changed")))},ii=function(e,r){const i=be(e),s=l(this,Te).get();if(s.activeServerURL===i&&s.activeScreenID===r)return!1;const o=r===null?{...s,activeServerURL:i,activeScreenID:r}:C1({...s,activeServerURL:i,activeScreenID:r},r);return l(this,Te).set(o),!0};function A(n,t,e){function r(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(n))return;a._zod.traits.add(n),t(a,c);const u=o.prototype,h=Object.keys(u);for(let p=0;p<h.length;p++){const v=h[p];v in a||(a[v]=u[v].bind(a))}}const i=(e==null?void 0:e.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:n});function o(a){var c;const u=e!=null&&e.Parent?new s:this;r(u,a),(c=u._zod).deferred??(c.deferred=[]);for(const h of u._zod.deferred)h();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var c,u;return e!=null&&e.Parent&&a instanceof e.Parent?!0:(u=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:u.has(n)}}),Object.defineProperty(o,"name",{value:n}),o}class vi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Mv extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Nv={};function Bn(n){return Nv}function Uv(n){const t=Object.values(n).filter(r=>typeof r=="number");return Object.entries(n).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function Tu(n,t){return typeof t=="bigint"?t.toString():t}function sd(n){return{get value(){{const t=n();return Object.defineProperty(this,"value",{value:t}),t}}}}function od(n){return n==null}function ad(n){const t=n.startsWith("^")?1:0,e=n.endsWith("$")?n.length-1:n.length;return n.slice(t,e)}function N1(n,t){const e=(n.toString().split(".")[1]||"").length,r=t.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const c=r.match(/\d?e-(\d?)/);c!=null&&c[1]&&(i=Number.parseInt(c[1]))}const s=e>i?e:i,o=Number.parseInt(n.toFixed(s).replace(".","")),a=Number.parseInt(t.toFixed(s).replace(".",""));return o%a/10**s}const Uf=Symbol("evaluating");function ne(n,t,e){let r;Object.defineProperty(n,t,{get(){if(r!==Uf)return r===void 0&&(r=Uf,r=e()),r},set(i){Object.defineProperty(n,t,{value:i})},configurable:!0})}function Wr(n,t,e){Object.defineProperty(n,t,{value:e,writable:!0,enumerable:!0,configurable:!0})}function Kn(...n){const t={};for(const e of n){const r=Object.getOwnPropertyDescriptors(e);Object.assign(t,r)}return Object.defineProperties({},t)}function Ff(n){return JSON.stringify(n)}function U1(n){return n.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Fv="captureStackTrace"in Error?Error.captureStackTrace:(...n)=>{};function ol(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}const F1=sd(()=>{var n;if(typeof navigator<"u"&&((n=navigator==null?void 0:navigator.userAgent)!=null&&n.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Vi(n){if(ol(n)===!1)return!1;const t=n.constructor;if(t===void 0||typeof t!="function")return!0;const e=t.prototype;return!(ol(e)===!1||Object.prototype.hasOwnProperty.call(e,"isPrototypeOf")===!1)}function Hv(n){return Vi(n)?{...n}:Array.isArray(n)?[...n]:n}const H1=new Set(["string","number","symbol"]);function Bi(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Jn(n,t,e){const r=new n._zod.constr(t??n._zod.def);return(!t||e!=null&&e.parent)&&(r._zod.parent=n),r}function M(n){const t=n;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0: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 W1(n){return Object.keys(n).filter(t=>n[t]._zod.optin==="optional"&&n[t]._zod.optout==="optional")}const Z1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function V1(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Kn(n._zod.def,{get shape(){const o={};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(o[a]=e.shape[a])}return Wr(this,"shape",o),o},checks:[]});return Jn(n,s)}function B1(n,t){const e=n._zod.def,r=e.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Kn(n._zod.def,{get shape(){const o={...n._zod.def.shape};for(const a in t){if(!(a in e.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete o[a]}return Wr(this,"shape",o),o},checks:[]});return Jn(n,s)}function j1(n,t){if(!Vi(t))throw new Error("Invalid input to extend: expected a plain object");const e=n._zod.def.checks;if(e&&e.length>0){const s=n._zod.def.shape;for(const o in t)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=Kn(n._zod.def,{get shape(){const s={...n._zod.def.shape,...t};return Wr(this,"shape",s),s}});return Jn(n,i)}function G1(n,t){if(!Vi(t))throw new Error("Invalid input to safeExtend: expected a plain object");const e=Kn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t};return Wr(this,"shape",r),r}});return Jn(n,e)}function q1(n,t){const e=Kn(n._zod.def,{get shape(){const r={...n._zod.def.shape,...t._zod.def.shape};return Wr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Jn(n,e)}function Y1(n,t,e){const i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Kn(t._zod.def,{get shape(){const a=t._zod.def.shape,c={...a};if(e)for(const u in e){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);e[u]&&(c[u]=n?new n({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)c[u]=n?new n({type:"optional",innerType:a[u]}):a[u];return Wr(this,"shape",c),c},checks:[]});return Jn(t,o)}function X1(n,t,e){const r=Kn(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(e)for(const o in e){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(s[o]=new n({type:"nonoptional",innerType:i[o]}))}else for(const o in i)s[o]=new n({type:"nonoptional",innerType:i[o]});return Wr(this,"shape",s),s}});return Jn(t,r)}function fi(n,t=0){var e;if(n.aborted===!0)return!0;for(let r=t;r<n.issues.length;r++)if(((e=n.issues[r])==null?void 0:e.continue)!==!0)return!0;return!1}function gi(n,t){return t.map(e=>{var r;return(r=e).path??(r.path=[]),e.path.unshift(n),e})}function va(n){return typeof n=="string"?n:n==null?void 0:n.message}function jn(n,t,e){var i,s,o,a,c,u;const r={...n,path:n.path??[]};if(!n.message){const h=va((o=(s=(i=n.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:o.call(s,n))??va((a=t==null?void 0:t.error)==null?void 0:a.call(t,n))??va((c=e.customError)==null?void 0:c.call(e,n))??va((u=e.localeError)==null?void 0:u.call(e,n))??"Invalid input";r.message=h}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function ld(n){return Array.isArray(n)?"array":typeof n=="string"?"string":"unknown"}function Fs(...n){const[t,e,r]=n;return typeof t=="string"?{message:t,code:"custom",input:e,inst:r}:{...t}}const Wv=(n,t)=>{n.name="$ZodError",Object.defineProperty(n,"_zod",{value:n._zod,enumerable:!1}),Object.defineProperty(n,"issues",{value:t,enumerable:!1}),n.message=JSON.stringify(t,Tu,2),Object.defineProperty(n,"toString",{value:()=>n.message,enumerable:!1})},Zv=A("$ZodError",Wv),Vv=A("$ZodError",Wv,{Parent:Error});function K1(n,t=e=>e.message){const e={},r=[];for(const i of n.issues)i.path.length>0?(e[i.path[0]]=e[i.path[0]]||[],e[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:e}}function J1(n,t=e=>e.message){const e={_errors:[]},r=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>r({issues:o}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)e._errors.push(t(s));else{let o=e,a=0;for(;a<s.path.length;){const c=s.path[a];a===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],a++}}};return r(n),e}const cd=n=>(t,e,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise)throw new vi;if(o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>jn(c,s,Bn())));throw Fv(a,i==null?void 0:i.callee),a}return o.value},ud=n=>async(t,e,r,i)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=t._zod.run({value:e,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((i==null?void 0:i.Err)??n)(o.issues.map(c=>jn(c,s,Bn())));throw Fv(a,i==null?void 0:i.callee),a}return o.value},Zl=n=>(t,e,r)=>{const i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:e,issues:[]},i);if(s instanceof Promise)throw new vi;return s.issues.length?{success:!1,error:new(n??Zv)(s.issues.map(o=>jn(o,i,Bn())))}:{success:!0,data:s.value}},Q1=Zl(Vv),Vl=n=>async(t,e,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:e,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new n(s.issues.map(o=>jn(o,i,Bn())))}:{success:!0,data:s.value}},e$=Vl(Vv),t$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return cd(n)(t,e,i)},n$=n=>(t,e,r)=>cd(n)(t,e,r),r$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ud(n)(t,e,i)},i$=n=>async(t,e,r)=>ud(n)(t,e,r),s$=n=>(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zl(n)(t,e,i)},o$=n=>(t,e,r)=>Zl(n)(t,e,r),a$=n=>async(t,e,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vl(n)(t,e,i)},l$=n=>async(t,e,r)=>Vl(n)(t,e,r),c$=/^[cC][^\s-]{8,}$/,u$=/^[0-9a-z]+$/,h$=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,d$=/^[0-9a-vA-V]{20}$/,p$=/^[A-Za-z0-9]{27}$/,f$=/^[a-zA-Z0-9_-]{21}$/,g$=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,m$=/^([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})$/,Hf=n=>n?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${n}[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)$/,v$=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,y$="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function b$(){return new RegExp(y$,"u")}const w$=/^(?:(?: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])$/,S$=/^(([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}|:))$/,_$=/^((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])$/,k$=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,x$=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bv=/^[A-Za-z0-9_-]*$/,E$=/^\+[1-9]\d{6,14}$/,jv="(?:(?:\\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])))",A$=new RegExp(`^${jv}$`);function Gv(n){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof n.precision=="number"?n.precision===-1?`${t}`:n.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${n.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function $$(n){return new RegExp(`^${Gv(n)}$`)}function T$(n){const t=Gv({precision:n.precision}),e=["Z"];n.local&&e.push(""),n.offset&&e.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${e.join("|")})`;return new RegExp(`^${jv}T(?:${r})$`)}const I$=n=>{const t=n?`[\\s\\S]{${(n==null?void 0:n.minimum)??0},${(n==null?void 0:n.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},C$=/^-?\d+$/,qv=/^-?\d+(?:\.\d+)?$/,R$=/^(?:true|false)$/i,P$=/^[^A-Z]*$/,D$=/^[^a-z]*$/,it=A("$ZodCheck",(n,t)=>{var e;n._zod??(n._zod={}),n._zod.def=t,(e=n._zod).onattach??(e.onattach=[])}),Yv={number:"number",bigint:"bigint",object:"date"},Xv=A("$ZodCheckLessThan",(n,t)=>{it.init(n,t);const e=Yv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:e,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),Kv=A("$ZodCheckGreaterThan",(n,t)=>{it.init(n,t);const e=Yv[typeof t.value];n._zod.onattach.push(r=>{const i=r._zod.bag,s=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),n._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:e,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:n,continue:!t.abort})}}),L$=A("$ZodCheckMultipleOf",(n,t)=>{it.init(n,t),n._zod.onattach.push(e=>{var r;(r=e._zod.bag).multipleOf??(r.multipleOf=t.value)}),n._zod.check=e=>{if(typeof e.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof e.value=="bigint"?e.value%t.value===BigInt(0):N1(e.value,t.value)===0)||e.issues.push({origin:typeof e.value,code:"not_multiple_of",divisor:t.value,input:e.value,inst:n,continue:!t.abort})}}),z$=A("$ZodCheckNumberFormat",(n,t)=>{var o;it.init(n,t),t.format=t.format||"float64";const e=(o=t.format)==null?void 0:o.includes("int"),r=e?"int":"number",[i,s]=Z1[t.format];n._zod.onattach.push(a=>{const c=a._zod.bag;c.format=t.format,c.minimum=i,c.maximum=s,e&&(c.pattern=C$)}),n._zod.check=a=>{const c=a.value;if(e){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:n});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:r,inclusive:!0,continue:!t.abort});return}}c<i&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:i,inclusive:!0,inst:n,continue:!t.abort}),c>s&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:n,continue:!t.abort})}}),O$=A("$ZodCheckMaxLength",(n,t)=>{var e;it.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!od(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),n._zod.check=r=>{const i=r.value;if(i.length<=t.maximum)return;const o=ld(i);r.issues.push({origin:o,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),M$=A("$ZodCheckMinLength",(n,t)=>{var e;it.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!od(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),n._zod.check=r=>{const i=r.value;if(i.length>=t.minimum)return;const o=ld(i);r.issues.push({origin:o,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:n,continue:!t.abort})}}),N$=A("$ZodCheckLengthEquals",(n,t)=>{var e;it.init(n,t),(e=n._zod.def).when??(e.when=r=>{const i=r.value;return!od(i)&&i.length!==void 0}),n._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),n._zod.check=r=>{const i=r.value,s=i.length;if(s===t.length)return;const o=ld(i),a=s>t.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:n,continue:!t.abort})}}),Bl=A("$ZodCheckStringFormat",(n,t)=>{var e,r;it.init(n,t),n._zod.onattach.push(i=>{const s=i._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(e=n._zod).check??(e.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:n,continue:!t.abort})}):(r=n._zod).check??(r.check=()=>{})}),U$=A("$ZodCheckRegex",(n,t)=>{Bl.init(n,t),n._zod.check=e=>{t.pattern.lastIndex=0,!t.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:"regex",input:e.value,pattern:t.pattern.toString(),inst:n,continue:!t.abort})}}),F$=A("$ZodCheckLowerCase",(n,t)=>{t.pattern??(t.pattern=P$),Bl.init(n,t)}),H$=A("$ZodCheckUpperCase",(n,t)=>{t.pattern??(t.pattern=D$),Bl.init(n,t)}),W$=A("$ZodCheckIncludes",(n,t)=>{it.init(n,t);const e=Bi(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${e}`:e);t.pattern=r,n._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),n._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:n,continue:!t.abort})}}),Z$=A("$ZodCheckStartsWith",(n,t)=>{it.init(n,t);const e=new RegExp(`^${Bi(t.prefix)}.*`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:n,continue:!t.abort})}}),V$=A("$ZodCheckEndsWith",(n,t)=>{it.init(n,t);const e=new RegExp(`.*${Bi(t.suffix)}$`);t.pattern??(t.pattern=e),n._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(e)}),n._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:n,continue:!t.abort})}}),B$=A("$ZodCheckOverwrite",(n,t)=>{it.init(n,t),n._zod.check=e=>{e.value=t.tx(e.value)}});class j${constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
5
5
|
`).filter(o=>o),i=Math.min(...r.map(o=>o.length-o.trimStart().length)),s=r.map(o=>o.slice(i)).map(o=>" ".repeat(this.indent*2)+o);for(const o of s)this.content.push(o)}compile(){const t=Function,e=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(s=>` ${s}`)];return new t(...e,i.join(`
|
|
6
6
|
`))}}const G$={major:4,minor:3,patch:6},fe=A("$ZodType",(n,t)=>{var i;var e;n??(n={}),n._zod.def=t,n._zod.bag=n._zod.bag||{},n._zod.version=G$;const r=[...n._zod.def.checks??[]];n._zod.traits.has("$ZodCheck")&&r.unshift(n);for(const s of r)for(const o of s._zod.onattach)o(n);if(r.length===0)(e=n._zod).deferred??(e.deferred=[]),(i=n._zod.deferred)==null||i.push(()=>{n._zod.run=n._zod.parse});else{const s=(a,c,u)=>{let h=fi(a),p;for(const v of c){if(v._zod.def.when){if(!v._zod.def.when(a))continue}else if(h)continue;const m=a.issues.length,_=v._zod.check(a);if(_ instanceof Promise&&(u==null?void 0:u.async)===!1)throw new vi;if(p||_ instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await _,a.issues.length!==m&&(h||(h=fi(a,m)))});else{if(a.issues.length===m)continue;h||(h=fi(a,m))}}return p?p.then(()=>a):a},o=(a,c,u)=>{if(fi(a))return a.aborted=!0,a;const h=s(c,r,u);if(h instanceof Promise){if(u.async===!1)throw new vi;return h.then(p=>n._zod.parse(p,u))}return n._zod.parse(h,u)};n._zod.run=(a,c)=>{if(c.skipChecks)return n._zod.parse(a,c);if(c.direction==="backward"){const h=n._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return h instanceof Promise?h.then(p=>o(p,a,c)):o(h,a,c)}const u=n._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new vi;return u.then(h=>s(h,r,c))}return s(u,r,c)}}ne(n,"~standard",()=>({validate:s=>{var o;try{const a=Q1(n,s);return a.success?{value:a.data}:{issues:(o=a.error)==null?void 0:o.issues}}catch{return e$(n,s).then(c=>{var u;return c.success?{value:c.data}:{issues:(u=c.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),hd=A("$ZodString",(n,t)=>{var e;fe.init(n,t),n._zod.pattern=[...((e=n==null?void 0:n._zod.bag)==null?void 0:e.patterns)??[]].pop()??I$(n._zod.bag),n._zod.parse=(r,i)=>{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:n}),r}}),de=A("$ZodStringFormat",(n,t)=>{Bl.init(n,t),hd.init(n,t)}),q$=A("$ZodGUID",(n,t)=>{t.pattern??(t.pattern=m$),de.init(n,t)}),Y$=A("$ZodUUID",(n,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Hf(r))}else t.pattern??(t.pattern=Hf());de.init(n,t)}),X$=A("$ZodEmail",(n,t)=>{t.pattern??(t.pattern=v$),de.init(n,t)}),K$=A("$ZodURL",(n,t)=>{de.init(n,t),n._zod.check=e=>{try{const r=e.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||e.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:e.value,inst:n,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||e.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:e.value,inst:n,continue:!t.abort})),t.normalize?e.value=i.href:e.value=r;return}catch{e.issues.push({code:"invalid_format",format:"url",input:e.value,inst:n,continue:!t.abort})}}}),J$=A("$ZodEmoji",(n,t)=>{t.pattern??(t.pattern=b$()),de.init(n,t)}),Q$=A("$ZodNanoID",(n,t)=>{t.pattern??(t.pattern=f$),de.init(n,t)}),eT=A("$ZodCUID",(n,t)=>{t.pattern??(t.pattern=c$),de.init(n,t)}),tT=A("$ZodCUID2",(n,t)=>{t.pattern??(t.pattern=u$),de.init(n,t)}),nT=A("$ZodULID",(n,t)=>{t.pattern??(t.pattern=h$),de.init(n,t)}),rT=A("$ZodXID",(n,t)=>{t.pattern??(t.pattern=d$),de.init(n,t)}),iT=A("$ZodKSUID",(n,t)=>{t.pattern??(t.pattern=p$),de.init(n,t)}),sT=A("$ZodISODateTime",(n,t)=>{t.pattern??(t.pattern=T$(t)),de.init(n,t)}),oT=A("$ZodISODate",(n,t)=>{t.pattern??(t.pattern=A$),de.init(n,t)}),aT=A("$ZodISOTime",(n,t)=>{t.pattern??(t.pattern=$$(t)),de.init(n,t)}),lT=A("$ZodISODuration",(n,t)=>{t.pattern??(t.pattern=g$),de.init(n,t)}),cT=A("$ZodIPv4",(n,t)=>{t.pattern??(t.pattern=w$),de.init(n,t),n._zod.bag.format="ipv4"}),uT=A("$ZodIPv6",(n,t)=>{t.pattern??(t.pattern=S$),de.init(n,t),n._zod.bag.format="ipv6",n._zod.check=e=>{try{new URL(`http://[${e.value}]`)}catch{e.issues.push({code:"invalid_format",format:"ipv6",input:e.value,inst:n,continue:!t.abort})}}}),hT=A("$ZodCIDRv4",(n,t)=>{t.pattern??(t.pattern=_$),de.init(n,t)}),dT=A("$ZodCIDRv6",(n,t)=>{t.pattern??(t.pattern=k$),de.init(n,t),n._zod.check=e=>{const r=e.value.split("/");try{if(r.length!==2)throw new Error;const[i,s]=r;if(!s)throw new Error;const o=Number(s);if(`${o}`!==s)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${i}]`)}catch{e.issues.push({code:"invalid_format",format:"cidrv6",input:e.value,inst:n,continue:!t.abort})}}});function Jv(n){if(n==="")return!0;if(n.length%4!==0)return!1;try{return atob(n),!0}catch{return!1}}const pT=A("$ZodBase64",(n,t)=>{t.pattern??(t.pattern=x$),de.init(n,t),n._zod.bag.contentEncoding="base64",n._zod.check=e=>{Jv(e.value)||e.issues.push({code:"invalid_format",format:"base64",input:e.value,inst:n,continue:!t.abort})}});function fT(n){if(!Bv.test(n))return!1;const t=n.replace(/[-_]/g,r=>r==="-"?"+":"/"),e=t.padEnd(Math.ceil(t.length/4)*4,"=");return Jv(e)}const gT=A("$ZodBase64URL",(n,t)=>{t.pattern??(t.pattern=Bv),de.init(n,t),n._zod.bag.contentEncoding="base64url",n._zod.check=e=>{fT(e.value)||e.issues.push({code:"invalid_format",format:"base64url",input:e.value,inst:n,continue:!t.abort})}}),mT=A("$ZodE164",(n,t)=>{t.pattern??(t.pattern=E$),de.init(n,t)});function vT(n,t=null){try{const e=n.split(".");if(e.length!==3)return!1;const[r]=e;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}const yT=A("$ZodJWT",(n,t)=>{de.init(n,t),n._zod.check=e=>{vT(e.value,t.alg)||e.issues.push({code:"invalid_format",format:"jwt",input:e.value,inst:n,continue:!t.abort})}}),Qv=A("$ZodNumber",(n,t)=>{fe.init(n,t),n._zod.pattern=n._zod.bag.pattern??qv,n._zod.parse=(e,r)=>{if(t.coerce)try{e.value=Number(e.value)}catch{}const i=e.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return e;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return e.issues.push({expected:"number",code:"invalid_type",input:i,inst:n,...s?{received:s}:{}}),e}}),bT=A("$ZodNumberFormat",(n,t)=>{z$.init(n,t),Qv.init(n,t)}),wT=A("$ZodBoolean",(n,t)=>{fe.init(n,t),n._zod.pattern=R$,n._zod.parse=(e,r)=>{if(t.coerce)try{e.value=!!e.value}catch{}const i=e.value;return typeof i=="boolean"||e.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:n}),e}}),ST=A("$ZodUnknown",(n,t)=>{fe.init(n,t),n._zod.parse=e=>e}),_T=A("$ZodNever",(n,t)=>{fe.init(n,t),n._zod.parse=(e,r)=>(e.issues.push({expected:"never",code:"invalid_type",input:e.value,inst:n}),e)});function Wf(n,t,e){n.issues.length&&t.issues.push(...gi(e,n.issues)),t.value[e]=n.value}const kT=A("$ZodArray",(n,t)=>{fe.init(n,t),n._zod.parse=(e,r)=>{const i=e.value;if(!Array.isArray(i))return e.issues.push({expected:"array",code:"invalid_type",input:i,inst:n}),e;e.value=Array(i.length);const s=[];for(let o=0;o<i.length;o++){const a=i[o],c=t.element._zod.run({value:a,issues:[]},r);c instanceof Promise?s.push(c.then(u=>Wf(u,e,o))):Wf(c,e,o)}return s.length?Promise.all(s).then(()=>e):e}});function al(n,t,e,r,i){if(n.issues.length){if(i&&!(e in r))return;t.issues.push(...gi(e,n.issues))}n.value===void 0?e in r&&(t.value[e]=void 0):t.value[e]=n.value}function ey(n){var r,i,s,o;const t=Object.keys(n.shape);for(const a of t)if(!((o=(s=(i=(r=n.shape)==null?void 0:r[a])==null?void 0:i._zod)==null?void 0:s.traits)!=null&&o.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const e=W1(n.shape);return{...n,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(e)}}function ty(n,t,e,r,i,s){const o=[],a=i.keySet,c=i.catchall._zod,u=c.def.type,h=c.optout==="optional";for(const p in t){if(a.has(p))continue;if(u==="never"){o.push(p);continue}const v=c.run({value:t[p],issues:[]},r);v instanceof Promise?n.push(v.then(m=>al(m,e,p,t,h))):al(v,e,p,t,h)}return o.length&&e.issues.push({code:"unrecognized_keys",keys:o,input:t,inst:s}),n.length?Promise.all(n).then(()=>e):e}const xT=A("$ZodObject",(n,t)=>{fe.init(n,t);const e=Object.getOwnPropertyDescriptor(t,"shape");if(!(e!=null&&e.get)){const a=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}const r=sd(()=>ey(t));ne(n._zod,"propValues",()=>{const a=t.shape,c={};for(const u in a){const h=a[u]._zod;if(h.values){c[u]??(c[u]=new Set);for(const p of h.values)c[u].add(p)}}return c});const i=ol,s=t.catchall;let o;n._zod.parse=(a,c)=>{o??(o=r.value);const u=a.value;if(!i(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:n}),a;a.value={};const h=[],p=o.shape;for(const v of o.keys){const m=p[v],_=m._zod.optout==="optional",k=m._zod.run({value:u[v],issues:[]},c);k instanceof Promise?h.push(k.then(T=>al(T,a,v,u,_))):al(k,a,v,u,_)}return s?ty(h,u,a,c,r.value,n):h.length?Promise.all(h).then(()=>a):a}}),ET=A("$ZodObjectJIT",(n,t)=>{xT.init(n,t);const e=n._zod.parse,r=sd(()=>ey(t)),i=v=>{var W;const m=new j$(["shape","payload","ctx"]),_=r.value,k=N=>{const F=Ff(N);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};m.write("const input = payload.value;");const T=Object.create(null);let P=0;for(const N of _.keys)T[N]=`key_${P++}`;m.write("const newResult = {};");for(const N of _.keys){const F=T[N],Y=Ff(N),j=v[N],ae=((W=j==null?void 0:j._zod)==null?void 0:W.optout)==="optional";m.write(`const ${F} = ${k(N)};`),ae?m.write(`
|
|
7
7
|
if (${F}.issues.length) {
|
package/dist/web/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
6
6
|
<title>Television</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-COrJ-r-C.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-C2ieX0sk.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body></body>
|