@fungi.computer/shed 0.10.15 → 0.10.17
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.
|
@@ -70,7 +70,7 @@ Error generating stack: `+e.message+`
|
|
|
70
70
|
|
|
71
71
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=Lr,s=!Sr.jitless,c=s&&Rr.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?fo([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function ho(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!ei(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>ii(e,r,Cr())))}),t)}var go=L(`$ZodUnion`,(e,t)=>{Ta.init(e,t),jr(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),jr(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),jr(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),jr(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>Or(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>ho(t,r,e,i)):ho(o,r,e,i)}}),_o=L(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,go.init(e,t);let n=e._zod.parse;jr(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=Er(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Lr(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),vo=L(`$ZodIntersection`,(e,t)=>{Ta.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>bo(e,t,n)):bo(e,i,a)}});function yo(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(zr(e)&&zr(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=yo(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=yo(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function bo(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),ei(e))return e;let o=yo(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var xo=L(`$ZodTuple`,(e,t)=>{Ta.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:`tuple`,code:`invalid_type`}),r;r.value=[];let o=[],s=So(n,`optin`),c=So(n,`optout`);if(!t.rest){if(a.length<s)return r.issues.push({code:`too_small`,minimum:s,inclusive:!0,input:a,inst:e,origin:`array`}),r;a.length>n.length&&r.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:a,inst:e,origin:`array`})}let l=Array(n.length);for(let e=0;e<n.length;e++){let t=n[e]._zod.run({value:a[e],issues:[]},i);t instanceof Promise?o.push(t.then(t=>{l[e]=t})):l[e]=t}if(t.rest){let e=n.length-1,s=a.slice(n.length);for(let n of s){e++;let a=t.rest._zod.run({value:n,issues:[]},i);a instanceof Promise?o.push(a.then(t=>Co(t,r,e))):Co(a,r,e)}}return o.length?Promise.all(o).then(()=>wo(l,r,n,a,c)):wo(l,r,n,a,c)}});function So(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!==`optional`)return n+1;return 0}function Co(e,t,n){e.issues.length&&t.issues.push(...ni(n,e.issues)),t.value[n]=e.value}function wo(e,t,n,r,i){for(let a=0;a<n.length;a++){let n=e[a],o=a<r.length;if(n.issues.length){if(!o&&a>=i){t.value.length=a;break}t.issues.push(...ni(a,n.issues))}t.value[a]=n.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}var To=L(`$ZodRecord`,(e,t)=>{Ta.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!zr(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>ii(e,r,Cr())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...ni(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...ni(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&ta.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>ii(e,r,Cr())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...ni(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...ni(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Eo=L(`$ZodEnum`,(e,t)=>{Ta.init(e,t);let n=wr(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>Vr.has(typeof e)).map(e=>typeof e==`string`?Hr(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Do=L(`$ZodLiteral`,(e,t)=>{if(Ta.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?Hr(e):e?Hr(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Oo=L(`$ZodTransform`,(e,t)=>{Ta.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new xr(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new br;return n.value=i,n.fallback=!0,n}});function ko(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ao=L(`$ZodOptional`,(e,t)=>{Ta.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,jr(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),jr(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Or(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>ko(e,r)):ko(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),jo=L(`$ZodExactOptional`,(e,t)=>{Ao.init(e,t),jr(e._zod,`values`,()=>t.innerType._zod.values),jr(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Mo=L(`$ZodNullable`,(e,t)=>{Ta.init(e,t),jr(e._zod,`optin`,()=>t.innerType._zod.optin),jr(e._zod,`optout`,()=>t.innerType._zod.optout),jr(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${Or(e.source)}|null)$`):void 0}),jr(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),No=L(`$ZodDefault`,(e,t)=>{Ta.init(e,t),e._zod.optin=`optional`,jr(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Po(e,t)):Po(r,t)}});function Po(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Fo=L(`$ZodPrefault`,(e,t)=>{Ta.init(e,t),e._zod.optin=`optional`,jr(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Io=L(`$ZodNonOptional`,(e,t)=>{Ta.init(e,t),jr(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Lo(t,e)):Lo(i,e)}});function Lo(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Ro=L(`$ZodCatch`,(e,t)=>{Ta.init(e,t),e._zod.optin=`optional`,jr(e._zod,`optout`,()=>t.innerType._zod.optout),jr(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ii(e,n,Cr()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>ii(e,n,Cr()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),zo=L(`$ZodPipe`,(e,t)=>{Ta.init(e,t),jr(e._zod,`values`,()=>t.in._zod.values),jr(e._zod,`optin`,()=>t.in._zod.optin),jr(e._zod,`optout`,()=>t.out._zod.optout),jr(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Bo(e,t.in,n)):Bo(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Bo(e,t.out,n)):Bo(r,t.out,n)}});function Bo(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var Vo=L(`$ZodReadonly`,(e,t)=>{Ta.init(e,t),jr(e._zod,`propValues`,()=>t.innerType._zod.propValues),jr(e._zod,`values`,()=>t.innerType._zod.values),jr(e._zod,`optin`,()=>t.innerType?._zod?.optin),jr(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Ho):Ho(r)}});function Ho(e){return e.value=Object.freeze(e.value),e}var Uo=L(`$ZodFunction`,(e,t)=>(Ta.init(e,t),e._def=t,e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return function(...n){let r=e._def.input?pi(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?pi(e._def.output,i):i}},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return async function(...n){let r=e._def.input?await hi(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await hi(e._def.output,i):i}},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new xo({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),Wo=L(`$ZodPromise`,(e,t)=>{Ta.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),Go=L(`$ZodLazy`,(e,t)=>{Ta.init(e,t),jr(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),jr(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),jr(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),jr(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),jr(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ko=L(`$ZodCustom`,(e,t)=>{oa.init(e,t),Ta.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>qo(t,n,r,e));qo(i,n,r,e)}});function qo(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(oi(e))}}var Jo,Yo=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Xo(){return new Yo}(Jo=globalThis).__zod_globalRegistry??(Jo.__zod_globalRegistry=Xo());var Zo=globalThis.__zod_globalRegistry;function Qo(e,t){return new e({type:`string`,...Wr(t)})}function $o(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...Wr(t)})}function es(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...Wr(t)})}function ts(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...Wr(t)})}function ns(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...Wr(t)})}function rs(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...Wr(t)})}function is(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...Wr(t)})}function as(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...Wr(t)})}function os(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...Wr(t)})}function ss(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...Wr(t)})}function cs(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...Wr(t)})}function ls(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...Wr(t)})}function us(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...Wr(t)})}function ds(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...Wr(t)})}function fs(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...Wr(t)})}function ps(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...Wr(t)})}function ms(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...Wr(t)})}function hs(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...Wr(t)})}function gs(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...Wr(t)})}function _s(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...Wr(t)})}function vs(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...Wr(t)})}function ys(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...Wr(t)})}function bs(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...Wr(t)})}function xs(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...Wr(t)})}function Ss(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...Wr(t)})}function Cs(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...Wr(t)})}function ws(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...Wr(t)})}function Ts(e,t){return new e({type:`number`,checks:[],...Wr(t)})}function Es(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...Wr(t)})}function Ds(e,t){return new e({type:`boolean`,...Wr(t)})}function Os(e,t){return new e({type:`null`,...Wr(t)})}function ks(e){return new e({type:`unknown`})}function As(e,t){return new e({type:`never`,...Wr(t)})}function js(e,t){return new e({type:`void`,...Wr(t)})}function Ms(e,t){return new ca({check:`less_than`,...Wr(t),value:e,inclusive:!1})}function Ns(e,t){return new ca({check:`less_than`,...Wr(t),value:e,inclusive:!0})}function Ps(e,t){return new la({check:`greater_than`,...Wr(t),value:e,inclusive:!1})}function Fs(e,t){return new la({check:`greater_than`,...Wr(t),value:e,inclusive:!0})}function Is(e,t){return new ua({check:`multiple_of`,...Wr(t),value:e})}function Ls(e,t){return new fa({check:`max_length`,...Wr(t),maximum:e})}function Rs(e,t){return new pa({check:`min_length`,...Wr(t),minimum:e})}function zs(e,t){return new ma({check:`length_equals`,...Wr(t),length:e})}function Bs(e,t){return new ga({check:`string_format`,format:`regex`,...Wr(t),pattern:e})}function Vs(e){return new _a({check:`string_format`,format:`lowercase`,...Wr(e)})}function Hs(e){return new va({check:`string_format`,format:`uppercase`,...Wr(e)})}function Us(e,t){return new ya({check:`string_format`,format:`includes`,...Wr(t),includes:e})}function Ws(e,t){return new ba({check:`string_format`,format:`starts_with`,...Wr(t),prefix:e})}function Gs(e,t){return new xa({check:`string_format`,format:`ends_with`,...Wr(t),suffix:e})}function Ks(e){return new Sa({check:`overwrite`,tx:e})}function qs(e){return Ks(t=>t.normalize(e))}function Js(){return Ks(e=>e.trim())}function Ys(){return Ks(e=>e.toLowerCase())}function Xs(){return Ks(e=>e.toUpperCase())}function Zs(){return Ks(e=>Fr(e))}function Qs(e,t,n){return new e({type:`array`,element:t,...Wr(n)})}function $s(e,t,n){let r=Wr(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function ec(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...Wr(n)})}function tc(e,t){let n=nc(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(oi(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(oi(r))}},e(t.value,t)),t);return n}function nc(e,t){let n=new oa({check:`custom`,...Wr(t)});return n._zod.check=e,n}function rc(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Zo,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function ic(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ic(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&sc(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function ac(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
72
72
|
|
|
73
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function oc(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:lc(t,`input`,e.processors),output:lc(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function sc(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return sc(r.element,n);if(r.type===`set`)return sc(r.valueType,n);if(r.type===`lazy`)return sc(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return sc(r.innerType,n);if(r.type===`intersection`)return sc(r.left,n)||sc(r.right,n);if(r.type===`record`||r.type===`map`)return sc(r.keyType,n)||sc(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:sc(r.in,n)||sc(r.out,n);if(r.type===`object`){for(let e in r.shape)if(sc(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(sc(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(sc(e,n))return!0;return!!(r.rest&&sc(r.rest,n))}return!1}var cc=(e,t={})=>n=>{let r=rc({...n,processors:t});return ic(e,r),ac(r,e),oc(r,e)},lc=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=rc({...i??{},target:a,io:t,processors:n});return ic(e,o),ac(o,e),oc(o,e)},uc={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},dc=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=uc[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},fc=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},pc=(e,t,n,r)=>{n.type=`boolean`},mc=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},hc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},gc=(e,t,n,r)=>{n.not={}},_c=(e,t,n,r)=>{let i=e._zod.def,a=wr(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},vc=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},yc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},bc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},xc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Sc=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ic(a.element,t,{...r,path:[...r.path,`items`]})},Cc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=ic(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ic(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},wc=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ic(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Tc=(e,t,n,r)=>{let i=e._zod.def,a=ic(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ic(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ec=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>ic(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?ic(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Dc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ic(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=ic(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=ic(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Oc=(e,t,n,r)=>{let i=e._zod.def,a=ic(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},kc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ac=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},jc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Mc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Nc=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ic(o,t,r);let s=t.seen.get(e);s.ref=o},Pc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Fc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ic=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Lc=(e,t,n,r)=>{let i=e._zod.innerType;ic(i,t,r);let a=t.seen.get(e);a.ref=i},Rc=L(`ZodISODateTime`,(e,t)=>{za.init(e,t),dl.init(e,t)});function zc(e){return xs(Rc,e)}var Bc=L(`ZodISODate`,(e,t)=>{Ba.init(e,t),dl.init(e,t)});function Vc(e){return Ss(Bc,e)}var Hc=L(`ZodISOTime`,(e,t)=>{Va.init(e,t),dl.init(e,t)});function Uc(e){return Cs(Hc,e)}var Wc=L(`ZodISODuration`,(e,t)=>{Ha.init(e,t),dl.init(e,t)});function Gc(e){return ws(Wc,e)}var Kc=L(`ZodError`,(e,t)=>{ci.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>di(e,t)},flatten:{value:t=>ui(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Tr,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Tr,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),qc=fi(Kc),Jc=mi(Kc),Yc=gi(Kc),Xc=vi(Kc),Zc=bi(Kc),Qc=xi(Kc),$c=Si(Kc),el=Ci(Kc),tl=wi(Kc),nl=Ti(Kc),rl=Ei(Kc),il=Di(Kc),al=new WeakMap;function ol(e,t,n){let r=Object.getPrototypeOf(e),i=al.get(r);if(i||(i=new Set,al.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var sl=L(`ZodType`,(e,t)=>(Ta.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:lc(e,`input`),output:lc(e,`output`)}}),e.toJSONSchema=cc(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>qc(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Yc(e,t,n),e.parseAsync=async(t,n)=>Jc(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Xc(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Zc(e,t,n),e.decode=(t,n)=>Qc(e,t,n),e.encodeAsync=async(t,n)=>$c(e,t,n),e.decodeAsync=async(t,n)=>el(e,t,n),e.safeEncode=(t,n)=>tl(e,t,n),e.safeDecode=(t,n)=>nl(e,t,n),e.safeEncodeAsync=async(t,n)=>rl(e,t,n),e.safeDecodeAsync=async(t,n)=>il(e,t,n),ol(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Nr(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ur(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(tee(e,t))},superRefine(e,t){return this.check(nee(e,t))},overwrite(e){return this.check(Ks(e))},optional(){return gu(this)},exactOptional(){return vu(this)},nullable(){return bu(this)},nullish(){return gu(bu(this))},nonoptional(e){return Eu(this,e)},array(){return Jl(this)},or(e){return eu([this,e])},and(e){return iu(this,e)},transform(e){return Au(this,mu(e))},default(e){return Su(this,e)},prefault(e){return wu(this,e)},catch(e){return Ou(this,e)},pipe(e){return Au(this,e)},readonly(){return Mu(this)},describe(e){let t=this.clone();return Zo.add(t,{description:e}),t},meta(...e){if(e.length===0)return Zo.get(this);let t=this.clone();return Zo.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Zo.get(e)?.description},configurable:!0}),e)),cl=L(`_ZodString`,(e,t)=>{Ea.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dc(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ol(e,`_ZodString`,{regex(...e){return this.check(Bs(...e))},includes(...e){return this.check(Us(...e))},startsWith(...e){return this.check(Ws(...e))},endsWith(...e){return this.check(Gs(...e))},min(...e){return this.check(Rs(...e))},max(...e){return this.check(Ls(...e))},length(...e){return this.check(zs(...e))},nonempty(...e){return this.check(Rs(1,...e))},lowercase(e){return this.check(Vs(e))},uppercase(e){return this.check(Hs(e))},trim(){return this.check(Js())},normalize(...e){return this.check(qs(...e))},toLowerCase(){return this.check(Ys())},toUpperCase(){return this.check(Xs())},slugify(){return this.check(Zs())}})}),ll=L(`ZodString`,(e,t)=>{Ea.init(e,t),cl.init(e,t),e.email=t=>e.check($o(fl,t)),e.url=t=>e.check(as(gl,t)),e.jwt=t=>e.check(bs(Ml,t)),e.emoji=t=>e.check(os(vl,t)),e.guid=t=>e.check(es(pl,t)),e.uuid=t=>e.check(ts(ml,t)),e.uuidv4=t=>e.check(ns(ml,t)),e.uuidv6=t=>e.check(rs(ml,t)),e.uuidv7=t=>e.check(is(ml,t)),e.nanoid=t=>e.check(ss(yl,t)),e.guid=t=>e.check(es(pl,t)),e.cuid=t=>e.check(cs(bl,t)),e.cuid2=t=>e.check(ls(xl,t)),e.ulid=t=>e.check(us(Sl,t)),e.base64=t=>e.check(_s(kl,t)),e.base64url=t=>e.check(vs(Al,t)),e.xid=t=>e.check(ds(Cl,t)),e.ksuid=t=>e.check(fs(wl,t)),e.ipv4=t=>e.check(ps(Tl,t)),e.ipv6=t=>e.check(ms(El,t)),e.cidrv4=t=>e.check(hs(Dl,t)),e.cidrv6=t=>e.check(gs(Ol,t)),e.e164=t=>e.check(ys(jl,t)),e.datetime=t=>e.check(zc(t)),e.date=t=>e.check(Vc(t)),e.time=t=>e.check(Uc(t)),e.duration=t=>e.check(Gc(t))});function ul(e){return Qo(ll,e)}var dl=L(`ZodStringFormat`,(e,t)=>{Da.init(e,t),cl.init(e,t)}),fl=L(`ZodEmail`,(e,t)=>{Aa.init(e,t),dl.init(e,t)}),pl=L(`ZodGUID`,(e,t)=>{Oa.init(e,t),dl.init(e,t)}),ml=L(`ZodUUID`,(e,t)=>{ka.init(e,t),dl.init(e,t)});function hl(e){return ts(ml,e)}var gl=L(`ZodURL`,(e,t)=>{ja.init(e,t),dl.init(e,t)});function _l(e){return as(gl,e)}var vl=L(`ZodEmoji`,(e,t)=>{Ma.init(e,t),dl.init(e,t)}),yl=L(`ZodNanoID`,(e,t)=>{Na.init(e,t),dl.init(e,t)}),bl=L(`ZodCUID`,(e,t)=>{Pa.init(e,t),dl.init(e,t)}),xl=L(`ZodCUID2`,(e,t)=>{Fa.init(e,t),dl.init(e,t)}),Sl=L(`ZodULID`,(e,t)=>{Ia.init(e,t),dl.init(e,t)}),Cl=L(`ZodXID`,(e,t)=>{La.init(e,t),dl.init(e,t)}),wl=L(`ZodKSUID`,(e,t)=>{Ra.init(e,t),dl.init(e,t)}),Tl=L(`ZodIPv4`,(e,t)=>{Ua.init(e,t),dl.init(e,t)}),El=L(`ZodIPv6`,(e,t)=>{Wa.init(e,t),dl.init(e,t)}),Dl=L(`ZodCIDRv4`,(e,t)=>{Ga.init(e,t),dl.init(e,t)}),Ol=L(`ZodCIDRv6`,(e,t)=>{Ka.init(e,t),dl.init(e,t)}),kl=L(`ZodBase64`,(e,t)=>{Ja.init(e,t),dl.init(e,t)}),Al=L(`ZodBase64URL`,(e,t)=>{Xa.init(e,t),dl.init(e,t)}),jl=L(`ZodE164`,(e,t)=>{Za.init(e,t),dl.init(e,t)}),Ml=L(`ZodJWT`,(e,t)=>{$a.init(e,t),dl.init(e,t)}),Nl=L(`ZodNumber`,(e,t)=>{eo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fc(e,t,n,r),ol(e,`ZodNumber`,{gt(e,t){return this.check(Ps(e,t))},gte(e,t){return this.check(Fs(e,t))},min(e,t){return this.check(Fs(e,t))},lt(e,t){return this.check(Ms(e,t))},lte(e,t){return this.check(Ns(e,t))},max(e,t){return this.check(Ns(e,t))},int(e){return this.check(Il(e))},safe(e){return this.check(Il(e))},positive(e){return this.check(Ps(0,e))},nonnegative(e){return this.check(Fs(0,e))},negative(e){return this.check(Ms(0,e))},nonpositive(e){return this.check(Ns(0,e))},multipleOf(e,t){return this.check(Is(e,t))},step(e,t){return this.check(Is(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Pl(e){return Ts(Nl,e)}var Fl=L(`ZodNumberFormat`,(e,t)=>{to.init(e,t),Nl.init(e,t)});function Il(e){return Es(Fl,e)}var Ll=L(`ZodBoolean`,(e,t)=>{no.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pc(e,t,n,r)});function Rl(e){return Ds(Ll,e)}var zl=L(`ZodNull`,(e,t)=>{ro.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mc(e,t,n,r)});function Bl(e){return Os(zl,e)}var Vl=L(`ZodUnknown`,(e,t)=>{io.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Hl(){return ks(Vl)}var Ul=L(`ZodNever`,(e,t)=>{ao.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gc(e,t,n,r)});function Wl(e){return As(Ul,e)}var Gl=L(`ZodVoid`,(e,t)=>{oo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hc(e,t,n,r)});function Kl(e){return js(Gl,e)}var ql=L(`ZodArray`,(e,t)=>{co.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sc(e,t,n,r),e.element=t.element,ol(e,`ZodArray`,{min(e,t){return this.check(Rs(e,t))},nonempty(e){return this.check(Rs(1,e))},max(e,t){return this.check(Ls(e,t))},length(e,t){return this.check(zs(e,t))},unwrap(){return this.element}})});function Jl(e,t){return Qs(ql,e,t)}var Yl=L(`ZodObject`,(e,t)=>{mo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cc(e,t,n,r),jr(e,`shape`,()=>t.shape),ol(e,`ZodObject`,{keyof(){return uu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Hl()})},loose(){return this.clone({...this._zod.def,catchall:Hl()})},strict(){return this.clone({...this._zod.def,catchall:Wl()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Yr(this,e)},safeExtend(e){return Xr(this,e)},merge(e){return Zr(this,e)},pick(e){return qr(this,e)},omit(e){return Jr(this,e)},partial(...e){return Qr(hu,this,e[0])},required(...e){return $r(Tu,this,e[0])}})});function Xl(e,t){return new Yl({type:`object`,shape:e??{},...Wr(t)})}function Zl(e,t){return new Yl({type:`object`,shape:e,catchall:Wl(),...Wr(t)})}function Ql(e,t){return new Yl({type:`object`,shape:e,catchall:Hl(),...Wr(t)})}var $l=L(`ZodUnion`,(e,t)=>{go.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wc(e,t,n,r),e.options=t.options});function eu(e,t){return new $l({type:`union`,options:e,...Wr(t)})}var tu=L(`ZodDiscriminatedUnion`,(e,t)=>{$l.init(e,t),_o.init(e,t)});function nu(e,t,n){return new tu({type:`union`,options:t,discriminator:e,...Wr(n)})}var ru=L(`ZodIntersection`,(e,t)=>{vo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tc(e,t,n,r)});function iu(e,t){return new ru({type:`intersection`,left:e,right:t})}var au=L(`ZodTuple`,(e,t)=>{xo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ec(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function ou(e,t,n){let r=t instanceof Ta;return new au({type:`tuple`,items:e,rest:r?t:null,...Wr(r?n:t)})}var su=L(`ZodRecord`,(e,t)=>{To.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dc(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function cu(e,t,n){return!t||!t._zod?new su({type:`record`,keyType:ul(),valueType:e,...Wr(t)}):new su({type:`record`,keyType:e,valueType:t,...Wr(n)})}var lu=L(`ZodEnum`,(e,t)=>{Eo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_c(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new lu({...t,checks:[],...Wr(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new lu({...t,checks:[],...Wr(r),entries:i})}});function uu(e,t){return new lu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Wr(t)})}var du=L(`ZodLiteral`,(e,t)=>{Do.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vc(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fu(e,t){return new du({type:`literal`,values:Array.isArray(e)?e:[e],...Wr(t)})}var pu=L(`ZodTransform`,(e,t)=>{Oo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xc(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new xr(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(oi(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(oi(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function mu(e){return new pu({type:`transform`,transform:e})}var hu=L(`ZodOptional`,(e,t)=>{Ao.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ic(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gu(e){return new hu({type:`optional`,innerType:e})}var _u=L(`ZodExactOptional`,(e,t)=>{jo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ic(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vu(e){return new _u({type:`optional`,innerType:e})}var yu=L(`ZodNullable`,(e,t)=>{Mo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bu(e){return new yu({type:`nullable`,innerType:e})}var xu=L(`ZodDefault`,(e,t)=>{No.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ac(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Su(e,t){return new xu({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Br(t)}})}var Cu=L(`ZodPrefault`,(e,t)=>{Fo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wu(e,t){return new Cu({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Br(t)}})}var Tu=L(`ZodNonOptional`,(e,t)=>{Io.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Eu(e,t){return new Tu({type:`nonoptional`,innerType:e,...Wr(t)})}var Du=L(`ZodCatch`,(e,t)=>{Ro.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ou(e,t){return new Du({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ku=L(`ZodPipe`,(e,t)=>{zo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nc(e,t,n,r),e.in=t.in,e.out=t.out});function Au(e,t){return new ku({type:`pipe`,in:e,out:t})}var ju=L(`ZodReadonly`,(e,t)=>{Vo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mu(e){return new ju({type:`readonly`,innerType:e})}var Nu=L(`ZodLazy`,(e,t)=>{Go.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lc(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Pu(e){return new Nu({type:`lazy`,getter:e})}var Fu=L(`ZodPromise`,(e,t)=>{Wo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Iu(e){return new Fu({type:`promise`,innerType:e})}var Lu=L(`ZodFunction`,(e,t)=>{Uo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bc(e,t,n,r)});function Ru(e){return new Lu({type:`function`,input:Array.isArray(e?.input)?ou(e?.input):e?.input??Jl(Hl()),output:e?.output??Hl()})}var zu=L(`ZodCustom`,(e,t)=>{Ko.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yc(e,t,n,r)});function Bu(e,t){return $s(zu,e??(()=>!0),t)}function tee(e,t={}){return ec(zu,e,t)}function nee(e,t){return tc(e,t)}function Vu(e,t={}){let n=new zu({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...Wr(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Hu(e){let t=Pu(()=>eu([ul(e),Pl(),Rl(),Bl(),Jl(t),cu(ul(),t)]));return t}uu(`light.dark.latte.mocha.readout.readout-night.field-guide.field-guide-night.embed.embed-dark.phosphor.codec.paper.ember.tide.tape.sunrise.pirate-radio.pirate-radio-night.consulting.consulting-ink.consulting-night.consulting-night-ink.consulting-riso-latte.consulting-riso-latte-ink.consulting-riso-glomzy.consulting-riso-glomzy-ink.vishnu.coin.coin-night.chamfer`.split(`.`));var Uu=`data-theme`;function Wu(e){return e||(globalThis.document?.documentElement??null)}function ree(e){let t=e.trim();if(t.length===0)throw TypeError(`Theme must be a non-empty string`);return t}function Gu(e,t){let n=ree(e),r=Wu(t);r&&r.setAttribute(Uu,n)}function Ku(e){return Wu(e)?.getAttribute(Uu)??null}function iee(e,t){let n=Wu(t),r=globalThis,i=(n?.ownerDocument??null)?.defaultView?.MutationObserver??r.MutationObserver;if(!n||!i)return()=>void 0;let a=new i(t=>{if(!t.some(e=>e.type===`attributes`&&e.attributeName===Uu))return;let r=n.getAttribute(Uu);r&&e(r)});a.observe(n,{attributes:!0,attributeFilter:[Uu]});let o=!1;return()=>{o||(o=!0,a.disconnect())}}var aee=Object.freeze([`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`]);Object.freeze(`--stipe-font-synthesis.--stipe-surface-frame-width.--stipe-surface-frame-image.--stipe-surface-molding-contrast.--stipe-shadow-raised.--stipe-shadow-inset.--stipe-shadow-edge.--stipe-display-gasket-face.--stipe-display-texture-image.--stipe-display-text-shadow.--stipe-canvas.--stipe-surface.--stipe-surface-raised.--stipe-surface-selected.--stipe-fg-muted.--stipe-linework.--stipe-hairline.--stipe-hairline-quiet.--stipe-figure-ink.--stipe-density-compact.--stipe-density-comfortable.--stipe-motion-spring.--stipe-motion-squish.--stipe-motion-fast.--stipe-motion-normal.--stipe-motion-slow.--stipe-motion-ease.--stipe-motion-ease-exit.--stipe-motion-bounce.--stipe-motion-spring-duration.--stipe-motion-stretch.--stipe-motion-distance.--stipe-motion-stagger.--stipe-motion-blur.--stipe-motion-shake.--stipe-motion-steps.--stipe-motion-fuse.--stipe-press-depth.--stipe-press-scale.--stipe-layer-desktop.--stipe-layer-windows.--stipe-layer-chrome.--stipe-layer-popover.--stipe-layer-dialog.--stipe-layer-toast.--stipe-layer-tooltip.--stipe-overlay-shadow-outset.--stipe-icon-size-sm.--stipe-icon-size-md.--stipe-icon-size-lg.--stipe-icon-stroke.--stipe-card-rim.--stipe-card-rim-edge.--stipe-card-face.--stipe-card-panel.--stipe-card-ink.--stipe-card-ink-muted.--stipe-card-accent.--stipe-card-shadow.--stipe-card-foil-highlight.--stipe-card-foil-warm.--stipe-card-foil-cool.--stipe-avatar-shadow.--stipe-art-coral.--stipe-art-blue.--stipe-art-mint.--stipe-art-grape.--stipe-art-yellow.--stipe-art-cream.--stipe-art-ink.--stipe-art-inkcap.--stipe-art-graphite.--stipe-sketch-ink`.split(`.`));function qu(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=qu(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function oee(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=qu(e))&&(r&&(r+=` `),r+=t);return r}var Ju=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Yu=oee,see=(e,t)=>n=>{if(t?.variants==null)return Yu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ju(t)||Ju(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Yu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Xu=Object.defineProperty,cee=((e,t)=>{let n={};for(var r in e)Xu(n,r,{get:e[r],enumerable:!0});return t||Xu(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>ed,isAnyNonArbitrary:()=>See,isArbitraryFamilyName:()=>kee,isArbitraryImage:()=>jee,isArbitraryLength:()=>Eee,isArbitraryNumber:()=>Dee,isArbitraryPosition:()=>Aee,isArbitraryShadow:()=>Mee,isArbitrarySize:()=>Tee,isArbitraryValue:()=>dd,isArbitraryVariable:()=>fd,isArbitraryVariableFamilyName:()=>Nee,isArbitraryVariableImage:()=>Iee,isArbitraryVariableLength:()=>pd,isArbitraryVariablePosition:()=>Pee,isArbitraryVariableShadow:()=>Lee,isArbitraryVariableSize:()=>Fee,isArbitraryVariableWeight:()=>Ree,isArbitraryWeight:()=>Oee,isFraction:()=>hee,isInteger:()=>gee,isNamedContainerQuery:()=>Cee,isNumber:()=>$u,isPercent:()=>_ee,isTshirtSize:()=>vee}),Zu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lee=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dee=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hee=e=>lee.test(e),$u=e=>!!e&&!Number.isNaN(Number(e)),gee=e=>!!e&&Number.isInteger(Number(e)),_ee=e=>e.endsWith(`%`)&&$u(e.slice(0,-1)),vee=e=>uee.test(e),ed=()=>!0,yee=e=>dee.test(e)&&!fee.test(e),td=()=>!1,bee=e=>pee.test(e),xee=e=>mee.test(e),See=e=>!dd(e)&&!fd(e),Cee=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),nd=(e,t,n)=>{let r=Zu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rd=(e,t,n=!1)=>{let r=Qu.exec(e);return r?r[1]?t(r[1]):n:!1},id=e=>e===`position`||e===`percentage`,ad=e=>e===`image`||e===`url`,od=e=>e===`length`||e===`size`||e===`bg-size`,sd=e=>e===`length`,wee=e=>e===`number`,cd=e=>e===`family-name`,ld=e=>e===`number`||e===`weight`,ud=e=>e===`shadow`,Tee=e=>nd(e,od,td),dd=e=>Zu.test(e),Eee=e=>nd(e,sd,yee),Dee=e=>nd(e,wee,$u),Oee=e=>nd(e,ld,ed),kee=e=>nd(e,cd,td),Aee=e=>nd(e,id,td),jee=e=>nd(e,ad,xee),Mee=e=>nd(e,ud,bee),fd=e=>Qu.test(e),pd=e=>rd(e,sd),Nee=e=>rd(e,cd),Pee=e=>rd(e,id),Fee=e=>rd(e,od),Iee=e=>rd(e,ad),Lee=e=>rd(e,ud,!0),Ree=e=>rd(e,ld,!0),md=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},zee=e=>typeof e==`function`&&e.isThemeGetter===!0,Bee=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),Vee=(e,t)=>{let n=Bee(e);t.prefix!==void 0&&(n.prefix=t.prefix);let r=(e,t)=>{if(t)for(let n in t)t[n]!==void 0&&(e[n]=t[n])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));let a=(e,t)=>{if(t)for(let n in t){let r=t[n];r&&(e[n]=(e[n]??[]).concat(r))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},hd={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},Hee=25,Uee=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),gd=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},_d=(e,t)=>{if(typeof t==`function`){let n=e.fnName.get(t);return n===void 0&&(n=`$c`+e.fnName.size,e.fnName.set(t,n),e.impls[n]=t),gd(e,n,t)}let n=t.$v,r=cee[n];if(hd[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return gd(e,n,r)},vd=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),Wee=(e,t)=>e.theme[t]??[],Gee=(e,t,n)=>{let r=vd(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=vd(),e.nextPart.set(n,t)),e=t}return e},a=(n,r,o)=>{if(typeof n==`string`){let e=n===``?r:i(r,n);e.classGroupId=o;return}if(typeof n==`function`){if(zee(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:_d(t,n),groupId:o});return}if(md(n,`$t`)){for(let t of Wee(e,n.$t))a(t,r,o);return}if(md(n,`$v`)){(r.validators??=[]).push({validatorId:_d(t,n),groupId:o});return}for(let[e,t]of Object.entries(n)){let n=i(r,e);for(let e of t)a(e,n,o)}};for(let[t,i]of Object.entries(e.classGroups)){let e=n(t);for(let t of i)a(t,r,e)}return r},Kee=e=>{let t=Uee(),n=[],r=new Map,i=e=>{let t=r.get(e);return t===void 0&&(t=n.length,n.push(e),r.set(e,t)),t},a=Gee(e,t,i),o=e=>{if(e.validators)return!1;for(let t of e.nextPart.values())if(!o(t))return!1;return!0},s=(e,t,n)=>{e.classGroupId>=0&&n.push({tail:t,gid:e.classGroupId});for(let[r,i]of e.nextPart)s(i,t+`-`+r,n)},c=e=>{for(let[t,n]of[...e.nextPart])o(n)?(s(n,t,e.lit),e.nextPart.delete(t)):c(n)};c(a);let l=[{edges:new Map,groupId:-1,vlist:-1}],u=()=>(l.push({edges:new Map,groupId:-1,vlist:-1}),l.length-1),d=[],f=new Map,p=e=>{let t=e.map(e=>e.validatorId+`:`+e.groupId).join(`,`),n=f.get(t);return n===void 0&&(n=d.length,d.push(e.map(e=>[e.validatorId,e.groupId])),f.set(t,n)),n},m=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e),i=l[n].edges.get(r);i===void 0&&(i=u(),l[n].edges.set(r,i)),n=i}return n},h=[],g=(e,t,n)=>{e.classGroupId>=0&&(l[t].groupId=e.classGroupId),e.validators&&(l[t].vlist=p(e.validators));for(let{tail:n,gid:r}of e.lit)h.push({anchor:t,tail:n,gid:r});for(let[r,i]of e.nextPart){let e=t;if(!n){let n=l[t].edges.get(45);n===void 0&&(n=u(),l[t].edges.set(45,n)),e=n}let a=m(e,r);g(i,a,!1)}};g(a,0,!0);let _=new Set(h.map(e=>e.anchor)),v=e=>l[e].groupId>=0||l[e].vlist>=0||_.has(e),y=new Map,b=[],x=e=>{let t=b.length;y.set(e,t);let n={edges:[],groupId:l[e].groupId,vlist:l[e].vlist};b.push(n);let r=[...l[e].edges.entries()].sort((e,t)=>e[0]-t[0]);for(let[e,t]of r){let r=String.fromCharCode(e),i=t;for(;l[i].edges.size===1&&!v(i);){let[[e,t]]=l[i].edges.entries();r+=String.fromCharCode(e),i=t}n.edges.push({label:r,oldTarget:i})}for(let e of n.edges)x(e.oldTarget);return t};x(0);let S=b.length,C=0;for(let e of b)C+=e.edges.length;let w=new Int32Array(S),T=new Int32Array(C),E=``,D=new Int32Array(S),O=new Int32Array(S),k=[];{let e=0;for(let t=0;t<S;t++){let n=b[t];w[t]=n.edges.length;for(let t of n.edges)T[e]=t.label.length,E+=t.label,k.push(y.get(t.oldTarget)),e++;D[t]=n.groupId,O[t]=n.vlist}}{let e=new Int32Array(S);for(let t=S-1;t>=0;t--){let n=1,r=t+1;for(let i=0;i<w[t];i++)n+=e[r],r+=e[r];e[t]=n}let t=0;for(let n=0;n<S;n++){let r=n+1;for(let i=0;i<w[n];i++){if(r!==k[t])throw Error(`cn compiler: edge target mismatch at ${t}`);r+=e[r],t++}}}for(let e of h)e.anchor=y.get(e.anchor);{let e=new Int32Array(d.length).fill(-1),t=[];for(let n=0;n<S;n++){let r=O[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),O[n]=e[r])}d.length=0,d.push(...t)}let A=0;for(let e of d)A+=e.length;let j=new Int32Array(A),M=new Int32Array(A);{let e=0;for(let t of d)for(let[n,r]of t)j[e]=n,M[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let N=[];for(let e of h){let t=N[N.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):N.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let P=new Map,ee=[];for(let e of N){let t=e.tails.join(` `),n=P.get(t);n===void 0&&(n=ee.length,P.set(t,n),ee.push(e.tails)),e.set=n}for(let e of ee.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let te=new Set(ee.flat()).size;N.sort((e,t)=>e.anchor-t.anchor||e.set-t.set);for(let t of Object.values(e.conflictingClassGroups))for(let e of t)i(e);for(let t of Object.values(e.conflictingClassGroupModifiers))for(let e of t)i(e);for(let t of e.postfixLookupClassGroups??[])i(t);let ne=n.length,re=new Int32Array(ne).fill(-1),ie=0,ae=e=>(re[e]===-1&&(re[e]=ie++),re[e]);for(let e=0;e<M.length;e++)M[e]=ae(M[e]);for(let e of N)e.gid=ae(e.gid);for(let e=0;e<D.length;e++)D[e]>=0&&(D[e]=ae(D[e]));for(let e=0;e<ne;e++)re[e]===-1&&(re[e]=ie++);let oe=Array(ne);for(let e=0;e<ne;e++)oe[re[e]]=n[e];let se=[],ce=[],le=[],ue=[],de=[];for(let t=0;t<ne;t++){let n=oe[t],i=(e.conflictingClassGroups[n]??[]).map(e=>re[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>re[r.get(e)]);i.length&&(se.push(t),ce.push(i.length),le.push(...i));for(let e of a)ue.push(t),de.push(e)}let fe=(e.postfixLookupClassGroups??[]).map(e=>re[r.get(e)]),pe=[],me=new Int32Array(j.length);for(let e=0;e<j.length;e++){let n=t.names[j[e]],r=hd[n];if(r!==void 0)me[e]=r;else{let t=pe.indexOf(n);t===-1&&(t=pe.length,pe.push(n)),me[e]=Hee+t}}let he=new Map,ge=[],_e=[],ve=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(me[e++]);let r=n.join(`,`),i=he.get(r);i===void 0&&(i=ge.length,he.set(r,i),ge.push(n.length),_e.push(...n)),ve.push(i)}}let ye={};for(let e of pe)ye[e]=t.classifierFns.get(e);return{G:ne,customNames:pe,impls:ye,edgeCounts:w,edgeLabelLen:T,labelText:E,edgeTargetActual:k,nodeGroup:D,nodeVlist:O,nodeCount:S,totalEdges:C,patCounts:ge,patOps:_e,listPat:ve,vlistGroup:M,litEntries:h,sets:ee,attachments:N,uniqueTailCount:te,adjGid:se,adjCnt:ce,adjTgt:le,patGid:ue,patTgt:de,postfixLookup:fe,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},yd=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},qee=e=>{let t=Kee(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n),o=``,s=new Int32Array(t.uniqueTailCount*2);{let e=new Map,n=0,c=0;for(let l of t.attachments)for(let u of t.sets[l.set]){let t=e.get(u);t===void 0&&(t=n++,e.set(u,t),s[t*2]=o.length,s[t*2+1]=u.length,o+=u),r[c]=l.anchor,i[c]=l.gid,a[c]=t,c++}}return{tables:{GROUP_COUNT:t.G,edgeStart:yd(t.edgeCounts),labelStart:yd(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:yd(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:s,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:yd(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},Jee=`line`in Error(),bd=-1,xd=-1,Sd=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Cd=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},wd=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,ee=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ee=!1)}let te=1;for(;te<m.length*2;)te<<=1;let ne=new Int32Array(te).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Sd(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&te-1;for(;ne[n]!==-1;)n=n+1&te-1;ne[n]=e}let re=(e,t,n,r)=>{let i=(Sd(t,n,r)^Math.imul(e,2654435761)|0)&te-1,a=r-n;for(;;){let r=ne[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&te-1}},ie=n.cacheSize??8192,ae=n.prefix??e.prefix??``,oe=ae===``?``:ae+`:`,se=oe.length,ce=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),le=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,de=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pe=0,me=-1,he=-1,ge=-1,_e=-1,ve=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ye=e=>/\s/.test(String.fromCharCode(e)),be=(e,t,n)=>{if(pe=0,me=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)pe=1;else if(r===40&&i===41)pe=2;else return;ge=t+1,_e=n-1;let a=t+1;if(ve(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!ve(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(me=t+1,he=a,ge=a+1)}},xe=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Se=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ce=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,we=e=>!!e&&!Number.isNaN(Number(e)),Te=(e,t,n)=>{if(n-t<11||!xe(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&xe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&xe(e,t+10,t+18,`-normal/`)},Ee=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],De=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Oe=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ke=(e,t,n,r)=>{if(e>=10){if(e>=25)return ce[e-25](t.slice(n,r));let i=e-10;if(pe!==Ee[i])return!1;if(me>=0){for(let e of De[i])if(xe(t,me,he,e))return!0;return!1}switch(Oe[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(ge,_e);return le.test(e)&&!ue.test(e)}case 3:return we(t.slice(ge,_e));case 4:return fe.test(t.slice(ge,_e));default:return de.test(t.slice(ge,_e))}}switch(e){case 0:return!0;case 1:return pe===0;case 2:return pe===1;case 3:return pe===2;case 4:return Se.test(t.slice(n,r));case 5:return we(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&we(t.slice(n,r-1));case 8:return Ce.test(t.slice(n,r));default:return Te(t,n,r)}},Ae=new Set(typeof E==`string`?E.split(` `):E),je=(e,t,n,r,i,a)=>{let o=Sd(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Me=new Map,Ne=new Map,Pe=2,Fe=4096,Ie=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Ae.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Ne.get(s);return c===void 0&&Ne.set(s,c=Pe++),c},Le=new Map,Re=r,ze=r+4096,Be=()=>Re++,Ve=2097152,He=8192,Ue=new Int32Array(He),We=Array(He).fill(null),Ge=new Int32Array(He),Ke=new Int32Array(He),qe=new Uint8Array(He),Je=0,Ye=(e,t,n,r,i,a,o,s)=>{let c=e;if(We[e]!==null){if(We[e|1]===null)c=e|1;else if(!(Je++&3))c=e|Je>>2&1;else return}We[c]=t.slice(n,r),Ue[c]=i,Ge[c]=a,Ke[c]=o,qe[c]=s},Xe=()=>We.fill(null),Ze=256,Qe=[new Int32Array(Ze),new Int32Array(Ze),new Int32Array(Ze),new Int32Array(Ze)],[$e,et,tt,nt]=Qe,rt=new Uint8Array(Ze),it=new Uint8Array(Ze),at=()=>{Ze*=2,Qe=Qe.map(e=>{let t=new Int32Array(Ze);return t.set(e),t}),[$e,et,tt,nt]=Qe;let e=new Uint8Array(Ze);e.set(rt),rt=e,it=new Uint8Array(Ze)},ot=64,st=new Int32Array(ot),ct=new Int32Array(ot),lt=new Int32Array(r),ut=2048,dt=21,ft=new Float64Array(ut),pt=new Int32Array(ut),mt=0,ht=(e,t)=>{if(e===0&&t<r)return lt[t]===mt?1:(lt[t]=mt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>dt;for(;pt[i]===mt;){if(ft[i]===n)return 1;i=i+1&ut-1}return ft[i]=n,pt[i]=mt,0},gt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?bd:je(Le,e,t+1,r,0,Be)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ct[t];if(r>n)continue;let i=st[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(ee===!1||t!==91&&t!==40){let t=re(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;be(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(ke(d[t],e,r,n))return p[h+t]}return bd},_t=e=>{let t=e.length,n=0,c=0,u=!1;(Pe>Fe||Me.size>Fe)&&(Me=new Map,Ne=new Map,Pe=2,Xe()),Re>ze&&(Le=new Map,Re=r,Xe());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&ye(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&ye(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Ze&&at();let _=n++;$e[_]=p,et[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(Ue[y]===v&&We[y]!==null&&We[y].length===g?t=y:Ue[y|1]===v&&We[y|1]!==null&&We[y|1].length===g&&(t=y|1),t>=0){let n=We[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){tt[_]=Ge[t],nt[_]=Ke[t],rt[_]=qe[t];continue}}}let b=p;if(se!==0){if(h-p<=se||!e.startsWith(oe,p)){tt[_]=bd,Ye(y,e,p,h,v,bd,0,0);continue}b=p+se}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,ee=0,te=0,ne=-1,re=0;(l[0]>=0||N[0]===1)&&(st[0]=0,ct[0]=M,re=1);let ie=xd,ae=0;for(let t=M;t<D;t++)if(t===A&&(ie=ee<te?xd:P,ae=re),P!==xd){let n=e.charCodeAt(t),r=-1;if(ee<te)o.charCodeAt(ee)===n?(ee++,ee===te&&(r=P=ne)):P=xd;else{let e=i[P],t=i[P+1],c=xd;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ee=e+1,te=a[i+1],ne=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(re===ot){ot*=2;let e=new Int32Array(ot);e.set(st),st=e;let t=new Int32Array(ot);t.set(ct),ct=t}st[re]=r,ct[re]=t+2,re++}}A===D&&(ie=ee<te?xd:P,ae=re);let ce=ee<te?xd:P,le,ue=!1;if(A>=0){if(ue=!0,le=gt(e,E,A,ie,ae),le!==bd&&le<r&&j[le]){let t=gt(e,E,D,ce,re);t!==bd&&t!==le&&(le=t,ue=!1)}else le===bd&&(le=gt(e,E,D,ce,re),ue=!1)}else le=gt(e,E,D,ce,re);let de=0,fe=0;le===bd?tt[_]=bd:(fe=+!!ue,de=b>=C?+!!O:je(Me,e,b,C,+!!O,e=>Ie(e,O)),tt[_]=le,rt[_]=fe,nt[_]=de),Ye(y,e,p,h,v,le,de,fe)}if(n===0)return``;if(n===1)return $e[0]===0&&et[0]===t?e:e.slice($e[0],et[0]);if(n*k>ut){for(;n*k>ut;)ut<<=1,dt--;ft=new Float64Array(ut),pt=new Int32Array(ut)}if(Pe>=Ve||Re>=Ve)throw Error(`cn: too many distinct classes in one merge`);mt=mt+1|0,mt===0&&(lt.fill(0),pt.fill(0),mt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=tt[e];if(t===bd){it[e]=1;continue}let n=nt[e];if(ht(n,t)===1){it[e]=0,f=!0;continue}if(it[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)ht(n,x[e]);if(rt[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&ht(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!it[m]){m++;continue}let t=$e[m],r=et[m],i=m+1;for(;i<n&&it[i]&&$e[i]===r+1&&e.charCodeAt(r)===32;)r=et[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},vt=16384,yt=new Int32Array(vt*2),bt=0,xt=1,St=Object.create(null),Ct=Object.create(null),wt=new Map,Tt=new Map,Et=0,Dt=0,Ot=()=>{bt^=vt,xt=xt+1|0,Dt=0},kt=e=>{let t=St[e];if(t!==void 0)return t;let n=Cd(e,0,e.length),r=(n&16383)+bt,i=yt[r]===(n^xt)||yt[r^vt]===(n^xt-1);return i&&(t=Ct[e],t!==void 0)?(St[e]=t,t):(t=_t(e),i?(St[e]=t,++Et>ie&&(Et=0,Ct=St,St=Object.create(null),Ot())):(yt[r]=n^xt,++Dt>vt&&Ot()),t)},At=e=>{let t=wt.get(e);if(t!==void 0)return t;let n=Cd(e,0,e.length),r=(n&16383)+bt,i=yt[r]===(n^xt)||yt[r^vt]===(n^xt-1);return i&&(t=Tt.get(e),t!==void 0)?(wt.set(e,t),t):(t=_t(e),i?(wt.set(e,t),++Et>ie&&(Et=0,Tt=wt,wt=new Map,Ot())):(yt[r]=n^xt,++Dt>vt&&Ot()),t)},jt=e=>{let t=Cd(e,0,e.length),n=(t&16383)+bt;return yt[n]===(t^xt)||yt[n^vt]===(t^xt-1)||(yt[n]=t^xt,++Dt>vt&&Ot(),!1)},Mt=ie===0?_t:Jee?e=>{let t=wt.get(e);return t===void 0?At(e):t}:kt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Mt(arguments[0]):Mt(Xee.apply(null,arguments))},mergeString:Mt,seenBefore:ie===0?()=>!1:jt,mergeUncached:_t}},Td=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Td(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},Yee=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Td(i,t);a&&(n&&(n+=` `),n+=a)}return n},Xee=function(){return Yee(arguments,!1)},Zee=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},l=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},u=(t,c)=>{let u=t.length,d=s===null?null:s.n;if(!c){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let f=``,p=-1,m=0,h=!1;for(let e=0;e<u;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Td(n,!0),!n)continue;h=!0}p<0&&(f=n,p=e),m++}}if(m===0)return``;if(m===1)return e(f);if(h){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let g=i.get(f);g===void 0&&(g=a.get(f),g!==void 0&&i.set(f,g));let _=null;if(g!==void 0)outer:for(let e=0;e<g.length;e++){let n=g[e];if(n.t!==m)continue;let r=n.a,i=1;for(let e=p+1;e<u;e++){let n=t[e];if(n&&n!==r[i++])continue outer}_=n;break}if(_===null){let s=f,c=[f];for(let e=p+1;e<u;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);_={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},g===void 0&&i.set(f,g=[]),g.length>=256&&g.shift(),g.push(_),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==_&&(s.n=_),s=_,_.r},d=t=>Array.isArray(t)?u(t.slice(),!1):e(Td(t,!0));return function(t,n,r){let i=arguments.length;if((i|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&c(i,t,n,r))return s=i,i.r;if(e!==i&&c(e,t,n,r))return e.r}return u([t,n,r],!0)}if(i===1)return typeof t==`string`?e(t):d(t);let a=s;if(a!==null){let e=a.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<i;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(a!==e){let e=a.a,t=0,n=!0;for(let r=0;r<i;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===a.t)return a.r}}let o=[];for(let e=0;e<i;e++)o.push(arguments[e]);return u(o,!0)}},Qee=`{"theme":{"animate":[{"$v":"isAny"}],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]},"columns-auto"],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],"box":[{"box":["border","content"]}],"display":["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],"sr":["sr-only","not-sr-only"],"float":[{"float":["right","left","none","start","end"]}],"clear":[{"clear":["left","right","both","none","start","end"]}],"isolation":["isolate","isolation-auto"],"object-fit":[{"object":["contain","cover","fill","none","scale-down"]}],"object-position":[{"object":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"inline":[{"$t":"container"}]}],"min-inline-size":[{"min-inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"min-inline":[{"$t":"container"}]}],"max-inline-size":[{"max-inline":["none",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"max-inline":[{"$t":"container"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},"max-h-none"],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],"tracking":[{"tracking":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":[{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"whitespace":[{"whitespace":["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],"break":[{"break":["normal","words","all","keep"]}],"wrap":[{"wrap":["break-word","anywhere","normal"]}],"hyphens":[{"hyphens":["none","manual","auto"]}],"content":[{"content":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]},"bg-conic"],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]},"shadow-inner"],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{"mask":["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{"closest":["side","corner"],"farthest":["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"color-scheme":[{"scheme":["normal","dark","light","light-dark","only-dark","only-light"]}],"cursor":[{"cursor":["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],"resize":[{"resize":["none","","y","x"]}],"scroll-behavior":[{"scroll":["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"snap-align":[{"snap":["start","end","center","align-none"]}],"snap-stop":[{"snap":["normal","always"]}],"snap-type":[{"snap":["none","x","y","both"]}],"snap-strictness":[{"snap":["mandatory","proximity"]}],"touch":[{"touch":["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],"select":[{"select":["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"conflictingClassGroups":{"container-named":["container-type"],"overflow":["overflow-x","overflow-y"],"overscroll":["overscroll-x","overscroll-y"],"inset":["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],"flex":["basis","grow","shrink"],"gap":["gap-x","gap-y"],"p":["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],"px":["pr","pl"],"py":["pt","pb"],"m":["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],"mx":["mr","ml"],"my":["mt","mb"],"size":["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],"rounded":["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"translate":["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],"touch":["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}`,Ed=()=>JSON.parse(Qee),$ee=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,ete=e=>e===void 0?{config:Ed()}:typeof e==`function`?{config:e(Ed())}:$ee(e)?{config:e}:{config:Vee(Ed(),e),cacheSize:e.cacheSize},tte=e=>{let{config:t,cacheSize:n}=ete(e),{tables:r,validatorImpls:i,prefix:a}=qee(t);return wd(r,i,{cacheSize:n,prefix:a})},Dd=(e=>{let t=null,n=()=>t??=tte(e);return Zee(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...aee]}}});function Od(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function nte(...e){return t=>{let n=!1,r=e.map(e=>{let r=Od(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Od(e[t],null)}}}}function rte(...e){return I.useCallback(nte(...e),e)}function ite(e){let t=I.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Ad(r)&&typeof jd==`function`&&(r=jd(r._payload)),I.Children.forEach(r,e=>{if(lte(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ad(n)&&typeof jd==`function`&&(n=jd(n._payload)),a=ote(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=I.cloneElement(a,void 0,s):!o&&I.Children.count(r)===1&&I.isValidElement(r)&&(a=r);let c=a?cte(a):void 0,l=rte(n,c);if(!a){if(r||r===0)throw Error(o?pte(e):fte(e));return r}let u=ste(i,a.props??{});return a.type!==I.Fragment&&(u.ref=n?l:c),I.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var kd=ite(`Slot`),ate=Symbol.for(`radix.slottable`),ote=(e,t)=>{if(`child`in e.props){let t=e.props.child;return I.isValidElement(t)?I.cloneElement(t,void 0,e.props.children(t.props.children)):null}return I.isValidElement(t)?t:null};function ste(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function cte(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lte(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ate}var ute=Symbol.for(`react.lazy`);function Ad(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ute&&`_payload`in e&&dte(e._payload)}function dte(e){return typeof e==`object`&&!!e&&`then`in e}var fte=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,pte=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,jd=I.use,Md=(0,I.forwardRef)(function({asChild:e=!1,className:t,...n},r){let i=Dd(`absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]`,t);return e?(0,F.jsx)(kd,{...n,className:i,ref:r}):(0,F.jsx)(`span`,{...n,className:i,ref:r})}),Nd=Object.freeze({reduced:!1,squish:90,fast:120,normal:180,slow:280,springDuration:320,bounce:.3,stretch:.28,distance:4,stagger:24,blur:0,shake:3,steps:0,fuse:1,pressDepth:.5,pressScale:1,ease:`cubic-bezier(0.2, 0, 0, 1)`,easeExit:`cubic-bezier(0.4, 0, 1, 1)`}),Pd=`(prefers-reduced-motion: reduce)`;function Fd(e){let t=e.ownerDocument.defaultView;if(!t)return Nd;let n=t.getComputedStyle(e),r=(e,t)=>{let r=n.getPropertyValue(e).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?Math.max(0,i):t},i=(e,t)=>{let i=n.getPropertyValue(e).trim();return r(e,t)*(i.endsWith(`s`)&&!i.endsWith(`ms`)?1e3:1)},a=t.matchMedia?.(Pd).matches??!1,o=(e,t)=>a?120:i(`--stipe-motion-${e}`,t),s=(e,t)=>a?0:r(`--stipe-motion-${e}`,t);return{reduced:a,squish:o(`squish`,Nd.squish),fast:o(`fast`,Nd.fast),normal:o(`normal`,Nd.normal),slow:o(`slow`,Nd.slow),springDuration:o(`spring-duration`,Nd.springDuration),bounce:Math.min(1,s(`bounce`,Nd.bounce)),stretch:s(`stretch`,Nd.stretch),distance:s(`distance`,Nd.distance),stagger:a?0:i(`--stipe-motion-stagger`,Nd.stagger),blur:s(`blur`,Nd.blur),shake:s(`shake`,Nd.shake),steps:Math.floor(s(`steps`,Nd.steps)),fuse:r(`--stipe-motion-fuse`,Nd.fuse),pressDepth:a?0:r(`--stipe-press-depth`,Nd.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,Nd.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||Nd.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||Nd.easeExit}}function Id(e,t){let n=e.createElement(`div`);n.setAttribute(`style`,t??``);let r=new Map;for(let e of n.style)(e.startsWith(`--stipe-motion-`)||e.startsWith(`--stipe-press-`))&&r.set(e,n.style.getPropertyValue(e).trim());return r}function mte(e){let t=e.target;if(e.attributeName!==`style`||!(t instanceof Element))return!0;let n=t.ownerDocument,r=Id(n,e.oldValue),i=Id(n,t.getAttribute(`style`));return r.size!==i.size||[...i].some(([e,t])=>r.get(e)!==t)}function Ld(e){let[t,n]=(0,I.useState)(()=>({...Nd,reduced:!0}));return(0,I.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=Fd(t);n(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};i();let a=new r.MutationObserver(e=>{e.some(mte)&&i()});for(let e=t;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`],attributeOldValue:!0});let o=r.matchMedia?.(Pd);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function Rd(e,t){return e.reduced?0:Math.round(t*e.normal/Nd.normal)}function hte(e,t){if(e.reduced)return 0;let n=t*e.bounce/Nd.bounce;return Math.min(.9,Math.max(0,n))}function gte(e,t){return e.reduced?0:Math.round(t*e.springDuration/Nd.springDuration)}function zd(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function Bd(e){return`animate`in e}var Vd=globalThis;function _te(){return Vd.matchMedia?.(Pd).matches??!1}function vte(e){let t=Vd.matchMedia?.(Pd);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function yte(){return!0}function Hd(){return(0,I.useSyncExternalStore)(vte,_te,yte)}var Ud=typeof window<`u`,Wd=Ud?window:null,Gd=Ud?document:null,Kd={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},qd={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Jd={NONE:0,AUTO:1,FORCE:2},Yd={replace:0,none:1,blend:2},Xd=Symbol(),Zd=Symbol(),Qd=Symbol(),$d=Symbol(),bte=Symbol(),ef=1e-11,tf=0xe8d4a51000,nf=1e3,rf=[],af=(()=>{let e=new Map;return e.set(`x`,`translateX`),e.set(`y`,`translateY`),e.set(`z`,`translateZ`),e})(),of=[`perspective`,`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`],xte=of.reduce((e,t)=>({...e,[t]:t+`(`}),{}),sf=()=>{},Ste=e=>e,Cte=/\)\s*[-.\d]/,wte=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,Tte=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,Ete=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,Dte=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,Ote=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,cf=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,kte=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,Ate=/([a-z])([A-Z])/g,jte=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,lf={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:nf,delay:0,loopDelay:0,ease:`out(2)`,composition:Yd.replace,modifier:Ste,onBegin:sf,onBeforeUpdate:sf,onUpdate:sf,onLoop:sf,onPause:sf,onComplete:sf,onRender:sf},uf={current:null,root:Gd},df={defaults:lf,precision:4,timeScale:1,tickThreshold:200,editor:null},ff={version:`4.5.0`,engine:null};Ud&&(Wd.AnimeJS||=[],Wd.AnimeJS.push(ff));var pf=e=>e.replace(Ate,`$1-$2`).toLowerCase(),mf=(e,t)=>e.indexOf(t)===0,hf=Date.now,gf=Array.isArray,_f=e=>e&&e.constructor===Object,vf=e=>typeof e==`number`&&!isNaN(e),yf=e=>typeof e==`string`,bf=e=>typeof e==`function`,xf=e=>e===void 0,Sf=e=>xf(e)||e===null,Cf=e=>Ud&&e instanceof SVGElement,wf=e=>wte.test(e),Tf=e=>mf(e,`rgb`),Ef=e=>mf(e,`hsl`),Df=e=>wf(e)||(Tf(e)||Ef(e))&&(e[e.length-1]===`)`||!Cte.test(e)),Of=e=>!df.defaults.hasOwnProperty(e),kf=[`opacity`,`rotate`,`overflow`,`color`],Af=(e,t)=>{if(kf.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===`scale`){let t=e.parentNode;return t&&t.tagName===`filter`}return!0}},jf=Math.pow,Mf=Math.sqrt,Nf=Math.sin,Pf=Math.cos,Ff=Math.abs,If=Math.exp,Lf=Math.ceil,Rf=Math.floor,Mte=Math.asin,zf=Math.PI,Bf=Math.round,Vf=(e,t,n)=>e<t?t:e>n?n:e,Hf=(e,t)=>{if(t<0)return e;if(!t)return Bf(e);let n=10**t;return Bf(e*n)/n},Uf=(e,t,n)=>n===1?t:n===0?e:e+(t-e)*n,Wf=e=>e===1/0?tf:e===-1/0?-tf:e,Gf=e=>e<=1e-11?ef:Wf(Hf(e,11)),Kf=e=>gf(e)?[...e]:e,Nte=(e,t)=>{let n={...e};for(let r in t){let i=e[r];n[r]=xf(i)?t[r]:i}return n},qf=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._head,o=i;for(n&&(a=e._tail,o=r);a;){let e=a[o];t(a),a=e}},Jf=(e,t,n=`_prev`,r=`_next`)=>{let i=t[n],a=t[r];i?i[r]=a:e._head=a,a?a[n]=i:e._tail=i,t[n]=null,t[r]=null},Yf=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._tail;for(;a&&n&&n(a,t);)a=a[r];let o=a?a[i]:e._head;a?a[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=a,t[i]=o},Pte=(e,t,n)=>{let r=e.style.transform;if(r){let i=e[$d],a=0,o=r.length,s;for(;a<o;){for(;a<o&&r.charCodeAt(a)===32;)a++;if(a>=o)break;let e=a;for(;a<o&&r.charCodeAt(a)!==40;)a++;if(a>=o)break;let t=r.substring(e,a),n=1,c=a+1,l=-1,u=-1;for(a++;a<o&&n>0;){let e=r.charCodeAt(a);e===40?n++:e===41?n--:e===44&&n===1&&(l===-1?l=a:u===-1&&(u=a)),a++}let d=a-1;t===`translate`||t===`translate3d`?(l===-1?i.translateX=r.substring(c,d).trim():(i.translateX=r.substring(c,l).trim(),u===-1?i.translateY=r.substring(l+1,d).trim():(i.translateY=r.substring(l+1,u).trim(),i.translateZ=r.substring(u+1,d).trim())),s=r.substring(c,d)):t===`scale`||t===`scale3d`?l===-1?i.scale=r.substring(c,d).trim():(i.scaleX=r.substring(c,l).trim(),u===-1?i.scaleY=r.substring(l+1,d).trim():(i.scaleY=r.substring(l+1,u).trim(),i.scaleZ=r.substring(u+1,d).trim())):i[t]=r.substring(c,d)}if(t===`translate3d`&&s)return n&&(n[t]=s),s;let c=i[t];if(!xf(c))return n&&(n[t]=c),c}return t===`translate3d`?`0px, 0px, 0px`:t===`rotate3d`?`0, 0, 0, 0deg`:mf(t,`scale`)?`1`:mf(t,`rotate`)||mf(t,`skew`)?`0deg`:`0px`},Xf=e=>{let t=``;for(let n=0,r=of.length;n<r;n++){let r=of[n],i=e[r];if(i!==void 0){if(r===`translateX`){let r=e.translateY;if(r!==void 0){let a=e.translateZ;a===void 0?(t+=`translate(${i},${r}) `,n+=1):(t+=`translate3d(${i},${r},${a}) `,n+=2);continue}}if(r===`scaleX`&&e.scale===void 0){let r=e.scaleY;if(r!==void 0){let a=e.scaleZ;a===void 0?(t+=`scale(${i},${r}) `,n+=1):(t+=`scale3d(${i},${r},${a}) `,n+=2);continue}}t+=`${xte[r]}${i}) `}r===`rotateZ`&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},Zf=[];function Qf(e,t){if(!e)return null;let n=Zf.length;outer:for(let r=0;r<n;r++){let n=Zf[r];if(n.detect&&!n.detect(e))continue;let i=n.targetAdapters;for(let n=0,r=i.length;n<r;n++){let r=i[n];if(r.detect(e)){let n=r.props[t];if(n&&(!n.gate||n.gate(e)))return n;break outer}}}for(let r=0;r<n;r++){let n=Zf[r];if(n.detect&&!n.detect(e))continue;let i=n.propertyResolvers;for(let n=0,r=i.length;n<r;n++){let r=i[n](e,t);if(r)return r}}return null}var Fte=e=>{let t=Tte.exec(e)||Ete.exec(e),n=xf(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]},Ite=e=>{let t=e.length,n=t===4||t===5;return[+(`0x`+e[1]+e[n?1:2]),+(`0x`+e[n?2:3]+e[n?2:4]),+(`0x`+e[n?3:5]+e[n?3:6]),t===5||t===9?+((`0x`+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]},$f=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Lte=e=>{let t=Dte.exec(e)||Ote.exec(e),n=t[1]/360,r=t[2]/100,i=t[3]/100,a=xf(t[4])?1:+t[4],o,s,c;if(r===0)o=s=c=i;else{let e=i<.5?i*(1+r):i+r-i*r,t=2*i-e;o=Hf($f(t,e,n+1/3)*255,0),s=Hf($f(t,e,n)*255,0),c=Hf($f(t,e,n-1/3)*255,0)}return[o,s,c,a]},Rte=e=>Tf(e)?Fte(e):wf(e)?Ite(e):Ef(e)?Lte(e):[0,0,0,1],ep=(e,t)=>xf(e)?t:e,tp=(e,t)=>{let n=e.match(jte),r=t[Zd]?t:document.documentElement,i=getComputedStyle(r)?.getPropertyValue(n[1]);return(!i||i.trim()===``)&&n[2]&&(i=n[2].trim()),i||0},np=(e,t,n,r,i,a)=>{if(bf(e)){if(!i){let i=e(t,n,r,a);return isNaN(+i)?i||0:+i}let o=()=>{let i=e(t,n,r,a);return isNaN(+i)?i||0:+i};return i.func=o,o()}if(yf(e)&&mf(e,`var(`)){if(!i)return tp(e,t);let n=()=>tp(e,t);return i.func=n,n()}return e},rp=(e,t)=>e[Zd]?e[Qd]&&Af(e,t)?Kd.ATTRIBUTE:of.includes(t)||af.get(t)?Kd.TRANSFORM:mf(t,`--`)?Kd.CSS_VAR:t in e.style?Kd.CSS:t in e?Kd.OBJECT:Kd.ATTRIBUTE:Kd.OBJECT,ip=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let i=r||getComputedStyle(e[bte]||e).getPropertyValue(t);return i===`auto`?`0`:i},ap=(e,t,n,r)=>{let i=xf(n)?rp(e,t):n,a=Qf(e,t);if(a){let n=a.get(e);return n&&r&&(r[t]=n),n??0}if(i===Kd.OBJECT){let n=e[t];return n&&r&&(r[t]=n),n||0}if(i===Kd.ATTRIBUTE){let n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===Kd.TRANSFORM?Pte(e,t,r):i===Kd.CSS_VAR?ip(e,t,r).trimStart():ip(e,t,r)},op=(e,t,n)=>n===`-`?e-t:n===`+`?e+t:e*t,sp=()=>({t:qd.NUMBER,n:0,u:null,o:null,d:null,s:null}),cp=(e,t)=>{if(t.t=qd.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;let r=e;r[1]===`=`&&(t.o=r[0],r=r.slice(2));let i=!r.includes(` `)&&kte.exec(r);if(i)return t.t=qd.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Df(r))return t.t=qd.COLOR,t.d=Rte(r),t;{let e=r.match(cf);return t.t=qd.COMPLEX,t.d=e?e.map(Number):[],t.s=r.split(cf)||[],t}},lp=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=Kf(e._toNumbers),t.s=Kf(e._strings),t),up=sp(),dp=(e,t,n)=>{let r=e._modifier,i=e._fromNumbers,a=e._toNumbers,o=e._strings,s=o[0];for(let c=0,l=a.length;c<l;c++){let l=r(Hf(Uf(i[c],a[c],t),n)),u=o[c+1];s+=`${u?l+u:l}`,e._numbers[c]=l}return s},fp=(e,t,n,r,i)=>{let a=e.parent,o=e.duration,s=e.completed,c=e.iterationDuration,l=e.iterationCount,u=e._currentIteration,d=e._loopDelay,f=e._reversed,p=e._alternate,m=e._hasChildren,h=e._delay,g=e._currentTime,_=h+c,v=t-h,y=Vf(g,-h,o),b=Vf(v,-h,o),x=v-g,S=b>0,C=b>=o,w=o<=ef,T=i===Jd.FORCE,E=0,D=v,O=0;if(l>1){let t=c+(C?0:d),n=~~(b/t);e._currentIteration=Vf(n,0,l),C&&e._currentIteration--,E=e._currentIteration%2,D=b-n*t||0}let k=f^(p&&E),A=e._ease,j=C?k?0:o:k?c-D:D;A&&(j=c*A(j/c)||0);let M=(a?a.backwards:v<g)?!k:!!k;if(e._currentTime=v,e._iterationTime=j,e.backwards=M,S&&!e.began?(e.began=!0,!n&&!(a&&(M||!a.began))&&e.onBegin(e)):v<=0&&(e.began=!1),!n&&!m&&S&&e._currentIteration!==u&&e.onLoop(e),T||i===Jd.AUTO&&(t>=(a&&h>0?0:h)&&t<=_||t<=h&&y>h||t>=_&&y!==o)||j>=_&&y!==o||j<=h&&y>0&&!C||t<=y&&y===o&&s||C&&!s&&w){if(S&&(e.computeDeltaTime(y),n||e.onBeforeUpdate(e)),!m){let t=T||(M?x*-1:x)>=df.tickThreshold,i=Hf(e._offset+(a?a._offset:0)+h+j,12),o=e._head,s,c,l,u,d=0;for(;o;){let e=o._composition,n=o._currentTime,a=o._changeDuration,f=o._absoluteStartTime+o._changeDuration,p=o._nextRep,m=o._prevRep,h=e!==Yd.none,g=m?m._absoluteStartTime+m._changeDuration:0,_=m&&m.parent!==o.parent,v=!p||p._isOverridden?f:p.parent===o.parent?f+p._delay:p._absoluteStartTime<p._absoluteUpdateStartTime?p._absoluteStartTime:p._absoluteUpdateStartTime;if((t||(n!==a||i<=v||m&&!_&&(!p||p.parent!==o.parent))&&(n!==0||i>=o._absoluteStartTime||_&&!o._hasFromValue&&!m._isOverridden&&i>=g||p&&!p._isOverridden&&p.parent===o.parent&&p._currentTime!==0&&j<p._startTime))&&(!m||_||j>=o._startTime)&&(!h||!o._isOverridden&&(!o._isOverlapped||i<=f)&&(!p||p._isOverridden||i<=v)&&(!m||m._isOverridden||(_?i>=o._absoluteStartTime||!o._hasFromValue&&i>=g:i>=g+o._delay)))){let t=o._currentTime=Vf(j-o._startTime,0,a),n=o._ease(t/o._updateDuration),i=o._modifier,f=o._valueType,p=o._tweenType,m=p===Kd.OBJECT,g=f===qd.NUMBER,_=g&&m||n===0||n===1?-1:df.precision,v,y;if(g)v=y=i(Hf(Uf(o._fromNumber,o._toNumber,n),_));else if(f===qd.UNIT)y=i(Hf(Uf(o._fromNumber,o._toNumber,n),_)),v=`${y}${o._unit}`;else if(f===qd.COLOR){let e=o._numbers,t=o._fromNumbers,a=o._toNumbers,s=1-n,c=t[0],l=t[1],u=t[2],d=a[0],f=a[1],p=a[2];e[0]=i(Math.sqrt(c*c*s+d*d*n)),e[1]=i(Math.sqrt(l*l*s+f*f*n)),e[2]=i(Math.sqrt(u*u*s+p*p*n)),e[3]=i(Uf(t[3],a[3],n)),(!o._setter||r)&&(v=`rgba(${Hf(e[0],0)},${Hf(e[1],0)},${Hf(e[2],0)},${e[3]})`)}else f===qd.COMPLEX&&(v=dp(o,n,_));if(h&&(o._number=y),!r&&e!==Yd.blend){let e=o.property;s=o.target,o._setter?o._setter(s,y,o):m?s[e]=v:p===Kd.ATTRIBUTE?s.setAttribute(e,v):(c=s.style,p===Kd.TRANSFORM?(s!==l&&(l=s,u=s[$d]),u[e]=v,d=1):p===Kd.CSS?c[e]=v:p===Kd.CSS_VAR&&c.setProperty(e,v)),S&&(O=1)}else o._value=v}else n&&m&&!_&&j<o._startTime&&(o._currentTime=0);d&&o._renderTransforms&&(c.transform=Xf(u),d=0),o=o._next}!n&&O&&e.onRender(e)}!n&&S&&e.onUpdate(e)}return a&&w?!n&&(a.began&&!M&&v>0&&!s||M&&v<=1e-11&&s)&&(e.onComplete(e),e.completed=!M):S&&C?l===1/0?e._startTime+=e.duration:e._currentIteration>=l-1&&(e.paused=!0,!s&&!m&&(e.completed=!0,!n&&!(a&&(M||!a.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,O},pp=(e,t,n,r,i)=>{let a=e._currentIteration;if(fp(e,t,n,r,i),e._hasChildren){let o=e,s=o.backwards,c=r?t:o._iterationTime,l=hf(),u=0,d=!0;if(!r&&o._currentIteration!==a){let e=o.iterationDuration;qf(o,t=>{if(!s)!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&fp(t,e,n,1,Jd.FORCE),t.began=!1,t.completed=!1;else{let r=t.duration,i=t._offset+t._delay,a=i+r;!n&&r<=1e-11&&(!i||a===e)&&t.onComplete(t)}}),n||o.onLoop(o)}qf(o,e=>{let t=Hf((c-e._offset)*e._speed,12);if(s&&t>e._delay+e.duration)return;let a=e._fps<o._fps?e.requestTick(l):i;u+=fp(e,t,n,r,a),!e.completed&&d&&(d=!1)},s),!n&&u&&o.onRender(o),(d||s)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}},mp={},zte=(e,t,n)=>{if(n===Kd.TRANSFORM)return af.get(e)||e;if(n===Kd.CSS||n===Kd.ATTRIBUTE&&Cf(t)&&e in t.style){let t=mp[e];if(t)return t;{let t=e&&pf(e);return mp[e]=t,t}}return e},hp=(e,t=!1)=>{if(e._hasChildren)qf(e,e=>hp(e,t),!0);else{let n=e;n.pause(),qf(n,e=>{let r=e.property,i=e.target,a=e._tweenType,o=e._inlineValue,s=Sf(o)||o===``;if(e._setter){if(!t&&!s){if(cp(o,up),up.d){let t=up.d,n=e._numbers;for(let e=0,r=t.length;e<r;e++)n[e]=t[e]}else e._number=up.n;e._setter(e.target,e._number,e)}}else if(a===Kd.OBJECT)!t&&!s&&(i[r]=o);else if(i[Zd]){if(a===Kd.ATTRIBUTE)t||(s?i.removeAttribute(r):i.setAttribute(r,o));else{let t=i.style;if(a===Kd.TRANSFORM){let n=i[$d];s?delete n[r]:n[r]=o,e._renderTransforms&&(Object.keys(n).length?t.transform=Xf(n):t.removeProperty(`transform`))}else s?t.removeProperty(pf(r)):t[r]=o}}i[Zd]&&n._tail===e&&n.targets.forEach(e=>{e.getAttribute&&e.getAttribute(`style`)===``&&e.removeAttribute(`style`)})})}return e},gp=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=nf/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=+e,n=t<1e-11?ef:t,r=nf/n;n>lf.frameRate&&(lf.frameRate=n),this._fps=n,this._frameDuration=r}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?ef:t}requestTick(e){let t=this._frameDuration,n=e-this._lastTickTime,r=t*.25;return n+(r<4?r:4)<t?Jd.NONE:(this._lastTickTime=n>=t?e-n%t:e,Jd.AUTO)}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},_p={animation:null,update:sf},Bte=e=>{let t=_p.animation;return t||(t={duration:ef,computeDeltaTime:sf,_offset:0,_delay:0,_head:null,_tail:null},_p.animation=t,_p.update=()=>{e.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=e===qd.COMPLEX||e===qd.COLOR?Kf(r._fromNumbers):null,i=r._fromNumber,a=n._tail;for(;a&&a!==r;){if(t)for(let e=0,n=a._numbers.length;e<n;e++)t[e]+=a._numbers[e];else i+=a._number;a=a._prevAdd}r._toNumber=i,r._toNumbers=t}}}),fp(t,1,1,0,Jd.FORCE)}),t},vp=Ud?requestAnimationFrame:setImmediate,Vte=Ud?cancelAnimationFrame:clearImmediate,Hte=class extends gp{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=lf,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=hf();if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let i=r._next;r.paused?(Jf(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):pp(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):Jd.AUTO),r=i}_p.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(hf()),this.reqId=vp(bp)),this}pause(){if(this.reqId)return this.paused=!0,Ute()}resume(){if(this.paused)return this.paused=!1,qf(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(df.timeScale===1?1:nf)}set speed(e){let t=e*df.timeScale;this._speed!==t&&(this._speed=t,qf(this,e=>e.speed=e._speed))}get timeUnit(){return df.timeScale===1?`ms`:`s`}set timeUnit(e){let t=.001,n=e===`s`,r=n?t:1;if(df.timeScale!==r){df.timeScale=r,df.tickThreshold=200*r;let e=n?t:nf;this.defaults.duration*=e,this._speed*=e}}get precision(){return df.precision}set precision(e){df.precision=e}},yp=(()=>{let e=new Hte(hf());return Ud&&(ff.engine=e,Gd.addEventListener(`visibilitychange`,()=>{e.pauseOnDocumentHidden&&(Gd.hidden?e.pause():e.resume())})),e})(),bp=()=>{yp._head?(yp.reqId=vp(bp),yp.update()):yp.reqId=0},Ute=()=>(Vte(yp.reqId),yp.reqId=0,yp),xp={_rep:new WeakMap,_add:new Map},Sp=(e,t,n=`_rep`)=>{let r=xp[n],i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},Wte=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,Cp=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=ef,e._currentTime=ef},wp=(e,t)=>{let n=e._composition;if(n===Yd.replace){let n=e._absoluteStartTime;Yf(t,e,Wte,`_prevRep`,`_nextRep`);let r=e._prevRep;if(r){let t=r.parent,i=r._absoluteEndTime;if(e.parent.id!==t.id&&t.iterationCount>1&&i+(t.duration-t.iterationDuration)>n){Cp(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)Cp(e),e=e._prevRep}let a=e._absoluteUpdateStartTime;if(i>a){let e=r._startTime,t=Hf(a-(i-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&Cp(r)}let o=e.parent.parent;if(!o||o!==t.parent){let e=!0;if(qf(t,t=>{t._isOverlapped||(e=!1)}),e){let e=t.parent;if(e){let n=!0;qf(e,e=>{e!==t&&qf(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}}else if(n===Yd.blend){let t=Sp(e.target,e.property,`_add`),n=Bte(xp._add),r=t._head;r||(r={...e},r._composition=Yd.replace,r._updateDuration=ef,r._startTime=0,r._numbers=Kf(e._fromNumbers),r._number=0,r._next=null,r._prev=null,Yf(t,r),Yf(n,r));let i=e._toNumber;if(e._fromNumber=r._fromNumber-i,e._toNumber=0,e._numbers=Kf(e._fromNumbers),e._number=0,r._fromNumber=i,e._toNumbers.length){let t=Kf(e._toNumbers);t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}Yf(t,e,null,`_prevAdd`,`_nextAdd`)}return e},Gte=e=>{let t=e._composition;if(t!==Yd.none){let n=e.target,r=e.property,i=xp._rep.get(n)[r];if(Jf(i,e,`_prevRep`,`_nextRep`),t===Yd.blend){let t=xp._add,i=t.get(n);if(!i)return;let a=i[r],o=_p.animation;Jf(a,e,`_prevAdd`,`_nextAdd`);let s=a._head;if(s&&s===a._tail){Jf(a,s,`_prevAdd`,`_nextAdd`),Jf(o,s);let e=!0;for(let t in i)if(i[t]._head){e=!1;break}e&&t.delete(n)}}}return e},Tp=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Ep=e=>e._cancelled?(e._hasChildren?qf(e,Ep):qf(e,e=>{e._composition!==Yd.none&&wp(e,Sp(e.target,e.property))}),e._cancelled=0,e):e,Dp=0,Kte=(e,t)=>e._priority>t._priority,qte=class extends gp{constructor(e={},t=null,n=0){super(0),++Dp;let{id:r,delay:i,duration:a,reversed:o,alternate:s,loop:c,loopDelay:l,autoplay:u,frameRate:d,playbackRate:f,priority:p,onComplete:m,onLoop:h,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:y}=e;uf.current&&uf.current.register(this);let b=t?0:yp._lastTickTime,x=t?t.defaults:df.defaults,S=bf(i)||xf(i)?x.delay:+i,C=bf(a)||xf(a)?1/0:+a,w=ep(c,x.loop),T=ep(l,x.loopDelay),E=w===!0||w===1/0||w<0?1/0:w+1,D=0;t?D=n:(yp.reqId||yp.requestTick(hf()),D=(yp._lastTickTime-yp._startTime)*df.timeScale),this.id=xf(r)?Dp:r,this.parent=t,this.duration=Wf((C+T)*E-T)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=y||x.onUpdate,this.onLoop=h||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=C,this.iterationCount=E,this._autoplay=!t&&ep(u,x.autoplay),this._offset=D,this._delay=S,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=sf,this._running=!1,this._reversed=+ep(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=ep(s,x.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=ep(d,x.frameRate),this._speed=ep(f,x.playbackRate),this._priority=+ep(p,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Vf(Hf(this._currentTime,df.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return Vf(Hf(this._iterationTime,df.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Vf(Hf(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Vf(Hf(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Vf(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return Ep(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,pp(this,0,1,~~e,Jd.FORCE),Tp(this),this._hasChildren&&qf(this,Tp),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&pp(this,this.duration,1,~~e,Jd.FORCE),this.reset(e);let t=this._autoplay;return t===!0?this.resume():t&&!xf(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*yp._speed);return this._startTime=hf()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?pp(this,ef,0,0,Jd.FORCE):(this._running||=(Yf(yp,this,Kte),yp._hasChildren=!0,!0),this.resetTime(),this._startTime-=12,yp.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,n=0){Ep(this),this.completed=!1;let r=this.paused;return this.paused=!0,pp(this,e+this._delay,~~t,~~n,Jd.AUTO),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Rf(tf/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?qf(this,e=>e.cancel(),!0):qf(this,Gte),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=Gf(e);if(t===n)return this;let r=e/t,i=e<=ef;return this.duration=i?ef:n,this.iterationDuration=i?ef:Gf(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){pp(this,0,1,0,Jd.AUTO);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=sf){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=sf};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}};function Op(e){let t=yf(e)?uf.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function Jte(e){if(Sf(e))return[];if(!Ud)return gf(e)&&e.flat(1/0)||[e];if(gf(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!Sf(r)){let e=Op(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!Sf(r)){let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=Op(e);return t?Array.from(t):[e]}function Yte(e){let t=Jte(e),n=t.length;for(let e=0;e<n;e++){let n=t[e];if(!n[Xd]){n[Xd]=!0;let e=Cf(n);(n.nodeType||e)&&(n[Zd]=!0,n[Qd]=e,n[$d]={})}}return t}var kp={deg:1,rad:180/zf,turn:360},Ap={},jp=(e,t,n,r=!1)=>{let i=t.u,a=t.n;if(t.t===qd.UNIT&&i===n)return t;let o=a+i+n,s=Ap[o];if(!xf(s)&&!r)t.n=s;else{let r;if(i in kp)r=a*kp[i]/kp[n];else{let t=e.cloneNode(),o=e.parentNode,s=o&&o!==Gd?o:Gd.body;s.appendChild(t);let c=t.style;c.width=100+i;let l=t.offsetWidth||100;c.width=100+n;let u=l/(t.offsetWidth||100);s.removeChild(t),r=u*a}t.n=r,Ap[o]=r}return t.t,qd.UNIT,t.u=n,t},Mp=e=>e,Np=(e=1.68)=>t=>jf(t,+e),Pp={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},Xte=zf/2,Fp=zf*2,Ip={"":Np,Quad:Np(2),Cubic:Np(3),Quart:Np(4),Quint:Np(5),Sine:e=>1-Pf(e*Xte),Circ:e=>1-Mf(1-e*e),Expo:e=>e?jf(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=jf(2,--n))-1)/11;);return 1/jf(4,3-n)-7.5625*jf((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{let n=Vf(+e,1,10),r=Vf(+t,ef,2),i=r/Fp*Mte(1/n),a=Fp/r;return e=>e===0||e===1?e:-n*jf(2,-10*(1-e))*Nf((1-e-i)*a)}},Lp=(()=>{let e={linear:Mp,none:Mp};for(let t in Pp)for(let n in Ip){let r=Ip[n],i=Pp[t];e[t+n]=n===``||n===`Back`||n===`Elastic`?(e,t)=>i(r(e,t)):i(r)}return e})(),Rp={linear:Mp,none:Mp},Zte=e=>{if(Rp[e])return Rp[e];if(e.indexOf(`(`)<=-1){let t=Pp[e]||e.includes(`Back`)||e.includes(`Elastic`)?Lp[e]():Lp[e];return t?Rp[e]=t:Mp}{let t=e.slice(0,-1).split(`(`),n=Lp[t[0]];return n?Rp[e]=n(...t[1].split(`,`)):Mp}},zp=[`steps(`,`irregular(`,`linear(`,`cubicBezier(`],Bp=e=>{if(yf(e)){for(let t=0,n=zp.length;t<n;t++)if(mf(e,zp[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),Mp}return bf(e)?e:yf(e)?Zte(e):Mp},Vp=sp(),Hp=sp(),Up={},Wp={func:null},Gp={func:null},Kp=[null],qp=[null,null],Jp={to:null},Qte=0,Yp=0,Xp,Zp,$te=(e,t)=>{let n={};if(gf(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(Of);for(let r=0,i=t.length;r<i;r++){let i=t[r];n[i]=e.map(e=>{let t={};for(let n in e){let r=e[n];Of(n)?n===i&&(t.to=r):t[n]=r}return t})}}else{let r=ep(t.duration,df.defaults.duration);Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,i=e.p;for(let e in i)if(Of(e)){let a=n[e];a||=n[e]=[];let o=t*r,s=a.length,c=a[s-1],l={to:i[e]},u=0;for(let e=0;e<s;e++)u+=a[e].duration;s===1&&(l.from=c.to),i.ease&&(l.ease=i.ease),l.duration=o-(s?u:0),a.push(l)}return e});for(let e in n){let t=n[e],r;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=n.ease;n.ease=r||void 0,r=i}t[0].duration||t.shift()}}return n},ene=class extends qte{constructor(e,t,n,r,i=!1,a=0,o){super(t,n,r),this._head,this._tail,++Yp;let s=Yte(e),c=s.length,l=t.keyframes,u=l?Nte($te(l,t),t):t,{id:d,delay:f,duration:p,ease:m,playbackEase:h,modifier:g,composition:_,onRender:v}=u,y=n?n.defaults:df.defaults,b=ep(m,y.ease),x=ep(h,y.playbackEase),S=x?Bp(x):null,C=!xf(b.ease),w=C?b.ease:ep(m,S?`linear`:y.ease),T=C?b.settlingDuration:ep(p,y.duration),E=ep(f,y.delay),D=g||y.modifier,O=xf(_)&&c>=1e3?Yd.none:xf(_)?y.composition:_,k=this._offset+(n?n._offset:0);C&&(b.parent=this);let A=NaN,j=NaN,M=0,N=0;for(let e=0;e<c;e++){let t=s[e],r=a||e,c=o||s,l=NaN,d=NaN;for(let e in u)if(Of(e)){let a=rp(t,e),o=Qf(t,e),s=zte(e,t,a),f=u[e],p=gf(f);if(i&&!p&&(qp[0]=f,qp[1]=f,f=qp),p){let e=f.length,t=!_f(f[0]);e===2&&t?(Jp.to=f,Kp[0]=Jp,Xp=Kp):e>2&&t?(Xp=[],f.forEach((e,t)=>{t?t===1?(qp[1]=e,Xp.push(qp)):Xp.push(e):qp[0]=e})):Xp=f}else Kp[0]=f,Xp=Kp;let m=null,h=null,g=NaN,_=0,v=0;for(let e=Xp.length;v<e;v++){let i=Xp[v];_f(i)?Zp=i:(Jp.to=i,Zp=Jp),Wp.func=null,Gp.func=null;let l=np(ep(Zp.composition,O),t,r,c,null,null),u=vf(l)?l:Yd[l];!m&&u!==Yd.none&&(m=Sp(t,s));let d=m?m._tail:null,f=n&&d&&d.parent.parent===n?d:h,p=np(Zp.to,t,r,c,Wp,f),y;_f(p)&&!xf(p.to)?(Zp=p,y=p.to):y=p;let b=np(Zp.from,t,r,c,Gp,f),x=Zp.ease||w,S=np(x,t,r,c,null,f),C=bf(S)||yf(S)?S:x,A=!xf(C)&&!xf(C.ease),j=A?C.ease:C,P=A?C.settlingDuration:np(ep(Zp.duration,e>1?np(T,t,r,c,null,f)/e:T),t,r,c,null,f),ee=np(ep(Zp.delay,v?0:E),t,r,c,null,f),te=Zp.modifier||D,ne=!xf(b),re=!xf(y),ie=gf(y),ae=ie||ne&&re,oe=h?_:0,se=h?_+ee:ee,ce=Hf(k+se,12),le=Hf(k+oe,12);!N&&(ne||ie)&&(N=1);let ue=h;if(u!==Yd.none){let e=m._head;for(;e&&e._absoluteStartTime<=ce;)if(e._isOverridden||(ue=e),e=e._nextRep,e&&e._absoluteStartTime>=ce)for(;e;)Cp(e),e=e._nextRep}if(ae){cp(ie?np(y[0],t,r,c,Gp,f):b,Vp),cp(ie?np(y[1],t,r,c,Wp,f):y,Hp);let e=ap(t,s,a,Up);Vp.t===qd.NUMBER&&(ue?ue._valueType===qd.UNIT&&(Vp.t=qd.UNIT,Vp.u=ue._unit):(cp(e,up),up.t===qd.UNIT&&(Vp.t=qd.UNIT,Vp.u=up.u)))}else re?cp(y,Hp):h?lp(h,Hp):cp(n&&ue&&ue.parent.parent===n?ue._value:ap(t,s,a,Up),Hp),ne?cp(b,Vp):h?lp(h,Vp):cp(n&&ue&&ue.parent.parent===n?ue._value:ap(t,s,a,Up),Vp);if(Vp.o&&(Vp.n=op(ue?ue._toNumber:cp(ap(t,s,a,Up),up).n,Vp.n,Vp.o)),Hp.o&&(Hp.n=op(Vp.n,Hp.n,Hp.o)),Vp.t!==Hp.t){if(Vp.t===qd.COMPLEX||Hp.t===qd.COMPLEX){let e=Vp.t===qd.COMPLEX?Vp:Hp,t=Vp.t===qd.COMPLEX?Hp:Vp;t.t=qd.COMPLEX,t.s=Kf(e.s),t.d=e.d.map(()=>t.n)}else if(Vp.t===qd.UNIT||Hp.t===qd.UNIT){let e=Vp.t===qd.UNIT?Vp:Hp,t=Vp.t===qd.UNIT?Hp:Vp;t.t=qd.UNIT,t.u=e.u}else if(Vp.t===qd.COLOR||Hp.t===qd.COLOR){let e=Vp.t===qd.COLOR?Vp:Hp,t=Vp.t===qd.COLOR?Hp:Vp;t.t=qd.COLOR,t.d=e.d.map(()=>0)}}if(Vp.u!==Hp.u){let e=Hp.u?Vp:Hp;e=jp(t,e,Hp.u?Hp.u:Vp.u,!1)}if(Hp.d&&Vp.d&&Hp.d.length!==Vp.d.length){let e=Vp.d.length>Hp.d.length?Vp:Hp,t=e===Vp?Hp:Vp;t.d=e.d.map((e,n)=>xf(t.d[n])?0:t.d[n]),t.s=Kf(e.s)}let de=Hf(+P||1e-11,12),fe=Up[s];Sf(fe)||(Up[s]=null);let pe=o?o.set:null;_=Hf(se+de,12);let me=Vp.d,he=Hp.d,ge=Hp.s,_e={parent:this,id:Qte++,property:s,target:t,_value:null,_toFunc:Wp.func,_fromFunc:Gp.func,_ease:Bp(j),_fromNumbers:me?Kf(me):rf,_toNumbers:he?Kf(he):rf,_strings:ge?Kf(ge):rf,_fromNumber:Vp.n,_toNumber:Hp.n,_numbers:me?Kf(me):rf,_number:Vp.n,_unit:Hp.u,_modifier:te,_currentTime:0,_startTime:se,_delay:+ee,_updateDuration:de,_changeDuration:de,_absoluteStartTime:ce,_absoluteUpdateStartTime:le,_absoluteEndTime:Hf(k+_,12),_hasFromValue:ne||ie?1:0,_tweenType:a,_setter:pe,_valueType:Hp.t,_composition:u,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:fe,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};u!==Yd.none&&wp(_e,m);let ve=_e._valueType;if(ve===qd.COMPLEX)_e._value=dp(_e,1,-1);else if(ve===qd.UNIT)_e._value=`${te(_e._toNumber)}${_e._unit}`;else if(ve===qd.COLOR){let e=Hp.d;_e._value=`rgba(${Hf(e[0],0)},${Hf(e[1],0)},${Hf(e[2],0)},${e[3]})`}else _e._value=te(_e._toNumber);isNaN(g)&&(g=_e._startTime),h=_e,M++,Yf(this,_e)}(isNaN(j)||g<j)&&(j=g),(isNaN(A)||_>A)&&(A=_),a===Kd.TRANSFORM&&(l=M-v,d=M)}if(!isNaN(l)){let e=0;qf(this,t=>{e>=l&&e<d&&(t._renderTransforms=1,t._composition===Yd.blend&&qf(_p.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}c||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),j?(qf(this,e=>{e._startTime-e._delay||(e._delay-=j),e._startTime-=j}),A-=j):j=0,A||(A=ef,this.iterationCount=0),this.targets=s,this.id=xf(d)?Yp:d,this.duration=A===1e-11?ef:Wf((A+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=v||y.onRender,this._ease=S,this._delay=j,this.iterationDuration=A,!this._autoplay&&N&&this.onRender(this)}stretch(e){let t=this.duration;if(t===Gf(e))return this;let n=e/t;return qf(this,e=>{e._updateDuration=Gf(e._updateDuration*n),e._changeDuration=Gf(e._changeDuration*n),e._currentTime*=n,e._delay*=n,e._startTime*=n,e._absoluteStartTime*=n,e._absoluteUpdateStartTime*=n,e._absoluteEndTime*=n}),super.stretch(e)}refresh(){return qf(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(cp(n(),Vp),Vp.u!==e._unit&&e.target[Zd]&&jp(e.target,Vp,e._unit,!0),e._fromNumbers=Kf(Vp.d),e._fromNumber=Vp.n):t&&(cp(ap(e.target,e.property,e._tweenType),up),e._fromNumbers=Kf(up.d),e._fromNumber=up.n),t&&(cp(t(),Hp),e._toNumbers=Kf(Hp.d),e._strings=Kf(Hp.s),e._toNumber=Hp.o?op(e._fromNumber,Hp.n,Hp.o):Hp.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),hp(this)}then(e){return super.then(e)}},Qp=(e,t)=>df.editor?df.editor.addAnimation(e,t):new ene(e,t,null,0,!1).init(),$p=nf*10,tne=class{constructor(e={}){let t=!xf(e.bounce)||!xf(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/nf,this.maxIterations=this.maxDuration/this.timeStep/nf,this.bn=Vf(ep(e.bounce,.5),-1,1),this.pd=Vf(ep(e.duration,628),10*df.timeScale,$p*df.timeScale),this.m=Vf(ep(e.mass,1),1,$p),this.s=Vf(ep(e.stiffness,100),ef,$p),this.d=Vf(ep(e.damping,10),ef,$p),this.v=Vf(ep(e.velocity,0),-$p,$p),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||sf,t&&this.calculateSDFromBD(),this.compute(),this.ease=e=>{let t=e*this.settlingDuration,n=this.completed,r=this.pd;return t>=r&&!n&&(this.completed=!0,this.onComplete(this.parent)),t<r&&n&&(this.completed=!1),e===0||e===1?e:this.solve(e*this.solverDuration)}}solve(e){let{zeta:t,w0:n,wd:r,b:i}=this,a=e;return a=t<1?If(-a*t*n)*(1*Pf(r*a)+i*Nf(r*a)):t===1?(1+i*a)*If(-a*n):((1+i)*If((-t*n+r)*a)+(1-i)*If((-t*n-r)*a))/2,1-a}calculateSDFromBD(){let e=df.timeScale===1?this.pd/nf:this.pd;this.m=1,this.v=0,this.s=jf(2*zf/e,2),this.d=this.bn>=0?(1-this.bn)*4*zf/e:4*zf/(e*(1+this.bn)),this.s=Hf(Vf(this.s,ef,$p),3),this.d=Hf(Vf(this.d,ef,300),3)}calculateBDFromSD(){let e=2*zf/Mf(this.s);this.pd=e*(df.timeScale===1?nf:1),this.bn=this.d/(2*Mf(this.s))<=1?1-this.d*e/(4*zf):4*zf/(this.d*e)-1,this.bn=Hf(Vf(this.bn,-1,1),3),this.pd=Hf(Vf(this.pd,10*df.timeScale,$p*df.timeScale),3)}compute(){let{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:i,d:a,s:o,v:s}=this,c=this.w0=Vf(Mf(o/i),ef,nf),l=this.zeta=a/(2*Mf(o*i));l<1?(this.wd=c*Mf(1-l*l),this.b=(l*c+-s)/this.wd):l===1?(this.wd=0,this.b=-s+c):(this.wd=c*Mf(l*l-1),this.b=(l*c+-s)/this.wd);let u=0,d=0,f=0;for(;d<=e&&f<=t;)Ff(1-this.solve(u))<n?d++:d=0,this.solverDuration=u,u+=r,f++;this.settlingDuration=Hf(this.solverDuration*nf,0)*df.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=Vf(ep(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=Vf(ep(e,1),10*df.timeScale,$p*df.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=Vf(ep(e,100),ef,$p),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=Vf(ep(e,10),ef,$p),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=Vf(ep(e,1),1,$p),this.compute()}get velocity(){return this.v}set velocity(e){this.v=Vf(ep(e,0),-$p,$p),this.compute()}},nne=e=>new tne(e),em=(e=10,t)=>{let n=t?Lf:Rf;return t=>n(Vf(t,0,1)*e)*(1/e)},tm=(0,I.forwardRef)(function({id:e,transform:t},n){return(0,F.jsxs)(`radialGradient`,{ref:n,id:e,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`-1.6`,r:`5.6`,gradientTransform:t,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`color-mix(in oklab, var(--color-white) calc(var(--depth) * 50%), currentColor)`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`currentColor`})]})});function nm({id:e}){return(0,F.jsx)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,F.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1`,floodColor:`currentColor`,style:{floodOpacity:`calc(var(--depth) * 0.6)`}})})}function rm({id:e}){return(0,F.jsxs)(`filter`,{id:e,x:`-10%`,y:`-10%`,width:`120%`,height:`120%`,colorInterpolationFilters:`sRGB`,children:[(0,F.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.3`,result:`soft-edge`}),(0,F.jsx)(`feOffset`,{in:`soft-edge`,dx:`0.25`,dy:`0.45`,result:`lower-edge`}),(0,F.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`lower-edge`,operator:`out`,result:`inner-shadow`}),(0,F.jsx)(`feFlood`,{floodColor:`var(--color-black)`,floodOpacity:`calc(var(--depth) * 0.28)`}),(0,F.jsx)(`feComposite`,{in2:`inner-shadow`,operator:`in`,result:`shade`}),(0,F.jsx)(`feOffset`,{in:`soft-edge`,dx:`-0.2`,dy:`-0.35`,result:`upper-edge`}),(0,F.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`upper-edge`,operator:`out`,result:`inner-highlight`}),(0,F.jsx)(`feFlood`,{floodColor:`var(--color-white)`,floodOpacity:`calc(var(--depth) * 0.7)`}),(0,F.jsx)(`feComposite`,{in2:`inner-highlight`,operator:`in`,result:`highlight`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`}),(0,F.jsx)(`feMergeNode`,{in:`shade`}),(0,F.jsx)(`feMergeNode`,{in:`highlight`})]})]})}var im=Object.freeze({alphaIntercept:-8,alphaSlope:18,blurStdDeviation:2});function am({id:e,values:t=fr}){return(0,F.jsxs)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,F.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:t.blurStdDeviation,result:`blur`}),(0,F.jsx)(`feColorMatrix`,{in:`blur`,values:`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${String(t.alphaSlope)} ${String(t.alphaIntercept)}`,result:`gooey`}),(0,F.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`gooey`,operator:`atop`})]})}function om(e,t){let n=e.ownerDocument,r=!0,i=()=>{t(r&&!n.hidden)},a=globalThis,o=`IntersectionObserver`in globalThis&&a.IntersectionObserver?new a.IntersectionObserver(t=>{let n=t.find(t=>t.target===e);n&&(r=n.isIntersecting,i())}):void 0;return o?.observe(e),n.addEventListener(`visibilitychange`,i),i(),()=>{o?.disconnect(),n.removeEventListener(`visibilitychange`,i)}}function sm(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function cm(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function lm(e,t,n){let r=n*Math.PI*2,i=t*2.1,a=Math.sin(r*2+i)*.15,o={rx:4*(1+a),ry:4/(1+a)};if(e===`line`){let e=7.5+4*Math.cos(r+(t===2?-.45:0));return{cx:(t-1)*e,cy:Math.sin(r+i)*.7,...o}}if(e===`square`){let e=4.7+2.7*Math.cos(r);return{cx:(t%2?1:-1)*e,cy:(t<2?-1:1)*e,...o}}if(e===`donut`){let e=sm(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=sm((n-.79)/.21),c=8+Math.sin(r*2+i)*.35*Math.sin(n*Math.PI);return{cx:Math.cos(o)*c*(1-s),cy:Math.sin(o)*c*(1-s)-8*s,rx:3.6*(1+a*Math.sin(n*Math.PI)),ry:3.6/(1+a*Math.sin(n*Math.PI))}}if(e===`bloom`){if(t===0){let e=[1,2,3,4].reduce((e,t)=>e+cm(t,n),0),t=Math.sqrt(49-e*4);return{cx:Math.sin(r)*.4,cy:Math.sin(r*2)*.4,rx:t*(1+a),ry:t/(1+a)}}let e=cm(t,n),i=(t-1)*Math.PI/2-Math.PI/4+Math.sin(r)*.22;return{cx:Math.cos(i)*14*e,cy:Math.sin(i)*14*e,rx:3.2*(1+a),ry:3.2/(1+a)}}return{cx:Math.sin(r+i)*6+Math.sin(r*3+i)*2.5,cy:Math.cos(r*2+i)*6,...o}}var rne={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},ine=2;function ane({variant:e,pace:t=`working`}){let n=`caps-loader-${(0,I.useId)().replaceAll(`:`,``)}`,r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=Ld(i),{reduced:o}=a,s=e===`donut`?16:e===`bloom`?5:e===`square`?4:3;return(0,I.useLayoutEffect)(()=>{if(!r.current||!i.current||o&&t===`idle`)return;let n=o?[Qp(r.current,{opacity:[.55,1],duration:a.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...r.current.querySelectorAll(`ellipse`)].map((n,r)=>Qp(n,{keyframes:Array.from({length:48},(n,i)=>({...lm(e,r,(i+1)/48),duration:Rd(a,rne[e]*(t===`idle`?ine:1))/48})),ease:`linear`,loop:!0})),s=om(i.current,e=>{for(let t of n)e?t.resume():t.pause()});return()=>{s();for(let e of n)e.revert()}},[e,t,o,a]),(0,F.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,focusable:`false`,viewBox:e===`line`?`-20 -10 40 20`:`-20 -20 40 40`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(am,{id:n,values:im}),(0,F.jsx)(tm,{id:`${n}-surface`,transform:e===`line`?`matrix(3.4 0 0 1.4 0 0)`:`matrix(3 0 0 3 0 0)`}),(0,F.jsx)(nm,{id:`${n}-shadow`}),(0,F.jsx)(`mask`,{id:`${n}-mask`,maskUnits:`userSpaceOnUse`,x:`-20`,y:`-20`,width:`40`,height:`40`,style:{maskType:`alpha`},children:(0,F.jsx)(`g`,{ref:r,fill:`currentColor`,filter:`url(#${n})`,children:Array.from({length:s},(t,n)=>(0,F.jsx)(`ellipse`,{...lm(e,n,0)},n))})})]}),(0,F.jsx)(`g`,{filter:`url(#${n}-shadow)`,children:(0,F.jsx)(`rect`,{x:`-20`,y:`-20`,width:`40`,height:`40`,fill:`url(#${n}-surface)`,mask:`url(#${n}-mask)`})})]})}var one={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},sne={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},um=(0,I.forwardRef)(function({"aria-label":e,"aria-labelledby":t,className:n,decorative:r=!1,label:i=`Loading`,size:a=`md`,variant:o=`line`,pace:s=`working`,tone:c=`neutral`,...l},u){let d=`${(0,I.useId)()}-label`,f=!r&&e===void 0&&t===void 0;return(0,F.jsxs)(`span`,{...l,"aria-label":r?void 0:e,"aria-hidden":r||void 0,"aria-labelledby":r?void 0:t??(e===void 0?d:void 0),className:Dd(`caps-loader`,one[a],sne[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,F.jsx)(ane,{variant:o,pace:s}),f?(0,F.jsx)(Md,{id:d,children:i}):null]})}),dm=Object.freeze({ease:`linear`,duration:0});function fm(e,t){let n=gte(e,t.duration);return n<=0?dm:e.steps>0?{ease:em(e.steps),duration:n}:{ease:nne({bounce:hte(e,t.bounce),duration:n}),duration:n}}function pm(e,t){let n=Rd(e,t.duration);return{ease:e.steps>0?em(e.steps):t.ease,duration:n}}var mm={dot:{y:-4,height:8,cy:0},pill:{y:-16,height:32,cy:0},bang:{y:-16,height:20,cy:12}};function cne({className:e,glyph:t,motion:n}){let r=`caps-status-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(mm[t]).current,d=(0,I.useRef)(t===`dot`?1:4).current,f=(0,I.useRef)(+(t===`bang`)).current,p=(0,I.useRef)(t),m=Ld(s),{reduced:h}=m;return(0,I.useLayoutEffect)(()=>{if(!i.current||!a.current||!c.current||!l.current)return;let e=mm[t],n=h||p.current===t;p.current=t;let r=Fd(i.current),o=n?{duration:0}:fm(r,{bounce:.3,duration:360}),s=Qp(i.current,{y:e.y,height:e.height,...o}),u=Qp(a.current,{cy:e.cy,...n?{duration:0}:{delay:Rd(r,35),...fm(r,{bounce:.3,duration:420})}}),d=Qp(c.current,{gradientTransform:`matrix(1 0 0 ${t===`dot`?`1`:`4`} 0 0)`,...o}),f=Qp(l.current,{opacity:+(t===`bang`),...n?dm:pm(r,{ease:`inOutSine`,duration:220})});return()=>{s.cancel(),u.cancel(),d.cancel(),f.cancel()}},[t,h]),(0,I.useLayoutEffect)(()=>{if(!o.current||!s.current||h||n===`none`)return;let e=n===`pulse`?Qp(o.current,{opacity:[1,.45],...pm(m,{ease:`inOutSine`,duration:750}),alternate:!0,loop:!0}):Qp(o.current,{keyframes:{"0%":{translateY:0,scaleX:1,scaleY:1},"18%":{translateY:.25,scaleX:1.1,scaleY:.91},"42%":{translateY:-1.3,scaleX:.94,scaleY:1.06},"62%":{translateY:-1.65,scaleX:1,scaleY:1},"82%":{translateY:.15,scaleX:1.06,scaleY:.95},"100%":{translateY:0,scaleX:1,scaleY:1}},...pm(m,{ease:`inOutSine`,duration:1e3}),loop:!0}),t=om(s.current,t=>{t?e.resume():e.pause()});return()=>{t(),e.revert()}},[n,h,m]),(0,F.jsxs)(`svg`,{ref:s,"aria-hidden":`true`,className:`caps-status-bead ${e??``}`,width:`8`,height:`8`,viewBox:`-4 -4 8 8`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(am,{id:r,values:im}),(0,F.jsx)(tm,{ref:c,id:`${r}-surface`,transform:`matrix(1 0 0 ${String(d)} 0 0)`}),(0,F.jsxs)(`radialGradient`,{id:`${r}-drop-light`,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`10.4`,r:`5.6`,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-white)`,style:{stopOpacity:`calc(var(--depth) * 0.5)`}}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-white)`,stopOpacity:`0`})]}),(0,F.jsx)(nm,{id:`${r}-shadow`}),(0,F.jsx)(`mask`,{id:`${r}-silhouette`,maskUnits:`userSpaceOnUse`,x:`-12`,y:`-24`,width:`24`,height:`48`,style:{maskType:`alpha`},children:(0,F.jsxs)(`g`,{fill:`var(--color-white)`,filter:`url(#${r})`,children:[(0,F.jsx)(`rect`,{ref:i,x:`-4`,y:u.y,width:`8`,height:u.height,rx:`4`}),(0,F.jsx)(`circle`,{ref:a,cx:`0`,cy:u.cy,r:`4`})]})})]}),(0,F.jsx)(`g`,{ref:o,filter:`url(#${r}-shadow)`,children:(0,F.jsxs)(`g`,{mask:`url(#${r}-silhouette)`,children:[(0,F.jsx)(`rect`,{x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-surface)`}),(0,F.jsx)(`rect`,{ref:l,x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-drop-light)`,opacity:f})]})})]})}var lne=.28;function hm(e,t){switch(e){case`ring`:return{dashes:1,track:0,arc:0,sweep:0,disc:0,tick:0,cross:0};case`arc`:return{dashes:0,track:1,arc:1,sweep:t===void 0?lne:Math.min(1,Math.max(0,t)),disc:0,tick:0,cross:0};case`check`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:1,cross:0};case`cross`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:0,cross:1}}}var gm=7.25;function une({className:e,glyph:t,progress:n}){let r=`caps-status-mark-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(null),d=(0,I.useRef)(null),f=(0,I.useRef)(hm(t,n)).current,p=(0,I.useRef)(t),m=Hd();(0,I.useLayoutEffect)(()=>{let e=i.current,r=a.current,c=o.current,f=s.current,h=l.current,g=u.current,_=d.current;if(!e||!r||!c||!f||!h||!g||!_)return;let v=hm(t,n),y=p.current;p.current=t;let b=Fd(e),x=m||y===t&&t!==`arc`,S=x?m?{ease:b.ease,duration:b.fast}:dm:pm(b,{ease:`outQuad`,duration:160}),C=(t===`check`||t===`cross`)&&!x,w=pm(b,{ease:`inOutSine`,duration:220}),T=[Qp(r,{opacity:v.dashes,...S}),Qp(c,{opacity:v.track*.28,...S}),Qp(f,{opacity:v.arc,"stroke-dasharray":`${String(v.sweep)} 1`,...x?m?dm:S:w}),Qp(h,{r:v.disc*gm,...C?{delay:w.duration*.7,...fm(b,{bounce:.35,duration:360})}:m?dm:pm(b,{ease:`inCubic`,duration:140})}),Qp(g,{"stroke-dashoffset":1-v.tick,...C&&v.tick>0?{delay:w.duration*.7+b.fast,...pm(b,{ease:`outCubic`,duration:240})}:dm}),Qp(_,{"stroke-dashoffset":1-v.cross,...C&&v.cross>0?{delay:w.duration*.7+b.fast,...pm(b,{ease:`outCubic`,duration:240})}:dm})];return t===`cross`&&C&&b.shake>0&&T.push(Qp(e,{translateX:[0,-b.shake,b.shake,-b.shake/2,0],delay:w.duration+b.fast,...pm(b,{ease:`linear`,duration:300})})),()=>{for(let e of T)e.cancel()}},[t,n,m]);let h=t===`arc`&&n===void 0&&!m;return(0,I.useLayoutEffect)(()=>{if(!h||!c.current||!i.current)return;let e=Fd(i.current),t=Qp(c.current,{rotate:[0,360],...pm(e,{ease:`linear`,duration:900}),loop:!0}),n=om(i.current,e=>{e?t.resume():t.pause()});return()=>{n(),t.revert()}},[h]),(0,F.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,className:`caps-status-mark ${e??``}`,viewBox:`0 0 16 16`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{id:`${r}-surface`,transform:`matrix(1.6 0 0 1.6 8 8)`}),(0,F.jsxs)(`mask`,{id:`${r}-knock`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`16`,height:`16`,children:[(0,F.jsx)(`rect`,{width:`16`,height:`16`,fill:`var(--color-white)`}),(0,F.jsx)(`path`,{ref:u,d:`M4.9 8.3 7.1 10.5 11.2 5.9`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.tick}),(0,F.jsx)(`path`,{ref:d,d:`M5.4 5.4 10.6 10.6 M10.6 5.4 5.4 10.6`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.cross})]})]}),(0,F.jsx)(`circle`,{ref:a,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`1.7 2.2`,opacity:f.dashes}),(0,F.jsx)(`circle`,{ref:o,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,opacity:f.track*.28}),(0,F.jsx)(`g`,{ref:c,className:`caps-status-mark-spin`,children:(0,F.jsx)(`circle`,{ref:s,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`${String(f.sweep)} 1`,transform:`rotate(-90 8 8)`,opacity:f.arc})}),(0,F.jsx)(`circle`,{ref:l,cx:`8`,cy:`8`,r:f.disc*gm,fill:`url(#${r}-surface)`,mask:`url(#${r}-knock)`})]})}var dne=new Set([`ring`,`arc`,`check`,`cross`]);function fne(e){return dne.has(e)}var _m={neutral:`text-base-content`,primary:`text-primary`,secondary:`text-secondary`,accent:`text-accent`,success:`text-success`,info:`text-info`,warning:`text-warning`,error:`text-error`},vm=(0,I.forwardRef)(function({className:e,label:t,glyph:n=`dot`,motion:r=`none`,tone:i=`neutral`,size:a=`default`,appearance:o=`plain`,progress:s,...c},l){return(0,F.jsxs)(`span`,{...c,className:Dd(`caps-status`,a===`compact`&&`caps-status-compact`,o===`chip`&&`caps-status-chip`,e),"data-tone":o===`chip`?i:void 0,"data-glyph":n,"data-motion":r,ref:l,children:[fne(n)?(0,F.jsx)(une,{className:_m[i],glyph:n,progress:s}):(0,F.jsx)(cne,{className:_m[i],glyph:n,motion:r}),t===void 0?null:(0,F.jsx)(`span`,{children:t})]})}),pne=(0,I.createContext)(void 0),mne=(0,I.createContext)(null);function ym(e){let t=(0,I.useContext)(mne);return t===null?Object.hasOwn(globalThis,`document`)?document.body:null:t[e]}function hne(e){let t=(0,I.useContext)(pne),n=(0,I.useRef)(e);n.current=e,(0,I.useEffect)(()=>t?.(()=>{n.current()}),[t])}var bm=`(max-width: 600px)`,xm=globalThis;function gne(e){let t=xm.matchMedia?.(bm);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function _ne(){return(0,I.useSyncExternalStore)(gne,()=>xm.matchMedia?.(bm).matches??!1,()=>!1)}function vne({className:e,...t}){let n=ym(`toast`),r=_ne();return n?(0,gn.createPortal)((0,F.jsx)(Jn,{position:r?`bottom-center`:`top-right`,swipeDirections:r?[`bottom`]:[`right`,`top`],mobileOffset:{top:16,bottom:`max(16px, env(safe-area-inset-bottom))`,left:16,right:16},offset:16,gap:8,icons:{close:(0,F.jsx)(dr,{"aria-hidden":`true`,size:12}),success:(0,F.jsx)(vm,{glyph:`dot`,tone:`success`}),error:(0,F.jsx)(vm,{glyph:`dot`,tone:`error`}),warning:(0,F.jsx)(vm,{glyph:`dot`,tone:`warning`}),info:(0,F.jsx)(vm,{glyph:`dot`,tone:`info`}),loading:(0,F.jsx)(um,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`})},className:Dd(`caps-toaster`,e),...t}),n):null}var Sm=e=>e.length>0,Cm=`~effect/Option`,wm={[Cm]:{_A:e=>e},...St,[Symbol.iterator](){return new ct(this)}},yne=Object.defineProperty(Object.assign(Object.create(wm),{_tag:`Some`,_op:`Some`,[Ce](e){return Tm(e)&&Dm(e)&&we(this.value,e.value)},[ie](){return ce(ae(this._tag))(ae(this.value))},toString(){return`some(${Ke(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:rt(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),bne=ae(`None`),xne=Object.assign(Object.create(wm),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[Ce](e){return Tm(e)&&Em(e)},[ie](){return bne},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),Tm=e=>re(e,Cm),Em=e=>e._tag===`None`,Dm=e=>e._tag===`Some`,Sne=Object.create(xne),Om=function(e){this.value=e};Om.prototype=yne;var Cne=e=>new Om(e),km=`~effect/Result`,Am={[km]:{_A:e=>e,_E:e=>e},...St,[Symbol.iterator](){return new ct(this)}},wne=Object.assign(Object.create(Am),{_tag:`Success`,_op:`Success`,[Ce](e){return jm(e)&&Ene(e)&&we(this.success,e.success)},[ie](){return ce(ae(this._tag))(ae(this.success))},toString(){return`success(${Ke(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:rt(this.success)}}}),Tne=Object.assign(Object.create(Am),{_tag:`Failure`,_op:`Failure`,[Ce](e){return jm(e)&&Mm(e)&&we(this.failure,e.failure)},[ie](){return ce(ae(this._tag))(ae(this.failure))},toString(){return`failure(${Ke(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:rt(this.failure)}}}),jm=e=>re(e,km),Mm=e=>e._tag===`Failure`,Ene=e=>e._tag===`Success`,Nm=function(e){this.failure=e};Nm.prototype=Tne;var Dne=e=>new Nm(e),Pm=function(e){this.success=e};Pm.prototype=wne;var One=e=>new Pm(e);function Fm(e){return(t,n)=>t===n?0:e(t,n)}var kne=Fm((e,t)=>e<t?-1:1),Im=Fm((e,t)=>globalThis.Number.isNaN(e)&&globalThis.Number.isNaN(t)?0:globalThis.Number.isNaN(e)?-1:globalThis.Number.isNaN(t)?1:e<t?-1:1),Ane=e=>f(2,(t,n)=>e(t,n)===-1),Lm=e=>f(2,(t,n)=>e(t,n)===1),jne=e=>f(2,(t,n)=>e(t,n)!==1),Rm=e=>f(2,(t,n)=>e(t,n)!==-1),zm=()=>Sne,Bm=Cne,Vm=Em,Hm=Dm,Mne=f(2,(e,{onNone:t,onSome:n})=>Vm(e)?t():n(e.value)),Um=f(2,(e,t)=>Vm(e)?t():e.value),Wm=f(2,(e,t)=>Vm(e)?t():e),Gm=Um(g),Km=Um(_),Nne=f(2,(e,t)=>Vm(e)?zm():Bm(t(e.value))),qm=One,Jm=Dne,Ym=Mm,Pne=f(2,(e,t)=>Ym(e)?Jm(t(e.failure)):e),Xm=f(2,(e,{onFailure:t,onSuccess:n})=>Ym(e)?t(e.failure):n(e.success)),Fne=globalThis.Array,Zm=f(2,(e,t)=>[...e,t]);Fne.isArray;var Ine=Sm,Lne=Sm,Qm=()=>[],Rne=f(2,(e,t)=>e.map(t)),$m=`~effect/BigDecimal`,zne={[$m]:$m,[ie](){let e=nh(this);return ce(fe(String(e.value)),de(e.scale))},[Ce](e){return Bne(e)&&qne(this,e)===0},toString(){return`BigDecimal(${Jne(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[nt](){return this.toJSON()},pipe(){return l(this,arguments)}},Bne=e=>re(e,$m),Vne=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(zne);return n.value=e,n.scale=t,n},eh=(e,t)=>{let n=Vne(e,t);return n.normalized=n,n},th=BigInt(0),Hne=BigInt(1),Une=BigInt(10),Wne=eh(th,0),nh=e=>{if(e.normalized===void 0){if(e.value===th)e.normalized=Wne;else{let t=`${e.value}`,n=t.length;for(;t[n-1]===`0`;)n--;e.normalized=eh(BigInt(t.slice(0,n)),e.scale-(t.length-n))}}return e.normalized},Gne=100,Kne=[Hne],rh=(e,t)=>e===t?0:e<t?-1:1,ih=(e,t)=>{let n=`${e.value<th?-e.value:e.value}`,r=`${t.value<th?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==th)return i<th?-1:1;let a=Math.max(n.length,r.length);return kne(n.padEnd(a,`0`),r.padEnd(a,`0`))},qne=(e,t)=>{if(e.scale===t.scale)return rh(e.value,t.value);let n=ah(e),r=ah(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>Gne)return n===-1?ih(t,e):ih(e,t);let o=Kne[a]??=Une**BigInt(a);return i>0?rh(e.value,t.value*o):rh(e.value*o,t.value)},ah=e=>e.value===th?0:e.value<th?-1:1,Jne=e=>{let t=nh(e);if(Math.abs(t.scale)>=16)return Yne(t);let n=t.value<th,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},Yne=e=>{if(Xne(e))return`0e+0`;let t=nh(e),n=`${t.value}`,r=t.value<th?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},Xne=e=>e.value===th,Zne=e=>Wt({op:e.label,[_t]:e.evaluate}),oh=`~effect/Context/Service`,sh=function(){function e(){}let t=e;Object.setPrototypeOf(t,Qne);let n=(e,n)=>(t.key=e,n?.defaultValue&&(t[lh]=lh,t.defaultValue=n.defaultValue),n?.make&&(t.make=n.make),n?.fiberCached&&ch.add(e),t);return arguments.length>0?n(arguments[0],arguments[1]):n},Qne={[oh]:oh,...Zne({label:`Service`,evaluate(e){return qt(bh(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key}},of(e){return e},context(e){return vh(this,e)},use(e){return $t(t=>e(bh(t.context,this)))},useSync(e){return $t(t=>qt(e(bh(t.context,this))))}},ch=new Set,lh=`~effect/Context/Reference`,uh=`~effect/Context`,$ne=8,ere=8,dh=(e,t,n,r)=>{let i=Object.create(tre);return i.cacheRoot=e??i,i.base=t,i.overlay=n,i.depth=r,i._flat=void 0,i.baseHits=0,i},fh=(e,t)=>{t&&(fh(e,t.parent),e.set(t.key,t.value))},ph=e=>{if(e._flat)return e._flat;if(!e.overlay)return e._flat=e.base;let t=new Map(e.base);return fh(t,e.overlay),e._flat=t},mh=Symbol(),hh=(e,t)=>{let n=e;for(let e=n.overlay;e;e=e.parent)if(e.key===t)return e.value;let r=n.base.get(t);return r===void 0&&!n.base.has(t)?mh:(n.overlay&&++n.baseHits>=n.base.size&&n.baseHits>=ere&&(n.base=ph(n),n.overlay=void 0,n.depth=0),r)},gh=e=>dh(void 0,e,void 0,0),tre={get mapUnsafe(){return ph(this)},...St,[uh]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[Ce](e){if(!rre(e))return!1;let t=this.mapUnsafe,n=e.mapUnsafe;if(t.size!==n.size)return!1;for(let[e,r]of t)if(!n.has(e)||!we(r,n.get(e)))return!1;return!0},[ie](){return de(this.mapUnsafe.size)}},nre=(e,t)=>e.cacheRoot===t.cacheRoot,rre=e=>re(e,uh),ire=e=>!!e[lh],_h=()=>are,are=gh(new Map),vh=(e,t)=>gh(new Map([[e.key,t]])),ore=f(3,(e,t,n)=>sre(e,t.key,n)),sre=(e,t,n)=>{let r=e,i=ch.has(t)?void 0:r.cacheRoot;if(r.depth>=$ne){let e=new Map(r.mapUnsafe);return e.set(t,n),dh(i,e,void 0,0)}return dh(i,r.base,{key:t,value:n,parent:r.overlay},r.depth+1)},yh=(e,t)=>{let n=hh(e,t);return n===mh?void 0:n},bh=f(2,(e,t)=>{let n=hh(e,t.key);if(n===mh){if(ire(t))return cre(t);throw lre(t)}return n}),xh=`~effect/Context/defaultValue`,cre=e=>xh in e?e[xh]:e[xh]=e.defaultValue(),lre=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(t.stack){let e=t.stack.split(`
|
|
73
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function oc(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:lc(t,`input`,e.processors),output:lc(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function sc(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return sc(r.element,n);if(r.type===`set`)return sc(r.valueType,n);if(r.type===`lazy`)return sc(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`)return sc(r.innerType,n);if(r.type===`intersection`)return sc(r.left,n)||sc(r.right,n);if(r.type===`record`||r.type===`map`)return sc(r.keyType,n)||sc(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:sc(r.in,n)||sc(r.out,n);if(r.type===`object`){for(let e in r.shape)if(sc(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(sc(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(sc(e,n))return!0;return!!(r.rest&&sc(r.rest,n))}return!1}var cc=(e,t={})=>n=>{let r=rc({...n,processors:t});return ic(e,r),ac(r,e),oc(r,e)},lc=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=rc({...i??{},target:a,io:t,processors:n});return ic(e,o),ac(o,e),oc(o,e)},uc={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},dc=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=uc[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},fc=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},pc=(e,t,n,r)=>{n.type=`boolean`},mc=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},hc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},gc=(e,t,n,r)=>{n.not={}},_c=(e,t,n,r)=>{let i=e._zod.def,a=wr(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},vc=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},yc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},bc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},xc=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Sc=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ic(a.element,t,{...r,path:[...r.path,`items`]})},Cc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=ic(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ic(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},wc=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ic(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Tc=(e,t,n,r)=>{let i=e._zod.def,a=ic(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ic(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},Ec=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>ic(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?ic(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},Dc=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ic(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else(t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=ic(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=ic(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Oc=(e,t,n,r)=>{let i=e._zod.def,a=ic(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},kc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ac=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},jc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Mc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Nc=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ic(o,t,r);let s=t.seen.get(e);s.ref=o},Pc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Fc=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ic=(e,t,n,r)=>{let i=e._zod.def;ic(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Lc=(e,t,n,r)=>{let i=e._zod.innerType;ic(i,t,r);let a=t.seen.get(e);a.ref=i},Rc=L(`ZodISODateTime`,(e,t)=>{za.init(e,t),dl.init(e,t)});function zc(e){return xs(Rc,e)}var Bc=L(`ZodISODate`,(e,t)=>{Ba.init(e,t),dl.init(e,t)});function Vc(e){return Ss(Bc,e)}var Hc=L(`ZodISOTime`,(e,t)=>{Va.init(e,t),dl.init(e,t)});function Uc(e){return Cs(Hc,e)}var Wc=L(`ZodISODuration`,(e,t)=>{Ha.init(e,t),dl.init(e,t)});function Gc(e){return ws(Wc,e)}var Kc=L(`ZodError`,(e,t)=>{ci.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>di(e,t)},flatten:{value:t=>ui(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Tr,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Tr,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),qc=fi(Kc),Jc=mi(Kc),Yc=gi(Kc),Xc=vi(Kc),Zc=bi(Kc),Qc=xi(Kc),$c=Si(Kc),el=Ci(Kc),tl=wi(Kc),nl=Ti(Kc),rl=Ei(Kc),il=Di(Kc),al=new WeakMap;function ol(e,t,n){let r=Object.getPrototypeOf(e),i=al.get(r);if(i||(i=new Set,al.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var sl=L(`ZodType`,(e,t)=>(Ta.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:lc(e,`input`),output:lc(e,`output`)}}),e.toJSONSchema=cc(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>qc(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Yc(e,t,n),e.parseAsync=async(t,n)=>Jc(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Xc(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Zc(e,t,n),e.decode=(t,n)=>Qc(e,t,n),e.encodeAsync=async(t,n)=>$c(e,t,n),e.decodeAsync=async(t,n)=>el(e,t,n),e.safeEncode=(t,n)=>tl(e,t,n),e.safeDecode=(t,n)=>nl(e,t,n),e.safeEncodeAsync=async(t,n)=>rl(e,t,n),e.safeDecodeAsync=async(t,n)=>il(e,t,n),ol(e,`ZodType`,{check(...e){let t=this.def;return this.clone(Nr(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ur(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(tee(e,t))},superRefine(e,t){return this.check(nee(e,t))},overwrite(e){return this.check(Ks(e))},optional(){return gu(this)},exactOptional(){return vu(this)},nullable(){return bu(this)},nullish(){return gu(bu(this))},nonoptional(e){return Eu(this,e)},array(){return Jl(this)},or(e){return eu([this,e])},and(e){return iu(this,e)},transform(e){return Au(this,mu(e))},default(e){return Su(this,e)},prefault(e){return wu(this,e)},catch(e){return Ou(this,e)},pipe(e){return Au(this,e)},readonly(){return Mu(this)},describe(e){let t=this.clone();return Zo.add(t,{description:e}),t},meta(...e){if(e.length===0)return Zo.get(this);let t=this.clone();return Zo.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return Zo.get(e)?.description},configurable:!0}),e)),cl=L(`_ZodString`,(e,t)=>{Ea.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dc(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,ol(e,`_ZodString`,{regex(...e){return this.check(Bs(...e))},includes(...e){return this.check(Us(...e))},startsWith(...e){return this.check(Ws(...e))},endsWith(...e){return this.check(Gs(...e))},min(...e){return this.check(Rs(...e))},max(...e){return this.check(Ls(...e))},length(...e){return this.check(zs(...e))},nonempty(...e){return this.check(Rs(1,...e))},lowercase(e){return this.check(Vs(e))},uppercase(e){return this.check(Hs(e))},trim(){return this.check(Js())},normalize(...e){return this.check(qs(...e))},toLowerCase(){return this.check(Ys())},toUpperCase(){return this.check(Xs())},slugify(){return this.check(Zs())}})}),ll=L(`ZodString`,(e,t)=>{Ea.init(e,t),cl.init(e,t),e.email=t=>e.check($o(fl,t)),e.url=t=>e.check(as(gl,t)),e.jwt=t=>e.check(bs(Ml,t)),e.emoji=t=>e.check(os(vl,t)),e.guid=t=>e.check(es(pl,t)),e.uuid=t=>e.check(ts(ml,t)),e.uuidv4=t=>e.check(ns(ml,t)),e.uuidv6=t=>e.check(rs(ml,t)),e.uuidv7=t=>e.check(is(ml,t)),e.nanoid=t=>e.check(ss(yl,t)),e.guid=t=>e.check(es(pl,t)),e.cuid=t=>e.check(cs(bl,t)),e.cuid2=t=>e.check(ls(xl,t)),e.ulid=t=>e.check(us(Sl,t)),e.base64=t=>e.check(_s(kl,t)),e.base64url=t=>e.check(vs(Al,t)),e.xid=t=>e.check(ds(Cl,t)),e.ksuid=t=>e.check(fs(wl,t)),e.ipv4=t=>e.check(ps(Tl,t)),e.ipv6=t=>e.check(ms(El,t)),e.cidrv4=t=>e.check(hs(Dl,t)),e.cidrv6=t=>e.check(gs(Ol,t)),e.e164=t=>e.check(ys(jl,t)),e.datetime=t=>e.check(zc(t)),e.date=t=>e.check(Vc(t)),e.time=t=>e.check(Uc(t)),e.duration=t=>e.check(Gc(t))});function ul(e){return Qo(ll,e)}var dl=L(`ZodStringFormat`,(e,t)=>{Da.init(e,t),cl.init(e,t)}),fl=L(`ZodEmail`,(e,t)=>{Aa.init(e,t),dl.init(e,t)}),pl=L(`ZodGUID`,(e,t)=>{Oa.init(e,t),dl.init(e,t)}),ml=L(`ZodUUID`,(e,t)=>{ka.init(e,t),dl.init(e,t)});function hl(e){return ts(ml,e)}var gl=L(`ZodURL`,(e,t)=>{ja.init(e,t),dl.init(e,t)});function _l(e){return as(gl,e)}var vl=L(`ZodEmoji`,(e,t)=>{Ma.init(e,t),dl.init(e,t)}),yl=L(`ZodNanoID`,(e,t)=>{Na.init(e,t),dl.init(e,t)}),bl=L(`ZodCUID`,(e,t)=>{Pa.init(e,t),dl.init(e,t)}),xl=L(`ZodCUID2`,(e,t)=>{Fa.init(e,t),dl.init(e,t)}),Sl=L(`ZodULID`,(e,t)=>{Ia.init(e,t),dl.init(e,t)}),Cl=L(`ZodXID`,(e,t)=>{La.init(e,t),dl.init(e,t)}),wl=L(`ZodKSUID`,(e,t)=>{Ra.init(e,t),dl.init(e,t)}),Tl=L(`ZodIPv4`,(e,t)=>{Ua.init(e,t),dl.init(e,t)}),El=L(`ZodIPv6`,(e,t)=>{Wa.init(e,t),dl.init(e,t)}),Dl=L(`ZodCIDRv4`,(e,t)=>{Ga.init(e,t),dl.init(e,t)}),Ol=L(`ZodCIDRv6`,(e,t)=>{Ka.init(e,t),dl.init(e,t)}),kl=L(`ZodBase64`,(e,t)=>{Ja.init(e,t),dl.init(e,t)}),Al=L(`ZodBase64URL`,(e,t)=>{Xa.init(e,t),dl.init(e,t)}),jl=L(`ZodE164`,(e,t)=>{Za.init(e,t),dl.init(e,t)}),Ml=L(`ZodJWT`,(e,t)=>{$a.init(e,t),dl.init(e,t)}),Nl=L(`ZodNumber`,(e,t)=>{eo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fc(e,t,n,r),ol(e,`ZodNumber`,{gt(e,t){return this.check(Ps(e,t))},gte(e,t){return this.check(Fs(e,t))},min(e,t){return this.check(Fs(e,t))},lt(e,t){return this.check(Ms(e,t))},lte(e,t){return this.check(Ns(e,t))},max(e,t){return this.check(Ns(e,t))},int(e){return this.check(Il(e))},safe(e){return this.check(Il(e))},positive(e){return this.check(Ps(0,e))},nonnegative(e){return this.check(Fs(0,e))},negative(e){return this.check(Ms(0,e))},nonpositive(e){return this.check(Ns(0,e))},multipleOf(e,t){return this.check(Is(e,t))},step(e,t){return this.check(Is(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Pl(e){return Ts(Nl,e)}var Fl=L(`ZodNumberFormat`,(e,t)=>{to.init(e,t),Nl.init(e,t)});function Il(e){return Es(Fl,e)}var Ll=L(`ZodBoolean`,(e,t)=>{no.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pc(e,t,n,r)});function Rl(e){return Ds(Ll,e)}var zl=L(`ZodNull`,(e,t)=>{ro.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mc(e,t,n,r)});function Bl(e){return Os(zl,e)}var Vl=L(`ZodUnknown`,(e,t)=>{io.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Hl(){return ks(Vl)}var Ul=L(`ZodNever`,(e,t)=>{ao.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gc(e,t,n,r)});function Wl(e){return As(Ul,e)}var Gl=L(`ZodVoid`,(e,t)=>{oo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hc(e,t,n,r)});function Kl(e){return js(Gl,e)}var ql=L(`ZodArray`,(e,t)=>{co.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Sc(e,t,n,r),e.element=t.element,ol(e,`ZodArray`,{min(e,t){return this.check(Rs(e,t))},nonempty(e){return this.check(Rs(1,e))},max(e,t){return this.check(Ls(e,t))},length(e,t){return this.check(zs(e,t))},unwrap(){return this.element}})});function Jl(e,t){return Qs(ql,e,t)}var Yl=L(`ZodObject`,(e,t)=>{mo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Cc(e,t,n,r),jr(e,`shape`,()=>t.shape),ol(e,`ZodObject`,{keyof(){return uu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Hl()})},loose(){return this.clone({...this._zod.def,catchall:Hl()})},strict(){return this.clone({...this._zod.def,catchall:Wl()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Yr(this,e)},safeExtend(e){return Xr(this,e)},merge(e){return Zr(this,e)},pick(e){return qr(this,e)},omit(e){return Jr(this,e)},partial(...e){return Qr(hu,this,e[0])},required(...e){return $r(Tu,this,e[0])}})});function Xl(e,t){return new Yl({type:`object`,shape:e??{},...Wr(t)})}function Zl(e,t){return new Yl({type:`object`,shape:e,catchall:Wl(),...Wr(t)})}function Ql(e,t){return new Yl({type:`object`,shape:e,catchall:Hl(),...Wr(t)})}var $l=L(`ZodUnion`,(e,t)=>{go.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wc(e,t,n,r),e.options=t.options});function eu(e,t){return new $l({type:`union`,options:e,...Wr(t)})}var tu=L(`ZodDiscriminatedUnion`,(e,t)=>{$l.init(e,t),_o.init(e,t)});function nu(e,t,n){return new tu({type:`union`,options:t,discriminator:e,...Wr(n)})}var ru=L(`ZodIntersection`,(e,t)=>{vo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Tc(e,t,n,r)});function iu(e,t){return new ru({type:`intersection`,left:e,right:t})}var au=L(`ZodTuple`,(e,t)=>{xo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ec(e,t,n,r),e.rest=t=>e.clone({...e._zod.def,rest:t})});function ou(e,t,n){let r=t instanceof Ta;return new au({type:`tuple`,items:e,rest:r?t:null,...Wr(r?n:t)})}var su=L(`ZodRecord`,(e,t)=>{To.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Dc(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function cu(e,t,n){return!t||!t._zod?new su({type:`record`,keyType:ul(),valueType:e,...Wr(t)}):new su({type:`record`,keyType:e,valueType:t,...Wr(n)})}var lu=L(`ZodEnum`,(e,t)=>{Eo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_c(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new lu({...t,checks:[],...Wr(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new lu({...t,checks:[],...Wr(r),entries:i})}});function uu(e,t){return new lu({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Wr(t)})}var du=L(`ZodLiteral`,(e,t)=>{Do.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vc(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fu(e,t){return new du({type:`literal`,values:Array.isArray(e)?e:[e],...Wr(t)})}var pu=L(`ZodTransform`,(e,t)=>{Oo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xc(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new xr(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(oi(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(oi(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function mu(e){return new pu({type:`transform`,transform:e})}var hu=L(`ZodOptional`,(e,t)=>{Ao.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ic(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gu(e){return new hu({type:`optional`,innerType:e})}var _u=L(`ZodExactOptional`,(e,t)=>{jo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ic(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vu(e){return new _u({type:`optional`,innerType:e})}var yu=L(`ZodNullable`,(e,t)=>{Mo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bu(e){return new yu({type:`nullable`,innerType:e})}var xu=L(`ZodDefault`,(e,t)=>{No.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ac(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Su(e,t){return new xu({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Br(t)}})}var Cu=L(`ZodPrefault`,(e,t)=>{Fo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wu(e,t){return new Cu({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Br(t)}})}var Tu=L(`ZodNonOptional`,(e,t)=>{Io.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Eu(e,t){return new Tu({type:`nonoptional`,innerType:e,...Wr(t)})}var Du=L(`ZodCatch`,(e,t)=>{Ro.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ou(e,t){return new Du({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var ku=L(`ZodPipe`,(e,t)=>{zo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nc(e,t,n,r),e.in=t.in,e.out=t.out});function Au(e,t){return new ku({type:`pipe`,in:e,out:t})}var ju=L(`ZodReadonly`,(e,t)=>{Vo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mu(e){return new ju({type:`readonly`,innerType:e})}var Nu=L(`ZodLazy`,(e,t)=>{Go.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lc(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Pu(e){return new Nu({type:`lazy`,getter:e})}var Fu=L(`ZodPromise`,(e,t)=>{Wo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fc(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Iu(e){return new Fu({type:`promise`,innerType:e})}var Lu=L(`ZodFunction`,(e,t)=>{Uo.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bc(e,t,n,r)});function Ru(e){return new Lu({type:`function`,input:Array.isArray(e?.input)?ou(e?.input):e?.input??Jl(Hl()),output:e?.output??Hl()})}var zu=L(`ZodCustom`,(e,t)=>{Ko.init(e,t),sl.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yc(e,t,n,r)});function Bu(e,t){return $s(zu,e??(()=>!0),t)}function tee(e,t={}){return ec(zu,e,t)}function nee(e,t){return tc(e,t)}function Vu(e,t={}){let n=new zu({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...Wr(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Hu(e){let t=Pu(()=>eu([ul(e),Pl(),Rl(),Bl(),Jl(t),cu(ul(),t)]));return t}uu(`light.dark.latte.mocha.readout.readout-night.field-guide.field-guide-night.embed.embed-dark.phosphor.codec.paper.ember.tide.tape.sunrise.pirate-radio.pirate-radio-night.consulting.consulting-ink.consulting-night.consulting-night-ink.consulting-riso-latte.consulting-riso-latte-ink.consulting-riso-glomzy.consulting-riso-glomzy-ink.vishnu.coin.coin-night.chamfer`.split(`.`));var Uu=`data-theme`;function Wu(e){return e||(globalThis.document?.documentElement??null)}function ree(e){let t=e.trim();if(t.length===0)throw TypeError(`Theme must be a non-empty string`);return t}function Gu(e,t){let n=ree(e),r=Wu(t);r&&r.setAttribute(Uu,n)}function Ku(e){return Wu(e)?.getAttribute(Uu)??null}function iee(e,t){let n=Wu(t),r=globalThis,i=(n?.ownerDocument??null)?.defaultView?.MutationObserver??r.MutationObserver;if(!n||!i)return()=>void 0;let a=new i(t=>{if(!t.some(e=>e.type===`attributes`&&e.attributeName===Uu))return;let r=n.getAttribute(Uu);r&&e(r)});a.observe(n,{attributes:!0,attributeFilter:[Uu]});let o=!1;return()=>{o||(o=!0,a.disconnect())}}var aee=Object.freeze([`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`]);Object.freeze(`--stipe-font-synthesis.--stipe-surface-frame-width.--stipe-surface-frame-image.--stipe-surface-molding-contrast.--stipe-shadow-raised.--stipe-shadow-inset.--stipe-shadow-edge.--stipe-display-gasket-face.--stipe-display-texture-image.--stipe-display-text-shadow.--stipe-canvas.--stipe-surface.--stipe-surface-raised.--stipe-surface-selected.--stipe-fg-muted.--stipe-linework.--stipe-hairline.--stipe-hairline-quiet.--stipe-figure-ink.--stipe-density-compact.--stipe-density-comfortable.--stipe-motion-spring.--stipe-motion-squish.--stipe-motion-fast.--stipe-motion-normal.--stipe-motion-slow.--stipe-motion-ease.--stipe-motion-ease-exit.--stipe-motion-bounce.--stipe-motion-spring-duration.--stipe-motion-stretch.--stipe-motion-distance.--stipe-motion-stagger.--stipe-motion-blur.--stipe-motion-shake.--stipe-motion-steps.--stipe-motion-fuse.--stipe-press-depth.--stipe-press-scale.--stipe-layer-desktop.--stipe-layer-windows.--stipe-layer-chrome.--stipe-layer-popover.--stipe-layer-dialog.--stipe-layer-toast.--stipe-layer-tooltip.--stipe-overlay-shadow-outset.--stipe-icon-size-sm.--stipe-icon-size-md.--stipe-icon-size-lg.--stipe-icon-stroke.--stipe-card-rim.--stipe-card-rim-edge.--stipe-card-face.--stipe-card-panel.--stipe-card-ink.--stipe-card-ink-muted.--stipe-card-accent.--stipe-card-shadow.--stipe-card-foil-highlight.--stipe-card-foil-warm.--stipe-card-foil-cool.--stipe-avatar-shadow.--stipe-art-coral.--stipe-art-blue.--stipe-art-mint.--stipe-art-grape.--stipe-art-yellow.--stipe-art-cream.--stipe-art-ink.--stipe-art-inkcap.--stipe-art-graphite.--stipe-sketch-ink`.split(`.`));function qu(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=qu(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function oee(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=qu(e))&&(r&&(r+=` `),r+=t);return r}var Ju=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Yu=oee,see=(e,t)=>n=>{if(t?.variants==null)return Yu(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ju(t)||Ju(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Yu(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Xu=Object.defineProperty,cee=((e,t)=>{let n={};for(var r in e)Xu(n,r,{get:e[r],enumerable:!0});return t||Xu(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>ed,isAnyNonArbitrary:()=>See,isArbitraryFamilyName:()=>kee,isArbitraryImage:()=>jee,isArbitraryLength:()=>Eee,isArbitraryNumber:()=>Dee,isArbitraryPosition:()=>Aee,isArbitraryShadow:()=>Mee,isArbitrarySize:()=>Tee,isArbitraryValue:()=>dd,isArbitraryVariable:()=>fd,isArbitraryVariableFamilyName:()=>Nee,isArbitraryVariableImage:()=>Iee,isArbitraryVariableLength:()=>pd,isArbitraryVariablePosition:()=>Pee,isArbitraryVariableShadow:()=>Lee,isArbitraryVariableSize:()=>Fee,isArbitraryVariableWeight:()=>Ree,isArbitraryWeight:()=>Oee,isFraction:()=>hee,isInteger:()=>gee,isNamedContainerQuery:()=>Cee,isNumber:()=>$u,isPercent:()=>_ee,isTshirtSize:()=>vee}),Zu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lee=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,uee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,dee=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,fee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,mee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hee=e=>lee.test(e),$u=e=>!!e&&!Number.isNaN(Number(e)),gee=e=>!!e&&Number.isInteger(Number(e)),_ee=e=>e.endsWith(`%`)&&$u(e.slice(0,-1)),vee=e=>uee.test(e),ed=()=>!0,yee=e=>dee.test(e)&&!fee.test(e),td=()=>!1,bee=e=>pee.test(e),xee=e=>mee.test(e),See=e=>!dd(e)&&!fd(e),Cee=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),nd=(e,t,n)=>{let r=Zu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},rd=(e,t,n=!1)=>{let r=Qu.exec(e);return r?r[1]?t(r[1]):n:!1},id=e=>e===`position`||e===`percentage`,ad=e=>e===`image`||e===`url`,od=e=>e===`length`||e===`size`||e===`bg-size`,sd=e=>e===`length`,wee=e=>e===`number`,cd=e=>e===`family-name`,ld=e=>e===`number`||e===`weight`,ud=e=>e===`shadow`,Tee=e=>nd(e,od,td),dd=e=>Zu.test(e),Eee=e=>nd(e,sd,yee),Dee=e=>nd(e,wee,$u),Oee=e=>nd(e,ld,ed),kee=e=>nd(e,cd,td),Aee=e=>nd(e,id,td),jee=e=>nd(e,ad,xee),Mee=e=>nd(e,ud,bee),fd=e=>Qu.test(e),pd=e=>rd(e,sd),Nee=e=>rd(e,cd),Pee=e=>rd(e,id),Fee=e=>rd(e,od),Iee=e=>rd(e,ad),Lee=e=>rd(e,ud,!0),Ree=e=>rd(e,ld,!0),md=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},zee=e=>typeof e==`function`&&e.isThemeGetter===!0,Bee=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),Vee=(e,t)=>{let n=Bee(e);t.prefix!==void 0&&(n.prefix=t.prefix);let r=(e,t)=>{if(t)for(let n in t)t[n]!==void 0&&(e[n]=t[n])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));let a=(e,t)=>{if(t)for(let n in t){let r=t[n];r&&(e[n]=(e[n]??[]).concat(r))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},hd={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},Hee=25,Uee=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),gd=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},_d=(e,t)=>{if(typeof t==`function`){let n=e.fnName.get(t);return n===void 0&&(n=`$c`+e.fnName.size,e.fnName.set(t,n),e.impls[n]=t),gd(e,n,t)}let n=t.$v,r=cee[n];if(hd[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return gd(e,n,r)},vd=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),Wee=(e,t)=>e.theme[t]??[],Gee=(e,t,n)=>{let r=vd(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=vd(),e.nextPart.set(n,t)),e=t}return e},a=(n,r,o)=>{if(typeof n==`string`){let e=n===``?r:i(r,n);e.classGroupId=o;return}if(typeof n==`function`){if(zee(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:_d(t,n),groupId:o});return}if(md(n,`$t`)){for(let t of Wee(e,n.$t))a(t,r,o);return}if(md(n,`$v`)){(r.validators??=[]).push({validatorId:_d(t,n),groupId:o});return}for(let[e,t]of Object.entries(n)){let n=i(r,e);for(let e of t)a(e,n,o)}};for(let[t,i]of Object.entries(e.classGroups)){let e=n(t);for(let t of i)a(t,r,e)}return r},Kee=e=>{let t=Uee(),n=[],r=new Map,i=e=>{let t=r.get(e);return t===void 0&&(t=n.length,n.push(e),r.set(e,t)),t},a=Gee(e,t,i),o=e=>{if(e.validators)return!1;for(let t of e.nextPart.values())if(!o(t))return!1;return!0},s=(e,t,n)=>{e.classGroupId>=0&&n.push({tail:t,gid:e.classGroupId});for(let[r,i]of e.nextPart)s(i,t+`-`+r,n)},c=e=>{for(let[t,n]of[...e.nextPart])o(n)?(s(n,t,e.lit),e.nextPart.delete(t)):c(n)};c(a);let l=[{edges:new Map,groupId:-1,vlist:-1}],u=()=>(l.push({edges:new Map,groupId:-1,vlist:-1}),l.length-1),d=[],f=new Map,p=e=>{let t=e.map(e=>e.validatorId+`:`+e.groupId).join(`,`),n=f.get(t);return n===void 0&&(n=d.length,d.push(e.map(e=>[e.validatorId,e.groupId])),f.set(t,n)),n},m=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e),i=l[n].edges.get(r);i===void 0&&(i=u(),l[n].edges.set(r,i)),n=i}return n},h=[],g=(e,t,n)=>{e.classGroupId>=0&&(l[t].groupId=e.classGroupId),e.validators&&(l[t].vlist=p(e.validators));for(let{tail:n,gid:r}of e.lit)h.push({anchor:t,tail:n,gid:r});for(let[r,i]of e.nextPart){let e=t;if(!n){let n=l[t].edges.get(45);n===void 0&&(n=u(),l[t].edges.set(45,n)),e=n}let a=m(e,r);g(i,a,!1)}};g(a,0,!0);let _=new Set(h.map(e=>e.anchor)),v=e=>l[e].groupId>=0||l[e].vlist>=0||_.has(e),y=new Map,b=[],x=e=>{let t=b.length;y.set(e,t);let n={edges:[],groupId:l[e].groupId,vlist:l[e].vlist};b.push(n);let r=[...l[e].edges.entries()].sort((e,t)=>e[0]-t[0]);for(let[e,t]of r){let r=String.fromCharCode(e),i=t;for(;l[i].edges.size===1&&!v(i);){let[[e,t]]=l[i].edges.entries();r+=String.fromCharCode(e),i=t}n.edges.push({label:r,oldTarget:i})}for(let e of n.edges)x(e.oldTarget);return t};x(0);let S=b.length,C=0;for(let e of b)C+=e.edges.length;let w=new Int32Array(S),T=new Int32Array(C),E=``,D=new Int32Array(S),O=new Int32Array(S),k=[];{let e=0;for(let t=0;t<S;t++){let n=b[t];w[t]=n.edges.length;for(let t of n.edges)T[e]=t.label.length,E+=t.label,k.push(y.get(t.oldTarget)),e++;D[t]=n.groupId,O[t]=n.vlist}}{let e=new Int32Array(S);for(let t=S-1;t>=0;t--){let n=1,r=t+1;for(let i=0;i<w[t];i++)n+=e[r],r+=e[r];e[t]=n}let t=0;for(let n=0;n<S;n++){let r=n+1;for(let i=0;i<w[n];i++){if(r!==k[t])throw Error(`cn compiler: edge target mismatch at ${t}`);r+=e[r],t++}}}for(let e of h)e.anchor=y.get(e.anchor);{let e=new Int32Array(d.length).fill(-1),t=[];for(let n=0;n<S;n++){let r=O[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),O[n]=e[r])}d.length=0,d.push(...t)}let A=0;for(let e of d)A+=e.length;let j=new Int32Array(A),M=new Int32Array(A);{let e=0;for(let t of d)for(let[n,r]of t)j[e]=n,M[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let N=[];for(let e of h){let t=N[N.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):N.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let P=new Map,ee=[];for(let e of N){let t=e.tails.join(` `),n=P.get(t);n===void 0&&(n=ee.length,P.set(t,n),ee.push(e.tails)),e.set=n}for(let e of ee.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let te=new Set(ee.flat()).size;N.sort((e,t)=>e.anchor-t.anchor||e.set-t.set);for(let t of Object.values(e.conflictingClassGroups))for(let e of t)i(e);for(let t of Object.values(e.conflictingClassGroupModifiers))for(let e of t)i(e);for(let t of e.postfixLookupClassGroups??[])i(t);let ne=n.length,re=new Int32Array(ne).fill(-1),ie=0,ae=e=>(re[e]===-1&&(re[e]=ie++),re[e]);for(let e=0;e<M.length;e++)M[e]=ae(M[e]);for(let e of N)e.gid=ae(e.gid);for(let e=0;e<D.length;e++)D[e]>=0&&(D[e]=ae(D[e]));for(let e=0;e<ne;e++)re[e]===-1&&(re[e]=ie++);let oe=Array(ne);for(let e=0;e<ne;e++)oe[re[e]]=n[e];let se=[],ce=[],le=[],ue=[],de=[];for(let t=0;t<ne;t++){let n=oe[t],i=(e.conflictingClassGroups[n]??[]).map(e=>re[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>re[r.get(e)]);i.length&&(se.push(t),ce.push(i.length),le.push(...i));for(let e of a)ue.push(t),de.push(e)}let fe=(e.postfixLookupClassGroups??[]).map(e=>re[r.get(e)]),pe=[],me=new Int32Array(j.length);for(let e=0;e<j.length;e++){let n=t.names[j[e]],r=hd[n];if(r!==void 0)me[e]=r;else{let t=pe.indexOf(n);t===-1&&(t=pe.length,pe.push(n)),me[e]=Hee+t}}let he=new Map,ge=[],_e=[],ve=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(me[e++]);let r=n.join(`,`),i=he.get(r);i===void 0&&(i=ge.length,he.set(r,i),ge.push(n.length),_e.push(...n)),ve.push(i)}}let ye={};for(let e of pe)ye[e]=t.classifierFns.get(e);return{G:ne,customNames:pe,impls:ye,edgeCounts:w,edgeLabelLen:T,labelText:E,edgeTargetActual:k,nodeGroup:D,nodeVlist:O,nodeCount:S,totalEdges:C,patCounts:ge,patOps:_e,listPat:ve,vlistGroup:M,litEntries:h,sets:ee,attachments:N,uniqueTailCount:te,adjGid:se,adjCnt:ce,adjTgt:le,patGid:ue,patTgt:de,postfixLookup:fe,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},yd=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},qee=e=>{let t=Kee(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n),o=``,s=new Int32Array(t.uniqueTailCount*2);{let e=new Map,n=0,c=0;for(let l of t.attachments)for(let u of t.sets[l.set]){let t=e.get(u);t===void 0&&(t=n++,e.set(u,t),s[t*2]=o.length,s[t*2+1]=u.length,o+=u),r[c]=l.anchor,i[c]=l.gid,a[c]=t,c++}}return{tables:{GROUP_COUNT:t.G,edgeStart:yd(t.edgeCounts),labelStart:yd(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:yd(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:s,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:yd(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},Jee=`line`in Error(),bd=-1,xd=-1,Sd=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Cd=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},wd=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,ee=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ee=!1)}let te=1;for(;te<m.length*2;)te<<=1;let ne=new Int32Array(te).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Sd(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&te-1;for(;ne[n]!==-1;)n=n+1&te-1;ne[n]=e}let re=(e,t,n,r)=>{let i=(Sd(t,n,r)^Math.imul(e,2654435761)|0)&te-1,a=r-n;for(;;){let r=ne[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&te-1}},ie=n.cacheSize??8192,ae=n.prefix??e.prefix??``,oe=ae===``?``:ae+`:`,se=oe.length,ce=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),le=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,de=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,pe=0,me=-1,he=-1,ge=-1,_e=-1,ve=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ye=e=>/\s/.test(String.fromCharCode(e)),be=(e,t,n)=>{if(pe=0,me=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)pe=1;else if(r===40&&i===41)pe=2;else return;ge=t+1,_e=n-1;let a=t+1;if(ve(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!ve(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(me=t+1,he=a,ge=a+1)}},xe=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Se=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ce=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,we=e=>!!e&&!Number.isNaN(Number(e)),Te=(e,t,n)=>{if(n-t<11||!xe(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&xe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&xe(e,t+10,t+18,`-normal/`)},Ee=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],De=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Oe=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ke=(e,t,n,r)=>{if(e>=10){if(e>=25)return ce[e-25](t.slice(n,r));let i=e-10;if(pe!==Ee[i])return!1;if(me>=0){for(let e of De[i])if(xe(t,me,he,e))return!0;return!1}switch(Oe[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(ge,_e);return le.test(e)&&!ue.test(e)}case 3:return we(t.slice(ge,_e));case 4:return fe.test(t.slice(ge,_e));default:return de.test(t.slice(ge,_e))}}switch(e){case 0:return!0;case 1:return pe===0;case 2:return pe===1;case 3:return pe===2;case 4:return Se.test(t.slice(n,r));case 5:return we(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&we(t.slice(n,r-1));case 8:return Ce.test(t.slice(n,r));default:return Te(t,n,r)}},Ae=new Set(typeof E==`string`?E.split(` `):E),je=(e,t,n,r,i,a)=>{let o=Sd(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Me=new Map,Ne=new Map,Pe=2,Fe=4096,Ie=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Ae.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Ne.get(s);return c===void 0&&Ne.set(s,c=Pe++),c},Le=new Map,Re=r,ze=r+4096,Be=()=>Re++,Ve=2097152,He=8192,Ue=new Int32Array(He),We=Array(He).fill(null),Ge=new Int32Array(He),Ke=new Int32Array(He),qe=new Uint8Array(He),Je=0,Ye=(e,t,n,r,i,a,o,s)=>{let c=e;if(We[e]!==null){if(We[e|1]===null)c=e|1;else if(!(Je++&3))c=e|Je>>2&1;else return}We[c]=t.slice(n,r),Ue[c]=i,Ge[c]=a,Ke[c]=o,qe[c]=s},Xe=()=>We.fill(null),Ze=256,Qe=[new Int32Array(Ze),new Int32Array(Ze),new Int32Array(Ze),new Int32Array(Ze)],[$e,et,tt,nt]=Qe,rt=new Uint8Array(Ze),it=new Uint8Array(Ze),at=()=>{Ze*=2,Qe=Qe.map(e=>{let t=new Int32Array(Ze);return t.set(e),t}),[$e,et,tt,nt]=Qe;let e=new Uint8Array(Ze);e.set(rt),rt=e,it=new Uint8Array(Ze)},ot=64,st=new Int32Array(ot),ct=new Int32Array(ot),lt=new Int32Array(r),ut=2048,dt=21,ft=new Float64Array(ut),pt=new Int32Array(ut),mt=0,ht=(e,t)=>{if(e===0&&t<r)return lt[t]===mt?1:(lt[t]=mt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>dt;for(;pt[i]===mt;){if(ft[i]===n)return 1;i=i+1&ut-1}return ft[i]=n,pt[i]=mt,0},gt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?bd:je(Le,e,t+1,r,0,Be)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ct[t];if(r>n)continue;let i=st[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(ee===!1||t!==91&&t!==40){let t=re(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;be(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(ke(d[t],e,r,n))return p[h+t]}return bd},_t=e=>{let t=e.length,n=0,c=0,u=!1;(Pe>Fe||Me.size>Fe)&&(Me=new Map,Ne=new Map,Pe=2,Xe()),Re>ze&&(Le=new Map,Re=r,Xe());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&ye(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&ye(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Ze&&at();let _=n++;$e[_]=p,et[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(Ue[y]===v&&We[y]!==null&&We[y].length===g?t=y:Ue[y|1]===v&&We[y|1]!==null&&We[y|1].length===g&&(t=y|1),t>=0){let n=We[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){tt[_]=Ge[t],nt[_]=Ke[t],rt[_]=qe[t];continue}}}let b=p;if(se!==0){if(h-p<=se||!e.startsWith(oe,p)){tt[_]=bd,Ye(y,e,p,h,v,bd,0,0);continue}b=p+se}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,ee=0,te=0,ne=-1,re=0;(l[0]>=0||N[0]===1)&&(st[0]=0,ct[0]=M,re=1);let ie=xd,ae=0;for(let t=M;t<D;t++)if(t===A&&(ie=ee<te?xd:P,ae=re),P!==xd){let n=e.charCodeAt(t),r=-1;if(ee<te)o.charCodeAt(ee)===n?(ee++,ee===te&&(r=P=ne)):P=xd;else{let e=i[P],t=i[P+1],c=xd;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ee=e+1,te=a[i+1],ne=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(re===ot){ot*=2;let e=new Int32Array(ot);e.set(st),st=e;let t=new Int32Array(ot);t.set(ct),ct=t}st[re]=r,ct[re]=t+2,re++}}A===D&&(ie=ee<te?xd:P,ae=re);let ce=ee<te?xd:P,le,ue=!1;if(A>=0){if(ue=!0,le=gt(e,E,A,ie,ae),le!==bd&&le<r&&j[le]){let t=gt(e,E,D,ce,re);t!==bd&&t!==le&&(le=t,ue=!1)}else le===bd&&(le=gt(e,E,D,ce,re),ue=!1)}else le=gt(e,E,D,ce,re);let de=0,fe=0;le===bd?tt[_]=bd:(fe=+!!ue,de=b>=C?+!!O:je(Me,e,b,C,+!!O,e=>Ie(e,O)),tt[_]=le,rt[_]=fe,nt[_]=de),Ye(y,e,p,h,v,le,de,fe)}if(n===0)return``;if(n===1)return $e[0]===0&&et[0]===t?e:e.slice($e[0],et[0]);if(n*k>ut){for(;n*k>ut;)ut<<=1,dt--;ft=new Float64Array(ut),pt=new Int32Array(ut)}if(Pe>=Ve||Re>=Ve)throw Error(`cn: too many distinct classes in one merge`);mt=mt+1|0,mt===0&&(lt.fill(0),pt.fill(0),mt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=tt[e];if(t===bd){it[e]=1;continue}let n=nt[e];if(ht(n,t)===1){it[e]=0,f=!0;continue}if(it[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)ht(n,x[e]);if(rt[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&ht(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!it[m]){m++;continue}let t=$e[m],r=et[m],i=m+1;for(;i<n&&it[i]&&$e[i]===r+1&&e.charCodeAt(r)===32;)r=et[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},vt=16384,yt=new Int32Array(vt*2),bt=0,xt=1,St=Object.create(null),Ct=Object.create(null),wt=new Map,Tt=new Map,Et=0,Dt=0,Ot=()=>{bt^=vt,xt=xt+1|0,Dt=0},kt=e=>{let t=St[e];if(t!==void 0)return t;let n=Cd(e,0,e.length),r=(n&16383)+bt,i=yt[r]===(n^xt)||yt[r^vt]===(n^xt-1);return i&&(t=Ct[e],t!==void 0)?(St[e]=t,t):(t=_t(e),i?(St[e]=t,++Et>ie&&(Et=0,Ct=St,St=Object.create(null),Ot())):(yt[r]=n^xt,++Dt>vt&&Ot()),t)},At=e=>{let t=wt.get(e);if(t!==void 0)return t;let n=Cd(e,0,e.length),r=(n&16383)+bt,i=yt[r]===(n^xt)||yt[r^vt]===(n^xt-1);return i&&(t=Tt.get(e),t!==void 0)?(wt.set(e,t),t):(t=_t(e),i?(wt.set(e,t),++Et>ie&&(Et=0,Tt=wt,wt=new Map,Ot())):(yt[r]=n^xt,++Dt>vt&&Ot()),t)},jt=e=>{let t=Cd(e,0,e.length),n=(t&16383)+bt;return yt[n]===(t^xt)||yt[n^vt]===(t^xt-1)||(yt[n]=t^xt,++Dt>vt&&Ot(),!1)},Mt=ie===0?_t:Jee?e=>{let t=wt.get(e);return t===void 0?At(e):t}:kt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Mt(arguments[0]):Mt(Xee.apply(null,arguments))},mergeString:Mt,seenBefore:ie===0?()=>!1:jt,mergeUncached:_t}},Td=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Td(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},Yee=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Td(i,t);a&&(n&&(n+=` `),n+=a)}return n},Xee=function(){return Yee(arguments,!1)},Zee=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},l=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},u=(t,c)=>{let u=t.length,d=s===null?null:s.n;if(!c){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let f=``,p=-1,m=0,h=!1;for(let e=0;e<u;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Td(n,!0),!n)continue;h=!0}p<0&&(f=n,p=e),m++}}if(m===0)return``;if(m===1)return e(f);if(h){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let g=i.get(f);g===void 0&&(g=a.get(f),g!==void 0&&i.set(f,g));let _=null;if(g!==void 0)outer:for(let e=0;e<g.length;e++){let n=g[e];if(n.t!==m)continue;let r=n.a,i=1;for(let e=p+1;e<u;e++){let n=t[e];if(n&&n!==r[i++])continue outer}_=n;break}if(_===null){let s=f,c=[f];for(let e=p+1;e<u;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);_={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},g===void 0&&i.set(f,g=[]),g.length>=256&&g.shift(),g.push(_),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==_&&(s.n=_),s=_,_.r},d=t=>Array.isArray(t)?u(t.slice(),!1):e(Td(t,!0));return function(t,n,r){let i=arguments.length;if((i|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&c(i,t,n,r))return s=i,i.r;if(e!==i&&c(e,t,n,r))return e.r}return u([t,n,r],!0)}if(i===1)return typeof t==`string`?e(t):d(t);let a=s;if(a!==null){let e=a.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<i;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(a!==e){let e=a.a,t=0,n=!0;for(let r=0;r<i;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===a.t)return a.r}}let o=[];for(let e=0;e<i;e++)o.push(arguments[e]);return u(o,!0)}},Qee=`{"theme":{"animate":[{"$v":"isAny"}],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]},"columns-auto"],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],"box":[{"box":["border","content"]}],"display":["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],"sr":["sr-only","not-sr-only"],"float":[{"float":["right","left","none","start","end"]}],"clear":[{"clear":["left","right","both","none","start","end"]}],"isolation":["isolate","isolation-auto"],"object-fit":[{"object":["contain","cover","fill","none","scale-down"]}],"object-position":[{"object":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"inline":[{"$t":"container"}]}],"min-inline-size":[{"min-inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"min-inline":[{"$t":"container"}]}],"max-inline-size":[{"max-inline":["none",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"max-inline":[{"$t":"container"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},"max-h-none"],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],"tracking":[{"tracking":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":[{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"whitespace":[{"whitespace":["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],"break":[{"break":["normal","words","all","keep"]}],"wrap":[{"wrap":["break-word","anywhere","normal"]}],"hyphens":[{"hyphens":["none","manual","auto"]}],"content":[{"content":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]},"bg-conic"],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]},"shadow-inner"],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{"mask":["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{"closest":["side","corner"],"farthest":["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"color-scheme":[{"scheme":["normal","dark","light","light-dark","only-dark","only-light"]}],"cursor":[{"cursor":["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],"resize":[{"resize":["none","","y","x"]}],"scroll-behavior":[{"scroll":["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"snap-align":[{"snap":["start","end","center","align-none"]}],"snap-stop":[{"snap":["normal","always"]}],"snap-type":[{"snap":["none","x","y","both"]}],"snap-strictness":[{"snap":["mandatory","proximity"]}],"touch":[{"touch":["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],"select":[{"select":["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"conflictingClassGroups":{"container-named":["container-type"],"overflow":["overflow-x","overflow-y"],"overscroll":["overscroll-x","overscroll-y"],"inset":["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],"flex":["basis","grow","shrink"],"gap":["gap-x","gap-y"],"p":["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],"px":["pr","pl"],"py":["pt","pb"],"m":["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],"mx":["mr","ml"],"my":["mt","mb"],"size":["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],"rounded":["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"translate":["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],"touch":["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}`,Ed=()=>JSON.parse(Qee),$ee=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,ete=e=>e===void 0?{config:Ed()}:typeof e==`function`?{config:e(Ed())}:$ee(e)?{config:e}:{config:Vee(Ed(),e),cacheSize:e.cacheSize},tte=e=>{let{config:t,cacheSize:n}=ete(e),{tables:r,validatorImpls:i,prefix:a}=qee(t);return wd(r,i,{cacheSize:n,prefix:a})},Dd=(e=>{let t=null,n=()=>t??=tte(e);return Zee(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...aee]}}});function Od(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function nte(...e){return t=>{let n=!1,r=e.map(e=>{let r=Od(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Od(e[t],null)}}}}function rte(...e){return I.useCallback(nte(...e),e)}function ite(e){let t=I.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Ad(r)&&typeof jd==`function`&&(r=jd(r._payload)),I.Children.forEach(r,e=>{if(lte(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Ad(n)&&typeof jd==`function`&&(n=jd(n._payload)),a=ote(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=I.cloneElement(a,void 0,s):!o&&I.Children.count(r)===1&&I.isValidElement(r)&&(a=r);let c=a?cte(a):void 0,l=rte(n,c);if(!a){if(r||r===0)throw Error(o?pte(e):fte(e));return r}let u=ste(i,a.props??{});return a.type!==I.Fragment&&(u.ref=n?l:c),I.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var kd=ite(`Slot`),ate=Symbol.for(`radix.slottable`),ote=(e,t)=>{if(`child`in e.props){let t=e.props.child;return I.isValidElement(t)?I.cloneElement(t,void 0,e.props.children(t.props.children)):null}return I.isValidElement(t)?t:null};function ste(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function cte(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function lte(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ate}var ute=Symbol.for(`react.lazy`);function Ad(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ute&&`_payload`in e&&dte(e._payload)}function dte(e){return typeof e==`object`&&!!e&&`then`in e}var fte=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,pte=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,jd=I.use,Md=(0,I.forwardRef)(function({asChild:e=!1,className:t,...n},r){let i=Dd(`absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]`,t);return e?(0,F.jsx)(kd,{...n,className:i,ref:r}):(0,F.jsx)(`span`,{...n,className:i,ref:r})}),Nd=Object.freeze({reduced:!1,squish:90,fast:120,normal:180,slow:280,springDuration:320,bounce:.3,stretch:.28,distance:4,stagger:24,blur:0,shake:3,steps:0,fuse:1,pressDepth:.5,pressScale:1,ease:`cubic-bezier(0.2, 0, 0, 1)`,easeExit:`cubic-bezier(0.4, 0, 1, 1)`}),Pd=`(prefers-reduced-motion: reduce)`;function Fd(e){let t=e.ownerDocument.defaultView;if(!t)return Nd;let n=t.getComputedStyle(e),r=(e,t)=>{let r=n.getPropertyValue(e).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?Math.max(0,i):t},i=(e,t)=>{let i=n.getPropertyValue(e).trim();return r(e,t)*(i.endsWith(`s`)&&!i.endsWith(`ms`)?1e3:1)},a=t.matchMedia?.(Pd).matches??!1,o=(e,t)=>a?120:i(`--stipe-motion-${e}`,t),s=(e,t)=>a?0:r(`--stipe-motion-${e}`,t);return{reduced:a,squish:o(`squish`,Nd.squish),fast:o(`fast`,Nd.fast),normal:o(`normal`,Nd.normal),slow:o(`slow`,Nd.slow),springDuration:o(`spring-duration`,Nd.springDuration),bounce:Math.min(1,s(`bounce`,Nd.bounce)),stretch:s(`stretch`,Nd.stretch),distance:s(`distance`,Nd.distance),stagger:a?0:i(`--stipe-motion-stagger`,Nd.stagger),blur:s(`blur`,Nd.blur),shake:s(`shake`,Nd.shake),steps:Math.floor(s(`steps`,Nd.steps)),fuse:r(`--stipe-motion-fuse`,Nd.fuse),pressDepth:a?0:r(`--stipe-press-depth`,Nd.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,Nd.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||Nd.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||Nd.easeExit}}function Id(e,t){let n=e.createElement(`div`);n.setAttribute(`style`,t??``);let r=new Map;for(let e of n.style)(e.startsWith(`--stipe-motion-`)||e.startsWith(`--stipe-press-`))&&r.set(e,n.style.getPropertyValue(e).trim());return r}function mte(e){let t=e.target;if(e.attributeName!==`style`||!(t instanceof Element))return!0;let n=t.ownerDocument,r=Id(n,e.oldValue),i=Id(n,t.getAttribute(`style`));return r.size!==i.size||[...i].some(([e,t])=>r.get(e)!==t)}function Ld(e){let[t,n]=(0,I.useState)(()=>({...Nd,reduced:!0}));return(0,I.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=Fd(t);n(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};i();let a=new r.MutationObserver(e=>{e.some(mte)&&i()});for(let e=t;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`],attributeOldValue:!0});let o=r.matchMedia?.(Pd);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function Rd(e,t){return e.reduced?0:Math.round(t*e.normal/Nd.normal)}function hte(e,t){if(e.reduced)return 0;let n=t*e.bounce/Nd.bounce;return Math.min(.9,Math.max(0,n))}function gte(e,t){return e.reduced?0:Math.round(t*e.springDuration/Nd.springDuration)}function zd(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function Bd(e){return`animate`in e}var Vd=globalThis;function _te(){return Vd.matchMedia?.(Pd).matches??!1}function vte(e){let t=Vd.matchMedia?.(Pd);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function yte(){return!0}function Hd(){return(0,I.useSyncExternalStore)(vte,_te,yte)}var Ud=typeof window<`u`,Wd=Ud?window:null,Gd=Ud?document:null,Kd={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},qd={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},Jd={NONE:0,AUTO:1,FORCE:2},Yd={replace:0,none:1,blend:2},Xd=Symbol(),Zd=Symbol(),Qd=Symbol(),$d=Symbol(),bte=Symbol(),ef=1e-11,tf=0xe8d4a51000,nf=1e3,rf=[],af=(()=>{let e=new Map;return e.set(`x`,`translateX`),e.set(`y`,`translateY`),e.set(`z`,`translateZ`),e})(),of=[`perspective`,`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`],xte=of.reduce((e,t)=>({...e,[t]:t+`(`}),{}),sf=()=>{},Ste=e=>e,Cte=/\)\s*[-.\d]/,wte=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,Tte=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,Ete=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,Dte=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,Ote=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,cf=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,kte=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,Ate=/([a-z])([A-Z])/g,jte=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,lf={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:nf,delay:0,loopDelay:0,ease:`out(2)`,composition:Yd.replace,modifier:Ste,onBegin:sf,onBeforeUpdate:sf,onUpdate:sf,onLoop:sf,onPause:sf,onComplete:sf,onRender:sf},uf={current:null,root:Gd},df={defaults:lf,precision:4,timeScale:1,tickThreshold:200,editor:null},ff={version:`4.5.0`,engine:null};Ud&&(Wd.AnimeJS||=[],Wd.AnimeJS.push(ff));var pf=e=>e.replace(Ate,`$1-$2`).toLowerCase(),mf=(e,t)=>e.indexOf(t)===0,hf=Date.now,gf=Array.isArray,_f=e=>e&&e.constructor===Object,vf=e=>typeof e==`number`&&!isNaN(e),yf=e=>typeof e==`string`,bf=e=>typeof e==`function`,xf=e=>e===void 0,Sf=e=>xf(e)||e===null,Cf=e=>Ud&&e instanceof SVGElement,wf=e=>wte.test(e),Tf=e=>mf(e,`rgb`),Ef=e=>mf(e,`hsl`),Df=e=>wf(e)||(Tf(e)||Ef(e))&&(e[e.length-1]===`)`||!Cte.test(e)),Of=e=>!df.defaults.hasOwnProperty(e),kf=[`opacity`,`rotate`,`overflow`,`color`],Af=(e,t)=>{if(kf.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===`scale`){let t=e.parentNode;return t&&t.tagName===`filter`}return!0}},jf=Math.pow,Mf=Math.sqrt,Nf=Math.sin,Pf=Math.cos,Ff=Math.abs,If=Math.exp,Lf=Math.ceil,Rf=Math.floor,Mte=Math.asin,zf=Math.PI,Bf=Math.round,Vf=(e,t,n)=>e<t?t:e>n?n:e,Hf=(e,t)=>{if(t<0)return e;if(!t)return Bf(e);let n=10**t;return Bf(e*n)/n},Uf=(e,t,n)=>n===1?t:n===0?e:e+(t-e)*n,Wf=e=>e===1/0?tf:e===-1/0?-tf:e,Gf=e=>e<=1e-11?ef:Wf(Hf(e,11)),Kf=e=>gf(e)?[...e]:e,Nte=(e,t)=>{let n={...e};for(let r in t){let i=e[r];n[r]=xf(i)?t[r]:i}return n},qf=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._head,o=i;for(n&&(a=e._tail,o=r);a;){let e=a[o];t(a),a=e}},Jf=(e,t,n=`_prev`,r=`_next`)=>{let i=t[n],a=t[r];i?i[r]=a:e._head=a,a?a[n]=i:e._tail=i,t[n]=null,t[r]=null},Yf=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._tail;for(;a&&n&&n(a,t);)a=a[r];let o=a?a[i]:e._head;a?a[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=a,t[i]=o},Pte=(e,t,n)=>{let r=e.style.transform;if(r){let i=e[$d],a=0,o=r.length,s;for(;a<o;){for(;a<o&&r.charCodeAt(a)===32;)a++;if(a>=o)break;let e=a;for(;a<o&&r.charCodeAt(a)!==40;)a++;if(a>=o)break;let t=r.substring(e,a),n=1,c=a+1,l=-1,u=-1;for(a++;a<o&&n>0;){let e=r.charCodeAt(a);e===40?n++:e===41?n--:e===44&&n===1&&(l===-1?l=a:u===-1&&(u=a)),a++}let d=a-1;t===`translate`||t===`translate3d`?(l===-1?i.translateX=r.substring(c,d).trim():(i.translateX=r.substring(c,l).trim(),u===-1?i.translateY=r.substring(l+1,d).trim():(i.translateY=r.substring(l+1,u).trim(),i.translateZ=r.substring(u+1,d).trim())),s=r.substring(c,d)):t===`scale`||t===`scale3d`?l===-1?i.scale=r.substring(c,d).trim():(i.scaleX=r.substring(c,l).trim(),u===-1?i.scaleY=r.substring(l+1,d).trim():(i.scaleY=r.substring(l+1,u).trim(),i.scaleZ=r.substring(u+1,d).trim())):i[t]=r.substring(c,d)}if(t===`translate3d`&&s)return n&&(n[t]=s),s;let c=i[t];if(!xf(c))return n&&(n[t]=c),c}return t===`translate3d`?`0px, 0px, 0px`:t===`rotate3d`?`0, 0, 0, 0deg`:mf(t,`scale`)?`1`:mf(t,`rotate`)||mf(t,`skew`)?`0deg`:`0px`},Xf=e=>{let t=``;for(let n=0,r=of.length;n<r;n++){let r=of[n],i=e[r];if(i!==void 0){if(r===`translateX`){let r=e.translateY;if(r!==void 0){let a=e.translateZ;a===void 0?(t+=`translate(${i},${r}) `,n+=1):(t+=`translate3d(${i},${r},${a}) `,n+=2);continue}}if(r===`scaleX`&&e.scale===void 0){let r=e.scaleY;if(r!==void 0){let a=e.scaleZ;a===void 0?(t+=`scale(${i},${r}) `,n+=1):(t+=`scale3d(${i},${r},${a}) `,n+=2);continue}}t+=`${xte[r]}${i}) `}r===`rotateZ`&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},Zf=[];function Qf(e,t){if(!e)return null;let n=Zf.length;outer:for(let r=0;r<n;r++){let n=Zf[r];if(n.detect&&!n.detect(e))continue;let i=n.targetAdapters;for(let n=0,r=i.length;n<r;n++){let r=i[n];if(r.detect(e)){let n=r.props[t];if(n&&(!n.gate||n.gate(e)))return n;break outer}}}for(let r=0;r<n;r++){let n=Zf[r];if(n.detect&&!n.detect(e))continue;let i=n.propertyResolvers;for(let n=0,r=i.length;n<r;n++){let r=i[n](e,t);if(r)return r}}return null}var Fte=e=>{let t=Tte.exec(e)||Ete.exec(e),n=xf(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]},Ite=e=>{let t=e.length,n=t===4||t===5;return[+(`0x`+e[1]+e[n?1:2]),+(`0x`+e[n?2:3]+e[n?2:4]),+(`0x`+e[n?3:5]+e[n?3:6]),t===5||t===9?+((`0x`+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]},$f=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Lte=e=>{let t=Dte.exec(e)||Ote.exec(e),n=t[1]/360,r=t[2]/100,i=t[3]/100,a=xf(t[4])?1:+t[4],o,s,c;if(r===0)o=s=c=i;else{let e=i<.5?i*(1+r):i+r-i*r,t=2*i-e;o=Hf($f(t,e,n+1/3)*255,0),s=Hf($f(t,e,n)*255,0),c=Hf($f(t,e,n-1/3)*255,0)}return[o,s,c,a]},Rte=e=>Tf(e)?Fte(e):wf(e)?Ite(e):Ef(e)?Lte(e):[0,0,0,1],ep=(e,t)=>xf(e)?t:e,tp=(e,t)=>{let n=e.match(jte),r=t[Zd]?t:document.documentElement,i=getComputedStyle(r)?.getPropertyValue(n[1]);return(!i||i.trim()===``)&&n[2]&&(i=n[2].trim()),i||0},np=(e,t,n,r,i,a)=>{if(bf(e)){if(!i){let i=e(t,n,r,a);return isNaN(+i)?i||0:+i}let o=()=>{let i=e(t,n,r,a);return isNaN(+i)?i||0:+i};return i.func=o,o()}if(yf(e)&&mf(e,`var(`)){if(!i)return tp(e,t);let n=()=>tp(e,t);return i.func=n,n()}return e},rp=(e,t)=>e[Zd]?e[Qd]&&Af(e,t)?Kd.ATTRIBUTE:of.includes(t)||af.get(t)?Kd.TRANSFORM:mf(t,`--`)?Kd.CSS_VAR:t in e.style?Kd.CSS:t in e?Kd.OBJECT:Kd.ATTRIBUTE:Kd.OBJECT,ip=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let i=r||getComputedStyle(e[bte]||e).getPropertyValue(t);return i===`auto`?`0`:i},ap=(e,t,n,r)=>{let i=xf(n)?rp(e,t):n,a=Qf(e,t);if(a){let n=a.get(e);return n&&r&&(r[t]=n),n??0}if(i===Kd.OBJECT){let n=e[t];return n&&r&&(r[t]=n),n||0}if(i===Kd.ATTRIBUTE){let n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===Kd.TRANSFORM?Pte(e,t,r):i===Kd.CSS_VAR?ip(e,t,r).trimStart():ip(e,t,r)},op=(e,t,n)=>n===`-`?e-t:n===`+`?e+t:e*t,sp=()=>({t:qd.NUMBER,n:0,u:null,o:null,d:null,s:null}),cp=(e,t)=>{if(t.t=qd.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;let r=e;r[1]===`=`&&(t.o=r[0],r=r.slice(2));let i=!r.includes(` `)&&kte.exec(r);if(i)return t.t=qd.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Df(r))return t.t=qd.COLOR,t.d=Rte(r),t;{let e=r.match(cf);return t.t=qd.COMPLEX,t.d=e?e.map(Number):[],t.s=r.split(cf)||[],t}},lp=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=Kf(e._toNumbers),t.s=Kf(e._strings),t),up=sp(),dp=(e,t,n)=>{let r=e._modifier,i=e._fromNumbers,a=e._toNumbers,o=e._strings,s=o[0];for(let c=0,l=a.length;c<l;c++){let l=r(Hf(Uf(i[c],a[c],t),n)),u=o[c+1];s+=`${u?l+u:l}`,e._numbers[c]=l}return s},fp=(e,t,n,r,i)=>{let a=e.parent,o=e.duration,s=e.completed,c=e.iterationDuration,l=e.iterationCount,u=e._currentIteration,d=e._loopDelay,f=e._reversed,p=e._alternate,m=e._hasChildren,h=e._delay,g=e._currentTime,_=h+c,v=t-h,y=Vf(g,-h,o),b=Vf(v,-h,o),x=v-g,S=b>0,C=b>=o,w=o<=ef,T=i===Jd.FORCE,E=0,D=v,O=0;if(l>1){let t=c+(C?0:d),n=~~(b/t);e._currentIteration=Vf(n,0,l),C&&e._currentIteration--,E=e._currentIteration%2,D=b-n*t||0}let k=f^(p&&E),A=e._ease,j=C?k?0:o:k?c-D:D;A&&(j=c*A(j/c)||0);let M=(a?a.backwards:v<g)?!k:!!k;if(e._currentTime=v,e._iterationTime=j,e.backwards=M,S&&!e.began?(e.began=!0,!n&&!(a&&(M||!a.began))&&e.onBegin(e)):v<=0&&(e.began=!1),!n&&!m&&S&&e._currentIteration!==u&&e.onLoop(e),T||i===Jd.AUTO&&(t>=(a&&h>0?0:h)&&t<=_||t<=h&&y>h||t>=_&&y!==o)||j>=_&&y!==o||j<=h&&y>0&&!C||t<=y&&y===o&&s||C&&!s&&w){if(S&&(e.computeDeltaTime(y),n||e.onBeforeUpdate(e)),!m){let t=T||(M?x*-1:x)>=df.tickThreshold,i=Hf(e._offset+(a?a._offset:0)+h+j,12),o=e._head,s,c,l,u,d=0;for(;o;){let e=o._composition,n=o._currentTime,a=o._changeDuration,f=o._absoluteStartTime+o._changeDuration,p=o._nextRep,m=o._prevRep,h=e!==Yd.none,g=m?m._absoluteStartTime+m._changeDuration:0,_=m&&m.parent!==o.parent,v=!p||p._isOverridden?f:p.parent===o.parent?f+p._delay:p._absoluteStartTime<p._absoluteUpdateStartTime?p._absoluteStartTime:p._absoluteUpdateStartTime;if((t||(n!==a||i<=v||m&&!_&&(!p||p.parent!==o.parent))&&(n!==0||i>=o._absoluteStartTime||_&&!o._hasFromValue&&!m._isOverridden&&i>=g||p&&!p._isOverridden&&p.parent===o.parent&&p._currentTime!==0&&j<p._startTime))&&(!m||_||j>=o._startTime)&&(!h||!o._isOverridden&&(!o._isOverlapped||i<=f)&&(!p||p._isOverridden||i<=v)&&(!m||m._isOverridden||(_?i>=o._absoluteStartTime||!o._hasFromValue&&i>=g:i>=g+o._delay)))){let t=o._currentTime=Vf(j-o._startTime,0,a),n=o._ease(t/o._updateDuration),i=o._modifier,f=o._valueType,p=o._tweenType,m=p===Kd.OBJECT,g=f===qd.NUMBER,_=g&&m||n===0||n===1?-1:df.precision,v,y;if(g)v=y=i(Hf(Uf(o._fromNumber,o._toNumber,n),_));else if(f===qd.UNIT)y=i(Hf(Uf(o._fromNumber,o._toNumber,n),_)),v=`${y}${o._unit}`;else if(f===qd.COLOR){let e=o._numbers,t=o._fromNumbers,a=o._toNumbers,s=1-n,c=t[0],l=t[1],u=t[2],d=a[0],f=a[1],p=a[2];e[0]=i(Math.sqrt(c*c*s+d*d*n)),e[1]=i(Math.sqrt(l*l*s+f*f*n)),e[2]=i(Math.sqrt(u*u*s+p*p*n)),e[3]=i(Uf(t[3],a[3],n)),(!o._setter||r)&&(v=`rgba(${Hf(e[0],0)},${Hf(e[1],0)},${Hf(e[2],0)},${e[3]})`)}else f===qd.COMPLEX&&(v=dp(o,n,_));if(h&&(o._number=y),!r&&e!==Yd.blend){let e=o.property;s=o.target,o._setter?o._setter(s,y,o):m?s[e]=v:p===Kd.ATTRIBUTE?s.setAttribute(e,v):(c=s.style,p===Kd.TRANSFORM?(s!==l&&(l=s,u=s[$d]),u[e]=v,d=1):p===Kd.CSS?c[e]=v:p===Kd.CSS_VAR&&c.setProperty(e,v)),S&&(O=1)}else o._value=v}else n&&m&&!_&&j<o._startTime&&(o._currentTime=0);d&&o._renderTransforms&&(c.transform=Xf(u),d=0),o=o._next}!n&&O&&e.onRender(e)}!n&&S&&e.onUpdate(e)}return a&&w?!n&&(a.began&&!M&&v>0&&!s||M&&v<=1e-11&&s)&&(e.onComplete(e),e.completed=!M):S&&C?l===1/0?e._startTime+=e.duration:e._currentIteration>=l-1&&(e.paused=!0,!s&&!m&&(e.completed=!0,!n&&!(a&&(M||!a.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,O},pp=(e,t,n,r,i)=>{let a=e._currentIteration;if(fp(e,t,n,r,i),e._hasChildren){let o=e,s=o.backwards,c=r?t:o._iterationTime,l=hf(),u=0,d=!0;if(!r&&o._currentIteration!==a){let e=o.iterationDuration;qf(o,t=>{if(!s)!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&fp(t,e,n,1,Jd.FORCE),t.began=!1,t.completed=!1;else{let r=t.duration,i=t._offset+t._delay,a=i+r;!n&&r<=1e-11&&(!i||a===e)&&t.onComplete(t)}}),n||o.onLoop(o)}qf(o,e=>{let t=Hf((c-e._offset)*e._speed,12);if(s&&t>e._delay+e.duration)return;let a=e._fps<o._fps?e.requestTick(l):i;u+=fp(e,t,n,r,a),!e.completed&&d&&(d=!1)},s),!n&&u&&o.onRender(o),(d||s)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}},mp={},zte=(e,t,n)=>{if(n===Kd.TRANSFORM)return af.get(e)||e;if(n===Kd.CSS||n===Kd.ATTRIBUTE&&Cf(t)&&e in t.style){let t=mp[e];if(t)return t;{let t=e&&pf(e);return mp[e]=t,t}}return e},hp=(e,t=!1)=>{if(e._hasChildren)qf(e,e=>hp(e,t),!0);else{let n=e;n.pause(),qf(n,e=>{let r=e.property,i=e.target,a=e._tweenType,o=e._inlineValue,s=Sf(o)||o===``;if(e._setter){if(!t&&!s){if(cp(o,up),up.d){let t=up.d,n=e._numbers;for(let e=0,r=t.length;e<r;e++)n[e]=t[e]}else e._number=up.n;e._setter(e.target,e._number,e)}}else if(a===Kd.OBJECT)!t&&!s&&(i[r]=o);else if(i[Zd]){if(a===Kd.ATTRIBUTE)t||(s?i.removeAttribute(r):i.setAttribute(r,o));else{let t=i.style;if(a===Kd.TRANSFORM){let n=i[$d];s?delete n[r]:n[r]=o,e._renderTransforms&&(Object.keys(n).length?t.transform=Xf(n):t.removeProperty(`transform`))}else s?t.removeProperty(pf(r)):t[r]=o}}i[Zd]&&n._tail===e&&n.targets.forEach(e=>{e.getAttribute&&e.getAttribute(`style`)===``&&e.removeAttribute(`style`)})})}return e},gp=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=nf/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=+e,n=t<1e-11?ef:t,r=nf/n;n>lf.frameRate&&(lf.frameRate=n),this._fps=n,this._frameDuration=r}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?ef:t}requestTick(e){let t=this._frameDuration,n=e-this._lastTickTime,r=t*.25;return n+(r<4?r:4)<t?Jd.NONE:(this._lastTickTime=n>=t?e-n%t:e,Jd.AUTO)}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},_p={animation:null,update:sf},Bte=e=>{let t=_p.animation;return t||(t={duration:ef,computeDeltaTime:sf,_offset:0,_delay:0,_head:null,_tail:null},_p.animation=t,_p.update=()=>{e.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=e===qd.COMPLEX||e===qd.COLOR?Kf(r._fromNumbers):null,i=r._fromNumber,a=n._tail;for(;a&&a!==r;){if(t)for(let e=0,n=a._numbers.length;e<n;e++)t[e]+=a._numbers[e];else i+=a._number;a=a._prevAdd}r._toNumber=i,r._toNumbers=t}}}),fp(t,1,1,0,Jd.FORCE)}),t},vp=Ud?requestAnimationFrame:setImmediate,Vte=Ud?cancelAnimationFrame:clearImmediate,Hte=class extends gp{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=lf,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=hf();if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let i=r._next;r.paused?(Jf(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):pp(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):Jd.AUTO),r=i}_p.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(hf()),this.reqId=vp(bp)),this}pause(){if(this.reqId)return this.paused=!0,Ute()}resume(){if(this.paused)return this.paused=!1,qf(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(df.timeScale===1?1:nf)}set speed(e){let t=e*df.timeScale;this._speed!==t&&(this._speed=t,qf(this,e=>e.speed=e._speed))}get timeUnit(){return df.timeScale===1?`ms`:`s`}set timeUnit(e){let t=.001,n=e===`s`,r=n?t:1;if(df.timeScale!==r){df.timeScale=r,df.tickThreshold=200*r;let e=n?t:nf;this.defaults.duration*=e,this._speed*=e}}get precision(){return df.precision}set precision(e){df.precision=e}},yp=(()=>{let e=new Hte(hf());return Ud&&(ff.engine=e,Gd.addEventListener(`visibilitychange`,()=>{e.pauseOnDocumentHidden&&(Gd.hidden?e.pause():e.resume())})),e})(),bp=()=>{yp._head?(yp.reqId=vp(bp),yp.update()):yp.reqId=0},Ute=()=>(Vte(yp.reqId),yp.reqId=0,yp),xp={_rep:new WeakMap,_add:new Map},Sp=(e,t,n=`_rep`)=>{let r=xp[n],i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},Wte=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,Cp=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=ef,e._currentTime=ef},wp=(e,t)=>{let n=e._composition;if(n===Yd.replace){let n=e._absoluteStartTime;Yf(t,e,Wte,`_prevRep`,`_nextRep`);let r=e._prevRep;if(r){let t=r.parent,i=r._absoluteEndTime;if(e.parent.id!==t.id&&t.iterationCount>1&&i+(t.duration-t.iterationDuration)>n){Cp(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)Cp(e),e=e._prevRep}let a=e._absoluteUpdateStartTime;if(i>a){let e=r._startTime,t=Hf(a-(i-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&Cp(r)}let o=e.parent.parent;if(!o||o!==t.parent){let e=!0;if(qf(t,t=>{t._isOverlapped||(e=!1)}),e){let e=t.parent;if(e){let n=!0;qf(e,e=>{e!==t&&qf(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}}else if(n===Yd.blend){let t=Sp(e.target,e.property,`_add`),n=Bte(xp._add),r=t._head;r||(r={...e},r._composition=Yd.replace,r._updateDuration=ef,r._startTime=0,r._numbers=Kf(e._fromNumbers),r._number=0,r._next=null,r._prev=null,Yf(t,r),Yf(n,r));let i=e._toNumber;if(e._fromNumber=r._fromNumber-i,e._toNumber=0,e._numbers=Kf(e._fromNumbers),e._number=0,r._fromNumber=i,e._toNumbers.length){let t=Kf(e._toNumbers);t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}Yf(t,e,null,`_prevAdd`,`_nextAdd`)}return e},Gte=e=>{let t=e._composition;if(t!==Yd.none){let n=e.target,r=e.property,i=xp._rep.get(n)[r];if(Jf(i,e,`_prevRep`,`_nextRep`),t===Yd.blend){let t=xp._add,i=t.get(n);if(!i)return;let a=i[r],o=_p.animation;Jf(a,e,`_prevAdd`,`_nextAdd`);let s=a._head;if(s&&s===a._tail){Jf(a,s,`_prevAdd`,`_nextAdd`),Jf(o,s);let e=!0;for(let t in i)if(i[t]._head){e=!1;break}e&&t.delete(n)}}}return e},Tp=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),Ep=e=>e._cancelled?(e._hasChildren?qf(e,Ep):qf(e,e=>{e._composition!==Yd.none&&wp(e,Sp(e.target,e.property))}),e._cancelled=0,e):e,Dp=0,Kte=(e,t)=>e._priority>t._priority,qte=class extends gp{constructor(e={},t=null,n=0){super(0),++Dp;let{id:r,delay:i,duration:a,reversed:o,alternate:s,loop:c,loopDelay:l,autoplay:u,frameRate:d,playbackRate:f,priority:p,onComplete:m,onLoop:h,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:y}=e;uf.current&&uf.current.register(this);let b=t?0:yp._lastTickTime,x=t?t.defaults:df.defaults,S=bf(i)||xf(i)?x.delay:+i,C=bf(a)||xf(a)?1/0:+a,w=ep(c,x.loop),T=ep(l,x.loopDelay),E=w===!0||w===1/0||w<0?1/0:w+1,D=0;t?D=n:(yp.reqId||yp.requestTick(hf()),D=(yp._lastTickTime-yp._startTime)*df.timeScale),this.id=xf(r)?Dp:r,this.parent=t,this.duration=Wf((C+T)*E-T)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=y||x.onUpdate,this.onLoop=h||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=C,this.iterationCount=E,this._autoplay=!t&&ep(u,x.autoplay),this._offset=D,this._delay=S,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=sf,this._running=!1,this._reversed=+ep(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=ep(s,x.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=ep(d,x.frameRate),this._speed=ep(f,x.playbackRate),this._priority=+ep(p,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Vf(Hf(this._currentTime,df.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return Vf(Hf(this._iterationTime,df.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Vf(Hf(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Vf(Hf(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Vf(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return Ep(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,pp(this,0,1,~~e,Jd.FORCE),Tp(this),this._hasChildren&&qf(this,Tp),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&pp(this,this.duration,1,~~e,Jd.FORCE),this.reset(e);let t=this._autoplay;return t===!0?this.resume():t&&!xf(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*yp._speed);return this._startTime=hf()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?pp(this,ef,0,0,Jd.FORCE):(this._running||=(Yf(yp,this,Kte),yp._hasChildren=!0,!0),this.resetTime(),this._startTime-=12,yp.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,n=0){Ep(this),this.completed=!1;let r=this.paused;return this.paused=!0,pp(this,e+this._delay,~~t,~~n,Jd.AUTO),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Rf(tf/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?qf(this,e=>e.cancel(),!0):qf(this,Gte),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=Gf(e);if(t===n)return this;let r=e/t,i=e<=ef;return this.duration=i?ef:n,this.iterationDuration=i?ef:Gf(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){pp(this,0,1,0,Jd.AUTO);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=sf){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=sf};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}};function Op(e){let t=yf(e)?uf.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function Jte(e){if(Sf(e))return[];if(!Ud)return gf(e)&&e.flat(1/0)||[e];if(gf(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!Sf(r)){let e=Op(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!Sf(r)){let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=Op(e);return t?Array.from(t):[e]}function Yte(e){let t=Jte(e),n=t.length;for(let e=0;e<n;e++){let n=t[e];if(!n[Xd]){n[Xd]=!0;let e=Cf(n);(n.nodeType||e)&&(n[Zd]=!0,n[Qd]=e,n[$d]={})}}return t}var kp={deg:1,rad:180/zf,turn:360},Ap={},jp=(e,t,n,r=!1)=>{let i=t.u,a=t.n;if(t.t===qd.UNIT&&i===n)return t;let o=a+i+n,s=Ap[o];if(!xf(s)&&!r)t.n=s;else{let r;if(i in kp)r=a*kp[i]/kp[n];else{let t=e.cloneNode(),o=e.parentNode,s=o&&o!==Gd?o:Gd.body;s.appendChild(t);let c=t.style;c.width=100+i;let l=t.offsetWidth||100;c.width=100+n;let u=l/(t.offsetWidth||100);s.removeChild(t),r=u*a}t.n=r,Ap[o]=r}return t.t,qd.UNIT,t.u=n,t},Mp=e=>e,Np=(e=1.68)=>t=>jf(t,+e),Pp={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},Xte=zf/2,Fp=zf*2,Ip={"":Np,Quad:Np(2),Cubic:Np(3),Quart:Np(4),Quint:Np(5),Sine:e=>1-Pf(e*Xte),Circ:e=>1-Mf(1-e*e),Expo:e=>e?jf(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=jf(2,--n))-1)/11;);return 1/jf(4,3-n)-7.5625*jf((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{let n=Vf(+e,1,10),r=Vf(+t,ef,2),i=r/Fp*Mte(1/n),a=Fp/r;return e=>e===0||e===1?e:-n*jf(2,-10*(1-e))*Nf((1-e-i)*a)}},Lp=(()=>{let e={linear:Mp,none:Mp};for(let t in Pp)for(let n in Ip){let r=Ip[n],i=Pp[t];e[t+n]=n===``||n===`Back`||n===`Elastic`?(e,t)=>i(r(e,t)):i(r)}return e})(),Rp={linear:Mp,none:Mp},Zte=e=>{if(Rp[e])return Rp[e];if(e.indexOf(`(`)<=-1){let t=Pp[e]||e.includes(`Back`)||e.includes(`Elastic`)?Lp[e]():Lp[e];return t?Rp[e]=t:Mp}{let t=e.slice(0,-1).split(`(`),n=Lp[t[0]];return n?Rp[e]=n(...t[1].split(`,`)):Mp}},zp=[`steps(`,`irregular(`,`linear(`,`cubicBezier(`],Bp=e=>{if(yf(e)){for(let t=0,n=zp.length;t<n;t++)if(mf(e,zp[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),Mp}return bf(e)?e:yf(e)?Zte(e):Mp},Vp=sp(),Hp=sp(),Up={},Wp={func:null},Gp={func:null},Kp=[null],qp=[null,null],Jp={to:null},Qte=0,Yp=0,Xp,Zp,$te=(e,t)=>{let n={};if(gf(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(Of);for(let r=0,i=t.length;r<i;r++){let i=t[r];n[i]=e.map(e=>{let t={};for(let n in e){let r=e[n];Of(n)?n===i&&(t.to=r):t[n]=r}return t})}}else{let r=ep(t.duration,df.defaults.duration);Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,i=e.p;for(let e in i)if(Of(e)){let a=n[e];a||=n[e]=[];let o=t*r,s=a.length,c=a[s-1],l={to:i[e]},u=0;for(let e=0;e<s;e++)u+=a[e].duration;s===1&&(l.from=c.to),i.ease&&(l.ease=i.ease),l.duration=o-(s?u:0),a.push(l)}return e});for(let e in n){let t=n[e],r;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=n.ease;n.ease=r||void 0,r=i}t[0].duration||t.shift()}}return n},ene=class extends qte{constructor(e,t,n,r,i=!1,a=0,o){super(t,n,r),this._head,this._tail,++Yp;let s=Yte(e),c=s.length,l=t.keyframes,u=l?Nte($te(l,t),t):t,{id:d,delay:f,duration:p,ease:m,playbackEase:h,modifier:g,composition:_,onRender:v}=u,y=n?n.defaults:df.defaults,b=ep(m,y.ease),x=ep(h,y.playbackEase),S=x?Bp(x):null,C=!xf(b.ease),w=C?b.ease:ep(m,S?`linear`:y.ease),T=C?b.settlingDuration:ep(p,y.duration),E=ep(f,y.delay),D=g||y.modifier,O=xf(_)&&c>=1e3?Yd.none:xf(_)?y.composition:_,k=this._offset+(n?n._offset:0);C&&(b.parent=this);let A=NaN,j=NaN,M=0,N=0;for(let e=0;e<c;e++){let t=s[e],r=a||e,c=o||s,l=NaN,d=NaN;for(let e in u)if(Of(e)){let a=rp(t,e),o=Qf(t,e),s=zte(e,t,a),f=u[e],p=gf(f);if(i&&!p&&(qp[0]=f,qp[1]=f,f=qp),p){let e=f.length,t=!_f(f[0]);e===2&&t?(Jp.to=f,Kp[0]=Jp,Xp=Kp):e>2&&t?(Xp=[],f.forEach((e,t)=>{t?t===1?(qp[1]=e,Xp.push(qp)):Xp.push(e):qp[0]=e})):Xp=f}else Kp[0]=f,Xp=Kp;let m=null,h=null,g=NaN,_=0,v=0;for(let e=Xp.length;v<e;v++){let i=Xp[v];_f(i)?Zp=i:(Jp.to=i,Zp=Jp),Wp.func=null,Gp.func=null;let l=np(ep(Zp.composition,O),t,r,c,null,null),u=vf(l)?l:Yd[l];!m&&u!==Yd.none&&(m=Sp(t,s));let d=m?m._tail:null,f=n&&d&&d.parent.parent===n?d:h,p=np(Zp.to,t,r,c,Wp,f),y;_f(p)&&!xf(p.to)?(Zp=p,y=p.to):y=p;let b=np(Zp.from,t,r,c,Gp,f),x=Zp.ease||w,S=np(x,t,r,c,null,f),C=bf(S)||yf(S)?S:x,A=!xf(C)&&!xf(C.ease),j=A?C.ease:C,P=A?C.settlingDuration:np(ep(Zp.duration,e>1?np(T,t,r,c,null,f)/e:T),t,r,c,null,f),ee=np(ep(Zp.delay,v?0:E),t,r,c,null,f),te=Zp.modifier||D,ne=!xf(b),re=!xf(y),ie=gf(y),ae=ie||ne&&re,oe=h?_:0,se=h?_+ee:ee,ce=Hf(k+se,12),le=Hf(k+oe,12);!N&&(ne||ie)&&(N=1);let ue=h;if(u!==Yd.none){let e=m._head;for(;e&&e._absoluteStartTime<=ce;)if(e._isOverridden||(ue=e),e=e._nextRep,e&&e._absoluteStartTime>=ce)for(;e;)Cp(e),e=e._nextRep}if(ae){cp(ie?np(y[0],t,r,c,Gp,f):b,Vp),cp(ie?np(y[1],t,r,c,Wp,f):y,Hp);let e=ap(t,s,a,Up);Vp.t===qd.NUMBER&&(ue?ue._valueType===qd.UNIT&&(Vp.t=qd.UNIT,Vp.u=ue._unit):(cp(e,up),up.t===qd.UNIT&&(Vp.t=qd.UNIT,Vp.u=up.u)))}else re?cp(y,Hp):h?lp(h,Hp):cp(n&&ue&&ue.parent.parent===n?ue._value:ap(t,s,a,Up),Hp),ne?cp(b,Vp):h?lp(h,Vp):cp(n&&ue&&ue.parent.parent===n?ue._value:ap(t,s,a,Up),Vp);if(Vp.o&&(Vp.n=op(ue?ue._toNumber:cp(ap(t,s,a,Up),up).n,Vp.n,Vp.o)),Hp.o&&(Hp.n=op(Vp.n,Hp.n,Hp.o)),Vp.t!==Hp.t){if(Vp.t===qd.COMPLEX||Hp.t===qd.COMPLEX){let e=Vp.t===qd.COMPLEX?Vp:Hp,t=Vp.t===qd.COMPLEX?Hp:Vp;t.t=qd.COMPLEX,t.s=Kf(e.s),t.d=e.d.map(()=>t.n)}else if(Vp.t===qd.UNIT||Hp.t===qd.UNIT){let e=Vp.t===qd.UNIT?Vp:Hp,t=Vp.t===qd.UNIT?Hp:Vp;t.t=qd.UNIT,t.u=e.u}else if(Vp.t===qd.COLOR||Hp.t===qd.COLOR){let e=Vp.t===qd.COLOR?Vp:Hp,t=Vp.t===qd.COLOR?Hp:Vp;t.t=qd.COLOR,t.d=e.d.map(()=>0)}}if(Vp.u!==Hp.u){let e=Hp.u?Vp:Hp;e=jp(t,e,Hp.u?Hp.u:Vp.u,!1)}if(Hp.d&&Vp.d&&Hp.d.length!==Vp.d.length){let e=Vp.d.length>Hp.d.length?Vp:Hp,t=e===Vp?Hp:Vp;t.d=e.d.map((e,n)=>xf(t.d[n])?0:t.d[n]),t.s=Kf(e.s)}let de=Hf(+P||1e-11,12),fe=Up[s];Sf(fe)||(Up[s]=null);let pe=o?o.set:null;_=Hf(se+de,12);let me=Vp.d,he=Hp.d,ge=Hp.s,_e={parent:this,id:Qte++,property:s,target:t,_value:null,_toFunc:Wp.func,_fromFunc:Gp.func,_ease:Bp(j),_fromNumbers:me?Kf(me):rf,_toNumbers:he?Kf(he):rf,_strings:ge?Kf(ge):rf,_fromNumber:Vp.n,_toNumber:Hp.n,_numbers:me?Kf(me):rf,_number:Vp.n,_unit:Hp.u,_modifier:te,_currentTime:0,_startTime:se,_delay:+ee,_updateDuration:de,_changeDuration:de,_absoluteStartTime:ce,_absoluteUpdateStartTime:le,_absoluteEndTime:Hf(k+_,12),_hasFromValue:ne||ie?1:0,_tweenType:a,_setter:pe,_valueType:Hp.t,_composition:u,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:fe,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};u!==Yd.none&&wp(_e,m);let ve=_e._valueType;if(ve===qd.COMPLEX)_e._value=dp(_e,1,-1);else if(ve===qd.UNIT)_e._value=`${te(_e._toNumber)}${_e._unit}`;else if(ve===qd.COLOR){let e=Hp.d;_e._value=`rgba(${Hf(e[0],0)},${Hf(e[1],0)},${Hf(e[2],0)},${e[3]})`}else _e._value=te(_e._toNumber);isNaN(g)&&(g=_e._startTime),h=_e,M++,Yf(this,_e)}(isNaN(j)||g<j)&&(j=g),(isNaN(A)||_>A)&&(A=_),a===Kd.TRANSFORM&&(l=M-v,d=M)}if(!isNaN(l)){let e=0;qf(this,t=>{e>=l&&e<d&&(t._renderTransforms=1,t._composition===Yd.blend&&qf(_p.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}c||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),j?(qf(this,e=>{e._startTime-e._delay||(e._delay-=j),e._startTime-=j}),A-=j):j=0,A||(A=ef,this.iterationCount=0),this.targets=s,this.id=xf(d)?Yp:d,this.duration=A===1e-11?ef:Wf((A+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=v||y.onRender,this._ease=S,this._delay=j,this.iterationDuration=A,!this._autoplay&&N&&this.onRender(this)}stretch(e){let t=this.duration;if(t===Gf(e))return this;let n=e/t;return qf(this,e=>{e._updateDuration=Gf(e._updateDuration*n),e._changeDuration=Gf(e._changeDuration*n),e._currentTime*=n,e._delay*=n,e._startTime*=n,e._absoluteStartTime*=n,e._absoluteUpdateStartTime*=n,e._absoluteEndTime*=n}),super.stretch(e)}refresh(){return qf(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(cp(n(),Vp),Vp.u!==e._unit&&e.target[Zd]&&jp(e.target,Vp,e._unit,!0),e._fromNumbers=Kf(Vp.d),e._fromNumber=Vp.n):t&&(cp(ap(e.target,e.property,e._tweenType),up),e._fromNumbers=Kf(up.d),e._fromNumber=up.n),t&&(cp(t(),Hp),e._toNumbers=Kf(Hp.d),e._strings=Kf(Hp.s),e._toNumber=Hp.o?op(e._fromNumber,Hp.n,Hp.o):Hp.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),hp(this)}then(e){return super.then(e)}},Qp=(e,t)=>df.editor?df.editor.addAnimation(e,t):new ene(e,t,null,0,!1).init(),$p=nf*10,tne=class{constructor(e={}){let t=!xf(e.bounce)||!xf(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/nf,this.maxIterations=this.maxDuration/this.timeStep/nf,this.bn=Vf(ep(e.bounce,.5),-1,1),this.pd=Vf(ep(e.duration,628),10*df.timeScale,$p*df.timeScale),this.m=Vf(ep(e.mass,1),1,$p),this.s=Vf(ep(e.stiffness,100),ef,$p),this.d=Vf(ep(e.damping,10),ef,$p),this.v=Vf(ep(e.velocity,0),-$p,$p),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||sf,t&&this.calculateSDFromBD(),this.compute(),this.ease=e=>{let t=e*this.settlingDuration,n=this.completed,r=this.pd;return t>=r&&!n&&(this.completed=!0,this.onComplete(this.parent)),t<r&&n&&(this.completed=!1),e===0||e===1?e:this.solve(e*this.solverDuration)}}solve(e){let{zeta:t,w0:n,wd:r,b:i}=this,a=e;return a=t<1?If(-a*t*n)*(1*Pf(r*a)+i*Nf(r*a)):t===1?(1+i*a)*If(-a*n):((1+i)*If((-t*n+r)*a)+(1-i)*If((-t*n-r)*a))/2,1-a}calculateSDFromBD(){let e=df.timeScale===1?this.pd/nf:this.pd;this.m=1,this.v=0,this.s=jf(2*zf/e,2),this.d=this.bn>=0?(1-this.bn)*4*zf/e:4*zf/(e*(1+this.bn)),this.s=Hf(Vf(this.s,ef,$p),3),this.d=Hf(Vf(this.d,ef,300),3)}calculateBDFromSD(){let e=2*zf/Mf(this.s);this.pd=e*(df.timeScale===1?nf:1),this.bn=this.d/(2*Mf(this.s))<=1?1-this.d*e/(4*zf):4*zf/(this.d*e)-1,this.bn=Hf(Vf(this.bn,-1,1),3),this.pd=Hf(Vf(this.pd,10*df.timeScale,$p*df.timeScale),3)}compute(){let{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:i,d:a,s:o,v:s}=this,c=this.w0=Vf(Mf(o/i),ef,nf),l=this.zeta=a/(2*Mf(o*i));l<1?(this.wd=c*Mf(1-l*l),this.b=(l*c+-s)/this.wd):l===1?(this.wd=0,this.b=-s+c):(this.wd=c*Mf(l*l-1),this.b=(l*c+-s)/this.wd);let u=0,d=0,f=0;for(;d<=e&&f<=t;)Ff(1-this.solve(u))<n?d++:d=0,this.solverDuration=u,u+=r,f++;this.settlingDuration=Hf(this.solverDuration*nf,0)*df.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=Vf(ep(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=Vf(ep(e,1),10*df.timeScale,$p*df.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=Vf(ep(e,100),ef,$p),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=Vf(ep(e,10),ef,$p),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=Vf(ep(e,1),1,$p),this.compute()}get velocity(){return this.v}set velocity(e){this.v=Vf(ep(e,0),-$p,$p),this.compute()}},nne=e=>new tne(e),em=(e=10,t)=>{let n=t?Lf:Rf;return t=>n(Vf(t,0,1)*e)*(1/e)},tm=(0,I.forwardRef)(function({id:e,transform:t},n){return(0,F.jsxs)(`radialGradient`,{ref:n,id:e,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`-1.6`,r:`5.6`,gradientTransform:t,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`color-mix(in oklab, var(--color-white) calc(var(--depth) * 50%), currentColor)`}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`currentColor`})]})});function nm({id:e}){return(0,F.jsx)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,F.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1`,floodColor:`currentColor`,style:{floodOpacity:`calc(var(--depth) * 0.6)`}})})}function rm({id:e}){return(0,F.jsxs)(`filter`,{id:e,x:`-10%`,y:`-10%`,width:`120%`,height:`120%`,colorInterpolationFilters:`sRGB`,children:[(0,F.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.3`,result:`soft-edge`}),(0,F.jsx)(`feOffset`,{in:`soft-edge`,dx:`0.25`,dy:`0.45`,result:`lower-edge`}),(0,F.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`lower-edge`,operator:`out`,result:`inner-shadow`}),(0,F.jsx)(`feFlood`,{floodColor:`var(--color-black)`,floodOpacity:`calc(var(--depth) * 0.28)`}),(0,F.jsx)(`feComposite`,{in2:`inner-shadow`,operator:`in`,result:`shade`}),(0,F.jsx)(`feOffset`,{in:`soft-edge`,dx:`-0.2`,dy:`-0.35`,result:`upper-edge`}),(0,F.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`upper-edge`,operator:`out`,result:`inner-highlight`}),(0,F.jsx)(`feFlood`,{floodColor:`var(--color-white)`,floodOpacity:`calc(var(--depth) * 0.7)`}),(0,F.jsx)(`feComposite`,{in2:`inner-highlight`,operator:`in`,result:`highlight`}),(0,F.jsxs)(`feMerge`,{children:[(0,F.jsx)(`feMergeNode`,{in:`SourceGraphic`}),(0,F.jsx)(`feMergeNode`,{in:`shade`}),(0,F.jsx)(`feMergeNode`,{in:`highlight`})]})]})}var im=Object.freeze({alphaIntercept:-8,alphaSlope:18,blurStdDeviation:2});function am({id:e,values:t=fr}){return(0,F.jsxs)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,F.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:t.blurStdDeviation,result:`blur`}),(0,F.jsx)(`feColorMatrix`,{in:`blur`,values:`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${String(t.alphaSlope)} ${String(t.alphaIntercept)}`,result:`gooey`}),(0,F.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`gooey`,operator:`atop`})]})}function om(e,t){let n=e.ownerDocument,r=!0,i=()=>{t(r&&!n.hidden)},a=globalThis,o=`IntersectionObserver`in globalThis&&a.IntersectionObserver?new a.IntersectionObserver(t=>{let n=t.find(t=>t.target===e);n&&(r=n.isIntersecting,i())}):void 0;return o?.observe(e),n.addEventListener(`visibilitychange`,i),i(),()=>{o?.disconnect(),n.removeEventListener(`visibilitychange`,i)}}function sm(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function cm(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function lm(e,t,n){let r=n*Math.PI*2,i=t*2.1,a=Math.sin(r*2+i)*.15,o={rx:4*(1+a),ry:4/(1+a)};if(e===`line`){let e=7.5+4*Math.cos(r+(t===2?-.45:0));return{cx:(t-1)*e,cy:Math.sin(r+i)*.7,...o}}if(e===`square`){let e=4.7+2.7*Math.cos(r);return{cx:(t%2?1:-1)*e,cy:(t<2?-1:1)*e,...o}}if(e===`donut`){let e=sm(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=sm((n-.79)/.21),c=8+Math.sin(r*2+i)*.35*Math.sin(n*Math.PI);return{cx:Math.cos(o)*c*(1-s),cy:Math.sin(o)*c*(1-s)-8*s,rx:3.6*(1+a*Math.sin(n*Math.PI)),ry:3.6/(1+a*Math.sin(n*Math.PI))}}if(e===`bloom`){if(t===0){let e=[1,2,3,4].reduce((e,t)=>e+cm(t,n),0),t=Math.sqrt(49-e*4);return{cx:Math.sin(r)*.4,cy:Math.sin(r*2)*.4,rx:t*(1+a),ry:t/(1+a)}}let e=cm(t,n),i=(t-1)*Math.PI/2-Math.PI/4+Math.sin(r)*.22;return{cx:Math.cos(i)*14*e,cy:Math.sin(i)*14*e,rx:3.2*(1+a),ry:3.2/(1+a)}}return{cx:Math.sin(r+i)*6+Math.sin(r*3+i)*2.5,cy:Math.cos(r*2+i)*6,...o}}var rne={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},ine=2;function ane({variant:e,pace:t=`working`}){let n=`caps-loader-${(0,I.useId)().replaceAll(`:`,``)}`,r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=Ld(i),{reduced:o}=a,s=e===`donut`?16:e===`bloom`?5:e===`square`?4:3;return(0,I.useLayoutEffect)(()=>{if(!r.current||!i.current||o&&t===`idle`)return;let n=o?[Qp(r.current,{opacity:[.55,1],duration:a.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...r.current.querySelectorAll(`ellipse`)].map((n,r)=>Qp(n,{keyframes:Array.from({length:48},(n,i)=>({...lm(e,r,(i+1)/48),duration:Rd(a,rne[e]*(t===`idle`?ine:1))/48})),ease:`linear`,loop:!0})),s=om(i.current,e=>{for(let t of n)e?t.resume():t.pause()});return()=>{s();for(let e of n)e.revert()}},[e,t,o,a]),(0,F.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,focusable:`false`,viewBox:e===`line`?`-20 -10 40 20`:`-20 -20 40 40`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(am,{id:n,values:im}),(0,F.jsx)(tm,{id:`${n}-surface`,transform:e===`line`?`matrix(3.4 0 0 1.4 0 0)`:`matrix(3 0 0 3 0 0)`}),(0,F.jsx)(nm,{id:`${n}-shadow`}),(0,F.jsx)(`mask`,{id:`${n}-mask`,maskUnits:`userSpaceOnUse`,x:`-20`,y:`-20`,width:`40`,height:`40`,style:{maskType:`alpha`},children:(0,F.jsx)(`g`,{ref:r,fill:`currentColor`,filter:`url(#${n})`,children:Array.from({length:s},(t,n)=>(0,F.jsx)(`ellipse`,{...lm(e,n,0)},n))})})]}),(0,F.jsx)(`g`,{filter:`url(#${n}-shadow)`,children:(0,F.jsx)(`rect`,{x:`-20`,y:`-20`,width:`40`,height:`40`,fill:`url(#${n}-surface)`,mask:`url(#${n}-mask)`})})]})}var one={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},sne={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},um=(0,I.forwardRef)(function({"aria-label":e,"aria-labelledby":t,className:n,decorative:r=!1,label:i=`Loading`,size:a=`md`,variant:o=`line`,pace:s=`working`,tone:c=`neutral`,...l},u){let d=`${(0,I.useId)()}-label`,f=!r&&e===void 0&&t===void 0;return(0,F.jsxs)(`span`,{...l,"aria-label":r?void 0:e,"aria-hidden":r||void 0,"aria-labelledby":r?void 0:t??(e===void 0?d:void 0),className:Dd(`caps-loader`,one[a],sne[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,F.jsx)(ane,{variant:o,pace:s}),f?(0,F.jsx)(Md,{id:d,children:i}):null]})}),dm=Object.freeze({ease:`linear`,duration:0});function fm(e,t){let n=gte(e,t.duration);return n<=0?dm:e.steps>0?{ease:em(e.steps),duration:n}:{ease:nne({bounce:hte(e,t.bounce),duration:n}),duration:n}}function pm(e,t){let n=Rd(e,t.duration);return{ease:e.steps>0?em(e.steps):t.ease,duration:n}}var mm={dot:{y:-4,height:8,cy:0},pill:{y:-16,height:32,cy:0},bang:{y:-16,height:20,cy:12}};function cne({className:e,glyph:t,motion:n}){let r=`caps-status-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(mm[t]).current,d=(0,I.useRef)(t===`dot`?1:4).current,f=(0,I.useRef)(+(t===`bang`)).current,p=(0,I.useRef)(t),m=Ld(s),{reduced:h}=m;return(0,I.useLayoutEffect)(()=>{if(!i.current||!a.current||!c.current||!l.current)return;let e=mm[t],n=h||p.current===t;p.current=t;let r=Fd(i.current),o=n?{duration:0}:fm(r,{bounce:.3,duration:360}),s=Qp(i.current,{y:e.y,height:e.height,...o}),u=Qp(a.current,{cy:e.cy,...n?{duration:0}:{delay:Rd(r,35),...fm(r,{bounce:.3,duration:420})}}),d=Qp(c.current,{gradientTransform:`matrix(1 0 0 ${t===`dot`?`1`:`4`} 0 0)`,...o}),f=Qp(l.current,{opacity:+(t===`bang`),...n?dm:pm(r,{ease:`inOutSine`,duration:220})});return()=>{s.cancel(),u.cancel(),d.cancel(),f.cancel()}},[t,h]),(0,I.useLayoutEffect)(()=>{if(!o.current||!s.current||h||n===`none`)return;let e=n===`pulse`?Qp(o.current,{opacity:[1,.45],...pm(m,{ease:`inOutSine`,duration:750}),alternate:!0,loop:!0}):Qp(o.current,{keyframes:{"0%":{translateY:0,scaleX:1,scaleY:1},"18%":{translateY:.25,scaleX:1.1,scaleY:.91},"42%":{translateY:-1.3,scaleX:.94,scaleY:1.06},"62%":{translateY:-1.65,scaleX:1,scaleY:1},"82%":{translateY:.15,scaleX:1.06,scaleY:.95},"100%":{translateY:0,scaleX:1,scaleY:1}},...pm(m,{ease:`inOutSine`,duration:1e3}),loop:!0}),t=om(s.current,t=>{t?e.resume():e.pause()});return()=>{t(),e.revert()}},[n,h,m]),(0,F.jsxs)(`svg`,{ref:s,"aria-hidden":`true`,className:`caps-status-bead ${e??``}`,width:`8`,height:`8`,viewBox:`-4 -4 8 8`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(am,{id:r,values:im}),(0,F.jsx)(tm,{ref:c,id:`${r}-surface`,transform:`matrix(1 0 0 ${String(d)} 0 0)`}),(0,F.jsxs)(`radialGradient`,{id:`${r}-drop-light`,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`10.4`,r:`5.6`,children:[(0,F.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-white)`,style:{stopOpacity:`calc(var(--depth) * 0.5)`}}),(0,F.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-white)`,stopOpacity:`0`})]}),(0,F.jsx)(nm,{id:`${r}-shadow`}),(0,F.jsx)(`mask`,{id:`${r}-silhouette`,maskUnits:`userSpaceOnUse`,x:`-12`,y:`-24`,width:`24`,height:`48`,style:{maskType:`alpha`},children:(0,F.jsxs)(`g`,{fill:`var(--color-white)`,filter:`url(#${r})`,children:[(0,F.jsx)(`rect`,{ref:i,x:`-4`,y:u.y,width:`8`,height:u.height,rx:`4`}),(0,F.jsx)(`circle`,{ref:a,cx:`0`,cy:u.cy,r:`4`})]})})]}),(0,F.jsx)(`g`,{ref:o,filter:`url(#${r}-shadow)`,children:(0,F.jsxs)(`g`,{mask:`url(#${r}-silhouette)`,children:[(0,F.jsx)(`rect`,{x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-surface)`}),(0,F.jsx)(`rect`,{ref:l,x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-drop-light)`,opacity:f})]})})]})}var lne=.28;function hm(e,t){switch(e){case`ring`:return{dashes:1,track:0,arc:0,sweep:0,disc:0,tick:0,cross:0};case`arc`:return{dashes:0,track:1,arc:1,sweep:t===void 0?lne:Math.min(1,Math.max(0,t)),disc:0,tick:0,cross:0};case`check`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:1,cross:0};case`cross`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:0,cross:1}}}var gm=7.25;function une({className:e,glyph:t,progress:n}){let r=`caps-status-mark-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(null),d=(0,I.useRef)(null),f=(0,I.useRef)(hm(t,n)).current,p=(0,I.useRef)(t),m=Hd();(0,I.useLayoutEffect)(()=>{let e=i.current,r=a.current,c=o.current,f=s.current,h=l.current,g=u.current,_=d.current;if(!e||!r||!c||!f||!h||!g||!_)return;let v=hm(t,n),y=p.current;p.current=t;let b=Fd(e),x=m||y===t&&t!==`arc`,S=x?m?{ease:b.ease,duration:b.fast}:dm:pm(b,{ease:`outQuad`,duration:160}),C=(t===`check`||t===`cross`)&&!x,w=pm(b,{ease:`inOutSine`,duration:220}),T=[Qp(r,{opacity:v.dashes,...S}),Qp(c,{opacity:v.track*.28,...S}),Qp(f,{opacity:v.arc,"stroke-dasharray":`${String(v.sweep)} 1`,...x?m?dm:S:w}),Qp(h,{r:v.disc*gm,...C?{delay:w.duration*.7,...fm(b,{bounce:.35,duration:360})}:m?dm:pm(b,{ease:`inCubic`,duration:140})}),Qp(g,{"stroke-dashoffset":1-v.tick,...C&&v.tick>0?{delay:w.duration*.7+b.fast,...pm(b,{ease:`outCubic`,duration:240})}:dm}),Qp(_,{"stroke-dashoffset":1-v.cross,...C&&v.cross>0?{delay:w.duration*.7+b.fast,...pm(b,{ease:`outCubic`,duration:240})}:dm})];return t===`cross`&&C&&b.shake>0&&T.push(Qp(e,{translateX:[0,-b.shake,b.shake,-b.shake/2,0],delay:w.duration+b.fast,...pm(b,{ease:`linear`,duration:300})})),()=>{for(let e of T)e.cancel()}},[t,n,m]);let h=t===`arc`&&n===void 0&&!m;return(0,I.useLayoutEffect)(()=>{if(!h||!c.current||!i.current)return;let e=Fd(i.current),t=Qp(c.current,{rotate:[0,360],...pm(e,{ease:`linear`,duration:900}),loop:!0}),n=om(i.current,e=>{e?t.resume():t.pause()});return()=>{n(),t.revert()}},[h]),(0,F.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,className:`caps-status-mark ${e??``}`,viewBox:`0 0 16 16`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{id:`${r}-surface`,transform:`matrix(1.6 0 0 1.6 8 8)`}),(0,F.jsxs)(`mask`,{id:`${r}-knock`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`16`,height:`16`,children:[(0,F.jsx)(`rect`,{width:`16`,height:`16`,fill:`var(--color-white)`}),(0,F.jsx)(`path`,{ref:u,d:`M4.9 8.3 7.1 10.5 11.2 5.9`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.tick}),(0,F.jsx)(`path`,{ref:d,d:`M5.4 5.4 10.6 10.6 M10.6 5.4 5.4 10.6`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.cross})]})]}),(0,F.jsx)(`circle`,{ref:a,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`1.7 2.2`,opacity:f.dashes}),(0,F.jsx)(`circle`,{ref:o,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,opacity:f.track*.28}),(0,F.jsx)(`g`,{ref:c,className:`caps-status-mark-spin`,children:(0,F.jsx)(`circle`,{ref:s,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`${String(f.sweep)} 1`,transform:`rotate(-90 8 8)`,opacity:f.arc})}),(0,F.jsx)(`circle`,{ref:l,cx:`8`,cy:`8`,r:f.disc*gm,fill:`url(#${r}-surface)`,mask:`url(#${r}-knock)`})]})}var dne=new Set([`ring`,`arc`,`check`,`cross`]);function fne(e){return dne.has(e)}var _m={neutral:`text-base-content`,primary:`text-primary`,secondary:`text-secondary`,accent:`text-accent`,success:`text-success`,info:`text-info`,warning:`text-warning`,error:`text-error`},vm=(0,I.forwardRef)(function({className:e,label:t,glyph:n=`dot`,motion:r=`none`,tone:i=`neutral`,size:a=`default`,appearance:o=`plain`,progress:s,...c},l){return(0,F.jsxs)(`span`,{...c,className:Dd(`caps-status`,a===`compact`&&`caps-status-compact`,o===`chip`&&`caps-status-chip`,e),"data-tone":o===`chip`?i:void 0,"data-glyph":n,"data-motion":r,ref:l,children:[fne(n)?(0,F.jsx)(une,{className:_m[i],glyph:n,progress:s}):(0,F.jsx)(cne,{className:_m[i],glyph:n,motion:r}),t===void 0?null:(0,F.jsx)(`span`,{children:t})]})}),pne=(0,I.createContext)(void 0),mne=(0,I.createContext)(null);function ym(e){let t=(0,I.useContext)(mne);return t===null?Object.hasOwn(globalThis,`document`)?document.body:null:t[e]}function hne(e){let t=(0,I.useContext)(pne),n=(0,I.useRef)(e);n.current=e,(0,I.useEffect)(()=>t?.(()=>{n.current()}),[t])}var bm=`(max-width: 600px)`,xm=globalThis;function gne(e){let t=xm.matchMedia?.(bm);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function _ne(){return(0,I.useSyncExternalStore)(gne,()=>xm.matchMedia?.(bm).matches??!1,()=>!1)}function vne({className:e,...t}){let n=ym(`toast`),r=_ne();return n?(0,gn.createPortal)((0,F.jsx)(Jn,{position:r?`top-center`:`top-right`,swipeDirections:r?[`top`]:[`right`,`top`],mobileOffset:{top:`max(8px, env(safe-area-inset-top))`,bottom:16,left:16,right:16},offset:16,gap:8,icons:{close:(0,F.jsx)(dr,{"aria-hidden":`true`,size:12}),success:(0,F.jsx)(vm,{glyph:`dot`,tone:`success`}),error:(0,F.jsx)(vm,{glyph:`dot`,tone:`error`}),warning:(0,F.jsx)(vm,{glyph:`dot`,tone:`warning`}),info:(0,F.jsx)(vm,{glyph:`dot`,tone:`info`}),loading:(0,F.jsx)(um,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`})},className:Dd(`caps-toaster`,e),...t}),n):null}var Sm=e=>e.length>0,Cm=`~effect/Option`,wm={[Cm]:{_A:e=>e},...St,[Symbol.iterator](){return new ct(this)}},yne=Object.defineProperty(Object.assign(Object.create(wm),{_tag:`Some`,_op:`Some`,[Ce](e){return Tm(e)&&Dm(e)&&we(this.value,e.value)},[ie](){return ce(ae(this._tag))(ae(this.value))},toString(){return`some(${Ke(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:rt(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),bne=ae(`None`),xne=Object.assign(Object.create(wm),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[Ce](e){return Tm(e)&&Em(e)},[ie](){return bne},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),Tm=e=>re(e,Cm),Em=e=>e._tag===`None`,Dm=e=>e._tag===`Some`,Sne=Object.create(xne),Om=function(e){this.value=e};Om.prototype=yne;var Cne=e=>new Om(e),km=`~effect/Result`,Am={[km]:{_A:e=>e,_E:e=>e},...St,[Symbol.iterator](){return new ct(this)}},wne=Object.assign(Object.create(Am),{_tag:`Success`,_op:`Success`,[Ce](e){return jm(e)&&Ene(e)&&we(this.success,e.success)},[ie](){return ce(ae(this._tag))(ae(this.success))},toString(){return`success(${Ke(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:rt(this.success)}}}),Tne=Object.assign(Object.create(Am),{_tag:`Failure`,_op:`Failure`,[Ce](e){return jm(e)&&Mm(e)&&we(this.failure,e.failure)},[ie](){return ce(ae(this._tag))(ae(this.failure))},toString(){return`failure(${Ke(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:rt(this.failure)}}}),jm=e=>re(e,km),Mm=e=>e._tag===`Failure`,Ene=e=>e._tag===`Success`,Nm=function(e){this.failure=e};Nm.prototype=Tne;var Dne=e=>new Nm(e),Pm=function(e){this.success=e};Pm.prototype=wne;var One=e=>new Pm(e);function Fm(e){return(t,n)=>t===n?0:e(t,n)}var kne=Fm((e,t)=>e<t?-1:1),Im=Fm((e,t)=>globalThis.Number.isNaN(e)&&globalThis.Number.isNaN(t)?0:globalThis.Number.isNaN(e)?-1:globalThis.Number.isNaN(t)?1:e<t?-1:1),Ane=e=>f(2,(t,n)=>e(t,n)===-1),Lm=e=>f(2,(t,n)=>e(t,n)===1),jne=e=>f(2,(t,n)=>e(t,n)!==1),Rm=e=>f(2,(t,n)=>e(t,n)!==-1),zm=()=>Sne,Bm=Cne,Vm=Em,Hm=Dm,Mne=f(2,(e,{onNone:t,onSome:n})=>Vm(e)?t():n(e.value)),Um=f(2,(e,t)=>Vm(e)?t():e.value),Wm=f(2,(e,t)=>Vm(e)?t():e),Gm=Um(g),Km=Um(_),Nne=f(2,(e,t)=>Vm(e)?zm():Bm(t(e.value))),qm=One,Jm=Dne,Ym=Mm,Pne=f(2,(e,t)=>Ym(e)?Jm(t(e.failure)):e),Xm=f(2,(e,{onFailure:t,onSuccess:n})=>Ym(e)?t(e.failure):n(e.success)),Fne=globalThis.Array,Zm=f(2,(e,t)=>[...e,t]);Fne.isArray;var Ine=Sm,Lne=Sm,Qm=()=>[],Rne=f(2,(e,t)=>e.map(t)),$m=`~effect/BigDecimal`,zne={[$m]:$m,[ie](){let e=nh(this);return ce(fe(String(e.value)),de(e.scale))},[Ce](e){return Bne(e)&&qne(this,e)===0},toString(){return`BigDecimal(${Jne(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[nt](){return this.toJSON()},pipe(){return l(this,arguments)}},Bne=e=>re(e,$m),Vne=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(zne);return n.value=e,n.scale=t,n},eh=(e,t)=>{let n=Vne(e,t);return n.normalized=n,n},th=BigInt(0),Hne=BigInt(1),Une=BigInt(10),Wne=eh(th,0),nh=e=>{if(e.normalized===void 0){if(e.value===th)e.normalized=Wne;else{let t=`${e.value}`,n=t.length;for(;t[n-1]===`0`;)n--;e.normalized=eh(BigInt(t.slice(0,n)),e.scale-(t.length-n))}}return e.normalized},Gne=100,Kne=[Hne],rh=(e,t)=>e===t?0:e<t?-1:1,ih=(e,t)=>{let n=`${e.value<th?-e.value:e.value}`,r=`${t.value<th?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==th)return i<th?-1:1;let a=Math.max(n.length,r.length);return kne(n.padEnd(a,`0`),r.padEnd(a,`0`))},qne=(e,t)=>{if(e.scale===t.scale)return rh(e.value,t.value);let n=ah(e),r=ah(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>Gne)return n===-1?ih(t,e):ih(e,t);let o=Kne[a]??=Une**BigInt(a);return i>0?rh(e.value,t.value*o):rh(e.value*o,t.value)},ah=e=>e.value===th?0:e.value<th?-1:1,Jne=e=>{let t=nh(e);if(Math.abs(t.scale)>=16)return Yne(t);let n=t.value<th,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},Yne=e=>{if(Xne(e))return`0e+0`;let t=nh(e),n=`${t.value}`,r=t.value<th?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},Xne=e=>e.value===th,Zne=e=>Wt({op:e.label,[_t]:e.evaluate}),oh=`~effect/Context/Service`,sh=function(){function e(){}let t=e;Object.setPrototypeOf(t,Qne);let n=(e,n)=>(t.key=e,n?.defaultValue&&(t[lh]=lh,t.defaultValue=n.defaultValue),n?.make&&(t.make=n.make),n?.fiberCached&&ch.add(e),t);return arguments.length>0?n(arguments[0],arguments[1]):n},Qne={[oh]:oh,...Zne({label:`Service`,evaluate(e){return qt(bh(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key}},of(e){return e},context(e){return vh(this,e)},use(e){return $t(t=>e(bh(t.context,this)))},useSync(e){return $t(t=>qt(e(bh(t.context,this))))}},ch=new Set,lh=`~effect/Context/Reference`,uh=`~effect/Context`,$ne=8,ere=8,dh=(e,t,n,r)=>{let i=Object.create(tre);return i.cacheRoot=e??i,i.base=t,i.overlay=n,i.depth=r,i._flat=void 0,i.baseHits=0,i},fh=(e,t)=>{t&&(fh(e,t.parent),e.set(t.key,t.value))},ph=e=>{if(e._flat)return e._flat;if(!e.overlay)return e._flat=e.base;let t=new Map(e.base);return fh(t,e.overlay),e._flat=t},mh=Symbol(),hh=(e,t)=>{let n=e;for(let e=n.overlay;e;e=e.parent)if(e.key===t)return e.value;let r=n.base.get(t);return r===void 0&&!n.base.has(t)?mh:(n.overlay&&++n.baseHits>=n.base.size&&n.baseHits>=ere&&(n.base=ph(n),n.overlay=void 0,n.depth=0),r)},gh=e=>dh(void 0,e,void 0,0),tre={get mapUnsafe(){return ph(this)},...St,[uh]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[Ce](e){if(!rre(e))return!1;let t=this.mapUnsafe,n=e.mapUnsafe;if(t.size!==n.size)return!1;for(let[e,r]of t)if(!n.has(e)||!we(r,n.get(e)))return!1;return!0},[ie](){return de(this.mapUnsafe.size)}},nre=(e,t)=>e.cacheRoot===t.cacheRoot,rre=e=>re(e,uh),ire=e=>!!e[lh],_h=()=>are,are=gh(new Map),vh=(e,t)=>gh(new Map([[e.key,t]])),ore=f(3,(e,t,n)=>sre(e,t.key,n)),sre=(e,t,n)=>{let r=e,i=ch.has(t)?void 0:r.cacheRoot;if(r.depth>=$ne){let e=new Map(r.mapUnsafe);return e.set(t,n),dh(i,e,void 0,0)}return dh(i,r.base,{key:t,value:n,parent:r.overlay},r.depth+1)},yh=(e,t)=>{let n=hh(e,t);return n===mh?void 0:n},bh=f(2,(e,t)=>{let n=hh(e,t.key);if(n===mh){if(ire(t))return cre(t);throw lre(t)}return n}),xh=`~effect/Context/defaultValue`,cre=e=>xh in e?e[xh]:e[xh]=e.defaultValue(),lre=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(t.stack){let e=t.stack.split(`
|
|
74
74
|
`);e.splice(1,3),t.stack=e.join(`
|
|
75
75
|
`)}return t},Sh=sh,Ch=`~effect/Duration`,wh=BigInt(0),Th=BigInt(1),ure=BigInt(2),dre=BigInt(10),fre=BigInt(1e3),Eh=e=>BigInt(e<0?Math.ceil(e-.5):Math.floor(e+.5)),Dh=e=>Eh(e*1e6),Oh=(e,t)=>{let n=e.indexOf(`.`);if(n===-1)return BigInt(e)*t;let r=e[0]===`-`,i=e.slice(n+1),a=dre**BigInt(i.length),o=(BigInt(e.slice(+!!r,n))*a+BigInt(i))*t,s=o/a+(o%a*ure>=a?Th:wh);return r?-s:s},pre=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,mre=e=>{switch(typeof e){case`number`:return Fh(e);case`bigint`:return Ph(e);case`string`:{if(e===`Infinity`)return Mh;if(e===`-Infinity`)return Nh;let t=pre.exec(e);if(!t)break;let[n,r,i]=t;if(i===`nano`||i===`nanos`)return Ph(Oh(r,Th));if(i===`micro`||i===`micros`)return Ph(Oh(r,fre));let a=Number(r);switch(i){case`milli`:case`millis`:return Fh(a);case`second`:case`seconds`:return bre(a);case`minute`:case`minutes`:return xre(a);case`hour`:case`hours`:return Sre(a);case`day`:case`days`:return Cre(a);case`week`:case`weeks`:return wre(a)}break}case`object`:{if(e===null)break;if(Ch in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(O)?kh(e):Number.isNaN(e[0])||Number.isNaN(e[1])?yre:e[0]===-1/0||e[1]===-1/0?Nh:e[0]===1/0||e[1]===1/0?Mh:jh(Eh(e[0]*1e9+e[1]));let t=e,n=0;return t.weeks&&(n+=t.weeks*6048e5),t.days&&(n+=t.days*864e5),t.hours&&(n+=t.hours*36e5),t.minutes&&(n+=t.minutes*6e4),t.seconds&&(n+=t.seconds*1e3),t.milliseconds&&(n+=t.milliseconds),!t.microseconds&&!t.nanoseconds?jh(n):jh(Eh(n*1e6+(t.microseconds??0)*1e3+(t.nanoseconds??0)))}}return kh(e)},kh=e=>{throw Error(`Invalid Input: ${e}`)},Ah={_tag:`Millis`,millis:0},hre={_tag:`Infinity`},gre={_tag:`NegativeInfinity`},_re={[Ch]:Ch,[ie](){switch(this.value._tag){case`Millis`:{let e=this.value.millis*1e6;return Number.isFinite(e)?ae(Eh(e)):de(this.value.millis)}case`Nanos`:return ae(this.value.nanos);default:return me(this.value)}},[Ce](e){return vre(e)&&Dre(this,e)},toString(){switch(this.value._tag){case`Infinity`:return`Infinity`;case`NegativeInfinity`:return`-Infinity`;case`Nanos`:return`${this.value.nanos} nanos`;case`Millis`:return`${this.value.millis} millis`}},toJSON(){switch(this.value._tag){case`Millis`:return{_id:`Duration`,_tag:`Millis`,millis:this.value.millis};case`Nanos`:return{_id:`Duration`,_tag:`Nanos`,nanos:String(this.value.nanos)};case`Infinity`:return{_id:`Duration`,_tag:`Infinity`};case`NegativeInfinity`:return{_id:`Duration`,_tag:`NegativeInfinity`}}},[nt](){return this.toJSON()},pipe(){return l(this,arguments)}},jh=e=>{let t=Object.create(_re);return t.value=typeof e==`number`?isNaN(e)||e===0||Object.is(e,-0)?Ah:Number.isFinite(e)?Number.isInteger(e)?{_tag:`Millis`,millis:e}:{_tag:`Nanos`,nanos:Dh(e)}:e>0?hre:gre:e===wh?Ah:{_tag:`Nanos`,nanos:e},t},vre=e=>re(e,Ch),yre=jh(0),Mh=jh(1/0),Nh=jh(-1/0),Ph=e=>jh(e),Fh=e=>jh(e),bre=e=>jh(e*1e3),xre=e=>jh(e*6e4),Sre=e=>jh(e*36e5),Cre=e=>jh(e*864e5),wre=e=>jh(e*6048e5),Ih=e=>{let t=mre(e);switch(t.value._tag){case`Infinity`:case`NegativeInfinity`:throw Error(`Cannot convert infinite duration to nanos`);case`Nanos`:return t.value.nanos;case`Millis`:return Dh(t.value.millis)}},Tre=f(3,(e,t,n)=>e.value._tag===`Infinity`||e.value._tag===`NegativeInfinity`||t.value._tag===`Infinity`||t.value._tag===`NegativeInfinity`?n.onInfinity(e,t):e.value._tag===`Millis`?t.value._tag===`Millis`?n.onMillis(e.value.millis,t.value.millis):n.onNanos(Ih(e),t.value.nanos):n.onNanos(e.value.nanos,Ih(t))),Ere=(e,t)=>Tre(e,t,{onMillis:(e,t)=>e===t,onNanos:(e,t)=>e===t,onInfinity:(e,t)=>e.value._tag===t.value._tag}),Dre=f(2,(e,t)=>Ere(e,t)),Lh=Sh(`effect/Scheduler`,{fiberCached:!0,defaultValue:()=>new Bh}),Rh=e=>{let t=!1;return Promise.resolve().then(()=>{t||e()}),()=>{t=!0}},Ore=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},zh=e=>{try{return Ore(e)}catch{return Rh(e)}},kre=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},Bh=class{executionMode;setImmediate;constructor(e=`async`,t){this.executionMode=e,this.setImmediate=t??(e===`sync`?Rh:zh)}shouldYield(e){return e.currentOpCount>=e.cache.maxOpsBeforeYield}makeDispatcher(){return new Are(this.setImmediate)}},Are=class{tasks=new kre;running=void 0;setImmediate;constructor(e=zh){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},jre=Sh(`effect/Scheduler/MaxOpsBeforeYield`,{fiberCached:!0,defaultValue:()=>2048}),Mre=Sh(`effect/Scheduler/PreventSchedulerYield`,{fiberCached:!0,defaultValue:()=>!1}),Vh=nn,Hh=`~effect/encoding/EncodingError`,Uh=class extends Vh(`EncodingError`){[Hh]=Hh},Wh=`effect/Tracer/ParentSpan`;sh()(Wh,{fiberCached:!0});var Gh=`effect/Tracer`,Kh=`effect/Metric/FiberRuntimeMetrics`,qh=Sh(`effect/References/CurrentStackFrame`,{fiberCached:!0,defaultValue:_}),Jh=Sh(`effect/References/TracerEnabled`,{fiberCached:!0,defaultValue:h}),Yh=Sh(`effect/References/CurrentLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),Xh=Sh(`effect/References/MinimumLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),Zh=class extends At{constructor(e,t=jt){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[Ce](e){return Ht(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[ie](){return ce(fe(`${this._tag}:${this.fiberId}`))(oe(this.annotations))}},Qh=e=>new Ot([new Zh(e)]),$h=e=>{for(let t=0;t<e.reasons.length;t++){let n=e.reasons[t];if(n._tag===`Fail`)return qm(n.error)}return Jm(e)},eg=e=>e.reasons.some(Ht),tg=f(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>Bt(e)?(n=!0,new Mt(t(e.error),e.annotations)):e);return n?Nt(r):e}),ng=(e,t)=>{let n=[],r=[];if(e.reasons.length===0)return n;let i=ot();i!==0&&st(1);try{for(let i of e.reasons){if(i._tag===`Interrupt`){r.push(i);continue}n.push(rg(i._tag===`Die`?i.defect:i.error,i.annotations,t))}if(n.length===0){let e=Error(`The fiber was interrupted by:`);e.name=`InterruptCause`,e.stack=Fre(e,r);let i=new globalThis.Error(`All fibers interrupted without error`,{cause:e});i.name=`InterruptError`,i.stack=`${i.name}: ${i.message}`,n.push(rg(i,r[0].annotations,t))}}finally{i!==0&&st(i)}return n},rg=(e,t,n)=>{let r=typeof e,i;if(e&&r===`object`){if(i=new globalThis.Error(ig(e),{cause:e.cause?rg(e.cause):void 0}),typeof e.name==`string`&&(i.name=e.name),typeof e.stack==`string`)i.stack=Pre(e.stack,i,t);else{let e=`${i.name}: ${i.message}`;i.stack=t?ag(e,t):e}n?.includeCauseInStack&&(i.stack=sg(i));for(let t of Object.keys(e))t in i||(i[t]=e[t])}else{i=new globalThis.Error(e?r===`string`?e:$e(e):`Unknown error: ${e}`);let n=`${i.name}: ${i.message}`;i.stack=t?ag(n,t):n}return i},ig=e=>{if(typeof e.message==`string`)return e.message;if(typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString)try{return e.toString()}catch{}return $e(e)},Nre=/\((.*)\)/g,Pre=(e,t,n)=>{let r=`${t.name}: ${t.message}`,i=(e.startsWith(r)?e.slice(r.length):e).split(`
|
|
76
76
|
`),a=[r];for(let e=1;e<i.length&&!/Generator\.next|~effect\/(?:Effect|Utils)/.test(i[e]);e++)a.push(i[e]);return n?ag(a.join(`
|
|
@@ -92,7 +92,7 @@ Example:
|
|
|
92
92
|
For tests, pass a Ghostty instance directly:
|
|
93
93
|
import { Ghostty, Terminal } from "ghostty-web";
|
|
94
94
|
const ghostty = await Ghostty.load();
|
|
95
|
-
const term = new Terminal({ ghostty });`)}var qE;function JE(){return qE??=epe.load().catch(e=>{throw qE=void 0,e}),qE}var ype=[``,`bold `,`italic `,`bold italic `];async function YE(e,t){await Promise.all(ype.map(n=>document.fonts.load(`${n}${String(e)}px ${t}`)))}var XE=`disabled:bg-base-200 disabled:text-base-content disabled:outline-1 disabled:outline-solid disabled:outline-base-content/25 aria-disabled:bg-base-200 aria-disabled:text-base-content aria-disabled:outline-1 aria-disabled:outline-solid aria-disabled:outline-base-content/25`,bpe=see(`btn caps-button disabled:pointer-events-none`,{variants:{variant:{primary:`btn-primary caps-button-filled`,secondary:`btn-secondary caps-button-filled`,accent:`btn-accent caps-button-filled`,destructive:`btn-error caps-button-filled`,outline:`btn-outline ${XE}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${XE}`},size:{xs:`btn-xs`,sm:`btn-sm`,default:`btn-md`,lg:`btn-lg`,icon:`btn-square btn-md`,menubar:`caps-button-menubar`}},defaultVariants:{variant:`primary`,size:`default`}}),ZE=(0,I.forwardRef)(function({asChild:e=!1,children:t,className:n,disabled:r,loading:i=!1,result:a,resultLabel:o,onResultEnd:s,size:c=`default`,variant:l=`primary`,...u},d){let f=Dd(bpe({size:c,variant:l}),n),p=(0,I.useRef)(a).current,m=(0,I.useRef)(null);return(0,I.useImperativeHandle)(d,()=>m.current),xpe(m,i,a),e?(0,F.jsx)(kd,{...u,"aria-busy":i?!0:u[`aria-busy`],"aria-disabled":r===!0||i?!0:void 0,className:f,ref:m,children:t}):(0,F.jsx)(`button`,{...u,"aria-busy":i?!0:u[`aria-busy`],className:f,disabled:r===!0||i,ref:m,type:u.type??`button`,children:a===void 0&&o===void 0?(0,F.jsxs)(F.Fragment,{children:[i?(0,F.jsx)(um,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,F.jsx)(Tpe,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function xpe(e,t,n){let r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=(0,I.useRef)(null);(0,I.useLayoutEffect)(()=>{let o=e.current;if(!o)return;let s=JSON.stringify([t,n??null,o.textContent]),c=s!==i.current;i.current=s;let l=a.current;if(!c&&l)return;let u=l?o.offsetWidth:r.current;l&&(a.current=null,l.cancel(),o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`));let d=o.offsetWidth;if(r.current=d>0?d:null,!c||u===null||d===0||Math.abs(u-d)<1||!Bd(o))return;let f=Fd(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:zd(f,f.ease)});a.current=p,o.style.overflow=`clip`,o.style.whiteSpace=`nowrap`;let m=()=>{a.current===p&&(a.current=null,o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`))};p.onfinish=m,p.oncancel=m})}var Spe=1100;function Cpe(e,t){let n=t.bounce/.3,r=1+.05*Math.min(1.4,.4+n),i=1-.02*Math.min(1.4,n);return e.animate([{transform:`scale(1)`},{transform:`scale(${String(r)})`,offset:.35},{transform:`scale(${String(i)})`,offset:.7},{transform:`scale(1)`}],{duration:t.springDuration,easing:zd(t,`ease-out`)})}function wpe(e,t){let n=t.shake;return e.animate([{transform:`none`},{transform:`translateX(${String(-n)}px)`},{transform:`translateX(${String(n)}px)`},{transform:`translateX(${String(-n*.6)}px)`},{transform:`translateX(${String(n*.3)}px)`},{transform:`none`}],{duration:t.slow*1.3,easing:zd(t,`linear`)})}function QE(e,t,n){let r=n.distance+2,i=`blur(${String(n.blur)}px)`;return[e.animate([{opacity:1,transform:`none`,filter:`blur(0px)`},{opacity:0,transform:`translateY(${String(-r)}px)`,filter:i}],{duration:n.fast,easing:zd(n,n.ease)}),t.animate([{opacity:0,transform:`translateY(${String(r)}px)`,filter:i},{opacity:1,transform:`none`,filter:`blur(0px)`}],{duration:n.normal,easing:zd(n,n.ease),fill:`backwards`})]}function Tpe({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,I.useRef)(null),s=Hd(),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1);c&&!u&&d(!0);let f=(0,I.useRef)(a),p=(0,I.useRef)(r);(0,I.useEffect)(()=>{p.current=r},[r]),(0,I.useLayoutEffect)(()=>{let e=f.current;if(f.current=i,i===e)return;if(i===`done`){l(!0);let e=setTimeout(()=>{p.current?p.current():l(!1)},Spe);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!Bd(t))return;let n=Fd(t);if(n.shake<=0)return;let r=wpe(t,n);return()=>{r.cancel()}},[i,s]);let m=(0,I.useRef)(c);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||m.current===c)return;m.current=c;let t=e.querySelector(`[data-face="label"]`),n=e.querySelector(`[data-face="result"]`);if(!t||!n||!Bd(e)){c||d(!1);return}let r=Fd(e),i=c?QE(t,n,r):QE(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(Cpe(e.closest(`button`)??e,r));let t=n.querySelector(`path`);t&&i.push(t.animate([{strokeDashoffset:1},{strokeDashoffset:0}],{duration:r.normal*1.4,delay:r.fast/2,easing:zd(r,r.ease),fill:`backwards`}))}return()=>{for(let e of i)e.cancel()}},[c,s]),(0,F.jsxs)(`span`,{ref:o,className:`caps-button-faces`,"data-showing":c?`result`:`label`,children:[(0,F.jsxs)(`span`,{className:`caps-button-face`,"data-face":`label`,"aria-hidden":c?!0:void 0,children:[n||c?(0,F.jsx)(um,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,e]}),u?(0,F.jsxs)(`span`,{className:`caps-button-face`,"data-face":`result`,"aria-hidden":!c||void 0,children:[(0,F.jsx)(`svg`,{className:`caps-button-check`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,F.jsx)(`path`,{d:`M4.5 12.5 9.5 17.5 19.5 6.5`,pathLength:1})}),t===void 0?e:t]}):null]})}var $E=new Map([[`0`,[`###`,`#.#`,`#.#`,`#.#`,`###`]],[`1`,[`.#.`,`##.`,`.#.`,`.#.`,`###`]],[`2`,[`###`,`..#`,`###`,`#..`,`###`]],[`3`,[`###`,`..#`,`.##`,`..#`,`###`]],[`4`,[`#.#`,`#.#`,`###`,`..#`,`..#`]],[`5`,[`###`,`#..`,`###`,`..#`,`###`]],[`6`,[`###`,`#..`,`###`,`#.#`,`###`]],[`7`,[`###`,`..#`,`.#.`,`.#.`,`.#.`]],[`8`,[`###`,`#.#`,`###`,`#.#`,`###`]],[`9`,[`###`,`#.#`,`###`,`..#`,`###`]],[`:`,[`.`,`#`,`.`,`#`,`.`]],[`.`,[`.`,`.`,`.`,`.`,`#`]],[`+`,[`...`,`.#.`,`###`,`.#.`,`...`]],[`-`,[`...`,`...`,`###`,`...`,`...`]],[`/`,[`..#`,`..#`,`.#.`,`#..`,`#..`]],[`×`,[`...`,`#.#`,`.#.`,`#.#`,`...`]],[`%`,[`#.#`,`..#`,`.#.`,`#..`,`#.#`]],[` `,[`.`,`.`,`.`,`.`,`.`]]]),Epe=[`.`,`.`,`.`,`.`,`.`],Dpe=Object.freeze([...$E.keys()]);function Ope(e,t=0,n=!1){if(!Number.isFinite(e))throw RangeError(`PixelNumber needs a finite number`);let r=String(Math.trunc(Math.abs(e))).padStart(t,`0`),i=String(Math.abs(e)).split(`.`)[1];return eD(`${e<0?`-`:n&&e>0?`+`:``}${r}${i?`.${i}`:``}`)}function eD(e){for(let t of e)if(!$E.has(t))throw RangeError(`PixelNumber cannot draw "${t}"; use digits and ${Dpe.filter(e=>!/\d/.test(e)).join(` `)}`);return e}function kpe(e,t){let n=new Set,r=t;for(let i of e){let e=$E.get(i)??Epe;e.forEach((e,i)=>{for(let a=0;a<e.length;a++)e.charAt(a)===`#`&&n.add(`${String(r+a)},${String(i+t)}`)}),r+=(e.at(0)?.length??1)+1}return{lit:n,width:Math.max(1,r-1-t)+t*2}}function Ape(e){let t=new Set;for(let n of e){let[r=0,i=0]=n.split(`,`).map(Number);for(let n=-1;n<=1;n++)for(let a=-1;a<=1;a++){let o=`${String(r+a)},${String(i+n)}`;e.has(o)||t.add(o)}}return t}function tD(e,t,n){let r=[];for(let i=0;i<n;i++){let n=-1;for(let a=0;a<=t;a++){let t=e.has(`${String(a)},${String(i)}`);t&&n<0&&(n=a),!t&&n>=0&&(r.push([n,i,a-n]),n=-1)}}return r}function nD({runs:e,className:t}){return(0,F.jsx)(`g`,{className:t,children:e.map(([e,t,n])=>(0,F.jsx)(`rect`,{x:e,y:t,width:n,height:1},`${String(e)}-${String(t)}`))})}var jpe=(0,I.forwardRef)(function({value:e,text:t,pad:n,signed:r,size:i=`md`,tone:a=`current`,outline:o=!1,className:s,...c},l){if(t===void 0&&e===void 0)throw TypeError(`PixelNumber needs a value or text`);let u=t===void 0?Ope(e??NaN,n,r):eD(t),d=+!!o,{lit:f,width:p}=kpe(u,d),m=5+d*2,h=Mpe[i];return(0,F.jsxs)(`span`,{...c,ref:l,className:Dd(`caps-pixel-number`,s),"data-size":i,"data-tone":a,"data-outline":o,children:[(0,F.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,viewBox:`0 0 ${String(p)} ${String(m)}`,width:p*h,height:m*h,children:[o?(0,F.jsx)(nD,{className:`caps-pixel-number-outline`,runs:tD(Ape(f),p,m)}):null,(0,F.jsx)(nD,{className:`caps-pixel-number-face`,runs:tD(f,p,m)})]}),(0,F.jsx)(`span`,{className:`sr-only`,children:u})]})}),Mpe={sm:2,md:3,lg:4,xl:6};function rD({icon:e,caption:t}){return(0,F.jsxs)(`span`,{className:`caps-icon-choice-mark`,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{className:`caps-icon-choice-art`,children:e}),t?(0,F.jsx)(`span`,{className:`caps-icon-choice-caption`,children:t}):null,(0,F.jsx)(`span`,{className:`caps-icon-choice-lamp`})]})}var Npe=(0,I.forwardRef)(function({label:e,icon:t,caption:n,on:r,stateLabels:i=[`on`,`off`],className:a,...o},s){return(0,F.jsxs)(`span`,{...o,className:Dd(`caps-icon-lamp`,a),"data-on":r,ref:s,children:[(0,F.jsx)(rD,{icon:t,caption:n}),(0,F.jsxs)(`span`,{className:`sr-only`,children:[e,`: `,r?i[0]:i[1]]})]})}),Ppe=(0,I.forwardRef)(function({items:e,stateLabels:t,className:n,...r},i){return(0,F.jsx)(`ul`,{...r,className:Dd(`caps-icon-lamps`,n),ref:i,children:e.map(({id:e,...n})=>(0,F.jsx)(`li`,{children:(0,F.jsx)(Npe,{...n,...t===void 0?{}:{stateLabels:t}})},e))})}),Fpe=(0,I.forwardRef)(function({className:e,size:t=`md`,depth:n=`shallow`,placement:r=`standalone`,...i},a){return(0,F.jsx)(`div`,{...i,ref:a,"data-surface-size":t,"data-surface-depth":n,"data-surface-placement":r,className:Dd(`caps-surface`,e)})}),iD=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`div`,{...t,ref:n,className:Dd(`caps-screen`,e)})}),Ipe=(0,I.forwardRef)(function({children:e,className:t,depth:n=`deep`,fit:r=`content`,density:i=`normal`,...a},o){let s=r===`fill`;return(0,F.jsx)(Fpe,{...a,className:Dd(t,s&&`flex min-h-0 flex-1`),depth:n,ref:o,children:(0,F.jsx)(`div`,{className:Dd(`caps-display-gasket`,s&&`flex min-h-0 min-w-0 flex-1`),"data-display-density":i,children:(0,F.jsx)(iD,{className:Dd(s&&`flex min-h-0 min-w-0 flex-1 overflow-hidden`),children:e})})})}),Lpe=(0,I.forwardRef)(function({className:e,icon:t,status:n,title:r,...i},a){return(0,F.jsxs)(`header`,{...i,className:Dd(`caps-screen-header`,e),ref:a,children:[t?(0,F.jsx)(`span`,{className:`caps-screen-header-icon`,"aria-hidden":`true`,children:t}):null,(0,F.jsx)(`span`,{className:`caps-screen-header-title`,children:r}),n?(0,F.jsx)(`span`,{className:`caps-screen-header-status`,children:n}):null]})}),Rpe=(0,I.forwardRef)(function({appearance:e,className:t,...n},r){return(0,F.jsx)(`div`,{...n,className:Dd(`caps-screen-cells`,t),"data-appearance":e===`compact`?e:void 0,ref:r})}),aD=(0,I.forwardRef)(function({children:e,className:t,legend:n,readout:r,icon:i,appearance:a,wide:o=!1,...s},c){return(0,F.jsxs)(`div`,{...s,className:Dd(`caps-screen-cell`,t),"data-wide":o||void 0,"data-appearance":a===`compact`?a:void 0,ref:c,children:[i?(0,F.jsx)(`span`,{className:`caps-screen-cell-icon`,children:i}):null,n?(0,F.jsx)(`span`,{className:`caps-screen-cell-legend`,children:n}):null,r?(0,F.jsx)(`span`,{className:`caps-screen-cell-readout`,children:r}):null,a===`compact`?(0,F.jsx)(`div`,{className:`caps-screen-cell-controls`,children:e}):e]})}),oD={coral:`var(--stipe-art-coral, #ff6558)`,blue:`var(--stipe-art-blue, #43a6f2)`,mint:`var(--stipe-art-mint, #63cfaa)`,grape:`var(--stipe-art-grape, #a66cc1)`,yellow:`var(--stipe-art-yellow, #ffd05d)`,cream:`var(--stipe-art-cream, #fff4de)`,ink:`var(--stipe-art-ink, #242c28)`,graphite:`var(--stipe-art-graphite, #49423f)`,inkcap:`var(--stipe-art-inkcap, #80499d)`},sD=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,zpe=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function cD({transform:e,fill:t=sD}){return(0,F.jsx)(`path`,{transform:e,style:{fill:t},d:`M-1.264-9.479C-2.098-8.643-1.802-1.057-.907-.332.47.782 1.6-.446 1.618-3.075 1.623-3.888 1.691-5.398 1.77-6.429 1.979-9.202 1.596-10 .055-10-.588-10-.843-9.9-1.264-9.479Z`})}function Bpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(cD,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,F.jsx)(cD,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,F.jsx)(cD,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function Vpe(){return(0,F.jsxs)(`g`,{style:{fill:oD.blue},children:[(0,F.jsx)(`path`,{d:`M10.574 .604C9.804 1.375 9.867-.885 9.961 22.81 10.054 47.202 9.722 45.378 14.193 45.94 25.813 47.399 38.465 52.211 44.662 57.532 47.653 60.097 48.082 59.411 47.967 52.242L47.734 19.335C47.734 17.523 47.13 16.616 45.964 15.076 40.604 8.018 30.127 2.767 16.804 .462 13.045-.184 11.326-.148 10.574 .604Z`}),(0,F.jsx)(`path`,{d:`M81.571 .746C71.063 2.665 62.221 6.713 56.562 12.199 54.242 14.45 52 17.356 52.115 19.335L52.033 52.628C51.927 59.934 51.979 59.994 55.74 57.091 62.423 51.931 71.272 48.541 84.103 46.221 90.625 45.039 89.967 47.631 90.145 22.432 90.326-3.079 91.148-1 81.571 .746Z`}),(0,F.jsx)(`path`,{d:`M1.906 12.692C.1 13.42 .151 12.804 .151 33.825 .151 54.097 .163 54.302 1.447 55.498 2.71 56.674 3.384 56.81 7.937 56.816 20.943 56.834 30.647 58.293 38.776 61.45 45.964 64.242 46.435 61.924 39.526 57.773 32.296 53.429 26.656 51.544 14.943 49.553 5.958 48.027 6.535 49.414 6.408 29.003 6.32 14.74 6.263 13.103 5.816 12.764 5.254 12.335 2.9 12.293 1.906 12.692Z`}),(0,F.jsx)(`path`,{d:`M94.326 12.858C93.656 13.326 93.656 13.326 93.653 28.492 93.653 48.882 93.997 48.063 84.743 49.556 73.574 51.36 64.45 54.695 57.801 59.405 54.082 62.039 55.384 63.864 59.722 62.1 68.897 58.372 76.363 57.115 90.03 56.994 100.405 56.903 99.489 58.976 99.773 34.976 100.018 14.142 100.006 13.958 98.399 12.979 97.236 12.269 95.251 12.208 94.326 12.858Z`})]})}function lD(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M-8.572-25.123C-21.412-23.39-33.235-17.39-44.235-7.027-51.235-.433-51.251 .358-44.524 6.749-20.77 29.316 10.23 31.893 36.364 13.487 41.043 10.187 48.193 3.551 49.235 1.524 50.358-.642 49.471-2.102 43.738-7.497 29.257-21.128 9.968-27.631-8.572-25.123Z`}),(0,F.jsx)(`path`,{style:{fill:oD.ink},d:`M-6.225-16.807C-17.727-13.267-21.176 4.433-12.08 13.257-1.118 23.898 16.829 16.102 17.032 .604 17.209-12.412 6.219-20.642-6.225-16.807Z`})]})}function Hpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{style:{fill:oD.mint},d:`M540 342C520 340 497 355 477 374C450 399 440 421 456 444C465 458 480 462 492 464C503 466 500 477 494 486C487 500 508 496 522 478L530 468C557 468 578 464 591 451C601 442 599 429 585 427C572 425 556 432 547 418C538 403 550 390 568 385C579 382 589 380 584 368C576 352 557 341 540 342Z`}),(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M589 396C614 380 659 381 683 392C709 404 721 428 710 451C704 464 693 472 685 479C680 487 684 498 689 503C695 514 684 513 675 507C667 502 662 497 657 491C637 496 610 495 594 486C584 480 583 469 595 464C607 460 622 454 622 441C622 428 612 423 597 420C580 417 578 407 589 396Z`})]})}function uD({fill:e}){return(0,F.jsx)(`path`,{style:{fill:e},d:`M44.648 .288C26.645 1.615 13.263 8.266 5.942 19.529-4.299 35.277-.917 57.684 13.224 67.784 16.958 70.452 16.936 71.742 13.064 77.665 11.28 80.391 10.895 81.565 11.341 82.914 13.163 88.435 25.022 86.396 36.307 78.62L38.681 76.986 41.294 77.335C45.371 77.878 59.645 77.789 64.125 77.191 89.213 73.837 100.562 61.427 99.92 38.044 99.18 11.1 79.587-2.285 44.648 .288Z`})}function dD({onFigure:e=!1}){return(0,F.jsxs)(`g`,{style:{fill:e?zpe:oD.ink},children:[(0,F.jsx)(`rect`,{x:`-15`,y:`-11`,width:`10`,height:`22`,rx:`5`}),(0,F.jsx)(`rect`,{x:`5`,y:`-11`,width:`10`,height:`22`,rx:`5`})]})}function Upe(){return(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M18.125 .621C.039 1.574-2.575 4.791 2.264 20.133 17.454 68.284 77.345 69.396 96.119 21.875 100.749 10.154 100.318 4.348 94.605 1.513 91.981 .21 37.878-.421 18.125 .621Z`})}function Wpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M31.42 5.279C29.108 5.983 28.068 6.993 25.817 10.732 24.033 13.687 24.027 13.762 25.58 14.265 30.375 15.821 36.711 20.506 39.938 24.885 42.077 27.788 41.835 27.806 45.281 24.463 48.633 21.213 49.164 20.185 48.982 17.325 48.812 14.643 48.174 13.872 42.68 9.741 36.737 5.273 34.439 4.361 31.42 5.279Z`}),(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M22.538 16.207C22.093 16.652 19.732 20.231 13.309 30.196 10.737 34.188 10.723 33.911 13.589 35.351 16.461 36.798 19.778 39.28 21.825 41.523L22.6 42.37Q23.34 43.186 24.05 42.538L24.711 41.933C31.278 35.937 38.928 28.484 38.928 28.083 38.928 24.656 24.521 14.219 22.538 16.207Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M8.89 38.053C8.203 39.566 6.598 44.473 6.598 45.056 6.598 45.137 6.887 45.125 7.236 45.036 9.655 44.404 13.526 47.475 13.526 50.027 13.526 51.132 13.361 51.164 16.187 49.49 21.421 46.387 21.966 45.665 20.575 43.659 19.002 41.387 14.975 38.238 11.909 36.881 9.799 35.949 9.854 35.926 8.89 38.053Z`}),(0,F.jsx)(`path`,{style:{fill:oD.graphite},d:`M6.598 45.056C5.732 46.866 5.155 49.464 6.309 50.907 8.041 53.505 10.928 52.639 13.526 50.907 13.526 48.021 9.978 44.404 7.236 45.036Z`})]})}function Gpe(){return(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z`})}function fD({transform:e}){return(0,F.jsx)(`path`,{style:{fill:oD.mint},transform:e,d:`M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z`})}function Kpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{fillRule:`evenodd`,style:{fill:sD},d:`M25.3 17.69C14.8 19.34 10.66 20.18 9.05 20.99 5.51 22.78 4.2 27.21 6.71 28.9 7.47 29.42 8.48 29.4 10.25 28.84 12.41 28.15 12.56 27.57 11.02 25.85 10 24.71 10.53 23.62 11.79 24.27 13.9 25.36 15.02 28.98 15.63 36.66 16.18 43.48 17.33 47.43 19.69 50.49 22.76 54.48 27.69 55.73 30.31 53.19 33 50.57 31.24 46.04 28.44 48.38 26.29 50.17 26.16 47.08 28.3 45.14 29.61 43.95 30.78 43.58 38.92 41.75 39.45 41.63 39.41 41.52 38.39 40.01 36.87 37.78 36.04 35.22 34.72 28.69 33.37 22 32.04 19.3 29.5 18.07 28.69 17.68 26.59 17.49 25.3 17.69M24.11 26.51C18.61 27.67 18.16 27.82 17.98 28.55 17.64 29.91 18.54 30.44 20.51 30.05 25.4 29.08 30.11 28.03 30.49 27.83 31.65 27.23 31 25.33 29.66 25.4 29.5 25.4 27 25.91 24.11 26.51M29.2 31.42C28.64 31.54 26.23 32.07 23.85 32.58 20.01 33.41 19.48 33.57 19.15 33.96 18.67 34.5 18.66 35.05 19.12 35.63 19.61 36.26 19.86 36.23 26.05 34.88 29.05 34.23 31.53 33.7 31.57 33.7 31.82 33.7 32.34 32.88 32.34 32.5 32.34 31.25 31.37 30.92 29.2 31.42M29.79 37.19C28.81 37.41 26.45 37.94 24.53 38.37 22.62 38.8 20.84 39.23 20.58 39.33 19.61 39.71 19.35 40.62 19.98 41.41 20.48 42.05 21 41.99 27.59 40.5 33.85 39.09 34.21 38.91 33.45 37.44 33.02 36.61 32.51 36.58 29.79 37.19M45.41 41.95C44.89 42.09 41.61 42.89 38.12 43.73 30.94 45.45 29.81 45.84 31.05 46.15 33.2 46.69 34.11 50.18 32.77 52.76 32.23 53.79 32.23 54.03 32.76 54.16 33.34 54.31 45.35 51.3 46.72 50.67 50.19 49.06 51.76 45.01 49.79 42.76 48.8 41.64 47.46 41.39 45.41 41.95`}),(0,F.jsx)(`path`,{style:{fill:oD.grape},d:`M48.21 10.15C47.92 10.41 47.5 11.27 46.96 12.74 45.52 16.61 45.24 16.99 43.01 18.15 39.18 20.15 39.05 20.99 42.28 22.73 45.37 24.39 45.68 24.79 47.12 28.95 48.3 32.32 49.28 32.2 50.65 28.52 52.23 24.25 52.26 24.22 55.2 22.56 57.53 21.24 57.79 21 57.79 20.16 57.79 19.49 57.55 19.31 55.01 18.06 52.16 16.66 52.2 16.72 50.31 11.56 49.7 9.89 49.03 9.44 48.21 10.15M32.59 13.92C31.78 14.73 32.28 15.89 33.58 16.22 35.07 16.6 36.19 17.1 37.17 17.84 38.42 18.77 39.23 18.86 39.79 18.15 39.99 17.9 40.15 17.53 40.15 17.32 40.15 15.29 33.99 12.52 32.59 13.92M42.48 34.38C40.96 35.96 40.65 36.88 41.39 37.57 42.2 38.33 43.36 37.74 44.55 35.95 45.2 34.97 45.22 34.35 44.62 33.88 43.89 33.31 43.41 33.42 42.48 34.38`}),(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M40.75 25.96C39.69 27.07 38.11 30.69 38.11 31.98 38.11 32.66 38.55 33.19 39.12 33.19 39.8 33.19 40.24 32.73 40.58 31.66 40.95 30.46 41.65 29.09 42.42 28.01 43.77 26.14 42.29 24.32 40.75 25.96M54.85 27.67C54.71 27.81 54.47 28.32 54.31 28.82 53.67 30.76 53.19 31.37 51.67 32.13 50.25 32.85 50.34 33.36 52.04 34.21 53.25 34.82 53.57 35.23 54.24 37.01 54.98 38.98 55.47 39.08 56.03 37.37 56.7 35.32 57.08 34.81 58.64 33.87 60.18 32.95 60.14 32.65 58.38 31.78 57.02 31.11 56.68 30.66 56.02 28.65 55.69 27.64 55.25 27.27 54.85 27.67`})]})}function qpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{fillRule:`evenodd`,style:{fill:sD},d:`M42.24 14.07C41.52 14.24 40.53 14.54 35.06 16.26 33.33 16.8 31.2 17.47 30.34 17.74 29.47 18.01 27.86 18.52 26.75 18.88 25.64 19.23 24.03 19.74 23.16 20.01 20.16 20.94 19.45 21.4 18.97 22.71 18.71 23.44 18.45 26.33 17.83 35.41 17.64 38.25 17.44 41.03 17.41 41.58 17.32 42.77 17.24 42.69 18.79 42.84L20.01 42.95 21.98 39.97C24.69 35.88 24.85 35.82 27.05 37.9 27.9 38.7 28.43 39.08 28.61 39.02 28.76 38.96 28.91 38.91 28.94 38.91 28.98 38.91 29.38 38.38 29.84 37.73 30.3 37.08 31.47 35.48 32.43 34.17 33.4 32.86 34.86 30.85 35.67 29.71 36.49 28.56 37.5 27.29 37.91 26.88 39.73 25.07 41.01 26.43 43.32 32.67 43.76 33.84 44.3 35.28 44.52 35.86 44.74 36.44 44.97 37.28 45.04 37.74 45.19 38.71 45.17 38.71 46.63 38.03 47.69 37.53 47.77 37.46 47.68 37.02 47.58 36.52 46.97 30.64 46.79 28.41 46.73 27.69 46.62 26.43 46.53 25.61 46.44 24.79 46.24 22.87 46.09 21.32 45.61 16.44 45.5 15.66 45.22 15.12 44.72 14.15 43.59 13.76 42.24 14.07M29.38 22.45C26.04 23.47 24.49 27.62 26.6 29.91 29.17 32.7 34.15 30.16 34.16 26.05 34.16 23.38 31.9 21.68 29.38 22.45M46.7 41.5C39.3 44.23 28.33 46.04 20.1 45.88L17.21 45.82 17.16 46.88C17.08 48.22 17.33 49.03 18.01 49.68 18.73 50.37 19.73 50.35 23.77 49.53 25.46 49.19 29.12 48.47 31.91 47.93 46.31 45.14 46.9 44.99 47.57 43.91 47.95 43.3 48.25 41.29 47.99 41.15 47.91 41.11 47.33 41.26 46.7 41.5`}),(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M29.72 22.45C25.84 23.34 24.28 28.36 27.25 30.42 29.34 31.88 32.91 30.43 33.83 27.75 34.92 24.55 32.75 21.76 29.72 22.45`}),(0,F.jsx)(`path`,{style:{fill:oD.mint},d:`M12.96 14.29C12.87 14.41 12.7 15.03 12.58 15.68 12.37 16.82 11.59 18.26 11.18 18.26 11.08 18.26 10.88 18.46 10.72 18.7 10.36 19.25 10.59 19.58 11.45 19.74 12.18 19.88 13.08 20.63 13.54 21.49 14.23 22.76 14.75 22.53 15.15 20.79 15.39 19.71 15.51 19.51 16.4 18.66 17.54 17.58 17.51 17.36 16.18 16.85 15.16 16.47 14.84 16.19 14.14 15.1 13.56 14.2 13.22 13.96 12.96 14.29M49.04 24.13C48.56 24.86 48.91 25.31 50.59 26.09 53.89 27.64 54.85 29.82 53.45 32.6 52.01 35.43 46.84 38.54 40.51 40.39 39.73 40.62 38.88 40.89 38.62 40.99 37.24 41.52 30.85 42.64 27.54 42.93 20.72 43.52 13.63 42.49 10.57 40.46 5.81 37.3 7.51 32.32 14.74 28.24 15.84 27.61 16.17 27.1 15.9 26.4 15.66 25.78 15.35 25.84 13.19 26.94 6 30.61 2.97 35.32 4.95 39.74 7.86 46.21 22.78 47.8 40.05 43.46 51.97 40.47 58.57 36.38 59.47 31.43 60.09 27.97 57.74 25.34 52.93 24.12 50.6 23.53 49.43 23.54 49.04 24.13`}),(0,F.jsx)(`path`,{style:{fill:oD.grape},d:`M34.82 8.91C33.48 10.04 34.21 12.14 35.94 12.14 37.29 12.14 38.18 10.99 37.77 9.77 37.36 8.53 35.81 8.08 34.82 8.91M53.15 43.16C53 43.28 52.74 43.86 52.57 44.45 52.18 45.78 51.76 46.32 50.64 46.93 49.52 47.53 49.45 47.89 50.33 48.34 51.34 48.85 52.24 49.95 52.56 51.04 53.13 53.01 53.6 53 54.21 50.99 54.61 49.69 55.13 48.93 55.91 48.54 57.17 47.91 57.23 47.51 56.15 46.96 55.23 46.49 54.67 45.76 54.23 44.44 53.8 43.15 53.54 42.84 53.15 43.16M24.18 53.18C22.45 53.9 22.87 56.59 24.71 56.59 26.79 56.59 27.2 53.67 25.2 53.09 24.89 53.01 24.51 53.04 24.18 53.18`}),(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M51.76 11.04C51.21 12.77 50.56 13.61 49.24 14.34 48.6 14.69 48.72 15.07 49.59 15.48 50.54 15.93 51.11 16.69 51.62 18.22 52.06 19.57 52.26 19.54 52.79 18.08 53.29 16.69 53.87 15.91 54.86 15.31 55.76 14.77 55.77 14.48 54.92 14.02 53.91 13.46 53.5 12.99 52.89 11.66 52.23 10.21 52.06 10.12 51.76 11.04M11.06 48.22C10.99 48.35 10.71 48.88 10.46 49.41 9.95 50.48 9.45 50.99 8.59 51.33 7.89 51.61 7.85 52.1 8.52 52.37 9.51 52.79 10.3 53.85 10.89 55.58 11.09 56.18 11.48 55.88 11.87 54.84 12.24 53.87 13.33 52.56 13.79 52.56 14 52.56 14.5 52.06 14.5 51.85 14.5 51.77 14.19 51.54 13.81 51.34 12.98 50.92 12.36 50.14 11.93 48.99 11.6 48.09 11.31 47.83 11.06 48.22`})]})}function Jpe(){return(0,F.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M278 155 482 123C517 117 527 135 530 167L542 309Q543 329 561 341L631 404Q649 419 646 444 645 465 623 472L407 521Q374 531 345 519L156 436Q115 418 128 375L221 191Q238 163 278 155Z`}),(0,F.jsx)(`path`,{style:{fill:oD.ink},d:`M317 183 461 161Q493 155 497 188L504 288Q508 320 478 326L318 356Q289 362 286 331L281 226Q278 194 317 183Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M304 386 553 340Q562 337 570 346L631 404Q649 419 646 444Q645 448 629 452L411 483Q382 492 367 474Z`}),(0,F.jsxs)(`g`,{style:{fill:oD.cream},children:[(0,F.jsx)(`rect`,{x:`319`,y:`236`,width:`26`,height:`59`,rx:`13`}),(0,F.jsx)(`rect`,{x:`364`,y:`229`,width:`26`,height:`59`,rx:`13`})]}),(0,F.jsxs)(`g`,{style:{fill:oD.ink},transform:`rotate(-11 470 411)`,children:[(0,F.jsx)(`rect`,{x:`369`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`444`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`518`,y:`380`,width:`57`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`392`,y:`421`,width:`58`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`462`,y:`421`,width:`65`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`539`,y:`421`,width:`58`,height:`25`,rx:`13`})]})]})}function Ype(){return(0,F.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,F.jsx)(`path`,{style:{fill:oD.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,F.jsx)(`path`,{style:{fill:oD.blue},d:`M824 376Q908 372 871 400C842 427 866 442 902 450L1113 480Q1188 479 1199 392C1207 447 1204 497 1163 511Q1134 521 1097 516C1055 510 991 507 957 507S869 511 826 512C781 513 758 483 760 441Q760 385 824 376Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M824 376 857 184Q864 133 911 141C1039 169 1124 151 1226 153Q1179 159 1184 241L1199 377C1202 434 1174 482 1117 480L902 450C864 445 849 429 871 400Q908 372 824 376Z`}),(0,F.jsxs)(`g`,{style:{fill:oD.coral},children:[(0,F.jsx)(`path`,{d:`M982 198C1008 190 1030 197 1028 220L1023 265Q1020 295 1000 279C981 261 951 223 963 210Q970 202 982 198Z`}),(0,F.jsx)(`path`,{d:`M1063 220C1077 215 1100 237 1102 251Q1107 267 1084 282L1063 295Q1037 307 1040 278L1045 245Q1049 224 1063 220Z`}),(0,F.jsx)(`path`,{d:`M911 252C925 240 939 254 957 269L978 291Q995 311 961 316C938 318 907 316 898 308Q884 296 911 252Z`}),(0,F.jsx)(`path`,{d:`M1106 289Q1127 281 1134 304C1142 327 1146 352 1125 350Q1097 348 1073 335C1051 324 1072 311 1084 302Z`}),(0,F.jsx)(`path`,{d:`M927 338C946 334 972 334 985 343Q1004 353 984 384C970 408 957 418 940 403C922 389 896 356 913 345Z`}),(0,F.jsx)(`path`,{d:`M1010 375Q1025 363 1037 384C1049 407 1064 438 1044 442Q1025 448 1002 436C984 428 991 410 997 393Z`}),(0,F.jsx)(`path`,{d:`M1068 357C1084 359 1110 376 1120 389Q1130 402 1107 419C1090 432 1082 418 1073 401C1062 383 1043 355 1068 357Z`}),(0,F.jsx)(`path`,{d:`M1018 311C1037 312 1050 334 1034 343C1018 351 998 337 1005 320Q1009 311 1018 311Z`})]})]})}function Xpe(){return(0,F.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,F.jsx)(`path`,{style:{fill:oD.inkcap},d:`M1384 276C1394 238 1445 200 1497 158C1547 119 1604 97 1647 97C1690 97 1720 109 1745 138C1772 170 1791 184 1833 194C1870 201 1919 220 1922 257C1923 307 1891 339 1853 336C1801 335 1767 299 1701 294C1666 291 1620 294 1642 303Q1670 307 1675 333C1681 367 1697 389 1717 413C1735 434 1738 443 1719 464C1700 485 1692 502 1686 520Q1682 541 1653 541L1626 541Q1598 541 1594 519C1590 495 1578 474 1563 458C1545 440 1544 429 1559 410C1585 377 1608 337 1572 326C1554 320 1529 333 1506 340C1461 356 1428 357 1402 340Q1371 319 1384 276Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M1634 362Q1641 346 1649 362C1660 390 1676 404 1705 424Q1721 435 1704 453C1685 475 1677 490 1671 513Q1670 526 1653 525L1626 525Q1611 525 1610 513C1606 492 1592 465 1575 449Q1562 437 1577 424C1604 404 1620 390 1634 362Z`}),(0,F.jsx)(`path`,{style:{fill:oD.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,F.jsx)(`path`,{style:{fill:oD.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:pD,blue:mD,mint:hD,grape:gD,yellow:_D,cream:vD,ink:yD}=oD,Zpe={bonsai:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,stroke:hD,strokeWidth:`3.7`,strokeLinecap:`round`,d:`M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2`}),(0,F.jsx)(`path`,{fill:hD,d:`M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z`}),(0,F.jsx)(`circle`,{fill:mD,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,F.jsx)(`circle`,{fill:gD,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,F.jsx)(`circle`,{fill:_D,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,F.jsx)(`circle`,{fill:_D,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,F.jsx)(`circle`,{fill:mD,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,F.jsx)(`path`,{fill:pD,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,F.jsx)(`rect`,{fill:pD,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,F.jsx)(Jpe,{}),prints:(0,F.jsx)(Ype,{}),inkcap:(0,F.jsx)(Xpe,{}),vishnu:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{fill:pD},d:`M6 37C6 21 17.5 9 32 9s26 12 26 28c0 2.2-1.8 4-4 4H10c-2.2 0-4-1.8-4-4Z`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`19`,cy:`25`,r:`4`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`33`,cy:`19.5`,r:`4.8`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`46`,cy:`28`,r:`3.4`}),(0,F.jsx)(`rect`,{style:{fill:mD},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,F.jsx)(`rect`,{style:{fill:vD},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{style:{fill:vD},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,F.jsx)(`circle`,{style:{fill:_D},cx:`39`,cy:`50.5`,r:`2.7`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,F.jsx)(Kpe,{}),generateMedia:(0,F.jsx)(qpe,{}),buyApps:(0,F.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,F.jsx)(`circle`,{fill:_D,cx:`32`,cy:`20`,r:`12`}),(0,F.jsx)(`circle`,{stroke:vD,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,F.jsx)(`path`,{fill:mD,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,F.jsx)(`rect`,{fill:pD,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`rect`,{x:`20`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,F.jsx)(`rect`,{x:`29.5`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,F.jsx)(`rect`,{x:`39`,y:`41`,width:`5`,height:`11`,rx:`2.5`})]})]}),browseBazaar:(0,F.jsxs)(`g`,{transform:`rotate(-5 32 32)`,children:[(0,F.jsx)(`rect`,{fill:mD,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,F.jsx)(`rect`,{fill:mD,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,F.jsx)(`rect`,{fill:vD,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,F.jsx)(`rect`,{fill:pD,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,F.jsx)(`path`,{fill:pD,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,F.jsx)(`path`,{fill:vD,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,F.jsx)(`path`,{fill:pD,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,F.jsx)(`path`,{fill:vD,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,F.jsx)(`path`,{fill:pD,d:`M49.4 9H61V18A5.8 5.8 0 0 1 49.4 18Z`}),(0,F.jsx)(`g`,{transform:`translate(32 36.5) scale(.34)`,children:(0,F.jsx)(lD,{})})]}),agent:(0,F.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,F.jsx)(`path`,{fill:mD,d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,F.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,F.jsx)(dD,{})})]}),list:(0,F.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,F.jsx)(`path`,{style:{fill:mD},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,F.jsx)(`path`,{style:{fill:vD},d:`M19 7H39Q42 7 44 9L55 20Q57 22 57 26V44Q57 50 51 50H19Q13 50 13 44V13Q13 7 19 7Z`}),(0,F.jsx)(`path`,{style:{fill:pD},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,F.jsxs)(`g`,{style:{fill:pD},children:[(0,F.jsx)(`circle`,{cx:`22`,cy:`21`,r:`3`}),(0,F.jsx)(`circle`,{cx:`22`,cy:`31`,r:`3`}),(0,F.jsx)(`circle`,{cx:`22`,cy:`41`,r:`3`})]}),(0,F.jsx)(`path`,{style:{stroke:mD},strokeWidth:`5`,strokeLinecap:`round`,d:`M31 21H32M31 31H46M31 41H42`})]}),chat:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`g`,{transform:`translate(3 11) scale(.22) translate(-449 -327)`,children:(0,F.jsx)(Hpe,{})}),(0,F.jsx)(cD,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,F.jsx)(cD,{transform:`translate(44.4 20.5) rotate(47) scale(.95 .6)`})]}),read:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`g`,{transform:`translate(4 20.5) scale(.56)`,children:(0,F.jsx)(Vpe,{})}),(0,F.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,F.jsx)(lD,{})}),(0,F.jsx)(Bpe,{})]}),readConversations:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(.9) translate(-32 -32)`,children:[(0,F.jsx)(`g`,{transform:`translate(4 7.88) scale(.56)`,children:(0,F.jsx)(uD,{fill:mD})}),(0,F.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,F.jsx)(lD,{})})]}),listAgents:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,F.jsx)(`path`,{style:{fill:sD},d:`M32.059 10.146C23.878 10.646 18.949 14.844 18.925 21.331 18.912 24.856 20.167 27.259 22.274 27.74 24.437 28.233 26.097 29.061 27.481 30.337 28.275 31.068 28.328 31.096 29.352 31.306 31.161 31.677 31.653 32.094 32.115 33.651 32.392 34.582 32.557 34.868 32.915 35.041 33.919 35.523 35.864 33.733 36.539 31.706L36.775 30.997 38.008 30.681C42.663 29.489 45.29 26.142 45.468 21.176 45.734 13.784 40.673 9.62 32.059 10.146Z`}),(0,F.jsx)(`g`,{transform:`translate(32.4 21.2) scale(.39)`,children:(0,F.jsx)(dD,{onFigure:!0})}),(0,F.jsx)(`path`,{style:{fill:pD},d:`M14.375 27.586C8.014 28.591 4.363 32.396 4.355 38.027 4.347 43.93 8.071 47.469 15.239 48.368L16.828 48.568 17.873 49.568C19.854 51.464 22.469 52.496 23.691 51.864 24.384 51.506 24.431 51.044 23.924 49.606 23.337 47.943 23.479 47.492 24.749 46.977 32.756 43.73 32.643 31.899 24.573 28.49 22.238 27.504 17.535 27.087 14.375 27.586Z`}),(0,F.jsx)(`g`,{transform:`translate(17.6 37.7) scale(.38 .36)`,children:(0,F.jsx)(dD,{})}),(0,F.jsx)(`path`,{style:{fill:mD},d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,F.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,F.jsx)(dD,{})})]}),createAgents:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,F.jsx)(`path`,{style:{fill:sD},d:`M20.436 24.499C13.35 25.216 7.504 28.799 5.442 33.687 3.114 39.208 4.438 45.791 8.593 49.358 10.446 50.949 10.34 50.831 10.34 51.301 10.34 51.796 10.106 52.294 9.281 53.558 7.191 56.76 12.108 56.905 16.701 53.777 17.517 53.221 17.715 53.135 18.015 53.201 20.013 53.639 25.739 53.051 28.595 52.113 35.47 49.857 39.129 44.162 37.83 37.738C37 31 33 26 26.717 24.428L24.075 24.413C22.623 24.405 20.985 24.444 20.436 24.499Z`}),(0,F.jsx)(`g`,{transform:`translate(21.9 40) scale(.46 .43)`,children:(0,F.jsx)(dD,{onFigure:!0})}),(0,F.jsx)(`path`,{style:{fill:hD},d:`M37.987 15.734C32.277 16.627 28.675 20.713 28.92 26.022 29.062 29.118 30.627 31.606 33.331 33.036 34.675 33.747 34.761 34.018 34.237 35.923 33.376 39.051 36.878 38.551 39.174 35.218 39.574 34.637 39.65 34.583 40.058 34.583 46.203 34.583 50.414 30.91 50.424 25.543 50.435 18.989 44.932 14.649 37.987 15.734Z`}),(0,F.jsx)(`g`,{transform:`translate(38.9 24.9) scale(.31)`,children:(0,F.jsx)(dD,{})}),(0,F.jsx)(cD,{fill:_D,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(52.2 19.8) rotate(70) scale(1.25 .85)`})]}),sendPrompts:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,F.jsx)(`g`,{transform:`translate(4 13.2) scale(.412 .436)`,children:(0,F.jsx)(uD,{fill:pD})}),(0,F.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,F.jsx)(Upe,{})}),(0,F.jsx)(cD,{fill:hD,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,F.jsx)(cD,{fill:hD,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Wpe,{}),(0,F.jsx)(Gpe,{})]}),run:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{style:{fill:mD},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,F.jsx)(`path`,{style:{stroke:vD},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,F.jsx)(`rect`,{style:{fill:pD},x:`12`,y:`12`,width:`40`,height:`40`,rx:`9`}),connected:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,style:{stroke:mD},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:pD},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,F.jsx)(`path`,{style:{stroke:_D},strokeWidth:`4`,strokeLinecap:`round`,d:`m27 4 2 6m10-5-2 7m12 0-5 4`})]}),working:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`ellipse`,{style:{fill:hD},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,F.jsx)(`ellipse`,{style:{fill:_D},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,F.jsx)(`ellipse`,{style:{fill:gD},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:sD},strokeWidth:`3`,strokeLinecap:`round`,d:`M42 8q13 2 13 13M43 55q-5 5-12 4M5 39q-5-9 1-17`})]}),complete:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{fill:hD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:yD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m23 29 7 7 13-15`}),(0,F.jsx)(`path`,{style:{stroke:sD},strokeWidth:`3`,strokeLinecap:`round`,d:`m4 8 5 6m48-4 5-5M2 24l6 1`})]}),installApps:(0,F.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,F.jsx)(`rect`,{style:{fill:mD},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,F.jsx)(`rect`,{style:{fill:vD},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,F.jsx)(`path`,{style:{fill:hD},d:`M22 38h8v8h-8z`}),(0,F.jsx)(`path`,{style:{fill:gD},d:`M34 38h8v8h-8z`}),(0,F.jsx)(`path`,{style:{stroke:pD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M32 4v17m-8-7 8 8 8-8`})]}),restricted:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,style:{stroke:pD},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,F.jsx)(`rect`,{style:{fill:pD},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,F.jsx)(`path`,{style:{fill:vD},d:`M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z`})]}),error:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{fill:pD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:vD},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`g`,{fill:_D,children:[(0,F.jsx)(`rect`,{x:`17.25`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,F.jsx)(`rect`,{x:`42.95`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`18`,width:`3.2`,height:`26`}),(0,F.jsx)(`rect`,{x:`14.8`,y:`15.75`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,F.jsx)(`rect`,{x:`14.8`,y:`28.85`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,F.jsx)(`rect`,{x:`14.8`,y:`42.55`,width:`34.4`,height:`3.1`,rx:`1.55`})]}),(0,F.jsx)(`path`,{fill:`none`,stroke:hD,strokeWidth:`3`,strokeLinecap:`round`,d:`M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8`}),(0,F.jsx)(`path`,{fill:`none`,stroke:hD,strokeWidth:`3`,strokeLinecap:`round`,d:`M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2`}),(0,F.jsx)(fD,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,F.jsx)(fD,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,F.jsx)(fD,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,F.jsx)(fD,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,F.jsx)(fD,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,F.jsx)(`circle`,{fill:pD,cx:`31.9`,cy:`18.8`,r:`4`}),(0,F.jsx)(`circle`,{fill:mD,cx:`32`,cy:`32.3`,r:`4`}),(0,F.jsx)(`circle`,{fill:gD,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:mD,d:`M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`26.8`,cy:`37.9`,rx:`9.1`,ry:`5.6`}),(0,F.jsx)(`ellipse`,{fill:yD,cx:`27`,cy:`37.6`,rx:`4.7`,ry:`2.2`}),(0,F.jsx)(`path`,{fill:yD,d:`M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z`}),(0,F.jsx)(`circle`,{fill:pD,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,F.jsx)(`circle`,{fill:vD,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,F.jsx)(`ellipse`,{fill:_D,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:gD,d:`M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z`}),(0,F.jsx)(`circle`,{fill:vD,cx:`34.9`,cy:`41.9`,r:`11.3`}),(0,F.jsxs)(`g`,{fill:yD,children:[(0,F.jsx)(`rect`,{x:`29.9`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`}),(0,F.jsx)(`rect`,{x:`36.7`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`})]}),(0,F.jsx)(`path`,{fill:gD,d:`M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z`}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`3`,strokeLinecap:`round`,d:`M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1`})]}),tourtois:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:vD,x:`11.07`,y:`35.73`,width:`26.8`,height:`9.7`,rx:`3.25`,transform:`rotate(-5 24.47 40.58)`}),(0,F.jsx)(`path`,{fill:_D,d:`M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z`}),(0,F.jsx)(`path`,{fill:pD,d:`M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z`}),(0,F.jsx)(`path`,{fill:mD,d:`M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z`}),(0,F.jsx)(`path`,{fill:vD,d:`M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`circle`,{cx:`14.7`,cy:`18.45`,r:`1`}),(0,F.jsx)(`circle`,{cx:`17.6`,cy:`17.65`,r:`1`}),(0,F.jsx)(`circle`,{cx:`20.5`,cy:`16.85`,r:`1`}),(0,F.jsx)(`circle`,{cx:`17.9`,cy:`22.2`,r:`1`}),(0,F.jsx)(`circle`,{cx:`21`,cy:`21.5`,r:`1`}),(0,F.jsx)(`circle`,{cx:`24.1`,cy:`20.75`,r:`1`}),(0,F.jsx)(`circle`,{cx:`28.2`,cy:`25.3`,r:`1`})]}),(0,F.jsx)(`circle`,{fill:pD,cx:`21.7`,cy:`26.6`,r:`1`}),(0,F.jsx)(`circle`,{fill:_D,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,F.jsxs)(`g`,{fill:hD,children:[(0,F.jsx)(`ellipse`,{cx:`8.8`,cy:`36.6`,rx:`3.6`,ry:`1.9`,transform:`rotate(22 8.8 36.6)`}),(0,F.jsx)(`path`,{d:`M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5L12 41Z`}),(0,F.jsx)(`path`,{d:`M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z`})]}),(0,F.jsx)(`ellipse`,{fill:hD,cx:`46.4`,cy:`30.6`,rx:`8.1`,ry:`8.3`}),(0,F.jsxs)(`g`,{fill:yD,children:[(0,F.jsx)(`rect`,{x:`45.05`,y:`26.95`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 46.2 29.3)`}),(0,F.jsx)(`rect`,{x:`49.25`,y:`26.4`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 50.4 28.7)`})]}),(0,F.jsx)(`path`,{fill:pD,d:`M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z`,transform:`rotate(-8 48.9 33.5)`}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`3`,strokeLinecap:`round`,d:`M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7`})]}),allApps:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:pD,x:`7`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 18.6 18.6)`}),(0,F.jsx)(`rect`,{fill:mD,x:`33.9`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 45.5 18.6)`}),(0,F.jsx)(`rect`,{fill:hD,x:`7`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 18.6 45.5)`}),(0,F.jsx)(`rect`,{fill:_D,x:`33.9`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 45.5 45.5)`})]}),search:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,stroke:mD,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,F.jsx)(`path`,{fill:`none`,stroke:pD,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,F.jsx)(`ellipse`,{fill:mD,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:pD,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,F.jsx)(`path`,{fill:vD,d:`M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z`}),(0,F.jsx)(`circle`,{fill:_D,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,F.jsx)(`circle`,{fill:mD,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,F.jsx)(`circle`,{fill:gD,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,F.jsx)(`circle`,{fill:hD,cx:`32`,cy:`34.9`,r:`14.5`}),(0,F.jsxs)(`g`,{fill:`none`,stroke:vD,strokeWidth:`3`,children:[(0,F.jsx)(`ellipse`,{cx:`32`,cy:`34.9`,rx:`7.7`,ry:`13.3`}),(0,F.jsx)(`path`,{d:`M17.5 34.9H46.5`})]})]}),internet:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`ellipse`,{fill:`none`,stroke:_D,strokeWidth:`4.4`,cx:`32.2`,cy:`30.2`,rx:`25.6`,ry:`8.1`,transform:`rotate(-20.8 32.2 30.2)`}),(0,F.jsx)(`circle`,{fill:mD,cx:`32`,cy:`32`,r:`21.1`}),(0,F.jsxs)(`g`,{fill:`none`,stroke:vD,strokeWidth:`3`,children:[(0,F.jsx)(`ellipse`,{cx:`32`,cy:`31.8`,rx:`12.2`,ry:`18.7`}),(0,F.jsx)(`path`,{d:`M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39`})]}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`4.4`,d:`M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2`,transform:`rotate(-20.8 32.2 30.2)`})]}),members:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`circle`,{fill:mD,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,F.jsx)(`path`,{fill:mD,d:`M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z`}),(0,F.jsx)(`circle`,{fill:pD,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,F.jsx)(`path`,{fill:pD,d:`M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z`}),(0,F.jsxs)(`g`,{fill:yD,children:[(0,F.jsx)(`circle`,{cx:`18.3`,cy:`28`,r:`1.6`}),(0,F.jsx)(`circle`,{cx:`27.9`,cy:`28`,r:`1.6`}),(0,F.jsx)(`circle`,{cx:`39.1`,cy:`23.05`,r:`1.55`}),(0,F.jsx)(`circle`,{cx:`47.25`,cy:`23.05`,r:`1.55`})]})]}),sell:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:_D,d:`M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`21.9`,cy:`40.8`,rx:`13.2`,ry:`3.6`}),(0,F.jsxs)(`g`,{transform:`rotate(-3 22.5 30) translate(0.5 0)`,children:[(0,F.jsx)(`path`,{fill:_D,d:`M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`23.7`,cy:`26.55`,rx:`13.05`,ry:`4.4`})]}),(0,F.jsxs)(`g`,{transform:`translate(46.3 40.3) rotate(-25)`,children:[(0,F.jsx)(`path`,{fill:pD,d:`M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z`}),(0,F.jsx)(`circle`,{fill:vD,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,F.jsx)(cD,{fill:_D,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:vD,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,F.jsx)(`path`,{fill:pD,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`circle`,{cx:`16.1`,cy:`16.15`,r:`3.4`}),(0,F.jsx)(`circle`,{cx:`43.4`,cy:`16.15`,r:`3.4`})]}),(0,F.jsxs)(`g`,{fill:mD,children:[(0,F.jsx)(`rect`,{x:`13.6`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`}),(0,F.jsx)(`rect`,{x:`40.9`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`})]}),(0,F.jsxs)(`g`,{fill:hD,children:[(0,F.jsx)(`rect`,{x:`11.1`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`20.7`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`20.7`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`11.1`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,F.jsxs)(`g`,{fill:gD,children:[(0,F.jsx)(`rect`,{x:`40.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`11.1`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`20.7`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,F.jsx)(`circle`,{fill:_D,cx:`45.5`,cy:`45.6`,r:`12.2`}),(0,F.jsx)(`path`,{fill:`none`,stroke:yD,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M45.1 39.3V46.2L51.3 49.8`}),(0,F.jsx)(`circle`,{fill:yD,cx:`45.1`,cy:`46.2`,r:`2.5`})]}),loop:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{stroke:pD},strokeWidth:`6`,strokeLinecap:`round`,d:`M47.5 14.5C43 11 37.5 9 32 9 19.5 9 9 19.5 9 32S19.5 55 32 55 55 44.5 55 32`}),(0,F.jsx)(`path`,{style:{fill:pD},d:`M53.5 21.5Q54.5 20 55 22L58 33Q58.5 35 56.5 34.5L48.5 32.5Q47 32 48 30.5Z`}),(0,F.jsx)(`g`,{transform:`translate(18 21) scale(.28)`,children:(0,F.jsx)(uD,{fill:mD})}),(0,F.jsxs)(`g`,{style:{fill:vD},children:[(0,F.jsx)(`rect`,{x:`25`,y:`27.5`,width:`14`,height:`3`,rx:`1.5`}),(0,F.jsx)(`rect`,{x:`25`,y:`33.5`,width:`9`,height:`3`,rx:`1.5`})]})]}),fungi:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`ellipse`,{fill:vD,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,F.jsx)(`path`,{fill:pD,d:`M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`ellipse`,{cx:`29`,cy:`15.7`,rx:`8.7`,ry:`6.3`,transform:`rotate(-15.5 29 15.7)`}),(0,F.jsx)(`ellipse`,{cx:`50.8`,cy:`20.1`,rx:`6.5`,ry:`3.5`,transform:`rotate(51.6 50.8 20.1)`}),(0,F.jsx)(`ellipse`,{cx:`13`,cy:`26.8`,rx:`4.2`,ry:`3.3`,transform:`rotate(-54.5 13 26.8)`})]}),(0,F.jsxs)(`g`,{fill:yD,transform:`translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)`,children:[(0,F.jsx)(`rect`,{x:`31.85`,y:`35.9`,width:`3.75`,height:`5.25`,rx:`1.85`}),(0,F.jsx)(`path`,{d:`M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z`}),(0,F.jsx)(`path`,{d:`M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z`})]})]})};function bD({name:e,size:t}){return(0,F.jsx)(`svg`,{viewBox:`0 0 64 64`,width:t,height:t,fill:`none`,stroke:`none`,"aria-hidden":`true`,focusable:`false`,"data-sigil":e,children:Zpe[e]})}var Qpe=[{id:`list`,label:`List files`,contract:jce},{id:`read`,label:`Read files`,contract:Bce},{id:`write`,label:`Write files`,contract:Vce},{id:`run`,label:`Run commands`,contract:wC}],$pe={loading:`Loading`,unavailable:`Unavailable`,error:`Refresh failed`};function eme({app:e,terminal:t=null,processes:n,ports:r}){let[i,a]=(0,I.useState)(!1),o=async()=>{if(e){a(!0);try{await e.ui.requestAppPermissions({})}catch(e){DC(`Could not open App permissions. Try again.`,e)}finally{a(!1)}}};return{id:`access`,label:`Access`,title:`Computer access`,content:(0,F.jsxs)(`div`,{className:`shed-instrument`,children:[(0,F.jsxs)(Ipe,{size:`sm`,children:[(0,F.jsx)(Lpe,{icon:(0,F.jsx)(bD,{name:`computer`}),title:t?.name??`Selected Computer`,status:t?(0,F.jsx)(vm,{size:`compact`,label:`Terminal ${t.state}`,tone:t.state===`open`?`success`:t.state===`failed`?`error`:`neutral`}):null}),(0,F.jsxs)(Rpe,{children:[(0,F.jsx)(aD,{legend:`Shed may`,wide:!0,children:(0,F.jsx)(Ppe,{"aria-label":`Shed may`,stateLabels:[`allowed`,`not allowed`],items:Qpe.map(({id:t,label:n,contract:r})=>({id:t,label:n,caption:t,icon:(0,F.jsx)(bD,{name:t}),on:e?.capabilities.has(r)===!0}))})}),(0,F.jsx)(xD,{label:`Processes`,value:n}),(0,F.jsx)(xD,{label:`Ports open`,value:r})]})]}),e?(0,F.jsx)(`div`,{className:`shed-instrument-keys`,children:(0,F.jsx)(ZE,{size:`sm`,variant:`ghost`,disabled:i,onClick:()=>void o(),children:i?`Opening permissions…`:`App permissions…`})}):null]})}}function xD({label:e,value:t}){return(0,F.jsx)(aD,{legend:e,role:`group`,"aria-label":e,children:t.kind===`loaded`?(0,F.jsx)(jpe,{value:t.count,pad:2,size:`md`}):(0,F.jsx)(`span`,{className:`shed-instrument-note`,children:$pe[t.kind]})})}var tme={2:`h2`,3:`h3`,4:`h4`};function nme(e,t){let{reduced:n}=t,r=e&&!n,i=Rd(t,600),[a,o]=(0,I.useState)(r);return(0,I.useEffect)(()=>{if(o(r),!r)return;let e=globalThis.setTimeout(()=>{o(!1)},i);return()=>{globalThis.clearTimeout(e)}},[r,i]),a}var rme=(0,F.jsx)(um,{decorative:!0,pace:`idle`,size:`md`,tone:`primary`,variant:`wander`}),SD=(0,I.forwardRef)(function({actions:e,secondaryAction:t,className:n,description:r,headingLevel:i=2,primaryAction:a,suggestions:o,thinking:s=!1,title:c,visual:l,renderVisual:u,variant:d=`plain`,...f},p){let m=(0,I.useId)(),h=(0,I.useRef)(null),g=Ld(h),_=nme(d===`speech`,g)&&!s,v=tme[i],y=l??(d===`panel`?`blobs`:void 0),b=u?u({speaking:_,thinking:s}):y===`blobs`?rme:y,x=`${m}-reason`,S=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(v,{ref:h,className:`empty-state-title`,id:f[`aria-labelledby`]?void 0:m,children:c}),(0,F.jsx)(`p`,{children:r}),a?(0,F.jsxs)(`div`,{className:`empty-state-primary`,children:[(0,F.jsxs)(`div`,{className:`empty-state-action-row`,children:[(0,F.jsx)(ZE,{"aria-describedby":a.disabled&&a.disabledReason?x:void 0,disabled:a.disabled,loading:a.pending===!0,onClick:a.onSelect,variant:`primary`,children:a.label}),t]}),a.disabled&&a.disabledReason?(0,F.jsx)(`span`,{className:`empty-state-reason`,id:x,children:a.disabledReason}):null]}):null,o&&o.length>0?(0,F.jsx)(`ul`,{"aria-label":`Try one of these`,className:`empty-state-suggestions`,children:o.map((e,t)=>(0,F.jsx)(`li`,{children:(0,F.jsx)(ZE,{disabled:e.disabled,loading:e.pending===!0,size:`sm`,variant:`outline`,onClick:e.onSelect,children:e.label})},`${String(t)}:${e.label}`))}):null,e?(0,F.jsx)(`div`,{className:`empty-state-actions`,children:e}):null]});return(0,F.jsxs)(`section`,{...f,"aria-labelledby":f[`aria-labelledby`]??m,className:Dd(`empty-state`,d!==`plain`&&`empty-state-${d}`,n),ref:p,children:[b?(0,F.jsx)(`div`,{"aria-hidden":`true`,className:`empty-state-visual`,children:b}):null,d===`speech`?(0,F.jsx)(`div`,{className:`empty-state-bubble`,children:S}):S]})}),ime=(0,I.forwardRef)(function({className:e,orientation:t,variant:n=`grip`,value:r,min:i,max:a,onValueChange:o,onKeyDown:s,...c},l){return(0,F.jsx)(`div`,{...c,ref:l,className:Dd(`caps-resize-handle`,e),"data-resize-variant":n,role:`separator`,"aria-orientation":t,"aria-valuemin":Math.round(i),"aria-valuemax":Math.round(a),"aria-valuenow":Math.round(r),tabIndex:c.tabIndex??0,onKeyDown:e=>{if(s?.(e),e.defaultPrevented)return;if(e.key===`Home`||e.key===`End`){e.preventDefault(),o(e.key===`Home`?i:a);return}let n=t===`horizontal`?e.key===`ArrowUp`?-32:e.key===`ArrowDown`?32:null:e.key===`ArrowLeft`?-32:e.key===`ArrowRight`?32:null;n!==null&&(e.preventDefault(),o(Math.min(a,Math.max(i,r+n))))},children:(0,F.jsx)(`span`,{className:`caps-resize-grip`,"aria-hidden":`true`})})});function CD(e){return`init`in e}function wD(e){return typeof e.write==`function`}function ame(e){return!!e.onMount}function TD(e){return`v`in e||`e`in e}function ED(e){if(`e`in e)throw e.e;return e.v}function DD(e){return typeof e?.then==`function`}function ome(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function OD(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function kD(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function sme(e){return!!e.INTERNAL_onInit}var cme=(e,t,n,...r)=>n.read(...r),lme=(e,t,n,...r)=>n.write(...r),ume=(e,t,n)=>n.INTERNAL_onInit(t),dme=(e,t,n,r)=>n.onMount?.call(n,r),fme=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),sme(n)&&s(e,t,n)}return a},pme=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},mme=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of kD(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},hme=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(TD(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},T=r=>{var i;if(r===n){let n=u(e,t,r);if(!TD(n)){if(CD(r))g(e,t,r,r.init);else throw Error(`no atom init`)}return ED(n)}let o=p(e,t,r);try{return ED(o)}finally{S.delete(r),y.d.set(r,o.n),DD(y.v)&&OD(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},E,D,O={get signal(){return E||=new AbortController,E.signal},get setSelf(){return!D&&wD(n)&&(D=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),D}},k=y.n,A=o.get(n)===k;try{let i=l(e,t,n,T,O);if(g(e,t,n,i),DD(i)){_(e,t,i,()=>E?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){if(ome(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==k&&A&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},gme=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of kD(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},_me=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>ED(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!CD(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},vme=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},yme=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),wD(n)&&ame(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},bme=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},xme=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(DD(r))for(let a of o.d.keys())OD(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,DD(c)&&a(e,t,c))},Sme=(e,t,n)=>{let r=e[14];return ED(r(e,t,n))},Cme=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},wme=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},Tme=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},Eme=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},Dme=new WeakMap;function Ome(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},cme,lme,ume,dme,fme,pme,mme,hme,gme,_me,vme,yme,bme,xme,Sme,Cme,wme,void 0,new WeakMap,Tme,Eme,[0]].map((t,n)=>e[n]||t);Dme.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var kme=0;function Ame(e,t){let n=`atom${++kme}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=jme,r.write=Mme),t&&(r.write=t),r}function jme(e){return e(this)}function Mme(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function Nme(){return Ome()}var AD=Ame({frames:new Map,order:[],tiles:[],minima:new Map,participating:new Set,mainSize:void 0,zoomed:null,gesture:null,restore:new Map}),jD=(e,t,n)=>Math.min(Math.max(e,t),n),MD=(e,t,n)=>{let r=jD(e.width,n.width,Math.max(n.width,t.width)),i=jD(e.height,n.height,Math.max(n.height,t.height));return{width:r,height:i,x:jD(e.x,0,Math.max(0,t.width-r)),y:jD(e.y,0,Math.max(0,t.height-i))}},ND=(e,t,n)=>{let r=t.width/2,i=t.height/2;return MD(e===`left`?{x:0,y:0,width:r,height:t.height}:e===`right`?{x:r,y:0,width:r,height:t.height}:e===`top-left`?{x:0,y:0,width:r,height:i}:e===`top-right`?{x:r,y:0,width:r,height:i}:e===`bottom-left`?{x:0,y:i,width:r,height:i}:{x:r,y:i,width:r,height:i},t,n)},Pme=()=>{let e=Nme(),t=()=>e.get(AD),n=0,r=r=>{n+=1,e.set(AD,r(t()))},i=(e,t,n)=>{r(r=>{let i=new Map(r.frames);return i.set(e,t),{...r,frames:i,participating:new Set(r.participating).add(e),tiles:r.tiles.includes(e)?r.tiles:[...r.tiles,e],minima:new Map(r.minima).set(e,n),order:r.order.includes(e)?r.order:[...r.order.filter(e=>e!==r.zoomed),e,...r.zoomed?[r.zoomed]:[]]}})},a=e=>t().frames.has(e),o=(e,n)=>{let r=t().gesture;return r?.kind===`frame`&&r.id===e&&r.pointerId===n};return{get version(){return n},get frames(){return t().frames},get order(){return t().order},get tiles(){return t().tiles},get minima(){return t().minima},get participating(){return t().participating},get mainSize(){return t().mainSize},get zoomed(){return t().zoomed},get gesture(){return t().gesture},get restore(){return t().restore},subscribe:t=>e.sub(AD,t),register:i,setParticipation:(e,n)=>{t().frames.has(e)&&r(t=>{if(t.participating.has(e)===n)return t;let r=new Set(t.participating);n?r.add(e):r.delete(e);let i=n?t.tiles.includes(e)?t.tiles:[...t.tiles,e]:t.tiles.filter(t=>t!==e),a=n?t.order.includes(e)?t.order:[...t.order,e]:t.order.filter(t=>t!==e);return{...t,participating:r,tiles:i,order:a,zoomed:n||t.zoomed!==e?t.zoomed:null,gesture:!n&&t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture}})},setMinima:(e,n)=>{let i=t().minima.get(e);!i||i.width===n.width&&i.height===n.height||r(t=>({...t,minima:new Map(t.minima).set(e,n)}))},unregister:e=>{r(t=>{if(!t.frames.has(e))return t;let n=new Map(t.frames);n.delete(e);let r=new Map(t.restore);r.delete(e);let i=t.order.filter(t=>t!==e),a=t.tiles.filter(t=>t!==e),o=new Map(t.minima);o.delete(e);let s=new Set(t.participating);s.delete(e);let c=t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture;return{...t,frames:n,restore:r,order:i,tiles:a,minima:o,participating:s,gesture:c,zoomed:t.zoomed===e?null:t.zoomed}})},begin:(e,n)=>{!a(e)||!t().participating.has(e)||r(t=>({...t,gesture:{kind:`frame`,id:e,pointerId:n,start:t.frames.get(e)??{x:0,y:0,width:0,height:0}},order:[...t.order.filter(t=>t!==e),e]}))},move:(e,n,i,s,c,l=null)=>{a(e)&&t().participating.has(e)&&o(e,n)&&r(t=>({...t,frames:new Map(t.frames).set(e,MD(i,s,c)),gesture:t.gesture?.kind===`frame`?{...t.gesture,snap:l?{side:l,frame:ND(l,s,c)}:null}:t.gesture}))},end:(e,t)=>{o(e,t)&&r(t=>{let n=t.gesture;return n?.kind!==`frame`||!n.snap?{...t,gesture:null}:{...t,frames:new Map(t.frames).set(e,n.snap.frame),restore:new Map(t.restore).set(e,t.restore.get(e)??n.start),gesture:null}})},cancel:(e,n)=>{let i=t().gesture;i?.kind===`frame`&&i.id===e&&i.pointerId===n&&r(t=>{let n=new Map(t.frames);return n.set(e,i.start),{...t,frames:n,gesture:null}})},snap:(e,n,i,o)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=new Map(t.restore);r.set(e,t.frames.get(e)??ND(n,i,o));let a=new Map(t.frames);return a.set(e,ND(n,i,o)),{...t,frames:a,restore:r,order:[...t.order.filter(t=>t!==e),e]}})},restoreFrame:(e,n,i)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=t.restore.get(e);if(!r)return t;let a=new Map(t.frames);a.set(e,MD(r,n,i));let o=new Map(t.restore);return o.delete(e),{...t,frames:a,restore:o}})},focus:e=>{a(e)&&r(t=>({...t,order:[...t.order.filter(t=>t!==e),e],zoomed:t.zoomed===null?null:e}))},swap:(e,n)=>{!a(e)||!a(n)||!t().participating.has(e)||!t().participating.has(n)||r(t=>({...t,tiles:t.tiles.map(t=>t===e?n:t===n?e:t)}))},zoom:e=>{e!==null&&(!a(e)||!t().participating.has(e))||r(t=>({...t,zoomed:e,order:e===null?t.order:[...t.order.filter(t=>t!==e),e]}))},resizeMain:e=>{r(t=>({...t,mainSize:e}))},beginDivider:e=>!t().gesture&&(r(t=>({...t,gesture:{kind:`divider`,pointerId:e,start:t.mainSize}})),!0),finishDivider:(e,n)=>{let i=t().gesture;i?.kind===`divider`&&i.pointerId===e&&r(e=>({...e,gesture:null,mainSize:n?i.start:e.mainSize}))},destroy:()=>{r(e=>({...e,gesture:null,restore:new Map}))}}};function Fme(e,t,n,r,i){let a=i.layout??`main-left`;if(a===`columns`||a===`rows`||a===`grid`)return Ime(e,t,n,r,i,a);if(a===`main-top`){let a=PD(e,new Map([...t].map(([e,t])=>[e,{width:t.height,height:t.width}])),n,{width:r.height,height:r.width},i);return{frames:new Map([...a.frames].map(([e,t])=>[e,{x:t.y,y:t.x,width:t.height,height:t.width}])),tabGroups:a.tabGroups,divider:a.divider&&{...a.divider,axis:`y`}}}return PD(e,t,n,r,i)}function Ime(e,t,n,r,i,a){let o=new Map,s=[];if(!e.length)return{frames:o,tabGroups:s,divider:null};let c=Math.max(0,i.gap??8),l=e.reduce((e,n)=>({width:Math.max(e.width,t.get(n)?.width??0),height:Math.max(e.height,t.get(n)?.height??0)}),{width:0,height:0}),u=(t,n)=>n+c===0?e.length:Math.min(e.length,Math.max(1,Math.floor((t+c)/(n+c)))),d=u(r.width,l.width),f=u(r.height,l.height),p=l.width>r.width||l.height>r.height?1:a===`columns`?d:a===`rows`?f:Math.min(e.length,d*f),m=a===`columns`?p:a===`rows`?1:Math.min(d,Math.max(Math.ceil(Math.sqrt(p)),Math.ceil(p/f))),h=Math.ceil(p/m),g=(r.width-c*(m-1))/m,_=(r.height-c*(h-1))/h;for(let t=0;t<p;t++){let r=e.slice(t,t===p-1?void 0:t+1),i=r.length===1?r[0]:[...n].reverse().find(e=>r.includes(e))??r[0];i&&o.set(i,{x:t%m*(g+c),y:Math.floor(t/m)*(_+c),width:g,height:_}),r.length>1&&s.push(r)}return{frames:o,tabGroups:s,divider:null}}function PD(e,t,n,r,i){let a=new Map,o=[],s={x:0,y:0,...r},[c,...l]=e,u=(e,t)=>{let r=[...n].reverse().find(t=>e.includes(t))??e[0];r&&a.set(r,t),e.length>1&&o.push(e)};if(!c)return{frames:a,tabGroups:o,divider:null};if(!l.length)return a.set(c,s),{frames:a,tabGroups:o,divider:null};let d=Math.max(0,i.gap??8),f=t.get(c)?.width??0,p=Math.max(...l.map(e=>t.get(e)?.width??0)),m=r.width-d-p;if(f>m)return u([...e],s),{frames:a,tabGroups:o,divider:null};let h=Math.min(m,Math.max(f,i.mainSize??r.width/2)),g={axis:`x`,position:h,min:f,max:m};a.set(c,{...s,width:h});let _={...s,x:h+d,width:r.width-h-d},v=l.map(e=>t.get(e)?.height??0).reduce((e,t)=>e+t,0)+d*(l.length-1);if(v>r.height)u(l,_);else{let e=(r.height-v)/l.length,n=0;for(let r of l){let i=(t.get(r)?.height??0)+e;a.set(r,{..._,y:n,height:i}),n+=i+d}}return{frames:a,tabGroups:o,divider:g}}function FD(e,t=!0,n){let r=(0,I.useRef)(e);r.current=e;let i=(0,I.useRef)(null);return(0,I.useEffect)(()=>(t||i.current?.release(!0),()=>i.current?.release(!0)),[t]),(0,I.useEffect)(()=>{let e=()=>{i.current?.release(!0)};return n?.addEventListener(`abort`,e),()=>{n?.removeEventListener(`abort`,e)}},[n]),{onPointerDown:e=>{if(!t||n?.aborted||i.current||e.pointerType===`mouse`&&e.button!==0)return;let{currentTarget:a,pointerId:o}=e;if(a.setPointerCapture(o),!r.current.begin(e)){a.releasePointerCapture(o);return}let s=r.current.end,c=()=>{l(!0)},l=e=>{a.removeEventListener(`lostpointercapture`,c),i.current=null,s(e),a.hasPointerCapture(o)&&a.releasePointerCapture(o)};i.current={id:o,element:a,x:e.clientX,y:e.clientY,release:l},a.addEventListener(`lostpointercapture`,c)},onPointerMove:e=>{let t=i.current;t?.id===e.pointerId&&(r.current.move(e.clientX-t.x,e.clientY-t.y,e),t.x=e.clientX,t.y=e.clientY)},onPointerUp:e=>{i.current?.id===e.pointerId&&i.current.release(!1)},onPointerCancel:e=>{i.current?.id===e.pointerId&&i.current.release(!0)}}}function Lme(e,t){return e.x<20?e.y<20?`top-left`:e.y>t.height-20?`bottom-left`:`left`:e.x>t.width-20?e.y<20?`top-right`:e.y>t.height-20?`bottom-right`:`right`:null}var ID=(0,I.createContext)(null);function Rme({bounds:e,tiling:t,containerRef:n,children:r}){let i=(0,I.useMemo)(Pme,[]);(0,I.useSyncExternalStore)(i.subscribe,()=>i.version,()=>i.version),(0,I.useEffect)(()=>()=>{i.destroy()},[i]);let a={...t};i.mainSize!==void 0&&(a.mainSize=i.mainSize);let o=t?Fme(i.tiles,i.minima,i.order,e,a):{frames:new Map([...i.frames].filter(([e])=>i.participating.has(e)).map(([t,n])=>[t,MD(n,e,i.minima.get(t)??{width:0,height:0})])),tabGroups:[],divider:null};return i.zoomed&&i.participating.has(i.zoomed)&&(o.frames=new Map([[i.zoomed,{x:0,y:0,...e}]]),o.divider=null,o.tabGroups=[]),(0,F.jsx)(ID.Provider,{value:{state:i,bounds:e,tiled:t!==void 0,arrangement:o,containerRef:n},children:r})}function LD(){let e=(0,I.useContext)(ID);if(!e)throw Error(`Maosaico hooks must be used within MaosaicoRoot`);return e}function zme(){let{state:e,arrangement:t,tiled:n,bounds:r}=LD(),i=e.tiles,a=(0,I.useRef)({pointer:0,position:0}),o=t.divider,s=FD({begin:t=>!o||!e.beginDivider(t.pointerId)?!1:(a.current={pointer:t.pointerId,position:o.position},!0),move:(t,n)=>{o&&(a.current.position=Math.min(o.max,Math.max(o.min,a.current.position+(o.axis===`x`?t:n))),e.resizeMain(a.current.position))},end:t=>{e.finishDivider(a.current.pointer,t)}},o!==null);return{bounds:r,stackingStyle:{zIndex:e.order.length},mode:n?`tiled`:`floating`,order:i,interacting:e.gesture!==null,snapPreview:!n&&!e.zoomed&&e.gesture?.kind===`frame`?e.gesture.snap??null:null,activeId:e.order.at(-1)??null,zoomedId:e.zoomed,tabGroups:t.tabGroups,divider:o&&{...o,props:s},focus:e.focus,swap:e.swap,zoom:e.zoom,resizeMain:t=>{o&&e.resizeMain(Math.min(o.max,Math.max(o.min,t)))}}}function Bme(e,t={}){let{state:n,bounds:r,tiled:i,arrangement:a,containerRef:o}=LD();(0,I.useLayoutEffect)(()=>(n.register(e.id,e.frame,e.minima),()=>{n.unregister(e.id)}),[n,e.id]),(0,I.useEffect)(()=>{n.setMinima(e.id,e.minima)},[n,e.id,e.minima.width,e.minima.height]);let s=t.participating??!0;(0,I.useLayoutEffect)(()=>{n.setParticipation(e.id,s)},[n,e.id,s]);let c=(0,I.useRef)(0),l=FD({begin:t=>!n.frames.has(e.id)||n.gesture?!1:(c.current=t.pointerId,n.begin(e.id,t.pointerId),!0),move:(i,a,s)=>{let l=o?.current?.getBoundingClientRect(),u=l&&t.kind!==`resize`?Lme({x:s.clientX-l.left,y:s.clientY-l.top},r):null,d=MD(n.frames.get(e.id)??e.frame,r,e.minima);n.move(e.id,c.current,t.kind===`resize`?{...d,width:d.width+i,height:d.height+a}:{...d,x:d.x+i,y:d.y+a},r,e.minima,u)},end:t=>{t?n.cancel(e.id,c.current):n.end(e.id,c.current)}},s&&!i&&!n.zoomed);return{frame:a.frames.get(e.id)??n.frames.get(e.id)??e.frame,stackingStyle:{zIndex:Math.max(0,n.order.indexOf(e.id))},visible:a.frames.has(e.id),active:s&&n.order.at(-1)===e.id,props:l,focus:()=>{s&&n.focus(e.id)},snap:t=>{s&&!i&&n.snap(e.id,t,r,e.minima)},restore:()=>{s&&!i&&n.restoreFrame(e.id,r,e.minima)}}}var Vme=(0,I.createContext)(null);(0,I.forwardRef)(function({layer:e,style:t,children:n,...r},i){let a=(0,I.useContext)(Vme),o=a?.update,s=a?.roots.get(`dialog`),[c,l]=(0,I.useState)(!1);(0,I.useEffect)(()=>{if(!s)return;let e=()=>{l(Array.from(s.querySelectorAll(`*`)).some(e=>{let t=e.getBoundingClientRect();return t.width>0&&t.height>0}))};e();let t=new MutationObserver(e);return t.observe(s,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[s]);let u=(0,I.useRef)(null);(0,I.useImperativeHandle)(i,()=>u.current);let d=(0,I.useCallback)(t=>{u.current=t,o?.(e,t)},[o,e]);return(0,I.createElement)(`div`,{...r,ref:d,onFocusCapture:t=>{e===`windows`&&t.target instanceof Node&&t.currentTarget.contains(t.target)&&a?.dismiss?.(),r.onFocusCapture?.(t)},"data-maosaico-layer":e,inert:e===`windows`&&c?``:void 0,style:{position:`relative`,...t,isolation:`isolate`,zIndex:`var(--stipe-layer-${e})`}},n)});var Hme={xs:`size-3`,sm:`size-[var(--stipe-icon-size-sm)]`,md:`size-[var(--stipe-icon-size-md)]`,lg:`size-[var(--stipe-icon-size-lg)]`},RD=(0,I.forwardRef)(function({active:e=!1,icon:t,iconSize:n=`xs`,className:r,reveal:i=!1,size:a=`xs`,tone:o=`default`,variant:s=`ghost`,...c},l){let u=a===`responsive`;return(0,F.jsx)(ZE,{...c,resultLabel:c.result===void 0?void 0:null,ref:l,size:u?`sm`:a,variant:s,className:Dd(`caps-icon-button btn-circle`,u&&`caps-icon-button-responsive md:btn-xs`,e&&`text-accent`,i&&`scale-0 transition-transform group-hover:scale-100 focus-visible:scale-100`,o===`destructive`&&`hover:text-error`,r),children:(0,F.jsx)(`span`,{"aria-hidden":`true`,className:Dd(`inline-flex shrink-0 [&>svg]:size-full [&>svg]:[stroke-width:var(--stipe-icon-stroke)]`,Hme[n]),children:t})})}),Ume=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`div`,{...t,ref:n,className:Dd(`caps-popover-anchor`,e)})}),Wme=(0,I.forwardRef)(function({className:e,open:t,side:n=`top`,...r},i){return t?(0,F.jsx)(`div`,{...r,ref:i,className:Dd(`caps-popover`,e),"data-side":n}):null});(0,I.forwardRef)(function({active:e,className:t,onMouseDown:n,...r},i){return(0,F.jsx)(`div`,{role:`option`,"aria-selected":e,...r,ref:i,className:Dd(`caps-popover-option`,t),"data-active":e,onMouseDown:e=>{e.preventDefault(),n?.(e)}})});function Gme({items:e,openId:t,onOpenChange:n,leading:r,trailing:i,renderTrigger:a,placement:o=`housing`,align:s=`end`,hostInset:c,className:l,...u}){let d=(0,I.useId)(),f=(0,I.useRef)(null),p=(0,I.useRef)(null),m=(0,I.useRef)(new Map),h=e.find(e=>e.id===t&&!e.disabled),g=h?.id,_=()=>{g&&m.current.get(g)?.focus(),n(null)};return(0,I.useEffect)(()=>{g&&p.current?.focus()},[g]),(0,I.useEffect)(()=>{c===void 0?f.current?.style.removeProperty(`--caps-status-tray-host-inset`):f.current?.style.setProperty(`--caps-status-tray-host-inset`,`${String(Math.max(0,c))}px`)},[c]),(0,I.useEffect)(()=>{if(!g)return;let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),m.current.get(g)?.focus(),n(null))},t=e=>{!(e.target instanceof Node)||f.current?.contains(e.target)||f.current?.querySelector(`[aria-haspopup="menu"][aria-expanded="true"]`)||n(null)};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t,!0)}},[g,n]),(0,F.jsxs)(Ume,{...u,ref:f,className:Dd(`caps-status-tray`,l),"data-placement":o,"data-align":s,children:[h?(0,F.jsxs)(Wme,{open:!0,ref:p,tabIndex:-1,side:`top`,id:`${d}-${h.id}`,role:`dialog`,"aria-labelledby":`${d}-title`,className:`caps-status-tray-panel`,"data-status-tray-panel":h.id,children:[(0,F.jsxs)(`div`,{className:`caps-status-tray-head`,children:[h.tone?(0,F.jsx)(vm,{size:`compact`,tone:h.tone,glyph:h.glyph??`dot`}):null,(0,F.jsx)(`span`,{id:`${d}-title`,className:`caps-status-tray-title`,children:h.title??h.label}),h.actions,(0,F.jsx)(RD,{"aria-label":`Close tray`,icon:(0,F.jsx)(dr,{"aria-hidden":`true`}),onClick:_})]}),(0,F.jsx)(`div`,{className:`caps-status-tray-body`,children:h.content})]}):null,o===`host`?null:(0,F.jsxs)(`div`,{className:`caps-status-tray-row`,children:[r,(0,F.jsx)(`div`,{className:`caps-status-tray-chips`,children:e.map(e=>{let r={ref:t=>{t?m.current.set(e.id,t):m.current.delete(e.id)},type:`button`,className:a?void 0:`caps-status-tray-chip`,"aria-expanded":g===e.id,"aria-controls":g===e.id?`${d}-${e.id}`:void 0,"aria-label":e.accessibleLabel,disabled:e.disabled,title:e.disabled?e.accessibleLabel:void 0,"aria-haspopup":`dialog`,"data-status-tray-chip":e.id,onClick:()=>{n(t===e.id?null:e.id)},children:(0,F.jsxs)(F.Fragment,{children:[e.tone?(0,F.jsx)(vm,{size:`compact`,glyph:e.glyph??`dot`,motion:e.motion??`none`,tone:e.tone}):null,(0,F.jsx)(`span`,{className:`caps-status-tray-label`,children:e.label}),e.count!==void 0&&e.count>0?(0,F.jsx)(`span`,{className:`caps-status-tray-count`,children:e.count}):null]})};return(0,F.jsxs)(I.Fragment,{children:[a?a(r):(0,F.jsx)(`button`,{...r}),e.after]},e.id)})}),i]})]})}function Kme({children:e,className:t,...n}){return(0,F.jsx)(`div`,{...n,className:Dd(`caps-status-tray-list`,t),children:e})}function zD({icon:e,primary:t,secondary:n,actions:r,className:i,...a}){return(0,F.jsxs)(`div`,{...a,className:Dd(`caps-status-tray-item`,i),children:[e?(0,F.jsx)(`span`,{className:`caps-status-tray-icon`,children:e}):null,(0,F.jsxs)(`span`,{className:`caps-status-tray-text`,children:[(0,F.jsx)(`span`,{className:`caps-status-tray-primary`,children:t}),n?(0,F.jsx)(`span`,{className:`caps-status-tray-secondary`,children:n}):null]}),r?(0,F.jsx)(`span`,{className:`caps-status-tray-actions`,children:r}):null]})}function BD({children:e=`All caught up.`,title:t}){return(0,F.jsxs)(`div`,{className:`caps-status-tray-note`,children:[t?(0,F.jsx)(`strong`,{className:`caps-status-tray-note-title`,children:t}):null,(0,F.jsx)(`p`,{children:e})]})}function qme({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function VD(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var HD=[],UD=0,{link:WD,unlink:Jme,propagate:Yme,checkDirty:GD,shallowPropagate:KD}=qme({update(e){return e._update()},notify(e){HD[JD++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,QD(e))}}),qD=0,JD=0,YD,XD=0;function ZD(e){try{++XD,e()}finally{--XD||$D()}}function QD(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Jme(n,e)}function $D(){if(!(XD>0)){for(;qD<JD;){let e=HD[qD];HD[qD++]=void 0,e.notify()}qD=0,JD=0}}function eO(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return YD!==void 0&&WD(i,YD,UD),i._snapshot},subscribe(e){let t=VD(e),n={current:!1},r=Xme(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=YD,o=t?.compare??Object.is;if(n)YD=i,++UD,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{YD=a,n&&(i.flags&=-5),QD(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&GD(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&KD(e)}}else e&32&&(i.flags=e&-33);return YD!==void 0&&WD(i,YD,UD),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Yme(e),KD(e),$D())}},i}function Xme(e){let t=()=>{let t=YD;YD=n,++UD,n.depsTail=void 0,n.flags=6;try{return e()}finally{YD=t,n.flags&=-5,QD(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&GD(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,QD(this)}};return t(),n}var tO=class{constructor(e,t){this.atom=eO(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(VD(e))}},Zme=class{constructor(e){this.atom=eO(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(VD(e))}};function nO(e,t){return typeof e==`function`?new Zme(e):t?new tO(e,t):new tO(e)}var Qme=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function $me(e,t){return new Qme(e,t).maybeExecute}var ehe=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},rO=new class extends ehe{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function iO(e,t){return typeof e==`function`?e(t):e}function aO(e,t){return dO(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function oO(e,t,n){let r=dO(t);function i(e){if(!r.length)return iO(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function the(e,t){let n=dO(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var sO=46,cO=91,lO=93,uO=48,nhe=57;function dO(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===cO),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===sO||s===cO||s===lO){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==uO),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==lO&&(a!==-1||s!==lO)&&(a!==s||s!==sO&&s!==cO)&&n.push(``);r=o+1,i=!0}else(s<uO||s>nhe)&&(i=!1);a=s}return n.length||n.push(``),n}function rhe(e){return!(Array.isArray(e)&&e.length===0)}function fO(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function pO(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var mO=e=>!!e&&typeof e==`object`&&`fields`in e;function hO(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!hO(e[i],t[i]))return!1;return!0}var gO=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},_O=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function vO(e,t){return e==null?t:{...e,...t}}for(var yO=256,bO=[],xO;yO--;)bO[yO]=(yO+256).toString(16).substring(1);function SO(){let e=0,t,n=``;if(!xO||yO+16>256){for(xO=Array(256),e=256;e--;)xO[e]=256*Math.random()|0;e=0,yO=0}for(;e<16;e++)t=xO[yO+e],n+=e===6?bO[t&15|64]:e===8?bO[t&63|128]:bO[t],e&1&&e>1&&e<11&&(n+=`-`);return yO++,n}var ihe=$me(e=>rO.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function CO(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=CO(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,CO(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(CO(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=CO(e[n]));return t}function wO(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var TO=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function ahe(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var EO=(e,t)=>{let n=ahe(e,t);return{form:n,fields:n}},DO={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:EO(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:EO(r.issues,e)}},OO=e=>!!e&&`~standard`in e,kO={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function AO(e){function t(t){let n=e.getFieldMeta(t)??kO;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>kO;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function jO(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var MO=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{ihe(this)}),t=rO.on(`request-form-state`,e=>{e.payload.id===this._formId&&rO.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=rO.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=rO.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),rO.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return rO.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!hO(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!hO(e.defaultState,t.defaultState)&&!this.state.isTouched;if(!(!n&&!r)){if(ZD(()=>{this.baseStore.setState(()=>jO(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=AO(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}rO.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=oO(t,e.instance.name,e.instance.options.defaultValue))}),jO({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return ZD(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return ZD(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=fO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||TO}),r=!1,i={};return ZD(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=NO(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=PO(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??kO,r=a?.[e],{newErrorValue:s,newSource:c}=gO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=kO)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=PO(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=PO(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=pO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||TO});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=PO(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=NO(r);s&&(i=i?{...i,...s}:s);let c=PO(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??kO,r=i?.[e],{newErrorValue:a,newSource:o}=gO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=kO)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),ZD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}ZD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),ZD(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>aO(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:iO(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=kO,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;ZD(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:oO(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t!==n&&t.startsWith(n)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=the(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),AO(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],vO(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),AO(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),vO(r,{dontValidate:!0})),AO(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),vO(n,{dontValidate:!0})),AO(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return oO(oO(e,`${t}`,i),`${n}`,r)},vO(r,{dontValidate:!0})),AO(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},vO(r,{dontValidate:!0})),AO(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],vO(t,{dontValidate:!0})),AO(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=aO(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:kO},values:i===void 0?t.values:oO(t.values,e,i)}})},this.setErrorMap=e=>{ZD(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(mO(t)){let{formError:e,fieldErrors:r}=NO(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>DO.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>DO.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??SO(),this._devtoolsSubmissionOverride=!1;let t=jO({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!mO(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=nO(t);let n;this.fieldMetaDerived=nO(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=aO(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!rhe(u),f=!o.isDirty,p=hO(l,this.getFieldInfo(a)?.instance?.options.defaultValue??aO(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=nO(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!wO(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&wO(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];(!y||y.__srcErrorMap!==g)&&(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=nO(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&mO(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&hO(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return OO(e.validate)?DO[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function NO(e){return e?mO(e)?{formError:NO(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function PO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var FO=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...kO,isTouched:e.fieldMetaBase[this.name]?.isTouched??kO.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??kO.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??kO.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(hO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,vO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,vO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,vO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,vO(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=fO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||TO}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=fO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;ZD(()=>{let e=(e,n)=>{let r=LO(n.cause),a=n.validate?IO(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=_O({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=LO(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=pO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||TO}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=pO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));ZD(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=LO(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=IO(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=_O({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),ZD(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>wO(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[LO(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[LO(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)a.get(t)&&!t.options.asyncAlways||c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>DO.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>DO.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)wO(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=nO(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...kO,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!hO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return OO(e.validate)?DO[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function IO(e){if(e)return e}function LO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function RO(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function ohe(e){return{...kO,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var zO=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??RO({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(hO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...kO,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??RO({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;VO(t)&&(n=t.group,r=t.fields);let i=BO(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:RO({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,vO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof FO&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&wO(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=gO({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=kO)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=fO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||TO}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=fO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;ZD(()=>{let t=(t,r)=>{let i=UO(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&VO(s)&&(c=s.group,l=s.fields);let u=BO(c),d=n[i],{newErrorValue:f,newSource:p}=_O({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=UO(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=pO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||TO}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=pO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=UO(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&VO(o)&&(l=o.group,u=o.fields);let d=BO(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=_O({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return ZD(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>wO(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[UO(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>wO(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),ZD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid()){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}ZD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),ZD(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=nO(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??ohe(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!hO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(OO(e.validate)){let t=DO[e.type](e.value,e.validate);return e.type===`validate`?HO(t):t.then(HO)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function BO(e){if(e)return e}function VO(e){return!!e&&typeof e==`object`&&`fields`in e}function HO(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function UO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function WO(e,t){if(!t)return;let n=Object.assign({},e,{state:CO(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return ZD(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var GO=o((e=>{var t=un();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),KO=o(((e,t)=>{t.exports=GO()})),qO=o((e=>{var t=un(),n=KO();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),JO=o(((e,t)=>{t.exports=qO()}))();function YO(e,t){return e===t}function XO(e,t=e=>e,n){let r=n?.compare??YO,i=(0,I.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,I.useCallback)(()=>e.get(),[e]);return(0,JO.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var ZO=typeof window<`u`?I.useLayoutEffect:I.useEffect;function QO(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new FO({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new FO({...e}),i(a),n({form:e.form,name:e.name}));let o=XO(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=XO(a.store,e=>e.meta.isTouched),c=XO(a.store,e=>e.meta.isBlurred),l=XO(a.store,e=>e.meta.isDirty),u=XO(a.store,e=>e.meta.errorMap),d=XO(a.store,e=>e.meta.errorSourceMap),f=XO(a.store,e=>e.meta.isValidating),p=(0,I.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return ZO(a.mount,[a]),ZO(()=>{a.update(e)}),p}var $O=(({children:e,...t})=>{let n=QO(t),r=(0,I.useMemo)(()=>iO(e,n),[e,n]);return(0,F.jsx)(F.Fragment,{children:r})});function ek(){return(0,I.useState)(()=>SO())[0]}var tk=I,nk=`18.3.1`.split(`.`)[0]===`17`?ek:tk.useId;function rk(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new zO({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new zO({...e})),n({form:e.form,name:e.name}));let a=XO(r.store,e=>e.value),o=XO(r.store,e=>e.meta.isTouched),s=XO(r.store,e=>e.meta.isBlurred),c=XO(r.store,e=>e.meta.isDirty),l=XO(r.store,e=>e.meta.errorMap),u=XO(r.store,e=>e.meta.errorSourceMap),d=XO(r.store,e=>e.meta.isValidating),f=XO(r.store,e=>e.meta.isSubmitting),p=XO(r.store,e=>e.meta.isSubmitted),m=XO(r.store,e=>e.meta.submissionAttempts),h=XO(r.store,e=>e.meta.isSubmitSuccessful),g=XO(r.store,e=>e.meta.canSubmit),_=XO(r.store,e=>e.meta.isValid),v=XO(r.store,e=>e.meta.isFieldsValid),y=XO(r.store,e=>e.meta.isFieldsValidating),b=XO(r.store,e=>e.meta.isGroupValid),x=(0,I.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:v,isFieldsValidating:y,isGroupValid:b}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]);return ZO(r.mount,[r]),ZO(()=>{r.update(e)}),x}var ik=(({children:e,...t})=>{let n=rk(t),r=(0,I.useMemo)(()=>iO(e,n),[e,n]);return(0,F.jsx)(F.Fragment,{children:r})});function ak({form:e,selector:t=e=>e,children:n}){let r=XO(e.store,t);return(0,F.jsx)(F.Fragment,{children:iO(n,r)})}function ok(e){let t=nk(),[n,r]=(0,I.useState)(e?.formId),[i,a]=(0,I.useState)(()=>new MO({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new MO({...e,formId:n})),r(n)}let o=(0,I.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,F.jsx)($O,{...e,form:i})},e.FormGroup=function(e){return(0,F.jsx)(ik,{...e,form:i})},e.Subscribe=function(e){return(0,F.jsx)(ak,{form:i,selector:e.selector,children:e.children})},e},[i]);ZO(i.mount,[]),ZO(()=>{i.update(e)});let s=(0,I.useRef)(!1);return ZO(()=>{s.current&&e?.transform&&WO(i,e.transform)},[i,e?.transform]),ZO(()=>{s.current=!0}),o}var sk=xb(jb),ck=xb(R({message:jb}));function lk(e){for(let t of e.errors){let e=Km(Wm(Nne(ck(t),e=>e.message),()=>sk(t)));if(e!==void 0&&e.length>0)return e}}var uk=(0,I.forwardRef)(function({children:e,className:t,optional:n,required:r,...i},a){return(0,F.jsxs)(`label`,{...i,className:Dd(`label caps-label cursor-pointer justify-start gap-sm text-sm font-semibold text-base-content`,t),ref:a,children:[e,r?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`text-error`,children:`*`}):null,n&&!r?(0,F.jsx)(`span`,{className:`caps-label-optional`,children:`Optional`}):null]})}),dk=(0,I.forwardRef)(function({children:e,className:t,...n},r){return(0,F.jsx)(`div`,{...n,className:Dd(`caps-input-group join flex w-full items-stretch [&>*]:join-item [&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>.btn]:shrink-0 [&>.input]:min-w-0 [&>.input]:flex-1 [&>.select]:min-w-0 [&>.select]:flex-1`,t),ref:r,children:I.Children.map(e,e=>(0,I.isValidElement)(e)?(0,I.cloneElement)(e,{className:Dd(`join-item caps-input-group-control`,e.props.className)}):e)})}),fk=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`div`,{...t,className:Dd(`join-item flex items-center border border-base-300 bg-base-200 px-md text-sm text-base-content`,e),ref:n})});function pk(e){let t=e.parentElement;if(!t||e.previousElementSibling===null)return 0;let n=getComputedStyle(t);if(!(n.display.includes(`grid`)||n.display.includes(`flex`)&&n.flexDirection.startsWith(`column`)))return 0;let r=Number.parseFloat(n.rowGap);return Number.isFinite(r)?r:0}(0,I.forwardRef)(function({show:e,appear:t=!1,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=Hd(),[c,l]=(0,I.useState)(e),u=(0,I.useRef)(!0);return e&&!c&&l(!0),(0,I.useLayoutEffect)(()=>{let n=o.current,r=u.current;if(u.current=!1,!n||r&&!t)return;if(!Bd(n)){e||l(!1);return}let i=Fd(n),a=`translateY(${String(i.distance)}px)`,c=zd(i,i.ease),d=n.getBoundingClientRect().height,f=pk(n),p=(e,t)=>{n.style.overflow=`clip`;let r=e=>({height:`${String(e)}px`,marginBlockStart:`${String(e===0?-f:0)}px`}),a=n.animate([r(e),r(t)],{duration:i.normal,easing:c}),o=()=>{n.style.removeProperty(`overflow`)};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a};if(e){let e=[n.animate([{opacity:0,transform:a},{opacity:1,transform:`none`}],{duration:i.normal,easing:c})];return!s&&d>0&&e.push(p(0,d)),()=>{for(let t of e)t.cancel()}}let m=n.animate([{opacity:1,transform:`none`},{opacity:0,transform:a}],{duration:i.fast,easing:zd(i,i.easeExit),fill:`forwards`}),h=!s&&d>0?p(d,0):m;return h!==m&&h.effect?.updateTiming({fill:`forwards`}),h.addEventListener(`finish`,()=>{l(!1)}),()=>{m.cancel(),h.cancel()}},[e,t,s]),c?(0,F.jsx)(`div`,{...i,ref:o,className:Dd(`caps-presence`,r),"data-present":e,"aria-hidden":!e||void 0,children:n}):null});var mk=(0,I.forwardRef)(function({open:e,children:t,className:n,...r},i){return(0,F.jsx)(`div`,{...r,ref:i,className:Dd(`caps-collapse`,n),"data-open":e,"aria-hidden":!e||void 0,children:(0,F.jsx)(`div`,{className:`caps-collapse-clip`,children:t})})});(0,I.forwardRef)(function({swapKey:e,anchor:t=`start`,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=Hd(),[c,l]=(0,I.useState)({key:e,content:n}),[u,d]=(0,I.useState)([]);c.key===e?c.content!==n&&l({key:e,content:n}):(d([...u.filter(t=>t.key!==e&&t.key!==c.key),c]),l({key:e,content:n}));let f=(0,I.useRef)(null);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||!(`ResizeObserver`in globalThis))return;f.current=e.getBoundingClientRect();let t=new ResizeObserver(()=>{e.getAnimations().length===0&&(f.current=e.getBoundingClientRect())});return t.observe(e),()=>{t.disconnect()}},[]),(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=[...e.querySelectorAll(`:scope > [data-swap-leaving]`)],n=e.querySelector(`:scope > [data-swap-current]`);if(n===null||t.length===0)return;if(!Bd(e)){d([]);return}let r=f.current,i=e.getBoundingClientRect(),a=Fd(e),c=[n.animate([{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(a.distance/2)}px)`},{opacity:1,filter:`blur(0px)`,transform:`none`}],{duration:a.normal,easing:zd(a,a.ease)})];for(let e of t){let t=e.animate([{opacity:1,filter:`blur(0px)`,transform:`none`},{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(-a.distance/2)}px)`}],{duration:a.fast,easing:zd(a,a.easeExit),fill:`forwards`}),n=e.dataset.swapLeaving;t.onfinish=()=>{d(e=>e.filter(e=>e.key!==n))},c.push(t)}let l=r!==null&&(Math.abs(r.height-i.height)>.5||Math.abs(r.width-i.width)>.5);return!s&&l&&c.push(e.animate([{width:`${String(r.width)}px`,height:`${String(r.height)}px`},{width:`${String(i.width)}px`,height:`${String(i.height)}px`}],{duration:a.normal,easing:zd(a,a.ease)})),()=>{for(let e of c)e.cancel()}},[e,s]),(0,F.jsx)(`div`,{...i,ref:o,className:Dd(`caps-swap`,r),"data-anchor":t,children:[...u.map(e=>(0,F.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-leaving":e.key,"aria-hidden":`true`,children:e.content},e.key)),(0,F.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-current":``,children:n},e)]})});function hk({children:e,...t}){let[n,r]=(0,I.useState)(e);return e&&e!==n&&r(e),(0,F.jsx)(mk,{...t,className:Dd(`caps-field-error-reveal`,t.className),open:!!e,children:(0,F.jsx)(`div`,{className:`caps-field-error`,role:`alert`,"aria-hidden":!e,children:n})})}function gk({children:e,divider:t=!0,error:n,layout:r=`end`,status:i,...a}){return(0,F.jsxs)(`footer`,{...a,className:Dd(`caps-form-footer`,a.className),"data-divider":t,"data-layout":r,children:[(0,F.jsx)(hk,{children:n}),(0,F.jsxs)(`div`,{className:`caps-form-footer-row`,children:[i?(0,F.jsx)(`div`,{className:`caps-form-footer-status`,role:`status`,children:i}):null,(0,F.jsx)(`div`,{className:`caps-form-footer-actions`,children:e})]})]})}var _k=(0,I.forwardRef)(function({busy:e=!1,children:t,className:n,layout:r,...i},a){return(0,F.jsx)(`form`,{...i,"aria-busy":e||void 0,className:Dd(`caps-form`,n),"data-layout":r,ref:a,children:(0,F.jsx)(`fieldset`,{className:`caps-form-body`,disabled:e,children:t})})}),vk={2:`h2`,3:`h3`,4:`h4`},yk=(0,I.forwardRef)(function({children:e,className:t,description:n,layout:r,level:i=3,title:a,...o},s){let c=(0,I.useId)(),l=vk[i];return(0,F.jsxs)(`section`,{...o,"aria-labelledby":`${c}-title`,className:Dd(`caps-form-section`,t),"data-layout":r,ref:s,children:[(0,F.jsxs)(`header`,{className:`caps-form-section-copy`,children:[(0,F.jsx)(l,{className:`caps-form-section-title`,id:`${c}-title`,children:a}),n?(0,F.jsx)(`p`,{className:`caps-form-section-description`,children:n}):null]}),(0,F.jsx)(`div`,{className:`caps-form-section-fields`,children:e})]})}),bk=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,layout:a,legend:o,legendTitle:s,...c},l){let u=(0,I.useId)(),d=[n?`${u}-description`:c[`aria-describedby`],r?`${u}-error`:null].filter(Boolean).join(` `)||void 0;return(0,F.jsxs)(`fieldset`,{...c,"aria-describedby":d,"aria-invalid":r?!0:c[`aria-invalid`],className:Dd(`caps-fieldset`,t),"data-layout":a,ref:l,children:[(0,F.jsxs)(`legend`,{className:`caps-fieldset-legend`,title:s,children:[i?(0,F.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}):null,o]}),n?(0,F.jsx)(`p`,{className:`caps-fieldset-description`,id:`${u}-description`,children:n}):null,(0,F.jsx)(`div`,{className:`caps-fieldset-fields`,children:e}),r===void 0?null:(0,F.jsx)(hk,{id:`${u}-error`,children:r})]})});function xk(e){let t=[];return I.Children.forEach(e.props.children,e=>{(0,I.isValidElement)(e)&&e.type!==fk&&t.push(e)}),t[0]??null}var Sk=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,label:a,labelTitle:o,optional:s,orientation:c=`vertical`,readout:l=!1,required:u,...d},f){let p=(0,I.useId)(),m=(0,I.isValidElement)(e)?e:null,h=m?.type===dk,g=h?xk(m):m,_=g?.props.id??p,v=`${_}-description`,y=`${_}-error`,b=[g?.props[`aria-describedby`],n?v:null,r?y:null].filter(Boolean).join(` `)||void 0,x=u===!0||g?.props.required,S=r?!0:g?.props[`aria-invalid`],C=u===!0||g?.props[`aria-required`],w={id:_};x!==void 0&&(w.required=x),b!==void 0&&(w[`aria-describedby`]=b),S!==void 0&&(w[`aria-invalid`]=S),C!==void 0&&(w[`aria-required`]=C);let T=m&&g&&!l?h?(0,I.cloneElement)(m,void 0,I.Children.map(m.props.children,e=>e===g?(0,I.cloneElement)(g,w):e)):(0,I.cloneElement)(m,w):e,E=a?(0,F.jsx)(uk,{htmlFor:l?void 0:_,title:o,className:c===`inline`?`font-normal`:void 0,...u===void 0?{}:{required:u},...s===void 0?{}:{optional:s},children:a}):null,D=a||n?(0,F.jsxs)(`div`,{className:`caps-field-copy`,children:[E,n?(0,F.jsx)(`p`,{className:`caps-field-description`,id:v,children:n}):null]}):null,O=i?(0,F.jsxs)(`div`,{className:`caps-field-lead`,children:[(0,F.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}),D]}):D;return(0,F.jsxs)(`div`,{...d,className:Dd(`caps-field`,t),"data-orientation":c,ref:f,children:[c===`horizontal`?(0,F.jsxs)(`div`,{className:`caps-field-row`,children:[O,T]}):c===`inline`?(0,F.jsxs)(`div`,{className:`caps-field-row`,children:[T,O]}):(0,F.jsxs)(F.Fragment,{children:[O,T]}),(0,F.jsx)(hk,{id:y,children:r})]})});function Ck(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}var wk=`M 9.86 38.14 A 20 20 0 1 1 38.14 38.14`,Tk=6,Ek=new Map([[`ArrowUp`,1],[`ArrowDown`,-1],[`PageUp`,10],[`PageDown`,-10]]),Dk=(0,I.forwardRef)(function({className:e,decrementLabel:t=`Decrease`,defaultValue:n=null,disabled:r,incrementLabel:i=`Increase`,invalid:a,max:o,min:s,onBlur:c,onKeyDown:l,onValueChange:u,step:d=1,unit:f,value:p,wrap:m=!1,...h},g){let[_,v]=(0,I.useState)(n),[y,b]=(0,I.useState)(null),x=p===void 0?_:p,S=Ck(d),C=e=>{let t=Number(e.toFixed(S));return s!==void 0&&t<s?s:o!==void 0&&t>o?o:t},w=e=>{let t=e===null?null:C(e);v(t),b(null),t!==x&&u?.(t)},T=()=>{if(y===null)return;let e=Number(y);w(y.trim()===``||!Number.isFinite(e)?null:e)},E=e=>{let t=(x??s??0)+e*d;if(m&&s!==void 0&&o!==void 0){if(t>o){w(s);return}if(t<s){w(o);return}}w(t)},D=s!==void 0&&x!==null&&x<=s,O=o!==void 0&&x!==null&&x>=o,k=r===!0,A=(0,I.useRef)(null),j=s!==void 0&&o!==void 0&&o>s?((x??s)-s)/(o-s):null,M=e=>{k||(e.currentTarget.setPointerCapture(e.pointerId),A.current={y:e.clientY,value:x??s??0})},N=e=>{if(!A.current)return;let t=Math.trunc((A.current.y-e.clientY)/Tk),n=C(A.current.value+t*d);n!==x&&w(n)},P=()=>{A.current=null};return(0,F.jsxs)(`span`,{className:Dd(`caps-number-field`,e),"data-at-max":O||void 0,"data-at-min":D||void 0,"data-disabled":k||void 0,"data-wrap":m||void 0,children:[j===null?null:(0,F.jsxs)(`svg`,{className:`caps-number-field-dial`,viewBox:`0 0 48 48`,"aria-hidden":`true`,focusable:`false`,onPointerDown:M,onPointerMove:N,onPointerUp:P,onPointerCancel:P,children:[(0,F.jsx)(`path`,{className:`caps-number-field-dial-track`,d:wk,pathLength:100}),(0,F.jsx)(`path`,{className:`caps-number-field-dial-level`,d:wk,pathLength:100,strokeDasharray:`${String(Math.max(.5,j*100))} 100`})]}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-decrement`,"aria-label":t,"aria-controls":h.id,tabIndex:-1,disabled:k||D&&!m,onClick:()=>{E(-1)},children:(0,F.jsx)(sr,{"aria-hidden":`true`})}),(0,F.jsxs)(`span`,{className:`caps-number-field-readout`,children:[(0,F.jsx)(`input`,{...h,"aria-invalid":a?!0:h[`aria-invalid`]===!1?void 0:h[`aria-invalid`],className:`input caps-input caps-number-field-input`,disabled:r,inputMode:h.inputMode??(S>0?`decimal`:`numeric`),max:o,min:s,onBlur:e=>{T(),c?.(e)},onChange:e=>{b(e.target.value)},onKeyDown:e=>{if(l?.(e),e.defaultPrevented)return;let t=Ek.get(e.key);t===void 0?e.key===`Home`&&s!==void 0?(e.preventDefault(),w(s)):e.key===`End`&&o!==void 0?(e.preventDefault(),w(o)):e.key===`Enter`&&T():(e.preventDefault(),E(t))},ref:g,step:d,type:`number`,value:y??(x===null?``:String(x))}),f?(0,F.jsx)(`span`,{className:`caps-number-field-unit`,"aria-hidden":`true`,children:f}):null]}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-increment`,"aria-label":i,"aria-controls":h.id,tabIndex:-1,disabled:k||O&&!m,onClick:()=>{E(1)},children:(0,F.jsx)(cr,{"aria-hidden":`true`})})]})}),Ok={neutral:`progress-neutral`,primary:`progress-primary`,secondary:`progress-secondary`,accent:`progress-accent`,success:`progress-success`,info:`progress-info`,warning:`progress-warning`,error:`progress-error`},kk=(0,I.forwardRef)(function({className:e,tone:t=`primary`,...n},r){return(0,F.jsx)(`progress`,{...n,"data-complete":n.value!==void 0&&Number(n.value)>=Number(n.max??1)?`true`:void 0,className:Dd(`progress caps-gooey-motion caps-gooey-progress w-full`,Ok[t],e),ref:r})});(0,I.forwardRef)(function({label:e,value:t,max:n,tone:r=`info`,className:i,...a},o){return(0,F.jsxs)(`div`,{...a,ref:o,className:Dd(`caps-game-meter`,i),children:[(0,F.jsxs)(`div`,{className:`caps-game-meter-readout`,children:[(0,F.jsx)(`span`,{children:e}),(0,F.jsxs)(`span`,{className:`caps-game-meter-value`,children:[t,` / `,n]})]}),(0,F.jsx)(kk,{"aria-label":e,value:t,max:n,tone:r})]})});function Ak({className:e,items:t,onCancel:n,onRemove:r,onRetry:i,rowClassName:a}){return t.length?(0,F.jsx)(`div`,{"aria-live":`polite`,className:`caps-upload-queue flex w-full min-w-0 flex-col gap-sm ${e??``}`,"data-upload-rows":!0,children:t.map(e=>(0,F.jsx)(Nk,{item:e,onCancel:n,onRemove:r,onRetry:i,...a===void 0?{}:{rowClassName:a}},e.id))}):null}function jk({action:e,id:t,onAction:n,retry:r=!1}){return e?(0,F.jsx)(RD,{"aria-label":e.accessibleLabel,title:e.label,variant:`ghost`,size:`xs`,className:`motion-reduce:transition-none`,icon:r?(0,F.jsx)(ur,{}):(0,F.jsx)(dr,{}),onClick:()=>void n(t),type:`button`}):null}function Mk({item:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block min-w-0 truncate`,title:e.name,children:e.name}),(0,F.jsx)(`div`,{className:`caps-upload-details`,children:(0,F.jsxs)(`span`,{"aria-live":e.alert?`assertive`:void 0,className:`caps-upload-status min-w-0 break-words`,"data-upload-status":!0,role:e.alert?`alert`:void 0,children:[e.alert??e.statusLabel,` `,e.progressLabel]})})]})}function Nk({item:e,onCancel:t,onRemove:n,onRetry:r,rowClassName:i}){return(0,F.jsxs)(`div`,{className:`caps-upload-row grid w-full min-w-0 max-w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-sm p-sm text-xs ${i??``}`,children:[e.preview.kind===`image`?(0,F.jsx)(`img`,{alt:``,className:`caps-upload-preview mask mask-squircle size-8 shrink-0 object-cover`,src:e.preview.url}):(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`caps-upload-preview mask mask-squircle flex size-8 shrink-0 items-center justify-center bg-base-300`,children:(0,F.jsx)(or,{className:`size-4`})}),(0,F.jsx)(Mk,{item:e}),(0,F.jsx)(Pk,{actions:e.actions,id:e.id,onCancel:t,onRemove:n,onRetry:r}),(0,F.jsx)(kk,{"aria-label":`${e.name} progress`,className:`caps-upload-progress`,tone:e.alert?`error`:e.progress===100?`success`:`accent`,max:100,value:e.progress??(e.alert?0:void 0)})]})}function Pk({actions:e,id:t,onCancel:n,onRemove:r,onRetry:i}){return(0,F.jsxs)(`div`,{className:`caps-upload-actions flex min-w-0 flex-wrap justify-end gap-xs`,children:[(0,F.jsx)(jk,{action:e.retry,id:t,onAction:i,retry:!0}),(0,F.jsx)(jk,{action:e.cancel,id:t,onAction:n}),(0,F.jsx)(jk,{action:e.remove,id:t,onAction:r})]})}var Fk={unchecked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,checked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,mixed:`M3.4 6 L6 6 L8.6 6`},Ik={blurStdDeviation:.22,alphaSlope:18,alphaIntercept:-8};function Lk({state:e}){let t=`caps-checkbox-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=Hd();return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=e!==`unchecked`,r=i.current!==`unchecked`,o=a||i.current===e;i.current=e;let s=Fd(n.current),c=pm(s,{ease:`inCubic`,duration:160}),l=Qp(n.current,{d:{to:Fk[e],...o?dm:pm(s,{ease:`outCubic`,duration:200})},"stroke-dashoffset":{to:+!t,...o?dm:t?pm(s,{ease:`inOutSine`,duration:260}):c},"stroke-width":o?{to:t?2.4:0,duration:0}:t&&!r?[{to:2.2,...pm(s,{ease:`outCubic`,duration:65})},{to:2.4,delay:Rd(s,120),...fm(s,{bounce:.35,duration:220})}]:{to:t?2.4:0,...c}});return()=>{l.cancel()}},[e,a]),(0,F.jsxs)(`svg`,{className:`caps-checkbox-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,F.jsx)(nm,{id:`${t}-shadow`}),(0,F.jsx)(rm,{id:`${t}-inset`}),(0,F.jsx)(am,{id:`${t}-goo`,values:Ik}),(0,F.jsxs)(`filter`,{id:`${t}-relief`,x:`-25%`,y:`-25%`,width:`150%`,height:`150%`,colorInterpolationFilters:`sRGB`,children:[(0,F.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.28`,result:`relief`}),(0,F.jsx)(`feSpecularLighting`,{in:`relief`,surfaceScale:`1.2`,specularConstant:`0.55`,specularExponent:`18`,lightingColor:`color-mix(in srgb, var(--color-white) calc(var(--depth) * 100%), var(--color-black))`,result:`light`,children:(0,F.jsx)(`feDistantLight`,{azimuth:`225`,elevation:`55`})}),(0,F.jsx)(`feComposite`,{in:`light`,in2:`SourceAlpha`,operator:`in`,result:`clipped-light`}),(0,F.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`clipped-light`,mode:`screen`})]}),(0,F.jsx)(`mask`,{id:`${t}-contour`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`12`,height:`12`,style:{maskType:`alpha`},children:(0,F.jsx)(`path`,{ref:n,d:Fk[r],fill:`none`,stroke:`var(--color-white)`,strokeWidth:r===`unchecked`?0:2.4,pathLength:`1`,strokeDasharray:`1`,strokeDashoffset:+(r===`unchecked`),strokeLinecap:`round`,strokeLinejoin:`round`,filter:e===`mixed`?void 0:`url(#${t}-goo)`})}),(0,F.jsx)(`clipPath`,{id:`${t}-well`,children:(0,F.jsx)(`rect`,{x:`1`,y:`1`,width:`10`,height:`10`,rx:`2.5`})})]}),(0,F.jsx)(`rect`,{className:`caps-checkbox-track`,x:`0.5`,y:`0.5`,width:`11`,height:`11`,rx:`3`,filter:`url(#${t}-inset)`}),(0,F.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,F.jsx)(`g`,{filter:`url(#${t}-shadow)`,children:(0,F.jsx)(`g`,{filter:`url(#${t}-relief)`,children:(0,F.jsx)(`g`,{mask:`url(#${t}-contour)`,children:(0,F.jsx)(`rect`,{x:`0`,y:`0`,width:`12`,height:`12`,fill:`url(#${t}-surface)`})})})})})]})}var Rk=(0,I.forwardRef)(function({className:e,appearance:t,indicator:n,invalid:r,indeterminate:i=!1,checked:a,defaultChecked:o=!1,onChange:s,...c},l){let u=(0,I.useRef)(null),[d,f]=(0,I.useState)(o),p=a??d,m=i?`mixed`:p?`checked`:`unchecked`;return(0,I.useImperativeHandle)(l,()=>{if(!u.current)throw Error(`Checkbox input is not mounted`);return u.current},[]),(0,I.useLayoutEffect)(()=>{u.current&&(u.current.indeterminate=i)},[i]),(0,I.useEffect)(()=>{let e=u.current?.form;if(!e||a!==void 0)return;let t=e=>{queueMicrotask(()=>{!e.defaultPrevented&&u.current&&f(o)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[a,o,c.form]),(0,F.jsxs)(`span`,{className:`caps-checkbox`,"data-appearance":t===`compact`?t:void 0,"data-state":m,"data-custom-indicator":n!==void 0||void 0,children:[(0,F.jsx)(`input`,{...c,checked:p,"aria-checked":i?`mixed`:p,"aria-invalid":r?!0:c[`aria-invalid`]===!1?void 0:c[`aria-invalid`],className:Dd(`caps-checkbox-input`,e),onChange:e=>{a===void 0&&f(e.target.checked),s?.(e),e.currentTarget.indeterminate=i},ref:u,type:`checkbox`}),n===void 0?(0,F.jsx)(Lk,{state:m}):n]})}),zk=Rfe({keyCode:Bfe(229)});function Bk(e){return e.nativeEvent.isComposing||_i(zk,e.nativeEvent).success}var Vk={};function Hk(e,t){let n=I.useRef(Vk);return n.current===Vk&&(n.current=e(t)),n}var Uk=[],Wk=void 0;function Gk(){return Wk}function Kk(e){Uk.push(e)}function qk(e){let t=(t,n)=>{let r=Hk(Yk).current,i;try{Wk=r;for(let e of Uk)e.before(r);i=e(t,n);for(let e of Uk)e.after(r);r.didInitialize=!0}finally{Wk=void 0}return i};return t.displayName=e.displayName||e.name,t}function Jk(e){return I.forwardRef(qk(e))}function Yk(){return{didInitialize:!1}}function Xk(){}var Zk=Object.freeze([]),Qk=Object.freeze({});function $k(e){I.useEffect(e,Zk)}var eA=0,tA=class e{static create(){return new e}currentId=eA;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=eA,t()},e)}isStarted(){return this.currentId!==eA}clear=()=>{this.currentId!==eA&&(clearTimeout(this.currentId),this.currentId=eA)};disposeEffect=()=>this.clear};function nA(){let e=Hk(tA.create).current;return $k(e.disposeEffect),e}var rA=typeof document<`u`?I.useLayoutEffect:()=>{};function iA(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:she,platform:che,maxTouchPoints:lhe}=iA(),aA=she.toLowerCase(),oA=che.toLowerCase(),sA=/^i(os$|p)/.test(oA)||oA===`macintel`&&lhe>1,cA=`android`,lA=oA===cA||aA.includes(cA),uhe=!sA&&oA.startsWith(`mac`);oA.startsWith(`win`),!lA&&/^(linux|chrome os)/.test(oA);var dhe=uhe||sA,uA=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!uA&&aA.includes(`firefox`),!uA&&aA.includes(`chrom`);var fhe=dhe,phe=/jsdom|happydom/.test(aA);function mhe(e){e.preventDefault(),e.stopPropagation()}function hhe(e){return`nativeEvent`in e}function dA(e){return e.pointerType===``&&e.isTrusted?!0:lA&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function fA(e){return phe?!1:!lA&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(lA||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function pA(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function ghe(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function mA(){return typeof window<`u`}function hA(e){return vA(e)?(e.nodeName||``).toLowerCase():`#document`}function gA(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _A(e){return((vA(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function vA(e){return mA()?e instanceof Node||e instanceof gA(e).Node:!1}function yA(e){return mA()?e instanceof Element||e instanceof gA(e).Element:!1}function bA(e){return mA()?e instanceof HTMLElement||e instanceof gA(e).HTMLElement:!1}function xA(e){return!mA()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof gA(e).ShadowRoot}function SA(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kA(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function _he(e){return/^(table|td|th)$/.test(hA(e))}function CA(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var vhe=/transform|translate|scale|rotate|perspective|filter/,yhe=/paint|layout|strict|content/,wA=e=>!!e&&e!==`none`,TA;function EA(e){let t=yA(e)?kA(e):e;return wA(t.transform)||wA(t.translate)||wA(t.scale)||wA(t.rotate)||wA(t.perspective)||!DA()&&(wA(t.backdropFilter)||wA(t.filter))||vhe.test(t.willChange||``)||yhe.test(t.contain||``)}function bhe(e){let t=jA(e);for(;bA(t)&&!OA(t);){if(EA(t))return t;if(CA(t))return null;t=jA(t)}return null}function DA(){return TA??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),TA}function OA(e){return/^(html|body|#document)$/.test(hA(e))}function kA(e){return gA(e).getComputedStyle(e)}function AA(e){return yA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jA(e){if(hA(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||xA(e)&&e.host||_A(e);return xA(t)?t.host:t}function MA(e){let t=jA(e);return OA(t)?(e.ownerDocument||e).body:bA(t)&&SA(t)?t:MA(t)}function NA(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=MA(e),i=r===e.ownerDocument?.body,a=gA(r);if(i){let e=PA(a);return t.concat(a,a.visualViewport||[],SA(r)?r:[],e&&n?NA(e):[])}return t.concat(r,NA(r,[],n))}function PA(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FA(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function IA(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&xA(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function LA(e,t){let n=e;for(;n;){if(yA(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(xA(n)?n.host:null)}return null}function RA(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var xhe=`data-base-ui-focusable`,She=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,zA=`data-starting-style`,Che=`data-ending-style`,whe={[zA]:``},The={[Che]:``},Ehe={transitionStatus(e){return e===`starting`?whe:e===`ending`?The:null}},Dhe=`data-open`,Ohe=`data-closed`,khe=`data-anchor-hidden`,BA=`data-popup-open`,Ahe=`data-pressed`,jhe={[BA]:``},Mhe={[BA]:``,[Ahe]:``},Nhe={[Dhe]:``},Phe={[Ohe]:``},Fhe={[khe]:``},Ihe={open(e){return e?jhe:null}},Lhe={open(e){return e?Mhe:null}},VA={open(e){return e?Nhe:Phe},anchorHidden(e){return e?Fhe:null}},Rhe={...VA,...Ehe},HA=`data-trigger-disabled`;function UA(e,t){if(!yA(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(HA);for(let[,e]of t.entries())if(IA(e,n))return!e.hasAttribute(HA);return!1}function WA(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function zhe(e){return e.matches(`html,body`)}function GA(e){return bA(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Bhe(e){return LA(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${She}`)!=null}function KA(e){return e?e.getAttribute(`role`)===`combobox`&&GA(e):!1}function qA(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Vhe(e,t){return t!=null&&!pA(t)?0:typeof e==`function`?e():e}function JA(e,t,n){let r=Vhe(e,n);return typeof r==`number`?r:r?.[t]}function YA(e){return typeof e==`function`?e():e}function XA(e,t){return t||e===`click`||e===`mousedown`}function Hhe(e){return e?.includes(`mouse`)&&e!==`mousedown`}function ZA(e,t,n,r){let i=!1,a=!1,o=r??Qk;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var Uhe=`none`,QA=`trigger-press`,$A=`trigger-hover`,Whe=`outside-press`,ej=`focus-out`,Ghe=`escape-key`,Khe=`imperative-action`;function tj(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function nj(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function rj(e,t,n,r){let i=Hk(ij).current;return Jhe(i,e,t,n,r)&&aj(i,[e,t,n,r]),i.callback}function qhe(e){let t=Hk(ij).current;return Yhe(t,e)&&aj(t,e),t.callback}function ij(){return{callback:null,cleanup:null,refs:[]}}function Jhe(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Yhe(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function aj(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function oj(e){let t=Hk(Xhe,e).current;return t.next=e,rA(t.effect),t}function Xhe(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var sj={...I},cj=sj.useInsertionEffect,Zhe=cj&&cj!==sj.useLayoutEffect?cj:e=>e();function lj(e){let t=Hk(Qhe).current;return t.next=e,Zhe(t.effect),t.trampoline}function Qhe(){let e={next:void 0,callback:$he,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $he(){}var uj=null;globalThis.requestAnimationFrame;var dj=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},fj=class e{static create(){return new e}static request(e){return dj.request(e)}static cancel(e){return dj.cancel(e)}currentId=uj;request(e){this.cancel(),this.currentId=dj.request(()=>{this.currentId=uj,e()})}cancel=()=>{this.currentId!==uj&&(dj.cancel(this.currentId),this.currentId=uj)};disposeEffect=()=>this.cancel};function pj(){let e=Hk(fj.create).current;return $k(e.disposeEffect),e}function mj(e){return e?.ownerDocument||document}var hj={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ege={...hj,position:`fixed`,margin:0,top:0,left:0};({...hj});var gj=I.forwardRef(function(e,t){let[n,r]=I.useState();rA(()=>{fhe&&uA&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,F.jsx)(`span`,{...e,ref:t,style:ege,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),_j=Math.min,vj=Math.max,yj=Math.round,bj=Math.floor,xj=e=>({x:e,y:e}),tge={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Sj(e,t,n){return vj(e,_j(t,n))}function Cj(e,t){return typeof e==`function`?e(t):e}function wj(e){return e.split(`-`)[0]}function Tj(e){return e.split(`-`)[1]}function Ej(e){return e===`x`?`y`:`x`}function Dj(e){return e===`y`?`height`:`width`}function Oj(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function kj(e){return Ej(Oj(e))}function nge(e,t,n){n===void 0&&(n=!1);let r=Tj(e),i=kj(e),a=Dj(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Nj(o)),[o,Nj(o)]}function rge(e){let t=Nj(e);return[Aj(e),t,Aj(t)]}function Aj(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var jj=[`left`,`right`],Mj=[`right`,`left`],ige=[`top`,`bottom`],age=[`bottom`,`top`];function oge(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Mj:jj:t?jj:Mj;case`left`:case`right`:return t?ige:age;default:return[]}}function sge(e,t,n,r){let i=Tj(e),a=oge(wj(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Aj)))),a}function Nj(e){let t=wj(e);return tge[t]+e.slice(t.length)}function cge(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Pj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:cge(e)}function Fj(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function lge(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ij(e,t=e?kA(e):null){return!e||!e.isConnected||!t||lge(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var uge=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function dge(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return xA(n)?n.host:null}function Lj(e){for(let t of Array.from(e.children))if(hA(t)===`summary`)return t;return null}function fge(e,t){let n=Lj(t);return!!n&&(e===n||IA(n,e))}function Rj(e){let t=e?hA(e):``;return e!=null&&e.matches(uge)&&(t!==`summary`||e.parentElement!=null&&hA(e.parentElement)===`details`&&Lj(e.parentElement)===e)&&(t!==`details`||Lj(e)==null)&&(t!==`input`||e.type!==`hidden`)}function zj(e){if(!Rj(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=dge(t)){let n=t!==e,r=hA(t)===`slot`;if(t.hasAttribute(`inert`)||n&&hA(t)===`details`&&!t.open&&!fge(e,t)||t.hasAttribute(`hidden`)||!r&&!pge(t,n))return!1}return!0}function pge(e,t){let n=kA(e);return t?n.display!==`none`:Ij(e,n)}function Bj(e){let t=e.tabIndex;if(t<0){let t=hA(e);if(t===`details`||t===`audio`||t===`video`||bA(e)&&e.isContentEditable)return 0}return t}function Vj(e){if(hA(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Hj(e,t){let n=Vj(e);if(!n)return!0;let r=t.find(e=>{let t=Vj(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Vj(e);return t?.name===n.name&&t.form===n.form})===n}function Uj(e){if(bA(e)&&hA(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return bA(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Wj(e,t){Uj(e).forEach(e=>{Rj(e)&&t.push(e),Wj(e,t)})}function Gj(e,t,n){Uj(e).forEach(e=>{bA(e)&&e.matches(t)&&n.push(e),Gj(e,t,n)})}function Kj(e){return zj(e)&&Bj(e)>=0}function qj(e){let t=[];return Wj(e,t),t.filter(zj)}function Jj(e){let t=qj(e);return t.filter(e=>Bj(e)>=0&&Hj(e,t))}function Yj(e,t){let n=Jj(e),r=n.length;if(r===0)return;let i=FA(mj(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Xj(e){return Yj(mj(e).body,1)||e}function Zj(e){return Yj(mj(e).body,-1)||e}function mge(e,t,n){if(!e)return null;let r=[];Wj(mj(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(zj);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!IA(n,o)&&Kj(o)&&Hj(o,a))return o}return r[i]}function Qj(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!IA(n,r)}function hge(e){Jj(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function $j(e){let t=[];Gj(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function eM(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...eM(e,t.id,n)])}function tM(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function nM(e){return`data-base-ui-${e}`}var rM=0;function iM(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(rM);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Xk;let o=requestAnimationFrame(a);return rM=o,()=>{rM===o&&(cancelAnimationFrame(o),rM=0)}}var aM=`data-base-ui-inert`,oM=new WeakMap,sM=new WeakSet,cM=new WeakMap,lM=0;function uM(e){return e?xA(e)?e.host:uM(e.parentNode):null}var dM=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=uM(t);return e.contains(n)?n:null}).filter(e=>e!=null),fM=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},pM=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{hA(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function gge(e,t,n,{mark:r=!0}){let i=dM(t,e),a=r?pM(t,fM(i),new Set(i)):[],o=[],s=[];if(n){let e=dM(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);pM(t,fM(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(oM.get(e)||0)+1;oM.set(e,r),o.push(e),r===1&&n&&sM.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(cM.get(e)||0)+1;cM.set(e,t),s.push(e),t===1&&e.setAttribute(aM,``)}),lM+=1,()=>{o.forEach(e=>{let t=(oM.get(e)||0)-1;oM.set(e,t),t||(sM.has(e)||e.removeAttribute(`aria-hidden`),sM.delete(e))}),r&&s.forEach(e=>{let t=(cM.get(e)||0)-1;cM.set(e,t),t||e.removeAttribute(aM)}),--lM,lM||(oM=new WeakMap,sM=new WeakSet,cM=new WeakMap)}}function mM(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=mj(e[0]).body;return gge(e,i,n,{mark:r})}function hM(){let[,e]=I.useState({});return I.useCallback(()=>{e({})},[])}var gM=0;function _ge(e,t=`mui`){let n=I.useRef(void 0),r=hM(),i=e??n.current;return I.useEffect(()=>{n.current??(gM+=1,n.current=`${t}-${gM}`,e??r())},[e,t,r]),i}var _M=sj.useId;function vM(e,t){if(_M!==void 0){let n=_M();return e??(t?`${t}-${n}`:n)}return _ge(e,t)}var vge=18;function yM(e){return vge>=e}function bM(e){if(!I.isValidElement(e))return null;let t=e,n=t.props;return(yM(19)?n?.ref:t.ref)??null}function xM(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function yge(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function bge(e,t){return typeof e==`function`?e(t):e}function xge(e,t){return typeof e==`function`?e(t):e}var SM={};function CM(e,t,n,r,i){if(!n&&!r&&!i&&!e)return wM(t);let a=wM(e);return t&&(a=TM(a,t)),n&&(a=TM(a,n)),r&&(a=TM(a,r)),i&&(a=TM(a,i)),a}function Sge(e){if(e.length===0)return SM;if(e.length===1)return wM(e[0]);let t=wM(e[0]);for(let n=1;n<e.length;n+=1)t=TM(t,e[n]);return t}function wM(e){return DM(e)?{...e(SM)}:Cge(e)}function TM(e,t){return DM(t)?t(e):wge(e,t)}function Cge(e){let t={...e};for(let e in t){let n=t[e];EM(e,n)&&(t[e]=OM(n))}return t}function wge(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=xM(e.style,r);break;case`className`:e[n]=AM(e.className,r);break;default:e[n]=EM(n,r)?Tge(e[n],r):r}}return e}function EM(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function DM(e){return typeof e==`function`}function Tge(e,t){return t?e?(...n)=>{let r=n[0];if(jM(r)){let i=r;kM(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:OM(t):e}function OM(e){return e&&((...t)=>{let n=t[0];return jM(n)&&kM(n),e(...t)})}function kM(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function AM(e,t){return t?e?t+` `+e:t:e}function jM(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function MM(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=kge(r));let i=Ege(t,n,r);if(n.enabled===!1)return null;let a=n.state??Qk;return Age(e,r,i,a)}function Ege(e,t,n){let{className:r,style:i}=e,{state:a=Qk,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?bge(r,a):void 0,d=l?xge(i,a):void 0,f=l?yge(a,c):Qk,p=l&&s?Dge(s):void 0,m=l?xM(f,p)??{}:Qk;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?qhe([m.ref,bM(n),...o]):rj(m.ref,bM(n),o):rj(null,null)),l?(u!==void 0&&(m.className=AM(m.className,u)),d!==void 0&&(m.style=xM(m.style,d)),m):Qk}function Dge(e){return Array.isArray(e)?Sge(e):CM(void 0,e)}var Oge=Symbol.for(`react.lazy`);function kge(e){if(e?.$$typeof!==Oge)return e;let t=I.Children.toArray(e)[0];return I.isValidElement(t)?t:e}function Age(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=CM(n,t.props);return e.ref=n.ref,I.cloneElement(t,e)}return jge(e,n)}function jge(e,t){return e===`button`?(0,I.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,I.createElement)(`img`,{alt:``,...t,key:t.key}):I.createElement(e,t)}var Mge={style:{transition:`none`}},Nge=`data-base-ui-click-trigger`,Pge={fallbackAxisSide:`end`},Fge={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},NM=I.createContext(null),PM=()=>I.useContext(NM),Ige=nM(`portal`);function Lge(e={}){let{ref:t,container:n,componentProps:r=Qk,elementProps:i}=e,a=vM(),o=PM()?.portalNode,[s,c]=I.useState(null),[l,u]=I.useState(null),d=lj(e=>{e!==null&&u(e)}),f=I.useRef(null);rA(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(vA(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=MM(`div`,r,{ref:[t,d],props:[{id:a,[Ige]:``},i]}),m=s&&p?gn.createPortal(p,s):null;return{node:l,nodeId:I.isValidElement(p)?p.props.id:void 0,subtree:m}}var Rge=I.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Lge({container:o,ref:t,componentProps:e,elementProps:c}),f=I.useRef(null),p=I.useRef(null),m=I.useRef(null),h=I.useRef(null),[g,_]=I.useState(null),v=I.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;I.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Qj(e)&&(e.type===`focusin`?v.current&&=($j(l),!1):(hge(l),v.current=!0))}return nj(tj(l,`focusin`,e,!0),tj(l,`focusout`,e,!0))},[l,y]),rA(()=>{!l||b!==!0||!v.current||($j(l),v.current=!1)},[b,l]);let S=I.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,F.jsxs)(I.Fragment,{children:[d,(0,F.jsxs)(NM.Provider,{value:S,children:[x&&l&&(0,F.jsx)(gj,{"data-type":`outside`,ref:f,onFocus:e=>{Qj(e,l)?m.current?.focus():Zj(g?g.domReference:null)?.focus()}}),x&&l&&(0,F.jsx)(`span`,{role:s,"aria-owns":u,style:Fge}),l&&gn.createPortal(a,l),x&&l&&(0,F.jsx)(gj,{"data-type":`outside`,ref:p,onFocus:e=>{Qj(e,l)?h.current?.focus():(Xj(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,ZA(`focus-out`,e.nativeEvent)))}})]})]})});function FM(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var zge=class{nodesRef={current:[]};events=FM();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},IM=I.createContext(null),LM=I.createContext(null),RM=()=>I.useContext(IM)?.id||null,zM=e=>{let t=I.useContext(LM);return e??t};function Bge(e){let t=vM(),n=zM(e),r=RM();return rA(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Vge(e){let{children:t,id:n}=e,r=RM();return(0,F.jsx)(IM.Provider,{value:I.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Hge(e){let{children:t,externalTree:n}=e,r=Hk(()=>n??new zge).current;return(0,F.jsx)(LM.Provider,{value:r,children:t})}function BM(e){return e==null?e:`current`in e?e.current:e}function Uge(e,t){let n=gA(RA(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(dA(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Wge=20,VM=[];function HM(){VM=VM.filter(e=>e.deref()?.isConnected)}function UM(e){HM(),e&&hA(e)!==`body`&&(VM.push(new WeakRef(e)),VM.length>Wge&&(VM=VM.slice(-20)))}function WM(){return HM(),VM[VM.length-1]?.deref()}function Gge(e){return e?Kj(e)?e:Jj(e)[0]||e:null}function GM(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=qj(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Kj(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Kge(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=lj(()=>b.current.floatingContext?.nodeId),S=i===!1,C=KA(_)&&S,w=oj(i),T=oj(a),E=oj(o),D=oj(u),O=oj(g),k=zM(m),A=PM(),j=I.useRef(!1),M=I.useRef(!1),N=I.useRef(!1),P=I.useRef(null),ee=I.useRef(``),te=I.useRef(``),ne=I.useRef(null),re=I.useRef(null),ie=rj(ne,p,A?.beforeInsideRef),ae=rj(re,A?.afterInsideRef),oe=nA(),se=nA(),ce=pj(),le=A!=null,ue=qA(v),de=lj((e=ue)=>e?Jj(e):[]),fe=lj(()=>h?.().filter(e=>e!=null)??[]);I.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&IA(ue,FA(mj(ue)))&&de().length===0&&!C&&mhe(e)}return tj(mj(ue),`keydown`,e)},[r,ue,c,C,de]),I.useEffect(()=>{if(r||!g)return;let e=mj(ue);function t(){N.current=!1}function n(e){let t=RA(e),n=fe(),r=IA(v,t)||IA(_,t)||IA(A?.portalNode,t)||n.some(e=>e===t||IA(e,t));N.current=!r,te.current=e.pointerType||`keyboard`,LA(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,se.start(0,()=>{M.current=!1}))}function i(){te.current=`keyboard`}return nj(tj(e,`pointerdown`,n,!0),tj(e,`pointerup`,t,!0),tj(e,`pointercancel`,t,!0),tj(e,`keydown`,i,!0),t)},[r,v,_,ue,g,A,se,fe]),I.useEffect(()=>{if(r||!l)return;let e=mj(ue);function n(){M.current=!0,se.start(0,()=>{M.current=!1})}function i(e){let t=RA(e);Kj(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=RA(n);c&&r==null&&a!=null&&IA(v,a)&&UM(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=fe(),p=r?.hasAttribute(nM(`focus-guard`))&&[ne.current,re.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,BM(f),BM(d)].includes(r),m=!(IA(_,r)||IA(v,r)||IA(r,v)||IA(A?.portalNode,r)||u.some(e=>e===r||IA(e,r))||l.hasMatchingElement(e=>IA(e,r))||p||k&&(eM(k.nodesRef.current,o).find(e=>IA(e.context?.elements.floating,r)||IA(e.context?.elements.domReference,r))||tM(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,qA(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&ue&&GM(ue),s&&i!==_&&!Ij(a)&&FA(e)===e.body){if(bA(ue)&&(ue.focus(),s===`popup`)){ce.request(()=>{ue.focus()});return}let e=de(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||ue;bA(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!M.current&&(C||r!==WM())&&(j.current=!0,t.setOpen(!1,ZA(ej,n)))})}function o(){N.current||(b.current.insideReactTree=!0,oe.start(0,()=>{b.current.insideReactTree=!1}))}let u=bA(_)?_:null;if(!(!v&&!u))return nj(u&&tj(u,`focusout`,a),u&&tj(u,`pointerdown`,n),v&&tj(v,`focusin`,i),v&&tj(v,`focusout`,a),v&&A&&tj(v,`focusout`,o,!0))},[r,_,v,ue,c,k,A,t,l,s,de,C,x,b,oe,se,ce,d,f,fe]),I.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${nM(`portal`)}]`)||[]),t=(k?tM(k.nodesRef.current,x()):[]).find(e=>KA(e.context?.elements.domReference||null))?.context?.elements.domReference,n=mM([v,...e,ne.current,re.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...fe(),t,BM(f),BM(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=mM([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,fe]),rA(()=>{if(!g||r||!bA(ue))return;ee.current=``,te.current=``;let e=mj(ue),t=FA(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||IA(ue,t))return;let i=null,a=()=>(i??=de(ue),i[0]||ue),o;o=r===!0||r===null?a():BM(r),o||=a();let s=IA(ue,FA(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&dA(c);iM(o,{sync:l,preventScroll:o===ue,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=FA(e);return!(t!==o&&IA(ue,t))}})})},[r,g,ue,de,w,D,O,b]);let pe=I.useRef(null);rA(()=>{if(r||!ue){pe.current=null;return}pe.current&&=(pe.current.cancelled=!0,null);let e=mj(ue),t=FA(e),n=D.current==null;UM(t);function i(e){if(e.open||(ee.current=Uge(e.nativeEvent,te.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(nM(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(dA(e.nativeEvent)||fA(e.nativeEvent))j.current=!1;else{let e=!1;mj(ue).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&hA(t)!==`body`?t:null,s=n?o||a:a||o;return s||=WM()||null,typeof i==`boolean`?s:BM(i)||s||null}return()=>{y.off(`openchange`,i);let t=FA(e),n=fe(),r=IA(v,t)||n.some(e=>e===t||IA(e,t))||k&&eM(k.nodesRef.current,x(),!1).some(e=>IA(e.context?.elements.floating,t)),o=T.current,s=ee.current,c=a(s),l={cancelled:!1};pe.current=l,queueMicrotask(()=>{pe.current===l&&(pe.current=null);let n=Gge(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&bA(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,ue,T,E,D,y,k,_,x,fe]),rA(()=>{if(!uA||g||!v)return;let e=FA(mj(v));!bA(e)||!GA(e)||IA(v,e)&&e.blur()},[g,v]),rA(()=>{if(!(r||!A))return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),rA(()=>{if(!(r||!ue))return GM(ue),()=>{queueMicrotask(HM)}},[r,ue]);let me=!r&&(!c||!C)&&(le||c);return(0,F.jsxs)(I.Fragment,{children:[me&&(0,F.jsx)(gj,{"data-type":`inside`,ref:ie,onFocus:e=>{if(c){let e=de();iM(e[e.length-1])}else A?.portalNode&&(j.current=!1,Qj(e,A.portalNode)?Xj(_)?.focus():BM(f??A.beforeOutsideRef)?.focus())}}),n,me&&(0,F.jsx)(gj,{"data-type":`inside`,ref:ae,onFocus:e=>{c?iM(de()[0]):A?.portalNode&&(l&&(j.current=!0),Qj(e,A.portalNode)?Zj(_)?.focus():BM(d??A.afterOutsideRef)?.focus())}})]})}function qge(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=QA}=t,l=e.context.dataRef,u=I.useRef(void 0),d=pj(),f=nA(),p=I.useMemo(()=>{function t(t,n,r,i){let a=ZA(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=pA(e.pointerType,!0)&&fA(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||pA(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=RA(s),p=GA(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}pA(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return I.useMemo(()=>n?{reference:p}:Qk,[n,p])}function Jge(){return!1}function Yge(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Xge(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Jge,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=zM(c),m=lj(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=lj(()=>a),{escapeKey:v,outsidePress:y}=Yge(s),b=I.useRef(!1),x=I.useRef(!1),S=I.useRef(!1),C=I.useRef(!1),w=I.useRef(!1),T=I.useRef(``),E=I.useRef(null),D=nA(),O=nA(),k=nA(),A=lj(()=>{O.clear(),d.current.insideReactTree=!1}),j=lj(e=>{let t=d.current.floatingContext?.nodeId;return(p?eM(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=lj(t=>WA(t,e.select(`floatingElement`))||WA(t,e.select(`domReferenceElement`))),N=lj(t=>{o()&&e.setOpen(!1,ZA(QA,t.nativeEvent))}),P=lj(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=hhe(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=ZA(Ghe,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),ee=lj(()=>{d.current.insideReactTree=!0,O.start(0,A)}),te=lj(t=>{if(!l||!n||t.button!==0)return;let r=RA(t.nativeEvent);IA(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),ne=lj(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});I.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),I.useEffect(()=>A,[A]),I.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new tA,i=mj(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(uA?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&eM(p.nodesRef.current,t).some(t=>WA(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=RA(n),i=`[${nM(`inert`)}]`,a=yA(r)?r.getRootNode():null,o=Array.from((xA(a)?a:mj(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>IA(e,r))))return;let c=yA(r)?r:null;for(;c&&!OA(c);){let e=jA(c);if(OA(e)||!yA(e))break;c=e}if(!(o.length&&yA(r)&&!zhe(r)&&!IA(r,e.select(`floatingElement`))&&o.every(e=>!IA(c,e)))){if(bA(r)&&!(`touches`in n)){let e=OA(r),t=kA(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!dA(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,ZA(Whe,n)),A())}}}function ee(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||M(t)||N(t)}function te(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function ne(e,t){let n=RA(e);if(!n)return;let r=tj(n,e.type,()=>{t(e),r()})}function re(e){T.current=`touch`,ne(e,te)}function ie(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&ne(e,e=>{e.type===`pointerdown`?ee(e):N(e)})}function ae(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!O(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,A())}}}function oe(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function se(e){ne(e,oe)}function ce(e){f()!==`sloppy`||!E.current||M(e)||(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function le(e){ne(e,ce)}let ue=nj(r&&nj(tj(i,`keydown`,P),tj(i,`compositionstart`,a),tj(i,`compositionend`,o)),g&&nj(tj(i,`click`,ie,!0),tj(i,`pointerdown`,ie,!0),tj(i,`pointerup`,ae,!0),tj(i,`pointercancel`,ae,!0),tj(i,`mousedown`,ie,!0),tj(i,`mouseup`,ae,!0),tj(i,`touchstart`,re,{capture:!0,passive:!0}),tj(i,`touchmove`,se,{capture:!0,passive:!0}),tj(i,`touchend`,le,{capture:!0,passive:!0})));return()=>{ue(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let re=I.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),ie=I.useMemo(()=>({onKeyDown:P,onPointerDown:ne,onMouseDown:ne,onClickCapture:ee,onMouseDownCapture(e){ee(),te(e)},onPointerDownCapture(e){ee(),te(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[P,ee,te,ne]);return I.useMemo(()=>n?{reference:re,floating:ie,trigger:re}:{},[n,re,ie])}function Zge(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var KM=Zge(`https://base-ui.com/production-error`,`Base UI`);function Qge(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),rA(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};yA(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function $ge(e,t=!1,n=!1,r=!1){let[i,a]=I.useState(e&&t?`idle`:void 0),[o,s]=I.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),rA(()=>{if(!e&&o&&i!==`ending`&&n){let e=fj.request(()=>{a(`ending`)});return()=>{fj.cancel(e)}}},[e,o,i,n]),rA(()=>{if(!e||t||i===void 0)return;let n=fj.request(()=>{a(void 0)});return()=>{fj.cancel(n)}},[t,e,i]),rA(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=fj.request(()=>{a(`idle`)});return()=>{fj.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function qM(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var JM=null;function e_e(e){if(!JM){let e=[];JM=e,queueMicrotask(()=>{JM=null,gn.flushSync(()=>{for(let t of e)t()})})}JM.push(e)}function YM(e,t=!1,n=!1){let r=pj();return lj((i,a=null)=>{r.cancel();let o=BM(e);if(o==null)return;let s=o,c=()=>{if(!n){gn.flushSync(i);return}e_e(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(qM(s).map(e=>e.finished.then(Xk))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(qM(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=zA;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function XM(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=lj(a),s=YM(r,n,i);I.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function t_e(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=lj(i),{mounted:c,setMounted:l,transitionStatus:u}=$ge(t,!1,!1,o),d=!t&&r;rA(()=>{t&&s(!1)},[t,s]);let f=I.useRef(c),p=I.useRef(!1),m=hM(),h=()=>{f.current=!1,l(!1),a()};rA(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=lj(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return XM({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var n_e={tabIndex:-1,[xhe]:``};function r_e(e){return t=>t!==`touch`||e.current}function i_e(e,t=!1){let n=vM(),r=RM()!=null,i=Hk(()=>e(n,r)).current;return Qge({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function a_e({handle:e,store:t}){return rA(()=>e.attachStore(t),[e,t]),null}function ZM(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function o_e(e,t){let n=I.useRef(null);return lj(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),ZM(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),ZM(t))})}function s_e(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function c_e(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function l_e(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=o_e(e,n),o=lj(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=lj(e=>{a(e),e&&o(e)});return rA(()=>(s(t.current),()=>s(null)),[s,t,n,e]),rA(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function u_e(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=I.useRef(null),i=e.useState(`open`);rA(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=ZA(Uhe);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function d_e(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=t_e({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Hk(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function f_e(e,t){e.useSyncedValues(t),rA(()=>()=>{e.update({activeTriggerProps:Qk,inactiveTriggerProps:Qk,popupProps:Qk})},[e])}function p_e(e,t){rA(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),rA(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var m_e=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},QM=KO(),h_e=yM(19)?__e:v_e;function $M(e,t,n,r,i){return h_e(e,t,n,r,i)}function g_e(e,t,n,r,i){let a=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,QM.useSyncExternalStore)(e.subscribe,a,a)}Kk({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,QM.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function __e(e,t,n,r,i){let a=Gk();if(!a)return g_e(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function v_e(e,t,n,r,i){return(0,JO.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var y_e=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return $M(this,e,t,n,r)}},eN=class extends y_e{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){I.useDebugValue(e);let n=this;rA(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;rA(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;rA(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){I.useDebugValue(e);let n=this,r=t!==void 0;rA(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return I.useDebugValue(e),$M(this,this.selectors[e],t,n,r)}useContextCallback(e,t){I.useDebugValue(e);let n=lj(t??Xk);this.context[e]=n}useStateSetter(e){let t=I.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},b_e={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},x_e=class extends eN{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:FM(),nested:n,triggerElements:i},b_e),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ghe(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function S_e(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new x_e({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Qk,inactiveTriggerProps:Qk,popupProps:Qk}}var tN=e=>e.triggerIdProp??e.activeTriggerId,nN=e=>e.openProp??e.open,rN=e=>(e.popupElement?.id??e.floatingId)||void 0;function iN(e,t){return t!==void 0&&nN(e)&&tN(e)===t}function C_e(e,t){return iN(e,t)?!0:t!==void 0&&nN(e)&&tN(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var aN={open:nN,mounted:e=>e.mounted,transitionStatus:e=>nN(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:tN,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:rN,isTriggerActive:(e,t)=>t!==void 0&&tN(e)===t,isOpenedByTrigger:(e,t)=>iN(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&tN(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>C_e(e,t)?rN(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function w_e(e){let t=I.useCallback(t=>e===void 0?Xk:e.subscribeStore(t),[e]),n=I.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,QM.useSyncExternalStore)(t,n,()=>e?.serverStore)}var T_e=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new tA;restTimeout=new tA;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},oN=new WeakMap;function sN(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&oN.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),oN.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function cN(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=oN.get(n);a&&a!==e&&sN(a),sN(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,oN.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function lN(e){let t=e.context.dataRef.current,n=Hk(()=>t.hoverInteractionState??T_e.create()).current;return t.hoverInteractionState||=n,$k(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function E_e(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=zM(),u=RM(),d=lN(e),f=nA(),p=lj(()=>XA(c.current.openEvent?.type,d.interactedInside)),m=lj(()=>Hhe(c.current.openEvent?.type)),h=lj(()=>{sN(d)});rA(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),I.useEffect(()=>h,[h]),rA(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&yA(s)&&o){let e=s,t=o,n=mj(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??LA(e,`[data-rootownerid]`)??n.body;return cN(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),I.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&eM(l.nodesRef.current,u).length>0)}function a(t){let n=JA(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,ZA($A,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=RA(e);if(!Bhe(t)){d.interactedInside=!1;return}d.interactedInside=LA(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(UA(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&yA(o)&&eM(l.nodesRef.current,r,!1).some(e=>IA(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){!l||!u||t()||f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,ZA($A,n)),l.events.emit(`floating.closed`,n)})}let y=o;return nj(y&&tj(y,`mouseenter`,g),y&&tj(y,`mouseleave`,_),y&&tj(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var D_e={current:null};function O_e(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=D_e,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=zM(l),v=lN(e),y=I.useRef(!1),b=oj(i),x=oj(r),S=oj(o),C=oj(n),w=oj(p),T=oj(f),E=lj(()=>XA(h.current.openEvent?.type,v.interactedInside)),D=lj(()=>w.current?.()!==!1),O=lj((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!IA(t,n);if(!yA(r))return!1;let a=r;return i.hasMatchingElement(e=>IA(e,a))&&(!t||!IA(t,a))}),k=lj(()=>{v.handler&&=(mj(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=lj(()=>{sN(v)});return u&&(v.handleCloseOptions=i?.__options),I.useEffect(()=>k,[k]),I.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===$A,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),I.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=JA(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,ZA($A,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,ZA($A,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!yA(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!pA(v.pointerType))return;let n=YA(S.current),r=JA(x.current,`open`,v.pointerType),i=RA(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(yA(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(IA(t,i)){c=t;break}}yA(o)&&yA(s)&&!e.context.triggerElements.hasElement(o)&&IA(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&yA(c)&&yA(s)&&IA(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,ZA($A,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,ZA($A,t,c))}):g&&D()&&e.setOpen(!0,ZA($A,t,c)))}function o(n){if(E()){A();return}k();let r=mj(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!UA(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!IA(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){IA(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?tj(r,`mouseout`,l):void 0;return s?nj(tj(r,`mousemove`,i,{once:!0}),tj(r,`mouseenter`,i),tj(r,`mouseleave`,o),f):nj(tj(r,`mouseenter`,i),tj(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),I.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!pA(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;cN(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=YA(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,ZA($A,n,r))}v.pointerType===`touch`?gn.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}var uN=.1,k_e=uN*uN,dN=.5;function fN(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function pN(e,t,n,r,i,a,o,s,c,l){let u=!1;return fN(e,t,n,r,i,a)&&(u=!u),fN(e,t,i,a,o,s)&&(u=!u),fN(e,t,o,s,c,l)&&(u=!u),fN(e,t,c,l,n,r)&&(u=!u),u}function A_e(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function mN(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function j_e(e={}){let{blockPointerEvents:t=!1}=e,n=new tA,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*k_e;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=RA(r),g=r.type===`mouseleave`,_=IA(u,h),v=IA(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&yA(r.relatedTarget)&&IA(u,r.relatedTarget))return;function y(){return!!(s&&eM(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=mN(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=mN(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=mN(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=mN(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!A_e(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?dN/2:dN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+dN+1,o=C||T?S.bottom-dN:S.top,s=C?T?S.bottom-dN:S.top:S.bottom-dN;M=pN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?dN/2:dN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-dN,o=C||T?S.top+dN:S.bottom,s=C?T?S.top+dN:S.bottom:S.top+dN;M=pN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?dN/2:dN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+dN+1,o=w||E?S.right-dN:S.left,s=w?E?S.right-dN:S.left:S.right-dN;M=pN(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?dN/2:dN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-dN,o=w||E?S.left+dN:S.right,s=w?E?S.left+dN:S.right:S.left+dN;M=pN(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function hN(e,t,n){let{reference:r,floating:i}=e,a=Oj(t),o=kj(t),s=Dj(o),c=wj(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Tj(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function M_e(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Cj(t,e),p=Pj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Fj(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Fj(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var N_e=50,P_e=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:M_e},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=hN(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<N_e&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=hN(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},F_e=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Cj(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wj(r),_=Oj(o),v=wj(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Nj(o)]:rge(o)),x=p!==`none`;!d&&x&&b.push(...sge(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=nge(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Oj(t)||T.every(e=>Oj(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Oj(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},gN=new Set([`left`,`top`]);async function I_e(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wj(n),s=Tj(n),c=Oj(n)===`y`,l=gN.has(o)?-1:1,u=a&&c?-1:1,d=Cj(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var L_e=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await I_e(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},R_e=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Cj(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Oj(i),p=Ej(f),m=u[p],h=u[f],g=(e,t)=>Sj(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},z_e=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Cj(e,t),u={x:n,y:r},d=Oj(i),f=Ej(d),p=u[f],m=u[d],h=Cj(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=gN.has(wj(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},B_e=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Cj(e,t),c=await i.detectOverflow(t,s),l=wj(n),u=Tj(n),d=Oj(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=_j(p-c[m],g),y=_j(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*vj(c.left,c.right):S=p-2*vj(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function _N(e){let t=kA(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=bA(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=yj(n)!==a||yj(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vN(e){return yA(e)?e:e.contextElement}function yN(e){let t=vN(e);if(!bA(t))return xj(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_N(t),o=(a?yj(n.width):n.width)/r,s=(a?yj(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var V_e=xj(0);function bN(e){let t=gA(e);return!DA()||!t.visualViewport?V_e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function H_e(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===gA(e)}function xN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vN(e),o=xj(1);t&&(r?yA(r)&&(o=yN(r)):o=yN(e));let s=H_e(a,n,r)?bN(a):xj(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=gA(a),t=yA(r)?gA(r):r,n=e,i=PA(n);for(;i&&t!==n;){let e=yN(i),t=i.getBoundingClientRect(),r=kA(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=gA(i),i=PA(n)}}return Fj({width:u,height:d,x:c,y:l})}function SN(e,t){let n=AA(e).scrollLeft;return t?t.left+n:xN(_A(e)).left+n}function CN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-SN(e,n),y:n.top+t.scrollTop}}function U_e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=_A(r),s=t?CA(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=xj(1),u=xj(0),d=bA(r);if((d||!a)&&((hA(r)!==`body`||SA(o))&&(c=AA(r)),d)){let e=xN(r);l=yN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?CN(o,c):xj(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function W_e(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function G_e(e){let t=AA(e),n=e.ownerDocument.body,r=vj(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=vj(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+SN(e),o=-t.scrollTop;return kA(n).direction===`rtl`&&(a+=vj(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var K_e=25;function q_e(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=gA(e),a=_A(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!DA()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(SN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=K_e&&(s-=o)}return{width:s,height:c,x:l,y:u}}function J_e(e,t){let n=xN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function wN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=q_e(e,n,t);else if(t===`document`)r=G_e(_A(e));else if(yA(t))r=J_e(t,n);else{let n=bN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fj(r)}function Y_e(e,t){let n=t.get(e);if(n)return n;let r=NA(e,[],!1).filter(e=>yA(e)&&hA(e)!==`body`),i=null,a=kA(e).position===`fixed`,o=a?jA(e):e;for(;yA(o)&&!OA(o);){let e=kA(o),t=EA(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=jA(o)}return t.set(e,r),r}function X_e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?CA(t)?[]:Y_e(t,this._c):[].concat(n),r],o=wN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=wN(t,a[e],i);s=vj(n.top,s),c=_j(n.right,c),l=_j(n.bottom,l),u=vj(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Z_e(e){let{width:t,height:n}=_N(e);return{width:t,height:n}}function Q_e(e,t,n){let r=bA(t),i=_A(t),a=n===`fixed`,o=xN(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=xj(0);if((r||!a)&&((hA(t)!==`body`||SA(i))&&(s=AA(t)),r)){let e=xN(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=SN(i));let l=i&&!r&&!a?CN(i,s):xj(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function TN(e){return kA(e).position===`static`}function EN(e,t){if(!bA(e)||kA(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return _A(e)===n&&(n=n.ownerDocument.body),n}function DN(e,t){let n=gA(e);if(CA(e))return n;if(!bA(e)){let t=jA(e);for(;t&&!OA(t);){if(yA(t)&&!TN(t))return t;t=jA(t)}return n}let r=EN(e,t);for(;r&&_he(r)&&TN(r);)r=EN(r,t);return r&&OA(r)&&TN(r)&&!EA(r)?n:r||bhe(e)||n}var $_e=async function(e){let t=this.getOffsetParent||DN,n=this.getDimensions,r=await n(e.floating);return{reference:Q_e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eve(e){return kA(e).direction===`rtl`}var tve={convertOffsetParentRelativeRectToViewportRelativeRect:U_e,getDocumentElement:_A,getClippingRect:X_e,getOffsetParent:DN,getElementRects:$_e,getClientRects:W_e,getDimensions:Z_e,getScale:yN,isElement:yA,isRTL:eve};function ON(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nve(e,t,n){let r=null,i,a=_A(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=bj(d),h=bj(a.clientWidth-(u+f)),g=bj(a.clientHeight-(d+p)),_=bj(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:vj(0,_j(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ON(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=gA(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function kN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vN(e),u=i||a?[...l?NA(l):[],...t?NA(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?nve(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?xN(e):null;c&&g();function g(){let t=xN(e);h&&!ON(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rve=L_e,ive=R_e,ave=F_e,ove=B_e,sve=z_e,cve=(e,t,n)=>{let r=new Map,i=n??{},a={...tve,...i.platform,_c:r};return P_e(e,t,{...i,platform:a})},AN=typeof document<`u`?I.useLayoutEffect:function(){};function jN(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!jN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!jN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function MN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function NN(e,t){let n=MN(e);return Math.round(t*n)/n}function PN(e){let t=I.useRef(e);return AN(()=>{t.current=e}),t}function lve(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=I.useState(r);jN(f,r)||p(r);let[m,h]=I.useState(null),[g,_]=I.useState(null),v=I.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=I.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=I.useRef(null),C=I.useRef(null),w=I.useRef(u),T=c!=null,E=PN(c),D=PN(i),O=PN(l),k=I.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),cve(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!jN(w.current,t)&&(w.current=t,gn.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);AN(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=I.useRef(!1);AN(()=>(A.current=!0,()=>{A.current=!1}),[]),AN(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=I.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=I.useMemo(()=>({reference:b,floating:x}),[b,x]),N=I.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=NN(M.floating,u.x),r=NN(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...MN(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return I.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var uve=(e,t)=>{let n=rve(e);return{name:n.name,fn:n.fn,options:[e,t]}},dve=(e,t)=>{let n=ive(e);return{name:n.name,fn:n.fn,options:[e,t]}},fve=(e,t)=>({fn:sve(e).fn,options:[e,t]}),pve=(e,t)=>{let n=ave(e);return{name:n.name,fn:n.fn,options:[e,t]}},mve=(e,t)=>{let n=ove(e);return{name:n.name,fn:n.fn,options:[e,t]}},FN=I.createContext(void 0);function IN(e){let t=I.useContext(FN);if(t===void 0&&!e)throw Error(KM(47));return t}var hve={...aN,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!aN.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&aN.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>aN.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},gve=class extends eN{constructor(e,t,n){let r=new m_e;super(_ve(e,r,t,n),vve(r),hve)}setOpen=(e,t)=>{let n=t.reason===$A,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=c_e(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=s_e(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),gn.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function _ve(e,t,n,r=!1){let i={...S_e(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function vve(e){return{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:I.createRef(),beforeTriggerFocusGuardRef:I.createRef(),beforeContentFocusGuardRef:I.createRef(),stickIfOpenTimeout:new tA,stickIfOpen:!0,triggerElements:e}}var LN=qk(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=bve(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),p_e(u,d),u_e(u);let{forceUnmount:m}=d_e(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),I.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),I.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,ZA(Khe))}),[m,u]);let h=d||f||s!=null;return(0,F.jsxs)(FN.Provider,{value:u,children:[s&&(0,F.jsx)(a_e,{handle:s,store:u}),h&&(0,F.jsx)(xve,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function yve(e){return IN(!0)?(0,F.jsx)(LN,{props:e}):(0,F.jsx)(Hge,{children:(0,F.jsx)(LN,{props:e})})}function bve(e,t){let n=i_e((e,n)=>new gve(t,e,n));return I.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function xve({store:e,modal:t}){let n=Xge(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return f_e(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var Sve=I.createContext(void 0);function Cve(e=!1){let t=I.useContext(Sve);if(t===void 0&&!e)throw Error(KM(16));return t}function wve(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:I.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function RN(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(gA(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Tve(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=I.useRef(null),s=Cve(!0),c=a??s!==void 0,{props:l}=wve({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=I.useCallback(()=>{let e=o.current;zN(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return rA(u,[u]),{getButtonProps:I.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return CM({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(kM(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=zN(r),s=!i&&Eve(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),RN(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),RN(r,e)))},onKeyUp(e){if(!t){if(kM(e),a?.(e),e.target===e.currentTarget&&i&&c&&zN(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),RN(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:lj(e=>{o.current=e,u()})}}function zN(e){return bA(e)&&e.tagName===`BUTTON`}function Eve(e){return bA(e)&&e.tagName===`A`&&!!e.href}function Dve(e){return vM(e,`base-ui`)}function Ove(e,t){function n(n,r,i){let a=n.currentTarget;gn.flushSync(()=>{e.setOpen(!1,ZA(ej,n.nativeEvent,a))}),mge(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Qj(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function kve(e){let t=I.useRef(``),n=I.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:I.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function Ave(e,t){let{onClick:n,onPointerDown:r}=kve(lj((n,r)=>{(typeof e==`function`?e():e)||t(r||(sA?`touch`:``))}));return I.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}var jve=Jk(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=IN(!0),h=w_e(s)??m;if(!h)throw Error(KM(74));let g=Dve(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=I.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=l_e(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=O_e(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:j_e(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=qge(v,{stickIfOpen:lj(()=>h.context.stickIfOpen)}),k=Ave(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=Tve({disabled:a,native:o}),N={open(e){return w?Lhe.open(e):Ihe.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:ee}=Ove(h,x),te=MM(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[Nge]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),ne=(0,F.jsx)(I.Fragment,{children:te},g);return E?(0,F.jsxs)(I.Fragment,{children:[(0,F.jsx)(gj,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),ne,(0,F.jsx)(gj,{ref:h.context.triggerFocusTargetRef,onFocus:ee})]}):ne}),BN=I.createContext(void 0);function Mve(){let e=I.useContext(BN);if(e===void 0)throw Error(KM(45));return e}var Nve=I.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return IN().useState(`mounted`)||n?(0,F.jsx)(BN.Provider,{value:n,children:(0,F.jsx)(Rge,{ref:t,...r})}):null});function Pve(e){return yM(19)?e:e?`true`:void 0}var VN=I.createContext(void 0);function Fve(){let e=I.useContext(VN);if(!e)throw Error(KM(46));return e}function Ive(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=I.useState(null),d=I.useRef(null),f=zM(n),p=I.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=lve({...e,elements:{...p,...l&&{reference:l}}}),h=I.useCallback(e=>{let t=yA(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=I.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=I.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=I.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return rA(()=>{o&&(d.current=o)},[o]),rA(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),I.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var Lve=I.createContext(void 0);function Rve(){return I.useContext(Lve)?.direction??`ltr`}var zve=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Cj(e,t)||{};if(l==null)return{};let d=Pj(u),f={x:n,y:r},p=kj(i),m=Dj(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=Sj(D,k,O),j=!c.arrow&&Tj(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Bve=(e,t)=>{let{name:n,fn:r}=zve(e);return{name:n,fn:r,options:[e,t]}},Vve={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Hve={sideX:`left`,sideY:`top`},Uve=`--available-width`,Wve=`--available-height`,Gve=`--anchor-width`,Kve=`--anchor-height`,qve=`--transform-origin`,HN=Uve,UN=Wve;function WN(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function GN(e,t,n){let{rects:r,placement:i}=e;return{side:WN(t,wj(i),n),align:Tj(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Jve(e){return Yve(e,Ive)}function Yve(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=lj(O),A=O?k:n,j=oj(n),M=oj(g),N=Rve()===`rtl`,[P,ee]=I.useState(null);!g&&P!==null&&ee(null);let te=x===`placement`,ne=P?wj(P):null,re=P&&te?Tj(P)||`center`:null,ie=ne||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],ae=re||o,oe=ae===`center`?ie:`${ie}-${ae}`,se=l;typeof se==`number`?se={top:se,right:se,bottom:se,left:se}:se&&={top:se.top||0,right:se.right||0,bottom:se.bottom||0,left:se.left||0};let ce=+(i===`bottom`),le=+(i===`top`),ue=+(i===`right`),de=+(i===`left`),fe={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:se},pe=I.useRef(null),me=oj(a),he=oj(s),ge=typeof a==`function`?0:a,_e=typeof s==`function`?0:s,ve=[];p&&ve.push(p),ve.push(uve(e=>{let t=GN(e,i,N),n=typeof me.current==`function`?me.current(t):me.current,r=typeof he.current==`function`?he.current(t):he.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ge,_e,N,i]));let ye=w===`none`&&C!==`shift`,be=!ye&&(u||E||C===`shift`),xe=C===`none`?null:pve({...fe,padding:{top:se.top+1+ce,right:se.right+1+de,bottom:se.bottom+1+le,left:se.left+1+ue},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),Se=ye?null:dve({...fe,rootBoundary:D,mainAxis:w!==`none`,crossAxis:be,limiter:u||E?void 0:fve(e=>{if(!pe.current)return{};let{width:t,height:n}=pe.current.getBoundingClientRect(),r=Oj(wj(e.placement)),i=r===`y`?t:n,a=r===`y`?se.left+se.right:se.top+se.bottom;return{offset:i/2+a/2}})},[fe,u,E,D,se,w]);C===`shift`||w===`shift`||ae===`center`?ve.push(Se,xe):ve.push(xe,Se),ve.push(mve({...fe,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(HN,`${t}px`),i.setProperty(UN,`${n}px`);let a=gA(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Gve,`${u}px`),i.setProperty(Kve,`${d}px`)}}),Bve(e=>({element:pe.current||mj(e.elements.floating).createElement(`div`),padding:pe.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=wj(r),u=Tj(r),d=Oj(l)===`y`,f=pe.current,p=typeof a==`function`?a(GN(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return be&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(qve,d?`${m} ${h}`:`${h} ${m}`),{}}},Vve,b),rA(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let Ce=I.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:we,elements:Te,x:Ee,y:De,middlewareData:Oe,update:ke,placement:Ae,context:je,isPositioned:Me,floatingStyles:Ne}=t({rootContext:h,open:m?g:void 0,placement:oe,middleware:ve,strategy:r,whileElementsMounted:m?void 0:(...e)=>kN(...e,Ce),nodeId:y,externalTree:S}),{sideX:Pe,sideY:Fe}=Oe.adaptiveOrigin||Hve,Ie=Me?r:`fixed`,Le=I.useMemo(()=>{let e;return e=Me?b?{position:Ie,[Pe]:Ee,[Fe]:De}:{...Ne,position:Ie}:{position:Ie,top:0,left:0},e[HN]=`100vw`,e[UN]=`100vh`,Me||(e.opacity=0),e},[b,Ie,Pe,Ee,Fe,De,Ne,Me]),Re=I.useRef(null);rA(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(KN(t)?t.current:t)||null;n!==Re.current&&(we.setPositionReference(n),Re.current=n)},[g,we,A,j]),I.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&KN(e)&&e.current!==Re.current&&(we.setPositionReference(e.current),Re.current=e.current)},[g,we,A,j]),I.useEffect(()=>{if(m&&g&&Te.reference&&Te.floating)return kN(Te.reference,Te.floating,ke,Ce)},[m,g,Te,ke,Ce]);let ze=wj(Ae),Be=WN(i,ze,N),Ve=Tj(Ae)||`center`,He=!!Oe.hide?.referenceHidden;rA(()=>{x&&g&&Me&&(ze!==ie||te&&Ve!==ae)&&ee(Ae)},[x,te,g,Me,Ae,ze,Ve,ie,ae]);let Ue=I.useMemo(()=>({position:`absolute`,top:Oe.arrow?.y,left:Oe.arrow?.x}),[Oe.arrow]),We=Oe.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:Le,arrowStyles:Ue,arrowRef:pe,arrowUncentered:We,side:Be,align:Ve,physicalSide:ze,anchorHidden:He,refs:we,context:je,isPositioned:Me,update:ke}),[Le,Ue,pe,We,Be,Ve,ze,He,we,je,Me,ke])}function KN(e){return e!=null&&`current`in e}var Xve=I.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,F.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function Zve(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=I.useRef(null),o=I.useRef(null),s=YM(r);rA(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),rA(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}function qN(e){return e===`starting`?Mge:Qk}function Qve(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),MM(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},qN(r),i],stateAttributesMapping:VA})}var JN={},YN={},XN=``;function ZN(e,t){return SA(e)?e:t}function QN(e,t,n){return/hidden|clip/.test(e.getComputedStyle(ZN(t,n)).overflowY)}function $ve(e){if(typeof document>`u`)return!1;let t=mj(e);return gA(t).innerWidth-t.documentElement.clientWidth>0}function eye(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=mj(e),n=t.documentElement,r=t.body,i=ZN(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function tye(e){let t=mj(e),n=t.documentElement,r=t.body,i=ZN(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function nye(e){let t=mj(e),n=t.documentElement,r=t.body,i=gA(n),a=0,o=0,s=!1,c=fj.create();if(uA&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,JN={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},XN=n.style.scrollBehavior,YN={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ZN(n,r);if(s=eye(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,JN),Object.assign(r.style,YN),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=XN)}function d(){u(),c.request(l)}l();let f=tj(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var rye=new class{lockCount=0;restore=null;timeoutLock=tA.create();timeoutUnlock=tA.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=mj(e),n=t.documentElement,r=t.body,i=gA(n);if(QN(i,n,r)){let t=new i.MutationObserver(()=>{QN(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=sA||!$ve(e);this.restore=a?tye(e):nye(e)}};function iye(e=!0,t=null){rA(()=>{if(e)return rye.acquire(t)},[e,t])}var aye=20;function oye(e,t,n,r){let[i,a]=I.useState(!1);rA(()=>{if(!e||!t||n==null){a(!1);return}let r=mj(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-aye)},[e,t,n]),iye(e&&(!t||i),r)}var sye=I.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Pge,..._}=e,v=IN(),y=Mve(),b=Bge(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=Jve({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});Zve({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;oye(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=Qve(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,F.jsxs)(VN.Provider,{value:j,children:[S&&M&&(0,F.jsx)(Xve,{inert:Pve(!C),cutout:T}),(0,F.jsx)(Vge,{id:b,children:P})]})}),cye=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),lye=I.createContext(void 0);function uye(e){let t=I.useContext(lye);if(t===void 0&&!e)throw Error(KM(69));return t}var dye=I.createContext(void 0);function fye(){let[e,t]=I.useState(0),n=lj(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:I.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var pye=I.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=IN(),l=Fve(),u=uye(!0)!=null,{context:d,hasClosePart:f}=fye(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);XM({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),E_e(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?r_e(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=MM(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...n_e,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&cye.has(e.key)&&e.stopPropagation()}},qN(g),s],stateAttributesMapping:Rhe});return(0,F.jsx)(Kge,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:bA(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,F.jsx)(dye.Provider,{value:d,children:M})})}),$N=`data-glide-stand-in`;function eP(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left+e.scrollLeft-e.clientLeft,y:r.top-n.top+e.scrollTop-e.clientTop,width:r.width,height:r.height}}function tP(e){return{transform:`translate(${String(e.x)}px, ${String(e.y)}px)`,width:`${String(e.width)}px`,height:`${String(e.height)}px`}}function mye(e){let t=(0,I.useRef)(null);return(0,I.useCallback)(n=>{t.current?.(),t.current=n?hye(n,e):null},[e])}function hye(e,t){if(!Bd(e))return()=>void 0;let n=e.ownerDocument,r=e.querySelector(t),i=r?eP(e,r):null,a=null,o=null,s=new Set,c=()=>{for(let e of s)e.removeAttribute($N);s.clear(),a&&(a.hidden=!0),o=null},l=()=>{if(a)return a;let t=n.createElement(`span`);return t.className=`caps-glide`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t),e.classList.add(`caps-glide-host`),getComputedStyle(e).position===`static`&&e.classList.add(`caps-glide-anchor`),a=t,t},u=(t,n)=>{let r=Fd(e),u=eP(e,t),d=o&&a?eP(e,a):i;if(i=u,o?.cancel(),c(),r.reduced||d===null||Math.abs(d.y-u.y)<1&&Math.abs(d.x-u.x)<1)return;t.setAttribute($N,`measure`);let f=getComputedStyle(t),p=f.backgroundColor,m=f.borderRadius;for(let e of[t,n])e&&(e.setAttribute($N,``),s.add(e));let h=l();h.hidden=!1,h.style.backgroundColor=p,h.style.borderRadius=m;let g=h.animate([tP(d),tP(u)],{duration:r.normal,easing:zd(r,r.ease),fill:`forwards`});o=g,g.addEventListener(`finish`,()=>{o===g&&c()})},d=()=>{let n=e.querySelector(t);if(n===r)return;let i=r;r=n,n&&u(n,i)},f=new MutationObserver(d);return f.observe(e,{subtree:!0,attributes:!0,attributeFilter:[`data-highlighted`,`data-active`,`data-navigation`,`aria-selected`]}),e.addEventListener(`pointerover`,d),e.addEventListener(`pointerout`,d),()=>{f.disconnect(),e.removeEventListener(`pointerover`,d),e.removeEventListener(`pointerout`,d),o?.cancel(),c(),a?.remove()}}var nP=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,F.jsx)(`input`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Dd(`input caps-input w-full`,e),ref:r})});(0,I.forwardRef)(function({leading:e,className:t,...n},r){return(0,F.jsxs)(`span`,{className:`caps-search-input`,"data-leading":e?`true`:void 0,children:[e?(0,F.jsx)(`span`,{className:`caps-search-leading`,"aria-hidden":`true`,children:e}):null,(0,F.jsx)(nP,{...n,type:`search`,className:t,ref:r})]})});function gye({getKey:e,isDisabled:t=()=>!1,items:n,getFallbackKey:r}){let i=(0,I.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[a,o]=(0,I.useState)(null),s=r?.(i)??null,c=a!==null&&i.some(t=>e(t)===a)?a:s!==null&&i.some(t=>e(t)===s)?s:null;(0,I.useEffect)(()=>{a!==null&&!i.some(t=>e(t)===a)&&o(null)},[a,i,e]);let l=i.find(t=>e(t)===c),u=l?i.findIndex(t=>e(t)===c):-1;return{activeIndex:u,activeItem:l,activeKey:c,enabledItems:i,move:(t,n)=>{if(i.length===0)return;let r=n?n===`start`?0:i.length-1:u<0?t>0?0:i.length-1:(u+t+i.length)%i.length,a=i[r];a&&o(e(a))},setActiveKey:o}}var _ye=(0,I.forwardRef)(function({children:e,className:t,type:n=`button`,...r},i){return(0,F.jsxs)(`button`,{...r,ref:i,type:n,className:Dd(`select caps-select caps-combobox-trigger w-full`,t),children:[(0,F.jsx)(`span`,{children:e}),(0,F.jsx)(nr,{className:`caps-select-chevron`,"aria-hidden":`true`})]})});function vye({defaultInputValue:e,defaultOpen:t,defaultValue:n,getKey:r,getSearchText:i,groupBy:a,id:o,isDisabled:s,items:c,onOpenChange:l,onCommit:u,multiple:d,controlledOpen:f,controlledKeys:p,trigger:m}){let h=`${o}-listbox`,[g,_]=(0,I.useState)(e),[v,y]=(0,I.useState)(!1),[b,x]=(0,I.useState)(n),[S,C]=(0,I.useState)(t),w=p??(b===null?[]:[b]),T=m?f??S:!0,E=(0,I.useMemo)(()=>{let e=g.trim().toLowerCase();return e?c.filter(t=>i(t).toLowerCase().includes(e)):c},[i,c,g]),D=gye({getKey:r,isDisabled:s,items:E});(0,I.useEffect)(()=>{if(D.activeKey!==null)return;let e=D.enabledItems.find(e=>w.includes(r(e)))??D.enabledItems[0];e&&D.setActiveKey(r(e))},[D.activeKey,D.enabledItems,D.setActiveKey,r,w]);let O=e=>{y(!1),e||_(``),f===void 0&&C(e),l?.(e)},k=e=>`${h}-option-${encodeURIComponent(e)}`,A=e=>{let t=r(e);p===void 0&&x(t),u(e),m&&!d&&O(!1)},j=e=>{y(!0),_(e.target.value),D.setActiveKey(null)},M=e=>{if(Bk(e))return;let t;switch(e.key){case`ArrowDown`:t=[1,void 0];break;case`ArrowUp`:t=[-1,void 0];break;case`End`:t=[1,`end`];break;case`Home`:t=[-1,`start`]}t?(y(!0),e.preventDefault(),D.move(t[0],t[1])):e.key===`Enter`&&D.activeItem&&(e.preventDefault(),A(D.activeItem))},N=(0,I.useMemo)(()=>{if(!a)return[{label:``,items:E}];let e=new Map;for(let t of E){let n=a(t),r=e.get(n);r?r.push(t):e.set(n,[t])}return[...e].map(([e,t])=>({label:e,items:t}))},[E,a]);return{keyboardNavigation:v,onPointerMove:()=>{y(!1)},activeKey:D.activeKey,activeItem:D.activeItem,groups:N,inputValue:g,listboxId:h,onInputChange:j,onInputKeyDown:M,optionId:k,open:T,commit:A,selectedKeys:w,setOpen:O}}function yye(e){let{"aria-describedby":t,"aria-invalid":n,"aria-label":r,"aria-labelledby":i,"aria-required":a,activeTone:o=`neutral`,container:s,contentClassName:c,defaultInputValue:l=``,defaultOpen:u=!1,defaultValue:d=null,emptyMessage:f=`No matches`,getKey:p,getLabel:m,getSearchText:h=m,groupBy:g,id:_,inputProps:v,inputRef:y,isDisabled:b=()=>!1,items:x,onOpenChange:S,onValueChange:C,multiple:w,open:T,placeholder:E=`Search…`,renderItem:D,rootRef:O,trigger:k,triggerRef:A,value:j,...M}=e,N=e=>{let t=p(e);if(w){let e=j.includes(t)?j.filter(e=>e!==t):[...j,t];C?.(e,x.filter(t=>e.includes(p(t))))}else C?.(t,e)},P;w?P=j:j!==void 0&&(P=j===null?[]:[j]);let ee=(0,I.useId)(),te=k?.props??v,ne=_??te?.id??ee,re={id:ne,"aria-describedby":[t,te?.[`aria-describedby`]].filter(Boolean).join(` `)||void 0,"aria-invalid":n??te?.[`aria-invalid`],"aria-label":te?.[`aria-label`]??r,"aria-labelledby":te?.[`aria-labelledby`]??i,"aria-required":a??te?.[`aria-required`]},{keyboardNavigation:ie,onPointerMove:ae,activeItem:oe,activeKey:se,commit:ce,groups:le,inputValue:ue,listboxId:de,onInputChange:fe,onInputKeyDown:pe,open:me,optionId:he,selectedKeys:ge,setOpen:_e}=vye({defaultInputValue:l,defaultOpen:u,defaultValue:d,getKey:p,getSearchText:h,groupBy:g,id:ne,isDisabled:b,items:x,onOpenChange:S,onCommit:N,multiple:w??!1,controlledOpen:T,controlledKeys:P,trigger:k});hne(()=>{k&&_e(!1)});let ve=ym(`popover`),ye=s===void 0?ve:s,be=mye(`.caps-combobox-option[data-active="true"]:not(:disabled), [data-navigation="pointer"] .caps-combobox-option:hover:not(:disabled)`),xe=(0,F.jsx)(nP,{...v,...k?{}:re,"aria-activedescendant":oe?he(p(oe)):void 0,"aria-autocomplete":`list`,"aria-controls":de,"aria-expanded":!0,className:Dd(`input-sm`,v?.className),id:k?v?.id??`${ne}-input`:ne,onChange:e=>{v?.onChange?.(e),fe(e)},onKeyDown:e=>{v?.onKeyDown?.(e),e.defaultPrevented||pe(e)},placeholder:v?.placeholder??E,ref:y,role:`combobox`,value:ue}),Se=(0,F.jsx)(`div`,{id:de,ref:be,className:`caps-combobox-list`,"data-navigation":ie?`keyboard`:`pointer`,onPointerMove:ae,role:`listbox`,"aria-multiselectable":w??void 0,children:le.every(e=>e.items.length===0)?(0,F.jsx)(`div`,{className:`px-md py-md text-sm text-base-content`,children:f}):le.map(e=>(0,F.jsxs)(`div`,{"aria-label":e.label||void 0,role:e.label?`group`:void 0,children:[e.label?(0,F.jsx)(`div`,{className:`px-md pb-xs pt-sm text-xs text-base-content uppercase tracking-wider`,children:e.label}):null,e.items.map(e=>{let t=p(e),n=b(e),r=se===t,i={active:r,disabled:n,selected:ge.includes(t)};return(0,F.jsxs)(`button`,{"aria-disabled":n||void 0,"aria-selected":i.selected,className:`caps-combobox-option`,"data-active":r&&ie,disabled:n,id:he(t),onClick:()=>{ce(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,tabIndex:-1,type:`button`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`caps-combobox-check`,children:i.selected?(0,F.jsx)(tr,{}):null}),D?.(e,r,i)??m(e)]},t)})]},e.label))});return k?(0,F.jsx)(`div`,{...M,className:Dd(M.className),ref:O,children:(0,F.jsxs)(yve,{modal:!0,onOpenChange:_e,open:me,children:[(0,F.jsx)(jve,{...re,"aria-haspopup":`dialog`,className:`btn`,ref:A,render:k}),ye===null?null:(0,F.jsx)(Nve,{container:ye,children:(0,F.jsx)(sye,{align:`start`,side:`bottom`,sideOffset:4,children:(0,F.jsxs)(pye,{"data-active-tone":o,className:Dd(`min-w-40 rounded-box border border-base-300 bg-base-100 p-xs shadow-lg outline-none caps-combobox-panel caps-combobox-popup`,c),children:[(0,F.jsx)(`div`,{className:`caps-combobox-search`,children:xe}),Se]})})})]})}):(0,F.jsx)(`div`,{...M,className:Dd(M.className),ref:O,children:(0,F.jsxs)(`div`,{className:Dd(`caps-combobox-panel`,c),"data-active-tone":o,children:[(0,F.jsx)(`div`,{className:`caps-combobox-search`,children:xe}),Se]})})}var bye=(0,I.forwardRef)(function({label:e,icon:t,caption:n,appearance:r,className:i,...a},o){return(0,F.jsx)(`label`,{className:`caps-icon-choice`,"data-appearance":r===`compact`?r:void 0,children:(0,F.jsx)(Rk,{...a,appearance:r??`default`,"aria-label":e,className:Dd(`caps-icon-choice-input`,i),indicator:(0,F.jsx)(rD,{icon:t,caption:n}),ref:o})})}),xye=(0,I.forwardRef)(function({label:e,icon:t,hint:n,className:r,...i},a){let o=(0,I.useId)(),s=[i[`aria-describedby`],n?o:null].filter(Boolean).join(` `)||void 0;return(0,F.jsx)(`label`,{className:`caps-check-key`,children:(0,F.jsx)(Rk,{...i,"aria-label":e,"aria-describedby":s,className:Dd(`caps-check-key-input`,r),indicator:(0,F.jsxs)(`span`,{className:`caps-check-key-face`,"aria-hidden":`true`,children:[t?(0,F.jsx)(`span`,{className:`caps-check-key-icon`,children:t}):null,(0,F.jsxs)(`span`,{className:`caps-check-key-copy`,children:[(0,F.jsx)(`span`,{className:`caps-check-key-label`,children:e}),n?(0,F.jsx)(`span`,{className:`caps-check-key-hint`,id:o,children:n}):null]}),(0,F.jsx)(`span`,{className:`caps-check-key-lamp`})]}),ref:a})})});function Sye({className:e,...t}){return(0,F.jsx)(`div`,{...t,className:Dd(`caps-check-keys`,e)})}function Cye({checked:e}){let t=`caps-radio-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=(0,I.useRef)(null),o=Ld(a),{reduced:s}=o;return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=s||i.current===e;i.current=e;let r=e?4:0,a=pm(o,{ease:`outCubic`,duration:75}),c=e?fm(o,{bounce:.65,duration:300}):pm(o,{ease:`inCubic`,duration:100}),l=Qp(n.current,t?{rx:r,ry:r,cy:6,duration:0}:{rx:[{to:e?3.5:4.15,...a},{to:r,...c}],ry:[{to:e?4.5:3.85,...a},{to:r,...c}],cy:[{to:e?5.85:6.1,...a},{to:6,...c}]});return()=>{l.cancel()}},[e,s,o]),(0,F.jsxs)(`svg`,{ref:a,className:`caps-radio-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,F.jsx)(nm,{id:`${t}-shadow`}),(0,F.jsx)(rm,{id:`${t}-inset`}),(0,F.jsx)(`clipPath`,{id:`${t}-well`,children:(0,F.jsx)(`circle`,{cx:`6`,cy:`6`,r:`5`})})]}),(0,F.jsx)(`circle`,{className:`caps-radio-track`,cx:`6`,cy:`6`,r:`5.5`,filter:`url(#${t}-inset)`}),(0,F.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,F.jsx)(`ellipse`,{ref:n,cx:`6`,cy:`6`,rx:r?4:0,ry:r?4:0,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var rP=(0,I.createContext)(null),wye=(0,I.forwardRef)(function({children:e,className:t,defaultValue:n,disabled:r=!1,name:i,onValueChange:a,orientation:o=`vertical`,value:s,...c},l){let u=(0,I.useId)(),d=(0,I.useRef)(null);(0,I.useImperativeHandle)(l,()=>{if(!d.current)throw Error(`RadioGroup is not mounted`);return d.current},[]);let f=i??`radio-group-${u}`,[p,m]=(0,I.useState)(n),h=s??p;return(0,I.useEffect)(()=>{let e=d.current?.form;if(!e||s!==void 0)return;let t=e=>{queueMicrotask(()=>{e.defaultPrevented||m(n)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[s,n,c.form]),(0,F.jsx)(rP.Provider,{value:{disabled:r,name:f,onValueChange:e=>{s===void 0&&m(e),a?.(e)},value:h},children:(0,F.jsx)(`fieldset`,{...c,className:Dd(`flex gap-md`,o===`horizontal`?`flex-row flex-wrap`:`flex-col`,t),disabled:r,role:c.role??`radiogroup`,ref:d,children:e})})}),iP=(0,I.forwardRef)(function({className:e,indicator:t,onChange:n,onClick:r,value:i,...a},o){let s=(0,I.useContext)(rP);if(!s)throw Error(`RadioGroupItem must be used inside <RadioGroup>`);let c=s.value===i,l=e=>{n?.(e),e.target.checked&&s.onValueChange?.(i)};return(0,F.jsxs)(`span`,{className:`caps-radio`,"data-checked":c,"data-custom-indicator":t!==void 0||void 0,children:[(0,F.jsx)(`input`,{...a,"aria-checked":c,checked:c,className:Dd(`caps-radio-input`,e),disabled:s.disabled||a.disabled,name:s.name,onChange:l,onClick:r,ref:o,type:`radio`,value:i}),t===void 0?(0,F.jsx)(Cye,{checked:c}):t]})}),Tye=(0,I.forwardRef)(function({description:e,id:t,meta:n,title:r,...i},a){let o=(0,I.useContext)(rP),s=(0,I.useId)(),c=t??s,l=o?.value===i.value,u=o?.disabled===!0||i.disabled===!0;return(0,F.jsxs)(`label`,{className:`caps-choice-card`,"data-checked":l,"data-disabled":u||void 0,htmlFor:c,children:[(0,F.jsx)(iP,{...i,"aria-describedby":e?`${c}-description`:void 0,"aria-labelledby":`${c}-title`,id:c,ref:a}),(0,F.jsxs)(`span`,{className:`caps-choice-card-copy`,children:[(0,F.jsx)(`span`,{className:`caps-choice-card-title`,id:`${c}-title`,children:r}),e?(0,F.jsx)(`span`,{className:`caps-choice-card-description`,id:`${c}-description`,children:e}):null]}),n?(0,F.jsx)(`span`,{className:`caps-choice-card-meta`,children:n}):null]})}),Eye=(0,I.forwardRef)(function({label:e,icon:t,caption:n,art:r=`dim`,className:i,...a},o){return(0,F.jsx)(`label`,{className:`caps-icon-choice`,"data-art":r===`color`?r:void 0,children:(0,F.jsx)(iP,{...a,"aria-label":e,className:Dd(`caps-icon-choice-input`,i),indicator:(0,F.jsx)(rD,{icon:t,caption:n}),ref:o})})});(0,I.forwardRef)(function({label:e,color:t,className:n,...r},i){return(0,F.jsx)(`label`,{className:`caps-icon-choice`,"data-art":`color`,"data-swatch":``,title:e,children:(0,F.jsx)(iP,{...r,"aria-label":e,className:Dd(`caps-icon-choice-input`,n),indicator:(0,F.jsx)(rD,{icon:(0,F.jsx)(`span`,{className:`caps-swatch-dot`,style:{backgroundColor:t}})}),ref:i})})});var Dye=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,F.jsxs)(`span`,{className:`caps-select-shell`,children:[(0,F.jsx)(`select`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Dd(`select select-bordered caps-select w-full`,t&&`select-error`,e),ref:r}),!n.multiple&&(!n.size||n.size<=1)?(0,F.jsx)(nr,{className:`caps-select-chevron`,"aria-hidden":`true`}):null]})});function Oye({checked:e}){let t=`caps-switch-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(null),i=(0,I.useRef)(e).current,a=(0,I.useRef)(e),o=Hd();return(0,I.useLayoutEffect)(()=>{if(!n.current||!r.current)return;let t=o||a.current===e;a.current=e;let i=e?16:8,s=Fd(n.current),c=fm(s,{bounce:.25,duration:440}),l=pm(s,{ease:`inOutSine`,duration:100}),u=Qp(n.current,t?{x:2,y:2,width:i,height:8,duration:0}:{x:[{to:e?2.5:1.5,...l},{to:2,...c}],y:[{to:1.5,...l},{to:2,...c}],height:[{to:9,...l},{to:8,...c}],width:[{to:e?7:16.5,...l},{to:i,...c}]}),d=Qp(r.current,{gradientTransform:e?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`,...t?{duration:0}:{delay:l.duration,...c}});return()=>{u.cancel(),d.cancel()}},[e,o]),(0,F.jsxs)(`svg`,{className:`caps-switch-visual`,width:`40`,height:`24`,viewBox:`0 0 20 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{ref:r,id:`${t}-surface`,transform:i?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`}),(0,F.jsx)(nm,{id:`${t}-shadow`}),(0,F.jsx)(rm,{id:`${t}-inset`}),(0,F.jsx)(`clipPath`,{id:`${t}-track`,children:(0,F.jsx)(`rect`,{x:`1`,y:`1`,width:`18`,height:`10`,rx:`5`})})]}),(0,F.jsx)(`rect`,{className:`caps-switch-track`,filter:`url(#${t}-inset)`,x:`0.5`,y:`0.5`,width:`19`,height:`11`,rx:`5.5`}),(0,F.jsx)(`g`,{clipPath:`url(#${t}-track)`,children:(0,F.jsx)(`rect`,{ref:n,x:`2`,y:`2`,width:i?16:8,height:`8`,rx:`4`,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var kye=(0,I.forwardRef)(function({className:e,checked:t,defaultChecked:n=!1,onChange:r,onCheckedChange:i,...a},o){let s=(0,I.useRef)(null),[c,l]=(0,I.useState)(n),u=t??c;return(0,I.useImperativeHandle)(o,()=>{if(!s.current)throw Error(`Switch input is not mounted`);return s.current},[]),(0,I.useEffect)(()=>{let e=s.current?.form;if(!e||t!==void 0)return;let r=e=>{queueMicrotask(()=>{!e.defaultPrevented&&s.current&&l(n)})};return e.addEventListener(`reset`,r),()=>{e.removeEventListener(`reset`,r)}},[t,n,a.form]),(0,F.jsxs)(`span`,{className:`caps-switch`,"data-checked":u,children:[(0,F.jsx)(`input`,{...a,checked:u,className:Dd(`caps-switch-input`,e),onChange:e=>{t===void 0&&l(e.target.checked),r?.(e),i?.(e.target.checked)},ref:s,role:`switch`,type:`checkbox`}),(0,F.jsx)(Oye,{checked:u})]})}),Aye=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,F.jsx)(`textarea`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Dd(`textarea textarea-bordered w-full`,t&&`textarea-error`,e),ref:r})}),jye=xb(jb),Mye=xb(Nb),Nye=xb(zb(Ub)),Pye=xb(Fb(jb)),aP=Fb(Vb(File)),Fye=xb(aP),oP=Lb([jb,Ub,Nb,kb,Ab,Fb(jb),aP]),Iye=xb(oP),sP=e=>Um(jye(e.state.value),()=>``),cP=e=>Um(Mye(e.state.value),()=>!1),Lye=e=>Um(Nye(e.state.value),()=>null),Rye=e=>Um(Pye(e.state.value),()=>[]),zye=e=>Um(Fye(e.state.value),()=>[]),Bye=e=>Um(Iye(e.state.value),()=>null);function Vye({field:e,spec:t,locked:n,...r}){let[i,a]=(0,I.useState)(!1);return(0,F.jsxs)(dk,{children:[(0,F.jsx)(nP,{...r,name:t.name,disabled:n,type:i?`text`:`password`,autoComplete:`off`,spellCheck:!1,className:`caps-field-secret`,placeholder:t.placeholder,readOnly:t.readOnly,value:sP(e),onBlur:e.handleBlur,onChange:t=>{e.handleChange(t.currentTarget.value)}}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,size:`icon`,"aria-label":i?`Hide`:`Show`,"aria-pressed":i,disabled:n,onClick:()=>{a(e=>!e)},children:i?(0,F.jsx)(ir,{"aria-hidden":`true`}):(0,F.jsx)(ar,{"aria-hidden":`true`})})]})}var Hye={text:`text`,email:`email`,url:`url`,tel:`tel`};function Uye({spec:e,field:t,locked:n,...r}){let i=zye(t),a=n||e.readOnly===!0,o=(0,I.useRef)(null);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-sm`,children:[(0,F.jsx)(Md,{asChild:!0,children:(0,F.jsx)(`input`,{...r,ref:o,type:`file`,tabIndex:-1,required:r.required===!0&&i.length===0,name:e.name,accept:e.accept,multiple:e.multiple,disabled:a,onBlur:t.handleBlur,onChange:e=>{t.handleChange(Array.from(e.currentTarget.files??[])),e.currentTarget.value=``}})}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,"aria-label":`Choose files for ${e.label}`,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],disabled:a,onBlur:t.handleBlur,onClick:()=>{o.current?.click()},children:`Choose files`}),(0,F.jsx)(Ak,{items:i.map((e,t)=>({id:String(t),name:e.name,preview:{kind:`file`},progress:0,progressLabel:`${String(e.size)} bytes`,statusLabel:`Selected`,actions:a?{}:{remove:{label:`Remove`,accessibleLabel:`Remove ${e.name}`}}})),onRemove:e=>{t.handleChange(i.filter((t,n)=>String(n)!==e))},onCancel:()=>void 0,onRetry:()=>void 0})]})}function Wye({spec:e,field:t,locked:n,...r}){let i=e=>{t.handleChange(e)},a={...r,name:e.name,disabled:n,onBlur:t.handleBlur};switch(e.kind){case`text`:case`email`:case`url`:case`tel`:return(0,F.jsx)(nP,{...a,type:Hye[e.kind],inputMode:e.kind===`text`?void 0:e.kind,autoComplete:e.autoComplete,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}});case`textarea`:return(0,F.jsx)(Aye,{...a,rows:e.rows??3,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}});case`secret`:return(0,F.jsx)(Vye,{...r,field:t,spec:e,locked:n});case`money`:return(0,F.jsxs)(dk,{children:[(0,F.jsx)(fk,{className:`caps-field-currency`,children:e.currency??`USD`}),(0,F.jsx)(nP,{...a,inputMode:`decimal`,autoComplete:`off`,className:`caps-field-amount`,placeholder:e.placeholder??`0.00`,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}})]});case`date`:return(0,F.jsx)(nP,{...a,type:`date`,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}});case`number`:return(0,F.jsx)(Dk,{...a,...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max},...e.step===void 0?{}:{step:e.step},...e.unit===void 0?{}:{unit:e.unit},...e.wrap===void 0?{}:{wrap:e.wrap},disabled:n||e.readOnly===!0,decrementLabel:`Decrease ${e.label}`,incrementLabel:`Increase ${e.label}`,value:Lye(t),onValueChange:e=>{t.handleChange(e)}});case`select`:return(0,F.jsxs)(Dye,{...a,value:sP(t),onChange:e=>{i(e.currentTarget.value)},children:[e.placeholder===void 0?null:(0,F.jsx)(`option`,{value:``,disabled:!0,children:e.placeholder}),e.options.map(e=>(0,F.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]});case`combobox`:return(0,F.jsx)(yye,{id:r.id??e.name,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],"aria-required":r[`aria-required`],items:e.options,getKey:e=>e.value,getLabel:e=>e.label,isDisabled:t=>t.disabled||n||e.readOnly===!0,value:sP(t),...e.placeholder===void 0?{}:{placeholder:e.placeholder},trigger:(0,F.jsx)(_ye,{name:e.name,disabled:n||e.readOnly===!0,onBlur:t.handleBlur,children:e.options.find(e=>e.value===sP(t))?.label??e.placeholder??`Choose…`}),inputProps:{"aria-label":`Search ${e.label}`,disabled:n||e.readOnly===!0},onValueChange:e=>{i(e??``),t.handleBlur()}});case`file`:return(0,F.jsx)(Uye,{...r,spec:e,field:t,locked:n});case`checkbox`:return(0,F.jsx)(Rk,{...a,disabled:n||e.readOnly===!0,checked:cP(t),onChange:e=>{t.handleChange(e.currentTarget.checked)}});case`switch`:return(0,F.jsx)(kye,{...a,disabled:n||e.readOnly===!0,checked:cP(t),onCheckedChange:e=>{t.handleChange(e)}});case`radio`:case`icon-radio`:case`checkboxes`:case`icon-checkboxes`:return null}}var Gye=new Set([`radio`,`icon-radio`,`checkboxes`,`icon-checkboxes`]);function Kye({spec:e,field:t,locked:n,error:r,layout:i}){let a=n||e.readOnly===!0,o=e.label;if(e.kind===`checkboxes`||e.kind===`icon-checkboxes`){let n=Rye(t),s=(e,r)=>{t.handleChange(r?[...n,e]:n.filter(t=>t!==e))};return(0,F.jsx)(bk,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:e.kind===`icon-checkboxes`?(0,F.jsx)(`div`,{className:`caps-field-icon-choices`,children:e.options.map(r=>(0,F.jsx)(bye,{name:e.name,value:r.value,label:r.label,...r.caption===void 0?{}:{caption:r.caption},icon:r.icon,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))}):(0,F.jsx)(Sye,{children:e.options.map(r=>(0,F.jsx)(xye,{name:e.name,value:r.value,label:r.label,icon:r.icon,hint:r.description,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))})})}let s=e.options.some(e=>e.description!==void 0||e.meta!==void 0);return(0,F.jsx)(bk,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:(0,F.jsx)(wye,{name:e.name,"aria-label":o,value:sP(t),onValueChange:e=>{t.handleChange(e),t.handleBlur()},orientation:e.kind===`icon-radio`||s?`horizontal`:`vertical`,children:e.options.map(t=>e.kind===`icon-radio`?(0,F.jsx)(Eye,{value:t.value,label:t.label,...t.caption===void 0?{}:{caption:t.caption},icon:t.icon,disabled:t.disabled},t.value):s?(0,F.jsx)(Tye,{value:t.value,title:t.label,description:t.description,meta:t.meta,disabled:t.disabled},t.value):(0,F.jsx)(Sk,{label:t.label,orientation:`inline`,children:(0,F.jsx)(iP,{value:t.value,disabled:t.disabled})},t.value))})})}function qye({spec:e,field:t,locked:n,error:r,render:i,...a}){return i({name:e.name,label:e.label,help:e.help,value:Bye(t),onChange:e=>{t.handleChange(e)},onBlur:t.handleBlur,error:r,disabled:n,id:a.id??e.name,"aria-describedby":a[`aria-describedby`],"aria-invalid":r!==void 0})}function Jye({form:e,spec:t,locked:n,layout:r}){let i=QO({form:e,name:t.name}),a=XO(e.store,e=>e.submissionAttempts>0),o=i.state.meta.isBlurred||a?lk(i.state.meta):void 0;if(t.render===void 0&&Gye.has(t.kind))return(0,F.jsx)(Kye,{spec:t,field:i,locked:n,error:o,layout:r});let s=r===`columns`?t.kind===`switch`||t.kind===`checkbox`?`horizontal`:`vertical`:t.kind===`checkbox`?`inline`:(t.layout??(t.kind===`switch`?`row`:`stacked`))===`row`?`horizontal`:`vertical`;return(0,F.jsx)(Sk,{label:t.label,...r===`columns`?{labelTitle:t.label}:{},description:t.help,icon:t.icon,orientation:s,error:o,...t.required===void 0?{}:{required:t.required},...t.optional===void 0?{}:{optional:t.optional},children:t.render===void 0?(0,F.jsx)(Wye,{spec:t,field:i,locked:n}):(0,F.jsx)(qye,{spec:t,field:i,locked:n,error:o,render:t.render})})}var Yye=xb(noe(jb,oP));function lP({form:e,spec:t,locked:n,layout:r}){let i=t.when;return XO(e.store,e=>i===void 0||i(Um(Yye(e.values),()=>({}))))?(0,F.jsx)(Jye,{form:e,spec:t,locked:n,layout:r}):null}function Xye({form:e,section:t,locked:n,layout:r}){let i=t.fields.map(t=>(0,F.jsx)(lP,{form:e,spec:t,locked:n,layout:r},t.name));return t.title===void 0?i:(0,F.jsx)(yk,{title:t.title,description:t.description,layout:r,children:i})}function uP({model:e,names:t,disabled:n=!1,layout:r}){let i=e.form;return t===void 0?e.description.sections.map(e=>(0,F.jsx)(Xye,{form:i,section:e,locked:n,layout:r},e.id??``)):t.map(t=>{let a=e.description.fields.find(e=>e.name===t);return a===void 0?null:(0,F.jsx)(lP,{form:i,spec:a,locked:n,layout:r},t)})}var dP=class{annotation;constructor(e){this.annotation=e}},Zye=class{sections;constructor(e){this.sections=e}},fP=`caps/form`,pP=0;function mP(e){pP+=1;let t={[`${fP}:${String(pP)}`]:new dP(e)};return e.label!==void 0&&(t.title=e.label),e.help!==void 0&&(t.description=e.help),t}jb.annotate(mP({kind:`secret`})).pipe(ioe(`Secret`));var hP=e=>{let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)};function Qye(e){return Object.values(e??{}).reduce((e,t)=>t instanceof dP?{...e,...t.annotation}:e,{})}function gP(e){return e.reduce((e,t)=>({...e,...Qye(t)}),{})}function _P(e){let t=e?.[fP];return t instanceof Zye?t.sections:{}}var vP=xb(jb);function yP(e){if(tv(e))return Mne(vP(e.literal),{onNone:()=>null,onSome:e=>[e]});if(!av(e))return null;let t=[];for(let n of e.types){if($_(n))continue;let e=yP(n);if(e===null)return null;t.push(...e)}return t}function bP(e){if(ev(e))return{type:`string`,literals:[]};if(dae(e))return{type:`number`,nullable:!1};if(fae(e))return{type:`boolean`};let t=yP(e);if(t!==null)return{type:`string`,literals:t};if(rv(e)){let[t]=e.rest;if(t===void 0)return null;if(ev(t))return{type:`strings`,literals:[]};let n=yP(t);return n===null?null:{type:`strings`,literals:n}}if(av(e)){let t=e.types.filter(e=>!$_(e)&&!Q_(e)),n=e.types.some(e=>Q_(e)),[r]=t;if(t.length!==1||r===void 0)return null;let i=bP(r);return i?.type===`number`?{type:`number`,nullable:n}:n?null:i}return null}function $ye(e){let t=e.ast;if(!iv(t))throw Error(`A schema form needs a Schema.Struct.`);return{fields:t.propertySignatures.map(e=>{let t=String(e.name),n=Fy(e.type),r=gP([e.type.annotations,...(e.type.checks??[]).map(e=>e.annotations)]),i=r.kind===`file`?{type:`files`}:bP(n);if(i===null)throw Error(`Schema field "${t}" has no form control. Annotate it with field({ render }) or a kind.`);return{name:t,valueType:i,optional:e.type.context?.isOptional===!0,annotation:r,title:Zy(e.type),description:Qy(e.type)}}),sections:_P(Xy(t))}}function xP(e){let t=e,n=!1,r=!1;for(;;)if(t instanceof hu)n=!0,t=t.unwrap();else if(t instanceof yu)r=!0,t=t.unwrap();else if(t instanceof xu)t=t.unwrap();else if(t instanceof ku)t=t.in;else return{node:t,optional:n,nullable:r}}function SP(e){if(e instanceof $l){let t=e.options.map(e=>SP(e));return t.some(e=>e===null)?null:t.flatMap(e=>e??[])}let t=e instanceof lu?e.options:e instanceof du?[...e.values]:null;if(t===null)return null;let n=t.map(e=>vP(e));return n.every(Hm)?n.map(e=>e.value):null}function ebe(e){let{node:t,nullable:n}=xP(e);if(t instanceof ll)return{type:`string`,literals:[]};if(t instanceof Nl)return{type:`number`,nullable:n};if(t instanceof Ll)return{type:`boolean`};let r=SP(t);if(r!==null)return{type:`string`,literals:r};if(t instanceof ql){let e=xP(t.element).node;if(e instanceof ll)return{type:`strings`,literals:[]};let n=SP(e);return n===null?null:{type:`strings`,literals:n}}return null}function CP(e){let t=[e];for(;;){let e=t[t.length-1];if(e===void 0)break;let n=e instanceof hu||e instanceof yu||e instanceof xu?e.unwrap():e instanceof ku?e.in:e;if(n===e)break;t.push(n)}return t.reverse().map(e=>Zo.get(e))}function wP(e){return CP(e).reduce((e,t)=>({...e,...t}),{})}function tbe(e){return Object.entries(e.shape)}function nbe(e){let t=xP(e).node;if(!(t instanceof Yl))throw Error(`A schema form needs a z.object.`);return{fields:tbe(t).map(([e,t])=>{let n=gP(CP(t)),r=n.kind===`file`?{type:`files`}:ebe(t);if(r===null)throw Error(`Schema field "${e}" has no form control. Annotate it with field({ render }) or a kind.`);let i=wP(t);return{name:e,valueType:r,optional:xP(t).optional,annotation:n,title:i.title,description:i.description}}),sections:_P(wP(e))}}function rbe(e,t){let n=t.options??{};return(e.length>0?e:Object.keys(n)).map(e=>{let t=n[e],r=t===void 0?{}:t instanceof Object?t:{label:t};return{value:e,label:r.label??hP(e),description:r.description,meta:r.meta,icon:r.icon,caption:r.caption,disabled:r.disabled===!0}})}function ibe(e,t){let n=t.some(e=>e.icon!==void 0);switch(e.type){case`boolean`:return`switch`;case`number`:return`number`;case`strings`:return n?`icon-checkboxes`:`checkboxes`;case`files`:return`file`;case`string`:return t.length===0?`text`:t.length>12?`combobox`:n?`icon-radio`:t.some(e=>e.description!==void 0||e.meta!==void 0)||t.length<=3?`radio`:`select`}}function abe(e,t){switch(e.type){case`boolean`:return!1;case`number`:return e.nullable?null:0;case`strings`:case`files`:return[];case`string`:return t[0]?.value??``}}function obe(e){let t=e instanceof sl?nbe(e):$ye(e),n=t.fields.map((e,t)=>{let{kind:n,...r}=e.annotation,i=rbe(e.valueType.type===`string`||e.valueType.type===`strings`?e.valueType.literals:[],e.annotation),a=r.help??e.description;return{...r,name:e.name,label:r.label??e.title??hP(e.name),help:a,kind:n??ibe(e.valueType,i),options:i,optionalInSchema:e.optional,index:t}}),r={};t.fields.forEach((e,t)=>{let i=n[t];i&&(r[e.name]=abe(e.valueType,i.options))});let i=e=>e.order??e.index,a=e=>e.section!==void 0&&Object.hasOwn(t.sections,e.section)?e.section:null,o=e=>n.filter(t=>a(t)===e).sort((e,t)=>i(e)-i(t)),s=Object.entries(t.sections).map(([e,t])=>({id:e,title:t.title,description:t.description,fields:o(e)}));return{fields:n,sections:[{id:null,title:void 0,description:void 0,fields:o(null)},...s].filter(e=>e.fields.length>0),defaults:r}}function TP(e){let t=e instanceof sl?e:$ae(e);return{"~standard":{...t[`~standard`],validate:e=>{let n=t[`~standard`].validate(e);return n instanceof Promise?n.then(e=>EP(e)):EP(n)}}}}function EP(e){return e.issues===void 0?e:{issues:e.issues.map(e=>e.path===void 0?e:{...e,path:e.path.slice(0,1)})}}var DP=`onServer`;function OP(e){let t=e.querySelector(`[aria-invalid="true"]`),n=t?.matches(`input, select, textarea, button, [tabindex]`)?t:t?.querySelector(`input, select, textarea, button`);return n?.focus(),n!=null}function sbe(e){if(OP(e))return()=>void 0;let t=new MutationObserver(()=>{OP(e)&&t.disconnect()});return t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-invalid`]}),()=>{t.disconnect()}}function cbe(e){return e.state.meta.errorMap.onServer!==void 0}function lbe(e){e.setMeta(e=>({...e,errorMap:{...e.errorMap,[DP]:void 0}}))}function ube(e,t,n){e.setFieldMeta(t,e=>({...e,isBlurred:!0,errorMap:{...e.errorMap,[DP]:n}}))}function kP(e){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(e.defaultValues),[s,c]=(0,I.useState)(null);hO(a,e.defaultValues)||(o(e.defaultValues),c(null));let{schema:l}=e,u=(0,I.useMemo)(()=>obe(l),[l]),d=(0,I.useMemo)(()=>TP(l),[l]),f=ok({defaultValues:s??a,validators:{onChange:d,onSubmit:d},listeners:{onChange:({fieldApi:e})=>{n(null),i(null),cbe(e)&&lbe(e)}},onSubmit:async({value:t,formApi:r})=>{n(null),i(null);let a=await TP(l)[`~standard`].validate(t);if(a.issues){n(a.issues[0]?.message??`Check the form and try again.`);return}let o;try{o=await e.onSubmit(a.value,t)??{kind:`saved`}}catch(t){console.error(`SchemaForm submit failed`,t),n(e.failure??`Couldn't save changes. Try again.`);return}if(o.kind===`refused`){n(o.error??null);let e=r;for(let[t,n]of Object.entries(o.fields??{}))n!==void 0&&n.length>0&&ube(e,t,n);return}let s=o.values??t;c(s),r.reset(s),i(o.message??`Saved`),e.onSaved?.(s)}});return{description:u,form:f,error:t,saved:r,discard:()=>{n(null),i(null),f.reset()},submit:()=>f.handleSubmit()}}function AP(e){return{dirty:XO(e.form.store,e=>!e.isDefaultValue),submitting:XO(e.form.store,e=>e.isSubmitting),canSubmit:XO(e.form.store,e=>e.canSubmit)}}function jP({model:e,submitLabel:t=`Save changes`,discardLabel:n,onCancel:r,cancelLabel:i,allowClean:a,layout:o,footer:s,children:c,disabled:l=!1,...u}){let{submitting:d}=AP(e),f=(0,I.useRef)(null),p=(0,I.useRef)(()=>void 0);return(0,I.useEffect)(()=>()=>{p.current()},[]),(0,F.jsxs)(_k,{...u,ref:f,layout:o,busy:d,noValidate:!0,onSubmit:t=>{t.preventDefault(),e.form.state.isSubmitting||e.submit().then(()=>{p.current();let t=f.current;t!==null&&!e.form.state.isValid&&(p.current=sbe(t))})},children:[c??(0,F.jsx)(uP,{model:e,disabled:l,layout:o}),s===void 0?(0,F.jsx)(fbe,{model:e,label:t,discardLabel:r===void 0?n:void 0,onCancel:r,cancelLabel:i,allowClean:a??r!==void 0,divider:r===void 0}):s]})}function dbe({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i,...a}){let o=kP({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i});return(0,F.jsx)(jP,{...a,model:o})}function MP(e){return`model`in e?(0,F.jsx)(jP,{...e}):(0,F.jsx)(dbe,{...e})}function fbe({model:e,label:t,discardLabel:n,onCancel:r,cancelLabel:i=`Cancel`,allowClean:a=!1,dirtyLabel:o=`Unsaved changes`,buttonProps:s,...c}){let{dirty:l,submitting:u}=AP(e),d=u?null:e.saved&&!l?(0,F.jsx)(vm,{tone:`success`,size:`compact`,label:e.saved}):l?(0,F.jsx)(vm,{tone:`neutral`,size:`compact`,label:o}):null;return(0,F.jsxs)(gk,{...c,error:e.error,status:d,children:[r?(0,F.jsx)(ZE,{type:`button`,variant:`ghost`,disabled:u,onClick:r,children:i}):n&&l?(0,F.jsx)(ZE,{type:`button`,variant:`ghost`,disabled:u,onClick:e.discard,children:n}):null,(0,F.jsx)(ZE,{...s,type:`submit`,loading:u,disabled:u||!l&&!a,title:!l&&!a?`No changes to save`:void 0,children:t})]})}var NP=new Set([`Enter`,` `]),pbe=(0,I.forwardRef)(function({children:e,onConfirm:t,holdMs:n=900,holdHint:r=`Press and hold to confirm.`,className:i,disabled:a,loading:o=!1,result:s,resultLabel:c,onBlur:l,onKeyDown:u,onKeyUp:d,onPointerDown:f,onPointerUp:p,onPointerLeave:m,onPointerCancel:h,...g},_){let v=(0,I.useRef)(null),y=(0,I.useRef)(null),b=(0,I.useRef)(null),x=(0,I.useRef)(null),S=(0,I.useRef)(t),C=(0,I.useId)();(0,I.useEffect)(()=>{S.current=t},[t]),(0,I.useEffect)(()=>()=>{y.current?.cancel(),b.current!==null&&clearTimeout(b.current)},[]);let w=()=>{y.current=null,b.current=null,x.current=null,S.current();let e=v.current;if(!e||!Bd(e))return;let t=Fd(e);e.animate([{opacity:1},{opacity:0}],{duration:t.normal,easing:zd(t,t.easeExit)})},T=e=>{let t=v.current;if(a===!0||o||!t||y.current||b.current)return;if(x.current=e,!Bd(t)){b.current=setTimeout(w,n);return}let r=Fd(t),i=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:n,easing:r.reduced?`steps(3, end)`:zd(r,`cubic-bezier(0.3, 0, 0.7, 1)`)});i.addEventListener(`finish`,w),y.current=i},E=e=>{if(e!==void 0&&x.current!==e)return;x.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);let t=y.current,n=v.current;if(!t||!n)return;y.current=null;let r=getComputedStyle(n).transform;t.cancel();let i=Fd(n);n.animate([{transform:r===`none`?`scaleY(0)`:r},{transform:`scaleY(0)`}],{duration:i.fast,easing:zd(i,i.ease)})};return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(ZE,{...g,ref:_,disabled:a,loading:o,result:s,resultLabel:c??(s===void 0?void 0:e),"aria-describedby":C,className:Dd(`caps-hold-button`,i),onBlur:e=>{E(),l?.(e)},onPointerDown:e=>{f?.(e),e.button===0&&T(e.pointerId)},onPointerUp:e=>{p?.(e),E(e.pointerId)},onPointerLeave:e=>{m?.(e),E(e.pointerId)},onPointerCancel:e=>{h?.(e),E(e.pointerId)},onKeyDown:e=>{u?.(e),e.key===`Escape`&&E(),NP.has(e.key)&&(e.preventDefault(),e.repeat||T(`key`))},onKeyUp:e=>{d?.(e),NP.has(e.key)&&(e.preventDefault(),E(`key`))},children:[(0,F.jsx)(`span`,{ref:v,"aria-hidden":`true`,className:`caps-hold-fill`}),e]}),(0,F.jsx)(Md,{id:C,children:r})]})}),PP=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`code`,{...t,className:Dd(`caps-inline-code`,e),ref:n})}),mbe=8e3,FP=(0,I.forwardRef)(function({className:e,detail:t,framed:n=!0,icon:r,message:i,onRetry:a,size:o=`md`,slowAfterMs:s=mbe,variant:c=`line`,...l},u){let[d,f]=(0,I.useState)(!1);return(0,I.useEffect)(()=>{if(f(!1),!Number.isFinite(s))return;let e=globalThis.setTimeout(()=>{f(!0)},s);return()=>{globalThis.clearTimeout(e)}},[s,i]),(0,F.jsxs)(`div`,{...l,className:Dd(`caps-loading-state`,e),"data-framed":n?void 0:`false`,"data-icon":r?``:void 0,"data-size":o,"data-slow":d||void 0,ref:u,role:`status`,children:[r?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`caps-loading-state-icon`,children:r}):null,(0,F.jsx)(um,{decorative:!0,size:o,variant:c}),(0,F.jsxs)(`span`,{className:`caps-loading-state-copy`,children:[(0,F.jsx)(`span`,{children:i}),t?(0,F.jsx)(`span`,{className:`caps-loading-state-detail`,children:t}):null,d?(0,F.jsx)(`span`,{className:`caps-loading-state-detail`,children:`Still working…`}):null]}),d&&a?(0,F.jsx)(ZE,{className:`caps-loading-state-retry`,size:`sm`,variant:`outline`,onClick:a,children:`Retry`}):null]})}),IP=`data-reorder-key`;function hbe(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{element:t,top:r.top-n.top+e.scrollTop,left:r.left-n.left+e.scrollLeft,width:r.width,height:r.height}}function gbe(e,t,n){e.forEach((e,r)=>{e.animate(t.reduced?[{opacity:0},{opacity:1}]:[{opacity:0,transform:`translateY(${String(t.distance)}px)`},{opacity:1,transform:`none`}],{duration:t.normal,delay:n+r*t.stagger,easing:zd(t,t.ease),fill:`backwards`})})}function _be(e,t,n){let r=t.element.cloneNode(!0);if(!(r instanceof HTMLElement))return;r.removeAttribute(IP),r.removeAttribute(`id`),r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`inert`,``),Object.assign(r.style,{position:`absolute`,top:`${String(t.top-e.clientTop)}px`,left:`${String(t.left-e.clientLeft)}px`,width:`${String(t.width)}px`,height:`${String(t.height)}px`,margin:`0`,pointerEvents:`none`});let i=getComputedStyle(e).position!==`static`;i||(e.style.position=`relative`),e.append(r);let a=r.animate(n.reduced?[{opacity:1},{opacity:0}]:[{opacity:1,transform:`none`},{opacity:0,transform:`translateY(${String(-n.distance)}px)`}],{duration:n.fast,easing:zd(n,n.easeExit),fill:`forwards`}),o=()=>{r.remove(),!i&&e.querySelector(`:scope > [inert]`)===null&&e.style.removeProperty(`position`)};a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o)}function vbe(e,t,n,r){let i=e.style.overflow;e.style.overflow=`clip`;let a=e.animate([{height:`${String(t)}px`},{height:`${String(n)}px`}],r),o=()=>{e.style.overflow=i};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a}function ybe(e,t){let n=(0,I.useRef)(null),r=(0,I.useRef)(0),i=(0,I.useRef)(null),a=t.join(`\0`);(0,I.useLayoutEffect)(()=>{let o=e.current;if(o===null){n.current=null;return}let s=n.current,c=s?.order!==a,l=i.current?o.getBoundingClientRect().height:r.current;c&&(i.current?.cancel(),i.current=null);let u=c?o.getBoundingClientRect().height:r.current;r.current=u;let d=new Map;for(let e of o.querySelectorAll(`:scope [${IP}]`)){let t=e.getAttribute(IP);if(t===null)continue;let n=s?.rows.get(t);d.set(t,!c&&n?.element===e?n:hbe(o,e))}let f=new Set(t);if(n.current={order:a,keys:f,rows:d},s===null||!c||!Bd(o))return;let p=Fd(o),m=[...s.rows].filter(([e,t])=>!f.has(e)&&!t.element.isConnected),h={duration:p.slow,delay:m.length>0?p.fast:0,easing:zd(p,p.ease),fill:`backwards`},g=[],_=[];for(let[e,t]of d){let n=s.rows.get(e);if(n===void 0){s.keys.has(e)||g.push(t.element);continue}let r=n.left-t.left,i=n.top-t.top;(r!==0||i!==0)&&(_.push(t.element),!(p.reduced||p.slow<=0)&&t.element.animate([{transform:`translate(${String(r)}px, ${String(i)}px)`},{transform:`none`}],h))}if(p.reduced)for(let e of _)e.animate([{opacity:.3},{opacity:1}],{duration:p.fast,easing:p.ease});else for(let[,e]of m)_be(o,e,p);if(gbe(g,p,_.length>0&&!p.reduced?p.fast:0),!p.reduced&&Math.abs(l-u)>.5){let e=vbe(o,l,u,h);i.current=e,e.addEventListener(`finish`,()=>{i.current===e&&(i.current=null)})}})}var LP=(0,I.createContext)(null);function RP(){let e=(0,I.useContext)(LP);if(!e)throw Error(`Shed data requires a workspace provider`);return e}function zP({label:e,order:t,children:n,listRoot:r}){let i=(0,I.useRef)(null),a=r??i;return ybe(a,t),(0,F.jsx)(`div`,{ref:a,children:(0,F.jsx)(Kme,{role:`list`,"aria-label":e,children:n})})}var bbe=R({command:$b.pipe(Bb(Zb(16384))).annotate(mP({label:`Command`,required:!0,placeholder:`pnpm dev`})),port:zb(vC.fields.port).annotate(mP({label:`Port (optional)`,help:`Web server preview only.`,min:1,max:65535,render:e=>(0,F.jsx)(nP,{name:e.name,id:e.id,type:`number`,inputMode:`numeric`,placeholder:`5173`,min:1,max:65535,step:1,value:e.value??``,disabled:e.disabled,"aria-describedby":e[`aria-describedby`],"aria-invalid":e[`aria-invalid`],onBlur:()=>{e.onBlur()},onChange:t=>{let n=t.currentTarget;e.onChange(n.value===``?null:n.valueAsNumber)}})}))}),xbe=[{command:`pwd`,label:`Folder`,port:null},{command:`ls`,label:`Files`,port:null},{command:`echo hello`,label:`Hello`,port:null}];function BP({openPreview:e,processNavigation:t}){let{ports:{items:n},processes:{items:r,loading:i,error:a,fix:o,actions:s,stop:c,start:l,output:u,unavailableReason:d}}=RP(),f=(0,I.useRef)(null),p=(0,I.useRef)(null),m=(0,I.useRef)(null),h=(0,I.useRef)(null),g=(0,I.useRef)(0),[_,v]=(0,I.useState)(null),y=e=>{Date.now()-g.current<900&&v(e)},b=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(!t||b.current===t.requestId||!f.current)return;let e=[...f.current.querySelectorAll(`[${IP}]`)].find(e=>e.getAttribute(IP)===t.processId);e&&(e.focus(),b.current=t.requestId)},[t,r]);let x=u?.processId??null,S=u?.data!==null;(0,I.useEffect)(()=>{x!==null&&S&&m.current?.scrollIntoView({block:`start`})},[x,S]);let C=u?.data?.lines.length??0,w=u?.data?.process.state===`running`;(0,I.useEffect)(()=>{let e=p.current;w&&e&&(e.scrollTop=e.scrollHeight)},[w,C]);let T=kP({schema:bbe,defaultValues:{command:``,port:null},onSubmit:async({command:e,port:t})=>await l?.(t===null?{command:e}:{command:e,port:t})?{kind:`saved`}:{kind:`refused`}}),E=r!==null||i||a!==null?i&&r===null?(0,F.jsx)(FP,{message:`Loading command history`,size:`sm`,framed:!1}):a!==null&&r===null?(0,F.jsx)(`div`,{className:`px-2 pb-3`,children:(0,F.jsx)(SD,{variant:`quiet`,role:`status`,title:`Can't run commands`,description:a.message,actions:o===void 0?void 0:(0,F.jsx)(ZE,{size:`xs`,variant:`outline`,onClick:()=>void o(),children:a.action===`grant`?`Allow access`:`Try again`})})}):r===null||r.length===0?(0,F.jsx)(`div`,{className:`px-2 pb-3`,children:(0,F.jsx)(SD,{variant:`quiet`,visual:`blobs`,headingLevel:3,title:`Your first command starts here`,description:`Choose a starter above, then press Start. Output and past commands stay here.`})}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`-mx-1`,children:(0,F.jsx)(zP,{label:`Computer process inventory`,order:r.map(({id:e})=>e),listRoot:f,children:r.map(t=>{let r=s?.get(t.id),i=t.state===`running`?n?.find(e=>e.port===t.port):void 0,a,o;t.state===`running`?(a=`success`,o=`Running`):t.state===`uncertain`?(a=`warning`,o=`Status unknown`):t.endedReason===`idle-sleep`?(a=`warning`,o=`Stopped when the Computer went to sleep`):t.exitCode===null?(a=`warning`,o=`Ended · exit not recorded`):(a=t.exitCode===0?`success`:`error`,o=`Exit ${String(t.exitCode)}`);let l=t.state===`exited`&&t.sync===`pending`;return(0,F.jsx)(zD,{[IP]:t.id,role:`listitem`,"data-process-state":t.state,"data-process-sync":t.sync,className:`py-2`,tabIndex:-1,primary:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(PP,{className:`block truncate`,"data-process-command":!0,children:t.command}),(0,F.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-normal`,children:[(0,F.jsx)(vm,{size:`compact`,tone:a,className:a===`error`?`text-error`:void 0,label:r===`stopping`?`Stopping`:o}),t.port===null?null:(0,F.jsxs)(`span`,{"data-process-port":!0,children:[`Port `,t.port]})]}),(0,F.jsxs)(F.Fragment,{children:[_===t.id?(0,F.jsx)(`span`,{role:`status`,className:`block text-xs font-normal text-(--stipe-fg-muted)`,children:`Hold to stop`}):null,l?(0,F.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:`Changes still copying to your files`}):null,t.cwd===null?null:(0,F.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:t.cwd})]})]}),actions:(0,F.jsxs)(F.Fragment,{children:[u?(0,F.jsx)(ZE,{size:`sm`,variant:`ghost`,"aria-label":`Show output of ${t.command}`,onClick:()=>{u.select(t.id)},children:`Output`}):null,i?(0,F.jsxs)(ZE,{size:`sm`,variant:`ghost`,"aria-label":`Open preview of port ${String(i.port)}`,onClick:()=>{e(i)},children:[(0,F.jsx)(er,{size:14,"aria-hidden":`true`}),` Open`]}):null,t.state===`running`&&c?(0,F.jsx)(pbe,{holdHint:`A stopped process cannot be resumed. Press and hold to stop it.`,size:`sm`,variant:`ghost`,className:`hover:text-error`,disabled:r===`stopping`,"aria-label":`Stop process ${t.command}`,onPointerDown:()=>{g.current=Date.now(),v(null)},onPointerUp:()=>{y(t.id)},onConfirm:()=>{v(null),c(t.id)},children:r===`stopping`?`Stopping…`:`Stop`}):null]})},t.id)})})}),i?(0,F.jsx)(FP,{message:`Refreshing processes…`,size:`sm`,framed:!1}):null]}):(0,F.jsx)(BD,{title:`Processes can't be listed yet`,children:`Allow Computer access to see and run commands.`});return(0,F.jsxs)(`div`,{className:`space-y-5 p-4 sm:p-6`,ref:h,children:[d?(0,F.jsx)(`p`,{role:`status`,className:`px-2 pt-3 text-sm`,children:d}):null,l&&(a===null||a.reason===`failed`)?(0,F.jsx)(T.form.Subscribe,{selector:e=>e.isSubmitting,children:e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(MP,{model:T,"aria-label":`Start a process`,className:`space-y-3`,disabled:e||d!==void 0,footer:null,children:(0,F.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,F.jsx)(uP,{model:T,disabled:e||d!==void 0}),(0,F.jsx)(ZE,{className:`sm:col-span-2 sm:justify-self-start`,type:`submit`,variant:`primary`,loading:e,disabled:e||d!==void 0,onClick:()=>{T.form.setFieldMeta(`command`,e=>({...e,errorMap:{...e.errorMap,onServer:void 0}}))},children:`Start`})]})}),(0,F.jsx)(`ul`,{"aria-label":`Try one of these`,className:`m-0 mt-3 flex list-none flex-wrap gap-2 p-0`,children:xbe.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(ZE,{size:`sm`,variant:`outline`,disabled:e||d!==void 0,title:t.command,onClick:()=>{T.form.setFieldValue(`command`,t.command),T.form.setFieldValue(`port`,t.port),h.current?.querySelector(`input[name="command"]`)?.focus()},children:[t.label,` `,(0,F.jsx)(PP,{children:t.command})]})},t.command))})]})}):null,u?.processId?(0,F.jsxs)(`section`,{ref:m,"aria-label":`Process output`,className:`space-y-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`min-w-0 break-words font-mono text-sm font-semibold`,children:u.data?.process.command??`Process output`}),(0,F.jsx)(ZE,{size:`xs`,variant:`ghost`,onClick:()=>{u.select(null)},children:`Close output`})]}),u.failed?(0,F.jsx)(SD,{variant:`quiet`,title:`Output unavailable`,description:`Retry to read this command’s output.`,primaryAction:{label:`Retry`,onSelect:()=>void u.retry()}}):u.loading?(0,F.jsx)(FP,{size:`sm`,message:`Loading output`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(iD,{children:(0,F.jsx)(`pre`,{ref:p,className:`max-h-48 overflow-auto whitespace-pre-wrap break-all p-3 text-xs`,children:u.data?.lines.length===0?u.data.process.state===`exited`?`Finished without output.`:`No output yet.`:u.data?.lines.join(`
|
|
95
|
+
const term = new Terminal({ ghostty });`)}var qE;function JE(){return qE??=epe.load().catch(e=>{throw qE=void 0,e}),qE}var ype=[``,`bold `,`italic `,`bold italic `];async function YE(e,t){await Promise.all(ype.map(n=>document.fonts.load(`${n}${String(e)}px ${t}`)))}var XE=`disabled:bg-base-200 disabled:text-base-content disabled:outline-1 disabled:outline-solid disabled:outline-base-content/25 aria-disabled:bg-base-200 aria-disabled:text-base-content aria-disabled:outline-1 aria-disabled:outline-solid aria-disabled:outline-base-content/25`,bpe=see(`btn caps-button disabled:pointer-events-none`,{variants:{variant:{primary:`btn-primary caps-button-filled`,secondary:`btn-secondary caps-button-filled`,accent:`btn-accent caps-button-filled`,destructive:`btn-error caps-button-filled`,outline:`btn-outline ${XE}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${XE}`},size:{xs:`btn-xs`,sm:`btn-sm`,default:`btn-md`,lg:`btn-lg`,icon:`btn-square btn-md`,menubar:`caps-button-menubar`}},defaultVariants:{variant:`primary`,size:`default`}}),ZE=(0,I.forwardRef)(function({asChild:e=!1,children:t,className:n,disabled:r,loading:i=!1,result:a,resultLabel:o,onResultEnd:s,size:c=`default`,variant:l=`primary`,...u},d){let f=Dd(bpe({size:c,variant:l}),n),p=(0,I.useRef)(a).current,m=(0,I.useRef)(null);return(0,I.useImperativeHandle)(d,()=>m.current),xpe(m,i,a),e?(0,F.jsx)(kd,{...u,"aria-busy":i?!0:u[`aria-busy`],"aria-disabled":r===!0||i?!0:void 0,className:f,ref:m,children:t}):(0,F.jsx)(`button`,{...u,"aria-busy":i?!0:u[`aria-busy`],className:f,disabled:r===!0||i,ref:m,type:u.type??`button`,children:a===void 0&&o===void 0?(0,F.jsxs)(F.Fragment,{children:[i?(0,F.jsx)(um,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,F.jsx)(Tpe,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function xpe(e,t,n){let r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=(0,I.useRef)(null);(0,I.useLayoutEffect)(()=>{let o=e.current;if(!o)return;let s=JSON.stringify([t,n??null,o.textContent]),c=s!==i.current;i.current=s;let l=a.current;if(!c&&l)return;let u=l?o.offsetWidth:r.current;l&&(a.current=null,l.cancel(),o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`));let d=o.offsetWidth;if(r.current=d>0?d:null,!c||u===null||d===0||Math.abs(u-d)<1||!Bd(o))return;let f=Fd(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:zd(f,f.ease)});a.current=p,o.style.overflow=`clip`,o.style.whiteSpace=`nowrap`;let m=()=>{a.current===p&&(a.current=null,o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`))};p.onfinish=m,p.oncancel=m})}var Spe=1100;function Cpe(e,t){let n=t.bounce/.3,r=1+.05*Math.min(1.4,.4+n),i=1-.02*Math.min(1.4,n);return e.animate([{transform:`scale(1)`},{transform:`scale(${String(r)})`,offset:.35},{transform:`scale(${String(i)})`,offset:.7},{transform:`scale(1)`}],{duration:t.springDuration,easing:zd(t,`ease-out`)})}function wpe(e,t){let n=t.shake;return e.animate([{transform:`none`},{transform:`translateX(${String(-n)}px)`},{transform:`translateX(${String(n)}px)`},{transform:`translateX(${String(-n*.6)}px)`},{transform:`translateX(${String(n*.3)}px)`},{transform:`none`}],{duration:t.slow*1.3,easing:zd(t,`linear`)})}function QE(e,t,n){let r=n.distance+2,i=`blur(${String(n.blur)}px)`;return[e.animate([{opacity:1,transform:`none`,filter:`blur(0px)`},{opacity:0,transform:`translateY(${String(-r)}px)`,filter:i}],{duration:n.fast,easing:zd(n,n.ease)}),t.animate([{opacity:0,transform:`translateY(${String(r)}px)`,filter:i},{opacity:1,transform:`none`,filter:`blur(0px)`}],{duration:n.normal,easing:zd(n,n.ease),fill:`backwards`})]}function Tpe({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,I.useRef)(null),s=Hd(),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1);c&&!u&&d(!0);let f=(0,I.useRef)(a),p=(0,I.useRef)(r);(0,I.useEffect)(()=>{p.current=r},[r]),(0,I.useLayoutEffect)(()=>{let e=f.current;if(f.current=i,i===e)return;if(i===`done`){l(!0);let e=setTimeout(()=>{p.current?p.current():l(!1)},Spe);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!Bd(t))return;let n=Fd(t);if(n.shake<=0)return;let r=wpe(t,n);return()=>{r.cancel()}},[i,s]);let m=(0,I.useRef)(c);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||m.current===c)return;m.current=c;let t=e.querySelector(`[data-face="label"]`),n=e.querySelector(`[data-face="result"]`);if(!t||!n||!Bd(e)){c||d(!1);return}let r=Fd(e),i=c?QE(t,n,r):QE(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(Cpe(e.closest(`button`)??e,r));let t=n.querySelector(`path`);t&&i.push(t.animate([{strokeDashoffset:1},{strokeDashoffset:0}],{duration:r.normal*1.4,delay:r.fast/2,easing:zd(r,r.ease),fill:`backwards`}))}return()=>{for(let e of i)e.cancel()}},[c,s]),(0,F.jsxs)(`span`,{ref:o,className:`caps-button-faces`,"data-showing":c?`result`:`label`,children:[(0,F.jsxs)(`span`,{className:`caps-button-face`,"data-face":`label`,"aria-hidden":c?!0:void 0,children:[n||c?(0,F.jsx)(um,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,e]}),u?(0,F.jsxs)(`span`,{className:`caps-button-face`,"data-face":`result`,"aria-hidden":!c||void 0,children:[(0,F.jsx)(`svg`,{className:`caps-button-check`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,F.jsx)(`path`,{d:`M4.5 12.5 9.5 17.5 19.5 6.5`,pathLength:1})}),t===void 0?e:t]}):null]})}var $E=new Map([[`0`,[`###`,`#.#`,`#.#`,`#.#`,`###`]],[`1`,[`.#.`,`##.`,`.#.`,`.#.`,`###`]],[`2`,[`###`,`..#`,`###`,`#..`,`###`]],[`3`,[`###`,`..#`,`.##`,`..#`,`###`]],[`4`,[`#.#`,`#.#`,`###`,`..#`,`..#`]],[`5`,[`###`,`#..`,`###`,`..#`,`###`]],[`6`,[`###`,`#..`,`###`,`#.#`,`###`]],[`7`,[`###`,`..#`,`.#.`,`.#.`,`.#.`]],[`8`,[`###`,`#.#`,`###`,`#.#`,`###`]],[`9`,[`###`,`#.#`,`###`,`..#`,`###`]],[`:`,[`.`,`#`,`.`,`#`,`.`]],[`.`,[`.`,`.`,`.`,`.`,`#`]],[`+`,[`...`,`.#.`,`###`,`.#.`,`...`]],[`-`,[`...`,`...`,`###`,`...`,`...`]],[`/`,[`..#`,`..#`,`.#.`,`#..`,`#..`]],[`×`,[`...`,`#.#`,`.#.`,`#.#`,`...`]],[`%`,[`#.#`,`..#`,`.#.`,`#..`,`#.#`]],[` `,[`.`,`.`,`.`,`.`,`.`]]]),Epe=[`.`,`.`,`.`,`.`,`.`],Dpe=Object.freeze([...$E.keys()]);function Ope(e,t=0,n=!1){if(!Number.isFinite(e))throw RangeError(`PixelNumber needs a finite number`);let r=String(Math.trunc(Math.abs(e))).padStart(t,`0`),i=String(Math.abs(e)).split(`.`)[1];return eD(`${e<0?`-`:n&&e>0?`+`:``}${r}${i?`.${i}`:``}`)}function eD(e){for(let t of e)if(!$E.has(t))throw RangeError(`PixelNumber cannot draw "${t}"; use digits and ${Dpe.filter(e=>!/\d/.test(e)).join(` `)}`);return e}function kpe(e,t){let n=new Set,r=t;for(let i of e){let e=$E.get(i)??Epe;e.forEach((e,i)=>{for(let a=0;a<e.length;a++)e.charAt(a)===`#`&&n.add(`${String(r+a)},${String(i+t)}`)}),r+=(e.at(0)?.length??1)+1}return{lit:n,width:Math.max(1,r-1-t)+t*2}}function Ape(e){let t=new Set;for(let n of e){let[r=0,i=0]=n.split(`,`).map(Number);for(let n=-1;n<=1;n++)for(let a=-1;a<=1;a++){let o=`${String(r+a)},${String(i+n)}`;e.has(o)||t.add(o)}}return t}function tD(e,t,n){let r=[];for(let i=0;i<n;i++){let n=-1;for(let a=0;a<=t;a++){let t=e.has(`${String(a)},${String(i)}`);t&&n<0&&(n=a),!t&&n>=0&&(r.push([n,i,a-n]),n=-1)}}return r}function nD({runs:e,className:t}){return(0,F.jsx)(`g`,{className:t,children:e.map(([e,t,n])=>(0,F.jsx)(`rect`,{x:e,y:t,width:n,height:1},`${String(e)}-${String(t)}`))})}var jpe=(0,I.forwardRef)(function({value:e,text:t,pad:n,signed:r,size:i=`md`,tone:a=`current`,outline:o=!1,className:s,...c},l){if(t===void 0&&e===void 0)throw TypeError(`PixelNumber needs a value or text`);let u=t===void 0?Ope(e??NaN,n,r):eD(t),d=+!!o,{lit:f,width:p}=kpe(u,d),m=5+d*2,h=Mpe[i];return(0,F.jsxs)(`span`,{...c,ref:l,className:Dd(`caps-pixel-number`,s),"data-size":i,"data-tone":a,"data-outline":o,children:[(0,F.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,viewBox:`0 0 ${String(p)} ${String(m)}`,width:p*h,height:m*h,children:[o?(0,F.jsx)(nD,{className:`caps-pixel-number-outline`,runs:tD(Ape(f),p,m)}):null,(0,F.jsx)(nD,{className:`caps-pixel-number-face`,runs:tD(f,p,m)})]}),(0,F.jsx)(`span`,{className:`sr-only`,children:u})]})}),Mpe={sm:2,md:3,lg:4,xl:6};function rD({icon:e,caption:t}){return(0,F.jsxs)(`span`,{className:`caps-icon-choice-mark`,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{className:`caps-icon-choice-art`,children:e}),t?(0,F.jsx)(`span`,{className:`caps-icon-choice-caption`,children:t}):null,(0,F.jsx)(`span`,{className:`caps-icon-choice-lamp`})]})}var Npe=(0,I.forwardRef)(function({label:e,icon:t,caption:n,on:r,stateLabels:i=[`on`,`off`],className:a,...o},s){return(0,F.jsxs)(`span`,{...o,className:Dd(`caps-icon-lamp`,a),"data-on":r,ref:s,children:[(0,F.jsx)(rD,{icon:t,caption:n}),(0,F.jsxs)(`span`,{className:`sr-only`,children:[e,`: `,r?i[0]:i[1]]})]})}),Ppe=(0,I.forwardRef)(function({items:e,stateLabels:t,className:n,...r},i){return(0,F.jsx)(`ul`,{...r,className:Dd(`caps-icon-lamps`,n),ref:i,children:e.map(({id:e,...n})=>(0,F.jsx)(`li`,{children:(0,F.jsx)(Npe,{...n,...t===void 0?{}:{stateLabels:t}})},e))})}),Fpe=(0,I.forwardRef)(function({className:e,size:t=`md`,depth:n=`shallow`,placement:r=`standalone`,...i},a){return(0,F.jsx)(`div`,{...i,ref:a,"data-surface-size":t,"data-surface-depth":n,"data-surface-placement":r,className:Dd(`caps-surface`,e)})}),iD=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`div`,{...t,ref:n,className:Dd(`caps-screen`,e)})}),Ipe=(0,I.forwardRef)(function({children:e,className:t,depth:n=`deep`,fit:r=`content`,density:i=`normal`,...a},o){let s=r===`fill`;return(0,F.jsx)(Fpe,{...a,className:Dd(t,s&&`flex min-h-0 flex-1`),depth:n,ref:o,children:(0,F.jsx)(`div`,{className:Dd(`caps-display-gasket`,s&&`flex min-h-0 min-w-0 flex-1`),"data-display-density":i,children:(0,F.jsx)(iD,{className:Dd(s&&`flex min-h-0 min-w-0 flex-1 overflow-hidden`),children:e})})})}),Lpe=(0,I.forwardRef)(function({className:e,icon:t,status:n,title:r,...i},a){return(0,F.jsxs)(`header`,{...i,className:Dd(`caps-screen-header`,e),ref:a,children:[t?(0,F.jsx)(`span`,{className:`caps-screen-header-icon`,"aria-hidden":`true`,children:t}):null,(0,F.jsx)(`span`,{className:`caps-screen-header-title`,children:r}),n?(0,F.jsx)(`span`,{className:`caps-screen-header-status`,children:n}):null]})}),Rpe=(0,I.forwardRef)(function({appearance:e,className:t,...n},r){return(0,F.jsx)(`div`,{...n,className:Dd(`caps-screen-cells`,t),"data-appearance":e===`compact`?e:void 0,ref:r})}),aD=(0,I.forwardRef)(function({children:e,className:t,legend:n,readout:r,icon:i,appearance:a,wide:o=!1,...s},c){return(0,F.jsxs)(`div`,{...s,className:Dd(`caps-screen-cell`,t),"data-wide":o||void 0,"data-appearance":a===`compact`?a:void 0,ref:c,children:[i?(0,F.jsx)(`span`,{className:`caps-screen-cell-icon`,children:i}):null,n?(0,F.jsx)(`span`,{className:`caps-screen-cell-legend`,children:n}):null,r?(0,F.jsx)(`span`,{className:`caps-screen-cell-readout`,children:r}):null,a===`compact`?(0,F.jsx)(`div`,{className:`caps-screen-cell-controls`,children:e}):e]})}),oD={coral:`var(--stipe-art-coral, #ff6558)`,blue:`var(--stipe-art-blue, #43a6f2)`,mint:`var(--stipe-art-mint, #63cfaa)`,grape:`var(--stipe-art-grape, #a66cc1)`,yellow:`var(--stipe-art-yellow, #ffd05d)`,cream:`var(--stipe-art-cream, #fff4de)`,ink:`var(--stipe-art-ink, #242c28)`,graphite:`var(--stipe-art-graphite, #49423f)`,inkcap:`var(--stipe-art-inkcap, #80499d)`},sD=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,zpe=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function cD({transform:e,fill:t=sD}){return(0,F.jsx)(`path`,{transform:e,style:{fill:t},d:`M-1.264-9.479C-2.098-8.643-1.802-1.057-.907-.332.47.782 1.6-.446 1.618-3.075 1.623-3.888 1.691-5.398 1.77-6.429 1.979-9.202 1.596-10 .055-10-.588-10-.843-9.9-1.264-9.479Z`})}function Bpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(cD,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,F.jsx)(cD,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,F.jsx)(cD,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function Vpe(){return(0,F.jsxs)(`g`,{style:{fill:oD.blue},children:[(0,F.jsx)(`path`,{d:`M10.574 .604C9.804 1.375 9.867-.885 9.961 22.81 10.054 47.202 9.722 45.378 14.193 45.94 25.813 47.399 38.465 52.211 44.662 57.532 47.653 60.097 48.082 59.411 47.967 52.242L47.734 19.335C47.734 17.523 47.13 16.616 45.964 15.076 40.604 8.018 30.127 2.767 16.804 .462 13.045-.184 11.326-.148 10.574 .604Z`}),(0,F.jsx)(`path`,{d:`M81.571 .746C71.063 2.665 62.221 6.713 56.562 12.199 54.242 14.45 52 17.356 52.115 19.335L52.033 52.628C51.927 59.934 51.979 59.994 55.74 57.091 62.423 51.931 71.272 48.541 84.103 46.221 90.625 45.039 89.967 47.631 90.145 22.432 90.326-3.079 91.148-1 81.571 .746Z`}),(0,F.jsx)(`path`,{d:`M1.906 12.692C.1 13.42 .151 12.804 .151 33.825 .151 54.097 .163 54.302 1.447 55.498 2.71 56.674 3.384 56.81 7.937 56.816 20.943 56.834 30.647 58.293 38.776 61.45 45.964 64.242 46.435 61.924 39.526 57.773 32.296 53.429 26.656 51.544 14.943 49.553 5.958 48.027 6.535 49.414 6.408 29.003 6.32 14.74 6.263 13.103 5.816 12.764 5.254 12.335 2.9 12.293 1.906 12.692Z`}),(0,F.jsx)(`path`,{d:`M94.326 12.858C93.656 13.326 93.656 13.326 93.653 28.492 93.653 48.882 93.997 48.063 84.743 49.556 73.574 51.36 64.45 54.695 57.801 59.405 54.082 62.039 55.384 63.864 59.722 62.1 68.897 58.372 76.363 57.115 90.03 56.994 100.405 56.903 99.489 58.976 99.773 34.976 100.018 14.142 100.006 13.958 98.399 12.979 97.236 12.269 95.251 12.208 94.326 12.858Z`})]})}function lD(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M-8.572-25.123C-21.412-23.39-33.235-17.39-44.235-7.027-51.235-.433-51.251 .358-44.524 6.749-20.77 29.316 10.23 31.893 36.364 13.487 41.043 10.187 48.193 3.551 49.235 1.524 50.358-.642 49.471-2.102 43.738-7.497 29.257-21.128 9.968-27.631-8.572-25.123Z`}),(0,F.jsx)(`path`,{style:{fill:oD.ink},d:`M-6.225-16.807C-17.727-13.267-21.176 4.433-12.08 13.257-1.118 23.898 16.829 16.102 17.032 .604 17.209-12.412 6.219-20.642-6.225-16.807Z`})]})}function Hpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{style:{fill:oD.mint},d:`M540 342C520 340 497 355 477 374C450 399 440 421 456 444C465 458 480 462 492 464C503 466 500 477 494 486C487 500 508 496 522 478L530 468C557 468 578 464 591 451C601 442 599 429 585 427C572 425 556 432 547 418C538 403 550 390 568 385C579 382 589 380 584 368C576 352 557 341 540 342Z`}),(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M589 396C614 380 659 381 683 392C709 404 721 428 710 451C704 464 693 472 685 479C680 487 684 498 689 503C695 514 684 513 675 507C667 502 662 497 657 491C637 496 610 495 594 486C584 480 583 469 595 464C607 460 622 454 622 441C622 428 612 423 597 420C580 417 578 407 589 396Z`})]})}function uD({fill:e}){return(0,F.jsx)(`path`,{style:{fill:e},d:`M44.648 .288C26.645 1.615 13.263 8.266 5.942 19.529-4.299 35.277-.917 57.684 13.224 67.784 16.958 70.452 16.936 71.742 13.064 77.665 11.28 80.391 10.895 81.565 11.341 82.914 13.163 88.435 25.022 86.396 36.307 78.62L38.681 76.986 41.294 77.335C45.371 77.878 59.645 77.789 64.125 77.191 89.213 73.837 100.562 61.427 99.92 38.044 99.18 11.1 79.587-2.285 44.648 .288Z`})}function dD({onFigure:e=!1}){return(0,F.jsxs)(`g`,{style:{fill:e?zpe:oD.ink},children:[(0,F.jsx)(`rect`,{x:`-15`,y:`-11`,width:`10`,height:`22`,rx:`5`}),(0,F.jsx)(`rect`,{x:`5`,y:`-11`,width:`10`,height:`22`,rx:`5`})]})}function Upe(){return(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M18.125 .621C.039 1.574-2.575 4.791 2.264 20.133 17.454 68.284 77.345 69.396 96.119 21.875 100.749 10.154 100.318 4.348 94.605 1.513 91.981 .21 37.878-.421 18.125 .621Z`})}function Wpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M31.42 5.279C29.108 5.983 28.068 6.993 25.817 10.732 24.033 13.687 24.027 13.762 25.58 14.265 30.375 15.821 36.711 20.506 39.938 24.885 42.077 27.788 41.835 27.806 45.281 24.463 48.633 21.213 49.164 20.185 48.982 17.325 48.812 14.643 48.174 13.872 42.68 9.741 36.737 5.273 34.439 4.361 31.42 5.279Z`}),(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M22.538 16.207C22.093 16.652 19.732 20.231 13.309 30.196 10.737 34.188 10.723 33.911 13.589 35.351 16.461 36.798 19.778 39.28 21.825 41.523L22.6 42.37Q23.34 43.186 24.05 42.538L24.711 41.933C31.278 35.937 38.928 28.484 38.928 28.083 38.928 24.656 24.521 14.219 22.538 16.207Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M8.89 38.053C8.203 39.566 6.598 44.473 6.598 45.056 6.598 45.137 6.887 45.125 7.236 45.036 9.655 44.404 13.526 47.475 13.526 50.027 13.526 51.132 13.361 51.164 16.187 49.49 21.421 46.387 21.966 45.665 20.575 43.659 19.002 41.387 14.975 38.238 11.909 36.881 9.799 35.949 9.854 35.926 8.89 38.053Z`}),(0,F.jsx)(`path`,{style:{fill:oD.graphite},d:`M6.598 45.056C5.732 46.866 5.155 49.464 6.309 50.907 8.041 53.505 10.928 52.639 13.526 50.907 13.526 48.021 9.978 44.404 7.236 45.036Z`})]})}function Gpe(){return(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z`})}function fD({transform:e}){return(0,F.jsx)(`path`,{style:{fill:oD.mint},transform:e,d:`M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z`})}function Kpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{fillRule:`evenodd`,style:{fill:sD},d:`M25.3 17.69C14.8 19.34 10.66 20.18 9.05 20.99 5.51 22.78 4.2 27.21 6.71 28.9 7.47 29.42 8.48 29.4 10.25 28.84 12.41 28.15 12.56 27.57 11.02 25.85 10 24.71 10.53 23.62 11.79 24.27 13.9 25.36 15.02 28.98 15.63 36.66 16.18 43.48 17.33 47.43 19.69 50.49 22.76 54.48 27.69 55.73 30.31 53.19 33 50.57 31.24 46.04 28.44 48.38 26.29 50.17 26.16 47.08 28.3 45.14 29.61 43.95 30.78 43.58 38.92 41.75 39.45 41.63 39.41 41.52 38.39 40.01 36.87 37.78 36.04 35.22 34.72 28.69 33.37 22 32.04 19.3 29.5 18.07 28.69 17.68 26.59 17.49 25.3 17.69M24.11 26.51C18.61 27.67 18.16 27.82 17.98 28.55 17.64 29.91 18.54 30.44 20.51 30.05 25.4 29.08 30.11 28.03 30.49 27.83 31.65 27.23 31 25.33 29.66 25.4 29.5 25.4 27 25.91 24.11 26.51M29.2 31.42C28.64 31.54 26.23 32.07 23.85 32.58 20.01 33.41 19.48 33.57 19.15 33.96 18.67 34.5 18.66 35.05 19.12 35.63 19.61 36.26 19.86 36.23 26.05 34.88 29.05 34.23 31.53 33.7 31.57 33.7 31.82 33.7 32.34 32.88 32.34 32.5 32.34 31.25 31.37 30.92 29.2 31.42M29.79 37.19C28.81 37.41 26.45 37.94 24.53 38.37 22.62 38.8 20.84 39.23 20.58 39.33 19.61 39.71 19.35 40.62 19.98 41.41 20.48 42.05 21 41.99 27.59 40.5 33.85 39.09 34.21 38.91 33.45 37.44 33.02 36.61 32.51 36.58 29.79 37.19M45.41 41.95C44.89 42.09 41.61 42.89 38.12 43.73 30.94 45.45 29.81 45.84 31.05 46.15 33.2 46.69 34.11 50.18 32.77 52.76 32.23 53.79 32.23 54.03 32.76 54.16 33.34 54.31 45.35 51.3 46.72 50.67 50.19 49.06 51.76 45.01 49.79 42.76 48.8 41.64 47.46 41.39 45.41 41.95`}),(0,F.jsx)(`path`,{style:{fill:oD.grape},d:`M48.21 10.15C47.92 10.41 47.5 11.27 46.96 12.74 45.52 16.61 45.24 16.99 43.01 18.15 39.18 20.15 39.05 20.99 42.28 22.73 45.37 24.39 45.68 24.79 47.12 28.95 48.3 32.32 49.28 32.2 50.65 28.52 52.23 24.25 52.26 24.22 55.2 22.56 57.53 21.24 57.79 21 57.79 20.16 57.79 19.49 57.55 19.31 55.01 18.06 52.16 16.66 52.2 16.72 50.31 11.56 49.7 9.89 49.03 9.44 48.21 10.15M32.59 13.92C31.78 14.73 32.28 15.89 33.58 16.22 35.07 16.6 36.19 17.1 37.17 17.84 38.42 18.77 39.23 18.86 39.79 18.15 39.99 17.9 40.15 17.53 40.15 17.32 40.15 15.29 33.99 12.52 32.59 13.92M42.48 34.38C40.96 35.96 40.65 36.88 41.39 37.57 42.2 38.33 43.36 37.74 44.55 35.95 45.2 34.97 45.22 34.35 44.62 33.88 43.89 33.31 43.41 33.42 42.48 34.38`}),(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M40.75 25.96C39.69 27.07 38.11 30.69 38.11 31.98 38.11 32.66 38.55 33.19 39.12 33.19 39.8 33.19 40.24 32.73 40.58 31.66 40.95 30.46 41.65 29.09 42.42 28.01 43.77 26.14 42.29 24.32 40.75 25.96M54.85 27.67C54.71 27.81 54.47 28.32 54.31 28.82 53.67 30.76 53.19 31.37 51.67 32.13 50.25 32.85 50.34 33.36 52.04 34.21 53.25 34.82 53.57 35.23 54.24 37.01 54.98 38.98 55.47 39.08 56.03 37.37 56.7 35.32 57.08 34.81 58.64 33.87 60.18 32.95 60.14 32.65 58.38 31.78 57.02 31.11 56.68 30.66 56.02 28.65 55.69 27.64 55.25 27.27 54.85 27.67`})]})}function qpe(){return(0,F.jsxs)(`g`,{children:[(0,F.jsx)(`path`,{fillRule:`evenodd`,style:{fill:sD},d:`M42.24 14.07C41.52 14.24 40.53 14.54 35.06 16.26 33.33 16.8 31.2 17.47 30.34 17.74 29.47 18.01 27.86 18.52 26.75 18.88 25.64 19.23 24.03 19.74 23.16 20.01 20.16 20.94 19.45 21.4 18.97 22.71 18.71 23.44 18.45 26.33 17.83 35.41 17.64 38.25 17.44 41.03 17.41 41.58 17.32 42.77 17.24 42.69 18.79 42.84L20.01 42.95 21.98 39.97C24.69 35.88 24.85 35.82 27.05 37.9 27.9 38.7 28.43 39.08 28.61 39.02 28.76 38.96 28.91 38.91 28.94 38.91 28.98 38.91 29.38 38.38 29.84 37.73 30.3 37.08 31.47 35.48 32.43 34.17 33.4 32.86 34.86 30.85 35.67 29.71 36.49 28.56 37.5 27.29 37.91 26.88 39.73 25.07 41.01 26.43 43.32 32.67 43.76 33.84 44.3 35.28 44.52 35.86 44.74 36.44 44.97 37.28 45.04 37.74 45.19 38.71 45.17 38.71 46.63 38.03 47.69 37.53 47.77 37.46 47.68 37.02 47.58 36.52 46.97 30.64 46.79 28.41 46.73 27.69 46.62 26.43 46.53 25.61 46.44 24.79 46.24 22.87 46.09 21.32 45.61 16.44 45.5 15.66 45.22 15.12 44.72 14.15 43.59 13.76 42.24 14.07M29.38 22.45C26.04 23.47 24.49 27.62 26.6 29.91 29.17 32.7 34.15 30.16 34.16 26.05 34.16 23.38 31.9 21.68 29.38 22.45M46.7 41.5C39.3 44.23 28.33 46.04 20.1 45.88L17.21 45.82 17.16 46.88C17.08 48.22 17.33 49.03 18.01 49.68 18.73 50.37 19.73 50.35 23.77 49.53 25.46 49.19 29.12 48.47 31.91 47.93 46.31 45.14 46.9 44.99 47.57 43.91 47.95 43.3 48.25 41.29 47.99 41.15 47.91 41.11 47.33 41.26 46.7 41.5`}),(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M29.72 22.45C25.84 23.34 24.28 28.36 27.25 30.42 29.34 31.88 32.91 30.43 33.83 27.75 34.92 24.55 32.75 21.76 29.72 22.45`}),(0,F.jsx)(`path`,{style:{fill:oD.mint},d:`M12.96 14.29C12.87 14.41 12.7 15.03 12.58 15.68 12.37 16.82 11.59 18.26 11.18 18.26 11.08 18.26 10.88 18.46 10.72 18.7 10.36 19.25 10.59 19.58 11.45 19.74 12.18 19.88 13.08 20.63 13.54 21.49 14.23 22.76 14.75 22.53 15.15 20.79 15.39 19.71 15.51 19.51 16.4 18.66 17.54 17.58 17.51 17.36 16.18 16.85 15.16 16.47 14.84 16.19 14.14 15.1 13.56 14.2 13.22 13.96 12.96 14.29M49.04 24.13C48.56 24.86 48.91 25.31 50.59 26.09 53.89 27.64 54.85 29.82 53.45 32.6 52.01 35.43 46.84 38.54 40.51 40.39 39.73 40.62 38.88 40.89 38.62 40.99 37.24 41.52 30.85 42.64 27.54 42.93 20.72 43.52 13.63 42.49 10.57 40.46 5.81 37.3 7.51 32.32 14.74 28.24 15.84 27.61 16.17 27.1 15.9 26.4 15.66 25.78 15.35 25.84 13.19 26.94 6 30.61 2.97 35.32 4.95 39.74 7.86 46.21 22.78 47.8 40.05 43.46 51.97 40.47 58.57 36.38 59.47 31.43 60.09 27.97 57.74 25.34 52.93 24.12 50.6 23.53 49.43 23.54 49.04 24.13`}),(0,F.jsx)(`path`,{style:{fill:oD.grape},d:`M34.82 8.91C33.48 10.04 34.21 12.14 35.94 12.14 37.29 12.14 38.18 10.99 37.77 9.77 37.36 8.53 35.81 8.08 34.82 8.91M53.15 43.16C53 43.28 52.74 43.86 52.57 44.45 52.18 45.78 51.76 46.32 50.64 46.93 49.52 47.53 49.45 47.89 50.33 48.34 51.34 48.85 52.24 49.95 52.56 51.04 53.13 53.01 53.6 53 54.21 50.99 54.61 49.69 55.13 48.93 55.91 48.54 57.17 47.91 57.23 47.51 56.15 46.96 55.23 46.49 54.67 45.76 54.23 44.44 53.8 43.15 53.54 42.84 53.15 43.16M24.18 53.18C22.45 53.9 22.87 56.59 24.71 56.59 26.79 56.59 27.2 53.67 25.2 53.09 24.89 53.01 24.51 53.04 24.18 53.18`}),(0,F.jsx)(`path`,{style:{fill:oD.yellow},d:`M51.76 11.04C51.21 12.77 50.56 13.61 49.24 14.34 48.6 14.69 48.72 15.07 49.59 15.48 50.54 15.93 51.11 16.69 51.62 18.22 52.06 19.57 52.26 19.54 52.79 18.08 53.29 16.69 53.87 15.91 54.86 15.31 55.76 14.77 55.77 14.48 54.92 14.02 53.91 13.46 53.5 12.99 52.89 11.66 52.23 10.21 52.06 10.12 51.76 11.04M11.06 48.22C10.99 48.35 10.71 48.88 10.46 49.41 9.95 50.48 9.45 50.99 8.59 51.33 7.89 51.61 7.85 52.1 8.52 52.37 9.51 52.79 10.3 53.85 10.89 55.58 11.09 56.18 11.48 55.88 11.87 54.84 12.24 53.87 13.33 52.56 13.79 52.56 14 52.56 14.5 52.06 14.5 51.85 14.5 51.77 14.19 51.54 13.81 51.34 12.98 50.92 12.36 50.14 11.93 48.99 11.6 48.09 11.31 47.83 11.06 48.22`})]})}function Jpe(){return(0,F.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,F.jsx)(`path`,{style:{fill:oD.coral},d:`M278 155 482 123C517 117 527 135 530 167L542 309Q543 329 561 341L631 404Q649 419 646 444 645 465 623 472L407 521Q374 531 345 519L156 436Q115 418 128 375L221 191Q238 163 278 155Z`}),(0,F.jsx)(`path`,{style:{fill:oD.ink},d:`M317 183 461 161Q493 155 497 188L504 288Q508 320 478 326L318 356Q289 362 286 331L281 226Q278 194 317 183Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M304 386 553 340Q562 337 570 346L631 404Q649 419 646 444Q645 448 629 452L411 483Q382 492 367 474Z`}),(0,F.jsxs)(`g`,{style:{fill:oD.cream},children:[(0,F.jsx)(`rect`,{x:`319`,y:`236`,width:`26`,height:`59`,rx:`13`}),(0,F.jsx)(`rect`,{x:`364`,y:`229`,width:`26`,height:`59`,rx:`13`})]}),(0,F.jsxs)(`g`,{style:{fill:oD.ink},transform:`rotate(-11 470 411)`,children:[(0,F.jsx)(`rect`,{x:`369`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`444`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`518`,y:`380`,width:`57`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`392`,y:`421`,width:`58`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`462`,y:`421`,width:`65`,height:`25`,rx:`13`}),(0,F.jsx)(`rect`,{x:`539`,y:`421`,width:`58`,height:`25`,rx:`13`})]})]})}function Ype(){return(0,F.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,F.jsx)(`path`,{style:{fill:oD.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,F.jsx)(`path`,{style:{fill:oD.blue},d:`M824 376Q908 372 871 400C842 427 866 442 902 450L1113 480Q1188 479 1199 392C1207 447 1204 497 1163 511Q1134 521 1097 516C1055 510 991 507 957 507S869 511 826 512C781 513 758 483 760 441Q760 385 824 376Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M824 376 857 184Q864 133 911 141C1039 169 1124 151 1226 153Q1179 159 1184 241L1199 377C1202 434 1174 482 1117 480L902 450C864 445 849 429 871 400Q908 372 824 376Z`}),(0,F.jsxs)(`g`,{style:{fill:oD.coral},children:[(0,F.jsx)(`path`,{d:`M982 198C1008 190 1030 197 1028 220L1023 265Q1020 295 1000 279C981 261 951 223 963 210Q970 202 982 198Z`}),(0,F.jsx)(`path`,{d:`M1063 220C1077 215 1100 237 1102 251Q1107 267 1084 282L1063 295Q1037 307 1040 278L1045 245Q1049 224 1063 220Z`}),(0,F.jsx)(`path`,{d:`M911 252C925 240 939 254 957 269L978 291Q995 311 961 316C938 318 907 316 898 308Q884 296 911 252Z`}),(0,F.jsx)(`path`,{d:`M1106 289Q1127 281 1134 304C1142 327 1146 352 1125 350Q1097 348 1073 335C1051 324 1072 311 1084 302Z`}),(0,F.jsx)(`path`,{d:`M927 338C946 334 972 334 985 343Q1004 353 984 384C970 408 957 418 940 403C922 389 896 356 913 345Z`}),(0,F.jsx)(`path`,{d:`M1010 375Q1025 363 1037 384C1049 407 1064 438 1044 442Q1025 448 1002 436C984 428 991 410 997 393Z`}),(0,F.jsx)(`path`,{d:`M1068 357C1084 359 1110 376 1120 389Q1130 402 1107 419C1090 432 1082 418 1073 401C1062 383 1043 355 1068 357Z`}),(0,F.jsx)(`path`,{d:`M1018 311C1037 312 1050 334 1034 343C1018 351 998 337 1005 320Q1009 311 1018 311Z`})]})]})}function Xpe(){return(0,F.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,F.jsx)(`path`,{style:{fill:oD.inkcap},d:`M1384 276C1394 238 1445 200 1497 158C1547 119 1604 97 1647 97C1690 97 1720 109 1745 138C1772 170 1791 184 1833 194C1870 201 1919 220 1922 257C1923 307 1891 339 1853 336C1801 335 1767 299 1701 294C1666 291 1620 294 1642 303Q1670 307 1675 333C1681 367 1697 389 1717 413C1735 434 1738 443 1719 464C1700 485 1692 502 1686 520Q1682 541 1653 541L1626 541Q1598 541 1594 519C1590 495 1578 474 1563 458C1545 440 1544 429 1559 410C1585 377 1608 337 1572 326C1554 320 1529 333 1506 340C1461 356 1428 357 1402 340Q1371 319 1384 276Z`}),(0,F.jsx)(`path`,{style:{fill:oD.cream},d:`M1634 362Q1641 346 1649 362C1660 390 1676 404 1705 424Q1721 435 1704 453C1685 475 1677 490 1671 513Q1670 526 1653 525L1626 525Q1611 525 1610 513C1606 492 1592 465 1575 449Q1562 437 1577 424C1604 404 1620 390 1634 362Z`}),(0,F.jsx)(`path`,{style:{fill:oD.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,F.jsx)(`path`,{style:{fill:oD.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:pD,blue:mD,mint:hD,grape:gD,yellow:_D,cream:vD,ink:yD}=oD,Zpe={bonsai:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,stroke:hD,strokeWidth:`3.7`,strokeLinecap:`round`,d:`M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2`}),(0,F.jsx)(`path`,{fill:hD,d:`M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z`}),(0,F.jsx)(`circle`,{fill:mD,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,F.jsx)(`circle`,{fill:gD,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,F.jsx)(`circle`,{fill:_D,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,F.jsx)(`circle`,{fill:_D,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,F.jsx)(`circle`,{fill:mD,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,F.jsx)(`path`,{fill:pD,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,F.jsx)(`rect`,{fill:pD,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,F.jsx)(Jpe,{}),prints:(0,F.jsx)(Ype,{}),inkcap:(0,F.jsx)(Xpe,{}),vishnu:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{fill:pD},d:`M6 37C6 21 17.5 9 32 9s26 12 26 28c0 2.2-1.8 4-4 4H10c-2.2 0-4-1.8-4-4Z`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`19`,cy:`25`,r:`4`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`33`,cy:`19.5`,r:`4.8`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`46`,cy:`28`,r:`3.4`}),(0,F.jsx)(`rect`,{style:{fill:mD},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,F.jsx)(`rect`,{style:{fill:vD},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{style:{fill:vD},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,F.jsx)(`circle`,{style:{fill:_D},cx:`39`,cy:`50.5`,r:`2.7`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,F.jsx)(Kpe,{}),generateMedia:(0,F.jsx)(qpe,{}),buyApps:(0,F.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,F.jsx)(`circle`,{fill:_D,cx:`32`,cy:`20`,r:`12`}),(0,F.jsx)(`circle`,{stroke:vD,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,F.jsx)(`path`,{fill:mD,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,F.jsx)(`rect`,{fill:pD,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`rect`,{x:`20`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,F.jsx)(`rect`,{x:`29.5`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,F.jsx)(`rect`,{x:`39`,y:`41`,width:`5`,height:`11`,rx:`2.5`})]})]}),browseBazaar:(0,F.jsxs)(`g`,{transform:`rotate(-5 32 32)`,children:[(0,F.jsx)(`rect`,{fill:mD,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,F.jsx)(`rect`,{fill:mD,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,F.jsx)(`rect`,{fill:vD,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,F.jsx)(`rect`,{fill:pD,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,F.jsx)(`path`,{fill:pD,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,F.jsx)(`path`,{fill:vD,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,F.jsx)(`path`,{fill:pD,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,F.jsx)(`path`,{fill:vD,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,F.jsx)(`path`,{fill:pD,d:`M49.4 9H61V18A5.8 5.8 0 0 1 49.4 18Z`}),(0,F.jsx)(`g`,{transform:`translate(32 36.5) scale(.34)`,children:(0,F.jsx)(lD,{})})]}),agent:(0,F.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,F.jsx)(`path`,{fill:mD,d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,F.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,F.jsx)(dD,{})})]}),list:(0,F.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,F.jsx)(`path`,{style:{fill:mD},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,F.jsx)(`path`,{style:{fill:vD},d:`M19 7H39Q42 7 44 9L55 20Q57 22 57 26V44Q57 50 51 50H19Q13 50 13 44V13Q13 7 19 7Z`}),(0,F.jsx)(`path`,{style:{fill:pD},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,F.jsxs)(`g`,{style:{fill:pD},children:[(0,F.jsx)(`circle`,{cx:`22`,cy:`21`,r:`3`}),(0,F.jsx)(`circle`,{cx:`22`,cy:`31`,r:`3`}),(0,F.jsx)(`circle`,{cx:`22`,cy:`41`,r:`3`})]}),(0,F.jsx)(`path`,{style:{stroke:mD},strokeWidth:`5`,strokeLinecap:`round`,d:`M31 21H32M31 31H46M31 41H42`})]}),chat:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`g`,{transform:`translate(3 11) scale(.22) translate(-449 -327)`,children:(0,F.jsx)(Hpe,{})}),(0,F.jsx)(cD,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,F.jsx)(cD,{transform:`translate(44.4 20.5) rotate(47) scale(.95 .6)`})]}),read:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`g`,{transform:`translate(4 20.5) scale(.56)`,children:(0,F.jsx)(Vpe,{})}),(0,F.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,F.jsx)(lD,{})}),(0,F.jsx)(Bpe,{})]}),readConversations:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(.9) translate(-32 -32)`,children:[(0,F.jsx)(`g`,{transform:`translate(4 7.88) scale(.56)`,children:(0,F.jsx)(uD,{fill:mD})}),(0,F.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,F.jsx)(lD,{})})]}),listAgents:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,F.jsx)(`path`,{style:{fill:sD},d:`M32.059 10.146C23.878 10.646 18.949 14.844 18.925 21.331 18.912 24.856 20.167 27.259 22.274 27.74 24.437 28.233 26.097 29.061 27.481 30.337 28.275 31.068 28.328 31.096 29.352 31.306 31.161 31.677 31.653 32.094 32.115 33.651 32.392 34.582 32.557 34.868 32.915 35.041 33.919 35.523 35.864 33.733 36.539 31.706L36.775 30.997 38.008 30.681C42.663 29.489 45.29 26.142 45.468 21.176 45.734 13.784 40.673 9.62 32.059 10.146Z`}),(0,F.jsx)(`g`,{transform:`translate(32.4 21.2) scale(.39)`,children:(0,F.jsx)(dD,{onFigure:!0})}),(0,F.jsx)(`path`,{style:{fill:pD},d:`M14.375 27.586C8.014 28.591 4.363 32.396 4.355 38.027 4.347 43.93 8.071 47.469 15.239 48.368L16.828 48.568 17.873 49.568C19.854 51.464 22.469 52.496 23.691 51.864 24.384 51.506 24.431 51.044 23.924 49.606 23.337 47.943 23.479 47.492 24.749 46.977 32.756 43.73 32.643 31.899 24.573 28.49 22.238 27.504 17.535 27.087 14.375 27.586Z`}),(0,F.jsx)(`g`,{transform:`translate(17.6 37.7) scale(.38 .36)`,children:(0,F.jsx)(dD,{})}),(0,F.jsx)(`path`,{style:{fill:mD},d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,F.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,F.jsx)(dD,{})})]}),createAgents:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,F.jsx)(`path`,{style:{fill:sD},d:`M20.436 24.499C13.35 25.216 7.504 28.799 5.442 33.687 3.114 39.208 4.438 45.791 8.593 49.358 10.446 50.949 10.34 50.831 10.34 51.301 10.34 51.796 10.106 52.294 9.281 53.558 7.191 56.76 12.108 56.905 16.701 53.777 17.517 53.221 17.715 53.135 18.015 53.201 20.013 53.639 25.739 53.051 28.595 52.113 35.47 49.857 39.129 44.162 37.83 37.738C37 31 33 26 26.717 24.428L24.075 24.413C22.623 24.405 20.985 24.444 20.436 24.499Z`}),(0,F.jsx)(`g`,{transform:`translate(21.9 40) scale(.46 .43)`,children:(0,F.jsx)(dD,{onFigure:!0})}),(0,F.jsx)(`path`,{style:{fill:hD},d:`M37.987 15.734C32.277 16.627 28.675 20.713 28.92 26.022 29.062 29.118 30.627 31.606 33.331 33.036 34.675 33.747 34.761 34.018 34.237 35.923 33.376 39.051 36.878 38.551 39.174 35.218 39.574 34.637 39.65 34.583 40.058 34.583 46.203 34.583 50.414 30.91 50.424 25.543 50.435 18.989 44.932 14.649 37.987 15.734Z`}),(0,F.jsx)(`g`,{transform:`translate(38.9 24.9) scale(.31)`,children:(0,F.jsx)(dD,{})}),(0,F.jsx)(cD,{fill:_D,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(52.2 19.8) rotate(70) scale(1.25 .85)`})]}),sendPrompts:(0,F.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,F.jsx)(`g`,{transform:`translate(4 13.2) scale(.412 .436)`,children:(0,F.jsx)(uD,{fill:pD})}),(0,F.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,F.jsx)(Upe,{})}),(0,F.jsx)(cD,{fill:hD,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,F.jsx)(cD,{fill:hD,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Wpe,{}),(0,F.jsx)(Gpe,{})]}),run:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{style:{fill:mD},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,F.jsx)(`path`,{style:{stroke:vD},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,F.jsx)(`rect`,{style:{fill:pD},x:`12`,y:`12`,width:`40`,height:`40`,rx:`9`}),connected:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,style:{stroke:mD},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:pD},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,F.jsx)(`path`,{style:{stroke:_D},strokeWidth:`4`,strokeLinecap:`round`,d:`m27 4 2 6m10-5-2 7m12 0-5 4`})]}),working:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`ellipse`,{style:{fill:hD},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,F.jsx)(`ellipse`,{style:{fill:_D},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,F.jsx)(`ellipse`,{style:{fill:gD},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:sD},strokeWidth:`3`,strokeLinecap:`round`,d:`M42 8q13 2 13 13M43 55q-5 5-12 4M5 39q-5-9 1-17`})]}),complete:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{fill:hD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:yD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m23 29 7 7 13-15`}),(0,F.jsx)(`path`,{style:{stroke:sD},strokeWidth:`3`,strokeLinecap:`round`,d:`m4 8 5 6m48-4 5-5M2 24l6 1`})]}),installApps:(0,F.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,F.jsx)(`rect`,{style:{fill:mD},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,F.jsx)(`rect`,{style:{fill:vD},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,F.jsx)(`path`,{style:{fill:hD},d:`M22 38h8v8h-8z`}),(0,F.jsx)(`path`,{style:{fill:gD},d:`M34 38h8v8h-8z`}),(0,F.jsx)(`path`,{style:{stroke:pD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M32 4v17m-8-7 8 8 8-8`})]}),restricted:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,style:{stroke:pD},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,F.jsx)(`rect`,{style:{fill:pD},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,F.jsx)(`path`,{style:{fill:vD},d:`M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z`})]}),error:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{fill:pD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,F.jsx)(`path`,{fill:`none`,style:{stroke:vD},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,F.jsx)(`circle`,{style:{fill:vD},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`g`,{fill:_D,children:[(0,F.jsx)(`rect`,{x:`17.25`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,F.jsx)(`rect`,{x:`42.95`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`18`,width:`3.2`,height:`26`}),(0,F.jsx)(`rect`,{x:`14.8`,y:`15.75`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,F.jsx)(`rect`,{x:`14.8`,y:`28.85`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,F.jsx)(`rect`,{x:`14.8`,y:`42.55`,width:`34.4`,height:`3.1`,rx:`1.55`})]}),(0,F.jsx)(`path`,{fill:`none`,stroke:hD,strokeWidth:`3`,strokeLinecap:`round`,d:`M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8`}),(0,F.jsx)(`path`,{fill:`none`,stroke:hD,strokeWidth:`3`,strokeLinecap:`round`,d:`M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2`}),(0,F.jsx)(fD,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,F.jsx)(fD,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,F.jsx)(fD,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,F.jsx)(fD,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,F.jsx)(fD,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,F.jsx)(`circle`,{fill:pD,cx:`31.9`,cy:`18.8`,r:`4`}),(0,F.jsx)(`circle`,{fill:mD,cx:`32`,cy:`32.3`,r:`4`}),(0,F.jsx)(`circle`,{fill:gD,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:mD,d:`M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`26.8`,cy:`37.9`,rx:`9.1`,ry:`5.6`}),(0,F.jsx)(`ellipse`,{fill:yD,cx:`27`,cy:`37.6`,rx:`4.7`,ry:`2.2`}),(0,F.jsx)(`path`,{fill:yD,d:`M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z`}),(0,F.jsx)(`circle`,{fill:pD,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,F.jsx)(`circle`,{fill:vD,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,F.jsx)(`ellipse`,{fill:_D,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:gD,d:`M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z`}),(0,F.jsx)(`circle`,{fill:vD,cx:`34.9`,cy:`41.9`,r:`11.3`}),(0,F.jsxs)(`g`,{fill:yD,children:[(0,F.jsx)(`rect`,{x:`29.9`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`}),(0,F.jsx)(`rect`,{x:`36.7`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`})]}),(0,F.jsx)(`path`,{fill:gD,d:`M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z`}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`3`,strokeLinecap:`round`,d:`M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1`})]}),tourtois:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:vD,x:`11.07`,y:`35.73`,width:`26.8`,height:`9.7`,rx:`3.25`,transform:`rotate(-5 24.47 40.58)`}),(0,F.jsx)(`path`,{fill:_D,d:`M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z`}),(0,F.jsx)(`path`,{fill:pD,d:`M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z`}),(0,F.jsx)(`path`,{fill:mD,d:`M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z`}),(0,F.jsx)(`path`,{fill:vD,d:`M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`circle`,{cx:`14.7`,cy:`18.45`,r:`1`}),(0,F.jsx)(`circle`,{cx:`17.6`,cy:`17.65`,r:`1`}),(0,F.jsx)(`circle`,{cx:`20.5`,cy:`16.85`,r:`1`}),(0,F.jsx)(`circle`,{cx:`17.9`,cy:`22.2`,r:`1`}),(0,F.jsx)(`circle`,{cx:`21`,cy:`21.5`,r:`1`}),(0,F.jsx)(`circle`,{cx:`24.1`,cy:`20.75`,r:`1`}),(0,F.jsx)(`circle`,{cx:`28.2`,cy:`25.3`,r:`1`})]}),(0,F.jsx)(`circle`,{fill:pD,cx:`21.7`,cy:`26.6`,r:`1`}),(0,F.jsx)(`circle`,{fill:_D,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,F.jsxs)(`g`,{fill:hD,children:[(0,F.jsx)(`ellipse`,{cx:`8.8`,cy:`36.6`,rx:`3.6`,ry:`1.9`,transform:`rotate(22 8.8 36.6)`}),(0,F.jsx)(`path`,{d:`M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5L12 41Z`}),(0,F.jsx)(`path`,{d:`M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z`})]}),(0,F.jsx)(`ellipse`,{fill:hD,cx:`46.4`,cy:`30.6`,rx:`8.1`,ry:`8.3`}),(0,F.jsxs)(`g`,{fill:yD,children:[(0,F.jsx)(`rect`,{x:`45.05`,y:`26.95`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 46.2 29.3)`}),(0,F.jsx)(`rect`,{x:`49.25`,y:`26.4`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 50.4 28.7)`})]}),(0,F.jsx)(`path`,{fill:pD,d:`M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z`,transform:`rotate(-8 48.9 33.5)`}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`3`,strokeLinecap:`round`,d:`M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7`})]}),allApps:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:pD,x:`7`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 18.6 18.6)`}),(0,F.jsx)(`rect`,{fill:mD,x:`33.9`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 45.5 18.6)`}),(0,F.jsx)(`rect`,{fill:hD,x:`7`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 18.6 45.5)`}),(0,F.jsx)(`rect`,{fill:_D,x:`33.9`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 45.5 45.5)`})]}),search:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:`none`,stroke:mD,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,F.jsx)(`path`,{fill:`none`,stroke:pD,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,F.jsx)(`ellipse`,{fill:mD,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:pD,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,F.jsx)(`path`,{fill:vD,d:`M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z`}),(0,F.jsx)(`circle`,{fill:_D,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,F.jsx)(`circle`,{fill:mD,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,F.jsx)(`circle`,{fill:gD,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,F.jsx)(`circle`,{fill:hD,cx:`32`,cy:`34.9`,r:`14.5`}),(0,F.jsxs)(`g`,{fill:`none`,stroke:vD,strokeWidth:`3`,children:[(0,F.jsx)(`ellipse`,{cx:`32`,cy:`34.9`,rx:`7.7`,ry:`13.3`}),(0,F.jsx)(`path`,{d:`M17.5 34.9H46.5`})]})]}),internet:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`ellipse`,{fill:`none`,stroke:_D,strokeWidth:`4.4`,cx:`32.2`,cy:`30.2`,rx:`25.6`,ry:`8.1`,transform:`rotate(-20.8 32.2 30.2)`}),(0,F.jsx)(`circle`,{fill:mD,cx:`32`,cy:`32`,r:`21.1`}),(0,F.jsxs)(`g`,{fill:`none`,stroke:vD,strokeWidth:`3`,children:[(0,F.jsx)(`ellipse`,{cx:`32`,cy:`31.8`,rx:`12.2`,ry:`18.7`}),(0,F.jsx)(`path`,{d:`M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39`})]}),(0,F.jsx)(`path`,{fill:`none`,stroke:_D,strokeWidth:`4.4`,d:`M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2`,transform:`rotate(-20.8 32.2 30.2)`})]}),members:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`circle`,{fill:mD,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,F.jsx)(`path`,{fill:mD,d:`M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z`}),(0,F.jsx)(`circle`,{fill:pD,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,F.jsx)(`path`,{fill:pD,d:`M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z`}),(0,F.jsxs)(`g`,{fill:yD,children:[(0,F.jsx)(`circle`,{cx:`18.3`,cy:`28`,r:`1.6`}),(0,F.jsx)(`circle`,{cx:`27.9`,cy:`28`,r:`1.6`}),(0,F.jsx)(`circle`,{cx:`39.1`,cy:`23.05`,r:`1.55`}),(0,F.jsx)(`circle`,{cx:`47.25`,cy:`23.05`,r:`1.55`})]})]}),sell:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{fill:_D,d:`M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`21.9`,cy:`40.8`,rx:`13.2`,ry:`3.6`}),(0,F.jsxs)(`g`,{transform:`rotate(-3 22.5 30) translate(0.5 0)`,children:[(0,F.jsx)(`path`,{fill:_D,d:`M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z`}),(0,F.jsx)(`ellipse`,{fill:vD,cx:`23.7`,cy:`26.55`,rx:`13.05`,ry:`4.4`})]}),(0,F.jsxs)(`g`,{transform:`translate(46.3 40.3) rotate(-25)`,children:[(0,F.jsx)(`path`,{fill:pD,d:`M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z`}),(0,F.jsx)(`circle`,{fill:vD,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,F.jsx)(cD,{fill:_D,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,F.jsx)(cD,{fill:_D,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`rect`,{fill:vD,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,F.jsx)(`path`,{fill:pD,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`circle`,{cx:`16.1`,cy:`16.15`,r:`3.4`}),(0,F.jsx)(`circle`,{cx:`43.4`,cy:`16.15`,r:`3.4`})]}),(0,F.jsxs)(`g`,{fill:mD,children:[(0,F.jsx)(`rect`,{x:`13.6`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`}),(0,F.jsx)(`rect`,{x:`40.9`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`})]}),(0,F.jsxs)(`g`,{fill:hD,children:[(0,F.jsx)(`rect`,{x:`11.1`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`20.7`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`20.7`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`11.1`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`30.4`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,F.jsxs)(`g`,{fill:gD,children:[(0,F.jsx)(`rect`,{x:`40.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`11.1`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,F.jsx)(`rect`,{x:`20.7`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,F.jsx)(`circle`,{fill:_D,cx:`45.5`,cy:`45.6`,r:`12.2`}),(0,F.jsx)(`path`,{fill:`none`,stroke:yD,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M45.1 39.3V46.2L51.3 49.8`}),(0,F.jsx)(`circle`,{fill:yD,cx:`45.1`,cy:`46.2`,r:`2.5`})]}),loop:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`path`,{style:{stroke:pD},strokeWidth:`6`,strokeLinecap:`round`,d:`M47.5 14.5C43 11 37.5 9 32 9 19.5 9 9 19.5 9 32S19.5 55 32 55 55 44.5 55 32`}),(0,F.jsx)(`path`,{style:{fill:pD},d:`M53.5 21.5Q54.5 20 55 22L58 33Q58.5 35 56.5 34.5L48.5 32.5Q47 32 48 30.5Z`}),(0,F.jsx)(`g`,{transform:`translate(18 21) scale(.28)`,children:(0,F.jsx)(uD,{fill:mD})}),(0,F.jsxs)(`g`,{style:{fill:vD},children:[(0,F.jsx)(`rect`,{x:`25`,y:`27.5`,width:`14`,height:`3`,rx:`1.5`}),(0,F.jsx)(`rect`,{x:`25`,y:`33.5`,width:`9`,height:`3`,rx:`1.5`})]})]}),fungi:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`ellipse`,{fill:vD,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,F.jsx)(`path`,{fill:pD,d:`M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z`}),(0,F.jsxs)(`g`,{fill:vD,children:[(0,F.jsx)(`ellipse`,{cx:`29`,cy:`15.7`,rx:`8.7`,ry:`6.3`,transform:`rotate(-15.5 29 15.7)`}),(0,F.jsx)(`ellipse`,{cx:`50.8`,cy:`20.1`,rx:`6.5`,ry:`3.5`,transform:`rotate(51.6 50.8 20.1)`}),(0,F.jsx)(`ellipse`,{cx:`13`,cy:`26.8`,rx:`4.2`,ry:`3.3`,transform:`rotate(-54.5 13 26.8)`})]}),(0,F.jsxs)(`g`,{fill:yD,transform:`translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)`,children:[(0,F.jsx)(`rect`,{x:`31.85`,y:`35.9`,width:`3.75`,height:`5.25`,rx:`1.85`}),(0,F.jsx)(`path`,{d:`M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z`}),(0,F.jsx)(`path`,{d:`M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z`})]})]})};function bD({name:e,size:t}){return(0,F.jsx)(`svg`,{viewBox:`0 0 64 64`,width:t,height:t,fill:`none`,stroke:`none`,"aria-hidden":`true`,focusable:`false`,"data-sigil":e,children:Zpe[e]})}var Qpe=[{id:`list`,label:`List files`,contract:jce},{id:`read`,label:`Read files`,contract:Bce},{id:`write`,label:`Write files`,contract:Vce},{id:`run`,label:`Run commands`,contract:wC}],$pe={loading:`Loading`,unavailable:`Unavailable`,error:`Refresh failed`};function eme({app:e,terminal:t=null,processes:n,ports:r}){let[i,a]=(0,I.useState)(!1),o=async()=>{if(e){a(!0);try{await e.ui.requestAppPermissions({})}catch(e){DC(`Could not open App permissions. Try again.`,e)}finally{a(!1)}}};return{id:`access`,label:`Access`,title:`Computer access`,content:(0,F.jsxs)(`div`,{className:`shed-instrument`,children:[(0,F.jsxs)(Ipe,{size:`sm`,children:[(0,F.jsx)(Lpe,{icon:(0,F.jsx)(bD,{name:`computer`}),title:t?.name??`Selected Computer`,status:t?(0,F.jsx)(vm,{size:`compact`,label:`Terminal ${t.state}`,tone:t.state===`open`?`success`:t.state===`failed`?`error`:`neutral`}):null}),(0,F.jsxs)(Rpe,{children:[(0,F.jsx)(aD,{legend:`Shed may`,wide:!0,children:(0,F.jsx)(Ppe,{"aria-label":`Shed may`,stateLabels:[`allowed`,`not allowed`],items:Qpe.map(({id:t,label:n,contract:r})=>({id:t,label:n,caption:t,icon:(0,F.jsx)(bD,{name:t}),on:e?.capabilities.has(r)===!0}))})}),(0,F.jsx)(xD,{label:`Processes`,value:n}),(0,F.jsx)(xD,{label:`Ports open`,value:r})]})]}),e?(0,F.jsx)(`div`,{className:`shed-instrument-keys`,children:(0,F.jsx)(ZE,{size:`sm`,variant:`ghost`,disabled:i,onClick:()=>void o(),children:i?`Opening permissions…`:`App permissions…`})}):null]})}}function xD({label:e,value:t}){return(0,F.jsx)(aD,{legend:e,role:`group`,"aria-label":e,children:t.kind===`loaded`?(0,F.jsx)(jpe,{value:t.count,pad:2,size:`md`}):(0,F.jsx)(`span`,{className:`shed-instrument-note`,children:$pe[t.kind]})})}var tme={2:`h2`,3:`h3`,4:`h4`};function nme(e,t){let{reduced:n}=t,r=e&&!n,i=Rd(t,600),[a,o]=(0,I.useState)(r);return(0,I.useEffect)(()=>{if(o(r),!r)return;let e=globalThis.setTimeout(()=>{o(!1)},i);return()=>{globalThis.clearTimeout(e)}},[r,i]),a}var rme=(0,F.jsx)(um,{decorative:!0,pace:`idle`,size:`md`,tone:`primary`,variant:`wander`}),SD=(0,I.forwardRef)(function({actions:e,secondaryAction:t,className:n,description:r,headingLevel:i=2,primaryAction:a,suggestions:o,thinking:s=!1,title:c,visual:l,renderVisual:u,variant:d=`plain`,...f},p){let m=(0,I.useId)(),h=(0,I.useRef)(null),g=Ld(h),_=nme(d===`speech`,g)&&!s,v=tme[i],y=l??(d===`panel`?`blobs`:void 0),b=u?u({speaking:_,thinking:s}):y===`blobs`?rme:y,x=`${m}-reason`,S=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(v,{ref:h,className:`empty-state-title`,id:f[`aria-labelledby`]?void 0:m,children:c}),(0,F.jsx)(`p`,{children:r}),a?(0,F.jsxs)(`div`,{className:`empty-state-primary`,children:[(0,F.jsxs)(`div`,{className:`empty-state-action-row`,children:[(0,F.jsx)(ZE,{"aria-describedby":a.disabled&&a.disabledReason?x:void 0,disabled:a.disabled,loading:a.pending===!0,onClick:a.onSelect,variant:`primary`,children:a.label}),t]}),a.disabled&&a.disabledReason?(0,F.jsx)(`span`,{className:`empty-state-reason`,id:x,children:a.disabledReason}):null]}):null,o&&o.length>0?(0,F.jsx)(`ul`,{"aria-label":`Try one of these`,className:`empty-state-suggestions`,children:o.map((e,t)=>(0,F.jsx)(`li`,{children:(0,F.jsx)(ZE,{disabled:e.disabled,loading:e.pending===!0,size:`sm`,variant:`outline`,onClick:e.onSelect,children:e.label})},`${String(t)}:${e.label}`))}):null,e?(0,F.jsx)(`div`,{className:`empty-state-actions`,children:e}):null]});return(0,F.jsxs)(`section`,{...f,"aria-labelledby":f[`aria-labelledby`]??m,className:Dd(`empty-state`,d!==`plain`&&`empty-state-${d}`,n),ref:p,children:[b?(0,F.jsx)(`div`,{"aria-hidden":`true`,className:`empty-state-visual`,children:b}):null,d===`speech`?(0,F.jsx)(`div`,{className:`empty-state-bubble`,children:S}):S]})}),ime=(0,I.forwardRef)(function({className:e,orientation:t,variant:n=`grip`,value:r,min:i,max:a,onValueChange:o,onKeyDown:s,...c},l){return(0,F.jsx)(`div`,{...c,ref:l,className:Dd(`caps-resize-handle`,e),"data-resize-variant":n,role:`separator`,"aria-orientation":t,"aria-valuemin":Math.round(i),"aria-valuemax":Math.round(a),"aria-valuenow":Math.round(r),tabIndex:c.tabIndex??0,onKeyDown:e=>{if(s?.(e),e.defaultPrevented)return;if(e.key===`Home`||e.key===`End`){e.preventDefault(),o(e.key===`Home`?i:a);return}let n=t===`horizontal`?e.key===`ArrowUp`?-32:e.key===`ArrowDown`?32:null:e.key===`ArrowLeft`?-32:e.key===`ArrowRight`?32:null;n!==null&&(e.preventDefault(),o(Math.min(a,Math.max(i,r+n))))},children:(0,F.jsx)(`span`,{className:`caps-resize-grip`,"aria-hidden":`true`})})});function CD(e){return`init`in e}function wD(e){return typeof e.write==`function`}function ame(e){return!!e.onMount}function TD(e){return`v`in e||`e`in e}function ED(e){if(`e`in e)throw e.e;return e.v}function DD(e){return typeof e?.then==`function`}function ome(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function OD(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function kD(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function sme(e){return!!e.INTERNAL_onInit}var cme=(e,t,n,...r)=>n.read(...r),lme=(e,t,n,...r)=>n.write(...r),ume=(e,t,n)=>n.INTERNAL_onInit(t),dme=(e,t,n,r)=>n.onMount?.call(n,r),fme=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),sme(n)&&s(e,t,n)}return a},pme=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},mme=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of kD(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},hme=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(TD(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},T=r=>{var i;if(r===n){let n=u(e,t,r);if(!TD(n)){if(CD(r))g(e,t,r,r.init);else throw Error(`no atom init`)}return ED(n)}let o=p(e,t,r);try{return ED(o)}finally{S.delete(r),y.d.set(r,o.n),DD(y.v)&&OD(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},E,D,O={get signal(){return E||=new AbortController,E.signal},get setSelf(){return!D&&wD(n)&&(D=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),D}},k=y.n,A=o.get(n)===k;try{let i=l(e,t,n,T,O);if(g(e,t,n,i),DD(i)){_(e,t,i,()=>E?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){if(ome(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==k&&A&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},gme=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of kD(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},_me=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>ED(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!CD(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},vme=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},yme=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),wD(n)&&ame(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},bme=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},xme=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(DD(r))for(let a of o.d.keys())OD(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,DD(c)&&a(e,t,c))},Sme=(e,t,n)=>{let r=e[14];return ED(r(e,t,n))},Cme=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},wme=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},Tme=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},Eme=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},Dme=new WeakMap;function Ome(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},cme,lme,ume,dme,fme,pme,mme,hme,gme,_me,vme,yme,bme,xme,Sme,Cme,wme,void 0,new WeakMap,Tme,Eme,[0]].map((t,n)=>e[n]||t);Dme.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var kme=0;function Ame(e,t){let n=`atom${++kme}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=jme,r.write=Mme),t&&(r.write=t),r}function jme(e){return e(this)}function Mme(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function Nme(){return Ome()}var AD=Ame({frames:new Map,order:[],tiles:[],minima:new Map,participating:new Set,mainSize:void 0,zoomed:null,gesture:null,restore:new Map}),jD=(e,t,n)=>Math.min(Math.max(e,t),n),MD=(e,t,n)=>{let r=jD(e.width,n.width,Math.max(n.width,t.width)),i=jD(e.height,n.height,Math.max(n.height,t.height));return{width:r,height:i,x:jD(e.x,0,Math.max(0,t.width-r)),y:jD(e.y,0,Math.max(0,t.height-i))}},ND=(e,t,n)=>{let r=t.width/2,i=t.height/2;return MD(e===`left`?{x:0,y:0,width:r,height:t.height}:e===`right`?{x:r,y:0,width:r,height:t.height}:e===`top-left`?{x:0,y:0,width:r,height:i}:e===`top-right`?{x:r,y:0,width:r,height:i}:e===`bottom-left`?{x:0,y:i,width:r,height:i}:{x:r,y:i,width:r,height:i},t,n)},Pme=()=>{let e=Nme(),t=()=>e.get(AD),n=0,r=r=>{n+=1,e.set(AD,r(t()))},i=(e,t,n)=>{r(r=>{let i=new Map(r.frames);return i.set(e,t),{...r,frames:i,participating:new Set(r.participating).add(e),tiles:r.tiles.includes(e)?r.tiles:[...r.tiles,e],minima:new Map(r.minima).set(e,n),order:r.order.includes(e)?r.order:[...r.order.filter(e=>e!==r.zoomed),e,...r.zoomed?[r.zoomed]:[]]}})},a=e=>t().frames.has(e),o=(e,n)=>{let r=t().gesture;return r?.kind===`frame`&&r.id===e&&r.pointerId===n};return{get version(){return n},get frames(){return t().frames},get order(){return t().order},get tiles(){return t().tiles},get minima(){return t().minima},get participating(){return t().participating},get mainSize(){return t().mainSize},get zoomed(){return t().zoomed},get gesture(){return t().gesture},get restore(){return t().restore},subscribe:t=>e.sub(AD,t),register:i,setParticipation:(e,n)=>{t().frames.has(e)&&r(t=>{if(t.participating.has(e)===n)return t;let r=new Set(t.participating);n?r.add(e):r.delete(e);let i=n?t.tiles.includes(e)?t.tiles:[...t.tiles,e]:t.tiles.filter(t=>t!==e),a=n?t.order.includes(e)?t.order:[...t.order,e]:t.order.filter(t=>t!==e);return{...t,participating:r,tiles:i,order:a,zoomed:n||t.zoomed!==e?t.zoomed:null,gesture:!n&&t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture}})},setMinima:(e,n)=>{let i=t().minima.get(e);!i||i.width===n.width&&i.height===n.height||r(t=>({...t,minima:new Map(t.minima).set(e,n)}))},unregister:e=>{r(t=>{if(!t.frames.has(e))return t;let n=new Map(t.frames);n.delete(e);let r=new Map(t.restore);r.delete(e);let i=t.order.filter(t=>t!==e),a=t.tiles.filter(t=>t!==e),o=new Map(t.minima);o.delete(e);let s=new Set(t.participating);s.delete(e);let c=t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture;return{...t,frames:n,restore:r,order:i,tiles:a,minima:o,participating:s,gesture:c,zoomed:t.zoomed===e?null:t.zoomed}})},begin:(e,n)=>{!a(e)||!t().participating.has(e)||r(t=>({...t,gesture:{kind:`frame`,id:e,pointerId:n,start:t.frames.get(e)??{x:0,y:0,width:0,height:0}},order:[...t.order.filter(t=>t!==e),e]}))},move:(e,n,i,s,c,l=null)=>{a(e)&&t().participating.has(e)&&o(e,n)&&r(t=>({...t,frames:new Map(t.frames).set(e,MD(i,s,c)),gesture:t.gesture?.kind===`frame`?{...t.gesture,snap:l?{side:l,frame:ND(l,s,c)}:null}:t.gesture}))},end:(e,t)=>{o(e,t)&&r(t=>{let n=t.gesture;return n?.kind!==`frame`||!n.snap?{...t,gesture:null}:{...t,frames:new Map(t.frames).set(e,n.snap.frame),restore:new Map(t.restore).set(e,t.restore.get(e)??n.start),gesture:null}})},cancel:(e,n)=>{let i=t().gesture;i?.kind===`frame`&&i.id===e&&i.pointerId===n&&r(t=>{let n=new Map(t.frames);return n.set(e,i.start),{...t,frames:n,gesture:null}})},snap:(e,n,i,o)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=new Map(t.restore);r.set(e,t.frames.get(e)??ND(n,i,o));let a=new Map(t.frames);return a.set(e,ND(n,i,o)),{...t,frames:a,restore:r,order:[...t.order.filter(t=>t!==e),e]}})},restoreFrame:(e,n,i)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=t.restore.get(e);if(!r)return t;let a=new Map(t.frames);a.set(e,MD(r,n,i));let o=new Map(t.restore);return o.delete(e),{...t,frames:a,restore:o}})},focus:e=>{a(e)&&r(t=>({...t,order:[...t.order.filter(t=>t!==e),e],zoomed:t.zoomed===null?null:e}))},swap:(e,n)=>{!a(e)||!a(n)||!t().participating.has(e)||!t().participating.has(n)||r(t=>({...t,tiles:t.tiles.map(t=>t===e?n:t===n?e:t)}))},zoom:e=>{e!==null&&(!a(e)||!t().participating.has(e))||r(t=>({...t,zoomed:e,order:e===null?t.order:[...t.order.filter(t=>t!==e),e]}))},resizeMain:e=>{r(t=>({...t,mainSize:e}))},beginDivider:e=>!t().gesture&&(r(t=>({...t,gesture:{kind:`divider`,pointerId:e,start:t.mainSize}})),!0),finishDivider:(e,n)=>{let i=t().gesture;i?.kind===`divider`&&i.pointerId===e&&r(e=>({...e,gesture:null,mainSize:n?i.start:e.mainSize}))},destroy:()=>{r(e=>({...e,gesture:null,restore:new Map}))}}};function Fme(e,t,n,r,i){let a=i.layout??`main-left`;if(a===`columns`||a===`rows`||a===`grid`)return Ime(e,t,n,r,i,a);if(a===`main-top`){let a=PD(e,new Map([...t].map(([e,t])=>[e,{width:t.height,height:t.width}])),n,{width:r.height,height:r.width},i);return{frames:new Map([...a.frames].map(([e,t])=>[e,{x:t.y,y:t.x,width:t.height,height:t.width}])),tabGroups:a.tabGroups,divider:a.divider&&{...a.divider,axis:`y`}}}return PD(e,t,n,r,i)}function Ime(e,t,n,r,i,a){let o=new Map,s=[];if(!e.length)return{frames:o,tabGroups:s,divider:null};let c=Math.max(0,i.gap??8),l=e.reduce((e,n)=>({width:Math.max(e.width,t.get(n)?.width??0),height:Math.max(e.height,t.get(n)?.height??0)}),{width:0,height:0}),u=(t,n)=>n+c===0?e.length:Math.min(e.length,Math.max(1,Math.floor((t+c)/(n+c)))),d=u(r.width,l.width),f=u(r.height,l.height),p=l.width>r.width||l.height>r.height?1:a===`columns`?d:a===`rows`?f:Math.min(e.length,d*f),m=a===`columns`?p:a===`rows`?1:Math.min(d,Math.max(Math.ceil(Math.sqrt(p)),Math.ceil(p/f))),h=Math.ceil(p/m),g=(r.width-c*(m-1))/m,_=(r.height-c*(h-1))/h;for(let t=0;t<p;t++){let r=e.slice(t,t===p-1?void 0:t+1),i=r.length===1?r[0]:[...n].reverse().find(e=>r.includes(e))??r[0];i&&o.set(i,{x:t%m*(g+c),y:Math.floor(t/m)*(_+c),width:g,height:_}),r.length>1&&s.push(r)}return{frames:o,tabGroups:s,divider:null}}function PD(e,t,n,r,i){let a=new Map,o=[],s={x:0,y:0,...r},[c,...l]=e,u=(e,t)=>{let r=[...n].reverse().find(t=>e.includes(t))??e[0];r&&a.set(r,t),e.length>1&&o.push(e)};if(!c)return{frames:a,tabGroups:o,divider:null};if(!l.length)return a.set(c,s),{frames:a,tabGroups:o,divider:null};let d=Math.max(0,i.gap??8),f=t.get(c)?.width??0,p=Math.max(...l.map(e=>t.get(e)?.width??0)),m=r.width-d-p;if(f>m)return u([...e],s),{frames:a,tabGroups:o,divider:null};let h=Math.min(m,Math.max(f,i.mainSize??r.width/2)),g={axis:`x`,position:h,min:f,max:m};a.set(c,{...s,width:h});let _={...s,x:h+d,width:r.width-h-d},v=l.map(e=>t.get(e)?.height??0).reduce((e,t)=>e+t,0)+d*(l.length-1);if(v>r.height)u(l,_);else{let e=(r.height-v)/l.length,n=0;for(let r of l){let i=(t.get(r)?.height??0)+e;a.set(r,{..._,y:n,height:i}),n+=i+d}}return{frames:a,tabGroups:o,divider:g}}function FD(e,t=!0,n){let r=(0,I.useRef)(e);r.current=e;let i=(0,I.useRef)(null);return(0,I.useEffect)(()=>(t||i.current?.release(!0),()=>i.current?.release(!0)),[t]),(0,I.useEffect)(()=>{let e=()=>{i.current?.release(!0)};return n?.addEventListener(`abort`,e),()=>{n?.removeEventListener(`abort`,e)}},[n]),{onPointerDown:e=>{if(!t||n?.aborted||i.current||e.pointerType===`mouse`&&e.button!==0)return;let{currentTarget:a,pointerId:o}=e;if(a.setPointerCapture(o),!r.current.begin(e)){a.releasePointerCapture(o);return}let s=r.current.end,c=()=>{l(!0)},l=e=>{a.removeEventListener(`lostpointercapture`,c),i.current=null,s(e),a.hasPointerCapture(o)&&a.releasePointerCapture(o)};i.current={id:o,element:a,x:e.clientX,y:e.clientY,release:l},a.addEventListener(`lostpointercapture`,c)},onPointerMove:e=>{let t=i.current;t?.id===e.pointerId&&(r.current.move(e.clientX-t.x,e.clientY-t.y,e),t.x=e.clientX,t.y=e.clientY)},onPointerUp:e=>{i.current?.id===e.pointerId&&i.current.release(!1)},onPointerCancel:e=>{i.current?.id===e.pointerId&&i.current.release(!0)}}}function Lme(e,t){return e.x<20?e.y<20?`top-left`:e.y>t.height-20?`bottom-left`:`left`:e.x>t.width-20?e.y<20?`top-right`:e.y>t.height-20?`bottom-right`:`right`:null}var ID=(0,I.createContext)(null);function Rme({bounds:e,tiling:t,containerRef:n,children:r}){let i=(0,I.useMemo)(Pme,[]);(0,I.useSyncExternalStore)(i.subscribe,()=>i.version,()=>i.version),(0,I.useEffect)(()=>()=>{i.destroy()},[i]);let a={...t};i.mainSize!==void 0&&(a.mainSize=i.mainSize);let o=t?Fme(i.tiles,i.minima,i.order,e,a):{frames:new Map([...i.frames].filter(([e])=>i.participating.has(e)).map(([t,n])=>[t,MD(n,e,i.minima.get(t)??{width:0,height:0})])),tabGroups:[],divider:null};return i.zoomed&&i.participating.has(i.zoomed)&&(o.frames=new Map([[i.zoomed,{x:0,y:0,...e}]]),o.divider=null,o.tabGroups=[]),(0,F.jsx)(ID.Provider,{value:{state:i,bounds:e,tiled:t!==void 0,arrangement:o,containerRef:n},children:r})}function LD(){let e=(0,I.useContext)(ID);if(!e)throw Error(`Maosaico hooks must be used within MaosaicoRoot`);return e}function zme(){let{state:e,arrangement:t,tiled:n,bounds:r}=LD(),i=e.tiles,a=(0,I.useRef)({pointer:0,position:0}),o=t.divider,s=FD({begin:t=>!o||!e.beginDivider(t.pointerId)?!1:(a.current={pointer:t.pointerId,position:o.position},!0),move:(t,n)=>{o&&(a.current.position=Math.min(o.max,Math.max(o.min,a.current.position+(o.axis===`x`?t:n))),e.resizeMain(a.current.position))},end:t=>{e.finishDivider(a.current.pointer,t)}},o!==null);return{bounds:r,stackingStyle:{zIndex:e.order.length},mode:n?`tiled`:`floating`,order:i,interacting:e.gesture!==null,snapPreview:!n&&!e.zoomed&&e.gesture?.kind===`frame`?e.gesture.snap??null:null,activeId:e.order.at(-1)??null,zoomedId:e.zoomed,tabGroups:t.tabGroups,divider:o&&{...o,props:s},focus:e.focus,swap:e.swap,zoom:e.zoom,resizeMain:t=>{o&&e.resizeMain(Math.min(o.max,Math.max(o.min,t)))}}}function Bme(e,t={}){let{state:n,bounds:r,tiled:i,arrangement:a,containerRef:o}=LD();(0,I.useLayoutEffect)(()=>(n.register(e.id,e.frame,e.minima),()=>{n.unregister(e.id)}),[n,e.id]),(0,I.useEffect)(()=>{n.setMinima(e.id,e.minima)},[n,e.id,e.minima.width,e.minima.height]);let s=t.participating??!0;(0,I.useLayoutEffect)(()=>{n.setParticipation(e.id,s)},[n,e.id,s]);let c=(0,I.useRef)(0),l=FD({begin:t=>!n.frames.has(e.id)||n.gesture?!1:(c.current=t.pointerId,n.begin(e.id,t.pointerId),!0),move:(i,a,s)=>{let l=o?.current?.getBoundingClientRect(),u=l&&t.kind!==`resize`?Lme({x:s.clientX-l.left,y:s.clientY-l.top},r):null,d=MD(n.frames.get(e.id)??e.frame,r,e.minima);n.move(e.id,c.current,t.kind===`resize`?{...d,width:d.width+i,height:d.height+a}:{...d,x:d.x+i,y:d.y+a},r,e.minima,u)},end:t=>{t?n.cancel(e.id,c.current):n.end(e.id,c.current)}},s&&!i&&!n.zoomed);return{frame:a.frames.get(e.id)??n.frames.get(e.id)??e.frame,stackingStyle:{zIndex:Math.max(0,n.order.indexOf(e.id))},visible:a.frames.has(e.id),active:s&&n.order.at(-1)===e.id,props:l,focus:()=>{s&&n.focus(e.id)},snap:t=>{s&&!i&&n.snap(e.id,t,r,e.minima)},restore:()=>{s&&!i&&n.restoreFrame(e.id,r,e.minima)}}}var Vme=(0,I.createContext)(null);(0,I.forwardRef)(function({layer:e,style:t,children:n,...r},i){let a=(0,I.useContext)(Vme),o=a?.update,s=a?.roots.get(`dialog`),[c,l]=(0,I.useState)(!1);(0,I.useEffect)(()=>{if(!s)return;let e=()=>{l(Array.from(s.querySelectorAll(`*`)).some(e=>{let t=e.getBoundingClientRect();return t.width>0&&t.height>0}))};e();let t=new MutationObserver(e);return t.observe(s,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[s]);let u=(0,I.useRef)(null);(0,I.useImperativeHandle)(i,()=>u.current);let d=(0,I.useCallback)(t=>{u.current=t,o?.(e,t)},[o,e]);return(0,I.createElement)(`div`,{...r,ref:d,onFocusCapture:t=>{e===`windows`&&t.target instanceof Node&&t.currentTarget.contains(t.target)&&a?.dismiss?.(),r.onFocusCapture?.(t)},"data-maosaico-layer":e,inert:e===`windows`&&c?``:void 0,style:{position:`relative`,...t,isolation:`isolate`,zIndex:`var(--stipe-layer-${e})`}},n)});var Hme={xs:`size-3`,sm:`size-[var(--stipe-icon-size-sm)]`,md:`size-[var(--stipe-icon-size-md)]`,lg:`size-[var(--stipe-icon-size-lg)]`},RD=(0,I.forwardRef)(function({active:e=!1,icon:t,iconSize:n=`xs`,className:r,reveal:i=!1,size:a=`xs`,tone:o=`default`,variant:s=`ghost`,...c},l){let u=a===`responsive`;return(0,F.jsx)(ZE,{...c,resultLabel:c.result===void 0?void 0:null,ref:l,size:u?`sm`:a,variant:s,className:Dd(`caps-icon-button btn-circle`,u&&`caps-icon-button-responsive md:btn-xs`,e&&`text-accent`,i&&`scale-0 transition-transform group-hover:scale-100 focus-visible:scale-100`,o===`destructive`&&`hover:text-error`,r),children:(0,F.jsx)(`span`,{"aria-hidden":`true`,className:Dd(`inline-flex shrink-0 [&>svg]:size-full [&>svg]:[stroke-width:var(--stipe-icon-stroke)]`,Hme[n]),children:t})})}),Ume=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`div`,{...t,ref:n,className:Dd(`caps-popover-anchor`,e)})}),Wme=(0,I.forwardRef)(function({className:e,open:t,side:n=`top`,...r},i){return t?(0,F.jsx)(`div`,{...r,ref:i,className:Dd(`caps-popover`,e),"data-side":n}):null});(0,I.forwardRef)(function({active:e,className:t,onMouseDown:n,...r},i){return(0,F.jsx)(`div`,{role:`option`,"aria-selected":e,...r,ref:i,className:Dd(`caps-popover-option`,t),"data-active":e,onMouseDown:e=>{e.preventDefault(),n?.(e)}})});function Gme({items:e,openId:t,onOpenChange:n,leading:r,trailing:i,renderTrigger:a,placement:o=`housing`,align:s=`end`,hostInset:c,className:l,...u}){let d=(0,I.useId)(),f=(0,I.useRef)(null),p=(0,I.useRef)(null),m=(0,I.useRef)(new Map),h=e.find(e=>e.id===t&&!e.disabled),g=h?.id,_=()=>{g&&m.current.get(g)?.focus(),n(null)};return(0,I.useEffect)(()=>{g&&p.current?.focus()},[g]),(0,I.useEffect)(()=>{c===void 0?f.current?.style.removeProperty(`--caps-status-tray-host-inset`):f.current?.style.setProperty(`--caps-status-tray-host-inset`,`${String(Math.max(0,c))}px`)},[c]),(0,I.useEffect)(()=>{if(!g)return;let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),m.current.get(g)?.focus(),n(null))},t=e=>{!(e.target instanceof Node)||f.current?.contains(e.target)||f.current?.querySelector(`[aria-haspopup="menu"][aria-expanded="true"]`)||n(null)};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t,!0)}},[g,n]),(0,F.jsxs)(Ume,{...u,ref:f,className:Dd(`caps-status-tray`,l),"data-placement":o,"data-align":s,children:[h?(0,F.jsxs)(Wme,{open:!0,ref:p,tabIndex:-1,side:`top`,id:`${d}-${h.id}`,role:`dialog`,"aria-labelledby":`${d}-title`,className:`caps-status-tray-panel`,"data-status-tray-panel":h.id,children:[(0,F.jsxs)(`div`,{className:`caps-status-tray-head`,children:[h.tone?(0,F.jsx)(vm,{size:`compact`,tone:h.tone,glyph:h.glyph??`dot`}):null,(0,F.jsx)(`span`,{id:`${d}-title`,className:`caps-status-tray-title`,children:h.title??h.label}),h.actions,(0,F.jsx)(RD,{"aria-label":`Close tray`,icon:(0,F.jsx)(dr,{"aria-hidden":`true`}),onClick:_})]}),(0,F.jsx)(`div`,{className:`caps-status-tray-body`,children:h.content})]}):null,o===`host`?null:(0,F.jsxs)(`div`,{className:`caps-status-tray-row`,children:[r,(0,F.jsx)(`div`,{className:`caps-status-tray-chips`,children:e.map(e=>{let r={ref:t=>{t?m.current.set(e.id,t):m.current.delete(e.id)},type:`button`,className:a?void 0:`caps-status-tray-chip`,"aria-expanded":g===e.id,"aria-controls":g===e.id?`${d}-${e.id}`:void 0,"aria-label":e.accessibleLabel,disabled:e.disabled,title:e.disabled?e.accessibleLabel:void 0,"aria-haspopup":`dialog`,"data-status-tray-chip":e.id,onClick:()=>{n(t===e.id?null:e.id)},children:(0,F.jsxs)(F.Fragment,{children:[e.tone?(0,F.jsx)(vm,{size:`compact`,glyph:e.glyph??`dot`,motion:e.motion??`none`,tone:e.tone}):null,(0,F.jsx)(`span`,{className:`caps-status-tray-label`,children:e.label}),e.count!==void 0&&e.count>0?(0,F.jsx)(`span`,{className:`caps-status-tray-count`,children:e.count}):null]})};return(0,F.jsxs)(I.Fragment,{children:[a?a(r):(0,F.jsx)(`button`,{...r}),e.after]},e.id)})}),i]})]})}function Kme({children:e,className:t,...n}){return(0,F.jsx)(`div`,{...n,className:Dd(`caps-status-tray-list`,t),children:e})}function zD({icon:e,primary:t,secondary:n,actions:r,className:i,...a}){return(0,F.jsxs)(`div`,{...a,className:Dd(`caps-status-tray-item`,i),children:[e?(0,F.jsx)(`span`,{className:`caps-status-tray-icon`,children:e}):null,(0,F.jsxs)(`span`,{className:`caps-status-tray-text`,children:[(0,F.jsx)(`span`,{className:`caps-status-tray-primary`,children:t}),n?(0,F.jsx)(`span`,{className:`caps-status-tray-secondary`,children:n}):null]}),r?(0,F.jsx)(`span`,{className:`caps-status-tray-actions`,children:r}):null]})}function BD({children:e=`All caught up.`,title:t}){return(0,F.jsxs)(`div`,{className:`caps-status-tray-note`,children:[t?(0,F.jsx)(`strong`,{className:`caps-status-tray-note-title`,children:t}):null,(0,F.jsx)(`p`,{children:e})]})}function qme({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function VD(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var HD=[],UD=0,{link:WD,unlink:Jme,propagate:Yme,checkDirty:GD,shallowPropagate:KD}=qme({update(e){return e._update()},notify(e){HD[JD++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,QD(e))}}),qD=0,JD=0,YD,XD=0;function ZD(e){try{++XD,e()}finally{--XD||$D()}}function QD(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Jme(n,e)}function $D(){if(!(XD>0)){for(;qD<JD;){let e=HD[qD];HD[qD++]=void 0,e.notify()}qD=0,JD=0}}function eO(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return YD!==void 0&&WD(i,YD,UD),i._snapshot},subscribe(e){let t=VD(e),n={current:!1},r=Xme(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=YD,o=t?.compare??Object.is;if(n)YD=i,++UD,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{YD=a,n&&(i.flags&=-5),QD(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&GD(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&KD(e)}}else e&32&&(i.flags=e&-33);return YD!==void 0&&WD(i,YD,UD),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Yme(e),KD(e),$D())}},i}function Xme(e){let t=()=>{let t=YD;YD=n,++UD,n.depsTail=void 0,n.flags=6;try{return e()}finally{YD=t,n.flags&=-5,QD(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&GD(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,QD(this)}};return t(),n}var tO=class{constructor(e,t){this.atom=eO(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(VD(e))}},Zme=class{constructor(e){this.atom=eO(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(VD(e))}};function nO(e,t){return typeof e==`function`?new Zme(e):t?new tO(e,t):new tO(e)}var Qme=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function $me(e,t){return new Qme(e,t).maybeExecute}var ehe=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},rO=new class extends ehe{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function iO(e,t){return typeof e==`function`?e(t):e}function aO(e,t){return dO(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function oO(e,t,n){let r=dO(t);function i(e){if(!r.length)return iO(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function the(e,t){let n=dO(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var sO=46,cO=91,lO=93,uO=48,nhe=57;function dO(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===cO),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===sO||s===cO||s===lO){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==uO),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==lO&&(a!==-1||s!==lO)&&(a!==s||s!==sO&&s!==cO)&&n.push(``);r=o+1,i=!0}else(s<uO||s>nhe)&&(i=!1);a=s}return n.length||n.push(``),n}function rhe(e){return!(Array.isArray(e)&&e.length===0)}function fO(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function pO(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var mO=e=>!!e&&typeof e==`object`&&`fields`in e;function hO(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!hO(e[i],t[i]))return!1;return!0}var gO=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},_O=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function vO(e,t){return e==null?t:{...e,...t}}for(var yO=256,bO=[],xO;yO--;)bO[yO]=(yO+256).toString(16).substring(1);function SO(){let e=0,t,n=``;if(!xO||yO+16>256){for(xO=Array(256),e=256;e--;)xO[e]=256*Math.random()|0;e=0,yO=0}for(;e<16;e++)t=xO[yO+e],n+=e===6?bO[t&15|64]:e===8?bO[t&63|128]:bO[t],e&1&&e>1&&e<11&&(n+=`-`);return yO++,n}var ihe=$me(e=>rO.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function CO(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=CO(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,CO(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(CO(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=CO(e[n]));return t}function wO(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var TO=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function ahe(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var EO=(e,t)=>{let n=ahe(e,t);return{form:n,fields:n}},DO={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:EO(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:EO(r.issues,e)}},OO=e=>!!e&&`~standard`in e,kO={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function AO(e){function t(t){let n=e.getFieldMeta(t)??kO;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>kO;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function jO(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var MO=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{ihe(this)}),t=rO.on(`request-form-state`,e=>{e.payload.id===this._formId&&rO.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=rO.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=rO.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),rO.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return rO.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!hO(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!hO(e.defaultState,t.defaultState)&&!this.state.isTouched;if(!(!n&&!r)){if(ZD(()=>{this.baseStore.setState(()=>jO(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=AO(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}rO.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=oO(t,e.instance.name,e.instance.options.defaultValue))}),jO({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return ZD(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return ZD(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=fO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||TO}),r=!1,i={};return ZD(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=NO(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=PO(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??kO,r=a?.[e],{newErrorValue:s,newSource:c}=gO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=kO)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=PO(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=PO(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=pO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||TO});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=PO(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=NO(r);s&&(i=i?{...i,...s}:s);let c=PO(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??kO,r=i?.[e],{newErrorValue:a,newSource:o}=gO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=kO)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),ZD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}ZD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),ZD(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),rO.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>aO(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:iO(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=kO,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;ZD(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:oO(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t!==n&&t.startsWith(n)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=the(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),AO(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],vO(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),AO(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),vO(r,{dontValidate:!0})),AO(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),vO(n,{dontValidate:!0})),AO(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return oO(oO(e,`${t}`,i),`${n}`,r)},vO(r,{dontValidate:!0})),AO(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},vO(r,{dontValidate:!0})),AO(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],vO(t,{dontValidate:!0})),AO(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=aO(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:kO},values:i===void 0?t.values:oO(t.values,e,i)}})},this.setErrorMap=e=>{ZD(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(mO(t)){let{formError:e,fieldErrors:r}=NO(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>DO.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>DO.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??SO(),this._devtoolsSubmissionOverride=!1;let t=jO({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!mO(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=nO(t);let n;this.fieldMetaDerived=nO(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=aO(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!rhe(u),f=!o.isDirty,p=hO(l,this.getFieldInfo(a)?.instance?.options.defaultValue??aO(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=nO(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!wO(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&wO(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];(!y||y.__srcErrorMap!==g)&&(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=nO(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&mO(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&hO(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return OO(e.validate)?DO[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function NO(e){return e?mO(e)?{formError:NO(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function PO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var FO=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...kO,isTouched:e.fieldMetaBase[this.name]?.isTouched??kO.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??kO.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??kO.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(hO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,vO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,vO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,vO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,vO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,vO(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=fO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||TO}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=fO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;ZD(()=>{let e=(e,n)=>{let r=LO(n.cause),a=n.validate?IO(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=_O({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=LO(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=pO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||TO}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=pO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));ZD(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=LO(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=IO(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=_O({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),ZD(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>wO(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[LO(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[LO(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)a.get(t)&&!t.options.asyncAlways||c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>DO.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>DO.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)wO(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=nO(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...kO,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!hO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return OO(e.validate)?DO[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function IO(e){if(e)return e}function LO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function RO(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function ohe(e){return{...kO,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var zO=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??RO({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(hO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...kO,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??RO({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;VO(t)&&(n=t.group,r=t.fields);let i=BO(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:RO({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,vO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof FO&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&wO(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=gO({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=kO)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=fO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||TO}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=fO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;ZD(()=>{let t=(t,r)=>{let i=UO(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&VO(s)&&(c=s.group,l=s.fields);let u=BO(c),d=n[i],{newErrorValue:f,newSource:p}=_O({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=UO(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=pO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||TO}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=pO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||TO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=UO(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&VO(o)&&(l=o.group,u=o.fields);let d=BO(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=_O({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return ZD(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>wO(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[UO(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>wO(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),ZD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid()){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}ZD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),ZD(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=nO(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??ohe(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!hO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(OO(e.validate)){let t=DO[e.type](e.value,e.validate);return e.type===`validate`?HO(t):t.then(HO)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function BO(e){if(e)return e}function VO(e){return!!e&&typeof e==`object`&&`fields`in e}function HO(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function UO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function WO(e,t){if(!t)return;let n=Object.assign({},e,{state:CO(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return ZD(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var GO=o((e=>{var t=un();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),KO=o(((e,t)=>{t.exports=GO()})),qO=o((e=>{var t=un(),n=KO();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),JO=o(((e,t)=>{t.exports=qO()}))();function YO(e,t){return e===t}function XO(e,t=e=>e,n){let r=n?.compare??YO,i=(0,I.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,I.useCallback)(()=>e.get(),[e]);return(0,JO.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var ZO=typeof window<`u`?I.useLayoutEffect:I.useEffect;function QO(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new FO({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new FO({...e}),i(a),n({form:e.form,name:e.name}));let o=XO(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=XO(a.store,e=>e.meta.isTouched),c=XO(a.store,e=>e.meta.isBlurred),l=XO(a.store,e=>e.meta.isDirty),u=XO(a.store,e=>e.meta.errorMap),d=XO(a.store,e=>e.meta.errorSourceMap),f=XO(a.store,e=>e.meta.isValidating),p=(0,I.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return ZO(a.mount,[a]),ZO(()=>{a.update(e)}),p}var $O=(({children:e,...t})=>{let n=QO(t),r=(0,I.useMemo)(()=>iO(e,n),[e,n]);return(0,F.jsx)(F.Fragment,{children:r})});function ek(){return(0,I.useState)(()=>SO())[0]}var tk=I,nk=`18.3.1`.split(`.`)[0]===`17`?ek:tk.useId;function rk(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new zO({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new zO({...e})),n({form:e.form,name:e.name}));let a=XO(r.store,e=>e.value),o=XO(r.store,e=>e.meta.isTouched),s=XO(r.store,e=>e.meta.isBlurred),c=XO(r.store,e=>e.meta.isDirty),l=XO(r.store,e=>e.meta.errorMap),u=XO(r.store,e=>e.meta.errorSourceMap),d=XO(r.store,e=>e.meta.isValidating),f=XO(r.store,e=>e.meta.isSubmitting),p=XO(r.store,e=>e.meta.isSubmitted),m=XO(r.store,e=>e.meta.submissionAttempts),h=XO(r.store,e=>e.meta.isSubmitSuccessful),g=XO(r.store,e=>e.meta.canSubmit),_=XO(r.store,e=>e.meta.isValid),v=XO(r.store,e=>e.meta.isFieldsValid),y=XO(r.store,e=>e.meta.isFieldsValidating),b=XO(r.store,e=>e.meta.isGroupValid),x=(0,I.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:v,isFieldsValidating:y,isGroupValid:b}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]);return ZO(r.mount,[r]),ZO(()=>{r.update(e)}),x}var ik=(({children:e,...t})=>{let n=rk(t),r=(0,I.useMemo)(()=>iO(e,n),[e,n]);return(0,F.jsx)(F.Fragment,{children:r})});function ak({form:e,selector:t=e=>e,children:n}){let r=XO(e.store,t);return(0,F.jsx)(F.Fragment,{children:iO(n,r)})}function ok(e){let t=nk(),[n,r]=(0,I.useState)(e?.formId),[i,a]=(0,I.useState)(()=>new MO({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new MO({...e,formId:n})),r(n)}let o=(0,I.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,F.jsx)($O,{...e,form:i})},e.FormGroup=function(e){return(0,F.jsx)(ik,{...e,form:i})},e.Subscribe=function(e){return(0,F.jsx)(ak,{form:i,selector:e.selector,children:e.children})},e},[i]);ZO(i.mount,[]),ZO(()=>{i.update(e)});let s=(0,I.useRef)(!1);return ZO(()=>{s.current&&e?.transform&&WO(i,e.transform)},[i,e?.transform]),ZO(()=>{s.current=!0}),o}var sk=xb(jb),ck=xb(R({message:jb}));function lk(e){for(let t of e.errors){let e=Km(Wm(Nne(ck(t),e=>e.message),()=>sk(t)));if(e!==void 0&&e.length>0)return e}}var uk=(0,I.forwardRef)(function({children:e,className:t,optional:n,required:r,...i},a){return(0,F.jsxs)(`label`,{...i,className:Dd(`label caps-label cursor-pointer justify-start gap-sm text-sm font-semibold text-base-content`,t),ref:a,children:[e,r?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`text-error`,children:`*`}):null,n&&!r?(0,F.jsx)(`span`,{className:`caps-label-optional`,children:`Optional`}):null]})}),dk=(0,I.forwardRef)(function({children:e,className:t,...n},r){return(0,F.jsx)(`div`,{...n,className:Dd(`caps-input-group join flex w-full items-stretch [&>*]:join-item [&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>.btn]:shrink-0 [&>.input]:min-w-0 [&>.input]:flex-1 [&>.select]:min-w-0 [&>.select]:flex-1`,t),ref:r,children:I.Children.map(e,e=>(0,I.isValidElement)(e)?(0,I.cloneElement)(e,{className:Dd(`join-item caps-input-group-control`,e.props.className)}):e)})}),fk=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`div`,{...t,className:Dd(`join-item flex items-center border border-base-300 bg-base-200 px-md text-sm text-base-content`,e),ref:n})});function pk(e){let t=e.parentElement;if(!t||e.previousElementSibling===null)return 0;let n=getComputedStyle(t);if(!(n.display.includes(`grid`)||n.display.includes(`flex`)&&n.flexDirection.startsWith(`column`)))return 0;let r=Number.parseFloat(n.rowGap);return Number.isFinite(r)?r:0}(0,I.forwardRef)(function({show:e,appear:t=!1,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=Hd(),[c,l]=(0,I.useState)(e),u=(0,I.useRef)(!0);return e&&!c&&l(!0),(0,I.useLayoutEffect)(()=>{let n=o.current,r=u.current;if(u.current=!1,!n||r&&!t)return;if(!Bd(n)){e||l(!1);return}let i=Fd(n),a=`translateY(${String(i.distance)}px)`,c=zd(i,i.ease),d=n.getBoundingClientRect().height,f=pk(n),p=(e,t)=>{n.style.overflow=`clip`;let r=e=>({height:`${String(e)}px`,marginBlockStart:`${String(e===0?-f:0)}px`}),a=n.animate([r(e),r(t)],{duration:i.normal,easing:c}),o=()=>{n.style.removeProperty(`overflow`)};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a};if(e){let e=[n.animate([{opacity:0,transform:a},{opacity:1,transform:`none`}],{duration:i.normal,easing:c})];return!s&&d>0&&e.push(p(0,d)),()=>{for(let t of e)t.cancel()}}let m=n.animate([{opacity:1,transform:`none`},{opacity:0,transform:a}],{duration:i.fast,easing:zd(i,i.easeExit),fill:`forwards`}),h=!s&&d>0?p(d,0):m;return h!==m&&h.effect?.updateTiming({fill:`forwards`}),h.addEventListener(`finish`,()=>{l(!1)}),()=>{m.cancel(),h.cancel()}},[e,t,s]),c?(0,F.jsx)(`div`,{...i,ref:o,className:Dd(`caps-presence`,r),"data-present":e,"aria-hidden":!e||void 0,children:n}):null});var mk=(0,I.forwardRef)(function({open:e,children:t,className:n,...r},i){return(0,F.jsx)(`div`,{...r,ref:i,className:Dd(`caps-collapse`,n),"data-open":e,"aria-hidden":!e||void 0,children:(0,F.jsx)(`div`,{className:`caps-collapse-clip`,children:t})})});(0,I.forwardRef)(function({swapKey:e,anchor:t=`start`,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=Hd(),[c,l]=(0,I.useState)({key:e,content:n}),[u,d]=(0,I.useState)([]);c.key===e?c.content!==n&&l({key:e,content:n}):(d([...u.filter(t=>t.key!==e&&t.key!==c.key),c]),l({key:e,content:n}));let f=(0,I.useRef)(null);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||!(`ResizeObserver`in globalThis))return;f.current=e.getBoundingClientRect();let t=new ResizeObserver(()=>{e.getAnimations().length===0&&(f.current=e.getBoundingClientRect())});return t.observe(e),()=>{t.disconnect()}},[]),(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=[...e.querySelectorAll(`:scope > [data-swap-leaving]`)],n=e.querySelector(`:scope > [data-swap-current]`);if(n===null||t.length===0)return;if(!Bd(e)){d([]);return}let r=f.current,i=e.getBoundingClientRect(),a=Fd(e),c=[n.animate([{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(a.distance/2)}px)`},{opacity:1,filter:`blur(0px)`,transform:`none`}],{duration:a.normal,easing:zd(a,a.ease)})];for(let e of t){let t=e.animate([{opacity:1,filter:`blur(0px)`,transform:`none`},{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(-a.distance/2)}px)`}],{duration:a.fast,easing:zd(a,a.easeExit),fill:`forwards`}),n=e.dataset.swapLeaving;t.onfinish=()=>{d(e=>e.filter(e=>e.key!==n))},c.push(t)}let l=r!==null&&(Math.abs(r.height-i.height)>.5||Math.abs(r.width-i.width)>.5);return!s&&l&&c.push(e.animate([{width:`${String(r.width)}px`,height:`${String(r.height)}px`},{width:`${String(i.width)}px`,height:`${String(i.height)}px`}],{duration:a.normal,easing:zd(a,a.ease)})),()=>{for(let e of c)e.cancel()}},[e,s]),(0,F.jsx)(`div`,{...i,ref:o,className:Dd(`caps-swap`,r),"data-anchor":t,children:[...u.map(e=>(0,F.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-leaving":e.key,"aria-hidden":`true`,children:e.content},e.key)),(0,F.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-current":``,children:n},e)]})});function hk({children:e,...t}){let[n,r]=(0,I.useState)(e);return e&&e!==n&&r(e),(0,F.jsx)(mk,{...t,className:Dd(`caps-field-error-reveal`,t.className),open:!!e,children:(0,F.jsx)(`div`,{className:`caps-field-error`,role:`alert`,"aria-hidden":!e,children:n})})}function gk({children:e,divider:t=!0,error:n,layout:r=`end`,status:i,...a}){return(0,F.jsxs)(`footer`,{...a,className:Dd(`caps-form-footer`,a.className),"data-divider":t,"data-layout":r,children:[(0,F.jsx)(hk,{children:n}),(0,F.jsxs)(`div`,{className:`caps-form-footer-row`,children:[i?(0,F.jsx)(`div`,{className:`caps-form-footer-status`,role:`status`,children:i}):null,(0,F.jsx)(`div`,{className:`caps-form-footer-actions`,children:e})]})]})}var _k=(0,I.forwardRef)(function({busy:e=!1,children:t,className:n,layout:r,...i},a){return(0,F.jsx)(`form`,{...i,"aria-busy":e||void 0,className:Dd(`caps-form`,n),"data-layout":r,ref:a,children:(0,F.jsx)(`fieldset`,{className:`caps-form-body`,disabled:e,children:t})})}),vk={2:`h2`,3:`h3`,4:`h4`},yk=(0,I.forwardRef)(function({children:e,className:t,description:n,layout:r,level:i=3,title:a,...o},s){let c=(0,I.useId)(),l=vk[i];return(0,F.jsxs)(`section`,{...o,"aria-labelledby":`${c}-title`,className:Dd(`caps-form-section`,t),"data-layout":r,ref:s,children:[(0,F.jsxs)(`header`,{className:`caps-form-section-copy`,children:[(0,F.jsx)(l,{className:`caps-form-section-title`,id:`${c}-title`,children:a}),n?(0,F.jsx)(`p`,{className:`caps-form-section-description`,children:n}):null]}),(0,F.jsx)(`div`,{className:`caps-form-section-fields`,children:e})]})}),bk=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,layout:a,legend:o,legendTitle:s,...c},l){let u=(0,I.useId)(),d=[n?`${u}-description`:c[`aria-describedby`],r?`${u}-error`:null].filter(Boolean).join(` `)||void 0;return(0,F.jsxs)(`fieldset`,{...c,"aria-describedby":d,"aria-invalid":r?!0:c[`aria-invalid`],className:Dd(`caps-fieldset`,t),"data-layout":a,ref:l,children:[(0,F.jsxs)(`legend`,{className:`caps-fieldset-legend`,title:s,children:[i?(0,F.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}):null,o]}),n?(0,F.jsx)(`p`,{className:`caps-fieldset-description`,id:`${u}-description`,children:n}):null,(0,F.jsx)(`div`,{className:`caps-fieldset-fields`,children:e}),r===void 0?null:(0,F.jsx)(hk,{id:`${u}-error`,children:r})]})});function xk(e){let t=[];return I.Children.forEach(e.props.children,e=>{(0,I.isValidElement)(e)&&e.type!==fk&&t.push(e)}),t[0]??null}var Sk=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,label:a,labelTitle:o,optional:s,orientation:c=`vertical`,readout:l=!1,required:u,...d},f){let p=(0,I.useId)(),m=(0,I.isValidElement)(e)?e:null,h=m?.type===dk,g=h?xk(m):m,_=g?.props.id??p,v=`${_}-description`,y=`${_}-error`,b=[g?.props[`aria-describedby`],n?v:null,r?y:null].filter(Boolean).join(` `)||void 0,x=u===!0||g?.props.required,S=r?!0:g?.props[`aria-invalid`],C=u===!0||g?.props[`aria-required`],w={id:_};x!==void 0&&(w.required=x),b!==void 0&&(w[`aria-describedby`]=b),S!==void 0&&(w[`aria-invalid`]=S),C!==void 0&&(w[`aria-required`]=C);let T=m&&g&&!l?h?(0,I.cloneElement)(m,void 0,I.Children.map(m.props.children,e=>e===g?(0,I.cloneElement)(g,w):e)):(0,I.cloneElement)(m,w):e,E=a?(0,F.jsx)(uk,{htmlFor:l?void 0:_,title:o,className:c===`inline`?`font-normal`:void 0,...u===void 0?{}:{required:u},...s===void 0?{}:{optional:s},children:a}):null,D=a||n?(0,F.jsxs)(`div`,{className:`caps-field-copy`,children:[E,n?(0,F.jsx)(`p`,{className:`caps-field-description`,id:v,children:n}):null]}):null,O=i?(0,F.jsxs)(`div`,{className:`caps-field-lead`,children:[(0,F.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}),D]}):D;return(0,F.jsxs)(`div`,{...d,className:Dd(`caps-field`,t),"data-orientation":c,ref:f,children:[c===`horizontal`?(0,F.jsxs)(`div`,{className:`caps-field-row`,children:[O,T]}):c===`inline`?(0,F.jsxs)(`div`,{className:`caps-field-row`,children:[T,O]}):(0,F.jsxs)(F.Fragment,{children:[O,T]}),(0,F.jsx)(hk,{id:y,children:r})]})});function Ck(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}var wk=`M 9.86 38.14 A 20 20 0 1 1 38.14 38.14`,Tk=6,Ek=new Map([[`ArrowUp`,1],[`ArrowDown`,-1],[`PageUp`,10],[`PageDown`,-10]]),Dk=(0,I.forwardRef)(function({className:e,decrementLabel:t=`Decrease`,defaultValue:n=null,disabled:r,incrementLabel:i=`Increase`,invalid:a,max:o,min:s,onBlur:c,onKeyDown:l,onValueChange:u,step:d=1,unit:f,value:p,wrap:m=!1,...h},g){let[_,v]=(0,I.useState)(n),[y,b]=(0,I.useState)(null),x=p===void 0?_:p,S=Ck(d),C=e=>{let t=Number(e.toFixed(S));return s!==void 0&&t<s?s:o!==void 0&&t>o?o:t},w=e=>{let t=e===null?null:C(e);v(t),b(null),t!==x&&u?.(t)},T=()=>{if(y===null)return;let e=Number(y);w(y.trim()===``||!Number.isFinite(e)?null:e)},E=e=>{let t=(x??s??0)+e*d;if(m&&s!==void 0&&o!==void 0){if(t>o){w(s);return}if(t<s){w(o);return}}w(t)},D=s!==void 0&&x!==null&&x<=s,O=o!==void 0&&x!==null&&x>=o,k=r===!0,A=(0,I.useRef)(null),j=s!==void 0&&o!==void 0&&o>s?((x??s)-s)/(o-s):null,M=e=>{k||(e.currentTarget.setPointerCapture(e.pointerId),A.current={y:e.clientY,value:x??s??0})},N=e=>{if(!A.current)return;let t=Math.trunc((A.current.y-e.clientY)/Tk),n=C(A.current.value+t*d);n!==x&&w(n)},P=()=>{A.current=null};return(0,F.jsxs)(`span`,{className:Dd(`caps-number-field`,e),"data-at-max":O||void 0,"data-at-min":D||void 0,"data-disabled":k||void 0,"data-wrap":m||void 0,children:[j===null?null:(0,F.jsxs)(`svg`,{className:`caps-number-field-dial`,viewBox:`0 0 48 48`,"aria-hidden":`true`,focusable:`false`,onPointerDown:M,onPointerMove:N,onPointerUp:P,onPointerCancel:P,children:[(0,F.jsx)(`path`,{className:`caps-number-field-dial-track`,d:wk,pathLength:100}),(0,F.jsx)(`path`,{className:`caps-number-field-dial-level`,d:wk,pathLength:100,strokeDasharray:`${String(Math.max(.5,j*100))} 100`})]}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-decrement`,"aria-label":t,"aria-controls":h.id,tabIndex:-1,disabled:k||D&&!m,onClick:()=>{E(-1)},children:(0,F.jsx)(sr,{"aria-hidden":`true`})}),(0,F.jsxs)(`span`,{className:`caps-number-field-readout`,children:[(0,F.jsx)(`input`,{...h,"aria-invalid":a?!0:h[`aria-invalid`]===!1?void 0:h[`aria-invalid`],className:`input caps-input caps-number-field-input`,disabled:r,inputMode:h.inputMode??(S>0?`decimal`:`numeric`),max:o,min:s,onBlur:e=>{T(),c?.(e)},onChange:e=>{b(e.target.value)},onKeyDown:e=>{if(l?.(e),e.defaultPrevented)return;let t=Ek.get(e.key);t===void 0?e.key===`Home`&&s!==void 0?(e.preventDefault(),w(s)):e.key===`End`&&o!==void 0?(e.preventDefault(),w(o)):e.key===`Enter`&&T():(e.preventDefault(),E(t))},ref:g,step:d,type:`number`,value:y??(x===null?``:String(x))}),f?(0,F.jsx)(`span`,{className:`caps-number-field-unit`,"aria-hidden":`true`,children:f}):null]}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-increment`,"aria-label":i,"aria-controls":h.id,tabIndex:-1,disabled:k||O&&!m,onClick:()=>{E(1)},children:(0,F.jsx)(cr,{"aria-hidden":`true`})})]})}),Ok={neutral:`progress-neutral`,primary:`progress-primary`,secondary:`progress-secondary`,accent:`progress-accent`,success:`progress-success`,info:`progress-info`,warning:`progress-warning`,error:`progress-error`},kk=(0,I.forwardRef)(function({className:e,tone:t=`primary`,...n},r){return(0,F.jsx)(`progress`,{...n,"data-complete":n.value!==void 0&&Number(n.value)>=Number(n.max??1)?`true`:void 0,className:Dd(`progress caps-gooey-motion caps-gooey-progress w-full`,Ok[t],e),ref:r})});(0,I.forwardRef)(function({label:e,value:t,max:n,tone:r=`info`,className:i,...a},o){return(0,F.jsxs)(`div`,{...a,ref:o,className:Dd(`caps-game-meter`,i),children:[(0,F.jsxs)(`div`,{className:`caps-game-meter-readout`,children:[(0,F.jsx)(`span`,{children:e}),(0,F.jsxs)(`span`,{className:`caps-game-meter-value`,children:[t,` / `,n]})]}),(0,F.jsx)(kk,{"aria-label":e,value:t,max:n,tone:r})]})});function Ak({className:e,items:t,onCancel:n,onRemove:r,onRetry:i,rowClassName:a}){return t.length?(0,F.jsx)(`div`,{"aria-live":`polite`,className:`caps-upload-queue flex w-full min-w-0 flex-col gap-sm ${e??``}`,"data-upload-rows":!0,children:t.map(e=>(0,F.jsx)(Nk,{item:e,onCancel:n,onRemove:r,onRetry:i,...a===void 0?{}:{rowClassName:a}},e.id))}):null}function jk({action:e,id:t,onAction:n,retry:r=!1}){return e?(0,F.jsx)(RD,{"aria-label":e.accessibleLabel,title:e.label,variant:`ghost`,size:`xs`,className:`motion-reduce:transition-none`,icon:r?(0,F.jsx)(ur,{}):(0,F.jsx)(dr,{}),onClick:()=>void n(t),type:`button`}):null}function Mk({item:e}){return(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsx)(`span`,{className:`block min-w-0 truncate`,title:e.name,children:e.name}),(0,F.jsx)(`div`,{className:`caps-upload-details`,children:(0,F.jsxs)(`span`,{"aria-live":e.alert?`assertive`:void 0,className:`caps-upload-status min-w-0 break-words`,"data-upload-status":!0,role:e.alert?`alert`:void 0,children:[e.alert??e.statusLabel,` `,e.progressLabel]})})]})}function Nk({item:e,onCancel:t,onRemove:n,onRetry:r,rowClassName:i}){return(0,F.jsxs)(`div`,{className:`caps-upload-row grid w-full min-w-0 max-w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-sm p-sm text-xs ${i??``}`,children:[e.preview.kind===`image`?(0,F.jsx)(`img`,{alt:``,className:`caps-upload-preview mask mask-squircle size-8 shrink-0 object-cover`,src:e.preview.url}):(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`caps-upload-preview mask mask-squircle flex size-8 shrink-0 items-center justify-center bg-base-300`,children:(0,F.jsx)(or,{className:`size-4`})}),(0,F.jsx)(Mk,{item:e}),(0,F.jsx)(Pk,{actions:e.actions,id:e.id,onCancel:t,onRemove:n,onRetry:r}),(0,F.jsx)(kk,{"aria-label":`${e.name} progress`,className:`caps-upload-progress`,tone:e.alert?`error`:e.progress===100?`success`:`accent`,max:100,value:e.progress??(e.alert?0:void 0)})]})}function Pk({actions:e,id:t,onCancel:n,onRemove:r,onRetry:i}){return(0,F.jsxs)(`div`,{className:`caps-upload-actions flex min-w-0 flex-wrap justify-end gap-xs`,children:[(0,F.jsx)(jk,{action:e.retry,id:t,onAction:i,retry:!0}),(0,F.jsx)(jk,{action:e.cancel,id:t,onAction:n}),(0,F.jsx)(jk,{action:e.remove,id:t,onAction:r})]})}var Fk={unchecked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,checked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,mixed:`M3.4 6 L6 6 L8.6 6`},Ik={blurStdDeviation:.22,alphaSlope:18,alphaIntercept:-8};function Lk({state:e}){let t=`caps-checkbox-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=Hd();return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=e!==`unchecked`,r=i.current!==`unchecked`,o=a||i.current===e;i.current=e;let s=Fd(n.current),c=pm(s,{ease:`inCubic`,duration:160}),l=Qp(n.current,{d:{to:Fk[e],...o?dm:pm(s,{ease:`outCubic`,duration:200})},"stroke-dashoffset":{to:+!t,...o?dm:t?pm(s,{ease:`inOutSine`,duration:260}):c},"stroke-width":o?{to:t?2.4:0,duration:0}:t&&!r?[{to:2.2,...pm(s,{ease:`outCubic`,duration:65})},{to:2.4,delay:Rd(s,120),...fm(s,{bounce:.35,duration:220})}]:{to:t?2.4:0,...c}});return()=>{l.cancel()}},[e,a]),(0,F.jsxs)(`svg`,{className:`caps-checkbox-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,F.jsx)(nm,{id:`${t}-shadow`}),(0,F.jsx)(rm,{id:`${t}-inset`}),(0,F.jsx)(am,{id:`${t}-goo`,values:Ik}),(0,F.jsxs)(`filter`,{id:`${t}-relief`,x:`-25%`,y:`-25%`,width:`150%`,height:`150%`,colorInterpolationFilters:`sRGB`,children:[(0,F.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.28`,result:`relief`}),(0,F.jsx)(`feSpecularLighting`,{in:`relief`,surfaceScale:`1.2`,specularConstant:`0.55`,specularExponent:`18`,lightingColor:`color-mix(in srgb, var(--color-white) calc(var(--depth) * 100%), var(--color-black))`,result:`light`,children:(0,F.jsx)(`feDistantLight`,{azimuth:`225`,elevation:`55`})}),(0,F.jsx)(`feComposite`,{in:`light`,in2:`SourceAlpha`,operator:`in`,result:`clipped-light`}),(0,F.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`clipped-light`,mode:`screen`})]}),(0,F.jsx)(`mask`,{id:`${t}-contour`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`12`,height:`12`,style:{maskType:`alpha`},children:(0,F.jsx)(`path`,{ref:n,d:Fk[r],fill:`none`,stroke:`var(--color-white)`,strokeWidth:r===`unchecked`?0:2.4,pathLength:`1`,strokeDasharray:`1`,strokeDashoffset:+(r===`unchecked`),strokeLinecap:`round`,strokeLinejoin:`round`,filter:e===`mixed`?void 0:`url(#${t}-goo)`})}),(0,F.jsx)(`clipPath`,{id:`${t}-well`,children:(0,F.jsx)(`rect`,{x:`1`,y:`1`,width:`10`,height:`10`,rx:`2.5`})})]}),(0,F.jsx)(`rect`,{className:`caps-checkbox-track`,x:`0.5`,y:`0.5`,width:`11`,height:`11`,rx:`3`,filter:`url(#${t}-inset)`}),(0,F.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,F.jsx)(`g`,{filter:`url(#${t}-shadow)`,children:(0,F.jsx)(`g`,{filter:`url(#${t}-relief)`,children:(0,F.jsx)(`g`,{mask:`url(#${t}-contour)`,children:(0,F.jsx)(`rect`,{x:`0`,y:`0`,width:`12`,height:`12`,fill:`url(#${t}-surface)`})})})})})]})}var Rk=(0,I.forwardRef)(function({className:e,appearance:t,indicator:n,invalid:r,indeterminate:i=!1,checked:a,defaultChecked:o=!1,onChange:s,...c},l){let u=(0,I.useRef)(null),[d,f]=(0,I.useState)(o),p=a??d,m=i?`mixed`:p?`checked`:`unchecked`;return(0,I.useImperativeHandle)(l,()=>{if(!u.current)throw Error(`Checkbox input is not mounted`);return u.current},[]),(0,I.useLayoutEffect)(()=>{u.current&&(u.current.indeterminate=i)},[i]),(0,I.useEffect)(()=>{let e=u.current?.form;if(!e||a!==void 0)return;let t=e=>{queueMicrotask(()=>{!e.defaultPrevented&&u.current&&f(o)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[a,o,c.form]),(0,F.jsxs)(`span`,{className:`caps-checkbox`,"data-appearance":t===`compact`?t:void 0,"data-state":m,"data-custom-indicator":n!==void 0||void 0,children:[(0,F.jsx)(`input`,{...c,checked:p,"aria-checked":i?`mixed`:p,"aria-invalid":r?!0:c[`aria-invalid`]===!1?void 0:c[`aria-invalid`],className:Dd(`caps-checkbox-input`,e),onChange:e=>{a===void 0&&f(e.target.checked),s?.(e),e.currentTarget.indeterminate=i},ref:u,type:`checkbox`}),n===void 0?(0,F.jsx)(Lk,{state:m}):n]})}),zk=Rfe({keyCode:Bfe(229)});function Bk(e){return e.nativeEvent.isComposing||_i(zk,e.nativeEvent).success}var Vk={};function Hk(e,t){let n=I.useRef(Vk);return n.current===Vk&&(n.current=e(t)),n}var Uk=[],Wk=void 0;function Gk(){return Wk}function Kk(e){Uk.push(e)}function qk(e){let t=(t,n)=>{let r=Hk(Yk).current,i;try{Wk=r;for(let e of Uk)e.before(r);i=e(t,n);for(let e of Uk)e.after(r);r.didInitialize=!0}finally{Wk=void 0}return i};return t.displayName=e.displayName||e.name,t}function Jk(e){return I.forwardRef(qk(e))}function Yk(){return{didInitialize:!1}}function Xk(){}var Zk=Object.freeze([]),Qk=Object.freeze({});function $k(e){I.useEffect(e,Zk)}var eA=0,tA=class e{static create(){return new e}currentId=eA;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=eA,t()},e)}isStarted(){return this.currentId!==eA}clear=()=>{this.currentId!==eA&&(clearTimeout(this.currentId),this.currentId=eA)};disposeEffect=()=>this.clear};function nA(){let e=Hk(tA.create).current;return $k(e.disposeEffect),e}var rA=typeof document<`u`?I.useLayoutEffect:()=>{};function iA(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:she,platform:che,maxTouchPoints:lhe}=iA(),aA=she.toLowerCase(),oA=che.toLowerCase(),sA=/^i(os$|p)/.test(oA)||oA===`macintel`&&lhe>1,cA=`android`,lA=oA===cA||aA.includes(cA),uhe=!sA&&oA.startsWith(`mac`);oA.startsWith(`win`),!lA&&/^(linux|chrome os)/.test(oA);var dhe=uhe||sA,uA=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!uA&&aA.includes(`firefox`),!uA&&aA.includes(`chrom`);var fhe=dhe,phe=/jsdom|happydom/.test(aA);function mhe(e){e.preventDefault(),e.stopPropagation()}function hhe(e){return`nativeEvent`in e}function dA(e){return e.pointerType===``&&e.isTrusted?!0:lA&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function fA(e){return phe?!1:!lA&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(lA||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function pA(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function ghe(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function mA(){return typeof window<`u`}function hA(e){return vA(e)?(e.nodeName||``).toLowerCase():`#document`}function gA(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _A(e){return((vA(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function vA(e){return mA()?e instanceof Node||e instanceof gA(e).Node:!1}function yA(e){return mA()?e instanceof Element||e instanceof gA(e).Element:!1}function bA(e){return mA()?e instanceof HTMLElement||e instanceof gA(e).HTMLElement:!1}function xA(e){return!mA()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof gA(e).ShadowRoot}function SA(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=kA(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function _he(e){return/^(table|td|th)$/.test(hA(e))}function CA(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var vhe=/transform|translate|scale|rotate|perspective|filter/,yhe=/paint|layout|strict|content/,wA=e=>!!e&&e!==`none`,TA;function EA(e){let t=yA(e)?kA(e):e;return wA(t.transform)||wA(t.translate)||wA(t.scale)||wA(t.rotate)||wA(t.perspective)||!DA()&&(wA(t.backdropFilter)||wA(t.filter))||vhe.test(t.willChange||``)||yhe.test(t.contain||``)}function bhe(e){let t=jA(e);for(;bA(t)&&!OA(t);){if(EA(t))return t;if(CA(t))return null;t=jA(t)}return null}function DA(){return TA??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),TA}function OA(e){return/^(html|body|#document)$/.test(hA(e))}function kA(e){return gA(e).getComputedStyle(e)}function AA(e){return yA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jA(e){if(hA(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||xA(e)&&e.host||_A(e);return xA(t)?t.host:t}function MA(e){let t=jA(e);return OA(t)?(e.ownerDocument||e).body:bA(t)&&SA(t)?t:MA(t)}function NA(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=MA(e),i=r===e.ownerDocument?.body,a=gA(r);if(i){let e=PA(a);return t.concat(a,a.visualViewport||[],SA(r)?r:[],e&&n?NA(e):[])}return t.concat(r,NA(r,[],n))}function PA(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function FA(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function IA(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&xA(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function LA(e,t){let n=e;for(;n;){if(yA(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(xA(n)?n.host:null)}return null}function RA(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var xhe=`data-base-ui-focusable`,She=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,zA=`data-starting-style`,Che=`data-ending-style`,whe={[zA]:``},The={[Che]:``},Ehe={transitionStatus(e){return e===`starting`?whe:e===`ending`?The:null}},Dhe=`data-open`,Ohe=`data-closed`,khe=`data-anchor-hidden`,BA=`data-popup-open`,Ahe=`data-pressed`,jhe={[BA]:``},Mhe={[BA]:``,[Ahe]:``},Nhe={[Dhe]:``},Phe={[Ohe]:``},Fhe={[khe]:``},Ihe={open(e){return e?jhe:null}},Lhe={open(e){return e?Mhe:null}},VA={open(e){return e?Nhe:Phe},anchorHidden(e){return e?Fhe:null}},Rhe={...VA,...Ehe},HA=`data-trigger-disabled`;function UA(e,t){if(!yA(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(HA);for(let[,e]of t.entries())if(IA(e,n))return!e.hasAttribute(HA);return!1}function WA(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function zhe(e){return e.matches(`html,body`)}function GA(e){return bA(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Bhe(e){return LA(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${She}`)!=null}function KA(e){return e?e.getAttribute(`role`)===`combobox`&&GA(e):!1}function qA(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function Vhe(e,t){return t!=null&&!pA(t)?0:typeof e==`function`?e():e}function JA(e,t,n){let r=Vhe(e,n);return typeof r==`number`?r:r?.[t]}function YA(e){return typeof e==`function`?e():e}function XA(e,t){return t||e===`click`||e===`mousedown`}function Hhe(e){return e?.includes(`mouse`)&&e!==`mousedown`}function ZA(e,t,n,r){let i=!1,a=!1,o=r??Qk;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var Uhe=`none`,QA=`trigger-press`,$A=`trigger-hover`,Whe=`outside-press`,ej=`focus-out`,Ghe=`escape-key`,Khe=`imperative-action`;function tj(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function nj(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function rj(e,t,n,r){let i=Hk(ij).current;return Jhe(i,e,t,n,r)&&aj(i,[e,t,n,r]),i.callback}function qhe(e){let t=Hk(ij).current;return Yhe(t,e)&&aj(t,e),t.callback}function ij(){return{callback:null,cleanup:null,refs:[]}}function Jhe(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Yhe(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function aj(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function oj(e){let t=Hk(Xhe,e).current;return t.next=e,rA(t.effect),t}function Xhe(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var sj={...I},cj=sj.useInsertionEffect,Zhe=cj&&cj!==sj.useLayoutEffect?cj:e=>e();function lj(e){let t=Hk(Qhe).current;return t.next=e,Zhe(t.effect),t.trampoline}function Qhe(){let e={next:void 0,callback:$he,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $he(){}var uj=null;globalThis.requestAnimationFrame;var dj=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},fj=class e{static create(){return new e}static request(e){return dj.request(e)}static cancel(e){return dj.cancel(e)}currentId=uj;request(e){this.cancel(),this.currentId=dj.request(()=>{this.currentId=uj,e()})}cancel=()=>{this.currentId!==uj&&(dj.cancel(this.currentId),this.currentId=uj)};disposeEffect=()=>this.cancel};function pj(){let e=Hk(fj.create).current;return $k(e.disposeEffect),e}function mj(e){return e?.ownerDocument||document}var hj={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},ege={...hj,position:`fixed`,margin:0,top:0,left:0};({...hj});var gj=I.forwardRef(function(e,t){let[n,r]=I.useState();rA(()=>{fhe&&uA&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,F.jsx)(`span`,{...e,ref:t,style:ege,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),_j=Math.min,vj=Math.max,yj=Math.round,bj=Math.floor,xj=e=>({x:e,y:e}),tge={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Sj(e,t,n){return vj(e,_j(t,n))}function Cj(e,t){return typeof e==`function`?e(t):e}function wj(e){return e.split(`-`)[0]}function Tj(e){return e.split(`-`)[1]}function Ej(e){return e===`x`?`y`:`x`}function Dj(e){return e===`y`?`height`:`width`}function Oj(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function kj(e){return Ej(Oj(e))}function nge(e,t,n){n===void 0&&(n=!1);let r=Tj(e),i=kj(e),a=Dj(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Nj(o)),[o,Nj(o)]}function rge(e){let t=Nj(e);return[Aj(e),t,Aj(t)]}function Aj(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var jj=[`left`,`right`],Mj=[`right`,`left`],ige=[`top`,`bottom`],age=[`bottom`,`top`];function oge(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Mj:jj:t?jj:Mj;case`left`:case`right`:return t?ige:age;default:return[]}}function sge(e,t,n,r){let i=Tj(e),a=oge(wj(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Aj)))),a}function Nj(e){let t=wj(e);return tge[t]+e.slice(t.length)}function cge(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Pj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:cge(e)}function Fj(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function lge(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ij(e,t=e?kA(e):null){return!e||!e.isConnected||!t||lge(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var uge=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function dge(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return xA(n)?n.host:null}function Lj(e){for(let t of Array.from(e.children))if(hA(t)===`summary`)return t;return null}function fge(e,t){let n=Lj(t);return!!n&&(e===n||IA(n,e))}function Rj(e){let t=e?hA(e):``;return e!=null&&e.matches(uge)&&(t!==`summary`||e.parentElement!=null&&hA(e.parentElement)===`details`&&Lj(e.parentElement)===e)&&(t!==`details`||Lj(e)==null)&&(t!==`input`||e.type!==`hidden`)}function zj(e){if(!Rj(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=dge(t)){let n=t!==e,r=hA(t)===`slot`;if(t.hasAttribute(`inert`)||n&&hA(t)===`details`&&!t.open&&!fge(e,t)||t.hasAttribute(`hidden`)||!r&&!pge(t,n))return!1}return!0}function pge(e,t){let n=kA(e);return t?n.display!==`none`:Ij(e,n)}function Bj(e){let t=e.tabIndex;if(t<0){let t=hA(e);if(t===`details`||t===`audio`||t===`video`||bA(e)&&e.isContentEditable)return 0}return t}function Vj(e){if(hA(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Hj(e,t){let n=Vj(e);if(!n)return!0;let r=t.find(e=>{let t=Vj(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Vj(e);return t?.name===n.name&&t.form===n.form})===n}function Uj(e){if(bA(e)&&hA(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return bA(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Wj(e,t){Uj(e).forEach(e=>{Rj(e)&&t.push(e),Wj(e,t)})}function Gj(e,t,n){Uj(e).forEach(e=>{bA(e)&&e.matches(t)&&n.push(e),Gj(e,t,n)})}function Kj(e){return zj(e)&&Bj(e)>=0}function qj(e){let t=[];return Wj(e,t),t.filter(zj)}function Jj(e){let t=qj(e);return t.filter(e=>Bj(e)>=0&&Hj(e,t))}function Yj(e,t){let n=Jj(e),r=n.length;if(r===0)return;let i=FA(mj(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Xj(e){return Yj(mj(e).body,1)||e}function Zj(e){return Yj(mj(e).body,-1)||e}function mge(e,t,n){if(!e)return null;let r=[];Wj(mj(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(zj);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!IA(n,o)&&Kj(o)&&Hj(o,a))return o}return r[i]}function Qj(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!IA(n,r)}function hge(e){Jj(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function $j(e){let t=[];Gj(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function eM(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...eM(e,t.id,n)])}function tM(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function nM(e){return`data-base-ui-${e}`}var rM=0;function iM(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(rM);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),Xk;let o=requestAnimationFrame(a);return rM=o,()=>{rM===o&&(cancelAnimationFrame(o),rM=0)}}var aM=`data-base-ui-inert`,oM=new WeakMap,sM=new WeakSet,cM=new WeakMap,lM=0;function uM(e){return e?xA(e)?e.host:uM(e.parentNode):null}var dM=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=uM(t);return e.contains(n)?n:null}).filter(e=>e!=null),fM=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},pM=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{hA(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function gge(e,t,n,{mark:r=!0}){let i=dM(t,e),a=r?pM(t,fM(i),new Set(i)):[],o=[],s=[];if(n){let e=dM(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);pM(t,fM(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(oM.get(e)||0)+1;oM.set(e,r),o.push(e),r===1&&n&&sM.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(cM.get(e)||0)+1;cM.set(e,t),s.push(e),t===1&&e.setAttribute(aM,``)}),lM+=1,()=>{o.forEach(e=>{let t=(oM.get(e)||0)-1;oM.set(e,t),t||(sM.has(e)||e.removeAttribute(`aria-hidden`),sM.delete(e))}),r&&s.forEach(e=>{let t=(cM.get(e)||0)-1;cM.set(e,t),t||e.removeAttribute(aM)}),--lM,lM||(oM=new WeakMap,sM=new WeakSet,cM=new WeakMap)}}function mM(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=mj(e[0]).body;return gge(e,i,n,{mark:r})}function hM(){let[,e]=I.useState({});return I.useCallback(()=>{e({})},[])}var gM=0;function _ge(e,t=`mui`){let n=I.useRef(void 0),r=hM(),i=e??n.current;return I.useEffect(()=>{n.current??(gM+=1,n.current=`${t}-${gM}`,e??r())},[e,t,r]),i}var _M=sj.useId;function vM(e,t){if(_M!==void 0){let n=_M();return e??(t?`${t}-${n}`:n)}return _ge(e,t)}var vge=18;function yM(e){return vge>=e}function bM(e){if(!I.isValidElement(e))return null;let t=e,n=t.props;return(yM(19)?n?.ref:t.ref)??null}function xM(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function yge(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function bge(e,t){return typeof e==`function`?e(t):e}function xge(e,t){return typeof e==`function`?e(t):e}var SM={};function CM(e,t,n,r,i){if(!n&&!r&&!i&&!e)return wM(t);let a=wM(e);return t&&(a=TM(a,t)),n&&(a=TM(a,n)),r&&(a=TM(a,r)),i&&(a=TM(a,i)),a}function Sge(e){if(e.length===0)return SM;if(e.length===1)return wM(e[0]);let t=wM(e[0]);for(let n=1;n<e.length;n+=1)t=TM(t,e[n]);return t}function wM(e){return DM(e)?{...e(SM)}:Cge(e)}function TM(e,t){return DM(t)?t(e):wge(e,t)}function Cge(e){let t={...e};for(let e in t){let n=t[e];EM(e,n)&&(t[e]=OM(n))}return t}function wge(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=xM(e.style,r);break;case`className`:e[n]=AM(e.className,r);break;default:e[n]=EM(n,r)?Tge(e[n],r):r}}return e}function EM(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function DM(e){return typeof e==`function`}function Tge(e,t){return t?e?(...n)=>{let r=n[0];if(jM(r)){let i=r;kM(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:OM(t):e}function OM(e){return e&&((...t)=>{let n=t[0];return jM(n)&&kM(n),e(...t)})}function kM(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function AM(e,t){return t?e?t+` `+e:t:e}function jM(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function MM(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=kge(r));let i=Ege(t,n,r);if(n.enabled===!1)return null;let a=n.state??Qk;return Age(e,r,i,a)}function Ege(e,t,n){let{className:r,style:i}=e,{state:a=Qk,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?bge(r,a):void 0,d=l?xge(i,a):void 0,f=l?yge(a,c):Qk,p=l&&s?Dge(s):void 0,m=l?xM(f,p)??{}:Qk;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?qhe([m.ref,bM(n),...o]):rj(m.ref,bM(n),o):rj(null,null)),l?(u!==void 0&&(m.className=AM(m.className,u)),d!==void 0&&(m.style=xM(m.style,d)),m):Qk}function Dge(e){return Array.isArray(e)?Sge(e):CM(void 0,e)}var Oge=Symbol.for(`react.lazy`);function kge(e){if(e?.$$typeof!==Oge)return e;let t=I.Children.toArray(e)[0];return I.isValidElement(t)?t:e}function Age(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=CM(n,t.props);return e.ref=n.ref,I.cloneElement(t,e)}return jge(e,n)}function jge(e,t){return e===`button`?(0,I.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,I.createElement)(`img`,{alt:``,...t,key:t.key}):I.createElement(e,t)}var Mge={style:{transition:`none`}},Nge=`data-base-ui-click-trigger`,Pge={fallbackAxisSide:`end`},Fge={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},NM=I.createContext(null),PM=()=>I.useContext(NM),Ige=nM(`portal`);function Lge(e={}){let{ref:t,container:n,componentProps:r=Qk,elementProps:i}=e,a=vM(),o=PM()?.portalNode,[s,c]=I.useState(null),[l,u]=I.useState(null),d=lj(e=>{e!==null&&u(e)}),f=I.useRef(null);rA(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(vA(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=MM(`div`,r,{ref:[t,d],props:[{id:a,[Ige]:``},i]}),m=s&&p?gn.createPortal(p,s):null;return{node:l,nodeId:I.isValidElement(p)?p.props.id:void 0,subtree:m}}var Rge=I.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Lge({container:o,ref:t,componentProps:e,elementProps:c}),f=I.useRef(null),p=I.useRef(null),m=I.useRef(null),h=I.useRef(null),[g,_]=I.useState(null),v=I.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;I.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Qj(e)&&(e.type===`focusin`?v.current&&=($j(l),!1):(hge(l),v.current=!0))}return nj(tj(l,`focusin`,e,!0),tj(l,`focusout`,e,!0))},[l,y]),rA(()=>{!l||b!==!0||!v.current||($j(l),v.current=!1)},[b,l]);let S=I.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,F.jsxs)(I.Fragment,{children:[d,(0,F.jsxs)(NM.Provider,{value:S,children:[x&&l&&(0,F.jsx)(gj,{"data-type":`outside`,ref:f,onFocus:e=>{Qj(e,l)?m.current?.focus():Zj(g?g.domReference:null)?.focus()}}),x&&l&&(0,F.jsx)(`span`,{role:s,"aria-owns":u,style:Fge}),l&&gn.createPortal(a,l),x&&l&&(0,F.jsx)(gj,{"data-type":`outside`,ref:p,onFocus:e=>{Qj(e,l)?h.current?.focus():(Xj(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,ZA(`focus-out`,e.nativeEvent)))}})]})]})});function FM(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var zge=class{nodesRef={current:[]};events=FM();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},IM=I.createContext(null),LM=I.createContext(null),RM=()=>I.useContext(IM)?.id||null,zM=e=>{let t=I.useContext(LM);return e??t};function Bge(e){let t=vM(),n=zM(e),r=RM();return rA(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Vge(e){let{children:t,id:n}=e,r=RM();return(0,F.jsx)(IM.Provider,{value:I.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Hge(e){let{children:t,externalTree:n}=e,r=Hk(()=>n??new zge).current;return(0,F.jsx)(LM.Provider,{value:r,children:t})}function BM(e){return e==null?e:`current`in e?e.current:e}function Uge(e,t){let n=gA(RA(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(dA(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Wge=20,VM=[];function HM(){VM=VM.filter(e=>e.deref()?.isConnected)}function UM(e){HM(),e&&hA(e)!==`body`&&(VM.push(new WeakRef(e)),VM.length>Wge&&(VM=VM.slice(-20)))}function WM(){return HM(),VM[VM.length-1]?.deref()}function Gge(e){return e?Kj(e)?e:Jj(e)[0]||e:null}function GM(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=qj(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Kj(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Kge(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=lj(()=>b.current.floatingContext?.nodeId),S=i===!1,C=KA(_)&&S,w=oj(i),T=oj(a),E=oj(o),D=oj(u),O=oj(g),k=zM(m),A=PM(),j=I.useRef(!1),M=I.useRef(!1),N=I.useRef(!1),P=I.useRef(null),ee=I.useRef(``),te=I.useRef(``),ne=I.useRef(null),re=I.useRef(null),ie=rj(ne,p,A?.beforeInsideRef),ae=rj(re,A?.afterInsideRef),oe=nA(),se=nA(),ce=pj(),le=A!=null,ue=qA(v),de=lj((e=ue)=>e?Jj(e):[]),fe=lj(()=>h?.().filter(e=>e!=null)??[]);I.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&IA(ue,FA(mj(ue)))&&de().length===0&&!C&&mhe(e)}return tj(mj(ue),`keydown`,e)},[r,ue,c,C,de]),I.useEffect(()=>{if(r||!g)return;let e=mj(ue);function t(){N.current=!1}function n(e){let t=RA(e),n=fe(),r=IA(v,t)||IA(_,t)||IA(A?.portalNode,t)||n.some(e=>e===t||IA(e,t));N.current=!r,te.current=e.pointerType||`keyboard`,LA(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,se.start(0,()=>{M.current=!1}))}function i(){te.current=`keyboard`}return nj(tj(e,`pointerdown`,n,!0),tj(e,`pointerup`,t,!0),tj(e,`pointercancel`,t,!0),tj(e,`keydown`,i,!0),t)},[r,v,_,ue,g,A,se,fe]),I.useEffect(()=>{if(r||!l)return;let e=mj(ue);function n(){M.current=!0,se.start(0,()=>{M.current=!1})}function i(e){let t=RA(e);Kj(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=RA(n);c&&r==null&&a!=null&&IA(v,a)&&UM(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=fe(),p=r?.hasAttribute(nM(`focus-guard`))&&[ne.current,re.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,BM(f),BM(d)].includes(r),m=!(IA(_,r)||IA(v,r)||IA(r,v)||IA(A?.portalNode,r)||u.some(e=>e===r||IA(e,r))||l.hasMatchingElement(e=>IA(e,r))||p||k&&(eM(k.nodesRef.current,o).find(e=>IA(e.context?.elements.floating,r)||IA(e.context?.elements.domReference,r))||tM(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,qA(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&ue&&GM(ue),s&&i!==_&&!Ij(a)&&FA(e)===e.body){if(bA(ue)&&(ue.focus(),s===`popup`)){ce.request(()=>{ue.focus()});return}let e=de(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||ue;bA(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!M.current&&(C||r!==WM())&&(j.current=!0,t.setOpen(!1,ZA(ej,n)))})}function o(){N.current||(b.current.insideReactTree=!0,oe.start(0,()=>{b.current.insideReactTree=!1}))}let u=bA(_)?_:null;if(!(!v&&!u))return nj(u&&tj(u,`focusout`,a),u&&tj(u,`pointerdown`,n),v&&tj(v,`focusin`,i),v&&tj(v,`focusout`,a),v&&A&&tj(v,`focusout`,o,!0))},[r,_,v,ue,c,k,A,t,l,s,de,C,x,b,oe,se,ce,d,f,fe]),I.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${nM(`portal`)}]`)||[]),t=(k?tM(k.nodesRef.current,x()):[]).find(e=>KA(e.context?.elements.domReference||null))?.context?.elements.domReference,n=mM([v,...e,ne.current,re.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...fe(),t,BM(f),BM(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=mM([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,fe]),rA(()=>{if(!g||r||!bA(ue))return;ee.current=``,te.current=``;let e=mj(ue),t=FA(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||IA(ue,t))return;let i=null,a=()=>(i??=de(ue),i[0]||ue),o;o=r===!0||r===null?a():BM(r),o||=a();let s=IA(ue,FA(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&dA(c);iM(o,{sync:l,preventScroll:o===ue,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=FA(e);return!(t!==o&&IA(ue,t))}})})},[r,g,ue,de,w,D,O,b]);let pe=I.useRef(null);rA(()=>{if(r||!ue){pe.current=null;return}pe.current&&=(pe.current.cancelled=!0,null);let e=mj(ue),t=FA(e),n=D.current==null;UM(t);function i(e){if(e.open||(ee.current=Uge(e.nativeEvent,te.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(nM(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(dA(e.nativeEvent)||fA(e.nativeEvent))j.current=!1;else{let e=!1;mj(ue).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&hA(t)!==`body`?t:null,s=n?o||a:a||o;return s||=WM()||null,typeof i==`boolean`?s:BM(i)||s||null}return()=>{y.off(`openchange`,i);let t=FA(e),n=fe(),r=IA(v,t)||n.some(e=>e===t||IA(e,t))||k&&eM(k.nodesRef.current,x(),!1).some(e=>IA(e.context?.elements.floating,t)),o=T.current,s=ee.current,c=a(s),l={cancelled:!1};pe.current=l,queueMicrotask(()=>{pe.current===l&&(pe.current=null);let n=Gge(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&bA(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,ue,T,E,D,y,k,_,x,fe]),rA(()=>{if(!uA||g||!v)return;let e=FA(mj(v));!bA(e)||!GA(e)||IA(v,e)&&e.blur()},[g,v]),rA(()=>{if(!(r||!A))return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),rA(()=>{if(!(r||!ue))return GM(ue),()=>{queueMicrotask(HM)}},[r,ue]);let me=!r&&(!c||!C)&&(le||c);return(0,F.jsxs)(I.Fragment,{children:[me&&(0,F.jsx)(gj,{"data-type":`inside`,ref:ie,onFocus:e=>{if(c){let e=de();iM(e[e.length-1])}else A?.portalNode&&(j.current=!1,Qj(e,A.portalNode)?Xj(_)?.focus():BM(f??A.beforeOutsideRef)?.focus())}}),n,me&&(0,F.jsx)(gj,{"data-type":`inside`,ref:ae,onFocus:e=>{c?iM(de()[0]):A?.portalNode&&(l&&(j.current=!0),Qj(e,A.portalNode)?Zj(_)?.focus():BM(d??A.afterOutsideRef)?.focus())}})]})}function qge(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=QA}=t,l=e.context.dataRef,u=I.useRef(void 0),d=pj(),f=nA(),p=I.useMemo(()=>{function t(t,n,r,i){let a=ZA(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=pA(e.pointerType,!0)&&fA(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||pA(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=RA(s),p=GA(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}pA(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return I.useMemo(()=>n?{reference:p}:Qk,[n,p])}function Jge(){return!1}function Yge(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Xge(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=Jge,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=zM(c),m=lj(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=lj(()=>a),{escapeKey:v,outsidePress:y}=Yge(s),b=I.useRef(!1),x=I.useRef(!1),S=I.useRef(!1),C=I.useRef(!1),w=I.useRef(!1),T=I.useRef(``),E=I.useRef(null),D=nA(),O=nA(),k=nA(),A=lj(()=>{O.clear(),d.current.insideReactTree=!1}),j=lj(e=>{let t=d.current.floatingContext?.nodeId;return(p?eM(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=lj(t=>WA(t,e.select(`floatingElement`))||WA(t,e.select(`domReferenceElement`))),N=lj(t=>{o()&&e.setOpen(!1,ZA(QA,t.nativeEvent))}),P=lj(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=hhe(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=ZA(Ghe,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),ee=lj(()=>{d.current.insideReactTree=!0,O.start(0,A)}),te=lj(t=>{if(!l||!n||t.button!==0)return;let r=RA(t.nativeEvent);IA(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),ne=lj(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});I.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),I.useEffect(()=>A,[A]),I.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new tA,i=mj(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(uA?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&eM(p.nodesRef.current,t).some(t=>WA(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=RA(n),i=`[${nM(`inert`)}]`,a=yA(r)?r.getRootNode():null,o=Array.from((xA(a)?a:mj(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>IA(e,r))))return;let c=yA(r)?r:null;for(;c&&!OA(c);){let e=jA(c);if(OA(e)||!yA(e))break;c=e}if(!(o.length&&yA(r)&&!zhe(r)&&!IA(r,e.select(`floatingElement`))&&o.every(e=>!IA(c,e)))){if(bA(r)&&!(`touches`in n)){let e=OA(r),t=kA(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!dA(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,ZA(Whe,n)),A())}}}function ee(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||M(t)||N(t)}function te(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function ne(e,t){let n=RA(e);if(!n)return;let r=tj(n,e.type,()=>{t(e),r()})}function re(e){T.current=`touch`,ne(e,te)}function ie(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&ne(e,e=>{e.type===`pointerdown`?ee(e):N(e)})}function ae(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!O(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,A())}}}function oe(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function se(e){ne(e,oe)}function ce(e){f()!==`sloppy`||!E.current||M(e)||(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function le(e){ne(e,ce)}let ue=nj(r&&nj(tj(i,`keydown`,P),tj(i,`compositionstart`,a),tj(i,`compositionend`,o)),g&&nj(tj(i,`click`,ie,!0),tj(i,`pointerdown`,ie,!0),tj(i,`pointerup`,ae,!0),tj(i,`pointercancel`,ae,!0),tj(i,`mousedown`,ie,!0),tj(i,`mouseup`,ae,!0),tj(i,`touchstart`,re,{capture:!0,passive:!0}),tj(i,`touchmove`,se,{capture:!0,passive:!0}),tj(i,`touchend`,le,{capture:!0,passive:!0})));return()=>{ue(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let re=I.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),ie=I.useMemo(()=>({onKeyDown:P,onPointerDown:ne,onMouseDown:ne,onClickCapture:ee,onMouseDownCapture(e){ee(),te(e)},onPointerDownCapture(e){ee(),te(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[P,ee,te,ne]);return I.useMemo(()=>n?{reference:re,floating:ie,trigger:re}:{},[n,re,ie])}function Zge(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var KM=Zge(`https://base-ui.com/production-error`,`Base UI`);function Qge(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),rA(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};yA(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function $ge(e,t=!1,n=!1,r=!1){let[i,a]=I.useState(e&&t?`idle`:void 0),[o,s]=I.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),rA(()=>{if(!e&&o&&i!==`ending`&&n){let e=fj.request(()=>{a(`ending`)});return()=>{fj.cancel(e)}}},[e,o,i,n]),rA(()=>{if(!e||t||i===void 0)return;let n=fj.request(()=>{a(void 0)});return()=>{fj.cancel(n)}},[t,e,i]),rA(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=fj.request(()=>{a(`idle`)});return()=>{fj.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function qM(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var JM=null;function e_e(e){if(!JM){let e=[];JM=e,queueMicrotask(()=>{JM=null,gn.flushSync(()=>{for(let t of e)t()})})}JM.push(e)}function YM(e,t=!1,n=!1){let r=pj();return lj((i,a=null)=>{r.cancel();let o=BM(e);if(o==null)return;let s=o,c=()=>{if(!n){gn.flushSync(i);return}e_e(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(qM(s).map(e=>e.finished.then(Xk))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(qM(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=zA;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function XM(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=lj(a),s=YM(r,n,i);I.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function t_e(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=lj(i),{mounted:c,setMounted:l,transitionStatus:u}=$ge(t,!1,!1,o),d=!t&&r;rA(()=>{t&&s(!1)},[t,s]);let f=I.useRef(c),p=I.useRef(!1),m=hM(),h=()=>{f.current=!1,l(!1),a()};rA(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=lj(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return XM({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var n_e={tabIndex:-1,[xhe]:``};function r_e(e){return t=>t!==`touch`||e.current}function i_e(e,t=!1){let n=vM(),r=RM()!=null,i=Hk(()=>e(n,r)).current;return Qge({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function a_e({handle:e,store:t}){return rA(()=>e.attachStore(t),[e,t]),null}function ZM(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function o_e(e,t){let n=I.useRef(null);return lj(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),ZM(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),ZM(t))})}function s_e(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function c_e(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function l_e(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=o_e(e,n),o=lj(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=lj(e=>{a(e),e&&o(e)});return rA(()=>(s(t.current),()=>s(null)),[s,t,n,e]),rA(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function u_e(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=I.useRef(null),i=e.useState(`open`);rA(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=ZA(Uhe);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function d_e(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=t_e({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Hk(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function f_e(e,t){e.useSyncedValues(t),rA(()=>()=>{e.update({activeTriggerProps:Qk,inactiveTriggerProps:Qk,popupProps:Qk})},[e])}function p_e(e,t){rA(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),rA(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var m_e=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},QM=KO(),h_e=yM(19)?__e:v_e;function $M(e,t,n,r,i){return h_e(e,t,n,r,i)}function g_e(e,t,n,r,i){let a=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,QM.useSyncExternalStore)(e.subscribe,a,a)}Kk({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,QM.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function __e(e,t,n,r,i){let a=Gk();if(!a)return g_e(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function v_e(e,t,n,r,i){return(0,JO.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var y_e=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return $M(this,e,t,n,r)}},eN=class extends y_e{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){I.useDebugValue(e);let n=this;rA(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;rA(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;rA(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){I.useDebugValue(e);let n=this,r=t!==void 0;rA(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return I.useDebugValue(e),$M(this,this.selectors[e],t,n,r)}useContextCallback(e,t){I.useDebugValue(e);let n=lj(t??Xk);this.context[e]=n}useStateSetter(e){let t=I.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},b_e={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},x_e=class extends eN{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:FM(),nested:n,triggerElements:i},b_e),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&ghe(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function S_e(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new x_e({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Qk,inactiveTriggerProps:Qk,popupProps:Qk}}var tN=e=>e.triggerIdProp??e.activeTriggerId,nN=e=>e.openProp??e.open,rN=e=>(e.popupElement?.id??e.floatingId)||void 0;function iN(e,t){return t!==void 0&&nN(e)&&tN(e)===t}function C_e(e,t){return iN(e,t)?!0:t!==void 0&&nN(e)&&tN(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var aN={open:nN,mounted:e=>e.mounted,transitionStatus:e=>nN(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:tN,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:rN,isTriggerActive:(e,t)=>t!==void 0&&tN(e)===t,isOpenedByTrigger:(e,t)=>iN(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&tN(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>C_e(e,t)?rN(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function w_e(e){let t=I.useCallback(t=>e===void 0?Xk:e.subscribeStore(t),[e]),n=I.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,QM.useSyncExternalStore)(t,n,()=>e?.serverStore)}var T_e=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new tA;restTimeout=new tA;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},oN=new WeakMap;function sN(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&oN.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),oN.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function cN(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=oN.get(n);a&&a!==e&&sN(a),sN(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,oN.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function lN(e){let t=e.context.dataRef.current,n=Hk(()=>t.hoverInteractionState??T_e.create()).current;return t.hoverInteractionState||=n,$k(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function E_e(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=zM(),u=RM(),d=lN(e),f=nA(),p=lj(()=>XA(c.current.openEvent?.type,d.interactedInside)),m=lj(()=>Hhe(c.current.openEvent?.type)),h=lj(()=>{sN(d)});rA(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),I.useEffect(()=>h,[h]),rA(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&yA(s)&&o){let e=s,t=o,n=mj(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??LA(e,`[data-rootownerid]`)??n.body;return cN(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),I.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&eM(l.nodesRef.current,u).length>0)}function a(t){let n=JA(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,ZA($A,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=RA(e);if(!Bhe(t)){d.interactedInside=!1;return}d.interactedInside=LA(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(UA(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&yA(o)&&eM(l.nodesRef.current,r,!1).some(e=>IA(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){!l||!u||t()||f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,ZA($A,n)),l.events.emit(`floating.closed`,n)})}let y=o;return nj(y&&tj(y,`mouseenter`,g),y&&tj(y,`mouseleave`,_),y&&tj(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var D_e={current:null};function O_e(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=D_e,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=zM(l),v=lN(e),y=I.useRef(!1),b=oj(i),x=oj(r),S=oj(o),C=oj(n),w=oj(p),T=oj(f),E=lj(()=>XA(h.current.openEvent?.type,v.interactedInside)),D=lj(()=>w.current?.()!==!1),O=lj((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!IA(t,n);if(!yA(r))return!1;let a=r;return i.hasMatchingElement(e=>IA(e,a))&&(!t||!IA(t,a))}),k=lj(()=>{v.handler&&=(mj(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=lj(()=>{sN(v)});return u&&(v.handleCloseOptions=i?.__options),I.useEffect(()=>k,[k]),I.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===$A,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),I.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=JA(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,ZA($A,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,ZA($A,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!yA(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!pA(v.pointerType))return;let n=YA(S.current),r=JA(x.current,`open`,v.pointerType),i=RA(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(yA(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(IA(t,i)){c=t;break}}yA(o)&&yA(s)&&!e.context.triggerElements.hasElement(o)&&IA(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&yA(c)&&yA(s)&&IA(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,ZA($A,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,ZA($A,t,c))}):g&&D()&&e.setOpen(!0,ZA($A,t,c)))}function o(n){if(E()){A();return}k();let r=mj(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!UA(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!IA(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){IA(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?tj(r,`mouseout`,l):void 0;return s?nj(tj(r,`mousemove`,i,{once:!0}),tj(r,`mouseenter`,i),tj(r,`mouseleave`,o),f):nj(tj(r,`mouseenter`,i),tj(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),I.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!pA(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;cN(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=YA(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,ZA($A,n,r))}v.pointerType===`touch`?gn.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}var uN=.1,k_e=uN*uN,dN=.5;function fN(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function pN(e,t,n,r,i,a,o,s,c,l){let u=!1;return fN(e,t,n,r,i,a)&&(u=!u),fN(e,t,i,a,o,s)&&(u=!u),fN(e,t,o,s,c,l)&&(u=!u),fN(e,t,c,l,n,r)&&(u=!u),u}function A_e(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function mN(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function j_e(e={}){let{blockPointerEvents:t=!1}=e,n=new tA,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*k_e;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=RA(r),g=r.type===`mouseleave`,_=IA(u,h),v=IA(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&yA(r.relatedTarget)&&IA(u,r.relatedTarget))return;function y(){return!!(s&&eM(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=mN(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=mN(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=mN(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=mN(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!A_e(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?dN/2:dN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+dN+1,o=C||T?S.bottom-dN:S.top,s=C?T?S.bottom-dN:S.top:S.bottom-dN;M=pN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?dN/2:dN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-dN,o=C||T?S.top+dN:S.bottom,s=C?T?S.top+dN:S.bottom:S.top+dN;M=pN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?dN/2:dN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+dN+1,o=w||E?S.right-dN:S.left,s=w?E?S.right-dN:S.left:S.right-dN;M=pN(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?dN/2:dN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-dN,o=w||E?S.left+dN:S.right,s=w?E?S.left+dN:S.right:S.left+dN;M=pN(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function hN(e,t,n){let{reference:r,floating:i}=e,a=Oj(t),o=kj(t),s=Dj(o),c=wj(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Tj(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function M_e(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Cj(t,e),p=Pj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Fj(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Fj(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var N_e=50,P_e=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:M_e},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=hN(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<N_e&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=hN(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},F_e=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Cj(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=wj(r),_=Oj(o),v=wj(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Nj(o)]:rge(o)),x=p!==`none`;!d&&x&&b.push(...sge(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=nge(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Oj(t)||T.every(e=>Oj(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Oj(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},gN=new Set([`left`,`top`]);async function I_e(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=wj(n),s=Tj(n),c=Oj(n)===`y`,l=gN.has(o)?-1:1,u=a&&c?-1:1,d=Cj(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var L_e=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await I_e(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},R_e=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Cj(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Oj(i),p=Ej(f),m=u[p],h=u[f],g=(e,t)=>Sj(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},z_e=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Cj(e,t),u={x:n,y:r},d=Oj(i),f=Ej(d),p=u[f],m=u[d],h=Cj(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=gN.has(wj(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},B_e=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Cj(e,t),c=await i.detectOverflow(t,s),l=wj(n),u=Tj(n),d=Oj(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=_j(p-c[m],g),y=_j(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*vj(c.left,c.right):S=p-2*vj(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function _N(e){let t=kA(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=bA(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=yj(n)!==a||yj(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function vN(e){return yA(e)?e:e.contextElement}function yN(e){let t=vN(e);if(!bA(t))return xj(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_N(t),o=(a?yj(n.width):n.width)/r,s=(a?yj(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var V_e=xj(0);function bN(e){let t=gA(e);return!DA()||!t.visualViewport?V_e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function H_e(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===gA(e)}function xN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vN(e),o=xj(1);t&&(r?yA(r)&&(o=yN(r)):o=yN(e));let s=H_e(a,n,r)?bN(a):xj(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=gA(a),t=yA(r)?gA(r):r,n=e,i=PA(n);for(;i&&t!==n;){let e=yN(i),t=i.getBoundingClientRect(),r=kA(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=gA(i),i=PA(n)}}return Fj({width:u,height:d,x:c,y:l})}function SN(e,t){let n=AA(e).scrollLeft;return t?t.left+n:xN(_A(e)).left+n}function CN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-SN(e,n),y:n.top+t.scrollTop}}function U_e(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=_A(r),s=t?CA(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=xj(1),u=xj(0),d=bA(r);if((d||!a)&&((hA(r)!==`body`||SA(o))&&(c=AA(r)),d)){let e=xN(r);l=yN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?CN(o,c):xj(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function W_e(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function G_e(e){let t=AA(e),n=e.ownerDocument.body,r=vj(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=vj(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+SN(e),o=-t.scrollTop;return kA(n).direction===`rtl`&&(a+=vj(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var K_e=25;function q_e(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=gA(e),a=_A(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!DA()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(SN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=K_e&&(s-=o)}return{width:s,height:c,x:l,y:u}}function J_e(e,t){let n=xN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function wN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=q_e(e,n,t);else if(t===`document`)r=G_e(_A(e));else if(yA(t))r=J_e(t,n);else{let n=bN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fj(r)}function Y_e(e,t){let n=t.get(e);if(n)return n;let r=NA(e,[],!1).filter(e=>yA(e)&&hA(e)!==`body`),i=null,a=kA(e).position===`fixed`,o=a?jA(e):e;for(;yA(o)&&!OA(o);){let e=kA(o),t=EA(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=jA(o)}return t.set(e,r),r}function X_e(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?CA(t)?[]:Y_e(t,this._c):[].concat(n),r],o=wN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=wN(t,a[e],i);s=vj(n.top,s),c=_j(n.right,c),l=_j(n.bottom,l),u=vj(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Z_e(e){let{width:t,height:n}=_N(e);return{width:t,height:n}}function Q_e(e,t,n){let r=bA(t),i=_A(t),a=n===`fixed`,o=xN(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=xj(0);if((r||!a)&&((hA(t)!==`body`||SA(i))&&(s=AA(t)),r)){let e=xN(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=SN(i));let l=i&&!r&&!a?CN(i,s):xj(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function TN(e){return kA(e).position===`static`}function EN(e,t){if(!bA(e)||kA(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return _A(e)===n&&(n=n.ownerDocument.body),n}function DN(e,t){let n=gA(e);if(CA(e))return n;if(!bA(e)){let t=jA(e);for(;t&&!OA(t);){if(yA(t)&&!TN(t))return t;t=jA(t)}return n}let r=EN(e,t);for(;r&&_he(r)&&TN(r);)r=EN(r,t);return r&&OA(r)&&TN(r)&&!EA(r)?n:r||bhe(e)||n}var $_e=async function(e){let t=this.getOffsetParent||DN,n=this.getDimensions,r=await n(e.floating);return{reference:Q_e(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function eve(e){return kA(e).direction===`rtl`}var tve={convertOffsetParentRelativeRectToViewportRelativeRect:U_e,getDocumentElement:_A,getClippingRect:X_e,getOffsetParent:DN,getElementRects:$_e,getClientRects:W_e,getDimensions:Z_e,getScale:yN,isElement:yA,isRTL:eve};function ON(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nve(e,t,n){let r=null,i,a=_A(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=bj(d),h=bj(a.clientWidth-(u+f)),g=bj(a.clientHeight-(d+p)),_=bj(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:vj(0,_j(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ON(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=gA(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function kN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=vN(e),u=i||a?[...l?NA(l):[],...t?NA(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?nve(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?xN(e):null;c&&g();function g(){let t=xN(e);h&&!ON(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var rve=L_e,ive=R_e,ave=F_e,ove=B_e,sve=z_e,cve=(e,t,n)=>{let r=new Map,i=n??{},a={...tve,...i.platform,_c:r};return P_e(e,t,{...i,platform:a})},AN=typeof document<`u`?I.useLayoutEffect:function(){};function jN(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!jN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!jN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function MN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function NN(e,t){let n=MN(e);return Math.round(t*n)/n}function PN(e){let t=I.useRef(e);return AN(()=>{t.current=e}),t}function lve(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=I.useState(r);jN(f,r)||p(r);let[m,h]=I.useState(null),[g,_]=I.useState(null),v=I.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=I.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=I.useRef(null),C=I.useRef(null),w=I.useRef(u),T=c!=null,E=PN(c),D=PN(i),O=PN(l),k=I.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),cve(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!jN(w.current,t)&&(w.current=t,gn.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);AN(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=I.useRef(!1);AN(()=>(A.current=!0,()=>{A.current=!1}),[]),AN(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=I.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=I.useMemo(()=>({reference:b,floating:x}),[b,x]),N=I.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=NN(M.floating,u.x),r=NN(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...MN(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return I.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var uve=(e,t)=>{let n=rve(e);return{name:n.name,fn:n.fn,options:[e,t]}},dve=(e,t)=>{let n=ive(e);return{name:n.name,fn:n.fn,options:[e,t]}},fve=(e,t)=>({fn:sve(e).fn,options:[e,t]}),pve=(e,t)=>{let n=ave(e);return{name:n.name,fn:n.fn,options:[e,t]}},mve=(e,t)=>{let n=ove(e);return{name:n.name,fn:n.fn,options:[e,t]}},FN=I.createContext(void 0);function IN(e){let t=I.useContext(FN);if(t===void 0&&!e)throw Error(KM(47));return t}var hve={...aN,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!aN.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&aN.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>aN.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},gve=class extends eN{constructor(e,t,n){let r=new m_e;super(_ve(e,r,t,n),vve(r),hve)}setOpen=(e,t)=>{let n=t.reason===$A,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=c_e(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=s_e(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),gn.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function _ve(e,t,n,r=!1){let i={...S_e(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function vve(e){return{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:I.createRef(),beforeTriggerFocusGuardRef:I.createRef(),beforeContentFocusGuardRef:I.createRef(),stickIfOpenTimeout:new tA,stickIfOpen:!0,triggerElements:e}}var LN=qk(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=bve(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),p_e(u,d),u_e(u);let{forceUnmount:m}=d_e(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),I.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),I.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,ZA(Khe))}),[m,u]);let h=d||f||s!=null;return(0,F.jsxs)(FN.Provider,{value:u,children:[s&&(0,F.jsx)(a_e,{handle:s,store:u}),h&&(0,F.jsx)(xve,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function yve(e){return IN(!0)?(0,F.jsx)(LN,{props:e}):(0,F.jsx)(Hge,{children:(0,F.jsx)(LN,{props:e})})}function bve(e,t){let n=i_e((e,n)=>new gve(t,e,n));return I.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function xve({store:e,modal:t}){let n=Xge(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return f_e(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var Sve=I.createContext(void 0);function Cve(e=!1){let t=I.useContext(Sve);if(t===void 0&&!e)throw Error(KM(16));return t}function wve(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:I.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function RN(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(gA(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Tve(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=I.useRef(null),s=Cve(!0),c=a??s!==void 0,{props:l}=wve({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=I.useCallback(()=>{let e=o.current;zN(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return rA(u,[u]),{getButtonProps:I.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return CM({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(kM(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=zN(r),s=!i&&Eve(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),RN(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),RN(r,e)))},onKeyUp(e){if(!t){if(kM(e),a?.(e),e.target===e.currentTarget&&i&&c&&zN(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),RN(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:lj(e=>{o.current=e,u()})}}function zN(e){return bA(e)&&e.tagName===`BUTTON`}function Eve(e){return bA(e)&&e.tagName===`A`&&!!e.href}function Dve(e){return vM(e,`base-ui`)}function Ove(e,t){function n(n,r,i){let a=n.currentTarget;gn.flushSync(()=>{e.setOpen(!1,ZA(ej,n.nativeEvent,a))}),mge(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Qj(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function kve(e){let t=I.useRef(``),n=I.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:I.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function Ave(e,t){let{onClick:n,onPointerDown:r}=kve(lj((n,r)=>{(typeof e==`function`?e():e)||t(r||(sA?`touch`:``))}));return I.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}var jve=Jk(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=IN(!0),h=w_e(s)??m;if(!h)throw Error(KM(74));let g=Dve(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=I.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=l_e(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=O_e(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:j_e(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=qge(v,{stickIfOpen:lj(()=>h.context.stickIfOpen)}),k=Ave(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=Tve({disabled:a,native:o}),N={open(e){return w?Lhe.open(e):Ihe.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:ee}=Ove(h,x),te=MM(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[Nge]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),ne=(0,F.jsx)(I.Fragment,{children:te},g);return E?(0,F.jsxs)(I.Fragment,{children:[(0,F.jsx)(gj,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),ne,(0,F.jsx)(gj,{ref:h.context.triggerFocusTargetRef,onFocus:ee})]}):ne}),BN=I.createContext(void 0);function Mve(){let e=I.useContext(BN);if(e===void 0)throw Error(KM(45));return e}var Nve=I.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return IN().useState(`mounted`)||n?(0,F.jsx)(BN.Provider,{value:n,children:(0,F.jsx)(Rge,{ref:t,...r})}):null});function Pve(e){return yM(19)?e:e?`true`:void 0}var VN=I.createContext(void 0);function Fve(){let e=I.useContext(VN);if(!e)throw Error(KM(46));return e}function Ive(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=I.useState(null),d=I.useRef(null),f=zM(n),p=I.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=lve({...e,elements:{...p,...l&&{reference:l}}}),h=I.useCallback(e=>{let t=yA(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=I.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=I.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=I.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return rA(()=>{o&&(d.current=o)},[o]),rA(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),I.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var Lve=I.createContext(void 0);function Rve(){return I.useContext(Lve)?.direction??`ltr`}var zve=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Cj(e,t)||{};if(l==null)return{};let d=Pj(u),f={x:n,y:r},p=kj(i),m=Dj(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=Sj(D,k,O),j=!c.arrow&&Tj(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Bve=(e,t)=>{let{name:n,fn:r}=zve(e);return{name:n,fn:r,options:[e,t]}},Vve={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},Hve={sideX:`left`,sideY:`top`},Uve=`--available-width`,Wve=`--available-height`,Gve=`--anchor-width`,Kve=`--anchor-height`,qve=`--transform-origin`,HN=Uve,UN=Wve;function WN(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function GN(e,t,n){let{rects:r,placement:i}=e;return{side:WN(t,wj(i),n),align:Tj(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Jve(e){return Yve(e,Ive)}function Yve(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=lj(O),A=O?k:n,j=oj(n),M=oj(g),N=Rve()===`rtl`,[P,ee]=I.useState(null);!g&&P!==null&&ee(null);let te=x===`placement`,ne=P?wj(P):null,re=P&&te?Tj(P)||`center`:null,ie=ne||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],ae=re||o,oe=ae===`center`?ie:`${ie}-${ae}`,se=l;typeof se==`number`?se={top:se,right:se,bottom:se,left:se}:se&&={top:se.top||0,right:se.right||0,bottom:se.bottom||0,left:se.left||0};let ce=+(i===`bottom`),le=+(i===`top`),ue=+(i===`right`),de=+(i===`left`),fe={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:se},pe=I.useRef(null),me=oj(a),he=oj(s),ge=typeof a==`function`?0:a,_e=typeof s==`function`?0:s,ve=[];p&&ve.push(p),ve.push(uve(e=>{let t=GN(e,i,N),n=typeof me.current==`function`?me.current(t):me.current,r=typeof he.current==`function`?he.current(t):he.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ge,_e,N,i]));let ye=w===`none`&&C!==`shift`,be=!ye&&(u||E||C===`shift`),xe=C===`none`?null:pve({...fe,padding:{top:se.top+1+ce,right:se.right+1+de,bottom:se.bottom+1+le,left:se.left+1+ue},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),Se=ye?null:dve({...fe,rootBoundary:D,mainAxis:w!==`none`,crossAxis:be,limiter:u||E?void 0:fve(e=>{if(!pe.current)return{};let{width:t,height:n}=pe.current.getBoundingClientRect(),r=Oj(wj(e.placement)),i=r===`y`?t:n,a=r===`y`?se.left+se.right:se.top+se.bottom;return{offset:i/2+a/2}})},[fe,u,E,D,se,w]);C===`shift`||w===`shift`||ae===`center`?ve.push(Se,xe):ve.push(xe,Se),ve.push(mve({...fe,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(HN,`${t}px`),i.setProperty(UN,`${n}px`);let a=gA(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(Gve,`${u}px`),i.setProperty(Kve,`${d}px`)}}),Bve(e=>({element:pe.current||mj(e.elements.floating).createElement(`div`),padding:pe.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=wj(r),u=Tj(r),d=Oj(l)===`y`,f=pe.current,p=typeof a==`function`?a(GN(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return be&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(qve,d?`${m} ${h}`:`${h} ${m}`),{}}},Vve,b),rA(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let Ce=I.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:we,elements:Te,x:Ee,y:De,middlewareData:Oe,update:ke,placement:Ae,context:je,isPositioned:Me,floatingStyles:Ne}=t({rootContext:h,open:m?g:void 0,placement:oe,middleware:ve,strategy:r,whileElementsMounted:m?void 0:(...e)=>kN(...e,Ce),nodeId:y,externalTree:S}),{sideX:Pe,sideY:Fe}=Oe.adaptiveOrigin||Hve,Ie=Me?r:`fixed`,Le=I.useMemo(()=>{let e;return e=Me?b?{position:Ie,[Pe]:Ee,[Fe]:De}:{...Ne,position:Ie}:{position:Ie,top:0,left:0},e[HN]=`100vw`,e[UN]=`100vh`,Me||(e.opacity=0),e},[b,Ie,Pe,Ee,Fe,De,Ne,Me]),Re=I.useRef(null);rA(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(KN(t)?t.current:t)||null;n!==Re.current&&(we.setPositionReference(n),Re.current=n)},[g,we,A,j]),I.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&KN(e)&&e.current!==Re.current&&(we.setPositionReference(e.current),Re.current=e.current)},[g,we,A,j]),I.useEffect(()=>{if(m&&g&&Te.reference&&Te.floating)return kN(Te.reference,Te.floating,ke,Ce)},[m,g,Te,ke,Ce]);let ze=wj(Ae),Be=WN(i,ze,N),Ve=Tj(Ae)||`center`,He=!!Oe.hide?.referenceHidden;rA(()=>{x&&g&&Me&&(ze!==ie||te&&Ve!==ae)&&ee(Ae)},[x,te,g,Me,Ae,ze,Ve,ie,ae]);let Ue=I.useMemo(()=>({position:`absolute`,top:Oe.arrow?.y,left:Oe.arrow?.x}),[Oe.arrow]),We=Oe.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:Le,arrowStyles:Ue,arrowRef:pe,arrowUncentered:We,side:Be,align:Ve,physicalSide:ze,anchorHidden:He,refs:we,context:je,isPositioned:Me,update:ke}),[Le,Ue,pe,We,Be,Ve,ze,He,we,je,Me,ke])}function KN(e){return e!=null&&`current`in e}var Xve=I.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,F.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function Zve(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=I.useRef(null),o=I.useRef(null),s=YM(r);rA(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),rA(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}function qN(e){return e===`starting`?Mge:Qk}function Qve(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),MM(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},qN(r),i],stateAttributesMapping:VA})}var JN={},YN={},XN=``;function ZN(e,t){return SA(e)?e:t}function QN(e,t,n){return/hidden|clip/.test(e.getComputedStyle(ZN(t,n)).overflowY)}function $ve(e){if(typeof document>`u`)return!1;let t=mj(e);return gA(t).innerWidth-t.documentElement.clientWidth>0}function eye(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=mj(e),n=t.documentElement,r=t.body,i=ZN(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function tye(e){let t=mj(e),n=t.documentElement,r=t.body,i=ZN(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function nye(e){let t=mj(e),n=t.documentElement,r=t.body,i=gA(n),a=0,o=0,s=!1,c=fj.create();if(uA&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,JN={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},XN=n.style.scrollBehavior,YN={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=ZN(n,r);if(s=eye(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,JN),Object.assign(r.style,YN),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=XN)}function d(){u(),c.request(l)}l();let f=tj(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var rye=new class{lockCount=0;restore=null;timeoutLock=tA.create();timeoutUnlock=tA.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=mj(e),n=t.documentElement,r=t.body,i=gA(n);if(QN(i,n,r)){let t=new i.MutationObserver(()=>{QN(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=sA||!$ve(e);this.restore=a?tye(e):nye(e)}};function iye(e=!0,t=null){rA(()=>{if(e)return rye.acquire(t)},[e,t])}var aye=20;function oye(e,t,n,r){let[i,a]=I.useState(!1);rA(()=>{if(!e||!t||n==null){a(!1);return}let r=mj(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-aye)},[e,t,n]),iye(e&&(!t||i),r)}var sye=I.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Pge,..._}=e,v=IN(),y=Mve(),b=Bge(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=Jve({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});Zve({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;oye(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=Qve(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,F.jsxs)(VN.Provider,{value:j,children:[S&&M&&(0,F.jsx)(Xve,{inert:Pve(!C),cutout:T}),(0,F.jsx)(Vge,{id:b,children:P})]})}),cye=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),lye=I.createContext(void 0);function uye(e){let t=I.useContext(lye);if(t===void 0&&!e)throw Error(KM(69));return t}var dye=I.createContext(void 0);function fye(){let[e,t]=I.useState(0),n=lj(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:I.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var pye=I.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=IN(),l=Fve(),u=uye(!0)!=null,{context:d,hasClosePart:f}=fye(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);XM({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),E_e(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?r_e(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=MM(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...n_e,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&cye.has(e.key)&&e.stopPropagation()}},qN(g),s],stateAttributesMapping:Rhe});return(0,F.jsx)(Kge,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:bA(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,F.jsx)(dye.Provider,{value:d,children:M})})}),$N=`data-glide-stand-in`;function eP(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left+e.scrollLeft-e.clientLeft,y:r.top-n.top+e.scrollTop-e.clientTop,width:r.width,height:r.height}}function tP(e){return{transform:`translate(${String(e.x)}px, ${String(e.y)}px)`,width:`${String(e.width)}px`,height:`${String(e.height)}px`}}function mye(e){let t=(0,I.useRef)(null);return(0,I.useCallback)(n=>{t.current?.(),t.current=n?hye(n,e):null},[e])}function hye(e,t){if(!Bd(e))return()=>void 0;let n=e.ownerDocument,r=e.querySelector(t),i=r?eP(e,r):null,a=null,o=null,s=new Set,c=()=>{for(let e of s)e.removeAttribute($N);s.clear(),a&&(a.hidden=!0),o=null},l=()=>{if(a)return a;let t=n.createElement(`span`);return t.className=`caps-glide`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t),e.classList.add(`caps-glide-host`),getComputedStyle(e).position===`static`&&e.classList.add(`caps-glide-anchor`),a=t,t},u=(t,n)=>{let r=Fd(e),u=eP(e,t),d=o&&a?eP(e,a):i;if(i=u,o?.cancel(),c(),r.reduced||d===null||Math.abs(d.y-u.y)<1&&Math.abs(d.x-u.x)<1)return;t.setAttribute($N,`measure`);let f=getComputedStyle(t),p=f.backgroundColor,m=f.borderRadius;for(let e of[t,n])e&&(e.setAttribute($N,``),s.add(e));let h=l();h.hidden=!1,h.style.backgroundColor=p,h.style.borderRadius=m;let g=h.animate([tP(d),tP(u)],{duration:r.normal,easing:zd(r,r.ease),fill:`forwards`});o=g,g.addEventListener(`finish`,()=>{o===g&&c()})},d=()=>{let n=e.querySelector(t);if(n===r)return;let i=r;r=n,n&&u(n,i)},f=new MutationObserver(d);return f.observe(e,{subtree:!0,attributes:!0,attributeFilter:[`data-highlighted`,`data-active`,`data-navigation`,`aria-selected`]}),e.addEventListener(`pointerover`,d),e.addEventListener(`pointerout`,d),()=>{f.disconnect(),e.removeEventListener(`pointerover`,d),e.removeEventListener(`pointerout`,d),o?.cancel(),c(),a?.remove()}}var nP=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,F.jsx)(`input`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Dd(`input caps-input w-full`,e),ref:r})});(0,I.forwardRef)(function({leading:e,className:t,...n},r){return(0,F.jsxs)(`span`,{className:`caps-search-input`,"data-leading":e?`true`:void 0,children:[e?(0,F.jsx)(`span`,{className:`caps-search-leading`,"aria-hidden":`true`,children:e}):null,(0,F.jsx)(nP,{...n,type:`search`,className:t,ref:r})]})});function gye({getKey:e,isDisabled:t=()=>!1,items:n,getFallbackKey:r}){let i=(0,I.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[a,o]=(0,I.useState)(null),s=r?.(i)??null,c=a!==null&&i.some(t=>e(t)===a)?a:s!==null&&i.some(t=>e(t)===s)?s:null;(0,I.useEffect)(()=>{a!==null&&!i.some(t=>e(t)===a)&&o(null)},[a,i,e]);let l=i.find(t=>e(t)===c),u=l?i.findIndex(t=>e(t)===c):-1;return{activeIndex:u,activeItem:l,activeKey:c,enabledItems:i,move:(t,n)=>{if(i.length===0)return;let r=n?n===`start`?0:i.length-1:u<0?t>0?0:i.length-1:(u+t+i.length)%i.length,a=i[r];a&&o(e(a))},setActiveKey:o}}var _ye=(0,I.forwardRef)(function({children:e,className:t,type:n=`button`,...r},i){return(0,F.jsxs)(`button`,{...r,ref:i,type:n,className:Dd(`select caps-select caps-combobox-trigger w-full`,t),children:[(0,F.jsx)(`span`,{children:e}),(0,F.jsx)(nr,{className:`caps-select-chevron`,"aria-hidden":`true`})]})});function vye({defaultInputValue:e,defaultOpen:t,defaultValue:n,getKey:r,getSearchText:i,groupBy:a,id:o,isDisabled:s,items:c,onOpenChange:l,onCommit:u,multiple:d,controlledOpen:f,controlledKeys:p,trigger:m}){let h=`${o}-listbox`,[g,_]=(0,I.useState)(e),[v,y]=(0,I.useState)(!1),[b,x]=(0,I.useState)(n),[S,C]=(0,I.useState)(t),w=p??(b===null?[]:[b]),T=m?f??S:!0,E=(0,I.useMemo)(()=>{let e=g.trim().toLowerCase();return e?c.filter(t=>i(t).toLowerCase().includes(e)):c},[i,c,g]),D=gye({getKey:r,isDisabled:s,items:E});(0,I.useEffect)(()=>{if(D.activeKey!==null)return;let e=D.enabledItems.find(e=>w.includes(r(e)))??D.enabledItems[0];e&&D.setActiveKey(r(e))},[D.activeKey,D.enabledItems,D.setActiveKey,r,w]);let O=e=>{y(!1),e||_(``),f===void 0&&C(e),l?.(e)},k=e=>`${h}-option-${encodeURIComponent(e)}`,A=e=>{let t=r(e);p===void 0&&x(t),u(e),m&&!d&&O(!1)},j=e=>{y(!0),_(e.target.value),D.setActiveKey(null)},M=e=>{if(Bk(e))return;let t;switch(e.key){case`ArrowDown`:t=[1,void 0];break;case`ArrowUp`:t=[-1,void 0];break;case`End`:t=[1,`end`];break;case`Home`:t=[-1,`start`]}t?(y(!0),e.preventDefault(),D.move(t[0],t[1])):e.key===`Enter`&&D.activeItem&&(e.preventDefault(),A(D.activeItem))},N=(0,I.useMemo)(()=>{if(!a)return[{label:``,items:E}];let e=new Map;for(let t of E){let n=a(t),r=e.get(n);r?r.push(t):e.set(n,[t])}return[...e].map(([e,t])=>({label:e,items:t}))},[E,a]);return{keyboardNavigation:v,onPointerMove:()=>{y(!1)},activeKey:D.activeKey,activeItem:D.activeItem,groups:N,inputValue:g,listboxId:h,onInputChange:j,onInputKeyDown:M,optionId:k,open:T,commit:A,selectedKeys:w,setOpen:O}}function yye(e){let{"aria-describedby":t,"aria-invalid":n,"aria-label":r,"aria-labelledby":i,"aria-required":a,activeTone:o=`neutral`,container:s,contentClassName:c,defaultInputValue:l=``,defaultOpen:u=!1,defaultValue:d=null,emptyMessage:f=`No matches`,getKey:p,getLabel:m,getSearchText:h=m,groupBy:g,id:_,inputProps:v,inputRef:y,isDisabled:b=()=>!1,items:x,onOpenChange:S,onValueChange:C,multiple:w,open:T,placeholder:E=`Search…`,renderItem:D,rootRef:O,trigger:k,triggerRef:A,value:j,...M}=e,N=e=>{let t=p(e);if(w){let e=j.includes(t)?j.filter(e=>e!==t):[...j,t];C?.(e,x.filter(t=>e.includes(p(t))))}else C?.(t,e)},P;w?P=j:j!==void 0&&(P=j===null?[]:[j]);let ee=(0,I.useId)(),te=k?.props??v,ne=_??te?.id??ee,re={id:ne,"aria-describedby":[t,te?.[`aria-describedby`]].filter(Boolean).join(` `)||void 0,"aria-invalid":n??te?.[`aria-invalid`],"aria-label":te?.[`aria-label`]??r,"aria-labelledby":te?.[`aria-labelledby`]??i,"aria-required":a??te?.[`aria-required`]},{keyboardNavigation:ie,onPointerMove:ae,activeItem:oe,activeKey:se,commit:ce,groups:le,inputValue:ue,listboxId:de,onInputChange:fe,onInputKeyDown:pe,open:me,optionId:he,selectedKeys:ge,setOpen:_e}=vye({defaultInputValue:l,defaultOpen:u,defaultValue:d,getKey:p,getSearchText:h,groupBy:g,id:ne,isDisabled:b,items:x,onOpenChange:S,onCommit:N,multiple:w??!1,controlledOpen:T,controlledKeys:P,trigger:k});hne(()=>{k&&_e(!1)});let ve=ym(`popover`),ye=s===void 0?ve:s,be=mye(`.caps-combobox-option[data-active="true"]:not(:disabled), [data-navigation="pointer"] .caps-combobox-option:hover:not(:disabled)`),xe=(0,F.jsx)(nP,{...v,...k?{}:re,"aria-activedescendant":oe?he(p(oe)):void 0,"aria-autocomplete":`list`,"aria-controls":de,"aria-expanded":!0,className:Dd(`input-sm`,v?.className),id:k?v?.id??`${ne}-input`:ne,onChange:e=>{v?.onChange?.(e),fe(e)},onKeyDown:e=>{v?.onKeyDown?.(e),e.defaultPrevented||pe(e)},placeholder:v?.placeholder??E,ref:y,role:`combobox`,value:ue}),Se=(0,F.jsx)(`div`,{id:de,ref:be,className:`caps-combobox-list`,"data-navigation":ie?`keyboard`:`pointer`,onPointerMove:ae,role:`listbox`,"aria-multiselectable":w??void 0,children:le.every(e=>e.items.length===0)?(0,F.jsx)(`div`,{className:`px-md py-md text-sm text-base-content`,children:f}):le.map(e=>(0,F.jsxs)(`div`,{"aria-label":e.label||void 0,role:e.label?`group`:void 0,children:[e.label?(0,F.jsx)(`div`,{className:`px-md pb-xs pt-sm text-xs text-base-content uppercase tracking-wider`,children:e.label}):null,e.items.map(e=>{let t=p(e),n=b(e),r=se===t,i={active:r,disabled:n,selected:ge.includes(t)};return(0,F.jsxs)(`button`,{"aria-disabled":n||void 0,"aria-selected":i.selected,className:`caps-combobox-option`,"data-active":r&&ie,disabled:n,id:he(t),onClick:()=>{ce(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,tabIndex:-1,type:`button`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`caps-combobox-check`,children:i.selected?(0,F.jsx)(tr,{}):null}),D?.(e,r,i)??m(e)]},t)})]},e.label))});return k?(0,F.jsx)(`div`,{...M,className:Dd(M.className),ref:O,children:(0,F.jsxs)(yve,{modal:!0,onOpenChange:_e,open:me,children:[(0,F.jsx)(jve,{...re,"aria-haspopup":`dialog`,className:`btn`,ref:A,render:k}),ye===null?null:(0,F.jsx)(Nve,{container:ye,children:(0,F.jsx)(sye,{align:`start`,side:`bottom`,sideOffset:4,className:`z-(--stipe-layer-popover)`,children:(0,F.jsxs)(pye,{"data-active-tone":o,className:Dd(`min-w-40 rounded-box border border-base-300 bg-base-100 p-xs shadow-lg outline-none caps-combobox-panel caps-combobox-popup`,c),children:[(0,F.jsx)(`div`,{className:`caps-combobox-search`,children:xe}),Se]})})})]})}):(0,F.jsx)(`div`,{...M,className:Dd(M.className),ref:O,children:(0,F.jsxs)(`div`,{className:Dd(`caps-combobox-panel`,c),"data-active-tone":o,children:[(0,F.jsx)(`div`,{className:`caps-combobox-search`,children:xe}),Se]})})}var bye=(0,I.forwardRef)(function({label:e,icon:t,caption:n,appearance:r,className:i,...a},o){return(0,F.jsx)(`label`,{className:`caps-icon-choice`,"data-appearance":r===`compact`?r:void 0,children:(0,F.jsx)(Rk,{...a,appearance:r??`default`,"aria-label":e,className:Dd(`caps-icon-choice-input`,i),indicator:(0,F.jsx)(rD,{icon:t,caption:n}),ref:o})})}),xye=(0,I.forwardRef)(function({label:e,icon:t,hint:n,className:r,...i},a){let o=(0,I.useId)(),s=[i[`aria-describedby`],n?o:null].filter(Boolean).join(` `)||void 0;return(0,F.jsx)(`label`,{className:`caps-check-key`,children:(0,F.jsx)(Rk,{...i,"aria-label":e,"aria-describedby":s,className:Dd(`caps-check-key-input`,r),indicator:(0,F.jsxs)(`span`,{className:`caps-check-key-face`,"aria-hidden":`true`,children:[t?(0,F.jsx)(`span`,{className:`caps-check-key-icon`,children:t}):null,(0,F.jsxs)(`span`,{className:`caps-check-key-copy`,children:[(0,F.jsx)(`span`,{className:`caps-check-key-label`,children:e}),n?(0,F.jsx)(`span`,{className:`caps-check-key-hint`,id:o,children:n}):null]}),(0,F.jsx)(`span`,{className:`caps-check-key-lamp`})]}),ref:a})})});function Sye({className:e,...t}){return(0,F.jsx)(`div`,{...t,className:Dd(`caps-check-keys`,e)})}function Cye({checked:e}){let t=`caps-radio-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=(0,I.useRef)(null),o=Ld(a),{reduced:s}=o;return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=s||i.current===e;i.current=e;let r=e?4:0,a=pm(o,{ease:`outCubic`,duration:75}),c=e?fm(o,{bounce:.65,duration:300}):pm(o,{ease:`inCubic`,duration:100}),l=Qp(n.current,t?{rx:r,ry:r,cy:6,duration:0}:{rx:[{to:e?3.5:4.15,...a},{to:r,...c}],ry:[{to:e?4.5:3.85,...a},{to:r,...c}],cy:[{to:e?5.85:6.1,...a},{to:6,...c}]});return()=>{l.cancel()}},[e,s,o]),(0,F.jsxs)(`svg`,{ref:a,className:`caps-radio-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,F.jsx)(nm,{id:`${t}-shadow`}),(0,F.jsx)(rm,{id:`${t}-inset`}),(0,F.jsx)(`clipPath`,{id:`${t}-well`,children:(0,F.jsx)(`circle`,{cx:`6`,cy:`6`,r:`5`})})]}),(0,F.jsx)(`circle`,{className:`caps-radio-track`,cx:`6`,cy:`6`,r:`5.5`,filter:`url(#${t}-inset)`}),(0,F.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,F.jsx)(`ellipse`,{ref:n,cx:`6`,cy:`6`,rx:r?4:0,ry:r?4:0,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var rP=(0,I.createContext)(null),wye=(0,I.forwardRef)(function({children:e,className:t,defaultValue:n,disabled:r=!1,name:i,onValueChange:a,orientation:o=`vertical`,value:s,...c},l){let u=(0,I.useId)(),d=(0,I.useRef)(null);(0,I.useImperativeHandle)(l,()=>{if(!d.current)throw Error(`RadioGroup is not mounted`);return d.current},[]);let f=i??`radio-group-${u}`,[p,m]=(0,I.useState)(n),h=s??p;return(0,I.useEffect)(()=>{let e=d.current?.form;if(!e||s!==void 0)return;let t=e=>{queueMicrotask(()=>{e.defaultPrevented||m(n)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[s,n,c.form]),(0,F.jsx)(rP.Provider,{value:{disabled:r,name:f,onValueChange:e=>{s===void 0&&m(e),a?.(e)},value:h},children:(0,F.jsx)(`fieldset`,{...c,className:Dd(`flex gap-md`,o===`horizontal`?`flex-row flex-wrap`:`flex-col`,t),disabled:r,role:c.role??`radiogroup`,ref:d,children:e})})}),iP=(0,I.forwardRef)(function({className:e,indicator:t,onChange:n,onClick:r,value:i,...a},o){let s=(0,I.useContext)(rP);if(!s)throw Error(`RadioGroupItem must be used inside <RadioGroup>`);let c=s.value===i,l=e=>{n?.(e),e.target.checked&&s.onValueChange?.(i)};return(0,F.jsxs)(`span`,{className:`caps-radio`,"data-checked":c,"data-custom-indicator":t!==void 0||void 0,children:[(0,F.jsx)(`input`,{...a,"aria-checked":c,checked:c,className:Dd(`caps-radio-input`,e),disabled:s.disabled||a.disabled,name:s.name,onChange:l,onClick:r,ref:o,type:`radio`,value:i}),t===void 0?(0,F.jsx)(Cye,{checked:c}):t]})}),Tye=(0,I.forwardRef)(function({description:e,id:t,meta:n,title:r,...i},a){let o=(0,I.useContext)(rP),s=(0,I.useId)(),c=t??s,l=o?.value===i.value,u=o?.disabled===!0||i.disabled===!0;return(0,F.jsxs)(`label`,{className:`caps-choice-card`,"data-checked":l,"data-disabled":u||void 0,htmlFor:c,children:[(0,F.jsx)(iP,{...i,"aria-describedby":e?`${c}-description`:void 0,"aria-labelledby":`${c}-title`,id:c,ref:a}),(0,F.jsxs)(`span`,{className:`caps-choice-card-copy`,children:[(0,F.jsx)(`span`,{className:`caps-choice-card-title`,id:`${c}-title`,children:r}),e?(0,F.jsx)(`span`,{className:`caps-choice-card-description`,id:`${c}-description`,children:e}):null]}),n?(0,F.jsx)(`span`,{className:`caps-choice-card-meta`,children:n}):null]})}),Eye=(0,I.forwardRef)(function({label:e,icon:t,caption:n,art:r=`dim`,className:i,...a},o){return(0,F.jsx)(`label`,{className:`caps-icon-choice`,"data-art":r===`color`?r:void 0,children:(0,F.jsx)(iP,{...a,"aria-label":e,className:Dd(`caps-icon-choice-input`,i),indicator:(0,F.jsx)(rD,{icon:t,caption:n}),ref:o})})});(0,I.forwardRef)(function({label:e,color:t,className:n,...r},i){return(0,F.jsx)(`label`,{className:`caps-icon-choice`,"data-art":`color`,"data-swatch":``,title:e,children:(0,F.jsx)(iP,{...r,"aria-label":e,className:Dd(`caps-icon-choice-input`,n),indicator:(0,F.jsx)(rD,{icon:(0,F.jsx)(`span`,{className:`caps-swatch-dot`,style:{backgroundColor:t}})}),ref:i})})});var Dye=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,F.jsxs)(`span`,{className:`caps-select-shell`,children:[(0,F.jsx)(`select`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Dd(`select select-bordered caps-select w-full`,t&&`select-error`,e),ref:r}),!n.multiple&&(!n.size||n.size<=1)?(0,F.jsx)(nr,{className:`caps-select-chevron`,"aria-hidden":`true`}):null]})});function Oye({checked:e}){let t=`caps-switch-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(null),i=(0,I.useRef)(e).current,a=(0,I.useRef)(e),o=Hd();return(0,I.useLayoutEffect)(()=>{if(!n.current||!r.current)return;let t=o||a.current===e;a.current=e;let i=e?16:8,s=Fd(n.current),c=fm(s,{bounce:.25,duration:440}),l=pm(s,{ease:`inOutSine`,duration:100}),u=Qp(n.current,t?{x:2,y:2,width:i,height:8,duration:0}:{x:[{to:e?2.5:1.5,...l},{to:2,...c}],y:[{to:1.5,...l},{to:2,...c}],height:[{to:9,...l},{to:8,...c}],width:[{to:e?7:16.5,...l},{to:i,...c}]}),d=Qp(r.current,{gradientTransform:e?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`,...t?{duration:0}:{delay:l.duration,...c}});return()=>{u.cancel(),d.cancel()}},[e,o]),(0,F.jsxs)(`svg`,{className:`caps-switch-visual`,width:`40`,height:`24`,viewBox:`0 0 20 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsxs)(`defs`,{children:[(0,F.jsx)(tm,{ref:r,id:`${t}-surface`,transform:i?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`}),(0,F.jsx)(nm,{id:`${t}-shadow`}),(0,F.jsx)(rm,{id:`${t}-inset`}),(0,F.jsx)(`clipPath`,{id:`${t}-track`,children:(0,F.jsx)(`rect`,{x:`1`,y:`1`,width:`18`,height:`10`,rx:`5`})})]}),(0,F.jsx)(`rect`,{className:`caps-switch-track`,filter:`url(#${t}-inset)`,x:`0.5`,y:`0.5`,width:`19`,height:`11`,rx:`5.5`}),(0,F.jsx)(`g`,{clipPath:`url(#${t}-track)`,children:(0,F.jsx)(`rect`,{ref:n,x:`2`,y:`2`,width:i?16:8,height:`8`,rx:`4`,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var kye=(0,I.forwardRef)(function({className:e,checked:t,defaultChecked:n=!1,onChange:r,onCheckedChange:i,...a},o){let s=(0,I.useRef)(null),[c,l]=(0,I.useState)(n),u=t??c;return(0,I.useImperativeHandle)(o,()=>{if(!s.current)throw Error(`Switch input is not mounted`);return s.current},[]),(0,I.useEffect)(()=>{let e=s.current?.form;if(!e||t!==void 0)return;let r=e=>{queueMicrotask(()=>{!e.defaultPrevented&&s.current&&l(n)})};return e.addEventListener(`reset`,r),()=>{e.removeEventListener(`reset`,r)}},[t,n,a.form]),(0,F.jsxs)(`span`,{className:`caps-switch`,"data-checked":u,children:[(0,F.jsx)(`input`,{...a,checked:u,className:Dd(`caps-switch-input`,e),onChange:e=>{t===void 0&&l(e.target.checked),r?.(e),i?.(e.target.checked)},ref:s,role:`switch`,type:`checkbox`}),(0,F.jsx)(Oye,{checked:u})]})}),Aye=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,F.jsx)(`textarea`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Dd(`textarea textarea-bordered w-full`,t&&`textarea-error`,e),ref:r})}),jye=xb(jb),Mye=xb(Nb),Nye=xb(zb(Ub)),Pye=xb(Fb(jb)),aP=Fb(Vb(File)),Fye=xb(aP),oP=Lb([jb,Ub,Nb,kb,Ab,Fb(jb),aP]),Iye=xb(oP),sP=e=>Um(jye(e.state.value),()=>``),cP=e=>Um(Mye(e.state.value),()=>!1),Lye=e=>Um(Nye(e.state.value),()=>null),Rye=e=>Um(Pye(e.state.value),()=>[]),zye=e=>Um(Fye(e.state.value),()=>[]),Bye=e=>Um(Iye(e.state.value),()=>null);function Vye({field:e,spec:t,locked:n,...r}){let[i,a]=(0,I.useState)(!1);return(0,F.jsxs)(dk,{children:[(0,F.jsx)(nP,{...r,name:t.name,disabled:n,type:i?`text`:`password`,autoComplete:`off`,spellCheck:!1,className:`caps-field-secret`,placeholder:t.placeholder,readOnly:t.readOnly,value:sP(e),onBlur:e.handleBlur,onChange:t=>{e.handleChange(t.currentTarget.value)}}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,size:`icon`,"aria-label":i?`Hide`:`Show`,"aria-pressed":i,disabled:n,onClick:()=>{a(e=>!e)},children:i?(0,F.jsx)(ir,{"aria-hidden":`true`}):(0,F.jsx)(ar,{"aria-hidden":`true`})})]})}var Hye={text:`text`,email:`email`,url:`url`,tel:`tel`};function Uye({spec:e,field:t,locked:n,...r}){let i=zye(t),a=n||e.readOnly===!0,o=(0,I.useRef)(null);return(0,F.jsxs)(`div`,{className:`flex flex-col gap-sm`,children:[(0,F.jsx)(Md,{asChild:!0,children:(0,F.jsx)(`input`,{...r,ref:o,type:`file`,tabIndex:-1,required:r.required===!0&&i.length===0,name:e.name,accept:e.accept,multiple:e.multiple,disabled:a,onBlur:t.handleBlur,onChange:e=>{t.handleChange(Array.from(e.currentTarget.files??[])),e.currentTarget.value=``}})}),(0,F.jsx)(ZE,{type:`button`,variant:`outline`,"aria-label":`Choose files for ${e.label}`,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],disabled:a,onBlur:t.handleBlur,onClick:()=>{o.current?.click()},children:`Choose files`}),(0,F.jsx)(Ak,{items:i.map((e,t)=>({id:String(t),name:e.name,preview:{kind:`file`},progress:0,progressLabel:`${String(e.size)} bytes`,statusLabel:`Selected`,actions:a?{}:{remove:{label:`Remove`,accessibleLabel:`Remove ${e.name}`}}})),onRemove:e=>{t.handleChange(i.filter((t,n)=>String(n)!==e))},onCancel:()=>void 0,onRetry:()=>void 0})]})}function Wye({spec:e,field:t,locked:n,...r}){let i=e=>{t.handleChange(e)},a={...r,name:e.name,disabled:n,onBlur:t.handleBlur};switch(e.kind){case`text`:case`email`:case`url`:case`tel`:return(0,F.jsx)(nP,{...a,type:Hye[e.kind],inputMode:e.kind===`text`?void 0:e.kind,autoComplete:e.autoComplete,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}});case`textarea`:return(0,F.jsx)(Aye,{...a,rows:e.rows??3,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}});case`secret`:return(0,F.jsx)(Vye,{...r,field:t,spec:e,locked:n});case`money`:return(0,F.jsxs)(dk,{children:[(0,F.jsx)(fk,{className:`caps-field-currency`,children:e.currency??`USD`}),(0,F.jsx)(nP,{...a,inputMode:`decimal`,autoComplete:`off`,className:`caps-field-amount`,placeholder:e.placeholder??`0.00`,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}})]});case`date`:return(0,F.jsx)(nP,{...a,type:`date`,readOnly:e.readOnly,value:sP(t),onChange:e=>{i(e.currentTarget.value)}});case`number`:return(0,F.jsx)(Dk,{...a,...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max},...e.step===void 0?{}:{step:e.step},...e.unit===void 0?{}:{unit:e.unit},...e.wrap===void 0?{}:{wrap:e.wrap},disabled:n||e.readOnly===!0,decrementLabel:`Decrease ${e.label}`,incrementLabel:`Increase ${e.label}`,value:Lye(t),onValueChange:e=>{t.handleChange(e)}});case`select`:return(0,F.jsxs)(Dye,{...a,value:sP(t),onChange:e=>{i(e.currentTarget.value)},children:[e.placeholder===void 0?null:(0,F.jsx)(`option`,{value:``,disabled:!0,children:e.placeholder}),e.options.map(e=>(0,F.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]});case`combobox`:return(0,F.jsx)(yye,{id:r.id??e.name,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],"aria-required":r[`aria-required`],items:e.options,getKey:e=>e.value,getLabel:e=>e.label,isDisabled:t=>t.disabled||n||e.readOnly===!0,value:sP(t),...e.placeholder===void 0?{}:{placeholder:e.placeholder},trigger:(0,F.jsx)(_ye,{name:e.name,disabled:n||e.readOnly===!0,onBlur:t.handleBlur,children:e.options.find(e=>e.value===sP(t))?.label??e.placeholder??`Choose…`}),inputProps:{"aria-label":`Search ${e.label}`,disabled:n||e.readOnly===!0},onValueChange:e=>{i(e??``),t.handleBlur()}});case`file`:return(0,F.jsx)(Uye,{...r,spec:e,field:t,locked:n});case`checkbox`:return(0,F.jsx)(Rk,{...a,disabled:n||e.readOnly===!0,checked:cP(t),onChange:e=>{t.handleChange(e.currentTarget.checked)}});case`switch`:return(0,F.jsx)(kye,{...a,disabled:n||e.readOnly===!0,checked:cP(t),onCheckedChange:e=>{t.handleChange(e)}});case`radio`:case`icon-radio`:case`checkboxes`:case`icon-checkboxes`:return null}}var Gye=new Set([`radio`,`icon-radio`,`checkboxes`,`icon-checkboxes`]);function Kye({spec:e,field:t,locked:n,error:r,layout:i}){let a=n||e.readOnly===!0,o=e.label;if(e.kind===`checkboxes`||e.kind===`icon-checkboxes`){let n=Rye(t),s=(e,r)=>{t.handleChange(r?[...n,e]:n.filter(t=>t!==e))};return(0,F.jsx)(bk,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:e.kind===`icon-checkboxes`?(0,F.jsx)(`div`,{className:`caps-field-icon-choices`,children:e.options.map(r=>(0,F.jsx)(bye,{name:e.name,value:r.value,label:r.label,...r.caption===void 0?{}:{caption:r.caption},icon:r.icon,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))}):(0,F.jsx)(Sye,{children:e.options.map(r=>(0,F.jsx)(xye,{name:e.name,value:r.value,label:r.label,icon:r.icon,hint:r.description,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))})})}let s=e.options.some(e=>e.description!==void 0||e.meta!==void 0);return(0,F.jsx)(bk,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:(0,F.jsx)(wye,{name:e.name,"aria-label":o,value:sP(t),onValueChange:e=>{t.handleChange(e),t.handleBlur()},orientation:e.kind===`icon-radio`||s?`horizontal`:`vertical`,children:e.options.map(t=>e.kind===`icon-radio`?(0,F.jsx)(Eye,{value:t.value,label:t.label,...t.caption===void 0?{}:{caption:t.caption},icon:t.icon,disabled:t.disabled},t.value):s?(0,F.jsx)(Tye,{value:t.value,title:t.label,description:t.description,meta:t.meta,disabled:t.disabled},t.value):(0,F.jsx)(Sk,{label:t.label,orientation:`inline`,children:(0,F.jsx)(iP,{value:t.value,disabled:t.disabled})},t.value))})})}function qye({spec:e,field:t,locked:n,error:r,render:i,...a}){return i({name:e.name,label:e.label,help:e.help,value:Bye(t),onChange:e=>{t.handleChange(e)},onBlur:t.handleBlur,error:r,disabled:n,id:a.id??e.name,"aria-describedby":a[`aria-describedby`],"aria-invalid":r!==void 0})}function Jye({form:e,spec:t,locked:n,layout:r}){let i=QO({form:e,name:t.name}),a=XO(e.store,e=>e.submissionAttempts>0),o=i.state.meta.isBlurred||a?lk(i.state.meta):void 0;if(t.render===void 0&&Gye.has(t.kind))return(0,F.jsx)(Kye,{spec:t,field:i,locked:n,error:o,layout:r});let s=r===`columns`?t.kind===`switch`||t.kind===`checkbox`?`horizontal`:`vertical`:t.kind===`checkbox`?`inline`:(t.layout??(t.kind===`switch`?`row`:`stacked`))===`row`?`horizontal`:`vertical`;return(0,F.jsx)(Sk,{label:t.label,...r===`columns`?{labelTitle:t.label}:{},description:t.help,icon:t.icon,orientation:s,error:o,...t.required===void 0?{}:{required:t.required},...t.optional===void 0?{}:{optional:t.optional},children:t.render===void 0?(0,F.jsx)(Wye,{spec:t,field:i,locked:n}):(0,F.jsx)(qye,{spec:t,field:i,locked:n,error:o,render:t.render})})}var Yye=xb(noe(jb,oP));function lP({form:e,spec:t,locked:n,layout:r}){let i=t.when;return XO(e.store,e=>i===void 0||i(Um(Yye(e.values),()=>({}))))?(0,F.jsx)(Jye,{form:e,spec:t,locked:n,layout:r}):null}function Xye({form:e,section:t,locked:n,layout:r}){let i=t.fields.map(t=>(0,F.jsx)(lP,{form:e,spec:t,locked:n,layout:r},t.name));return t.title===void 0?i:(0,F.jsx)(yk,{title:t.title,description:t.description,layout:r,children:i})}function uP({model:e,names:t,disabled:n=!1,layout:r}){let i=e.form;return t===void 0?e.description.sections.map(e=>(0,F.jsx)(Xye,{form:i,section:e,locked:n,layout:r},e.id??``)):t.map(t=>{let a=e.description.fields.find(e=>e.name===t);return a===void 0?null:(0,F.jsx)(lP,{form:i,spec:a,locked:n,layout:r},t)})}var dP=class{annotation;constructor(e){this.annotation=e}},Zye=class{sections;constructor(e){this.sections=e}},fP=`caps/form`,pP=0;function mP(e){pP+=1;let t={[`${fP}:${String(pP)}`]:new dP(e)};return e.label!==void 0&&(t.title=e.label),e.help!==void 0&&(t.description=e.help),t}jb.annotate(mP({kind:`secret`})).pipe(ioe(`Secret`));var hP=e=>{let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)};function Qye(e){return Object.values(e??{}).reduce((e,t)=>t instanceof dP?{...e,...t.annotation}:e,{})}function gP(e){return e.reduce((e,t)=>({...e,...Qye(t)}),{})}function _P(e){let t=e?.[fP];return t instanceof Zye?t.sections:{}}var vP=xb(jb);function yP(e){if(tv(e))return Mne(vP(e.literal),{onNone:()=>null,onSome:e=>[e]});if(!av(e))return null;let t=[];for(let n of e.types){if($_(n))continue;let e=yP(n);if(e===null)return null;t.push(...e)}return t}function bP(e){if(ev(e))return{type:`string`,literals:[]};if(dae(e))return{type:`number`,nullable:!1};if(fae(e))return{type:`boolean`};let t=yP(e);if(t!==null)return{type:`string`,literals:t};if(rv(e)){let[t]=e.rest;if(t===void 0)return null;if(ev(t))return{type:`strings`,literals:[]};let n=yP(t);return n===null?null:{type:`strings`,literals:n}}if(av(e)){let t=e.types.filter(e=>!$_(e)&&!Q_(e)),n=e.types.some(e=>Q_(e)),[r]=t;if(t.length!==1||r===void 0)return null;let i=bP(r);return i?.type===`number`?{type:`number`,nullable:n}:n?null:i}return null}function $ye(e){let t=e.ast;if(!iv(t))throw Error(`A schema form needs a Schema.Struct.`);return{fields:t.propertySignatures.map(e=>{let t=String(e.name),n=Fy(e.type),r=gP([e.type.annotations,...(e.type.checks??[]).map(e=>e.annotations)]),i=r.kind===`file`?{type:`files`}:bP(n);if(i===null)throw Error(`Schema field "${t}" has no form control. Annotate it with field({ render }) or a kind.`);return{name:t,valueType:i,optional:e.type.context?.isOptional===!0,annotation:r,title:Zy(e.type),description:Qy(e.type)}}),sections:_P(Xy(t))}}function xP(e){let t=e,n=!1,r=!1;for(;;)if(t instanceof hu)n=!0,t=t.unwrap();else if(t instanceof yu)r=!0,t=t.unwrap();else if(t instanceof xu)t=t.unwrap();else if(t instanceof ku)t=t.in;else return{node:t,optional:n,nullable:r}}function SP(e){if(e instanceof $l){let t=e.options.map(e=>SP(e));return t.some(e=>e===null)?null:t.flatMap(e=>e??[])}let t=e instanceof lu?e.options:e instanceof du?[...e.values]:null;if(t===null)return null;let n=t.map(e=>vP(e));return n.every(Hm)?n.map(e=>e.value):null}function ebe(e){let{node:t,nullable:n}=xP(e);if(t instanceof ll)return{type:`string`,literals:[]};if(t instanceof Nl)return{type:`number`,nullable:n};if(t instanceof Ll)return{type:`boolean`};let r=SP(t);if(r!==null)return{type:`string`,literals:r};if(t instanceof ql){let e=xP(t.element).node;if(e instanceof ll)return{type:`strings`,literals:[]};let n=SP(e);return n===null?null:{type:`strings`,literals:n}}return null}function CP(e){let t=[e];for(;;){let e=t[t.length-1];if(e===void 0)break;let n=e instanceof hu||e instanceof yu||e instanceof xu?e.unwrap():e instanceof ku?e.in:e;if(n===e)break;t.push(n)}return t.reverse().map(e=>Zo.get(e))}function wP(e){return CP(e).reduce((e,t)=>({...e,...t}),{})}function tbe(e){return Object.entries(e.shape)}function nbe(e){let t=xP(e).node;if(!(t instanceof Yl))throw Error(`A schema form needs a z.object.`);return{fields:tbe(t).map(([e,t])=>{let n=gP(CP(t)),r=n.kind===`file`?{type:`files`}:ebe(t);if(r===null)throw Error(`Schema field "${e}" has no form control. Annotate it with field({ render }) or a kind.`);let i=wP(t);return{name:e,valueType:r,optional:xP(t).optional,annotation:n,title:i.title,description:i.description}}),sections:_P(wP(e))}}function rbe(e,t){let n=t.options??{};return(e.length>0?e:Object.keys(n)).map(e=>{let t=n[e],r=t===void 0?{}:t instanceof Object?t:{label:t};return{value:e,label:r.label??hP(e),description:r.description,meta:r.meta,icon:r.icon,caption:r.caption,disabled:r.disabled===!0}})}function ibe(e,t){let n=t.some(e=>e.icon!==void 0);switch(e.type){case`boolean`:return`switch`;case`number`:return`number`;case`strings`:return n?`icon-checkboxes`:`checkboxes`;case`files`:return`file`;case`string`:return t.length===0?`text`:t.length>12?`combobox`:n?`icon-radio`:t.some(e=>e.description!==void 0||e.meta!==void 0)||t.length<=3?`radio`:`select`}}function abe(e,t){switch(e.type){case`boolean`:return!1;case`number`:return e.nullable?null:0;case`strings`:case`files`:return[];case`string`:return t[0]?.value??``}}function obe(e){let t=e instanceof sl?nbe(e):$ye(e),n=t.fields.map((e,t)=>{let{kind:n,...r}=e.annotation,i=rbe(e.valueType.type===`string`||e.valueType.type===`strings`?e.valueType.literals:[],e.annotation),a=r.help??e.description;return{...r,name:e.name,label:r.label??e.title??hP(e.name),help:a,kind:n??ibe(e.valueType,i),options:i,optionalInSchema:e.optional,index:t}}),r={};t.fields.forEach((e,t)=>{let i=n[t];i&&(r[e.name]=abe(e.valueType,i.options))});let i=e=>e.order??e.index,a=e=>e.section!==void 0&&Object.hasOwn(t.sections,e.section)?e.section:null,o=e=>n.filter(t=>a(t)===e).sort((e,t)=>i(e)-i(t)),s=Object.entries(t.sections).map(([e,t])=>({id:e,title:t.title,description:t.description,fields:o(e)}));return{fields:n,sections:[{id:null,title:void 0,description:void 0,fields:o(null)},...s].filter(e=>e.fields.length>0),defaults:r}}function TP(e){let t=e instanceof sl?e:$ae(e);return{"~standard":{...t[`~standard`],validate:e=>{let n=t[`~standard`].validate(e);return n instanceof Promise?n.then(e=>EP(e)):EP(n)}}}}function EP(e){return e.issues===void 0?e:{issues:e.issues.map(e=>e.path===void 0?e:{...e,path:e.path.slice(0,1)})}}var DP=`onServer`;function OP(e){let t=e.querySelector(`[aria-invalid="true"]`),n=t?.matches(`input, select, textarea, button, [tabindex]`)?t:t?.querySelector(`input, select, textarea, button`);return n?.focus(),n!=null}function sbe(e){if(OP(e))return()=>void 0;let t=new MutationObserver(()=>{OP(e)&&t.disconnect()});return t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-invalid`]}),()=>{t.disconnect()}}function cbe(e){return e.state.meta.errorMap.onServer!==void 0}function lbe(e){e.setMeta(e=>({...e,errorMap:{...e.errorMap,[DP]:void 0}}))}function ube(e,t,n){e.setFieldMeta(t,e=>({...e,isBlurred:!0,errorMap:{...e.errorMap,[DP]:n}}))}function kP(e){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(e.defaultValues),[s,c]=(0,I.useState)(null);hO(a,e.defaultValues)||(o(e.defaultValues),c(null));let{schema:l}=e,u=(0,I.useMemo)(()=>obe(l),[l]),d=(0,I.useMemo)(()=>TP(l),[l]),f=ok({defaultValues:s??a,validators:{onChange:d,onSubmit:d},listeners:{onChange:({fieldApi:e})=>{n(null),i(null),cbe(e)&&lbe(e)}},onSubmit:async({value:t,formApi:r})=>{n(null),i(null);let a=await TP(l)[`~standard`].validate(t);if(a.issues){n(a.issues[0]?.message??`Check the form and try again.`);return}let o;try{o=await e.onSubmit(a.value,t)??{kind:`saved`}}catch(t){console.error(`SchemaForm submit failed`,t),n(e.failure??`Couldn't save changes. Try again.`);return}if(o.kind===`refused`){n(o.error??null);let e=r;for(let[t,n]of Object.entries(o.fields??{}))n!==void 0&&n.length>0&&ube(e,t,n);return}let s=o.values??t;c(s),r.reset(s),i(o.message??`Saved`),e.onSaved?.(s)}});return{description:u,form:f,error:t,saved:r,discard:()=>{n(null),i(null),f.reset()},submit:()=>f.handleSubmit()}}function AP(e){return{dirty:XO(e.form.store,e=>!e.isDefaultValue),submitting:XO(e.form.store,e=>e.isSubmitting),canSubmit:XO(e.form.store,e=>e.canSubmit)}}function jP({model:e,submitLabel:t=`Save changes`,discardLabel:n,onCancel:r,cancelLabel:i,allowClean:a,layout:o,footer:s,children:c,disabled:l=!1,...u}){let{submitting:d}=AP(e),f=(0,I.useRef)(null),p=(0,I.useRef)(()=>void 0);return(0,I.useEffect)(()=>()=>{p.current()},[]),(0,F.jsxs)(_k,{...u,ref:f,layout:o,busy:d,noValidate:!0,onSubmit:t=>{t.preventDefault(),e.form.state.isSubmitting||e.submit().then(()=>{p.current();let t=f.current;t!==null&&!e.form.state.isValid&&(p.current=sbe(t))})},children:[c??(0,F.jsx)(uP,{model:e,disabled:l,layout:o}),s===void 0?(0,F.jsx)(fbe,{model:e,label:t,discardLabel:r===void 0?n:void 0,onCancel:r,cancelLabel:i,allowClean:a??r!==void 0,divider:r===void 0}):s]})}function dbe({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i,...a}){let o=kP({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i});return(0,F.jsx)(jP,{...a,model:o})}function MP(e){return`model`in e?(0,F.jsx)(jP,{...e}):(0,F.jsx)(dbe,{...e})}function fbe({model:e,label:t,discardLabel:n,onCancel:r,cancelLabel:i=`Cancel`,allowClean:a=!1,dirtyLabel:o=`Unsaved changes`,buttonProps:s,...c}){let{dirty:l,submitting:u}=AP(e),d=u?null:e.saved&&!l?(0,F.jsx)(vm,{tone:`success`,size:`compact`,label:e.saved}):l?(0,F.jsx)(vm,{tone:`neutral`,size:`compact`,label:o}):null;return(0,F.jsxs)(gk,{...c,error:e.error,status:d,children:[r?(0,F.jsx)(ZE,{type:`button`,variant:`ghost`,disabled:u,onClick:r,children:i}):n&&l?(0,F.jsx)(ZE,{type:`button`,variant:`ghost`,disabled:u,onClick:e.discard,children:n}):null,(0,F.jsx)(ZE,{...s,type:`submit`,loading:u,disabled:u||!l&&!a,title:!l&&!a?`No changes to save`:void 0,children:t})]})}var NP=new Set([`Enter`,` `]),pbe=(0,I.forwardRef)(function({children:e,onConfirm:t,holdMs:n=900,holdHint:r=`Press and hold to confirm.`,className:i,disabled:a,loading:o=!1,result:s,resultLabel:c,onBlur:l,onKeyDown:u,onKeyUp:d,onPointerDown:f,onPointerUp:p,onPointerLeave:m,onPointerCancel:h,...g},_){let v=(0,I.useRef)(null),y=(0,I.useRef)(null),b=(0,I.useRef)(null),x=(0,I.useRef)(null),S=(0,I.useRef)(t),C=(0,I.useId)();(0,I.useEffect)(()=>{S.current=t},[t]),(0,I.useEffect)(()=>()=>{y.current?.cancel(),b.current!==null&&clearTimeout(b.current)},[]);let w=()=>{y.current=null,b.current=null,x.current=null,S.current();let e=v.current;if(!e||!Bd(e))return;let t=Fd(e);e.animate([{opacity:1},{opacity:0}],{duration:t.normal,easing:zd(t,t.easeExit)})},T=e=>{let t=v.current;if(a===!0||o||!t||y.current||b.current)return;if(x.current=e,!Bd(t)){b.current=setTimeout(w,n);return}let r=Fd(t),i=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:n,easing:r.reduced?`steps(3, end)`:zd(r,`cubic-bezier(0.3, 0, 0.7, 1)`)});i.addEventListener(`finish`,w),y.current=i},E=e=>{if(e!==void 0&&x.current!==e)return;x.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);let t=y.current,n=v.current;if(!t||!n)return;y.current=null;let r=getComputedStyle(n).transform;t.cancel();let i=Fd(n);n.animate([{transform:r===`none`?`scaleY(0)`:r},{transform:`scaleY(0)`}],{duration:i.fast,easing:zd(i,i.ease)})};return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(ZE,{...g,ref:_,disabled:a,loading:o,result:s,resultLabel:c??(s===void 0?void 0:e),"aria-describedby":C,className:Dd(`caps-hold-button`,i),onBlur:e=>{E(),l?.(e)},onPointerDown:e=>{f?.(e),e.button===0&&T(e.pointerId)},onPointerUp:e=>{p?.(e),E(e.pointerId)},onPointerLeave:e=>{m?.(e),E(e.pointerId)},onPointerCancel:e=>{h?.(e),E(e.pointerId)},onKeyDown:e=>{u?.(e),e.key===`Escape`&&E(),NP.has(e.key)&&(e.preventDefault(),e.repeat||T(`key`))},onKeyUp:e=>{d?.(e),NP.has(e.key)&&(e.preventDefault(),E(`key`))},children:[(0,F.jsx)(`span`,{ref:v,"aria-hidden":`true`,className:`caps-hold-fill`}),e]}),(0,F.jsx)(Md,{id:C,children:r})]})}),PP=(0,I.forwardRef)(function({className:e,...t},n){return(0,F.jsx)(`code`,{...t,className:Dd(`caps-inline-code`,e),ref:n})}),mbe=8e3,FP=(0,I.forwardRef)(function({className:e,detail:t,framed:n=!0,icon:r,message:i,onRetry:a,size:o=`md`,slowAfterMs:s=mbe,variant:c=`line`,...l},u){let[d,f]=(0,I.useState)(!1);return(0,I.useEffect)(()=>{if(f(!1),!Number.isFinite(s))return;let e=globalThis.setTimeout(()=>{f(!0)},s);return()=>{globalThis.clearTimeout(e)}},[s,i]),(0,F.jsxs)(`div`,{...l,className:Dd(`caps-loading-state`,e),"data-framed":n?void 0:`false`,"data-icon":r?``:void 0,"data-size":o,"data-slow":d||void 0,ref:u,role:`status`,children:[r?(0,F.jsx)(`span`,{"aria-hidden":`true`,className:`caps-loading-state-icon`,children:r}):null,(0,F.jsx)(um,{decorative:!0,size:o,variant:c}),(0,F.jsxs)(`span`,{className:`caps-loading-state-copy`,children:[(0,F.jsx)(`span`,{children:i}),t?(0,F.jsx)(`span`,{className:`caps-loading-state-detail`,children:t}):null,d?(0,F.jsx)(`span`,{className:`caps-loading-state-detail`,children:`Still working…`}):null]}),d&&a?(0,F.jsx)(ZE,{className:`caps-loading-state-retry`,size:`sm`,variant:`outline`,onClick:a,children:`Retry`}):null]})}),IP=`data-reorder-key`;function hbe(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{element:t,top:r.top-n.top+e.scrollTop,left:r.left-n.left+e.scrollLeft,width:r.width,height:r.height}}function gbe(e,t,n){e.forEach((e,r)=>{e.animate(t.reduced?[{opacity:0},{opacity:1}]:[{opacity:0,transform:`translateY(${String(t.distance)}px)`},{opacity:1,transform:`none`}],{duration:t.normal,delay:n+r*t.stagger,easing:zd(t,t.ease),fill:`backwards`})})}function _be(e,t,n){let r=t.element.cloneNode(!0);if(!(r instanceof HTMLElement))return;r.removeAttribute(IP),r.removeAttribute(`id`),r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`inert`,``),Object.assign(r.style,{position:`absolute`,top:`${String(t.top-e.clientTop)}px`,left:`${String(t.left-e.clientLeft)}px`,width:`${String(t.width)}px`,height:`${String(t.height)}px`,margin:`0`,pointerEvents:`none`});let i=getComputedStyle(e).position!==`static`;i||(e.style.position=`relative`),e.append(r);let a=r.animate(n.reduced?[{opacity:1},{opacity:0}]:[{opacity:1,transform:`none`},{opacity:0,transform:`translateY(${String(-n.distance)}px)`}],{duration:n.fast,easing:zd(n,n.easeExit),fill:`forwards`}),o=()=>{r.remove(),!i&&e.querySelector(`:scope > [inert]`)===null&&e.style.removeProperty(`position`)};a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o)}function vbe(e,t,n,r){let i=e.style.overflow;e.style.overflow=`clip`;let a=e.animate([{height:`${String(t)}px`},{height:`${String(n)}px`}],r),o=()=>{e.style.overflow=i};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a}function ybe(e,t){let n=(0,I.useRef)(null),r=(0,I.useRef)(0),i=(0,I.useRef)(null),a=t.join(`\0`);(0,I.useLayoutEffect)(()=>{let o=e.current;if(o===null){n.current=null;return}let s=n.current,c=s?.order!==a,l=i.current?o.getBoundingClientRect().height:r.current;c&&(i.current?.cancel(),i.current=null);let u=c?o.getBoundingClientRect().height:r.current;r.current=u;let d=new Map;for(let e of o.querySelectorAll(`:scope [${IP}]`)){let t=e.getAttribute(IP);if(t===null)continue;let n=s?.rows.get(t);d.set(t,!c&&n?.element===e?n:hbe(o,e))}let f=new Set(t);if(n.current={order:a,keys:f,rows:d},s===null||!c||!Bd(o))return;let p=Fd(o),m=[...s.rows].filter(([e,t])=>!f.has(e)&&!t.element.isConnected),h={duration:p.slow,delay:m.length>0?p.fast:0,easing:zd(p,p.ease),fill:`backwards`},g=[],_=[];for(let[e,t]of d){let n=s.rows.get(e);if(n===void 0){s.keys.has(e)||g.push(t.element);continue}let r=n.left-t.left,i=n.top-t.top;(r!==0||i!==0)&&(_.push(t.element),!(p.reduced||p.slow<=0)&&t.element.animate([{transform:`translate(${String(r)}px, ${String(i)}px)`},{transform:`none`}],h))}if(p.reduced)for(let e of _)e.animate([{opacity:.3},{opacity:1}],{duration:p.fast,easing:p.ease});else for(let[,e]of m)_be(o,e,p);if(gbe(g,p,_.length>0&&!p.reduced?p.fast:0),!p.reduced&&Math.abs(l-u)>.5){let e=vbe(o,l,u,h);i.current=e,e.addEventListener(`finish`,()=>{i.current===e&&(i.current=null)})}})}var LP=(0,I.createContext)(null);function RP(){let e=(0,I.useContext)(LP);if(!e)throw Error(`Shed data requires a workspace provider`);return e}function zP({label:e,order:t,children:n,listRoot:r}){let i=(0,I.useRef)(null),a=r??i;return ybe(a,t),(0,F.jsx)(`div`,{ref:a,children:(0,F.jsx)(Kme,{role:`list`,"aria-label":e,children:n})})}var bbe=R({command:$b.pipe(Bb(Zb(16384))).annotate(mP({label:`Command`,required:!0,placeholder:`pnpm dev`})),port:zb(vC.fields.port).annotate(mP({label:`Port (optional)`,help:`Web server preview only.`,min:1,max:65535,render:e=>(0,F.jsx)(nP,{name:e.name,id:e.id,type:`number`,inputMode:`numeric`,placeholder:`5173`,min:1,max:65535,step:1,value:e.value??``,disabled:e.disabled,"aria-describedby":e[`aria-describedby`],"aria-invalid":e[`aria-invalid`],onBlur:()=>{e.onBlur()},onChange:t=>{let n=t.currentTarget;e.onChange(n.value===``?null:n.valueAsNumber)}})}))}),xbe=[{command:`pwd`,label:`Folder`,port:null},{command:`ls`,label:`Files`,port:null},{command:`echo hello`,label:`Hello`,port:null}];function BP({openPreview:e,processNavigation:t}){let{ports:{items:n},processes:{items:r,loading:i,error:a,fix:o,actions:s,stop:c,start:l,output:u,unavailableReason:d}}=RP(),f=(0,I.useRef)(null),p=(0,I.useRef)(null),m=(0,I.useRef)(null),h=(0,I.useRef)(null),g=(0,I.useRef)(0),[_,v]=(0,I.useState)(null),y=e=>{Date.now()-g.current<900&&v(e)},b=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(!t||b.current===t.requestId||!f.current)return;let e=[...f.current.querySelectorAll(`[${IP}]`)].find(e=>e.getAttribute(IP)===t.processId);e&&(e.focus(),b.current=t.requestId)},[t,r]);let x=u?.processId??null,S=u?.data!==null;(0,I.useEffect)(()=>{x!==null&&S&&m.current?.scrollIntoView({block:`start`})},[x,S]);let C=u?.data?.lines.length??0,w=u?.data?.process.state===`running`;(0,I.useEffect)(()=>{let e=p.current;w&&e&&(e.scrollTop=e.scrollHeight)},[w,C]);let T=kP({schema:bbe,defaultValues:{command:``,port:null},onSubmit:async({command:e,port:t})=>await l?.(t===null?{command:e}:{command:e,port:t})?{kind:`saved`}:{kind:`refused`}}),E=r!==null||i||a!==null?i&&r===null?(0,F.jsx)(FP,{message:`Loading command history`,size:`sm`,framed:!1}):a!==null&&r===null?(0,F.jsx)(`div`,{className:`px-2 pb-3`,children:(0,F.jsx)(SD,{variant:`quiet`,role:`status`,title:`Can't run commands`,description:a.message,actions:o===void 0?void 0:(0,F.jsx)(ZE,{size:`xs`,variant:`outline`,onClick:()=>void o(),children:a.action===`grant`?`Allow access`:`Try again`})})}):r===null||r.length===0?(0,F.jsx)(`div`,{className:`px-2 pb-3`,children:(0,F.jsx)(SD,{variant:`quiet`,visual:`blobs`,headingLevel:3,title:`Your first command starts here`,description:`Choose a starter above, then press Start. Output and past commands stay here.`})}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`-mx-1`,children:(0,F.jsx)(zP,{label:`Computer process inventory`,order:r.map(({id:e})=>e),listRoot:f,children:r.map(t=>{let r=s?.get(t.id),i=t.state===`running`?n?.find(e=>e.port===t.port):void 0,a,o;t.state===`running`?(a=`success`,o=`Running`):t.state===`uncertain`?(a=`warning`,o=`Status unknown`):t.endedReason===`idle-sleep`?(a=`warning`,o=`Stopped when the Computer went to sleep`):t.exitCode===null?(a=`warning`,o=`Ended · exit not recorded`):(a=t.exitCode===0?`success`:`error`,o=`Exit ${String(t.exitCode)}`);let l=t.state===`exited`&&t.sync===`pending`;return(0,F.jsx)(zD,{[IP]:t.id,role:`listitem`,"data-process-state":t.state,"data-process-sync":t.sync,className:`py-2`,tabIndex:-1,primary:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(PP,{className:`block truncate`,"data-process-command":!0,children:t.command}),(0,F.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-normal`,children:[(0,F.jsx)(vm,{size:`compact`,tone:a,className:a===`error`?`text-error`:void 0,label:r===`stopping`?`Stopping`:o}),t.port===null?null:(0,F.jsxs)(`span`,{"data-process-port":!0,children:[`Port `,t.port]})]}),(0,F.jsxs)(F.Fragment,{children:[_===t.id?(0,F.jsx)(`span`,{role:`status`,className:`block text-xs font-normal text-(--stipe-fg-muted)`,children:`Hold to stop`}):null,l?(0,F.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:`Changes still copying to your files`}):null,t.cwd===null?null:(0,F.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:t.cwd})]})]}),actions:(0,F.jsxs)(F.Fragment,{children:[u?(0,F.jsx)(ZE,{size:`sm`,variant:`ghost`,"aria-label":`Show output of ${t.command}`,onClick:()=>{u.select(t.id)},children:`Output`}):null,i?(0,F.jsxs)(ZE,{size:`sm`,variant:`ghost`,"aria-label":`Open preview of port ${String(i.port)}`,onClick:()=>{e(i)},children:[(0,F.jsx)(er,{size:14,"aria-hidden":`true`}),` Open`]}):null,t.state===`running`&&c?(0,F.jsx)(pbe,{holdHint:`A stopped process cannot be resumed. Press and hold to stop it.`,size:`sm`,variant:`ghost`,className:`hover:text-error`,disabled:r===`stopping`,"aria-label":`Stop process ${t.command}`,onPointerDown:()=>{g.current=Date.now(),v(null)},onPointerUp:()=>{y(t.id)},onConfirm:()=>{v(null),c(t.id)},children:r===`stopping`?`Stopping…`:`Stop`}):null]})},t.id)})})}),i?(0,F.jsx)(FP,{message:`Refreshing processes…`,size:`sm`,framed:!1}):null]}):(0,F.jsx)(BD,{title:`Processes can't be listed yet`,children:`Allow Computer access to see and run commands.`});return(0,F.jsxs)(`div`,{className:`space-y-5 p-4 sm:p-6`,ref:h,children:[d?(0,F.jsx)(`p`,{role:`status`,className:`px-2 pt-3 text-sm`,children:d}):null,l&&(a===null||a.reason===`failed`)?(0,F.jsx)(T.form.Subscribe,{selector:e=>e.isSubmitting,children:e=>(0,F.jsxs)(`div`,{children:[(0,F.jsx)(MP,{model:T,"aria-label":`Start a process`,className:`space-y-3`,disabled:e||d!==void 0,footer:null,children:(0,F.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,F.jsx)(uP,{model:T,disabled:e||d!==void 0}),(0,F.jsx)(ZE,{className:`sm:col-span-2 sm:justify-self-start`,type:`submit`,variant:`primary`,loading:e,disabled:e||d!==void 0,onClick:()=>{T.form.setFieldMeta(`command`,e=>({...e,errorMap:{...e.errorMap,onServer:void 0}}))},children:`Start`})]})}),(0,F.jsx)(`ul`,{"aria-label":`Try one of these`,className:`m-0 mt-3 flex list-none flex-wrap gap-2 p-0`,children:xbe.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(ZE,{size:`sm`,variant:`outline`,disabled:e||d!==void 0,title:t.command,onClick:()=>{T.form.setFieldValue(`command`,t.command),T.form.setFieldValue(`port`,t.port),h.current?.querySelector(`input[name="command"]`)?.focus()},children:[t.label,` `,(0,F.jsx)(PP,{children:t.command})]})},t.command))})]})}):null,u?.processId?(0,F.jsxs)(`section`,{ref:m,"aria-label":`Process output`,className:`space-y-3`,children:[(0,F.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,F.jsx)(`span`,{className:`min-w-0 break-words font-mono text-sm font-semibold`,children:u.data?.process.command??`Process output`}),(0,F.jsx)(ZE,{size:`xs`,variant:`ghost`,onClick:()=>{u.select(null)},children:`Close output`})]}),u.failed?(0,F.jsx)(SD,{variant:`quiet`,title:`Output unavailable`,description:`Retry to read this command’s output.`,primaryAction:{label:`Retry`,onSelect:()=>void u.retry()}}):u.loading?(0,F.jsx)(FP,{size:`sm`,message:`Loading output`}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(iD,{children:(0,F.jsx)(`pre`,{ref:p,className:`max-h-48 overflow-auto whitespace-pre-wrap break-all p-3 text-xs`,children:u.data?.lines.length===0?u.data.process.state===`exited`?`Finished without output.`:`No output yet.`:u.data?.lines.join(`
|
|
96
96
|
`)})}),u.data?.process.state===`running`?(0,F.jsx)(`p`,{role:`status`,className:`text-xs`,children:`Updating while it runs`}):null,u.data?.process.endedReason===`idle-sleep`?(0,F.jsx)(`p`,{className:`text-xs`,children:`Stopped when the Computer went to sleep.`}):null,u.data?.process.exitCode==null?null:(0,F.jsxs)(`p`,{className:`text-xs`,children:[`Exit `,u.data.process.exitCode]}),u.data?.truncated?(0,F.jsx)(`p`,{className:`text-xs`,children:`Showing the most recent output.`}):null]})]}):null,(0,F.jsxs)(`section`,{"aria-label":`Process history`,className:`space-y-3`,children:[(0,F.jsx)(`h2`,{className:`text-sm font-semibold`,children:`History`}),E]})]})}function Sbe(e){return BP(e)}var Cbe=xb(bC.fields.id);function wbe(e,t){let n=MC(),r=e?.context.get().computerId??null,[i,a]=(0,I.useState)(null),o=i!==null&&i.computerId===r?i.id:null,s=vw({...ME(e,xC,jE.of(e,`process-output`,o),e=>{if(o===null)throw Error(`Choose a process to read its output`);return e.logs(o)}),enabled:o!==null&&e?.context.get().computerId!=null&&e.capabilities.has(xC),refetchInterval:e=>t&&o!==null&&e.state.data?.process.state!==`exited`?2e3:!1}),c={processId:o,data:s.data??null,loading:s.isPending,failed:s.isError,retry:async()=>{await s.refetch()},select:e=>{a(e===null?null:{computerId:r,id:e})}},l=e?.context.get().computerId!=null&&e.capabilities.has(xC),u=jE.of(e,`processes`),d=vw({...ME(e,xC,u,e=>e.list()),enabled:l,refetchInterval:t?1e4:!1});(0,I.useEffect)(()=>{d.isError&&DC(`Could not refresh processes. Try again.`,d.error)},[d.isError,d.errorUpdatedAt,d.error]),(0,I.useEffect)(()=>{s.isError&&DC(`Could not read command output. Try again.`,s.error)},[s.isError,s.errorUpdatedAt,s.error]);let f=l?e.capabilities.require(xC):null,p=xw({mutationKey:u,mutationFn:e=>{if(!f)throw new rx(`Processes are not granted`,{code:`CAPABILITY_DENIED`,retryable:!1});return f.kill(e)},onError:e=>{DC(`Could not stop the process. Try again.`,e)},onSettled:()=>n.invalidateQueries({queryKey:u,exact:!0})}),m=(0,I.useRef)(null),h=xw({mutationKey:jE.of(e,`process-start`),mutationFn:e=>{if(!f)throw new rx(`Processes are not granted`,{code:`CAPABILITY_DENIED`,retryable:!1});return f.start(e)},onSettled:()=>Promise.all([n.invalidateQueries({queryKey:u,exact:!0}),n.invalidateQueries({queryKey:jE.of(e,`ports`),exact:!0})])});async function g(e){let t=JSON.stringify(e),n=m.current?.input===t?m.current:{input:t,requestId:Qde()};m.current=n;try{let t=await h.mutateAsync({...e,requestId:n.requestId});return a({computerId:r,id:t.id}),m.current===n&&(m.current=null),!0}catch(e){return DC(`Couldn’t confirm the process start. Try again.`,e),!1}}let _=bw({filters:{mutationKey:u,exact:!0},select:({state:e})=>({id:Gm(Cbe(e.variables)),status:e.status})}),v=new Map;for(let{id:e,status:t}of _)e!==null&&(t===`pending`?v.set(e,`stopping`):t===`error`?v.set(e,`failed`):v.delete(e));return{query:d,stop:p,actions:v,enabled:l,startCommand:g,output:c}}var Tbe=xb(R({port:vC.fields.port,expose:Nb}));function Ebe(e,t){let n=MC(),r=e?.context.get().computerId!=null&&e.capabilities.has(yC),i=jE.of(e,`ports`),a=vw({...ME(e,yC,i,()=>{if(!e)throw new rx(`No App connection`,{code:`DISCONNECTED`,retryable:!0});return Pce(e.capabilities)}),enabled:r,refetchInterval:e=>t&&!(e.state.data&&`error`in e.state.data)?1e4:!1}),o=r?e.capabilities.require(yC):null,s=xw({mutationKey:i,mutationFn:async({port:e,expose:t})=>{if(!o)throw new rx(`Ports are not granted`,{code:`CAPABILITY_DENIED`,retryable:!1});t?await o.expose(e):await o.unexpose(e)},onSettled:()=>n.invalidateQueries({queryKey:i,exact:!0})}),c=bw({filters:{mutationKey:i,exact:!0},select:({state:e})=>({change:Gm(Tbe(e.variables)),status:e.status})}),l=new Map;for(let{change:e,status:t}of c)e&&(t===`pending`||t===`error`?l.set(e.port,{expose:e.expose,status:t===`pending`?`pending`:`failed`}):l.delete(e.port));return{query:a,enabled:r,status:r?a.isPending?`loading`:a.isError?`error`:`error`in a.data?`not-configured`:a.isFetching?`loading`:`loaded`:`unavailable`,actions:l,ports:r&&a.data&&`ports`in a.data?a.data.ports:null,change:async(e,t)=>{try{return await s.mutateAsync({port:e,expose:t}),!0}catch{return!1}}}}var VP=o((e=>{(function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(e){return i(o(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}function i(e,r){var i=1,a=e.length,o,s=``,c,l,u,d,f,p,m,h;for(c=0;c<a;c++)if(typeof e[c]==`string`)s+=e[c];else if(typeof e[c]==`object`){if(u=e[c],u.keys)for(o=r[i],l=0;l<u.keys.length;l++){if(o==null)throw Error(n(`[sprintf] Cannot access property "%s" of undefined value "%s"`,u.keys[l],u.keys[l-1]));o=o[u.keys[l]]}else o=u.param_no?r[u.param_no]:r[i++];if(t.not_type.test(u.type)&&t.not_primitive.test(u.type)&&o instanceof Function&&(o=o()),t.numeric_arg.test(u.type)&&typeof o!=`number`&&isNaN(o))throw TypeError(n(`[sprintf] expecting number but found %T`,o));switch(t.number.test(u.type)&&(m=o>=0),u.type){case`b`:o=parseInt(o,10).toString(2);break;case`c`:o=String.fromCharCode(parseInt(o,10));break;case`d`:case`i`:o=parseInt(o,10);break;case`j`:o=JSON.stringify(o,null,u.width?parseInt(u.width):0);break;case`e`:o=u.precision?parseFloat(o).toExponential(u.precision):parseFloat(o).toExponential();break;case`f`:o=u.precision?parseFloat(o).toFixed(u.precision):parseFloat(o);break;case`g`:o=u.precision?String(Number(o.toPrecision(u.precision))):parseFloat(o);break;case`o`:o=(parseInt(o,10)>>>0).toString(8);break;case`s`:o=String(o),o=u.precision?o.substring(0,u.precision):o;break;case`t`:o=String(!!o),o=u.precision?o.substring(0,u.precision):o;break;case`T`:o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=u.precision?o.substring(0,u.precision):o;break;case`u`:o=parseInt(o,10)>>>0;break;case`v`:o=o.valueOf(),o=u.precision?o.substring(0,u.precision):o;break;case`x`:o=(parseInt(o,10)>>>0).toString(16);break;case`X`:o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}t.json.test(u.type)?s+=o:(t.number.test(u.type)&&(!m||u.sign)?(h=m?`+`:`-`,o=o.toString().replace(t.sign,``)):h=``,f=u.pad_char?u.pad_char===`0`?`0`:u.pad_char.charAt(1):` `,p=u.width-(h+o).length,d=u.width&&p>0?f.repeat(p):``,s+=u.align?h+o+d:f===`0`?h+d+o:d+h+o)}return s}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var n=e,r,i=[],o=0;n;){if((r=t.text.exec(n))!==null)i.push(r[0]);else if((r=t.modulo.exec(n))!==null)i.push(`%`);else if((r=t.placeholder.exec(n))!==null){if(r[2]){o|=1;var s=[],c=r[2],l=[];if((l=t.key.exec(c))!==null)for(s.push(l[1]);(c=c.substring(l[0].length))!==``;)if((l=t.key_access.exec(c))!==null)s.push(l[1]);else if((l=t.index_access.exec(c))!==null)s.push(l[1]);else throw SyntaxError(`[sprintf] failed to parse named argument key`);else throw SyntaxError(`[sprintf] failed to parse named argument key`);r[2]=s}else o|=2;if(o===3)throw Error(`[sprintf] mixing positional and named placeholders is not (yet) supported`);i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}else throw SyntaxError(`[sprintf] unexpected placeholder`);n=n.substring(r[0].length)}return a[e]=i}e!==void 0&&(e.sprintf=n,e.vsprintf=r),typeof window<`u`&&(window.sprintf=n,window.vsprintf=r,typeof define==`function`&&define.amd&&define(function(){return{sprintf:n,vsprintf:r}}))})()}))(),HP=(e,t,n)=>{let r=e instanceof RegExp?UP(e,n):e,i=t instanceof RegExp?UP(t,n):t,a=r!==null&&i!=null&&Dbe(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},UP=(e,t)=>{let n=t.match(e);return n?n[0]:null},Dbe=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},WP=`\0SLASH`+Math.random()+`\0`,GP=`\0OPEN`+Math.random()+`\0`,KP=`\0CLOSE`+Math.random()+`\0`,qP=`\0COMMA`+Math.random()+`\0`,JP=`\0PERIOD`+Math.random()+`\0`,Obe=new RegExp(WP,`g`),kbe=new RegExp(GP,`g`),Abe=new RegExp(KP,`g`),jbe=new RegExp(qP,`g`),Mbe=new RegExp(JP,`g`),Nbe=/\\\\/g,Pbe=/\\{/g,Fbe=/\\}/g,Ibe=/\\,/g,Lbe=/\\\./g,Rbe=1e5,zbe=4e6;function YP(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Bbe(e){return e.replace(Nbe,WP).replace(Pbe,GP).replace(Fbe,KP).replace(Ibe,qP).replace(Lbe,JP)}function Vbe(e){return e.replace(Obe,`\\`).replace(kbe,`{`).replace(Abe,`}`).replace(jbe,`,`).replace(Mbe,`.`)}function XP(e){if(!e)return[``];let t=[],n=HP(`{`,`}`,e);if(!n)return e.split(`,`);let{pre:r,body:i,post:a}=n,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;let s=XP(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function Hbe(e,t={}){if(!e)return[];let{max:n=Rbe,maxLength:r=zbe}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),QP(Bbe(e),n,r,!0).map(Vbe)}function Ube(e){return`{`+e+`}`}function Wbe(e){return/^-?0\d/.test(e)}function Gbe(e,t){return e<=t}function Kbe(e,t){return e>=t}function ZP(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!(a&&!u)){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function qbe(e,t,n,r){let i=e.split(/\.\./),a=[];if(i[0]===void 0||i[1]===void 0)return a;let o=YP(i[0]),s=YP(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(YP(i[2])),1):1,u=Gbe;s<o&&(l*=-1,u=Kbe);let d=i.some(Wbe),f=0;for(let e=o;u(e,s)&&a.length<n;e+=l){let n;if(t)n=String.fromCharCode(e),n===`\\`&&(n=``);else if(n=String(e),d){let t=c-n.length;if(t>0){let r=Array(t+1).join(`0`);n=e<0?`-`+r+n.slice(1):r+n}}if(f+n.length>r)break;a.push(n),f+=n.length}return a}function QP(e,t,n,r){let i=[``],a=!1,o=!0;for(;;){let s=HP(`{`,`}`,e);if(!s)return ZP(i,e,[``],t,n,a);let c=s.pre;if(/\$$/.test(c)){if(i=ZP(i,c+`{`+s.body+`}`,[``],t,n,a&&!s.post.length),o=!1,!s.post.length)break;e=s.post;continue}let l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),d=l||u,f=s.body.indexOf(`,`)>=0;if(!d&&!f){if(s.post.match(/,(?!,).*\}/)){e=s.pre+`{`+s.body+KP+s.post,r=!0;continue}return ZP(i,c+`{`+s.body+`}`+s.post,[``],t,n,a)}o&&=(a=r&&!d,!1);let p;if(d)p=qbe(s.body,u,t,n);else{let r=XP(s.body);if(r.length===1&&r[0]!==void 0&&(r=QP(r[0],t,n,!1).map(Ube),r.length===1)){if(i=ZP(i,c+r[0],[``],t,n,a&&!s.post.length),!s.post.length)break;e=s.post;continue}let o=a&&!s.post.length&&!c;for(let e=0;o&&e<i.length;e++)i[e]&&(o=!1);p=[];let l=0;outer:for(let e=0;e<r.length;e++){let i=QP(r[e],t,n,!1);for(let e=0;e<i.length;e++){let r=i[e];if(!(o&&!r)){if(p.length>=t||l+r.length>n)break outer;p.push(r),l+=r.length}}}}if(i=ZP(i,c,p,t,n,a&&!s.post.length),!s.post.length)break;e=s.post}return i}var Jbe=65536,$P=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>Jbe)throw TypeError(`pattern is too long`)},Ybe={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},eF=e=>e.replace(/[[\]\\-]/g,`\\$&`),Xbe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),tF=e=>e.join(``),Zbe=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(Ybe))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(eF(d)+`-`+eF(t)):t===d&&r.push(eF(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(eF(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(eF(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[Xbe(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+tF(r)+`]`,p=`[`+(l?``:`^`)+tF(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},nF=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`),rF,Qbe=new Set([`!`,`?`,`+`,`*`,`@`]),iF=e=>Qbe.has(e),aF=e=>iF(e.type),$be=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),exe=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),txe=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),oF=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),nxe=`(?!(?:^|/)\\.\\.?(?:$|/))`,sF=`(?!\\.)`,rxe=new Set([`[`,`.`]),ixe=new Set([`..`,`.`]),axe=new Set(`().*{}+?[]^$\\!`),oxe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),sxe=`[^/]`,cxe=`[^/]*?`,cF=`[^/]+?`,lxe=0,lF=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++lxe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.#l=this.type?this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof rF&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof rF&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new rF(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&iF(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new rF(n,t);u=rF.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new rF(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&iF(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new rF(n,d);d.push(o),u=rF.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new rF(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,exe)}#m(e,t=$be){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=txe){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new rF(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!oF.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=oF.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new rF(null,void 0,t);return rF.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!aF(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?rF.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&ixe.has(this.#r[0]))){let n=rxe,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?nxe:o?sF:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,nF(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,nF(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?sF:``)+cF;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?sF:``)+`[^/]*?)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,nF(i),this.#t=!!this.#t,this.#n]}#x(){if(aF(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(axe.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?cF:cxe,t=!0;continue}if(o=!1,c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=Zbe(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=sxe,t=!0;continue}i+=oxe(c)}return[i,nF(e),!!t,a]}};rF=lF;var uxe=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),uF=(e,t,n={})=>($P(t),!n.nocomment&&t.charAt(0)===`#`?!1:new yF(t,n).match(e)),dxe=/^\*+([^+@!?*[(]*)$/,fxe=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),pxe=e=>t=>t.endsWith(e),mxe=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),hxe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),gxe=/^\*+\.\*+$/,_xe=e=>!e.startsWith(`.`)&&e.includes(`.`),vxe=e=>e!==`.`&&e!==`..`&&e.includes(`.`),yxe=/^\.\*+$/,bxe=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),xxe=/^\*+$/,Sxe=e=>e.length!==0&&!e.startsWith(`.`),Cxe=e=>e.length!==0&&e!==`.`&&e!==`..`,wxe=/^\?+([^+@!?*[(]*)?$/,Txe=([e,t=``])=>{let n=dF([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Exe=([e,t=``])=>{let n=fF([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Dxe=([e,t=``])=>{let n=fF([e]);return t?e=>n(e)&&e.endsWith(t):n},Oxe=([e,t=``])=>{let n=dF([e]);return t?e=>n(e)&&e.endsWith(t):n},dF=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},fF=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},pF=typeof process==`object`&&process?{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,mF={win32:{sep:`\\`},posix:{sep:`/`}};uF.sep=pF===`win32`?mF.win32.sep:mF.posix.sep;var hF=Symbol(`globstar **`);uF.GLOBSTAR=hF;var kxe=`[^/]*?`,Axe=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,jxe=`(?:(?!(?:\\/|^)\\.).)*?`;uF.filter=(e,t={})=>n=>uF(n,e,t);var gF=(e,t={})=>Object.assign({},e,t);uF.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return uF;let t=uF;return Object.assign((n,r,i={})=>t(n,r,gF(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,gF(e,n))}static defaults(n){return t.defaults(gF(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,gF(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,gF(e,r))}},unescape:(n,r={})=>t.unescape(n,gF(e,r)),escape:(n,r={})=>t.escape(n,gF(e,r)),filter:(n,r={})=>t.filter(n,gF(e,r)),defaults:n=>t.defaults(gF(e,n)),makeRe:(n,r={})=>t.makeRe(n,gF(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,gF(e,r)),match:(n,r,i={})=>t.match(n,r,gF(e,i)),sep:t.sep,GLOBSTAR:hF})};var _F=(e,t={})=>($P(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Hbe(e,{max:t.braceExpandMax}));uF.braceExpand=_F,uF.makeRe=(e,t={})=>new yF(e,t).makeRe(),uF.match=(e,t,n={})=>{let r=new yF(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};var vF=/[?*]|[+@!]\(.*?\)|\[|\]/,Mxe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),yF=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){$P(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||pF,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!vF.test(e[2]))&&!vF.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];(n!==1||r!==``||e[0]!==``)&&(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];(e!==1||r!==``||n[0]!==``)&&(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(hF)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(hF,i),o=t.lastIndexOf(hF),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===hF?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===hF)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return _F(this.pattern,this.options)}parse(e){$P(e);let t=this.options;if(e===`**`)return hF;if(e===``)return``;let n,r=null;(n=e.match(xxe))?r=t.dot?Cxe:Sxe:(n=e.match(dxe))?r=(t.nocase?t.dot?hxe:mxe:t.dot?pxe:fxe)(n[1]):(n=e.match(wxe))?r=(t.nocase?t.dot?Exe:Txe:t.dot?Dxe:Oxe)(n):(n=e.match(gxe))?r=t.dot?vxe:_xe:(n=e.match(yxe))&&(r=bxe);let i=lF.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?kxe:t.dot?Axe:jxe,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?Mxe(e):e===hF?hF:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e===hF&&a!==hF&&(a===void 0?i!==void 0&&i!==hF?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==hF&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=hF))});let i=t.filter(e=>e!==hF);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return uF.defaults(e).Minimatch}};uF.AST=lF,uF.Minimatch=yF,uF.escape=uxe,uF.unescape=nF;var bF=4,xF=0,SF=1,Nxe=2;function CF(e){let t=e.length;for(;--t>=0;)e[t]=0}var wF=29,TF=256,EF=286,DF=30,OF=19,kF=573,AF=15,jF=16,Pxe=7,MF=256,Fxe=16,Ixe=17,Lxe=18,NF=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),PF=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Rxe=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),FF=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),zxe=512,IF=Array(576);CF(IF);var LF=Array(DF*2);CF(LF);var RF=Array(zxe);CF(RF);var zF=Array(256);CF(zF);var BF=Array(wF);CF(BF);var VF=Array(DF);CF(VF);var HF=class{constructor(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}},UF,WF,GF,KF=class{constructor(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}},qF=e=>e<256?RF[e]:RF[256+(e>>>7)],JF=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},YF=(e,t,n)=>{e.bi_valid>jF-n?(e.bi_buf|=t<<e.bi_valid&65535,JF(e,e.bi_buf),e.bi_buf=t>>jF-e.bi_valid,e.bi_valid+=n-jF):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},XF=(e,t,n)=>{YF(e,n[t*2],n[t*2+1])},ZF=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},Bxe=e=>{e.bi_valid===16?(JF(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Vxe=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=AF;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<kF;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},QF=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=AF;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=ZF(r[t]++,t))}},Hxe=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<wF-1;r++)for(BF[r]=n,e=0;e<1<<NF[r];e++)zF[n++]=r;for(zF[n-1]=r,i=0,r=0;r<16;r++)for(VF[r]=i,e=0;e<1<<PF[r];e++)RF[i++]=r;for(i>>=7;r<DF;r++)for(VF[r]=i<<7,e=0;e<1<<PF[r]-7;e++)RF[256+i++]=r;for(t=0;t<=AF;t++)a[t]=0;for(e=0;e<=143;)IF[e*2+1]=8,e++,a[8]++;for(;e<=255;)IF[e*2+1]=9,e++,a[9]++;for(;e<=279;)IF[e*2+1]=7,e++,a[7]++;for(;e<=287;)IF[e*2+1]=8,e++,a[8]++;for(QF(IF,287,a),e=0;e<DF;e++)LF[e*2+1]=5,LF[e*2]=ZF(e,5);UF=new HF(IF,NF,257,EF,AF),WF=new HF(LF,PF,0,DF,AF),GF=new HF([],Rxe,0,OF,Pxe)},$F=e=>{let t;for(t=0;t<EF;t++)e.dyn_ltree[t*2]=0;for(t=0;t<DF;t++)e.dyn_dtree[t*2]=0;for(t=0;t<OF;t++)e.bl_tree[t*2]=0;e.dyn_ltree[MF*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},eI=e=>{e.bi_valid>8?JF(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},tI=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},nI=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&tI(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!tI(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},rI=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?XF(e,i,t):(o=zF[i],XF(e,o+TF+1,t),s=NF[o],s!==0&&(i-=BF[o],YF(e,i,s)),r--,o=qF(r),XF(e,o,n),s=PF[o],s!==0&&(r-=VF[o],YF(e,r,s)));while(a<e.sym_next);XF(e,MF,t)},iI=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=kF,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)nI(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],nI(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,nI(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Vxe(e,t),QF(n,c,e.bl_count)},aI=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},oI=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do XF(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(XF(e,Ixe,e.bl_tree),YF(e,s-3,3)):(XF(e,Lxe,e.bl_tree),YF(e,s-11,7)):(a!==i&&(XF(e,a,e.bl_tree),s--),XF(e,Fxe,e.bl_tree),YF(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},Uxe=e=>{let t;for(aI(e,e.dyn_ltree,e.l_desc.max_code),aI(e,e.dyn_dtree,e.d_desc.max_code),iI(e,e.bl_desc),t=18;t>=3&&e.bl_tree[FF[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},Wxe=(e,t,n,r)=>{let i;for(YF(e,t-257,5),YF(e,n-1,5),YF(e,r-4,4),i=0;i<r;i++)YF(e,e.bl_tree[FF[i]*2+1],3);oI(e,e.dyn_ltree,t-1),oI(e,e.dyn_dtree,n-1)},Gxe=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return xF;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return SF;for(n=32;n<TF;n++)if(e.dyn_ltree[n*2]!==0)return SF;return xF},Kxe=!1,qxe=e=>{Kxe||=(Hxe(),!0),e.l_desc=new KF(e.dyn_ltree,UF),e.d_desc=new KF(e.dyn_dtree,WF),e.bl_desc=new KF(e.bl_tree,GF),e.bi_buf=0,e.bi_valid=0,$F(e)},sI=(e,t,n,r)=>{YF(e,0+ +!!r,3),eI(e),JF(e,n),JF(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},Jxe=e=>{YF(e,2,3),XF(e,MF,IF),Bxe(e)},Yxe=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===Nxe&&(e.strm.data_type=Gxe(e)),iI(e,e.l_desc),iI(e,e.d_desc),o=Uxe(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,(a<=i||e.strategy===bF)&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?sI(e,t,n,r):e.strategy===bF||a===i?(YF(e,2+ +!!r,3),rI(e,IF,LF)):(YF(e,4+ +!!r,3),Wxe(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),rI(e,e.dyn_ltree,e.dyn_dtree)),$F(e),r&&eI(e)},cI=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(zF[n]+TF+1)*2]++,e.dyn_dtree[qF(t)*2]++),e.sym_next===e.sym_end),lI=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},Xxe=(()=>{let e=new Uint32Array(2048),t;for(let n=0;n<256;n++){t=n;for(let e=0;e<8;e++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}for(let n=0;n<256;n++){t=e[n];for(let r=256;r<2048;r+=256)t=e[t&255]^t>>>8,e[r+n]=t}return e})(),uI=(e,t,n,r)=>{let i=Xxe,a=r+n,o=r;e^=-1;for(let n=a-7;o<n;o+=8)e^=t[o]|t[o+1]<<8|t[o+2]<<16|t[o+3]<<24,e=i[1792+(e&255)]^i[1536+(e>>>8&255)]^i[1280+(e>>>16&255)]^i[1024+(e>>>24)]^i[768+t[o+4]]^i[512+t[o+5]]^i[256+t[o+6]]^i[t[o+7]];for(;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},dI={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`},Zxe=9,Qxe=573,fI=3,pI=258,mI=262,$xe=32,hI=42,gI=57,_I=69,vI=73,yI=91,bI=103,xI=113,SI=666,CI=1,wI=2,TI=3,EI=4,eSe=3,DI=(e,t)=>(e.msg=dI[t],t),OI=e=>e*2-(e>4?9:0),kI=e=>{let t=e.length;for(;--t>=0;)e[t]=0},tSe=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},AI=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,jI=(e,t)=>{let n;if(e.legacy_hash)n=e.ins_h=AI(e,e.ins_h,e.window[t+fI-1]);else{let r=e.window,i=r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24;n=e.ins_h=Math.imul(i,66521)+66521>>>16&e.hash_mask}let r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},MI=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},NI=(e,t)=>{Yxe(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,MI(e.strm)},PI=(e,t)=>{e.pending_buf[e.pending++]=t},FI=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},II=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=lI(e.adler,t,i,n):e.state.wrap===2&&(e.adler=uI(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},LI=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-mI?e.strstart-(e.w_size-mI):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+pI,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=pI-(f-r),r=f-pI,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},RI=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-mI)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),tSe(e),r+=t),e.strm.avail_in===0)break;if(n=II(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,!e.legacy_hash){if(e.lookahead+e.insert>fI)for(i=e.strstart-e.insert;e.insert&&(jI(e,i),i++,e.insert--,!(e.lookahead+e.insert<=fI)););}else if(e.lookahead+e.insert>=fI)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=AI(e,e.ins_h,e.window[i+1]);e.insert&&(jI(e,i),i++,e.insert--,!(e.lookahead+e.insert<fI)););}while(e.lookahead<mI&&e.strm.avail_in!==0)},zI=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==4||t===0||r!==i+e.strm.avail_in)))break;o=+(t===4&&r===i+e.strm.avail_in),sI(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,MI(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(II(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?EI:t!==0&&t!==4&&e.strm.avail_in===0&&e.strstart===e.block_start?wI:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(II(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===4)&&t!==0&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===4&&e.strm.avail_in===0&&r===i),sI(e,e.block_start,r,o),e.block_start+=r,MI(e.strm)),o?TI:CI)},BI=(e,t)=>{let n,r;for(;;){if(e.lookahead<mI){if(RI(e),e.lookahead<mI&&t===0)return CI;if(e.lookahead===0)break}if(n=0,e.lookahead>=fI&&(n=jI(e,e.strstart)),n!==0&&e.strstart-n<=e.w_size-mI&&(e.match_length=LI(e,n)),e.match_length>=fI){if(r=cI(e,e.strstart-e.match_start,e.match_length-fI),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=fI){e.match_length--;do e.strstart++,n=jI(e,e.strstart);while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=AI(e,e.ins_h,e.window[e.strstart+1]))}else r=cI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(NI(e,!1),e.strm.avail_out===0))return CI}return e.insert=e.strstart<fI-1?e.strstart:fI-1,t===4?(NI(e,!0),e.strm.avail_out===0?TI:EI):e.sym_next&&(NI(e,!1),e.strm.avail_out===0)?CI:wI},VI=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<mI){if(RI(e),e.lookahead<mI&&t===0)return CI;if(e.lookahead===0)break}if(n=0,e.lookahead>=fI&&(n=jI(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=fI-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-mI&&(e.match_length=LI(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===fI&&e.strstart-e.match_start>4096)&&(e.match_length=fI-1)),e.prev_length>=fI&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-fI,r=cI(e,e.strstart-1-e.prev_match,e.prev_length-fI),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(n=jI(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=fI-1,e.strstart++,r&&(NI(e,!1),e.strm.avail_out===0))return CI}else if(e.match_available){if(r=cI(e,0,e.window[e.strstart-1]),r&&NI(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return CI}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=cI(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<fI-1?e.strstart:fI-1,t===4?(NI(e,!0),e.strm.avail_out===0?TI:EI):e.sym_next&&(NI(e,!1),e.strm.avail_out===0)?CI:wI},nSe=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=pI){if(RI(e),e.lookahead<=pI&&t===0)return CI;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=fI&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+pI;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=pI-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=fI?(n=cI(e,1,e.match_length-fI),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=cI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(NI(e,!1),e.strm.avail_out===0))return CI}return e.insert=0,t===4?(NI(e,!0),e.strm.avail_out===0?TI:EI):e.sym_next&&(NI(e,!1),e.strm.avail_out===0)?CI:wI},rSe=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(RI(e),e.lookahead===0)){if(t===0)return CI;break}if(e.match_length=0,n=cI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(NI(e,!1),e.strm.avail_out===0))return CI}return e.insert=0,t===4?(NI(e,!0),e.strm.avail_out===0?TI:EI):e.sym_next&&(NI(e,!1),e.strm.avail_out===0)?CI:wI},HI=class{constructor(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}},UI=[new HI(0,0,0,0,zI),new HI(4,4,8,4,BI),new HI(4,5,16,8,BI),new HI(4,6,32,32,BI),new HI(4,4,16,16,VI),new HI(8,16,32,32,VI),new HI(8,16,128,128,VI),new HI(8,32,128,256,VI),new HI(32,128,258,1024,VI),new HI(32,258,258,4096,VI)],iSe=e=>{e.window_size=2*e.w_size,kI(e.head),e.max_lazy_match=UI[e.level].max_lazy,e.good_match=UI[e.level].good_length,e.nice_match=UI[e.level].nice_length,e.max_chain_length=UI[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=fI-1,e.match_available=0,e.ins_h=0},aSe=class{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Qxe*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),kI(this.dyn_ltree),kI(this.dyn_dtree),kI(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),kI(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),kI(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}},WI=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==hI&&t.status!==gI&&t.status!==_I&&t.status!==vI&&t.status!==yI&&t.status!==bI&&t.status!==xI&&t.status!==SI)},oSe=e=>{if(WI(e))return DI(e,-2);e.total_in=e.total_out=0,e.data_type=2;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?gI:t.wrap?hI:xI,e.adler=t.wrap===2?0:1,t.last_flush=-2,qxe(t),0},sSe=e=>{let t=oSe(e);return t===0&&iSe(e.state),t},cSe=(e,t,n,r,i,a,o)=>{if(!e)return-2;let s=1;if(t===-1&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>Zxe||n!==8||r<8||r>15||t<0||t>9||a<0||a>4||r===8&&s!==1)return DI(e,-2);r===8&&(r=9);let c=new aSe;return e.state=c,c.strm=e,c.status=hI,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.legacy_hash=+!!o,c.hash_bits=i+7,!c.legacy_hash&&c.hash_bits<15&&(c.hash_bits=15),c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+fI-1)/fI),c.window=new Uint8Array(c.w_size*2),c.head=new Uint16Array(c.hash_size),c.prev=new Uint16Array(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new Uint8Array(c.pending_buf_size),c.sym_buf=c.lit_bufsize,c.sym_end=(c.lit_bufsize-1)*3,c.level=t,c.strategy=a,c.method=n,sSe(e)},lSe=(e,t)=>{if(WI(e)||t>5||t<0)return e?DI(e,-2):-2;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===SI&&t!==4)return DI(e,e.avail_out===0?-5:-2);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(MI(e),e.avail_out===0)return n.last_flush=-1,0}else if(e.avail_in===0&&OI(t)<=OI(r)&&t!==4)return DI(e,-5);if(n.status===SI&&e.avail_in!==0)return DI(e,-5);if(n.status===hI&&n.wrap===0&&(n.status=xI),n.status===hI){let t=8+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=2||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=$xe),t+=31-t%31,FI(n,t),n.strstart!==0&&(FI(n,e.adler>>>16),FI(n,e.adler&65535)),e.adler=1,n.status=xI,MI(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===gI){if(e.adler=0,PI(n,31),PI(n,139),PI(n,8),n.gzhead)PI(n,+!!n.gzhead.text+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),PI(n,n.gzhead.time&255),PI(n,n.gzhead.time>>8&255),PI(n,n.gzhead.time>>16&255),PI(n,n.gzhead.time>>24&255),PI(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),PI(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(PI(n,n.gzhead.extra.length&255),PI(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=uI(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=_I;else if(PI(n,0),PI(n,0),PI(n,0),PI(n,0),PI(n,0),PI(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),PI(n,eSe),n.status=xI,MI(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===_I){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=uI(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,MI(e),n.pending!==0)return n.last_flush=-1,0;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=uI(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=vI}if(n.status===vI){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=uI(e.adler,n.pending_buf,n.pending-t,t)),MI(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,PI(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=uI(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=yI}if(n.status===yI){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=uI(e.adler,n.pending_buf,n.pending-t,t)),MI(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,PI(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=uI(e.adler,n.pending_buf,n.pending-t,t))}n.status=bI}if(n.status===bI){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(MI(e),n.pending!==0))return n.last_flush=-1,0;PI(n,e.adler&255),PI(n,e.adler>>8&255),e.adler=0}if(n.status=xI,MI(e),n.pending!==0)return n.last_flush=-1,0}if(e.avail_in!==0||n.lookahead!==0||t!==0&&n.status!==SI){let r=n.level===0?zI(n,t):n.strategy===2?rSe(n,t):n.strategy===3?nSe(n,t):UI[n.level].func(n,t);if((r===TI||r===EI)&&(n.status=SI),r===CI||r===TI)return e.avail_out===0&&(n.last_flush=-1),0;if(r===wI&&(t===1?Jxe(n):t!==5&&(sI(n,0,0,!1),t===3&&(kI(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),MI(e),e.avail_out===0))return n.last_flush=-1,0}return t===4?n.wrap<=0?1:(n.wrap===2?(PI(n,e.adler&255),PI(n,e.adler>>8&255),PI(n,e.adler>>16&255),PI(n,e.adler>>24&255),PI(n,e.total_in&255),PI(n,e.total_in>>8&255),PI(n,e.total_in>>16&255),PI(n,e.total_in>>24&255)):(FI(n,e.adler>>>16),FI(n,e.adler&65535)),MI(e),n.wrap>0&&(n.wrap=-n.wrap),+(n.pending===0)):0},uSe=e=>{if(WI(e))return-2;let t=e.state.status;return e.state=null,t===xI?DI(e,-3):0},dSe=(e,t)=>{let n=t.length;if(WI(e))return-2;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==hI||r.lookahead)return-2;if(i===1&&(e.adler=lI(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(kI(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,RI(r);r.lookahead>=fI;){let e=r.strstart,t=r.lookahead-(fI-1);do jI(r,e),e++;while(--t);r.strstart=e,r.lookahead=fI-1,RI(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=fI-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,0},GI=16209,fSe=16191;function pSe(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=GI;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=GI;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=GI;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=fSe;break top}else{e.msg=`invalid literal/length code`,E.mode=GI;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p}var KI=15,qI=852,JI=592,YI=0,XI=1,ZI=2,mSe=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),hSe=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),gSe=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),_Se=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),QI=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,k,A,j;for(l=0;l<=KI;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=KI;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=KI;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===YI||f!==1))return-1;for(D[1]=0,l=1;l<KI;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===YI?(w=O=o,T=20):e===XI?(w=mSe,O=hSe,T=257):(w=gSe,O=_Se,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===XI&&_>qI||e===ZI&&_>JI)return 1;for(;;){k=l-h,o[u]+1<T?(A=0,j=o[u]):o[u]>=T?(A=O[o[u]-T],j=w[o[u]-T]):(A=96,j=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=k<<24|A<<16|j|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===XI&&_>qI||e===ZI&&_>JI)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0},vSe=0,$I=1,eL=2,tL=16180,nL=16181,rL=16182,iL=16183,aL=16184,oL=16185,sL=16186,cL=16187,lL=16188,uL=16189,dL=16190,fL=16191,pL=16192,mL=16193,hL=16194,gL=16195,_L=16196,vL=16197,yL=16198,bL=16199,xL=16200,SL=16201,CL=16202,wL=16203,TL=16204,EL=16205,DL=16206,OL=16207,kL=16208,AL=16209,jL=16210,ML=16211,ySe=852,bSe=592,NL=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24),xSe=class{constructor(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}},PL=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<tL||t.mode>ML)},SSe=e=>{if(PL(e))return-2;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=tL,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ySe),t.distcode=t.distdyn=new Int32Array(bSe),t.sane=1,t.back=-1,0},FL=e=>{if(PL(e))return-2;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,SSe(e)},CSe=(e,t)=>{let n;if(PL(e))return-2;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?-2:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,FL(e))},wSe=(e,t)=>{if(!e)return-2;let n=new xSe;e.state=n,n.strm=e,n.window=null,n.mode=tL;let r=CSe(e,t);return r!==0&&(e.state=null),r},IL=!0,LL,RL,TSe=e=>{if(IL){LL=new Int32Array(512),RL=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(QI($I,e.lens,0,288,LL,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;QI(eL,e.lens,0,32,RL,0,e.work,{bits:5}),IL=!1}e.lencode=LL,e.lenbits=9,e.distcode=RL,e.distbits=5},zL=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.window=new Uint8Array(1<<a.wbits)),a.wsize===0&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},BL=(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(PL(e)||!e.output||!e.input&&e.avail_in!==0)return-2;n=e.state,n.mode===fL&&(n.mode=pL),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=0;inf_leave:for(;;)switch(n.mode){case tL:if(n.wrap===0){n.mode=pL;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=uI(n.check,T,2,0),l=0,u=0,n.mode=nL;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=AL;break}if((l&15)!=8){e.msg=`unknown compression method`,n.mode=AL;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=AL;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?uL:fL,l=0,u=0;break;case nL:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!=8){e.msg=`unknown compression method`,n.mode=AL;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=AL;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=uI(n.check,T,2,0)),l=0,u=0,n.mode=rL;case rL:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l>>>0),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=uI(n.check,T,4,0)),l=0,u=0,n.mode=iL;case iL:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=uI(n.check,T,2,0)),l=0,u=0,n.mode=aL;case aL:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=uI(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=oL;case oL:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=uI(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=sL;case sL:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C),n.length++);while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=uI(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=cL;case cL:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C),n.length++);while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=uI(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=lL;case lL:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=AL;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=fL;break;case uL:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=NL(l),l=0,u=0,n.mode=dL;case dL:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,2;e.adler=n.check=1,n.mode=fL;case fL:if(t===5||t===6)break inf_leave;case pL:if(n.last){l>>>=u&7,u-=u&7,n.mode=DL;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=mL;break;case 1:if(TSe(n),n.mode=bL,t===6){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=_L;break;case 3:e.msg=`invalid block type`,n.mode=AL}l>>>=2,u-=2;break;case mL:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=AL;break}if(n.length=l&65535,l=0,u=0,n.mode=hL,t===6)break inf_leave;case hL:n.mode=gL;case gL:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=fL;break;case _L:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=AL;break}n.have=0,n.mode=vL;case vL:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=QI(vSe,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=AL;break}n.have=0,n.mode=yL;case yL:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=AL;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=AL;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===AL)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=AL;break}if(n.lenbits=9,E={bits:n.lenbits},w=QI($I,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=AL;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=QI(eL,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=AL;break}if(n.mode=bL,t===6)break inf_leave;case bL:n.mode=xL;case xL:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,pSe(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===fL&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=EL;break}if(v&32){n.back=-1,n.mode=fL;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=AL;break}n.extra=v&15,n.mode=SL;case SL:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=CL;case CL:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=AL;break}n.offset=y,n.extra=v&15,n.mode=wL;case wL:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=AL;break}n.mode=TL;case TL:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=AL;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=xL);break;case EL:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=xL;break;case DL:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?uI(n.check,i,f,o-f):lI(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:NL(l))!==n.check){e.msg=`incorrect data check`,n.mode=AL;break}l=0,u=0}n.mode=OL;case OL:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=AL;break}l=0,u=0}n.mode=kL;case kL:w=1;break inf_leave;case AL:w=-3;break inf_leave;case jL:return-4;case ML:default:return-2}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<AL&&(n.mode<DL||t!==4))&&zL(e,e.output,e.next_out,f-e.avail_out)?(n.mode=jL,-4):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?uI(n.check,i,f,e.next_out-f):lI(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===fL?128:0)+(n.mode===bL||n.mode===hL?256:0),(d===0&&f===0||t===4)&&w===0&&(w=-5),w)},VL=e=>{if(PL(e))return-2;let t=e.state;return t.window&&=null,e.state=null,0},HL=(e,t)=>{let n=t.length,r,i,a;return PL(e)||(r=e.state,r.wrap!==0&&r.mode!==dL)?-2:r.mode===dL&&(i=1,i=lI(i,t,n,0),i!==r.check)?-3:(a=zL(e,t,n,n),a?(r.mode=jL,-4):(r.havedict=1,0))},UL=class{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},WL=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t},GL=Object.prototype.toString,ESe={level:-1,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,raw:!1,gzip:!1,legacyHash:!1,dictionary:new Uint8Array},DSe=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},ESe,e);let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new UL,this.strm.avail_out=0;let n=cSe(this.strm,t.level,8,t.windowBits,t.memLevel,t.strategy,t.legacyHash);if(n!==0)throw Error(dI[n]);GL.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(r.length){if(t.gzip)throw Error(`dictionary is not supported with gzip`);if(n=dSe(this.strm,r),n!==0)throw Error(dI[n])}}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=typeof t==`number`?t:t===!0?4:0,n.input=typeof e==`string`?new TextEncoder().encode(e):GL.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===2||a===3)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=lSe(n,a),i===-2)break;if(i===1){n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=uSe(this.strm);break}if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)return!0}return this.err=i,this.msg=n.msg||dI[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=WL(this.chunks)),this.chunks=[]}},KL=Object.prototype.toString,OSe={chunkSize:65536,windowBits:15,raw:!1,dictionary:new Uint8Array},kSe=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},OSe,e);let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!e.windowBits&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new UL,this.strm.avail_out=0;let n=wSe(this.strm,t.windowBits);if(n!==0)throw Error(dI[n]);KL.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(t.raw&&r.length&&(n=HL(this.strm,r),n!==0))throw Error(dI[n])}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a,o;if(this.ended)return this.err===0;for(a=typeof t==`number`?t:t===!0?4:0,n.input=KL.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=BL(n,a),i===2){let e=this.options.dictionary;e.length&&(i=HL(n,e),i===0?i=BL(n,a):i===-3&&(i=2))}for(;n.avail_in>0&&i===1&&n.state.wrap&2&&n.state.flags!==0&&n.input[n.next_in]!==0;)FL(n),i=BL(n,a);if(i===-2||i===-3||i===2||i===-4)break;if(o=n.avail_out,n.next_out&&(n.avail_out===0||i===1||a>0)&&(this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out)),n.avail_out=0,n.next_out=0),i!==0&&i!==-5||o!==0){if(i===1){i=VL(this.strm);break}if(n.avail_in===0){if(a===4){i=VL(this.strm),i===0&&(i=-5);break}return!0}}}return this.err=i,this.msg=n.msg||dI[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=WL(this.chunks)),this.chunks=[]}};function qL(e,t,n){let r=0,i=e.onData;if(e.onData=function(e){if(e.byteLength>n-r)throw Error(`gzip output exceeds limit (${n} bytes)`);r+=e.byteLength,i.call(this,e)},!e.push(t,!0)||e.err||e.result===void 0)throw Error(e.msg||`Invalid or incomplete gzip stream`);return e.result}function JL(e){if(!Number.isSafeInteger(e)||e<=0)throw Error(`gzip output limit must be a positive safe integer`);return Math.min(e,65536)}function YL(e,t){return qL(new kSe({windowBits:31,chunkSize:JL(t)}),e,t)}function ASe(e,t,n){return qL(new DSe({gzip:!0,level:n,chunkSize:JL(t)}),e,t)}var XL=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends XL{};function ZL(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function QL(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function $L(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function eR(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function tR(e,t){return $L(e,t,``)}function nR(e,t){return eR(e,t,``)}function rR(e,t){return t.slice(0,jSe(e,t))}function jSe(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function iR(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function aR(e,t){if(t)return sR(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function oR(e,t){if(t)return sR(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function sR(e,t){if(!t)return[oR(e),aR(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=iR(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var cR=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,MSe=RegExp(`[${cR}]+|\\s+|[^${cR}]`,`ug`);new class extends XL{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=iR(e,r)}else n=e.match(MSe)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&lR(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&lR(n,i,r,null,t.intlSegmenter),e}};function lR(e,t,n,r,i){if(t&&n){let[a,o]=sR(t.value,i),[s,c]=sR(n.value,i);if(e){let r=ZL(a,s);e.value=eR(e.value,s,r),t.value=tR(t.value,r),n.value=tR(n.value,r)}if(r){let e=QL(o,c);r.value=$L(r.value,c,e),t.value=nR(t.value,e),n.value=nR(n.value,e)}}else if(n){if(e){let e=oR(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=oR(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=oR(r.value,i),[a,o]=sR(t.value,i),s=ZL(n,a);t.value=tR(t.value,s);let c=QL(tR(n,s),o);t.value=nR(t.value,c),r.value=$L(r.value,n,c),e.value=eR(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=oR(r.value,i),n=rR(aR(t.value,i),e);t.value=nR(t.value,n)}else if(e){let n=rR(aR(e.value,i),oR(t.value,i));t.value=tR(t.value,n)}}new class extends XL{tokenize(e){let t=RegExp(`(\\r?\\n)|[${cR}]+|[^\\S\\n\\r]+|[^${cR}]`,`ug`);return e.match(t)||[]}};var NSe=new class extends XL{constructor(){super(...arguments),this.tokenize=dR}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
|
|
97
97
|
`))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
|
|
98
98
|
`))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
|