@sentry/junior-dashboard 0.228.0 → 0.229.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.js CHANGED
@@ -66,7 +66,7 @@ ${s}
66
66
 
67
67
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let i of e.seen.entries()){let A=i[1];if(t===i[0]){o(i);continue}if(e.external){let u=e.external.registry.get(i[0])?.id;if(t!==i[0]&&u){o(i);continue}}if(e.metadataRegistry.get(i[0])?.id){o(i);continue}if(A.cycle){o(i);continue}if(A.count>1&&e.reused==="ref"){o(i);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function aT(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let r of t){if(!r||typeof r!="object")return;aT(r);let a=Object.keys(r);if(a.length!==1||a[0]!=="type")return;let o=r.type;for(let i of Array.isArray(o)?o:[o]){if(typeof i!="string")return;n.includes(i)||n.push(i)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var rT=new Set(["type","properties","required","additionalProperties"]),tT=["oneOf","anyOf"];function nT(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function DF(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let i in o)if(!rT.has(i))return null;t.push(o)}let n={},r=new Set;for(let o of t){for(let i in o.properties){if(Object.prototype.hasOwnProperty.call(n,i))continue;let A=[];for(let u of t){let d=u.properties?.[i]??nT(u);d!=null&&(A.some(l=>JSON.stringify(l)===JSON.stringify(d))||A.push(d))}let s=A.length===1?A[0]:DF(A)??{allOf:A};gn(n,i,s)}for(let i of o.required??[])r.add(i)}let a={type:"object",properties:n};if(r.size&&(a.required=[...r]),t.every(o=>o.additionalProperties===!1))a.additionalProperties=!1;else{let o=[];for(let i of t){let A=nT(i);A&&!o.some(s=>JSON.stringify(s)===JSON.stringify(A))&&o.push(A)}o.length===1?a.additionalProperties=o[0]:o.length>1&&(a.additionalProperties={allOf:o})}return a}function xle(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let a of rT)if(a in e)return;let n=t.filter(a=>tT.some(o=>Array.isArray(a[o]))),r=null;if(!n.length)r=DF(t);else{let a=n[0],o=tT.find(s=>Array.isArray(a[s]));if(Object.keys(a).length!==1)return;let i=t.filter(s=>s!==a),A=a[o].map(s=>DF([...i,s]));if(A.some(s=>!s))return;r={[o]:A}}r&&(delete e.allOf,bb(e,r))}function tu(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=A=>{let s=e.seen.get(A);if(s.ref===null)return;let u=s.def??s.schema,d={...u},l=s.ref;if(s.ref=null,l){r(l);let p=e.seen.get(l),g=p.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(g)):bb(u,g),bb(u,d),A._zod.parent===l)for(let B in u)B==="$ref"||B==="allOf"||B in d||delete u[B];if(g.$ref&&p.def)for(let B in u)B==="$ref"||B==="allOf"||B in p.def&&JSON.stringify(u[B])===JSON.stringify(p.def[B])&&delete u[B]}let m=A._zod.parent;if(m&&m!==l){r(m);let p=e.seen.get(m);if(p?.schema.$ref&&(u.$ref=p.schema.$ref,p.def))for(let g in u)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(u[g])===JSON.stringify(p.def[g])&&delete u[g]}e.override({zodSchema:A,jsonSchema:u,path:s.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let A of[...e.seen.entries()].reverse())r(A[0]);if(e.target!=="openapi-3.0")for(let A of e.seen.entries())aT(A[1].def??A[1].schema);for(let A of e.deferred)A();if(e.intersections.length){let A=new Map;for(let s of e.seen.values())for(let u of[s.schema,s.def]){let d=u?.allOf;if(!Array.isArray(d))continue;let l=A.get(d);l?l.push(u):A.set(d,[u])}for(let s of e.intersections)for(let u of A.get(s)??[])xle(u)}}let a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let A=e.external.registry.get(t)?.id;if(!A)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(A)}bb(a,n.defId?n.schema:n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&a.id===o&&delete a.id;let i=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let A of e.seen.entries()){let s=A[1];s.def&&s.defId&&(s.def.id===s.defId&&delete s.def.id,gn(i,s.defId,s.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{let A=JSON.parse(JSON.stringify(a));return Object.defineProperty(A,"~standard",{value:{...t["~standard"],jsonSchema:{input:nm(t,"input",e.processors),output:nm(t,"output",e.processors)}},enumerable:!1,writable:!1}),A}catch{throw new Error("Error converting schema to JSON.")}}function vr(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 vr(r.element,n);if(r.type==="set")return vr(r.valueType,n);if(r.type==="lazy")return vr(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"||r.type==="catch")return vr(r.innerType,n);if(r.type==="intersection")return vr(r.left,n)||vr(r.right,n);if(r.type==="record"||r.type==="map")return vr(r.keyType,n)||vr(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:vr(r.in,n)||vr(r.out,n);if(r.type==="object"){for(let a in r.shape)if(vr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(let a of r.options)if(vr(a,n))return!0;return!1}if(r.type==="tuple"){for(let a of r.items)if(vr(a,n))return!0;return!!(r.rest&&vr(r.rest,n))}return!1}var FF=(e,t={})=>n=>{let r=Xc({...n,processors:t});return wt(e,r),eu(r,e),tu(r,e)},nm=(e,t,n={})=>r=>{let{libraryOptions:a,target:o}=r??{},i=Xc({...a??{},target:o,io:t,processors:n});return wt(e,i),eu(i,e),tu(i,e)};var Dle={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},LF=(e,t,n,r)=>{let a=n;a.type="string";let{minimum:o,maximum:i,format:A,patterns:s,contentEncoding:u,laxFormat:d}=e._zod.bag;if(typeof o=="number"&&(a.minLength=o),typeof i=="number"&&(a.maxLength=i),A&&(a.format=Dle[A]??A,a.format===""&&delete a.format,(A==="time"||d)&&delete a.format),u&&(a.contentEncoding=u),s&&s.size>0){let l=[...s];l.length===1?a.pattern=l[0].source:l.length>1&&(a.allOf=[...l.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},RF=(e,t,n,r)=>{let a=n,{minimum:o,maximum:i,format:A,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof A=="string"&&A.includes("int")?a.type="integer":a.type="number";let l=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),m=typeof u=="number"&&u<=(i??Number.POSITIVE_INFINITY),p=t.target==="draft-04"||t.target==="openapi-3.0";l?p?(a.minimum=d,a.exclusiveMinimum=!0):a.exclusiveMinimum=d:typeof o=="number"&&(a.minimum=o),m?p?(a.maximum=u,a.exclusiveMaximum=!0):a.exclusiveMaximum=u:typeof i=="number"&&(a.maximum=i),typeof s=="number"&&(Number.isFinite(s)&&s!==0?a.multipleOf=Math.abs(s):la(e,t,a,r,`A multipleOf divisor of ${s} cannot be represented in JSON Schema`))},$F=(e,t,n,r)=>{n.type="boolean"},MF=(e,t,n,r)=>{la(e,t,n,r,"BigInt cannot be represented in JSON Schema")},jF=(e,t,n,r)=>{la(e,t,n,r,"Symbols cannot be represented in JSON Schema")},PF=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},TF=(e,t,n,r)=>{la(e,t,n,r,"Undefined cannot be represented in JSON Schema")},HF=(e,t,n,r)=>{la(e,t,n,r,"Void cannot be represented in JSON Schema")},GF=(e,t,n,r)=>{n.not={}},UF=(e,t,n,r)=>{},OF=(e,t,n,r)=>{},qF=(e,t,n,r)=>{la(e,t,n,r,"Date cannot be represented in JSON Schema")},zF=(e,t,n,r)=>{let a=e._zod.def,o=Of(a.entries);if(o.length===0){n.not={};return}o.every(i=>typeof i=="number")&&(n.type="number"),o.every(i=>typeof i=="string")&&(n.type="string"),n.enum=o},KF=(e,t,n,r)=>{let a=e._zod.def;if(a.values.length===0){n.not={};return}let o=[];for(let i of a.values)if(i===void 0){if(la(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof i=="bigint"){if(la(e,t,n,r,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(i))}else o.push(i);if(o.length!==0)if(o.length===1){let i=o[0];n.type=i===null?"null":typeof i,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[i]:n.const=i}else o.every(i=>typeof i=="number")&&(n.type="number"),o.every(i=>typeof i=="string")&&(n.type="string"),o.every(i=>typeof i=="boolean")&&(n.type="boolean"),o.every(i=>i===null)&&(n.type="null"),n.enum=o},YF=(e,t,n,r)=>{la(e,t,n,r,"NaN cannot be represented in JSON Schema")},JF=(e,t,n,r)=>{let a=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=o.source},WF=(e,t,n,r)=>{let a=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:A,mime:s}=e._zod.bag;i!==void 0&&(o.minLength=i),A!==void 0&&(o.maxLength=A),s?s.length===1?(o.contentMediaType=s[0],Object.assign(a,o)):(Object.assign(a,o),a.anyOf=s.map(u=>({contentMediaType:u}))):Object.assign(a,o)},ZF=(e,t,n,r)=>{n.type="boolean"},VF=(e,t,n,r)=>{la(e,t,n,r,"Custom types cannot be represented in JSON Schema")},XF=(e,t,n,r)=>{la(e,t,n,r,"Function types cannot be represented in JSON Schema")},e8=(e,t,n,r)=>{la(e,t,n,r,"Transforms cannot be represented in JSON Schema")},t8=(e,t,n,r)=>{la(e,t,n,r,"Map cannot be represented in JSON Schema")},n8=(e,t,n,r)=>{la(e,t,n,r,"Set cannot be represented in JSON Schema")},a8=(e,t,n,r)=>{let a=n,o=e._zod.def,{minimum:i,maximum:A}=e._zod.bag;typeof i=="number"&&(a.minItems=i),typeof A=="number"&&(a.maxItems=A),a.type="array",a.items=wt(o.element,t,{...r,path:[...r.path,"items"]})};function hb(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?hb(t.out):t.type==="catch"?hb(t.innerType):e._zod.optin}var r8=(e,t,n,r)=>{let a=n,o=e._zod.def,i=o.shape;if(Object.getOwnPropertySymbols(i).length&&la(e,t,a,r,"Symbol keys cannot be represented in JSON Schema"))return;a.type="object",a.properties={};for(let d in i)gn(a.properties,d,wt(i[d],t,{...r,path:[...r.path,"properties",d]}));let s=new Set(Object.keys(i)),u=new Set([...s].filter(d=>{let l=o.shape[d];return t.io==="input"?hb(l)===void 0:l._zod.optout===void 0}));u.size>0&&(a.required=Array.from(u)),o.catchall?._zod.def.type==="never"?a.additionalProperties=!1:o.catchall?o.catchall&&(a.additionalProperties=wt(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},rE=(e,t,n,r)=>{let a=e._zod.def,o=a.inclusive===!1,i=a.options.map((A,s)=>wt(A,t,{...r,path:[...r.path,o?"oneOf":"anyOf",s]}));o?n.oneOf=i:n.anyOf=i},o8=(e,t,n,r)=>{let a=e._zod.def,o=wt(a.left,t,{...r,path:[...r.path,"allOf",0]}),i=wt(a.right,t,{...r,path:[...r.path,"allOf",1]}),A=u=>"allOf"in u&&Object.keys(u).length===1,s=[...A(o)?o.allOf:[o],...A(i)?i.allOf:[i]];n.allOf=s,t.intersections.push(s)},i8=(e,t,n,r)=>{let a=n,o=e._zod.def;a.type="array";let i=t.target==="draft-2020-12"?"prefixItems":"items",A=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",s=o.items.map((b,B)=>wt(b,t,{...r,path:[...r.path,i,B]})),u=o.rest?wt(o.rest,t,{...r,path:[...r.path,A,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,d=o.items.length;for(;d>0;){let b=o.items[d-1];if(!(t.io==="input"?hb(b)!==void 0:b._zod.optout==="optional"))break;d--}let l=o.items.length,m=!o.rest;t.target==="draft-2020-12"?(a.prefixItems=s,m?a.items=!1:u&&(a.items=u),d>0&&(a.minItems=d),m&&(a.maxItems=l)):t.target==="openapi-3.0"?(a.items={anyOf:s},u&&a.items.anyOf.push(u),d>0&&(a.minItems=d),m&&(a.maxItems=l)):(a.items=s,m?a.additionalItems=!1:u&&(a.additionalItems=u),d>0&&(a.minItems=d),m&&(a.maxItems=l));let{minimum:p,maximum:g}=e._zod.bag;typeof p=="number"&&(a.minItems=p),typeof g=="number"&&(a.maxItems=g)};function SF(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let g=e.get(t)?.def;if(!g)return t;let b=SF(e,g,n);return b===g?t:b}for(let g of["anyOf","oneOf"]){let b=t[g];if(!Array.isArray(b))continue;let B=b.map(h=>SF(e,h,n));B.some((h,f)=>h!==b[f])&&(t={...t,[g]:B})}let r=Array.isArray(t.type)?t.type:[t.type],a=!r.includes("string")&&r.some(g=>g==="number"||g==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!a&&!o?.some(g=>typeof g=="number"))return t;let{minimum:i,maximum:A,exclusiveMinimum:s,exclusiveMaximum:u,multipleOf:d,format:l,id:m,...p}=t;return p.enum?p.enum=p.enum.map(g=>typeof g=="number"?String(g):g):typeof p.const=="number"&&(p.const=String(p.const)),a&&(p.type="string",o||(p.pattern=(r.includes("number")?Wc:eb).source)),p}var NF=new WeakMap;function Fle(e){let t=new Map;for(let r of e.seen.values())r.def&&!t.has(r.schema)&&t.set(r.schema,r);let n=new Map;for(let r of NF.get(e)??[]){let a=e.seen.get(r),o=(a?.def??a?.schema)?.propertyNames;if(!o||o===!0||n.has(o))continue;let i=SF(t,o,new Set);i!==o&&n.set(o,i)}if(n.size)for(let r of e.seen.values())for(let a of[r.schema,r.def]){let o=a&&n.get(a.propertyNames);o&&(a.propertyNames=o)}}var A8=(e,t,n,r)=>{let a=n,o=e._zod.def;a.type="object";let i=o.keyType,s=i._zod.bag?.patterns;if(o.mode==="loose"&&s&&s.size>0){let l=wt(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(let m of s)gn(a.patternProperties,m.source,l)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){a.propertyNames=wt(o.keyType,t,{...r,path:[...r.path,"propertyNames"]});let l=NF.get(t);l||(l=[],NF.set(t,l),t.deferred.push(()=>Fle(t))),l.push(e)}a.additionalProperties=wt(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]})}let u=i._zod.values,d=t.io==="input"&&hb(o.valueType)!==void 0;if(u&&!o.partial&&!d){let l=[...u].filter(m=>typeof m=="string"||typeof m=="number");l.length>0&&(a.required=l.map(String))}},s8=(e,t,n,r)=>{let a=e._zod.def,o=wt(a.innerType,t,r),i=t.seen.get(e);t.target==="openapi-3.0"?(i.ref=a.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},c8=(e,t,n,r)=>{let a=e._zod.def;wt(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},u8=Symbol();function oT(e,t,n,r,a){let o=!1,i=JSON.stringify(e,(A,s)=>typeof s!="bigint"?s:(o=!0,null));return o?(la(t,n,r,a,"BigInt defaults cannot be represented in JSON Schema"),u8):JSON.parse(i)}var d8=(e,t,n,r)=>{let a=e._zod.def;wt(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType;let i=oT(a.defaultValue,e,t,n,r);i!==u8&&(n.default=i)},l8=(e,t,n,r)=>{let a=e._zod.def;wt(a.innerType,t,r);let o=t.seen.get(e);if(o.ref=a.innerType,t.io!=="input")return;let i=oT(a.defaultValue,e,t,n,r);i!==u8&&(n._prefault=i)},p8=(e,t,n,r)=>{let a=e._zod.def;wt(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType;let i;try{i=a.catchValue(void 0)}catch{la(e,t,n,r,"Dynamic catch values are not supported in JSON Schema");return}n.default=i},m8=(e,t,n,r)=>{let a=e._zod.def,o=a.in._zod.traits.has("$ZodTransform"),i=t.io==="input"?o?a.out:a.in:a.out;wt(i,t,r);let A=t.seen.get(e);A.ref=i},g8=(e,t,n,r)=>{let a=e._zod.def;wt(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType,n.readOnly=!0},f8=(e,t,n,r)=>{let a=e._zod.def;wt(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},oE=(e,t,n,r)=>{let a=e._zod.def;wt(a.innerType,t,r);let o=t.seen.get(e);o.ref=a.innerType},b8=(e,t,n,r)=>{let a=e._zod.innerType;wt(a,t,r);let o=t.seen.get(e);o.ref=a},aE={string:LF,number:RF,boolean:$F,bigint:MF,symbol:jF,null:PF,undefined:TF,void:HF,never:GF,any:UF,unknown:OF,date:qF,enum:zF,literal:KF,nan:YF,template_literal:JF,file:WF,success:ZF,custom:VF,function:XF,transform:e8,map:t8,set:n8,array:a8,object:r8,union:rE,intersection:o8,tuple:i8,record:A8,nullable:s8,nonoptional:c8,default:d8,prefault:l8,catch:p8,pipe:m8,readonly:g8,promise:f8,optional:oE,lazy:b8};function iE(e,t){if("_idmap"in e){let r=e,a=Xc({...t,processors:aE}),o={};for(let s of r._idmap.entries()){let[u,d]=s;wt(d,a)}let i={},A={registry:r,uri:t?.uri,defs:o};a.external=A;for(let s of r._idmap.entries()){let[u,d]=s;eu(a,d),gn(i,u,tu(a,d))}if(Object.keys(o).length>0){let s=a.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:o}}return{schemas:i}}let n=Xc({...t,processors:aE});return wt(e,n),eu(n,e),tu(n,e)}var AE=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Xc({processors:aE,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return wt(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,eu(this.ctx,t);let r=tu(this.ctx,t),{"~standard":a,...o}=r;return o}};var iT={};var dm={};L(dm,{ZodAny:()=>j8,ZodArray:()=>G8,ZodBase64:()=>vE,ZodBase64URL:()=>IE,ZodBigInt:()=>cm,ZodBigIntFormat:()=>DE,ZodBoolean:()=>sm,ZodCIDRv4:()=>kE,ZodCIDRv6:()=>QE,ZodCUID:()=>bE,ZodCUID2:()=>hE,ZodCatch:()=>c2,ZodCodec:()=>_b,ZodCreditCard:()=>F8,ZodCustom:()=>xb,ZodCustomStringFormat:()=>im,ZodDate:()=>wb,ZodDefault:()=>a2,ZodDiscriminatedUnion:()=>O8,ZodE164:()=>_E,ZodEmail:()=>pE,ZodEmoji:()=>gE,ZodEnum:()=>rm,ZodExactOptional:()=>LE,ZodFile:()=>X8,ZodFunction:()=>B2,ZodGUID:()=>mE,ZodIPv4:()=>wE,ZodIPv6:()=>EE,ZodISODate:()=>au,ZodISODateTime:()=>nu,ZodISODuration:()=>ou,ZodISOTime:()=>ru,ZodIntersection:()=>q8,ZodJWT:()=>xE,ZodKSUID:()=>CE,ZodLazy:()=>f2,ZodLiteral:()=>V8,ZodMAC:()=>D8,ZodMap:()=>W8,ZodNaN:()=>d2,ZodNanoID:()=>fE,ZodNever:()=>T8,ZodNonOptional:()=>RE,ZodNull:()=>$8,ZodNullable:()=>n2,ZodNumber:()=>Am,ZodNumberFormat:()=>xd,ZodObject:()=>kb,ZodOptional:()=>vb,ZodPipe:()=>Ib,ZodPrefault:()=>o2,ZodPreprocess:()=>l2,ZodPromise:()=>h2,ZodReadonly:()=>p2,ZodRecord:()=>am,ZodSet:()=>Z8,ZodString:()=>om,ZodStringFormat:()=>Rt,ZodSuccess:()=>s2,ZodSymbol:()=>L8,ZodTemplateLiteral:()=>g2,ZodTransform:()=>e2,ZodTuple:()=>K8,ZodType:()=>Ne,ZodULID:()=>BE,ZodURL:()=>Cb,ZodUUID:()=>$A,ZodUndefined:()=>R8,ZodUnion:()=>Qb,ZodUnknown:()=>P8,ZodVoid:()=>H8,ZodXID:()=>yE,ZodXor:()=>U8,_ZodString:()=>lE,_default:()=>r2,_function:()=>fH,any:()=>KT,array:()=>Eb,base64:()=>xT,base64url:()=>DT,bigint:()=>GT,boolean:()=>N8,catch:()=>u2,check:()=>bH,cidrv4:()=>IT,cidrv6:()=>_T,codec:()=>lH,creditCard:()=>ST,cuid:()=>BT,cuid2:()=>yT,custom:()=>hH,date:()=>JT,describe:()=>BH,discriminatedUnion:()=>tH,e164:()=>FT,email:()=>cT,emoji:()=>bT,enum:()=>SE,exactOptional:()=>t2,file:()=>sH,float32:()=>jT,float64:()=>PT,function:()=>fH,guid:()=>uT,hash:()=>MT,hex:()=>$T,hostname:()=>RT,httpUrl:()=>fT,instanceof:()=>CH,int:()=>uE,int32:()=>TT,int64:()=>UT,intersection:()=>z8,invertCodec:()=>pH,ipv4:()=>kT,ipv6:()=>vT,json:()=>EH,jwt:()=>NT,keyof:()=>WT,ksuid:()=>ET,lazy:()=>b2,literal:()=>AH,looseObject:()=>XT,looseRecord:()=>aH,mac:()=>QT,map:()=>rH,meta:()=>yH,nan:()=>dH,nanoid:()=>hT,nativeEnum:()=>iH,never:()=>FE,nonoptional:()=>A2,null:()=>M8,nullable:()=>yb,nullish:()=>cH,number:()=>S8,object:()=>ZT,optional:()=>Id,partialRecord:()=>nH,pipe:()=>dE,prefault:()=>i2,preprocess:()=>kH,promise:()=>gH,readonly:()=>m2,record:()=>J8,refine:()=>y2,set:()=>oH,strictObject:()=>VT,string:()=>Bb,stringFormat:()=>LT,stringbool:()=>wH,success:()=>uH,superRefine:()=>C2,symbol:()=>qT,templateLiteral:()=>mH,transform:()=>NE,tuple:()=>Y8,uint32:()=>HT,uint64:()=>OT,ulid:()=>CT,undefined:()=>zT,union:()=>um,unknown:()=>vd,url:()=>gT,uuid:()=>dT,uuidv4:()=>lT,uuidv6:()=>pT,uuidv7:()=>mT,void:()=>YT,xid:()=>wT,xor:()=>eH});var sE={};L(sE,{endsWith:()=>Yp,gt:()=>LA,gte:()=>_o,includes:()=>zp,length:()=>Qd,lowercase:()=>Op,lt:()=>NA,lte:()=>Io,maxLength:()=>kd,maxSize:()=>Vc,mime:()=>Jp,minLength:()=>$s,minSize:()=>RA,multipleOf:()=>Zc,negative:()=>Vw,nonnegative:()=>eE,nonpositive:()=>Xw,normalize:()=>Wp,overwrite:()=>Ti,positive:()=>Zw,properties:()=>nE,property:()=>tE,regex:()=>Up,size:()=>Ed,slugify:()=>em,startsWith:()=>Kp,toLowerCase:()=>Vp,toUpperCase:()=>Xp,trim:()=>Zp,uppercase:()=>qp});var AT=new WeakSet([Object.prototype,Error.prototype]);function cE(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let r=n(this);return Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,t,{value:r,configurable:!0,writable:!0})}})}var sT=(e,t)=>{Zf.init(e,t),e.name="ZodError";let n=Object.getPrototypeOf(e);AT.has(n)||(AT.add(n),cE(n,"format",r=>a=>Xf(r,a)),cE(n,"flatten",r=>a=>Vf(r,a)),cE(n,"addIssue",r=>a=>{r.issues.push(a),r.message=JSON.stringify(r.issues,Np,2)}),cE(n,"addIssues",r=>a=>{r.issues.push(...a),r.message=JSON.stringify(r.issues,Np,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Nle=_("ZodError",sT),to=_("ZodError",sT,void 0,{Parent:Error});var h8=$p(to),B8=Mp(to),y8=jp(to),C8=Pp(to),w8=GC(to),E8=UC(to),k8=OC(to),Q8=qC(to),v8=zC(to),I8=KC(to),_8=YC(to),x8=JC(to);function Rle(){Fa.localeError||In(kw())}function _d(){Fa.memoizer||In({memoizer:cb()})}var Ne=_("ZodType",(e,t)=>(Rle(),Qe.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(H.mergeDefs(t,{checks:[...t.checks??[],...e.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ct(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(y2(e,t))},superRefine(e,t){return this.check(C2(e,t))},overwrite(e){return this.check(Ti(e))},optional(){return Id(this)},exactOptional(){return t2(this)},nullable(){return yb(this)},nullish(){return Id(yb(this))},nonoptional(e){return A2(this,e)},array(){return Eb(this)},or(e){return um([this,e])},and(e){return z8(this,e)},transform(e){return dE(this,NE(e))},default(e){return r2(this,e)},prefault(e){return i2(this,e)},catch(e){return u2(this,e)},pipe(e){return dE(this,e)},readonly(){return m2(this)},describe(e){let t=this.clone();return Ya.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ya.get(this);let t=this.clone();return Ya.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return H.hide(this,"~standard",{...iw(this),jsonSchema:{input:nm(this,"input"),output:nm(this,"output")}})},set"~standard"(e){H.own(this,"~standard",e)},parse:function e(t,n){return h8(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await B8(this,t,n,{callee:e})},safeParse(e,t){return y8(this,e,t)},async safeParseAsync(e,t){return C8(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){H.own(this,"spa",e)},encode:function e(t,n){return w8(this,t,n,{callee:e})},decode:function e(t,n){return E8(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await k8(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Q8(this,t,n,{callee:e})},safeEncode(e,t){return v8(this,e,t)},safeDecode(e,t){return I8(this,e,t)},async safeEncodeAsync(e,t){return _8(this,e,t)},async safeDecodeAsync(e,t){return x8(this,e,t)},toJSONSchema(e){return FF(this,{})(e)},get description(){return Ya.get(this)?.description},get _def(){return this._zod.def}}),lE=_("_ZodString",(e,t)=>{hd.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(r,a,o)=>LF(e,r,a,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(Up(...e))},includes(...e){return this.check(zp(...e))},startsWith(...e){return this.check(Kp(...e))},endsWith(...e){return this.check(Yp(...e))},min(...e){return this.check($s(...e))},max(...e){return this.check(kd(...e))},length(...e){return this.check(Qd(...e))},nonempty(...e){return this.check($s(1,...e))},lowercase(e){return this.check(Op(e))},uppercase(e){return this.check(qp(e))},trim(){return this.check(Zp())},normalize(...e){return this.check(Wp(...e))},toLowerCase(){return this.check(Vp())},toUpperCase(){return this.check(Xp())},slugify(){return this.check(em())}}),om=_("ZodString",(e,t)=>{hd.init(e,t),lE.init(e,t)},{email(e){return this.check(Dw(pE,e))},url(e){return this.check(lb(Cb,e))},jwt(e){return this.check(Ww(xE,e))},emoji(e){return this.check($w(gE,e))},guid(e){return this.check(Fw(mE,e))},uuid(e){return this.check(Sw($A,e))},uuidv4(e){return this.check(Nw($A,e))},uuidv6(e){return this.check(Lw($A,e))},uuidv7(e){return this.check(Rw($A,e))},nanoid(e){return this.check(Mw(fE,e))},cuid(e){return this.check(jw(bE,e))},cuid2(e){return this.check(Pw(hE,e))},ulid(e){return this.check(Tw(BE,e))},base64(e){return this.check(Kw(vE,e))},base64url(e){return this.check(Yw(IE,e))},xid(e){return this.check(Hw(yE,e))},ksuid(e){return this.check(Gw(CE,e))},ipv4(e){return this.check(Uw(wE,e))},ipv6(e){return this.check(Ow(EE,e))},cidrv4(e){return this.check(qw(kE,e))},cidrv6(e){return this.check(zw(QE,e))},e164(e){return this.check(Jw(_E,e))},datetime(e){return this.check(pb(nu,e))},date(e){return this.check(mb(au,e))},time(e){return this.check(gb(ru,e))},duration(e){return this.check(fb(ou,e))}});function Bb(e){return Y1(om,e)}var Rt=_("ZodStringFormat",(e,t)=>{_t.init(e,t),lE.init(e,t)}),nu=_("ZodISODateTime",(e,t)=>{PD.init(e,t),Rt.init(e,t)}),au=_("ZodISODate",(e,t)=>{TD.init(e,t),Rt.init(e,t)}),ru=_("ZodISOTime",(e,t)=>{HD.init(e,t),Rt.init(e,t)}),ou=_("ZodISODuration",(e,t)=>{GD.init(e,t),Rt.init(e,t)}),pE=_("ZodEmail",(e,t)=>{_D.init(e,t),Rt.init(e,t)});function cT(e){return Dw(pE,e)}var mE=_("ZodGUID",(e,t)=>{vD.init(e,t),Rt.init(e,t)});function uT(e){return Fw(mE,e)}var $A=_("ZodUUID",(e,t)=>{ID.init(e,t),Rt.init(e,t)});function dT(e){return Sw($A,e)}function lT(e){return Nw($A,e)}function pT(e){return Lw($A,e)}function mT(e){return Rw($A,e)}var Cb=_("ZodURL",(e,t)=>{FD.init(e,t),Rt.init(e,t)});function gT(e){return lb(Cb,e)}function fT(e){return lb(Cb,{protocol:kr.httpProtocol,hostname:kr.domain,...H.normalizeParams(e)})}var gE=_("ZodEmoji",(e,t)=>{SD.init(e,t),Rt.init(e,t)});function bT(e){return $w(gE,e)}var fE=_("ZodNanoID",(e,t)=>{ND.init(e,t),Rt.init(e,t)});function hT(e){return Mw(fE,e)}var bE=_("ZodCUID",(e,t)=>{LD.init(e,t),Rt.init(e,t)});function BT(e){return jw(bE,e)}var hE=_("ZodCUID2",(e,t)=>{RD.init(e,t),Rt.init(e,t)});function yT(e){return Pw(hE,e)}var BE=_("ZodULID",(e,t)=>{$D.init(e,t),Rt.init(e,t)});function CT(e){return Tw(BE,e)}var yE=_("ZodXID",(e,t)=>{MD.init(e,t),Rt.init(e,t)});function wT(e){return Hw(yE,e)}var CE=_("ZodKSUID",(e,t)=>{jD.init(e,t),Rt.init(e,t)});function ET(e){return Gw(CE,e)}var wE=_("ZodIPv4",(e,t)=>{UD.init(e,t),Rt.init(e,t)});function kT(e){return Uw(wE,e)}var D8=_("ZodMAC",(e,t)=>{qD.init(e,t),Rt.init(e,t)});function QT(e){return W1(D8,e)}var EE=_("ZodIPv6",(e,t)=>{OD.init(e,t),Rt.init(e,t)});function vT(e){return Ow(EE,e)}var kE=_("ZodCIDRv4",(e,t)=>{zD.init(e,t),Rt.init(e,t)});function IT(e){return qw(kE,e)}var QE=_("ZodCIDRv6",(e,t)=>{KD.init(e,t),Rt.init(e,t)});function _T(e){return zw(QE,e)}var vE=_("ZodBase64",(e,t)=>{YD.init(e,t),Rt.init(e,t)});function xT(e){return Kw(vE,e)}var IE=_("ZodBase64URL",(e,t)=>{JD.init(e,t),Rt.init(e,t)});function DT(e){return Yw(IE,e)}var _E=_("ZodE164",(e,t)=>{WD.init(e,t),Rt.init(e,t)});function FT(e){return Jw(_E,e)}var F8=_("ZodCreditCard",(e,t)=>{ZD.init(e,t),Rt.init(e,t)});function ST(e){return Z1(F8,e)}var xE=_("ZodJWT",(e,t)=>{VD.init(e,t),Rt.init(e,t)});function NT(e){return Ww(xE,e)}var im=_("ZodCustomStringFormat",(e,t)=>{XD.init(e,t),Rt.init(e,t)});function LT(e,t,n={}){return tm(im,e,t,n)}function RT(e){return tm(im,"hostname",kr.hostname,e)}function $T(e){return tm(im,"hex",kr.hex,e)}function MT(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,a=kr[r];if(!a)throw new Error(`Unrecognized hash format: ${r}`);return tm(im,r,a,t)}var Am=_("ZodNumber",(e,t)=>{gw.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(r,a,o)=>RF(e,r,a,o);let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(LA(e,t))},gte(e,t){return this.check(_o(e,t))},min(e,t){return this.check(_o(e,t))},lt(e,t){return this.check(NA(e,t))},lte(e,t){return this.check(Io(e,t))},max(e,t){return this.check(Io(e,t))},int(e){return this.check(uE(e))},safe(e){return this.check(uE(e))},positive(e){return this.check(LA(0,e))},nonnegative(e){return this.check(_o(0,e))},negative(e){return this.check(NA(0,e))},nonpositive(e){return this.check(Io(0,e))},multipleOf(e,t){return this.check(Zc(e,t))},step(e,t){return this.check(Zc(e,t))},finite(){return this}});function S8(e){return X1(Am,e)}var xd=_("ZodNumberFormat",(e,t)=>{e1.init(e,t),Am.init(e,t)});function uE(e){return tF(xd,e)}function jT(e){return nF(xd,e)}function PT(e){return aF(xd,e)}function TT(e){return rF(xd,e)}function HT(e){return oF(xd,e)}var sm=_("ZodBoolean",(e,t)=>{ob.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>$F(e,n,r,a)});function N8(e){return iF(sm,e)}var cm=_("ZodBigInt",(e,t)=>{fw.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(r,a,o)=>MF(e,r,a,o);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(_o(e,t))},min(e,t){return this.check(_o(e,t))},gt(e,t){return this.check(LA(e,t))},lt(e,t){return this.check(NA(e,t))},lte(e,t){return this.check(Io(e,t))},max(e,t){return this.check(Io(e,t))},positive(e){return this.check(LA(BigInt(0),e))},negative(e){return this.check(NA(BigInt(0),e))},nonpositive(e){return this.check(Io(BigInt(0),e))},nonnegative(e){return this.check(_o(BigInt(0),e))},multipleOf(e,t){return this.check(Zc(e,t))}});function GT(e){return sF(cm,e)}var DE=_("ZodBigIntFormat",(e,t)=>{t1.init(e,t),cm.init(e,t)});function UT(e){return uF(DE,e)}function OT(e){return dF(DE,e)}var L8=_("ZodSymbol",(e,t)=>{n1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>jF(e,n,r,a)});function qT(e){return lF(L8,e)}var R8=_("ZodUndefined",(e,t)=>{a1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>TF(e,n,r,a)});function zT(e){return pF(R8,e)}var $8=_("ZodNull",(e,t)=>{r1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>PF(e,n,r,a)});function M8(e){return mF($8,e)}var j8=_("ZodAny",(e,t)=>{o1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>UF(e,n,r,a)});function KT(){return gF(j8)}var P8=_("ZodUnknown",(e,t)=>{i1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>OF(e,n,r,a)});function vd(){return fF(P8)}var T8=_("ZodNever",(e,t)=>{A1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>GF(e,n,r,a)});function FE(e){return bF(T8,e)}var H8=_("ZodVoid",(e,t)=>{s1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>HF(e,n,r,a)});function YT(e){return hF(H8,e)}var wb=_("ZodDate",(e,t)=>{c1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(r,a,o)=>qF(e,r,a,o),e.min=(r,a)=>e.check(_o(r,a)),e.max=(r,a)=>e.check(Io(r,a));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function JT(e){return BF(wb,e)}var G8=_("ZodArray",(e,t)=>{_d(),u1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>a8(e,n,r,a),e.element=t.element},{min(e,t){return this.check($s(e,t))},nonempty(e){return this.check($s(1,e))},max(e,t){return this.check(kd(e,t))},length(e,t){return this.check(Qd(e,t))},unwrap(){return this.element}});function Eb(e,t){return wF(G8,e,t)}function WT(e){let t=e._zod.def.shape;return SE(Object.keys(t))}var kb=_("ZodObject",(e,t)=>{_d(),d1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>r8(e,n,r,a),H.installLazyProp(e,"shape",n=>n._zod.def.shape,!1)},{keyof(){return SE(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:vd()})},loose(){return this.clone({...this._zod.def,catchall:vd()})},strict(){return this.clone({...this._zod.def,catchall:FE()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return H.extend(this,e)},safeExtend(e){return H.safeExtend(this,e)},merge(e){return H.merge(this,e)},pick(e){return H.pick(this,e)},omit(e){return H.omit(this,e)},partial(...e){return H.partial(vb,this,e[0])},exactPartial(...e){return H.partial(LE,this,e[0],"exactPartial")},required(...e){return H.required(RE,this,e[0])}});function ZT(e,t){let n={type:"object",shape:e??{},...H.normalizeParams(t)};return new kb(n)}function VT(e,t){return new kb({type:"object",shape:e,catchall:FE(),...H.normalizeParams(t)})}function XT(e,t){return new kb({type:"object",shape:e,catchall:vd(),...H.normalizeParams(t)})}var Qb=_("ZodUnion",(e,t)=>{ib.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>rE(e,n,r,a),e.options=t.options});function um(e,t){return new Qb({type:"union",options:e,...H.normalizeParams(t)})}var U8=_("ZodXor",(e,t)=>{Qb.init(e,t),l1.init(e,t),e._zod.processJSONSchema=(n,r,a)=>rE(e,n,r,a),e.options=t.options});function eH(e,t){return new U8({type:"union",options:e,inclusive:!1,...H.normalizeParams(t)})}var O8=_("ZodDiscriminatedUnion",(e,t)=>{Qb.init(e,t),m1.init(e,t)});function tH(e,t,n){return new O8({type:"union",options:t,discriminator:e,...H.normalizeParams(n)})}var q8=_("ZodIntersection",(e,t)=>{g1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>o8(e,n,r,a)});function z8(e,t){return new q8({type:"intersection",left:e,right:t})}var K8=_("ZodTuple",(e,t)=>{_d(),bw.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>i8(e,n,r,a)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new vb({type:"optional",innerType:t}))})}});function Y8(e,t,n){let r=t instanceof Qe,a=r?n:t,o=r?t:null;return new K8({type:"tuple",items:e,rest:o,...H.normalizeParams(a)})}var am=_("ZodRecord",(e,t)=>{_d(),f1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>A8(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function J8(e,t,n){return!t||!t._zod?new am({type:"record",keyType:Bb(),valueType:e,...H.normalizeParams(t)}):new am({type:"record",keyType:e,valueType:t,...H.normalizeParams(n)})}function nH(e,t,n){return new am({type:"record",keyType:e,valueType:t,...H.normalizeParams(n),partial:!0})}function aH(e,t,n){return new am({type:"record",keyType:e,valueType:t,mode:"loose",...H.normalizeParams(n)})}var W8=_("ZodMap",(e,t)=>{_d(),b1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>t8(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(RA(...n)),e.nonempty=n=>e.check(RA(1,n)),e.max=(...n)=>e.check(Vc(...n)),e.size=(...n)=>e.check(Ed(...n))});function rH(e,t,n){return new W8({type:"map",keyType:e,valueType:t,...H.normalizeParams(n)})}var Z8=_("ZodSet",(e,t)=>{_d(),h1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>n8(e,n,r,a),e.min=(...n)=>e.check(RA(...n)),e.nonempty=n=>e.check(RA(1,n)),e.max=(...n)=>e.check(Vc(...n)),e.size=(...n)=>e.check(Ed(...n))});function oH(e,t){return new Z8({type:"set",valueType:e,...H.normalizeParams(t)})}var rm=_("ZodEnum",(e,t)=>{B1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(r,a,o)=>zF(e,r,a,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{let o={};for(let i of r)if(n.has(i))o[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new rm({...t,checks:[],...H.normalizeParams(a),entries:o})},e.exclude=(r,a)=>{let o={...t.entries};for(let i of r)if(n.has(i))delete o[i];else throw new Error(`Key ${i} not found in enum`);return new rm({...t,checks:[],...H.normalizeParams(a),entries:o})}});function SE(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new rm({type:"enum",entries:n,...H.normalizeParams(t)})}function iH(e,t){return new rm({type:"enum",entries:e,...H.normalizeParams(t)})}var V8=_("ZodLiteral",(e,t)=>{y1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>KF(e,n,r,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function AH(e,t){return new V8({type:"literal",values:Array.isArray(e)?e:[e],...H.normalizeParams(t)})}var X8=_("ZodFile",(e,t)=>{C1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>WF(e,n,r,a),e.min=(n,r)=>e.check(RA(n,r)),e.max=(n,r)=>e.check(Vc(n,r)),e.mime=(n,r)=>e.check(Jp(Array.isArray(n)?n:[n],r))});function sH(e){return EF(X8,e)}var e2=_("ZodTransform",(e,t)=>{_d(),w1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>e8(e,n,r,a),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Jc(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(H.issue(o,n.value,t));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=e),n.issues.push(H.issue(i))}};let a=t.transform(n.value,n);return a instanceof Promise?a.then(o=>(n.value=o,n)):(n.value=a,n)}});function NE(e){return new e2({type:"transform",transform:e})}var vb=_("ZodOptional",(e,t)=>{hw.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>oE(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Id(e){return new vb({type:"optional",innerType:e})}var LE=_("ZodExactOptional",(e,t)=>{E1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>oE(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function t2(e){return new LE({type:"optional",innerType:e})}var n2=_("ZodNullable",(e,t)=>{k1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>s8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function yb(e){return new n2({type:"nullable",innerType:e})}function cH(e){return Id(yb(e))}var a2=_("ZodDefault",(e,t)=>{Q1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>d8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function r2(e,t){return new a2({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():H.shallowClone(t)}})}var o2=_("ZodPrefault",(e,t)=>{v1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>l8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function i2(e,t){return new o2({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():H.shallowClone(t)}})}var RE=_("ZodNonOptional",(e,t)=>{I1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>c8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function A2(e,t){return new RE({type:"nonoptional",innerType:e,...H.normalizeParams(t)})}var s2=_("ZodSuccess",(e,t)=>{_1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ZF(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function uH(e){return new s2({type:"success",innerType:e})}var c2=_("ZodCatch",(e,t)=>{x1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>p8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function u2(e,t){return new c2({type:"catch",innerType:e,catchValue:typeof t=="function"?t:H.constantCatch(t)})}var d2=_("ZodNaN",(e,t)=>{D1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>YF(e,n,r,a)});function dH(e){return CF(d2,e)}var Ib=_("ZodPipe",(e,t)=>{Bw.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>m8(e,n,r,a),e.in=t.in,e.out=t.out});function dE(e,t){return new Ib({type:"pipe",in:e,out:t})}var _b=_("ZodCodec",(e,t)=>{Ib.init(e,t),Ab.init(e,t)});function lH(e,t,n){return new _b({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function pH(e){let t=e._zod.def;return new _b({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var l2=_("ZodPreprocess",(e,t)=>{Ib.init(e,t),F1.init(e,t)}),p2=_("ZodReadonly",(e,t)=>{S1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>g8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function m2(e){return new p2({type:"readonly",innerType:e})}var g2=_("ZodTemplateLiteral",(e,t)=>{N1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>JF(e,n,r,a)});function mH(e,t){return new g2({type:"template_literal",parts:e,...H.normalizeParams(t)})}var f2=_("ZodLazy",(e,t)=>{sb.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>b8(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function b2(e){return new f2({type:"lazy",getter:e})}var h2=_("ZodPromise",(e,t)=>{R1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>f8(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function gH(e){return new h2({type:"promise",innerType:e})}var B2=_("ZodFunction",(e,t)=>{L1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>XF(e,n,r,a)});function fH(e){return new B2({type:"function",input:Array.isArray(e?.input)?Y8(e?.input):e?.input??Eb(vd()),output:e?.output??vd()})}var xb=_("ZodCustom",(e,t)=>{$1.init(e,t),Ne.init(e,t),e._zod.processJSONSchema=(n,r,a)=>VF(e,n,r,a)});function bH(e){let t=new Ht({check:"custom"});return t._zod.check=e,t}function hH(e,t){return kF(xb,e??(()=>!0),t)}function y2(e,t={}){return QF(xb,e,t)}function C2(e,t){return vF(e,t)}var BH=IF,yH=_F;function CH(e,t={}){let n=new xb({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...H.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var wH=(...e)=>xF({Codec:_b,Boolean:sm,String:om},...e);function EH(e){let t=b2(()=>um([Bb(e),S8(),N8(),M8(),Eb(t),J8(Bb(),t)]));return t}function kH(e,t){return new l2({type:"pipe",in:NE(e),out:t})}var $le={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function Mle(e){In({customError:e})}function jle(){return In().customError}var w2;w2||(w2={});var Db={};L(Db,{ZodISODate:()=>au,ZodISODateTime:()=>nu,ZodISODuration:()=>ou,ZodISOTime:()=>ru,date:()=>Tle,datetime:()=>Ple,duration:()=>Gle,time:()=>Hle});function Ple(e){return pb(nu,e)}function Tle(e){return mb(au,e)}function Hle(e){return gb(ru,e)}function Gle(e){return fb(ou,e)}var X={...dm,...sE,iso:Db},Ule=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function Ole(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function QH(e,t){return e.map((n,r)=>r<t?n:n.optional())}function qle(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function zle(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let a=n[1]===void 0?void 0:qle(n[1]);if(!a||!t.defs[a])throw new Error(`Reference not found: ${e}`);return t.defs[a]}throw new Error(`Reference not found: ${e}`)}function Kle(e,t){return X.transform(r=>r).check(r=>{let a=r.value;if(!(typeof a!="object"||a===null||Array.isArray(a)))for(let o of Object.getOwnPropertyNames(a)){let i=t.safeParse(o);i.success||r.issues.push({code:"invalid_key",origin:"record",issues:i.error.issues,input:o,path:[o],continue:!0})}}).pipe(e)}function vH(e,t){if(e!==!1)return e===void 0||e===!0?X.any():no(e,t)}var Yle=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function IH(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return X.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let a=e.$ref;if(t.refs.has(a))return t.refs.get(a);if(t.processing.has(a))return X.lazy(()=>{if(!t.refs.has(a))throw new Error(`Circular reference not resolved: ${a}`);return t.refs.get(a)});t.processing.add(a);let o=zle(a,t),i=no(o,t);return t.refs.set(a,i),t.processing.delete(a),i}if(e.enum!==void 0){let a=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&a.length===1&&a[0]===null)return X.null();if(a.length===0)return X.never();if(a.length===1)return X.literal(a[0]);if(a.every(i=>typeof i=="string"))return X.enum(a);let o=a.map(i=>X.literal(i));return o.length<2?o[0]:X.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return X.literal(e.const);let n=e.type;if(Array.isArray(n)){let a=n.map(o=>{let i={...e,type:o};return IH(i,t)});return a.length===0?X.never():a.length===1?a[0]:X.union(a)}if(!n)return X.any();let r;switch(n){case"string":{let a=X.string();if(e.format){let o=e.format;o==="email"?a=a.check(X.email()):o==="uri"||o==="uri-reference"?a=a.check(X.url()):o==="uuid"||o==="guid"?a=a.check(X.uuid()):o==="date-time"?a=a.check(X.iso.datetime({offset:!0})):o==="date"?a=a.check(X.iso.date()):o==="time"?a=a.check(X.regex(Yle)):o==="duration"?a=a.check(X.iso.duration()):o==="hostname"?a=a.check(X.hostname()):o==="ipv4"?a=a.check(X.ipv4()):o==="ipv6"?a=a.check(X.ipv6()):o==="mac"?a=a.check(X.mac()):o==="cidr"?a=a.check(X.cidrv4()):o==="cidr-v6"?a=a.check(X.cidrv6()):o==="base64"?a=a.check(X.base64()):o==="base64url"?a=a.check(X.base64url()):o==="e164"?a=a.check(X.e164()):o==="credit_card"?a=a.check(X.creditCard()):o==="jwt"?a=a.check(X.jwt()):o==="emoji"?a=a.check(X.emoji()):o==="nanoid"?a=a.check(X.nanoid()):o==="cuid"?a=a.check(X.cuid()):o==="cuid2"?a=a.check(X.cuid2()):o==="ulid"?a=a.check(X.ulid()):o==="xid"?a=a.check(X.xid()):o==="ksuid"&&(a=a.check(X.ksuid()))}typeof e.minLength=="number"&&(a=a.min(e.minLength)),typeof e.maxLength=="number"&&(a=a.max(e.maxLength)),e.pattern&&(a=a.regex(new RegExp(e.pattern))),r=a;break}case"number":case"integer":{let a=n==="integer"?X.number().int():X.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(a=a.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(a=a.max(e.maximum)),typeof e.exclusiveMinimum=="number"?a=a.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(a=a.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?a=a.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(a=a.lt(e.maximum)),typeof e.multipleOf=="number"&&(a=a.multipleOf(e.multipleOf)),r=a;break}case"boolean":{r=X.boolean();break}case"null":{r=X.null();break}case"object":{let a={},o=e.properties||{},i=new Set(e.required||[]),A=typeof e.additionalProperties=="object"?no(e.additionalProperties,t):void 0;for(let[s,u]of Object.entries(o)){let d=no(u,t);gn(a,s,i.has(s)?d:d.optional())}if(e.patternProperties){let s=e.patternProperties,u=Object.keys(s),d=[];for(let m of u){let p=no(s[m],t),g=X.string().regex(new RegExp(m));d.push(X.looseRecord(g,p))}let l=[];if(Object.keys(a).length>0&&l.push(X.object(a).passthrough()),l.push(...d),l.length===0)r=X.object({}).passthrough();else if(l.length===1)r=l[0];else{let m=X.intersection(l[0],l[1]);for(let p=2;p<l.length;p++)m=X.intersection(m,l[p]);r=m}if(e.additionalProperties===!1){let m=Object.keys(a),p=u.map(b=>new RegExp(b)),g=r;r=r.check(b=>{if(!ii(b.value))return;let B=[];for(let h of Object.keys(b.value))m.includes(h)||p.some(f=>f.test(h))||B.push(h);B.length&&b.issues.push({code:"unrecognized_keys",keys:B,input:b.value,inst:g})})}}else{let s=X.object(a);e.additionalProperties===!1?r=s.strict():A?r=s.catchall(A):r=s.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let s=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;r=Kle(r,no(s,t))}break}case"array":{let a=e.prefixItems,o=e.items;if(a&&Array.isArray(a)){let i=typeof e.minItems=="number"?e.minItems:0,A=a.map(l=>no(l,t)),s=QH(A,i),u=Array.isArray(o)?void 0:vH(o,t),d=X.tuple(s);r=u?d.rest(u):d,typeof e.minItems=="number"&&(r=r.check(X.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(X.maxLength(e.maxItems)))}else if(Array.isArray(o)){let i=typeof e.minItems=="number"?e.minItems:0,A=o.map(l=>no(l,t)),s=QH(A,i),u=vH(e.additionalItems,t),d=X.tuple(s);r=u?d.rest(u):d,typeof e.minItems=="number"&&(r=r.check(X.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(X.maxLength(e.maxItems)))}else if(o!==void 0){let i=no(o,t),A=X.array(i);typeof e.minItems=="number"&&(A=A.min(e.minItems)),typeof e.maxItems=="number"&&(A=A.max(e.maxItems)),r=A}else r=X.array(X.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function no(e,t){if(typeof e=="boolean")return e?X.any():X.never();let n=IH(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let A=e.anyOf.map(u=>no(u,t)),s=X.union(A);n=r?X.intersection(n,s):s}if(e.oneOf&&Array.isArray(e.oneOf)){let A=e.oneOf.map(u=>no(u,t)),s=X.xor(A);n=r?X.intersection(n,s):s}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:X.any();else{let A=r?n:no(e.allOf[0],t),s=r?0:1;for(let u=s;u<e.allOf.length;u++)A=X.intersection(A,no(e.allOf[u],t));n=A}e.nullable===!0&&t.version==="openapi-3.0"&&(n=X.nullable(n)),e.readOnly===!0&&(n=X.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let a={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let A of o)A in e&&(a[A]=e[A]);let i=["contentEncoding","contentMediaType","contentSchema"];for(let A of i)A in e&&(a[A]=e[A]);e.propertyNames!==void 0&&e.type==="object"&&e.$ref===void 0&&(a.propertyNames=e.propertyNames);for(let A of Object.keys(e))Ule.has(A)||gn(a,A,e[A]);return Object.keys(a).length>0&&t.registry.add(n,a),e.description&&(n=n.describe(e.description)),n}function _H(e,t){if(typeof e=="boolean")return e?X.any():X.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=Ole(n,t?.defaultTarget),a=n.$defs||n.definitions||{},o={version:r,defs:a,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ya};return no(n,o)}var xH=Symbol("z.visit/resolving");function Fb(e,t){let n=typeof t=="function"?t:(i,A)=>{let s=t[i._zod.def.type];return s?s(i,A):i},r=new Map;function a(i){let A=r.get(i);if(A===xH)return new sb({type:"lazy",getter:()=>r.get(i)});if(A!==void 0)return A;r.set(i,xH);let s=o(i),u=n(s,s!==i);return r.set(i,u),u}function o(i){let A=i._zod.def,s=A.type;switch(s){case"object":{let u=A.shape,d=Object.keys(u),l=!1,m={};for(let g of d){let b=a(u[g]);b!==u[g]&&(l=!0),m[g]=b}let p=A.catchall;return A.catchall&&(p=a(A.catchall),p!==A.catchall&&(l=!0)),l?Ct(i,{...A,shape:m,catchall:p}):i}case"array":{let u=a(A.element);return u===A.element?i:Ct(i,{...A,element:u})}case"tuple":{let u=A.items,d=!1,l=[];for(let p of u){let g=a(p);g!==p&&(d=!0),l.push(g)}let m=A.rest;return A.rest&&(m=a(A.rest),m!==A.rest&&(d=!0)),d?Ct(i,{...A,items:l,rest:m}):i}case"record":case"map":{let u=a(A.keyType),d=a(A.valueType);return u===A.keyType&&d===A.valueType?i:Ct(i,{...A,keyType:u,valueType:d})}case"set":{let u=a(A.valueType);return u===A.valueType?i:Ct(i,{...A,valueType:u})}case"union":{let u=A.options,d=!1,l=[];for(let m of u){let p=a(m);p!==m&&(d=!0),l.push(p)}return d?Ct(i,{...A,options:l}):i}case"intersection":{let u=a(A.left),d=a(A.right);return u===A.left&&d===A.right?i:Ct(i,{...A,left:u,right:d})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let u=a(A.innerType);return u===A.innerType?i:Ct(i,{...A,innerType:u})}case"pipe":{let u=a(A.in),d=a(A.out);return u===A.in&&d===A.out?i:Ct(i,{...A,in:u,out:d})}case"function":{let u=a(A.input),d=a(A.output);return u===A.input&&d===A.output?i:Ct(i,{...A,input:u,output:d})}case"lazy":{let u=A.getter,{_cachedInner:d,...l}=A;return Ct(i,{...l,getter:()=>a(u())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return i;default:return i}}return a(e)}function DH(e){return Fb(e,{object:t=>t.partial(),union:t=>{let n=t._zod.def;return n.discriminator===void 0?t:um(n.options)}})}function Jle(e,t){if(!t?.length)return e;let n=e._zod.def;return Ct(e,ji(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function FH(e){return Jle(e.out,e.checks)}function Wle(e){return e.in._zod.traits.has("$ZodTransform")?FH(e):e.in}function SH(e){return Fb(e,{pipe:t=>Wle(t._zod.def),default:(t,n)=>n?Id(t._zod.def.innerType):t,catch:(t,n)=>n?t._zod.def.innerType:t})}function NH(e){return Fb(e,{pipe:t=>FH(t._zod.def),prefault:(t,n)=>n?t._zod.def.innerType:t})}var E2={};L(E2,{bigint:()=>epe,boolean:()=>Xle,date:()=>tpe,number:()=>Vle,string:()=>Zle});function Zle(e){return J1(om,e)}function Vle(e){return eF(Am,e)}function Xle(e){return AF(sm,e)}function epe(e){return cF(cm,e)}function tpe(e){return yF(wb,e)}var LH=["none","low","medium","high","xhigh"];var $E=c.string().regex(/^[a-z][a-z0-9_-]*$/);var xo=c.string().trim().min(1).max(160),lm=c.number().int().nonnegative(),npe=c.discriminatedUnion("type",[c.strictObject({type:c.literal("code_change"),author:xo.optional(),sourceBranch:xo.optional(),targetBranch:xo.optional(),reviewers:c.array(xo).max(5).optional(),review:c.enum(["required","approved","changes_requested"]).optional(),checks:c.strictObject({passed:lm,failed:lm,pending:lm}).optional(),mergeable:c.boolean().optional(),changedFiles:lm.optional(),additions:lm.optional(),deletions:lm.optional()}),c.strictObject({type:c.literal("task"),assignees:c.array(xo).max(5).optional(),priority:xo.optional(),project:xo.optional(),cycle:xo.optional(),dueDate:c.iso.date().optional(),labels:c.array(xo).max(5).optional()}),c.strictObject({type:c.literal("deployment"),project:xo.optional(),environment:xo.optional(),revision:xo.optional(),branch:xo.optional()})]);function $H(e){if(!e)return[];let t=[],n=a=>a?.length?`${a.join(", ")}${a.length===5?" (up to 5 shown)":""}`:void 0;function r(a,o,i){i!==void 0&&i!==""&&t.push({key:a,label:o,value:String(i)})}switch(e.type){case"code_change":{let a={required:"Review required",approved:"Approved",changes_requested:"Changes requested"};r("review","Review",e.review&&a[e.review]);let o=e.checks;r("checks","Checks",o&&`${o.failed} failed \xB7 ${o.pending} pending \xB7 ${o.passed} passed`),r("author","Author",e.author),r("reviewers","Requested reviewers",n(e.reviewers)),r("mergeable","Conflicts",e.mergeable===void 0?void 0:e.mergeable?"No conflicts":"Has conflicts"),r("sourceBranch","From",e.sourceBranch),r("targetBranch","Into",e.targetBranch);break}case"task":r("assignees","Assignees",e.assignees?.length===0?"Unassigned":n(e.assignees)),r("priority","Priority",e.priority),r("project","Project",e.project),r("cycle","Cycle",e.cycle),r("dueDate","Due",e.dueDate),r("labels","Labels",n(e.labels));break;case"deployment":r("environment","Environment",e.environment),r("project","Project",e.project),r("revision","Revision",e.revision),r("branch","Branch",e.branch);break}return t.slice(0,4)}var mm=c.enum(["task","code_change","automation","deployment","item"]);var k2=c.object({kind:c.literal("object"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),objectType:mm,title:c.string().trim().min(1).max(512),url:c.url().max(2048).refine(e=>["http:","https:"].includes(new URL(e).protocol)).nullable(),description:c.string().max(4e3).optional(),status:c.string().trim().min(1).max(100).optional(),trigger:c.string().max(4e3).optional(),warning:c.string().max(1e3).optional(),displayType:c.string().trim().min(1).max(80).optional(),sourceUpdatedAt:c.iso.datetime({offset:!0}).optional(),facts:npe.refine(e=>new TextEncoder().encode(JSON.stringify(e)).length<=4096,"Object facts must not exceed 4 KiB").optional()}).strict().refine(e=>!e.facts||(e.facts.type==="deployment"?e.objectType==="deployment"||e.objectType==="item":e.facts.type===e.objectType),"Object facts must match the object type"),MH=k2.safeExtend({plugin:c.string().min(1)});function ape(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var rpe=c.object({kind:c.literal("resource_link"),objectType:mm.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),url:c.string().url().max(2048).refine(ape,"URL must use HTTP or HTTPS."),description:c.string().trim().min(1).max(512).optional(),status:c.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),jH=c.discriminatedUnion("kind",[rpe,k2]),ope=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),PH=c.object({icon:ope.optional(),objectType:mm.optional(),status:c.string().trim().min(1).max(100).optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),Nb=c.enum(["closed","merged","open"]),r3e=c.object({closedAt:c.date().optional(),conversationIds:c.array(c.string().min(1)).default([]),mergedAt:c.date().optional(),number:c.number().int().positive(),openedAt:c.date(),providerId:c.string().min(1),repository:c.object({name:c.string().min(1),providerId:c.string().min(1),url:c.string().url().optional()}).strict(),state:Nb,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),i3e=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),ipe=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),Ape=c.object({content:c.string().min(1).max(32*1024).optional(),description:c.string().trim().min(1).max(2e3).optional(),metadata:c.array(c.string().trim().min(1).max(120)).max(8).optional(),title:c.string().trim().min(1).max(4e3)}).strict(),TH=c.object({details:c.array(Ape).max(100).optional(),icon:ipe.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var jE=c.string().regex(/^T[A-Z0-9]+$/),Q2=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),HH=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),spe=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),ME=spe,ye=c.string().refine(e=>e.trim().length>0),sr=ye.refine(e=>e===e.trim()),cpe=c.object({id:ye,provider:sr}).strict(),upe=cpe.extend({provider:c.literal("slack"),teamId:jE,channelId:Q2,threadTs:sr.optional()}).strict(),s3e=c.discriminatedUnion("provider",[upe]),c3e=c.enum(["slack","local"]),GH=c.enum(["public","private"]),dpe=c.enum(["public","private"]),lpe=c.object({platform:c.literal("slack"),teamId:jE,channelId:Q2,threadTs:sr.optional()}).strict(),v2=lpe,ppe=c.object({platform:c.literal("local"),conversationId:HH}).strict(),mpe=c.discriminatedUnion("platform",[v2,ppe]),UH=c.object({action:c.literal("send_message"),destination:v2}).strict(),gpe=c.object({kind:c.literal("slack"),teamId:jE,channelId:Q2,visibility:GH,messageTs:ye.optional(),threadTs:ye.optional()}).strict(),fpe=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:HH}).strict(),bpe=c.object({kind:c.literal("web"),visibility:GH,conversationId:sr}).strict(),hpe=c.object({kind:c.literal("event"),eventKey:sr,eventType:sr,identifier:sr,namespace:sr}).strict(),Bpe=c.object({kind:c.literal("scheduled_automation")}).strict(),ype=c.object({kind:c.literal("event_automation")}).strict(),Cpe=c.object({kind:c.literal("plugin_dispatch")}).strict(),wpe=c.object({kind:c.literal("agent_invocation")}).strict(),Epe=c.discriminatedUnion("kind",[gpe,fpe,bpe,hpe,Bpe,ype,Cpe,wpe]);function kpe(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if("kind"in t){let o={event_task:"event_automation",resource_event:"event",scheduled_task:"scheduled_automation"},i=typeof t.kind=="string"?o[t.kind]:void 0;return i?{...t,kind:i}:e}if(t.platform!=="slack"&&t.platform!=="local"&&t.platform!=="web")return e;let{location:n,platform:r,...a}=t;return{...a,kind:r}}var Qpe=c.preprocess(kpe,Epe),vpe=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:ME,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:ME,allowedWhen:c.literal("scheduled-automation"),taskId:sr}).strict()]),I2={email:ye.optional(),fullName:ye.optional(),userId:ME,userName:ye.optional()},Ipe=c.object({...I2,platform:c.literal("slack"),teamId:jE}).strict(),_pe=c.object({...I2,platform:c.literal("local")}).strict(),xpe=c.object({...I2,platform:c.literal("web")}).strict(),Dpe=c.object({platform:c.literal("system"),name:ME}).strict(),Sb=c.discriminatedUnion("platform",[Ipe,_pe,xpe,Dpe]),Fpe=c.object({displayName:ye.optional(),handle:ye.optional(),id:sr,provider:sr,providerSubjectId:sr,providerTenantId:sr.optional()}).strict(),u3e=c.object({displayName:ye.optional(),email:ye.max(320),id:sr,identities:c.array(Fpe).max(100)}).strict(),Spe=c.record(c.string(),c.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[r,a]of n){if(!r.trim()){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[r]});continue}r.length>128&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[r]}),/[\r\n]/.test(r)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[r]}),/[\r\n]/.test(a)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[r]}),a.length>512&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[r]})}}),Npe=c.object({label:sr.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:sr.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),d3e=c.object({idempotencyKey:ye.pipe(c.string().max(512)),credentialSubject:vpe.optional(),destination:v2,destinationVisibility:dpe,input:ye.pipe(c.string().max(32e3)),metadata:Spe.optional(),replyAttribution:Npe.optional()}).strict();var Lpe=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),p3e=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),m3e=c.object({kind:Lpe,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var Rpe=4e3,$pe=8e3,pm=32,RH=4e3,Mpe=1e3,jpe=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>pm&&t.addIssue({code:"custom",message:`Event data may include at most ${pm} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>RH&&t.addIssue({code:"custom",message:`Event data may be at most ${RH} JSON bytes.`})}),Dd=c.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),OH=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),qH=/^[a-z][a-zA-Z0-9]*$/,Ppe=c.object({kind:c.enum(["boolean","string","number"]),description:c.string().trim().min(1).max(200),enum:c.array(c.string().min(1)).min(1).optional()}).strict().superRefine((e,t)=>{e.enum&&e.kind!=="string"&&t.addIssue({code:"custom",message:'Event match field enum requires kind "string".',path:["enum"]})}),Tpe=c.record(c.string().regex(qH),Ppe).superRefine((e,t)=>{Object.keys(e).length>pm&&t.addIssue({code:"custom",message:`Event match keys may include at most ${pm} keys.`})}),f3e=c.record(c.string().regex(qH),c.union([c.boolean(),c.number().finite(),c.string().min(1),c.array(c.union([c.number().finite(),c.string().min(1)])).min(1)])).superRefine((e,t)=>{Object.keys(e).length>pm&&t.addIssue({code:"custom",message:`Event match may include at most ${pm} keys.`});for(let[n,r]of Object.entries(e))Array.isArray(r)&&r.some(a=>typeof a=="boolean")&&t.addIssue({code:"custom",message:`Event match field "${n}" cannot use a boolean list.`,path:[n]})});var Hpe=c.object({type:OH,supportedEvents:c.array(Dd).min(1),suggestedEvents:c.array(Dd).optional(),matchFields:Tpe.optional(),guidance:c.record(Dd,c.string().trim().min(1).max(Mpe)).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,o)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported event type "${a}".`,path:["supportedEvents",o]}),n.add(a)});for(let a of Object.keys(e.guidance??{}))n.has(a)||t.addIssue({code:"custom",message:`Guidance event type "${a}" is not supported.`,path:["guidance",a]});let r=new Set;e.suggestedEvents?.forEach((a,o)=>{r.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested event type "${a}".`,path:["suggestedEvents",o]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested event type "${a}" is not supported.`,path:["suggestedEvents",o]}),r.add(a)})}),b3e=c.object({resourceTypes:c.array(Hpe).min(1),isEnabled:c.function({input:[],output:c.boolean()}).optional(),normalizeIdentifier:c.function({input:[c.string()],output:c.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((r,a)=>{n.has(r.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${r.type}".`,path:["resourceTypes",a,"type"]}),n.add(r.type)})});var h3e=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(Dd).optional(),supportedEvents:c.array(Dd),type:OH}).strict(),B3e=c.object({events:c.array(Dd).min(1),id:c.string().min(1)}).strict(),Gpe=c.object({objectType:mm.optional(),eventKey:c.string().min(1),eventType:Dd,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,Rpe)),data:jpe.optional(),untrustedText:c.string().transform(e=>e.slice(0,$pe)).optional()}).strict(),y3e=Gpe.extend({namespace:c.string().min(1)}),Upe=c.object({authority:c.enum(["instruction","context"]),actor:Sb.optional()}).strict(),Ope=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:Upe.optional(),isRunActor:c.boolean().optional()}).strict(),c.object({type:c.literal("toolResult"),toolName:c.string().min(1),isError:c.boolean(),text:c.string().min(1).optional()}).strict()]),w3e=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:mpe,locationId:c.string().min(1).optional(),actors:c.array(Sb),actor:Sb.optional(),runId:c.string().min(1),source:Qpe,transcript:c.array(Ope)}).strict();var k3e=c.discriminatedUnion("type",[c.object({type:c.literal("text"),text:c.string()}).strict(),c.object({type:c.literal("image"),data:c.string(),mimeType:c.string()}).strict()]),qpe=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),Q3e=c.object({objectAnnotations:c.array(k2).optional(),target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:qpe.optional()}).passthrough(),v3e=c.enum(["auto","review","approve"]);var _3e=c.object({auth:c.object({user:c.object({email:c.string().nullable().optional(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),pluginName:ye}).strict(),zpe=c.string().regex(/^[a-z][a-z0-9-]*$/),Kpe=c.string().regex(/^[a-z][a-z0-9.-]*$/),Ype=c.union([c.literal("read"),c.literal("write")]),zH=c.object({provider:zpe,scope:ye.optional(),type:c.literal("oauth")}).strict(),KH=c.object({displayName:ye.optional(),handle:ye.optional(),id:ye,label:ye.optional(),url:ye.optional()}).strict(),D3e=c.object({account:KH.optional(),accessToken:ye,expiresAt:c.number().finite().optional(),refreshToken:ye,refreshTokenExpiresAt:c.number().finite().optional(),scope:ye.optional()}).strict(),F3e=c.object({access:Ype,leaseScope:ye.optional(),name:Kpe,reason:ye.optional(),requirements:c.array(ye).min(1).optional()}).strict(),Jpe=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),Wpe=c.object({account:KH.optional(),authorization:zH.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(Jpe).min(1)}).strict(),S3e=c.discriminatedUnion("type",[c.object({lease:Wpe,type:c.literal("lease")}).strict(),c.object({authorization:zH.optional(),message:ye,type:c.literal("needed")}).strict(),c.object({message:ye,type:c.literal("unavailable")}).strict()]);var Zpe=ye.max(64).regex(/^[a-z][a-z0-9-]*$/),Vpe=ye.max(80),Xpe=ye.max(500),eme=c.enum(["primary","profile"]),tme=c.object({detail:ye.max(500).optional(),label:ye.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:ye.max(120)}).strict(),nme=c.object({label:ye.max(80),value:ye.max(500)}).strict(),ame=c.object({confirmation:ye.max(500).optional(),href:ye.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:ye.max(80),method:c.literal("DELETE"),tone:c.enum(["danger","neutral"]).optional()}).strict(),rme=c.object({actions:c.array(ame).max(4).optional(),description:ye.max(1e3).optional(),id:ye.max(128),metadata:c.array(nme).max(8).optional(),title:ye.max(4e3)}).strict(),L3e=c.object({emptyText:ye.max(500).optional(),metrics:c.array(tme).max(6).optional(),nextCursor:ye.max(1e3).optional(),records:c.array(rme).max(100),searchPlaceholder:ye.max(120).optional(),type:c.literal("list")}).strict(),ome=c.object({description:Xpe,id:Zpe,label:Vpe,navigation:eme,pluginDisplayName:ye.max(200),pluginName:ye.max(100)}).strict(),R3e=c.array(ome),ime=ye.max(1e3).optional(),Ame=ye.max(64).optional(),sme=c.string().trim().max(200).optional(),$3e=c.object({cursor:ime,filter:Ame,limit:c.number().int().min(1).max(50),query:sme}).strict();var cme=c.object({input:c.number().finite().nonnegative().optional(),output:c.number().finite().nonnegative().optional(),cacheRead:c.number().finite().nonnegative().optional(),cacheWrite:c.number().finite().nonnegative().optional(),total:c.number().finite().nonnegative().optional()}).strict(),ume=c.object({inputTokens:c.number().int().nonnegative().optional(),outputTokens:c.number().int().nonnegative().optional(),cachedInputTokens:c.number().int().nonnegative().optional(),cacheCreationTokens:c.number().int().nonnegative().optional(),reasoningTokens:c.number().int().nonnegative().optional(),totalTokens:c.number().int().nonnegative().optional(),cost:cme.optional()}).strict(),dme=c.union([c.literal("instruction"),c.literal("context")]),lme=c.object({authority:dme,actor:Sb.optional()}).strict();var H3e=c.record(c.string(),c.unknown()),G3e=c.object({item:c.string()}).passthrough();function pme(e){return e==="user_message"||e==="assistant_message"||e==="tool_result"||e==="handoff"||e==="compaction"}var mme=c.object({type:c.literal("user_message"),role:c.never().optional(),provenance:lme}).passthrough(),gme=c.object({type:c.literal("assistant_message"),role:c.never().optional()}).passthrough(),fme=c.object({type:c.literal("tool_result"),role:c.never().optional()}).passthrough(),JH=c.discriminatedUnion("type",[mme,gme,fme]),bme=c.object({item:JH,sourceEventSeq:c.number().int().nonnegative().optional()}).strict(),YH=c.array(bme),hme=c.object({reason:c.literal("capacity"),estimatedInputTokens:c.number().int().nonnegative(),replacementInputTokens:c.number().int().nonnegative().optional(),triggerTokens:c.number().int().nonnegative(),inputLimitTokens:c.number().int().positive(),inputMessageCount:c.number().int().nonnegative(),retainedMessageCount:c.number().int().nonnegative(),summaryChars:c.number().int().nonnegative()}).strict(),WH=c.discriminatedUnion("type",[c.object({type:c.literal("handoff"),modelProfile:$E,modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional(),replacementHistory:YH}).strict(),c.object({type:c.literal("compaction"),modelProfile:$E,modelId:c.string().min(1),details:hme.optional(),summary:c.string().min(1).optional(),replacementHistory:YH}).strict()]),U3e=c.object({data:WH,createdAtMs:c.number().finite()}).strict(),Bme=c.object({type:c.literal("mcp_provider_connected"),provider:c.string().min(1),credentialSubjectId:c.string().min(1)}).strict(),yme=c.object({type:c.literal("mcp_provider_connected_unowned"),provider:c.string().min(1)}).strict(),ZH=c.union([c.literal("plugin"),c.literal("mcp")]),Cme=c.object({type:c.literal("authorization_requested"),kind:ZH,provider:c.string().min(1),actorId:c.string().min(1),authorizationId:c.string().min(1),delivery:c.union([c.literal("private_link_sent"),c.literal("private_link_reused")])}).strict(),wme=c.object({type:c.literal("authorization_completed"),kind:ZH,provider:c.string().min(1),actorId:c.string().min(1),authorizationId:c.string().min(1)}).strict(),Eme=c.object({type:c.literal("tool_execution_started"),toolCallId:c.string().min(1),toolName:c.string().min(1)}).strict(),kme=c.object({type:c.literal("guardian_action_reviewed"),turnId:c.string().min(1),toolCallId:c.string().min(1),toolName:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),decision:c.enum(["allow","ask","deny"]),riskLevel:c.enum(["low","medium","high","critical"]),userAuthorization:c.enum(["high","medium","low","unknown"])}).strict(),Qme=c.union([c.literal("user"),c.literal("assistant"),c.literal("system")]),VH=c.object({type:c.literal("message"),messageId:c.string().min(1),role:Qme,text:c.string(),authorIdentityId:c.string().min(1).optional(),meta:c.record(c.string(),c.unknown()).optional()}).strict(),vme=VH.extend({type:c.literal("message_updated")}),Ime=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),_me=c.object({type:c.literal("messages_summarized"),historyFromSeq:c.number().int().nonnegative(),compactions:c.array(c.object({coveredMessageCount:c.number().int().nonnegative(),createdAtMs:c.number(),id:c.string().min(1),summary:c.string()}).strict())}).strict(),xme=c.enum(["slack","api","scheduler","internal"]),F2=c.enum(["agent_run_failed","delivery_failed","model_execution_failed","persistence_failed"]),S2=c.enum(["auth","permission","rate_limit","capacity","timeout","network","server","invalid_request","invalid_response","quota","content_policy","unknown","empty_output","tool_errors","suppressed_output"]),Dme=c.object({type:c.literal("turn_started"),turnId:c.string().min(1),inputMessageIds:c.array(c.string().min(1)).min(1),surface:xme}).strict().refine(e=>new Set(e.inputMessageIds).size===e.inputMessageIds.length,"turn input message ids must be unique"),Fme=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:$E,modelId:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),reasoningLevel:c.enum(LH),confidence:c.number().min(0).max(1).optional(),source:c.enum(["configured","inherited","router"])}).strict(),Sme=c.object({type:c.literal("turn_context"),turnId:c.string().min(1),pluginName:c.string().min(1),kind:c.string().min(1).max(64),version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict(),Nme=c.object({type:c.literal("structured_event"),namespace:c.string().regex(/^[a-z][a-z0-9-]*$/),name:c.string().regex(/^[a-z][a-z0-9_]*$/),version:c.number().int().positive(),turnId:c.string().min(1).optional(),content:c.record(c.string(),c.unknown())}).strict(),Lme=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict(),Rme=c.object({type:c.literal("attachments_delivered"),attachments:c.array(Lme).min(1),toolCallId:c.string().min(1).optional(),turnId:c.string().min(1).optional()}).strict(),$me=c.object({type:c.literal("turn_completed"),turnId:c.string().min(1),outcome:c.enum(["success","no_reply","cancelled"])}).strict(),Mme=c.object({type:c.literal("turn_failed"),turnId:c.string().min(1),failureCode:F2,failureReason:S2.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional()}).strict(),jme=c.object({type:c.literal("subagent_started"),subagentInvocationId:c.string().min(1),subagentKind:c.string().min(1),modelId:c.string().min(1).optional(),parentToolCallId:c.string().min(1).optional(),reasoningLevel:c.string().min(1).optional(),childConversationId:c.string().min(1)}).strict(),Pme=c.object({type:c.literal("subagent_ended"),subagentInvocationId:c.string().min(1),outcome:c.union([c.literal("success"),c.literal("error"),c.literal("aborted")]),errorCode:c.string().min(1).optional()}).strict(),XH=c.union([VH,vme,JH,Bme,Cme,wme,Eme,kme,Ime,_me,Dme,Sme,Nme,Rme,Fme,$me,Mme,jme,Pme]),Tme=c.union([XH,WH,yme]),Hme=["message","message_updated","user_message","assistant_message","tool_result","mcp_provider_connected","mcp_provider_connected_unowned","authorization_requested","authorization_completed","tool_execution_started","guardian_action_reviewed","message_handled","messages_summarized","turn_started","turn_context","structured_event","attachments_delivered","turn_routed","turn_completed","turn_failed","subagent_started","subagent_ended","handoff","compaction"],O3e=c.enum(Hme),Gme=c.object({type:c.literal("unknown"),originalType:c.string().min(1),payload:c.unknown()}).strict(),D2=c.object({schemaVersion:c.number().int().nonnegative(),seq:c.number().int().nonnegative(),historyVersion:c.number().int().nonnegative(),idempotencyKey:c.string().min(1).optional(),createdAtMs:c.number().finite()}).strict(),q3e=c.union([D2.extend({schemaVersion:c.union([c.literal(1),c.literal(2)]),data:Tme}).refine(e=>e.schemaVersion===1||pme(e.data.type)),D2.extend({data:Gme})]),z3e=D2.extend({type:c.string().min(1),payload:c.unknown()});var K3e=c.object({data:XH,idempotencyKey:c.string().min(1).optional(),createdAtMs:c.number().finite()}).strict(),cr=c.string().trim().min(1).max(400),N2=c.string().url().max(2048),Lb=c.string().datetime(),eG=c.object({provider:c.string().trim().min(1).max(100),channelName:cr.optional()}).strict(),Ume=c.enum(["in_progress","answered","done","partial","blocked","abandoned"]),tG=c.object({repository:cr,number:c.number().int().positive(),title:cr.optional(),url:N2,state:Nb,openedAt:Lb.optional(),mergedAt:Lb.optional(),closedAt:Lb.optional()}).strict(),Ome=c.object({kind:c.enum(["code_change","resource","url"]),label:cr,url:N2,status:cr.optional()}).strict(),qme=c.object({startedAt:Lb,lastActivityAt:Lb,durationMs:c.number().int().nonnegative(),participants:c.array(c.object({name:cr,messages:c.number().int().positive()}).strict()),userMessages:c.number().int().nonnegative(),assistantMessages:c.number().int().nonnegative(),toolResults:c.number().int().nonnegative(),events:c.number().int().nonnegative(),turns:c.number().int().positive().optional(),location:eG.optional(),codeChanges:c.array(tG)}).strict(),zme=c.object({schemaVersion:c.literal(1),record:qme,summary:c.string().trim().min(1).max(600),intent:cr,outcome:c.object({status:Ume,text:c.string().trim().min(1).max(600)}).strict(),decisions:c.array(c.object({text:cr,by:cr.optional(),kind:c.enum(["stated","confirmed","assumed"])}).strict()).max(20),openDecisions:c.array(c.object({text:cr,owner:cr.optional()}).strict()).max(20),facts:c.array(cr).max(30),links:c.array(Ome).max(40),keywords:c.array(c.string().trim().toLowerCase().min(1).max(400)).max(12)}).strict(),Kme=c.object({index:c.number().int().nonnegative(),role:c.enum(["user","assistant","tool","event"]),author:cr.optional(),text:c.string().min(1),createdAtMs:c.number().int().nonnegative(),turnId:c.string().min(1).optional()}).strict(),Yme=c.object({label:cr,url:N2,status:cr.optional()}).strict(),Y3e=c.object({conversationId:c.string().min(1),title:cr.optional(),visibility:c.enum(["private","public"]),location:eG.optional(),entries:c.array(Kme),codeChanges:c.array(tG),resources:c.array(Yme)}).strict();var iu=["image/png","image/jpeg","image/gif","image/webp"];var Rb=3145728,L2=3,Jme=c.object({filename:c.string().trim().min(1).max(255),contentType:c.enum(iu),data:c.string().min(4).max(Rb*4/3).regex(/^[A-Za-z0-9+/]*={0,2}$/).refine(e=>e.length%4===0)}).strict(),R2=c.object({id:c.string().min(1),filename:c.string().min(1),contentType:c.string().min(1),bytes:c.number().int().nonnegative()}).strict();var nG=c.object({kind:c.literal("automation"),id:c.string().min(1),title:c.string().min(1).max(160),url:c.string().url().nullable(),instruction:c.string().max(4e3),trigger:c.string().min(1),warning:c.string().nullable()}).strict();function Wme(e){return[e.title,e.warning,e.trigger,e.instruction,e.url,`Automation ID: ${e.id}`].filter(Boolean).join(`
68
68
  `)}var Zme=c.discriminatedUnion("kind",[nG,MH]),J3e=nG.extend({operation:c.enum(["created","updated","deleted"]).optional()});function $2(e){switch(e.kind){case"object":return[e.title,e.label!==e.title?e.label:void 0,e.description,e.status,...$H(e.facts).map(t=>`${t.label}: ${t.value}`),e.trigger,e.warning,e.url].filter(Boolean).join(`
69
- `);case"automation":return Wme(e)}}var W3e=c.object({plugin:c.string().min(1),key:c.string().min(1)}).strict();var Vme=c.enum(["active","completed","failed"]),Xme=c.enum(["api","internal","scheduler","slack"]),aG=ume,ege=c.object({conversationId:c.string().min(1)}).strict(),Z3e=c.object({attachmentId:c.string().min(1),conversationId:c.string().min(1)}).strict(),tge=c.object({limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),nge=c.object({before:c.string().min(1),limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),age=c.object({actorEmail:c.string().trim().email().transform(e=>e.toLowerCase()).optional(),q:c.string().trim().max(200).optional(),status:c.enum(["active","archived"]).default("active")}).strict(),rge=c.object({archived:c.boolean(),lastSeenAt:c.string().datetime()}).strict(),M2=c.object({archivedAt:c.string().datetime().nullable()}).strict(),rG=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().max(32e3),images:c.array(Jme).max(3).optional()}).strict().refine(e=>!!(e.message||e.images?.length),"Add a message or an image.").refine(e=>(e.images??[]).reduce((t,n)=>t+n.data.length,0)<=Rb*4/3,"Images must total 3 MB or less."),oge=rG.safeExtend({visibility:c.enum(["private","public"]).optional()}),PE=c.object({conversationId:c.string().min(1),messageId:c.string().min(1),status:c.enum(["accepted","duplicate"])}).strict(),Fd=c.object({email:c.string().optional(),fullName:c.string().optional(),slackUserId:c.string().optional(),slackUserName:c.string().optional()}).strict(),oG=c.enum(["defer","interrupt"]),iG=c.object({actorIdentity:Fd.optional(),createdAt:c.string().datetime(),delivery:oG,inboundMessageId:c.string().min(1),messageId:c.string().min(1),receivedAt:c.string().datetime(),role:c.literal("user"),source:c.enum(["slack","web"]),text:c.string().optional(),attachments:c.array(R2).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"pending message content must be text or explicitly redacted"}),e.redacted&&(e.actorIdentity||e.attachments)&&t.addIssue({code:"custom",message:"redacted pending messages must not expose actor identity or attachments"})}),AG=c.object({authorizationUrl:c.string().url(),completionText:c.string().min(1),label:c.string().min(1)}).strict(),j2=c.object({authorization:AG.optional(),conversationId:c.string().min(1),generatedAt:c.string().datetime(),messages:c.array(iG)}).strict(),ige=c.object({inboundMessageIds:c.array(c.string().min(1)).min(1).optional(),receivedBefore:c.string().datetime().optional()}).strict(),P2=c.object({cancelledCount:c.number().int().nonnegative(),cancelledInboundMessageIds:c.array(c.string().min(1)),conversationId:c.string().min(1)}).strict(),sG=c.object({costUsd:c.number().finite().nonnegative(),operations:c.array(c.object({costUsd:c.number().finite().nonnegative(),events:c.number().int().positive(),name:c.string().min(1),namespace:c.string().min(1)}).strict()).min(1)}).strict(),Age=c.object({id:c.string().min(1).optional(),kind:c.enum(["scheduled","event"]),label:c.string().min(1).optional(),title:c.string().min(1).optional()}).strict().superRefine((e,t)=>{!!e.id!=!!e.label&&t.addIssue({code:"custom",message:"sourceTask id and label must both be set or both omitted"})}),sge=jH.and(c.object({plugin:c.string().min(1),createdAt:c.string().datetime(),updatedAt:c.string().datetime()})),cG=c.object({createdAt:c.string().datetime(),role:c.enum(["assistant","user"]),text:c.string().min(1)}).strict(),gm=c.object({displayTitle:c.string(),activityPreview:cG.optional(),cumulativeDurationMs:c.number(),cumulativeUsage:aG.optional(),auxiliaryCosts:sG.optional(),conversationId:c.string(),isParticipant:c.boolean(),visibility:c.enum(["private","public"]).optional(),status:Vme,startedAt:c.string(),lastSeenAt:c.string(),lastProgressAt:c.string(),surface:Xme,actorIdentity:Fd.optional(),participants:c.array(Fd).optional(),archivedAt:c.string().datetime().nullable().optional(),channel:c.string().optional(),channelName:c.string().optional(),channelNameRedacted:c.boolean().optional(),locationId:c.string().optional(),sentryTraceUrl:c.string().optional(),locationUrl:c.string().url().optional(),traceId:c.string().optional(),annotations:c.array(sge).optional(),sidebarAnnotations:c.array(PH).optional(),assignedWork:c.boolean().optional(),finishedWorkAt:c.string().datetime().optional(),isPriority:c.boolean().optional(),unfinishedWork:c.boolean().optional()}).strict(),cge=c.object({type:c.literal("message"),messageId:c.string().min(1),role:c.enum(["assistant","system","user"]),source:c.enum(["slack","web"]).optional(),actorIdentity:Fd.optional(),eventType:c.string().min(1).optional(),eventObjectType:mm.optional(),explicitMention:c.boolean().optional(),trustedSummary:c.string().min(1).optional(),cards:c.array(Zme).optional(),text:c.string().optional(),attachments:c.array(R2).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"message content must be text or explicitly redacted"}),e.redacted&&(e.actorIdentity||e.cards||e.attachments)&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity, cards, or attachments"})}),uge=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),dge=c.object({toolCallId:c.string().min(1),name:c.string().min(1),status:c.enum(["running","completed","error"]),startedAt:c.string().datetime().optional(),startedSeq:c.number().int().nonnegative().optional(),input:c.unknown().optional(),output:c.unknown().optional()}).strict().superRefine((e,t)=>{e.startedAt===void 0!=(e.startedSeq===void 0)&&t.addIssue({code:"custom",message:"tool start sequence and timestamp must be provided together"})}),uG=c.object({type:c.literal("reasoning"),text:c.string().min(1).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"reasoning content must be text or explicitly redacted"})}),lge=c.object({type:c.literal("tool_call"),toolCallId:c.string().min(1)}).strict(),pge=c.object({parts:c.array(c.discriminatedUnion("type",[uG,lge])).min(1)}).strict(),mge=c.object({type:c.literal("tool_calls"),calls:c.array(dge).min(1),assistant:pge.optional()}).strict().superRefine((e,t)=>{if(!e.assistant)return;let n=new Map;for(let a of e.calls)n.set(a.toolCallId,(n.get(a.toolCallId)??0)+1);let r=new Map;for(let a of e.assistant.parts)a.type==="tool_call"&&r.set(a.toolCallId,(r.get(a.toolCallId)??0)+1);(n.size!==r.size||[...n].some(([a,o])=>r.get(a)!==o))&&t.addIssue({code:"custom",path:["assistant","parts"],message:"assistant tool parts must reference every call exactly once"})}),gge=c.object({type:c.literal("assistant_message"),parts:c.array(uG).min(1)}).strict(),fge=c.discriminatedUnion("state",[c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.enum(["succeeded","no_reply"])}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("started"),inputMessageIds:c.array(c.string().min(1)).min(1).optional()}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("failed"),failureCode:F2,failureReason:S2.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional(),sentryEventUrl:c.string().url().optional()}).strict()]),bge=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:c.string().min(1),modelId:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),reasoningLevel:c.string().min(1),confidence:c.number().min(0).max(1).optional(),source:c.enum(["configured","inherited","router"])}).strict(),hge=c.object({type:c.literal("guardian_action_reviewed"),turnId:c.string().min(1),toolCallId:c.string().min(1),toolName:c.string().min(1),decision:c.enum(["allow","ask","deny"]),riskLevel:c.enum(["low","medium","high","critical"]),userAuthorization:c.enum(["high","medium","low","unknown"])}).strict(),Bge=c.object({type:c.literal("turn_context"),turnId:c.string().min(1),pluginName:c.string().min(1),kind:c.string().min(1),version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict(),yge=c.object({type:c.literal("structured_event"),namespace:c.string().min(1),name:c.string().min(1),version:c.number().int().positive(),turnId:c.string().min(1).optional(),presentation:TH}).strict(),Cge=c.object({type:c.literal("attachments_delivered"),attachments:c.array(R2).min(1)}).strict(),wge=c.object({type:c.literal("compaction"),modelProfile:c.string().min(1).optional(),modelId:c.string().min(1).optional(),summary:c.string().min(1).optional(),details:c.object({reason:c.literal("capacity"),estimatedInputTokens:c.number().int().nonnegative(),replacementInputTokens:c.number().int().nonnegative().optional(),triggerTokens:c.number().int().nonnegative(),inputLimitTokens:c.number().int().positive(),inputMessageCount:c.number().int().nonnegative(),retainedMessageCount:c.number().int().nonnegative(),summaryChars:c.number().int().nonnegative()}).strict().optional()}).strict(),Ege=c.object({type:c.literal("handoff"),modelProfile:c.string().min(1),modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional()}).strict(),kge=c.object({type:c.literal("subagent"),startedSeq:c.number().int().nonnegative(),startedAt:c.string().datetime(),childConversationId:c.string().min(1),subagentKind:c.string().min(1),parentToolCallId:c.string().min(1).optional(),status:c.enum(["running","completed","error","aborted"])}).strict(),dG=c.discriminatedUnion("type",[cge,uge,gge,mge,fge,Bge,yge,Cge,bge,hge,wge,Ege,kge]),T2=c.object({seq:c.number().int().nonnegative(),createdAt:c.string().datetime(),data:dG}).strict(),H2=c.discriminatedUnion("status",[c.object({status:c.literal("available")}).strict(),c.object({status:c.literal("redacted"),reason:c.literal("non_public_conversation")}).strict(),c.object({status:c.literal("expired"),expiredAt:c.string().datetime()}).strict()]),Qge=c.object({modelId:c.string(),usage:aG}).strict();function lG(e,t){e.eventHistory.status==="expired"&&e.events.length>0&&t.addIssue({code:"custom",path:["events"],message:"expired event history must not contain events"});for(let n=1;n<e.events.length;n+=1)e.events[n].seq<=e.events[n-1].seq&&t.addIssue({code:"custom",path:["events",n,"seq"],message:"report event sequences must be strictly increasing"});for(let[n,r]of e.events.entries())r.data.type==="message"&&(e.eventHistory.status==="redacted"&&r.data.redacted!==!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact messages"}),e.eventHistory.status==="available"&&r.data.redacted===!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose messages"})),e.eventHistory.status==="redacted"&&r.data.type==="tool_calls"&&r.data.calls.some(a=>a.input!==void 0||a.output!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact tool payloads"}),e.eventHistory.status==="redacted"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.text!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact assistant messages"}),e.eventHistory.status==="available"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.redacted===!0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose reasoning"}),r.data.type==="tool_calls"&&(e.eventHistory.status==="redacted"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.text!==void 0)||e.eventHistory.status==="available"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.redacted===!0))&&t.addIssue({code:"custom",path:["events",n,"data","assistant"],message:"assistant reasoning must match event history visibility"})}var G2=gm.extend({brief:c.object({content:zme,updatedAt:c.string().datetime(),version:c.number().int().positive()}).strict().optional(),modelUsage:c.array(Qge).optional(),events:c.array(T2),eventHistory:H2,previousCursor:c.string().min(1).optional(),generatedAt:c.string(),sentryConversationUrl:c.string().optional(),sourceTask:Age.optional()}).strict().superRefine(lG),U2=c.object({events:c.array(T2),eventHistory:H2,previousCursor:c.string().min(1).optional(),generatedAt:c.string()}).strict().superRefine(lG),O2=c.object({conversations:c.array(gm),source:c.literal("conversation_index"),generatedAt:c.string()}).strict(),Sd=c.object({active:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),label:c.string(),costUsd:c.number().optional(),tokens:c.number().optional()}).strict(),pG=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),_2=c.object({cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),costUsd:c.number().optional(),date:pG,durationMs:c.number(),inputTokens:c.number().optional(),tokens:c.number().optional()}).strict(),x2=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),date:pG,deny:c.number(),requests:c.number()}).strict(),vge=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),deny:c.number(),metricDays:c.array(x2),metricHours:c.array(x2).optional(),metricSixHours:c.array(x2).optional(),requests:c.number()}).strict(),q2=c.object({active:c.number(),cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),durationMs:c.number(),failed:c.number(),generatedAt:c.string(),guardian:vge,metricDays:c.array(_2),metricHours:c.array(_2).optional(),metricSixHours:c.array(_2).optional(),locations:c.array(Sd),actors:c.array(Sd),source:c.literal("conversation_index"),costUsd:c.number().optional(),inputTokens:c.number().optional(),tokens:c.number().optional(),windowEnd:c.string(),windowStart:c.string()}).strict();var Ige=c.object({status:c.literal("ok"),service:c.string(),timestamp:c.string()}).strict(),mG=c.object({configKeys:c.array(c.string()),description:c.string(),displayName:c.string(),name:c.string()}).strict(),z2=c.array(mG),K2=c.object({name:c.string(),pluginProvider:c.string().optional()}).strict(),Y2=c.array(K2),gG=c.object({dir:c.string(),hasMigrationsDir:c.boolean(),hasSkillsDir:c.boolean(),packageName:c.string()}).strict(),fG=c.object({packageNames:c.array(c.string()),packages:c.array(gG),manifestRoots:c.array(c.string()),skillRoots:c.array(c.string()),tracingIncludes:c.array(c.string())}).strict(),_ge=c.object({cwd:c.string(),homeDir:c.string(),descriptionText:c.string().optional(),providers:c.array(c.string()),skills:c.array(K2),packagedContent:fG}).strict(),J2=c.enum(["danger","good","neutral","warning"]),xge=c.object({label:c.string(),tone:J2.optional(),value:c.string()}).strict(),Dge=c.object({key:c.string(),label:c.string()}).strict(),Fge=c.object({id:c.string(),tone:J2.optional(),values:c.record(c.string(),c.string())}).strict(),Sge=c.object({fields:c.array(Dge).optional(),emptyText:c.string().optional(),records:c.array(Fge).optional(),title:c.string()}).strict(),Nge=c.object({categories:c.array(c.object({id:c.string().min(1),label:c.string().min(1),values:c.record(c.string(),c.number().finite())}).strict()).max(100),description:c.string().optional(),emptyText:c.string().optional(),id:c.string().min(1),series:c.array(c.object({format:c.literal("usd").optional(),key:c.string().min(1),label:c.string().min(1),tone:J2.optional()}).strict()).min(1).max(8),timeRangeDays:c.array(c.union([c.literal(1),c.literal(7),c.literal(30),c.literal(90)])).min(1).max(4).optional(),title:c.string().min(1),type:c.literal("bar_chart")}).strict(),bG=c.object({generatedAt:c.string().optional(),metrics:c.array(xge).optional(),recordSets:c.array(Sge).optional(),title:c.string().optional(),pluginName:c.string(),widgets:c.array(Nge).max(12).optional()}).strict(),TE=c.object({generatedAt:c.string(),reports:c.array(bG),source:c.literal("plugins")}).strict(),hG=36e5,eNe=6*hG,tNe=24*hG;async function W2(e){let t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(`${e.conversationId}\0${e.idempotencyKey}`));return`api-msg:${Array.from(new Uint8Array(t),n=>n.toString(16).padStart(2,"0")).join("").slice(0,24)}`}var D=Symbol.for("drizzle:entityKind");function ea(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,D))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(D in n&&n[D]===t[D])return!0;n=Object.getPrototypeOf(n)}return!1}var Nd=class{constructor(t,n){this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}static[D]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}};var HE=class{static[D]="ColumnBuilder";config;constructor(t,n,r){this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}};var js=Symbol.for("drizzle:Name");var GE=class{static[D]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(t,n){this.reference=()=>{let{name:r,columns:a,foreignColumns:o}=t();return{name:r,columns:a,foreignTable:o[0].table,foreignColumns:o}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new Z2(t,this)}},Z2=class{constructor(t,n){this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}static[D]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:t,columns:n,foreignColumns:r}=this.reference(),a=n.map(A=>A.name),o=r.map(A=>A.name),i=[this.table[js],...a,r[0].table[js],...o];return t??`${i.join("_")}_fk`}};function UE(e,...t){return e(...t)}function eS(e,t){return`${e[js]}_${t.join("_")}_unique`}var V2=class{constructor(t,n){this.name=n,this.columns=t}static[D]="PgUniqueConstraintBuilder";columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(t){return new X2(t,this.columns,this.nullsNotDistinctConfig,this.name)}},BG=class{static[D]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new V2(t,this.name)}},X2=class{constructor(t,n,r,a){this.table=t,this.columns=n,this.name=a??eS(this.table,this.columns.map(o=>o.name)),this.nullsNotDistinct=r}static[D]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function yG(e,t,n){for(let r=t;r<e.length;r++){let a=e[r];if(a==="\\"){r++;continue}if(a==='"')return[e.slice(t,r).replace(/\\/g,""),r+1];if(!n&&(a===","||a==="}"))return[e.slice(t,r).replace(/\\/g,""),r]}return[e.slice(t).replace(/\\/g,""),e.length]}function CG(e,t=0){let n=[],r=t,a=!1;for(;r<e.length;){let o=e[r];if(o===","){(a||r===t)&&n.push(""),a=!0,r++;continue}if(a=!1,o==="\\"){r+=2;continue}if(o==='"'){let[s,u]=yG(e,r+1,!0);n.push(s),r=u;continue}if(o==="}")return[n,r+1];if(o==="{"){let[s,u]=CG(e,r+1);n.push(s),r=u;continue}let[i,A]=yG(e,r,!1);n.push(i),r=A}return[n,r]}function wG(e){let[t]=CG(e,1);return t}function tS(e){return`{${e.map(t=>Array.isArray(t)?tS(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var ee=class extends HE{foreignKeyConfigs=[];static[D]="PgColumnBuilder";array(t){return new aS(this.config.name,this,t)}references(t,n={}){return this.foreignKeyConfigs.push({ref:t,actions:n}),this}unique(t,n){return this.config.isUnique=!0,this.config.uniqueName=t,this.config.uniqueType=n?.nulls,this}generatedAlwaysAs(t){return this.config.generated={as:t,type:"always",mode:"stored"},this}buildForeignKeys(t,n){return this.foreignKeyConfigs.map(({ref:r,actions:a})=>UE((o,i)=>{let A=new GE(()=>{let s=o();return{columns:[t],foreignColumns:[s]}});return i.onUpdate&&A.onUpdate(i.onUpdate),i.onDelete&&A.onDelete(i.onDelete),A.build(n)},r,a))}buildExtraConfigColumn(t){return new nS(t,this.config)}},W=class extends Nd{constructor(t,n){n.uniqueName||(n.uniqueName=eS(t,[n.name])),super(t,n),this.table=t}static[D]="PgColumn"},nS=class extends W{static[D]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(t){return this.indexConfig.opClass=t,this}},fm=class{static[D]="IndexedColumn";constructor(t,n,r,a){this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=a}name;keyAsName;type;indexConfig},aS=class extends ee{static[D]="PgArrayBuilder";constructor(t,n,r){super(t,"array","PgArray"),this.config.baseBuilder=n,this.config.size=r}build(t){let n=this.config.baseBuilder.build(t);return new rS(t,this.config,n)}},rS=class e extends W{constructor(t,n,r,a){super(t,n),this.baseColumn=r,this.range=a,this.size=n.size}size;static[D]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(t){return typeof t=="string"&&(t=wG(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let r=t.map(a=>a===null?null:ea(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?r:tS(r)}};var EG=class extends ee{static[D]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new oS(t,this.config)}},oS=class extends W{static[D]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}},kG=Symbol.for("drizzle:isPgEnum");function vG(e){return!!e&&typeof e=="function"&&kG in e&&e[kG]===!0}var QG=class extends ee{static[D]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new iS(t,this.config)}},iS=class extends W{static[D]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}};var bm=class{static[D]="Subquery";constructor(t,n,r,a=!1,o=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:r,isWith:a,usedTables:o}}},IG=class extends bm{static[D]="WithSubquery"};var _G="0.45.2";var AS,sS,xG={startActiveSpan(e,t){return AS?(sS||(sS=AS.trace.getTracer("drizzle-orm",_G)),UE((n,r)=>r.startActiveSpan(e,a=>{try{return t(a)}catch(o){throw a.setStatus({code:n.SpanStatusCode.ERROR,message:o instanceof Error?o.message:"Unknown error"}),o}finally{a.end()}}),AS,sS)):t()}};var hm=Symbol.for("drizzle:ViewBaseConfig");var cS=Symbol.for("drizzle:Schema"),DG=Symbol.for("drizzle:Columns"),FG=Symbol.for("drizzle:ExtraConfigColumns"),uS=Symbol.for("drizzle:OriginalName"),dS=Symbol.for("drizzle:BaseName"),$b=Symbol.for("drizzle:IsAlias"),SG=Symbol.for("drizzle:ExtraConfigBuilder"),Lge=Symbol.for("drizzle:IsDrizzleTable"),Rn=class{static[D]="Table";static Symbol={Name:js,Schema:cS,OriginalName:uS,Columns:DG,ExtraConfigColumns:FG,BaseName:dS,IsAlias:$b,ExtraConfigBuilder:SG};[js];[uS];[cS];[DG];[FG];[dS];[$b]=!1;[Lge]=!0;[SG]=void 0;constructor(t,n,r){this[js]=this[uS]=t,this[cS]=n,this[dS]=r}};var NG=class{static[D]="FakePrimitiveParam"};function Rge(e){return e!=null&&typeof e.getSQL=="function"}function $ge(e){let t={sql:"",params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Do=class{static[D]="StringChunk";value;constructor(t){this.value=Array.isArray(t)?t:[t]}getSQL(){return new $n([this])}},$n=class e{constructor(t){this.queryChunks=t;for(let n of t)if(ea(n,Rn)){let r=n[Rn.Symbol.Schema];this.usedTables.push(r===void 0?n[Rn.Symbol.Name]:r+"."+n[Rn.Symbol.Name])}}static[D]="SQL";decoder=LG;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return xG.startActiveSpan("drizzle.buildSQL",n=>{let r=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(t,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:a,escapeName:o,escapeParam:i,prepareTyping:A,inlineParams:s,paramStartIndex:u}=r;return $ge(t.map(d=>{if(ea(d,Do))return{sql:d.value.join(""),params:[]};if(ea(d,Mb))return{sql:o(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){let l=[new Do("(")];for(let[m,p]of d.entries())l.push(p),m<d.length-1&&l.push(new Do(", "));return l.push(new Do(")")),this.buildQueryFromSourceParams(l,r)}if(ea(d,e))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:s||d.shouldInlineParams});if(ea(d,Rn)){let l=d[Rn.Symbol.Schema],m=d[Rn.Symbol.Name];return{sql:l===void 0||d[$b]?o(m):o(l)+"."+o(m),params:[]}}if(ea(d,Nd)){let l=a.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:o(l),params:[]};let m=d.table[Rn.Symbol.Schema];return{sql:d.table[$b]||m===void 0?o(d.table[Rn.Symbol.Name])+"."+o(l):o(m)+"."+o(d.table[Rn.Symbol.Name])+"."+o(l),params:[]}}if(ea(d,lS)){let l=d[hm].schema,m=d[hm].name;return{sql:l===void 0||d[hm].isAlias?o(m):o(l)+"."+o(m),params:[]}}if(ea(d,OE)){if(ea(d.value,jb))return{sql:i(u.value++,d),params:[d],typings:["none"]};let l=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(ea(l,e))return this.buildQueryFromSourceParams([l],r);if(s)return{sql:this.mapInlineParam(l,r),params:[]};let m=["none"];return A&&(m=[A(d.encoder)]),{sql:i(u.value++,l),params:[l],typings:m}}return ea(d,jb)?{sql:i(u.value++,d),params:[d],typings:["none"]}:ea(d,e.Aliased)&&d.fieldAlias!==void 0?{sql:o(d.fieldAlias),params:[]}:ea(d,bm)?d._.isWith?{sql:o(d._.alias),params:[]}:this.buildQueryFromSourceParams([new Do("("),d._.sql,new Do(") "),new Mb(d._.alias)],r):vG(d)?d.schema?{sql:o(d.schema)+"."+o(d.enumName),params:[]}:{sql:o(d.enumName),params:[]}:Rge(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new Do("("),d.getSQL(),new Do(")")],r):s?{sql:this.mapInlineParam(d,r),params:[]}:{sql:i(u.value++,d),params:[d],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){let r=t.toString();return n(r==="[object Object]"?JSON.stringify(t):r)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new e.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},Mb=class{constructor(t){this.value=t}static[D]="Name";brand;getSQL(){return new $n([this])}};var LG={mapFromDriverValue:e=>e},RG={mapToDriverValue:e=>e},qNe={...LG,...RG},OE=class{constructor(t,n=RG){this.value=t,this.encoder=n}static[D]="Param";brand;getSQL(){return new $n([this])}};function Bm(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Do(e[0]));for(let[r,a]of t.entries())n.push(a,new Do(e[r+1]));return new $n(n)}(e=>{function t(){return new $n([])}e.empty=t;function n(s){return new $n(s)}e.fromList=n;function r(s){return new $n([new Do(s)])}e.raw=r;function a(s,u){let d=[];for(let[l,m]of s.entries())l>0&&u!==void 0&&d.push(u),d.push(m);return new $n(d)}e.join=a;function o(s){return new Mb(s)}e.identifier=o;function i(s){return new jb(s)}e.placeholder=i;function A(s,u){return new OE(s,u)}e.param=A})(Bm||(Bm={}));(e=>{class t{constructor(r,a){this.sql=r,this.fieldAlias=a}static[D]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})($n||($n={}));var jb=class{constructor(t){this.name=t}static[D]="Placeholder";getSQL(){return new $n([this])}};var Mge=Symbol.for("drizzle:IsDrizzleView"),lS=class{static[D]="View";[hm];[Mge]=!0;constructor({name:t,schema:n,selectedFields:r,query:a}){this[hm]={name:t,originalName:t,schema:n,selectedFields:r,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new $n([this])}};Nd.prototype.getSQL=function(){return new $n([this])};Rn.prototype.getSQL=function(){return new $n([this])};bm.prototype.getSQL=function(){return new $n([this])};function tt(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var KNe=typeof TextDecoder>"u"?null:new TextDecoder;var Ps=class extends ee{static[D]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"always",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}};var pS=class extends Ps{static[D]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new mS(t,this.config)}},mS=class extends W{static[D]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},gS=class extends Ps{static[D]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new fS(t,this.config)}},fS=class extends W{static[D]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function $G(e,t){let{name:n,config:r}=tt(e,t);return r.mode==="number"?new pS(n):new gS(n)}var bS=class extends ee{static[D]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new hS(t,this.config)}},hS=class extends W{static[D]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},BS=class extends ee{static[D]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new yS(t,this.config)}},yS=class extends W{static[D]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function MG(e,t){let{name:n,config:r}=tt(e,t);return r.mode==="number"?new bS(n):new BS(n)}var CS=class extends ee{static[D]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new wS(t,this.config)}},wS=class extends W{static[D]="PgBoolean";getSQLType(){return"boolean"}};function jG(e){return new CS(e??"")}var ES=class extends ee{static[D]="PgCharBuilder";constructor(t,n){super(t,"string","PgChar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new kS(t,this.config)}},kS=class extends W{static[D]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}};function PG(e,t={}){let{name:n,config:r}=tt(e,t);return new ES(n,r)}var QS=class extends ee{static[D]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new vS(t,this.config)}},vS=class extends W{static[D]="PgCidr";getSQLType(){return"cidr"}};function TG(e){return new QS(e??"")}var IS=class extends ee{static[D]="PgCustomColumnBuilder";constructor(t,n,r){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=n,this.config.customTypeParams=r}build(t){return new _S(t,this.config)}},_S=class extends W{static[D]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(t,n){super(t,n),this.sqlName=n.customTypeParams.dataType(n.fieldConfig),this.mapTo=n.customTypeParams.toDriver,this.mapFrom=n.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(t){return typeof this.mapFrom=="function"?this.mapFrom(t):t}mapToDriverValue(t){return typeof this.mapTo=="function"?this.mapTo(t):t}};function HG(e){return(t,n)=>{let{name:r,config:a}=tt(t,n);return new IS(r,a,e)}}var MA=class extends ee{static[D]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Bm`now()`)}};var xS=class extends MA{static[D]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new DS(t,this.config)}},DS=class extends W{static[D]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},FS=class extends MA{static[D]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new SS(t,this.config)}},SS=class extends W{static[D]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function GG(e,t){let{name:n,config:r}=tt(e,t);return r?.mode==="date"?new xS(n):new FS(n)}var NS=class extends ee{static[D]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new LS(t,this.config)}},LS=class extends W{static[D]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function UG(e){return new NS(e??"")}var RS=class extends ee{static[D]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new $S(t,this.config)}},$S=class extends W{static[D]="PgInet";getSQLType(){return"inet"}};function OG(e){return new RS(e??"")}var MS=class extends Ps{static[D]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new jS(t,this.config)}},jS=class extends W{static[D]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function qG(e){return new MS(e??"")}var PS=class extends ee{static[D]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new TS(t,this.config)}},TS=class extends W{static[D]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let t=this.fields?` ${this.fields}`:"",n=this.precision?`(${this.precision})`:"";return`interval${t}${n}`}};function zG(e,t={}){let{name:n,config:r}=tt(e,t);return new PS(n,r)}var HS=class extends ee{static[D]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new GS(t,this.config)}},GS=class extends W{static[D]="PgJson";constructor(t,n){super(t,n)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function KG(e){return new HS(e??"")}var US=class extends ee{static[D]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new OS(t,this.config)}},OS=class extends W{static[D]="PgJsonb";constructor(t,n){super(t,n)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function qE(e){return new US(e??"")}var qS=class extends ee{static[D]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new zS(t,this.config)}},zS=class extends W{static[D]="PgLine";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r),Number.parseFloat(a)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}},KS=class extends ee{static[D]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new YS(t,this.config)}},YS=class extends W{static[D]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return{a:Number.parseFloat(n),b:Number.parseFloat(r),c:Number.parseFloat(a)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}};function YG(e,t){let{name:n,config:r}=tt(e,t);return!r?.mode||r.mode==="tuple"?new qS(n):new KS(n)}var JS=class extends ee{static[D]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new WS(t,this.config)}},WS=class extends W{static[D]="PgMacaddr";getSQLType(){return"macaddr"}};function JG(e){return new JS(e??"")}var ZS=class extends ee{static[D]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new VS(t,this.config)}},VS=class extends W{static[D]="PgMacaddr8";getSQLType(){return"macaddr8"}};function WG(e){return new ZS(e??"")}var XS=class extends ee{static[D]="PgNumericBuilder";constructor(t,n,r){super(t,"string","PgNumeric"),this.config.precision=n,this.config.scale=r}build(t){return new e4(t,this.config)}},e4=class extends W{static[D]="PgNumeric";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="string"?t:String(t)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},t4=class extends ee{static[D]="PgNumericNumberBuilder";constructor(t,n,r){super(t,"number","PgNumericNumber"),this.config.precision=n,this.config.scale=r}build(t){return new n4(t,this.config)}},n4=class extends W{static[D]="PgNumericNumber";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},a4=class extends ee{static[D]="PgNumericBigIntBuilder";constructor(t,n,r){super(t,"bigint","PgNumericBigInt"),this.config.precision=n,this.config.scale=r}build(t){return new r4(t,this.config)}},r4=class extends W{static[D]="PgNumericBigInt";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function ZG(e,t){let{name:n,config:r}=tt(e,t),a=r?.mode;return a==="number"?new t4(n,r?.precision,r?.scale):a==="bigint"?new a4(n,r?.precision,r?.scale):new XS(n,r?.precision,r?.scale)}var o4=class extends ee{static[D]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new i4(t,this.config)}},i4=class extends W{static[D]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}},A4=class extends ee{static[D]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new s4(t,this.config)}},s4=class extends W{static[D]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return{x:Number.parseFloat(n),y:Number.parseFloat(r)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}};function VG(e,t){let{name:n,config:r}=tt(e,t);return!r?.mode||r.mode==="tuple"?new o4(n):new A4(n)}function jge(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function XG(e,t){let n=new ArrayBuffer(8),r=new DataView(n);for(let a=0;a<8;a++)r.setUint8(a,e[t+a]);return r.getFloat64(0,!0)}function c4(e){let t=jge(e),n=0,r=t[n];n+=1;let a=new DataView(t.buffer),o=a.getUint32(n,r===1);n+=4;let i;if(o&536870912&&(i=a.getUint32(n,r===1),n+=4),(o&65535)===1){let A=XG(t,n);n+=8;let s=XG(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var u4=class extends ee{static[D]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new d4(t,this.config)}},d4=class extends W{static[D]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return c4(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},l4=class extends ee{static[D]="PgGeometryObjectBuilder";constructor(t){super(t,"json","PgGeometryObject")}build(t){return new p4(t,this.config)}},p4=class extends W{static[D]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){let n=c4(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function eU(e,t){let{name:n,config:r}=tt(e,t);return!r?.mode||r.mode==="tuple"?new u4(n):new l4(n)}var m4=class extends ee{static[D]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new g4(t,this.config)}},g4=class extends W{static[D]="PgReal";constructor(t,n){super(t,n)}getSQLType(){return"real"}mapFromDriverValue=t=>typeof t=="string"?Number.parseFloat(t):t};function tU(e){return new m4(e??"")}var f4=class extends ee{static[D]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new b4(t,this.config)}},b4=class extends W{static[D]="PgSerial";getSQLType(){return"serial"}};function nU(e){return new f4(e??"")}var h4=class extends Ps{static[D]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new B4(t,this.config)}},B4=class extends W{static[D]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function aU(e){return new h4(e??"")}var y4=class extends ee{static[D]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new C4(t,this.config)}},C4=class extends W{static[D]="PgSmallSerial";getSQLType(){return"smallserial"}};function rU(e){return new y4(e??"")}var w4=class extends ee{static[D]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new E4(t,this.config)}},E4=class extends W{static[D]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function Hi(e,t={}){let{name:n,config:r}=tt(e,t);return new w4(n,r)}var k4=class extends MA{constructor(t,n,r){super(t,"string","PgTime"),this.withTimezone=n,this.precision=r,this.config.withTimezone=n,this.config.precision=r}static[D]="PgTimeBuilder";build(t){return new Q4(t,this.config)}},Q4=class extends W{static[D]="PgTime";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function oU(e,t={}){let{name:n,config:r}=tt(e,t);return new k4(n,r.withTimezone??!1,r.precision)}var v4=class extends MA{static[D]="PgTimestampBuilder";constructor(t,n,r){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=r}build(t){return new I4(t,this.config)}},I4=class extends W{static[D]="PgTimestamp";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){return typeof t=="string"?new Date(this.withTimezone?t:t+"+0000"):t}mapToDriverValue=t=>t.toISOString()},_4=class extends MA{static[D]="PgTimestampStringBuilder";constructor(t,n,r){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=r}build(t){return new x4(t,this.config)}},x4=class extends W{static[D]="PgTimestampString";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){if(typeof t=="string")return t;let n=t.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let r=t.getTimezoneOffset(),a=r<=0?"+":"-";return`${n}${a}${Math.floor(Math.abs(r)/60).toString().padStart(2,"0")}`}return n}};function zE(e,t={}){let{name:n,config:r}=tt(e,t);return r?.mode==="string"?new _4(n,r.withTimezone??!1,r.precision):new v4(n,r?.withTimezone??!1,r?.precision)}var D4=class extends ee{static[D]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Bm`gen_random_uuid()`)}build(t){return new F4(t,this.config)}},F4=class extends W{static[D]="PgUUID";getSQLType(){return"uuid"}};function iU(e){return new D4(e??"")}var S4=class extends ee{static[D]="PgVarcharBuilder";constructor(t,n){super(t,"string","PgVarchar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new N4(t,this.config)}},N4=class extends W{static[D]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function AU(e,t={}){let{name:n,config:r}=tt(e,t);return new S4(n,r)}var L4=class extends ee{static[D]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new R4(t,this.config)}},R4=class extends W{static[D]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function sU(e,t){let{name:n,config:r}=tt(e,t);return new L4(n,r)}var $4=class extends ee{static[D]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new M4(t,this.config)}},M4=class extends W{static[D]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function cU(e,t){let{name:n,config:r}=tt(e,t);return new $4(n,r)}var j4=class extends ee{static[D]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new P4(t,this.config)}},P4=class extends W{static[D]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function uU(e,t){let{name:n,config:r}=tt(e,t);return new j4(n,r)}var T4=class extends ee{static[D]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new H4(t,this.config)}},H4=class extends W{static[D]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function dU(e,t){let{name:n,config:r}=tt(e,t);return new T4(n,r)}function lU(){return{bigint:$G,bigserial:MG,boolean:jG,char:PG,cidr:TG,customType:HG,date:GG,doublePrecision:UG,inet:OG,integer:qG,interval:zG,json:KG,jsonb:qE,line:YG,macaddr:JG,macaddr8:WG,numeric:ZG,point:VG,geometry:eU,real:tU,serial:nU,smallint:aU,smallserial:rU,text:Hi,time:oU,timestamp:zE,uuid:iU,varchar:AU,bit:sU,halfvec:cU,sparsevec:uU,vector:dU}}var G4=Symbol.for("drizzle:PgInlineForeignKeys"),pU=Symbol.for("drizzle:EnableRLS"),Pb=class extends Rn{static[D]="PgTable";static Symbol=Object.assign({},Rn.Symbol,{InlineForeignKeys:G4,EnableRLS:pU});[G4]=[];[pU]=!1;[Rn.Symbol.ExtraConfigBuilder]=void 0;[Rn.Symbol.ExtraConfigColumns]={}};function Pge(e,t,n,r,a=e){let o=new Pb(e,r,a),i=typeof t=="function"?t(lU()):t,A=Object.fromEntries(Object.entries(i).map(([d,l])=>{let m=l;m.setName(d);let p=m.build(o);return o[G4].push(...m.buildForeignKeys(p,o)),[d,p]})),s=Object.fromEntries(Object.entries(i).map(([d,l])=>{let m=l;m.setName(d);let p=m.buildExtraConfigColumn(o);return[d,p]})),u=Object.assign(o,A);return u[Rn.Symbol.Columns]=A,u[Rn.Symbol.ExtraConfigColumns]=s,n&&(u[Pb.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[Pb.Symbol.EnableRLS]=!0,u)})}var mU=(e,t,n)=>Pge(e,t,n,void 0);var KE=class{constructor(t,n){this.unique=t,this.name=n}static[D]="PgIndexBuilderOn";on(...t){return new Tb(t.map(n=>{if(ea(n,$n))return n;n=n;let r=new fm(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),r}),this.unique,!1,this.name)}onOnly(...t){return new Tb(t.map(n=>{if(ea(n,$n))return n;n=n;let r=new fm(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,r}),this.unique,!0,this.name)}using(t,...n){return new Tb(n.map(r=>{if(ea(r,$n))return r;r=r;let a=new fm(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),a}),this.unique,!0,this.name,t)}},Tb=class{static[D]="PgIndexBuilder";config;constructor(t,n,r,a,o="btree"){this.config={name:a,columns:t,unique:n,only:r,method:o}}concurrently(){return this.config.concurrently=!0,this}with(t){return this.config.with=t,this}where(t){return this.config.where=t,this}build(t){return new U4(this.config,t)}},U4=class{static[D]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function gU(e){return new KE(!1,e)}function fU(e){return new KE(!0,e)}var bU=e=>zE(e,{withTimezone:!0}),hU=c.enum(["channel","dm","group","local_conversation","thread","web_session"]),iMe=mU("junior_destinations",{id:Hi("id").primaryKey(),provider:Hi("provider").notNull(),providerTenantId:Hi("provider_tenant_id").notNull().default(""),providerDestinationId:Hi("provider_destination_id").notNull(),kind:Hi("kind").$type().notNull(),parentDestinationId:Hi("parent_destination_id"),displayName:Hi("display_name"),visibility:Hi("visibility").$type().notNull().default("unknown"),metadata:qE("metadata_json"),createdAt:bU("created_at").notNull(),updatedAt:bU("updated_at").notNull()},e=>[fU("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),gU("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);var Tge=c.object({error:c.string().min(1)}).strict(),K4=c.object({closed:c.number().int().nonnegative(),costUsd:c.number().nonnegative().optional(),created:c.number().int().nonnegative(),medianCostUsd:c.number().nonnegative().optional(),medianMergeTimeMs:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),open:c.number().int().nonnegative()}).strict(),Hge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),Ld=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),date:Hge,merged:c.number().int().nonnegative()}).strict(),yU=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),id:c.string().uuid(),medianCostUsd:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),name:c.string().min(1),open:c.number().int().nonnegative(),provider:c.string().min(1),url:c.string().url().optional()}).strict(),CU=c.object({closedAt:c.string().optional(),id:c.string().uuid(),mergedAt:c.string().optional(),number:c.number().int().positive(),openedAt:c.string(),provider:c.string().min(1),repository:c.string().min(1),state:Nb,title:c.string().optional(),url:c.string().url().optional()}).strict(),Y4=c.object({activityDays:c.array(Ld),activityHours:c.array(Ld).optional(),activitySixHours:c.array(Ld).optional(),changes:c.array(CU),generatedAt:c.string(),repositories:c.array(yU),summary:K4,windowEnd:c.string(),windowStart:c.string()}).strict(),J4=c.object({activityDays:c.array(Ld),activityHours:c.array(Ld).optional(),activitySixHours:c.array(Ld).optional(),generatedAt:c.string(),summary:K4,windowEnd:c.string(),windowStart:c.string()}).strict(),JE=c.object({active:c.number(),conversations:c.number(),date:c.string(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict();var Gge=c.object({locationId:c.string().min(1)}).strict(),wU=Sd.extend({id:c.string(),firstSeenAt:c.string(),kind:hU,lastSeenAt:c.string(),provider:c.string(),providerDestinationId:c.string(),visibility:c.literal("public")}).strict(),Uge=Sd.extend({actor:Fd}).strict(),Oge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),WE=c.object({date:Oge,privateConversations:c.number(),publicConversations:c.number()}).strict(),W4=c.object({activityDays:c.array(WE),activityHours:c.array(WE).optional(),activitySixHours:c.array(WE).optional(),generatedAt:c.string(),locations:c.array(wU),privateActivity:Sd,source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),Z4=wU.extend({activityDays:c.array(JE),activityHours:c.array(JE).optional(),activitySixHours:c.array(JE).optional(),actors:c.array(Uge),generatedAt:c.string(),recentConversations:c.array(gm),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),qge=c.object({email:c.string().trim().min(1)}).strict(),BU=Sd.omit({costUsd:!0}),EU=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),O4=c.object({active:c.number(),conversations:c.number(),costUsd:c.number().optional(),date:EU,durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),q4=c.object({activePeople:c.number(),conversations:c.number(),date:EU}).strict(),kU=c.object({active:c.number(),activeDays:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),YE=c.object({conversations:c.number().int().nonnegative(),costUsd:c.number().finite().nonnegative(),durationMs:c.number().finite().nonnegative(),priorCostUsd:c.number().finite().nonnegative()}).strict(),zge=c.object({1:YE,7:YE,30:YE,90:YE}).strict(),QU=Fd.extend({email:c.string().min(1)}).strict(),Kge=kU.extend({firstSeenAt:c.string(),lastSeenAt:c.string(),actor:QU,windows:zge}).strict(),V4=c.object({activityDays:c.array(q4),activityHours:c.array(q4).optional(),activitySixHours:c.array(q4).optional(),generatedAt:c.string(),people:c.array(Kge),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),X4=c.object({activityDays:c.array(O4),activityHours:c.array(O4).optional(),activitySixHours:c.array(O4).optional(),generatedAt:c.string(),locations:c.array(BU),recentConversations:c.array(gm),actor:QU,source:c.literal("conversation_index"),surfaces:c.array(BU),totals:kU,windowEnd:c.string(),windowStart:c.string()}).strict(),e9=c.object({generatedAt:c.string(),sevenDaysUsd:c.number().finite().nonnegative(),source:c.literal("conversation_index"),thirtyDaysUsd:c.number().finite().nonnegative(),windowEnd:c.string(),windowStart:c.string()}).strict(),t9=c.object({id:c.string().uuid(),name:c.string(),tokenSuffix:c.string(),createdAt:c.string().datetime(),expiresAt:c.string().datetime(),lastUsedAt:c.string().datetime().nullable()}).strict(),n9=c.object({tokens:c.array(t9)}).strict(),Yge=c.object({name:c.string().trim().min(1).max(80)}).strict(),a9=t9.extend({token:c.string().startsWith("jr_pat_")}).strict(),Jge=c.object({id:c.string().uuid()}).strict(),Wge=c.object({revoked:c.literal(!0)}).strict(),Zge=c.object({channelId:c.string().min(1),label:c.string().min(1),teamId:c.string().min(1),visibility:c.enum(["private","public"])}).strict(),vU=c.object({1:c.number().int().nonnegative(),7:c.number().int().nonnegative(),30:c.number().int().nonnegative(),90:c.number().int().nonnegative()}).strict(),IU=c.object({createdAt:c.string().datetime(),createdBy:c.string().min(1),createdByEmail:c.string().trim().email().optional(),destination:Zge,id:c.string().min(1),instruction:c.string().min(1),lastConversationId:c.string().min(1).optional(),lastRunAt:c.string().datetime().optional(),ownedByViewer:c.boolean(),runs:vU,outcomes:c.array(UH).max(5),title:c.string().min(1),totalRuns:c.number().int().nonnegative()}),_U=IU.extend({kind:c.literal("scheduled"),nextRunAt:c.string().datetime().optional(),schedule:c.string().min(1),status:c.enum(["active","blocked","completed"])}).strict(),xU=IU.extend({events:c.array(c.string().min(1)).min(1),kind:c.literal("event"),resource:c.string().min(1),source:c.string().min(1),triggerAvailable:c.boolean()}).strict(),r9=c.discriminatedUnion("kind",[_U,xU]),DU=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),z4=c.object({costUsd:c.number().finite().nonnegative(),date:DU,event:c.number().int().nonnegative(),scheduled:c.number().int().nonnegative()}).strict(),Vge=c.object({q:c.string().trim().max(200).optional()}).strict(),o9=c.object({executionDays:c.array(z4),executionHours:c.array(z4).optional(),executionSixHours:c.array(z4).optional(),automations:c.array(r9),truncated:c.boolean()}).strict(),Xge=c.object({id:c.string().min(1),kind:c.enum(["scheduled","event"])}).strict(),FU=c.enum(["blocked","completed","failed"]),i9=c.object({conversationId:c.string().min(1).optional(),costUsd:c.number().finite().nonnegative().optional(),durationMs:c.number().finite().nonnegative().optional(),executedAt:c.string().datetime(),executionId:c.string().min(1),status:FU,title:c.string().min(1).optional(),totalTokens:c.number().int().nonnegative().optional()}).strict(),ZE=c.object({blocked:c.number().int().nonnegative(),completed:c.number().int().nonnegative(),date:DU,failed:c.number().int().nonnegative()}).strict(),A9=c.object({executionDays:c.array(ZE),executionHours:c.array(ZE).optional(),executionSixHours:c.array(ZE).optional(),executions:c.array(i9),automation:r9,truncated:c.boolean()}).strict(),SU=i9.extend({kind:c.enum(["scheduled","event"]),automationId:c.string().min(1),automationTitle:c.string().min(1)}).strict(),s9=c.object({runs:c.array(SU),truncated:c.boolean()}).strict(),efe=c.object({provider:c.string(),repo:c.string()}).strict(),NU=c.object({provider:c.string(),repo:c.string(),checkoutPath:c.string()}).strict(),tfe=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),sizeBytes:c.number().int().nonnegative().nullable()}).strict(),LU=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),dependencyCount:c.number().int().nonnegative()}).strict(),ym=c.object({id:c.string().uuid(),name:c.string(),setupScript:c.string(),repos:c.array(NU),snapshot:tfe.nullable()}).strict(),c9=c.object({baselineSnapshot:LU.nullable(),workspaces:c.array(ym)}).strict(),nfe=c.object({name:c.string(),setupScript:c.string().optional(),repos:c.array(efe)}).strict(),afe=c.object({id:c.string().uuid()}).strict(),rfe=c.object({deleted:c.literal(!0)}).strict(),RU=c.object({count:c.number().int().nonnegative(),date:c.string(),metric:c.string().min(1),name:c.string().min(1),namespace:c.string().min(1)}).strict(),u9=c.object({generatedAt:c.string().datetime(),stats:c.array(RU),windowEnd:c.string(),windowStart:c.string()}).strict();var Fo=c.string().trim().min(1).max(160),Cm=c.number().int().nonnegative(),ofe=c.discriminatedUnion("type",[c.strictObject({type:c.literal("code_change"),author:Fo.optional(),sourceBranch:Fo.optional(),targetBranch:Fo.optional(),reviewers:c.array(Fo).max(5).optional(),review:c.enum(["required","approved","changes_requested"]).optional(),checks:c.strictObject({passed:Cm,failed:Cm,pending:Cm}).optional(),mergeable:c.boolean().optional(),changedFiles:Cm.optional(),additions:Cm.optional(),deletions:Cm.optional()}),c.strictObject({type:c.literal("task"),assignees:c.array(Fo).max(5).optional(),priority:Fo.optional(),project:Fo.optional(),cycle:Fo.optional(),dueDate:c.iso.date().optional(),labels:c.array(Fo).max(5).optional()}),c.strictObject({type:c.literal("deployment"),project:Fo.optional(),environment:Fo.optional(),revision:Fo.optional(),branch:Fo.optional()})]);function MU(e){if(!e)return[];let t=[],n=a=>a?.length?`${a.join(", ")}${a.length===5?" (up to 5 shown)":""}`:void 0;function r(a,o,i){i!==void 0&&i!==""&&t.push({key:a,label:o,value:String(i)})}switch(e.type){case"code_change":{let a={required:"Review required",approved:"Approved",changes_requested:"Changes requested"};r("review","Review",e.review&&a[e.review]);let o=e.checks;r("checks","Checks",o&&`${o.failed} failed \xB7 ${o.pending} pending \xB7 ${o.passed} passed`),r("author","Author",e.author),r("reviewers","Requested reviewers",n(e.reviewers)),r("mergeable","Conflicts",e.mergeable===void 0?void 0:e.mergeable?"No conflicts":"Has conflicts"),r("sourceBranch","From",e.sourceBranch),r("targetBranch","Into",e.targetBranch);break}case"task":r("assignees","Assignees",e.assignees?.length===0?"Unassigned":n(e.assignees)),r("priority","Priority",e.priority),r("project","Project",e.project),r("cycle","Cycle",e.cycle),r("dueDate","Due",e.dueDate),r("labels","Labels",n(e.labels));break;case"deployment":r("environment","Environment",e.environment),r("project","Project",e.project),r("revision","Revision",e.revision),r("branch","Branch",e.branch);break}return t.slice(0,4)}var XE=c.enum(["task","code_change","automation","deployment","item"]),ife={task:"Ticket",code_change:"Code change",automation:"Automation",deployment:"Deployment",item:"Item"};function si(e){let t=e.objectType==="item"&&e.facts?.type==="deployment"?"deployment":e.objectType,n=e.status?.toLowerCase(),r={task:"issue-opened",code_change:"git-pull-request",automation:"workflow",deployment:"rocket",item:"package"}[t],a=t==="automation"?"info":"neutral";return t==="code_change"?(n==="draft"&&(r="git-pull-request-draft"),n==="closed"&&(r="git-pull-request-closed",a="danger"),n==="merged"&&(r="git-merge",a="accent"),n==="open"&&(a="success")):t==="task"?(n==="closed"&&(r="issue-closed",a="accent"),n==="open"&&(a="success")):t==="deployment"&&((n==="ready"||n==="succeeded")&&(a="success"),(n==="error"||n==="failed")&&(a="danger"),(n==="building"||n==="in_progress")&&(a="info")),(n==="warning"||n==="blocked")&&(a="warning"),{icon:r,tone:a,label:ife[t]}}function jU(e){return`/_junior/dashboard/object-icons/v1/${e}.png`}var l9=c.object({kind:c.literal("object"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),objectType:XE,title:c.string().trim().min(1).max(512),url:c.url().max(2048).refine(e=>["http:","https:"].includes(new URL(e).protocol)).nullable(),description:c.string().max(4e3).optional(),status:c.string().trim().min(1).max(100).optional(),trigger:c.string().max(4e3).optional(),warning:c.string().max(1e3).optional(),displayType:c.string().trim().min(1).max(80).optional(),sourceUpdatedAt:c.iso.datetime({offset:!0}).optional(),facts:ofe.refine(e=>new TextEncoder().encode(JSON.stringify(e)).length<=4096,"Object facts must not exceed 4 KiB").optional()}).strict().refine(e=>!e.facts||(e.facts.type==="deployment"?e.objectType==="deployment"||e.objectType==="item":e.facts.type===e.objectType),"Object facts must match the object type"),kMe=l9.safeExtend({plugin:c.string().min(1)}),PU={"issue-opened":["M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z","M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"],"issue-closed":["M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z","M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"],"git-pull-request":["M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"],"git-pull-request-draft":["M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 14a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM14 7.5a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm0-4.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z"],"git-pull-request-closed":["M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 5.5a.75.75 0 0 1 .75.75v3.378a2.251 2.251 0 1 1-1.5 0V7.25a.75.75 0 0 1 .75-.75Zm-2.03-5.273a.75.75 0 0 1 1.06 0l.97.97.97-.97a.748.748 0 0 1 1.265.332.75.75 0 0 1-.205.729l-.97.97.97.97a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-.97-.97-.97.97a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l.97-.97-.97-.97a.75.75 0 0 1 0-1.06ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"],"git-merge":["M5.45 5.154A4.25 4.25 0 0 0 9.25 7.5h1.378a2.251 2.251 0 1 1 0 1.5H9.25A5.734 5.734 0 0 1 5 7.123v3.505a2.25 2.25 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.95-.218ZM4.25 13.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm8.5-4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM5 3.25a.75.75 0 1 0 0 .005V3.25Z"],workflow:["M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"],rocket:["M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"],package:["m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"]};function Afe(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var sfe=c.object({kind:c.literal("resource_link"),objectType:XE.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),url:c.string().url().max(2048).refine(Afe,"URL must use HTTP or HTTPS."),description:c.string().trim().min(1).max(512).optional(),status:c.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),vMe=c.discriminatedUnion("kind",[sfe,l9]),cfe=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),IMe=c.object({icon:cfe.optional(),objectType:XE.optional(),status:c.string().trim().min(1).max(100).optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),ufe=c.enum(["closed","merged","open"]),xMe=c.object({closedAt:c.date().optional(),conversationIds:c.array(c.string().min(1)).default([]),mergedAt:c.date().optional(),number:c.number().int().positive(),openedAt:c.date(),providerId:c.string().min(1),repository:c.object({name:c.string().min(1),providerId:c.string().min(1),url:c.string().url().optional()}).strict(),state:ufe,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),FMe=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),dfe=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),lfe=c.object({content:c.string().min(1).max(32*1024).optional(),description:c.string().trim().min(1).max(2e3).optional(),metadata:c.array(c.string().trim().min(1).max(120)).max(8).optional(),title:c.string().trim().min(1).max(4e3)}).strict(),SMe=c.object({details:c.array(lfe).max(100).optional(),icon:dfe.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var ek=c.string().regex(/^T[A-Z0-9]+$/),p9=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),TU=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),pfe=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),VE=pfe,Ce=c.string().refine(e=>e.trim().length>0),ur=Ce.refine(e=>e===e.trim()),mfe=c.object({id:Ce,provider:ur}).strict(),gfe=mfe.extend({provider:c.literal("slack"),teamId:ek,channelId:p9,threadTs:ur.optional()}).strict(),LMe=c.discriminatedUnion("provider",[gfe]),RMe=c.enum(["slack","local"]),HU=c.enum(["public","private"]),ffe=c.enum(["public","private"]),bfe=c.object({platform:c.literal("slack"),teamId:ek,channelId:p9,threadTs:ur.optional()}).strict(),m9=bfe,hfe=c.object({platform:c.literal("local"),conversationId:TU}).strict(),Bfe=c.discriminatedUnion("platform",[m9,hfe]),$Me=c.object({action:c.literal("send_message"),destination:m9}).strict(),yfe=c.object({kind:c.literal("slack"),teamId:ek,channelId:p9,visibility:HU,messageTs:Ce.optional(),threadTs:Ce.optional()}).strict(),Cfe=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:TU}).strict(),wfe=c.object({kind:c.literal("web"),visibility:HU,conversationId:ur}).strict(),Efe=c.object({kind:c.literal("event"),eventKey:ur,eventType:ur,identifier:ur,namespace:ur}).strict(),kfe=c.object({kind:c.literal("scheduled_automation")}).strict(),Qfe=c.object({kind:c.literal("event_automation")}).strict(),vfe=c.object({kind:c.literal("plugin_dispatch")}).strict(),Ife=c.object({kind:c.literal("agent_invocation")}).strict(),_fe=c.discriminatedUnion("kind",[yfe,Cfe,wfe,Efe,kfe,Qfe,vfe,Ife]);function xfe(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if("kind"in t){let o={event_task:"event_automation",resource_event:"event",scheduled_task:"scheduled_automation"},i=typeof t.kind=="string"?o[t.kind]:void 0;return i?{...t,kind:i}:e}if(t.platform!=="slack"&&t.platform!=="local"&&t.platform!=="web")return e;let{location:n,platform:r,...a}=t;return{...a,kind:r}}var Dfe=c.preprocess(xfe,_fe),Ffe=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:VE,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:VE,allowedWhen:c.literal("scheduled-automation"),taskId:ur}).strict()]),g9={email:Ce.optional(),fullName:Ce.optional(),userId:VE,userName:Ce.optional()},Sfe=c.object({...g9,platform:c.literal("slack"),teamId:ek}).strict(),Nfe=c.object({...g9,platform:c.literal("local")}).strict(),Lfe=c.object({...g9,platform:c.literal("web")}).strict(),Rfe=c.object({platform:c.literal("system"),name:VE}).strict(),d9=c.discriminatedUnion("platform",[Sfe,Nfe,Lfe,Rfe]),$fe=c.object({displayName:Ce.optional(),handle:Ce.optional(),id:ur,provider:ur,providerSubjectId:ur,providerTenantId:ur.optional()}).strict(),MMe=c.object({displayName:Ce.optional(),email:Ce.max(320),id:ur,identities:c.array($fe).max(100)}).strict(),Mfe=c.record(c.string(),c.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[r,a]of n){if(!r.trim()){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[r]});continue}r.length>128&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[r]}),/[\r\n]/.test(r)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[r]}),/[\r\n]/.test(a)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[r]}),a.length>512&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[r]})}}),jfe=c.object({label:ur.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:ur.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),jMe=c.object({idempotencyKey:Ce.pipe(c.string().max(512)),credentialSubject:Ffe.optional(),destination:m9,destinationVisibility:ffe,input:Ce.pipe(c.string().max(32e3)),metadata:Mfe.optional(),replyAttribution:jfe.optional()}).strict();var Pfe=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),TMe=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),HMe=c.object({kind:Pfe,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var Tfe=4e3,Hfe=8e3,wm=32,$U=4e3,Gfe=1e3,Ufe=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>wm&&t.addIssue({code:"custom",message:`Event data may include at most ${wm} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>$U&&t.addIssue({code:"custom",message:`Event data may be at most ${$U} JSON bytes.`})}),Rd=c.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),GU=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),UU=/^[a-z][a-zA-Z0-9]*$/,Ofe=c.object({kind:c.enum(["boolean","string","number"]),description:c.string().trim().min(1).max(200),enum:c.array(c.string().min(1)).min(1).optional()}).strict().superRefine((e,t)=>{e.enum&&e.kind!=="string"&&t.addIssue({code:"custom",message:'Event match field enum requires kind "string".',path:["enum"]})}),qfe=c.record(c.string().regex(UU),Ofe).superRefine((e,t)=>{Object.keys(e).length>wm&&t.addIssue({code:"custom",message:`Event match keys may include at most ${wm} keys.`})}),UMe=c.record(c.string().regex(UU),c.union([c.boolean(),c.number().finite(),c.string().min(1),c.array(c.union([c.number().finite(),c.string().min(1)])).min(1)])).superRefine((e,t)=>{Object.keys(e).length>wm&&t.addIssue({code:"custom",message:`Event match may include at most ${wm} keys.`});for(let[n,r]of Object.entries(e))Array.isArray(r)&&r.some(a=>typeof a=="boolean")&&t.addIssue({code:"custom",message:`Event match field "${n}" cannot use a boolean list.`,path:[n]})});var zfe=c.object({type:GU,supportedEvents:c.array(Rd).min(1),suggestedEvents:c.array(Rd).optional(),matchFields:qfe.optional(),guidance:c.record(Rd,c.string().trim().min(1).max(Gfe)).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,o)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported event type "${a}".`,path:["supportedEvents",o]}),n.add(a)});for(let a of Object.keys(e.guidance??{}))n.has(a)||t.addIssue({code:"custom",message:`Guidance event type "${a}" is not supported.`,path:["guidance",a]});let r=new Set;e.suggestedEvents?.forEach((a,o)=>{r.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested event type "${a}".`,path:["suggestedEvents",o]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested event type "${a}" is not supported.`,path:["suggestedEvents",o]}),r.add(a)})}),OMe=c.object({resourceTypes:c.array(zfe).min(1),isEnabled:c.function({input:[],output:c.boolean()}).optional(),normalizeIdentifier:c.function({input:[c.string()],output:c.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((r,a)=>{n.has(r.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${r.type}".`,path:["resourceTypes",a,"type"]}),n.add(r.type)})});var qMe=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(Rd).optional(),supportedEvents:c.array(Rd),type:GU}).strict(),zMe=c.object({events:c.array(Rd).min(1),id:c.string().min(1)}).strict(),Kfe=c.object({objectType:XE.optional(),eventKey:c.string().min(1),eventType:Rd,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,Tfe)),data:Ufe.optional(),untrustedText:c.string().transform(e=>e.slice(0,Hfe)).optional()}).strict(),KMe=Kfe.extend({namespace:c.string().min(1)}),Yfe=c.object({authority:c.enum(["instruction","context"]),actor:d9.optional()}).strict(),Jfe=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:Yfe.optional(),isRunActor:c.boolean().optional()}).strict(),c.object({type:c.literal("toolResult"),toolName:c.string().min(1),isError:c.boolean(),text:c.string().min(1).optional()}).strict()]),JMe=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:Bfe,locationId:c.string().min(1).optional(),actors:c.array(d9),actor:d9.optional(),runId:c.string().min(1),source:Dfe,transcript:c.array(Jfe)}).strict();var ZMe=c.discriminatedUnion("type",[c.object({type:c.literal("text"),text:c.string()}).strict(),c.object({type:c.literal("image"),data:c.string(),mimeType:c.string()}).strict()]),Wfe=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),VMe=c.object({objectAnnotations:c.array(l9).optional(),target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:Wfe.optional()}).passthrough(),XMe=c.enum(["auto","review","approve"]);var tje=c.object({auth:c.object({user:c.object({email:c.string().nullable().optional(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),pluginName:Ce}).strict(),Zfe=c.string().regex(/^[a-z][a-z0-9-]*$/),Vfe=c.string().regex(/^[a-z][a-z0-9.-]*$/),Xfe=c.union([c.literal("read"),c.literal("write")]),OU=c.object({provider:Zfe,scope:Ce.optional(),type:c.literal("oauth")}).strict(),qU=c.object({displayName:Ce.optional(),handle:Ce.optional(),id:Ce,label:Ce.optional(),url:Ce.optional()}).strict(),aje=c.object({account:qU.optional(),accessToken:Ce,expiresAt:c.number().finite().optional(),refreshToken:Ce,refreshTokenExpiresAt:c.number().finite().optional(),scope:Ce.optional()}).strict(),rje=c.object({access:Xfe,leaseScope:Ce.optional(),name:Vfe,reason:Ce.optional(),requirements:c.array(Ce).min(1).optional()}).strict(),ebe=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),tbe=c.object({account:qU.optional(),authorization:OU.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(ebe).min(1)}).strict(),oje=c.discriminatedUnion("type",[c.object({lease:tbe,type:c.literal("lease")}).strict(),c.object({authorization:OU.optional(),message:Ce,type:c.literal("needed")}).strict(),c.object({message:Ce,type:c.literal("unavailable")}).strict()]);var nbe=Ce.max(64).regex(/^[a-z][a-z0-9-]*$/),abe=Ce.max(80),rbe=Ce.max(500),obe=c.enum(["primary","profile"]),ibe=c.object({detail:Ce.max(500).optional(),label:Ce.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:Ce.max(120)}).strict(),Abe=c.object({label:Ce.max(80),value:Ce.max(500)}).strict(),sbe=c.object({confirmation:Ce.max(500).optional(),href:Ce.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:Ce.max(80),method:c.literal("DELETE"),tone:c.enum(["danger","neutral"]).optional()}).strict(),cbe=c.object({actions:c.array(sbe).max(4).optional(),description:Ce.max(1e3).optional(),id:Ce.max(128),metadata:c.array(Abe).max(8).optional(),title:Ce.max(4e3)}).strict(),zU=c.object({emptyText:Ce.max(500).optional(),metrics:c.array(ibe).max(6).optional(),nextCursor:Ce.max(1e3).optional(),records:c.array(cbe).max(100),searchPlaceholder:Ce.max(120).optional(),type:c.literal("list")}).strict(),ube=c.object({description:rbe,id:nbe,label:abe,navigation:obe,pluginDisplayName:Ce.max(200),pluginName:Ce.max(100)}).strict(),KU=c.array(ube),dbe=Ce.max(1e3).optional(),lbe=Ce.max(64).optional(),pbe=c.string().trim().max(200).optional(),Aje=c.object({cursor:dbe,filter:lbe,limit:c.number().int().min(1).max(50),query:pbe}).strict();var tk=c.object({user:c.object({email:c.string().trim().email(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),uje=c.object({displayName:c.string().trim().min(1).max(80)}).strict(),YU=c.object({allowedEmailCount:c.number(),allowedGoogleDomainCount:c.number(),authRequired:c.boolean(),authPath:c.string(),basePath:c.string(),componentGallery:c.boolean(),sentryConversationLinks:c.boolean(),timeZone:c.string().optional(),version:c.string().min(1)}).strict();var Hb=C(U(),1);var JU="x-junior-version";var f9="junior:dashboard-version";function WU(e){let t=e.headers.get(JU)?.trim();!t||typeof window>"u"||window.dispatchEvent(new CustomEvent(f9,{detail:t}))}function ZU(e){let[t,n]=(0,Hb.useState)(e);return(0,Hb.useEffect)(()=>{e&&n(e)},[e]),(0,Hb.useEffect)(()=>{let r=a=>{n(a.detail)};return window.addEventListener(f9,r),()=>window.removeEventListener(f9,r)},[]),t}var Ts=class extends Error{status;apiError;constructor(t,n,r){super(`${t} returned ${n}`),this.status=n,r?.trim()&&(this.apiError=r.trim())}};async function $d(e,t){let n;try{let r=await t.json();typeof r.error=="string"&&(n=r.error)}catch{}throw new Ts(e,t.status,n)}function Em(){if(typeof window>"u")return;let e=window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",t=e==="/"?"/auth/login":`${e}/auth/login`;if(window.location.pathname!==t){let n=`${window.location.pathname}${window.location.search||""}`,r=new URLSearchParams;n!=="/"&&r.set("next",n);let a=r.toString();window.location.assign(a?`${t}?${a}`:t)}}async function nk(e,t,n){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function Md(e,t,n){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function VU(e,t,n){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PUT"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function Au(e){let t=await km(e,{credentials:"same-origin",method:"DELETE"});t.status===401&&Em(),t.ok||await $d(e,t)}async function XU(e,t,n={}){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"DELETE"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function km(e,t){let n=await fetch(e,t);return WU(n),n}async function He(e,t,n){let r=await km(t,{credentials:"same-origin",...n?{signal:n}:void 0});return r.status===401&&(Em(),await $d(t,r)),r.ok||await $d(t,r),e.parse(await r.json())}var ak=5*6e4,b9=5*6e4,mbe=1e3;function gbe(e,t=Date.now()){if(!e)return b9;let n=Date.parse(e);if(!Number.isFinite(n))return b9;let r=Math.max(0,t-n);return Math.max(mbe,b9-r)}function eO(){return qe({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([He(tk,"/api/me",e),He(YU,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:ak})}function fbe(){return qe({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>He(z2,"/api/plugins",e),retry:!1,staleTime:ak})}function tO(){return qe({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>He(KU,"/api/user-pages",e),retry:!1,staleTime:ak})}function rk(e=""){return qe({queryKey:["dashboard","conversations","viewer",{search:e}],queryFn:({signal:t})=>He(O2,`/api/conversations${e?`?q=${encodeURIComponent(e)}`:""}`,t),placeholderData:TB,retry:!1})}function nO(){return qe({queryKey:["dashboard","code"],queryFn:({signal:e})=>He(Y4,"/api/code",e),retry:!1})}function aO(e,t){return qe({enabled:e,queryKey:["dashboard","automations",t],queryFn:({signal:n})=>He(o9,`/api/automations${t?`?q=${encodeURIComponent(t)}`:""}`,n),placeholderData:TB,retry:!1})}function rO(e){return qe({enabled:e,queryKey:["dashboard","automations","runs"],queryFn:({signal:t})=>He(s9,"/api/automations/runs",t),retry:!1})}function oO(e,t,n){return qe({enabled:e&&!!(t&&n),queryKey:["dashboard","automations",t,n,"executions"],queryFn:({signal:r})=>He(A9,`/api/automations/${t}/${encodeURIComponent(n)}/executions`,r),retry:!1})}function iO(){return qe({queryKey:["dashboard","people"],queryFn:({signal:e})=>He(V4,"/api/people",e),retry:!1})}function AO(e){return qe({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>He(X4,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function sO(e){return qe({enabled:!!e,queryKey:["dashboard","people",e,"plugin-reports"],queryFn:({signal:t})=>He(TE,`/api/people/${encodeURIComponent(e)}/plugin-reports`,t),retry:!1})}function cO(e){return qe({enabled:!!e,queryKey:["dashboard","people",e,"code"],queryFn:({signal:t})=>He(J4,`/api/people/${encodeURIComponent(e)}/code`,t),retry:!1})}function uO(e){return qe({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>He(e9,"/api/people/me/spend",t),refetchInterval:t=>gbe(t.state.data?.generatedAt),retry:!1,staleTime:0})}function dO(){return qe({queryKey:["dashboard","locations"],queryFn:({signal:e})=>He(W4,"/api/locations",e),retry:!1})}function lO(e){return qe({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>He(Z4,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function bbe(){return qe({queryKey:["dashboard","skills"],queryFn:({signal:e})=>He(Y2,"/api/skills",e),retry:!1,staleTime:ak})}function hbe(){return qe({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>He(TE,"/api/plugin-reports",e),retry:!1})}function pO(){return qe({queryKey:["dashboard","stats"],queryFn:({signal:e})=>He(u9,"/api/stats",e),retry:!1})}function mO(e){let t=fbe(),n=qe({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>He(q2,"/api/conversations/stats",i),retry:!1}),r=bbe(),a=hbe();return{data:t.data&&r.data?{...e,conversationStatsError:!!n.error,...n.data?{conversationStats:n.data}:void 0,conversationStatsLoading:n.isPending,pluginReportsError:!!a.error,...a.data?{pluginReports:a.data}:void 0,pluginReportsLoading:a.isPending,plugins:t.data,skills:r.data}:void 0,error:t.error??r.error,isPending:t.isPending||r.isPending}}var gO=C(U(),1);function ok(){return(0,gO.useSyncExternalStore)(e=>kA.subscribe(e),()=>kA.isOnline(),()=>!0)}var bO=C(w(),1);function fO(){return ok()?null:(0,bO.jsx)("div",{"aria-live":"polite",className:"border-t border-amber-300/15 bg-amber-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-amber-100/80",role:"status",children:"You\u2019re offline. Drafts stay on this device."})}var h9=C(w(),1);function Qm(){return(0,h9.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,h9.jsx)("img",{alt:"",className:"relative size-11 max-w-none -translate-y-0.5 object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var hO=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");function k(...e){return e.filter(Boolean).join(" ")}var Mn="mx-auto w-full min-w-0 max-w-screen-xl",jA="text-dashboard-text-muted hover:text-dashboard-text",BO="rounded-xl border border-dashboard-border-interactive bg-dashboard-surface-active",yO="dashboard-shell-bg";var su=C(w(),1);function ta(e){return(0,su.jsx)("div",{className:k(Mn,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,su.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised p-4",children:[(0,su.jsx)(Qm,{}),(0,su.jsxs)("div",{children:[(0,su.jsx)("div",{className:"font-bold",children:e.label}),(0,su.jsx)("div",{"aria-label":e.label,className:`${hO} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var B9="0.228.0",ik=typeof B9=="string"&&B9.trim()?B9:"unknown";var Gb=C(w(),1);function CO(e){return Bbe(e.serverVersion)?(0,Gb.jsxs)("div",{"aria-live":"polite",className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-1 border-t border-cyan-300/15 bg-cyan-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-cyan-100/80",role:"status",children:[(0,Gb.jsx)("span",{children:"The dashboard changed. Refresh to load the latest version."}),(0,Gb.jsx)("button",{className:"cursor-pointer border-0 bg-transparent p-0 font-mono font-semibold text-cyan-100 underline decoration-cyan-300/40 underline-offset-2 hover:text-dashboard-text-solid",onClick:()=>window.location.reload(),type:"button",children:"Refresh"})]}):null}function Bbe(e){return!!e&&ik!=="unknown"&&e!=="unknown"&&e!==ik}var wO=C(w(),1);function P(e){let t=e.as??"div",n={none:"",sm:"p-4",md:"p-5 sm:p-6"}[e.padding??"none"],r=e.variant==="section"?"mb-4 border-dashboard-border-subtle bg-dashboard-fill-faint shadow-[0_24px_80px_rgba(0,0,0,0.18)]":e.variant==="raised"?"border-dashboard-border-emphasis bg-dashboard-surface-raised":"border-dashboard-border-subtle bg-dashboard-fill-faint";return(0,wO.jsx)(t,{className:k("min-w-0 overflow-hidden rounded-lg border",r,n,e.className),children:e.children})}var EO=C(w(),1);function Re(e){let t=e.as??"div";return(0,EO.jsx)(t,{"aria-hidden":"true",className:k("animate-pulse rounded bg-dashboard-fill-soft motion-reduce:animate-none",e.className)})}var Le=C(w(),1);function Ja(e){let t=e.variant??"panel";return(0,Le.jsxs)("div",{"aria-busy":"true","aria-live":"polite",className:k("grid gap-4",e.className),role:"status",children:[(0,Le.jsx)("span",{className:"sr-only",children:e.label}),ybe(t)]})}function ybe(e){switch(e){case"stats":return(0,Le.jsx)(Cbe,{});case"overview":return(0,Le.jsx)(wbe,{});case"list":return(0,Le.jsx)(Ebe,{});case"library":return(0,Le.jsx)(kbe,{});case"panel":return(0,Le.jsx)(PA,{className:"min-h-64"})}}function Cbe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Array.from({length:4},(e,t)=>(0,Le.jsx)(PA,{className:"min-h-[7.5rem] p-4 sm:min-h-32 sm:p-5"},t))}),(0,Le.jsx)(PA,{className:"min-h-[17rem]"})]})}function wbe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,Le.jsx)(PA,{className:"min-h-[17rem]"}),(0,Le.jsx)(PA,{className:"min-h-[17rem]"})]}),(0,Le.jsx)(vm,{className:"h-24 border-y border-dashboard-border-subtle bg-dashboard-fill-faint"}),(0,Le.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,Le.jsx)(PA,{className:"min-h-56"}),(0,Le.jsx)(PA,{className:"min-h-56"})]})]})}function Ebe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(PA,{className:"min-h-20 p-4"}),(0,Le.jsx)(vm,{className:"h-10 border-b border-dashboard-border-subtle"}),(0,Le.jsx)(PA,{className:"min-h-80"})]})}function kbe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,Le.jsx)(vm,{className:"h-7 w-56 rounded bg-dashboard-fill-soft"}),(0,Le.jsx)(vm,{className:"h-10 w-full max-w-md rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint sm:w-72"})]}),(0,Le.jsx)("div",{"aria-hidden":"true",className:"grid min-w-0 grid-cols-3 gap-1 border-b border-dashboard-border-subtle sm:flex",children:Array.from({length:3},(e,t)=>(0,Le.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 sm:justify-start",children:[(0,Le.jsx)(vm,{className:"h-3 w-12 rounded bg-dashboard-fill-soft"}),(0,Le.jsx)(vm,{className:"h-5 w-8 rounded-sm border border-dashboard-border-subtle bg-dashboard-fill-faint"})]},t))}),(0,Le.jsx)(PA,{className:"min-h-80"})]})}function PA(e){return(0,Le.jsx)(P,{className:k("animate-pulse motion-reduce:animate-none",e.className),children:(0,Le.jsx)("span",{"aria-hidden":"true"})})}function vm(e){return(0,Le.jsx)(Re,{className:e.className})}var Ak=C(w(),1),kO="inline-flex h-9 max-w-full items-center gap-2 rounded border border-dashboard-border-emphasis bg-dashboard-surface-raised px-3 font-mono text-sm font-semibold leading-none text-dashboard-text transition-colors hover:border-dashboard-border-heavy hover:bg-dashboard-surface-hover hover:text-dashboard-text",Qbe="inline-flex h-9 max-w-full items-center justify-center gap-1.5 rounded border border-dashboard-border-strong bg-transparent px-3 font-mono text-xs font-semibold text-dashboard-text-muted transition-colors hover:border-rose-300/40 hover:text-rose-300";function $e({className:e,size:t="default",tone:n="default",type:r="button",...a}){let o=n==="danger";return(0,Ak.jsx)("button",{...a,className:k("font-mono transition-colors disabled:cursor-not-allowed disabled:opacity-50",t==="icon"?k("grid size-9 place-items-center rounded-md border-0 bg-transparent p-0 focus-visible:outline focus-visible:outline-1 disabled:hover:!bg-transparent",o?"text-dashboard-text-muted hover:!bg-rose-300/10 hover:!text-rose-300 focus-visible:outline-rose-300/55 disabled:hover:!text-dashboard-text-muted":"text-dashboard-text-muted hover:!bg-dashboard-fill-strong hover:!text-dashboard-text focus-visible:outline-cyan-300/55 disabled:hover:!text-dashboard-text-muted"):o?k(Qbe,"disabled:hover:border-dashboard-border-strong disabled:hover:text-dashboard-text-muted"):k(kO,"disabled:hover:border-dashboard-border-emphasis disabled:hover:bg-dashboard-surface-raised disabled:hover:text-dashboard-text"),a.disabled?"":"cursor-pointer",e),type:r})}function QO({className:e,...t}){return(0,Ak.jsx)(pe,{...t,className:k(kO,"no-underline",e)})}function _n({className:e,pressed:t,type:n="button",variant:r,...a}){return(0,Ak.jsx)("button",{...a,"aria-pressed":t,className:k(vbe[r],t?Ibe[r]:_be[r],e),type:n})}var vbe={pill:"cursor-pointer rounded border px-2 py-1 font-mono text-xs font-semibold uppercase leading-tight transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",segment:"h-7 min-w-10 cursor-pointer rounded border px-2 font-mono text-xs transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",text:"cursor-pointer border-0 bg-transparent px-1.5 py-1 font-mono uppercase tracking-normal underline-offset-4 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55"},Ibe={pill:"border-dashboard-border-heavy bg-dashboard-text-solid text-dashboard-text-inverse",segment:"border-amber-500/30 bg-amber-500/20 text-amber-400",text:"text-dashboard-text underline decoration-dashboard-text-solid"},_be={pill:"border-dashboard-border-strong bg-dashboard-surface-raised text-dashboard-text-muted hover:border-dashboard-border-interactive hover:bg-dashboard-surface-hover hover:text-dashboard-text",segment:"border-dashboard-border-strong bg-dashboard-fill-faint text-dashboard-text-muted hover:bg-dashboard-fill-strong hover:text-dashboard-text",text:"text-dashboard-text-muted hover:text-dashboard-text"};var y9=C(w(),1),xbe=[1,7,30,90];function C9(e){return e===1?"24h":`${e}d`}function Im(e){return e===1?"last 24 hours":`last ${e} days`}function xn(e){return e===1?"hour":e===7?"6hour":"day"}function vO(e){return e===1}function Dbe(e){return e===7}function dr(e){return e==="hour"?"hour":e==="6hour"?"6h":"day"}function _m(e){return e==="hour"?"hour":e==="6hour"?"6 hours":"day"}function Ub(e){return e==="hour"?"Hourly":e==="6hour"?"6-hour":"Daily"}function jn(e){return vO(e.range)&&e.hours?.length?e.hours.slice(-24):vO(e.range)?e.days.slice(-1):Dbe(e.range)?e.sixHours?.length?[...e.sixHours]:e.hours?.length&&e.emptySixHour?Fbe({empty:e.emptySixHour,hours:e.hours}):e.days.slice(-e.range):e.days.slice(-e.range)}function Fbe(e){let t=new Map;for(let n of e.hours){let r=Date.parse(`${n.date}:00:00.000Z`);if(Number.isNaN(r))continue;let a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=a.toISOString().slice(0,13),A={...t.get(o)??e.empty(o),date:o};for(let[s,u]of Object.entries(n))if(s!=="date"&&typeof u=="number"){let d=A[s];A[s]=(typeof d=="number"?d:0)+u}t.set(o,A)}if(e.hours.length>=24){let n=e.hours[e.hours.length-1]?.date,r=n?Date.parse(`${n}:00:00.000Z`):Date.now(),a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=new Date(a.getTime()-9720*60*1e3),i=[];for(let A=new Date(o);A.getTime()<=a.getTime();A.setTime(A.getTime()+360*60*1e3)){let s=A.toISOString().slice(0,13);i.push(t.get(s)??e.empty(s))}return i}return[...t.values()].sort((n,r)=>n.date.localeCompare(r.date))}function sk(e){return(0,y9.jsx)("div",{"aria-label":"Reporting period",className:"flex items-center gap-1",role:"group",children:(e.options??xbe).map(t=>(0,y9.jsx)(_n,{onClick:()=>e.onChange(t),pressed:e.value===t,variant:"segment",children:C9(t)},t))})}var cu=C(w(),1);function ze(e){let t=e.range!==void 0&&e.onRangeChange?(0,cu.jsx)(sk,{onChange:e.onRangeChange,...e.rangeOptions?{options:e.rangeOptions}:{},value:e.range}):void 0,n=e.actions??t;return(0,cu.jsxs)("header",{className:"flex min-w-0 items-center justify-between gap-6 border-b border-white/[0.05] pb-4 sm:pb-6 max-md:flex-col max-md:items-stretch",children:[(0,cu.jsxs)("div",{className:"min-w-0",children:[(0,cu.jsx)("h2",{className:"m-0 font-display text-3xl font-light leading-none tracking-[-0.03em] text-dashboard-text sm:text-4xl",children:e.title}),(0,cu.jsx)("div",{className:"mt-2 max-w-2xl font-mono text-xs leading-relaxed text-dashboard-text-muted sm:text-sm",children:e.description})]}),n?(0,cu.jsx)("div",{className:"shrink-0",children:n}):null]})}var IO=C(w(),1);function ci(e){return(0,IO.jsx)("div",{className:k(Mn,"grid min-w-0 content-start gap-4 px-4 py-4 pb-[max(1rem,env(safe-area-inset-bottom))] sm:gap-6 sm:px-8 sm:py-8 sm:pb-8",e.className),children:e.children})}var Ob=C(w(),1);function jd(e){return(0,Ob.jsxs)(ci,{children:[(0,Ob.jsx)(ze,{description:e.description,title:e.title}),(0,Ob.jsx)(Ja,{label:e.label,variant:e.variant})]})}var dk=C(U(),1);var ck=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var _O=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var xO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());var w9=e=>{let t=xO(e);return t.charAt(0).toUpperCase()+t.slice(1)};var qb=C(U(),1);var uk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var DO=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var xm=C(U(),1);var Sbe=(0,xm.createContext)({});var FO=()=>(0,xm.useContext)(Sbe);var SO=(0,qb.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...A},s)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:l=!1,color:m="currentColor",className:p=""}=FO()??{},g=r??l?Number(n??d)*24/Number(t??u):n??d;return(0,qb.createElement)("svg",{ref:s,...uk,width:t??u??uk.width,height:t??u??uk.height,stroke:e??m,strokeWidth:g,className:ck("lucide",p,a),...!o&&!DO(A)&&{"aria-hidden":"true"},...A},[...i.map(([b,B])=>(0,qb.createElement)(b,B)),...Array.isArray(o)?o:[o]])});var S=(e,t)=>{let n=(0,dk.forwardRef)(({className:r,...a},o)=>(0,dk.createElement)(SO,{ref:o,iconNode:t,className:ck(`lucide-${_O(w9(e))}`,`lucide-${e}`,r),...a}));return n.displayName=w9(e),n};var Nbe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Gi=S("activity",Nbe);var Lbe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],ui=S("archive-restore",Lbe);var Rbe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Hs=S("archive",Rbe);var $be=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],zb=S("arrow-down-to-line",$be);var Mbe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],TA=S("arrow-left",Mbe);var jbe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Kb=S("arrow-right",jbe);var Pbe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Pd=S("arrow-up-right",Pbe);var Tbe=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],Yb=S("bookmark",Tbe);var Hbe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],HA=S("bot",Hbe);var Gbe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],So=S("boxes",Gbe);var Ube=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],GA=S("braces",Ube);var Obe=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],uu=S("brain-circuit",Obe);var qbe=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Gs=S("brain",qbe);var zbe=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Us=S("calendar-clock",zbe);var Kbe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Jb=S("calendar",Kbe);var Ybe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Td=S("check",Ybe);var Jbe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wb=S("chevron-down",Jbe);var Wbe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Zb=S("chevron-left",Wbe);var Zbe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],fn=S("chevron-right",Zbe);var Vbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],pa=S("circle-alert",Vbe);var Xbe=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],Vb=S("circle-dashed",Xbe);var ehe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],Hd=S("circle-dollar-sign",ehe);var the=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Xb=S("circle-dot",the);var nhe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],du=S("circle-x",nhe);var ahe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],No=S("clock-3",ahe);var rhe=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],Ui=S("coins",rhe);var ohe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Gd=S("copy",ohe);var ihe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],lu=S("database",ihe);var Ahe=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ir=S("earth",Ahe);var she=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],pu=S("ellipsis",she);var che=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Os=S("external-link",che);var uhe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],eh=S("file-text",uhe);var dhe=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],mu=S("fingerprint-pattern",dhe);var lhe=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],th=S("folder-git-2",lhe);var phe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],nh=S("git-merge",phe);var mhe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],qs=S("git-pull-request",mhe);var ghe=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],ah=S("hash",ghe);var fhe=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],rh=S("image-plus",fhe);var bhe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ud=S("info",bhe);var hhe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Oi=S("key-round",hhe);var Bhe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],gu=S("layers",Bhe);var yhe=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],Od=S("library-big",yhe);var Che=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],oh=S("lightbulb",Che);var whe=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],ih=S("list-checks",whe);var Ehe=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Ah=S("link",Ehe);var khe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],zs=S("loader-circle",khe);var Qhe=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],_r=S("lock-keyhole",Qhe);var vhe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],sh=S("lock",vhe);var Ihe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],ch=S("log-out",Ihe);var _he=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],qd=S("map-pin",_he);var xhe=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],uh=S("map-pinned",xhe);var Dhe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],zd=S("menu",Dhe);var Fhe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],dh=S("message-square-text",Fhe);var She=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Lo=S("message-square",She);var Nhe=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],Dm=S("messages-square",Nhe);var Lhe=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],lh=S("minimize-2",Lhe);var Rhe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ph=S("panel-right",Rhe);var $he=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],mh=S("paperclip",$he);var Mhe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kd=S("plus",Mhe);var jhe=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],gh=S("radio-tower",jhe);var Phe=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Fm=S("scroll-text",Phe);var The=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],fu=S("search",The);var Hhe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Yd=S("send",Hhe);var Ghe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fh=S("settings",Ghe);var Uhe=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],bh=S("sigma",Uhe);var Ohe=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],hh=S("skip-forward",Ohe);var qhe=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],lr=S("sparkles",qhe);var zhe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],ao=S("square-pen",zhe);var Khe=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],qi=S("timer",Khe);var Yhe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sa=S("trash-2",Yhe);var Jhe=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Bh=S("trending-up",Jhe);var Whe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ro=S("triangle-alert",Whe);var Zhe=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],xr=S("user-round",Zhe);var Vhe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Jd=S("users",Vhe);var Xhe=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],yh=S("webhook",Xhe);var eBe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Na=S("x",eBe);var tBe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ch=S("zap",tBe);var rs=C(U(),1);var E9=Object.defineProperty,nBe=Object.getOwnPropertyDescriptor,aBe=Object.getOwnPropertyNames,rBe=Object.prototype.hasOwnProperty,LO=(e,t)=>{let n={};for(var r in e)E9(n,r,{get:e[r],enumerable:!0});return t||E9(n,Symbol.toStringTag,{value:"Module"}),n},NO=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=aBe(t),o=0,i=a.length,A;o<i;o++)A=a[o],!rBe.call(e,A)&&A!==n&&E9(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(r=nBe(t,A))||r.enumerable});return e},RO=(e,t,n)=>(NO(e,t,"default"),n&&NO(n,t,"default"));var I9={};L(I9,{createOnigurumaEngine:()=>CBe,getDefaultWasmLoader:()=>yBe,loadWasm:()=>MO,setDefaultWasmLoader:()=>BBe});var v9=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function oBe(){return 2147483648}function iBe(){return typeof performance<"u"?performance.now():Date.now()}var ABe=(e,t)=>e+(t-e%t)%t;async function sBe(e){let t,n,r={};function a(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function o(p,g,b){r.HEAPU8.copyWithin(p,g,g+b)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(p){let g=r.HEAPU8.length;p=p>>>0;let b=oBe();if(p>b)return!1;for(let B=1;B<=4;B*=2){let h=g*(1+.2/B);h=Math.min(h,p+100663296);let f=Math.min(b,ABe(Math.max(p,h),65536));if(i(f))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(p,g,b=1024){let B=g+b,h=g;for(;p[h]&&!(h>=B);)++h;if(h-g>16&&p.buffer&&s)return s.decode(p.subarray(g,h));let f="";for(;g<h;){let y=p[g++];if(!(y&128)){f+=String.fromCharCode(y);continue}let E=p[g++]&63;if((y&224)===192){f+=String.fromCharCode((y&31)<<6|E);continue}let v=p[g++]&63;if((y&240)===224?y=(y&15)<<12|E<<6|v:y=(y&7)<<18|E<<12|v<<6|p[g++]&63,y<65536)f+=String.fromCharCode(y);else{let Q=y-65536;f+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}}return f}function d(p,g){return p?u(r.HEAPU8,p,g):""}let l={emscripten_get_now:iBe,emscripten_memcpy_big:o,emscripten_resize_heap:A,fd_write:()=>0};async function m(){let g=await e({env:l,wasi_snapshot_preview1:l});t=g.memory,a(t.buffer),Object.assign(r,g),r.UTF8ToString=d}return await m(),r}var cBe=Object.defineProperty,uBe=(e,t,n)=>t in e?cBe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ma=(e,t,n)=>uBe(e,typeof t!="symbol"?t+"":t,n),La=null;function dBe(e){throw new v9(e.UTF8ToString(e.getLastOnigError()))}var pk=class e{constructor(t){ma(this,"utf16Length"),ma(this,"utf8Length"),ma(this,"utf16Value"),ma(this,"utf8Value"),ma(this,"utf16OffsetToUtf8"),ma(this,"utf8OffsetToUtf16");let n=t.length,r=e._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);let i=a?new Uint32Array(r+1):null;a&&(i[r]=n);let A=new Uint8Array(r),s=0;for(let u=0;u<n;u++){let d=t.charCodeAt(u),l=d,m=!1;if(d>=55296&&d<=56319&&u+1<n){let p=t.charCodeAt(u+1);p>=56320&&p<=57343&&(l=(d-55296<<10)+65536|p-56320,m=!0)}a&&(o[u]=s,m&&(o[u+1]=s),l<=127?i[s+0]=u:l<=2047?(i[s+0]=u,i[s+1]=u):l<=65535?(i[s+0]=u,i[s+1]=u,i[s+2]=u):(i[s+0]=u,i[s+1]=u,i[s+2]=u,i[s+3]=u)),l<=127?A[s++]=l:l<=2047?(A[s++]=192|(l&1984)>>>6,A[s++]=128|(l&63)>>>0):l<=65535?(A[s++]=224|(l&61440)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0):(A[s++]=240|(l&1835008)>>>18,A[s++]=128|(l&258048)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0),m&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=A,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){let o=t.charCodeAt(r),i=o,A=!1;if(o>=55296&&o<=56319&&r+1<a){let s=t.charCodeAt(r+1);s>=56320&&s<=57343&&(i=(o-55296<<10)+65536|s-56320,A=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,A&&r++}return n}createString(t){let n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}},mk=class UA{constructor(t){if(ma(this,"id",++UA.LAST_ID),ma(this,"_onigBinding"),ma(this,"content"),ma(this,"utf16Length"),ma(this,"utf8Length"),ma(this,"utf16OffsetToUtf8"),ma(this,"utf8OffsetToUtf16"),ma(this,"ptr"),!La)throw new v9("Must invoke loadWasm first.");this._onigBinding=La,this.content=t;let n=new pk(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!UA._sharedPtrInUse?(UA._sharedPtr||(UA._sharedPtr=La.omalloc(1e4)),UA._sharedPtrInUse=!0,La.HEAPU8.set(n.utf8Value,UA._sharedPtr),this.ptr=UA._sharedPtr):this.ptr=n.createString(La)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===UA._sharedPtr?UA._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ma(mk,"LAST_ID",0);ma(mk,"_sharedPtr",0);ma(mk,"_sharedPtrInUse",!1);var $O=mk,Q9=class{constructor(t){if(ma(this,"_onigBinding"),ma(this,"_ptr"),!La)throw new v9("Must invoke loadWasm first.");let n=[],r=[];for(let A=0,s=t.length;A<s;A++){let u=new pk(t[A]);n[A]=u.createString(La),r[A]=u.utf8Length}let a=La.omalloc(4*t.length);La.HEAPU32.set(n,a/4);let o=La.omalloc(4*t.length);La.HEAPU32.set(r,o/4);let i=La.createOnigScanner(a,o,t.length);for(let A=0,s=t.length;A<s;A++)La.ofree(n[A]);La.ofree(o),La.ofree(a),i===0&&dBe(La),this._onigBinding=La,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new $O(t);let o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){let o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(i===0)return null;let A=o.HEAPU32,s=i/4,u=A[s++],d=A[s++],l=[];for(let m=0;m<d;m++){let p=t.convertUtf8OffsetToUtf16(A[s++]),g=t.convertUtf8OffsetToUtf16(A[s++]);l[m]={start:p,end:g,length:g-p}}return{index:u,captureIndices:l}}};function lBe(e){return typeof e.instantiator=="function"}function pBe(e){return typeof e.default=="function"}function mBe(e){return typeof e.data<"u"}function gBe(e){return typeof Response<"u"&&e instanceof Response}function fBe(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}var lk;function MO(e){if(lk)return lk;async function t(){La=await sBe(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),lBe(r)?r=await r.instantiator(n):pBe(r)?r=await r.default(n):(mBe(r)&&(r=r.data),gBe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await bBe(r)(n):r=await hBe(r)(n):fBe(r)?r=await k9(r)(n):r instanceof WebAssembly.Module?r=await k9(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await k9(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return lk=t(),lk}function k9(e){return t=>WebAssembly.instantiate(e,t)}function bBe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function hBe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var jO;function BBe(e){jO=e}function yBe(){return jO}async function CBe(e){return e&&await MO(e),{createScanner(t){return new Q9(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new $O(t)}}}var _9=LO({});RO(_9,I9);var AK=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(TO(),PO)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(GO(),HO)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(OO(),UO)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(zO(),qO)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(YO(),KO)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(WO(),JO)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(VO(),ZO)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(eq(),XO)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(nq(),tq)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(rq(),aq)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(iq(),oq)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(sq(),Aq)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(uq(),cq)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(lq(),dq)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(mq(),pq)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(fq(),gq)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(hq(),bq)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(yq(),Bq)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(wq(),Cq)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(kq(),Eq)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(vq(),Qq)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>(_q(),Iq)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(Dq(),xq)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(Sq(),Fq)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(Lq(),Nq)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>($q(),Rq)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(jq(),Mq)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(Tq(),Pq)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(Gq(),Hq)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(Oq(),Uq)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(zq(),qq)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(Yq(),Kq)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(Wq(),Jq)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(Vq(),Zq)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(ez(),Xq)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(nz(),tz)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(rz(),az)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(iz(),oz)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(sz(),Az)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(uz(),cz)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(lz(),dz)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(mz(),pz)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(fz(),gz)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(hz(),bz)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(yz(),Bz)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(wz(),Cz)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(kz(),Ez)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(vz(),Qz)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>(_z(),Iz)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(Dz(),xz)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>(Sz(),Fz)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(Lz(),Nz)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>($z(),Rz)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(jz(),Mz)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Tz(),Pz)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(Gz(),Hz)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(Oz(),Uz)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(zz(),qz)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(Yz(),Kz)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(Wz(),Jz)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(Vz(),Zz)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(eK(),Xz)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(nK(),tK)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(rK(),aK)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(iK(),oK)))}],sK=Object.fromEntries(AK.map(e=>[e.id,e.import]));var xt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Nye(e){return j9(e)}function j9(e){return Array.isArray(e)?Lye(e):e instanceof RegExp?e:typeof e=="object"?Rye(e):e}function Lye(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=j9(e[n]);return t}function Rye(e){let t={};for(let n in e)t[n]=j9(e[n]);return t}function bK(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function hK(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?hK(e.substring(0,e.length-1)):e.substr(~t+1)}var x9=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,gk=class{static hasCaptures(e){return e===null?!1:(x9.lastIndex=0,x9.test(e))}static replaceCaptures(e,t,n){return e.replace(x9,(r,a,o,i)=>{let A=n[parseInt(a||o,10)];if(A){let s=t.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(i){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return r})}};function BK(e,t){return e<t?-1:e>t?1:0}function yK(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let o=BK(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function cK(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function CK(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var wK=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},kh=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(jye(e),t)}static createFromParsedTheme(e,t){return Tye(e,t)}_cachedMatchRoot=new wK(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>$ye(e.parent,a.parentScopes));return r?new EK(r.fontStyle,r.foreground,r.background):null}},D9=class fk{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let r of n)t=new fk(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new fk(n,t[r]);return n}push(t){return new fk(this,t)}getSegments(){let t=this,n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function $ye(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!Mye(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Mye(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var EK=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function jye(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let i=t[a];if(!i.settings)continue;let A;if(typeof i.scope=="string"){let l=i.scope;l=l.replace(/^[,]+/,""),l=l.replace(/[,]+$/,""),A=l.split(",")}else Array.isArray(i.scope)?A=i.scope:A=[""];let s=-1;if(typeof i.settings.fontStyle=="string"){s=0;let l=i.settings.fontStyle.split(" ");for(let m=0,p=l.length;m<p;m++)switch(l[m]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let u=null;typeof i.settings.foreground=="string"&&cK(i.settings.foreground)&&(u=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&cK(i.settings.background)&&(d=i.settings.background);for(let l=0,m=A.length;l<m;l++){let g=A[l].trim().split(" "),b=g[g.length-1],B=null;g.length>1&&(B=g.slice(0,g.length-1),B.reverse()),n[r++]=new Pye(b,B,a,s,u,d)}}return n}var Pye=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},Wa=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Wa||{});function Tye(e,t){e.sort((s,u)=>{let d=BK(s.scope,u.scope);return d!==0||(d=yK(s.parentScopes,u.parentScopes),d!==0)?d:s.index-u.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(r=s.foreground),s.background!==null&&(a=s.background)}let o=new Hye(t),i=new EK(n,o.getId(r),o.getId(a)),A=new Uye(new S9(0,null,-1,0,0),[]);for(let s=0,u=e.length;s<u;s++){let d=e[s];A.insert(0,d.scope,d.parentScopes,d.fontStyle,o.getId(d.foreground),o.getId(d.background))}return new kh(o,i,A)}var Hye=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Gye=Object.freeze([]),S9=class kK{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,o){this.scopeDepth=t,this.parentScopes=n||Gye,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new kK(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},Uye=class N9{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){let o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(N9._cmpBySpecificity),n}insert(t,n,r,a,o,i){if(n===""){this._doInsertHere(t,r,a,o,i);return}let A=n.indexOf("."),s,u;A===-1?(s=n,u=""):(s=n.substring(0,A),u=n.substring(A+1));let d;this._children.hasOwnProperty(s)?d=this._children[s]:(d=new N9(this._mainRule.clone(),S9.cloneArr(this._rulesWithParentScopes)),this._children[s]=d),d.insert(t+1,u,r,a,o,i)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let i=0,A=this._rulesWithParentScopes.length;i<A;i++){let s=this._rulesWithParentScopes[i];if(yK(s.parentScopes,n)===0){s.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new S9(t,n,r,a,o))}},Zd=class di{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=di.getLanguageId(t),r=di.getTokenType(t),a=di.getFontStyle(t),o=di.getForeground(t),i=di.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,o,i,A){let s=di.getLanguageId(t),u=di.getTokenType(t),d=di.containsBalancedBrackets(t)?1:0,l=di.getFontStyle(t),m=di.getForeground(t),p=di.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),a!==null&&(d=a?1:0),o!==-1&&(l=o),i!==0&&(m=i),A!==0&&(p=A),(s<<0|u<<8|d<<10|l<<11|m<<15|p<<24)>>>0}};function hk(e,t){let n=[],r=Oye(e),a=r.next();for(;a!==null;){let s=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let u=i();if(n.push({matcher:u,priority:s}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();let s=o();return u=>!!s&&!s(u)}if(a==="("){a=r.next();let s=A();return a===")"&&(a=r.next()),s}if(uK(a)){let s=[];do s.push(a),a=r.next();while(uK(a));return u=>t(s,u)}return null}function i(){let s=[],u=o();for(;u;)s.push(u),u=o();return d=>s.every(l=>l(d))}function A(){let s=[],u=i();for(;u&&(s.push(u),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");u=i()}return d=>s.some(l=>l(d))}}function uK(e){return!!e&&!!e.match(/[\w\.:]+/)}function Oye(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function QK(e){typeof e.dispose=="function"&&e.dispose()}var Qh=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qye=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},zye=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Kye=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Qh(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new zye;for(let n of e)Yye(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof Qh){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Yye(e,t,n,r){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}let o=n.lookup(t);e instanceof Qh?bk({baseGrammar:o,selfGrammar:a},r):L9(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);let i=n.injections(e.scopeName);if(i)for(let A of i)r.add(new Qh(A))}function L9(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Bk([r],t,n)}}function bk(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Bk(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Bk(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Bk(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let a=r.repository?bK({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Bk(r.patterns,{...t,repository:a},n);let o=r.include;if(!o)continue;let i=vK(o);switch(i.kind){case 0:bk({...t,selfGrammar:t.baseGrammar},n);break;case 1:bk(t,n);break;case 2:L9(i.ruleName,{...t,repository:a},n);break;case 3:case 4:let A=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(A){let s={baseGrammar:t.baseGrammar,selfGrammar:A,repository:a};i.kind===4?L9(i.ruleName,s,n):bk(s,n)}else i.kind===4?n.add(new qye(i.scopeName,i.ruleName)):n.add(new Qh(i.scopeName));break}}}var Jye=class{kind=0},Wye=class{kind=1},Zye=class{constructor(e){this.ruleName=e}kind=2},Vye=class{constructor(e){this.scopeName=e}kind=3},Xye=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function vK(e){if(e==="$base")return new Jye;if(e==="$self")return new Wye;let t=e.indexOf("#");if(t===-1)return new Vye(e);if(t===0)return new Zye(e.substring(1));{let n=e.substring(0,t),r=e.substring(t+1);return new Xye(n,r)}}var eCe=/\\(\d+)/,dK=/\\(\d+)/g;var tCe=-1,IK=-2;var _h=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=gk.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=gk.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${hK(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:gk.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:gk.replaceCaptures(this._contentName,e,t)}},nCe=class extends _h{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},aCe=class extends _h{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new vh(r,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ih,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},lK=class extends _h{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ih,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},R9=class extends _h{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,o,i,A,s,u){super(e,t,n,r),this._begin=new vh(a,this.id),this.beginCaptures=o,this._end=new vh(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ih;for(let n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},yk=class extends _h{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,o,i,A,s){super(e,t,n,r),this._begin=new vh(a,this.id),this.beginCaptures=o,this.whileCaptures=A,this._while=new vh(i,IK),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ih;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ih,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},_K=class pr{static createCaptureRule(t,n,r,a,o){return t.registerRule(i=>new nCe(n,i,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new aCe(t.$vscodeTextmateLocation,t.id,t.name,t.match,pr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=bK({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new lK(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,pr._compilePatterns(o,n,r))}return t.while?new yk(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,pr._compileCaptures(t.whileCaptures||t.captures,n,r),pr._compilePatterns(t.patterns,n,r)):new R9(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,pr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,pr._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10);A>o&&(o=A)}for(let i=0;i<=o;i++)a[i]=null;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10),s=0;t[i].patterns&&(s=pr.getCompiledRuleId(t[i],n,r)),a[A]=pr.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let o=0,i=t.length;o<i;o++){let A=t[o],s=-1;if(A.include){let u=vK(A.include);switch(u.kind){case 0:case 1:s=pr.getCompiledRuleId(r[A.include],n,r);break;case 2:let d=r[u.ruleName];d&&(s=pr.getCompiledRuleId(d,n,r));break;case 3:case 4:let l=u.scopeName,m=u.kind===4?u.ruleName:null,p=n.getExternalGrammar(l,r);if(p)if(m){let g=p.repository[m];g&&(s=pr.getCompiledRuleId(g,n,p.repository))}else s=pr.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else s=pr.getCompiledRuleId(A,n,r);if(s!==-1){let u=n.getRule(s),d=!1;if((u instanceof lK||u instanceof R9||u instanceof yk)&&u.hasMissingPatterns&&u.patterns.length===0&&(d=!0),d)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},vh=class xK{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){let r=t.length,a=0,o=[],i=!1;for(let A=0;A<r;A++)if(t.charAt(A)==="\\"&&A+1<r){let u=t.charAt(A+1);u==="z"?(o.push(t.substring(a,A)),o.push("$(?!\\n)(?<!\\n)"),a=A+2):(u==="A"||u==="G")&&(i=!0),A++}this.hasAnchor=i,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=eCe.test(this.source):this.hasBackReferences=!1}clone(){return new xK(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return dK.lastIndex=0,this.source.replace(dK,(a,o)=>CK(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],o,i,A,s;for(o=0,i=this.source.length;o<i;o++)A=this.source.charAt(o),t[o]=A,n[o]=A,r[o]=A,a[o]=A,A==="\\"&&o+1<i&&(s=this.source.charAt(o+1),s==="A"?(t[o+1]="\uFFFF",n[o+1]="\uFFFF",r[o+1]="A",a[o+1]="A"):s==="G"?(t[o+1]="\uFFFF",n[o+1]="G",r[o+1]="\uFFFF",a[o+1]="G"):(t[o+1]=s,n[o+1]=s,r[o+1]=s,a[o+1]=s),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ih=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new pK(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new pK(e,r,this._items.map(a=>a.ruleId))}},pK=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
69
+ `);case"automation":return Wme(e)}}var W3e=c.object({plugin:c.string().min(1),key:c.string().min(1)}).strict();var Vme=c.enum(["active","completed","failed"]),Xme=c.enum(["api","internal","scheduler","slack"]),aG=ume,ege=c.object({conversationId:c.string().min(1)}).strict(),Z3e=c.object({attachmentId:c.string().min(1),conversationId:c.string().min(1)}).strict(),tge=c.object({limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),nge=c.object({before:c.string().min(1),limit:c.coerce.number().int().min(1).max(1e3).default(500)}).strict(),age=c.object({actorEmail:c.string().trim().email().transform(e=>e.toLowerCase()).optional(),q:c.string().trim().max(200).optional(),status:c.enum(["active","archived"]).default("active")}).strict(),rge=c.object({archived:c.boolean(),lastSeenAt:c.string().datetime()}).strict(),M2=c.object({archivedAt:c.string().datetime().nullable()}).strict(),rG=c.object({idempotencyKey:c.string().trim().min(1).max(200),message:c.string().trim().max(32e3),images:c.array(Jme).max(3).optional()}).strict().refine(e=>!!(e.message||e.images?.length),"Add a message or an image.").refine(e=>(e.images??[]).reduce((t,n)=>t+n.data.length,0)<=Rb*4/3,"Images must total 3 MB or less."),oge=rG.safeExtend({visibility:c.enum(["private","public"]).optional()}),PE=c.object({conversationId:c.string().min(1),messageId:c.string().min(1),status:c.enum(["accepted","duplicate"])}).strict(),Fd=c.object({email:c.string().optional(),fullName:c.string().optional(),slackUserId:c.string().optional(),slackUserName:c.string().optional()}).strict(),oG=c.enum(["defer","interrupt"]),iG=c.object({actorIdentity:Fd.optional(),createdAt:c.string().datetime(),delivery:oG,inboundMessageId:c.string().min(1),messageId:c.string().min(1),receivedAt:c.string().datetime(),role:c.literal("user"),source:c.enum(["slack","web"]),text:c.string().optional(),attachments:c.array(R2).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"pending message content must be text or explicitly redacted"}),e.redacted&&(e.actorIdentity||e.attachments)&&t.addIssue({code:"custom",message:"redacted pending messages must not expose actor identity or attachments"})}),AG=c.object({authorizationUrl:c.string().url(),completionText:c.string().min(1),label:c.string().min(1)}).strict(),j2=c.object({authorization:AG.optional(),conversationId:c.string().min(1),generatedAt:c.string().datetime(),messages:c.array(iG)}).strict(),ige=c.object({inboundMessageIds:c.array(c.string().min(1)).min(1).optional(),receivedBefore:c.string().datetime().optional()}).strict(),P2=c.object({cancelledCount:c.number().int().nonnegative(),cancelledInboundMessageIds:c.array(c.string().min(1)),conversationId:c.string().min(1)}).strict(),sG=c.object({costUsd:c.number().finite().nonnegative(),operations:c.array(c.object({costUsd:c.number().finite().nonnegative(),events:c.number().int().positive(),name:c.string().min(1),namespace:c.string().min(1)}).strict()).min(1)}).strict(),Age=c.object({id:c.string().min(1).optional(),kind:c.enum(["scheduled","event"]),label:c.string().min(1).optional(),title:c.string().min(1).optional()}).strict().superRefine((e,t)=>{!!e.id!=!!e.label&&t.addIssue({code:"custom",message:"sourceTask id and label must both be set or both omitted"})}),sge=jH.and(c.object({plugin:c.string().min(1),createdAt:c.string().datetime(),updatedAt:c.string().datetime()})),cG=c.object({createdAt:c.string().datetime(),role:c.enum(["assistant","user"]),text:c.string().min(1)}).strict(),gm=c.object({displayTitle:c.string(),activityPreview:cG.optional(),cumulativeDurationMs:c.number(),cumulativeUsage:aG.optional(),auxiliaryCosts:sG.optional(),conversationId:c.string(),isParticipant:c.boolean(),visibility:c.enum(["private","public"]).optional(),status:Vme,startedAt:c.string(),lastSeenAt:c.string(),lastProgressAt:c.string(),surface:Xme,actorIdentity:Fd.optional(),participants:c.array(Fd).optional(),archivedAt:c.string().datetime().nullable().optional(),channel:c.string().optional(),channelName:c.string().optional(),channelNameRedacted:c.boolean().optional(),locationId:c.string().optional(),sentryTraceUrl:c.string().optional(),locationUrl:c.string().url().optional(),traceId:c.string().optional(),annotations:c.array(sge).optional(),sidebarAnnotations:c.array(PH).optional(),assignedWork:c.boolean().optional(),finishedWorkAt:c.string().datetime().optional(),isPriority:c.boolean().optional(),unfinishedWork:c.boolean().optional()}).strict(),cge=c.object({type:c.literal("message"),messageId:c.string().min(1),role:c.enum(["assistant","system","user"]),source:c.enum(["slack","web"]).optional(),actorIdentity:Fd.optional(),eventType:c.string().min(1).optional(),eventObjectType:mm.optional(),explicitMention:c.boolean().optional(),trustedSummary:c.string().min(1).optional(),cards:c.array(Zme).optional(),text:c.string().optional(),attachments:c.array(R2).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"message content must be text or explicitly redacted"}),e.redacted&&(e.actorIdentity||e.cards||e.attachments)&&t.addIssue({code:"custom",message:"redacted messages must not expose actor identity, cards, or attachments"})}),uge=c.object({type:c.literal("message_handled"),messageId:c.string().min(1)}).strict(),dge=c.object({toolCallId:c.string().min(1),name:c.string().min(1),status:c.enum(["running","completed","error"]),startedAt:c.string().datetime().optional(),startedSeq:c.number().int().nonnegative().optional(),input:c.unknown().optional(),output:c.unknown().optional()}).strict().superRefine((e,t)=>{e.startedAt===void 0!=(e.startedSeq===void 0)&&t.addIssue({code:"custom",message:"tool start sequence and timestamp must be provided together"})}),uG=c.object({type:c.literal("reasoning"),text:c.string().min(1).optional(),redacted:c.literal(!0).optional()}).strict().superRefine((e,t)=>{e.text===void 0==(e.redacted!==!0)&&t.addIssue({code:"custom",message:"reasoning content must be text or explicitly redacted"})}),lge=c.object({type:c.literal("tool_call"),toolCallId:c.string().min(1)}).strict(),pge=c.object({parts:c.array(c.discriminatedUnion("type",[uG,lge])).min(1)}).strict(),mge=c.object({type:c.literal("tool_calls"),calls:c.array(dge).min(1),assistant:pge.optional()}).strict().superRefine((e,t)=>{if(!e.assistant)return;let n=new Map;for(let a of e.calls)n.set(a.toolCallId,(n.get(a.toolCallId)??0)+1);let r=new Map;for(let a of e.assistant.parts)a.type==="tool_call"&&r.set(a.toolCallId,(r.get(a.toolCallId)??0)+1);(n.size!==r.size||[...n].some(([a,o])=>r.get(a)!==o))&&t.addIssue({code:"custom",path:["assistant","parts"],message:"assistant tool parts must reference every call exactly once"})}),gge=c.object({type:c.literal("assistant_message"),parts:c.array(uG).min(1)}).strict(),fge=c.discriminatedUnion("state",[c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.enum(["succeeded","no_reply"])}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("started"),inputMessageIds:c.array(c.string().min(1)).min(1).optional()}).strict(),c.object({type:c.literal("turn_lifecycle"),turnId:c.string().min(1),state:c.literal("failed"),failureCode:F2,failureReason:S2.optional(),eventId:c.string().regex(/^[a-f0-9]{32}$/i).optional(),sentryEventUrl:c.string().url().optional()}).strict()]),bge=c.object({type:c.literal("turn_routed"),turnId:c.string().min(1),modelProfile:c.string().min(1),modelId:c.string().min(1),costUsd:c.number().finite().nonnegative().optional(),reasoningLevel:c.string().min(1),confidence:c.number().min(0).max(1).optional(),source:c.enum(["configured","inherited","router"])}).strict(),hge=c.object({type:c.literal("guardian_action_reviewed"),turnId:c.string().min(1),toolCallId:c.string().min(1),toolName:c.string().min(1),decision:c.enum(["allow","ask","deny"]),riskLevel:c.enum(["low","medium","high","critical"]),userAuthorization:c.enum(["high","medium","low","unknown"])}).strict(),Bge=c.object({type:c.literal("turn_context"),turnId:c.string().min(1),pluginName:c.string().min(1),kind:c.string().min(1),version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict(),yge=c.object({type:c.literal("structured_event"),namespace:c.string().min(1),name:c.string().min(1),version:c.number().int().positive(),turnId:c.string().min(1).optional(),presentation:TH}).strict(),Cge=c.object({type:c.literal("attachments_delivered"),attachments:c.array(R2).min(1)}).strict(),wge=c.object({type:c.literal("compaction"),modelProfile:c.string().min(1).optional(),modelId:c.string().min(1).optional(),summary:c.string().min(1).optional(),details:c.object({reason:c.literal("capacity"),estimatedInputTokens:c.number().int().nonnegative(),replacementInputTokens:c.number().int().nonnegative().optional(),triggerTokens:c.number().int().nonnegative(),inputLimitTokens:c.number().int().positive(),inputMessageCount:c.number().int().nonnegative(),retainedMessageCount:c.number().int().nonnegative(),summaryChars:c.number().int().nonnegative()}).strict().optional()}).strict(),Ege=c.object({type:c.literal("handoff"),modelProfile:c.string().min(1),modelId:c.string().min(1),reasoningLevel:c.string().min(1).optional(),triggeringToolCallId:c.string().min(1).optional(),summary:c.string().min(1).optional()}).strict(),kge=c.object({type:c.literal("subagent"),startedSeq:c.number().int().nonnegative(),startedAt:c.string().datetime(),childConversationId:c.string().min(1),subagentKind:c.string().min(1),parentToolCallId:c.string().min(1).optional(),status:c.enum(["running","completed","error","aborted"])}).strict(),dG=c.discriminatedUnion("type",[cge,uge,gge,mge,fge,Bge,yge,Cge,bge,hge,wge,Ege,kge]),T2=c.object({seq:c.number().int().nonnegative(),createdAt:c.string().datetime(),data:dG}).strict(),H2=c.discriminatedUnion("status",[c.object({status:c.literal("available")}).strict(),c.object({status:c.literal("redacted"),reason:c.literal("non_public_conversation")}).strict(),c.object({status:c.literal("expired"),expiredAt:c.string().datetime()}).strict()]),Qge=c.object({modelId:c.string(),usage:aG}).strict();function lG(e,t){e.eventHistory.status==="expired"&&e.events.length>0&&t.addIssue({code:"custom",path:["events"],message:"expired event history must not contain events"});for(let n=1;n<e.events.length;n+=1)e.events[n].seq<=e.events[n-1].seq&&t.addIssue({code:"custom",path:["events",n,"seq"],message:"report event sequences must be strictly increasing"});for(let[n,r]of e.events.entries())r.data.type==="message"&&(e.eventHistory.status==="redacted"&&r.data.redacted!==!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact messages"}),e.eventHistory.status==="available"&&r.data.redacted===!0&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose messages"})),e.eventHistory.status==="redacted"&&r.data.type==="tool_calls"&&r.data.calls.some(a=>a.input!==void 0||a.output!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact tool payloads"}),e.eventHistory.status==="redacted"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.text!==void 0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"redacted event history must redact assistant messages"}),e.eventHistory.status==="available"&&r.data.type==="assistant_message"&&r.data.parts.some(a=>a.redacted===!0)&&t.addIssue({code:"custom",path:["events",n,"data"],message:"available event history must expose reasoning"}),r.data.type==="tool_calls"&&(e.eventHistory.status==="redacted"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.text!==void 0)||e.eventHistory.status==="available"&&r.data.assistant?.parts.some(a=>a.type==="reasoning"&&a.redacted===!0))&&t.addIssue({code:"custom",path:["events",n,"data","assistant"],message:"assistant reasoning must match event history visibility"})}var G2=gm.extend({brief:c.object({content:zme,updatedAt:c.string().datetime(),version:c.number().int().positive()}).strict().optional(),modelUsage:c.array(Qge).optional(),events:c.array(T2),eventHistory:H2,previousCursor:c.string().min(1).optional(),generatedAt:c.string(),sentryConversationUrl:c.string().optional(),sourceTask:Age.optional()}).strict().superRefine(lG),U2=c.object({events:c.array(T2),eventHistory:H2,previousCursor:c.string().min(1).optional(),generatedAt:c.string()}).strict().superRefine(lG),O2=c.object({conversations:c.array(gm),source:c.literal("conversation_index"),generatedAt:c.string()}).strict(),Sd=c.object({active:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),label:c.string(),costUsd:c.number().optional(),tokens:c.number().optional()}).strict(),pG=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),_2=c.object({cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),costUsd:c.number().optional(),date:pG,durationMs:c.number(),inputTokens:c.number().optional(),tokens:c.number().optional()}).strict(),x2=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),date:pG,deny:c.number(),requests:c.number()}).strict(),vge=c.object({allow:c.number(),ask:c.number(),costUsd:c.number().optional(),deny:c.number(),metricDays:c.array(x2),metricHours:c.array(x2).optional(),metricSixHours:c.array(x2).optional(),requests:c.number()}).strict(),q2=c.object({active:c.number(),cachedInputTokens:c.number().optional(),cacheCreationTokens:c.number().optional(),conversations:c.number(),durationMs:c.number(),failed:c.number(),generatedAt:c.string(),guardian:vge,metricDays:c.array(_2),metricHours:c.array(_2).optional(),metricSixHours:c.array(_2).optional(),locations:c.array(Sd),actors:c.array(Sd),source:c.literal("conversation_index"),costUsd:c.number().optional(),inputTokens:c.number().optional(),tokens:c.number().optional(),windowEnd:c.string(),windowStart:c.string()}).strict();var Ige=c.object({status:c.literal("ok"),service:c.string(),timestamp:c.string()}).strict(),mG=c.object({configKeys:c.array(c.string()),description:c.string(),displayName:c.string(),name:c.string()}).strict(),z2=c.array(mG),K2=c.object({name:c.string(),pluginProvider:c.string().optional()}).strict(),Y2=c.array(K2),gG=c.object({dir:c.string(),hasMigrationsDir:c.boolean(),hasSkillsDir:c.boolean(),packageName:c.string()}).strict(),fG=c.object({packageNames:c.array(c.string()),packages:c.array(gG),manifestRoots:c.array(c.string()),skillRoots:c.array(c.string()),tracingIncludes:c.array(c.string())}).strict(),_ge=c.object({cwd:c.string(),homeDir:c.string(),descriptionText:c.string().optional(),providers:c.array(c.string()),skills:c.array(K2),packagedContent:fG}).strict(),J2=c.enum(["danger","good","neutral","warning"]),xge=c.object({label:c.string(),tone:J2.optional(),value:c.string()}).strict(),Dge=c.object({key:c.string(),label:c.string()}).strict(),Fge=c.object({id:c.string(),tone:J2.optional(),values:c.record(c.string(),c.string())}).strict(),Sge=c.object({fields:c.array(Dge).optional(),emptyText:c.string().optional(),records:c.array(Fge).optional(),title:c.string()}).strict(),Nge=c.object({categories:c.array(c.object({id:c.string().min(1),label:c.string().min(1),values:c.record(c.string(),c.number().finite())}).strict()).max(100),description:c.string().optional(),emptyText:c.string().optional(),id:c.string().min(1),series:c.array(c.object({format:c.literal("usd").optional(),key:c.string().min(1),label:c.string().min(1),tone:J2.optional()}).strict()).min(1).max(8),timeRangeDays:c.array(c.union([c.literal(1),c.literal(7),c.literal(30),c.literal(90)])).min(1).max(4).optional(),title:c.string().min(1),type:c.literal("bar_chart")}).strict(),bG=c.object({generatedAt:c.string().optional(),metrics:c.array(xge).optional(),recordSets:c.array(Sge).optional(),title:c.string().optional(),pluginName:c.string(),widgets:c.array(Nge).max(12).optional()}).strict(),TE=c.object({generatedAt:c.string(),reports:c.array(bG),source:c.literal("plugins")}).strict(),hG=36e5,eNe=6*hG,tNe=24*hG;async function W2(e){let t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(`${e.conversationId}\0${e.idempotencyKey}`));return`api-msg:${Array.from(new Uint8Array(t),n=>n.toString(16).padStart(2,"0")).join("").slice(0,24)}`}var D=Symbol.for("drizzle:entityKind");function ea(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,D))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(D in n&&n[D]===t[D])return!0;n=Object.getPrototypeOf(n)}return!1}var Nd=class{constructor(t,n){this.table=t,this.config=n,this.name=n.name,this.keyAsName=n.keyAsName,this.notNull=n.notNull,this.default=n.default,this.defaultFn=n.defaultFn,this.onUpdateFn=n.onUpdateFn,this.hasDefault=n.hasDefault,this.primary=n.primaryKey,this.isUnique=n.isUnique,this.uniqueName=n.uniqueName,this.uniqueType=n.uniqueType,this.dataType=n.dataType,this.columnType=n.columnType,this.generated=n.generated,this.generatedIdentity=n.generatedIdentity}static[D]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(t){return t}mapToDriverValue(t){return t}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}};var HE=class{static[D]="ColumnBuilder";config;constructor(t,n,r){this.config={name:t,keyAsName:t==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:n,columnType:r,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(t){return this.config.default=t,this.config.hasDefault=!0,this}$defaultFn(t){return this.config.defaultFn=t,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(t){return this.config.onUpdateFn=t,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(t){this.config.name===""&&(this.config.name=t)}};var js=Symbol.for("drizzle:Name");var GE=class{static[D]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(t,n){this.reference=()=>{let{name:r,columns:a,foreignColumns:o}=t();return{name:r,columns:a,foreignTable:o[0].table,foreignColumns:o}},n&&(this._onUpdate=n.onUpdate,this._onDelete=n.onDelete)}onUpdate(t){return this._onUpdate=t===void 0?"no action":t,this}onDelete(t){return this._onDelete=t===void 0?"no action":t,this}build(t){return new Z2(t,this)}},Z2=class{constructor(t,n){this.table=t,this.reference=n.reference,this.onUpdate=n._onUpdate,this.onDelete=n._onDelete}static[D]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:t,columns:n,foreignColumns:r}=this.reference(),a=n.map(A=>A.name),o=r.map(A=>A.name),i=[this.table[js],...a,r[0].table[js],...o];return t??`${i.join("_")}_fk`}};function UE(e,...t){return e(...t)}function eS(e,t){return`${e[js]}_${t.join("_")}_unique`}var V2=class{constructor(t,n){this.name=n,this.columns=t}static[D]="PgUniqueConstraintBuilder";columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(t){return new X2(t,this.columns,this.nullsNotDistinctConfig,this.name)}},BG=class{static[D]="PgUniqueOnConstraintBuilder";name;constructor(t){this.name=t}on(...t){return new V2(t,this.name)}},X2=class{constructor(t,n,r,a){this.table=t,this.columns=n,this.name=a??eS(this.table,this.columns.map(o=>o.name)),this.nullsNotDistinct=r}static[D]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}};function yG(e,t,n){for(let r=t;r<e.length;r++){let a=e[r];if(a==="\\"){r++;continue}if(a==='"')return[e.slice(t,r).replace(/\\/g,""),r+1];if(!n&&(a===","||a==="}"))return[e.slice(t,r).replace(/\\/g,""),r]}return[e.slice(t).replace(/\\/g,""),e.length]}function CG(e,t=0){let n=[],r=t,a=!1;for(;r<e.length;){let o=e[r];if(o===","){(a||r===t)&&n.push(""),a=!0,r++;continue}if(a=!1,o==="\\"){r+=2;continue}if(o==='"'){let[s,u]=yG(e,r+1,!0);n.push(s),r=u;continue}if(o==="}")return[n,r+1];if(o==="{"){let[s,u]=CG(e,r+1);n.push(s),r=u;continue}let[i,A]=yG(e,r,!1);n.push(i),r=A}return[n,r]}function wG(e){let[t]=CG(e,1);return t}function tS(e){return`{${e.map(t=>Array.isArray(t)?tS(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var ee=class extends HE{foreignKeyConfigs=[];static[D]="PgColumnBuilder";array(t){return new aS(this.config.name,this,t)}references(t,n={}){return this.foreignKeyConfigs.push({ref:t,actions:n}),this}unique(t,n){return this.config.isUnique=!0,this.config.uniqueName=t,this.config.uniqueType=n?.nulls,this}generatedAlwaysAs(t){return this.config.generated={as:t,type:"always",mode:"stored"},this}buildForeignKeys(t,n){return this.foreignKeyConfigs.map(({ref:r,actions:a})=>UE((o,i)=>{let A=new GE(()=>{let s=o();return{columns:[t],foreignColumns:[s]}});return i.onUpdate&&A.onUpdate(i.onUpdate),i.onDelete&&A.onDelete(i.onDelete),A.build(n)},r,a))}buildExtraConfigColumn(t){return new nS(t,this.config)}},W=class extends Nd{constructor(t,n){n.uniqueName||(n.uniqueName=eS(t,[n.name])),super(t,n),this.table=t}static[D]="PgColumn"},nS=class extends W{static[D]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(t){return this.indexConfig.opClass=t,this}},fm=class{static[D]="IndexedColumn";constructor(t,n,r,a){this.name=t,this.keyAsName=n,this.type=r,this.indexConfig=a}name;keyAsName;type;indexConfig},aS=class extends ee{static[D]="PgArrayBuilder";constructor(t,n,r){super(t,"array","PgArray"),this.config.baseBuilder=n,this.config.size=r}build(t){let n=this.config.baseBuilder.build(t);return new rS(t,this.config,n)}},rS=class e extends W{constructor(t,n,r,a){super(t,n),this.baseColumn=r,this.range=a,this.size=n.size}size;static[D]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${typeof this.size=="number"?this.size:""}]`}mapFromDriverValue(t){return typeof t=="string"&&(t=wG(t)),t.map(n=>this.baseColumn.mapFromDriverValue(n))}mapToDriverValue(t,n=!1){let r=t.map(a=>a===null?null:ea(this.baseColumn,e)?this.baseColumn.mapToDriverValue(a,!0):this.baseColumn.mapToDriverValue(a));return n?r:tS(r)}};var EG=class extends ee{static[D]="PgEnumObjectColumnBuilder";constructor(t,n){super(t,"string","PgEnumObjectColumn"),this.config.enum=n}build(t){return new oS(t,this.config)}},oS=class extends W{static[D]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}},kG=Symbol.for("drizzle:isPgEnum");function vG(e){return!!e&&typeof e=="function"&&kG in e&&e[kG]===!0}var QG=class extends ee{static[D]="PgEnumColumnBuilder";constructor(t,n){super(t,"string","PgEnumColumn"),this.config.enum=n}build(t){return new iS(t,this.config)}},iS=class extends W{static[D]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(t,n){super(t,n),this.enum=n.enum}getSQLType(){return this.enum.enumName}};var bm=class{static[D]="Subquery";constructor(t,n,r,a=!1,o=[]){this._={brand:"Subquery",sql:t,selectedFields:n,alias:r,isWith:a,usedTables:o}}},IG=class extends bm{static[D]="WithSubquery"};var _G="0.45.2";var AS,sS,xG={startActiveSpan(e,t){return AS?(sS||(sS=AS.trace.getTracer("drizzle-orm",_G)),UE((n,r)=>r.startActiveSpan(e,a=>{try{return t(a)}catch(o){throw a.setStatus({code:n.SpanStatusCode.ERROR,message:o instanceof Error?o.message:"Unknown error"}),o}finally{a.end()}}),AS,sS)):t()}};var hm=Symbol.for("drizzle:ViewBaseConfig");var cS=Symbol.for("drizzle:Schema"),DG=Symbol.for("drizzle:Columns"),FG=Symbol.for("drizzle:ExtraConfigColumns"),uS=Symbol.for("drizzle:OriginalName"),dS=Symbol.for("drizzle:BaseName"),$b=Symbol.for("drizzle:IsAlias"),SG=Symbol.for("drizzle:ExtraConfigBuilder"),Lge=Symbol.for("drizzle:IsDrizzleTable"),Rn=class{static[D]="Table";static Symbol={Name:js,Schema:cS,OriginalName:uS,Columns:DG,ExtraConfigColumns:FG,BaseName:dS,IsAlias:$b,ExtraConfigBuilder:SG};[js];[uS];[cS];[DG];[FG];[dS];[$b]=!1;[Lge]=!0;[SG]=void 0;constructor(t,n,r){this[js]=this[uS]=t,this[cS]=n,this[dS]=r}};var NG=class{static[D]="FakePrimitiveParam"};function Rge(e){return e!=null&&typeof e.getSQL=="function"}function $ge(e){let t={sql:"",params:[]};for(let n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Do=class{static[D]="StringChunk";value;constructor(t){this.value=Array.isArray(t)?t:[t]}getSQL(){return new $n([this])}},$n=class e{constructor(t){this.queryChunks=t;for(let n of t)if(ea(n,Rn)){let r=n[Rn.Symbol.Schema];this.usedTables.push(r===void 0?n[Rn.Symbol.Name]:r+"."+n[Rn.Symbol.Name])}}static[D]="SQL";decoder=LG;shouldInlineParams=!1;usedTables=[];append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return xG.startActiveSpan("drizzle.buildSQL",n=>{let r=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(t,n){let r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:a,escapeName:o,escapeParam:i,prepareTyping:A,inlineParams:s,paramStartIndex:u}=r;return $ge(t.map(d=>{if(ea(d,Do))return{sql:d.value.join(""),params:[]};if(ea(d,Mb))return{sql:o(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){let l=[new Do("(")];for(let[m,p]of d.entries())l.push(p),m<d.length-1&&l.push(new Do(", "));return l.push(new Do(")")),this.buildQueryFromSourceParams(l,r)}if(ea(d,e))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:s||d.shouldInlineParams});if(ea(d,Rn)){let l=d[Rn.Symbol.Schema],m=d[Rn.Symbol.Name];return{sql:l===void 0||d[$b]?o(m):o(l)+"."+o(m),params:[]}}if(ea(d,Nd)){let l=a.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:o(l),params:[]};let m=d.table[Rn.Symbol.Schema];return{sql:d.table[$b]||m===void 0?o(d.table[Rn.Symbol.Name])+"."+o(l):o(m)+"."+o(d.table[Rn.Symbol.Name])+"."+o(l),params:[]}}if(ea(d,lS)){let l=d[hm].schema,m=d[hm].name;return{sql:l===void 0||d[hm].isAlias?o(m):o(l)+"."+o(m),params:[]}}if(ea(d,OE)){if(ea(d.value,jb))return{sql:i(u.value++,d),params:[d],typings:["none"]};let l=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(ea(l,e))return this.buildQueryFromSourceParams([l],r);if(s)return{sql:this.mapInlineParam(l,r),params:[]};let m=["none"];return A&&(m=[A(d.encoder)]),{sql:i(u.value++,l),params:[l],typings:m}}return ea(d,jb)?{sql:i(u.value++,d),params:[d],typings:["none"]}:ea(d,e.Aliased)&&d.fieldAlias!==void 0?{sql:o(d.fieldAlias),params:[]}:ea(d,bm)?d._.isWith?{sql:o(d._.alias),params:[]}:this.buildQueryFromSourceParams([new Do("("),d._.sql,new Do(") "),new Mb(d._.alias)],r):vG(d)?d.schema?{sql:o(d.schema)+"."+o(d.enumName),params:[]}:{sql:o(d.enumName),params:[]}:Rge(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new Do("("),d.getSQL(),new Do(")")],r):s?{sql:this.mapInlineParam(d,r),params:[]}:{sql:i(u.value++,d),params:[d],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){let r=t.toString();return n(r==="[object Object]"?JSON.stringify(t):r)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new e.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},Mb=class{constructor(t){this.value=t}static[D]="Name";brand;getSQL(){return new $n([this])}};var LG={mapFromDriverValue:e=>e},RG={mapToDriverValue:e=>e},qNe={...LG,...RG},OE=class{constructor(t,n=RG){this.value=t,this.encoder=n}static[D]="Param";brand;getSQL(){return new $n([this])}};function Bm(e,...t){let n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Do(e[0]));for(let[r,a]of t.entries())n.push(a,new Do(e[r+1]));return new $n(n)}(e=>{function t(){return new $n([])}e.empty=t;function n(s){return new $n(s)}e.fromList=n;function r(s){return new $n([new Do(s)])}e.raw=r;function a(s,u){let d=[];for(let[l,m]of s.entries())l>0&&u!==void 0&&d.push(u),d.push(m);return new $n(d)}e.join=a;function o(s){return new Mb(s)}e.identifier=o;function i(s){return new jb(s)}e.placeholder=i;function A(s,u){return new OE(s,u)}e.param=A})(Bm||(Bm={}));(e=>{class t{constructor(r,a){this.sql=r,this.fieldAlias=a}static[D]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})($n||($n={}));var jb=class{constructor(t){this.name=t}static[D]="Placeholder";getSQL(){return new $n([this])}};var Mge=Symbol.for("drizzle:IsDrizzleView"),lS=class{static[D]="View";[hm];[Mge]=!0;constructor({name:t,schema:n,selectedFields:r,query:a}){this[hm]={name:t,originalName:t,schema:n,selectedFields:r,query:a,isExisting:!a,isAlias:!1}}getSQL(){return new $n([this])}};Nd.prototype.getSQL=function(){return new $n([this])};Rn.prototype.getSQL=function(){return new $n([this])};bm.prototype.getSQL=function(){return new $n([this])};function tt(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}var KNe=typeof TextDecoder>"u"?null:new TextDecoder;var Ps=class extends ee{static[D]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"always",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(t){if(t){let{name:n,...r}=t;this.config.generatedIdentity={type:"byDefault",sequenceName:n,sequenceOptions:r}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}};var pS=class extends Ps{static[D]="PgBigInt53Builder";constructor(t){super(t,"number","PgBigInt53")}build(t){return new mS(t,this.config)}},mS=class extends W{static[D]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},gS=class extends Ps{static[D]="PgBigInt64Builder";constructor(t){super(t,"bigint","PgBigInt64")}build(t){return new fS(t,this.config)}},fS=class extends W{static[D]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(t){return BigInt(t)}};function $G(e,t){let{name:n,config:r}=tt(e,t);return r.mode==="number"?new pS(n):new gS(n)}var bS=class extends ee{static[D]="PgBigSerial53Builder";constructor(t){super(t,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new hS(t,this.config)}},hS=class extends W{static[D]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}},BS=class extends ee{static[D]="PgBigSerial64Builder";constructor(t){super(t,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(t){return new yS(t,this.config)}},yS=class extends W{static[D]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(t){return BigInt(t)}};function MG(e,t){let{name:n,config:r}=tt(e,t);return r.mode==="number"?new bS(n):new BS(n)}var CS=class extends ee{static[D]="PgBooleanBuilder";constructor(t){super(t,"boolean","PgBoolean")}build(t){return new wS(t,this.config)}},wS=class extends W{static[D]="PgBoolean";getSQLType(){return"boolean"}};function jG(e){return new CS(e??"")}var ES=class extends ee{static[D]="PgCharBuilder";constructor(t,n){super(t,"string","PgChar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new kS(t,this.config)}},kS=class extends W{static[D]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"char":`char(${this.length})`}};function PG(e,t={}){let{name:n,config:r}=tt(e,t);return new ES(n,r)}var QS=class extends ee{static[D]="PgCidrBuilder";constructor(t){super(t,"string","PgCidr")}build(t){return new vS(t,this.config)}},vS=class extends W{static[D]="PgCidr";getSQLType(){return"cidr"}};function TG(e){return new QS(e??"")}var IS=class extends ee{static[D]="PgCustomColumnBuilder";constructor(t,n,r){super(t,"custom","PgCustomColumn"),this.config.fieldConfig=n,this.config.customTypeParams=r}build(t){return new _S(t,this.config)}},_S=class extends W{static[D]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(t,n){super(t,n),this.sqlName=n.customTypeParams.dataType(n.fieldConfig),this.mapTo=n.customTypeParams.toDriver,this.mapFrom=n.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(t){return typeof this.mapFrom=="function"?this.mapFrom(t):t}mapToDriverValue(t){return typeof this.mapTo=="function"?this.mapTo(t):t}};function HG(e){return(t,n)=>{let{name:r,config:a}=tt(t,n);return new IS(r,a,e)}}var MA=class extends ee{static[D]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Bm`now()`)}};var xS=class extends MA{static[D]="PgDateBuilder";constructor(t){super(t,"date","PgDate")}build(t){return new DS(t,this.config)}},DS=class extends W{static[D]="PgDate";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?new Date(t):t}mapToDriverValue(t){return t.toISOString()}},FS=class extends MA{static[D]="PgDateStringBuilder";constructor(t){super(t,"string","PgDateString")}build(t){return new SS(t,this.config)}},SS=class extends W{static[D]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(t){return typeof t=="string"?t:t.toISOString().slice(0,-14)}};function GG(e,t){let{name:n,config:r}=tt(e,t);return r?.mode==="date"?new xS(n):new FS(n)}var NS=class extends ee{static[D]="PgDoublePrecisionBuilder";constructor(t){super(t,"number","PgDoublePrecision")}build(t){return new LS(t,this.config)}},LS=class extends W{static[D]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(t){return typeof t=="string"?Number.parseFloat(t):t}};function UG(e){return new NS(e??"")}var RS=class extends ee{static[D]="PgInetBuilder";constructor(t){super(t,"string","PgInet")}build(t){return new $S(t,this.config)}},$S=class extends W{static[D]="PgInet";getSQLType(){return"inet"}};function OG(e){return new RS(e??"")}var MS=class extends Ps{static[D]="PgIntegerBuilder";constructor(t){super(t,"number","PgInteger")}build(t){return new jS(t,this.config)}},jS=class extends W{static[D]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(t){return typeof t=="string"?Number.parseInt(t):t}};function qG(e){return new MS(e??"")}var PS=class extends ee{static[D]="PgIntervalBuilder";constructor(t,n){super(t,"string","PgInterval"),this.config.intervalConfig=n}build(t){return new TS(t,this.config)}},TS=class extends W{static[D]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let t=this.fields?` ${this.fields}`:"",n=this.precision?`(${this.precision})`:"";return`interval${t}${n}`}};function zG(e,t={}){let{name:n,config:r}=tt(e,t);return new PS(n,r)}var HS=class extends ee{static[D]="PgJsonBuilder";constructor(t){super(t,"json","PgJson")}build(t){return new GS(t,this.config)}},GS=class extends W{static[D]="PgJson";constructor(t,n){super(t,n)}getSQLType(){return"json"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function KG(e){return new HS(e??"")}var US=class extends ee{static[D]="PgJsonbBuilder";constructor(t){super(t,"json","PgJsonb")}build(t){return new OS(t,this.config)}},OS=class extends W{static[D]="PgJsonb";constructor(t,n){super(t,n)}getSQLType(){return"jsonb"}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t}};function qE(e){return new US(e??"")}var qS=class extends ee{static[D]="PgLineBuilder";constructor(t){super(t,"array","PgLine")}build(t){return new zS(t,this.config)}},zS=class extends W{static[D]="PgLine";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r),Number.parseFloat(a)]}mapToDriverValue(t){return`{${t[0]},${t[1]},${t[2]}}`}},KS=class extends ee{static[D]="PgLineABCBuilder";constructor(t){super(t,"json","PgLineABC")}build(t){return new YS(t,this.config)}},YS=class extends W{static[D]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(t){let[n,r,a]=t.slice(1,-1).split(",");return{a:Number.parseFloat(n),b:Number.parseFloat(r),c:Number.parseFloat(a)}}mapToDriverValue(t){return`{${t.a},${t.b},${t.c}}`}};function YG(e,t){let{name:n,config:r}=tt(e,t);return!r?.mode||r.mode==="tuple"?new qS(n):new KS(n)}var JS=class extends ee{static[D]="PgMacaddrBuilder";constructor(t){super(t,"string","PgMacaddr")}build(t){return new WS(t,this.config)}},WS=class extends W{static[D]="PgMacaddr";getSQLType(){return"macaddr"}};function JG(e){return new JS(e??"")}var ZS=class extends ee{static[D]="PgMacaddr8Builder";constructor(t){super(t,"string","PgMacaddr8")}build(t){return new VS(t,this.config)}},VS=class extends W{static[D]="PgMacaddr8";getSQLType(){return"macaddr8"}};function WG(e){return new ZS(e??"")}var XS=class extends ee{static[D]="PgNumericBuilder";constructor(t,n,r){super(t,"string","PgNumeric"),this.config.precision=n,this.config.scale=r}build(t){return new e4(t,this.config)}},e4=class extends W{static[D]="PgNumeric";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="string"?t:String(t)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},t4=class extends ee{static[D]="PgNumericNumberBuilder";constructor(t,n,r){super(t,"number","PgNumericNumber"),this.config.precision=n,this.config.scale=r}build(t){return new n4(t,this.config)}},n4=class extends W{static[D]="PgNumericNumber";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue(t){return typeof t=="number"?t:Number(t)}mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},a4=class extends ee{static[D]="PgNumericBigIntBuilder";constructor(t,n,r){super(t,"bigint","PgNumericBigInt"),this.config.precision=n,this.config.scale=r}build(t){return new r4(t,this.config)}},r4=class extends W{static[D]="PgNumericBigInt";precision;scale;constructor(t,n){super(t,n),this.precision=n.precision,this.scale=n.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function ZG(e,t){let{name:n,config:r}=tt(e,t),a=r?.mode;return a==="number"?new t4(n,r?.precision,r?.scale):a==="bigint"?new a4(n,r?.precision,r?.scale):new XS(n,r?.precision,r?.scale)}var o4=class extends ee{static[D]="PgPointTupleBuilder";constructor(t){super(t,"array","PgPointTuple")}build(t){return new i4(t,this.config)}},i4=class extends W{static[D]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return[Number.parseFloat(n),Number.parseFloat(r)]}return[t.x,t.y]}mapToDriverValue(t){return`(${t[0]},${t[1]})`}},A4=class extends ee{static[D]="PgPointObjectBuilder";constructor(t){super(t,"json","PgPointObject")}build(t){return new s4(t,this.config)}},s4=class extends W{static[D]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(t){if(typeof t=="string"){let[n,r]=t.slice(1,-1).split(",");return{x:Number.parseFloat(n),y:Number.parseFloat(r)}}return t}mapToDriverValue(t){return`(${t.x},${t.y})`}};function VG(e,t){let{name:n,config:r}=tt(e,t);return!r?.mode||r.mode==="tuple"?new o4(n):new A4(n)}function jge(e){let t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function XG(e,t){let n=new ArrayBuffer(8),r=new DataView(n);for(let a=0;a<8;a++)r.setUint8(a,e[t+a]);return r.getFloat64(0,!0)}function c4(e){let t=jge(e),n=0,r=t[n];n+=1;let a=new DataView(t.buffer),o=a.getUint32(n,r===1);n+=4;let i;if(o&536870912&&(i=a.getUint32(n,r===1),n+=4),(o&65535)===1){let A=XG(t,n);n+=8;let s=XG(t,n);return n+=8,[A,s]}throw new Error("Unsupported geometry type")}var u4=class extends ee{static[D]="PgGeometryBuilder";constructor(t){super(t,"array","PgGeometry")}build(t){return new d4(t,this.config)}},d4=class extends W{static[D]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){return c4(t)}mapToDriverValue(t){return`point(${t[0]} ${t[1]})`}},l4=class extends ee{static[D]="PgGeometryObjectBuilder";constructor(t){super(t,"json","PgGeometryObject")}build(t){return new p4(t,this.config)}},p4=class extends W{static[D]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(t){let n=c4(t);return{x:n[0],y:n[1]}}mapToDriverValue(t){return`point(${t.x} ${t.y})`}};function eU(e,t){let{name:n,config:r}=tt(e,t);return!r?.mode||r.mode==="tuple"?new u4(n):new l4(n)}var m4=class extends ee{static[D]="PgRealBuilder";constructor(t,n){super(t,"number","PgReal"),this.config.length=n}build(t){return new g4(t,this.config)}},g4=class extends W{static[D]="PgReal";constructor(t,n){super(t,n)}getSQLType(){return"real"}mapFromDriverValue=t=>typeof t=="string"?Number.parseFloat(t):t};function tU(e){return new m4(e??"")}var f4=class extends ee{static[D]="PgSerialBuilder";constructor(t){super(t,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new b4(t,this.config)}},b4=class extends W{static[D]="PgSerial";getSQLType(){return"serial"}};function nU(e){return new f4(e??"")}var h4=class extends Ps{static[D]="PgSmallIntBuilder";constructor(t){super(t,"number","PgSmallInt")}build(t){return new B4(t,this.config)}},B4=class extends W{static[D]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=t=>typeof t=="string"?Number(t):t};function aU(e){return new h4(e??"")}var y4=class extends ee{static[D]="PgSmallSerialBuilder";constructor(t){super(t,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(t){return new C4(t,this.config)}},C4=class extends W{static[D]="PgSmallSerial";getSQLType(){return"smallserial"}};function rU(e){return new y4(e??"")}var w4=class extends ee{static[D]="PgTextBuilder";constructor(t,n){super(t,"string","PgText"),this.config.enumValues=n.enum}build(t){return new E4(t,this.config)}},E4=class extends W{static[D]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}};function Hi(e,t={}){let{name:n,config:r}=tt(e,t);return new w4(n,r)}var k4=class extends MA{constructor(t,n,r){super(t,"string","PgTime"),this.withTimezone=n,this.precision=r,this.config.withTimezone=n,this.config.precision=r}static[D]="PgTimeBuilder";build(t){return new Q4(t,this.config)}},Q4=class extends W{static[D]="PgTime";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function oU(e,t={}){let{name:n,config:r}=tt(e,t);return new k4(n,r.withTimezone??!1,r.precision)}var v4=class extends MA{static[D]="PgTimestampBuilder";constructor(t,n,r){super(t,"date","PgTimestamp"),this.config.withTimezone=n,this.config.precision=r}build(t){return new I4(t,this.config)}},I4=class extends W{static[D]="PgTimestamp";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){return typeof t=="string"?new Date(this.withTimezone?t:t+"+0000"):t}mapToDriverValue=t=>t.toISOString()},_4=class extends MA{static[D]="PgTimestampStringBuilder";constructor(t,n,r){super(t,"string","PgTimestampString"),this.config.withTimezone=n,this.config.precision=r}build(t){return new x4(t,this.config)}},x4=class extends W{static[D]="PgTimestampString";withTimezone;precision;constructor(t,n){super(t,n),this.withTimezone=n.withTimezone,this.precision=n.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(t){if(typeof t=="string")return t;let n=t.toISOString().slice(0,-1).replace("T"," ");if(this.withTimezone){let r=t.getTimezoneOffset(),a=r<=0?"+":"-";return`${n}${a}${Math.floor(Math.abs(r)/60).toString().padStart(2,"0")}`}return n}};function zE(e,t={}){let{name:n,config:r}=tt(e,t);return r?.mode==="string"?new _4(n,r.withTimezone??!1,r.precision):new v4(n,r?.withTimezone??!1,r?.precision)}var D4=class extends ee{static[D]="PgUUIDBuilder";constructor(t){super(t,"string","PgUUID")}defaultRandom(){return this.default(Bm`gen_random_uuid()`)}build(t){return new F4(t,this.config)}},F4=class extends W{static[D]="PgUUID";getSQLType(){return"uuid"}};function iU(e){return new D4(e??"")}var S4=class extends ee{static[D]="PgVarcharBuilder";constructor(t,n){super(t,"string","PgVarchar"),this.config.length=n.length,this.config.enumValues=n.enum}build(t){return new N4(t,this.config)}},N4=class extends W{static[D]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function AU(e,t={}){let{name:n,config:r}=tt(e,t);return new S4(n,r)}var L4=class extends ee{static[D]="PgBinaryVectorBuilder";constructor(t,n){super(t,"string","PgBinaryVector"),this.config.dimensions=n.dimensions}build(t){return new R4(t,this.config)}},R4=class extends W{static[D]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}};function sU(e,t){let{name:n,config:r}=tt(e,t);return new L4(n,r)}var $4=class extends ee{static[D]="PgHalfVectorBuilder";constructor(t,n){super(t,"array","PgHalfVector"),this.config.dimensions=n.dimensions}build(t){return new M4(t,this.config)}},M4=class extends W{static[D]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function cU(e,t){let{name:n,config:r}=tt(e,t);return new $4(n,r)}var j4=class extends ee{static[D]="PgSparseVectorBuilder";constructor(t,n){super(t,"string","PgSparseVector"),this.config.dimensions=n.dimensions}build(t){return new P4(t,this.config)}},P4=class extends W{static[D]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}};function uU(e,t){let{name:n,config:r}=tt(e,t);return new j4(n,r)}var T4=class extends ee{static[D]="PgVectorBuilder";constructor(t,n){super(t,"array","PgVector"),this.config.dimensions=n.dimensions}build(t){return new H4(t,this.config)}},H4=class extends W{static[D]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(t){return JSON.stringify(t)}mapFromDriverValue(t){return t.slice(1,-1).split(",").map(n=>Number.parseFloat(n))}};function dU(e,t){let{name:n,config:r}=tt(e,t);return new T4(n,r)}function lU(){return{bigint:$G,bigserial:MG,boolean:jG,char:PG,cidr:TG,customType:HG,date:GG,doublePrecision:UG,inet:OG,integer:qG,interval:zG,json:KG,jsonb:qE,line:YG,macaddr:JG,macaddr8:WG,numeric:ZG,point:VG,geometry:eU,real:tU,serial:nU,smallint:aU,smallserial:rU,text:Hi,time:oU,timestamp:zE,uuid:iU,varchar:AU,bit:sU,halfvec:cU,sparsevec:uU,vector:dU}}var G4=Symbol.for("drizzle:PgInlineForeignKeys"),pU=Symbol.for("drizzle:EnableRLS"),Pb=class extends Rn{static[D]="PgTable";static Symbol=Object.assign({},Rn.Symbol,{InlineForeignKeys:G4,EnableRLS:pU});[G4]=[];[pU]=!1;[Rn.Symbol.ExtraConfigBuilder]=void 0;[Rn.Symbol.ExtraConfigColumns]={}};function Pge(e,t,n,r,a=e){let o=new Pb(e,r,a),i=typeof t=="function"?t(lU()):t,A=Object.fromEntries(Object.entries(i).map(([d,l])=>{let m=l;m.setName(d);let p=m.build(o);return o[G4].push(...m.buildForeignKeys(p,o)),[d,p]})),s=Object.fromEntries(Object.entries(i).map(([d,l])=>{let m=l;m.setName(d);let p=m.buildExtraConfigColumn(o);return[d,p]})),u=Object.assign(o,A);return u[Rn.Symbol.Columns]=A,u[Rn.Symbol.ExtraConfigColumns]=s,n&&(u[Pb.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[Pb.Symbol.EnableRLS]=!0,u)})}var mU=(e,t,n)=>Pge(e,t,n,void 0);var KE=class{constructor(t,n){this.unique=t,this.name=n}static[D]="PgIndexBuilderOn";on(...t){return new Tb(t.map(n=>{if(ea(n,$n))return n;n=n;let r=new fm(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),r}),this.unique,!1,this.name)}onOnly(...t){return new Tb(t.map(n=>{if(ea(n,$n))return n;n=n;let r=new fm(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=n.defaultConfig,r}),this.unique,!0,this.name)}using(t,...n){return new Tb(n.map(r=>{if(ea(r,$n))return r;r=r;let a=new fm(r.name,!!r.keyAsName,r.columnType,r.indexConfig);return r.indexConfig=JSON.parse(JSON.stringify(r.defaultConfig)),a}),this.unique,!0,this.name,t)}},Tb=class{static[D]="PgIndexBuilder";config;constructor(t,n,r,a,o="btree"){this.config={name:a,columns:t,unique:n,only:r,method:o}}concurrently(){return this.config.concurrently=!0,this}with(t){return this.config.with=t,this}where(t){return this.config.where=t,this}build(t){return new U4(this.config,t)}},U4=class{static[D]="PgIndex";config;constructor(t,n){this.config={...t,table:n}}};function gU(e){return new KE(!1,e)}function fU(e){return new KE(!0,e)}var bU=e=>zE(e,{withTimezone:!0}),hU=c.enum(["channel","dm","group","local_conversation","thread","web_session"]),iMe=mU("junior_destinations",{id:Hi("id").primaryKey(),provider:Hi("provider").notNull(),providerTenantId:Hi("provider_tenant_id").notNull().default(""),providerDestinationId:Hi("provider_destination_id").notNull(),kind:Hi("kind").$type().notNull(),parentDestinationId:Hi("parent_destination_id"),displayName:Hi("display_name"),visibility:Hi("visibility").$type().notNull().default("unknown"),metadata:qE("metadata_json"),createdAt:bU("created_at").notNull(),updatedAt:bU("updated_at").notNull()},e=>[fU("junior_destinations_provider_destination_uidx").on(e.provider,e.providerTenantId,e.providerDestinationId),gU("junior_destinations_provider_kind_idx").on(e.provider,e.kind)]);var Tge=c.object({error:c.string().min(1)}).strict(),K4=c.object({closed:c.number().int().nonnegative(),costUsd:c.number().nonnegative().optional(),created:c.number().int().nonnegative(),medianCostUsd:c.number().nonnegative().optional(),medianMergeTimeMs:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),open:c.number().int().nonnegative()}).strict(),Hge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),Ld=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),date:Hge,merged:c.number().int().nonnegative()}).strict(),yU=c.object({closed:c.number().int().nonnegative(),created:c.number().int().nonnegative(),id:c.string().uuid(),medianCostUsd:c.number().nonnegative().optional(),merged:c.number().int().nonnegative(),mergeRate:c.number().min(0).max(1).optional(),name:c.string().min(1),open:c.number().int().nonnegative(),provider:c.string().min(1),url:c.string().url().optional()}).strict(),CU=c.object({closedAt:c.string().optional(),id:c.string().uuid(),mergedAt:c.string().optional(),number:c.number().int().positive(),openedAt:c.string(),provider:c.string().min(1),repository:c.string().min(1),state:Nb,title:c.string().optional(),url:c.string().url().optional()}).strict(),Y4=c.object({activityDays:c.array(Ld),activityHours:c.array(Ld).optional(),activitySixHours:c.array(Ld).optional(),changes:c.array(CU),generatedAt:c.string(),repositories:c.array(yU),summary:K4,windowEnd:c.string(),windowStart:c.string()}).strict(),J4=c.object({activityDays:c.array(Ld),activityHours:c.array(Ld).optional(),activitySixHours:c.array(Ld).optional(),generatedAt:c.string(),summary:K4,windowEnd:c.string(),windowStart:c.string()}).strict(),JE=c.object({active:c.number(),conversations:c.number(),date:c.string(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict();var Gge=c.object({locationId:c.string().min(1)}).strict(),wU=Sd.extend({id:c.string(),firstSeenAt:c.string(),kind:hU,lastSeenAt:c.string(),provider:c.string(),providerDestinationId:c.string(),visibility:c.literal("public")}).strict(),Uge=Sd.extend({actor:Fd}).strict(),Oge=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),WE=c.object({date:Oge,privateConversations:c.number(),publicConversations:c.number()}).strict(),W4=c.object({activityDays:c.array(WE),activityHours:c.array(WE).optional(),activitySixHours:c.array(WE).optional(),generatedAt:c.string(),locations:c.array(wU),privateActivity:Sd,source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),Z4=wU.extend({activityDays:c.array(JE),activityHours:c.array(JE).optional(),activitySixHours:c.array(JE).optional(),actors:c.array(Uge),generatedAt:c.string(),recentConversations:c.array(gm),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),qge=c.object({email:c.string().trim().min(1)}).strict(),BU=Sd.omit({costUsd:!0}),EU=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),O4=c.object({active:c.number(),conversations:c.number(),costUsd:c.number().optional(),date:EU,durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),q4=c.object({activePeople:c.number(),conversations:c.number(),date:EU}).strict(),kU=c.object({active:c.number(),activeDays:c.number(),conversations:c.number(),durationMs:c.number(),failed:c.number(),tokens:c.number().optional()}).strict(),YE=c.object({conversations:c.number().int().nonnegative(),costUsd:c.number().finite().nonnegative(),durationMs:c.number().finite().nonnegative(),priorCostUsd:c.number().finite().nonnegative()}).strict(),zge=c.object({1:YE,7:YE,30:YE,90:YE}).strict(),QU=Fd.extend({email:c.string().min(1)}).strict(),Kge=kU.extend({firstSeenAt:c.string(),lastSeenAt:c.string(),actor:QU,windows:zge}).strict(),V4=c.object({activityDays:c.array(q4),activityHours:c.array(q4).optional(),activitySixHours:c.array(q4).optional(),generatedAt:c.string(),people:c.array(Kge),source:c.literal("conversation_index"),windowEnd:c.string(),windowStart:c.string()}).strict(),X4=c.object({activityDays:c.array(O4),activityHours:c.array(O4).optional(),activitySixHours:c.array(O4).optional(),generatedAt:c.string(),locations:c.array(BU),recentConversations:c.array(gm),actor:QU,source:c.literal("conversation_index"),surfaces:c.array(BU),totals:kU,windowEnd:c.string(),windowStart:c.string()}).strict(),e9=c.object({generatedAt:c.string(),sevenDaysUsd:c.number().finite().nonnegative(),source:c.literal("conversation_index"),thirtyDaysUsd:c.number().finite().nonnegative(),windowEnd:c.string(),windowStart:c.string()}).strict(),t9=c.object({id:c.string().uuid(),name:c.string(),tokenSuffix:c.string(),createdAt:c.string().datetime(),expiresAt:c.string().datetime(),lastUsedAt:c.string().datetime().nullable()}).strict(),n9=c.object({tokens:c.array(t9)}).strict(),Yge=c.object({name:c.string().trim().min(1).max(80)}).strict(),a9=t9.extend({token:c.string().startsWith("jr_pat_")}).strict(),Jge=c.object({id:c.string().uuid()}).strict(),Wge=c.object({revoked:c.literal(!0)}).strict(),Zge=c.object({channelId:c.string().min(1),label:c.string().min(1),teamId:c.string().min(1),visibility:c.enum(["private","public"])}).strict(),vU=c.object({1:c.number().int().nonnegative(),7:c.number().int().nonnegative(),30:c.number().int().nonnegative(),90:c.number().int().nonnegative()}).strict(),IU=c.object({createdAt:c.string().datetime(),createdBy:c.string().min(1),createdByEmail:c.string().trim().email().optional(),destination:Zge,id:c.string().min(1),instruction:c.string().min(1),lastConversationId:c.string().min(1).optional(),lastRunAt:c.string().datetime().optional(),ownedByViewer:c.boolean(),runs:vU,outcomes:c.array(UH).max(5),title:c.string().min(1),totalRuns:c.number().int().nonnegative()}),_U=IU.extend({kind:c.literal("scheduled"),nextRunAt:c.string().datetime().optional(),schedule:c.string().min(1),status:c.enum(["active","blocked","completed"])}).strict(),xU=IU.extend({events:c.array(c.string().min(1)).min(1),kind:c.literal("event"),resource:c.string().min(1),source:c.string().min(1),triggerAvailable:c.boolean()}).strict(),r9=c.discriminatedUnion("kind",[_U,xU]),DU=c.string().regex(/^\d{4}-\d{2}-\d{2}(T\d{2})?$/),z4=c.object({costUsd:c.number().finite().nonnegative(),date:DU,event:c.number().int().nonnegative(),scheduled:c.number().int().nonnegative()}).strict(),Vge=c.object({q:c.string().trim().max(200).optional()}).strict(),o9=c.object({executionDays:c.array(z4),executionHours:c.array(z4).optional(),executionSixHours:c.array(z4).optional(),automations:c.array(r9),truncated:c.boolean()}).strict(),Xge=c.object({id:c.string().min(1),kind:c.enum(["scheduled","event"])}).strict(),FU=c.enum(["blocked","completed","failed"]),i9=c.object({conversationId:c.string().min(1).optional(),costUsd:c.number().finite().nonnegative().optional(),durationMs:c.number().finite().nonnegative().optional(),executedAt:c.string().datetime(),executionId:c.string().min(1),status:FU,title:c.string().min(1).optional(),totalTokens:c.number().int().nonnegative().optional()}).strict(),ZE=c.object({blocked:c.number().int().nonnegative(),completed:c.number().int().nonnegative(),date:DU,failed:c.number().int().nonnegative()}).strict(),A9=c.object({executionDays:c.array(ZE),executionHours:c.array(ZE).optional(),executionSixHours:c.array(ZE).optional(),executions:c.array(i9),automation:r9,truncated:c.boolean()}).strict(),SU=i9.extend({kind:c.enum(["scheduled","event"]),automationId:c.string().min(1),automationTitle:c.string().min(1)}).strict(),s9=c.object({runs:c.array(SU),truncated:c.boolean()}).strict(),efe=c.object({provider:c.string(),repo:c.string()}).strict(),NU=c.object({provider:c.string(),repo:c.string(),checkoutPath:c.string()}).strict(),tfe=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),sizeBytes:c.number().int().nonnegative().nullable()}).strict(),LU=c.object({id:c.string(),generatedAt:c.iso.datetime(),buildDurationMs:c.number().int().nonnegative(),dependencyCount:c.number().int().nonnegative()}).strict(),ym=c.object({id:c.string().uuid(),name:c.string(),setupScript:c.string(),repos:c.array(NU),snapshot:tfe.nullable()}).strict(),c9=c.object({baselineSnapshot:LU.nullable(),workspaces:c.array(ym)}).strict(),nfe=c.object({name:c.string(),setupScript:c.string().optional(),repos:c.array(efe)}).strict(),afe=c.object({id:c.string().uuid()}).strict(),rfe=c.object({deleted:c.literal(!0)}).strict(),RU=c.object({count:c.number().int().nonnegative(),date:c.string(),metric:c.string().min(1),name:c.string().min(1),namespace:c.string().min(1)}).strict(),u9=c.object({generatedAt:c.string().datetime(),stats:c.array(RU),windowEnd:c.string(),windowStart:c.string()}).strict();var Fo=c.string().trim().min(1).max(160),Cm=c.number().int().nonnegative(),ofe=c.discriminatedUnion("type",[c.strictObject({type:c.literal("code_change"),author:Fo.optional(),sourceBranch:Fo.optional(),targetBranch:Fo.optional(),reviewers:c.array(Fo).max(5).optional(),review:c.enum(["required","approved","changes_requested"]).optional(),checks:c.strictObject({passed:Cm,failed:Cm,pending:Cm}).optional(),mergeable:c.boolean().optional(),changedFiles:Cm.optional(),additions:Cm.optional(),deletions:Cm.optional()}),c.strictObject({type:c.literal("task"),assignees:c.array(Fo).max(5).optional(),priority:Fo.optional(),project:Fo.optional(),cycle:Fo.optional(),dueDate:c.iso.date().optional(),labels:c.array(Fo).max(5).optional()}),c.strictObject({type:c.literal("deployment"),project:Fo.optional(),environment:Fo.optional(),revision:Fo.optional(),branch:Fo.optional()})]);function MU(e){if(!e)return[];let t=[],n=a=>a?.length?`${a.join(", ")}${a.length===5?" (up to 5 shown)":""}`:void 0;function r(a,o,i){i!==void 0&&i!==""&&t.push({key:a,label:o,value:String(i)})}switch(e.type){case"code_change":{let a={required:"Review required",approved:"Approved",changes_requested:"Changes requested"};r("review","Review",e.review&&a[e.review]);let o=e.checks;r("checks","Checks",o&&`${o.failed} failed \xB7 ${o.pending} pending \xB7 ${o.passed} passed`),r("author","Author",e.author),r("reviewers","Requested reviewers",n(e.reviewers)),r("mergeable","Conflicts",e.mergeable===void 0?void 0:e.mergeable?"No conflicts":"Has conflicts"),r("sourceBranch","From",e.sourceBranch),r("targetBranch","Into",e.targetBranch);break}case"task":r("assignees","Assignees",e.assignees?.length===0?"Unassigned":n(e.assignees)),r("priority","Priority",e.priority),r("project","Project",e.project),r("cycle","Cycle",e.cycle),r("dueDate","Due",e.dueDate),r("labels","Labels",n(e.labels));break;case"deployment":r("environment","Environment",e.environment),r("project","Project",e.project),r("revision","Revision",e.revision),r("branch","Branch",e.branch);break}return t.slice(0,4)}var XE=c.enum(["task","code_change","automation","deployment","item"]),ife={task:"Ticket",code_change:"Code change",automation:"Automation",deployment:"Deployment",item:"Item"};function si(e){let t=e.objectType==="item"&&e.facts?.type==="deployment"?"deployment":e.objectType,n=e.status?.toLowerCase(),r={task:"issue-opened",code_change:"git-pull-request",automation:"workflow",deployment:"rocket",item:"package"}[t],a=t==="automation"?"info":"neutral";return t==="code_change"?(n==="draft"&&(r="git-pull-request-draft"),n==="closed"&&(r="git-pull-request-closed",a="danger"),n==="merged"&&(r="git-merge",a="accent"),n==="open"&&(a="success")):t==="task"?(n==="closed"&&(r="issue-closed",a="accent"),n==="open"&&(a="success")):t==="deployment"&&((n==="ready"||n==="succeeded")&&(a="success"),(n==="error"||n==="failed")&&(a="danger"),(n==="building"||n==="in_progress")&&(a="info")),(n==="warning"||n==="blocked")&&(a="warning"),{icon:r,tone:a,label:ife[t]}}function jU(e){return`/_junior/dashboard/object-icons/v1/${e}.png`}var l9=c.object({kind:c.literal("object"),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),objectType:XE,title:c.string().trim().min(1).max(512),url:c.url().max(2048).refine(e=>["http:","https:"].includes(new URL(e).protocol)).nullable(),description:c.string().max(4e3).optional(),status:c.string().trim().min(1).max(100).optional(),trigger:c.string().max(4e3).optional(),warning:c.string().max(1e3).optional(),displayType:c.string().trim().min(1).max(80).optional(),sourceUpdatedAt:c.iso.datetime({offset:!0}).optional(),facts:ofe.refine(e=>new TextEncoder().encode(JSON.stringify(e)).length<=4096,"Object facts must not exceed 4 KiB").optional()}).strict().refine(e=>!e.facts||(e.facts.type==="deployment"?e.objectType==="deployment"||e.objectType==="item":e.facts.type===e.objectType),"Object facts must match the object type"),kMe=l9.safeExtend({plugin:c.string().min(1)}),PU={"issue-opened":["M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z","M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"],"issue-closed":["M11.28 6.78a.75.75 0 0 0-1.06-1.06L7.25 8.69 5.78 7.22a.75.75 0 0 0-1.06 1.06l2 2a.75.75 0 0 0 1.06 0l3.5-3.5Z","M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0Zm-1.5 0a6.5 6.5 0 1 0-13 0 6.5 6.5 0 0 0 13 0Z"],"git-pull-request":["M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"],"git-pull-request-draft":["M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 14a2.25 2.25 0 1 1 0-4.5 2.25 2.25 0 0 1 0 4.5ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM14 7.5a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Zm0-4.25a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0Z"],"git-pull-request-closed":["M3.25 1A2.25 2.25 0 0 1 4 5.372v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.251 2.251 0 0 1 3.25 1Zm9.5 5.5a.75.75 0 0 1 .75.75v3.378a2.251 2.251 0 1 1-1.5 0V7.25a.75.75 0 0 1 .75-.75Zm-2.03-5.273a.75.75 0 0 1 1.06 0l.97.97.97-.97a.748.748 0 0 1 1.265.332.75.75 0 0 1-.205.729l-.97.97.97.97a.751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018l-.97-.97-.97.97a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734l.97-.97-.97-.97a.75.75 0 0 1 0-1.06ZM2.5 3.25a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0ZM3.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm9.5 0a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"],"git-merge":["M5.45 5.154A4.25 4.25 0 0 0 9.25 7.5h1.378a2.251 2.251 0 1 1 0 1.5H9.25A5.734 5.734 0 0 1 5 7.123v3.505a2.25 2.25 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.95-.218ZM4.25 13.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm8.5-4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM5 3.25a.75.75 0 1 0 0 .005V3.25Z"],workflow:["M0 1.75C0 .784.784 0 1.75 0h3.5C6.216 0 7 .784 7 1.75v3.5A1.75 1.75 0 0 1 5.25 7H4v4a1 1 0 0 0 1 1h4v-1.25C9 9.784 9.784 9 10.75 9h3.5c.966 0 1.75.784 1.75 1.75v3.5A1.75 1.75 0 0 1 14.25 16h-3.5A1.75 1.75 0 0 1 9 14.25v-.75H5A2.5 2.5 0 0 1 2.5 11V7h-.75A1.75 1.75 0 0 1 0 5.25Zm1.75-.25a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Zm9 9a.25.25 0 0 0-.25.25v3.5c0 .138.112.25.25.25h3.5a.25.25 0 0 0 .25-.25v-3.5a.25.25 0 0 0-.25-.25Z"],rocket:["M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"],package:["m8.878.392 5.25 3.045c.54.314.872.89.872 1.514v6.098a1.75 1.75 0 0 1-.872 1.514l-5.25 3.045a1.75 1.75 0 0 1-1.756 0l-5.25-3.045A1.75 1.75 0 0 1 1 11.049V4.951c0-.624.332-1.201.872-1.514L7.122.392a1.75 1.75 0 0 1 1.756 0ZM7.875 1.69l-4.63 2.685L8 7.133l4.755-2.758-4.63-2.685a.248.248 0 0 0-.25 0ZM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432Zm6.25 8.271 4.625-2.683a.25.25 0 0 0 .125-.216V5.677L8.75 8.432Z"]};function Afe(e){try{let t=new URL(e).protocol;return t==="http:"||t==="https:"}catch{return!1}}var sfe=c.object({kind:c.literal("resource_link"),objectType:XE.optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256),url:c.string().url().max(2048).refine(Afe,"URL must use HTTP or HTTPS."),description:c.string().trim().min(1).max(512).optional(),status:c.enum(["open","draft","closed","merged","warning"]).optional()}).strict(),vMe=c.discriminatedUnion("kind",[sfe,l9]),cfe=c.enum(["circle-dot","circle-dashed","circle-x","git-merge","git-pull-request","triangle-alert"]),IMe=c.object({icon:cfe.optional(),objectType:XE.optional(),status:c.string().trim().min(1).max(100).optional(),key:c.string().trim().min(1).max(256),label:c.string().trim().min(1).max(256)}).strict(),ufe=c.enum(["closed","merged","open"]),xMe=c.object({closedAt:c.date().optional(),conversationIds:c.array(c.string().min(1)).default([]),mergedAt:c.date().optional(),number:c.number().int().positive(),openedAt:c.date(),providerId:c.string().min(1),repository:c.object({name:c.string().min(1),providerId:c.string().min(1),url:c.string().url().optional()}).strict(),state:ufe,title:c.string().min(1).optional(),updatedAt:c.date(),url:c.string().url().optional()}).strict(),FMe=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_]*$/),dfe=c.enum(["activity","brain","calendar","check","database","info","key","link","sparkles","warning"]),lfe=c.object({content:c.string().min(1).max(32*1024).optional(),description:c.string().trim().min(1).max(2e3).optional(),metadata:c.array(c.string().trim().min(1).max(120)).max(8).optional(),title:c.string().trim().min(1).max(4e3)}).strict(),SMe=c.object({details:c.array(lfe).max(100).optional(),icon:dfe.optional(),preview:c.string().trim().min(1).max(500).optional(),title:c.string().trim().min(1).max(120)}).strict();var ek=c.string().regex(/^T[A-Z0-9]+$/),p9=c.string().regex(/^(C|G|D)[A-Z0-9]+$/),TU=c.string().regex(/^local:[a-z0-9_-]+:[a-z0-9][a-z0-9_-]*$/),pfe=c.string().min(1).refine(e=>e===e.trim()&&e.toLowerCase()!=="unknown"),VE=pfe,Ce=c.string().refine(e=>e.trim().length>0),ur=Ce.refine(e=>e===e.trim()),mfe=c.object({id:Ce,provider:ur}).strict(),gfe=mfe.extend({provider:c.literal("slack"),teamId:ek,channelId:p9,threadTs:ur.optional()}).strict(),LMe=c.discriminatedUnion("provider",[gfe]),RMe=c.enum(["slack","local"]),HU=c.enum(["public","private"]),ffe=c.enum(["public","private"]),bfe=c.object({platform:c.literal("slack"),teamId:ek,channelId:p9,threadTs:ur.optional()}).strict(),m9=bfe,hfe=c.object({platform:c.literal("local"),conversationId:TU}).strict(),Bfe=c.discriminatedUnion("platform",[m9,hfe]),$Me=c.object({action:c.literal("send_message"),destination:m9}).strict(),yfe=c.object({kind:c.literal("slack"),teamId:ek,channelId:p9,visibility:HU,messageTs:Ce.optional(),threadTs:Ce.optional()}).strict(),Cfe=c.object({kind:c.literal("local"),visibility:c.literal("private"),conversationId:TU}).strict(),wfe=c.object({kind:c.literal("web"),visibility:HU,conversationId:ur}).strict(),Efe=c.object({kind:c.literal("event"),eventKey:ur,eventType:ur,identifier:ur,namespace:ur}).strict(),kfe=c.object({kind:c.literal("scheduled_automation")}).strict(),Qfe=c.object({kind:c.literal("event_automation")}).strict(),vfe=c.object({kind:c.literal("plugin_dispatch")}).strict(),Ife=c.object({kind:c.literal("agent_invocation")}).strict(),_fe=c.discriminatedUnion("kind",[yfe,Cfe,wfe,Efe,kfe,Qfe,vfe,Ife]);function xfe(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e;if("kind"in t){let o={event_task:"event_automation",resource_event:"event",scheduled_task:"scheduled_automation"},i=typeof t.kind=="string"?o[t.kind]:void 0;return i?{...t,kind:i}:e}if(t.platform!=="slack"&&t.platform!=="local"&&t.platform!=="web")return e;let{location:n,platform:r,...a}=t;return{...a,kind:r}}var Dfe=c.preprocess(xfe,_fe),Ffe=c.discriminatedUnion("allowedWhen",[c.object({type:c.literal("user"),userId:VE,allowedWhen:c.literal("private-direct-conversation")}).strict(),c.object({type:c.literal("user"),userId:VE,allowedWhen:c.literal("scheduled-automation"),taskId:ur}).strict()]),g9={email:Ce.optional(),fullName:Ce.optional(),userId:VE,userName:Ce.optional()},Sfe=c.object({...g9,platform:c.literal("slack"),teamId:ek}).strict(),Nfe=c.object({...g9,platform:c.literal("local")}).strict(),Lfe=c.object({...g9,platform:c.literal("web")}).strict(),Rfe=c.object({platform:c.literal("system"),name:VE}).strict(),d9=c.discriminatedUnion("platform",[Sfe,Nfe,Lfe,Rfe]),$fe=c.object({displayName:Ce.optional(),handle:Ce.optional(),id:ur,provider:ur,providerSubjectId:ur,providerTenantId:ur.optional()}).strict(),MMe=c.object({displayName:Ce.optional(),email:Ce.max(320),id:ur,identities:c.array($fe).max(100)}).strict(),Mfe=c.record(c.string(),c.string()).superRefine((e,t)=>{let n=Object.entries(e);if(n.length>20){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata has too many keys"});return}for(let[r,a]of n){if(!r.trim()){t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be strings",path:[r]});continue}r.length>128&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata key exceeds the maximum length",path:[r]}),/[\r\n]/.test(r)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata keys must be single-line strings",path:[r]}),/[\r\n]/.test(a)&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata values must be single-line strings",path:[r]}),a.length>512&&t.addIssue({code:c.ZodIssueCode.custom,message:"Dispatch metadata value exceeds the maximum length",path:[r]})}}),jfe=c.object({label:ur.pipe(c.string().max(48)).refine(e=>!/[\r\n]/.test(e)),detail:ur.pipe(c.string().max(128)).refine(e=>!/[\r\n]/.test(e)).optional()}).strict(),jMe=c.object({idempotencyKey:Ce.pipe(c.string().max(512)),credentialSubject:Ffe.optional(),destination:m9,destinationVisibility:ffe,input:Ce.pipe(c.string().max(32e3)),metadata:Mfe.optional(),replyAttribution:jfe.optional()}).strict();var Pfe=c.string().trim().min(1).max(64).regex(/^[a-z][a-z0-9_-]*$/),TMe=c.object({text:c.string().trim().min(1).max(8e3)}).strict(),HMe=c.object({kind:Pfe,version:c.number().int().positive(),content:c.record(c.string(),c.unknown())}).strict();var Tfe=4e3,Hfe=8e3,wm=32,$U=4e3,Gfe=1e3,Ufe=c.record(c.string(),c.unknown()).superRefine((e,t)=>{Object.keys(e).length>wm&&t.addIssue({code:"custom",message:`Event data may include at most ${wm} keys.`}),new TextEncoder().encode(JSON.stringify(e)).byteLength>$U&&t.addIssue({code:"custom",message:`Event data may be at most ${$U} JSON bytes.`})}),Rd=c.string().regex(/^[a-z][a-z0-9_-]*(?:\.[a-z][a-z0-9_-]*)+$/).describe("Canonical dotted event type, such as issue.closed or pull_request.review.changes_requested."),GU=c.string().regex(/^[a-z][a-z0-9_]*$/).describe("Canonical plugin-defined resource type, such as issue or pull_request."),UU=/^[a-z][a-zA-Z0-9]*$/,Ofe=c.object({kind:c.enum(["boolean","string","number"]),description:c.string().trim().min(1).max(200),enum:c.array(c.string().min(1)).min(1).optional()}).strict().superRefine((e,t)=>{e.enum&&e.kind!=="string"&&t.addIssue({code:"custom",message:'Event match field enum requires kind "string".',path:["enum"]})}),qfe=c.record(c.string().regex(UU),Ofe).superRefine((e,t)=>{Object.keys(e).length>wm&&t.addIssue({code:"custom",message:`Event match keys may include at most ${wm} keys.`})}),UMe=c.record(c.string().regex(UU),c.union([c.boolean(),c.number().finite(),c.string().min(1),c.array(c.union([c.number().finite(),c.string().min(1)])).min(1)])).superRefine((e,t)=>{Object.keys(e).length>wm&&t.addIssue({code:"custom",message:`Event match may include at most ${wm} keys.`});for(let[n,r]of Object.entries(e))Array.isArray(r)&&r.some(a=>typeof a=="boolean")&&t.addIssue({code:"custom",message:`Event match field "${n}" cannot use a boolean list.`,path:[n]})});var zfe=c.object({type:GU,supportedEvents:c.array(Rd).min(1),suggestedEvents:c.array(Rd).optional(),matchFields:qfe.optional(),guidance:c.record(Rd,c.string().trim().min(1).max(Gfe)).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.supportedEvents.forEach((a,o)=>{n.has(a)&&t.addIssue({code:"custom",message:`Duplicate supported event type "${a}".`,path:["supportedEvents",o]}),n.add(a)});for(let a of Object.keys(e.guidance??{}))n.has(a)||t.addIssue({code:"custom",message:`Guidance event type "${a}" is not supported.`,path:["guidance",a]});let r=new Set;e.suggestedEvents?.forEach((a,o)=>{r.has(a)&&t.addIssue({code:"custom",message:`Duplicate suggested event type "${a}".`,path:["suggestedEvents",o]}),n.has(a)||t.addIssue({code:"custom",message:`Suggested event type "${a}" is not supported.`,path:["suggestedEvents",o]}),r.add(a)})}),OMe=c.object({resourceTypes:c.array(zfe).min(1),isEnabled:c.function({input:[],output:c.boolean()}).optional(),normalizeIdentifier:c.function({input:[c.string()],output:c.string()}).optional()}).strict().superRefine((e,t)=>{let n=new Set;e.resourceTypes.forEach((r,a)=>{n.has(r.type)&&t.addIssue({code:"custom",message:`Duplicate resource type "${r.type}".`,path:["resourceTypes",a,"type"]}),n.add(r.type)})});var qMe=c.object({identifier:c.string().min(1),label:c.string().min(1),namespace:c.string().min(1),suggestedEvents:c.array(Rd).optional(),supportedEvents:c.array(Rd),type:GU}).strict(),zMe=c.object({events:c.array(Rd).min(1),id:c.string().min(1)}).strict(),Kfe=c.object({objectType:XE.optional(),eventKey:c.string().min(1),eventType:Rd,identifier:c.string().min(1),occurredAtMs:c.number().finite(),terminal:c.boolean().optional(),trustedSummary:c.string().min(1).transform(e=>e.slice(0,Tfe)),data:Ufe.optional(),untrustedText:c.string().transform(e=>e.slice(0,Hfe)).optional()}).strict(),KMe=Kfe.extend({namespace:c.string().min(1)}),Yfe=c.object({authority:c.enum(["instruction","context"]),actor:d9.optional()}).strict(),Jfe=c.discriminatedUnion("type",[c.object({type:c.literal("message"),role:c.enum(["user","assistant"]),text:c.string().min(1),provenance:Yfe.optional(),isRunActor:c.boolean().optional()}).strict(),c.object({type:c.literal("toolResult"),toolName:c.string().min(1),isError:c.boolean(),text:c.string().min(1).optional()}).strict()]),JMe=c.object({actorUserId:c.string().min(1).optional(),completedAtMs:c.number().finite(),conversationId:c.string().min(1),destination:Bfe,locationId:c.string().min(1).optional(),actors:c.array(d9),actor:d9.optional(),runId:c.string().min(1),source:Dfe,transcript:c.array(Jfe)}).strict();var ZMe=c.discriminatedUnion("type",[c.object({type:c.literal("text"),text:c.string()}).strict(),c.object({type:c.literal("image"),data:c.string(),mimeType:c.string()}).strict()]),Wfe=c.object({arguments:c.record(c.string(),c.unknown()),reason:c.string().min(1).optional()}).strict(),VMe=c.object({objectAnnotations:c.array(l9).optional(),target:c.string().min(1).optional(),truncated:c.boolean().optional(),continuation:Wfe.optional()}).passthrough(),XMe=c.enum(["auto","review","approve"]);var tje=c.object({auth:c.object({user:c.object({email:c.string().nullable().optional(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),pluginName:Ce}).strict(),Zfe=c.string().regex(/^[a-z][a-z0-9-]*$/),Vfe=c.string().regex(/^[a-z][a-z0-9.-]*$/),Xfe=c.union([c.literal("read"),c.literal("write")]),OU=c.object({provider:Zfe,scope:Ce.optional(),type:c.literal("oauth")}).strict(),qU=c.object({displayName:Ce.optional(),handle:Ce.optional(),id:Ce,label:Ce.optional(),url:Ce.optional()}).strict(),aje=c.object({account:qU.optional(),accessToken:Ce,expiresAt:c.number().finite().optional(),refreshToken:Ce,refreshTokenExpiresAt:c.number().finite().optional(),scope:Ce.optional()}).strict(),rje=c.object({access:Xfe,leaseScope:Ce.optional(),name:Vfe,reason:Ce.optional(),requirements:c.array(Ce).min(1).optional()}).strict(),ebe=c.object({domain:c.string().min(1),headers:c.record(c.string(),c.string()).refine(e=>Object.keys(e).length>0)}).strict(),tbe=c.object({account:qU.optional(),authorization:OU.optional(),expiresAt:c.string().refine(e=>Number.isFinite(Date.parse(e))),headerTransforms:c.array(ebe).min(1)}).strict(),oje=c.discriminatedUnion("type",[c.object({lease:tbe,type:c.literal("lease")}).strict(),c.object({authorization:OU.optional(),message:Ce,type:c.literal("needed")}).strict(),c.object({message:Ce,type:c.literal("unavailable")}).strict()]);var nbe=Ce.max(64).regex(/^[a-z][a-z0-9-]*$/),abe=Ce.max(80),rbe=Ce.max(500),obe=c.enum(["primary","profile"]),ibe=c.object({detail:Ce.max(500).optional(),label:Ce.max(80),tone:c.enum(["good","neutral","warning"]).optional(),value:Ce.max(120)}).strict(),Abe=c.object({label:Ce.max(80),value:Ce.max(500)}).strict(),sbe=c.object({confirmation:Ce.max(500).optional(),href:Ce.max(500).regex(/^\/api\/plugins\/[a-z][a-z0-9-]*(?:\/|$)/),label:Ce.max(80),method:c.literal("DELETE"),tone:c.enum(["danger","neutral"]).optional()}).strict(),cbe=c.object({actions:c.array(sbe).max(4).optional(),description:Ce.max(1e3).optional(),id:Ce.max(128),metadata:c.array(Abe).max(8).optional(),title:Ce.max(4e3)}).strict(),zU=c.object({emptyText:Ce.max(500).optional(),metrics:c.array(ibe).max(6).optional(),nextCursor:Ce.max(1e3).optional(),records:c.array(cbe).max(100),searchPlaceholder:Ce.max(120).optional(),type:c.literal("list")}).strict(),ube=c.object({description:rbe,id:nbe,label:abe,navigation:obe,pluginDisplayName:Ce.max(200),pluginName:Ce.max(100)}).strict(),KU=c.array(ube),dbe=Ce.max(1e3).optional(),lbe=Ce.max(64).optional(),pbe=c.string().trim().max(200).optional(),Aje=c.object({cursor:dbe,filter:lbe,limit:c.number().int().min(1).max(50),query:pbe}).strict();var tk=c.object({user:c.object({email:c.string().trim().email(),emailVerified:c.boolean().optional(),name:c.string().nullable().optional()}).strict()}).strict(),uje=c.object({displayName:c.string().trim().min(1).max(80)}).strict(),YU=c.object({allowedEmailCount:c.number(),allowedGoogleDomainCount:c.number(),authRequired:c.boolean(),authPath:c.string(),basePath:c.string(),componentGallery:c.boolean(),sentryConversationLinks:c.boolean(),timeZone:c.string().optional(),version:c.string().min(1)}).strict();var Hb=C(U(),1);var JU="x-junior-version";var f9="junior:dashboard-version";function WU(e){let t=e.headers.get(JU)?.trim();!t||typeof window>"u"||window.dispatchEvent(new CustomEvent(f9,{detail:t}))}function ZU(e){let[t,n]=(0,Hb.useState)(e);return(0,Hb.useEffect)(()=>{e&&n(e)},[e]),(0,Hb.useEffect)(()=>{let r=a=>{n(a.detail)};return window.addEventListener(f9,r),()=>window.removeEventListener(f9,r)},[]),t}var Ts=class extends Error{status;apiError;constructor(t,n,r){super(`${t} returned ${n}`),this.status=n,r?.trim()&&(this.apiError=r.trim())}};async function $d(e,t){let n;try{let r=await t.json();typeof r.error=="string"&&(n=r.error)}catch{}throw new Ts(e,t.status,n)}function Em(){if(typeof window>"u")return;let e=window.__JUNIOR_DASHBOARD_BASE_PATH__??"/",t=e==="/"?"/auth/login":`${e}/auth/login`;if(window.location.pathname!==t){let n=`${window.location.pathname}${window.location.search||""}`,r=new URLSearchParams;n!=="/"&&r.set("next",n);let a=r.toString();window.location.assign(a?`${t}?${a}`:t)}}async function nk(e,t,n){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PATCH"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function Md(e,t,n){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"POST"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function VU(e,t,n){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"PUT"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function Au(e){let t=await km(e,{credentials:"same-origin",method:"DELETE"});t.status===401&&Em(),t.ok||await $d(e,t)}async function XU(e,t,n={}){let r=await km(t,{body:JSON.stringify(n),credentials:"same-origin",headers:{"content-type":"application/json"},method:"DELETE"});return r.status===401&&Em(),r.ok||await $d(t,r),e.parse(await r.json())}async function km(e,t){let n=await fetch(e,t);return WU(n),n}async function He(e,t,n){let r=await km(t,{credentials:"same-origin",...n?{signal:n}:void 0});return r.status===401&&(Em(),await $d(t,r)),r.ok||await $d(t,r),e.parse(await r.json())}var ak=5*6e4,b9=5*6e4,mbe=1e3;function gbe(e,t=Date.now()){if(!e)return b9;let n=Date.parse(e);if(!Number.isFinite(n))return b9;let r=Math.max(0,t-n);return Math.max(mbe,b9-r)}function eO(){return qe({queryKey:["dashboard","core"],queryFn:async({signal:e})=>{let[t,n]=await Promise.all([He(tk,"/api/me",e),He(YU,"/api/config",e)]);return{config:n,me:t}},retry:!1,staleTime:ak})}function fbe(){return qe({queryKey:["dashboard","plugins"],queryFn:({signal:e})=>He(z2,"/api/plugins",e),retry:!1,staleTime:ak})}function tO(){return qe({queryKey:["dashboard","plugin-user-pages"],queryFn:({signal:e})=>He(KU,"/api/user-pages",e),retry:!1,staleTime:ak})}function rk(e=""){return qe({queryKey:["dashboard","conversations","viewer",{search:e}],queryFn:({signal:t})=>He(O2,`/api/conversations${e?`?q=${encodeURIComponent(e)}`:""}`,t),placeholderData:TB,retry:!1})}function nO(){return qe({queryKey:["dashboard","code"],queryFn:({signal:e})=>He(Y4,"/api/code",e),retry:!1})}function aO(e,t){return qe({enabled:e,queryKey:["dashboard","automations",t],queryFn:({signal:n})=>He(o9,`/api/automations${t?`?q=${encodeURIComponent(t)}`:""}`,n),placeholderData:TB,retry:!1})}function rO(e){return qe({enabled:e,queryKey:["dashboard","automations","runs"],queryFn:({signal:t})=>He(s9,"/api/automations/runs",t),retry:!1})}function oO(e,t,n){return qe({enabled:e&&!!(t&&n),queryKey:["dashboard","automations",t,n,"executions"],queryFn:({signal:r})=>He(A9,`/api/automations/${t}/${encodeURIComponent(n)}/executions`,r),retry:!1})}function iO(){return qe({queryKey:["dashboard","people"],queryFn:({signal:e})=>He(V4,"/api/people",e),retry:!1})}function AO(e){return qe({enabled:!!e,queryKey:["dashboard","people",e],queryFn:async({signal:t})=>He(X4,`/api/people/${encodeURIComponent(e)}`,t),retry:!1})}function sO(e){return qe({enabled:!!e,queryKey:["dashboard","people",e,"plugin-reports"],queryFn:({signal:t})=>He(TE,`/api/people/${encodeURIComponent(e)}/plugin-reports`,t),retry:!1})}function cO(e){return qe({enabled:!!e,queryKey:["dashboard","people",e,"code"],queryFn:({signal:t})=>He(J4,`/api/people/${encodeURIComponent(e)}/code`,t),retry:!1})}function uO(e){return qe({enabled:e,queryKey:["dashboard","personal-spend"],queryFn:({signal:t})=>He(e9,"/api/people/me/spend",t),refetchInterval:t=>gbe(t.state.data?.generatedAt),retry:!1,staleTime:0})}function dO(){return qe({queryKey:["dashboard","locations"],queryFn:({signal:e})=>He(W4,"/api/locations",e),retry:!1})}function lO(e){return qe({enabled:!!e,queryKey:["dashboard","locations",e],queryFn:async({signal:t})=>He(Z4,`/api/locations/${encodeURIComponent(e)}`,t),retry:!1})}function bbe(){return qe({queryKey:["dashboard","skills"],queryFn:({signal:e})=>He(Y2,"/api/skills",e),retry:!1,staleTime:ak})}function hbe(){return qe({queryKey:["dashboard","plugin-reports"],queryFn:({signal:e})=>He(TE,"/api/plugin-reports",e),retry:!1})}function pO(){return qe({queryKey:["dashboard","stats"],queryFn:({signal:e})=>He(u9,"/api/stats",e),retry:!1})}function mO(e){let t=fbe(),n=qe({queryKey:["dashboard","conversation-stats"],queryFn:({signal:i})=>He(q2,"/api/conversations/stats",i),retry:!1}),r=bbe(),a=hbe();return{data:t.data&&r.data?{...e,conversationStatsError:!!n.error,...n.data?{conversationStats:n.data}:void 0,conversationStatsLoading:n.isPending,pluginReportsError:!!a.error,...a.data?{pluginReports:a.data}:void 0,pluginReportsLoading:a.isPending,plugins:t.data,skills:r.data}:void 0,error:t.error??r.error,isPending:t.isPending||r.isPending}}var gO=C(U(),1);function ok(){return(0,gO.useSyncExternalStore)(e=>kA.subscribe(e),()=>kA.isOnline(),()=>!0)}var bO=C(w(),1);function fO(){return ok()?null:(0,bO.jsx)("div",{"aria-live":"polite",className:"border-t border-amber-300/15 bg-amber-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-amber-100/80",role:"status",children:"You\u2019re offline. Drafts stay on this device."})}var h9=C(w(),1);function Qm(){return(0,h9.jsx)("div",{className:"relative grid size-10 shrink-0 select-none place-items-center overflow-visible",children:(0,h9.jsx)("img",{alt:"",className:"relative size-11 max-w-none -translate-y-0.5 object-contain opacity-90 drop-shadow-[0_0_7px_rgba(255,255,255,0.16)]",draggable:!1,src:"/_junior/dashboard/avatar.png"})})}var hO=["relative","overflow-hidden","bg-white/15","before:absolute","before:inset-0","before:content-['']","before:bg-[linear-gradient(90deg,#ff4d6d,#ffb703,#56f39a,#4cc9f0,#9b5de5,#ff4d6d)]","before:bg-[length:200%_100%]","before:animate-[junior-rainbow-flow_1.2s_linear_infinite]","motion-reduce:before:animate-none"].join(" ");function k(...e){return e.filter(Boolean).join(" ")}var Mn="mx-auto w-full min-w-0 max-w-screen-xl",jA="text-dashboard-text-muted hover:text-dashboard-text",BO="rounded-xl border border-dashboard-border-interactive bg-dashboard-surface-active",yO="dashboard-shell-bg";var su=C(w(),1);function ta(e){return(0,su.jsx)("div",{className:k(Mn,"grid min-h-[calc(100dvh-5rem)] place-items-center px-4 py-8 md:px-8"),children:(0,su.jsxs)("section",{className:"grid w-full max-w-lg grid-cols-[auto_minmax(0,1fr)] items-center gap-3 rounded-lg border border-dashboard-border-emphasis bg-dashboard-surface-raised p-4",children:[(0,su.jsx)(Qm,{}),(0,su.jsxs)("div",{children:[(0,su.jsx)("div",{className:"font-bold",children:e.label}),(0,su.jsx)("div",{"aria-label":e.label,className:`${hO} mt-3 h-1.5 w-full`,role:"progressbar"})]})]})})}var B9="0.229.0",ik=typeof B9=="string"&&B9.trim()?B9:"unknown";var Gb=C(w(),1);function CO(e){return Bbe(e.serverVersion)?(0,Gb.jsxs)("div",{"aria-live":"polite",className:"flex flex-wrap items-center justify-center gap-x-3 gap-y-1 border-t border-cyan-300/15 bg-cyan-300/[0.07] px-3 py-1.5 text-center font-sans text-xs text-cyan-100/80",role:"status",children:[(0,Gb.jsx)("span",{children:"The dashboard changed. Refresh to load the latest version."}),(0,Gb.jsx)("button",{className:"cursor-pointer border-0 bg-transparent p-0 font-mono font-semibold text-cyan-100 underline decoration-cyan-300/40 underline-offset-2 hover:text-dashboard-text-solid",onClick:()=>window.location.reload(),type:"button",children:"Refresh"})]}):null}function Bbe(e){return!!e&&ik!=="unknown"&&e!=="unknown"&&e!==ik}var wO=C(w(),1);function P(e){let t=e.as??"div",n={none:"",sm:"p-4",md:"p-5 sm:p-6"}[e.padding??"none"],r=e.variant==="section"?"mb-4 border-dashboard-border-subtle bg-dashboard-fill-faint shadow-[0_24px_80px_rgba(0,0,0,0.18)]":e.variant==="raised"?"border-dashboard-border-emphasis bg-dashboard-surface-raised":"border-dashboard-border-subtle bg-dashboard-fill-faint";return(0,wO.jsx)(t,{className:k("min-w-0 overflow-hidden rounded-lg border",r,n,e.className),children:e.children})}var EO=C(w(),1);function Re(e){let t=e.as??"div";return(0,EO.jsx)(t,{"aria-hidden":"true",className:k("animate-pulse rounded bg-dashboard-fill-soft motion-reduce:animate-none",e.className)})}var Le=C(w(),1);function Ja(e){let t=e.variant??"panel";return(0,Le.jsxs)("div",{"aria-busy":"true","aria-live":"polite",className:k("grid gap-4",e.className),role:"status",children:[(0,Le.jsx)("span",{className:"sr-only",children:e.label}),ybe(t)]})}function ybe(e){switch(e){case"stats":return(0,Le.jsx)(Cbe,{});case"overview":return(0,Le.jsx)(wbe,{});case"list":return(0,Le.jsx)(Ebe,{});case"library":return(0,Le.jsx)(kbe,{});case"panel":return(0,Le.jsx)(PA,{className:"min-h-64"})}}function Cbe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:Array.from({length:4},(e,t)=>(0,Le.jsx)(PA,{className:"min-h-[7.5rem] p-4 sm:min-h-32 sm:p-5"},t))}),(0,Le.jsx)(PA,{className:"min-h-[17rem]"})]})}function wbe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,Le.jsx)(PA,{className:"min-h-[17rem]"}),(0,Le.jsx)(PA,{className:"min-h-[17rem]"})]}),(0,Le.jsx)(vm,{className:"h-24 border-y border-dashboard-border-subtle bg-dashboard-fill-faint"}),(0,Le.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,Le.jsx)(PA,{className:"min-h-56"}),(0,Le.jsx)(PA,{className:"min-h-56"})]})]})}function Ebe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(PA,{className:"min-h-20 p-4"}),(0,Le.jsx)(vm,{className:"h-10 border-b border-dashboard-border-subtle"}),(0,Le.jsx)(PA,{className:"min-h-80"})]})}function kbe(){return(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,Le.jsx)(vm,{className:"h-7 w-56 rounded bg-dashboard-fill-soft"}),(0,Le.jsx)(vm,{className:"h-10 w-full max-w-md rounded-lg border border-dashboard-border-subtle bg-dashboard-fill-faint sm:w-72"})]}),(0,Le.jsx)("div",{"aria-hidden":"true",className:"grid min-w-0 grid-cols-3 gap-1 border-b border-dashboard-border-subtle sm:flex",children:Array.from({length:3},(e,t)=>(0,Le.jsxs)("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 sm:justify-start",children:[(0,Le.jsx)(vm,{className:"h-3 w-12 rounded bg-dashboard-fill-soft"}),(0,Le.jsx)(vm,{className:"h-5 w-8 rounded-sm border border-dashboard-border-subtle bg-dashboard-fill-faint"})]},t))}),(0,Le.jsx)(PA,{className:"min-h-80"})]})}function PA(e){return(0,Le.jsx)(P,{className:k("animate-pulse motion-reduce:animate-none",e.className),children:(0,Le.jsx)("span",{"aria-hidden":"true"})})}function vm(e){return(0,Le.jsx)(Re,{className:e.className})}var Ak=C(w(),1),kO="inline-flex h-9 max-w-full items-center gap-2 rounded border border-dashboard-border-emphasis bg-dashboard-surface-raised px-3 font-mono text-sm font-semibold leading-none text-dashboard-text transition-colors hover:border-dashboard-border-heavy hover:bg-dashboard-surface-hover hover:text-dashboard-text",Qbe="inline-flex h-9 max-w-full items-center justify-center gap-1.5 rounded border border-dashboard-border-strong bg-transparent px-3 font-mono text-xs font-semibold text-dashboard-text-muted transition-colors hover:border-rose-300/40 hover:text-rose-300";function $e({className:e,size:t="default",tone:n="default",type:r="button",...a}){let o=n==="danger";return(0,Ak.jsx)("button",{...a,className:k("font-mono transition-colors disabled:cursor-not-allowed disabled:opacity-50",t==="icon"?k("grid size-9 place-items-center rounded-md border-0 bg-transparent p-0 focus-visible:outline focus-visible:outline-1 disabled:hover:!bg-transparent",o?"text-dashboard-text-muted hover:!bg-rose-300/10 hover:!text-rose-300 focus-visible:outline-rose-300/55 disabled:hover:!text-dashboard-text-muted":"text-dashboard-text-muted hover:!bg-dashboard-fill-strong hover:!text-dashboard-text focus-visible:outline-cyan-300/55 disabled:hover:!text-dashboard-text-muted"):o?k(Qbe,"disabled:hover:border-dashboard-border-strong disabled:hover:text-dashboard-text-muted"):k(kO,"disabled:hover:border-dashboard-border-emphasis disabled:hover:bg-dashboard-surface-raised disabled:hover:text-dashboard-text"),a.disabled?"":"cursor-pointer",e),type:r})}function QO({className:e,...t}){return(0,Ak.jsx)(pe,{...t,className:k(kO,"no-underline",e)})}function _n({className:e,pressed:t,type:n="button",variant:r,...a}){return(0,Ak.jsx)("button",{...a,"aria-pressed":t,className:k(vbe[r],t?Ibe[r]:_be[r],e),type:n})}var vbe={pill:"cursor-pointer rounded border px-2 py-1 font-mono text-xs font-semibold uppercase leading-tight transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",segment:"h-7 min-w-10 cursor-pointer rounded border px-2 font-mono text-xs transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55",text:"cursor-pointer border-0 bg-transparent px-1.5 py-1 font-mono uppercase tracking-normal underline-offset-4 transition-colors focus-visible:outline focus-visible:outline-1 focus-visible:outline-cyan-300/55"},Ibe={pill:"border-dashboard-border-heavy bg-dashboard-text-solid text-dashboard-text-inverse",segment:"border-amber-500/30 bg-amber-500/20 text-amber-400",text:"text-dashboard-text underline decoration-dashboard-text-solid"},_be={pill:"border-dashboard-border-strong bg-dashboard-surface-raised text-dashboard-text-muted hover:border-dashboard-border-interactive hover:bg-dashboard-surface-hover hover:text-dashboard-text",segment:"border-dashboard-border-strong bg-dashboard-fill-faint text-dashboard-text-muted hover:bg-dashboard-fill-strong hover:text-dashboard-text",text:"text-dashboard-text-muted hover:text-dashboard-text"};var y9=C(w(),1),xbe=[1,7,30,90];function C9(e){return e===1?"24h":`${e}d`}function Im(e){return e===1?"last 24 hours":`last ${e} days`}function xn(e){return e===1?"hour":e===7?"6hour":"day"}function vO(e){return e===1}function Dbe(e){return e===7}function dr(e){return e==="hour"?"hour":e==="6hour"?"6h":"day"}function _m(e){return e==="hour"?"hour":e==="6hour"?"6 hours":"day"}function Ub(e){return e==="hour"?"Hourly":e==="6hour"?"6-hour":"Daily"}function jn(e){return vO(e.range)&&e.hours?.length?e.hours.slice(-24):vO(e.range)?e.days.slice(-1):Dbe(e.range)?e.sixHours?.length?[...e.sixHours]:e.hours?.length&&e.emptySixHour?Fbe({empty:e.emptySixHour,hours:e.hours}):e.days.slice(-e.range):e.days.slice(-e.range)}function Fbe(e){let t=new Map;for(let n of e.hours){let r=Date.parse(`${n.date}:00:00.000Z`);if(Number.isNaN(r))continue;let a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=a.toISOString().slice(0,13),A={...t.get(o)??e.empty(o),date:o};for(let[s,u]of Object.entries(n))if(s!=="date"&&typeof u=="number"){let d=A[s];A[s]=(typeof d=="number"?d:0)+u}t.set(o,A)}if(e.hours.length>=24){let n=e.hours[e.hours.length-1]?.date,r=n?Date.parse(`${n}:00:00.000Z`):Date.now(),a=new Date(r);a.setUTCMinutes(0,0,0),a.setUTCHours(Math.floor(a.getUTCHours()/6)*6,0,0,0);let o=new Date(a.getTime()-9720*60*1e3),i=[];for(let A=new Date(o);A.getTime()<=a.getTime();A.setTime(A.getTime()+360*60*1e3)){let s=A.toISOString().slice(0,13);i.push(t.get(s)??e.empty(s))}return i}return[...t.values()].sort((n,r)=>n.date.localeCompare(r.date))}function sk(e){return(0,y9.jsx)("div",{"aria-label":"Reporting period",className:"flex items-center gap-1",role:"group",children:(e.options??xbe).map(t=>(0,y9.jsx)(_n,{onClick:()=>e.onChange(t),pressed:e.value===t,variant:"segment",children:C9(t)},t))})}var cu=C(w(),1);function ze(e){let t=e.range!==void 0&&e.onRangeChange?(0,cu.jsx)(sk,{onChange:e.onRangeChange,...e.rangeOptions?{options:e.rangeOptions}:{},value:e.range}):void 0,n=e.actions??t;return(0,cu.jsxs)("header",{className:"flex min-w-0 items-center justify-between gap-6 border-b border-white/[0.05] pb-4 sm:pb-6 max-md:flex-col max-md:items-stretch",children:[(0,cu.jsxs)("div",{className:"min-w-0",children:[(0,cu.jsx)("h2",{className:"m-0 font-display text-3xl font-light leading-none tracking-[-0.03em] text-dashboard-text sm:text-4xl",children:e.title}),(0,cu.jsx)("div",{className:"mt-2 max-w-2xl font-mono text-xs leading-relaxed text-dashboard-text-muted sm:text-sm",children:e.description})]}),n?(0,cu.jsx)("div",{className:"shrink-0",children:n}):null]})}var IO=C(w(),1);function ci(e){return(0,IO.jsx)("div",{className:k(Mn,"grid min-w-0 content-start gap-4 px-4 py-4 pb-[max(1rem,env(safe-area-inset-bottom))] sm:gap-6 sm:px-8 sm:py-8 sm:pb-8",e.className),children:e.children})}var Ob=C(w(),1);function jd(e){return(0,Ob.jsxs)(ci,{children:[(0,Ob.jsx)(ze,{description:e.description,title:e.title}),(0,Ob.jsx)(Ja,{label:e.label,variant:e.variant})]})}var dk=C(U(),1);var ck=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var _O=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var xO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());var w9=e=>{let t=xO(e);return t.charAt(0).toUpperCase()+t.slice(1)};var qb=C(U(),1);var uk={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var DO=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var xm=C(U(),1);var Sbe=(0,xm.createContext)({});var FO=()=>(0,xm.useContext)(Sbe);var SO=(0,qb.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...A},s)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:l=!1,color:m="currentColor",className:p=""}=FO()??{},g=r??l?Number(n??d)*24/Number(t??u):n??d;return(0,qb.createElement)("svg",{ref:s,...uk,width:t??u??uk.width,height:t??u??uk.height,stroke:e??m,strokeWidth:g,className:ck("lucide",p,a),...!o&&!DO(A)&&{"aria-hidden":"true"},...A},[...i.map(([b,B])=>(0,qb.createElement)(b,B)),...Array.isArray(o)?o:[o]])});var S=(e,t)=>{let n=(0,dk.forwardRef)(({className:r,...a},o)=>(0,dk.createElement)(SO,{ref:o,iconNode:t,className:ck(`lucide-${_O(w9(e))}`,`lucide-${e}`,r),...a}));return n.displayName=w9(e),n};var Nbe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Gi=S("activity",Nbe);var Lbe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],ui=S("archive-restore",Lbe);var Rbe=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Hs=S("archive",Rbe);var $be=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],zb=S("arrow-down-to-line",$be);var Mbe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],TA=S("arrow-left",Mbe);var jbe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Kb=S("arrow-right",jbe);var Pbe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],Pd=S("arrow-up-right",Pbe);var Tbe=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],Yb=S("bookmark",Tbe);var Hbe=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],HA=S("bot",Hbe);var Gbe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],So=S("boxes",Gbe);var Ube=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],GA=S("braces",Ube);var Obe=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],uu=S("brain-circuit",Obe);var qbe=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Gs=S("brain",qbe);var zbe=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],Us=S("calendar-clock",zbe);var Kbe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Jb=S("calendar",Kbe);var Ybe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Td=S("check",Ybe);var Jbe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Wb=S("chevron-down",Jbe);var Wbe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Zb=S("chevron-left",Wbe);var Zbe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],fn=S("chevron-right",Zbe);var Vbe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],pa=S("circle-alert",Vbe);var Xbe=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],Vb=S("circle-dashed",Xbe);var ehe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]],Hd=S("circle-dollar-sign",ehe);var the=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Xb=S("circle-dot",the);var nhe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],du=S("circle-x",nhe);var ahe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],No=S("clock-3",ahe);var rhe=[["path",{d:"M13.744 17.736a6 6 0 1 1-7.48-7.48",key:"bq4yh3"}],["path",{d:"M15 6h1v4",key:"11y1tn"}],["path",{d:"m6.134 14.768.866-.5 2 3.464",key:"17snzx"}],["circle",{cx:"16",cy:"8",r:"6",key:"14bfc9"}]],Ui=S("coins",rhe);var ohe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Gd=S("copy",ohe);var ihe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],lu=S("database",ihe);var Ahe=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ir=S("earth",Ahe);var she=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],pu=S("ellipsis",she);var che=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Os=S("external-link",che);var uhe=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],eh=S("file-text",uhe);var dhe=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],mu=S("fingerprint-pattern",dhe);var lhe=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],th=S("folder-git-2",lhe);var phe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]],nh=S("git-merge",phe);var mhe=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],qs=S("git-pull-request",mhe);var ghe=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],ah=S("hash",ghe);var fhe=[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]],rh=S("image-plus",fhe);var bhe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Ud=S("info",bhe);var hhe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Oi=S("key-round",hhe);var Bhe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],gu=S("layers",Bhe);var yhe=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],Od=S("library-big",yhe);var Che=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],oh=S("lightbulb",Che);var whe=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],ih=S("list-checks",whe);var Ehe=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Ah=S("link",Ehe);var khe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],zs=S("loader-circle",khe);var Qhe=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],_r=S("lock-keyhole",Qhe);var vhe=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],sh=S("lock",vhe);var Ihe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],ch=S("log-out",Ihe);var _he=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],qd=S("map-pin",_he);var xhe=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],uh=S("map-pinned",xhe);var Dhe=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],zd=S("menu",Dhe);var Fhe=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],dh=S("message-square-text",Fhe);var She=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Lo=S("message-square",She);var Nhe=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],Dm=S("messages-square",Nhe);var Lhe=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],lh=S("minimize-2",Lhe);var Rhe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ph=S("panel-right",Rhe);var $he=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],mh=S("paperclip",$he);var Mhe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Kd=S("plus",Mhe);var jhe=[["path",{d:"M4.9 16.1C1 12.2 1 5.8 4.9 1.9",key:"s0qx1y"}],["path",{d:"M7.8 4.7a6.14 6.14 0 0 0-.8 7.5",key:"1idnkw"}],["circle",{cx:"12",cy:"9",r:"2",key:"1092wv"}],["path",{d:"M16.2 4.8c2 2 2.26 5.11.8 7.47",key:"ojru2q"}],["path",{d:"M19.1 1.9a9.96 9.96 0 0 1 0 14.1",key:"rhi7fg"}],["path",{d:"M9.5 18h5",key:"mfy3pd"}],["path",{d:"m8 22 4-11 4 11",key:"25yftu"}]],gh=S("radio-tower",jhe);var Phe=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Fm=S("scroll-text",Phe);var The=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],fu=S("search",The);var Hhe=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Yd=S("send",Hhe);var Ghe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fh=S("settings",Ghe);var Uhe=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],bh=S("sigma",Uhe);var Ohe=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],hh=S("skip-forward",Ohe);var qhe=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],lr=S("sparkles",qhe);var zhe=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],ao=S("square-pen",zhe);var Khe=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],qi=S("timer",Khe);var Yhe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sa=S("trash-2",Yhe);var Jhe=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Bh=S("trending-up",Jhe);var Whe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ro=S("triangle-alert",Whe);var Zhe=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],xr=S("user-round",Zhe);var Vhe=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Jd=S("users",Vhe);var Xhe=[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]],yh=S("webhook",Xhe);var eBe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Na=S("x",eBe);var tBe=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ch=S("zap",tBe);var rs=C(U(),1);var E9=Object.defineProperty,nBe=Object.getOwnPropertyDescriptor,aBe=Object.getOwnPropertyNames,rBe=Object.prototype.hasOwnProperty,LO=(e,t)=>{let n={};for(var r in e)E9(n,r,{get:e[r],enumerable:!0});return t||E9(n,Symbol.toStringTag,{value:"Module"}),n},NO=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var a=aBe(t),o=0,i=a.length,A;o<i;o++)A=a[o],!rBe.call(e,A)&&A!==n&&E9(e,A,{get:(s=>t[s]).bind(null,A),enumerable:!(r=nBe(t,A))||r.enumerable});return e},RO=(e,t,n)=>(NO(e,t,"default"),n&&NO(n,t,"default"));var I9={};L(I9,{createOnigurumaEngine:()=>CBe,getDefaultWasmLoader:()=>yBe,loadWasm:()=>MO,setDefaultWasmLoader:()=>BBe});var v9=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function oBe(){return 2147483648}function iBe(){return typeof performance<"u"?performance.now():Date.now()}var ABe=(e,t)=>e+(t-e%t)%t;async function sBe(e){let t,n,r={};function a(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function o(p,g,b){r.HEAPU8.copyWithin(p,g,g+b)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),a(t.buffer),1}catch{}}function A(p){let g=r.HEAPU8.length;p=p>>>0;let b=oBe();if(p>b)return!1;for(let B=1;B<=4;B*=2){let h=g*(1+.2/B);h=Math.min(h,p+100663296);let f=Math.min(b,ABe(Math.max(p,h),65536));if(i(f))return!0}return!1}let s=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(p,g,b=1024){let B=g+b,h=g;for(;p[h]&&!(h>=B);)++h;if(h-g>16&&p.buffer&&s)return s.decode(p.subarray(g,h));let f="";for(;g<h;){let y=p[g++];if(!(y&128)){f+=String.fromCharCode(y);continue}let E=p[g++]&63;if((y&224)===192){f+=String.fromCharCode((y&31)<<6|E);continue}let v=p[g++]&63;if((y&240)===224?y=(y&15)<<12|E<<6|v:y=(y&7)<<18|E<<12|v<<6|p[g++]&63,y<65536)f+=String.fromCharCode(y);else{let Q=y-65536;f+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}}return f}function d(p,g){return p?u(r.HEAPU8,p,g):""}let l={emscripten_get_now:iBe,emscripten_memcpy_big:o,emscripten_resize_heap:A,fd_write:()=>0};async function m(){let g=await e({env:l,wasi_snapshot_preview1:l});t=g.memory,a(t.buffer),Object.assign(r,g),r.UTF8ToString=d}return await m(),r}var cBe=Object.defineProperty,uBe=(e,t,n)=>t in e?cBe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ma=(e,t,n)=>uBe(e,typeof t!="symbol"?t+"":t,n),La=null;function dBe(e){throw new v9(e.UTF8ToString(e.getLastOnigError()))}var pk=class e{constructor(t){ma(this,"utf16Length"),ma(this,"utf8Length"),ma(this,"utf16Value"),ma(this,"utf8Value"),ma(this,"utf16OffsetToUtf8"),ma(this,"utf8OffsetToUtf16");let n=t.length,r=e._utf8ByteLength(t),a=r!==n,o=a?new Uint32Array(n+1):null;a&&(o[n]=r);let i=a?new Uint32Array(r+1):null;a&&(i[r]=n);let A=new Uint8Array(r),s=0;for(let u=0;u<n;u++){let d=t.charCodeAt(u),l=d,m=!1;if(d>=55296&&d<=56319&&u+1<n){let p=t.charCodeAt(u+1);p>=56320&&p<=57343&&(l=(d-55296<<10)+65536|p-56320,m=!0)}a&&(o[u]=s,m&&(o[u+1]=s),l<=127?i[s+0]=u:l<=2047?(i[s+0]=u,i[s+1]=u):l<=65535?(i[s+0]=u,i[s+1]=u,i[s+2]=u):(i[s+0]=u,i[s+1]=u,i[s+2]=u,i[s+3]=u)),l<=127?A[s++]=l:l<=2047?(A[s++]=192|(l&1984)>>>6,A[s++]=128|(l&63)>>>0):l<=65535?(A[s++]=224|(l&61440)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0):(A[s++]=240|(l&1835008)>>>18,A[s++]=128|(l&258048)>>>12,A[s++]=128|(l&4032)>>>6,A[s++]=128|(l&63)>>>0),m&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=A,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let r=0,a=t.length;r<a;r++){let o=t.charCodeAt(r),i=o,A=!1;if(o>=55296&&o<=56319&&r+1<a){let s=t.charCodeAt(r+1);s>=56320&&s<=57343&&(i=(o-55296<<10)+65536|s-56320,A=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,A&&r++}return n}createString(t){let n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}},mk=class UA{constructor(t){if(ma(this,"id",++UA.LAST_ID),ma(this,"_onigBinding"),ma(this,"content"),ma(this,"utf16Length"),ma(this,"utf8Length"),ma(this,"utf16OffsetToUtf8"),ma(this,"utf8OffsetToUtf16"),ma(this,"ptr"),!La)throw new v9("Must invoke loadWasm first.");this._onigBinding=La,this.content=t;let n=new pk(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!UA._sharedPtrInUse?(UA._sharedPtr||(UA._sharedPtr=La.omalloc(1e4)),UA._sharedPtrInUse=!0,La.HEAPU8.set(n.utf8Value,UA._sharedPtr),this.ptr=UA._sharedPtr):this.ptr=n.createString(La)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===UA._sharedPtr?UA._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};ma(mk,"LAST_ID",0);ma(mk,"_sharedPtr",0);ma(mk,"_sharedPtrInUse",!1);var $O=mk,Q9=class{constructor(t){if(ma(this,"_onigBinding"),ma(this,"_ptr"),!La)throw new v9("Must invoke loadWasm first.");let n=[],r=[];for(let A=0,s=t.length;A<s;A++){let u=new pk(t[A]);n[A]=u.createString(La),r[A]=u.utf8Length}let a=La.omalloc(4*t.length);La.HEAPU32.set(n,a/4);let o=La.omalloc(4*t.length);La.HEAPU32.set(r,o/4);let i=La.createOnigScanner(a,o,t.length);for(let A=0,s=t.length;A<s;A++)La.ofree(n[A]);La.ofree(o),La.ofree(a),i===0&&dBe(La),this._onigBinding=La,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let a=0;if(typeof r=="number"&&(a=r),typeof t=="string"){t=new $O(t);let o=this._findNextMatchSync(t,n,!1,a);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,a)}_findNextMatchSync(t,n,r,a){let o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),a);if(i===0)return null;let A=o.HEAPU32,s=i/4,u=A[s++],d=A[s++],l=[];for(let m=0;m<d;m++){let p=t.convertUtf8OffsetToUtf16(A[s++]),g=t.convertUtf8OffsetToUtf16(A[s++]);l[m]={start:p,end:g,length:g-p}}return{index:u,captureIndices:l}}};function lBe(e){return typeof e.instantiator=="function"}function pBe(e){return typeof e.default=="function"}function mBe(e){return typeof e.data<"u"}function gBe(e){return typeof Response<"u"&&e instanceof Response}function fBe(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}var lk;function MO(e){if(lk)return lk;async function t(){La=await sBe(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),lBe(r)?r=await r.instantiator(n):pBe(r)?r=await r.default(n):(mBe(r)&&(r=r.data),gBe(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await bBe(r)(n):r=await hBe(r)(n):fBe(r)?r=await k9(r)(n):r instanceof WebAssembly.Module?r=await k9(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await k9(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return lk=t(),lk}function k9(e){return t=>WebAssembly.instantiate(e,t)}function bBe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function hBe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var jO;function BBe(e){jO=e}function yBe(){return jO}async function CBe(e){return e&&await MO(e),{createScanner(t){return new Q9(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new $O(t)}}}var _9=LO({});RO(_9,I9);var AK=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>Promise.resolve().then(()=>(TO(),PO)))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>Promise.resolve().then(()=>(GO(),HO)))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(OO(),UO)))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>Promise.resolve().then(()=>(zO(),qO)))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>Promise.resolve().then(()=>(YO(),KO)))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xE9",type:"dark",import:(()=>Promise.resolve().then(()=>(WO(),JO)))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>Promise.resolve().then(()=>(VO(),ZO)))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>Promise.resolve().then(()=>(eq(),XO)))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>Promise.resolve().then(()=>(nq(),tq)))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>Promise.resolve().then(()=>(rq(),aq)))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(iq(),oq)))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(sq(),Aq)))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(uq(),cq)))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>Promise.resolve().then(()=>(lq(),dq)))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(mq(),pq)))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>Promise.resolve().then(()=>(fq(),gq)))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>Promise.resolve().then(()=>(hq(),bq)))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>Promise.resolve().then(()=>(yq(),Bq)))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>Promise.resolve().then(()=>(wq(),Cq)))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>Promise.resolve().then(()=>(kq(),Eq)))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>Promise.resolve().then(()=>(vq(),Qq)))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>Promise.resolve().then(()=>(_q(),Iq)))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>Promise.resolve().then(()=>(Dq(),xq)))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>Promise.resolve().then(()=>(Sq(),Fq)))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>Promise.resolve().then(()=>(Lq(),Nq)))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>Promise.resolve().then(()=>($q(),Rq)))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>Promise.resolve().then(()=>(jq(),Mq)))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>Promise.resolve().then(()=>(Tq(),Pq)))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>Promise.resolve().then(()=>(Gq(),Hq)))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>Promise.resolve().then(()=>(Oq(),Uq)))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>Promise.resolve().then(()=>(zq(),qq)))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>Promise.resolve().then(()=>(Yq(),Kq)))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>Promise.resolve().then(()=>(Wq(),Jq)))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>Promise.resolve().then(()=>(Vq(),Zq)))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>Promise.resolve().then(()=>(ez(),Xq)))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>Promise.resolve().then(()=>(nz(),tz)))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>Promise.resolve().then(()=>(rz(),az)))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>Promise.resolve().then(()=>(iz(),oz)))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>Promise.resolve().then(()=>(sz(),Az)))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>Promise.resolve().then(()=>(uz(),cz)))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(lz(),dz)))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>Promise.resolve().then(()=>(mz(),pz)))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>Promise.resolve().then(()=>(fz(),gz)))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>Promise.resolve().then(()=>(hz(),bz)))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>Promise.resolve().then(()=>(yz(),Bz)))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>Promise.resolve().then(()=>(wz(),Cz)))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>Promise.resolve().then(()=>(kz(),Ez)))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>Promise.resolve().then(()=>(vz(),Qz)))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>Promise.resolve().then(()=>(_z(),Iz)))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>Promise.resolve().then(()=>(Dz(),xz)))},{id:"red",displayName:"Red",type:"dark",import:(()=>Promise.resolve().then(()=>(Sz(),Fz)))},{id:"rose-pine",displayName:"Ros\xE9 Pine",type:"dark",import:(()=>Promise.resolve().then(()=>(Lz(),Nz)))},{id:"rose-pine-dawn",displayName:"Ros\xE9 Pine Dawn",type:"light",import:(()=>Promise.resolve().then(()=>($z(),Rz)))},{id:"rose-pine-moon",displayName:"Ros\xE9 Pine Moon",type:"dark",import:(()=>Promise.resolve().then(()=>(jz(),Mz)))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(Tz(),Pz)))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>Promise.resolve().then(()=>(Gz(),Hz)))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>Promise.resolve().then(()=>(Oz(),Uz)))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(zz(),qz)))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>Promise.resolve().then(()=>(Yz(),Kz)))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>Promise.resolve().then(()=>(Wz(),Jz)))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>Promise.resolve().then(()=>(Vz(),Zz)))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>Promise.resolve().then(()=>(eK(),Xz)))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>Promise.resolve().then(()=>(nK(),tK)))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>Promise.resolve().then(()=>(rK(),aK)))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>Promise.resolve().then(()=>(iK(),oK)))}],sK=Object.fromEntries(AK.map(e=>[e.id,e.import]));var xt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function Nye(e){return j9(e)}function j9(e){return Array.isArray(e)?Lye(e):e instanceof RegExp?e:typeof e=="object"?Rye(e):e}function Lye(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=j9(e[n]);return t}function Rye(e){let t={};for(let n in e)t[n]=j9(e[n]);return t}function bK(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function hK(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?hK(e.substring(0,e.length-1)):e.substr(~t+1)}var x9=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,gk=class{static hasCaptures(e){return e===null?!1:(x9.lastIndex=0,x9.test(e))}static replaceCaptures(e,t,n){return e.replace(x9,(r,a,o,i)=>{let A=n[parseInt(a||o,10)];if(A){let s=t.substring(A.start,A.end);for(;s[0]===".";)s=s.substring(1);switch(i){case"downcase":return s.toLowerCase();case"upcase":return s.toUpperCase();default:return s}}else return r})}};function BK(e,t){return e<t?-1:e>t?1:0}function yK(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let a=0;a<n;a++){let o=BK(e[a],t[a]);if(o!==0)return o}return 0}return n-r}function cK(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function CK(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var wK=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},kh=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(jye(e),t)}static createFromParsedTheme(e,t){return Tye(e,t)}_cachedMatchRoot=new wK(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,r=this._cachedMatchRoot.get(t).find(a=>$ye(e.parent,a.parentScopes));return r?new EK(r.fontStyle,r.foreground,r.background):null}},D9=class fk{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(let r of n)t=new fk(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new fk(n,t[r]);return n}push(t){return new fk(this,t)}getSegments(){let t=this,n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function $ye(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],a=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],a=!0}for(;e&&!Mye(e.scopeName,r);){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Mye(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var EK=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function jye(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let a=0,o=t.length;a<o;a++){let i=t[a];if(!i.settings)continue;let A;if(typeof i.scope=="string"){let l=i.scope;l=l.replace(/^[,]+/,""),l=l.replace(/[,]+$/,""),A=l.split(",")}else Array.isArray(i.scope)?A=i.scope:A=[""];let s=-1;if(typeof i.settings.fontStyle=="string"){s=0;let l=i.settings.fontStyle.split(" ");for(let m=0,p=l.length;m<p;m++)switch(l[m]){case"italic":s=s|1;break;case"bold":s=s|2;break;case"underline":s=s|4;break;case"strikethrough":s=s|8;break}}let u=null;typeof i.settings.foreground=="string"&&cK(i.settings.foreground)&&(u=i.settings.foreground);let d=null;typeof i.settings.background=="string"&&cK(i.settings.background)&&(d=i.settings.background);for(let l=0,m=A.length;l<m;l++){let g=A[l].trim().split(" "),b=g[g.length-1],B=null;g.length>1&&(B=g.slice(0,g.length-1),B.reverse()),n[r++]=new Pye(b,B,a,s,u,d)}}return n}var Pye=class{constructor(e,t,n,r,a,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=a,this.background=o}},Wa=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Wa||{});function Tye(e,t){e.sort((s,u)=>{let d=BK(s.scope,u.scope);return d!==0||(d=yK(s.parentScopes,u.parentScopes),d!==0)?d:s.index-u.index});let n=0,r="#000000",a="#ffffff";for(;e.length>=1&&e[0].scope==="";){let s=e.shift();s.fontStyle!==-1&&(n=s.fontStyle),s.foreground!==null&&(r=s.foreground),s.background!==null&&(a=s.background)}let o=new Hye(t),i=new EK(n,o.getId(r),o.getId(a)),A=new Uye(new S9(0,null,-1,0,0),[]);for(let s=0,u=e.length;s<u;s++){let d=e[s];A.insert(0,d.scope,d.parentScopes,d.fontStyle,o.getId(d.foreground),o.getId(d.background))}return new kh(o,i,A)}var Hye=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Gye=Object.freeze([]),S9=class kK{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,a,o){this.scopeDepth=t,this.parentScopes=n||Gye,this.fontStyle=r,this.foreground=a,this.background=o}clone(){return new kK(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,a=t.length;r<a;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,a){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),a!==0&&(this.background=a)}},Uye=class N9{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,a=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[a]===">"&&a++,!(r>=t.parentScopes.length||a>=n.parentScopes.length);){let o=n.parentScopes[a].length-t.parentScopes[r].length;if(o!==0)return o;r++,a++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),a,o;if(r===-1?(a=t,o=""):(a=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(a))return this._children[a].match(o)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(N9._cmpBySpecificity),n}insert(t,n,r,a,o,i){if(n===""){this._doInsertHere(t,r,a,o,i);return}let A=n.indexOf("."),s,u;A===-1?(s=n,u=""):(s=n.substring(0,A),u=n.substring(A+1));let d;this._children.hasOwnProperty(s)?d=this._children[s]:(d=new N9(this._mainRule.clone(),S9.cloneArr(this._rulesWithParentScopes)),this._children[s]=d),d.insert(t+1,u,r,a,o,i)}_doInsertHere(t,n,r,a,o){if(n===null){this._mainRule.acceptOverwrite(t,r,a,o);return}for(let i=0,A=this._rulesWithParentScopes.length;i<A;i++){let s=this._rulesWithParentScopes[i];if(yK(s.parentScopes,n)===0){s.acceptOverwrite(t,r,a,o);return}}r===-1&&(r=this._mainRule.fontStyle),a===0&&(a=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new S9(t,n,r,a,o))}},Zd=class di{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){let n=di.getLanguageId(t),r=di.getTokenType(t),a=di.getFontStyle(t),o=di.getForeground(t),i=di.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:a,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,a,o,i,A){let s=di.getLanguageId(t),u=di.getTokenType(t),d=di.containsBalancedBrackets(t)?1:0,l=di.getFontStyle(t),m=di.getForeground(t),p=di.getBackground(t);return n!==0&&(s=n),r!==8&&(u=r),a!==null&&(d=a?1:0),o!==-1&&(l=o),i!==0&&(m=i),A!==0&&(p=A),(s<<0|u<<8|d<<10|l<<11|m<<15|p<<24)>>>0}};function hk(e,t){let n=[],r=Oye(e),a=r.next();for(;a!==null;){let s=0;if(a.length===2&&a.charAt(1)===":"){switch(a.charAt(0)){case"R":s=1;break;case"L":s=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=r.next()}let u=i();if(n.push({matcher:u,priority:s}),a!==",")break;a=r.next()}return n;function o(){if(a==="-"){a=r.next();let s=o();return u=>!!s&&!s(u)}if(a==="("){a=r.next();let s=A();return a===")"&&(a=r.next()),s}if(uK(a)){let s=[];do s.push(a),a=r.next();while(uK(a));return u=>t(s,u)}return null}function i(){let s=[],u=o();for(;u;)s.push(u),u=o();return d=>s.every(l=>l(d))}function A(){let s=[],u=i();for(;u&&(s.push(u),a==="|"||a===",");){do a=r.next();while(a==="|"||a===",");u=i()}return d=>s.some(l=>l(d))}}function uK(e){return!!e&&!!e.match(/[\w\.:]+/)}function Oye(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function QK(e){typeof e.dispose=="function"&&e.dispose()}var Qh=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},qye=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},zye=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Kye=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Qh(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new zye;for(let n of e)Yye(n,this.initialScopeName,this.repo,t);for(let n of t.references)if(n instanceof Qh){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Yye(e,t,n,r){let a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}let o=n.lookup(t);e instanceof Qh?bk({baseGrammar:o,selfGrammar:a},r):L9(e.ruleName,{baseGrammar:o,selfGrammar:a,repository:a.repository},r);let i=n.injections(e.scopeName);if(i)for(let A of i)r.add(new Qh(A))}function L9(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Bk([r],t,n)}}function bk(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Bk(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Bk(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Bk(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let a=r.repository?bK({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Bk(r.patterns,{...t,repository:a},n);let o=r.include;if(!o)continue;let i=vK(o);switch(i.kind){case 0:bk({...t,selfGrammar:t.baseGrammar},n);break;case 1:bk(t,n);break;case 2:L9(i.ruleName,{...t,repository:a},n);break;case 3:case 4:let A=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(A){let s={baseGrammar:t.baseGrammar,selfGrammar:A,repository:a};i.kind===4?L9(i.ruleName,s,n):bk(s,n)}else i.kind===4?n.add(new qye(i.scopeName,i.ruleName)):n.add(new Qh(i.scopeName));break}}}var Jye=class{kind=0},Wye=class{kind=1},Zye=class{constructor(e){this.ruleName=e}kind=2},Vye=class{constructor(e){this.scopeName=e}kind=3},Xye=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function vK(e){if(e==="$base")return new Jye;if(e==="$self")return new Wye;let t=e.indexOf("#");if(t===-1)return new Vye(e);if(t===0)return new Zye(e.substring(1));{let n=e.substring(0,t),r=e.substring(t+1);return new Xye(n,r)}}var eCe=/\\(\d+)/,dK=/\\(\d+)/g;var tCe=-1,IK=-2;var _h=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=gk.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=gk.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${hK(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:gk.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:gk.replaceCaptures(this._contentName,e,t)}},nCe=class extends _h{retokenizeCapturedWithRuleId;constructor(e,t,n,r,a){super(e,t,n,r),this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},aCe=class extends _h{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,null),this._match=new vh(r,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ih,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},lK=class extends _h{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a){super(e,t,n,r),this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Ih,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},R9=class extends _h{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,a,o,i,A,s,u){super(e,t,n,r),this._begin=new vh(a,this.id),this.beginCaptures=o,this._end=new vh(i||"\uFFFF",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=A,this.applyEndPatternLast=s||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ih;for(let n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},yk=class extends _h{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,a,o,i,A,s){super(e,t,n,r),this._begin=new vh(a,this.id),this.beginCaptures=o,this.whileCaptures=A,this._while=new vh(i,IK),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Ih;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Ih,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"\uFFFF"),this._cachedCompiledWhilePatterns}},_K=class pr{static createCaptureRule(t,n,r,a,o){return t.registerRule(i=>new nCe(n,i,r,a,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(a=>{if(t.id=a,t.match)return new aCe(t.$vscodeTextmateLocation,t.id,t.name,t.match,pr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=bK({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new lK(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,pr._compilePatterns(o,n,r))}return t.while?new yk(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,pr._compileCaptures(t.whileCaptures||t.captures,n,r),pr._compilePatterns(t.patterns,n,r)):new R9(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,pr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,pr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,pr._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let a=[];if(t){let o=0;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10);A>o&&(o=A)}for(let i=0;i<=o;i++)a[i]=null;for(let i in t){if(i==="$vscodeTextmateLocation")continue;let A=parseInt(i,10),s=0;t[i].patterns&&(s=pr.getCompiledRuleId(t[i],n,r)),a[A]=pr.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,s)}}return a}static _compilePatterns(t,n,r){let a=[];if(t)for(let o=0,i=t.length;o<i;o++){let A=t[o],s=-1;if(A.include){let u=vK(A.include);switch(u.kind){case 0:case 1:s=pr.getCompiledRuleId(r[A.include],n,r);break;case 2:let d=r[u.ruleName];d&&(s=pr.getCompiledRuleId(d,n,r));break;case 3:case 4:let l=u.scopeName,m=u.kind===4?u.ruleName:null,p=n.getExternalGrammar(l,r);if(p)if(m){let g=p.repository[m];g&&(s=pr.getCompiledRuleId(g,n,p.repository))}else s=pr.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else s=pr.getCompiledRuleId(A,n,r);if(s!==-1){let u=n.getRule(s),d=!1;if((u instanceof lK||u instanceof R9||u instanceof yk)&&u.hasMissingPatterns&&u.patterns.length===0&&(d=!0),d)continue;a.push(s)}}return{patterns:a,hasMissingPatterns:(t?t.length:0)!==a.length}}},vh=class xK{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){let r=t.length,a=0,o=[],i=!1;for(let A=0;A<r;A++)if(t.charAt(A)==="\\"&&A+1<r){let u=t.charAt(A+1);u==="z"?(o.push(t.substring(a,A)),o.push("$(?!\\n)(?<!\\n)"),a=A+2):(u==="A"||u==="G")&&(i=!0),A++}this.hasAnchor=i,a===0?this.source=t:(o.push(t.substring(a,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=eCe.test(this.source):this.hasBackReferences=!1}clone(){return new xK(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(a=>t.substring(a.start,a.end));return dK.lastIndex=0,this.source.replace(dK,(a,o)=>CK(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],a=[],o,i,A,s;for(o=0,i=this.source.length;o<i;o++)A=this.source.charAt(o),t[o]=A,n[o]=A,r[o]=A,a[o]=A,A==="\\"&&o+1<i&&(s=this.source.charAt(o+1),s==="A"?(t[o+1]="\uFFFF",n[o+1]="\uFFFF",r[o+1]="A",a[o+1]="A"):s==="G"?(t[o+1]="\uFFFF",n[o+1]="G",r[o+1]="\uFFFF",a[o+1]="G"):(t[o+1]=s,n[o+1]=s,r[o+1]=s,a[o+1]=s),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:a.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Ih=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new pK(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(a=>a.resolveAnchors(t,n));return new pK(e,r,this._items.map(a=>a.ruleId))}},pK=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
70
70
  `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},F9=class{constructor(e,t){this.languageId=e,this.tokenType=t}},rCe=class $9{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new F9(t,8),this._embeddedLanguagesMatcher=new oCe(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?$9._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new F9(0,0);_getBasicScopeAttributes=new wK(t=>{let n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new F9(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){let n=t.match($9.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},oCe=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([n,r])=>CK(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},WHe={InDebugMode:typeof process<"u"&&!!process.env.VSCODE_TEXTMATE_DEBUG},DK=!1,mK=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function FK(e,t,n,r,a,o,i,A){let s=t.content.length,u=!1,d=-1;if(i){let p=iCe(e,t,n,r,a,o);a=p.stack,r=p.linePos,n=p.isFirstLine,d=p.anchorPosition}let l=Date.now();for(;!u;){if(A!==0&&Date.now()-l>A)return new mK(a,!0);m()}return new mK(a,!1);function m(){let p=ACe(e,t,n,r,a,d);if(!p){o.produce(a,s),u=!0;return}let g=p.captureIndices,b=p.matchedRuleId,B=g&&g.length>0?g[0].end>r:!1;if(b===tCe){let h=a.getRule(e);o.produce(a,g[0].start),a=a.withContentNameScopesList(a.nameScopesList),wh(e,t,n,a,o,h.endCaptures,g),o.produce(a,g[0].end);let f=a;if(a=a.parent,d=f.getAnchorPos(),!B&&f.getEnterPos()===r){a=f,o.produce(a,s),u=!0;return}}else{let h=e.getRule(b);o.produce(a,g[0].start);let f=a,y=h.getName(t.content,g),E=a.contentNameScopesList.pushAttributed(y,e);if(a=a.push(b,r,d,g[0].end===s,null,E,E),h instanceof R9){let v=h;wh(e,t,n,a,o,v.beginCaptures,g),o.produce(a,g[0].end),d=g[0].end;let Q=v.getContentName(t.content,g),I=E.pushAttributed(Q,e);if(a=a.withContentNameScopesList(I),v.endHasBackReferences&&(a=a.withEndRule(v.getEndWithResolvedBackReferences(t.content,g))),!B&&f.hasSameRuleAs(a)){a=a.pop(),o.produce(a,s),u=!0;return}}else if(h instanceof yk){let v=h;wh(e,t,n,a,o,v.beginCaptures,g),o.produce(a,g[0].end),d=g[0].end;let Q=v.getContentName(t.content,g),I=E.pushAttributed(Q,e);if(a=a.withContentNameScopesList(I),v.whileHasBackReferences&&(a=a.withEndRule(v.getWhileWithResolvedBackReferences(t.content,g))),!B&&f.hasSameRuleAs(a)){a=a.pop(),o.produce(a,s),u=!0;return}}else if(wh(e,t,n,a,o,h.captures,g),o.produce(a,g[0].end),a=a.pop(),!B){a=a.safePop(),o.produce(a,s),u=!0;return}}g[0].end>r&&(r=g[0].end,n=!1)}}function iCe(e,t,n,r,a,o){let i=a.beginRuleCapturedEOL?0:-1,A=[];for(let s=a;s;s=s.pop()){let u=s.getRule(e);u instanceof yk&&A.push({rule:u,stack:s})}for(let s=A.pop();s;s=A.pop()){let{ruleScanner:u,findOptions:d}=uCe(s.rule,e,s.stack.endRule,n,r===i),l=u.findNextMatchSync(t,r,d);if(l){if(l.ruleId!==IK){a=s.stack.pop();break}l.captureIndices&&l.captureIndices.length&&(o.produce(s.stack,l.captureIndices[0].start),wh(e,t,n,s.stack,o,s.rule.whileCaptures,l.captureIndices),o.produce(s.stack,l.captureIndices[0].end),i=l.captureIndices[0].end,l.captureIndices[0].end>r&&(r=l.captureIndices[0].end,n=!1))}else{a=s.stack.pop();break}}return{stack:a,linePos:r,anchorPosition:i,isFirstLine:n}}function ACe(e,t,n,r,a,o){let i=sCe(e,t,n,r,a,o),A=e.getInjections();if(A.length===0)return i;let s=cCe(A,e,t,n,r,a,o);if(!s)return i;if(!i)return s;let u=i.captureIndices[0].start,d=s.captureIndices[0].start;return d<u||s.priorityMatch&&d===u?s:i}function sCe(e,t,n,r,a,o){let i=a.getRule(e),{ruleScanner:A,findOptions:s}=SK(i,e,a.endRule,n,r===o),u=A.findNextMatchSync(t,r,s);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function cCe(e,t,n,r,a,o,i){let A=Number.MAX_VALUE,s=null,u,d=0,l=o.contentNameScopesList.getScopeNames();for(let m=0,p=e.length;m<p;m++){let g=e[m];if(!g.matcher(l))continue;let b=t.getRule(g.ruleId),{ruleScanner:B,findOptions:h}=SK(b,t,null,r,a===i),f=B.findNextMatchSync(n,a,h);if(!f)continue;let y=f.captureIndices[0].start;if(!(y>=A)&&(A=y,s=f.captureIndices,u=f.ruleId,d=g.priority,A===a))break}return s?{priorityMatch:d===-1,captureIndices:s,matchedRuleId:u}:null}function SK(e,t,n,r,a){if(DK){let i=e.compile(t,n),A=NK(r,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileAG(t,n,r,a),findOptions:0}}function uCe(e,t,n,r,a){if(DK){let i=e.compileWhile(t,n),A=NK(r,a);return{ruleScanner:i,findOptions:A}}return{ruleScanner:e.compileWhileAG(t,n,r,a),findOptions:0}}function NK(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function wh(e,t,n,r,a,o,i){if(o.length===0)return;let A=t.content,s=Math.min(o.length,i.length),u=[],d=i[0].end;for(let l=0;l<s;l++){let m=o[l];if(m===null)continue;let p=i[l];if(p.length===0)continue;if(p.start>d)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)a.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?a.produceFromScopes(u[u.length-1].scopes,p.start):a.produce(r,p.start),m.retokenizeCapturedWithRuleId){let b=m.getName(A,i),B=r.contentNameScopesList.pushAttributed(b,e),h=m.getContentName(A,i),f=B.pushAttributed(h,e),y=r.push(m.retokenizeCapturedWithRuleId,p.start,-1,!1,null,B,f),E=e.createOnigString(A.substring(0,p.end));FK(e,E,n&&p.start===0,p.start,y,a,!1,0),QK(E);continue}let g=m.getName(A,i);if(g!==null){let B=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);u.push(new dCe(B,p.end))}}for(;u.length>0;)a.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var dCe=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function lCe(e,t,n,r,a,o,i,A){return new mCe(e,t,n,r,a,o,i,A)}function gK(e,t,n,r,a){let o=hk(t,Ck),i=_K.getCompiledRuleId(n,r,a.repository);for(let A of o)e.push({debugSelector:t,matcher:A.matcher,ruleId:i,grammar:a,priority:A.priority})}function Ck(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let a=n;a<t.length;a++)if(pCe(t[a],r))return n=a+1,!0;return!1})}function pCe(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var mCe=class{constructor(e,t,n,r,a,o,i,A){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=A,this._basicScopeAttributesProvider=new rCe(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=fK(t,null),this._injections=null,this._tokenTypeMatchers=[],a)for(let s of Object.keys(a)){let u=hk(s,Ck);for(let d of u)this._tokenTypeMatchers.push({matcher:d.matcher,type:a[s]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:a=>a===this._rootScopeName?this._grammar:this.getExternalGrammar(a),injections:a=>this._grammarRepository.injections(a)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let a=r.injections;if(a)for(let i in a)gK(t,i,a[i],this,r);let o=this._grammarRepository.injections(n);o&&o.forEach(i=>{let A=this.getExternalGrammar(i);if(A){let s=A.injectionSelector;s&&gK(t,s,A,this,A)}})}return t.sort((a,o)=>a.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=fK(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=_K.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let a;if(!t||t===M9.NULL){a=!0;let u=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),l=Zd.set(0,u.languageId,u.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),m=this.getRule(this._rootId).getName(null,null),p;m?p=Eh.createRootAndLookUpScopeName(m,l,this):p=Eh.createRoot("unknown",l),t=new M9(null,this._rootId,-1,-1,!1,null,p,p)}else a=!1,t.reset();e=e+`
71
71
  `;let o=this.createOnigString(e),i=o.content.length,A=new fCe(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),s=FK(this,o,a,0,t,A,!0,r);return QK(o),{lineLength:i,lineTokens:A,ruleStack:s.stack,stoppedEarly:s.stoppedEarly}}};function fK(e,t){return e=Nye(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Eh=class OA{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,a=t?.scopePath??null;for(let o of n)a=D9.push(a,o.scopeNames),r=new OA(r,a,o.encodedTokenAttributes);return r}static createRoot(t,n){return new OA(null,new D9(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let a=r.getMetadataForScope(t),o=new D9(null,t),i=r.themeProvider.themeMatch(o),A=OA.mergeAttributes(n,a,i);return new OA(null,o,A)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return OA.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let a=-1,o=0,i=0;return r!==null&&(a=r.fontStyle,o=r.foregroundId,i=r.backgroundId),Zd.set(t,n.languageId,n.tokenType,null,a,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return OA._pushAttributed(this,t,n);let r=t.split(/ /g),a=this;for(let o of r)a=OA._pushAttributed(a,o,n);return a}static _pushAttributed(t,n,r){let a=r.getMetadataForScope(n),o=t.scopePath.push(n),i=r.themeProvider.themeMatch(o),A=OA.mergeAttributes(t.tokenAttributes,a,i);return new OA(t,o,A)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){let n=[],r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},M9=class Wd{constructor(t,n,r,a,o,i,A,s){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=A,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=a}_stackElementBrand=void 0;static NULL=new Wd(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Wd._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Eh.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Wd._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,a,o,i,A){return new Wd(this,t,n,r,a,o,i,A)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){let t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Wd(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Eh.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Wd(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Eh.fromExtension(r,n.contentNameScopesList))}},gCe=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):hk(n,Ck).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>hk(n,Ck).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},fCe=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let o=e?.getScopeNames()??[];for(let i of this._tokenTypeOverrides)i.matcher(o)&&(r=Zd.set(r,0,i.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(o))}if(a&&(r=Zd.set(r,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let r=0,a=this._binaryTokens.length;r<a;r++)n[r]=this._binaryTokens[r];return n}},bCe=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,a){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,lCe(e,o,t,n,r,a,this,this._onigLib))}return this._grammars.get(e)}},LK=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new bCe(kh.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(kh.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new gCe(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,a){let o=new Kye(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(i=>this._loadSingleGrammar(i.scopeName)),o.processQueue();return this._grammarForScopeName(e,t,n,r,a)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,a=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,a)}},wk=M9.NULL;function Dh(e,t){let n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(let[a,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[a]=o:a===r&&Object.assign(n,o);return n}function Ks(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function PK(e){return Array.isArray(e)?e:[e]}async function P9(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Fh(e){return!e||["plaintext","txt","text","plain"].includes(e)}function T9(e){return e==="ansi"||Fh(e)}function Sh(e){return e==="none"}function H9(e){return Sh(e)}var hCe=/(\r?\n)/g;function Sm(e,t=!1){if(e.length===0)return[["",0]];let n=e.split(hCe),r=0,a=[];for(let o=0;o<n.length;o+=2){let i=t?n[o]+(n[o+1]||""):n[o];a.push([i,r]),r+=n[o].length,r+=n[o+1]?.length||0}return a}var RK={light:"#333333",dark:"#bbbbbb"},$K={light:"#fffffe",dark:"#1e1e1e"},MK="__shiki_resolved";function Ek(e){if(e?.[MK])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let A=t.settings?t.settings.find(s=>!s.name&&!s.scope):void 0;A?.settings?.foreground&&(r=A.settings.foreground),A?.settings?.background&&(n=A.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?RK.light:RK.dark),n||(n=t.type==="light"?$K.light:$K.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let a=0,o=new Map;function i(A){if(o.has(A))return o.get(A);a+=1;let s=`#${a.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${s}`]?i(A):(o.set(A,s),s)}t.settings=t.settings.map(A=>{let s=A.settings?.foreground&&!A.settings.foreground.startsWith("#"),u=A.settings?.background&&!A.settings.background.startsWith("#");if(!s&&!u)return A;let d={...A,settings:{...A.settings}};if(s){let l=i(A.settings.foreground);t.colorReplacements[l]=A.settings.foreground,d.settings.foreground=l}if(u){let l=i(A.settings.background);t.colorReplacements[l]=A.settings.background,d.settings.background=l}return d});for(let A of Object.keys(t.colors||{}))if((A==="editor.foreground"||A==="editor.background"||A.startsWith("terminal.ansi"))&&!t.colors[A]?.startsWith("#")){let s=i(t.colors[A]);t.colorReplacements[s]=t.colors[A],t.colors[A]=s}return Object.defineProperty(t,MK,{enumerable:!1,writable:!1,value:!0}),t}async function TK(e){return[...new Set((await Promise.all(e.filter(t=>!T9(t)).map(async t=>await P9(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function HK(e){return(await Promise.all(e.map(async t=>H9(t)?null:Ek(await P9(t))))).filter(t=>!!t)}function GK(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new xt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var BCe=class extends LK{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Ek(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=kh.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=GK(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(a=>a.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(a=>{this._alias[a]=e.name}),this._loadedLanguagesCache=null,t.size)for(let a of t)this._resolvedGrammars.delete(a.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(a.scopeName),this._syncRegistry?._grammars?.delete(a.scopeName),this.loadLanguage(this._langMap.get(a.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let r of e)this.resolveEmbeddedLanguages(r);let t=[...this._langGraph.entries()],n=t.filter(([r,a])=>!a);if(n.length){let r=t.filter(([a,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(i=>n.map(([A])=>A).includes(i)):!1).filter(a=>!n.includes(a));throw new xt(`Missing languages ${n.map(([a])=>`\`${a}\``).join(", ")}, required by ${r.map(([a])=>`\`${a}\``).join(", ")}`)}for(let[r,a]of t)this._resolver.addLanguage(a);for(let[r,a]of t)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let n of t)this._langGraph.set(n,this._langMap.get(n))}},yCe=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let r=1;r<=t.length;r++){let a=t.slice(0,r).join(".");n=[...n,...this._injections.get(a)||[]]}return n}},xh=0;function G9(e){xh+=1,e.warnings!==!1&&xh>=10&&xh%10===0&&console.warn(`[Shiki] ${xh} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new xt("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Ek),a=new BCe(new yCe(e.engine,n),r,n,e.langAlias),o;function i(f){return GK(f,e.langAlias)}function A(f){B();let y=a.getGrammar(typeof f=="string"?f:f.name);if(!y)throw new xt(`Language \`${f}\` not found, you may need to load it first`);return y}function s(f){if(f==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};B();let y=a.getTheme(f);if(!y)throw new xt(`Theme \`${f}\` not found, you may need to load it first`);return y}function u(f){B();let y=s(f);return o!==f&&(a.setTheme(y),o=f),{theme:y,colorMap:a.getColorMap()}}function d(){return B(),a.getLoadedThemes()}function l(){return B(),a.getLoadedLanguages()}function m(...f){B(),a.loadLanguages(f.flat(1))}async function p(...f){return m(await TK(f))}function g(...f){B();for(let y of f.flat(1))a.loadTheme(y)}async function b(...f){return B(),g(await HK(f))}function B(){if(t)throw new xt("Shiki instance has been disposed")}function h(){t||(t=!0,a.dispose(),xh-=1)}return{setTheme:u,getTheme:s,getLanguage:A,getLoadedThemes:d,getLoadedLanguages:l,resolveLangAlias:i,loadLanguage:p,loadLanguageSync:m,loadTheme:b,loadThemeSync:g,dispose:h,[Symbol.dispose]:h}}async function U9(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([HK(e.themes||[]),TK(e.langs||[]),e.engine]);return G9({...e,themes:t,langs:n,engine:r})}var UK=new WeakMap;function Nh(e,t){UK.set(e,t)}function Nm(e){return UK.get(e)}var kk=class OK{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new OK(Object.fromEntries(PK(n).map(r=>[r,wk])),t)}constructor(...t){if(t.length===2){let[n,r]=t;this.lang=r,this._stacks=n}else{let[n,r,a]=t;this.lang=r,this._stacks={[a]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return CCe(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function CCe(e){let t=[],n=new Set;function r(a){if(n.has(a))return;n.add(a);let o=a?.nameScopesList?.scopeName;o&&t.push(o),a.parent&&r(a.parent)}return r(e),t}function wCe(e,t){if(!(e instanceof kk))throw new xt("Invalid grammar state");return e.getInternalStack(t)}var ECe=/,/,kCe=/ /;function O9(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Fh(e.resolveLangAlias(n.lang||"text"))||Sh(r))return Sm(t).map(A=>[{content:A[0],offset:A[1]}]);let{theme:a,colorMap:o}=e.setTheme(r),i=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==i.name)throw new xt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${i.name}"`);if(!n.grammarState.themes.includes(a.name))throw new xt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return zK(t,i,a,o,n)}function qK(...e){if(e.length===2)return Nm(e[1]);let[t,n,r={}]=e,{lang:a="text",theme:o=t.getLoadedThemes()[0]}=r;if(Fh(a)||Sh(o))throw new xt("Plain language does not have grammar state");if(a==="ansi")throw new xt("ANSI language does not have grammar state");let{theme:i,colorMap:A}=t.setTheme(o),s=t.getLanguage(a);return new kk(q9(n,s,i,A,r).stateStack,s.name,i.name)}function zK(e,t,n,r,a){let o=q9(e,t,n,r,a),i=new kk(o.stateStack,t.name,n.name);return Nh(o.tokens,i),o.tokens}function q9(e,t,n,r,a){let o=Dh(n,a),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:A=500}=a,s=Sm(e),u=a.grammarState?wCe(a.grammarState,n.name)??wk:a.grammarContextCode!=null?q9(a.grammarContextCode,t,n,r,{...a,grammarState:void 0,grammarContextCode:void 0}).stateStack:wk,d=[],l=[];for(let m=0,p=s.length;m<p;m++){let[g,b]=s[m];if(g===""){d=[],l.push([]);continue}if(i>0&&g.length>=i){d=[],l.push([{content:g,offset:b,color:"",fontStyle:0}]);continue}let B,h,f;a.includeExplanation&&(B=t.tokenizeLine(g,u,A),h=B.tokens,f=0);let y=t.tokenizeLine2(g,u,A),E=y.tokens.length/2;for(let v=0;v<E;v++){let Q=y.tokens[2*v],I=v+1<E?y.tokens[2*v+2]:g.length;if(Q===I)continue;let $=y.tokens[2*v+1],q=Ks(r[Zd.getForeground($)],o),K=Zd.getFontStyle($),le={content:g.substring(Q,I),offset:b+Q,color:q,fontStyle:K};if(a.includeExplanation){let G=[];if(a.includeExplanation!=="scopeName")for(let ae of n.settings){let Fe;switch(typeof ae.scope){case"string":Fe=ae.scope.split(ECe).map(Ue=>Ue.trim());break;case"object":Fe=ae.scope;break;default:continue}G.push({settings:ae,selectors:Fe.map(Ue=>Ue.split(kCe))})}le.explanation=[];let V=0;for(;Q+V<I;){let ae=h[f],Fe=g.substring(ae.startIndex,ae.endIndex);V+=Fe.length,le.explanation.push({content:Fe,scopes:a.includeExplanation==="scopeName"?QCe(ae.scopes):vCe(G,ae.scopes)}),f+=1}}d.push(le)}l.push(d),d=[],u=y.ruleStack}return{tokens:l,stateStack:u}}function QCe(e){return e.map(t=>({scopeName:t}))}function vCe(e,t){let n=[];for(let r=0,a=t.length;r<a;r++){let o=t[r];n[r]={scopeName:o,themeMatches:_Ce(e,o,t.slice(0,r))}}return n}function jK(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function ICe(e,t,n){if(!jK(e.at(-1),t))return!1;let r=e.length-2,a=n.length-1;for(;r>=0&&a>=0;)jK(e[r],n[a])&&(r-=1),a-=1;return r===-1}function _Ce(e,t,n){let r=[];for(let{selectors:a,settings:o}of e)for(let i of a)if(ICe(i,t,n)){r.push(o);break}return r}function Qk(e,t,n,r=O9){let a=Object.entries(n.themes).filter(u=>u[1]).map(u=>({color:u[0],theme:u[1]})),o=a.map(u=>{let d=r(e,t,{...n,theme:u.theme});return{tokens:d,state:Nm(d),theme:typeof u.theme=="string"?u.theme:u.theme.name}}),i=xCe(...o.map(u=>u.tokens)),A=i[0].map((u,d)=>u.map((l,m)=>{let p={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(p.explanation=l.explanation),i.forEach((g,b)=>{let{content:B,explanation:h,offset:f,...y}=g[d][m];p.variants[a[b].color]=y}),p})),s=o[0].state?new kk(Object.fromEntries(o.map(u=>[u.theme,u.state?.getInternalStack(u.theme)])),o[0].state.lang):void 0;return s&&Nh(A,s),A}function xCe(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let a=e.map(s=>s[r]),o=t.map(()=>[]);t.forEach((s,u)=>s.push(o[u]));let i=a.map(()=>0),A=a.map(s=>s[0]);for(;A.every(s=>s);){let s=Math.min(...A.map(u=>u.content.length));for(let u=0;u<n;u++){let d=A[u];d.content.length===s?(o[u].push(d),i[u]+=1,A[u]=a[u][i[u]]):(o[u].push({...d,content:d.content.slice(0,s)}),A[u]={...d,content:d.content.slice(s),offset:d.offset+s})}}}return t}var KK=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var Ys=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Ys.prototype.normal={};Ys.prototype.property={};Ys.prototype.space=void 0;function z9(e,t){let n={},r={};for(let a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Ys(n,r,t)}function Lh(e){return e.toLowerCase()}var Ra=class{constructor(t,n){this.attribute=n,this.property=t}};Ra.prototype.attribute="";Ra.prototype.booleanish=!1;Ra.prototype.boolean=!1;Ra.prototype.commaOrSpaceSeparated=!1;Ra.prototype.commaSeparated=!1;Ra.prototype.defined=!1;Ra.prototype.mustUseProperty=!1;Ra.prototype.number=!1;Ra.prototype.overloadedBoolean=!1;Ra.prototype.property="";Ra.prototype.spaceSeparated=!1;Ra.prototype.space=void 0;var Rh={};L(Rh,{boolean:()=>xe,booleanish:()=>Dn,commaOrSpaceSeparated:()=>oo,commaSeparated:()=>bu,number:()=>O,overloadedBoolean:()=>vk,spaceSeparated:()=>Dt});var DCe=0,xe=Vd(),Dn=Vd(),vk=Vd(),O=Vd(),Dt=Vd(),bu=Vd(),oo=Vd();function Vd(){return 2**++DCe}var K9=Object.keys(Rh),Xd=class extends Ra{constructor(t,n,r,a){let o=-1;if(super(t,n),YK(this,"space",a),typeof r=="number")for(;++o<K9.length;){let i=K9[o];YK(this,K9[o],(r&Rh[i])===Rh[i])}}};Xd.prototype.defined=!0;function YK(e,t,n){n&&(e[t]=n)}function li(e){let t={},n={};for(let[r,a]of Object.entries(e.properties)){let o=new Xd(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Lh(r)]=r,n[Lh(o.attribute)]=r}return new Ys(t,n,e.space)}var Y9=li({properties:{ariaActiveDescendant:null,ariaAtomic:Dn,ariaAutoComplete:null,ariaBusy:Dn,ariaChecked:Dn,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:Dt,ariaCurrent:null,ariaDescribedBy:Dt,ariaDetails:null,ariaDisabled:Dn,ariaDropEffect:Dt,ariaErrorMessage:null,ariaExpanded:Dn,ariaFlowTo:Dt,ariaGrabbed:Dn,ariaHasPopup:null,ariaHidden:Dn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Dt,ariaLevel:O,ariaLive:null,ariaModal:Dn,ariaMultiLine:Dn,ariaMultiSelectable:Dn,ariaOrientation:null,ariaOwns:Dt,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:Dn,ariaReadOnly:Dn,ariaRelevant:null,ariaRequired:Dn,ariaRoleDescription:Dt,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:Dn,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Ik(e,t){return t in e?e[t]:t}function _k(e,t){return Ik(e,t.toLowerCase())}var JK=li({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bu,acceptCharset:Dt,accessKey:Dt,action:null,allow:null,allowFullScreen:xe,allowPaymentRequest:xe,allowUserMedia:xe,alt:null,as:null,async:xe,autoCapitalize:null,autoComplete:Dt,autoFocus:xe,autoPlay:xe,blocking:Dt,capture:null,charSet:null,checked:xe,cite:null,className:Dt,cols:O,colSpan:null,content:null,contentEditable:Dn,controls:xe,controlsList:Dt,coords:O|bu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:xe,defer:xe,dir:null,dirName:null,disabled:xe,download:vk,draggable:Dn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:xe,formTarget:null,headers:Dt,height:O,hidden:vk,high:O,href:null,hrefLang:null,htmlFor:Dt,httpEquiv:Dt,id:null,imageSizes:null,imageSrcSet:null,inert:xe,inputMode:null,integrity:null,is:null,isMap:xe,itemId:null,itemProp:Dt,itemRef:Dt,itemScope:xe,itemType:Dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:xe,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:xe,muted:xe,name:null,nonce:null,noModule:xe,noValidate:xe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:xe,optimum:O,pattern:null,ping:Dt,placeholder:null,playsInline:xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:xe,referrerPolicy:null,rel:Dt,required:xe,reversed:xe,rows:O,rowSpan:O,sandbox:Dt,scope:null,scoped:xe,seamless:xe,selected:xe,shadowRootClonable:xe,shadowRootDelegatesFocus:xe,shadowRootMode:null,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:Dn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:xe,useMap:null,value:Dn,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Dt,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:xe,declare:xe,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:xe,noHref:xe,noShade:xe,noWrap:xe,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:Dn,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:xe,disableRemotePlayback:xe,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:_k});var WK=li({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:oo,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:Dt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bu,g2:bu,glyphName:bu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:oo,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:oo,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:oo,rev:oo,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:oo,requiredFeatures:oo,requiredFonts:oo,requiredFormats:oo,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:oo,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:oo,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:oo,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Ik});var J9=li({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}});var W9=li({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:_k});var Z9=li({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}});var FCe=/[A-Z]/g,ZK=/-[a-z]/g,SCe=/^data[-\w.:]+$/i;function V9(e,t){let n=Lh(t),r=t,a=Ra;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&SCe.test(t)){if(t.charAt(4)==="-"){let o=t.slice(5).replace(ZK,LCe);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{let o=t.slice(4);if(!ZK.test(o)){let i=o.replace(FCe,NCe);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}a=Xd}return new a(r,t)}function NCe(e){return"-"+e.toLowerCase()}function LCe(e){return e.charAt(1).toUpperCase()}var VK=z9([Y9,JK,J9,W9,Z9],"html"),xk=z9([Y9,WK,J9,W9,Z9],"svg");var XK={}.hasOwnProperty;function eY(e,t){let n=t||{};function r(a,...o){let i=r.invalid,A=r.handlers;if(a&&XK.call(a,e)){let s=String(a[e]);i=XK.call(A,s)?A[s]:r.unknown}if(i)return i.call(this,a,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var RCe=/["&'<>`]/g,$Ce=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,MCe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,jCe=/[|\\{}()[\]^$+*?.]/g,tY=new WeakMap;function nY(e,t){if(e=e.replace(t.subset?PCe(t.subset):RCe,r),t.subset||t.escapeOnly)return e;return e.replace($Ce,n).replace(MCe,r);function n(a,o,i){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),t)}function r(a,o,i){return t.format(a.charCodeAt(0),i.charCodeAt(o+1),t)}}function PCe(e){let t=tY.get(e);return t||(t=TCe(e),tY.set(e,t)),t}function TCe(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(jCe,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}var HCe=/[\dA-Fa-f]/;function aY(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!HCe.test(String.fromCharCode(t))?r:r+";"}var GCe=/\d/;function rY(e,t,n){let r="&#"+String(e);return n&&t&&!GCe.test(String.fromCharCode(t))?r:r+";"}var oY=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"];var Dk={nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",fnof:"\u0192",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",bull:"\u2022",hellip:"\u2026",prime:"\u2032",Prime:"\u2033",oline:"\u203E",frasl:"\u2044",weierp:"\u2118",image:"\u2111",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",quot:'"',amp:"&",lt:"<",gt:">",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",circ:"\u02C6",tilde:"\u02DC",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",permil:"\u2030",lsaquo:"\u2039",rsaquo:"\u203A",euro:"\u20AC"};var iY=["cent","copy","divide","gt","lt","not","para","times"];var AY={}.hasOwnProperty,X9={},Fk;for(Fk in Dk)AY.call(Dk,Fk)&&(X9[Dk[Fk]]=Fk);var UCe=/[^\dA-Za-z]/;function sY(e,t,n,r){let a=String.fromCharCode(e);if(AY.call(X9,a)){let o=X9[a],i="&"+o;return n&&oY.includes(o)&&!iY.includes(o)&&(!r||t&&t!==61&&UCe.test(String.fromCharCode(t)))?i:i+";"}return""}function cY(e,t,n){let r=aY(e,t,n.omitOptionalSemicolons),a;if((n.useNamedReferences||n.useShortestReferences)&&(a=sY(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){let o=rY(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return a&&(!n.useShortestReferences||a.length<r.length)?a:r}function Js(e,t){return nY(e,Object.assign({format:cY},t))}var OCe=/^>|^->|<!--|-->|--!>|<!-$/g,qCe=[">"],zCe=["<",">"];function uY(e,t,n,r){return r.settings.bogusComments?"<?"+Js(e.value,Object.assign({},r.settings.characterReferences,{subset:qCe}))+">":"<!--"+e.value.replace(OCe,a)+"-->";function a(o){return Js(o,Object.assign({},r.settings.characterReferences,{subset:zCe}))}}function dY(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function e6(e,t){let n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function lY(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function pY(e){return e.join(" ").trim()}var KCe=/[ \t\n\f\r]/g;function el(e){return typeof e=="object"?e.type==="text"?mY(e.value):!1:mY(e)}function mY(e){return e.replace(KCe,"")===""}var Pn=gY(1),t6=gY(-1),YCe=[];function gY(e){return t;function t(n,r,a){let o=n?n.children:YCe,i=(r||0)+e,A=o[i];if(!a)for(;A&&el(A);)i+=e,A=o[i];return A}}var JCe={}.hasOwnProperty;function Sk(e){return t;function t(n,r,a){return JCe.call(e,n.tagName)&&e[n.tagName](n,r,a)}}var $h=Sk({body:ZCe,caption:n6,colgroup:n6,dd:twe,dt:ewe,head:n6,html:WCe,li:XCe,optgroup:nwe,option:awe,p:VCe,rp:fY,rt:fY,tbody:owe,td:bY,tfoot:iwe,th:bY,thead:rwe,tr:Awe});function n6(e,t,n){let r=Pn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&el(r.value.charAt(0)))}function WCe(e,t,n){let r=Pn(n,t);return!r||r.type!=="comment"}function ZCe(e,t,n){let r=Pn(n,t);return!r||r.type!=="comment"}function VCe(e,t,n){let r=Pn(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function XCe(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function ewe(e,t,n){let r=Pn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function twe(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function fY(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function nwe(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function awe(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function rwe(e,t,n){let r=Pn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function owe(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function iwe(e,t,n){return!Pn(n,t)}function Awe(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function bY(e,t,n){let r=Pn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}var hY=Sk({body:uwe,colgroup:dwe,head:cwe,html:swe,tbody:lwe});function swe(e){let t=Pn(e,-1);return!t||t.type!=="comment"}function cwe(e){let t=new Set;for(let r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}let n=e.children[0];return!n||n.type==="element"}function uwe(e){let t=Pn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&el(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function dwe(e,t,n){let r=t6(n,t),a=Pn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&$h(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function lwe(e,t,n){let r=t6(n,t),a=Pn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&$h(r,n.children.indexOf(r),n)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}var Nk={name:[[`
72
72
  \f\r &/=>`.split(""),`