@pagelines/widget 1.0.846 → 1.0.848

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/widget.js +14 -14
  2. package/package.json +2 -2
package/dist/widget.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";(()=>{var J2=Object.defineProperty;var O=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(i){throw n=[i],i}};var Nr=(e,t)=>{for(var n in t)J2(e,n,{get:t[n],enumerable:!0})};var q2,Yb,mn=O(()=>{"use strict";q2=Object.defineProperty,Yb=(e,t)=>q2(e,"name",{value:t,configurable:!0})});var Yi,Xb=O(()=>{"use strict";Yi={appName:"pagelines-app",port:3222,primaryRegion:"lax",demoAgentHandle:"pagelines-demo",urls:{app:"https://www.pagelines.com",dev:"https://dev-api.pagelines.com",appStore:"https://apps.apple.com/us/app/pagelines/id6764094785"}}});function E(e,t,n){function i(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let m=d[p];m in s||(s[m]=u[m].bind(s))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(s){var c;let u=n?.Parent?new o:this;i(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function yt(e){return e&&Object.assign(hi,e),hi}var Qb,Fd,Bd,Cr,Un,hi,gi=O(()=>{Fd=Object.freeze({status:"aborted"});Bd=Symbol("zod_brand"),Cr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Un=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Qb=globalThis).__zod_globalConfig??(Qb.__zod_globalConfig={});hi=globalThis.__zod_globalConfig});var Q={};Nr(Q,{BIGINT_FORMAT_RANGES:()=>Qd,Class:()=>Hd,NUMBER_FORMAT_RANGES:()=>Xd,aborted:()=>Fn,allowsEval:()=>Gd,assert:()=>tI,assertEqual:()=>Y2,assertIs:()=>Q2,assertNever:()=>eI,assertNotEqual:()=>X2,assignProp:()=>Ln,base64ToUint8Array:()=>ty,base64urlToUint8Array:()=>bI,cached:()=>Qi,captureStackTrace:()=>vl,cleanEnum:()=>vI,cleanRegex:()=>ka,clone:()=>Kt,cloneDef:()=>nI,createTransparentProxy:()=>cI,defineLazy:()=>Ce,esc:()=>gl,escapeRegex:()=>xr,explicitlyAborted:()=>ep,extend:()=>pI,finalizeIssue:()=>Wt,floatSafeRemainder:()=>Kd,getElementAtPath:()=>iI,getEnumValues:()=>wa,getLengthableOrigin:()=>Sa,getParsedType:()=>lI,getSizableOrigin:()=>$a,hexToUint8Array:()=>xI,isObject:()=>vi,isPlainObject:()=>Vn,issue:()=>eo,joinValues:()=>P,jsonStringifyReplacer:()=>Xi,merge:()=>fI,mergeDefs:()=>fn,normalizeParams:()=>ne,nullish:()=>jn,numKeys:()=>sI,objectClone:()=>rI,omit:()=>dI,optionalKeys:()=>Yd,parsedType:()=>q,partial:()=>hI,pick:()=>uI,prefixIssues:()=>ir,primitiveTypes:()=>qd,promiseAllObject:()=>oI,propertyKeyTypes:()=>_a,randomString:()=>aI,required:()=>gI,safeExtend:()=>mI,shallowClone:()=>Jd,slugify:()=>Wd,stringifyPrimitive:()=>J,uint8ArrayToBase64:()=>ry,uint8ArrayToBase64url:()=>yI,uint8ArrayToHex:()=>wI,unwrapMessage:()=>xa});function Y2(e){return e}function X2(e){return e}function Q2(e){}function eI(e){throw new Error("Unexpected value in exhaustive check")}function tI(e){}function wa(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function P(e,t="|"){return e.map(n=>J(n)).join(t)}function Xi(e,t){return typeof t=="bigint"?t.toString():t}function Qi(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function jn(e){return e==null}function ka(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Kd(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}function Ce(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==ey)return i===void 0&&(i=ey,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function rI(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Ln(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fn(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function nI(e){return fn(e._zod.def)}function iI(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function oI(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function aI(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function gl(e){return JSON.stringify(e)}function Wd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function vi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Vn(e){if(vi(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(vi(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Jd(e){return Vn(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function sI(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function xr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Kt(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}function ne(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function cI(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function J(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Yd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function uI(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=fn(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return Ln(this,"shape",a),a},checks:[]});return Kt(e,o)}function dI(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=fn(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return Ln(this,"shape",a),a},checks:[]});return Kt(e,o)}function pI(e,t){if(!Vn(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=fn(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Ln(this,"shape",o),o}});return Kt(e,r)}function mI(e,t){if(!Vn(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=fn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Ln(this,"shape",i),i}});return Kt(e,n)}function fI(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=fn(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return Ln(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Kt(e,n)}function hI(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=fn(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let u in n){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return Ln(this,"shape",c),c},checks:[]});return Kt(t,a)}function gI(e,t,n){let i=fn(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return Ln(this,"shape",o),o}});return Kt(t,i)}function Fn(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ep(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function ir(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function xa(e){return typeof e=="string"?e:e?.message}function Wt(e,t,n){let i=e.message?e.message:xa(e.inst?._zod.def?.error?.(e))??xa(t?.error?.(e))??xa(n.customError?.(e))??xa(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function $a(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Sa(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function q(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function eo(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function vI(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function ty(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function ry(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function bI(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return ty(t+n)}function yI(e){return ry(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function xI(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function wI(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var ey,vl,Gd,lI,_a,qd,Xd,Qd,Hd,ve=O(()=>{gi();ey=Symbol("evaluating");vl="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Gd=Qi(()=>{if(hi.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});lI=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},_a=new Set(["string","number","symbol"]),qd=new Set(["string","number","bigint","boolean","symbol","undefined"]);Xd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Qd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Hd=class{constructor(...t){}}});function Ia(e,t=n=>n.message){let n={},i=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function Ta(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,u=0;for(;u<s.length;){let d=s[u];u===s.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}}};return i(e),n}function tp(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>i({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")i({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")i({issues:c.issues},[...o,...c.path]);else{let u=[...o,...c.path];if(u.length===0){n.errors.push(t(c));continue}let d=n,p=0;for(;p<u.length;){let m=u[p],f=p===u.length-1;typeof m=="string"?(d.properties??(d.properties={}),(a=d.properties)[m]??(a[m]={errors:[]}),d=d.properties[m]):(d.items??(d.items=[]),(s=d.items)[m]??(s[m]={errors:[]}),d=d.items[m]),f&&d.errors.push(t(c)),p++}}};return i(e),n}function iy(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function rp(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${iy(i.path)}`);return t.join(`
2
2
  `)}var ny,Ea,or,np=O(()=>{gi();ve();ny=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Xi,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ea=E("$ZodError",ny),or=E("$ZodError",ny,{Parent:Error})});var to,bl,ro,yl,no,ip,io,op,xl,_I,wl,$I,kl,SI,_l,EI,$l,II,Sl,TI,El,zI,Il,NI,ap=O(()=>{gi();np();ve();to=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Cr;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>Wt(c,o,yt())));throw vl(s,r?.callee),s}return a.value},bl=to(or),ro=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>Wt(c,o,yt())));throw vl(s,r?.callee),s}return a.value},yl=ro(or),no=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Cr;return o.issues.length?{success:!1,error:new(e??Ea)(o.issues.map(a=>Wt(a,r,yt())))}:{success:!0,data:o.value}},ip=no(or),io=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>Wt(a,r,yt())))}:{success:!0,data:o.value}},op=io(or),xl=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return to(e)(t,n,r)},_I=xl(or),wl=e=>(t,n,i)=>to(e)(t,n,i),$I=wl(or),kl=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return ro(e)(t,n,r)},SI=kl(or),_l=e=>async(t,n,i)=>ro(e)(t,n,i),EI=_l(or),$l=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return no(e)(t,n,r)},II=$l(or),Sl=e=>(t,n,i)=>no(e)(t,n,i),TI=Sl(or),El=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return io(e)(t,n,r)},zI=El(or),Il=e=>async(t,n,i)=>io(e)(t,n,i),NI=Il(or)});var ur={};Nr(ur,{base64:()=>kp,base64url:()=>Tl,bigint:()=>zp,boolean:()=>Cp,browserEmail:()=>UI,cidrv4:()=>xp,cidrv6:()=>wp,cuid:()=>sp,cuid2:()=>lp,date:()=>Sp,datetime:()=>Ip,domain:()=>VI,duration:()=>mp,e164:()=>$p,email:()=>hp,emoji:()=>gp,extendedDuration:()=>CI,guid:()=>fp,hex:()=>FI,hostname:()=>LI,html5Email:()=>PI,httpProtocol:()=>_p,idnEmail:()=>MI,integer:()=>Np,ipv4:()=>vp,ipv6:()=>bp,ksuid:()=>dp,lowercase:()=>Dp,mac:()=>yp,md5_base64:()=>ZI,md5_base64url:()=>HI,md5_hex:()=>BI,nanoid:()=>pp,null:()=>Ap,number:()=>zl,rfc5322Email:()=>RI,sha1_base64:()=>WI,sha1_base64url:()=>GI,sha1_hex:()=>KI,sha256_base64:()=>qI,sha256_base64url:()=>YI,sha256_hex:()=>JI,sha384_base64:()=>QI,sha384_base64url:()=>eT,sha384_hex:()=>XI,sha512_base64:()=>rT,sha512_base64url:()=>nT,sha512_hex:()=>tT,string:()=>Tp,time:()=>Ep,ulid:()=>cp,undefined:()=>Op,unicodeEmail:()=>oy,uppercase:()=>Pp,uuid:()=>bi,uuid4:()=>AI,uuid6:()=>OI,uuid7:()=>DI,xid:()=>up});function gp(){return new RegExp(jI,"u")}function sy(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Ep(e){return new RegExp(`^${sy(e)}$`)}function Ip(e){let t=sy({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${ay}T(?:${i})$`)}function za(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Na(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var sp,lp,cp,up,dp,pp,mp,CI,fp,bi,AI,OI,DI,hp,PI,RI,oy,MI,UI,jI,vp,bp,yp,xp,wp,kp,Tl,LI,VI,_p,$p,ay,Sp,Tp,zp,Np,zl,Cp,Ap,Op,Dp,Pp,FI,BI,ZI,HI,KI,WI,GI,JI,qI,YI,XI,QI,eT,tT,rT,nT,Nl=O(()=>{ve();sp=/^[cC][0-9a-z]{6,}$/,lp=/^[0-9a-z]+$/,cp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,up=/^[0-9a-vA-V]{20}$/,dp=/^[A-Za-z0-9]{27}$/,pp=/^[a-zA-Z0-9_-]{21}$/,mp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CI=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,fp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bi=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,AI=bi(4),OI=bi(6),DI=bi(7),hp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,PI=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,RI=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,oy=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,MI=oy,UI=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,jI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";vp=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,yp=e=>{let t=xr(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},xp=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,wp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Tl=/^[A-Za-z0-9_-]*$/,LI=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,VI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,_p=/^https?$/,$p=/^\+[1-9]\d{6,14}$/,ay="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Sp=new RegExp(`^${ay}$`);Tp=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},zp=/^-?\d+n?$/,Np=/^-?\d+$/,zl=/^-?\d+(?:\.\d+)?$/,Cp=/^(?:true|false)$/i,Ap=/^null$/i,Op=/^undefined$/i,Dp=/^[^A-Z]*$/,Pp=/^[^a-z]*$/,FI=/^[0-9a-fA-F]*$/;BI=/^[0-9a-fA-F]{32}$/,ZI=za(22,"=="),HI=Na(22),KI=/^[0-9a-fA-F]{40}$/,WI=za(27,"="),GI=Na(27),JI=/^[0-9a-fA-F]{64}$/,qI=za(43,"="),YI=Na(43),XI=/^[0-9a-fA-F]{96}$/,QI=za(64,""),eT=Na(64),tT=/^[0-9a-fA-F]{128}$/,rT=za(86,"=="),nT=Na(86)});function ly(e,t,n){e.issues.length&&t.issues.push(...ir(n,e.issues))}var at,cy,Cl,Al,Rp,Mp,Up,jp,Lp,Vp,Fp,Bp,Zp,oo,Hp,Kp,Wp,Gp,Jp,qp,Yp,Xp,Qp,Ol=O(()=>{gi();Nl();ve();at=E("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),cy={number:"number",bigint:"bigint",object:"date"},Cl=E("$ZodCheckLessThan",(e,t)=>{at.init(e,t);let n=cy[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Al=E("$ZodCheckGreaterThan",(e,t)=>{at.init(e,t);let n=cy[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Rp=E("$ZodCheckMultipleOf",(e,t)=>{at.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Kd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Mp=E("$ZodCheckNumberFormat",(e,t)=>{at.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=Xd[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=o,n&&(s.pattern=Np)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Up=E("$ZodCheckBigIntFormat",(e,t)=>{at.init(e,t);let[n,i]=Qd[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),jp=E("$ZodCheckMaxSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!jn(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:$a(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Lp=E("$ZodCheckMinSize",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!jn(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:$a(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Vp=E("$ZodCheckSizeEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!jn(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:$a(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Fp=E("$ZodCheckMaxLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!jn(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=Sa(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bp=E("$ZodCheckMinLength",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!jn(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=Sa(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zp=E("$ZodCheckLengthEquals",(e,t)=>{var n;at.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!jn(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=Sa(r),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),oo=E("$ZodCheckStringFormat",(e,t)=>{var n,i;at.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Hp=E("$ZodCheckRegex",(e,t)=>{oo.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Kp=E("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Dp),oo.init(e,t)}),Wp=E("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Pp),oo.init(e,t)}),Gp=E("$ZodCheckIncludes",(e,t)=>{at.init(e,t);let n=xr(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Jp=E("$ZodCheckStartsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`^${xr(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),qp=E("$ZodCheckEndsWith",(e,t)=>{at.init(e,t);let n=new RegExp(`.*${xr(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});Yp=E("$ZodCheckProperty",(e,t)=>{at.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>ly(r,n,t.property));ly(i,n,t.property)}}),Xp=E("$ZodCheckMimeType",(e,t)=>{at.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),Qp=E("$ZodCheckOverwrite",(e,t)=>{at.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var Ca,em=O(()=>{Ca=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
3
3
  `).filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,r.join(`
4
- `))}}});var tm,rm=O(()=>{tm={major:4,minor:4,patch:3}});function $m(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function Sy(e){if(!Tl.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return $m(n)}function Ey(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}function dy(e,t,n){e.issues.length&&t.issues.push(...ir(n,e.issues)),t.value[n]=e.value}function Ml(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...ir(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Iy(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Yd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ty(e,t,n,i,r,o){let a=[],s=r.keySet,c=r.catchall._zod,u=c.def.type,d=c.optin==="optional",p=c.optout==="optional";for(let m in t){if(m==="__proto__"||s.has(m))continue;if(u==="never"){a.push(m);continue}let f=c.run({value:t[m],issues:[]},i);f instanceof Promise?e.push(f.then(S=>Ml(S,n,m,t,d,p))):Ml(f,n,m,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}function py(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!Fn(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Wt(a,i,yt())))}),t)}function my(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Wt(a,i,yt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}function nm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Vn(e)&&Vn(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=nm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=nm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fy(e,t,n){let i=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else e.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&r&&e.issues.push({...r,keys:o}),Fn(e))return e;let a=nm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}function hy(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function gy(e,t,n){e.issues.length&&t.issues.push(...ir(n,e.issues)),t.value[n]=e.value}function vy(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...ir(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}function by(e,t,n,i,r,o,a){e.issues.length&&(_a.has(typeof i)?n.issues.push(...ir(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>Wt(s,a,yt()))})),t.issues.length&&(_a.has(typeof i)?n.issues.push(...ir(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>Wt(s,a,yt()))})),n.value.set(e.value,t.value)}function yy(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function xy(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function wy(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function ky(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Dl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function Pl(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>Rl(e,o,t.out,n)):Rl(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Rl(e,o,t.in,n)):Rl(e,r,t.in,n)}}function Rl(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}function _y(e){return e.value=Object.freeze(e.value),e}function $y(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(eo(r))}}var Ee,yi,nt,im,om,am,sm,lm,cm,um,dm,pm,mm,fm,hm,gm,vm,bm,ym,xm,wm,km,_m,Sm,Em,Im,Tm,zm,Ul,Nm,Aa,jl,Cm,Am,Om,Dm,Pm,Rm,Mm,Um,jm,Lm,zy,Vm,Oa,Fm,Bm,Zm,Ll,Hm,Km,Wm,Gm,Jm,qm,Ym,Vl,Xm,Qm,ef,tf,rf,nf,of,af,Fl,Da,sf,lf,cf,uf,df,pf,mf,ff=O(()=>{Ol();gi();em();ap();Nl();ve();rm();ve();Ee=E("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let u=Fn(a),d;for(let p of s){if(p._zod.def.when){if(ep(a)||!p._zod.def.when(a))continue}else if(u)continue;let m=a.issues.length,f=p._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Cr;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,a.issues.length!==m&&(u||(u=Fn(a,m)))});else{if(a.issues.length===m)continue;u||(u=Fn(a,m))}}return d?d.then(()=>a):a},o=(a,s,c)=>{if(Fn(a))return a.aborted=!0,a;let u=r(s,i,c);if(u instanceof Promise){if(c.async===!1)throw new Cr;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>o(d,a,s)):o(u,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Cr;return c.then(u=>r(u,i,s))}return r(c,i,s)}}Ce(e,"~standard",()=>({validate:r=>{try{let o=ip(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return op(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),yi=E("$ZodString",(e,t)=>{Ee.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tp(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),nt=E("$ZodStringFormat",(e,t)=>{oo.init(e,t),yi.init(e,t)}),im=E("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fp),nt.init(e,t)}),om=E("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=bi(i))}else t.pattern??(t.pattern=bi());nt.init(e,t)}),am=E("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=hp),nt.init(e,t)}),sm=E("$ZodURL",(e,t)=>{nt.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===_p.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),lm=E("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=gp()),nt.init(e,t)}),cm=E("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=pp),nt.init(e,t)}),um=E("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=sp),nt.init(e,t)}),dm=E("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lp),nt.init(e,t)}),pm=E("$ZodULID",(e,t)=>{t.pattern??(t.pattern=cp),nt.init(e,t)}),mm=E("$ZodXID",(e,t)=>{t.pattern??(t.pattern=up),nt.init(e,t)}),fm=E("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=dp),nt.init(e,t)}),hm=E("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ip(t)),nt.init(e,t)}),gm=E("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Sp),nt.init(e,t)}),vm=E("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ep(t)),nt.init(e,t)}),bm=E("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=mp),nt.init(e,t)}),ym=E("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vp),nt.init(e,t),e._zod.bag.format="ipv4"}),xm=E("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bp),nt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),wm=E("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=yp(t.delimiter)),nt.init(e,t),e._zod.bag.format="mac"}),km=E("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=xp),nt.init(e,t)}),_m=E("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wp),nt.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});Sm=E("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kp),nt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{$m(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});Em=E("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Tl),nt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Sy(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Im=E("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$p),nt.init(e,t)});Tm=E("$ZodJWT",(e,t)=>{nt.init(e,t),e._zod.check=n=>{Ey(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),zm=E("$ZodCustomStringFormat",(e,t)=>{nt.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Ul=E("$ZodNumber",(e,t)=>{Ee.init(e,t),e._zod.pattern=e._zod.bag.pattern??zl,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Nm=E("$ZodNumberFormat",(e,t)=>{Mp.init(e,t),Ul.init(e,t)}),Aa=E("$ZodBoolean",(e,t)=>{Ee.init(e,t),e._zod.pattern=Cp,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),jl=E("$ZodBigInt",(e,t)=>{Ee.init(e,t),e._zod.pattern=zp,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Cm=E("$ZodBigIntFormat",(e,t)=>{Up.init(e,t),jl.init(e,t)}),Am=E("$ZodSymbol",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Om=E("$ZodUndefined",(e,t)=>{Ee.init(e,t),e._zod.pattern=Op,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Dm=E("$ZodNull",(e,t)=>{Ee.init(e,t),e._zod.pattern=Ap,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Pm=E("$ZodAny",(e,t)=>{Ee.init(e,t),e._zod.parse=n=>n}),Rm=E("$ZodUnknown",(e,t)=>{Ee.init(e,t),e._zod.parse=n=>n}),Mm=E("$ZodNever",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Um=E("$ZodVoid",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),jm=E("$ZodDate",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});Lm=E("$ZodArray",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(u=>dy(u,n,a))):dy(c,n,a)}return o.length?Promise.all(o).then(()=>n):n}});zy=E("$ZodObject",(e,t)=>{if(Ee.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let i=Qi(()=>Iy(t));Ce(e._zod,"propValues",()=>{let s=t.shape,c={};for(let u in s){let d=s[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(let p of d.values)c[u].add(p)}}return c});let r=vi,o=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=i.value);let u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let d=[],p=a.shape;for(let m of a.keys){let f=p[m],S=f._zod.optin==="optional",z=f._zod.optout==="optional",T=f._zod.run({value:u[m],issues:[]},c);T instanceof Promise?d.push(T.then(L=>Ml(L,s,m,u,S,z))):Ml(T,s,m,u,S,z)}return o?Ty(d,u,s,c,i.value,e):d.length?Promise.all(d).then(()=>s):s}}),Vm=E("$ZodObjectJIT",(e,t)=>{zy.init(e,t);let n=e._zod.parse,i=Qi(()=>Iy(t)),r=m=>{let f=new Ca(["shape","payload","ctx"]),S=i.value,z=D=>{let U=gl(D);return`shape[${U}]._zod.run({ value: input[${U}], issues: [] }, ctx)`};f.write("const input = payload.value;");let T=Object.create(null),L=0;for(let D of S.keys)T[D]=`key_${L++}`;f.write("const newResult = {};");for(let D of S.keys){let U=T[D],$=gl(D),F=m[D],se=F?._zod?.optin==="optional",he=F?._zod?.optout==="optional";f.write(`const ${U} = ${z(D)};`),se&&he?f.write(`
4
+ `))}}});var tm,rm=O(()=>{tm={major:4,minor:4,patch:3}});function $m(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}function Sy(e){if(!Tl.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return $m(n)}function Ey(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}function dy(e,t,n){e.issues.length&&t.issues.push(...ir(n,e.issues)),t.value[n]=e.value}function Ml(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...ir(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Iy(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Yd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Ty(e,t,n,i,r,o){let a=[],s=r.keySet,c=r.catchall._zod,u=c.def.type,d=c.optin==="optional",p=c.optout==="optional";for(let m in t){if(m==="__proto__"||s.has(m))continue;if(u==="never"){a.push(m);continue}let f=c.run({value:t[m],issues:[]},i);f instanceof Promise?e.push(f.then(S=>Ml(S,n,m,t,d,p))):Ml(f,n,m,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}function py(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!Fn(o));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Wt(a,i,yt())))}),t)}function my(e,t,n,i){let r=e.filter(o=>o.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>Wt(a,i,yt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}function nm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Vn(e)&&Vn(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=nm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=nm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function fy(e,t,n){let i=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else e.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&r&&e.issues.push({...r,keys:o}),Fn(e))return e;let a=nm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}function hy(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function gy(e,t,n){e.issues.length&&t.issues.push(...ir(n,e.issues)),t.value[n]=e.value}function vy(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...ir(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}function by(e,t,n,i,r,o,a){e.issues.length&&(_a.has(typeof i)?n.issues.push(...ir(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>Wt(s,a,yt()))})),t.issues.length&&(_a.has(typeof i)?n.issues.push(...ir(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>Wt(s,a,yt()))})),n.value.set(e.value,t.value)}function yy(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function xy(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}function wy(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function ky(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function Dl(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}function Pl(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>Rl(e,o,t.out,n)):Rl(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>Rl(e,o,t.in,n)):Rl(e,r,t.in,n)}}function Rl(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}function _y(e){return e.value=Object.freeze(e.value),e}function $y(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(eo(r))}}var Ee,yi,nt,im,om,am,sm,lm,cm,um,dm,pm,mm,fm,hm,gm,vm,bm,ym,xm,wm,km,_m,Sm,Em,Im,Tm,zm,Ul,Nm,Aa,jl,Cm,Am,Om,Dm,Pm,Rm,Mm,Um,jm,Lm,zy,Vm,Oa,Fm,Bm,Zm,Ll,Hm,Km,Wm,Gm,Jm,qm,Ym,Vl,Xm,Qm,ef,tf,rf,nf,of,af,Fl,Da,sf,lf,cf,uf,df,pf,mf,ff=O(()=>{Ol();gi();em();ap();Nl();ve();rm();ve();Ee=E("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let u=Fn(a),d;for(let p of s){if(p._zod.def.when){if(ep(a)||!p._zod.def.when(a))continue}else if(u)continue;let m=a.issues.length,f=p._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Cr;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,a.issues.length!==m&&(u||(u=Fn(a,m)))});else{if(a.issues.length===m)continue;u||(u=Fn(a,m))}}return d?d.then(()=>a):a},o=(a,s,c)=>{if(Fn(a))return a.aborted=!0,a;let u=r(s,i,c);if(u instanceof Promise){if(c.async===!1)throw new Cr;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>o(d,a,s)):o(u,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Cr;return c.then(u=>r(u,i,s))}return r(c,i,s)}}Ce(e,"~standard",()=>({validate:r=>{try{let o=ip(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return op(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),yi=E("$ZodString",(e,t)=>{Ee.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Tp(e._zod.bag),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),nt=E("$ZodStringFormat",(e,t)=>{oo.init(e,t),yi.init(e,t)}),im=E("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fp),nt.init(e,t)}),om=E("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=bi(i))}else t.pattern??(t.pattern=bi());nt.init(e,t)}),am=E("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=hp),nt.init(e,t)}),sm=E("$ZodURL",(e,t)=>{nt.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===_p.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(i);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),lm=E("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=gp()),nt.init(e,t)}),cm=E("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=pp),nt.init(e,t)}),um=E("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=sp),nt.init(e,t)}),dm=E("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=lp),nt.init(e,t)}),pm=E("$ZodULID",(e,t)=>{t.pattern??(t.pattern=cp),nt.init(e,t)}),mm=E("$ZodXID",(e,t)=>{t.pattern??(t.pattern=up),nt.init(e,t)}),fm=E("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=dp),nt.init(e,t)}),hm=E("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ip(t)),nt.init(e,t)}),gm=E("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Sp),nt.init(e,t)}),vm=E("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ep(t)),nt.init(e,t)}),bm=E("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=mp),nt.init(e,t)}),ym=E("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=vp),nt.init(e,t),e._zod.bag.format="ipv4"}),xm=E("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bp),nt.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),wm=E("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=yp(t.delimiter)),nt.init(e,t),e._zod.bag.format="mac"}),km=E("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=xp),nt.init(e,t)}),_m=E("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wp),nt.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});Sm=E("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=kp),nt.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{$m(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});Em=E("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Tl),nt.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Sy(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Im=E("$ZodE164",(e,t)=>{t.pattern??(t.pattern=$p),nt.init(e,t)});Tm=E("$ZodJWT",(e,t)=>{nt.init(e,t),e._zod.check=n=>{Ey(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),zm=E("$ZodCustomStringFormat",(e,t)=>{nt.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Ul=E("$ZodNumber",(e,t)=>{Ee.init(e,t),e._zod.pattern=e._zod.bag.pattern??zl,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let o=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...o?{received:o}:{}}),n}}),Nm=E("$ZodNumberFormat",(e,t)=>{Mp.init(e,t),Ul.init(e,t)}),Aa=E("$ZodBoolean",(e,t)=>{Ee.init(e,t),e._zod.pattern=Cp,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),jl=E("$ZodBigInt",(e,t)=>{Ee.init(e,t),e._zod.pattern=zp,e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Cm=E("$ZodBigIntFormat",(e,t)=>{Up.init(e,t),jl.init(e,t)}),Am=E("$ZodSymbol",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Om=E("$ZodUndefined",(e,t)=>{Ee.init(e,t),e._zod.pattern=Op,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Dm=E("$ZodNull",(e,t)=>{Ee.init(e,t),e._zod.pattern=Ap,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Pm=E("$ZodAny",(e,t)=>{Ee.init(e,t),e._zod.parse=n=>n}),Rm=E("$ZodUnknown",(e,t)=>{Ee.init(e,t),e._zod.parse=n=>n}),Mm=E("$ZodNever",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Um=E("$ZodVoid",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),jm=E("$ZodDate",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});Lm=E("$ZodArray",(e,t)=>{Ee.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let o=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(u=>dy(u,n,a))):dy(c,n,a)}return o.length?Promise.all(o).then(()=>n):n}});zy=E("$ZodObject",(e,t)=>{if(Ee.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let i=Qi(()=>Iy(t));Ce(e._zod,"propValues",()=>{let s=t.shape,c={};for(let u in s){let d=s[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(let p of d.values)c[u].add(p)}}return c});let r=vi,o=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=i.value);let u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let d=[],p=a.shape;for(let m of a.keys){let f=p[m],S=f._zod.optin==="optional",z=f._zod.optout==="optional",T=f._zod.run({value:u[m],issues:[]},c);T instanceof Promise?d.push(T.then(L=>Ml(L,s,m,u,S,z))):Ml(T,s,m,u,S,z)}return o?Ty(d,u,s,c,i.value,e):d.length?Promise.all(d).then(()=>s):s}}),Vm=E("$ZodObjectJIT",(e,t)=>{zy.init(e,t);let n=e._zod.parse,i=Qi(()=>Iy(t)),r=m=>{let f=new Ca(["shape","payload","ctx"]),S=i.value,z=D=>{let U=gl(D);return`shape[${U}]._zod.run({ value: input[${U}], issues: [] }, ctx)`};f.write("const input = payload.value;");let T=Object.create(null),L=0;for(let D of S.keys)T[D]=`key_${L++}`;f.write("const newResult = {};");for(let D of S.keys){let U=T[D],$=gl(D),B=m[D],se=B?._zod?.optin==="optional",he=B?._zod?.optout==="optional";f.write(`const ${U} = ${z(D)};`),se&&he?f.write(`
5
5
  if (${U}.issues.length) {
6
6
  if (${$} in input) {
7
7
  payload.issues = payload.issues.concat(${U}.issues.map(iss => ({
@@ -69,15 +69,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
69
69
  * @vue/shared v3.5.40
70
70
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
71
71
  * @license MIT
72
- **/qe={},Ei=[],qt=()=>{},kv=()=>!1,Po=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ro=e=>e.startsWith("onUpdate:"),ut=Object.assign,ss=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},lz=Object.prototype.hasOwnProperty,Ve=(e,t)=>lz.call(e,t),xe=Array.isArray,Ii=e=>ls(e)==="[object Map]",mu=e=>ls(e)==="[object Set]",T_=e=>ls(e)==="[object Date]",Se=e=>typeof e=="function",ot=e=>typeof e=="string",sr=e=>typeof e=="symbol",Le=e=>e!==null&&typeof e=="object",_v=e=>(Le(e)||Se(e))&&Se(e.then)&&Se(e.catch),N_=Object.prototype.toString,ls=e=>N_.call(e),$v=e=>ls(e).slice(8,-1),fu=e=>ls(e)==="[object Object]",hu=e=>ot(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Mo=Do(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gu=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},cz=/-\w/g,Et=gu(e=>e.replace(cz,t=>t.slice(1).toUpperCase())),uz=/\B([A-Z])/g,Kr=gu(e=>e.replace(uz,"-$1").toLowerCase()),Ti=gu(e=>e.charAt(0).toUpperCase()+e.slice(1)),cs=gu(e=>e?`on${Ti(e)}`:""),wr=(e,t)=>!Object.is(e,t),Uo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},jo=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},us=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Sv=e=>{let t=ot(e)?Number(e):NaN;return isNaN(t)?e:t},qn=()=>z_||(z_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});dz=/;(?![^(]*\))/g,pz=/:([^]+)/,mz=/\/\*[^]*?\*\//g;C_="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",A_=Do(C_),hz=Do(C_+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");O_=e=>!!(e&&e.__v_isRef===!0),ce=e=>ot(e)?e:e==null?"":xe(e)||Le(e)&&(e.toString===N_||!Se(e.toString))?O_(e)?ce(e.value):JSON.stringify(e,D_,2):String(e),D_=(e,t)=>O_(t)?D_(e,t.value):Ii(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,r],o)=>(n[wv(i,o)+" =>"]=r,n),{})}:mu(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>wv(n))}:sr(t)?wv(t):Le(t)&&!xe(t)&&!fu(t)?String(t):t,wv=(e,t="")=>{var n;return sr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e}});function vz(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function M_(){return Dt}function j_(e,t=!1){if(e.flags|=8,t){e.next=hs,hs=e;return}e.next=fs,fs=e}function Mv(){U_++}function Uv(){if(--U_>0)return;if(hs){let t=hs;for(hs=void 0;t;){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;fs;){let t=fs;for(fs=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function L_(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function V_(e){let t,n=e.depsTail,i=n;for(;i;){let r=i.prevDep;i.version===-1?(i===n&&(n=r),jv(i),bz(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=t,e.depsTail=n}function zv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(F_(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function F_(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vs)||(e.globalVersion=vs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zv(e))))return;e.flags|=2;let t=e.dep,n=dt,i=Dr;dt=e,Dr=!0;try{L_(e);let r=e.fn(e._value);(t.version===0||wr(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{dt=n,Dr=i,V_(e),e.flags&=-3}}function jv(e,t=!1){let{dep:n,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)jv(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function bz(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function qr(){B_.push(Dr),Dr=!1}function Yr(){let e=B_.pop();Dr=e===void 0?!0:e}function P_(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=dt;dt=void 0;try{t()}finally{dt=n}}}function Z_(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Z_(i)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}function Pt(e,t,n){if(Dr&&dt){let i=Cv.get(e);i||Cv.set(e,i=new Map);let r=i.get(n);r||(i.set(n,r=new bs),r.map=i,r.key=n),r.track()}}function Gr(e,t,n,i,r,o){let a=Cv.get(e);if(!a){vs++;return}let s=c=>{c&&c.trigger()};if(Mv(),t==="clear")a.forEach(s);else{let c=xe(e),u=c&&hu(n);if(c&&n==="length"){let d=Number(i);a.forEach((p,m)=>{(m==="length"||m===ys||!sr(m)&&m>=d)&&s(p)})}else switch((n!==void 0||a.has(void 0))&&s(a.get(n)),u&&s(a.get(ys)),t){case"add":c?u&&s(a.get("length")):(s(a.get(Ni)),Ii(e)&&s(a.get(Av)));break;case"delete":c||(s(a.get(Ni)),Ii(e)&&s(a.get(Av)));break;case"set":Ii(e)&&s(a.get(Ni));break}}Uv()}function Vo(e){let t=Pe(e);return t===e?t:(Pt(t,"iterate",ys),lr(e)?t:t.map(kr))}function xs(e){return Pt(e=Pe(e),"iterate",ys),e}function Wr(e,t){return Pr(e)?Ci($n(e)?kr(t):t):kr(t)}function Iv(e,t,n){let i=xs(e),r=i[t]();return i!==e&&!lr(e)&&(r._next=r.next,r.next=()=>{let o=r._next();return o.done||(o.value=n(o.value)),o}),r}function _n(e,t,n,i,r,o){let a=xs(e),s=a!==e&&!lr(e),c=a[t];if(c!==xz[t]){let p=c.apply(e,o);return s?kr(p):p}let u=n;a!==e&&(s?u=function(p,m){return n.call(this,Wr(e,p),m,e)}:n.length>2&&(u=function(p,m){return n.call(this,p,m,e)}));let d=c.call(a,u,i);return s&&r?r(d):d}function R_(e,t,n,i){let r=xs(e),o=r!==e&&!lr(e),a=n,s=!1;r!==e&&(o?(s=i.length===0,a=function(u,d,p){return s&&(s=!1,u=Wr(e,u)),n.call(this,u,Wr(e,d),p,e)}):n.length>3&&(a=function(u,d,p){return n.call(this,u,d,p,e)}));let c=r[t](a,...i);return s?Wr(e,c):c}function Tv(e,t,n){let i=Pe(e);Pt(i,"iterate",ys);let r=i[t](...n);return(r===-1||r===!1)&&ks(n[0])?(n[0]=Pe(n[0]),i[t](...n)):r}function ms(e,t,n=[]){qr(),Mv();let i=Pe(e)[t].apply(e,n);return Uv(),Yr(),i}function kz(e){sr(e)||(e=String(e));let t=Pe(this);return Pt(t,"has",e),t.hasOwnProperty(e)}function Ez(e,t,n){return function(...i){let r=this.__v_raw,o=Pe(r),a=Ii(o),s=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,u=r[e](...i),d=n?Dv:t?Ci:kr;return!t&&Pt(o,"iterate",c?Av:Ni),ut(Object.create(u),{next(){let{value:p,done:m}=u.next();return m?{value:p,done:m}:{value:s?[d(p[0]),d(p[1])]:d(p),done:m}}})}}function yu(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Iz(e,t){let n={get(r){let o=this.__v_raw,a=Pe(o),s=Pe(r);e||(wr(r,s)&&Pt(a,"get",r),Pt(a,"get",s));let{has:c}=bu(a),u=t?Dv:e?Ci:kr;if(c.call(a,r))return u(o.get(r));if(c.call(a,s))return u(o.get(s));o!==a&&o.get(r)},get size(){let r=this.__v_raw;return!e&&Pt(Pe(r),"iterate",Ni),r.size},has(r){let o=this.__v_raw,a=Pe(o),s=Pe(r);return e||(wr(r,s)&&Pt(a,"has",r),Pt(a,"has",s)),r===s?o.has(r):o.has(r)||o.has(s)},forEach(r,o){let a=this,s=a.__v_raw,c=Pe(s),u=t?Dv:e?Ci:kr;return!e&&Pt(c,"iterate",Ni),s.forEach((d,p)=>r.call(o,u(d),u(p),a))}};return ut(n,e?{add:yu("add"),set:yu("set"),delete:yu("delete"),clear:yu("clear")}:{add(r){let o=Pe(this),a=bu(o),s=Pe(r),c=!t&&!lr(r)&&!Pr(r)?s:r;return a.has.call(o,c)||wr(r,c)&&a.has.call(o,r)||wr(s,c)&&a.has.call(o,s)||(o.add(c),Gr(o,"add",c,c)),this},set(r,o){!t&&!lr(o)&&!Pr(o)&&(o=Pe(o));let a=Pe(this),{has:s,get:c}=bu(a),u=s.call(a,r);u||(r=Pe(r),u=s.call(a,r));let d=c.call(a,r);return a.set(r,o),u?wr(o,d)&&Gr(a,"set",r,o,d):Gr(a,"add",r,o),this},delete(r){let o=Pe(this),{has:a,get:s}=bu(o),c=a.call(o,r);c||(r=Pe(r),c=a.call(o,r));let u=s?s.call(o,r):void 0,d=o.delete(r);return c&&Gr(o,"delete",r,void 0,u),d},clear(){let r=Pe(this),o=r.size!==0,a=void 0,s=r.clear();return o&&Gr(r,"clear",void 0,void 0,a),s}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Ez(r,e,t)}),n}function Lv(e,t){let n=Iz(e,t);return(i,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(Ve(n,r)&&r in i?n:i,r,o)}function Az(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ws(e){return Pr(e)?e:Fv(e,!1,_z,Tz,K_)}function Vv(e){return Fv(e,!1,Sz,zz,W_)}function _u(e){return Fv(e,!0,$z,Nz,G_)}function Fv(e,t,n,i,r){if(!Le(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let o=r.get(e);if(o)return o;let a=Az($v(e));if(a===0)return e;let s=new Proxy(e,a===2?i:n);return r.set(e,s),s}function $n(e){return Pr(e)?$n(e.__v_raw):!!(e&&e.__v_isReactive)}function Pr(e){return!!(e&&e.__v_isReadonly)}function lr(e){return!!(e&&e.__v_isShallow)}function ks(e){return e?!!e.__v_raw:!1}function Pe(e){let t=e&&e.__v_raw;return t?Pe(t):e}function Bv(e){return!Ve(e,"__v_skip")&&Object.isExtensible(e)&&jo(e,"__v_skip",!0),e}function zt(e){return e?e.__v_isRef===!0:!1}function G(e){return J_(e,!1)}function Ye(e){return J_(e,!0)}function J_(e,t){return zt(e)?e:new Pv(e,t)}function Ie(e){return zt(e)?e.value:e}function Su(e){return $n(e)?e:new Proxy(e,Oz)}function q_(e,t,n=!1){let i,r;return Se(e)?i=e:(i=e.get,r=e.set),new Rv(i,r,n)}function Y_(e,t=!1,n=zi){if(n){let i=$u.get(n);i||$u.set(n,i=[]),i.push(e)}}function X_(e,t,n=qe){let{immediate:i,deep:r,once:o,scheduler:a,augmentJob:s,call:c}=n,u=$=>{(n.onWarn||vz)("Invalid watch source: ",$,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},d=$=>r?$:lr($)||r===!1||r===0?Jr($,1):Jr($),p,m,f,S,z=!1,T=!1;if(zt(e)?(m=()=>e.value,z=lr(e)):$n(e)?(m=()=>d(e),z=!0):xe(e)?(T=!0,z=e.some($=>$n($)||lr($)),m=()=>e.map($=>{if(zt($))return $.value;if($n($))return d($);if(Se($))return c?c($,2):$()})):Se(e)?t?m=c?()=>c(e,2):e:m=()=>{if(f){qr();try{f()}finally{Yr()}}let $=zi;zi=p;try{return c?c(e,3,[S]):e(S)}finally{zi=$}}:m=qt,t&&r){let $=m,F=r===!0?1/0:r;m=()=>Jr($(),F)}let L=M_(),j=()=>{p.stop(),L&&L.active&&ss(L.effects,p)};if(o&&t){let $=t;t=(...F)=>{let se=$(...F);return j(),se}}let D=T?new Array(e.length).fill(xu):xu,U=$=>{if(!(!(p.flags&1)||!p.dirty&&!$))if(t){let F=p.run();if($||r||z||(T?F.some((se,he)=>wr(se,D[he])):wr(F,D))){f&&f();let se=zi;zi=p;try{let he=[F,D===xu?void 0:T&&D[0]===xu?[]:D,S];D=F,c?c(t,3,he):t(...he)}finally{zi=se}}}else p.run()};return s&&s(U),p=new Fo(m),p.scheduler=a?()=>a(U,!1):U,S=$=>Y_($,!1,p),f=p.onStop=()=>{let $=$u.get(p);if($){if(c)c($,4);else for(let F of $)F();$u.delete(p)}},t?i?U(!0):D=p.run():a?a(U.bind(null,!0),!0):p.run(),j.pause=p.pause.bind(p),j.resume=p.resume.bind(p),j.stop=j,j}function Jr(e,t=1/0,n){if(t<=0||!Le(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,zt(e))Jr(e.value,t,n);else if(xe(e))for(let i=0;i<e.length;i++)Jr(e[i],t,n);else if(mu(e)||Ii(e))e.forEach(i=>{Jr(i,t,n)});else if(fu(e)){for(let i in e)Jr(e[i],t,n);for(let i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Jr(e[i],t,n)}return e}var Dt,gs,dt,Ev,Fo,U_,fs,hs,Dr,B_,vs,Nv,bs,Cv,Ni,Av,ys,yz,xz,wz,H_,wu,ku,Ov,_z,$z,Sz,Dv,bu,Tz,zz,Nz,K_,W_,G_,Cz,kr,Ci,Pv,Oz,Rv,xu,$u,zi,Zv=O(()=>{ps();/**
72
+ **/qe={},Ei=[],qt=()=>{},kv=()=>!1,Po=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ro=e=>e.startsWith("onUpdate:"),ut=Object.assign,ss=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},lz=Object.prototype.hasOwnProperty,Ve=(e,t)=>lz.call(e,t),xe=Array.isArray,Ii=e=>ls(e)==="[object Map]",mu=e=>ls(e)==="[object Set]",T_=e=>ls(e)==="[object Date]",Se=e=>typeof e=="function",ot=e=>typeof e=="string",sr=e=>typeof e=="symbol",Le=e=>e!==null&&typeof e=="object",_v=e=>(Le(e)||Se(e))&&Se(e.then)&&Se(e.catch),N_=Object.prototype.toString,ls=e=>N_.call(e),$v=e=>ls(e).slice(8,-1),fu=e=>ls(e)==="[object Object]",hu=e=>ot(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Mo=Do(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),gu=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},cz=/-\w/g,Et=gu(e=>e.replace(cz,t=>t.slice(1).toUpperCase())),uz=/\B([A-Z])/g,Kr=gu(e=>e.replace(uz,"-$1").toLowerCase()),Ti=gu(e=>e.charAt(0).toUpperCase()+e.slice(1)),cs=gu(e=>e?`on${Ti(e)}`:""),wr=(e,t)=>!Object.is(e,t),Uo=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},jo=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},us=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Sv=e=>{let t=ot(e)?Number(e):NaN;return isNaN(t)?e:t},qn=()=>z_||(z_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});dz=/;(?![^(]*\))/g,pz=/:([^]+)/,mz=/\/\*[^]*?\*\//g;C_="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",A_=Do(C_),hz=Do(C_+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");O_=e=>!!(e&&e.__v_isRef===!0),ce=e=>ot(e)?e:e==null?"":xe(e)||Le(e)&&(e.toString===N_||!Se(e.toString))?O_(e)?ce(e.value):JSON.stringify(e,D_,2):String(e),D_=(e,t)=>O_(t)?D_(e,t.value):Ii(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,r],o)=>(n[wv(i,o)+" =>"]=r,n),{})}:mu(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>wv(n))}:sr(t)?wv(t):Le(t)&&!xe(t)&&!fu(t)?String(t):t,wv=(e,t="")=>{var n;return sr(e)?`Symbol(${(n=e.description)!=null?n:t})`:e}});function vz(e,...t){console.warn(`[Vue warn] ${e}`,...t)}function M_(){return Dt}function j_(e,t=!1){if(e.flags|=8,t){e.next=hs,hs=e;return}e.next=fs,fs=e}function Mv(){U_++}function Uv(){if(--U_>0)return;if(hs){let t=hs;for(hs=void 0;t;){let n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;fs;){let t=fs;for(fs=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function L_(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function V_(e){let t,n=e.depsTail,i=n;for(;i;){let r=i.prevDep;i.version===-1?(i===n&&(n=r),jv(i),bz(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}e.deps=t,e.depsTail=n}function zv(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(F_(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function F_(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vs)||(e.globalVersion=vs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!zv(e))))return;e.flags|=2;let t=e.dep,n=dt,i=Dr;dt=e,Dr=!0;try{L_(e);let r=e.fn(e._value);(t.version===0||wr(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{dt=n,Dr=i,V_(e),e.flags&=-3}}function jv(e,t=!1){let{dep:n,prevSub:i,nextSub:r}=e;if(i&&(i.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)jv(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function bz(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function qr(){B_.push(Dr),Dr=!1}function Yr(){let e=B_.pop();Dr=e===void 0?!0:e}function P_(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let n=dt;dt=void 0;try{t()}finally{dt=n}}}function Z_(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Z_(i)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}function Pt(e,t,n){if(Dr&&dt){let i=Cv.get(e);i||Cv.set(e,i=new Map);let r=i.get(n);r||(i.set(n,r=new bs),r.map=i,r.key=n),r.track()}}function Gr(e,t,n,i,r,o){let a=Cv.get(e);if(!a){vs++;return}let s=c=>{c&&c.trigger()};if(Mv(),t==="clear")a.forEach(s);else{let c=xe(e),u=c&&hu(n);if(c&&n==="length"){let d=Number(i);a.forEach((p,m)=>{(m==="length"||m===ys||!sr(m)&&m>=d)&&s(p)})}else switch((n!==void 0||a.has(void 0))&&s(a.get(n)),u&&s(a.get(ys)),t){case"add":c?u&&s(a.get("length")):(s(a.get(Ni)),Ii(e)&&s(a.get(Av)));break;case"delete":c||(s(a.get(Ni)),Ii(e)&&s(a.get(Av)));break;case"set":Ii(e)&&s(a.get(Ni));break}}Uv()}function Vo(e){let t=Pe(e);return t===e?t:(Pt(t,"iterate",ys),lr(e)?t:t.map(kr))}function xs(e){return Pt(e=Pe(e),"iterate",ys),e}function Wr(e,t){return Pr(e)?Ci($n(e)?kr(t):t):kr(t)}function Iv(e,t,n){let i=xs(e),r=i[t]();return i!==e&&!lr(e)&&(r._next=r.next,r.next=()=>{let o=r._next();return o.done||(o.value=n(o.value)),o}),r}function _n(e,t,n,i,r,o){let a=xs(e),s=a!==e&&!lr(e),c=a[t];if(c!==xz[t]){let p=c.apply(e,o);return s?kr(p):p}let u=n;a!==e&&(s?u=function(p,m){return n.call(this,Wr(e,p),m,e)}:n.length>2&&(u=function(p,m){return n.call(this,p,m,e)}));let d=c.call(a,u,i);return s&&r?r(d):d}function R_(e,t,n,i){let r=xs(e),o=r!==e&&!lr(e),a=n,s=!1;r!==e&&(o?(s=i.length===0,a=function(u,d,p){return s&&(s=!1,u=Wr(e,u)),n.call(this,u,Wr(e,d),p,e)}):n.length>3&&(a=function(u,d,p){return n.call(this,u,d,p,e)}));let c=r[t](a,...i);return s?Wr(e,c):c}function Tv(e,t,n){let i=Pe(e);Pt(i,"iterate",ys);let r=i[t](...n);return(r===-1||r===!1)&&ks(n[0])?(n[0]=Pe(n[0]),i[t](...n)):r}function ms(e,t,n=[]){qr(),Mv();let i=Pe(e)[t].apply(e,n);return Uv(),Yr(),i}function kz(e){sr(e)||(e=String(e));let t=Pe(this);return Pt(t,"has",e),t.hasOwnProperty(e)}function Ez(e,t,n){return function(...i){let r=this.__v_raw,o=Pe(r),a=Ii(o),s=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,u=r[e](...i),d=n?Dv:t?Ci:kr;return!t&&Pt(o,"iterate",c?Av:Ni),ut(Object.create(u),{next(){let{value:p,done:m}=u.next();return m?{value:p,done:m}:{value:s?[d(p[0]),d(p[1])]:d(p),done:m}}})}}function yu(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Iz(e,t){let n={get(r){let o=this.__v_raw,a=Pe(o),s=Pe(r);e||(wr(r,s)&&Pt(a,"get",r),Pt(a,"get",s));let{has:c}=bu(a),u=t?Dv:e?Ci:kr;if(c.call(a,r))return u(o.get(r));if(c.call(a,s))return u(o.get(s));o!==a&&o.get(r)},get size(){let r=this.__v_raw;return!e&&Pt(Pe(r),"iterate",Ni),r.size},has(r){let o=this.__v_raw,a=Pe(o),s=Pe(r);return e||(wr(r,s)&&Pt(a,"has",r),Pt(a,"has",s)),r===s?o.has(r):o.has(r)||o.has(s)},forEach(r,o){let a=this,s=a.__v_raw,c=Pe(s),u=t?Dv:e?Ci:kr;return!e&&Pt(c,"iterate",Ni),s.forEach((d,p)=>r.call(o,u(d),u(p),a))}};return ut(n,e?{add:yu("add"),set:yu("set"),delete:yu("delete"),clear:yu("clear")}:{add(r){let o=Pe(this),a=bu(o),s=Pe(r),c=!t&&!lr(r)&&!Pr(r)?s:r;return a.has.call(o,c)||wr(r,c)&&a.has.call(o,r)||wr(s,c)&&a.has.call(o,s)||(o.add(c),Gr(o,"add",c,c)),this},set(r,o){!t&&!lr(o)&&!Pr(o)&&(o=Pe(o));let a=Pe(this),{has:s,get:c}=bu(a),u=s.call(a,r);u||(r=Pe(r),u=s.call(a,r));let d=c.call(a,r);return a.set(r,o),u?wr(o,d)&&Gr(a,"set",r,o,d):Gr(a,"add",r,o),this},delete(r){let o=Pe(this),{has:a,get:s}=bu(o),c=a.call(o,r);c||(r=Pe(r),c=a.call(o,r));let u=s?s.call(o,r):void 0,d=o.delete(r);return c&&Gr(o,"delete",r,void 0,u),d},clear(){let r=Pe(this),o=r.size!==0,a=void 0,s=r.clear();return o&&Gr(r,"clear",void 0,void 0,a),s}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Ez(r,e,t)}),n}function Lv(e,t){let n=Iz(e,t);return(i,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?i:Reflect.get(Ve(n,r)&&r in i?n:i,r,o)}function Az(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ws(e){return Pr(e)?e:Fv(e,!1,_z,Tz,K_)}function Vv(e){return Fv(e,!1,Sz,zz,W_)}function _u(e){return Fv(e,!0,$z,Nz,G_)}function Fv(e,t,n,i,r){if(!Le(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let o=r.get(e);if(o)return o;let a=Az($v(e));if(a===0)return e;let s=new Proxy(e,a===2?i:n);return r.set(e,s),s}function $n(e){return Pr(e)?$n(e.__v_raw):!!(e&&e.__v_isReactive)}function Pr(e){return!!(e&&e.__v_isReadonly)}function lr(e){return!!(e&&e.__v_isShallow)}function ks(e){return e?!!e.__v_raw:!1}function Pe(e){let t=e&&e.__v_raw;return t?Pe(t):e}function Bv(e){return!Ve(e,"__v_skip")&&Object.isExtensible(e)&&jo(e,"__v_skip",!0),e}function zt(e){return e?e.__v_isRef===!0:!1}function G(e){return J_(e,!1)}function Ye(e){return J_(e,!0)}function J_(e,t){return zt(e)?e:new Pv(e,t)}function Ie(e){return zt(e)?e.value:e}function Su(e){return $n(e)?e:new Proxy(e,Oz)}function q_(e,t,n=!1){let i,r;return Se(e)?i=e:(i=e.get,r=e.set),new Rv(i,r,n)}function Y_(e,t=!1,n=zi){if(n){let i=$u.get(n);i||$u.set(n,i=[]),i.push(e)}}function X_(e,t,n=qe){let{immediate:i,deep:r,once:o,scheduler:a,augmentJob:s,call:c}=n,u=$=>{(n.onWarn||vz)("Invalid watch source: ",$,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},d=$=>r?$:lr($)||r===!1||r===0?Jr($,1):Jr($),p,m,f,S,z=!1,T=!1;if(zt(e)?(m=()=>e.value,z=lr(e)):$n(e)?(m=()=>d(e),z=!0):xe(e)?(T=!0,z=e.some($=>$n($)||lr($)),m=()=>e.map($=>{if(zt($))return $.value;if($n($))return d($);if(Se($))return c?c($,2):$()})):Se(e)?t?m=c?()=>c(e,2):e:m=()=>{if(f){qr();try{f()}finally{Yr()}}let $=zi;zi=p;try{return c?c(e,3,[S]):e(S)}finally{zi=$}}:m=qt,t&&r){let $=m,B=r===!0?1/0:r;m=()=>Jr($(),B)}let L=M_(),j=()=>{p.stop(),L&&L.active&&ss(L.effects,p)};if(o&&t){let $=t;t=(...B)=>{let se=$(...B);return j(),se}}let D=T?new Array(e.length).fill(xu):xu,U=$=>{if(!(!(p.flags&1)||!p.dirty&&!$))if(t){let B=p.run();if($||r||z||(T?B.some((se,he)=>wr(se,D[he])):wr(B,D))){f&&f();let se=zi;zi=p;try{let he=[B,D===xu?void 0:T&&D[0]===xu?[]:D,S];D=B,c?c(t,3,he):t(...he)}finally{zi=se}}}else p.run()};return s&&s(U),p=new Fo(m),p.scheduler=a?()=>a(U,!1):U,S=$=>Y_($,!1,p),f=p.onStop=()=>{let $=$u.get(p);if($){if(c)c($,4);else for(let B of $)B();$u.delete(p)}},t?i?U(!0):D=p.run():a?a(U.bind(null,!0),!0):p.run(),j.pause=p.pause.bind(p),j.resume=p.resume.bind(p),j.stop=j,j}function Jr(e,t=1/0,n){if(t<=0||!Le(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,zt(e))Jr(e.value,t,n);else if(xe(e))for(let i=0;i<e.length;i++)Jr(e[i],t,n);else if(mu(e)||Ii(e))e.forEach(i=>{Jr(i,t,n)});else if(fu(e)){for(let i in e)Jr(e[i],t,n);for(let i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&Jr(e[i],t,n)}return e}var Dt,gs,dt,Ev,Fo,U_,fs,hs,Dr,B_,vs,Nv,bs,Cv,Ni,Av,ys,yz,xz,wz,H_,wu,ku,Ov,_z,$z,Sz,Dv,bu,Tz,zz,Nz,K_,W_,G_,Cz,kr,Ci,Pv,Oz,Rv,xu,$u,zi,Zv=O(()=>{ps();/**
73
73
  * @vue/reactivity v3.5.40
74
74
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
75
75
  * @license MIT
76
- **/gs=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Dt&&(Dt.active?(this.parent=Dt,this.index=(Dt.scopes||(Dt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){let i=this.scopes.slice();for(t=0,n=i.length;t<n;t++)i[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}let i=this.effects.slice();for(t=0,n=i.length;t<n;t++)i[t].resume()}}run(t){if(this._active){let n=Dt;try{return Dt=this,t()}finally{Dt=n}}}on(){++this._on===1&&(this.prevScope=Dt,Dt=this)}off(){if(this._on>0&&--this._on===0){if(Dt===this)Dt=this.prevScope;else{let t=Dt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(n=0,i=r.length;n<i;n++)r[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){let r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}};Ev=new WeakSet,Fo=class{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Dt&&(Dt.active?Dt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ev.has(this)&&(Ev.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||j_(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,P_(this),L_(this);let t=dt,n=Dr;dt=this,Dr=!0;try{return this.fn()}finally{V_(this),dt=t,Dr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)jv(t);this.deps=this.depsTail=void 0,P_(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ev.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zv(this)&&this.run()}get dirty(){return zv(this)}},U_=0;Dr=!0,B_=[];vs=0,Nv=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},bs=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!dt||!Dr||dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dt)n=this.activeLink=new Nv(dt,this),dt.deps?(n.prevDep=dt.depsTail,dt.depsTail.nextDep=n,dt.depsTail=n):dt.deps=dt.depsTail=n,Z_(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=dt.depsTail,n.nextDep=void 0,dt.depsTail.nextDep=n,dt.depsTail=n,dt.deps===n&&(dt.deps=i)}return n}trigger(t){this.version++,vs++,this.notify(t)}notify(t){Mv();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Uv()}}};Cv=new WeakMap,Ni=Symbol(""),Av=Symbol(""),ys=Symbol("");yz={__proto__:null,[Symbol.iterator](){return Iv(this,Symbol.iterator,e=>Wr(this,e))},concat(...e){return Vo(this).concat(...e.map(t=>xe(t)?Vo(t):t))},entries(){return Iv(this,"entries",e=>(e[1]=Wr(this,e[1]),e))},every(e,t){return _n(this,"every",e,t,void 0,arguments)},filter(e,t){return _n(this,"filter",e,t,n=>n.map(i=>Wr(this,i)),arguments)},find(e,t){return _n(this,"find",e,t,n=>Wr(this,n),arguments)},findIndex(e,t){return _n(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return _n(this,"findLast",e,t,n=>Wr(this,n),arguments)},findLastIndex(e,t){return _n(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return _n(this,"forEach",e,t,void 0,arguments)},includes(...e){return Tv(this,"includes",e)},indexOf(...e){return Tv(this,"indexOf",e)},join(e){return Vo(this).join(e)},lastIndexOf(...e){return Tv(this,"lastIndexOf",e)},map(e,t){return _n(this,"map",e,t,void 0,arguments)},pop(){return ms(this,"pop")},push(...e){return ms(this,"push",e)},reduce(e,...t){return R_(this,"reduce",e,t)},reduceRight(e,...t){return R_(this,"reduceRight",e,t)},shift(){return ms(this,"shift")},some(e,t){return _n(this,"some",e,t,void 0,arguments)},splice(...e){return ms(this,"splice",e)},toReversed(){return Vo(this).toReversed()},toSorted(e){return Vo(this).toSorted(e)},toSpliced(...e){return Vo(this).toSpliced(...e)},unshift(...e){return ms(this,"unshift",e)},values(){return Iv(this,"values",e=>Wr(this,e))}};xz=Array.prototype;wz=Do("__proto__,__v_isRef,__isVue"),H_=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(sr));wu=class{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;let r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(r?o?Cz:G_:o?W_:K_).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;let a=xe(t);if(!r){let c;if(a&&(c=yz[n]))return c;if(n==="hasOwnProperty")return kz}let s=Reflect.get(t,n,zt(t)?t:i);if((sr(n)?H_.has(n):wz(n))||(r||Pt(t,"get",n),o))return s;if(zt(s)){let c=a&&hu(n)?s:s.value;return r&&Le(c)?_u(c):c}return Le(s)?r?_u(s):ws(s):s}},ku=class extends wu{constructor(t=!1){super(!1,t)}set(t,n,i,r){let o=t[n],a=xe(t)&&hu(n);if(!this._isShallow){let u=Pr(o);if(!lr(i)&&!Pr(i)&&(o=Pe(o),i=Pe(i)),!a&&zt(o)&&!zt(i))return u||(o.value=i),!0}let s=a?Number(n)<t.length:Ve(t,n),c=Reflect.set(t,n,i,zt(t)?t:r);return t===Pe(r)&&c&&(s?wr(i,o)&&Gr(t,"set",n,i,o):Gr(t,"add",n,i)),c}deleteProperty(t,n){let i=Ve(t,n),r=t[n],o=Reflect.deleteProperty(t,n);return o&&i&&Gr(t,"delete",n,void 0,r),o}has(t,n){let i=Reflect.has(t,n);return(!sr(n)||!H_.has(n))&&Pt(t,"has",n),i}ownKeys(t){return Pt(t,"iterate",xe(t)?"length":Ni),Reflect.ownKeys(t)}},Ov=class extends wu{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}},_z=new ku,$z=new Ov,Sz=new ku(!0),Dv=e=>e,bu=e=>Reflect.getPrototypeOf(e);Tz={get:Lv(!1,!1)},zz={get:Lv(!1,!0)},Nz={get:Lv(!0,!1)},K_=new WeakMap,W_=new WeakMap,G_=new WeakMap,Cz=new WeakMap;kr=e=>Le(e)?ws(e):e,Ci=e=>Le(e)?_u(e):e;Pv=class{constructor(t,n){this.dep=new bs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Pe(t),this._value=n?t:kr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){let n=this._rawValue,i=this.__v_isShallow||lr(t)||Pr(t);t=i?t:Pe(t),wr(t,n)&&(this._rawValue=t,this._value=i?t:kr(t),this.dep.trigger())}};Oz={get:(e,t,n)=>t==="__v_raw"?e:Ie(Reflect.get(e,t,n)),set:(e,t,n,i)=>{let r=e[t];return zt(r)&&!zt(n)?(r.value=n,!0):Reflect.set(e,t,n,i)}};Rv=class{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new bs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&dt!==this)return j_(this,!0),!0}get value(){let t=this.dep.track();return F_(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};xu={},$u=new WeakMap});function Os(e,t,n,i){try{return i?e(...i):e()}catch(r){Ru(r,t,n)}}function fr(e,t,n,i){if(Se(e)){let r=Os(e,t,n,i);return r&&_v(r)&&r.catch(o=>{Ru(o,t,n)}),r}if(xe(e)){let r=[];for(let o=0;o<e.length;o++)r.push(fr(e[o],t,n,i));return r}}function Ru(e,t,n,i=!0){let r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||qe;if(t){let s=t.parent,c=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){let d=s.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,c,u)===!1)return}s=s.parent}if(o){qr(),Os(o,null,10,[e,c,u]),Yr();return}}Rz(e,n,r,i,a)}function Rz(e,t,n,i=!0,r=!1){if(r)throw e;console.error(e)}function Ri(e){let t=zu||b1;return e?t.then(this?e.bind(this):e):t}function Mz(e){let t=Qr+1,n=Qt.length;for(;t<n;){let i=t+n>>>1,r=Qt[i],o=zs(r);o<e||o===e&&r.flags&2?t=i+1:n=i}return t}function n0(e){if(!(e.flags&1)){let t=zs(e),n=Qt[Qt.length-1];!n||!(e.flags&2)&&t>=zs(n)?Qt.push(e):Qt.splice(Mz(t),0,e),e.flags|=1,y1()}}function y1(){zu||(zu=b1.then(k1))}function x1(e){xe(e)?Zo.push(...e):Xn&&e.id===-1?Xn.splice(Bo+1,0,e):e.flags&1||(Zo.push(e),e.flags|=1),y1()}function Q_(e,t,n=Qr+1){for(;n<Qt.length;n++){let i=Qt[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;Qt.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function w1(e){if(Zo.length){let t=[...new Set(Zo)].sort((n,i)=>zs(n)-zs(i));if(Zo.length=0,Xn){Xn.push(...t);return}for(Xn=t,Bo=0;Bo<Xn.length;Bo++){let n=Xn[Bo];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Xn=null,Bo=0}}function k1(e){let t=qt;try{for(Qr=0;Qr<Qt.length;Qr++){let n=Qt[Qr];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Os(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Qr<Qt.length;Qr++){let n=Qt[Qr];n&&(n.flags&=-2)}Qr=-1,Qt.length=0,w1(e),zu=null,(Qt.length||Zo.length)&&k1(e)}}function Mu(e,...t){tn?tn.emit(e,...t):Jv||$s.push({event:e,args:t})}function _1(e,t){var n,i;tn=e,tn?(tn.enabled=!0,$s.forEach(({event:r,args:o})=>tn.emit(r,...o)),$s=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{_1(o,t)}),setTimeout(()=>{tn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Jv=!0,$s=[])},3e3)):(Jv=!0,$s=[])}function jz(e,t){Mu("app:init",e,t,{Fragment:ge,Text:Ds,Comment:Rt,Static:Wo})}function Lz(e){Mu("app:unmount",e)}function i0(e){return t=>{Mu(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}function Zz(e,t,n){Mu("component:emit",e.appContext.app,e,t,n)}function Nu(e){let t=Mt;return Mt=e,S1=e&&e.type.__scopeId||null,t}function bt(e,t=Mt,n){if(!t||e._n)return e;let i=(...r)=>{i._d&&Ou(-1);let o=Nu(t),a=En.length,s;try{s=e(...r)}finally{for(let c=En.length;c>a;c--)f0();Nu(o),i._d&&Ou(1)}return __VUE_PROD_DEVTOOLS__&&$1(t),s};return i._n=!0,i._c=!0,i._d=!0,i}function Uu(e,t){if(Mt===null)return e;let n=Bu(Mt),i=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,a,s,c=qe]=t[r];o&&(Se(o)&&(o={mounted:o,updated:o}),o.deep&&Jr(a),i.push({dir:o,instance:n,value:a,oldValue:void 0,arg:s,modifiers:c}))}return e}function Ai(e,t,n,i){let r=e.dirs,o=t&&t.dirs;for(let a=0;a<r.length;a++){let s=r[a];o&&(s.oldValue=o[a].value);let c=s.dir[i];c&&(qr(),fr(c,n,8,[e.el,s,e,t]),Yr())}}function Hz(e,t){if(Vt){let n=Vt.provides,i=Vt.parent&&Vt.parent.provides;i===n&&(n=Vt.provides=Object.create(i)),n[e]=t}}function Iu(e,t,n=!1){let i=Ps();if(i||Ko){let r=Ko?Ko._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Se(t)?t.call(i&&i.proxy):t}}function lt(e,t,n){return E1(e,t,n)}function E1(e,t,n=qe){let{immediate:i,deep:r,flush:o,once:a}=n,s=ut({},n),c=t&&i||!t&&o!=="post",u;if(As){if(o==="sync"){let f=Wz();u=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){let f=()=>{};return f.stop=qt,f.resume=qt,f.pause=qt,f}}let d=Vt;s.call=(f,S,z)=>fr(f,d,S,z);let p=!1;o==="post"?s.scheduler=f=>{Xt(f,d&&d.suspense)}:o!=="sync"&&(p=!0,s.scheduler=(f,S)=>{S?f():n0(f)}),s.augmentJob=f=>{t&&(f.flags|=4),p&&(f.flags|=2,d&&(f.id=d.uid,f.i=d))};let m=X_(e,t,s);return As&&(u?u.push(m):c&&m()),m}function Gz(e,t,n){let i=this.proxy,r=ot(e)?e.includes(".")?I1(i,e):()=>i[e]:e.bind(i,i),o;Se(t)?o=t:(o=t.handler,n=t);let a=Rs(this),s=E1(r,o.bind(i),n);return a(),s}function I1(e,t){let n=t.split(".");return()=>{let i=e;for(let r=0;r<n.length&&i;r++)i=i[n[r]];return i}}function Eu(e,t,n,{o:{insert:i},m:r},o=2){o===0&&i(e.targetAnchor,t,n);let{el:a,anchor:s,shapeFlag:c,children:u,props:d}=e,p=o===2;if(p&&i(a,t,n),!Yn.has(e)&&(!p||Di(d))&&c&16)for(let m=0;m<u.length;m++)r(u[m],t,n,2);p&&i(s,t,n)}function Yz(e,t,n,i,r,o,{o:{nextSibling:a,parentNode:s,querySelector:c,insert:u,createText:d}},p){function m(T,L){let j=L;for(;j;){if(j&&j.nodeType===8){if(j.data==="teleport start anchor")t.targetStart=j;else if(j.data==="teleport anchor"){t.targetAnchor=j,T._lpa=t.targetAnchor&&a(t.targetAnchor);break}}j=a(j)}}function f(T,L){L.anchor=p(a(T),L,s(T),n,i,r,o)}let S=t.target=qv(t.props,c),z=Di(t.props);if(S){let T=S._lpa||S.firstChild;t.shapeFlag&16&&(z?(f(e,t),m(S,T),t.targetAnchor||Yv(S,t,d,u,s(e)===S?e:null)):(t.anchor=a(e),m(S,T),t.targetAnchor||Yv(S,t,d,u),p(T&&a(T),t,S,n,i,r,o))),Ss(t,z)}else z&&t.shapeFlag&16&&(f(e,t),t.targetStart=e,t.targetAnchor=a(e));return t.anchor&&a(t.anchor)}function Ss(e,t){let n=e.ctx;if(n&&n.ut){let i,r;for(t?(i=e.el,r=e.anchor):(i=e.targetStart,r=e.targetAnchor);i&&i!==r;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function Yv(e,t,n,i,r=null){let o=t.targetStart=n(""),a=t.targetAnchor=n("");return o[T1]=a,e&&(i(o,e,r),i(a,e,r)),a}function o0(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return It(()=>{e.isMounted=!0}),Jo(()=>{e.isUnmounting=!0}),e}function A1(e){let t=e[0];if(e.length>1){let n=!1;for(let i of e)if(i.type!==Rt){t=i,n=!0;break}}return t}function D1(e,t){let{leavingVNodes:n}=e,i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Go(e,t,n,i,r){let{appear:o,mode:a,persisted:s=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:d,onEnterCancelled:p,onBeforeLeave:m,onLeave:f,onAfterLeave:S,onLeaveCancelled:z,onBeforeAppear:T,onAppear:L,onAfterAppear:j,onAppearCancelled:D}=t,U=String(e.key),$=D1(n,e),F=(te,W)=>{te&&fr(te,i,9,W)},se=(te,W)=>{let de=W[1];F(te,W),xe(te)?te.every(ie=>ie.length<=1)&&de():te.length<=1&&de()},he={mode:a,persisted:s,beforeEnter(te){let W=c;if(!n.isMounted)if(o)W=T||c;else return;te[$r]&&te[$r](!0);let de=$[U];de&&Pi(e,de)&&de.el[$r]&&de.el[$r](),F(W,[te])},enter(te){if(!Uz&&$[U]===e)return;let W=u,de=d,ie=p;if(!n.isMounted)if(o)W=L||u,de=j||d,ie=D||p;else return;let ye=!1;te[_s]=mt=>{ye||(ye=!0,mt?F(ie,[te]):F(de,[te]),he.delayedLeave&&he.delayedLeave(),te[_s]=void 0)};let Be=te[_s].bind(null,!1);W?se(W,[te,Be]):Be()},leave(te,W){let de=String(e.key);if(te[_s]&&te[_s](!0),n.isUnmounting)return W();F(m,[te]);let ie=!1;te[$r]=Be=>{ie||(ie=!0,W(),Be?F(z,[te]):F(S,[te]),te[$r]=void 0,$[de]===e&&delete $[de])};let ye=te[$r].bind(null,!1);$[de]=e,f?se(f,[te,ye]):ye()},clone(te){let W=Go(te,t,n,i,r);return r&&r(W),W}};return he}function Hv(e){if(Lu(e))return e=ei(e),e.children=null,e}function r1(e){if(!Lu(e))return z1(e.type)&&e.children?A1(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Se(n.default))return n.default()}}function Qn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Qn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ju(e,t=!1,n){let i=[],r=0;for(let o=0;o<e.length;o++){let a=e[o],s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===ge?(a.patchFlag&128&&r++,i=i.concat(ju(a.children,t,s))):(t||a.type!==Rt)&&i.push(s!=null?ei(a,{key:s}):a)}if(r>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function Ae(e,t){return Se(e)?ut({name:e.name},t,{setup:e}):e}function P1(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function s0(e){let t=Ps(),n=Ye(null);if(t){let r=t.refs===qe?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function n1(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}function Is(e,t,n,i,r=!1){if(xe(e)){e.forEach((z,T)=>Is(z,t&&(xe(t)?t[T]:t),n,i,r));return}if(Ho(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Is(e,t,n,i.component.subTree);return}let o=i.shapeFlag&4?Bu(i.component):i.el,a=r?null:o,{i:s,r:c}=e,u=t&&t.r,d=s.refs===qe?s.refs={}:s.refs,p=s.setupState,m=Pe(p),f=p===qe?kv:z=>n1(d,z)?!1:Ve(m,z),S=(z,T)=>!(T&&n1(d,T));if(u!=null&&u!==c){if(i1(t),ot(u))d[u]=null,f(u)&&(p[u]=null);else if(zt(u)){let z=t;S(u,z.k)&&(u.value=null),z.k&&(d[z.k]=null)}}if(Se(c))Os(c,s,12,[a,d]);else{let z=ot(c),T=zt(c);if(z||T){let L=()=>{if(e.f){let j=z?f(c)?p[c]:d[c]:S(c)||!e.k?c.value:d[e.k];if(r)xe(j)&&ss(j,o);else if(xe(j))j.includes(o)||j.push(o);else if(z)d[c]=[o],f(c)&&(p[c]=d[c]);else{let D=[o];S(c,e.k)&&(c.value=D),e.k&&(d[e.k]=D)}}else z?(d[c]=a,f(c)&&(p[c]=a)):T&&(S(c,e.k)&&(c.value=a),e.k&&(d[e.k]=a))};if(a){let j=()=>{L(),Cu.delete(e)};j.id=-1,Cu.set(e,j),Xt(j,n)}else i1(e),L()}}}function i1(e){let t=Cu.get(e);t&&(t.flags|=8,Cu.delete(e))}function Qz(e,t){R1(e,"a",t)}function eN(e,t){R1(e,"da",t)}function R1(e,t,n=Vt){let i=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Vu(t,i,n),n){let r=n.parent;for(;r&&r.parent;)Lu(r.parent.vnode)&&tN(i,t,n,r),r=r.parent}}function tN(e,t,n,i){let r=Vu(t,e,i,!0);rn(()=>{ss(i[t],r)},n)}function Vu(e,t,n=Vt,i=!1){if(n){let r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{qr();let s=Rs(n),c=fr(t,n,e,a);return s(),Yr(),c});return i?r.unshift(o):r.push(o),o}}function aN(e,t=Vt){Vu("ec",e,t)}function L1(e){return ot(e)?sN(U1,e,!1)||e:e||j1}function sN(e,t,n=!0,i=!1){let r=Mt||Vt;if(r){let o=r.type;if(e===U1){let s=FN(o,!1);if(s&&(s===t||s===Et(t)||s===Ti(Et(t))))return o}let a=o1(r[e]||o[e],t)||o1(r.appContext[e],t);return!a&&i?o:a}}function o1(e,t){return e&&(e[t]||e[Et(t)]||e[Ti(Et(t))])}function et(e,t,n,i){let r,o=n&&n[i],a=xe(e);if(a||ot(e)){let s=a&&$n(e),c=!1,u=!1;s&&(c=!lr(e),u=Pr(e),e=xs(e)),r=new Array(e.length);for(let d=0,p=e.length;d<p;d++)r[d]=t(c?u?Ci(kr(e[d])):kr(e[d]):e[d],d,void 0,o&&o[d])}else if(typeof e=="number"){r=new Array(e);for(let s=0;s<e;s++)r[s]=t(s+1,s,void 0,o&&o[s])}else if(Le(e))if(e[Symbol.iterator])r=Array.from(e,(s,c)=>t(s,c,void 0,o&&o[c]));else{let s=Object.keys(e);r=new Array(s.length);for(let c=0,u=s.length;c<u;c++){let d=s[c];r[c]=t(e[d],d,c,o&&o[c])}}else r=[];return n&&(n[i]=r),r}function c0(e,t){for(let n=0;n<t.length;n++){let i=t[n];if(xe(i))for(let r=0;r<i.length;r++)e[i[r].name]=i[r].fn;else i&&(e[i.name]=i.key?(...r)=>{let o=i.fn(...r);return o&&(o.key=i.key),o}:i.fn)}return e}function er(e,t,n={},i,r,o){if(Mt.ce||Mt.parent&&Ho(Mt.parent)&&Mt.parent.ce){let u=o!=null&&n.key==null?ut({},n,{key:o}):n,d=Object.keys(u).length>0;return t!=="default"&&(u.name=t),v(),Fe(ge,null,[be("slot",u,i&&i())],d?-2:64)}let a=e[t];a&&a._c&&(a._d=!1);let s=En.length;v();let c;try{let u=a&&V1(a(n)),d=n.key||o||u&&u.key;c=Fe(ge,{key:(d&&!sr(d)?d:`_${t}`)+(!u&&i?"_fb":"")},u||(i?i():[]),u&&e._===1?64:-2)}catch(u){for(let d=En.length;d>s;d--)f0();throw u}finally{a&&a._c&&(a._d=!0)}return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),c}function V1(e){return e.some(t=>Cs(t)?!(t.type===Rt||t.type===ge&&!V1(t.children)):!0)?e:null}function a1(e){return xe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function cN(e){let t=u0(e),n=e.proxy,i=e.ctx;Qv=!1,t.beforeCreate&&s1(t.beforeCreate,e,"bc");let{data:r,computed:o,methods:a,watch:s,provide:c,inject:u,created:d,beforeMount:p,mounted:m,beforeUpdate:f,updated:S,activated:z,deactivated:T,beforeDestroy:L,beforeUnmount:j,destroyed:D,unmounted:U,render:$,renderTracked:F,renderTriggered:se,errorCaptured:he,serverPrefetch:te,expose:W,inheritAttrs:de,components:ie,directives:ye,filters:Be}=t;if(u&&uN(u,i,null),a)for(let je in a){let De=a[je];Se(De)&&(i[je]=De.bind(n))}if(r){let je=r.call(n,n);Le(je)&&(e.data=ws(je))}if(Qv=!0,o)for(let je in o){let De=o[je],Tt=Se(De)?De.bind(n,n):Se(De.get)?De.get.bind(n,n):qt,Ze=!Se(De)&&Se(De.set)?De.set.bind(n):qt,gr=N({get:Tt,set:Ze});Object.defineProperty(i,je,{enumerable:!0,configurable:!0,get:()=>gr.value,set:ht=>gr.value=ht})}if(s)for(let je in s)F1(s[je],i,n,je);if(c){let je=Se(c)?c.call(n):c;Reflect.ownKeys(je).forEach(De=>{Hz(De,je[De])})}d&&s1(d,e,"c");function ft(je,De){xe(De)?De.forEach(Tt=>je(Tt.bind(n))):De&&je(De.bind(n))}if(ft(rN,p),ft(It,m),ft(M1,f),ft(l0,S),ft(Qz,z),ft(eN,T),ft(aN,he),ft(oN,F),ft(iN,se),ft(Jo,j),ft(rn,U),ft(nN,te),xe(W))if(W.length){let je=e.exposed||(e.exposed={});W.forEach(De=>{Object.defineProperty(je,De,{get:()=>n[De],set:Tt=>n[De]=Tt,enumerable:!0})})}else e.exposed||(e.exposed={});$&&e.render===qt&&(e.render=$),de!=null&&(e.inheritAttrs=de),ie&&(e.components=ie),ye&&(e.directives=ye),te&&P1(e)}function uN(e,t,n=qt){xe(e)&&(e=e0(e));for(let i in e){let r=e[i],o;Le(r)?"default"in r?o=Iu(r.from||i,r.default,!0):o=Iu(r.from||i):o=Iu(r),zt(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[i]=o}}function s1(e,t,n){fr(xe(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function F1(e,t,n,i){let r=i.includes(".")?I1(n,i):()=>n[i];if(ot(e)){let o=t[e];Se(o)&&lt(r,o)}else if(Se(e))lt(r,e.bind(n));else if(Le(e))if(xe(e))e.forEach(o=>F1(o,t,n,i));else{let o=Se(e.handler)?e.handler.bind(n):t[e.handler];Se(o)&&lt(r,o,e)}}function u0(e){let t=e.type,{mixins:n,extends:i}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(t),c;return s?c=s:!r.length&&!n&&!i?c=t:(c={},r.length&&r.forEach(u=>Au(c,u,a,!0)),Au(c,t,a)),Le(t)&&o.set(t,c),c}function Au(e,t,n,i=!1){let{mixins:r,extends:o}=t;o&&Au(e,o,n,!0),r&&r.forEach(a=>Au(e,a,n,!0));for(let a in t)if(!(i&&a==="expose")){let s=dN[a]||n&&n[a];e[a]=s?s(e[a],t[a]):t[a]}return e}function l1(e,t){return t?e?function(){return ut(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function pN(e,t){return Es(e0(e),e0(t))}function e0(e){if(xe(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Yt(e,t){return e?[...new Set([].concat(e,t))]:t}function Es(e,t){return e?ut(Object.create(null),e,t):t}function c1(e,t){return e?xe(e)&&xe(t)?[...new Set([...e,...t])]:ut(Object.create(null),a1(e),a1(t??{})):t}function mN(e,t){if(!e)return t;if(!t)return e;let n=ut(Object.create(null),e);for(let i in t)n[i]=Yt(e[i],t[i]);return n}function B1(){return{app:null,config:{isNativeTag:kv,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}function hN(e,t){return function(i,r=null){Se(i)||(i=ut({},i)),r!=null&&!Le(r)&&(r=null);let o=B1(),a=new WeakSet,s=[],c=!1,u=o.app={_uid:fN++,_component:i,_props:r,_container:null,_context:o,_instance:null,version:v1,get config(){return o.config},set config(d){},use(d,...p){return a.has(d)||(d&&Se(d.install)?(a.add(d),d.install(u,...p)):Se(d)&&(a.add(d),d(u,...p))),u},mixin(d){return __VUE_OPTIONS_API__&&(o.mixins.includes(d)||o.mixins.push(d)),u},component(d,p){return p?(o.components[d]=p,u):o.components[d]},directive(d,p){return p?(o.directives[d]=p,u):o.directives[d]},mount(d,p,m){if(!c){let f=u._ceVNode||be(i,r);return f.appContext=o,m===!0?m="svg":m===!1&&(m=void 0),p&&t?t(f,d):e(f,d,m),c=!0,u._container=d,d.__vue_app__=u,__VUE_PROD_DEVTOOLS__&&(u._instance=f.component,jz(u,v1)),Bu(f.component)}},onUnmount(d){s.push(d)},unmount(){c&&(fr(s,u._instance,16),e(null,u._container),__VUE_PROD_DEVTOOLS__&&(u._instance=null,Lz(u)),delete u._container.__vue_app__)},provide(d,p){return o.provides[d]=p,u},runWithContext(d){let p=Ko;Ko=u;try{return d()}finally{Ko=p}}};return u}}function vN(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||qe,r=n,o=t.startsWith("update:"),a=o&&gN(i,t.slice(7));a&&(a.trim&&(r=n.map(d=>ot(d)?d.trim():d)),a.number&&(r=n.map(us))),__VUE_PROD_DEVTOOLS__&&Zz(e,t,r);let s,c=i[s=cs(t)]||i[s=cs(Et(t))];!c&&o&&(c=i[s=cs(Kr(t))]),c&&fr(c,e,6,r);let u=i[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,fr(u,e,6,r)}}function Z1(e,t,n=!1){let i=__VUE_OPTIONS_API__&&n?bN:t.emitsCache,r=i.get(e);if(r!==void 0)return r;let o=e.emits,a={},s=!1;if(__VUE_OPTIONS_API__&&!Se(e)){let c=u=>{let d=Z1(u,t,!0);d&&(s=!0,ut(a,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!s?(Le(e)&&i.set(e,null),null):(xe(o)?o.forEach(c=>a[c]=null):ut(a,o),Le(e)&&i.set(e,a),a)}function Fu(e,t){return!e||!Po(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ve(e,t[0].toLowerCase()+t.slice(1))||Ve(e,Kr(t))||Ve(e,t))}function Wv(e){let{type:t,vnode:n,proxy:i,withProxy:r,propsOptions:[o],slots:a,attrs:s,emit:c,render:u,renderCache:d,props:p,data:m,setupState:f,ctx:S,inheritAttrs:z}=e,T=Nu(e),L,j;try{if(n.shapeFlag&4){let $=r||i,F=$;L=en(u.call(F,$,d,p,f,m,S)),j=s}else{let $=t;L=en($.length>1?$(p,{attrs:s,slots:a,emit:c}):$(p,null)),j=t.props?s:yN(s)}}catch($){En.length=0,Ru($,e,1),L=be(Rt)}let D=L,U;if(j&&z!==!1){let $=Object.keys(j),{shapeFlag:F}=D;$.length&&F&7&&(o&&$.some(Ro)&&(j=xN(j,o)),D=ei(D,j,!1,!0))}return n.dirs&&(D=ei(D,null,!1,!0),D.dirs=D.dirs?D.dirs.concat(n.dirs):n.dirs),n.transition&&Qn(D,n.transition),L=D,Nu(T),L}function wN(e,t,n){let{props:i,children:r,component:o}=e,{props:a,children:s,patchFlag:c}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return i?u1(i,a,u):!!a;if(c&8){let d=t.dynamicProps;for(let p=0;p<d.length;p++){let m=d[p];if(H1(a,i,m)&&!Fu(u,m))return!0}}}else return(r||s)&&(!s||!s.$stable)?!0:i===a?!1:i?a?u1(i,a,u):!0:!!a;return!1}function u1(e,t,n){let i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let r=0;r<i.length;r++){let o=i[r];if(H1(t,e,o)&&!Fu(n,o))return!0}return!1}function H1(e,t,n){let i=e[n],r=t[n];return n==="style"&&Le(i)&&Le(r)?!ds(i,r):i!==r}function kN({vnode:e,parent:t,suspense:n},i){for(;t;){let r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=i,e=r),r===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}function _N(e,t,n,i=!1){let r={},o=W1();e.propsDefaults=Object.create(null),J1(e,t,r,o);for(let a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=i?r:Vv(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function $N(e,t,n,i){let{props:r,attrs:o,vnode:{patchFlag:a}}=e,s=Pe(r),[c]=e.propsOptions,u=!1;if((i||a>0)&&!(a&16)){if(a&8){let d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let m=d[p];if(Fu(e.emitsOptions,m))continue;let f=t[m];if(c)if(Ve(o,m))f!==o[m]&&(o[m]=f,u=!0);else{let S=Et(m);r[S]=t0(c,s,S,f,e,!1)}else f!==o[m]&&(o[m]=f,u=!0)}}}else{J1(e,t,r,o)&&(u=!0);let d;for(let p in s)(!t||!Ve(t,p)&&((d=Kr(p))===p||!Ve(t,d)))&&(c?n&&(n[p]!==void 0||n[d]!==void 0)&&(r[p]=t0(c,s,p,void 0,e,!0)):delete r[p]);if(o!==s)for(let p in o)(!t||!Ve(t,p))&&(delete o[p],u=!0)}u&&Gr(e.attrs,"set","")}function J1(e,t,n,i){let[r,o]=e.propsOptions,a=!1,s;if(t)for(let c in t){if(Mo(c))continue;let u=t[c],d;r&&Ve(r,d=Et(c))?!o||!o.includes(d)?n[d]=u:(s||(s={}))[d]=u:Fu(e.emitsOptions,c)||(!(c in i)||u!==i[c])&&(i[c]=u,a=!0)}if(o){let c=Pe(n),u=s||qe;for(let d=0;d<o.length;d++){let p=o[d];n[p]=t0(r,c,p,u[p],e,!Ve(u,p))}}return a}function t0(e,t,n,i,r,o){let a=e[n];if(a!=null){let s=Ve(a,"default");if(s&&i===void 0){let c=a.default;if(a.type!==Function&&!a.skipFactory&&Se(c)){let{propsDefaults:u}=r;if(n in u)i=u[n];else{let d=Rs(r);i=u[n]=c.call(null,t),d()}}else i=c;r.ce&&r.ce._setProp(n,i)}a[0]&&(o&&!s?i=!1:a[1]&&(i===""||i===Kr(n))&&(i=!0))}return i}function q1(e,t,n=!1){let i=__VUE_OPTIONS_API__&&n?SN:t.propsCache,r=i.get(e);if(r)return r;let o=e.props,a={},s=[],c=!1;if(__VUE_OPTIONS_API__&&!Se(e)){let d=p=>{c=!0;let[m,f]=q1(p,t,!0);ut(a,m),f&&s.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!c)return Le(e)&&i.set(e,Ei),Ei;if(xe(o))for(let d=0;d<o.length;d++){let p=Et(o[d]);d1(p)&&(a[p]=qe)}else if(o)for(let d in o){let p=Et(d);if(d1(p)){let m=o[d],f=a[p]=xe(m)||Se(m)?{type:m}:ut({},m),S=f.type,z=!1,T=!0;if(xe(S))for(let L=0;L<S.length;++L){let j=S[L],D=Se(j)&&j.name;if(D==="Boolean"){z=!0;break}else D==="String"&&(T=!1)}else z=Se(S)&&S.name==="Boolean";f[0]=z,f[1]=T,(z||Ve(f,"default"))&&s.push(p)}}let u=[a,s];return Le(e)&&i.set(e,u),u}function d1(e){return e[0]!=="$"&&!Mo(e)}function zN(){let e=[];typeof __VUE_OPTIONS_API__!="boolean"&&(qn().__VUE_OPTIONS_API__=!0),typeof __VUE_PROD_DEVTOOLS__!="boolean"&&(qn().__VUE_PROD_DEVTOOLS__=!1),typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(qn().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}function e$(e){return NN(e)}function NN(e,t){zN();let n=qn();n.__VUE__=!0,__VUE_PROD_DEVTOOLS__&&_1(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);let{insert:i,remove:r,patchProp:o,createElement:a,createText:s,createComment:c,setText:u,setElementText:d,parentNode:p,nextSibling:m,setScopeId:f=qt,insertStaticContent:S}=e,z=(h,k,M,H=null,w=null,_=null,b=void 0,C=null,I=!!k.dynamicChildren)=>{if(h===k)return;h&&!Pi(h,k)&&(H=At(h),vt(h,w,_,!0),h=null),k.patchFlag===-2&&(I=!1,k.dynamicChildren=null);let{type:A,ref:oe,shapeFlag:re}=k;switch(A){case Ds:T(h,k,M,H);break;case Rt:L(h,k,M,H);break;case Wo:h==null&&j(k,M,H,b);break;case ge:ye(h,k,M,H,w,_,b,C,I);break;default:re&1?F(h,k,M,H,w,_,b,C,I):re&6?Be(h,k,M,H,w,_,b,C,I):(re&64||re&128)&&A.process(h,k,M,H,w,_,b,C,I,Zt)}oe!=null&&w?Is(oe,h&&h.ref,_,k||h,!k):oe==null&&h&&h.ref!=null&&Is(h.ref,null,_,h,!0)},T=(h,k,M,H)=>{if(h==null)i(k.el=s(k.children),M,H);else{let w=k.el=h.el;k.children!==h.children&&u(w,k.children)}},L=(h,k,M,H)=>{h==null?i(k.el=c(k.children||""),M,H):k.el=h.el},j=(h,k,M,H)=>{[h.el,h.anchor]=S(h.children,k,M,H,h.el,h.anchor)},D=(h,k,M,H)=>{if(k.children!==h.children){let w=m(h.anchor);$(h),[k.el,k.anchor]=S(k.children,M,w,H)}else k.el=h.el,k.anchor=h.anchor},U=({el:h,anchor:k},M,H)=>{let w;for(;h&&h!==k;)w=m(h),i(h,M,H),h=w;i(k,M,H)},$=({el:h,anchor:k})=>{let M;for(;h&&h!==k;)M=m(h),r(h),h=M;r(k)},F=(h,k,M,H,w,_,b,C,I)=>{if(k.type==="svg"?b="svg":k.type==="math"&&(b="mathml"),h==null)se(k,M,H,w,_,b,C,I);else{let A=h.el&&h.el._isVueCE?h.el:null;try{A&&A._beginPatch(),W(h,k,w,_,b,C,I)}finally{A&&A._endPatch()}}},se=(h,k,M,H,w,_,b,C)=>{let I,A,{props:oe,shapeFlag:re,transition:ue,dirs:fe}=h;if(I=h.el=a(h.type,_,oe&&oe.is,oe),re&8?d(I,h.children):re&16&&te(h.children,I,null,H,w,Gv(h,_),b,C),fe&&Ai(h,null,H,"created"),he(I,h,h.scopeId,b,H),oe){for(let Te in oe)Te!=="value"&&!Mo(Te)&&o(I,Te,null,oe[Te],_,H);"value"in oe&&o(I,"value",null,oe.value,_),(A=oe.onVnodeBeforeMount)&&Xr(A,H,h)}__VUE_PROD_DEVTOOLS__&&(jo(I,"__vnode",h,!0),jo(I,"__vueParentComponent",H,!0)),fe&&Ai(h,null,H,"beforeMount");let _e=CN(w,ue);_e&&ue.beforeEnter(I),i(I,k,M),((A=oe&&oe.onVnodeMounted)||_e||fe)&&Xt(()=>{let ae;A&&Xr(A,H,h),_e&&ue.enter(I),fe&&Ai(h,null,H,"mounted")},w)},he=(h,k,M,H,w)=>{if(M&&f(h,M),H)for(let _=0;_<H.length;_++)f(h,H[_]);if(w){let _=w.subTree;if(k===_||n$(_.type)&&(_.ssContent===k||_.ssFallback===k)){let b=w.vnode;he(h,b,b.scopeId,b.slotScopeIds,w.parent)}}},te=(h,k,M,H,w,_,b,C,I=0)=>{for(let A=I;A<h.length;A++){let oe=h[A]=C?Sn(h[A]):en(h[A]);z(null,oe,k,M,H,w,_,b,C)}},W=(h,k,M,H,w,_,b)=>{let C=k.el=h.el;__VUE_PROD_DEVTOOLS__&&(C.__vnode=k);let{patchFlag:I,dynamicChildren:A,dirs:oe}=k;I|=h.patchFlag&16;let re=h.props||qe,ue=k.props||qe,fe;if(M&&Oi(M,!1),(fe=ue.onVnodeBeforeUpdate)&&Xr(fe,M,k,h),oe&&Ai(k,h,M,"beforeUpdate"),M&&Oi(M,!0),A&&(!h.dynamicChildren||h.dynamicChildren.length!==A.length)&&(I=0,b=!1,A=null),(re.innerHTML&&ue.innerHTML==null||re.textContent&&ue.textContent==null)&&d(C,""),A?de(h.dynamicChildren,A,C,M,H,Gv(k,w),_):b||Tt(h,k,C,null,M,H,Gv(k,w),_,!1),I>0){if(I&16)ie(C,re,ue,M,w);else if(I&2&&re.class!==ue.class&&o(C,"class",null,ue.class,w),I&4&&o(C,"style",re.style,ue.style,w),I&8){let _e=k.dynamicProps;for(let Te=0;Te<_e.length;Te++){let ae=_e[Te],Ke=re[ae],Xe=ue[ae];(Xe!==Ke||ae==="value")&&o(C,ae,Ke,Xe,w,M)}}I&1&&h.children!==k.children&&d(C,k.children)}else!b&&A==null&&ie(C,re,ue,M,w);((fe=ue.onVnodeUpdated)||oe)&&Xt(()=>{fe&&Xr(fe,M,k,h),oe&&Ai(k,h,M,"updated")},H)},de=(h,k,M,H,w,_,b)=>{for(let C=0;C<k.length;C++){let I=h[C],A=k[C],oe=I.el&&(I.type===ge||!Pi(I,A)||I.shapeFlag&198)?p(I.el):M;z(I,A,oe,null,H,w,_,b,!0)}},ie=(h,k,M,H,w)=>{if(k!==M){if(k!==qe)for(let _ in k)!Mo(_)&&!(_ in M)&&o(h,_,k[_],null,w,H);for(let _ in M){if(Mo(_))continue;let b=M[_],C=k[_];b!==C&&_!=="value"&&o(h,_,C,b,w,H)}"value"in M&&o(h,"value",k.value,M.value,w)}},ye=(h,k,M,H,w,_,b,C,I)=>{let A=k.el=h?h.el:s(""),oe=k.anchor=h?h.anchor:s(""),{patchFlag:re,dynamicChildren:ue,slotScopeIds:fe}=k;fe&&(C=C?C.concat(fe):fe),h==null?(i(A,M,H),i(oe,M,H),te(k.children||[],M,oe,w,_,b,C,I)):re>0&&re&64&&ue&&h.dynamicChildren&&h.dynamicChildren.length===ue.length?(de(h.dynamicChildren,ue,M,w,_,b,C),(k.key!=null||w&&k===w.subTree)&&m0(h,k,!0)):Tt(h,k,M,oe,w,_,b,C,I)},Be=(h,k,M,H,w,_,b,C,I)=>{k.slotScopeIds=C,h==null?k.shapeFlag&512?w.ctx.activate(k,M,H,b,I):mt(k,M,H,w,_,b,I):ft(h,k,I)},mt=(h,k,M,H,w,_,b)=>{let C=h.component=MN(h,H,w);if(Lu(h)&&(C.ctx.renderer=Zt),UN(C,!1,b),C.asyncDep){if(w&&w.registerDep(C,je,b),!h.el){let I=C.subTree=be(Rt);L(null,I,k,M),h.placeholder=I.el}}else je(C,h,k,M,w,_,b)},ft=(h,k,M)=>{let H=k.component=h.component;if(wN(h,k,M))if(H.asyncDep&&!H.asyncResolved){De(H,k,M);return}else H.next=k,H.update();else k.el=h.el,H.vnode=k},je=(h,k,M,H,w,_,b)=>{let C=()=>{if(h.isMounted){let{next:re,bu:ue,u:fe,parent:_e,vnode:Te}=h;{let gt=t$(h);if(gt){re&&(re.el=Te.el,De(h,re,b)),gt.asyncDep.then(()=>{Xt(()=>{h.isUnmounted||A()},w)});return}}let ae=re,Ke;Oi(h,!1),re?(re.el=Te.el,De(h,re,b)):re=Te,ue&&Uo(ue),(Ke=re.props&&re.props.onVnodeBeforeUpdate)&&Xr(Ke,_e,re,Te),Oi(h,!0);let Xe=Wv(h),St=h.subTree;h.subTree=Xe,z(St,Xe,p(St.el),At(St),h,w,_),re.el=Xe.el,ae===null&&kN(h,Xe.el),fe&&Xt(fe,w),(Ke=re.props&&re.props.onVnodeUpdated)&&Xt(()=>Xr(Ke,_e,re,Te),w),__VUE_PROD_DEVTOOLS__&&$1(h)}else{let re,{el:ue,props:fe}=k,{bm:_e,m:Te,parent:ae,root:Ke,type:Xe}=h,St=Ho(k);if(Oi(h,!1),_e&&Uo(_e),!St&&(re=fe&&fe.onVnodeBeforeMount)&&Xr(re,ae,k),Oi(h,!0),ue&&jr){let gt=()=>{h.subTree=Wv(h),jr(ue,h.subTree,h,w,null)};St&&Xe.__asyncHydrate?Xe.__asyncHydrate(ue,h,gt):gt()}else{Ke.ce&&Ke.ce._hasShadowRoot()&&Ke.ce._injectChildStyle(Xe,h.parent?h.parent.type:void 0);let gt=h.subTree=Wv(h);z(null,gt,M,H,h,w,_),k.el=gt.el}if(Te&&Xt(Te,w),!St&&(re=fe&&fe.onVnodeMounted)){let gt=k;Xt(()=>Xr(re,ae,gt),w)}(k.shapeFlag&256||ae&&Ho(ae.vnode)&&ae.vnode.shapeFlag&256)&&h.a&&Xt(h.a,w),h.isMounted=!0,__VUE_PROD_DEVTOOLS__&&Vz(h),k=M=H=null}};h.scope.on();let I=h.effect=new Fo(C);h.scope.off();let A=h.update=I.run.bind(I),oe=h.job=I.runIfDirty.bind(I);oe.i=h,oe.id=h.uid,I.scheduler=()=>n0(oe),Oi(h,!0),A()},De=(h,k,M)=>{k.component=h;let H=h.vnode.props;h.vnode=k,h.next=null,$N(h,k.props,H,M),TN(h,k.children,M),qr(),Q_(h),Yr()},Tt=(h,k,M,H,w,_,b,C,I=!1)=>{let A=h&&h.children,oe=h?h.shapeFlag:0,re=k.children,{patchFlag:ue,shapeFlag:fe}=k;if(ue>0){if(ue&128){gr(A,re,M,H,w,_,b,C,I);return}else if(ue&256){Ze(A,re,M,H,w,_,b,C,I);return}}fe&8?(oe&16&&kt(A,w,_),re!==A&&d(M,re)):oe&16?fe&16?gr(A,re,M,H,w,_,b,C,I):kt(A,w,_,!0):(oe&8&&d(M,""),fe&16&&te(re,M,H,w,_,b,C,I))},Ze=(h,k,M,H,w,_,b,C,I)=>{h=h||Ei,k=k||Ei;let A=h.length,oe=k.length,re=Math.min(A,oe),ue;for(ue=0;ue<re;ue++){let fe=k[ue]=I?Sn(k[ue]):en(k[ue]);z(h[ue],fe,M,null,w,_,b,C,I)}A>oe?kt(h,w,_,!0,!1,re):te(k,M,H,w,_,b,C,I,re)},gr=(h,k,M,H,w,_,b,C,I)=>{let A=0,oe=k.length,re=h.length-1,ue=oe-1;for(;A<=re&&A<=ue;){let fe=h[A],_e=k[A]=I?Sn(k[A]):en(k[A]);if(Pi(fe,_e))z(fe,_e,M,null,w,_,b,C,I);else break;A++}for(;A<=re&&A<=ue;){let fe=h[re],_e=k[ue]=I?Sn(k[ue]):en(k[ue]);if(Pi(fe,_e))z(fe,_e,M,null,w,_,b,C,I);else break;re--,ue--}if(A>re){if(A<=ue){let fe=ue+1,_e=fe<oe?k[fe].el:H;for(;A<=ue;)z(null,k[A]=I?Sn(k[A]):en(k[A]),M,_e,w,_,b,C,I),A++}}else if(A>ue)for(;A<=re;)vt(h[A],w,_,!0),A++;else{let fe=A,_e=A,Te=new Map;for(A=_e;A<=ue;A++){let pt=k[A]=I?Sn(k[A]):en(k[A]);pt.key!=null&&Te.set(pt.key,A)}let ae,Ke=0,Xe=ue-_e+1,St=!1,gt=0,rr=new Array(Xe);for(A=0;A<Xe;A++)rr[A]=0;for(A=fe;A<=re;A++){let pt=h[A];if(Ke>=Xe){vt(pt,w,_,!0);continue}let ct;if(pt.key!=null)ct=Te.get(pt.key);else for(ae=_e;ae<=ue;ae++)if(rr[ae-_e]===0&&Pi(pt,k[ae])){ct=ae;break}ct===void 0?vt(pt,w,_,!0):(rr[ct-_e]=A+1,ct>=gt?gt=ct:St=!0,z(pt,k[ct],M,null,w,_,b,C,I),Ke++)}let vr=St?AN(rr):Ei;for(ae=vr.length-1,A=Xe-1;A>=0;A--){let pt=_e+A,ct=k[pt],Dn=k[pt+1],di=pt+1<oe?Dn.el||r$(Dn):H;rr[A]===0?z(null,ct,M,di,w,_,b,C,I):St&&(ae<0||A!==vr[ae]?ht(ct,M,di,2):ae--)}}},ht=(h,k,M,H,w=null)=>{let{el:_,type:b,transition:C,children:I,shapeFlag:A}=h;if(A&6){ht(h.component.subTree,k,M,H);return}if(A&128){h.suspense.move(k,M,H);return}if(A&64){b.move(h,k,M,Zt);return}if(b===ge){i(_,k,M);for(let re=0;re<I.length;re++)ht(I[re],k,M,H);i(h.anchor,k,M);return}if(b===Wo){U(h,k,M);return}if(H!==2&&A&1&&C)if(H===0)C.persisted&&!_[$r]?i(_,k,M):(C.beforeEnter(_),i(_,k,M),Xt(()=>C.enter(_),w));else{let{leave:re,delayLeave:ue,afterLeave:fe}=C,_e=()=>{h.ctx.isUnmounted?r(_):i(_,k,M)},Te=()=>{let ae=_._isLeaving||!!_[$r];_._isLeaving&&_[$r](!0),C.persisted&&!ae?_e():re(_,()=>{_e(),fe&&fe()})};ue?ue(_,_e,Te):Te()}else i(_,k,M)},vt=(h,k,M,H=!1,w=!1)=>{let{type:_,props:b,ref:C,children:I,dynamicChildren:A,shapeFlag:oe,patchFlag:re,dirs:ue,cacheIndex:fe,memo:_e}=h;if(re===-2&&(w=!1),C!=null&&(qr(),Is(C,null,M,h,!0),Yr()),fe!=null&&(k.renderCache[fe]=void 0),oe&256){k.ctx.deactivate(h);return}let Te=oe&1&&ue,ae=!Ho(h),Ke;if(ae&&(Ke=b&&b.onVnodeBeforeUnmount)&&Xr(Ke,k,h),oe&6)On(h.component,M,H);else{if(oe&128){h.suspense.unmount(M,H);return}Te&&Ai(h,null,k,"beforeUnmount"),oe&64?h.type.remove(h,k,M,Zt,H):A&&!A.hasOnce&&(_!==ge||re>0&&re&64)?kt(A,k,M,!1,!0):(_===ge&&re&384||!w&&oe&16)&&kt(I,k,M),H&&Tr(h)}let Xe=_e!=null&&fe==null;(ae&&(Ke=b&&b.onVnodeUnmounted)||Te||Xe)&&Xt(()=>{Ke&&Xr(Ke,k,h),Te&&Ai(h,null,k,"unmounted"),Xe&&(h.el=null)},M)},Tr=h=>{let{type:k,el:M,anchor:H,transition:w}=h;if(k===ge){wt(M,H);return}if(k===Wo){$(h);return}let _=()=>{r(M),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(h.shapeFlag&1&&w&&!w.persisted){let{leave:b,delayLeave:C}=w,I=()=>b(M,_);C?C(h.el,_,I):I()}else _()},wt=(h,k)=>{let M;for(;h!==k;)M=m(h),r(h),h=M;r(k)},On=(h,k,M)=>{let{bum:H,scope:w,job:_,subTree:b,um:C,m:I,a:A}=h;p1(I),p1(A),H&&Uo(H),w.stop(),_&&(_.flags|=8,vt(b,h,k,M)),C&&Xt(C,k),Xt(()=>{h.isUnmounted=!0},k),__VUE_PROD_DEVTOOLS__&&Bz(h)},kt=(h,k,M,H=!1,w=!1,_=0)=>{for(let b=_;b<h.length;b++)vt(h[b],k,M,H,w)},At=h=>{if(h.shapeFlag&6)return At(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();let k=m(h.anchor||h.el),M=k&&k[T1];return M?m(M):k},Bt=!1,Ge=(h,k,M)=>{let H;h==null?k._vnode&&(vt(k._vnode,null,null,!0),H=k._vnode.component):z(k._vnode||null,h,k,null,null,null,M),k._vnode=h,Bt||(Bt=!0,Q_(H),w1(),Bt=!1)},Zt={p:z,um:vt,m:ht,r:Tr,mt,mc:te,pc:Tt,pbc:de,n:At,o:e},He,jr;return t&&([He,jr]=t(Zt)),{render:Ge,hydrate:He,createApp:hN(Ge,He)}}function Gv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Oi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function CN(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function m0(e,t,n=!1){let i=e.children,r=t.children;if(xe(i)&&xe(r))for(let o=0;o<i.length;o++){let a=i[o],s=r[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=r[o]=Sn(r[o]),s.el=a.el),!n&&s.patchFlag!==-2&&m0(a,s)),s.type===Ds&&(s.patchFlag===-1&&(s=r[o]=Sn(s)),s.el=a.el),s.type===Rt&&!s.el&&(s.el=a.el)}}function AN(e){let t=e.slice(),n=[0],i,r,o,a,s,c=e.length;for(i=0;i<c;i++){let u=e[i];if(u!==0){if(r=n[n.length-1],e[r]<u){t[i]=r,n.push(i);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,e[n[s]]<u?o=s+1:a=s;u<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function t$(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:t$(t)}function p1(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function r$(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?r$(t.subTree):null}function ON(e,t){t&&t.pendingBranch?xe(e)?t.effects.push(...e):t.effects.push(e):x1(e)}function v(e=!1){En.push(mr=e?null:[])}function f0(){En.pop(),mr=En[En.length-1]||null}function Ou(e,t=!1){Ns+=e,e<0&&mr&&t&&(mr.hasOnce=!0)}function i$(e){return e.dynamicChildren=Ns>0?mr||Ei:null,f0(),Ns>0&&mr&&mr.push(e),e}function x(e,t,n,i,r,o){return i$(y(e,t,n,i,r,o,!0))}function Fe(e,t,n,i,r){return i$(be(e,t,n,i,r,!0))}function Cs(e){return e?e.__v_isVNode===!0:!1}function Pi(e,t){return e.type===t.type&&e.key===t.key}function y(e,t=null,n=null,i=0,r=null,o=e===ge?0:1,a=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&o$(t),ref:t&&Tu(t),scopeId:S1,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Mt};return s?(Du(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ot(n)?8:16),Ns>0&&!a&&mr&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&mr.push(c),c}function DN(e,t=null,n=null,i=0,r=null,o=!1){if((!e||e===j1)&&(e=Rt),Cs(e)){let s=ei(e,t,!0);return n&&Du(s,n),Ns>0&&!o&&mr&&(s.shapeFlag&6?mr[mr.indexOf(e)]=s:mr.push(s)),s.patchFlag=-2,s}if(BN(e)&&(e=e.__vccOpts),t){t=qo(t);let{class:s,style:c}=t;s&&!ot(s)&&(t.class=V(s)),Le(c)&&(ks(c)&&!xe(c)&&(c=ut({},c)),t.style=we(c))}let a=ot(e)?1:n$(e)?128:z1(e)?64:Le(e)?4:Se(e)?2:0;return y(e,t,n,i,r,a,o,!0)}function qo(e){return e?ks(e)||G1(e)?ut({},e):e:null}function ei(e,t,n=!1,i=!1){let{props:r,ref:o,patchFlag:a,children:s,transition:c}=e,u=t?h0(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&o$(u),ref:t&&t.ref?n&&o?xe(o)?o.concat(Tu(t)):[o,Tu(t)]:Tu(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ge?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ei(e.ssContent),ssFallback:e.ssFallback&&ei(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&i&&Qn(d,c.clone(d)),d}function xt(e=" ",t=0){return be(Ds,null,e,t)}function a$(e,t){let n=be(Wo,null,e);return n.staticCount=t,n}function Y(e="",t=!1){return t?(v(),Fe(Rt,null,e)):be(Rt,null,e)}function en(e){return e==null||typeof e=="boolean"?be(Rt):xe(e)?be(ge,null,e.slice()):Cs(e)?Sn(e):be(Ds,null,String(e))}function Sn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ei(e)}function Du(e,t){let n=0,{shapeFlag:i}=e;if(t==null)t=null;else if(xe(t))n=16;else if(typeof t=="object")if(i&65){let r=t.default;r&&(r._c&&(r._d=!1),Du(e,r()),r._c&&(r._d=!0));return}else{n=32;let r=t._;!r&&!G1(t)?t._ctx=Mt:r===3&&Mt&&(Mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Se(t)){if(i&65){Du(e,{default:t});return}t={default:t,_ctx:Mt},n=32}else t=String(t),i&64?(n=16,t=[xt(t)]):n=8;e.children=t,e.shapeFlag|=n}function h0(...e){let t={};for(let n=0;n<e.length;n++){let i=e[n];for(let r in i)if(r==="class")t.class!==i.class&&(t.class=V([t.class,i.class]));else if(r==="style")t.style=we([t.style,i.style]);else if(Po(r)){let o=t[r],a=i[r];a&&o!==a&&!(xe(o)&&o.includes(a))?t[r]=o?[].concat(o,a):a:a==null&&o==null&&!Ro(r)&&(t[r]=a)}else r!==""&&(t[r]=i[r])}return t}function Xr(e,t,n,i=null){fr(e,t,7,[n,i])}function MN(e,t,n){let i=e.type,r=(t?t.appContext:e.appContext)||PN,o={uid:RN++,vnode:e,type:i,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new gs(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:q1(i,r),emitsOptions:Z1(i,r),emit:null,emitted:null,propsDefaults:qe,inheritAttrs:i.inheritAttrs,ctx:qe,data:qe,props:qe,attrs:qe,slots:qe,refs:qe,setupState:qe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=vN.bind(null,o),e.ce&&e.ce(o),o}function s$(e){return e.vnode.shapeFlag&4}function UN(e,t=!1,n=!1){t&&r0(t);let{props:i,children:r}=e.vnode,o=s$(e);_N(e,i,o,t),IN(e,r,n||t);let a=o?jN(e,t):void 0;return t&&r0(!1),a}function jN(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lN);let{setup:i}=n;if(i){qr();let r=e.setupContext=i.length>1?VN(e):null,o=Rs(e),a=Os(i,e,0,[e.props,r]),s=_v(a);if(Yr(),o(),(s||e.sp)&&!Ho(e)&&P1(e),s){if(a.then(m1,m1),t)return a.then(c=>{f1(e,c,t)}).catch(c=>{Ru(c,e,0)});e.asyncDep=a}else f1(e,a,t)}else l$(e,t)}function f1(e,t,n){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Le(t)&&(__VUE_PROD_DEVTOOLS__&&(e.devtoolsRawSetupState=t),e.setupState=Su(t)),l$(e,n)}function l$(e,t,n){let i=e.type;if(!e.render){if(!t&&h1&&!i.render){let r=i.template||__VUE_OPTIONS_API__&&u0(e).template;if(r){let{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:s,compilerOptions:c}=i,u=ut(ut({isCustomElement:o,delimiters:s},a),c);i.render=h1(r,u)}}e.render=i.render||qt,g1&&g1(e)}if(__VUE_OPTIONS_API__){let r=Rs(e);qr();try{cN(e)}finally{Yr(),r()}}}function VN(e){let t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,LN),slots:e.slots,emit:e.emit,expose:t}}function Bu(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Su(Bv(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ts)return Ts[n](e)},has(t,n){return n in t||n in Ts}})):e.proxy}function FN(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function BN(e){return Se(e)&&"__vccOpts"in e}function c$(e,t,n){try{Ou(-1);let i=arguments.length;return i===2?Le(t)&&!xe(t)?Cs(t)?be(e,null,[t]):be(e,t):be(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&Cs(n)&&(n=[n]),be(e,t,n))}finally{Ou(1)}}var Qt,Qr,Zo,Xn,Bo,b1,zu,zs,Uz,tn,$s,Jv,Vz,$1,Fz,Bz,Mt,S1,Kz,Wz,Yn,T1,z1,Di,Jz,e1,t1,qv,qz,N1,$r,_s,_r,a0,C1,Xz,O1,Cu,eV,tV,Ho,Lu,In,rN,It,M1,l0,Jo,rn,nN,iN,oN,U1,j1,Xv,Ts,Kv,lN,Qv,dN,fN,Ko,gN,bN,yN,xN,K1,W1,G1,SN,d0,p0,EN,Y1,X1,Q1,IN,TN,Xt,n$,ge,Ds,Rt,Wo,En,mr,Ns,o$,Tu,be,PN,RN,Vt,Ps,Pu,r0,Rs,m1,As,h1,g1,LN,N,v1,g0=O(()=>{Zv();Zv();ps();ps();/**
76
+ **/gs=class{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Dt&&(Dt.active?(this.parent=Dt,this.index=(Dt.scopes||(Dt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){let i=this.scopes.slice();for(t=0,n=i.length;t<n;t++)i[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){let r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}let i=this.effects.slice();for(t=0,n=i.length;t<n;t++)i[t].resume()}}run(t){if(this._active){let n=Dt;try{return Dt=this,t()}finally{Dt=n}}}on(){++this._on===1&&(this.prevScope=Dt,Dt=this)}off(){if(this._on>0&&--this._on===0){if(Dt===this)Dt=this.prevScope;else{let t=Dt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){let r=this.scopes.slice();for(n=0,i=r.length;n<i;n++)r[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){let r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}};Ev=new WeakSet,Fo=class{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Dt&&(Dt.active?Dt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ev.has(this)&&(Ev.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||j_(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,P_(this),L_(this);let t=dt,n=Dr;dt=this,Dr=!0;try{return this.fn()}finally{V_(this),dt=t,Dr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)jv(t);this.deps=this.depsTail=void 0,P_(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ev.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zv(this)&&this.run()}get dirty(){return zv(this)}},U_=0;Dr=!0,B_=[];vs=0,Nv=class{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},bs=class{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!dt||!Dr||dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dt)n=this.activeLink=new Nv(dt,this),dt.deps?(n.prevDep=dt.depsTail,dt.depsTail.nextDep=n,dt.depsTail=n):dt.deps=dt.depsTail=n,Z_(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){let i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=dt.depsTail,n.nextDep=void 0,dt.depsTail.nextDep=n,dt.depsTail=n,dt.deps===n&&(dt.deps=i)}return n}trigger(t){this.version++,vs++,this.notify(t)}notify(t){Mv();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Uv()}}};Cv=new WeakMap,Ni=Symbol(""),Av=Symbol(""),ys=Symbol("");yz={__proto__:null,[Symbol.iterator](){return Iv(this,Symbol.iterator,e=>Wr(this,e))},concat(...e){return Vo(this).concat(...e.map(t=>xe(t)?Vo(t):t))},entries(){return Iv(this,"entries",e=>(e[1]=Wr(this,e[1]),e))},every(e,t){return _n(this,"every",e,t,void 0,arguments)},filter(e,t){return _n(this,"filter",e,t,n=>n.map(i=>Wr(this,i)),arguments)},find(e,t){return _n(this,"find",e,t,n=>Wr(this,n),arguments)},findIndex(e,t){return _n(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return _n(this,"findLast",e,t,n=>Wr(this,n),arguments)},findLastIndex(e,t){return _n(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return _n(this,"forEach",e,t,void 0,arguments)},includes(...e){return Tv(this,"includes",e)},indexOf(...e){return Tv(this,"indexOf",e)},join(e){return Vo(this).join(e)},lastIndexOf(...e){return Tv(this,"lastIndexOf",e)},map(e,t){return _n(this,"map",e,t,void 0,arguments)},pop(){return ms(this,"pop")},push(...e){return ms(this,"push",e)},reduce(e,...t){return R_(this,"reduce",e,t)},reduceRight(e,...t){return R_(this,"reduceRight",e,t)},shift(){return ms(this,"shift")},some(e,t){return _n(this,"some",e,t,void 0,arguments)},splice(...e){return ms(this,"splice",e)},toReversed(){return Vo(this).toReversed()},toSorted(e){return Vo(this).toSorted(e)},toSpliced(...e){return Vo(this).toSpliced(...e)},unshift(...e){return ms(this,"unshift",e)},values(){return Iv(this,"values",e=>Wr(this,e))}};xz=Array.prototype;wz=Do("__proto__,__v_isRef,__isVue"),H_=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(sr));wu=class{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;let r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(r?o?Cz:G_:o?W_:K_).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;let a=xe(t);if(!r){let c;if(a&&(c=yz[n]))return c;if(n==="hasOwnProperty")return kz}let s=Reflect.get(t,n,zt(t)?t:i);if((sr(n)?H_.has(n):wz(n))||(r||Pt(t,"get",n),o))return s;if(zt(s)){let c=a&&hu(n)?s:s.value;return r&&Le(c)?_u(c):c}return Le(s)?r?_u(s):ws(s):s}},ku=class extends wu{constructor(t=!1){super(!1,t)}set(t,n,i,r){let o=t[n],a=xe(t)&&hu(n);if(!this._isShallow){let u=Pr(o);if(!lr(i)&&!Pr(i)&&(o=Pe(o),i=Pe(i)),!a&&zt(o)&&!zt(i))return u||(o.value=i),!0}let s=a?Number(n)<t.length:Ve(t,n),c=Reflect.set(t,n,i,zt(t)?t:r);return t===Pe(r)&&c&&(s?wr(i,o)&&Gr(t,"set",n,i,o):Gr(t,"add",n,i)),c}deleteProperty(t,n){let i=Ve(t,n),r=t[n],o=Reflect.deleteProperty(t,n);return o&&i&&Gr(t,"delete",n,void 0,r),o}has(t,n){let i=Reflect.has(t,n);return(!sr(n)||!H_.has(n))&&Pt(t,"has",n),i}ownKeys(t){return Pt(t,"iterate",xe(t)?"length":Ni),Reflect.ownKeys(t)}},Ov=class extends wu{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}},_z=new ku,$z=new Ov,Sz=new ku(!0),Dv=e=>e,bu=e=>Reflect.getPrototypeOf(e);Tz={get:Lv(!1,!1)},zz={get:Lv(!1,!0)},Nz={get:Lv(!0,!1)},K_=new WeakMap,W_=new WeakMap,G_=new WeakMap,Cz=new WeakMap;kr=e=>Le(e)?ws(e):e,Ci=e=>Le(e)?_u(e):e;Pv=class{constructor(t,n){this.dep=new bs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Pe(t),this._value=n?t:kr(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){let n=this._rawValue,i=this.__v_isShallow||lr(t)||Pr(t);t=i?t:Pe(t),wr(t,n)&&(this._rawValue=t,this._value=i?t:kr(t),this.dep.trigger())}};Oz={get:(e,t,n)=>t==="__v_raw"?e:Ie(Reflect.get(e,t,n)),set:(e,t,n,i)=>{let r=e[t];return zt(r)&&!zt(n)?(r.value=n,!0):Reflect.set(e,t,n,i)}};Rv=class{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new bs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&dt!==this)return j_(this,!0),!0}get value(){let t=this.dep.track();return F_(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}};xu={},$u=new WeakMap});function Os(e,t,n,i){try{return i?e(...i):e()}catch(r){Ru(r,t,n)}}function fr(e,t,n,i){if(Se(e)){let r=Os(e,t,n,i);return r&&_v(r)&&r.catch(o=>{Ru(o,t,n)}),r}if(xe(e)){let r=[];for(let o=0;o<e.length;o++)r.push(fr(e[o],t,n,i));return r}}function Ru(e,t,n,i=!0){let r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||qe;if(t){let s=t.parent,c=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;s;){let d=s.ec;if(d){for(let p=0;p<d.length;p++)if(d[p](e,c,u)===!1)return}s=s.parent}if(o){qr(),Os(o,null,10,[e,c,u]),Yr();return}}Rz(e,n,r,i,a)}function Rz(e,t,n,i=!0,r=!1){if(r)throw e;console.error(e)}function Ri(e){let t=zu||b1;return e?t.then(this?e.bind(this):e):t}function Mz(e){let t=Qr+1,n=Qt.length;for(;t<n;){let i=t+n>>>1,r=Qt[i],o=zs(r);o<e||o===e&&r.flags&2?t=i+1:n=i}return t}function n0(e){if(!(e.flags&1)){let t=zs(e),n=Qt[Qt.length-1];!n||!(e.flags&2)&&t>=zs(n)?Qt.push(e):Qt.splice(Mz(t),0,e),e.flags|=1,y1()}}function y1(){zu||(zu=b1.then(k1))}function x1(e){xe(e)?Zo.push(...e):Xn&&e.id===-1?Xn.splice(Bo+1,0,e):e.flags&1||(Zo.push(e),e.flags|=1),y1()}function Q_(e,t,n=Qr+1){for(;n<Qt.length;n++){let i=Qt[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;Qt.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function w1(e){if(Zo.length){let t=[...new Set(Zo)].sort((n,i)=>zs(n)-zs(i));if(Zo.length=0,Xn){Xn.push(...t);return}for(Xn=t,Bo=0;Bo<Xn.length;Bo++){let n=Xn[Bo];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Xn=null,Bo=0}}function k1(e){let t=qt;try{for(Qr=0;Qr<Qt.length;Qr++){let n=Qt[Qr];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Os(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;Qr<Qt.length;Qr++){let n=Qt[Qr];n&&(n.flags&=-2)}Qr=-1,Qt.length=0,w1(e),zu=null,(Qt.length||Zo.length)&&k1(e)}}function Mu(e,...t){tn?tn.emit(e,...t):Jv||$s.push({event:e,args:t})}function _1(e,t){var n,i;tn=e,tn?(tn.enabled=!0,$s.forEach(({event:r,args:o})=>tn.emit(r,...o)),$s=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{_1(o,t)}),setTimeout(()=>{tn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Jv=!0,$s=[])},3e3)):(Jv=!0,$s=[])}function jz(e,t){Mu("app:init",e,t,{Fragment:ge,Text:Ds,Comment:Rt,Static:Wo})}function Lz(e){Mu("app:unmount",e)}function i0(e){return t=>{Mu(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}function Zz(e,t,n){Mu("component:emit",e.appContext.app,e,t,n)}function Nu(e){let t=Mt;return Mt=e,S1=e&&e.type.__scopeId||null,t}function bt(e,t=Mt,n){if(!t||e._n)return e;let i=(...r)=>{i._d&&Ou(-1);let o=Nu(t),a=En.length,s;try{s=e(...r)}finally{for(let c=En.length;c>a;c--)f0();Nu(o),i._d&&Ou(1)}return __VUE_PROD_DEVTOOLS__&&$1(t),s};return i._n=!0,i._c=!0,i._d=!0,i}function Uu(e,t){if(Mt===null)return e;let n=Bu(Mt),i=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,a,s,c=qe]=t[r];o&&(Se(o)&&(o={mounted:o,updated:o}),o.deep&&Jr(a),i.push({dir:o,instance:n,value:a,oldValue:void 0,arg:s,modifiers:c}))}return e}function Ai(e,t,n,i){let r=e.dirs,o=t&&t.dirs;for(let a=0;a<r.length;a++){let s=r[a];o&&(s.oldValue=o[a].value);let c=s.dir[i];c&&(qr(),fr(c,n,8,[e.el,s,e,t]),Yr())}}function Hz(e,t){if(Vt){let n=Vt.provides,i=Vt.parent&&Vt.parent.provides;i===n&&(n=Vt.provides=Object.create(i)),n[e]=t}}function Iu(e,t,n=!1){let i=Ps();if(i||Ko){let r=Ko?Ko._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&Se(t)?t.call(i&&i.proxy):t}}function lt(e,t,n){return E1(e,t,n)}function E1(e,t,n=qe){let{immediate:i,deep:r,flush:o,once:a}=n,s=ut({},n),c=t&&i||!t&&o!=="post",u;if(As){if(o==="sync"){let f=Wz();u=f.__watcherHandles||(f.__watcherHandles=[])}else if(!c){let f=()=>{};return f.stop=qt,f.resume=qt,f.pause=qt,f}}let d=Vt;s.call=(f,S,z)=>fr(f,d,S,z);let p=!1;o==="post"?s.scheduler=f=>{Xt(f,d&&d.suspense)}:o!=="sync"&&(p=!0,s.scheduler=(f,S)=>{S?f():n0(f)}),s.augmentJob=f=>{t&&(f.flags|=4),p&&(f.flags|=2,d&&(f.id=d.uid,f.i=d))};let m=X_(e,t,s);return As&&(u?u.push(m):c&&m()),m}function Gz(e,t,n){let i=this.proxy,r=ot(e)?e.includes(".")?I1(i,e):()=>i[e]:e.bind(i,i),o;Se(t)?o=t:(o=t.handler,n=t);let a=Rs(this),s=E1(r,o.bind(i),n);return a(),s}function I1(e,t){let n=t.split(".");return()=>{let i=e;for(let r=0;r<n.length&&i;r++)i=i[n[r]];return i}}function Eu(e,t,n,{o:{insert:i},m:r},o=2){o===0&&i(e.targetAnchor,t,n);let{el:a,anchor:s,shapeFlag:c,children:u,props:d}=e,p=o===2;if(p&&i(a,t,n),!Yn.has(e)&&(!p||Di(d))&&c&16)for(let m=0;m<u.length;m++)r(u[m],t,n,2);p&&i(s,t,n)}function Yz(e,t,n,i,r,o,{o:{nextSibling:a,parentNode:s,querySelector:c,insert:u,createText:d}},p){function m(T,L){let j=L;for(;j;){if(j&&j.nodeType===8){if(j.data==="teleport start anchor")t.targetStart=j;else if(j.data==="teleport anchor"){t.targetAnchor=j,T._lpa=t.targetAnchor&&a(t.targetAnchor);break}}j=a(j)}}function f(T,L){L.anchor=p(a(T),L,s(T),n,i,r,o)}let S=t.target=qv(t.props,c),z=Di(t.props);if(S){let T=S._lpa||S.firstChild;t.shapeFlag&16&&(z?(f(e,t),m(S,T),t.targetAnchor||Yv(S,t,d,u,s(e)===S?e:null)):(t.anchor=a(e),m(S,T),t.targetAnchor||Yv(S,t,d,u),p(T&&a(T),t,S,n,i,r,o))),Ss(t,z)}else z&&t.shapeFlag&16&&(f(e,t),t.targetStart=e,t.targetAnchor=a(e));return t.anchor&&a(t.anchor)}function Ss(e,t){let n=e.ctx;if(n&&n.ut){let i,r;for(t?(i=e.el,r=e.anchor):(i=e.targetStart,r=e.targetAnchor);i&&i!==r;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function Yv(e,t,n,i,r=null){let o=t.targetStart=n(""),a=t.targetAnchor=n("");return o[T1]=a,e&&(i(o,e,r),i(a,e,r)),a}function o0(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return It(()=>{e.isMounted=!0}),Jo(()=>{e.isUnmounting=!0}),e}function A1(e){let t=e[0];if(e.length>1){let n=!1;for(let i of e)if(i.type!==Rt){t=i,n=!0;break}}return t}function D1(e,t){let{leavingVNodes:n}=e,i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Go(e,t,n,i,r){let{appear:o,mode:a,persisted:s=!1,onBeforeEnter:c,onEnter:u,onAfterEnter:d,onEnterCancelled:p,onBeforeLeave:m,onLeave:f,onAfterLeave:S,onLeaveCancelled:z,onBeforeAppear:T,onAppear:L,onAfterAppear:j,onAppearCancelled:D}=t,U=String(e.key),$=D1(n,e),B=(te,W)=>{te&&fr(te,i,9,W)},se=(te,W)=>{let de=W[1];B(te,W),xe(te)?te.every(ie=>ie.length<=1)&&de():te.length<=1&&de()},he={mode:a,persisted:s,beforeEnter(te){let W=c;if(!n.isMounted)if(o)W=T||c;else return;te[$r]&&te[$r](!0);let de=$[U];de&&Pi(e,de)&&de.el[$r]&&de.el[$r](),B(W,[te])},enter(te){if(!Uz&&$[U]===e)return;let W=u,de=d,ie=p;if(!n.isMounted)if(o)W=L||u,de=j||d,ie=D||p;else return;let ye=!1;te[_s]=mt=>{ye||(ye=!0,mt?B(ie,[te]):B(de,[te]),he.delayedLeave&&he.delayedLeave(),te[_s]=void 0)};let Be=te[_s].bind(null,!1);W?se(W,[te,Be]):Be()},leave(te,W){let de=String(e.key);if(te[_s]&&te[_s](!0),n.isUnmounting)return W();B(m,[te]);let ie=!1;te[$r]=Be=>{ie||(ie=!0,W(),Be?B(z,[te]):B(S,[te]),te[$r]=void 0,$[de]===e&&delete $[de])};let ye=te[$r].bind(null,!1);$[de]=e,f?se(f,[te,ye]):ye()},clone(te){let W=Go(te,t,n,i,r);return r&&r(W),W}};return he}function Hv(e){if(Lu(e))return e=ei(e),e.children=null,e}function r1(e){if(!Lu(e))return z1(e.type)&&e.children?A1(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Se(n.default))return n.default()}}function Qn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Qn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ju(e,t=!1,n){let i=[],r=0;for(let o=0;o<e.length;o++){let a=e[o],s=n==null?a.key:String(n)+String(a.key!=null?a.key:o);a.type===ge?(a.patchFlag&128&&r++,i=i.concat(ju(a.children,t,s))):(t||a.type!==Rt)&&i.push(s!=null?ei(a,{key:s}):a)}if(r>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function Ae(e,t){return Se(e)?ut({name:e.name},t,{setup:e}):e}function P1(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function s0(e){let t=Ps(),n=Ye(null);if(t){let r=t.refs===qe?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}function n1(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}function Is(e,t,n,i,r=!1){if(xe(e)){e.forEach((z,T)=>Is(z,t&&(xe(t)?t[T]:t),n,i,r));return}if(Ho(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Is(e,t,n,i.component.subTree);return}let o=i.shapeFlag&4?Bu(i.component):i.el,a=r?null:o,{i:s,r:c}=e,u=t&&t.r,d=s.refs===qe?s.refs={}:s.refs,p=s.setupState,m=Pe(p),f=p===qe?kv:z=>n1(d,z)?!1:Ve(m,z),S=(z,T)=>!(T&&n1(d,T));if(u!=null&&u!==c){if(i1(t),ot(u))d[u]=null,f(u)&&(p[u]=null);else if(zt(u)){let z=t;S(u,z.k)&&(u.value=null),z.k&&(d[z.k]=null)}}if(Se(c))Os(c,s,12,[a,d]);else{let z=ot(c),T=zt(c);if(z||T){let L=()=>{if(e.f){let j=z?f(c)?p[c]:d[c]:S(c)||!e.k?c.value:d[e.k];if(r)xe(j)&&ss(j,o);else if(xe(j))j.includes(o)||j.push(o);else if(z)d[c]=[o],f(c)&&(p[c]=d[c]);else{let D=[o];S(c,e.k)&&(c.value=D),e.k&&(d[e.k]=D)}}else z?(d[c]=a,f(c)&&(p[c]=a)):T&&(S(c,e.k)&&(c.value=a),e.k&&(d[e.k]=a))};if(a){let j=()=>{L(),Cu.delete(e)};j.id=-1,Cu.set(e,j),Xt(j,n)}else i1(e),L()}}}function i1(e){let t=Cu.get(e);t&&(t.flags|=8,Cu.delete(e))}function Qz(e,t){R1(e,"a",t)}function eN(e,t){R1(e,"da",t)}function R1(e,t,n=Vt){let i=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Vu(t,i,n),n){let r=n.parent;for(;r&&r.parent;)Lu(r.parent.vnode)&&tN(i,t,n,r),r=r.parent}}function tN(e,t,n,i){let r=Vu(t,e,i,!0);rn(()=>{ss(i[t],r)},n)}function Vu(e,t,n=Vt,i=!1){if(n){let r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...a)=>{qr();let s=Rs(n),c=fr(t,n,e,a);return s(),Yr(),c});return i?r.unshift(o):r.push(o),o}}function aN(e,t=Vt){Vu("ec",e,t)}function L1(e){return ot(e)?sN(U1,e,!1)||e:e||j1}function sN(e,t,n=!0,i=!1){let r=Mt||Vt;if(r){let o=r.type;if(e===U1){let s=FN(o,!1);if(s&&(s===t||s===Et(t)||s===Ti(Et(t))))return o}let a=o1(r[e]||o[e],t)||o1(r.appContext[e],t);return!a&&i?o:a}}function o1(e,t){return e&&(e[t]||e[Et(t)]||e[Ti(Et(t))])}function et(e,t,n,i){let r,o=n&&n[i],a=xe(e);if(a||ot(e)){let s=a&&$n(e),c=!1,u=!1;s&&(c=!lr(e),u=Pr(e),e=xs(e)),r=new Array(e.length);for(let d=0,p=e.length;d<p;d++)r[d]=t(c?u?Ci(kr(e[d])):kr(e[d]):e[d],d,void 0,o&&o[d])}else if(typeof e=="number"){r=new Array(e);for(let s=0;s<e;s++)r[s]=t(s+1,s,void 0,o&&o[s])}else if(Le(e))if(e[Symbol.iterator])r=Array.from(e,(s,c)=>t(s,c,void 0,o&&o[c]));else{let s=Object.keys(e);r=new Array(s.length);for(let c=0,u=s.length;c<u;c++){let d=s[c];r[c]=t(e[d],d,c,o&&o[c])}}else r=[];return n&&(n[i]=r),r}function c0(e,t){for(let n=0;n<t.length;n++){let i=t[n];if(xe(i))for(let r=0;r<i.length;r++)e[i[r].name]=i[r].fn;else i&&(e[i.name]=i.key?(...r)=>{let o=i.fn(...r);return o&&(o.key=i.key),o}:i.fn)}return e}function er(e,t,n={},i,r,o){if(Mt.ce||Mt.parent&&Ho(Mt.parent)&&Mt.parent.ce){let u=o!=null&&n.key==null?ut({},n,{key:o}):n,d=Object.keys(u).length>0;return t!=="default"&&(u.name=t),v(),Fe(ge,null,[be("slot",u,i&&i())],d?-2:64)}let a=e[t];a&&a._c&&(a._d=!1);let s=En.length;v();let c;try{let u=a&&V1(a(n)),d=n.key||o||u&&u.key;c=Fe(ge,{key:(d&&!sr(d)?d:`_${t}`)+(!u&&i?"_fb":"")},u||(i?i():[]),u&&e._===1?64:-2)}catch(u){for(let d=En.length;d>s;d--)f0();throw u}finally{a&&a._c&&(a._d=!0)}return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),c}function V1(e){return e.some(t=>Cs(t)?!(t.type===Rt||t.type===ge&&!V1(t.children)):!0)?e:null}function a1(e){return xe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function cN(e){let t=u0(e),n=e.proxy,i=e.ctx;Qv=!1,t.beforeCreate&&s1(t.beforeCreate,e,"bc");let{data:r,computed:o,methods:a,watch:s,provide:c,inject:u,created:d,beforeMount:p,mounted:m,beforeUpdate:f,updated:S,activated:z,deactivated:T,beforeDestroy:L,beforeUnmount:j,destroyed:D,unmounted:U,render:$,renderTracked:B,renderTriggered:se,errorCaptured:he,serverPrefetch:te,expose:W,inheritAttrs:de,components:ie,directives:ye,filters:Be}=t;if(u&&uN(u,i,null),a)for(let je in a){let De=a[je];Se(De)&&(i[je]=De.bind(n))}if(r){let je=r.call(n,n);Le(je)&&(e.data=ws(je))}if(Qv=!0,o)for(let je in o){let De=o[je],Tt=Se(De)?De.bind(n,n):Se(De.get)?De.get.bind(n,n):qt,Ze=!Se(De)&&Se(De.set)?De.set.bind(n):qt,gr=N({get:Tt,set:Ze});Object.defineProperty(i,je,{enumerable:!0,configurable:!0,get:()=>gr.value,set:ht=>gr.value=ht})}if(s)for(let je in s)F1(s[je],i,n,je);if(c){let je=Se(c)?c.call(n):c;Reflect.ownKeys(je).forEach(De=>{Hz(De,je[De])})}d&&s1(d,e,"c");function ft(je,De){xe(De)?De.forEach(Tt=>je(Tt.bind(n))):De&&je(De.bind(n))}if(ft(rN,p),ft(It,m),ft(M1,f),ft(l0,S),ft(Qz,z),ft(eN,T),ft(aN,he),ft(oN,B),ft(iN,se),ft(Jo,j),ft(rn,U),ft(nN,te),xe(W))if(W.length){let je=e.exposed||(e.exposed={});W.forEach(De=>{Object.defineProperty(je,De,{get:()=>n[De],set:Tt=>n[De]=Tt,enumerable:!0})})}else e.exposed||(e.exposed={});$&&e.render===qt&&(e.render=$),de!=null&&(e.inheritAttrs=de),ie&&(e.components=ie),ye&&(e.directives=ye),te&&P1(e)}function uN(e,t,n=qt){xe(e)&&(e=e0(e));for(let i in e){let r=e[i],o;Le(r)?"default"in r?o=Iu(r.from||i,r.default,!0):o=Iu(r.from||i):o=Iu(r),zt(o)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[i]=o}}function s1(e,t,n){fr(xe(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function F1(e,t,n,i){let r=i.includes(".")?I1(n,i):()=>n[i];if(ot(e)){let o=t[e];Se(o)&&lt(r,o)}else if(Se(e))lt(r,e.bind(n));else if(Le(e))if(xe(e))e.forEach(o=>F1(o,t,n,i));else{let o=Se(e.handler)?e.handler.bind(n):t[e.handler];Se(o)&&lt(r,o,e)}}function u0(e){let t=e.type,{mixins:n,extends:i}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,s=o.get(t),c;return s?c=s:!r.length&&!n&&!i?c=t:(c={},r.length&&r.forEach(u=>Au(c,u,a,!0)),Au(c,t,a)),Le(t)&&o.set(t,c),c}function Au(e,t,n,i=!1){let{mixins:r,extends:o}=t;o&&Au(e,o,n,!0),r&&r.forEach(a=>Au(e,a,n,!0));for(let a in t)if(!(i&&a==="expose")){let s=dN[a]||n&&n[a];e[a]=s?s(e[a],t[a]):t[a]}return e}function l1(e,t){return t?e?function(){return ut(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function pN(e,t){return Es(e0(e),e0(t))}function e0(e){if(xe(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Yt(e,t){return e?[...new Set([].concat(e,t))]:t}function Es(e,t){return e?ut(Object.create(null),e,t):t}function c1(e,t){return e?xe(e)&&xe(t)?[...new Set([...e,...t])]:ut(Object.create(null),a1(e),a1(t??{})):t}function mN(e,t){if(!e)return t;if(!t)return e;let n=ut(Object.create(null),e);for(let i in t)n[i]=Yt(e[i],t[i]);return n}function B1(){return{app:null,config:{isNativeTag:kv,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}function hN(e,t){return function(i,r=null){Se(i)||(i=ut({},i)),r!=null&&!Le(r)&&(r=null);let o=B1(),a=new WeakSet,s=[],c=!1,u=o.app={_uid:fN++,_component:i,_props:r,_container:null,_context:o,_instance:null,version:v1,get config(){return o.config},set config(d){},use(d,...p){return a.has(d)||(d&&Se(d.install)?(a.add(d),d.install(u,...p)):Se(d)&&(a.add(d),d(u,...p))),u},mixin(d){return __VUE_OPTIONS_API__&&(o.mixins.includes(d)||o.mixins.push(d)),u},component(d,p){return p?(o.components[d]=p,u):o.components[d]},directive(d,p){return p?(o.directives[d]=p,u):o.directives[d]},mount(d,p,m){if(!c){let f=u._ceVNode||be(i,r);return f.appContext=o,m===!0?m="svg":m===!1&&(m=void 0),p&&t?t(f,d):e(f,d,m),c=!0,u._container=d,d.__vue_app__=u,__VUE_PROD_DEVTOOLS__&&(u._instance=f.component,jz(u,v1)),Bu(f.component)}},onUnmount(d){s.push(d)},unmount(){c&&(fr(s,u._instance,16),e(null,u._container),__VUE_PROD_DEVTOOLS__&&(u._instance=null,Lz(u)),delete u._container.__vue_app__)},provide(d,p){return o.provides[d]=p,u},runWithContext(d){let p=Ko;Ko=u;try{return d()}finally{Ko=p}}};return u}}function vN(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||qe,r=n,o=t.startsWith("update:"),a=o&&gN(i,t.slice(7));a&&(a.trim&&(r=n.map(d=>ot(d)?d.trim():d)),a.number&&(r=n.map(us))),__VUE_PROD_DEVTOOLS__&&Zz(e,t,r);let s,c=i[s=cs(t)]||i[s=cs(Et(t))];!c&&o&&(c=i[s=cs(Kr(t))]),c&&fr(c,e,6,r);let u=i[s+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[s])return;e.emitted[s]=!0,fr(u,e,6,r)}}function Z1(e,t,n=!1){let i=__VUE_OPTIONS_API__&&n?bN:t.emitsCache,r=i.get(e);if(r!==void 0)return r;let o=e.emits,a={},s=!1;if(__VUE_OPTIONS_API__&&!Se(e)){let c=u=>{let d=Z1(u,t,!0);d&&(s=!0,ut(a,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!s?(Le(e)&&i.set(e,null),null):(xe(o)?o.forEach(c=>a[c]=null):ut(a,o),Le(e)&&i.set(e,a),a)}function Fu(e,t){return!e||!Po(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ve(e,t[0].toLowerCase()+t.slice(1))||Ve(e,Kr(t))||Ve(e,t))}function Wv(e){let{type:t,vnode:n,proxy:i,withProxy:r,propsOptions:[o],slots:a,attrs:s,emit:c,render:u,renderCache:d,props:p,data:m,setupState:f,ctx:S,inheritAttrs:z}=e,T=Nu(e),L,j;try{if(n.shapeFlag&4){let $=r||i,B=$;L=en(u.call(B,$,d,p,f,m,S)),j=s}else{let $=t;L=en($.length>1?$(p,{attrs:s,slots:a,emit:c}):$(p,null)),j=t.props?s:yN(s)}}catch($){En.length=0,Ru($,e,1),L=be(Rt)}let D=L,U;if(j&&z!==!1){let $=Object.keys(j),{shapeFlag:B}=D;$.length&&B&7&&(o&&$.some(Ro)&&(j=xN(j,o)),D=ei(D,j,!1,!0))}return n.dirs&&(D=ei(D,null,!1,!0),D.dirs=D.dirs?D.dirs.concat(n.dirs):n.dirs),n.transition&&Qn(D,n.transition),L=D,Nu(T),L}function wN(e,t,n){let{props:i,children:r,component:o}=e,{props:a,children:s,patchFlag:c}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return i?u1(i,a,u):!!a;if(c&8){let d=t.dynamicProps;for(let p=0;p<d.length;p++){let m=d[p];if(H1(a,i,m)&&!Fu(u,m))return!0}}}else return(r||s)&&(!s||!s.$stable)?!0:i===a?!1:i?a?u1(i,a,u):!0:!!a;return!1}function u1(e,t,n){let i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let r=0;r<i.length;r++){let o=i[r];if(H1(t,e,o)&&!Fu(n,o))return!0}return!1}function H1(e,t,n){let i=e[n],r=t[n];return n==="style"&&Le(i)&&Le(r)?!ds(i,r):i!==r}function kN({vnode:e,parent:t,suspense:n},i){for(;t;){let r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=i,e=r),r===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}function _N(e,t,n,i=!1){let r={},o=W1();e.propsDefaults=Object.create(null),J1(e,t,r,o);for(let a in e.propsOptions[0])a in r||(r[a]=void 0);n?e.props=i?r:Vv(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function $N(e,t,n,i){let{props:r,attrs:o,vnode:{patchFlag:a}}=e,s=Pe(r),[c]=e.propsOptions,u=!1;if((i||a>0)&&!(a&16)){if(a&8){let d=e.vnode.dynamicProps;for(let p=0;p<d.length;p++){let m=d[p];if(Fu(e.emitsOptions,m))continue;let f=t[m];if(c)if(Ve(o,m))f!==o[m]&&(o[m]=f,u=!0);else{let S=Et(m);r[S]=t0(c,s,S,f,e,!1)}else f!==o[m]&&(o[m]=f,u=!0)}}}else{J1(e,t,r,o)&&(u=!0);let d;for(let p in s)(!t||!Ve(t,p)&&((d=Kr(p))===p||!Ve(t,d)))&&(c?n&&(n[p]!==void 0||n[d]!==void 0)&&(r[p]=t0(c,s,p,void 0,e,!0)):delete r[p]);if(o!==s)for(let p in o)(!t||!Ve(t,p))&&(delete o[p],u=!0)}u&&Gr(e.attrs,"set","")}function J1(e,t,n,i){let[r,o]=e.propsOptions,a=!1,s;if(t)for(let c in t){if(Mo(c))continue;let u=t[c],d;r&&Ve(r,d=Et(c))?!o||!o.includes(d)?n[d]=u:(s||(s={}))[d]=u:Fu(e.emitsOptions,c)||(!(c in i)||u!==i[c])&&(i[c]=u,a=!0)}if(o){let c=Pe(n),u=s||qe;for(let d=0;d<o.length;d++){let p=o[d];n[p]=t0(r,c,p,u[p],e,!Ve(u,p))}}return a}function t0(e,t,n,i,r,o){let a=e[n];if(a!=null){let s=Ve(a,"default");if(s&&i===void 0){let c=a.default;if(a.type!==Function&&!a.skipFactory&&Se(c)){let{propsDefaults:u}=r;if(n in u)i=u[n];else{let d=Rs(r);i=u[n]=c.call(null,t),d()}}else i=c;r.ce&&r.ce._setProp(n,i)}a[0]&&(o&&!s?i=!1:a[1]&&(i===""||i===Kr(n))&&(i=!0))}return i}function q1(e,t,n=!1){let i=__VUE_OPTIONS_API__&&n?SN:t.propsCache,r=i.get(e);if(r)return r;let o=e.props,a={},s=[],c=!1;if(__VUE_OPTIONS_API__&&!Se(e)){let d=p=>{c=!0;let[m,f]=q1(p,t,!0);ut(a,m),f&&s.push(...f)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!c)return Le(e)&&i.set(e,Ei),Ei;if(xe(o))for(let d=0;d<o.length;d++){let p=Et(o[d]);d1(p)&&(a[p]=qe)}else if(o)for(let d in o){let p=Et(d);if(d1(p)){let m=o[d],f=a[p]=xe(m)||Se(m)?{type:m}:ut({},m),S=f.type,z=!1,T=!0;if(xe(S))for(let L=0;L<S.length;++L){let j=S[L],D=Se(j)&&j.name;if(D==="Boolean"){z=!0;break}else D==="String"&&(T=!1)}else z=Se(S)&&S.name==="Boolean";f[0]=z,f[1]=T,(z||Ve(f,"default"))&&s.push(p)}}let u=[a,s];return Le(e)&&i.set(e,u),u}function d1(e){return e[0]!=="$"&&!Mo(e)}function zN(){let e=[];typeof __VUE_OPTIONS_API__!="boolean"&&(qn().__VUE_OPTIONS_API__=!0),typeof __VUE_PROD_DEVTOOLS__!="boolean"&&(qn().__VUE_PROD_DEVTOOLS__=!1),typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__!="boolean"&&(qn().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__=!1)}function e$(e){return NN(e)}function NN(e,t){zN();let n=qn();n.__VUE__=!0,__VUE_PROD_DEVTOOLS__&&_1(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);let{insert:i,remove:r,patchProp:o,createElement:a,createText:s,createComment:c,setText:u,setElementText:d,parentNode:p,nextSibling:m,setScopeId:f=qt,insertStaticContent:S}=e,z=(h,k,M,K=null,w=null,_=null,b=void 0,C=null,I=!!k.dynamicChildren)=>{if(h===k)return;h&&!Pi(h,k)&&(K=At(h),vt(h,w,_,!0),h=null),k.patchFlag===-2&&(I=!1,k.dynamicChildren=null);let{type:A,ref:oe,shapeFlag:re}=k;switch(A){case Ds:T(h,k,M,K);break;case Rt:L(h,k,M,K);break;case Wo:h==null&&j(k,M,K,b);break;case ge:ye(h,k,M,K,w,_,b,C,I);break;default:re&1?B(h,k,M,K,w,_,b,C,I):re&6?Be(h,k,M,K,w,_,b,C,I):(re&64||re&128)&&A.process(h,k,M,K,w,_,b,C,I,Zt)}oe!=null&&w?Is(oe,h&&h.ref,_,k||h,!k):oe==null&&h&&h.ref!=null&&Is(h.ref,null,_,h,!0)},T=(h,k,M,K)=>{if(h==null)i(k.el=s(k.children),M,K);else{let w=k.el=h.el;k.children!==h.children&&u(w,k.children)}},L=(h,k,M,K)=>{h==null?i(k.el=c(k.children||""),M,K):k.el=h.el},j=(h,k,M,K)=>{[h.el,h.anchor]=S(h.children,k,M,K,h.el,h.anchor)},D=(h,k,M,K)=>{if(k.children!==h.children){let w=m(h.anchor);$(h),[k.el,k.anchor]=S(k.children,M,w,K)}else k.el=h.el,k.anchor=h.anchor},U=({el:h,anchor:k},M,K)=>{let w;for(;h&&h!==k;)w=m(h),i(h,M,K),h=w;i(k,M,K)},$=({el:h,anchor:k})=>{let M;for(;h&&h!==k;)M=m(h),r(h),h=M;r(k)},B=(h,k,M,K,w,_,b,C,I)=>{if(k.type==="svg"?b="svg":k.type==="math"&&(b="mathml"),h==null)se(k,M,K,w,_,b,C,I);else{let A=h.el&&h.el._isVueCE?h.el:null;try{A&&A._beginPatch(),W(h,k,w,_,b,C,I)}finally{A&&A._endPatch()}}},se=(h,k,M,K,w,_,b,C)=>{let I,A,{props:oe,shapeFlag:re,transition:ue,dirs:fe}=h;if(I=h.el=a(h.type,_,oe&&oe.is,oe),re&8?d(I,h.children):re&16&&te(h.children,I,null,K,w,Gv(h,_),b,C),fe&&Ai(h,null,K,"created"),he(I,h,h.scopeId,b,K),oe){for(let Te in oe)Te!=="value"&&!Mo(Te)&&o(I,Te,null,oe[Te],_,K);"value"in oe&&o(I,"value",null,oe.value,_),(A=oe.onVnodeBeforeMount)&&Xr(A,K,h)}__VUE_PROD_DEVTOOLS__&&(jo(I,"__vnode",h,!0),jo(I,"__vueParentComponent",K,!0)),fe&&Ai(h,null,K,"beforeMount");let _e=CN(w,ue);_e&&ue.beforeEnter(I),i(I,k,M),((A=oe&&oe.onVnodeMounted)||_e||fe)&&Xt(()=>{let ae;A&&Xr(A,K,h),_e&&ue.enter(I),fe&&Ai(h,null,K,"mounted")},w)},he=(h,k,M,K,w)=>{if(M&&f(h,M),K)for(let _=0;_<K.length;_++)f(h,K[_]);if(w){let _=w.subTree;if(k===_||n$(_.type)&&(_.ssContent===k||_.ssFallback===k)){let b=w.vnode;he(h,b,b.scopeId,b.slotScopeIds,w.parent)}}},te=(h,k,M,K,w,_,b,C,I=0)=>{for(let A=I;A<h.length;A++){let oe=h[A]=C?Sn(h[A]):en(h[A]);z(null,oe,k,M,K,w,_,b,C)}},W=(h,k,M,K,w,_,b)=>{let C=k.el=h.el;__VUE_PROD_DEVTOOLS__&&(C.__vnode=k);let{patchFlag:I,dynamicChildren:A,dirs:oe}=k;I|=h.patchFlag&16;let re=h.props||qe,ue=k.props||qe,fe;if(M&&Oi(M,!1),(fe=ue.onVnodeBeforeUpdate)&&Xr(fe,M,k,h),oe&&Ai(k,h,M,"beforeUpdate"),M&&Oi(M,!0),A&&(!h.dynamicChildren||h.dynamicChildren.length!==A.length)&&(I=0,b=!1,A=null),(re.innerHTML&&ue.innerHTML==null||re.textContent&&ue.textContent==null)&&d(C,""),A?de(h.dynamicChildren,A,C,M,K,Gv(k,w),_):b||Tt(h,k,C,null,M,K,Gv(k,w),_,!1),I>0){if(I&16)ie(C,re,ue,M,w);else if(I&2&&re.class!==ue.class&&o(C,"class",null,ue.class,w),I&4&&o(C,"style",re.style,ue.style,w),I&8){let _e=k.dynamicProps;for(let Te=0;Te<_e.length;Te++){let ae=_e[Te],Ke=re[ae],Xe=ue[ae];(Xe!==Ke||ae==="value")&&o(C,ae,Ke,Xe,w,M)}}I&1&&h.children!==k.children&&d(C,k.children)}else!b&&A==null&&ie(C,re,ue,M,w);((fe=ue.onVnodeUpdated)||oe)&&Xt(()=>{fe&&Xr(fe,M,k,h),oe&&Ai(k,h,M,"updated")},K)},de=(h,k,M,K,w,_,b)=>{for(let C=0;C<k.length;C++){let I=h[C],A=k[C],oe=I.el&&(I.type===ge||!Pi(I,A)||I.shapeFlag&198)?p(I.el):M;z(I,A,oe,null,K,w,_,b,!0)}},ie=(h,k,M,K,w)=>{if(k!==M){if(k!==qe)for(let _ in k)!Mo(_)&&!(_ in M)&&o(h,_,k[_],null,w,K);for(let _ in M){if(Mo(_))continue;let b=M[_],C=k[_];b!==C&&_!=="value"&&o(h,_,C,b,w,K)}"value"in M&&o(h,"value",k.value,M.value,w)}},ye=(h,k,M,K,w,_,b,C,I)=>{let A=k.el=h?h.el:s(""),oe=k.anchor=h?h.anchor:s(""),{patchFlag:re,dynamicChildren:ue,slotScopeIds:fe}=k;fe&&(C=C?C.concat(fe):fe),h==null?(i(A,M,K),i(oe,M,K),te(k.children||[],M,oe,w,_,b,C,I)):re>0&&re&64&&ue&&h.dynamicChildren&&h.dynamicChildren.length===ue.length?(de(h.dynamicChildren,ue,M,w,_,b,C),(k.key!=null||w&&k===w.subTree)&&m0(h,k,!0)):Tt(h,k,M,oe,w,_,b,C,I)},Be=(h,k,M,K,w,_,b,C,I)=>{k.slotScopeIds=C,h==null?k.shapeFlag&512?w.ctx.activate(k,M,K,b,I):mt(k,M,K,w,_,b,I):ft(h,k,I)},mt=(h,k,M,K,w,_,b)=>{let C=h.component=MN(h,K,w);if(Lu(h)&&(C.ctx.renderer=Zt),UN(C,!1,b),C.asyncDep){if(w&&w.registerDep(C,je,b),!h.el){let I=C.subTree=be(Rt);L(null,I,k,M),h.placeholder=I.el}}else je(C,h,k,M,w,_,b)},ft=(h,k,M)=>{let K=k.component=h.component;if(wN(h,k,M))if(K.asyncDep&&!K.asyncResolved){De(K,k,M);return}else K.next=k,K.update();else k.el=h.el,K.vnode=k},je=(h,k,M,K,w,_,b)=>{let C=()=>{if(h.isMounted){let{next:re,bu:ue,u:fe,parent:_e,vnode:Te}=h;{let gt=t$(h);if(gt){re&&(re.el=Te.el,De(h,re,b)),gt.asyncDep.then(()=>{Xt(()=>{h.isUnmounted||A()},w)});return}}let ae=re,Ke;Oi(h,!1),re?(re.el=Te.el,De(h,re,b)):re=Te,ue&&Uo(ue),(Ke=re.props&&re.props.onVnodeBeforeUpdate)&&Xr(Ke,_e,re,Te),Oi(h,!0);let Xe=Wv(h),St=h.subTree;h.subTree=Xe,z(St,Xe,p(St.el),At(St),h,w,_),re.el=Xe.el,ae===null&&kN(h,Xe.el),fe&&Xt(fe,w),(Ke=re.props&&re.props.onVnodeUpdated)&&Xt(()=>Xr(Ke,_e,re,Te),w),__VUE_PROD_DEVTOOLS__&&$1(h)}else{let re,{el:ue,props:fe}=k,{bm:_e,m:Te,parent:ae,root:Ke,type:Xe}=h,St=Ho(k);if(Oi(h,!1),_e&&Uo(_e),!St&&(re=fe&&fe.onVnodeBeforeMount)&&Xr(re,ae,k),Oi(h,!0),ue&&jr){let gt=()=>{h.subTree=Wv(h),jr(ue,h.subTree,h,w,null)};St&&Xe.__asyncHydrate?Xe.__asyncHydrate(ue,h,gt):gt()}else{Ke.ce&&Ke.ce._hasShadowRoot()&&Ke.ce._injectChildStyle(Xe,h.parent?h.parent.type:void 0);let gt=h.subTree=Wv(h);z(null,gt,M,K,h,w,_),k.el=gt.el}if(Te&&Xt(Te,w),!St&&(re=fe&&fe.onVnodeMounted)){let gt=k;Xt(()=>Xr(re,ae,gt),w)}(k.shapeFlag&256||ae&&Ho(ae.vnode)&&ae.vnode.shapeFlag&256)&&h.a&&Xt(h.a,w),h.isMounted=!0,__VUE_PROD_DEVTOOLS__&&Vz(h),k=M=K=null}};h.scope.on();let I=h.effect=new Fo(C);h.scope.off();let A=h.update=I.run.bind(I),oe=h.job=I.runIfDirty.bind(I);oe.i=h,oe.id=h.uid,I.scheduler=()=>n0(oe),Oi(h,!0),A()},De=(h,k,M)=>{k.component=h;let K=h.vnode.props;h.vnode=k,h.next=null,$N(h,k.props,K,M),TN(h,k.children,M),qr(),Q_(h),Yr()},Tt=(h,k,M,K,w,_,b,C,I=!1)=>{let A=h&&h.children,oe=h?h.shapeFlag:0,re=k.children,{patchFlag:ue,shapeFlag:fe}=k;if(ue>0){if(ue&128){gr(A,re,M,K,w,_,b,C,I);return}else if(ue&256){Ze(A,re,M,K,w,_,b,C,I);return}}fe&8?(oe&16&&kt(A,w,_),re!==A&&d(M,re)):oe&16?fe&16?gr(A,re,M,K,w,_,b,C,I):kt(A,w,_,!0):(oe&8&&d(M,""),fe&16&&te(re,M,K,w,_,b,C,I))},Ze=(h,k,M,K,w,_,b,C,I)=>{h=h||Ei,k=k||Ei;let A=h.length,oe=k.length,re=Math.min(A,oe),ue;for(ue=0;ue<re;ue++){let fe=k[ue]=I?Sn(k[ue]):en(k[ue]);z(h[ue],fe,M,null,w,_,b,C,I)}A>oe?kt(h,w,_,!0,!1,re):te(k,M,K,w,_,b,C,I,re)},gr=(h,k,M,K,w,_,b,C,I)=>{let A=0,oe=k.length,re=h.length-1,ue=oe-1;for(;A<=re&&A<=ue;){let fe=h[A],_e=k[A]=I?Sn(k[A]):en(k[A]);if(Pi(fe,_e))z(fe,_e,M,null,w,_,b,C,I);else break;A++}for(;A<=re&&A<=ue;){let fe=h[re],_e=k[ue]=I?Sn(k[ue]):en(k[ue]);if(Pi(fe,_e))z(fe,_e,M,null,w,_,b,C,I);else break;re--,ue--}if(A>re){if(A<=ue){let fe=ue+1,_e=fe<oe?k[fe].el:K;for(;A<=ue;)z(null,k[A]=I?Sn(k[A]):en(k[A]),M,_e,w,_,b,C,I),A++}}else if(A>ue)for(;A<=re;)vt(h[A],w,_,!0),A++;else{let fe=A,_e=A,Te=new Map;for(A=_e;A<=ue;A++){let pt=k[A]=I?Sn(k[A]):en(k[A]);pt.key!=null&&Te.set(pt.key,A)}let ae,Ke=0,Xe=ue-_e+1,St=!1,gt=0,rr=new Array(Xe);for(A=0;A<Xe;A++)rr[A]=0;for(A=fe;A<=re;A++){let pt=h[A];if(Ke>=Xe){vt(pt,w,_,!0);continue}let ct;if(pt.key!=null)ct=Te.get(pt.key);else for(ae=_e;ae<=ue;ae++)if(rr[ae-_e]===0&&Pi(pt,k[ae])){ct=ae;break}ct===void 0?vt(pt,w,_,!0):(rr[ct-_e]=A+1,ct>=gt?gt=ct:St=!0,z(pt,k[ct],M,null,w,_,b,C,I),Ke++)}let vr=St?AN(rr):Ei;for(ae=vr.length-1,A=Xe-1;A>=0;A--){let pt=_e+A,ct=k[pt],Dn=k[pt+1],di=pt+1<oe?Dn.el||r$(Dn):K;rr[A]===0?z(null,ct,M,di,w,_,b,C,I):St&&(ae<0||A!==vr[ae]?ht(ct,M,di,2):ae--)}}},ht=(h,k,M,K,w=null)=>{let{el:_,type:b,transition:C,children:I,shapeFlag:A}=h;if(A&6){ht(h.component.subTree,k,M,K);return}if(A&128){h.suspense.move(k,M,K);return}if(A&64){b.move(h,k,M,Zt);return}if(b===ge){i(_,k,M);for(let re=0;re<I.length;re++)ht(I[re],k,M,K);i(h.anchor,k,M);return}if(b===Wo){U(h,k,M);return}if(K!==2&&A&1&&C)if(K===0)C.persisted&&!_[$r]?i(_,k,M):(C.beforeEnter(_),i(_,k,M),Xt(()=>C.enter(_),w));else{let{leave:re,delayLeave:ue,afterLeave:fe}=C,_e=()=>{h.ctx.isUnmounted?r(_):i(_,k,M)},Te=()=>{let ae=_._isLeaving||!!_[$r];_._isLeaving&&_[$r](!0),C.persisted&&!ae?_e():re(_,()=>{_e(),fe&&fe()})};ue?ue(_,_e,Te):Te()}else i(_,k,M)},vt=(h,k,M,K=!1,w=!1)=>{let{type:_,props:b,ref:C,children:I,dynamicChildren:A,shapeFlag:oe,patchFlag:re,dirs:ue,cacheIndex:fe,memo:_e}=h;if(re===-2&&(w=!1),C!=null&&(qr(),Is(C,null,M,h,!0),Yr()),fe!=null&&(k.renderCache[fe]=void 0),oe&256){k.ctx.deactivate(h);return}let Te=oe&1&&ue,ae=!Ho(h),Ke;if(ae&&(Ke=b&&b.onVnodeBeforeUnmount)&&Xr(Ke,k,h),oe&6)On(h.component,M,K);else{if(oe&128){h.suspense.unmount(M,K);return}Te&&Ai(h,null,k,"beforeUnmount"),oe&64?h.type.remove(h,k,M,Zt,K):A&&!A.hasOnce&&(_!==ge||re>0&&re&64)?kt(A,k,M,!1,!0):(_===ge&&re&384||!w&&oe&16)&&kt(I,k,M),K&&Tr(h)}let Xe=_e!=null&&fe==null;(ae&&(Ke=b&&b.onVnodeUnmounted)||Te||Xe)&&Xt(()=>{Ke&&Xr(Ke,k,h),Te&&Ai(h,null,k,"unmounted"),Xe&&(h.el=null)},M)},Tr=h=>{let{type:k,el:M,anchor:K,transition:w}=h;if(k===ge){wt(M,K);return}if(k===Wo){$(h);return}let _=()=>{r(M),w&&!w.persisted&&w.afterLeave&&w.afterLeave()};if(h.shapeFlag&1&&w&&!w.persisted){let{leave:b,delayLeave:C}=w,I=()=>b(M,_);C?C(h.el,_,I):I()}else _()},wt=(h,k)=>{let M;for(;h!==k;)M=m(h),r(h),h=M;r(k)},On=(h,k,M)=>{let{bum:K,scope:w,job:_,subTree:b,um:C,m:I,a:A}=h;p1(I),p1(A),K&&Uo(K),w.stop(),_&&(_.flags|=8,vt(b,h,k,M)),C&&Xt(C,k),Xt(()=>{h.isUnmounted=!0},k),__VUE_PROD_DEVTOOLS__&&Bz(h)},kt=(h,k,M,K=!1,w=!1,_=0)=>{for(let b=_;b<h.length;b++)vt(h[b],k,M,K,w)},At=h=>{if(h.shapeFlag&6)return At(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();let k=m(h.anchor||h.el),M=k&&k[T1];return M?m(M):k},Bt=!1,Ge=(h,k,M)=>{let K;h==null?k._vnode&&(vt(k._vnode,null,null,!0),K=k._vnode.component):z(k._vnode||null,h,k,null,null,null,M),k._vnode=h,Bt||(Bt=!0,Q_(K),w1(),Bt=!1)},Zt={p:z,um:vt,m:ht,r:Tr,mt,mc:te,pc:Tt,pbc:de,n:At,o:e},He,jr;return t&&([He,jr]=t(Zt)),{render:Ge,hydrate:He,createApp:hN(Ge,He)}}function Gv({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Oi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function CN(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function m0(e,t,n=!1){let i=e.children,r=t.children;if(xe(i)&&xe(r))for(let o=0;o<i.length;o++){let a=i[o],s=r[o];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=r[o]=Sn(r[o]),s.el=a.el),!n&&s.patchFlag!==-2&&m0(a,s)),s.type===Ds&&(s.patchFlag===-1&&(s=r[o]=Sn(s)),s.el=a.el),s.type===Rt&&!s.el&&(s.el=a.el)}}function AN(e){let t=e.slice(),n=[0],i,r,o,a,s,c=e.length;for(i=0;i<c;i++){let u=e[i];if(u!==0){if(r=n[n.length-1],e[r]<u){t[i]=r,n.push(i);continue}for(o=0,a=n.length-1;o<a;)s=o+a>>1,e[n[s]]<u?o=s+1:a=s;u<e[n[o]]&&(o>0&&(t[i]=n[o-1]),n[o]=i)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=t[a];return n}function t$(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:t$(t)}function p1(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function r$(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?r$(t.subTree):null}function ON(e,t){t&&t.pendingBranch?xe(e)?t.effects.push(...e):t.effects.push(e):x1(e)}function v(e=!1){En.push(mr=e?null:[])}function f0(){En.pop(),mr=En[En.length-1]||null}function Ou(e,t=!1){Ns+=e,e<0&&mr&&t&&(mr.hasOnce=!0)}function i$(e){return e.dynamicChildren=Ns>0?mr||Ei:null,f0(),Ns>0&&mr&&mr.push(e),e}function x(e,t,n,i,r,o){return i$(y(e,t,n,i,r,o,!0))}function Fe(e,t,n,i,r){return i$(be(e,t,n,i,r,!0))}function Cs(e){return e?e.__v_isVNode===!0:!1}function Pi(e,t){return e.type===t.type&&e.key===t.key}function y(e,t=null,n=null,i=0,r=null,o=e===ge?0:1,a=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&o$(t),ref:t&&Tu(t),scopeId:S1,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Mt};return s?(Du(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=ot(n)?8:16),Ns>0&&!a&&mr&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&mr.push(c),c}function DN(e,t=null,n=null,i=0,r=null,o=!1){if((!e||e===j1)&&(e=Rt),Cs(e)){let s=ei(e,t,!0);return n&&Du(s,n),Ns>0&&!o&&mr&&(s.shapeFlag&6?mr[mr.indexOf(e)]=s:mr.push(s)),s.patchFlag=-2,s}if(BN(e)&&(e=e.__vccOpts),t){t=qo(t);let{class:s,style:c}=t;s&&!ot(s)&&(t.class=V(s)),Le(c)&&(ks(c)&&!xe(c)&&(c=ut({},c)),t.style=we(c))}let a=ot(e)?1:n$(e)?128:z1(e)?64:Le(e)?4:Se(e)?2:0;return y(e,t,n,i,r,a,o,!0)}function qo(e){return e?ks(e)||G1(e)?ut({},e):e:null}function ei(e,t,n=!1,i=!1){let{props:r,ref:o,patchFlag:a,children:s,transition:c}=e,u=t?h0(r||{},t):r,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&o$(u),ref:t&&t.ref?n&&o?xe(o)?o.concat(Tu(t)):[o,Tu(t)]:Tu(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ge?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ei(e.ssContent),ssFallback:e.ssFallback&&ei(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&i&&Qn(d,c.clone(d)),d}function xt(e=" ",t=0){return be(Ds,null,e,t)}function a$(e,t){let n=be(Wo,null,e);return n.staticCount=t,n}function Y(e="",t=!1){return t?(v(),Fe(Rt,null,e)):be(Rt,null,e)}function en(e){return e==null||typeof e=="boolean"?be(Rt):xe(e)?be(ge,null,e.slice()):Cs(e)?Sn(e):be(Ds,null,String(e))}function Sn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ei(e)}function Du(e,t){let n=0,{shapeFlag:i}=e;if(t==null)t=null;else if(xe(t))n=16;else if(typeof t=="object")if(i&65){let r=t.default;r&&(r._c&&(r._d=!1),Du(e,r()),r._c&&(r._d=!0));return}else{n=32;let r=t._;!r&&!G1(t)?t._ctx=Mt:r===3&&Mt&&(Mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Se(t)){if(i&65){Du(e,{default:t});return}t={default:t,_ctx:Mt},n=32}else t=String(t),i&64?(n=16,t=[xt(t)]):n=8;e.children=t,e.shapeFlag|=n}function h0(...e){let t={};for(let n=0;n<e.length;n++){let i=e[n];for(let r in i)if(r==="class")t.class!==i.class&&(t.class=V([t.class,i.class]));else if(r==="style")t.style=we([t.style,i.style]);else if(Po(r)){let o=t[r],a=i[r];a&&o!==a&&!(xe(o)&&o.includes(a))?t[r]=o?[].concat(o,a):a:a==null&&o==null&&!Ro(r)&&(t[r]=a)}else r!==""&&(t[r]=i[r])}return t}function Xr(e,t,n,i=null){fr(e,t,7,[n,i])}function MN(e,t,n){let i=e.type,r=(t?t.appContext:e.appContext)||PN,o={uid:RN++,vnode:e,type:i,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new gs(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:q1(i,r),emitsOptions:Z1(i,r),emit:null,emitted:null,propsDefaults:qe,inheritAttrs:i.inheritAttrs,ctx:qe,data:qe,props:qe,attrs:qe,slots:qe,refs:qe,setupState:qe,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=vN.bind(null,o),e.ce&&e.ce(o),o}function s$(e){return e.vnode.shapeFlag&4}function UN(e,t=!1,n=!1){t&&r0(t);let{props:i,children:r}=e.vnode,o=s$(e);_N(e,i,o,t),IN(e,r,n||t);let a=o?jN(e,t):void 0;return t&&r0(!1),a}function jN(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,lN);let{setup:i}=n;if(i){qr();let r=e.setupContext=i.length>1?VN(e):null,o=Rs(e),a=Os(i,e,0,[e.props,r]),s=_v(a);if(Yr(),o(),(s||e.sp)&&!Ho(e)&&P1(e),s){if(a.then(m1,m1),t)return a.then(c=>{f1(e,c,t)}).catch(c=>{Ru(c,e,0)});e.asyncDep=a}else f1(e,a,t)}else l$(e,t)}function f1(e,t,n){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Le(t)&&(__VUE_PROD_DEVTOOLS__&&(e.devtoolsRawSetupState=t),e.setupState=Su(t)),l$(e,n)}function l$(e,t,n){let i=e.type;if(!e.render){if(!t&&h1&&!i.render){let r=i.template||__VUE_OPTIONS_API__&&u0(e).template;if(r){let{isCustomElement:o,compilerOptions:a}=e.appContext.config,{delimiters:s,compilerOptions:c}=i,u=ut(ut({isCustomElement:o,delimiters:s},a),c);i.render=h1(r,u)}}e.render=i.render||qt,g1&&g1(e)}if(__VUE_OPTIONS_API__){let r=Rs(e);qr();try{cN(e)}finally{Yr(),r()}}}function VN(e){let t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,LN),slots:e.slots,emit:e.emit,expose:t}}function Bu(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Su(Bv(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ts)return Ts[n](e)},has(t,n){return n in t||n in Ts}})):e.proxy}function FN(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function BN(e){return Se(e)&&"__vccOpts"in e}function c$(e,t,n){try{Ou(-1);let i=arguments.length;return i===2?Le(t)&&!xe(t)?Cs(t)?be(e,null,[t]):be(e,t):be(e,null,t):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&Cs(n)&&(n=[n]),be(e,t,n))}finally{Ou(1)}}var Qt,Qr,Zo,Xn,Bo,b1,zu,zs,Uz,tn,$s,Jv,Vz,$1,Fz,Bz,Mt,S1,Kz,Wz,Yn,T1,z1,Di,Jz,e1,t1,qv,qz,N1,$r,_s,_r,a0,C1,Xz,O1,Cu,eV,tV,Ho,Lu,In,rN,It,M1,l0,Jo,rn,nN,iN,oN,U1,j1,Xv,Ts,Kv,lN,Qv,dN,fN,Ko,gN,bN,yN,xN,K1,W1,G1,SN,d0,p0,EN,Y1,X1,Q1,IN,TN,Xt,n$,ge,Ds,Rt,Wo,En,mr,Ns,o$,Tu,be,PN,RN,Vt,Ps,Pu,r0,Rs,m1,As,h1,g1,LN,N,v1,g0=O(()=>{Zv();Zv();ps();ps();/**
77
77
  * @vue/runtime-core v3.5.40
78
78
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
79
79
  * @license MIT
80
- **/Qt=[],Qr=-1,Zo=[],Xn=null,Bo=0,b1=Promise.resolve(),zu=null;zs=e=>e.id==null?e.flags&2?-1:1/0:e.id;Uz=!1,$s=[],Jv=!1;Vz=i0("component:added"),$1=i0("component:updated"),Fz=i0("component:removed"),Bz=e=>{tn&&typeof tn.cleanupBuffer=="function"&&!tn.cleanupBuffer(e)&&Fz(e)};Mt=null,S1=null;Kz=Symbol.for("v-scx"),Wz=()=>{{let e=Iu(Kz);return e}};Yn=new WeakMap,T1=Symbol("_vte"),z1=e=>e.__isTeleport,Di=e=>e&&(e.disabled||e.disabled===""),Jz=e=>e&&(e.defer||e.defer===""),e1=e=>typeof SVGElement<"u"&&e instanceof SVGElement,t1=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,qv=(e,t)=>{let n=e&&e.to;return ot(n)?t?t(n):null:n},qz={name:"Teleport",__isTeleport:!0,process(e,t,n,i,r,o,a,s,c,u){let{mc:d,pc:p,pbc:m,o:{insert:f,querySelector:S,createText:z,createComment:T,parentNode:L}}=u,j=Di(t.props),{dynamicChildren:D}=t,U=(se,he,te)=>{se.shapeFlag&16&&d(se.children,he,te,r,o,a,s,c)},$=(se=t)=>{let he=Di(se.props),te=se.target=qv(se.props,S),W=Yv(te,se,z,f);te&&(a!=="svg"&&e1(te)?a="svg":a!=="mathml"&&t1(te)&&(a="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(te),he||(U(se,te,W),Ss(se,!1)))},F=se=>{let he=()=>{if(Yn.get(se)===he){if(Yn.delete(se),Di(se.props)){let te=L(se.el)||n;U(se,te,se.anchor),Ss(se,!0)}$(se)}};Yn.set(se,he),Xt(he,o)};if(e==null){let se=t.el=z(""),he=t.anchor=z("");if(f(se,n,i),f(he,n,i),Jz(t.props)||o&&o.pendingBranch){F(t);return}j&&(U(t,n,he),Ss(t,!0)),$()}else{t.el=e.el;let se=t.anchor=e.anchor,he=Yn.get(e);if(he){he.flags|=8,Yn.delete(e),F(t);return}t.targetStart=e.targetStart;let te=t.target=e.target,W=t.targetAnchor=e.targetAnchor,de=Di(e.props),ie=de?n:te,ye=de?se:W;if(a==="svg"||e1(te)?a="svg":(a==="mathml"||t1(te))&&(a="mathml"),D?(m(e.dynamicChildren,D,ie,r,o,a,s),m0(e,t,!0)):c||p(e,t,ie,ye,r,o,a,s,!1),j)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Eu(t,n,se,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let Be=qv(t.props,S);Be&&(t.target=Be,Eu(t,Be,null,u,0))}else de&&Eu(t,te,W,u,1);Ss(t,j)}},remove(e,t,n,{um:i,o:{remove:r}},o){let{shapeFlag:a,children:s,anchor:c,targetStart:u,targetAnchor:d,target:p,props:m}=e,f=Di(m),S=o||!f,z=Yn.get(e);if(z&&(z.flags|=8,Yn.delete(e)),p&&(r(u),r(d)),o&&r(c),!z&&(f||p)&&a&16)for(let T=0;T<s.length;T++){let L=s[T];i(L,t,n,S,!!L.dynamicChildren)}},move:Eu,hydrate:Yz};N1=qz;$r=Symbol("_leaveCb"),_s=Symbol("_enterCb");_r=[Function,Array],a0={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:_r,onEnter:_r,onAfterEnter:_r,onEnterCancelled:_r,onBeforeLeave:_r,onLeave:_r,onAfterLeave:_r,onLeaveCancelled:_r,onBeforeAppear:_r,onAppear:_r,onAfterAppear:_r,onAppearCancelled:_r},C1=e=>{let t=e.subTree;return t.component?C1(t.component):t},Xz={name:"BaseTransition",props:a0,setup(e,{slots:t}){let n=Ps(),i=o0();return()=>{let r=t.default&&ju(t.default(),!0),o=r&&r.length?A1(r):n.subTree?Y():void 0;if(!o)return;let a=Pe(e),{mode:s}=a;if(i.isLeaving)return Hv(o);let c=r1(o);if(!c)return Hv(o);let u=Go(c,a,i,n,p=>u=p);c.type!==Rt&&Qn(c,u);let d=n.subTree&&r1(n.subTree);if(d&&d.type!==Rt&&!Pi(d,c)&&C1(n).type!==Rt){let p=Go(d,a,i,n);if(Qn(d,p),s==="out-in"&&c.type!==Rt)return i.isLeaving=!0,p.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave,d=void 0},Hv(o);s==="in-out"&&c.type!==Rt?p.delayLeave=(m,f,S)=>{let z=D1(i,d);z[String(d.key)]=d,m[$r]=()=>{f(),m[$r]=void 0,delete u.delayedLeave,d=void 0},u.delayedLeave=()=>{S(),delete u.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return o}}};O1=Xz;Cu=new WeakMap;eV=qn().requestIdleCallback||(e=>setTimeout(e,1)),tV=qn().cancelIdleCallback||(e=>clearTimeout(e)),Ho=e=>!!e.type.__asyncLoader,Lu=e=>e.type.__isKeepAlive;In=e=>(t,n=Vt)=>{(!As||e==="sp")&&Vu(e,(...i)=>t(...i),n)},rN=In("bm"),It=In("m"),M1=In("bu"),l0=In("u"),Jo=In("bum"),rn=In("um"),nN=In("sp"),iN=In("rtg"),oN=In("rtc");U1="components",j1=Symbol.for("v-ndc");Xv=e=>e?s$(e)?Bu(e):Xv(e.parent):null,Ts=ut(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Xv(e.parent),$root:e=>Xv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>__VUE_OPTIONS_API__?u0(e):e.type,$forceUpdate:e=>e.f||(e.f=()=>{n0(e.update)}),$nextTick:e=>e.n||(e.n=Ri.bind(e.proxy)),$watch:e=>__VUE_OPTIONS_API__?Gz.bind(e):qt}),Kv=(e,t)=>e!==qe&&!e.__isScriptSetup&&Ve(e,t),lN={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:n,setupState:i,data:r,props:o,accessCache:a,type:s,appContext:c}=e;if(t[0]!=="$"){let m=a[t];if(m!==void 0)switch(m){case 1:return i[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Kv(i,t))return a[t]=1,i[t];if(__VUE_OPTIONS_API__&&r!==qe&&Ve(r,t))return a[t]=2,r[t];if(Ve(o,t))return a[t]=3,o[t];if(n!==qe&&Ve(n,t))return a[t]=4,n[t];(!__VUE_OPTIONS_API__||Qv)&&(a[t]=0)}}let u=Ts[t],d,p;if(u)return t==="$attrs"&&Pt(e.attrs,"get",""),u(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==qe&&Ve(n,t))return a[t]=4,n[t];if(p=c.config.globalProperties,Ve(p,t))return p[t]},set({_:e},t,n){let{data:i,setupState:r,ctx:o}=e;return Kv(r,t)?(r[t]=n,!0):__VUE_OPTIONS_API__&&i!==qe&&Ve(i,t)?(i[t]=n,!0):Ve(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:r,props:o,type:a}},s){let c;return!!(n[s]||__VUE_OPTIONS_API__&&e!==qe&&s[0]!=="$"&&Ve(e,s)||Kv(t,s)||Ve(o,s)||Ve(i,s)||Ve(Ts,s)||Ve(r.config.globalProperties,s)||(c=a.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ve(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};Qv=!0;dN={data:l1,props:c1,emits:c1,methods:Es,computed:Es,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:Es,directives:Es,watch:mN,provide:l1,inject:pN};fN=0;Ko=null,gN=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Et(t)}Modifiers`]||e[`${Kr(t)}Modifiers`];bN=new WeakMap;yN=e=>{let t;for(let n in e)(n==="class"||n==="style"||Po(n))&&((t||(t={}))[n]=e[n]);return t},xN=(e,t)=>{let n={};for(let i in e)(!Ro(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};K1={},W1=()=>Object.create(K1),G1=e=>Object.getPrototypeOf(e)===K1;SN=new WeakMap;d0=e=>e==="_"||e==="_ctx"||e==="$stable",p0=e=>xe(e)?e.map(en):[en(e)],EN=(e,t,n)=>{if(t._n)return t;let i=bt((...r)=>p0(t(...r)),n);return i._c=!1,i},Y1=(e,t,n)=>{let i=e._ctx;for(let r in e){if(d0(r))continue;let o=e[r];if(Se(o))t[r]=EN(r,o,i);else if(o!=null){let a=p0(o);t[r]=()=>a}}},X1=(e,t)=>{let n=p0(t);e.slots.default=()=>n},Q1=(e,t,n)=>{for(let i in t)(n||!d0(i))&&(e[i]=t[i])},IN=(e,t,n)=>{let i=e.slots=W1();if(e.vnode.shapeFlag&32){let r=t._;r?(Q1(i,t,n),n&&jo(i,"_",r,!0)):Y1(t,i)}else t&&X1(e,t)},TN=(e,t,n)=>{let{vnode:i,slots:r}=e,o=!0,a=qe;if(i.shapeFlag&32){let s=t._;s?n&&s===1?o=!1:Q1(r,t,n):(o=!t.$stable,Y1(t,r)),a=t}else t&&(X1(e,t),a={default:1});if(o)for(let s in r)!d0(s)&&a[s]==null&&delete r[s]};Xt=ON;n$=e=>e.__isSuspense;ge=Symbol.for("v-fgt"),Ds=Symbol.for("v-txt"),Rt=Symbol.for("v-cmt"),Wo=Symbol.for("v-stc"),En=[],mr=null;Ns=1;o$=({key:e})=>e??null,Tu=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ot(e)||zt(e)||Se(e)?{i:Mt,r:e,k:t,f:!!n}:e:null);be=DN;PN=B1(),RN=0;Vt=null,Ps=()=>Vt||Mt;{let e=qn(),t=(n,i)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(i),o=>{r.length>1?r.forEach(a=>a(o)):r[0](o)}};Pu=t("__VUE_INSTANCE_SETTERS__",n=>Vt=n),r0=t("__VUE_SSR_SETTERS__",n=>As=n)}Rs=e=>{let t=Vt;return Pu(e),e.scope.on(),()=>{e.scope.off(),Pu(t)}},m1=()=>{Vt&&Vt.scope.off(),Pu(null)};As=!1;LN={get(e,t){return Pt(e,"get",""),e[t]}};N=(e,t)=>q_(e,t,As);v1="3.5.40"});function O$(e){let t={};for(let ie in e)ie in C$||(t[ie]=e[ie]);if(e.css===!1)return t;let{name:n="v",type:i,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:u=a,appearToClass:d=s,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,S=GN(r),z=S&&S[0],T=S&&S[1],{onBeforeEnter:L,onEnter:j,onEnterCancelled:D,onLeave:U,onLeaveCancelled:$,onBeforeAppear:F=L,onAppear:se=j,onAppearCancelled:he=D}=t,te=(ie,ye,Be,mt)=>{ie._enterCancelled=mt,ri(ie,ye?d:s),ri(ie,ye?u:a),Be&&Be()},W=(ie,ye)=>{ie._isLeaving=!1,ri(ie,p),ri(ie,f),ri(ie,m),ye&&ye()},de=ie=>(ye,Be)=>{let mt=ie?se:j,ft=()=>te(ye,ie,Be);Mi(mt,[ye,ft]),m$(()=>{ri(ye,ie?c:o),nn(ye,ie?d:s),p$(mt)||f$(ye,i,z,ft)})};return ut(t,{onBeforeEnter(ie){Mi(L,[ie]),nn(ie,o),nn(ie,a)},onBeforeAppear(ie){Mi(F,[ie]),nn(ie,c),nn(ie,u)},onEnter:de(!1),onAppear:de(!0),onLeave(ie,ye){ie._isLeaving=!0;let Be=()=>W(ie,ye);nn(ie,p),ie._enterCancelled?(nn(ie,m),k0(ie)):(k0(ie),nn(ie,m)),m$(()=>{ie._isLeaving&&(ri(ie,p),nn(ie,f),p$(U)||f$(ie,i,T,Be))}),Mi(U,[ie,Be])},onEnterCancelled(ie){te(ie,!1,void 0,!0),Mi(D,[ie])},onAppearCancelled(ie){te(ie,!0,void 0,!0),Mi(he,[ie])},onLeaveCancelled(ie){W(ie),Mi($,[ie])}})}function GN(e){if(e==null)return null;if(Le(e))return[v0(e.enter),v0(e.leave)];{let t=v0(e);return[t,t]}}function v0(e){return Sv(e)}function nn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Xo]||(e[Xo]=new Set)).add(t)}function ri(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));let n=e[Xo];n&&(n.delete(t),n.size||(e[Xo]=void 0))}function m$(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}function f$(e,t,n,i){let r=e._endId=++JN,o=()=>{r===e._endId&&i()};if(n!=null)return setTimeout(o,n);let{type:a,timeout:s,propCount:c}=D$(e,t);if(!a)return i();let u=a+"end",d=0,p=()=>{e.removeEventListener(u,m),o()},m=f=>{f.target===e&&++d>=c&&p()};setTimeout(()=>{d<c&&p()},s+1),e.addEventListener(u,m)}function D$(e,t){let n=window.getComputedStyle(e),i=S=>(n[S]||"").split(", "),r=i(`${ti}Delay`),o=i(`${ti}Duration`),a=h$(r,o),s=i(`${Ms}Delay`),c=i(`${Ms}Duration`),u=h$(s,c),d=null,p=0,m=0;t===ti?a>0&&(d=ti,p=a,m=o.length):t===Ms?u>0&&(d=Ms,p=u,m=c.length):(p=Math.max(a,u),d=p>0?a>u?ti:Ms:null,m=d?d===ti?o.length:c.length:0);let f=d===ti&&/\b(?:transform|all)(?:,|$)/.test(i(`${ti}Property`).toString());return{type:d,timeout:p,propCount:m,hasTransform:f}}function h$(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>g$(n)+g$(e[i])))}function g$(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function k0(e){return(e?e.ownerDocument:document).body.offsetHeight}function qN(e,t,n){let i=e[Xo];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function QN(e,t,n){let i=e.style,r=ot(n),o=!1;if(n&&!r){if(t)if(ot(t))for(let a of t.split(";")){let s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&Us(i,s,"")}else for(let a in t)n[a]==null&&Us(i,a,"");for(let a in n){a==="display"&&(o=!0);let s=n[a];s!=null?tC(e,a,!ot(t)&&t?t[a]:void 0,s)||Us(i,a,s):Us(i,a,"")}}else if(r){if(t!==n){let a=i[YN];a&&(n+=";"+a),i.cssText=n,o=XN.test(n)}}else t&&e.removeAttribute("style");v$ in e&&(e[v$]=o?i.display:"",e[P$]&&(i.display="none"))}function Us(e,t,n){if(xe(n))n.forEach(i=>Us(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let i=eC(e,t);b$.test(n)?e.setProperty(Kr(i),n.replace(b$,""),"important"):e[i]=n}}function eC(e,t){let n=b0[t];if(n)return n;let i=Et(t);if(i!=="filter"&&i in e)return b0[t]=i;i=Ti(i);for(let r=0;r<y$.length;r++){let o=y$[r]+i;if(o in e)return b0[t]=o}return t}function tC(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ot(i)&&n===i}function w$(e,t,n,i,r,o=A_(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(x$,t.slice(6,t.length)):e.setAttributeNS(x$,t,n):n==null||o&&!vu(n)?e.removeAttribute(t):e.setAttribute(t,o?"":sr(n)?String(n):n)}function k$(e,t,n,i,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?N$(n):n);return}let o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){let s=o==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(s!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){let s=typeof e[t];s==="boolean"?n=vu(n):n==null&&s==="string"?(n="",a=!0):s==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(r||t)}function Yo(e,t,n,i){e.addEventListener(t,n,i)}function rC(e,t,n,i){e.removeEventListener(t,n,i)}function nC(e,t,n,i,r=null){let o=e[_$]||(e[_$]={}),a=o[t];if(i&&a)a.value=i;else{let[s,c]=aC(t);if(i){let u=o[t]=cC(i,r);Yo(e,s,u,c)}else a&&(rC(e,s,a,c),o[t]=void 0)}}function aC(e){let t,n;for(;(n=e.match(iC))&&!oC.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Kr(e.slice(2)),t]}function cC(e,t){let n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;let r=n.value;if(xe(r)){let o=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{o.call(i),i._stopped=!0};let a=r.slice(),s=[i];for(let c=0;c<a.length&&!i._stopped;c++){let u=a[c];u&&fr(u,t,5,s)}}else fr(r,t,5,[i])};return n.value=e,n.attached=lC(),n}function dC(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&$$(t)&&Se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return $$(t)&&ot(n)?!1:t in e}function pC(e,t){let n=e._def.props;if(!n)return!1;let i=Et(t);return Array.isArray(n)?n.some(r=>Et(r)===i):Object.keys(n).some(r=>Et(r)===i)}function hC(e){let t=e.el;t[Zu]&&t[Zu](),t[S$]&&t[S$]()}function gC(e){M$.set(e,U$(e.el))}function vC(e){let t=R$.get(e),n=M$.get(e),i=t.left-n.left,r=t.top-n.top;if(i||r){let o=e.el,a=o.style,s=o.getBoundingClientRect(),c=1,u=1;return o.offsetWidth&&(c=s.width/o.offsetWidth),o.offsetHeight&&(u=s.height/o.offsetHeight),(!Number.isFinite(c)||c===0)&&(c=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(c-1)<.01&&(c=1),Math.abs(u-1)<.01&&(u=1),a.transform=a.webkitTransform=`translate(${i/c}px,${r/u}px)`,a.transitionDuration="0s",e}}function U$(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function bC(e,t,n){let i=e.cloneNode(),r=e[Xo];r&&r.forEach(s=>{s.split(/\s+/).forEach(c=>c&&i.classList.remove(c))}),n.split(/\s+/).forEach(s=>s&&i.classList.add(s)),i.style.display="none";let o=t.nodeType===1?t:t.parentNode;o.appendChild(i);let{hasTransform:a}=D$(i);return o.removeChild(i),a}function yC(e){e.target.composing=!0}function I$(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}function T$(e,t,n){return t&&(e=e.trim()),n&&(e=us(e)),e}function $C(){return z$||(z$=e$(_C))}function SC(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function EC(e){return ot(e)?document.querySelector(e):e}var w0,u$,N$,ZN,HN,Tn,d$,KN,ti,Ms,Xo,C$,A$,WN,ni,Mi,p$,JN,v$,P$,YN,XN,b$,y$,b0,x$,_$,iC,oC,y0,sC,lC,$$,uC,R$,M$,Zu,S$,mC,fC,_0,E$,x0,Hu,xC,wC,_t,kC,zn,_C,z$,js,j$=O(()=>{g0();g0();ps();/**
80
+ **/Qt=[],Qr=-1,Zo=[],Xn=null,Bo=0,b1=Promise.resolve(),zu=null;zs=e=>e.id==null?e.flags&2?-1:1/0:e.id;Uz=!1,$s=[],Jv=!1;Vz=i0("component:added"),$1=i0("component:updated"),Fz=i0("component:removed"),Bz=e=>{tn&&typeof tn.cleanupBuffer=="function"&&!tn.cleanupBuffer(e)&&Fz(e)};Mt=null,S1=null;Kz=Symbol.for("v-scx"),Wz=()=>{{let e=Iu(Kz);return e}};Yn=new WeakMap,T1=Symbol("_vte"),z1=e=>e.__isTeleport,Di=e=>e&&(e.disabled||e.disabled===""),Jz=e=>e&&(e.defer||e.defer===""),e1=e=>typeof SVGElement<"u"&&e instanceof SVGElement,t1=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,qv=(e,t)=>{let n=e&&e.to;return ot(n)?t?t(n):null:n},qz={name:"Teleport",__isTeleport:!0,process(e,t,n,i,r,o,a,s,c,u){let{mc:d,pc:p,pbc:m,o:{insert:f,querySelector:S,createText:z,createComment:T,parentNode:L}}=u,j=Di(t.props),{dynamicChildren:D}=t,U=(se,he,te)=>{se.shapeFlag&16&&d(se.children,he,te,r,o,a,s,c)},$=(se=t)=>{let he=Di(se.props),te=se.target=qv(se.props,S),W=Yv(te,se,z,f);te&&(a!=="svg"&&e1(te)?a="svg":a!=="mathml"&&t1(te)&&(a="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(te),he||(U(se,te,W),Ss(se,!1)))},B=se=>{let he=()=>{if(Yn.get(se)===he){if(Yn.delete(se),Di(se.props)){let te=L(se.el)||n;U(se,te,se.anchor),Ss(se,!0)}$(se)}};Yn.set(se,he),Xt(he,o)};if(e==null){let se=t.el=z(""),he=t.anchor=z("");if(f(se,n,i),f(he,n,i),Jz(t.props)||o&&o.pendingBranch){B(t);return}j&&(U(t,n,he),Ss(t,!0)),$()}else{t.el=e.el;let se=t.anchor=e.anchor,he=Yn.get(e);if(he){he.flags|=8,Yn.delete(e),B(t);return}t.targetStart=e.targetStart;let te=t.target=e.target,W=t.targetAnchor=e.targetAnchor,de=Di(e.props),ie=de?n:te,ye=de?se:W;if(a==="svg"||e1(te)?a="svg":(a==="mathml"||t1(te))&&(a="mathml"),D?(m(e.dynamicChildren,D,ie,r,o,a,s),m0(e,t,!0)):c||p(e,t,ie,ye,r,o,a,s,!1),j)de?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Eu(t,n,se,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let Be=qv(t.props,S);Be&&(t.target=Be,Eu(t,Be,null,u,0))}else de&&Eu(t,te,W,u,1);Ss(t,j)}},remove(e,t,n,{um:i,o:{remove:r}},o){let{shapeFlag:a,children:s,anchor:c,targetStart:u,targetAnchor:d,target:p,props:m}=e,f=Di(m),S=o||!f,z=Yn.get(e);if(z&&(z.flags|=8,Yn.delete(e)),p&&(r(u),r(d)),o&&r(c),!z&&(f||p)&&a&16)for(let T=0;T<s.length;T++){let L=s[T];i(L,t,n,S,!!L.dynamicChildren)}},move:Eu,hydrate:Yz};N1=qz;$r=Symbol("_leaveCb"),_s=Symbol("_enterCb");_r=[Function,Array],a0={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:_r,onEnter:_r,onAfterEnter:_r,onEnterCancelled:_r,onBeforeLeave:_r,onLeave:_r,onAfterLeave:_r,onLeaveCancelled:_r,onBeforeAppear:_r,onAppear:_r,onAfterAppear:_r,onAppearCancelled:_r},C1=e=>{let t=e.subTree;return t.component?C1(t.component):t},Xz={name:"BaseTransition",props:a0,setup(e,{slots:t}){let n=Ps(),i=o0();return()=>{let r=t.default&&ju(t.default(),!0),o=r&&r.length?A1(r):n.subTree?Y():void 0;if(!o)return;let a=Pe(e),{mode:s}=a;if(i.isLeaving)return Hv(o);let c=r1(o);if(!c)return Hv(o);let u=Go(c,a,i,n,p=>u=p);c.type!==Rt&&Qn(c,u);let d=n.subTree&&r1(n.subTree);if(d&&d.type!==Rt&&!Pi(d,c)&&C1(n).type!==Rt){let p=Go(d,a,i,n);if(Qn(d,p),s==="out-in"&&c.type!==Rt)return i.isLeaving=!0,p.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave,d=void 0},Hv(o);s==="in-out"&&c.type!==Rt?p.delayLeave=(m,f,S)=>{let z=D1(i,d);z[String(d.key)]=d,m[$r]=()=>{f(),m[$r]=void 0,delete u.delayedLeave,d=void 0},u.delayedLeave=()=>{S(),delete u.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return o}}};O1=Xz;Cu=new WeakMap;eV=qn().requestIdleCallback||(e=>setTimeout(e,1)),tV=qn().cancelIdleCallback||(e=>clearTimeout(e)),Ho=e=>!!e.type.__asyncLoader,Lu=e=>e.type.__isKeepAlive;In=e=>(t,n=Vt)=>{(!As||e==="sp")&&Vu(e,(...i)=>t(...i),n)},rN=In("bm"),It=In("m"),M1=In("bu"),l0=In("u"),Jo=In("bum"),rn=In("um"),nN=In("sp"),iN=In("rtg"),oN=In("rtc");U1="components",j1=Symbol.for("v-ndc");Xv=e=>e?s$(e)?Bu(e):Xv(e.parent):null,Ts=ut(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Xv(e.parent),$root:e=>Xv(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>__VUE_OPTIONS_API__?u0(e):e.type,$forceUpdate:e=>e.f||(e.f=()=>{n0(e.update)}),$nextTick:e=>e.n||(e.n=Ri.bind(e.proxy)),$watch:e=>__VUE_OPTIONS_API__?Gz.bind(e):qt}),Kv=(e,t)=>e!==qe&&!e.__isScriptSetup&&Ve(e,t),lN={get({_:e},t){if(t==="__v_skip")return!0;let{ctx:n,setupState:i,data:r,props:o,accessCache:a,type:s,appContext:c}=e;if(t[0]!=="$"){let m=a[t];if(m!==void 0)switch(m){case 1:return i[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Kv(i,t))return a[t]=1,i[t];if(__VUE_OPTIONS_API__&&r!==qe&&Ve(r,t))return a[t]=2,r[t];if(Ve(o,t))return a[t]=3,o[t];if(n!==qe&&Ve(n,t))return a[t]=4,n[t];(!__VUE_OPTIONS_API__||Qv)&&(a[t]=0)}}let u=Ts[t],d,p;if(u)return t==="$attrs"&&Pt(e.attrs,"get",""),u(e);if((d=s.__cssModules)&&(d=d[t]))return d;if(n!==qe&&Ve(n,t))return a[t]=4,n[t];if(p=c.config.globalProperties,Ve(p,t))return p[t]},set({_:e},t,n){let{data:i,setupState:r,ctx:o}=e;return Kv(r,t)?(r[t]=n,!0):__VUE_OPTIONS_API__&&i!==qe&&Ve(i,t)?(i[t]=n,!0):Ve(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:r,props:o,type:a}},s){let c;return!!(n[s]||__VUE_OPTIONS_API__&&e!==qe&&s[0]!=="$"&&Ve(e,s)||Kv(t,s)||Ve(o,s)||Ve(i,s)||Ve(Ts,s)||Ve(r.config.globalProperties,s)||(c=a.__cssModules)&&c[s])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ve(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};Qv=!0;dN={data:l1,props:c1,emits:c1,methods:Es,computed:Es,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:Es,directives:Es,watch:mN,provide:l1,inject:pN};fN=0;Ko=null,gN=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Et(t)}Modifiers`]||e[`${Kr(t)}Modifiers`];bN=new WeakMap;yN=e=>{let t;for(let n in e)(n==="class"||n==="style"||Po(n))&&((t||(t={}))[n]=e[n]);return t},xN=(e,t)=>{let n={};for(let i in e)(!Ro(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};K1={},W1=()=>Object.create(K1),G1=e=>Object.getPrototypeOf(e)===K1;SN=new WeakMap;d0=e=>e==="_"||e==="_ctx"||e==="$stable",p0=e=>xe(e)?e.map(en):[en(e)],EN=(e,t,n)=>{if(t._n)return t;let i=bt((...r)=>p0(t(...r)),n);return i._c=!1,i},Y1=(e,t,n)=>{let i=e._ctx;for(let r in e){if(d0(r))continue;let o=e[r];if(Se(o))t[r]=EN(r,o,i);else if(o!=null){let a=p0(o);t[r]=()=>a}}},X1=(e,t)=>{let n=p0(t);e.slots.default=()=>n},Q1=(e,t,n)=>{for(let i in t)(n||!d0(i))&&(e[i]=t[i])},IN=(e,t,n)=>{let i=e.slots=W1();if(e.vnode.shapeFlag&32){let r=t._;r?(Q1(i,t,n),n&&jo(i,"_",r,!0)):Y1(t,i)}else t&&X1(e,t)},TN=(e,t,n)=>{let{vnode:i,slots:r}=e,o=!0,a=qe;if(i.shapeFlag&32){let s=t._;s?n&&s===1?o=!1:Q1(r,t,n):(o=!t.$stable,Y1(t,r)),a=t}else t&&(X1(e,t),a={default:1});if(o)for(let s in r)!d0(s)&&a[s]==null&&delete r[s]};Xt=ON;n$=e=>e.__isSuspense;ge=Symbol.for("v-fgt"),Ds=Symbol.for("v-txt"),Rt=Symbol.for("v-cmt"),Wo=Symbol.for("v-stc"),En=[],mr=null;Ns=1;o$=({key:e})=>e??null,Tu=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ot(e)||zt(e)||Se(e)?{i:Mt,r:e,k:t,f:!!n}:e:null);be=DN;PN=B1(),RN=0;Vt=null,Ps=()=>Vt||Mt;{let e=qn(),t=(n,i)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(i),o=>{r.length>1?r.forEach(a=>a(o)):r[0](o)}};Pu=t("__VUE_INSTANCE_SETTERS__",n=>Vt=n),r0=t("__VUE_SSR_SETTERS__",n=>As=n)}Rs=e=>{let t=Vt;return Pu(e),e.scope.on(),()=>{e.scope.off(),Pu(t)}},m1=()=>{Vt&&Vt.scope.off(),Pu(null)};As=!1;LN={get(e,t){return Pt(e,"get",""),e[t]}};N=(e,t)=>q_(e,t,As);v1="3.5.40"});function O$(e){let t={};for(let ie in e)ie in C$||(t[ie]=e[ie]);if(e.css===!1)return t;let{name:n="v",type:i,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:u=a,appearToClass:d=s,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,S=GN(r),z=S&&S[0],T=S&&S[1],{onBeforeEnter:L,onEnter:j,onEnterCancelled:D,onLeave:U,onLeaveCancelled:$,onBeforeAppear:B=L,onAppear:se=j,onAppearCancelled:he=D}=t,te=(ie,ye,Be,mt)=>{ie._enterCancelled=mt,ri(ie,ye?d:s),ri(ie,ye?u:a),Be&&Be()},W=(ie,ye)=>{ie._isLeaving=!1,ri(ie,p),ri(ie,f),ri(ie,m),ye&&ye()},de=ie=>(ye,Be)=>{let mt=ie?se:j,ft=()=>te(ye,ie,Be);Mi(mt,[ye,ft]),m$(()=>{ri(ye,ie?c:o),nn(ye,ie?d:s),p$(mt)||f$(ye,i,z,ft)})};return ut(t,{onBeforeEnter(ie){Mi(L,[ie]),nn(ie,o),nn(ie,a)},onBeforeAppear(ie){Mi(B,[ie]),nn(ie,c),nn(ie,u)},onEnter:de(!1),onAppear:de(!0),onLeave(ie,ye){ie._isLeaving=!0;let Be=()=>W(ie,ye);nn(ie,p),ie._enterCancelled?(nn(ie,m),k0(ie)):(k0(ie),nn(ie,m)),m$(()=>{ie._isLeaving&&(ri(ie,p),nn(ie,f),p$(U)||f$(ie,i,T,Be))}),Mi(U,[ie,Be])},onEnterCancelled(ie){te(ie,!1,void 0,!0),Mi(D,[ie])},onAppearCancelled(ie){te(ie,!0,void 0,!0),Mi(he,[ie])},onLeaveCancelled(ie){W(ie),Mi($,[ie])}})}function GN(e){if(e==null)return null;if(Le(e))return[v0(e.enter),v0(e.leave)];{let t=v0(e);return[t,t]}}function v0(e){return Sv(e)}function nn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Xo]||(e[Xo]=new Set)).add(t)}function ri(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));let n=e[Xo];n&&(n.delete(t),n.size||(e[Xo]=void 0))}function m$(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}function f$(e,t,n,i){let r=e._endId=++JN,o=()=>{r===e._endId&&i()};if(n!=null)return setTimeout(o,n);let{type:a,timeout:s,propCount:c}=D$(e,t);if(!a)return i();let u=a+"end",d=0,p=()=>{e.removeEventListener(u,m),o()},m=f=>{f.target===e&&++d>=c&&p()};setTimeout(()=>{d<c&&p()},s+1),e.addEventListener(u,m)}function D$(e,t){let n=window.getComputedStyle(e),i=S=>(n[S]||"").split(", "),r=i(`${ti}Delay`),o=i(`${ti}Duration`),a=h$(r,o),s=i(`${Ms}Delay`),c=i(`${Ms}Duration`),u=h$(s,c),d=null,p=0,m=0;t===ti?a>0&&(d=ti,p=a,m=o.length):t===Ms?u>0&&(d=Ms,p=u,m=c.length):(p=Math.max(a,u),d=p>0?a>u?ti:Ms:null,m=d?d===ti?o.length:c.length:0);let f=d===ti&&/\b(?:transform|all)(?:,|$)/.test(i(`${ti}Property`).toString());return{type:d,timeout:p,propCount:m,hasTransform:f}}function h$(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>g$(n)+g$(e[i])))}function g$(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function k0(e){return(e?e.ownerDocument:document).body.offsetHeight}function qN(e,t,n){let i=e[Xo];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function QN(e,t,n){let i=e.style,r=ot(n),o=!1;if(n&&!r){if(t)if(ot(t))for(let a of t.split(";")){let s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&Us(i,s,"")}else for(let a in t)n[a]==null&&Us(i,a,"");for(let a in n){a==="display"&&(o=!0);let s=n[a];s!=null?tC(e,a,!ot(t)&&t?t[a]:void 0,s)||Us(i,a,s):Us(i,a,"")}}else if(r){if(t!==n){let a=i[YN];a&&(n+=";"+a),i.cssText=n,o=XN.test(n)}}else t&&e.removeAttribute("style");v$ in e&&(e[v$]=o?i.display:"",e[P$]&&(i.display="none"))}function Us(e,t,n){if(xe(n))n.forEach(i=>Us(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let i=eC(e,t);b$.test(n)?e.setProperty(Kr(i),n.replace(b$,""),"important"):e[i]=n}}function eC(e,t){let n=b0[t];if(n)return n;let i=Et(t);if(i!=="filter"&&i in e)return b0[t]=i;i=Ti(i);for(let r=0;r<y$.length;r++){let o=y$[r]+i;if(o in e)return b0[t]=o}return t}function tC(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&ot(i)&&n===i}function w$(e,t,n,i,r,o=A_(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(x$,t.slice(6,t.length)):e.setAttributeNS(x$,t,n):n==null||o&&!vu(n)?e.removeAttribute(t):e.setAttribute(t,o?"":sr(n)?String(n):n)}function k$(e,t,n,i,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?N$(n):n);return}let o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){let s=o==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(s!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let a=!1;if(n===""||n==null){let s=typeof e[t];s==="boolean"?n=vu(n):n==null&&s==="string"?(n="",a=!0):s==="number"&&(n=0,a=!0)}try{e[t]=n}catch{}a&&e.removeAttribute(r||t)}function Yo(e,t,n,i){e.addEventListener(t,n,i)}function rC(e,t,n,i){e.removeEventListener(t,n,i)}function nC(e,t,n,i,r=null){let o=e[_$]||(e[_$]={}),a=o[t];if(i&&a)a.value=i;else{let[s,c]=aC(t);if(i){let u=o[t]=cC(i,r);Yo(e,s,u,c)}else a&&(rC(e,s,a,c),o[t]=void 0)}}function aC(e){let t,n;for(;(n=e.match(iC))&&!oC.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Kr(e.slice(2)),t]}function cC(e,t){let n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;let r=n.value;if(xe(r)){let o=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{o.call(i),i._stopped=!0};let a=r.slice(),s=[i];for(let c=0;c<a.length&&!i._stopped;c++){let u=a[c];u&&fr(u,t,5,s)}}else fr(r,t,5,[i])};return n.value=e,n.attached=lC(),n}function dC(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&$$(t)&&Se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){let r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return $$(t)&&ot(n)?!1:t in e}function pC(e,t){let n=e._def.props;if(!n)return!1;let i=Et(t);return Array.isArray(n)?n.some(r=>Et(r)===i):Object.keys(n).some(r=>Et(r)===i)}function hC(e){let t=e.el;t[Zu]&&t[Zu](),t[S$]&&t[S$]()}function gC(e){M$.set(e,U$(e.el))}function vC(e){let t=R$.get(e),n=M$.get(e),i=t.left-n.left,r=t.top-n.top;if(i||r){let o=e.el,a=o.style,s=o.getBoundingClientRect(),c=1,u=1;return o.offsetWidth&&(c=s.width/o.offsetWidth),o.offsetHeight&&(u=s.height/o.offsetHeight),(!Number.isFinite(c)||c===0)&&(c=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(c-1)<.01&&(c=1),Math.abs(u-1)<.01&&(u=1),a.transform=a.webkitTransform=`translate(${i/c}px,${r/u}px)`,a.transitionDuration="0s",e}}function U$(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function bC(e,t,n){let i=e.cloneNode(),r=e[Xo];r&&r.forEach(s=>{s.split(/\s+/).forEach(c=>c&&i.classList.remove(c))}),n.split(/\s+/).forEach(s=>s&&i.classList.add(s)),i.style.display="none";let o=t.nodeType===1?t:t.parentNode;o.appendChild(i);let{hasTransform:a}=D$(i);return o.removeChild(i),a}function yC(e){e.target.composing=!0}function I$(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}function T$(e,t,n){return t&&(e=e.trim()),n&&(e=us(e)),e}function $C(){return z$||(z$=e$(_C))}function SC(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function EC(e){return ot(e)?document.querySelector(e):e}var w0,u$,N$,ZN,HN,Tn,d$,KN,ti,Ms,Xo,C$,A$,WN,ni,Mi,p$,JN,v$,P$,YN,XN,b$,y$,b0,x$,_$,iC,oC,y0,sC,lC,$$,uC,R$,M$,Zu,S$,mC,fC,_0,E$,x0,Hu,xC,wC,_t,kC,zn,_C,z$,js,j$=O(()=>{g0();g0();ps();/**
81
81
  * @vue/runtime-dom v3.5.40
82
82
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
83
83
  * @license MIT
@@ -85,7 +85,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
85
85
  * vue v3.5.40
86
86
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
87
87
  * @license MIT
88
- **/});function IC(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function TC(e){let t=e?IC(e):0;return L$[t%L$.length]}function Ui(e){let t=e?e[0].toUpperCase():"?",[n,i]=TC(e),r=['<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">','<defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1">',`<stop offset="0%" stop-color="${n}"/>`,`<stop offset="100%" stop-color="${i}"/>`,"</linearGradient></defs>",'<rect width="80" height="80" fill="url(#g)"/>',`<text x="40" y="40" text-anchor="middle" dominant-baseline="central" fill="white" font-family="system-ui,-apple-system,sans-serif" font-size="36" font-weight="600">${t}</text>`,"</svg>"].join("");return`data:image/svg+xml;base64,${btoa(r)}`}var L$,$0=O(()=>{"use strict";L$=[["#6366f1","#8b5cf6"],["#3b82f6","#06b6d4"],["#10b981","#34d399"],["#f59e0b","#f97316"],["#ef4444","#f97316"],["#ec4899","#8b5cf6"],["#14b8a6","#3b82f6"],["#8b5cf6","#ec4899"]]});var ii,Ls=O(()=>{"use strict";Oe();ii=l.enum(["active","stopped"])});var oi,S0,ji,V$,F$,E0,B$,Z$,Ku=O(()=>{"use strict";Oe();oi=l.enum(["woman","man"]),S0=[{key:"lauren",gender:"woman",accent:"American",character:"Friendly, comforting and soft",isDefault:!0},{key:"amy",gender:"woman",accent:"American",character:"Natural and sweet"},{key:"eve",gender:"woman",accent:"American",character:"Authentic, energetic and happy"},{key:"korina",gender:"woman",accent:"American",character:"Calm and friendly"},{key:"tamsin",gender:"woman",accent:"British",character:"Engaging and emotionally resonant"},{key:"jessica",gender:"woman",accent:"British",character:"Smooth, articulate and warm"},{key:"jude",gender:"man",accent:"British",character:"Engaging and naturally conversational"},{key:"adam",gender:"man",accent:"American",character:"Engaging, friendly and bright",isDefault:!0},{key:"evan",gender:"man",accent:"American",character:"Calm, grounded and reflective"},{key:"jon",gender:"man",accent:"American",character:"Relaxed, deep and approachable"},{key:"joe",gender:"man",accent:"British",character:"Reflective and thoughtful"},{key:"julius",gender:"man",accent:"German",character:"Deep, articulate and professional"},{key:"chuck",gender:"man",accent:"American",character:"Easygoing and plain-spoken"}],ji=l.enum(S0.map(e=>e.key)),V$=l.object({conversationId:l.string().min(1)}).strict(),F$=l.object({conversationId:l.string().min(1),agentId:l.string().min(1),personaName:l.string().min(1),personaTitle:l.string().max(255).nullable().optional(),gender:oi,voiceKey:ji.nullable(),sessionScope:l.enum(["private","org","public"]),senderName:l.string().optional(),senderRole:l.enum(["owner","member"]).optional(),sessionContext:l.string().max(1e3).optional(),threadSummary:l.string(),capabilities:l.array(l.object({name:l.string().min(1),description:l.string().min(1)})).optional(),surfaceGuidance:l.string().optional(),maxDurationSeconds:l.number().int().positive().max(3600).optional(),expiresAt:l.iso.datetime()}),E0=l.literal("livekit"),B$=l.object({name:l.enum(["voice.ready","voice.first_playback","voice.failed"]),client:l.enum(["web","ios"]),agentId:l.string().min(1).max(64).optional(),conversationId:l.string().min(1).max(64).optional(),provider:E0.optional(),durationMs:l.number().int().min(0).max(36e5),phase:l.enum(["idle","minting","connecting","live","ended"]).optional(),code:l.string().min(1).max(64).optional(),appVersion:l.string().min(1).max(32).optional(),appBuild:l.string().min(1).max(32).optional()}).strict(),Z$=l.object({provider:l.literal("livekit"),url:l.string().min(1),token:l.string().min(1),room:l.string().min(1)}).strict()});var zC,NC,Qo,CC,Wu,I0,H$,on,Vs=O(()=>{"use strict";Oe();Nn();$0();Oo();ru();xn();iv();Ls();Jn();Ku();zC=l.object({platform:l.enum(["linkedin","x","facebook","tiktok","youtube","github","instagram","threads","email","phone","website"]),handle:l.string()}),NC=l.preprocess(e=>Array.isArray(e)?e.filter(t=>t&&typeof t=="object"&&t.platform&&t.handle):e,l.array(zC)),Qo=l.enum(["essential","professional","business"]),CC=l.enum(["identity","working-style","complete"]),Wu=l.object({agentId:l.string().optional(),handle:l.string().optional(),ownerId:l.string().optional(),orgId:l.string().optional(),name:l.string().optional(),emoji:l.string().nullable().optional(),title:l.string().nullable().optional(),summary:l.string().nullable().optional(),entityType:l.string().optional(),avatarId:l.string().nullable().optional(),coverId:l.string().nullable().optional(),avatar:st.optional(),cover:st.optional(),email:l.string().nullable().optional(),website:l.string().url().nullable().optional(),accounts:NC.nullable().optional(),model:l.string().nullable().optional(),gender:oi.optional(),voiceKey:ji.nullable().optional(),billingTier:Qo.optional(),lastActiveAt:l.string().nullable().optional(),lastMessageAt:l.string().nullable().optional(),runtime:l.string().default("hermes").optional(),timezone:l.string().optional(),desiredStatus:ii.nullable().optional(),automationPrimaryChannel:l.string().optional(),heartbeatEnabled:l.boolean().optional(),heartbeatBriefingTime:vn.nullable().optional(),heartbeatCheckinTime:vn.nullable().optional(),heartbeatCloseoutTime:vn.nullable().optional(),onboardingStage:CC.nullable().optional(),onboardedAt:l.string().nullable().optional(),org:l.object({orgId:l.string(),handle:l.string(),name:l.string(),headline:l.string().optional(),summary:l.string().optional(),status:l.string()}).optional(),owner:l.object({userId:l.string(),fullName:l.string().optional(),avatar:st.optional()}).optional(),visibility:l.enum(["private","org","public"]).optional(),status:l.string().optional(),createdAt:l.string().optional(),updatedAt:l.string().optional()}),I0=Wu.extend({isPrimary:l.boolean().optional(),lifecycle:kn.optional(),changedAt:l.string().datetime().optional(),detail:l.string().optional(),blocker:wn.optional(),operation:as.optional()}),H$=Object.keys(I0.shape),on=class e extends Hr{constructor(t){let n="config"in t?{...t.config instanceof e?t.config.toConfig():t.config,context:t.context}:t;super("Agent",n),this.agentId=G(this.settings.agentId),this.handle=G(this.settings.handle),this.ownerId=G(this.settings.ownerId),this.orgId=G(this.settings.orgId),this.name=G(this.settings.name),this.title=G(this.settings.title),this.summary=G(this.settings.summary),this.entityType=G(this.settings.entityType),this.avatarId=G(this.settings.avatarId),this.coverId=G(this.settings.coverId),this.avatar=G(this.settings.avatar),this.cover=G(this.settings.cover),this.email=G(this.settings.email),this.website=G(this.settings.website),this.accounts=G(this.settings.accounts),this.model=G(this.settings.model),this.billingTier=G(this.settings.billingTier),this.lastActiveAt=G(this.settings.lastActiveAt),this.lastMessageAt=G(this.settings.lastMessageAt),this.timezone=G(this.settings.timezone),this.desiredStatus=G(this.settings.desiredStatus),this.automationPrimaryChannel=G(this.settings.automationPrimaryChannel),this.heartbeatEnabled=G(this.settings.heartbeatEnabled),this.heartbeatBriefingTime=G(this.settings.heartbeatBriefingTime),this.heartbeatCheckinTime=G(this.settings.heartbeatCheckinTime),this.heartbeatCloseoutTime=G(this.settings.heartbeatCloseoutTime),this.onboardingStage=G(this.settings.onboardingStage),this.onboardedAt=G(this.settings.onboardedAt),this.org=G(this.settings.org),this.owner=G(this.settings.owner),this.visibility=G(this.settings.visibility),this.status=G(this.settings.status),this.createdAt=G(this.settings.createdAt),this.updatedAt=G(this.settings.updatedAt),this.isPrimary=G(this.settings.isPrimary),this.lifecycle=G(this.settings.lifecycle),this.changedAt=G(this.settings.changedAt),this.detail=G(this.settings.detail),this.blocker=G(this.settings.blocker),this.operation=G(this.settings.operation),this.state=N(()=>pu({lifecycle:this.lifecycle.value??"unknown",detail:this.detail.value,changedAt:this.changedAt.value,blocker:this.blocker.value,operation:this.operation.value},this.displayName.value)),this.avatarUrl=N(()=>this.avatar.value?.src||Ui(this.name.value)),this.ownerMarkUrl=N(()=>{let i=this.owner.value;if(i)return i.avatar?.src||Ui(i.fullName||i.userId)}),this.displayName=N(()=>this.name.value||"Unnamed"),this.hasCustomHandle=N(()=>!!this.handle.value&&!/\d{13,}$/.test(this.handle.value)),this.displayHandle=N(()=>this.hasCustomHandle.value?`@${this.handle.value}`:void 0),this.isContextPrimary=N(()=>!!this.agentId.value&&this.agentId.value===this.settings.context?.primaryAgentId),this.wakeUpLabel=N(()=>`Wake up ${this.displayName.value}`),this.manageLabel=N(()=>`Manage ${this.displayName.value}`),this.hasReceivedMessage=N(()=>!!this.lastMessageAt.value)}merge(t){for(let n of H$){if(!(n in t))continue;let i=this[n];i&&typeof i=="object"&&"value"in i&&(i.value=t[n])}}toConfig(){let t={};for(let n of H$){let i=this[n];i&&typeof i=="object"&&"value"in i&&(t[n]=i.value)}return t}toJSON(){return this.toConfig()}}});var Fs,T0,K$,AC,OC,DC,PC,RC,MC,Bs,UC,jC,W$,LC,Gu=O(()=>{"use strict";Oe();uv();xn();Vs();Fs=l.string().trim().transform(e=>{if(!e.includes("/"))return e;try{let t=new URL(/^https?:\/\//i.test(e)?e:`https://${e}`),[n,i]=t.pathname.split("/").filter(Boolean),r=t.hostname.toLowerCase();if((r==="linkedin.com"||r.endsWith(".linkedin.com"))&&n?.toLowerCase()==="in"&&i)return i}catch{}return e}).pipe(l.string().min(3).max(100).regex(/^[a-zA-Z0-9-]+$/,"Use a LinkedIn username or profile URL")),T0=l.string().trim().toLowerCase().pipe(l.email()),K$=l.object({userId:l.string(),email:l.string().optional(),handle:l.string().optional(),fullName:l.string().optional(),bio:l.string().optional(),linkedinUsername:Fs.optional(),avatarId:l.string().optional(),avatar:st.optional(),isEmailVerified:l.boolean().optional(),primaryAgentId:l.string().optional(),primaryOrgId:l.string().optional(),lastActiveOrgId:l.string().optional(),onboarding:l.any().optional(),recentAgentIds:l.array(l.string()).optional(),location:l.string().optional(),geo:l.any().optional(),systemRole:l.string().optional(),status:l.string().optional(),lastSeenAt:l.string().optional(),createdAt:l.string().optional(),updatedAt:l.string().optional(),onboarded:l.boolean().optional()}),AC=l.object({name:l.string().min(1).max(100).optional(),bio:l.string().max(500).nullable().optional(),linkedinUsername:Fs.nullable().optional(),avatar:l.object({src:l.string(),mediaId:l.string()}).optional(),primaryAgentId:l.string().optional(),primaryOrgId:l.string().optional(),lastActiveOrgId:l.string().optional(),onboarding:l.any().optional()}).partial(),OC=l.object({email:T0}),DC=l.object({email:T0,code:l.string().min(6,"Verification code is required"),timezone:l.string().max(64).optional()}),PC=l.object({newEmail:T0}),RC=l.object({credential:l.string().optional(),code:l.string().optional(),timezone:l.string().max(64).optional(),source:l.enum(["web","ios"]).optional()}).refine(e=>e.credential||e.code,{message:"Either credential or code must be provided"}),MC=l.object({identityToken:l.string().min(1),fullName:l.string().optional(),timezone:l.string().max(64).optional()}),Bs=l.object({orgId:l.string().optional(),handle:l.string().optional(),name:l.string().optional(),email:l.string().nullable().optional(),website:l.string().url().nullable().optional(),summary:l.string().nullable().optional(),avatarId:l.string().nullable().optional(),avatar:st.optional(),coverId:l.string().nullable().optional(),cover:st.optional(),accounts:cv.nullable().optional(),ownerId:l.string().optional(),isPersonal:l.boolean().optional(),stripeCustomerIdTest:l.string().nullable().optional(),stripeCustomerIdLive:l.string().nullable().optional(),maxUsers:l.number().optional(),timezone:l.string().nullable().optional(),apiKey:l.string().nullable().optional(),syncedPlan:l.string().nullable().optional(),syncedBillingStatus:l.string().nullable().optional(),firstPaidAt:l.string().nullable().optional(),entitlementDeleteAt:l.string().nullable().optional(),billingLastSyncedAt:l.string().nullable().optional(),syncedPeriodStart:l.string().nullable().optional(),syncedPeriodEnd:l.string().nullable().optional(),onboarding:l.any().optional(),status:l.string().optional(),createdAt:l.string().optional(),updatedAt:l.string().optional()}),UC=Bs.extend({defaultAgent:l.object({agentId:l.string(),handle:l.string(),name:l.string(),orgId:l.string()}),onboardingCompleted:l.boolean().optional()}),jC=l.object({completedAt:l.string().datetime().optional(),setupBy:l.string().optional(),billingSetup:l.boolean().optional(),teamInvitesSetup:l.boolean().optional(),brandingSetup:l.boolean().optional(),domainsSetup:l.boolean().optional()}),W$=l.object({membershipId:l.string(),orgId:l.string(),name:l.string(),handle:l.string(),avatarId:l.string().optional(),avatar:st.optional(),coverId:l.string().optional(),cover:st.optional(),role:l.enum(["owner","admin","member","observer"]),memberCount:l.number().optional(),agentCount:l.number().optional(),joinedAt:l.string().datetime(),onboarding:jC.optional()}),LC=K$.extend({orgs:l.array(W$).optional(),agents:l.array(Wu).optional()})});var G$=O(()=>{"use strict";uv();fv();E_();dv();I_();xn();Gu()});var J$,Ju,qu=O(()=>{"use strict";Oe();J$=[{key:"caesar",name:"Caesar",gender:"man",vibe:"Decisive and direct",avatarFile:"/personas/caesar.webp"},{key:"joan",name:"Joan",gender:"woman",vibe:"Fearless optimist",avatarFile:"/personas/joan.webp"},{key:"leo",name:"Leo",gender:"man",vibe:"Inventive and curious",avatarFile:"/personas/leo.webp"},{key:"cleo",name:"Cleo",gender:"woman",vibe:"Charismatic strategist",avatarFile:"/personas/cleo.webp"},{key:"marilyn",name:"Marilyn",gender:"woman",vibe:"Warm and quick",avatarFile:"/personas/marilyn.webp"},{key:"socrates",name:"Socrates",gender:"man",vibe:"Asks the right questions",avatarFile:"/personas/socrates.webp"},{key:"owl",name:"Owl",gender:"woman",vibe:"Sees everything",avatarFile:"/personas/owl.webp"},{key:"duck",name:"Duck",gender:"man",vibe:"Cool under pressure",avatarFile:"/personas/duck.webp"},{key:"capy",name:"Capy",gender:"man",vibe:"Calm under anything",avatarFile:"/personas/capy.webp"},{key:"golden",name:"Golden",gender:"woman",vibe:"Loyal and upbeat",avatarFile:"/personas/golden.webp"}],Ju=l.enum(J$.map(e=>e.key))});var q$=O(()=>{"use strict"});var Y$=O(()=>{"use strict"});function FC(e){return e.trim().toUpperCase().replace(/\s+/g," ")}function Zs(e){let t=FC(e);return t.length<=64&&VC.has(t)}var X$,VC,Q$=O(()=>{"use strict";X$=["[SILENT]","SILENT","NO_REPLY","NO REPLY","NO-OP","NOOP","NO_OP","NO OP","[NO-OP]","[NOOP]","[NO_OP]","[NO OP]","HEARTBEAT_OK"],VC=new Set(X$)});var eS=O(()=>{"use strict"});var tS=O(()=>{"use strict"});var rS=O(()=>{"use strict"});var nS=O(()=>{"use strict"});var an,Hs=O(()=>{"use strict";Oe();an=l.string().min(1).max(64).refine(e=>{try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(new Date(0)),!0}catch{return!1}},"Invalid IANA timezone")});var z0,iS,oS,aS,sS=O(()=>{"use strict";Oe();Vs();ru();qu();Hs();Ku();z0=l.string().min(1).max(50).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),iS=l.object({orgId:l.string(),name:l.string().min(1).max(100),emoji:l.string().max(8).nullable().optional(),title:l.string().max(120).nullable().optional(),summary:l.string().max(500).nullable().optional(),handle:l.string().min(2).max(50).optional(),timezone:an.optional(),runtime:l.enum(["hermes"]).optional(),visibility:l.enum(["private","org","public"]).optional(),gender:oi.optional(),avatarPreset:Ju.optional(),avatarMediaId:l.string().optional()}).strict(),oS=l.object({name:l.string().min(1).max(100).optional(),handle:l.string().min(2).max(50).optional(),emoji:l.string().max(8).nullable().optional(),title:l.string().max(120).nullable().optional(),summary:l.string().max(500).nullable().optional(),email:l.string().email().nullable().optional(),website:l.string().url().nullable().optional(),avatarMediaId:l.string().nullable().optional(),coverMediaId:l.string().nullable().optional(),timezone:an.optional(),model:l.string().nullable().optional(),gender:oi.optional(),voiceKey:ji.nullable().optional(),billingTier:Qo.optional(),visibility:l.enum(["private","org","public"]).optional(),automationPrimaryChannel:z0.optional(),heartbeatEnabled:l.boolean().optional(),heartbeatBriefingTime:vn.nullable().optional(),heartbeatCheckinTime:vn.nullable().optional(),heartbeatCloseoutTime:vn.nullable().optional()}).strict(),aS=l.object({id:l.string(),label:l.string(),prompt:l.string()})});var N0,ea,Yu=O(()=>{"use strict";Oe();N0=["AGENT_BOOT_FAILED","AGENT_CREATE_FAILED","AGENT_DELETED","AGENT_DELETE_FAILED","AGENT_INACTIVE","AGENT_LIMIT","AGENT_NOT_FOUND","AGENT_NOT_DEPLOYED","AGENT_TOKENS_MISSING","AGENT_UNREACHABLE","AGENT_UPDATE_FAILED","AGENT_WAKE_TIMEOUT","ALREADY_MEMBER","ATTACHMENT_TYPE_UNSUPPORTED","AUTH_ACCOUNT_NOT_FOUND","AUTH_BOT_BLOCKED","AUTH_DISPOSABLE_EMAIL","AUTH_EMAIL_IN_USE","AUTH_INVALID","AUTH_INVALID_CODE","AUTH_INVALID_HANDOFF","AUTH_LOCKED_OUT","AUTH_MISSING","AUTH_PROVIDER_FAILED","AUTH_PROVIDER_NOT_CONFIGURED","AUTH_RATE_LIMITED","AUTH_REVOKED","AUTH_TURNSTILE_MISSING","AUTH_UNKNOWN","AUTH_WRONG_TYPE","AUTOMATION_CHANNEL_UNAVAILABLE","AUTOMATION_PURPOSE_REQUIRED","BOT_REPLY_FAILED","BILLING_BUDGET_REACHED","BILLING_DEMO_SPENT","BILLING_NO_PLAN","BILLING_PAST_DUE","BILLING_RUNAWAY_CAP","BILLING_SEAT_LIMIT","CHECKOUT_FAILED","CONFIRMATION_REQUIRED","CREATE_FAILED","CREDIT_LIMIT","DELETE_FAILED","DUPLICATE_INVITE","EMAIL_DELIVERY_FAILED","EMAIL_FAILED","EMAIL_MISMATCH","EMAIL_RATE_LIMITED","EMAIL_REASON_NOT_ELIGIBLE","EMPTY_STREAM","EMPTY_PATCH","ENV_VAR_CONFLICT","ENV_VAR_RESERVED","EXTENSION_INACTIVE","FORBIDDEN","HANDLE_TAKEN","IMAGE_GENERATION_FAILED","IMAGE_GENERATION_UNCONFIGURED","INTERNAL_ERROR","INVALID_FILE","INVALID_PRIMARY_CHANNEL","UNKNOWN_AUTOMATION_CHANNEL","INVITE_CONFLICT","INVITE_EXPIRED","INVITE_INVALID","MCP_NOT_AVAILABLE","MCP_NOT_CONFIGURED","MEDIA_NOT_FOUND","MEDIA_SERVER_UNAVAILABLE","MEDIA_UPLOAD_FAILED","MEMORY_NOT_FOUND","MISSING_IDEMPOTENCY_KEY","NETWORK_ERROR","NO_WORKSPACE","NOT_A_MEMBER","NOT_AUTHORIZED","NOT_FOUND","ORG_NOT_FOUND","OVERAGE_CAP","OWNER_LOCK","PAIRING_VERIFY_FAILED","PAYMENT_FAILED","PLAN_LIMIT","PROVISIONER_UNAVAILABLE","RATE_LIMIT","RATE_LIMITED","REBUILD_FAILED","RESTART_FAILED","SEND_FAILED","STOP_FAILED","STREAM_DISCONNECT","STREAM_TIMEOUT","STRIPE_LOAD","TIMEOUT","TOKEN_ERROR","TOOL_PROTOCOL","TRIAL_ENDED","TURN_ACTIVE","UPLOAD_FAILED","VALIDATION_ERROR","VOICE_UNAVAILABLE","WAKE_FAILED"],ea=l.enum(N0)});var C0,lS,cS=O(()=>{"use strict";Oe();Oo();Yu();C0=l.enum(["notFound","busy","rateLimited","timeout","invalidConfig","transient","fatal"]),lS=l.object({ok:l.literal(!1),error:l.string(),code:ea.optional(),issue:wn.optional(),providerErrorKind:C0.optional()})});var A0,Ks,O0,Xu=O(()=>{"use strict";Oe();A0=l.object({kind:l.enum(["icon","favicon","service"]),icon:l.string().min(1).optional(),domain:l.string().min(1).optional(),serviceKey:l.string().min(1).optional()}).strict(),Ks=l.object({activityId:l.string().min(1),turnId:l.string().min(1),status:l.enum(["started","completed","failed"]),label:l.string().trim().min(1),kind:l.enum(["search","file","image","service","automation","handoff","other"]),toolName:l.string().min(1).optional(),serviceKey:l.string().min(1).optional(),startedAt:l.string().datetime().optional(),endedAt:l.string().datetime().optional(),durationMs:l.number().int().nonnegative().optional(),note:l.string().trim().min(1).optional(),visual:A0.optional()}).strict(),O0=Ks.extend({status:l.enum(["completed","failed"])})});function mS(e,t){e.revisitAt&&e.disposition!=="deferred"&&t.addIssue({code:"custom",path:["revisitAt"],message:"revisitAt requires deferred disposition"})}function gS(e,t){let n=new Set;for(let i of e.participants){let r=`${i.type}:${i.id}`;n.has(r)&&t.addIssue({code:"custom",path:["participants"],message:"Duplicate conversation participant."}),n.add(r)}}var uS,D0,Ws,Qu,dS,pS,P0,fS,R0,ed,M0,hS,td,vS,bS,yS,rd=O(()=>{"use strict";Oe();xn();Xu();Hs();uS=Si,D0=l.object({kind:l.literal("inline"),offset:l.number().int().nonnegative()}),Ws=l.object({type:uS,src:l.url(),filename:l.string().min(1),mimeType:l.string().min(1),mediaId:l.string().min(1).optional(),size:l.number().int().nonnegative().optional(),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),duration:l.number().nonnegative().optional(),text:l.string().optional(),placement:D0.optional()}),Qu=l.object({ref:l.string().min(1).max(256)}).strict(),dS=l.enum(["handled","dismissed","deferred"]),pS=l.iso.datetime();P0=Qu.extend({disposition:dS.optional(),revisitAt:pS.optional()}).superRefine(mS),fS=Qu.extend({disposition:dS,revisitAt:pS.optional()}).superRefine(mS),R0=l.object({turnId:l.string().min(1).optional(),turnOutcome:l.enum(["failed","stopped"]).optional(),attachments:l.array(Ws).optional(),toolActivities:l.array(O0).optional(),issue:l.object({code:l.string(),bucket:l.enum(["account","error"]),actionLabel:l.string(),actionUrl:l.string(),help:l.string().optional()}).optional(),notification:l.object({push:l.boolean().optional(),excludeUserId:l.string().min(1).optional()}).optional(),automation:l.object({run:l.object({automationRunId:l.string(),sourceKind:l.enum(["webhook","schedule","heartbeat"]),sourceLabel:l.string().optional(),deliveryId:l.string().optional(),status:l.enum(["received","forwarded","owner_notified","needs_approval","completed","failed","dropped"])}).catchall(l.unknown())}).catchall(l.unknown()).optional(),voiceDelegated:l.literal(!0).optional(),ownerHandoff:l.literal(!0).optional(),attention:l.array(P0).max(20).optional()}).catchall(l.unknown()),ed=l.object({messageId:l.string().min(1),conversationId:l.string().min(1),role:l.enum(["user","assistant","system"]),authorParticipantId:l.string().nullable(),systemKind:l.string().nullable(),content:l.string(),sequence:l.string().min(1),clientNonce:l.string().nullable().optional(),metadata:R0.nullable().optional(),status:l.string().nullable().optional(),createdAt:l.string(),updatedAt:l.string()}),M0=l.object({type:uS,mediaId:l.string().min(1).optional(),url:l.url().optional(),name:l.string().min(1).optional(),mimeType:l.string().min(1).optional(),duration:l.number().nonnegative().optional()}).superRefine((e,t)=>{if(!e.mediaId)for(let n of["url","name","mimeType"])e[n]||t.addIssue({code:"custom",path:[n],message:`${n} is required when mediaId is absent`})}),hS=l.object({conversationId:l.string().min(1),content:l.string().max(1e4).default(""),clientNonce:l.string().max(64).optional(),attachments:l.array(M0).max(10).optional(),channel:l.enum(["ios","dashboard"]).optional(),actionUrls:l.object({billing:l.string().max(500),agent:l.string().max(500)}).optional(),viewerTimezone:an.optional()}).refine(e=>e.content.trim().length>0||(e.attachments?.length??0)>0,{path:["content"],message:"Message or attachment required"}),td=l.object({type:l.enum(["user","agent"]),id:l.string().min(1)}).strict();vS=l.object({orgId:l.string().min(1),participants:l.array(td).min(1).max(20)}).strict().superRefine(gS),bS=l.object({orgId:l.string().min(1),participants:l.array(td).min(1).max(20)}).strict().superRefine((e,t)=>{gS(e,t),e.participants.some(n=>n.type==="agent")||t.addIssue({code:"custom",path:["participants"],message:"New sessions require at least one agent participant."})}),yS=l.object({category:l.string().min(1).max(30).optional(),reason:l.string().max(2e3).optional()}).strict()});var U0,j0,xS,wS,kS=O(()=>{"use strict";Oe();rd();U0=l.enum(["1:1","4:3","3:4","16:9","9:16"]),j0=l.enum(["1K","2K","4K"]),xS=l.object({prompt:l.string().trim().min(1).max(4e3),aspectRatio:U0.default("1:1"),outputFormat:l.enum(["png","jpeg","webp"]).default("webp"),resolution:j0.default("2K"),style:l.string().trim().max(200).optional(),altText:l.string().trim().max(500).optional(),referenceMediaIds:l.array(l.string().min(1)).max(4).optional()}).strict(),wS=l.object({mediaId:l.string().min(1),src:l.url(),filename:l.string().min(1),mimeType:l.string().min(1),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),provider:l.string().min(1).optional(),providerRequestId:l.string().min(1).optional(),media:l.string().startsWith("MEDIA:"),attachment:Ws.extend({type:l.literal("image")})})});var _S,L0,$S,SS,V0,ES,IS,F0,TS,zS=O(()=>{"use strict";Oe();lv();_S=l.object({identityToken:l.string().min(1),fullName:l.string().optional()}),L0=l.object({redirect:l.string(),redirectReason:l.string(),isNew:l.boolean(),deviceId:l.string()}),$S=l.object({ok:l.literal(!0),data:L0,token:l.string()}),SS=l.object({path:l.string().startsWith("/","path must be a relative dashboard path").refine(sv,"path must be a relative dashboard path")}),V0=l.object({url:l.string()}),ES=l.object({ok:l.literal(!0),data:V0}),IS=l.object({token:l.string().min(1)}),F0=l.object({redirect:l.string(),redirectReason:l.string(),deviceId:l.string()}),TS=l.object({ok:l.literal(!0),data:F0,token:l.string()})});var B0,Z0,H0,K0,BC,NS,W0,CS,AS,OS,DS,PS=O(()=>{"use strict";Oe();Vs();B0=l.enum(["none","active_assistant"]),Z0=l.enum(["none","active","trial","canceling","past_due","paused"]),H0=l.object({brand:l.string(),last4:l.string(),expMonth:l.number(),expYear:l.number()}),K0=l.object({date:l.string(),amount:l.number(),status:l.string(),invoicePdf:l.string().optional()}),BC=l.object({graceEndsAt:l.string().optional(),suspended:l.boolean(),url:l.string().optional()}),NS=l.object({plan:B0,status:Z0,price:l.number(),tierRates:l.record(l.string(),l.number()).optional(),maxAgents:l.number(),activeAgents:l.number(),workspaceTier:Qo.optional(),upcomingAmountDue:l.number().optional(),upcomingDueDate:l.string().optional(),nextBillDate:l.string().optional(),cancelAtPeriodEnd:l.boolean().optional(),cancelAt:l.string().optional(),trialEnd:l.string().optional(),trialDaysRemaining:l.number().optional(),paymentMethod:H0.optional(),paymentRecovery:BC.optional(),invoices:l.array(K0),stripeError:l.string().optional()}),W0=l.enum(["demo_agent_exists","demo_usage_exhausted","subscription_required","plan_limit"]),CS=l.object({canCreate:l.boolean(),activeAgents:l.number().int().nonnegative(),agentLimit:l.number().int().nonnegative(),isDemo:l.boolean(),reason:W0.optional()}),AS=l.object({orgId:l.string(),agentName:l.string().optional(),runtime:l.string().optional()}),OS=l.object({created:l.number(),skipped:l.number(),errors:l.array(l.string())}),DS=l.object({updated:l.number(),errors:l.array(l.string())})});function Gs(e){return{code:e.code,error:e.message,...e.bucket?{bucket:e.bucket}:{},...e.actionLabel?{actionLabel:e.actionLabel}:{},...e.actionUrl?{actionUrl:e.actionUrl}:{},...e.help?{help:e.help}:{}}}function Js(e){if(e.event==="message"&&e.data.message.role==="user")return e.data.message.messageId}function q0(e){if(e.event==="message_delta"||e.event==="working_state"||e.event==="tool_activity"||e.event==="working_end"||e.event==="stream_end")return e.data.turnId;if(e.event==="message"){let t=e.data.message.metadata?.turnId;return typeof t=="string"?t:void 0}}function nd(e,t){if(e.event==="status"||e.event==="error"||Js(e))return!0;let n=q0(e);return t?n?n===t:e.event==="message":!1}var G0,J0,ta,Y0=O(()=>{"use strict";Oe();rd();Xu();Yu();Jn();G0=cu,J0=l.object({code:ea,message:l.string(),bucket:l.enum(["account","error"]).optional(),actionLabel:l.string().optional(),actionUrl:l.string().optional(),help:l.string().optional()});ta=l.discriminatedUnion("event",[l.object({event:l.literal("status"),data:G0}),l.object({event:l.literal("message"),data:l.object({message:ed})}),l.object({event:l.literal("message_delta"),data:l.object({delta:l.string(),turnId:l.string(),messageId:l.string().optional(),role:l.enum(["assistant","system"]).optional()})}),l.object({event:l.literal("working_state"),data:l.object({description:l.string(),turnId:l.string().optional()})}),l.object({event:l.literal("tool_activity"),data:Ks}),l.object({event:l.literal("working_end"),data:l.object({turnId:l.string().optional()}).strict()}),l.object({event:l.literal("stream_end"),data:l.object({turnId:l.string().optional()}).strict()}),l.object({event:l.literal("error"),data:J0})])});async function id(e){let t=e.fetchFn??fetch,n=e.headers??{},i=!1,r=!1,o=!1,a=!1,s,c=!1,u=!1,d,p=new AbortController,m=!1,f,S=()=>{},z=new Promise($=>{S=$}),T=$=>{m||(m=!0,f&&clearTimeout(f),S($))},L=($,F)=>{o=!0,e.onTransportError({stage:$,message:F})},j=()=>{d?.cancel().catch(()=>{})};f=setTimeout(()=>{u=!0,L("stream-open","Timed out opening stream"),p.abort(),T("failed")},e.streamOpenTimeoutMs??1e4);let D=(async()=>{try{let $=await t(e.streamUrl,{headers:n,signal:p.signal});if(!$.ok){o=!0,T("failed"),e.onTransportError({stage:"stream-open",message:await ZC($)});return}if(d=$.body?.getReader(),!d){L("stream-open","No response stream"),T("failed");return}T("ready");for await(let F of X0(d))if(s||(s=Js(F)),!(i&&!nd(F,s))){if(F.event==="status")e.onLiveStatus?.(F.data);else if(F.event==="working_state")i&&e.onStatus?.(F.data.description);else if(F.event==="tool_activity")i&&e.onToolActivity?.(F.data);else if(F.event==="working_end")i&&e.onWorkingEnd?.();else if(F.event==="message_delta")i&&e.onDelta(F.data.delta,F.data.role);else if(F.event==="error"){o=!0,e.onChatError(F.data);break}else if(F.event==="message"&&(F.data.message.role==="assistant"||F.data.message.role==="system")){if(!i)continue;a||(a=!0,e.onMessage?.(F.data.message))}else if(F.event==="stream_end")break}!o&&a?e.onDone():!o&&i&&!r&&L("no-reply","Stream ended before reply arrived")}catch($){!r&&!u&&(T("failed"),L("stream-read",$ instanceof Error?$.message:"Stream failed"))}finally{c=!0;try{await d?.cancel()}catch{}}})();if(await z==="failed"){await D;return}if(c){L("stream-open","Stream closed before send"),await D;return}try{i=!0;let $=await t(e.sendUrl,{method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify(e.sendBody)}),F=await $.json();if(!F.ok){r=!0,p.abort(),j(),o=!0,e.onTransportError({stage:"api",message:F.error||`Send failed: HTTP ${$.status}`,...F.code?{code:F.code}:{}}),await D;return}s=F.data.messageId,e.onUserMessage?.(F.data)}catch($){r=!0,p.abort(),j(),L("api",$ instanceof Error?$.message:"Send failed"),await D;return}await D}async function ZC(e){let t="";try{let n=await e.text();n&&(t=` - ${n.slice(0,200)}`)}catch{}return`HTTP ${e.status}${t}`}async function*X0(e){let t=new TextDecoder,n="";for(;;){let{done:i,value:r}=await e.read();if(i)break;n+=t.decode(r,{stream:!0});let o=n.indexOf(`
88
+ **/});function IC(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Math.abs(t)}function TC(e){let t=e?IC(e):0;return L$[t%L$.length]}function Ui(e){let t=e?e[0].toUpperCase():"?",[n,i]=TC(e),r=['<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80">','<defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1">',`<stop offset="0%" stop-color="${n}"/>`,`<stop offset="100%" stop-color="${i}"/>`,"</linearGradient></defs>",'<rect width="80" height="80" fill="url(#g)"/>',`<text x="40" y="40" text-anchor="middle" dominant-baseline="central" fill="white" font-family="system-ui,-apple-system,sans-serif" font-size="36" font-weight="600">${t}</text>`,"</svg>"].join("");return`data:image/svg+xml;base64,${btoa(r)}`}var L$,$0=O(()=>{"use strict";L$=[["#6366f1","#8b5cf6"],["#3b82f6","#06b6d4"],["#10b981","#34d399"],["#f59e0b","#f97316"],["#ef4444","#f97316"],["#ec4899","#8b5cf6"],["#14b8a6","#3b82f6"],["#8b5cf6","#ec4899"]]});var ii,Ls=O(()=>{"use strict";Oe();ii=l.enum(["active","stopped"])});var oi,S0,ji,V$,F$,E0,B$,Z$,Ku=O(()=>{"use strict";Oe();oi=l.enum(["woman","man"]),S0=[{key:"lauren",gender:"woman",accent:"American",character:"Friendly, comforting and soft",isDefault:!0},{key:"amy",gender:"woman",accent:"American",character:"Natural and sweet"},{key:"eve",gender:"woman",accent:"American",character:"Authentic, energetic and happy"},{key:"korina",gender:"woman",accent:"American",character:"Calm and friendly"},{key:"tamsin",gender:"woman",accent:"British",character:"Engaging and emotionally resonant"},{key:"jessica",gender:"woman",accent:"British",character:"Smooth, articulate and warm"},{key:"jude",gender:"man",accent:"British",character:"Engaging and naturally conversational"},{key:"adam",gender:"man",accent:"American",character:"Engaging, friendly and bright",isDefault:!0},{key:"evan",gender:"man",accent:"American",character:"Calm, grounded and reflective"},{key:"jon",gender:"man",accent:"American",character:"Relaxed, deep and approachable"},{key:"joe",gender:"man",accent:"British",character:"Reflective and thoughtful"},{key:"julius",gender:"man",accent:"German",character:"Deep, articulate and professional"},{key:"chuck",gender:"man",accent:"American",character:"Easygoing and plain-spoken"}],ji=l.enum(S0.map(e=>e.key)),V$=l.object({conversationId:l.string().min(1)}).strict(),F$=l.object({conversationId:l.string().min(1),agentId:l.string().min(1),personaName:l.string().min(1),personaTitle:l.string().max(255).nullable().optional(),gender:oi,voiceKey:ji.nullable(),sessionScope:l.enum(["private","org","public"]),senderName:l.string().optional(),senderRole:l.enum(["owner","member"]).optional(),sessionContext:l.string().max(1e3).optional(),threadSummary:l.string(),capabilities:l.array(l.object({name:l.string().min(1),description:l.string().min(1)})).optional(),surfaceGuidance:l.string().optional(),maxDurationSeconds:l.number().int().positive().max(3600).optional(),expiresAt:l.iso.datetime()}),E0=l.literal("livekit"),B$=l.object({name:l.enum(["voice.ready","voice.first_playback","voice.failed"]),client:l.enum(["web","ios"]),agentId:l.string().min(1).max(64).optional(),conversationId:l.string().min(1).max(64).optional(),provider:E0.optional(),durationMs:l.number().int().min(0).max(36e5),phase:l.enum(["idle","minting","connecting","live","ended"]).optional(),code:l.string().min(1).max(64).optional(),appVersion:l.string().min(1).max(32).optional(),appBuild:l.string().min(1).max(32).optional()}).strict(),Z$=l.object({provider:l.literal("livekit"),url:l.string().min(1),token:l.string().min(1),room:l.string().min(1)}).strict()});var zC,NC,Qo,CC,Wu,I0,H$,on,Vs=O(()=>{"use strict";Oe();Nn();$0();Oo();ru();xn();iv();Ls();Jn();Ku();zC=l.object({platform:l.enum(["linkedin","x","facebook","tiktok","youtube","github","instagram","threads","email","phone","website"]),handle:l.string()}),NC=l.preprocess(e=>Array.isArray(e)?e.filter(t=>t&&typeof t=="object"&&t.platform&&t.handle):e,l.array(zC)),Qo=l.enum(["essential","professional","business"]),CC=l.enum(["identity","working-style","complete"]),Wu=l.object({agentId:l.string().optional(),handle:l.string().optional(),ownerId:l.string().optional(),orgId:l.string().optional(),name:l.string().optional(),emoji:l.string().nullable().optional(),title:l.string().nullable().optional(),summary:l.string().nullable().optional(),entityType:l.string().optional(),avatarId:l.string().nullable().optional(),coverId:l.string().nullable().optional(),avatar:st.optional(),cover:st.optional(),email:l.string().nullable().optional(),website:l.string().url().nullable().optional(),accounts:NC.nullable().optional(),model:l.string().nullable().optional(),gender:oi.optional(),voiceKey:ji.nullable().optional(),billingTier:Qo.optional(),lastActiveAt:l.string().nullable().optional(),lastMessageAt:l.string().nullable().optional(),runtime:l.string().default("hermes").optional(),timezone:l.string().optional(),desiredStatus:ii.nullable().optional(),automationPrimaryChannel:l.string().optional(),heartbeatEnabled:l.boolean().optional(),heartbeatBriefingTime:vn.nullable().optional(),heartbeatCheckinTime:vn.nullable().optional(),heartbeatCloseoutTime:vn.nullable().optional(),onboardingStage:CC.nullable().optional(),onboardedAt:l.string().nullable().optional(),org:l.object({orgId:l.string(),handle:l.string(),name:l.string(),headline:l.string().optional(),summary:l.string().optional(),status:l.string()}).optional(),owner:l.object({userId:l.string(),fullName:l.string().optional(),avatar:st.optional()}).optional(),visibility:l.enum(["private","org","public"]).optional(),status:l.string().optional(),createdAt:l.string().optional(),updatedAt:l.string().optional()}),I0=Wu.extend({isPrimary:l.boolean().optional(),lifecycle:kn.optional(),changedAt:l.string().datetime().optional(),detail:l.string().optional(),blocker:wn.optional(),operation:as.optional()}),H$=Object.keys(I0.shape),on=class e extends Hr{constructor(t){let n="config"in t?{...t.config instanceof e?t.config.toConfig():t.config,context:t.context}:t;super("Agent",n),this.agentId=G(this.settings.agentId),this.handle=G(this.settings.handle),this.ownerId=G(this.settings.ownerId),this.orgId=G(this.settings.orgId),this.name=G(this.settings.name),this.title=G(this.settings.title),this.summary=G(this.settings.summary),this.entityType=G(this.settings.entityType),this.avatarId=G(this.settings.avatarId),this.coverId=G(this.settings.coverId),this.avatar=G(this.settings.avatar),this.cover=G(this.settings.cover),this.email=G(this.settings.email),this.website=G(this.settings.website),this.accounts=G(this.settings.accounts),this.model=G(this.settings.model),this.billingTier=G(this.settings.billingTier),this.lastActiveAt=G(this.settings.lastActiveAt),this.lastMessageAt=G(this.settings.lastMessageAt),this.timezone=G(this.settings.timezone),this.desiredStatus=G(this.settings.desiredStatus),this.automationPrimaryChannel=G(this.settings.automationPrimaryChannel),this.heartbeatEnabled=G(this.settings.heartbeatEnabled),this.heartbeatBriefingTime=G(this.settings.heartbeatBriefingTime),this.heartbeatCheckinTime=G(this.settings.heartbeatCheckinTime),this.heartbeatCloseoutTime=G(this.settings.heartbeatCloseoutTime),this.onboardingStage=G(this.settings.onboardingStage),this.onboardedAt=G(this.settings.onboardedAt),this.org=G(this.settings.org),this.owner=G(this.settings.owner),this.visibility=G(this.settings.visibility),this.status=G(this.settings.status),this.createdAt=G(this.settings.createdAt),this.updatedAt=G(this.settings.updatedAt),this.isPrimary=G(this.settings.isPrimary),this.lifecycle=G(this.settings.lifecycle),this.changedAt=G(this.settings.changedAt),this.detail=G(this.settings.detail),this.blocker=G(this.settings.blocker),this.operation=G(this.settings.operation),this.state=N(()=>pu({lifecycle:this.lifecycle.value??"unknown",detail:this.detail.value,changedAt:this.changedAt.value,blocker:this.blocker.value,operation:this.operation.value},this.displayName.value)),this.avatarUrl=N(()=>this.avatar.value?.src||Ui(this.name.value)),this.ownerMarkUrl=N(()=>{let i=this.owner.value;if(i)return i.avatar?.src||Ui(i.fullName||i.userId)}),this.displayName=N(()=>this.name.value||"Unnamed"),this.hasCustomHandle=N(()=>!!this.handle.value&&!/\d{13,}$/.test(this.handle.value)),this.displayHandle=N(()=>this.hasCustomHandle.value?`@${this.handle.value}`:void 0),this.isContextPrimary=N(()=>!!this.agentId.value&&this.agentId.value===this.settings.context?.primaryAgentId),this.wakeUpLabel=N(()=>`Wake up ${this.displayName.value}`),this.manageLabel=N(()=>`Manage ${this.displayName.value}`),this.hasReceivedMessage=N(()=>!!this.lastMessageAt.value)}merge(t){for(let n of H$){if(!(n in t))continue;let i=this[n];i&&typeof i=="object"&&"value"in i&&(i.value=t[n])}}toConfig(){let t={};for(let n of H$){let i=this[n];i&&typeof i=="object"&&"value"in i&&(t[n]=i.value)}return t}toJSON(){return this.toConfig()}}});var Fs,T0,K$,AC,OC,DC,PC,RC,MC,Bs,UC,jC,W$,LC,Gu=O(()=>{"use strict";Oe();uv();xn();Vs();Fs=l.string().trim().transform(e=>{if(!e.includes("/"))return e;try{let t=new URL(/^https?:\/\//i.test(e)?e:`https://${e}`),[n,i]=t.pathname.split("/").filter(Boolean),r=t.hostname.toLowerCase();if((r==="linkedin.com"||r.endsWith(".linkedin.com"))&&n?.toLowerCase()==="in"&&i)return i}catch{}return e}).pipe(l.string().min(3).max(100).regex(/^[a-zA-Z0-9-]+$/,"Use a LinkedIn username or profile URL")),T0=l.string().trim().toLowerCase().pipe(l.email()),K$=l.object({userId:l.string(),email:l.string().optional(),handle:l.string().optional(),fullName:l.string().optional(),bio:l.string().optional(),linkedinUsername:Fs.optional(),avatarId:l.string().optional(),avatar:st.optional(),isEmailVerified:l.boolean().optional(),primaryAgentId:l.string().optional(),primaryOrgId:l.string().optional(),lastActiveOrgId:l.string().optional(),onboarding:l.any().optional(),recentAgentIds:l.array(l.string()).optional(),location:l.string().optional(),geo:l.any().optional(),systemRole:l.string().optional(),status:l.string().optional(),lastSeenAt:l.string().optional(),createdAt:l.string().optional(),updatedAt:l.string().optional(),onboarded:l.boolean().optional()}),AC=l.object({name:l.string().min(1).max(100).optional(),bio:l.string().max(500).nullable().optional(),linkedinUsername:Fs.nullable().optional(),avatar:l.object({src:l.string(),mediaId:l.string()}).optional(),primaryAgentId:l.string().optional(),primaryOrgId:l.string().optional(),lastActiveOrgId:l.string().optional(),onboarding:l.any().optional()}).partial(),OC=l.object({email:T0}),DC=l.object({email:T0,code:l.string().min(6,"Verification code is required"),timezone:l.string().max(64).optional()}),PC=l.object({newEmail:T0}),RC=l.object({credential:l.string().optional(),code:l.string().optional(),timezone:l.string().max(64).optional(),source:l.enum(["web","ios"]).optional()}).refine(e=>e.credential||e.code,{message:"Either credential or code must be provided"}),MC=l.object({identityToken:l.string().min(1),fullName:l.string().optional(),timezone:l.string().max(64).optional()}),Bs=l.object({orgId:l.string().optional(),handle:l.string().optional(),name:l.string().optional(),email:l.string().nullable().optional(),website:l.string().url().nullable().optional(),summary:l.string().nullable().optional(),avatarId:l.string().nullable().optional(),avatar:st.optional(),coverId:l.string().nullable().optional(),cover:st.optional(),accounts:cv.nullable().optional(),ownerId:l.string().optional(),isPersonal:l.boolean().optional(),stripeCustomerIdTest:l.string().nullable().optional(),stripeCustomerIdLive:l.string().nullable().optional(),maxUsers:l.number().optional(),timezone:l.string().nullable().optional(),apiKey:l.string().nullable().optional(),syncedPlan:l.string().nullable().optional(),syncedBillingStatus:l.string().nullable().optional(),firstPaidAt:l.string().nullable().optional(),entitlementDeleteAt:l.string().nullable().optional(),billingLastSyncedAt:l.string().nullable().optional(),syncedPeriodStart:l.string().nullable().optional(),syncedPeriodEnd:l.string().nullable().optional(),onboarding:l.any().optional(),status:l.string().optional(),createdAt:l.string().optional(),updatedAt:l.string().optional()}),UC=Bs.extend({defaultAgent:l.object({agentId:l.string(),handle:l.string(),name:l.string(),orgId:l.string()}),onboardingCompleted:l.boolean().optional()}),jC=l.object({completedAt:l.string().datetime().optional(),setupBy:l.string().optional(),billingSetup:l.boolean().optional(),teamInvitesSetup:l.boolean().optional(),brandingSetup:l.boolean().optional(),domainsSetup:l.boolean().optional()}),W$=l.object({membershipId:l.string(),orgId:l.string(),name:l.string(),handle:l.string(),avatarId:l.string().optional(),avatar:st.optional(),coverId:l.string().optional(),cover:st.optional(),role:l.enum(["owner","admin","member","observer"]),memberCount:l.number().optional(),agentCount:l.number().optional(),joinedAt:l.string().datetime(),onboarding:jC.optional()}),LC=K$.extend({orgs:l.array(W$).optional(),agents:l.array(Wu).optional()})});var G$=O(()=>{"use strict";uv();fv();E_();dv();I_();xn();Gu()});var J$,Ju,qu=O(()=>{"use strict";Oe();J$=[{key:"caesar",name:"Caesar",gender:"man",vibe:"Decisive and direct",avatarFile:"/personas/caesar.webp"},{key:"joan",name:"Joan",gender:"woman",vibe:"Fearless optimist",avatarFile:"/personas/joan.webp"},{key:"leo",name:"Leo",gender:"man",vibe:"Inventive and curious",avatarFile:"/personas/leo.webp"},{key:"cleo",name:"Cleo",gender:"woman",vibe:"Charismatic strategist",avatarFile:"/personas/cleo.webp"},{key:"marilyn",name:"Marilyn",gender:"woman",vibe:"Warm and quick",avatarFile:"/personas/marilyn.webp"},{key:"socrates",name:"Socrates",gender:"man",vibe:"Asks the right questions",avatarFile:"/personas/socrates.webp"},{key:"owl",name:"Owl",gender:"woman",vibe:"Sees everything",avatarFile:"/personas/owl.webp"},{key:"duck",name:"Duck",gender:"man",vibe:"Cool under pressure",avatarFile:"/personas/duck.webp"},{key:"capy",name:"Capy",gender:"man",vibe:"Calm under anything",avatarFile:"/personas/capy.webp"},{key:"golden",name:"Golden",gender:"man",vibe:"Loyal and upbeat",avatarFile:"/personas/golden.webp"}],Ju=l.enum(J$.map(e=>e.key))});var q$=O(()=>{"use strict"});var Y$=O(()=>{"use strict"});function FC(e){return e.trim().toUpperCase().replace(/\s+/g," ")}function Zs(e){let t=FC(e);return t.length<=64&&VC.has(t)}var X$,VC,Q$=O(()=>{"use strict";X$=["[SILENT]","SILENT","NO_REPLY","NO REPLY","NO-OP","NOOP","NO_OP","NO OP","[NO-OP]","[NOOP]","[NO_OP]","[NO OP]","HEARTBEAT_OK"],VC=new Set(X$)});var eS=O(()=>{"use strict"});var tS=O(()=>{"use strict"});var rS=O(()=>{"use strict"});var nS=O(()=>{"use strict"});var an,Hs=O(()=>{"use strict";Oe();an=l.string().min(1).max(64).refine(e=>{try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(new Date(0)),!0}catch{return!1}},"Invalid IANA timezone")});var z0,iS,oS,aS,sS=O(()=>{"use strict";Oe();Vs();ru();qu();Hs();Ku();z0=l.string().min(1).max(50).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/),iS=l.object({orgId:l.string(),name:l.string().min(1).max(100),emoji:l.string().max(8).nullable().optional(),title:l.string().max(120).nullable().optional(),summary:l.string().max(500).nullable().optional(),handle:l.string().min(2).max(50).optional(),timezone:an.optional(),runtime:l.enum(["hermes"]).optional(),visibility:l.enum(["private","org","public"]).optional(),gender:oi.optional(),avatarPreset:Ju.optional(),avatarMediaId:l.string().optional()}).strict(),oS=l.object({name:l.string().min(1).max(100).optional(),handle:l.string().min(2).max(50).optional(),emoji:l.string().max(8).nullable().optional(),title:l.string().max(120).nullable().optional(),summary:l.string().max(500).nullable().optional(),email:l.string().email().nullable().optional(),website:l.string().url().nullable().optional(),avatarMediaId:l.string().nullable().optional(),coverMediaId:l.string().nullable().optional(),timezone:an.optional(),model:l.string().nullable().optional(),gender:oi.optional(),voiceKey:ji.nullable().optional(),billingTier:Qo.optional(),visibility:l.enum(["private","org","public"]).optional(),automationPrimaryChannel:z0.optional(),heartbeatEnabled:l.boolean().optional(),heartbeatBriefingTime:vn.nullable().optional(),heartbeatCheckinTime:vn.nullable().optional(),heartbeatCloseoutTime:vn.nullable().optional()}).strict(),aS=l.object({id:l.string(),label:l.string(),prompt:l.string()})});var N0,ea,Yu=O(()=>{"use strict";Oe();N0=["AGENT_BOOT_FAILED","AGENT_CREATE_FAILED","AGENT_DELETED","AGENT_DELETE_FAILED","AGENT_INACTIVE","AGENT_LIMIT","AGENT_NOT_FOUND","AGENT_NOT_DEPLOYED","AGENT_TOKENS_MISSING","AGENT_UNREACHABLE","AGENT_UPDATE_FAILED","AGENT_WAKE_TIMEOUT","ALREADY_MEMBER","ATTACHMENT_TYPE_UNSUPPORTED","AUTH_ACCOUNT_NOT_FOUND","AUTH_BOT_BLOCKED","AUTH_DISPOSABLE_EMAIL","AUTH_EMAIL_IN_USE","AUTH_INVALID","AUTH_INVALID_CODE","AUTH_INVALID_HANDOFF","AUTH_LOCKED_OUT","AUTH_MISSING","AUTH_PROVIDER_FAILED","AUTH_PROVIDER_NOT_CONFIGURED","AUTH_RATE_LIMITED","AUTH_REVOKED","AUTH_TURNSTILE_MISSING","AUTH_UNKNOWN","AUTH_WRONG_TYPE","AUTOMATION_CHANNEL_UNAVAILABLE","AUTOMATION_PURPOSE_REQUIRED","BOT_REPLY_FAILED","BILLING_BUDGET_REACHED","BILLING_DEMO_SPENT","BILLING_NO_PLAN","BILLING_PAST_DUE","BILLING_RUNAWAY_CAP","BILLING_SEAT_LIMIT","CHECKOUT_FAILED","CONFIRMATION_REQUIRED","CREATE_FAILED","CREDIT_LIMIT","DELETE_FAILED","DUPLICATE_INVITE","EMAIL_DELIVERY_FAILED","EMAIL_FAILED","EMAIL_MISMATCH","EMAIL_RATE_LIMITED","EMAIL_REASON_NOT_ELIGIBLE","EMPTY_STREAM","EMPTY_PATCH","ENV_VAR_CONFLICT","ENV_VAR_RESERVED","EXTENSION_INACTIVE","FORBIDDEN","HANDLE_TAKEN","IMAGE_GENERATION_FAILED","IMAGE_GENERATION_UNCONFIGURED","INTERNAL_ERROR","INVALID_FILE","INVALID_PRIMARY_CHANNEL","UNKNOWN_AUTOMATION_CHANNEL","INVITE_CONFLICT","INVITE_EXPIRED","INVITE_INVALID","MCP_NOT_AVAILABLE","MCP_NOT_CONFIGURED","MEDIA_NOT_FOUND","MEDIA_SERVER_UNAVAILABLE","MEDIA_UPLOAD_FAILED","MEMORY_NOT_FOUND","MISSING_IDEMPOTENCY_KEY","NETWORK_ERROR","NO_WORKSPACE","NOT_A_MEMBER","NOT_AUTHORIZED","NOT_FOUND","ORG_NOT_FOUND","OVERAGE_CAP","OWNER_LOCK","PAIRING_VERIFY_FAILED","PAYMENT_FAILED","PLAN_LIMIT","PROVISIONER_UNAVAILABLE","RATE_LIMIT","RATE_LIMITED","REBUILD_FAILED","RESTART_FAILED","SEND_FAILED","STOP_FAILED","STREAM_DISCONNECT","STREAM_TIMEOUT","STRIPE_LOAD","TIMEOUT","TOKEN_ERROR","TOOL_PROTOCOL","TRIAL_ENDED","TURN_ACTIVE","UPLOAD_FAILED","VALIDATION_ERROR","VOICE_UNAVAILABLE","WAKE_FAILED"],ea=l.enum(N0)});var C0,lS,cS=O(()=>{"use strict";Oe();Oo();Yu();C0=l.enum(["notFound","busy","rateLimited","timeout","invalidConfig","transient","fatal"]),lS=l.object({ok:l.literal(!1),error:l.string(),code:ea.optional(),issue:wn.optional(),providerErrorKind:C0.optional()})});var A0,Ks,O0,Xu=O(()=>{"use strict";Oe();A0=l.object({kind:l.enum(["icon","favicon","service"]),icon:l.string().min(1).optional(),domain:l.string().min(1).optional(),serviceKey:l.string().min(1).optional()}).strict(),Ks=l.object({activityId:l.string().min(1),turnId:l.string().min(1),status:l.enum(["started","completed","failed"]),label:l.string().trim().min(1),kind:l.enum(["search","file","image","service","automation","handoff","other"]),toolName:l.string().min(1).optional(),serviceKey:l.string().min(1).optional(),startedAt:l.string().datetime().optional(),endedAt:l.string().datetime().optional(),durationMs:l.number().int().nonnegative().optional(),note:l.string().trim().min(1).optional(),visual:A0.optional()}).strict(),O0=Ks.extend({status:l.enum(["completed","failed"])})});function mS(e,t){e.revisitAt&&e.disposition!=="deferred"&&t.addIssue({code:"custom",path:["revisitAt"],message:"revisitAt requires deferred disposition"})}function gS(e,t){let n=new Set;for(let i of e.participants){let r=`${i.type}:${i.id}`;n.has(r)&&t.addIssue({code:"custom",path:["participants"],message:"Duplicate conversation participant."}),n.add(r)}}var uS,D0,Ws,Qu,dS,pS,P0,fS,R0,ed,M0,hS,td,vS,bS,yS,rd=O(()=>{"use strict";Oe();xn();Xu();Hs();uS=Si,D0=l.object({kind:l.literal("inline"),offset:l.number().int().nonnegative()}),Ws=l.object({type:uS,src:l.url(),filename:l.string().min(1),mimeType:l.string().min(1),mediaId:l.string().min(1).optional(),size:l.number().int().nonnegative().optional(),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),duration:l.number().nonnegative().optional(),text:l.string().optional(),placement:D0.optional()}),Qu=l.object({ref:l.string().min(1).max(256)}).strict(),dS=l.enum(["handled","dismissed","deferred"]),pS=l.iso.datetime();P0=Qu.extend({disposition:dS.optional(),revisitAt:pS.optional()}).superRefine(mS),fS=Qu.extend({disposition:dS,revisitAt:pS.optional()}).superRefine(mS),R0=l.object({turnId:l.string().min(1).optional(),turnOutcome:l.enum(["failed","stopped"]).optional(),attachments:l.array(Ws).optional(),toolActivities:l.array(O0).optional(),issue:l.object({code:l.string(),bucket:l.enum(["account","error"]),actionLabel:l.string(),actionUrl:l.string(),help:l.string().optional()}).optional(),notification:l.object({push:l.boolean().optional(),excludeUserId:l.string().min(1).optional()}).optional(),automation:l.object({run:l.object({automationRunId:l.string(),sourceKind:l.enum(["webhook","schedule","heartbeat"]),sourceLabel:l.string().optional(),deliveryId:l.string().optional(),status:l.enum(["received","forwarded","owner_notified","needs_approval","completed","failed","dropped"])}).catchall(l.unknown())}).catchall(l.unknown()).optional(),voiceDelegated:l.literal(!0).optional(),ownerHandoff:l.literal(!0).optional(),attention:l.array(P0).max(20).optional()}).catchall(l.unknown()),ed=l.object({messageId:l.string().min(1),conversationId:l.string().min(1),role:l.enum(["user","assistant","system"]),authorParticipantId:l.string().nullable(),systemKind:l.string().nullable(),content:l.string(),sequence:l.string().min(1),clientNonce:l.string().nullable().optional(),metadata:R0.nullable().optional(),status:l.string().nullable().optional(),createdAt:l.string(),updatedAt:l.string()}),M0=l.object({type:uS,mediaId:l.string().min(1).optional(),url:l.url().optional(),name:l.string().min(1).optional(),mimeType:l.string().min(1).optional(),duration:l.number().nonnegative().optional()}).superRefine((e,t)=>{if(!e.mediaId)for(let n of["url","name","mimeType"])e[n]||t.addIssue({code:"custom",path:[n],message:`${n} is required when mediaId is absent`})}),hS=l.object({conversationId:l.string().min(1),content:l.string().max(1e4).default(""),clientNonce:l.string().max(64).optional(),attachments:l.array(M0).max(10).optional(),channel:l.enum(["ios","dashboard"]).optional(),actionUrls:l.object({billing:l.string().max(500),agent:l.string().max(500)}).optional(),viewerTimezone:an.optional()}).refine(e=>e.content.trim().length>0||(e.attachments?.length??0)>0,{path:["content"],message:"Message or attachment required"}),td=l.object({type:l.enum(["user","agent"]),id:l.string().min(1)}).strict();vS=l.object({orgId:l.string().min(1),participants:l.array(td).min(1).max(20)}).strict().superRefine(gS),bS=l.object({orgId:l.string().min(1),participants:l.array(td).min(1).max(20)}).strict().superRefine((e,t)=>{gS(e,t),e.participants.some(n=>n.type==="agent")||t.addIssue({code:"custom",path:["participants"],message:"New sessions require at least one agent participant."})}),yS=l.object({category:l.string().min(1).max(30).optional(),reason:l.string().max(2e3).optional()}).strict()});var U0,j0,xS,wS,kS=O(()=>{"use strict";Oe();rd();U0=l.enum(["1:1","4:3","3:4","16:9","9:16"]),j0=l.enum(["1K","2K","4K"]),xS=l.object({prompt:l.string().trim().min(1).max(4e3),aspectRatio:U0.default("1:1"),outputFormat:l.enum(["png","jpeg","webp"]).default("webp"),resolution:j0.default("2K"),style:l.string().trim().max(200).optional(),altText:l.string().trim().max(500).optional(),referenceMediaIds:l.array(l.string().min(1)).max(4).optional()}).strict(),wS=l.object({mediaId:l.string().min(1),src:l.url(),filename:l.string().min(1),mimeType:l.string().min(1),width:l.number().int().positive().optional(),height:l.number().int().positive().optional(),provider:l.string().min(1).optional(),providerRequestId:l.string().min(1).optional(),media:l.string().startsWith("MEDIA:"),attachment:Ws.extend({type:l.literal("image")})})});var _S,L0,$S,SS,V0,ES,IS,F0,TS,zS=O(()=>{"use strict";Oe();lv();_S=l.object({identityToken:l.string().min(1),fullName:l.string().optional()}),L0=l.object({redirect:l.string(),redirectReason:l.string(),isNew:l.boolean(),deviceId:l.string()}),$S=l.object({ok:l.literal(!0),data:L0,token:l.string()}),SS=l.object({path:l.string().startsWith("/","path must be a relative dashboard path").refine(sv,"path must be a relative dashboard path")}),V0=l.object({url:l.string()}),ES=l.object({ok:l.literal(!0),data:V0}),IS=l.object({token:l.string().min(1)}),F0=l.object({redirect:l.string(),redirectReason:l.string(),deviceId:l.string()}),TS=l.object({ok:l.literal(!0),data:F0,token:l.string()})});var B0,Z0,H0,K0,BC,NS,W0,CS,AS,OS,DS,PS=O(()=>{"use strict";Oe();Vs();B0=l.enum(["none","active_assistant"]),Z0=l.enum(["none","active","trial","canceling","past_due","paused"]),H0=l.object({brand:l.string(),last4:l.string(),expMonth:l.number(),expYear:l.number()}),K0=l.object({date:l.string(),amount:l.number(),status:l.string(),invoicePdf:l.string().optional()}),BC=l.object({graceEndsAt:l.string().optional(),suspended:l.boolean(),url:l.string().optional()}),NS=l.object({plan:B0,status:Z0,price:l.number(),tierRates:l.record(l.string(),l.number()).optional(),maxAgents:l.number(),activeAgents:l.number(),workspaceTier:Qo.optional(),upcomingAmountDue:l.number().optional(),upcomingDueDate:l.string().optional(),nextBillDate:l.string().optional(),cancelAtPeriodEnd:l.boolean().optional(),cancelAt:l.string().optional(),trialEnd:l.string().optional(),trialDaysRemaining:l.number().optional(),paymentMethod:H0.optional(),paymentRecovery:BC.optional(),invoices:l.array(K0),stripeError:l.string().optional()}),W0=l.enum(["demo_agent_exists","demo_usage_exhausted","subscription_required","plan_limit"]),CS=l.object({canCreate:l.boolean(),activeAgents:l.number().int().nonnegative(),agentLimit:l.number().int().nonnegative(),isDemo:l.boolean(),reason:W0.optional()}),AS=l.object({orgId:l.string(),agentName:l.string().optional(),runtime:l.string().optional()}),OS=l.object({created:l.number(),skipped:l.number(),errors:l.array(l.string())}),DS=l.object({updated:l.number(),errors:l.array(l.string())})});function Gs(e){return{code:e.code,error:e.message,...e.bucket?{bucket:e.bucket}:{},...e.actionLabel?{actionLabel:e.actionLabel}:{},...e.actionUrl?{actionUrl:e.actionUrl}:{},...e.help?{help:e.help}:{}}}function Js(e){if(e.event==="message"&&e.data.message.role==="user")return e.data.message.messageId}function q0(e){if(e.event==="message_delta"||e.event==="working_state"||e.event==="tool_activity"||e.event==="working_end"||e.event==="stream_end")return e.data.turnId;if(e.event==="message"){let t=e.data.message.metadata?.turnId;return typeof t=="string"?t:void 0}}function nd(e,t){if(e.event==="status"||e.event==="error"||Js(e))return!0;let n=q0(e);return t?n?n===t:e.event==="message":!1}var G0,J0,ta,Y0=O(()=>{"use strict";Oe();rd();Xu();Yu();Jn();G0=cu,J0=l.object({code:ea,message:l.string(),bucket:l.enum(["account","error"]).optional(),actionLabel:l.string().optional(),actionUrl:l.string().optional(),help:l.string().optional()});ta=l.discriminatedUnion("event",[l.object({event:l.literal("status"),data:G0}),l.object({event:l.literal("message"),data:l.object({message:ed})}),l.object({event:l.literal("message_delta"),data:l.object({delta:l.string(),turnId:l.string(),messageId:l.string().optional(),role:l.enum(["assistant","system"]).optional()})}),l.object({event:l.literal("working_state"),data:l.object({description:l.string(),turnId:l.string().optional()})}),l.object({event:l.literal("tool_activity"),data:Ks}),l.object({event:l.literal("working_end"),data:l.object({turnId:l.string().optional()}).strict()}),l.object({event:l.literal("stream_end"),data:l.object({turnId:l.string().optional()}).strict()}),l.object({event:l.literal("error"),data:J0})])});async function id(e){let t=e.fetchFn??fetch,n=e.headers??{},i=!1,r=!1,o=!1,a=!1,s,c=!1,u=!1,d,p=new AbortController,m=!1,f,S=()=>{},z=new Promise($=>{S=$}),T=$=>{m||(m=!0,f&&clearTimeout(f),S($))},L=($,B)=>{o=!0,e.onTransportError({stage:$,message:B})},j=()=>{d?.cancel().catch(()=>{})};f=setTimeout(()=>{u=!0,L("stream-open","Timed out opening stream"),p.abort(),T("failed")},e.streamOpenTimeoutMs??1e4);let D=(async()=>{try{let $=await t(e.streamUrl,{headers:n,signal:p.signal});if(!$.ok){o=!0,T("failed"),e.onTransportError({stage:"stream-open",message:await ZC($)});return}if(d=$.body?.getReader(),!d){L("stream-open","No response stream"),T("failed");return}T("ready");for await(let B of X0(d))if(s||(s=Js(B)),!(i&&!nd(B,s))){if(B.event==="status")e.onLiveStatus?.(B.data);else if(B.event==="working_state")i&&e.onStatus?.(B.data.description);else if(B.event==="tool_activity")i&&e.onToolActivity?.(B.data);else if(B.event==="working_end")i&&e.onWorkingEnd?.();else if(B.event==="message_delta")i&&e.onDelta(B.data.delta,B.data.role);else if(B.event==="error"){o=!0,e.onChatError(B.data);break}else if(B.event==="message"&&(B.data.message.role==="assistant"||B.data.message.role==="system")){if(!i)continue;a||(a=!0,e.onMessage?.(B.data.message))}else if(B.event==="stream_end")break}!o&&a?e.onDone():!o&&i&&!r&&L("no-reply","Stream ended before reply arrived")}catch($){!r&&!u&&(T("failed"),L("stream-read",$ instanceof Error?$.message:"Stream failed"))}finally{c=!0;try{await d?.cancel()}catch{}}})();if(await z==="failed"){await D;return}if(c){L("stream-open","Stream closed before send"),await D;return}try{i=!0;let $=await t(e.sendUrl,{method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify(e.sendBody)}),B=await $.json();if(!B.ok){r=!0,p.abort(),j(),o=!0,e.onTransportError({stage:"api",message:B.error||`Send failed: HTTP ${$.status}`,...B.code?{code:B.code}:{}}),await D;return}s=B.data.messageId,e.onUserMessage?.(B.data)}catch($){r=!0,p.abort(),j(),L("api",$ instanceof Error?$.message:"Send failed"),await D;return}await D}async function ZC(e){let t="";try{let n=await e.text();n&&(t=` - ${n.slice(0,200)}`)}catch{}return`HTTP ${e.status}${t}`}async function*X0(e){let t=new TextDecoder,n="";for(;;){let{done:i,value:r}=await e.read();if(i)break;n+=t.decode(r,{stream:!0});let o=n.indexOf(`
89
89
 
90
90
  `);for(;o!==-1;){let a=n.slice(0,o);n=n.slice(o+2);let s=HC(a);s&&(yield s),o=n.indexOf(`
91
91
 
@@ -98,9 +98,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
98
98
 
99
99
  `);for(;p!==-1;){let m=c.slice(0,p);c=c.slice(p+2);let f=KA(m);if(f){if(f.event==="working_state")e.onStatus?.(f.data.description);else if(f.event==="tool_activity")e.onToolActivity?.(f.data);else if(f.event==="working_end")e.onWorkingEnd?.();else if(f.event==="message_delta")e.onDelta(f.data.delta,f.data.role);else if(f.event==="error"){i=!0,e.onError(Gs(f.data));break e}else if(f.event==="message"&&(f.data.message.role==="assistant"||f.data.message.role==="system")){r=!0;let S=NE(f.data.message);S&&e.onMessage?.(S)}else if(f.event==="stream_end")break e}p=c.indexOf(`
100
100
 
101
- `)}}!i&&r?e.onDone(n):i||e.onError("[no-reply] Stream ended before reply arrived")}catch(a){e.onError(a instanceof Error?a.message:"Stream failed")}finally{try{await o?.cancel()}catch{}}}async chatStreamAuthenticated(e){let t=Er(this.ctx.apiBase,this.ctx.isDev),n=this.ctx.token.value?{Authorization:`Bearer ${this.ctx.token.value}`}:{},i,r=null;try{let c=await fetch(`${t}/api/conversations`,{method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify({agentId:e.agentId})}),u=await c.json();if(!u.ok){e.onError(u.error||`Conversation failed: HTTP ${c.status}`);return}i=u.data.conversationId,r=u.data.latestSequence??null}catch(c){e.onError(c instanceof Error?c.message:"Conversation failed");return}let o=r?`${t}/api/conversations/${encodeURIComponent(i)}/stream?since=${encodeURIComponent(r)}`:`${t}/api/conversations/${encodeURIComponent(i)}/stream`,a=`nonce_${ov(16)}`,s=GA();await id({streamUrl:o,sendUrl:`${t}/api/messages`,headers:n,sendBody:{conversationId:i,content:e.message,clientNonce:a,...s?{viewerTimezone:s}:{},...e.attachments&&e.attachments.length>0?{attachments:e.attachments}:{}},onStatus:e.onStatus,onDelta:e.onDelta,onToolActivity:e.onToolActivity,onWorkingEnd:e.onWorkingEnd,onMessage:c=>{let u=NE(c);u&&e.onMessage?.(u)},onDone:()=>e.onDone(i),onChatError:c=>e.onError(Gs(c)),onTransportError:c=>e.onError(c.code?{code:c.code,error:c.message}:WA(c))})}},qA=class{constructor(e){Z(this,"ctx",void 0),this.ctx=e}async getPublicAgent(e){this.ctx.loading.value=!0,this.ctx.error.value=null;try{let t=await(await this.ctx.apiFetch(`/api/agents/public/${encodeURIComponent(e.handle)}`)).json();if(!t.ok){this.ctx.error.value=t.error,this.ctx.logger.error("Failed to fetch public agent",{handle:e.handle,error:t.error});return}return t.data}catch(t){this.ctx.logger.error("Get public agent error",{handle:e.handle,error:t}),this.ctx.error.value=t instanceof Error?t.message:"Failed to fetch agent";return}finally{this.ctx.loading.value=!1}}async getAgentByEmail(e){this.ctx.loading.value=!0,this.ctx.error.value=null;try{let t=await(await this.ctx.apiFetch(`/api/agents/by-email/${encodeURIComponent(e.email)}`)).json();if(!t.ok){this.ctx.error.value=t.error,this.ctx.logger.error("Failed to fetch agent by email",{email:e.email,error:t.error});return}return t.data}catch(t){this.ctx.logger.error("Get agent by email error",{email:e.email,error:t}),this.ctx.error.value=t instanceof Error?t.message:"Failed to fetch agent";return}finally{this.ctx.loading.value=!1}}generateAnonId(){let e="pagelinesAnonId",t=this.ctx.storage.getItem(e);return t||(t=is({prefix:"anon"}),this.ctx.storage.setItem(e,t)),t}track(e){try{typeof window<"u"&&window.parent!==window&&window.parent.postMessage({type:"pagelines_track",event:e.event,agentId:e.agentId,properties:e.properties||{}},"*"),this.ctx.logger.info("SDK event tracked",{event:e.event,agentId:e.agentId})}catch(t){this.ctx.logger.error("Track event error",{error:t,args:e})}}},YA=class{constructor(){Z(this,"key","__PAGELINES_SDK__")}get(){if(!(typeof window>"u"))return globalThis[this.key]}set(e){typeof window<"u"&&(globalThis[this.key]=e)}delete(){typeof window<"u"&&delete globalThis[this.key]}},hd=new YA,Qs=class CE extends Hr{static getInstance(t={}){return hd.get()||new CE(t)}get isDev(){return this.settings.isDev??(typeof window<"u"?window.location.hostname==="localhost"||window.location.hostname.includes("127.0.0.1"):!1)}constructor(t={}){let n=hd.get();if(n)return console.debug("[PageLinesSDK] Returning existing singleton instance"),n;super("PageLinesSDK",t),Z(this,"activeUser",G()),Z(this,"token",G(null)),Z(this,"deviceId",G(null)),Z(this,"loading",G(!1)),Z(this,"error",G(null)),Z(this,"apiBase",this.settings.apiBase||void 0),Z(this,"storage",new FA),Z(this,"sessionId",is({prefix:"ses"})),Z(this,"currentAgent",N(()=>{let r=this.activeUser.value;if(!r?.agents)return;let o=r.primaryAgentId||r.agents[0]?.agentId;if(o)return r.agents.find(a=>a.agentId===o)})),Z(this,"currentOrg",N(()=>{let r=this.currentAgent.value;if(!r?.orgId)return;let o=this.activeUser.value;if(o?.orgs)return o.orgs.find(a=>a.orgId===r.orgId)})),Z(this,"initialized",void 0),Z(this,"resolveUser",void 0),Z(this,"agent",void 0),Z(this,"auth",void 0),Z(this,"billing",void 0),Z(this,"chat",void 0),Z(this,"user",void 0),hd.set(this);let i={apiFetch:MA({isDev:this.isDev,apiBase:this.apiBase},this.processApiResponse.bind(this),()=>this.clearSession()),apiBase:this.apiBase,isDev:this.isDev,activeUser:this.activeUser,token:this.token,loading:this.loading,error:this.error,currentAgent:this.currentAgent,storage:this.storage,sessionId:this.sessionId,logger:this.logger,processApiResponse:this.processApiResponse.bind(this)};this.agent=new BA(i),this.auth=new ZA(i),this.billing=new HA(i),this.chat=new JA(i),this.user=new qA(i),this.logger.info("PageLinesSDK initialized"),this.storage.loadFromStorage(this.authRefs()),this.storage.syncWithGlobalStores(this.authRefs()),this.initialized=new Promise(r=>{this.resolveUser=r}),this.token.value&&!this.activeUser.value?this.auth.getCurrentUser().then(r=>{this.resolveUser&&(this.resolveUser(r),this.resolveUser=void 0)}).catch(r=>{this.logger.error("Auto user fetch failed",{data:r}),this.resolveUser&&(this.resolveUser(void 0),this.resolveUser=void 0)}):this.activeUser.value?this.resolveUser?.(this.activeUser.value):this.resolveUser?.(void 0)}processApiResponse(t){if(!t.ok)return;let n=!1;t.user&&(this.activeUser.value=t.user,this.logger.info("User updated from API response",{data:t.user}),n=!0),t.token&&(this.token.value=t.token,this.logger.info("Token updated from API response"),n=!0);let i=t.data?.deviceId;i&&(this.deviceId.value=i,n=!0),n&&this.persistAuth(),this.resolveUser&&(this.resolveUser(t.user),this.resolveUser=void 0)}authRefs(){return{activeUser:this.activeUser,token:this.token,deviceId:this.deviceId}}persistAuth(){this.storage.saveToStorage(this.authRefs())}clearSession(){this.logger.info("Clearing session"),this.activeUser.value=void 0,this.token.value=null,this.deviceId.value=null,this.error.value=null,this.storage.clearStorage()}clear(){this.logger.info("Clearing SDK completely"),this.clearSession(),this.loading.value=!1,this.sessionId=is({prefix:"ses"}),hd.delete()}}});function eO(e){let t=Math.max(0,Math.floor(e.ms/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,"0")}`}function tO(e){return e.mimeType.includes("mp4")||e.mimeType.includes("m4a")?"m4a":e.mimeType.includes("ogg")?"ogg":e.mimeType.includes("wav")?"wav":"webm"}function rO(){return typeof MediaRecorder>"u"?"":["audio/webm;codecs=opus","audio/mp4","audio/webm"].find(e=>MediaRecorder.isTypeSupported?.(e))||""}function oO(e){return e.turnOutcome==="failed"?"failed":e.turnOutcome==="stopped"?"stopped":e.sender==="system"?"failed":"completed"}function _d(e){if(!e)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function ua(e){return _d(e.endedAt)??_d(e.startedAt)??0}function wb(e,t){return ua(e)-ua(t)}function il(e,t){let n=e.filter(r=>r.status==="completed"||r.status==="failed"&&!!r.note).filter(r=>!t.has(r.activityId)).slice().sort(wb),i=[];for(let r of n){let o=r.status==="completed"?"done":"failed",a=i[i.length-1];if(o==="done"&&a?.tone==="done"&&a.label===r.label&&ua(r)-a.lastMs<=aO){a.count+=1,a.lastMs=ua(r);continue}i.push({id:r.activityId,tone:o,label:r.label,note:r.note,count:1,lastMs:ua(r)})}return i.map(r=>({id:r.id,tone:r.tone,label:r.count>1?`${r.label} \xB7 ${r.count}`:r.label,...r.note?{note:r.note}:{}}))}function wd(e){return e.length<=db?{visibleRows:e,hiddenRows:[]}:{visibleRows:e.slice(e.length-db),hiddenRows:e.slice(0,e.length-db)}}function kb(e){let{activities:t,outcome:n,nowMs:i,canNotifyOnCompletion:r,lastVisibleProgressAtMs:o,includeFailureNote:a=!0}=e;if(n==="completed")return{outcome:n,visibleRows:[],hiddenRows:il(t,new Set),terminal:{id:"work-complete",tone:"completed",label:ci.completed}};if(n==="failed"){let D=t.filter(se=>se.status==="failed").sort(wb).pop(),U=new Set;D&&U.add(D.activityId);let{visibleRows:$,hiddenRows:F}=wd(il(t,U));return{outcome:n,visibleRows:$,hiddenRows:F,terminal:{id:"work-failed",tone:"failed",label:ci.failed,...a&&D?.note?{note:D.note}:{}}}}if(n==="stopped"){let{visibleRows:D,hiddenRows:U}=wd(il(t,new Set));return{outcome:n,visibleRows:D,hiddenRows:U,terminal:{id:"work-stopped",tone:"stopped",label:ci.stopped}}}let{visibleRows:s,hiddenRows:c}=wd(il(t,new Set)),u=t.filter(D=>D.status==="started").sort(wb).pop(),d=t.reduce((D,U)=>Math.max(D,ua(U)),o??-1/0),p=Number.isFinite(d)?d:i,m=t.reduce((D,U)=>{let $=_d(U.startedAt)??_d(U.endedAt);return $===void 0?D:Math.min(D,$)},1/0),f=p+s2,S=(Number.isFinite(m)?m:p)+sO,z=i>=f,T=u||z?{id:u?.activityId??"work-active",tone:"active",label:u?.label??ci.finishing}:void 0,L=z?i>=S?r?ci.notifyHint:ci.leaveHint:ci.slowHint:void 0,j=[f,S].filter(D=>D>i).sort((D,U)=>D-U)[0];return{outcome:n,visibleRows:s,hiddenRows:c,...T?{terminal:T}:{},...L?{hint:L}:{},...j===void 0?{}:{nextBoundaryAtMs:j}}}function lO(e){let{segments:t,activities:n,nowMs:i,canNotifyOnCompletion:r,lastVisibleProgressAtMs:o}=e,a=new Map(n.map(f=>[f.activityId,f])),s=f=>kb({activities:f,outcome:"running",nowMs:i,canNotifyOnCompletion:r,...o===void 0?{}:{lastVisibleProgressAtMs:o}}),c=f=>{let{visibleRows:S,hiddenRows:z}=wd(il(f,new Set));if(!(S.length===0&&z.length===0))return{outcome:"running",visibleRows:S,hiddenRows:z}},u=[],d=new Set(t.flatMap(f=>f.kind==="work"?f.activityIds:[])),p=c(n.filter(f=>!d.has(f.activityId)));p&&u.push({kind:"work",id:"work-unsegmented",journal:p}),t.forEach((f,S)=>{if(f.kind==="text"){f.content&&u.push({kind:"text",id:`text-${S}`,content:f.content});return}let z=f.activityIds.map(L=>a.get(L)).filter(L=>L!==void 0);if(z.length===0)return;let T=c(z);T&&u.push({kind:"work",id:`work-${f.activityIds[0]??S}`,journal:T})});let m=s(n);return m.terminal||m.hint?u.push({kind:"work",id:"work-tail",journal:{outcome:"running",visibleRows:[],hiddenRows:[],...m.terminal?{terminal:m.terminal}:{},...m.hint?{hint:m.hint}:{},...m.nextBoundaryAtMs===void 0?{}:{nextBoundaryAtMs:m.nextBoundaryAtMs}}}):u.push({kind:"loading",id:"work-tail"}),u}function dO(e){if(!(e.bucket!==void 0||cO.has(e.code)))return{surface:"hard"};let t=e.bucket??(l2.has(e.code)?"account":"error"),n={...e.actionLabel?{actionLabel:e.actionLabel}:{},...e.actionUrl?{actionUrl:e.actionUrl}:{},...e.help?{help:e.help}:{}};return t==="account"?{surface:"transcript",issue:{code:e.code,bucket:t,...n},sendBlockedReason:"account"}:c2.has(e.code)?{surface:"transcript",issue:{code:e.code,bucket:t,...n},sendBlockedReason:"agent_deleted"}:{surface:"transient",issue:{code:e.code,message:e.error,...n}}}function pO(e){let t=uO[e.code];return t?gv[t].oneLine:e.error}function vd(e){if(!e)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function mO(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getUserMedia&&typeof RTCPeerConnection<"u"}function AE(e){return e?typeof e=="string"?e:e.src||"":""}function da(e){return AE(e.cover)||AE(e.avatar)||Ui(e.name)}function sl(e){let t=e.target;t.dataset.fallbackUsed||(t.dataset.fallbackUsed="true",t.src=Ui())}function u2(e){let{template:t,agent:n}=e;return t.replace(/{name}/g,n.name||"Assistant").replace(/{title}/g,n.title||"").replace(/{handle}/g,n.handle||"").replace(/{orgName}/g,n.org?.name||"")}function OE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function DO(e){if(Array.isArray(e))return e}function PO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,r,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}function RO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
102
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MO(e,t){return DO(e)||PO(e,t)||UO(e,t)||RO()}function UO(e,t){if(e){if(typeof e=="string")return OE(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?OE(e,t):void 0}}function $t(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return $b(e,t,n)}}function WO(e){return function(){return Sb(e,[...arguments])}}function Me(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ol;if(DE&&DE(e,null),!ui(t))return e;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=n(r);o!==r&&(jO(t)||(t[i]=o),r=o)}e[r]=!0}return e}function GO(e){for(let t=0;t<e.length;t++)Ct(e,t)||(e[t]=null);return e}function tr(e){let t=la(null);for(let i of d2(e)){var n=MO(i,2);let r=n[0],o=n[1];Ct(e,r)&&(ui(o)?t[r]=GO(o):o&&typeof o=="object"&&o.constructor===Object?t[r]=tr(o):t[r]=o)}return t}function JO(e){switch(typeof e){case"string":return e;case"number":return HO(e);case"boolean":return KO(e);case"bigint":return UE?UE(e):"0";case"symbol":return jE?jE(e):"Symbol()";case"undefined":return tl(e);case"function":case"object":{if(e===null)return tl(e);let t=e,n=ln(t,"toString");if(typeof n=="function"){let i=n(t);return typeof i=="string"?i:tl(i)}return tl(e)}default:return tl(e)}}function ln(e,t){for(;e!==null;){let i=VO(e,t);if(i){if(i.get)return $t(i.get);if(typeof i.value=="function")return $t(i.value)}e=LO(e)}function n(){return null}return n}function qO(e){try{return Nt(e,""),!0}catch{return!1}}function m2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u3(),t=le=>m2(le);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==hr.document||!e.Element)return t.isSupported=!1,t;let n=e.document,i=n,r=i.currentScript;e.DocumentFragment;let o=e.HTMLTemplateElement,a=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,d=e.trustedTypes,p=s.prototype,m=ln(p,"cloneNode"),f=ln(p,"remove"),S=ln(p,"nextSibling"),z=ln(p,"childNodes"),T=ln(p,"parentNode"),L=ln(p,"shadowRoot"),j=ln(p,"attributes"),D=a&&a.prototype?ln(a.prototype,"nodeType"):null,U=a&&a.prototype?ln(a.prototype,"nodeName"):null;if(typeof o=="function"){let le=n.createElement("template");le.content&&le.content.ownerDocument&&(n=le.content.ownerDocument)}let $,F="",se,he=!1,te=0,W=function(){if(te>0)throw Vi('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},de=function(g){W(),te++;try{return $.createHTML(g)}finally{te--}},ie=function(g){W(),te++;try{return $.createScriptURL(g)}finally{te--}},ye=function(){return he||(se=d3(d,r),he=!0),se},Be=n,mt=Be.implementation,ft=Be.createNodeIterator,je=Be.createDocumentFragment,De=Be.getElementsByTagName,Tt=i.importNode,Ze=WE();t.isSupported=typeof d2=="function"&&typeof T=="function"&&mt&&mt.createHTMLDocument!==void 0;let gr=QO,ht=e3,vt=t3,Tr=r3,wt=n3,On=i3,kt=o3,At=s3,Bt=ZE,Ge=null,Zt=Me({},[...LE,...fb,...hb,...gb,...VE]),He=null,jr=Me({},[...FE,...vb,...BE,...bd]),h=Object.seal(la(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),k=null,M=null,H=Object.seal(la(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),w=!0,_=!0,b=!1,C=!0,I=!1,A=!0,oe=!1,re=!1,ue=null,fe=null,_e=!1,Te=!1,ae=!1,Ke=!1,Xe=!0,St=!1,gt="user-content-",rr=!0,vr=!1,pt={},ct=null,Dn=Me({},"annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")),di=null,dl=Me({},["audio","video","img","source","image","track"]),Gi=null,Pn=Me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),br="http://www.w3.org/1998/Math/MathML",pn="http://www.w3.org/2000/svg",yr="http://www.w3.org/1999/xhtml",Rn=yr,ga=!1,va=null,Md=Me({},[br,pn,yr],mb),ba=Ut(["mi","mo","mn","ms","mtext"]),Ji=Me({},ba),K=Ut(["annotation-xml"]),B=Me({},K),ee=Me({},["title","style","font","a","script"]),Je=null,ke=["application/xhtml+xml","text/html"],$e=null,cr=null,M2=n.createElement("form"),Fb=function(g){return g instanceof RegExp||g instanceof Function},Ud=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(cr&&cr===g)return;(!g||typeof g!="object")&&(g={}),g=tr(g),Je=ke.indexOf(g.PARSER_MEDIA_TYPE)===-1?"text/html":g.PARSER_MEDIA_TYPE,$e=Je==="application/xhtml+xml"?mb:ol,Ge=si(g,"ALLOWED_TAGS",Zt,{transform:$e}),He=si(g,"ALLOWED_ATTR",jr,{transform:$e}),va=si(g,"ALLOWED_NAMESPACES",Md,{transform:mb}),Gi=si(g,"ADD_URI_SAFE_ATTR",Pn,{transform:$e,base:Pn}),di=si(g,"ADD_DATA_URI_TAGS",dl,{transform:$e,base:dl}),ct=si(g,"FORBID_CONTENTS",Dn,{transform:$e}),k=si(g,"FORBID_TAGS",tr({}),{transform:$e}),M=si(g,"FORBID_ATTR",tr({}),{transform:$e}),pt=Ct(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?tr(g.USE_PROFILES):g.USE_PROFILES:!1,w=g.ALLOW_ARIA_ATTR!==!1,_=g.ALLOW_DATA_ATTR!==!1,b=g.ALLOW_UNKNOWN_PROTOCOLS||!1,C=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,I=g.SAFE_FOR_TEMPLATES||!1,A=g.SAFE_FOR_XML!==!1,oe=g.WHOLE_DOCUMENT||!1,Te=g.RETURN_DOM||!1,ae=g.RETURN_DOM_FRAGMENT||!1,Ke=g.RETURN_TRUSTED_TYPE||!1,_e=g.FORCE_BODY||!1,Xe=g.SANITIZE_DOM!==!1,St=g.SANITIZE_NAMED_PROPS||!1,rr=g.KEEP_CONTENT!==!1,vr=g.IN_PLACE||!1,Bt=qO(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:ZE,Rn=typeof g.NAMESPACE=="string"?g.NAMESPACE:yr,Ji=Ct(g,"MATHML_TEXT_INTEGRATION_POINTS")&&g.MATHML_TEXT_INTEGRATION_POINTS&&typeof g.MATHML_TEXT_INTEGRATION_POINTS=="object"?tr(g.MATHML_TEXT_INTEGRATION_POINTS):Me({},ba),B=Ct(g,"HTML_INTEGRATION_POINTS")&&g.HTML_INTEGRATION_POINTS&&typeof g.HTML_INTEGRATION_POINTS=="object"?tr(g.HTML_INTEGRATION_POINTS):Me({},K);let R=Ct(g,"CUSTOM_ELEMENT_HANDLING")&&g.CUSTOM_ELEMENT_HANDLING&&typeof g.CUSTOM_ELEMENT_HANDLING=="object"?tr(g.CUSTOM_ELEMENT_HANDLING):la(null);if(h=la(null),Ct(R,"tagNameCheck")&&Fb(R.tagNameCheck)&&(h.tagNameCheck=R.tagNameCheck),Ct(R,"attributeNameCheck")&&Fb(R.attributeNameCheck)&&(h.attributeNameCheck=R.attributeNameCheck),Ct(R,"allowCustomizedBuiltInElements")&&typeof R.allowCustomizedBuiltInElements=="boolean"&&(h.allowCustomizedBuiltInElements=R.allowCustomizedBuiltInElements),jt(h),I&&(_=!1),ae&&(Te=!0),pt&&(Ge=Me({},VE),He=la(null),pt.html===!0&&(Me(Ge,LE),Me(He,FE)),pt.svg===!0&&(Me(Ge,fb),Me(He,vb),Me(He,bd)),pt.svgFilters===!0&&(Me(Ge,hb),Me(He,vb),Me(He,bd)),pt.mathMl===!0&&(Me(Ge,gb),Me(He,BE),Me(He,bd))),H.tagCheck=null,H.attributeCheck=null,Ct(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?H.tagCheck=g.ADD_TAGS:ui(g.ADD_TAGS)&&(Ge===Zt&&(Ge=tr(Ge)),Me(Ge,g.ADD_TAGS,$e))),Ct(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?H.attributeCheck=g.ADD_ATTR:ui(g.ADD_ATTR)&&(He===jr&&(He=tr(He)),Me(He,g.ADD_ATTR,$e))),Ct(g,"ADD_URI_SAFE_ATTR")&&ui(g.ADD_URI_SAFE_ATTR)&&Me(Gi,g.ADD_URI_SAFE_ATTR,$e),Ct(g,"FORBID_CONTENTS")&&ui(g.FORBID_CONTENTS)&&(ct===Dn&&(ct=tr(ct)),Me(ct,g.FORBID_CONTENTS,$e)),Ct(g,"ADD_FORBID_CONTENTS")&&ui(g.ADD_FORBID_CONTENTS)&&(ct===Dn&&(ct=tr(ct)),Me(ct,g.ADD_FORBID_CONTENTS,$e)),rr&&(Ge["#text"]=!0),oe&&Me(Ge,["html","head","body"]),Ge.table&&(Me(Ge,["tbody"]),delete k.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let X=$;$=g.TRUSTED_TYPES_POLICY;try{F=de("")}catch(me){throw $=X,me}}else g.TRUSTED_TYPES_POLICY===null?($=void 0,F=""):($===void 0&&($=ye()),$&&typeof F=="string"&&(F=de("")));Ut&&Ut(g),cr=g},Bb=Me({},[...fb,...hb,...YO]),Zb=Me({},[...gb,...XO]),U2=function(g,R,X){return R.namespaceURI===yr?g==="svg":R.namespaceURI===br?g==="svg"&&(X==="annotation-xml"||Ji[X]):!!Bb[g]},j2=function(g,R,X){return R.namespaceURI===yr?g==="math":R.namespaceURI===pn?g==="math"&&B[X]:!!Zb[g]},L2=function(g,R,X){return R.namespaceURI===pn&&!B[X]||R.namespaceURI===br&&!Ji[X]?!1:!Zb[g]&&(ee[g]||!Bb[g])},V2=function(g){let R=T(g);(!R||!R.tagName)&&(R={namespaceURI:Rn,tagName:"template"});let X=ol(g.tagName),me=ol(R.tagName);return va[g.namespaceURI]?g.namespaceURI===pn?U2(X,R,me):g.namespaceURI===br?j2(X,R,me):g.namespaceURI===yr?L2(X,R,me):!!(Je==="application/xhtml+xml"&&va[g.namespaceURI]):!1},pi=function(g){aa(t.removed,{element:g});try{T(g).removeChild(g)}catch{if(f(g),!T(g))throw Vi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pl=function(g){jd(g);let R=z(g);if(R){let me=[];oa(R,Ne=>{aa(me,Ne)}),oa(me,Ne=>{try{f(Ne)}catch{}})}let X=j(g);if(X)for(let me=X.length-1;me>=0;--me){let Ne=X[me],Re=Ne&&Ne.name;if(typeof Re=="string")try{g.removeAttribute(Re)}catch{}}},mi=function(g,R){try{aa(t.removed,{attribute:R.getAttributeNode(g),from:R})}catch{aa(t.removed,{attribute:null,from:R})}if(R.removeAttribute(g),g==="is")if(Te||ae)try{pi(R)}catch{}else try{R.setAttribute(g,"")}catch{}},F2=function(g){let R=j(g);if(R)for(let X=R.length-1;X>=0;--X){let me=R[X],Ne=me&&me.name;if(!(typeof Ne!="string"||He[$e(Ne)]))try{g.removeAttribute(Ne)}catch{}}},jd=function(g){let R=[g];for(;R.length>0;){let X=R.pop();(D?D(X):X.nodeType)===hr.element&&F2(X);let me=z(X);if(me)for(let Ne=me.length-1;Ne>=0;--Ne)R.push(me[Ne])}},B2=function(g){if(!A)return;let R=[g];for(;R.length>0;){let X=R.pop(),me=D?D(X):X.nodeType;if(me===hr.processingInstruction||me===hr.comment&&Nt(KE,X.data)){try{f(X)}catch{}continue}if(me===hr.element){let Re=X,rt=$e(U?U(X):X.nodeName);try{Re.hasAttribute&&Re.hasAttribute("patchsrc")&&Re.removeAttribute("patchsrc"),Re.hasAttribute&&Re.hasAttribute("for")&&rt!=="label"&&rt!=="output"&&Re.removeAttribute("for")}catch{}}let Ne=z(X);if(Ne)for(let Re=Ne.length-1;Re>=0;--Re)R.push(Ne[Re])}},Hb=function(g){let R=null,X=null;if(_e)g="<remove></remove>"+g;else{let Re=RE(g,/^[\r\n\t ]+/);X=Re&&Re[0]}Je==="application/xhtml+xml"&&Rn===yr&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");let me=$?de(g):g;if(Rn===yr)try{R=new u().parseFromString(me,Je)}catch{}if(!R||!R.documentElement){R=mt.createDocument(Rn,"template",null);try{R.documentElement.innerHTML=ga?F:me}catch{}}let Ne=R.body||R.documentElement;return g&&X&&Ne.insertBefore(n.createTextNode(X),Ne.childNodes[0]||null),Rn===yr?De.call(R,oe?"html":"body")[0]:oe?R.documentElement:Ne},Kb=function(g){return ft.call(g.ownerDocument||g,g,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ml=function(g){return g=el(g,gr," "),g=el(g,ht," "),g=el(g,vt," "),g},Ld=function(g){g.normalize();let R=ft.call(g.ownerDocument||g,g,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),X=R.nextNode();for(;X;)X.data=ml(X.data),X=R.nextNode();let me=g.querySelectorAll?.call(g,"template");me&&oa(me,Ne=>{qi(Ne.content)&&Ld(Ne.content)})},fl=function(g){let R=U?U(g):null;return typeof R!="string"||$e(R)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==j(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==D(g)||g.childNodes!==z(g)},qi=function(g){if(!D||typeof g!="object"||!g)return!1;try{return D(g)===hr.documentFragment}catch{return!1}},ya=function(g){if(!D||typeof g!="object"||!g)return!1;try{return typeof D(g)=="number"}catch{return!1}};function Lr(le,g,R){le.length!==0&&oa(le,X=>{X.call(t,g,R,cr)})}let Z2=function(g,R){return!!(A&&g.hasChildNodes()&&!ya(g.firstElementChild)&&Nt(HE,g.textContent)&&Nt(HE,g.innerHTML)||A&&g.namespaceURI===yr&&R==="style"&&ya(g.firstElementChild)||g.nodeType===hr.processingInstruction||A&&g.nodeType===hr.comment&&Nt(KE,g.data))},H2=function(g,R){if(!k[R]&&Jb(R)&&(h.tagNameCheck instanceof RegExp&&Nt(h.tagNameCheck,R)||h.tagNameCheck instanceof Function&&h.tagNameCheck(R)))return!1;if(rr&&!ct[R]){let X=T(g),me=z(g);if(me&&X){let Ne=me.length;for(let Re=Ne-1;Re>=0;--Re){let rt=vr?me[Re]:m(me[Re],!0);X.insertBefore(rt,S(g))}}}return pi(g),!0},Wb=function(g,R){if(Lr(Ze.beforeSanitizeElements,g,null),g!==R&&T(g)===null)return!0;if(fl(g))return pi(g),!0;let X=$e(U?U(g):g.nodeName);if(Lr(Ze.uponSanitizeElement,g,{tagName:X,allowedTags:Ge}),g!==R&&T(g)===null)return!0;if(Z2(g,X))return pi(g),!0;if(k[X]||!(H.tagCheck instanceof Function&&H.tagCheck(X))&&!Ge[X]){let me=H2(g,X);return me===!1&&Lr(Ze.afterSanitizeElements,g,null),me}if((D?D(g):g.nodeType)===hr.element&&!V2(g)||(X==="noscript"||X==="noembed"||X==="noframes")&&Nt(l3,g.innerHTML))return pi(g),!0;if(I&&g.nodeType===hr.text){let me=ml(g.textContent);g.textContent!==me&&(aa(t.removed,{element:g.cloneNode()}),g.textContent=me)}return Lr(Ze.afterSanitizeElements,g,null),!1},Gb=function(g,R,X){if(M[R]||A&&R==="patchsrc"||A&&R==="for"&&g!=="label"&&g!=="output"||Xe&&(R==="id"||R==="name")&&(X in n||X in M2))return!1;let me=He[R]||H.attributeCheck instanceof Function&&H.attributeCheck(R,g);if(!(_&&Nt(Tr,R))&&!(w&&Nt(wt,R))){if(me){if(!Gi[R]&&!Nt(Bt,el(X,kt,""))&&!((R==="src"||R==="xlink:href"||R==="href")&&g!=="script"&&ME(X,"data:")===0&&di[g])&&!(b&&!Nt(On,el(X,kt,"")))&&X)return!1}else if(!(Jb(g)&&(h.tagNameCheck instanceof RegExp&&Nt(h.tagNameCheck,g)||h.tagNameCheck instanceof Function&&h.tagNameCheck(g))&&(h.attributeNameCheck instanceof RegExp&&Nt(h.attributeNameCheck,R)||h.attributeNameCheck instanceof Function&&h.attributeNameCheck(R,g))||R==="is"&&h.allowCustomizedBuiltInElements&&(h.tagNameCheck instanceof RegExp&&Nt(h.tagNameCheck,X)||h.tagNameCheck instanceof Function&&h.tagNameCheck(X))))return!1}return!0},K2=Me({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jb=function(g){return!K2[ol(g)]&&Nt(At,g)},W2=function(g,R,X,me){if($&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!X)switch(d.getAttributeType(g,R)){case"TrustedHTML":return de(me);case"TrustedScriptURL":return ie(me)}return me},G2=function(g,R,X,me){try{X?g.setAttributeNS(X,R,me):g.setAttribute(R,me),fl(g)?pi(g):PE(t.removed)}catch{mi(R,g)}},qb=function(g){Lr(Ze.beforeSanitizeAttributes,g,null);let R=g.attributes;if(!R||fl(g))return;let X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:He,forceKeepAttr:void 0},me=R.length,Ne=$e(g.nodeName);for(;me--;){let Re=R[me],rt=Re.name,fi=Re.namespaceURI,Mn=Re.value,nr=$e(rt),zr=Mn,Ht=rt==="value"?zr:ZO(zr);if(X.attrName=nr,X.attrValue=Ht,X.keepAttr=!0,X.forceKeepAttr=void 0,Lr(Ze.uponSanitizeAttribute,g,X),Ht=X.attrValue,St&&(nr==="id"||nr==="name")&&ME(Ht,gt)!==0&&(mi(rt,g),Ht=gt+Ht),A&&Nt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ht)){mi(rt,g);continue}if(nr==="attributename"&&RE(Ht,"href")){mi(rt,g);continue}if(!X.forceKeepAttr){if(!X.keepAttr){mi(rt,g);continue}if(!C&&Nt(c3,Ht)){mi(rt,g);continue}if(I&&(Ht=ml(Ht)),!Gb(Ne,nr,Ht)){mi(rt,g);continue}Ht=W2(Ne,nr,fi,Ht),Ht!==zr&&G2(g,rt,fi,Ht)}}Lr(Ze.afterSanitizeAttributes,g,null)},hl=function(g){let R=null,X=Kb(g);for(Lr(Ze.beforeSanitizeShadowDOM,g,null);R=X.nextNode();)if(Lr(Ze.uponSanitizeShadowNode,R,null),Wb(R,g),qb(R),qi(R.content)&&hl(R.content),(D?D(R):R.nodeType)===hr.element){let me=L(R);qi(me)&&(Vd(me),hl(me))}Lr(Ze.afterSanitizeShadowDOM,g,null)},Vd=function(g){let R=[{node:g,shadow:null}];for(;R.length>0;){let X=R.pop();if(X.shadow){hl(X.shadow);continue}let me=X.node,Ne=(D?D(me):me.nodeType)===hr.element,Re=z(me);if(Re)for(let rt=Re.length-1;rt>=0;--rt)R.push({node:Re[rt],shadow:null});if(Ne){let rt=U?U(me):null;if(typeof rt=="string"&&$e(rt)==="template"){let fi=me.content;qi(fi)&&R.push({node:fi,shadow:null})}}if(Ne){let rt=L(me);qi(rt)&&R.push({node:null,shadow:rt},{node:rt,shadow:null})}}};return t.sanitize=function(le){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,X=null,me=null,Ne=null;if(ga=!le,ga&&(le="<!-->"),typeof le!="string"&&!ya(le)&&(le=JO(le),typeof le!="string"))throw Vi("dirty is not a string, aborting");if(!t.isSupported)return le;re?(Ge=ue,He=fe):Ud(g),(Ze.uponSanitizeElement.length>0||Ze.uponSanitizeAttribute.length>0)&&(Ge=tr(Ge)),Ze.uponSanitizeAttribute.length>0&&(He=tr(He)),t.removed=[];let Re=vr&&typeof le!="string"&&ya(le);if(Re){B2(le);let nr=U?U(le):le.nodeName;if(typeof nr=="string"){let zr=$e(nr);if(!Ge[zr]||k[zr])throw pl(le),Vi("root node is forbidden and cannot be sanitized in-place")}if(fl(le))throw pl(le),Vi("root node is clobbered and cannot be sanitized in-place");try{Vd(le)}catch(zr){throw pl(le),zr}}else if(ya(le))R=Hb("<!---->"),X=R.ownerDocument.importNode(le,!0),X.nodeType===hr.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?R=X:R.appendChild(X),Vd(X);else{if(!Te&&!I&&!oe&&le.indexOf("<")===-1)return $&&Ke?de(le):le;if(R=Hb(le),!R)return Te?null:Ke?F:""}R&&_e&&pi(R.firstChild);let rt=Re?le:R,fi=Kb(rt);try{for(;me=fi.nextNode();)Wb(me,rt),qb(me),qi(me.content)&&hl(me.content)}catch(nr){throw Re&&(pl(le),oa(t.removed,zr=>{zr.element&&jd(zr.element)})),nr}if(Re)return oa(t.removed,nr=>{nr.element&&jd(nr.element)}),I&&Ld(le),le;if(Te){if(I&&Ld(R),ae)for(Ne=je.call(R.ownerDocument);R.firstChild;)Ne.appendChild(R.firstChild);else Ne=R;return(He.shadowroot||He.shadowrootmode)&&(Ne=Tt.call(i,Ne,!0)),Ne}let Mn=oe?R.outerHTML:R.innerHTML;return oe&&Ge["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Nt(a3,R.ownerDocument.doctype.name)&&(Mn="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
103
- `+Mn),I&&(Mn=ml(Mn)),$&&Ke?de(Mn):Mn},t.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ud(le),re=!0,ue=Ge,fe=He},t.clearConfig=function(){cr=null,re=!1,ue=null,fe=null,$=se,F=""},t.isValidAttribute=function(le,g,R){cr||Ud({});let X=$e(le),me=$e(g);return Gb(X,me,R)},t.addHook=function(le,g){typeof g=="function"&&Ct(Ze,le)&&aa(Ze[le],g)},t.removeHook=function(le,g){if(Ct(Ze,le)){if(g!==void 0){let R=FO(Ze[le],g);return R===-1?void 0:BO(Ze[le],R,1)[0]}return PE(Ze[le])}},t.removeHooks=function(le){Ct(Ze,le)&&(Ze[le]=[])},t.removeAllHooks=function(){Ze=WE()},t}function Nb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function GE(e){Zi=e}function sa(e){let t=[];return n=>{let i=Math.max(0,Math.min(3,n-1)),r=t[i];return r||(r=e(i),t[i]=r),r}}function Ue(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(r,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(Ft.caret,"$1"),n=n.replace(r,a),i},getRegex:()=>new RegExp(n,t)};return i}function cn(e,t){if(t){if(Ft.escapeTest.test(e))return e.replace(Ft.escapeReplace,YE)}else if(Ft.escapeTestNoEncode.test(e))return e.replace(Ft.escapeReplaceNoEncode,YE);return e}function XE(e){try{e=encodeURI(e).replace(Ft.percentDecode,"%")}catch{return null}return e}function QE(e,t){let n=e.replace(Ft.findPipe,(r,o,a)=>{let s=!1,c=o;for(;--c>=0&&a[c]==="\\";)s=!s;return s?"|":" |"}).split(Ft.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(Ft.slashPipe,"|");return n}function li(e,t,n){let i=e.length;if(i===0)return"";let r=0;for(;r<i;){let o=e.charAt(i-r-1);if(o===t&&!n)r++;else if(o!==t&&n)r++;else break}return e.slice(0,i-r)}function e2(e){let t=e.split(`
101
+ `)}}!i&&r?e.onDone(n):i||e.onError("[no-reply] Stream ended before reply arrived")}catch(a){e.onError(a instanceof Error?a.message:"Stream failed")}finally{try{await o?.cancel()}catch{}}}async chatStreamAuthenticated(e){let t=Er(this.ctx.apiBase,this.ctx.isDev),n=this.ctx.token.value?{Authorization:`Bearer ${this.ctx.token.value}`}:{},i,r=null;try{let c=await fetch(`${t}/api/conversations`,{method:"POST",headers:{"Content-Type":"application/json",...n},body:JSON.stringify({agentId:e.agentId})}),u=await c.json();if(!u.ok){e.onError(u.error||`Conversation failed: HTTP ${c.status}`);return}i=u.data.conversationId,r=u.data.latestSequence??null}catch(c){e.onError(c instanceof Error?c.message:"Conversation failed");return}let o=r?`${t}/api/conversations/${encodeURIComponent(i)}/stream?since=${encodeURIComponent(r)}`:`${t}/api/conversations/${encodeURIComponent(i)}/stream`,a=`nonce_${ov(16)}`,s=GA();await id({streamUrl:o,sendUrl:`${t}/api/messages`,headers:n,sendBody:{conversationId:i,content:e.message,clientNonce:a,...s?{viewerTimezone:s}:{},...e.attachments&&e.attachments.length>0?{attachments:e.attachments}:{}},onStatus:e.onStatus,onDelta:e.onDelta,onToolActivity:e.onToolActivity,onWorkingEnd:e.onWorkingEnd,onMessage:c=>{let u=NE(c);u&&e.onMessage?.(u)},onDone:()=>e.onDone(i),onChatError:c=>e.onError(Gs(c)),onTransportError:c=>e.onError(c.code?{code:c.code,error:c.message}:WA(c))})}},qA=class{constructor(e){Z(this,"ctx",void 0),this.ctx=e}async getPublicAgent(e){this.ctx.loading.value=!0,this.ctx.error.value=null;try{let t=await(await this.ctx.apiFetch(`/api/agents/public/${encodeURIComponent(e.handle)}`)).json();if(!t.ok){this.ctx.error.value=t.error,this.ctx.logger.error("Failed to fetch public agent",{handle:e.handle,error:t.error});return}return t.data}catch(t){this.ctx.logger.error("Get public agent error",{handle:e.handle,error:t}),this.ctx.error.value=t instanceof Error?t.message:"Failed to fetch agent";return}finally{this.ctx.loading.value=!1}}async getAgentByEmail(e){this.ctx.loading.value=!0,this.ctx.error.value=null;try{let t=await(await this.ctx.apiFetch(`/api/agents/by-email/${encodeURIComponent(e.email)}`)).json();if(!t.ok){this.ctx.error.value=t.error,this.ctx.logger.error("Failed to fetch agent by email",{email:e.email,error:t.error});return}return t.data}catch(t){this.ctx.logger.error("Get agent by email error",{email:e.email,error:t}),this.ctx.error.value=t instanceof Error?t.message:"Failed to fetch agent";return}finally{this.ctx.loading.value=!1}}generateAnonId(){let e="pagelinesAnonId",t=this.ctx.storage.getItem(e);return t||(t=is({prefix:"anon"}),this.ctx.storage.setItem(e,t)),t}track(e){try{typeof window<"u"&&window.parent!==window&&window.parent.postMessage({type:"pagelines_track",event:e.event,agentId:e.agentId,properties:e.properties||{}},"*"),this.ctx.logger.info("SDK event tracked",{event:e.event,agentId:e.agentId})}catch(t){this.ctx.logger.error("Track event error",{error:t,args:e})}}},YA=class{constructor(){Z(this,"key","__PAGELINES_SDK__")}get(){if(!(typeof window>"u"))return globalThis[this.key]}set(e){typeof window<"u"&&(globalThis[this.key]=e)}delete(){typeof window<"u"&&delete globalThis[this.key]}},hd=new YA,Qs=class CE extends Hr{static getInstance(t={}){return hd.get()||new CE(t)}get isDev(){return this.settings.isDev??(typeof window<"u"?window.location.hostname==="localhost"||window.location.hostname.includes("127.0.0.1"):!1)}constructor(t={}){let n=hd.get();if(n)return console.debug("[PageLinesSDK] Returning existing singleton instance"),n;super("PageLinesSDK",t),Z(this,"activeUser",G()),Z(this,"token",G(null)),Z(this,"deviceId",G(null)),Z(this,"loading",G(!1)),Z(this,"error",G(null)),Z(this,"apiBase",this.settings.apiBase||void 0),Z(this,"storage",new FA),Z(this,"sessionId",is({prefix:"ses"})),Z(this,"currentAgent",N(()=>{let r=this.activeUser.value;if(!r?.agents)return;let o=r.primaryAgentId||r.agents[0]?.agentId;if(o)return r.agents.find(a=>a.agentId===o)})),Z(this,"currentOrg",N(()=>{let r=this.currentAgent.value;if(!r?.orgId)return;let o=this.activeUser.value;if(o?.orgs)return o.orgs.find(a=>a.orgId===r.orgId)})),Z(this,"initialized",void 0),Z(this,"resolveUser",void 0),Z(this,"agent",void 0),Z(this,"auth",void 0),Z(this,"billing",void 0),Z(this,"chat",void 0),Z(this,"user",void 0),hd.set(this);let i={apiFetch:MA({isDev:this.isDev,apiBase:this.apiBase},this.processApiResponse.bind(this),()=>this.clearSession()),apiBase:this.apiBase,isDev:this.isDev,activeUser:this.activeUser,token:this.token,loading:this.loading,error:this.error,currentAgent:this.currentAgent,storage:this.storage,sessionId:this.sessionId,logger:this.logger,processApiResponse:this.processApiResponse.bind(this)};this.agent=new BA(i),this.auth=new ZA(i),this.billing=new HA(i),this.chat=new JA(i),this.user=new qA(i),this.logger.info("PageLinesSDK initialized"),this.storage.loadFromStorage(this.authRefs()),this.storage.syncWithGlobalStores(this.authRefs()),this.initialized=new Promise(r=>{this.resolveUser=r}),this.token.value&&!this.activeUser.value?this.auth.getCurrentUser().then(r=>{this.resolveUser&&(this.resolveUser(r),this.resolveUser=void 0)}).catch(r=>{this.logger.error("Auto user fetch failed",{data:r}),this.resolveUser&&(this.resolveUser(void 0),this.resolveUser=void 0)}):this.activeUser.value?this.resolveUser?.(this.activeUser.value):this.resolveUser?.(void 0)}processApiResponse(t){if(!t.ok)return;let n=!1;t.user&&(this.activeUser.value=t.user,this.logger.info("User updated from API response",{data:t.user}),n=!0),t.token&&(this.token.value=t.token,this.logger.info("Token updated from API response"),n=!0);let i=t.data?.deviceId;i&&(this.deviceId.value=i,n=!0),n&&this.persistAuth(),this.resolveUser&&(this.resolveUser(t.user),this.resolveUser=void 0)}authRefs(){return{activeUser:this.activeUser,token:this.token,deviceId:this.deviceId}}persistAuth(){this.storage.saveToStorage(this.authRefs())}clearSession(){this.logger.info("Clearing session"),this.activeUser.value=void 0,this.token.value=null,this.deviceId.value=null,this.error.value=null,this.storage.clearStorage()}clear(){this.logger.info("Clearing SDK completely"),this.clearSession(),this.loading.value=!1,this.sessionId=is({prefix:"ses"}),hd.delete()}}});function eO(e){let t=Math.max(0,Math.floor(e.ms/1e3));return`${Math.floor(t/60)}:${(t%60).toString().padStart(2,"0")}`}function tO(e){return e.mimeType.includes("mp4")||e.mimeType.includes("m4a")?"m4a":e.mimeType.includes("ogg")?"ogg":e.mimeType.includes("wav")?"wav":"webm"}function rO(){return typeof MediaRecorder>"u"?"":["audio/webm;codecs=opus","audio/mp4","audio/webm"].find(e=>MediaRecorder.isTypeSupported?.(e))||""}function oO(e){return e.turnOutcome==="failed"?"failed":e.turnOutcome==="stopped"?"stopped":e.sender==="system"?"failed":"completed"}function _d(e){if(!e)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function ua(e){return _d(e.endedAt)??_d(e.startedAt)??0}function wb(e,t){return ua(e)-ua(t)}function il(e,t){let n=e.filter(r=>r.status==="completed"||r.status==="failed"&&!!r.note).filter(r=>!t.has(r.activityId)).slice().sort(wb),i=[];for(let r of n){let o=r.status==="completed"?"done":"failed",a=i[i.length-1];if(o==="done"&&a?.tone==="done"&&a.label===r.label&&ua(r)-a.lastMs<=aO){a.count+=1,a.lastMs=ua(r);continue}i.push({id:r.activityId,tone:o,label:r.label,note:r.note,count:1,lastMs:ua(r)})}return i.map(r=>({id:r.id,tone:r.tone,label:r.count>1?`${r.label} \xB7 ${r.count}`:r.label,...r.note?{note:r.note}:{}}))}function wd(e){return e.length<=db?{visibleRows:e,hiddenRows:[]}:{visibleRows:e.slice(e.length-db),hiddenRows:e.slice(0,e.length-db)}}function kb(e){let{activities:t,outcome:n,nowMs:i,canNotifyOnCompletion:r,lastVisibleProgressAtMs:o,includeFailureNote:a=!0}=e;if(n==="completed")return{outcome:n,visibleRows:[],hiddenRows:il(t,new Set),terminal:{id:"work-complete",tone:"completed",label:ci.completed}};if(n==="failed"){let D=t.filter(se=>se.status==="failed").sort(wb).pop(),U=new Set;D&&U.add(D.activityId);let{visibleRows:$,hiddenRows:B}=wd(il(t,U));return{outcome:n,visibleRows:$,hiddenRows:B,terminal:{id:"work-failed",tone:"failed",label:ci.failed,...a&&D?.note?{note:D.note}:{}}}}if(n==="stopped"){let{visibleRows:D,hiddenRows:U}=wd(il(t,new Set));return{outcome:n,visibleRows:D,hiddenRows:U,terminal:{id:"work-stopped",tone:"stopped",label:ci.stopped}}}let{visibleRows:s,hiddenRows:c}=wd(il(t,new Set)),u=t.filter(D=>D.status==="started").sort(wb).pop(),d=t.reduce((D,U)=>Math.max(D,ua(U)),o??-1/0),p=Number.isFinite(d)?d:i,m=t.reduce((D,U)=>{let $=_d(U.startedAt)??_d(U.endedAt);return $===void 0?D:Math.min(D,$)},1/0),f=p+s2,S=(Number.isFinite(m)?m:p)+sO,z=i>=f,T=u||z?{id:u?.activityId??"work-active",tone:"active",label:u?.label??ci.finishing}:void 0,L=z?i>=S?r?ci.notifyHint:ci.leaveHint:ci.slowHint:void 0,j=[f,S].filter(D=>D>i).sort((D,U)=>D-U)[0];return{outcome:n,visibleRows:s,hiddenRows:c,...T?{terminal:T}:{},...L?{hint:L}:{},...j===void 0?{}:{nextBoundaryAtMs:j}}}function lO(e){let{segments:t,activities:n,nowMs:i,canNotifyOnCompletion:r,lastVisibleProgressAtMs:o}=e,a=new Map(n.map(f=>[f.activityId,f])),s=f=>kb({activities:f,outcome:"running",nowMs:i,canNotifyOnCompletion:r,...o===void 0?{}:{lastVisibleProgressAtMs:o}}),c=f=>{let{visibleRows:S,hiddenRows:z}=wd(il(f,new Set));if(!(S.length===0&&z.length===0))return{outcome:"running",visibleRows:S,hiddenRows:z}},u=[],d=new Set(t.flatMap(f=>f.kind==="work"?f.activityIds:[])),p=c(n.filter(f=>!d.has(f.activityId)));p&&u.push({kind:"work",id:"work-unsegmented",journal:p}),t.forEach((f,S)=>{if(f.kind==="text"){f.content&&u.push({kind:"text",id:`text-${S}`,content:f.content});return}let z=f.activityIds.map(L=>a.get(L)).filter(L=>L!==void 0);if(z.length===0)return;let T=c(z);T&&u.push({kind:"work",id:`work-${f.activityIds[0]??S}`,journal:T})});let m=s(n);return m.terminal||m.hint?u.push({kind:"work",id:"work-tail",journal:{outcome:"running",visibleRows:[],hiddenRows:[],...m.terminal?{terminal:m.terminal}:{},...m.hint?{hint:m.hint}:{},...m.nextBoundaryAtMs===void 0?{}:{nextBoundaryAtMs:m.nextBoundaryAtMs}}}):u.push({kind:"loading",id:"work-tail"}),u}function dO(e){if(!(e.bucket!==void 0||cO.has(e.code)))return{surface:"hard"};let t=e.bucket??(l2.has(e.code)?"account":"error"),n={...e.actionLabel?{actionLabel:e.actionLabel}:{},...e.actionUrl?{actionUrl:e.actionUrl}:{},...e.help?{help:e.help}:{}};return t==="account"?{surface:"transcript",issue:{code:e.code,bucket:t,...n},sendBlockedReason:"account"}:c2.has(e.code)?{surface:"transcript",issue:{code:e.code,bucket:t,...n},sendBlockedReason:"agent_deleted"}:{surface:"transient",issue:{code:e.code,message:e.error,...n}}}function pO(e){let t=uO[e.code];return t?gv[t].oneLine:e.error}function vd(e){if(!e)return;let t=Date.parse(e);return Number.isFinite(t)?t:void 0}function mO(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getUserMedia&&typeof RTCPeerConnection<"u"}function AE(e){return e?typeof e=="string"?e:e.src||"":""}function da(e){return AE(e.cover)||AE(e.avatar)||Ui(e.name)}function sl(e){let t=e.target;t.dataset.fallbackUsed||(t.dataset.fallbackUsed="true",t.src=Ui())}function u2(e){let{template:t,agent:n}=e;return t.replace(/{name}/g,n.name||"Assistant").replace(/{title}/g,n.title||"").replace(/{handle}/g,n.handle||"").replace(/{orgName}/g,n.org?.name||"")}function OE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function DO(e){if(Array.isArray(e))return e}function PO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,r,o,a,s=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return s}}function RO(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
102
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MO(e,t){return DO(e)||PO(e,t)||UO(e,t)||RO()}function UO(e,t){if(e){if(typeof e=="string")return OE(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?OE(e,t):void 0}}function $t(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return $b(e,t,n)}}function WO(e){return function(){return Sb(e,[...arguments])}}function Me(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ol;if(DE&&DE(e,null),!ui(t))return e;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=n(r);o!==r&&(jO(t)||(t[i]=o),r=o)}e[r]=!0}return e}function GO(e){for(let t=0;t<e.length;t++)Ct(e,t)||(e[t]=null);return e}function tr(e){let t=la(null);for(let i of d2(e)){var n=MO(i,2);let r=n[0],o=n[1];Ct(e,r)&&(ui(o)?t[r]=GO(o):o&&typeof o=="object"&&o.constructor===Object?t[r]=tr(o):t[r]=o)}return t}function JO(e){switch(typeof e){case"string":return e;case"number":return HO(e);case"boolean":return KO(e);case"bigint":return UE?UE(e):"0";case"symbol":return jE?jE(e):"Symbol()";case"undefined":return tl(e);case"function":case"object":{if(e===null)return tl(e);let t=e,n=ln(t,"toString");if(typeof n=="function"){let i=n(t);return typeof i=="string"?i:tl(i)}return tl(e)}default:return tl(e)}}function ln(e,t){for(;e!==null;){let i=VO(e,t);if(i){if(i.get)return $t(i.get);if(typeof i.value=="function")return $t(i.value)}e=LO(e)}function n(){return null}return n}function qO(e){try{return Nt(e,""),!0}catch{return!1}}function m2(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u3(),t=le=>m2(le);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==hr.document||!e.Element)return t.isSupported=!1,t;let n=e.document,i=n,r=i.currentScript;e.DocumentFragment;let o=e.HTMLTemplateElement,a=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,d=e.trustedTypes,p=s.prototype,m=ln(p,"cloneNode"),f=ln(p,"remove"),S=ln(p,"nextSibling"),z=ln(p,"childNodes"),T=ln(p,"parentNode"),L=ln(p,"shadowRoot"),j=ln(p,"attributes"),D=a&&a.prototype?ln(a.prototype,"nodeType"):null,U=a&&a.prototype?ln(a.prototype,"nodeName"):null;if(typeof o=="function"){let le=n.createElement("template");le.content&&le.content.ownerDocument&&(n=le.content.ownerDocument)}let $,B="",se,he=!1,te=0,W=function(){if(te>0)throw Vi('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},de=function(g){W(),te++;try{return $.createHTML(g)}finally{te--}},ie=function(g){W(),te++;try{return $.createScriptURL(g)}finally{te--}},ye=function(){return he||(se=d3(d,r),he=!0),se},Be=n,mt=Be.implementation,ft=Be.createNodeIterator,je=Be.createDocumentFragment,De=Be.getElementsByTagName,Tt=i.importNode,Ze=WE();t.isSupported=typeof d2=="function"&&typeof T=="function"&&mt&&mt.createHTMLDocument!==void 0;let gr=QO,ht=e3,vt=t3,Tr=r3,wt=n3,On=i3,kt=o3,At=s3,Bt=ZE,Ge=null,Zt=Me({},[...LE,...fb,...hb,...gb,...VE]),He=null,jr=Me({},[...FE,...vb,...BE,...bd]),h=Object.seal(la(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),k=null,M=null,K=Object.seal(la(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),w=!0,_=!0,b=!1,C=!0,I=!1,A=!0,oe=!1,re=!1,ue=null,fe=null,_e=!1,Te=!1,ae=!1,Ke=!1,Xe=!0,St=!1,gt="user-content-",rr=!0,vr=!1,pt={},ct=null,Dn=Me({},"annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")),di=null,dl=Me({},["audio","video","img","source","image","track"]),Gi=null,Pn=Me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),br="http://www.w3.org/1998/Math/MathML",pn="http://www.w3.org/2000/svg",yr="http://www.w3.org/1999/xhtml",Rn=yr,ga=!1,va=null,Md=Me({},[br,pn,yr],mb),ba=Ut(["mi","mo","mn","ms","mtext"]),Ji=Me({},ba),H=Ut(["annotation-xml"]),F=Me({},H),ee=Me({},["title","style","font","a","script"]),Je=null,ke=["application/xhtml+xml","text/html"],$e=null,cr=null,M2=n.createElement("form"),Fb=function(g){return g instanceof RegExp||g instanceof Function},Ud=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(cr&&cr===g)return;(!g||typeof g!="object")&&(g={}),g=tr(g),Je=ke.indexOf(g.PARSER_MEDIA_TYPE)===-1?"text/html":g.PARSER_MEDIA_TYPE,$e=Je==="application/xhtml+xml"?mb:ol,Ge=si(g,"ALLOWED_TAGS",Zt,{transform:$e}),He=si(g,"ALLOWED_ATTR",jr,{transform:$e}),va=si(g,"ALLOWED_NAMESPACES",Md,{transform:mb}),Gi=si(g,"ADD_URI_SAFE_ATTR",Pn,{transform:$e,base:Pn}),di=si(g,"ADD_DATA_URI_TAGS",dl,{transform:$e,base:dl}),ct=si(g,"FORBID_CONTENTS",Dn,{transform:$e}),k=si(g,"FORBID_TAGS",tr({}),{transform:$e}),M=si(g,"FORBID_ATTR",tr({}),{transform:$e}),pt=Ct(g,"USE_PROFILES")?g.USE_PROFILES&&typeof g.USE_PROFILES=="object"?tr(g.USE_PROFILES):g.USE_PROFILES:!1,w=g.ALLOW_ARIA_ATTR!==!1,_=g.ALLOW_DATA_ATTR!==!1,b=g.ALLOW_UNKNOWN_PROTOCOLS||!1,C=g.ALLOW_SELF_CLOSE_IN_ATTR!==!1,I=g.SAFE_FOR_TEMPLATES||!1,A=g.SAFE_FOR_XML!==!1,oe=g.WHOLE_DOCUMENT||!1,Te=g.RETURN_DOM||!1,ae=g.RETURN_DOM_FRAGMENT||!1,Ke=g.RETURN_TRUSTED_TYPE||!1,_e=g.FORCE_BODY||!1,Xe=g.SANITIZE_DOM!==!1,St=g.SANITIZE_NAMED_PROPS||!1,rr=g.KEEP_CONTENT!==!1,vr=g.IN_PLACE||!1,Bt=qO(g.ALLOWED_URI_REGEXP)?g.ALLOWED_URI_REGEXP:ZE,Rn=typeof g.NAMESPACE=="string"?g.NAMESPACE:yr,Ji=Ct(g,"MATHML_TEXT_INTEGRATION_POINTS")&&g.MATHML_TEXT_INTEGRATION_POINTS&&typeof g.MATHML_TEXT_INTEGRATION_POINTS=="object"?tr(g.MATHML_TEXT_INTEGRATION_POINTS):Me({},ba),F=Ct(g,"HTML_INTEGRATION_POINTS")&&g.HTML_INTEGRATION_POINTS&&typeof g.HTML_INTEGRATION_POINTS=="object"?tr(g.HTML_INTEGRATION_POINTS):Me({},H);let R=Ct(g,"CUSTOM_ELEMENT_HANDLING")&&g.CUSTOM_ELEMENT_HANDLING&&typeof g.CUSTOM_ELEMENT_HANDLING=="object"?tr(g.CUSTOM_ELEMENT_HANDLING):la(null);if(h=la(null),Ct(R,"tagNameCheck")&&Fb(R.tagNameCheck)&&(h.tagNameCheck=R.tagNameCheck),Ct(R,"attributeNameCheck")&&Fb(R.attributeNameCheck)&&(h.attributeNameCheck=R.attributeNameCheck),Ct(R,"allowCustomizedBuiltInElements")&&typeof R.allowCustomizedBuiltInElements=="boolean"&&(h.allowCustomizedBuiltInElements=R.allowCustomizedBuiltInElements),jt(h),I&&(_=!1),ae&&(Te=!0),pt&&(Ge=Me({},VE),He=la(null),pt.html===!0&&(Me(Ge,LE),Me(He,FE)),pt.svg===!0&&(Me(Ge,fb),Me(He,vb),Me(He,bd)),pt.svgFilters===!0&&(Me(Ge,hb),Me(He,vb),Me(He,bd)),pt.mathMl===!0&&(Me(Ge,gb),Me(He,BE),Me(He,bd))),K.tagCheck=null,K.attributeCheck=null,Ct(g,"ADD_TAGS")&&(typeof g.ADD_TAGS=="function"?K.tagCheck=g.ADD_TAGS:ui(g.ADD_TAGS)&&(Ge===Zt&&(Ge=tr(Ge)),Me(Ge,g.ADD_TAGS,$e))),Ct(g,"ADD_ATTR")&&(typeof g.ADD_ATTR=="function"?K.attributeCheck=g.ADD_ATTR:ui(g.ADD_ATTR)&&(He===jr&&(He=tr(He)),Me(He,g.ADD_ATTR,$e))),Ct(g,"ADD_URI_SAFE_ATTR")&&ui(g.ADD_URI_SAFE_ATTR)&&Me(Gi,g.ADD_URI_SAFE_ATTR,$e),Ct(g,"FORBID_CONTENTS")&&ui(g.FORBID_CONTENTS)&&(ct===Dn&&(ct=tr(ct)),Me(ct,g.FORBID_CONTENTS,$e)),Ct(g,"ADD_FORBID_CONTENTS")&&ui(g.ADD_FORBID_CONTENTS)&&(ct===Dn&&(ct=tr(ct)),Me(ct,g.ADD_FORBID_CONTENTS,$e)),rr&&(Ge["#text"]=!0),oe&&Me(Ge,["html","head","body"]),Ge.table&&(Me(Ge,["tbody"]),delete k.tbody),g.TRUSTED_TYPES_POLICY){if(typeof g.TRUSTED_TYPES_POLICY.createHTML!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof g.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Vi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let X=$;$=g.TRUSTED_TYPES_POLICY;try{B=de("")}catch(me){throw $=X,me}}else g.TRUSTED_TYPES_POLICY===null?($=void 0,B=""):($===void 0&&($=ye()),$&&typeof B=="string"&&(B=de("")));Ut&&Ut(g),cr=g},Bb=Me({},[...fb,...hb,...YO]),Zb=Me({},[...gb,...XO]),U2=function(g,R,X){return R.namespaceURI===yr?g==="svg":R.namespaceURI===br?g==="svg"&&(X==="annotation-xml"||Ji[X]):!!Bb[g]},j2=function(g,R,X){return R.namespaceURI===yr?g==="math":R.namespaceURI===pn?g==="math"&&F[X]:!!Zb[g]},L2=function(g,R,X){return R.namespaceURI===pn&&!F[X]||R.namespaceURI===br&&!Ji[X]?!1:!Zb[g]&&(ee[g]||!Bb[g])},V2=function(g){let R=T(g);(!R||!R.tagName)&&(R={namespaceURI:Rn,tagName:"template"});let X=ol(g.tagName),me=ol(R.tagName);return va[g.namespaceURI]?g.namespaceURI===pn?U2(X,R,me):g.namespaceURI===br?j2(X,R,me):g.namespaceURI===yr?L2(X,R,me):!!(Je==="application/xhtml+xml"&&va[g.namespaceURI]):!1},pi=function(g){aa(t.removed,{element:g});try{T(g).removeChild(g)}catch{if(f(g),!T(g))throw Vi("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},pl=function(g){jd(g);let R=z(g);if(R){let me=[];oa(R,Ne=>{aa(me,Ne)}),oa(me,Ne=>{try{f(Ne)}catch{}})}let X=j(g);if(X)for(let me=X.length-1;me>=0;--me){let Ne=X[me],Re=Ne&&Ne.name;if(typeof Re=="string")try{g.removeAttribute(Re)}catch{}}},mi=function(g,R){try{aa(t.removed,{attribute:R.getAttributeNode(g),from:R})}catch{aa(t.removed,{attribute:null,from:R})}if(R.removeAttribute(g),g==="is")if(Te||ae)try{pi(R)}catch{}else try{R.setAttribute(g,"")}catch{}},F2=function(g){let R=j(g);if(R)for(let X=R.length-1;X>=0;--X){let me=R[X],Ne=me&&me.name;if(!(typeof Ne!="string"||He[$e(Ne)]))try{g.removeAttribute(Ne)}catch{}}},jd=function(g){let R=[g];for(;R.length>0;){let X=R.pop();(D?D(X):X.nodeType)===hr.element&&F2(X);let me=z(X);if(me)for(let Ne=me.length-1;Ne>=0;--Ne)R.push(me[Ne])}},B2=function(g){if(!A)return;let R=[g];for(;R.length>0;){let X=R.pop(),me=D?D(X):X.nodeType;if(me===hr.processingInstruction||me===hr.comment&&Nt(KE,X.data)){try{f(X)}catch{}continue}if(me===hr.element){let Re=X,rt=$e(U?U(X):X.nodeName);try{Re.hasAttribute&&Re.hasAttribute("patchsrc")&&Re.removeAttribute("patchsrc"),Re.hasAttribute&&Re.hasAttribute("for")&&rt!=="label"&&rt!=="output"&&Re.removeAttribute("for")}catch{}}let Ne=z(X);if(Ne)for(let Re=Ne.length-1;Re>=0;--Re)R.push(Ne[Re])}},Hb=function(g){let R=null,X=null;if(_e)g="<remove></remove>"+g;else{let Re=RE(g,/^[\r\n\t ]+/);X=Re&&Re[0]}Je==="application/xhtml+xml"&&Rn===yr&&(g='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+g+"</body></html>");let me=$?de(g):g;if(Rn===yr)try{R=new u().parseFromString(me,Je)}catch{}if(!R||!R.documentElement){R=mt.createDocument(Rn,"template",null);try{R.documentElement.innerHTML=ga?B:me}catch{}}let Ne=R.body||R.documentElement;return g&&X&&Ne.insertBefore(n.createTextNode(X),Ne.childNodes[0]||null),Rn===yr?De.call(R,oe?"html":"body")[0]:oe?R.documentElement:Ne},Kb=function(g){return ft.call(g.ownerDocument||g,g,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ml=function(g){return g=el(g,gr," "),g=el(g,ht," "),g=el(g,vt," "),g},Ld=function(g){g.normalize();let R=ft.call(g.ownerDocument||g,g,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),X=R.nextNode();for(;X;)X.data=ml(X.data),X=R.nextNode();let me=g.querySelectorAll?.call(g,"template");me&&oa(me,Ne=>{qi(Ne.content)&&Ld(Ne.content)})},fl=function(g){let R=U?U(g):null;return typeof R!="string"||$e(R)!=="form"?!1:typeof g.nodeName!="string"||typeof g.textContent!="string"||typeof g.removeChild!="function"||g.attributes!==j(g)||typeof g.removeAttribute!="function"||typeof g.setAttribute!="function"||typeof g.namespaceURI!="string"||typeof g.insertBefore!="function"||typeof g.hasChildNodes!="function"||g.nodeType!==D(g)||g.childNodes!==z(g)},qi=function(g){if(!D||typeof g!="object"||!g)return!1;try{return D(g)===hr.documentFragment}catch{return!1}},ya=function(g){if(!D||typeof g!="object"||!g)return!1;try{return typeof D(g)=="number"}catch{return!1}};function Lr(le,g,R){le.length!==0&&oa(le,X=>{X.call(t,g,R,cr)})}let Z2=function(g,R){return!!(A&&g.hasChildNodes()&&!ya(g.firstElementChild)&&Nt(HE,g.textContent)&&Nt(HE,g.innerHTML)||A&&g.namespaceURI===yr&&R==="style"&&ya(g.firstElementChild)||g.nodeType===hr.processingInstruction||A&&g.nodeType===hr.comment&&Nt(KE,g.data))},H2=function(g,R){if(!k[R]&&Jb(R)&&(h.tagNameCheck instanceof RegExp&&Nt(h.tagNameCheck,R)||h.tagNameCheck instanceof Function&&h.tagNameCheck(R)))return!1;if(rr&&!ct[R]){let X=T(g),me=z(g);if(me&&X){let Ne=me.length;for(let Re=Ne-1;Re>=0;--Re){let rt=vr?me[Re]:m(me[Re],!0);X.insertBefore(rt,S(g))}}}return pi(g),!0},Wb=function(g,R){if(Lr(Ze.beforeSanitizeElements,g,null),g!==R&&T(g)===null)return!0;if(fl(g))return pi(g),!0;let X=$e(U?U(g):g.nodeName);if(Lr(Ze.uponSanitizeElement,g,{tagName:X,allowedTags:Ge}),g!==R&&T(g)===null)return!0;if(Z2(g,X))return pi(g),!0;if(k[X]||!(K.tagCheck instanceof Function&&K.tagCheck(X))&&!Ge[X]){let me=H2(g,X);return me===!1&&Lr(Ze.afterSanitizeElements,g,null),me}if((D?D(g):g.nodeType)===hr.element&&!V2(g)||(X==="noscript"||X==="noembed"||X==="noframes")&&Nt(l3,g.innerHTML))return pi(g),!0;if(I&&g.nodeType===hr.text){let me=ml(g.textContent);g.textContent!==me&&(aa(t.removed,{element:g.cloneNode()}),g.textContent=me)}return Lr(Ze.afterSanitizeElements,g,null),!1},Gb=function(g,R,X){if(M[R]||A&&R==="patchsrc"||A&&R==="for"&&g!=="label"&&g!=="output"||Xe&&(R==="id"||R==="name")&&(X in n||X in M2))return!1;let me=He[R]||K.attributeCheck instanceof Function&&K.attributeCheck(R,g);if(!(_&&Nt(Tr,R))&&!(w&&Nt(wt,R))){if(me){if(!Gi[R]&&!Nt(Bt,el(X,kt,""))&&!((R==="src"||R==="xlink:href"||R==="href")&&g!=="script"&&ME(X,"data:")===0&&di[g])&&!(b&&!Nt(On,el(X,kt,"")))&&X)return!1}else if(!(Jb(g)&&(h.tagNameCheck instanceof RegExp&&Nt(h.tagNameCheck,g)||h.tagNameCheck instanceof Function&&h.tagNameCheck(g))&&(h.attributeNameCheck instanceof RegExp&&Nt(h.attributeNameCheck,R)||h.attributeNameCheck instanceof Function&&h.attributeNameCheck(R,g))||R==="is"&&h.allowCustomizedBuiltInElements&&(h.tagNameCheck instanceof RegExp&&Nt(h.tagNameCheck,X)||h.tagNameCheck instanceof Function&&h.tagNameCheck(X))))return!1}return!0},K2=Me({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Jb=function(g){return!K2[ol(g)]&&Nt(At,g)},W2=function(g,R,X,me){if($&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!X)switch(d.getAttributeType(g,R)){case"TrustedHTML":return de(me);case"TrustedScriptURL":return ie(me)}return me},G2=function(g,R,X,me){try{X?g.setAttributeNS(X,R,me):g.setAttribute(R,me),fl(g)?pi(g):PE(t.removed)}catch{mi(R,g)}},qb=function(g){Lr(Ze.beforeSanitizeAttributes,g,null);let R=g.attributes;if(!R||fl(g))return;let X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:He,forceKeepAttr:void 0},me=R.length,Ne=$e(g.nodeName);for(;me--;){let Re=R[me],rt=Re.name,fi=Re.namespaceURI,Mn=Re.value,nr=$e(rt),zr=Mn,Ht=rt==="value"?zr:ZO(zr);if(X.attrName=nr,X.attrValue=Ht,X.keepAttr=!0,X.forceKeepAttr=void 0,Lr(Ze.uponSanitizeAttribute,g,X),Ht=X.attrValue,St&&(nr==="id"||nr==="name")&&ME(Ht,gt)!==0&&(mi(rt,g),Ht=gt+Ht),A&&Nt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ht)){mi(rt,g);continue}if(nr==="attributename"&&RE(Ht,"href")){mi(rt,g);continue}if(!X.forceKeepAttr){if(!X.keepAttr){mi(rt,g);continue}if(!C&&Nt(c3,Ht)){mi(rt,g);continue}if(I&&(Ht=ml(Ht)),!Gb(Ne,nr,Ht)){mi(rt,g);continue}Ht=W2(Ne,nr,fi,Ht),Ht!==zr&&G2(g,rt,fi,Ht)}}Lr(Ze.afterSanitizeAttributes,g,null)},hl=function(g){let R=null,X=Kb(g);for(Lr(Ze.beforeSanitizeShadowDOM,g,null);R=X.nextNode();)if(Lr(Ze.uponSanitizeShadowNode,R,null),Wb(R,g),qb(R),qi(R.content)&&hl(R.content),(D?D(R):R.nodeType)===hr.element){let me=L(R);qi(me)&&(Vd(me),hl(me))}Lr(Ze.afterSanitizeShadowDOM,g,null)},Vd=function(g){let R=[{node:g,shadow:null}];for(;R.length>0;){let X=R.pop();if(X.shadow){hl(X.shadow);continue}let me=X.node,Ne=(D?D(me):me.nodeType)===hr.element,Re=z(me);if(Re)for(let rt=Re.length-1;rt>=0;--rt)R.push({node:Re[rt],shadow:null});if(Ne){let rt=U?U(me):null;if(typeof rt=="string"&&$e(rt)==="template"){let fi=me.content;qi(fi)&&R.push({node:fi,shadow:null})}}if(Ne){let rt=L(me);qi(rt)&&R.push({node:null,shadow:rt},{node:rt,shadow:null})}}};return t.sanitize=function(le){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,X=null,me=null,Ne=null;if(ga=!le,ga&&(le="<!-->"),typeof le!="string"&&!ya(le)&&(le=JO(le),typeof le!="string"))throw Vi("dirty is not a string, aborting");if(!t.isSupported)return le;re?(Ge=ue,He=fe):Ud(g),(Ze.uponSanitizeElement.length>0||Ze.uponSanitizeAttribute.length>0)&&(Ge=tr(Ge)),Ze.uponSanitizeAttribute.length>0&&(He=tr(He)),t.removed=[];let Re=vr&&typeof le!="string"&&ya(le);if(Re){B2(le);let nr=U?U(le):le.nodeName;if(typeof nr=="string"){let zr=$e(nr);if(!Ge[zr]||k[zr])throw pl(le),Vi("root node is forbidden and cannot be sanitized in-place")}if(fl(le))throw pl(le),Vi("root node is clobbered and cannot be sanitized in-place");try{Vd(le)}catch(zr){throw pl(le),zr}}else if(ya(le))R=Hb("<!---->"),X=R.ownerDocument.importNode(le,!0),X.nodeType===hr.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?R=X:R.appendChild(X),Vd(X);else{if(!Te&&!I&&!oe&&le.indexOf("<")===-1)return $&&Ke?de(le):le;if(R=Hb(le),!R)return Te?null:Ke?B:""}R&&_e&&pi(R.firstChild);let rt=Re?le:R,fi=Kb(rt);try{for(;me=fi.nextNode();)Wb(me,rt),qb(me),qi(me.content)&&hl(me.content)}catch(nr){throw Re&&(pl(le),oa(t.removed,zr=>{zr.element&&jd(zr.element)})),nr}if(Re)return oa(t.removed,nr=>{nr.element&&jd(nr.element)}),I&&Ld(le),le;if(Te){if(I&&Ld(R),ae)for(Ne=je.call(R.ownerDocument);R.firstChild;)Ne.appendChild(R.firstChild);else Ne=R;return(He.shadowroot||He.shadowrootmode)&&(Ne=Tt.call(i,Ne,!0)),Ne}let Mn=oe?R.outerHTML:R.innerHTML;return oe&&Ge["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Nt(a3,R.ownerDocument.doctype.name)&&(Mn="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
103
+ `+Mn),I&&(Mn=ml(Mn)),$&&Ke?de(Mn):Mn},t.setConfig=function(){let le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ud(le),re=!0,ue=Ge,fe=He},t.clearConfig=function(){cr=null,re=!1,ue=null,fe=null,$=se,B=""},t.isValidAttribute=function(le,g,R){cr||Ud({});let X=$e(le),me=$e(g);return Gb(X,me,R)},t.addHook=function(le,g){typeof g=="function"&&Ct(Ze,le)&&aa(Ze[le],g)},t.removeHook=function(le,g){if(Ct(Ze,le)){if(g!==void 0){let R=FO(Ze[le],g);return R===-1?void 0:BO(Ze[le],R,1)[0]}return PE(Ze[le])}},t.removeHooks=function(le){Ct(Ze,le)&&(Ze[le]=[])},t.removeAllHooks=function(){Ze=WE()},t}function Nb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function GE(e){Zi=e}function sa(e){let t=[];return n=>{let i=Math.max(0,Math.min(3,n-1)),r=t[i];return r||(r=e(i),t[i]=r),r}}function Ue(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(r,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(Ft.caret,"$1"),n=n.replace(r,a),i},getRegex:()=>new RegExp(n,t)};return i}function cn(e,t){if(t){if(Ft.escapeTest.test(e))return e.replace(Ft.escapeReplace,YE)}else if(Ft.escapeTestNoEncode.test(e))return e.replace(Ft.escapeReplaceNoEncode,YE);return e}function XE(e){try{e=encodeURI(e).replace(Ft.percentDecode,"%")}catch{return null}return e}function QE(e,t){let n=e.replace(Ft.findPipe,(r,o,a)=>{let s=!1,c=o;for(;--c>=0&&a[c]==="\\";)s=!s;return s?"|":" |"}).split(Ft.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(Ft.slashPipe,"|");return n}function li(e,t,n){let i=e.length;if(i===0)return"";let r=0;for(;r<i;){let o=e.charAt(i-r-1);if(o===t&&!n)r++;else if(o!==t&&n)r++;else break}return e.slice(0,i-r)}function e2(e){let t=e.split(`
104
104
  `),n=t.length-1;for(;n>=0&&Ft.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
105
105
  `)}function J3(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function q3(e,t=0){let n=t,i="";for(let r of e)if(r===" "){let o=4-n%4;i+=" ".repeat(o),n+=o}else i+=r,n++;return i}function t2(e,t,n,i,r){let o=t.href,a=t.title||null,s=e[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function Y3(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let r=i[1];return t.split(`
106
106
  `).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[s]=a;return s.length>=r.length?o.slice(r.length):o}).join(`
@@ -111,7 +111,7 @@ Current User:
111
111
  - Email: ${t.email}
112
112
  - Title: ${n?.title||""}
113
113
  - About: ${n?.summary||""}
114
- `:"";return{context:`${this.settings.context||""}${i}`.trim(),firstMessage:this.settings.firstMessage||""}}updateState(e,t){e.value={...e.value,...t}}resetWorkJournalTiming(){this.toolActivityTiming.value={},this.lastVisibleProgressAtMs.value=void 0,this.liveSegments.value=[],this.liveStreamMessageId.value=void 0,this.clearBoundaryTimer()}resetState(){this.resetWorkJournalTiming(),this.updateState(this.textState,{isActive:!1,isConnected:!1,isThinking:!1,connectionStatus:"disconnected",error:void 0,sendBlockedReason:void 0,workingDescription:void 0,toolActivities:void 0,turnOutcome:void 0})}setupBoundaryWatcher(){lt(()=>this.workJournal.value?.nextBoundaryAtMs,e=>{this.scheduleBoundary(e)})}scheduleBoundary(e){if(this.clearBoundaryTimer(),e===void 0)return;let t=Math.max(0,e-Date.now());this.boundaryTimer=setTimeout(()=>{this.boundaryTimer=void 0,this.nowMs.value=Date.now()},t),this.boundaryTimer.unref?.()}clearBoundaryTimer(){this.boundaryTimer&&(clearTimeout(this.boundaryTimer),this.boundaryTimer=void 0)}rememberToolActivity(e){let t=vd(e.startedAt)??this.toolActivityTiming.value[e.activityId]?.startedAt??(e.status==="started"?Date.now():void 0),n=vd(e.endedAt)??this.toolActivityTiming.value[e.activityId]?.endedAt??(e.status==="started"?void 0:Date.now());t&&(this.toolActivityTiming.value={...this.toolActivityTiming.value,[e.activityId]:{startedAt:t,...n?{endedAt:n}:{}}})}withToolActivityTiming(e){let t=this.toolActivityTiming.value[e.activityId],n=Date.now(),i=vd(e.startedAt)??t?.startedAt??(e.status==="started"?n:void 0),r=vd(e.endedAt)??t?.endedAt??(e.status==="started"?void 0:n);return{...e,...i!==void 0&&!e.startedAt?{startedAt:new Date(i).toISOString()}:{},...r!==void 0&&!e.endedAt?{endedAt:new Date(r).toISOString()}:{}}}updateToolActivity(e){let t=this.textState.value.toolActivities??[],n=t.findIndex(o=>o.activityId===e.activityId),i=this.withToolActivityTiming({...n>=0?t[n]:{},...e}),r=n>=0?[...t.slice(0,n),i,...t.slice(n+1)]:[...t,i];this.rememberToolActivity(i),this.updateState(this.textState,{toolActivities:r})}finishToolActivities(e){let t=this.textState.value.toolActivities;if(!t?.length)return;let n=t.map(i=>i.status==="started"?this.withToolActivityTiming({...i,status:e}):i);n.forEach(i=>this.rememberToolActivity(i)),this.updateState(this.textState,{toolActivities:n})}workJournalFor(e){if(e.activities?.length)return kb({activities:e.activities,outcome:e.outcome,nowMs:this.nowMs.value,canNotifyOnCompletion:!1,includeFailureNote:e.includeFailureNote})}setupModeWatcher(){lt(this.agentMode,async(e,t)=>{this.logger.info(`Mode changed from ${t} to ${e}`),this.isTextMode&&(t==="talk"||t==="chat")&&await this.endConversation()})}setupAvailabilityWatcher(){lt(()=>[this.chatEnabled,this._agent.state.value.lifecycle],([e])=>{if(!(!this.isTextMode||this.isConnecting)){if(e){this.textState.value.isConnected||this.updateState(this.textState,{isConnected:!0,connectionStatus:"connected",error:void 0});return}this.textState.value.isConnected&&this.updateState(this.textState,{isConnected:!1,connectionStatus:"disconnected",error:this.chatUnavailableReason})}})}handleError(e,t){let n=e.message;this.logger.error("Conversation error:",{message:n,raw:t,error:e}),this.addMessage(n,"system"),this.resetState(),this.updateState(this.textState,{error:n,connectionStatus:"error"})}async setMode(e){this.agentMode.value!==e&&(this.agentMode.value=e)}async startTextConversation(e={}){if(this.isConnecting){this.logger.info("Text conversation already connecting, ignoring duplicate request");return}this.isConnecting=!0,this.isTextMode=!0,this.updateState(this.textState,{isActive:!0,connectionStatus:"connecting"});try{if(!this.chatEnabled){this.isConnecting=!1,this.updateState(this.textState,{isConnected:!1,connectionStatus:"disconnected",error:this.chatUnavailableReason});return}this.isConnecting=!1,this.updateState(this.textState,{isConnected:!0,connectionStatus:"connected"}),e.onConnect?.(),this.logger.info("Text conversation ready")}catch(t){throw this.isConnecting=!1,this.handleError(t),t}}async endConversation(){if(this.turnEpoch+=1,this.runningStreamToken=void 0,this.suppressedStreamTokens.clear(),this.queuedMessageIdSet.value=new Set,!this.isTextMode){this.resetState();return}try{this.conversationId=void 0,this.resetState(),this.isTextMode=!1}catch{this.isTextMode=!1}}async sendChatMessage(e,t){if(!this.isTextMode)return;let{chatStreamFn:n}=this.settings;if(!this.chatEnabled){this.addOfflineSystemReply();return}if(this.textState.value.sendBlockedReason==="agent_deleted")return;let{sdk:i}=this.settings;if(!n&&!this._agent.handle.value){this.handleError(Error("Agent handle required for chat"));return}let r=this.textState.value.isThinking,o=this.sharedMessages.value.length;this.addMessage(e,"user",t);let a=this.sharedMessages.value.length>o?this.sharedMessages.value[this.sharedMessages.value.length-1]?.id:void 0,s=this.turnEpoch,c=++this.nextStreamToken;r&&a?this.queuedMessageIdSet.value=new Set(this.queuedMessageIdSet.value).add(a):(this.runningStreamToken=c,this.resetWorkJournalTiming(),this.updateState(this.textState,{isThinking:!0,workingDescription:void 0,toolActivities:[],transientIssue:void 0,turnOutcome:void 0}));let u=`stream-${Date.now()}-${c}`,d=!1,p=!1,m=()=>s===this.turnEpoch&&!this.suppressedStreamTokens.has(c),f=()=>{this.runningStreamToken!==c&&(this.runningStreamToken=c,this.consumeQueuedThrough(a),this.resetWorkJournalTiming(),this.updateState(this.textState,{isThinking:!0,workingDescription:void 0,toolActivities:[],transientIssue:void 0,turnOutcome:void 0}))},S=($,F="assistant")=>{if(!m())return;f(),this.updateState(this.textState,{workingDescription:void 0}),F==="assistant"&&(this.lastVisibleProgressAtMs.value=Date.now()),d||(d=!0,this.liveStreamMessageId.value=u,this.sharedMessages.value=[...this.sharedMessages.value,{id:u,text:"",sender:F==="system"?"system":"agent",timestamp:new Date().toISOString()}]);let se=this.liveSegments.value,he=se[se.length-1];this.liveSegments.value=he?.kind==="text"?[...se.slice(0,-1),{kind:"text",content:he.content+$}]:[...se,{kind:"text",content:$}];let te=this.sharedMessages.value,W=te[te.length-1];W?.id===u&&(W.text+=$,this.sharedMessages.value=[...te])},z=$=>{if(!m())return;if(f(),p=!0,$.sender==="agent"&&Zs($.text)){this.liveSegments.value=[],this.liveStreamMessageId.value=void 0,this.sharedMessages.value=this.sharedMessages.value.filter(de=>de.id!==u);return}d=!0;let F=$.sender==="system"||$.turnOutcome==="failed"?"failed":"completed";this.finishToolActivities(F);let se=this.textState.value.toolActivities,he=$.toolActivities?.length||!se?.length?$:{...$,toolActivities:se};this.liveSegments.value=[],this.liveStreamMessageId.value=void 0,this.updateState(this.textState,{workingDescription:void 0,toolActivities:[],turnOutcome:void 0});let te=this.sharedMessages.value,W=te.findIndex(de=>de.id===he.id);if(W>=0)this.sharedMessages.value=[...te.slice(0,W),he,...te.slice(W+1)];else{let de=te[te.length-1];this.sharedMessages.value=de?.id===u?[...te.slice(0,-1),he]:[...te,he]}he.sender==="system"&&he.issue?.bucket==="account"?this.updateState(this.textState,{sendBlockedReason:"account"}):he.sender==="system"&&he.issue?.code&&c2.has(he.issue.code)&&this.updateState(this.textState,{sendBlockedReason:"agent_deleted"})},T=$=>{if(!m())return;if(!d&&!p){L("empty_stream \u2014 assistant returned no content");return}this.finishToolActivities("completed");let F=this.sharedMessages.value,se=F[F.length-1];se?.id===u&&se.sender==="agent"&&Zs(se.text)&&(this.sharedMessages.value=F.slice(0,-1)),$&&(this.conversationId=$),this.updateState(this.textState,{isThinking:!1,workingDescription:void 0,transientIssue:void 0}),this.settings.onTurnCompleted?.($)},L=$=>{if(!m())return;if(this.runningStreamToken!==c){this.consumeQueuedThrough(a),this.sharedMessages.value=this.sharedMessages.value.filter(W=>W.id!==a),this.composerState.value.text||(this.composerState.value={...this.composerState.value,text:e,pendingAttachments:t??[]});return}this.updateState(this.textState,{workingDescription:void 0,turnOutcome:"failed"}),this.finishToolActivities("failed");let F=this.sharedMessages.value,se=F[F.length-1];if(se?.id===u&&!se.text&&(this.sharedMessages.value=F.slice(0,-1)),typeof $=="object"&&$.code&&$.error){let W=dO($);W.surface==="transient"?this.updateState(this.textState,{isThinking:!1,transientIssue:W.issue}):W.surface==="transcript"?(this.addMessage(pO($),"system",void 0,W.issue),this.updateState(this.textState,{isThinking:!1,...W.sendBlockedReason?{sendBlockedReason:W.sendBlockedReason}:{}})):this.handleError(Error($.error));return}let he=typeof $=="string"?$:$.error,te=this.mapChatError(he);this.isTransientError(he)?(this.logger.warn("Chat turn failed (transient):",{raw:he,friendly:te}),this.addMessage(te,"system"),this.updateState(this.textState,{isThinking:!1})):this.handleError(Error(te),he)},j=$=>{if(!m())return;f();let F=$.trim();this.updateState(this.textState,{workingDescription:F||void 0})},D=$=>{if(m()){if(f(),this.lastVisibleProgressAtMs.value=Date.now(),$.status==="started"){let F=this.liveSegments.value,se=F[F.length-1];se?.kind==="work"?se.activityIds.includes($.activityId)||(this.liveSegments.value=[...F.slice(0,-1),{kind:"work",activityIds:[...se.activityIds,$.activityId]}]):this.liveSegments.value=[...F,{kind:"work",activityIds:[$.activityId]}]}this.updateToolActivity($)}},U=()=>{m()&&this.updateState(this.textState,{workingDescription:void 0})};try{this.settings.onTurnStarted?.(),await(n?n({message:e,attachments:t,conversationId:this.conversationId,history:this.buildHistory(),onDelta:S,onMessage:z,onDone:T,onError:L,onStatus:j,onToolActivity:D,onWorkingEnd:U}):i.chat.chatStreamPublic({handle:this._agent.handle.value,message:e,attachments:t,anonymousId:i.user.generateAnonId(),context:this.getDynamicSettings().context||void 0,onDelta:S,onMessage:z,onDone:T,onError:L,onStatus:j,onToolActivity:D,onWorkingEnd:U}))}catch($){L($.message||"Something went wrong")}}async stopChatTurn(){if(this.textState.value.isThinking){this.runningStreamToken!==void 0&&this.suppressedStreamTokens.add(this.runningStreamToken),this.runningStreamToken=void 0,this.updateState(this.textState,{isThinking:!1,turnOutcome:"stopped",workingDescription:void 0,transientIssue:void 0});try{await this.settings.cancelChatTurnFn?.({conversationId:this.conversationId})}catch(e){this.logger.warn("stopChatTurn: cancel failed",{conversationId:this.conversationId,error:e instanceof Error?e.message:String(e)})}}}buildHistory(){return this.sharedMessages.value.filter(e=>e.sender==="user"||e.sender==="agent").slice(-20).map(e=>({role:e.sender==="user"?"user":"assistant",content:e.text,...e.attachments?.length?{attachments:e.attachments}:{}})).filter(e=>e.content.length>0||e.attachments&&e.attachments.length>0)}loadMessages(e){this.conversationId=e.conversationId;let t=this.sharedMessages.value,n=e.messages.filter(i=>i.sender!=="agent"||!Zs(i.text));this.sharedMessages.value=[...n,...t],e.activeToolActivities?.length&&(e.activeToolActivities.forEach(i=>this.rememberToolActivity(i)),this.updateState(this.textState,{isThinking:!0,workingDescription:void 0,toolActivities:e.activeToolActivities,transientIssue:void 0}))}async destroy(){this.clearBoundaryTimer(),this.voiceRecorder.teardown(),await this.endConversation()}};fO={key:0,class:"absolute inset-0 flex items-center justify-center"},pa=Ae({__name:"ElAgentButton",props:{theme:{default:"primary"},size:{default:"lg"},loading:{type:Boolean,default:!1},icon:{},iconAfter:{}},setup(e){let t=N(()=>({primary:"bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",green:"bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",red:"bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",default:"bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20",dark:"bg-theme-900 border-transparent hover:bg-theme-800"})[e.theme]),n=N(()=>({sm:"px-4 py-2 text-sm",md:"px-6 py-3 text-base",lg:"px-8 py-4 text-base"})[e.size]),i=N(()=>({sm:"size-4",md:"size-4",lg:"size-5"})[e.size]);return(r,o)=>(v(),x("button",{class:V(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",[t.value,n.value]])},[e.loading?(v(),x("div",fO,[...o[0]||(o[0]=[y("i",{class:"i-svg-spinners-90-ring-with-bg size-5"},null,-1)])])):Y("",!0),y("span",{class:V(["flex items-center gap-2 transition-opacity duration-200",e.loading?"opacity-0":"opacity-100"])},[e.icon?(v(),x("i",{key:0,class:V([e.icon,i.value])},null,2)):Y("",!0),er(r.$slots,"default"),e.iconAfter?(v(),x("i",{key:1,class:V([e.iconAfter,i.value])},null,2)):Y("",!0)],2)],2))}}),hO=["value"],Td=Ae({__name:"AgentInputEmail",props:{modelValue:{default:""}},emits:["update:modelValue"],setup(e,{emit:t}){let n=t;return(i,r)=>(v(),x("input",{name:"username",type:"email",inputmode:"email",autocomplete:"username",autocapitalize:"off",autocorrect:"off",spellcheck:"false",placeholder:"Enter your email",value:e.modelValue,class:"w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",style:{"font-size":"16px"},onInput:r[0]||(r[0]=o=>n("update:modelValue",o.target.value))},null,40,hO))}}),gO=["placeholder","value"],zd=Ae({__name:"AgentInputOneTimeCode",props:{modelValue:{},length:{},focusFirst:{type:Boolean}},emits:["update:modelValue","autoSubmit"],setup(e,{emit:t}){let n=e,i=t,r=G(null),o=N(()=>"0".repeat(n.length));It(()=>{n.focusFirst&&!("ontouchstart"in window)&&r.value?.focus()});function a(s){let c=s.target.value.replace(/\D/g,"").slice(0,n.length);i("update:modelValue",c),c.length===n.length&&i("autoSubmit",c)}return(s,c)=>(v(),x("input",{ref_key:"input",ref:r,name:"one-time-code",type:"text",inputmode:"numeric",autocomplete:"one-time-code",autocapitalize:"off",autocorrect:"off",spellcheck:"false",enterkeyhint:"done",placeholder:o.value,value:e.modelValue,class:"w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",style:{"font-size":"16px"},onInput:a},null,40,gO))}}),vO={class:"relative flex-shrink-0"},bO=["src","alt"],yO={class:"absolute top-1 right-1"},xO={key:1,class:"size-3 bg-theme-400 rounded-full ring-2 ring-white"},wO={class:"min-w-0"},Nd=Ae({__name:"ElModeHeader",props:{agent:{},size:{default:"md"},isOnline:{type:Boolean,default:!1},layout:{default:"centered"}},setup(e){return(t,n)=>(v(),x("div",{class:V(["flex gap-4",[e.layout==="centered"?"flex-col items-center text-center":"flex-row items-center justify-center"]])},[y("div",vO,[y("div",{class:V(["rounded-full overflow-hidden border-white",e.size==="lg"?"w-20 h-20 sm:w-24 sm:h-24 border-4":"w-16 sm:size-16 border-2"])},[y("img",{src:e.agent.avatarUrl.value,alt:e.agent.displayName.value,class:"w-full h-full object-cover",onError:n[0]||(n[0]=(...i)=>Ie(sl)&&Ie(sl)(...i))},null,40,bO)],2),y("div",yO,[e.isOnline?(v(),x(ge,{key:0},[n[1]||(n[1]=y("div",{class:"size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",style:{"animation-duration":"3s"}},null,-1)),n[2]||(n[2]=y("div",{class:"size-3 bg-green-500 rounded-full ring-2 ring-white"},null,-1))],64)):(v(),x("div",xO))])]),y("div",wO,[y("h1",{class:V(["font-light text-white mb-1 truncate",[e.size==="lg"?"text-3xl mb-2":"text-xl sm:text-2xl tracking-wide leading-tight",e.layout==="horizontal"?"text-white/95":""]])},ce(e.agent.displayName.value),3),y("p",{class:V(["font-light line-clamp-1",[e.size==="lg"?"text-base text-white/60":"text-sm sm:text-base",e.layout==="horizontal"?"text-white/70 truncate":"text-white/60"]])},ce(e.layout==="horizontal"?e.agent.title.value||"Assistant":e.agent.title.value),3)])],2))}}),kO={class:"relative shrink-0 rounded-full"},_O=["src","alt"],$O=["src","alt"],SO=["aria-label"],_b=Ae({__name:"AgentAvatar",props:{agent:{},showStatus:{type:Boolean,default:!0},showOwnerMark:{type:Boolean,default:!0},isLight:{type:Boolean,default:!0}},setup(e){let t={green:"bg-green-500",amber:"bg-amber-500",red:"bg-red-500",grey:"bg-theme-300"},n=N(()=>{let o=e.agent.state.value;return e.showStatus&&o.lifecycle!=="unknown"?t[o.color]:null}),i={width:"clamp(7px, 14%, 14px)",height:"clamp(7px, 14%, 14px)",top:"calc(14.6% - clamp(3.5px, 7%, 7px))",right:"calc(14.6% - clamp(3.5px, 7%, 7px))"},r=N(()=>e.isLight?"ring-white":"ring-theme-900");return(o,a)=>(v(),x("div",kO,[y("img",{src:e.agent.avatarUrl.value,alt:e.agent.displayName.value,class:V(["size-full rounded-full object-cover ring-1",e.isLight?"ring-black/5":"ring-white/10"])},null,10,_O),e.showOwnerMark&&e.agent.ownerMarkUrl.value?(v(),x("img",{key:0,src:e.agent.ownerMarkUrl.value,alt:e.agent.owner.value?.fullName?`Owned by ${e.agent.owner.value.fullName}`:"Owner",class:V(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2",r.value])},null,10,$O)):Y("",!0),n.value?(v(),x("span",{key:1,role:"status","aria-label":e.agent.state.value.tooltip,class:V(["absolute z-10 rounded-full ring-2",[n.value,r.value]]),style:i},null,10,SO)):Y("",!0),n.value&&e.agent.state.value.lifecycle==="running"?(v(),x("span",{key:2,"aria-hidden":"true",class:V(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]",n.value]),style:i},null,2)):Y("",!0)]))}}),EO={key:0,class:"sr-only",role:"status","aria-live":"polite"},IO=["aria-expanded","disabled"],TO=["aria-expanded"],zO={class:"flex w-5 shrink-0 justify-center self-stretch","aria-hidden":"true"},NO=["data-journal-row"],CO={class:"flex w-5 shrink-0 flex-col items-center self-stretch","aria-hidden":"true"},AO={class:"flex h-[17px] shrink-0 items-center"},OO={key:0,class:"sr-only"},pb=Ae({__name:"AgentToolActivityGroup",props:{model:{},isLight:{type:Boolean}},setup(e){let t=e,n=Ye(!1);function i(){n.value=!n.value}let r=N(()=>t.model.outcome==="completed"),o=N(()=>t.model.hiddenRows.length),a=N(()=>t.model.hint??(t.model.terminal?.tone==="active"?t.model.terminal.label:void 0)),s=N(()=>{let d=t.model;return r.value?n.value?d.hiddenRows:[]:[...n.value?d.hiddenRows:[],...d.visibleRows,...d.terminal?[d.terminal]:[]]}),c=N(()=>t.isLight?{spine:"bg-theme-200",dashed:"border-theme-300",doneMark:"text-theme-400",activeLine:"text-theme-900",stoppedSquare:"bg-theme-500",muted:"text-theme-500",ring:"focus-visible:ring-theme-900"}:{spine:"bg-white/15",dashed:"border-white/25",doneMark:"text-white/45",activeLine:"text-white",stoppedSquare:"bg-white/55",muted:"text-white/55",ring:"focus-visible:ring-white"}),u=N(()=>{let d=t.isLight;return{done:{statusWord:"completed",label:d?"text-[12.5px] text-theme-500":"text-[12.5px] text-white/55",station:{tag:"i",class:`i-tabler-check size-3 ${c.value.doneMark}`}},active:{statusWord:"in progress",label:d?"text-[13px] font-medium text-theme-900":"text-[13px] font-medium text-white",station:{tag:"span",class:`chat-pulse-dot size-1.5 rounded-full bg-current ${c.value.activeLine}`}},failed:{statusWord:"failed",label:"text-[12.5px] font-medium text-red-600",station:{tag:"i",class:"i-tabler-alert-circle size-3.5 text-red-600"}},stopped:{label:d?"text-[13px] font-medium text-theme-600":"text-[13px] font-medium text-white/70",station:{tag:"span",class:`size-[9px] rounded-[2px] ${c.value.stoppedSquare}`}},completed:{label:d?"text-[12.5px] text-theme-500":"text-[12.5px] text-white/55",station:{tag:"i",class:"i-tabler-circle-check size-3.5 text-green-600"}}}});return(d,p)=>(v(),x("div",{class:V(["w-full py-0.5",c.value.muted])},[a.value?(v(),x("span",EO,ce(a.value),1)):Y("",!0),r.value?(v(),x("button",{key:1,type:"button","data-test":"messaging-tool-activity-summary","data-journal-disclosure":"","aria-expanded":n.value,disabled:o.value===0,class:V(["flex min-h-11 items-center gap-x-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-default",c.value.ring]),onClick:i},[p[0]||(p[0]=y("i",{"data-journal-station":"completed",class:"i-tabler-circle-check size-3.5 shrink-0 text-green-600","aria-hidden":"true"},null,-1)),y("span",{class:V(["text-[12.5px] font-medium leading-none",c.value.muted])},ce(e.model.terminal?.label),3),o.value?(v(),x("i",{key:0,class:V(["size-[13px] shrink-0",[n.value?"i-tabler-chevron-down":"i-tabler-chevron-right",c.value.muted]]),"aria-hidden":"true"},null,2)):Y("",!0)],10,IO)):o.value?(v(),x("button",{key:2,type:"button","data-test":"messaging-tool-activity-summary","data-journal-disclosure":"","aria-expanded":n.value,class:V(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",c.value.ring]),onClick:i},[y("span",zO,[y("span",{"data-journal-spine":"dashed",class:V(["w-0 border-l border-dashed",c.value.dashed])},null,2)]),y("span",{class:V(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none",c.value.muted])},[xt(ce(o.value)+" earlier updates ",1),y("i",{class:V(["size-3 shrink-0",n.value?"i-tabler-chevron-down":"i-tabler-chevron-right"]),"aria-hidden":"true"},null,2)],2)],10,TO)):Y("",!0),(v(!0),x(ge,null,et(s.value,(m,f)=>(v(),x("div",{key:m.id,"data-test":"messaging-tool-activity-row","data-journal-row":m.tone,class:V([r.value?"pl-[22px]":"","flex gap-x-2.5"])},[y("div",CO,[y("span",AO,[(v(),Fe(L1(u.value[m.tone].station.tag),{"data-journal-station":m.tone,class:V(u.value[m.tone].station.class)},null,8,["data-journal-station","class"]))]),f===s.value.length-1?Y("",!0):(v(),x("span",{key:0,class:V(["w-px flex-1",c.value.spine])},null,2))]),y("div",{class:V(["min-w-0 flex-1",f===s.value.length-1?"":"pb-2"])},[y("span",{class:V(["relative block leading-snug",u.value[m.tone].label])},[xt(ce(m.label),1),u.value[m.tone].statusWord?(v(),x("span",OO,", "+ce(u.value[m.tone].statusWord),1)):Y("",!0)],2),m.note?(v(),x("p",{key:0,class:V(["pt-0.5 text-[11.5px] leading-snug",c.value.muted])},ce(m.note),3)):Y("",!0)],2)],10,NO))),128)),!r.value&&e.model.hint?(v(),x("p",{key:3,"data-test":"messaging-tool-activity-hint",class:V(["pl-[30px] pt-2.5 text-[12px] leading-snug",c.value.muted])},ce(e.model.hint),3)):Y("",!0)],2))}});d2=Object.entries,DE=Object.setPrototypeOf,jO=Object.isFrozen,LO=Object.getPrototypeOf,VO=Object.getOwnPropertyDescriptor,Ut=Object.freeze,jt=Object.seal,la=Object.create,p2=typeof Reflect<"u"&&Reflect,$b=p2.apply,Sb=p2.construct;Ut||(Ut=function(t){return t}),jt||(jt=function(t){return t}),$b||($b=function(t,n){var i=[...arguments].slice(2);return t.apply(n,i)}),Sb||(Sb=function(t){return new t(...[...arguments].slice(1))});oa=$t(Array.prototype.forEach),FO=$t(Array.prototype.lastIndexOf),PE=$t(Array.prototype.pop),aa=$t(Array.prototype.push),BO=$t(Array.prototype.splice),ui=Array.isArray,ol=$t(String.prototype.toLowerCase),mb=$t(String.prototype.toString),RE=$t(String.prototype.match),el=$t(String.prototype.replace),ME=$t(String.prototype.indexOf),ZO=$t(String.prototype.trim),HO=$t(Number.prototype.toString),KO=$t(Boolean.prototype.toString),UE=typeof BigInt>"u"?null:$t(BigInt.prototype.toString),jE=typeof Symbol>"u"?null:$t(Symbol.prototype.toString),Ct=$t(Object.prototype.hasOwnProperty),tl=$t(Object.prototype.toString),Nt=$t(RegExp.prototype.test),Vi=WO(TypeError);LE=Ut("a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")),fb=Ut("svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")),hb=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),YO=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gb=Ut("math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")),XO=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),VE=Ut(["#text"]),FE=Ut("accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")),vb=Ut("accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")),BE=Ut("accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")),bd=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),QO=jt(/{{[\w\W]*|^[\w\W]*}}/g),e3=jt(/<%[\w\W]*|^[\w\W]*%>/g),t3=jt(/\${[\w\W]*/g),r3=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),n3=jt(/^aria-[\-\w]+$/),ZE=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),i3=jt(/^(?:\w+script|data):/i),o3=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),a3=jt(/^html$/i),s3=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),HE=jt(/<[/\w!]/g),KE=jt(/<[/\w]/g),l3=jt(/<\/no(script|embed|frames)/i),c3=jt(/\/>/i),hr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},u3=function(){return typeof window>"u"?null:window},d3=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},WE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},si=function(t,n,i,r){return Ct(t,n)&&ui(t[n])?Me(r.base?tr(r.base):{},t[n],r.transform):i};f2=m2();Zi=Nb();Bi={exec:()=>null};p3=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Ft={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:sa(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:sa(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:sa(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:sa(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:sa(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:sa(e=>RegExp(`^ {0,${e}}>`))},m3=/^(?:[ \t]*(?:\n|$))+/,f3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,cl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,g3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cb=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,h2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,g2=Ue(h2).replace(/bull/g,Cb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),v3=Ue(h2).replace(/bull/g,Cb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ab=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,b3=/^[^\n]+/,Ob=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,y3=Ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ob).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x3=Ue(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Cb).getRegex(),Cd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Db=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w3=Ue("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Db).replace("tag",Cd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v2=e=>Ue(Ab).replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex(),k3=v2(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),_3=v2(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Pb={blockquote:Ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_3).getRegex(),code:f3,def:y3,fences:h3,heading:g3,hr:cl,html:w3,lheading:g2,list:x3,newline:m3,paragraph:k3,table:Bi,text:b3},JE=Ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex(),$3={...Pb,lheading:v3,table:JE,paragraph:Ue(Ab).replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",JE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex()},S3={...Pb,html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Db).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ue(Ab).replace("hr",cl).replace("heading",` *#{1,6} *[^
114
+ `:"";return{context:`${this.settings.context||""}${i}`.trim(),firstMessage:this.settings.firstMessage||""}}updateState(e,t){e.value={...e.value,...t}}resetWorkJournalTiming(){this.toolActivityTiming.value={},this.lastVisibleProgressAtMs.value=void 0,this.liveSegments.value=[],this.liveStreamMessageId.value=void 0,this.clearBoundaryTimer()}resetState(){this.resetWorkJournalTiming(),this.updateState(this.textState,{isActive:!1,isConnected:!1,isThinking:!1,connectionStatus:"disconnected",error:void 0,sendBlockedReason:void 0,workingDescription:void 0,toolActivities:void 0,turnOutcome:void 0})}setupBoundaryWatcher(){lt(()=>this.workJournal.value?.nextBoundaryAtMs,e=>{this.scheduleBoundary(e)})}scheduleBoundary(e){if(this.clearBoundaryTimer(),e===void 0)return;let t=Math.max(0,e-Date.now());this.boundaryTimer=setTimeout(()=>{this.boundaryTimer=void 0,this.nowMs.value=Date.now()},t),this.boundaryTimer.unref?.()}clearBoundaryTimer(){this.boundaryTimer&&(clearTimeout(this.boundaryTimer),this.boundaryTimer=void 0)}rememberToolActivity(e){let t=vd(e.startedAt)??this.toolActivityTiming.value[e.activityId]?.startedAt??(e.status==="started"?Date.now():void 0),n=vd(e.endedAt)??this.toolActivityTiming.value[e.activityId]?.endedAt??(e.status==="started"?void 0:Date.now());t&&(this.toolActivityTiming.value={...this.toolActivityTiming.value,[e.activityId]:{startedAt:t,...n?{endedAt:n}:{}}})}withToolActivityTiming(e){let t=this.toolActivityTiming.value[e.activityId],n=Date.now(),i=vd(e.startedAt)??t?.startedAt??(e.status==="started"?n:void 0),r=vd(e.endedAt)??t?.endedAt??(e.status==="started"?void 0:n);return{...e,...i!==void 0&&!e.startedAt?{startedAt:new Date(i).toISOString()}:{},...r!==void 0&&!e.endedAt?{endedAt:new Date(r).toISOString()}:{}}}updateToolActivity(e){let t=this.textState.value.toolActivities??[],n=t.findIndex(o=>o.activityId===e.activityId),i=this.withToolActivityTiming({...n>=0?t[n]:{},...e}),r=n>=0?[...t.slice(0,n),i,...t.slice(n+1)]:[...t,i];this.rememberToolActivity(i),this.updateState(this.textState,{toolActivities:r})}finishToolActivities(e){let t=this.textState.value.toolActivities;if(!t?.length)return;let n=t.map(i=>i.status==="started"?this.withToolActivityTiming({...i,status:e}):i);n.forEach(i=>this.rememberToolActivity(i)),this.updateState(this.textState,{toolActivities:n})}workJournalFor(e){if(e.activities?.length)return kb({activities:e.activities,outcome:e.outcome,nowMs:this.nowMs.value,canNotifyOnCompletion:!1,includeFailureNote:e.includeFailureNote})}setupModeWatcher(){lt(this.agentMode,async(e,t)=>{this.logger.info(`Mode changed from ${t} to ${e}`),this.isTextMode&&(t==="talk"||t==="chat")&&await this.endConversation()})}setupAvailabilityWatcher(){lt(()=>[this.chatEnabled,this._agent.state.value.lifecycle],([e])=>{if(!(!this.isTextMode||this.isConnecting)){if(e){this.textState.value.isConnected||this.updateState(this.textState,{isConnected:!0,connectionStatus:"connected",error:void 0});return}this.textState.value.isConnected&&this.updateState(this.textState,{isConnected:!1,connectionStatus:"disconnected",error:this.chatUnavailableReason})}})}handleError(e,t){let n=e.message;this.logger.error("Conversation error:",{message:n,raw:t,error:e}),this.addMessage(n,"system"),this.resetState(),this.updateState(this.textState,{error:n,connectionStatus:"error"})}async setMode(e){this.agentMode.value!==e&&(this.agentMode.value=e)}async startTextConversation(e={}){if(this.isConnecting){this.logger.info("Text conversation already connecting, ignoring duplicate request");return}this.isConnecting=!0,this.isTextMode=!0,this.updateState(this.textState,{isActive:!0,connectionStatus:"connecting"});try{if(!this.chatEnabled){this.isConnecting=!1,this.updateState(this.textState,{isConnected:!1,connectionStatus:"disconnected",error:this.chatUnavailableReason});return}this.isConnecting=!1,this.updateState(this.textState,{isConnected:!0,connectionStatus:"connected"}),e.onConnect?.(),this.logger.info("Text conversation ready")}catch(t){throw this.isConnecting=!1,this.handleError(t),t}}async endConversation(){if(this.turnEpoch+=1,this.runningStreamToken=void 0,this.suppressedStreamTokens.clear(),this.queuedMessageIdSet.value=new Set,!this.isTextMode){this.resetState();return}try{this.conversationId=void 0,this.resetState(),this.isTextMode=!1}catch{this.isTextMode=!1}}async sendChatMessage(e,t){if(!this.isTextMode)return;let{chatStreamFn:n}=this.settings;if(!this.chatEnabled){this.addOfflineSystemReply();return}if(this.textState.value.sendBlockedReason==="agent_deleted")return;let{sdk:i}=this.settings;if(!n&&!this._agent.handle.value){this.handleError(Error("Agent handle required for chat"));return}let r=this.textState.value.isThinking,o=this.sharedMessages.value.length;this.addMessage(e,"user",t);let a=this.sharedMessages.value.length>o?this.sharedMessages.value[this.sharedMessages.value.length-1]?.id:void 0,s=this.turnEpoch,c=++this.nextStreamToken;r&&a?this.queuedMessageIdSet.value=new Set(this.queuedMessageIdSet.value).add(a):(this.runningStreamToken=c,this.resetWorkJournalTiming(),this.updateState(this.textState,{isThinking:!0,workingDescription:void 0,toolActivities:[],transientIssue:void 0,turnOutcome:void 0}));let u=`stream-${Date.now()}-${c}`,d=!1,p=!1,m=()=>s===this.turnEpoch&&!this.suppressedStreamTokens.has(c),f=()=>{this.runningStreamToken!==c&&(this.runningStreamToken=c,this.consumeQueuedThrough(a),this.resetWorkJournalTiming(),this.updateState(this.textState,{isThinking:!0,workingDescription:void 0,toolActivities:[],transientIssue:void 0,turnOutcome:void 0}))},S=($,B="assistant")=>{if(!m())return;f(),this.updateState(this.textState,{workingDescription:void 0}),B==="assistant"&&(this.lastVisibleProgressAtMs.value=Date.now()),d||(d=!0,this.liveStreamMessageId.value=u,this.sharedMessages.value=[...this.sharedMessages.value,{id:u,text:"",sender:B==="system"?"system":"agent",timestamp:new Date().toISOString()}]);let se=this.liveSegments.value,he=se[se.length-1];this.liveSegments.value=he?.kind==="text"?[...se.slice(0,-1),{kind:"text",content:he.content+$}]:[...se,{kind:"text",content:$}];let te=this.sharedMessages.value,W=te[te.length-1];W?.id===u&&(W.text+=$,this.sharedMessages.value=[...te])},z=$=>{if(!m())return;if(f(),p=!0,$.sender==="agent"&&Zs($.text)){this.liveSegments.value=[],this.liveStreamMessageId.value=void 0,this.sharedMessages.value=this.sharedMessages.value.filter(de=>de.id!==u);return}d=!0;let B=$.sender==="system"||$.turnOutcome==="failed"?"failed":"completed";this.finishToolActivities(B);let se=this.textState.value.toolActivities,he=$.toolActivities?.length||!se?.length?$:{...$,toolActivities:se};this.liveSegments.value=[],this.liveStreamMessageId.value=void 0,this.updateState(this.textState,{workingDescription:void 0,toolActivities:[],turnOutcome:void 0});let te=this.sharedMessages.value,W=te.findIndex(de=>de.id===he.id);if(W>=0)this.sharedMessages.value=[...te.slice(0,W),he,...te.slice(W+1)];else{let de=te[te.length-1];this.sharedMessages.value=de?.id===u?[...te.slice(0,-1),he]:[...te,he]}he.sender==="system"&&he.issue?.bucket==="account"?this.updateState(this.textState,{sendBlockedReason:"account"}):he.sender==="system"&&he.issue?.code&&c2.has(he.issue.code)&&this.updateState(this.textState,{sendBlockedReason:"agent_deleted"})},T=$=>{if(!m())return;if(!d&&!p){L("empty_stream \u2014 assistant returned no content");return}this.finishToolActivities("completed");let B=this.sharedMessages.value,se=B[B.length-1];se?.id===u&&se.sender==="agent"&&Zs(se.text)&&(this.sharedMessages.value=B.slice(0,-1)),$&&(this.conversationId=$),this.updateState(this.textState,{isThinking:!1,workingDescription:void 0,transientIssue:void 0}),this.settings.onTurnCompleted?.($)},L=$=>{if(!m())return;if(this.runningStreamToken!==c){this.consumeQueuedThrough(a),this.sharedMessages.value=this.sharedMessages.value.filter(W=>W.id!==a),this.composerState.value.text||(this.composerState.value={...this.composerState.value,text:e,pendingAttachments:t??[]});return}this.updateState(this.textState,{workingDescription:void 0,turnOutcome:"failed"}),this.finishToolActivities("failed");let B=this.sharedMessages.value,se=B[B.length-1];if(se?.id===u&&!se.text&&(this.sharedMessages.value=B.slice(0,-1)),typeof $=="object"&&$.code&&$.error){let W=dO($);W.surface==="transient"?this.updateState(this.textState,{isThinking:!1,transientIssue:W.issue}):W.surface==="transcript"?(this.addMessage(pO($),"system",void 0,W.issue),this.updateState(this.textState,{isThinking:!1,...W.sendBlockedReason?{sendBlockedReason:W.sendBlockedReason}:{}})):this.handleError(Error($.error));return}let he=typeof $=="string"?$:$.error,te=this.mapChatError(he);this.isTransientError(he)?(this.logger.warn("Chat turn failed (transient):",{raw:he,friendly:te}),this.addMessage(te,"system"),this.updateState(this.textState,{isThinking:!1})):this.handleError(Error(te),he)},j=$=>{if(!m())return;f();let B=$.trim();this.updateState(this.textState,{workingDescription:B||void 0})},D=$=>{if(m()){if(f(),this.lastVisibleProgressAtMs.value=Date.now(),$.status==="started"){let B=this.liveSegments.value,se=B[B.length-1];se?.kind==="work"?se.activityIds.includes($.activityId)||(this.liveSegments.value=[...B.slice(0,-1),{kind:"work",activityIds:[...se.activityIds,$.activityId]}]):this.liveSegments.value=[...B,{kind:"work",activityIds:[$.activityId]}]}this.updateToolActivity($)}},U=()=>{m()&&this.updateState(this.textState,{workingDescription:void 0})};try{this.settings.onTurnStarted?.(),await(n?n({message:e,attachments:t,conversationId:this.conversationId,history:this.buildHistory(),onDelta:S,onMessage:z,onDone:T,onError:L,onStatus:j,onToolActivity:D,onWorkingEnd:U}):i.chat.chatStreamPublic({handle:this._agent.handle.value,message:e,attachments:t,anonymousId:i.user.generateAnonId(),context:this.getDynamicSettings().context||void 0,onDelta:S,onMessage:z,onDone:T,onError:L,onStatus:j,onToolActivity:D,onWorkingEnd:U}))}catch($){L($.message||"Something went wrong")}}async stopChatTurn(){if(this.textState.value.isThinking){this.runningStreamToken!==void 0&&this.suppressedStreamTokens.add(this.runningStreamToken),this.runningStreamToken=void 0,this.updateState(this.textState,{isThinking:!1,turnOutcome:"stopped",workingDescription:void 0,transientIssue:void 0});try{await this.settings.cancelChatTurnFn?.({conversationId:this.conversationId})}catch(e){this.logger.warn("stopChatTurn: cancel failed",{conversationId:this.conversationId,error:e instanceof Error?e.message:String(e)})}}}buildHistory(){return this.sharedMessages.value.filter(e=>e.sender==="user"||e.sender==="agent").slice(-20).map(e=>({role:e.sender==="user"?"user":"assistant",content:e.text,...e.attachments?.length?{attachments:e.attachments}:{}})).filter(e=>e.content.length>0||e.attachments&&e.attachments.length>0)}loadMessages(e){this.conversationId=e.conversationId;let t=this.sharedMessages.value,n=e.messages.filter(i=>i.sender!=="agent"||!Zs(i.text));this.sharedMessages.value=[...n,...t],e.activeToolActivities?.length&&(e.activeToolActivities.forEach(i=>this.rememberToolActivity(i)),this.updateState(this.textState,{isThinking:!0,workingDescription:void 0,toolActivities:e.activeToolActivities,transientIssue:void 0}))}async destroy(){this.clearBoundaryTimer(),this.voiceRecorder.teardown(),await this.endConversation()}};fO={key:0,class:"absolute inset-0 flex items-center justify-center"},pa=Ae({__name:"ElAgentButton",props:{theme:{default:"primary"},size:{default:"lg"},loading:{type:Boolean,default:!1},icon:{},iconAfter:{}},setup(e){let t=N(()=>({primary:"bg-primary-600 border-primary-400 hover:border-primary-300 hover:bg-primary-500",green:"bg-green-600 border-green-400 hover:border-green-300 hover:bg-green-500",red:"bg-red-600 border-red-400 hover:border-red-300 hover:bg-red-500",default:"bg-white/10 border-white/20 hover:border-white/40 hover:bg-white/20",dark:"bg-theme-900 border-transparent hover:bg-theme-800"})[e.theme]),n=N(()=>({sm:"px-4 py-2 text-sm",md:"px-6 py-3 text-base",lg:"px-8 py-4 text-base"})[e.size]),i=N(()=>({sm:"size-4",md:"size-4",lg:"size-5"})[e.size]);return(r,o)=>(v(),x("button",{class:V(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",[t.value,n.value]])},[e.loading?(v(),x("div",fO,[...o[0]||(o[0]=[y("i",{class:"i-svg-spinners-90-ring-with-bg size-5"},null,-1)])])):Y("",!0),y("span",{class:V(["flex items-center gap-2 transition-opacity duration-200",e.loading?"opacity-0":"opacity-100"])},[e.icon?(v(),x("i",{key:0,class:V([e.icon,i.value])},null,2)):Y("",!0),er(r.$slots,"default"),e.iconAfter?(v(),x("i",{key:1,class:V([e.iconAfter,i.value])},null,2)):Y("",!0)],2)],2))}}),hO=["value"],Td=Ae({__name:"AgentInputEmail",props:{modelValue:{default:""}},emits:["update:modelValue"],setup(e,{emit:t}){let n=t;return(i,r)=>(v(),x("input",{name:"username",type:"email",inputmode:"email",autocomplete:"username",autocapitalize:"off",autocorrect:"off",spellcheck:"false",placeholder:"Enter your email",value:e.modelValue,class:"w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",style:{"font-size":"16px"},onInput:r[0]||(r[0]=o=>n("update:modelValue",o.target.value))},null,40,hO))}}),gO=["placeholder","value"],zd=Ae({__name:"AgentInputOneTimeCode",props:{modelValue:{},length:{},focusFirst:{type:Boolean}},emits:["update:modelValue","autoSubmit"],setup(e,{emit:t}){let n=e,i=t,r=G(null),o=N(()=>"0".repeat(n.length));It(()=>{n.focusFirst&&!("ontouchstart"in window)&&r.value?.focus()});function a(s){let c=s.target.value.replace(/\D/g,"").slice(0,n.length);i("update:modelValue",c),c.length===n.length&&i("autoSubmit",c)}return(s,c)=>(v(),x("input",{ref_key:"input",ref:r,name:"one-time-code",type:"text",inputmode:"numeric",autocomplete:"one-time-code",autocapitalize:"off",autocorrect:"off",spellcheck:"false",enterkeyhint:"done",placeholder:o.value,value:e.modelValue,class:"w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",style:{"font-size":"16px"},onInput:a},null,40,gO))}}),vO={class:"relative flex-shrink-0"},bO=["src","alt"],yO={class:"absolute top-1 right-1"},xO={key:1,class:"size-3 bg-theme-400 rounded-full ring-2 ring-white"},wO={class:"min-w-0"},Nd=Ae({__name:"ElModeHeader",props:{agent:{},size:{default:"md"},isOnline:{type:Boolean,default:!1},layout:{default:"centered"}},setup(e){return(t,n)=>(v(),x("div",{class:V(["flex gap-4",[e.layout==="centered"?"flex-col items-center text-center":"flex-row items-center justify-center"]])},[y("div",vO,[y("div",{class:V(["rounded-full overflow-hidden border-white",e.size==="lg"?"w-20 h-20 sm:w-24 sm:h-24 border-4":"w-16 sm:size-16 border-2"])},[y("img",{src:e.agent.avatarUrl.value,alt:e.agent.displayName.value,class:"w-full h-full object-cover",onError:n[0]||(n[0]=(...i)=>Ie(sl)&&Ie(sl)(...i))},null,40,bO)],2),y("div",yO,[e.isOnline?(v(),x(ge,{key:0},[n[1]||(n[1]=y("div",{class:"size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",style:{"animation-duration":"3s"}},null,-1)),n[2]||(n[2]=y("div",{class:"size-3 bg-green-500 rounded-full ring-2 ring-white"},null,-1))],64)):(v(),x("div",xO))])]),y("div",wO,[y("h1",{class:V(["font-light text-white mb-1 truncate",[e.size==="lg"?"text-3xl mb-2":"text-xl sm:text-2xl tracking-wide leading-tight",e.layout==="horizontal"?"text-white/95":""]])},ce(e.agent.displayName.value),3),y("p",{class:V(["font-light line-clamp-1",[e.size==="lg"?"text-base text-white/60":"text-sm sm:text-base",e.layout==="horizontal"?"text-white/70 truncate":"text-white/60"]])},ce(e.layout==="horizontal"?e.agent.title.value||"Assistant":e.agent.title.value),3)])],2))}}),kO={class:"relative shrink-0 rounded-full"},_O=["src","alt"],$O=["src","alt"],SO=["aria-label"],_b=Ae({__name:"AgentAvatar",props:{agent:{},showStatus:{type:Boolean,default:!0},showOwnerMark:{type:Boolean,default:!0},isLight:{type:Boolean,default:!0}},setup(e){let t={green:"bg-green-500",amber:"bg-amber-500",red:"bg-red-500",grey:"bg-theme-300"},n=N(()=>{let o=e.agent.state.value;return e.showStatus&&o.lifecycle!=="unknown"?t[o.color]:null}),i={width:"clamp(7px, 14%, 14px)",height:"clamp(7px, 14%, 14px)",top:"calc(14.6% - clamp(3.5px, 7%, 7px))",right:"calc(14.6% - clamp(3.5px, 7%, 7px))"},r=N(()=>e.isLight?"ring-white":"ring-theme-900");return(o,a)=>(v(),x("div",kO,[y("img",{src:e.agent.avatarUrl.value,alt:e.agent.displayName.value,class:V(["size-full rounded-full object-cover ring-1",e.isLight?"ring-black/5":"ring-white/10"])},null,10,_O),e.showOwnerMark&&e.agent.ownerMarkUrl.value?(v(),x("img",{key:0,src:e.agent.ownerMarkUrl.value,alt:e.agent.owner.value?.fullName?`Owned by ${e.agent.owner.value.fullName}`:"Owner",class:V(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2",r.value])},null,10,$O)):Y("",!0),n.value?(v(),x("span",{key:1,role:"status","aria-label":e.agent.state.value.tooltip,class:V(["absolute z-10 rounded-full ring-2",[n.value,r.value]]),style:i},null,10,SO)):Y("",!0),n.value&&e.agent.state.value.lifecycle==="running"?(v(),x("span",{key:2,"aria-hidden":"true",class:V(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]",n.value]),style:i},null,2)):Y("",!0)]))}}),EO={key:0,class:"sr-only",role:"status","aria-live":"polite"},IO=["aria-expanded","disabled"],TO=["aria-expanded"],zO={class:"flex w-5 shrink-0 justify-center self-stretch","aria-hidden":"true"},NO=["data-journal-row"],CO={class:"flex w-5 shrink-0 flex-col items-center self-stretch","aria-hidden":"true"},AO={class:"flex h-[17px] shrink-0 items-center"},OO={key:0,class:"sr-only"},pb=Ae({__name:"AgentToolActivityGroup",props:{model:{},isLight:{type:Boolean}},setup(e){let t=e,n=Ye(!1);function i(){n.value=!n.value}let r=N(()=>t.model.outcome==="completed"),o=N(()=>t.model.hiddenRows.length),a=N(()=>t.model.hint??(t.model.terminal?.tone==="active"?t.model.terminal.label:void 0)),s=N(()=>{let d=t.model;return r.value?n.value?d.hiddenRows:[]:[...n.value?d.hiddenRows:[],...d.visibleRows,...d.terminal?[d.terminal]:[]]}),c=N(()=>t.isLight?{spine:"bg-theme-200",dashed:"border-theme-300",doneMark:"text-theme-400",activeLine:"text-theme-900",stoppedSquare:"bg-theme-500",muted:"text-theme-500",ring:"focus-visible:ring-theme-900"}:{spine:"bg-white/15",dashed:"border-white/25",doneMark:"text-white/45",activeLine:"text-white",stoppedSquare:"bg-white/55",muted:"text-white/55",ring:"focus-visible:ring-white"}),u=N(()=>{let d=t.isLight;return{done:{statusWord:"completed",label:d?"text-[12.5px] text-theme-500":"text-[12.5px] text-white/55",station:{tag:"i",class:`i-tabler-check size-3 ${c.value.doneMark}`}},active:{statusWord:"in progress",label:d?"text-[13px] font-medium text-theme-900":"text-[13px] font-medium text-white",station:{tag:"span",class:`chat-pulse-dot size-1.5 rounded-full bg-current ${c.value.activeLine}`}},failed:{statusWord:"failed",label:"text-[12.5px] font-medium text-red-600",station:{tag:"i",class:"i-tabler-alert-circle size-3.5 text-red-600"}},stopped:{label:d?"text-[13px] font-medium text-theme-600":"text-[13px] font-medium text-white/70",station:{tag:"span",class:`size-[9px] rounded-[2px] ${c.value.stoppedSquare}`}},completed:{label:d?"text-[12.5px] text-theme-500":"text-[12.5px] text-white/55",station:{tag:"i",class:"i-tabler-circle-check size-3.5 text-green-600"}}}});return(d,p)=>(v(),x("div",{class:V(["w-full py-0.5",c.value.muted])},[a.value?(v(),x("span",EO,ce(a.value),1)):Y("",!0),r.value?(v(),x("button",{key:1,type:"button","data-test":"messaging-tool-activity-summary","data-journal-disclosure":"","aria-expanded":n.value,disabled:o.value===0,class:V(["flex min-h-11 items-center gap-x-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-default",c.value.ring]),onClick:i},[p[0]||(p[0]=y("i",{"data-journal-station":"completed",class:"i-tabler-circle-check size-3.5 shrink-0 text-green-600","aria-hidden":"true"},null,-1)),y("span",{class:V(["text-[12.5px] font-medium leading-none",c.value.muted])},ce(e.model.terminal?.label),3),o.value?(v(),x("i",{key:0,class:V(["size-[13px] shrink-0",[n.value?"i-tabler-chevron-down":"i-tabler-chevron-right",c.value.muted]]),"aria-hidden":"true"},null,2)):Y("",!0)],10,IO)):o.value?(v(),x("button",{key:2,type:"button","data-test":"messaging-tool-activity-summary","data-journal-disclosure":"","aria-expanded":n.value,class:V(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",c.value.ring]),onClick:i},[y("span",zO,[y("span",{"data-journal-spine":"dashed",class:V(["w-0 border-l border-dashed",c.value.dashed])},null,2)]),y("span",{class:V(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none",c.value.muted])},[xt(ce(o.value)+" earlier updates ",1),y("i",{class:V(["size-3 shrink-0",n.value?"i-tabler-chevron-down":"i-tabler-chevron-right"]),"aria-hidden":"true"},null,2)],2)],10,TO)):Y("",!0),(v(!0),x(ge,null,et(s.value,(m,f)=>(v(),x("div",{key:m.id,"data-test":"messaging-tool-activity-row","data-journal-row":m.tone,class:V([r.value?"pl-[22px]":"","flex gap-x-2.5"])},[y("div",CO,[y("span",AO,[(v(),Fe(L1(u.value[m.tone].station.tag),{"data-journal-station":m.tone,class:V(u.value[m.tone].station.class)},null,8,["data-journal-station","class"]))]),f===s.value.length-1?Y("",!0):(v(),x("span",{key:0,class:V(["w-px flex-1",c.value.spine])},null,2))]),y("div",{class:V(["min-w-0 flex-1",f===s.value.length-1?"":"pb-2"])},[y("span",{class:V(["relative block leading-snug",u.value[m.tone].label])},[xt(ce(m.label),1),u.value[m.tone].statusWord?(v(),x("span",OO,", "+ce(u.value[m.tone].statusWord),1)):Y("",!0)],2),m.note?(v(),x("p",{key:0,class:V(["pt-0.5 text-[11.5px] leading-snug",c.value.muted])},ce(m.note),3)):Y("",!0)],2)],10,NO))),128)),!r.value&&e.model.hint?(v(),x("p",{key:3,"data-test":"messaging-tool-activity-hint",class:V(["pl-[30px] pt-2.5 text-[12px] leading-snug",c.value.muted])},ce(e.model.hint),3)):Y("",!0)],2))}});d2=Object.entries,DE=Object.setPrototypeOf,jO=Object.isFrozen,LO=Object.getPrototypeOf,VO=Object.getOwnPropertyDescriptor,Ut=Object.freeze,jt=Object.seal,la=Object.create,p2=typeof Reflect<"u"&&Reflect,$b=p2.apply,Sb=p2.construct;Ut||(Ut=function(t){return t}),jt||(jt=function(t){return t}),$b||($b=function(t,n){var i=[...arguments].slice(2);return t.apply(n,i)}),Sb||(Sb=function(t){return new t(...[...arguments].slice(1))});oa=$t(Array.prototype.forEach),FO=$t(Array.prototype.lastIndexOf),PE=$t(Array.prototype.pop),aa=$t(Array.prototype.push),BO=$t(Array.prototype.splice),ui=Array.isArray,ol=$t(String.prototype.toLowerCase),mb=$t(String.prototype.toString),RE=$t(String.prototype.match),el=$t(String.prototype.replace),ME=$t(String.prototype.indexOf),ZO=$t(String.prototype.trim),HO=$t(Number.prototype.toString),KO=$t(Boolean.prototype.toString),UE=typeof BigInt>"u"?null:$t(BigInt.prototype.toString),jE=typeof Symbol>"u"?null:$t(Symbol.prototype.toString),Ct=$t(Object.prototype.hasOwnProperty),tl=$t(Object.prototype.toString),Nt=$t(RegExp.prototype.test),Vi=WO(TypeError);LE=Ut("a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")),fb=Ut("svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")),hb=Ut(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),YO=Ut(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),gb=Ut("math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")),XO=Ut(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),VE=Ut(["#text"]),FE=Ut("accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")),vb=Ut("accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")),BE=Ut("accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")),bd=Ut(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),QO=jt(/{{[\w\W]*|^[\w\W]*}}/g),e3=jt(/<%[\w\W]*|^[\w\W]*%>/g),t3=jt(/\${[\w\W]*/g),r3=jt(/^data-[\-\w.\u00B7-\uFFFF]+$/),n3=jt(/^aria-[\-\w]+$/),ZE=jt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),i3=jt(/^(?:\w+script|data):/i),o3=jt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),a3=jt(/^html$/i),s3=jt(/^[a-z][.\w]*(-[.\w]+)+$/i),HE=jt(/<[/\w!]/g),KE=jt(/<[/\w]/g),l3=jt(/<\/no(script|embed|frames)/i),c3=jt(/\/>/i),hr={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},u3=function(){return typeof window>"u"?null:window},d3=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},WE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},si=function(t,n,i,r){return Ct(t,n)&&ui(t[n])?Me(r.base?tr(r.base):{},t[n],r.transform):i};f2=m2();Zi=Nb();Bi={exec:()=>null};p3=((e="")=>{try{return!!RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),Ft={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:sa(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:sa(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:sa(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:sa(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:sa(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:sa(e=>RegExp(`^ {0,${e}}>`))},m3=/^(?:[ \t]*(?:\n|$))+/,f3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,cl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,g3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cb=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,h2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,g2=Ue(h2).replace(/bull/g,Cb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),v3=Ue(h2).replace(/bull/g,Cb).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ab=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,b3=/^[^\n]+/,Ob=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,y3=Ue(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ob).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x3=Ue(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Cb).getRegex(),Cd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Db=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,w3=Ue("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Db).replace("tag",Cd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),v2=e=>Ue(Ab).replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex(),k3=v2(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),_3=v2(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Pb={blockquote:Ue(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",_3).getRegex(),code:f3,def:y3,fences:h3,heading:g3,hr:cl,html:w3,lheading:g2,list:x3,newline:m3,paragraph:k3,table:Bi,text:b3},JE=Ue("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex(),$3={...Pb,lheading:v3,table:JE,paragraph:Ue(Ab).replace("hr",cl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",JE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Cd).getRegex()},S3={...Pb,html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Db).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ue(Ab).replace("hr",cl).replace("heading",` *#{1,6} *[^
115
115
  ]`).replace("lheading",g2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},E3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,I3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,b2=/^( {2,}|\\)\n(?!\s*$)/,T3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ma=/[\p{P}\p{S}]/u,Ad=/[\s\p{P}\p{S}]/u,Rb=/[^\s\p{P}\p{S}]/u,z3=Ue(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ad).getRegex(),y2=/(?!~)[\p{P}\p{S}]/u,N3=/(?!~)[\s\p{P}\p{S}]/u,C3=/(?:[^\s\p{P}\p{S}]|~)/u,A3=Ue(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",p3?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),x2=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,O3=Ue(x2,"u").replace(/punct/g,ma).getRegex(),D3=Ue(x2,"u").replace(/punct/g,y2).getRegex(),w2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",P3=Ue(w2,"gu").replace(/notPunctSpace/g,Rb).replace(/punctSpace/g,Ad).replace(/punct/g,ma).getRegex(),R3=Ue(w2,"gu").replace(/notPunctSpace/g,C3).replace(/punctSpace/g,N3).replace(/punct/g,y2).getRegex(),M3=Ue("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Rb).replace(/punctSpace/g,Ad).replace(/punct/g,ma).getRegex(),U3=Ue(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ma).getRegex(),j3=Ue("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,Rb).replace(/punctSpace/g,Ad).replace(/punct/g,ma).getRegex(),L3=Ue(/\\(punct)/,"gu").replace(/punct/g,ma).getRegex(),V3=Ue(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),F3=Ue(Db).replace("(?:-->|$)","-->").getRegex(),B3=Ue("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",F3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$d=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Z3=Ue(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",$d).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),k2=Ue(/^!?\[(label)\]\[(ref)\]/).replace("label",$d).replace("ref",Ob).getRegex(),_2=Ue(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ob).getRegex(),H3=Ue("reflink|nolink(?!\\()","g").replace("reflink",k2).replace("nolink",_2).getRegex(),qE=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mb={_backpedal:Bi,anyPunctuation:L3,autolink:V3,blockSkip:A3,br:b2,code:I3,del:Bi,delLDelim:Bi,delRDelim:Bi,emStrongLDelim:O3,emStrongRDelimAst:P3,emStrongRDelimUnd:M3,escape:E3,link:Z3,nolink:_2,punctuation:z3,reflink:k2,reflinkSearch:H3,tag:B3,text:T3,url:Bi},K3={...Mb,link:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",$d).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$d).getRegex()},Eb={...Mb,emStrongRDelimAst:R3,emStrongLDelim:D3,delLDelim:U3,delRDelim:j3,url:Ue(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",qE).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ue(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",qE).getRegex()},W3={...Eb,br:Ue(b2).replace("{2,}","*").getRegex(),text:Ue(Eb.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xd={normal:Pb,gfm:$3,pedantic:S3},rl={normal:Mb,gfm:Eb,breaks:W3,pedantic:K3},G3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},YE=e=>G3[e];Sd=class{constructor(e){Z(this,"options",void 0),Z(this,"rules",void 0),Z(this,"lexer",void 0),this.options=e||Zi}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:e2(t[0]);return{type:"code",raw:n,codeBlockStyle:"indented",text:n.replace(this.rules.other.codeRemoveIndent,"")}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],i=Y3(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let i=li(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:li(t[0],`
116
116
  `),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:li(t[0],`
117
117
  `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=li(t[0],`
@@ -129,10 +129,10 @@ ${d}`:d;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
129
129
  `,1)[0],t[1].length),m=e.split(`
130
130
  `,1)[0],f=!p.trim(),S=0;if(this.options.pedantic?(S=2,d=p.trimStart()):f?S=t[1].length+1:(S=p.search(this.rules.other.nonSpaceChar),S=S>4?1:S,d=p.slice(S),S+=t[1].length),f&&this.rules.other.blankLine.test(m)&&(u+=m+`
131
131
  `,e=e.substring(m.length+1),c=!0),!c){let z=this.rules.other.nextBulletRegex(S),T=this.rules.other.hrRegex(S),L=this.rules.other.fencesBeginRegex(S),j=this.rules.other.headingBeginRegex(S),D=this.rules.other.htmlBeginRegex(S),U=this.rules.other.blockquoteBeginRegex(S);for(;e;){let $=e.split(`
132
- `,1)[0],F;if(m=$,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),F=m):F=m.replace(this.rules.other.tabCharGlobal," "),L.test(m)||j.test(m)||D.test(m)||U.test(m)||z.test(m)||T.test(m))break;if(F.search(this.rules.other.nonSpaceChar)>=S||!m.trim())d+=`
133
- `+F.slice(S);else{if(f||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(p)||j.test(p)||T.test(p))break;d+=`
132
+ `,1)[0],B;if(m=$,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),B=m):B=m.replace(this.rules.other.tabCharGlobal," "),L.test(m)||j.test(m)||D.test(m)||U.test(m)||z.test(m)||T.test(m))break;if(B.search(this.rules.other.nonSpaceChar)>=S||!m.trim())d+=`
133
+ `+B.slice(S);else{if(f||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(p)||j.test(p)||T.test(p))break;d+=`
134
134
  `+m}f=!m.trim(),u+=$+`
135
- `,e=e.substring($.length+1),p=F.slice(S)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),r.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),r.raw+=u}let s=r.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c of r.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let u=c.tokens[0];if(c.task&&(u?.type==="text"||u?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(c.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};c.checked=p.checked,r.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=p.raw+c.tokens[0].raw,c.tokens[0].text=p.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(p)):c.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):c.tokens.unshift(p)}}else c.task&&(c.task=!1);if(!r.loose){let d=c.tokens.filter(p=>p.type==="space");r.loose=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw))}}if(r.loose)for(let c of r.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=e2(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:li(t[0],`
135
+ `,e=e.substring($.length+1),p=B.slice(S)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),r.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(d),loose:!1,text:d,tokens:[]}),r.raw+=u}let s=r.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let c of r.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let u=c.tokens[0];if(c.task&&(u?.type==="text"||u?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),u.raw=u.raw.replace(this.rules.other.listReplaceTask,""),u.text=u.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let d=this.rules.other.listTaskCheckbox.exec(c.raw);if(d){let p={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};c.checked=p.checked,r.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=p.raw+c.tokens[0].raw,c.tokens[0].text=p.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(p)):c.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):c.tokens.unshift(p)}}else c.task&&(c.task=!1);if(!r.loose){let d=c.tokens.filter(p=>p.type==="space");r.loose=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw))}}if(r.loose)for(let c of r.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=e2(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:li(t[0],`
136
136
  `),href:i,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=QE(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
137
137
  `):[],o={type:"table",raw:li(t[0],`
138
138
  `),header:[],align:[],rows:[]};if(n.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<n.length;a++)o.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:o.align[a]});for(let a of r)o.rows.push(QE(a,o.header.length).map((s,c)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:o.align[c]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:li(t[0],`
@@ -170,9 +170,9 @@ ${this.parser.parse(e)}</blockquote>
170
170
  ${e}</tr>
171
171
  `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
172
172
  `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${cn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let i=this.parser.parseInline(n),r=XE(e);if(r===null)return i;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+cn(t)+'"'),o+=">"+i+"</a>",o}image({href:e,title:t,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let r=XE(e);if(r===null)return cn(n);e=r;let o=`<img src="${e}" alt="${cn(n)}"`;return t&&(o+=` title="${cn(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:cn(e.text)}},Ub=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Ur=class Tb{constructor(t){Z(this,"options",void 0),Z(this,"renderer",void 0),Z(this,"textRenderer",void 0),this.options=t||Zi,this.options.renderer=this.options.renderer||new Ed,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ub}static parse(t,n){return new Tb(n).parse(t)}static parseInline(t,n){return new Tb(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let i=0;i<t.length;i++){let r=t[i];if(this.options.extensions?.renderers?.[r.type]){let a=r,s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=s||"";continue}}let o=r;switch(o.type){case"space":n+=this.renderer.space(o);break;case"hr":n+=this.renderer.hr(o);break;case"heading":n+=this.renderer.heading(o);break;case"code":n+=this.renderer.code(o);break;case"table":n+=this.renderer.table(o);break;case"blockquote":n+=this.renderer.blockquote(o);break;case"list":n+=this.renderer.list(o);break;case"checkbox":n+=this.renderer.checkbox(o);break;case"html":n+=this.renderer.html(o);break;case"def":n+=this.renderer.def(o);break;case"paragraph":n+=this.renderer.paragraph(o);break;case"text":n+=this.renderer.text(o);break;default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw Error(a)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let i="";for(let r=0;r<t.length;r++){let o=t[r];if(this.options.extensions?.renderers?.[o.type]){let s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=s||"";continue}}let a=o;switch(a.type){case"escape":i+=n.text(a);break;case"html":i+=n.html(a);break;case"link":i+=n.link(a);break;case"image":i+=n.image(a);break;case"checkbox":i+=n.checkbox(a);break;case"strong":i+=n.strong(a);break;case"em":i+=n.em(a);break;case"codespan":i+=n.codespan(a);break;case"br":i+=n.br(a);break;case"del":i+=n.del(a);break;case"text":i+=n.text(a);break;default:{let s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw Error(s)}}}return i}},al=(yd=class{constructor(e){Z(this,"options",void 0),Z(this,"block",void 0),this.options=e||Zi}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Mr.lex:Mr.lexInline}provideParser(e=this.block){return e?Ur.parse:Ur.parseInline}},Z(yd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Z(yd,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),yd),X3=class{constructor(...e){Z(this,"defaults",Nb()),Z(this,"options",this.setOptions),Z(this,"parse",this.parseMarkdown(!0)),Z(this,"parseInline",this.parseMarkdown(!1)),Z(this,"Parser",Ur),Z(this,"Renderer",Ed),Z(this,"TextRenderer",Ub),Z(this,"Lexer",Mr),Z(this,"Tokenizer",Sd),Z(this,"Hooks",al),this.use(...e)}walkTokens(e,t){let n=[];for(let i of e)switch(n=n.concat(t.call(this,i)),i.type){case"table":{let r=i;for(let o of r.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of r.rows)for(let a of o)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{let r=i;n=n.concat(this.walkTokens(r.items,t));break}default:{let r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let a=r[o].flat(1/0);n=n.concat(this.walkTokens(a,t))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw Error("extension name required");if("renderer"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...a){let s=r.renderer.apply(this,a);return s===!1&&(s=o.apply(this,a)),s}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw Error("extension level must be 'block' or 'inline'");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),i.extensions=t),n.renderer){let r=this.defaults.renderer||new Ed(this.defaults);for(let o in n.renderer){if(!(o in r))throw Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,s=n.renderer[a],c=r[a];r[a]=(...u)=>{let d=s.apply(r,u);return d===!1&&(d=c.apply(r,u)),d||""}}i.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Sd(this.defaults);for(let o in n.tokenizer){if(!(o in r))throw Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,s=n.tokenizer[a],c=r[a];r[a]=(...u)=>{let d=s.apply(r,u);return d===!1&&(d=c.apply(r,u)),d}}i.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new al;for(let o in n.hooks){if(!(o in r))throw Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,s=n.hooks[a],c=r[a];al.passThroughHooks.has(o)?r[a]=u=>{if(this.defaults.async&&al.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await s.call(r,u);return c.call(r,p)})();let d=s.call(r,u);return c.call(r,d)}:r[a]=(...u)=>{if(this.defaults.async)return(async()=>{let p=await s.apply(r,u);return p===!1&&(p=await c.apply(r,u)),p})();let d=s.apply(r,u);return d===!1&&(d=c.apply(r,u)),d}}i.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(a){let s=[];return s.push(o.call(this,a)),r&&(s=s.concat(r.call(this,a))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Mr.lex(e,t??this.defaults)}parser(e,t){return Ur.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let i={...n},r={...this.defaults,...i},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&i.async===!1)return o(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(t):t,s=await(r.hooks?await r.hooks.provideLexer(e):e?Mr.lex:Mr.lexInline)(a,r),c=r.hooks?await r.hooks.processAllTokens(s):s;r.walkTokens&&await Promise.all(this.walkTokens(c,r.walkTokens));let u=await(r.hooks?await r.hooks.provideParser(e):e?Ur.parse:Ur.parseInline)(c,r);return r.hooks?await r.hooks.postprocess(u):u})().catch(o);try{r.hooks&&(t=r.hooks.preprocess(t));let a=(r.hooks?r.hooks.provideLexer(e):e?Mr.lex:Mr.lexInline)(t,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let s=(r.hooks?r.hooks.provideParser(e):e?Ur.parse:Ur.parseInline)(a,r);return r.hooks&&(s=r.hooks.postprocess(s)),s}catch(a){return o(a)}}}onError(e,t){return n=>{if(n.message+=`
173
- Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+cn(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},Fi=new X3;We.options=We.setOptions=function(e){return Fi.setOptions(e),We.defaults=Fi.defaults,GE(We.defaults),We},We.getDefaults=Nb,We.defaults=Zi,We.use=function(...e){return Fi.use(...e),We.defaults=Fi.defaults,GE(We.defaults),We},We.walkTokens=function(e,t){return Fi.walkTokens(e,t)},We.parseInline=Fi.parseInline,We.Parser=Ur,We.parser=Ur.parse,We.Renderer=Ed,We.TextRenderer=Ub,We.Lexer=Mr,We.lexer=Mr.lex,We.Tokenizer=Sd,We.Hooks=al,We.parse=We,We.options,We.setOptions,We.use,We.walkTokens,We.parseInline,Ur.parse,Mr.lex;Q3=["aria-label"],e6={class:"px-4 pb-2 pt-4"},t6=["innerHTML"],r6=["onClick"],n6=Ae({__name:"ChatCardBlock",props:{spec:{},inverted:{type:Boolean}},emits:["action"],setup(e,{emit:t}){let n=e,i=t,r=N(()=>{if(!n.spec.body)return"";let m=We.parse(n.spec.body,{async:!1});return f2.sanitize(m,{ADD_ATTR:["target"]})}),o=N(()=>n.inverted?"rgba(255, 255, 255, 0.22)":"rgba(0, 0, 0, 0.16)"),a=N(()=>n.inverted?"rgba(255, 255, 255, 0.12)":"color-mix(in oklch, var(--color-theme-200) 80%, transparent)"),s=N(()=>n.inverted?"rgba(255, 255, 255, 0.95)":"var(--color-theme-900)"),c=N(()=>n.inverted?"rgba(255, 255, 255, 0.8)":"var(--color-theme-800)"),u=N(()=>n.inverted?`inset 0 0 0 1px ${o.value}`:`inset 0 0 0 1px ${o.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`),d=N(()=>n.inverted?"transparent":"var(--color-theme-0)");function p(m){return m==="primary"||m==="destructive"?{background:n.inverted?"rgba(255, 255, 255, 0.92)":"var(--color-theme-900)",color:n.inverted?"var(--color-theme-900)":"#fff"}:{background:"var(--color-theme-100)",color:s.value}}return(m,f)=>(v(),x("div",{"data-test":"chat-card",class:"my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-2xl",style:we({background:d.value,boxShadow:u.value}),"aria-label":e.spec.title},[y("div",e6,[y("div",{class:"text-[14px] font-semibold leading-tight",style:we({color:s.value})},ce(e.spec.title),5)]),r.value?(v(),x("div",{key:0,class:"chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",style:we({color:c.value}),innerHTML:r.value},null,12,t6)):Y("",!0),e.spec.actions?.length?(v(),x("div",{key:1,class:"flex flex-wrap items-center gap-2 px-3 py-2.5",style:we({borderTop:`1px solid ${a.value}`})},[(v(!0),x(ge,null,et(e.spec.actions,S=>(v(),x("button",{key:S.label,type:"button","data-test":"chat-card-action",class:"inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",style:we(p(S.style)),onClick:z=>i("action",S.reply)},ce(S.label),13,r6))),128))],4)):Y("",!0)],12,Q3))}}),r2=112,bb=52,An=14,ca=54,n2=34,i6=260;d6=5.4,p6=10,m6=15,o2=16;h6=["data-visual-type","data-chart-type","data-stacking","data-diagram-type","aria-label"],g6={class:"mb-2.5"},v6=["aria-label"],b6={key:0,"data-test":"chat-visual-horizontal-bars",class:"grid gap-3"},y6={class:"mb-1 flex items-start justify-between gap-3 text-[12px]"},x6=["viewBox"],w6=["x1","x2","y1","y2"],k6=["x","y"],_6=["data-row-index","data-series-index","data-data-key","x","y","width","height"],$6=["data-trend-key","d"],S6=["d"],E6=["cx","cy"],I6=["cx","cy"],T6=["x","y","text-anchor","transform"],z6={key:2,class:"mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"},N6={key:1,class:"grid gap-3"},C6={class:"mb-1 flex items-baseline justify-between gap-3 text-[12px]"},A6={class:"shrink-0 tabular-nums"},O6={key:2,class:"overflow-x-auto"},D6=["viewBox","aria-label"],P6=["data-from","data-to","x1","y1","x2","y2"],R6=["cx","cy"],M6=["x","y"],U6=["data-node-id","data-node-kind","transform"],j6=["points"],L6=["width","height"],V6=["width","height"],F6={xmlns:"http://www.w3.org/1999/xhtml",class:"flex h-full min-w-0 flex-col items-center justify-center text-center"},B6=Ae({__name:"ChatVisualBlock",props:{result:{},inverted:{type:Boolean}},setup(e){let t=e,n=G(),i=Ye(360),r;It(()=>{typeof ResizeObserver>"u"||!n.value||(r=new ResizeObserver(w=>{let _=w[0]?.contentRect.width;_&&(i.value=Math.round(_))}),r.observe(n.value))}),Jo(()=>r?.disconnect());let o=N(()=>Math.min(720,Math.max(280,i.value))),a=N(()=>t.result.ok?t.result.spec:null),s=N(()=>a.value?.visualType==="chart"?a.value:null),c=N(()=>a.value?.visualType==="diagram"?a.value:null);function u(w){return w?.chartType==="bar"||w?.chartType==="line"||w?.chartType==="scatter"}function d(w){return w?.chartType==="pie"}let p=N(()=>s.value?.data??[]),m=N(()=>u(s.value)?s.value:null),f=N(()=>m.value?.series??[]),S=N(()=>d(s.value)?s.value:null),z=N(()=>m.value?.chartType==="bar"&&m.value.stacking==="stacked");function T(w){return typeof w=="number"&&Number.isFinite(w)?w:null}function L(w,_){return String(w[_]??"").trim()}function j(w,_){let b=w.map(A=>L(A,_)).filter(Boolean);if(!b.length)return!1;let C=Math.max(...b.map(A=>A.length)),I=b.reduce((A,oe)=>A+oe.length,0)/b.length;return C>=16||b.length>5&&I>=10}function D(w,_){return w.data.map((b,C)=>{let I=T(b[_]);return I===null?null:{index:C,value:I}}).filter(b=>b!==null)}function U(w){if(w.length<2)return null;let _=w.length,b=w.reduce((ue,fe)=>ue+fe.index,0),C=w.reduce((ue,fe)=>ue+fe.value,0),I=w.reduce((ue,fe)=>ue+fe.index*fe.index,0),A=w.reduce((ue,fe)=>ue+fe.index*fe.value,0),oe=_*I-b*b;if(oe===0)return null;let re=(_*A-b*C)/oe;return{slope:re,intercept:(C-re*b)/_}}let $=N(()=>{let w=[],_=m.value;if(!_)return w;if(_.chartType==="bar"&&_.stacking==="stacked")for(let b of _.data){let C=0,I=0;for(let A of _.series){let oe=T(b[A.dataKey]);oe!==null&&(oe>=0?C+=oe:I+=oe)}w.push(C,I)}else for(let b of _.data)for(let C of _.series){let I=T(b[C.dataKey]);I!==null&&w.push(I)}if(_.trendLine&&(_.chartType==="line"||_.chartType==="scatter")){let b=D(_,_.trendLine.dataKey);w.push(...b.map(I=>I.value));let C=U(b);if(C&&b.length){let I=b[0].index,A=b[b.length-1].index;w.push(C.intercept+C.slope*I,C.intercept+C.slope*A)}}return w});function F(w,_){let b=w>0?w:1,C=Math.floor(Math.log10(b)),I=b/10**C,A;return A=_?I<1.5?1:I<3?2:I<7?5:10:I<=1?1:I<=2?2:I<=5?5:10,A*10**C}let se=N(()=>{let w=$.value,_=w.length?Math.max(0,...w):1,b=w.length?Math.min(0,...w):0;if(b===_)return{min:0,max:_||1,ticks:[0,_||1]};let C=F(F(_-b,!1)/3,!0),I=Math.floor(b/C)*C,A=Math.ceil(_/C)*C,oe=[];for(let re=I;re<=A+C*.5;re+=C)oe.push(Number(re.toFixed(6)));return{min:I,max:A,ticks:oe}}),he=N(()=>c6({series:f.value})),te=N(()=>{let w=m.value;if(!w)return{mode:"horizontal",entries:[]};let _=w.xKey;return f6({labels:w.data.map(b=>String(b?.[_]??"")),plotWidth:Math.max(200,o.value-42)})}),W=N(()=>{let w=he.value?.valueFormat,_=!!(he.value&&(w==="currency"||w==="percent"||he.value.valuePrefix||he.value.valueSuffix)),b=w==="duration"?46:_?38:30,C=te.value.mode==="angled";return{width:o.value,height:168+(C?36:0),left:b,right:12,top:10,bottom:24+(C?36:0)}});function de(w,_){let b=m.value,C=W.value;if(b?.chartType==="bar"){let I=C.width-C.left-C.right;return C.left+(w+.5)*(I/Math.max(_,1))}return ie(w,_)}function ie(w,_){let b=W.value,C=b.width-b.left-b.right;return _<=1?b.left+C/2:b.left+C*w/(_-1)}function ye(w){let{min:_,max:b}=se.value,C=W.value,I=C.height-C.top-C.bottom;return C.top+(b-w)/(b-_||1)*I}function Be(w){let _=m.value;return _?_.data.map((b,C)=>{let I=T(b[w])??0;return`${C===0?"M":"L"} ${ie(C,_.data.length).toFixed(1)} ${ye(I).toFixed(1)}`}).join(" "):""}let mt=N(()=>{let w=m.value;if(!w?.trendLine||w.chartType!=="line"&&w.chartType!=="scatter")return null;let _=D(w,w.trendLine.dataKey),b=U(_);if(!b||!_.length)return null;let C=_[0].index,I=_[_.length-1].index,A=b.intercept+b.slope*C,oe=b.intercept+b.slope*I,re=Math.max(0,w.series.findIndex(ue=>ue.dataKey===w.trendLine?.dataKey));return{path:`M ${ie(C,w.data.length).toFixed(1)} ${ye(A).toFixed(1)} L ${ie(I,w.data.length).toFixed(1)} ${ye(oe).toFixed(1)}`,dataKey:w.trendLine.dataKey,seriesIndex:re}}),ft=N(()=>{let w=m.value;if(!w||w.chartType!=="bar")return[];let _=W.value,b=(_.width-_.left-_.right)/Math.max(w.data.length,1),C=ye(0);if(z.value){let ue=Math.max(4,Math.min(24,b*.42));return w.data.flatMap((fe,_e)=>{let Te=0,ae=0,Ke=_.left+_e*b+(b-ue)/2;return w.series.map((Xe,St)=>{let gt=T(fe[Xe.dataKey])??0,rr=gt>=0?Te:ae,vr=rr+gt,pt=ye(rr),ct=ye(vr);return gt>=0?Te=vr:ae=vr,{key:`${_e}-${Xe.dataKey}`,x:Ke,y:Math.min(pt,ct),width:ue,height:Math.max(1.5,Math.abs(pt-ct)),seriesIndex:St,rowIndex:_e,dataKey:Xe.dataKey}})})}let I=Math.max(w.series.length,1),A=I>1?2:0,oe=Math.max(3,Math.min(20,(b*.62-A*(I-1))/I)),re=oe*I+A*(I-1);return w.data.flatMap((ue,fe)=>w.series.map((_e,Te)=>{let ae=ye(T(ue[_e.dataKey])??0),Ke=_.left+fe*b+(b-re)/2+Te*(oe+A);return{key:`${fe}-${_e.dataKey}`,x:Ke,y:Math.min(ae,C),width:oe,height:Math.max(1.5,Math.abs(C-ae)),seriesIndex:Te,rowIndex:fe,dataKey:_e.dataKey}}))}),je=N(()=>{let w=m.value;if(!w)return[];let _=w.data;if(!_.length)return[];let b=_.length-1,C=te.value,I=C.mode==="angled";return C.entries.map(({index:A,text:oe})=>({key:`${A}`,label:oe,x:de(A,_.length),anchor:I?"end":A===0?"start":A===b?"end":"middle",angled:I})).filter(A=>A.label)}),De=N(()=>{let w=m.value;if(!w||w.chartType!=="bar"||w.series.length!==1||z.value)return[];let _=w.series[0],b=w.data.map((I,A)=>{let oe=L(I,w.xKey),re=T(I[_.dataKey]);return!oe||re===null?null:{key:`${A}-${oe}`,label:oe,rawValue:re}}).filter(I=>I!==null);if(!b.length||b.some(I=>I.rawValue<0)||!(w.layout==="horizontal"||j(w.data,w.xKey)))return[];let C=Math.max(...b.map(I=>I.rawValue),1);return b.map(I=>({key:I.key,label:I.label,value:yb({value:I.rawValue,series:_}),width:I.rawValue<=0?0:Math.max(2,I.rawValue/C*100),seriesIndex:0}))}),Tt=N(()=>{let w=m.value;if(!w?.data.length)return[];let _=w.data[w.data.length-1];return w.series.map((b,C)=>{let I=T(_?.[b.dataKey]);return{key:b.dataKey,label:b.label||b.dataKey,value:I===null?"\u2014":yb({value:I,series:b}),seriesIndex:C}})}),Ze=N(()=>{let w=m.value;if(!w?.data.length||w.chartType!=="line")return[];let _=w.data.length-1,b=w.data[_];return w.series.map((C,I)=>{let A=T(b?.[C.dataKey]);return A===null?null:{key:C.dataKey,cx:ie(_,w.data.length),cy:ye(A),seriesIndex:I}}).filter(C=>C!==null)}),gr=N(()=>{let w=S.value;if(!w)return[];let _=w.data.map(I=>({name:String(I[w.nameKey]??""),value:T(I[w.valueKey])??0})).filter(I=>I.name&&I.value>=0).sort((I,A)=>A.value-I.value),b=_.reduce((I,A)=>I+A.value,0)||1,C=w.series?.[0];return _.map((I,A)=>({...I,key:`${A}-${I.name}`,percent:I.value/b,display:yb({value:I.value,series:C})}))}),ht=N(()=>c.value?l6(c.value,{maxWidth:i.value}):null),vt=["var(--color-theme-900)","var(--color-primary-500)","color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"],Tr=["rgba(255, 255, 255, 0.92)","color-mix(in oklch, white 30%, var(--color-primary-500))","rgba(255, 255, 255, 0.55)"];function wt(w){let _=t.inverted?Tr:vt;return _[w%_.length]}function On(w){return t.inverted?w==="decision"?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.06)":w==="decision"?"color-mix(in oklch, var(--color-primary-500) 6%, var(--color-theme-0))":w==="output"?"color-mix(in oklch, var(--color-theme-900) 5%, var(--color-theme-0))":"var(--color-theme-0)"}function kt(w){return t.inverted?"rgba(255, 255, 255, 0.22)":jr.value}let At=N(()=>t.inverted?"rgba(255, 255, 255, 0.95)":"var(--color-theme-900)"),Bt=N(()=>t.inverted?"rgba(255, 255, 255, 0.6)":"var(--color-theme-500)"),Ge=N(()=>t.inverted?"rgba(255, 255, 255, 0.45)":"color-mix(in oklch, var(--color-theme-900) 42%, transparent)"),Zt=N(()=>t.inverted?"rgba(255, 255, 255, 0.1)":"color-mix(in oklch, var(--color-theme-900) 8%, transparent)"),He=N(()=>t.inverted?"rgba(255, 255, 255, 0.24)":"color-mix(in oklch, var(--color-theme-900) 18%, transparent)"),jr=N(()=>t.inverted?"rgba(255, 255, 255, 0.16)":"color-mix(in oklch, var(--color-theme-300) 55%, transparent)"),h=N(()=>t.inverted?"rgba(255, 255, 255, 0.14)":"color-mix(in oklch, var(--color-theme-900) 10%, transparent)"),k=N(()=>t.inverted?"transparent":"var(--color-theme-0)"),M=N(()=>t.inverted?"rgba(255, 255, 255, 0.18)":"color-mix(in oklch, var(--color-theme-900) 16%, transparent)"),H=N(()=>t.inverted?"rgba(255, 255, 255, 0.12)":"color-mix(in oklch, var(--color-theme-900) 9%, transparent)");return(w,_)=>a.value?(v(),x("section",{key:0,"data-test":"chat-visual","data-visual-type":a.value.visualType,"data-chart-type":s.value?.chartType,"data-stacking":z.value?"stacked":void 0,"data-diagram-type":c.value?.diagramType,class:"my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",style:we({background:k.value,boxShadow:`inset 0 0 0 1px ${h.value}`}),"aria-label":a.value.meta.title},[y("header",g6,[y("h4",{class:"text-[13px] font-semibold leading-tight",style:we({color:At.value})},ce(a.value.meta.title),5),a.value.meta.description?(v(),x("p",{key:0,class:"mt-0.5 text-[12px] leading-snug",style:we({color:Bt.value})},ce(a.value.meta.description),5)):Y("",!0)]),y("div",{ref_key:"bodyEl",ref:n},[m.value?(v(),x("div",{key:0,role:"img","aria-label":a.value.meta.title},[De.value.length?(v(),x("div",b6,[(v(!0),x(ge,null,et(De.value,b=>(v(),x("div",{key:b.key,"data-test":"chat-visual-horizontal-bar",class:"min-w-0"},[y("div",y6,[y("span",{class:"line-clamp-2 min-w-0 font-medium leading-snug",style:we({color:At.value})},ce(b.label),5),y("span",{class:"shrink-0 font-semibold tabular-nums",style:we({color:At.value})},ce(b.value),5)]),y("div",{class:"h-2 w-full overflow-hidden rounded-full",style:we({background:H.value})},[y("div",{class:"h-full rounded-full",style:we({width:`${b.width}%`,background:wt(b.seriesIndex)})},null,4)],4)]))),128))])):(v(),x("svg",{key:1,class:"block h-auto w-full overflow-visible",viewBox:`0 0 ${W.value.width} ${W.value.height}`,style:we({aspectRatio:`${W.value.width} / ${W.value.height}`}),preserveAspectRatio:"xMidYMid meet","aria-hidden":"true"},[(v(!0),x(ge,null,et(se.value.ticks,b=>(v(),x("line",{key:`grid-${b}`,x1:W.value.left,x2:W.value.width-W.value.right,y1:ye(b),y2:ye(b),"stroke-width":"1","vector-effect":"non-scaling-stroke",style:we({stroke:b===0?He.value:Zt.value})},null,12,w6))),128)),y("g",null,[(v(!0),x(ge,null,et(se.value.ticks,b=>(v(),x("text",{key:`y-${b}`,x:W.value.left-7,y:ye(b)+3,"text-anchor":"end","font-size":"9.5",style:we({fill:Ge.value})},ce(Ie(u6)({value:b,shared:he.value})),13,k6))),128))]),m.value.chartType==="bar"?(v(!0),x(ge,{key:0},et(ft.value,b=>(v(),x("rect",{key:b.key,"data-test":"chat-visual-bar","data-row-index":b.rowIndex,"data-series-index":b.seriesIndex,"data-data-key":b.dataKey,x:b.x,y:b.y,width:b.width,height:b.height,rx:"2.5",style:we({fill:wt(b.seriesIndex)})},null,12,_6))),128)):(v(),x(ge,{key:1},[mt.value?(v(),x("path",{key:0,"data-test":"chat-visual-trend-line","data-trend-key":mt.value.dataKey,d:mt.value.path,fill:"none","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"4 3","vector-effect":"non-scaling-stroke",style:we({stroke:wt(mt.value.seriesIndex)})},null,12,$6)):Y("",!0),(v(!0),x(ge,null,et(f.value,(b,C)=>(v(),x("g",{key:b.dataKey},[m.value.chartType==="line"?(v(),x("path",{key:0,d:Be(b.dataKey),fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","vector-effect":"non-scaling-stroke",style:we({stroke:wt(C)})},null,12,S6)):Y("",!0),(v(!0),x(ge,null,et(p.value,(I,A)=>(v(),x(ge,{key:`${b.dataKey}-${A}`},[m.value.chartType==="scatter"?(v(),x("circle",{key:0,cx:ie(A,p.value.length),cy:ye(T(I[b.dataKey])??0),r:"2.6",style:we({fill:wt(C)})},null,12,E6)):Y("",!0)],64))),128))]))),128)),(v(!0),x(ge,null,et(Ze.value,b=>(v(),x("circle",{key:`marker-${b.key}`,cx:b.cx,cy:b.cy,r:"3",style:we({fill:wt(b.seriesIndex)})},null,12,I6))),128))],64)),(v(!0),x(ge,null,et(je.value,b=>(v(),x("text",{key:b.key,x:b.x,y:b.angled?W.value.height-W.value.bottom+12:W.value.height-6,"text-anchor":b.anchor,"font-size":"9.5",transform:b.angled?`rotate(${Ie(-40)} ${b.x} ${W.value.height-W.value.bottom+12})`:void 0,style:we({fill:Ge.value})},ce(b.label),13,T6))),128))],12,x6)),Tt.value.length>1||m.value.chartType!=="bar"?(v(),x("div",z6,[(v(!0),x(ge,null,et(Tt.value,b=>(v(),x("div",{key:b.key,class:"inline-flex items-center gap-1.5 text-[11.5px] leading-none"},[y("span",{class:"size-2.5 shrink-0 rounded-full",style:we({background:wt(b.seriesIndex)})},null,4),y("span",{style:we({color:Bt.value})},ce(b.label),5),y("span",{class:"font-semibold tabular-nums",style:we({color:At.value})},ce(b.value),5)]))),128))])):Y("",!0)],8,v6)):S.value?(v(),x("div",N6,[(v(!0),x(ge,null,et(gr.value,(b,C)=>(v(),x("div",{key:b.key},[y("div",C6,[y("span",{class:"truncate font-medium",style:we({color:At.value})},ce(b.name),5),y("span",A6,[y("span",{class:"font-semibold",style:we({color:At.value})},ce(b.display),5),y("span",{class:"ml-1.5",style:we({color:Bt.value})},ce(Math.round(b.percent*100))+"%",5)])]),y("div",{class:"h-1.5 w-full overflow-hidden rounded-full",style:we({background:H.value})},[y("div",{class:"h-full rounded-full",style:we({width:`${Math.max(2,b.percent*100)}%`,background:wt(C)})},null,4)],4)]))),128))])):c.value&&ht.value?(v(),x("div",O6,[(v(),x("svg",{"data-test":"chat-visual-diagram-svg",class:"block h-auto overflow-visible",viewBox:`0 0 ${ht.value.width} ${ht.value.height}`,style:we({width:`${ht.value.width}px`,aspectRatio:`${ht.value.width} / ${ht.value.height}`}),role:"img","aria-label":a.value.meta.title},[(v(!0),x(ge,null,et(ht.value.edges,b=>(v(),x("line",{key:b.key,"data-test":"chat-visual-diagram-edge","data-from":b.from,"data-to":b.to,x1:b.x1,y1:b.y1,x2:b.x2,y2:b.y2,"stroke-width":"1.4","stroke-linecap":"round","vector-effect":"non-scaling-stroke",style:we({stroke:M.value})},null,12,P6))),128)),(v(!0),x(ge,null,et(ht.value.edges,b=>(v(),x("circle",{key:`${b.key}-dot`,cx:b.x2,cy:b.y2,r:"2.4",style:we({fill:M.value})},null,12,R6))),128)),(v(!0),x(ge,null,et(ht.value.edges.filter(b=>b.label),b=>(v(),x("foreignObject",{key:`${b.key}-label`,x:b.labelX-55,y:b.labelY-12,width:"110",height:"24"},[y("div",{xmlns:"http://www.w3.org/1999/xhtml",class:"flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",style:we({color:Bt.value,background:t.inverted?"var(--color-theme-900)":"var(--color-theme-0)"})},ce(b.label),5)],8,M6))),128)),(v(!0),x(ge,null,et(ht.value.nodes,b=>(v(),x("g",{key:b.id,"data-test":"chat-visual-diagram-node","data-node-id":b.id,"data-node-kind":b.kind,transform:`translate(${b.x} ${b.y})`},[b.kind==="decision"?(v(),x("polygon",{key:0,points:`${b.width/2},0 ${b.width},${b.height/2} ${b.width/2},${b.height} 0,${b.height/2}`,"stroke-width":"1","vector-effect":"non-scaling-stroke",style:we({fill:On(b.kind),stroke:kt(b.kind)})},null,12,j6)):(v(),x("rect",{key:1,width:b.width,height:b.height,rx:"9","stroke-width":"1","vector-effect":"non-scaling-stroke",style:we({fill:On(b.kind),stroke:kt(b.kind)})},null,12,L6)),(v(),x("foreignObject",{x:"8",y:"5",width:b.width-16,height:b.height-10},[y("div",F6,[y("div",{class:"line-clamp-2 text-[13px] font-medium leading-snug",style:we({color:At.value})},ce(b.label),5),b.detail?(v(),x("div",{key:0,class:"mt-0.5 line-clamp-1 text-[10.5px] leading-none",style:we({color:Bt.value})},ce(b.detail),5)):Y("",!0)])],8,V6))],8,U6))),128))],12,D6))])):Y("",!0)],512),a.value.meta.footer?(v(),x("footer",{key:0,class:"mt-3 text-[11px] leading-snug",style:we({color:Ge.value})},ce(a.value.meta.footer),5)):Y("",!0)],12,h6)):Y("",!0)}}),Z6=["innerHTML"],nl=Ae({__name:"ChatRichText",props:{text:{},inverted:{type:Boolean},streaming:{type:Boolean}},emits:["action"],setup(e,{emit:t}){let n=e,i=t,r=Ye(n.text),o;lt([()=>n.text,()=>n.streaming],([z,T])=>{if(!T){o!==void 0&&(cancelAnimationFrame(o),o=void 0),r.value=z;return}o===void 0&&(o=requestAnimationFrame(()=>{o=void 0,r.value=n.text}))}),Jo(()=>{o!==void 0&&cancelAnimationFrame(o)});let a=new We.Renderer;a.link=({href:z,text:T})=>{let L=z.trim();if(!L||L==="#")return T;let j=!1;if(typeof window<"u")try{j=new URL(z,window.location.href).origin===window.location.origin}catch{j=!1}return j?`<a href="${z}">${T}</a>`:`<a href="${z}" target="_blank" rel="noopener noreferrer">${T}</a>`},We.setOptions({breaks:!0,gfm:!0,renderer:a});function s(z){if(!z)return"";let T=We.parse(z,{async:!1});return f2.sanitize(T,{ADD_ATTR:["target"],ADD_DATA_URI_TAGS:["img"]})}function c(z){if(typeof z!="string")return null;let T=z.trim();return T?T.slice(0,80):null}function u(z){try{let T=JSON.parse(z);if(!T||typeof T!="object"||Array.isArray(T))return{topLevelKeys:[],declaredVisualType:null,declaredChartType:null,declaredDiagramType:null,inputType:null};let L=T;return{topLevelKeys:Object.keys(L).sort().slice(0,24),declaredVisualType:c(L.visualType),declaredChartType:c(L.chartType),declaredDiagramType:c(L.diagramType),inputType:c(L.type)}}catch{return{topLevelKeys:[],declaredVisualType:null,declaredChartType:null,declaredDiagramType:null,inputType:null}}}function d(z){if(typeof window>"u")return null;try{return new URL(z.currentSrc||z.src,window.location.href).host||null}catch{return null}}function p(z){typeof HTMLImageElement>"u"||!(z.target instanceof HTMLImageElement)||typeof console<"u"&&console.warn("[chat-image] load_failed",{host:d(z.target),altPresent:!!z.target.alt?.trim(),width:z.target.naturalWidth||null,height:z.target.naturalHeight||null})}let m=/```(?:pl-visual|pl-platform-visual|pl-card)[ \t]*(?:\r?\n|$)/;function f(z){let{text:T,streaming:L}=z,j=[],D=/```(pl-visual|pl-platform-visual|pl-card)[ \t]*\r?\n([\s\S]*?)```/g,U=0,$=0,F=D.exec(T);for(;F!==null;){let W=s(T.slice(U,F.index));W&&j.push({kind:"markdown",key:`md-${$}`,html:W});let de=F[1],ie=F[2].trim();if(de==="pl-card"){let ye=od(ie);ye.ok?j.push({kind:"card",key:`card-${$}`,spec:ye.spec}):(typeof console<"u"&&console.warn("[pl-card] parse_failed",{reason:ye.reason,message:ye.message,payloadChars:ie.length}),j.push({kind:"markdown",key:`card-${$}`,html:s(`\`\`\`
173
+ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+cn(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},Fi=new X3;We.options=We.setOptions=function(e){return Fi.setOptions(e),We.defaults=Fi.defaults,GE(We.defaults),We},We.getDefaults=Nb,We.defaults=Zi,We.use=function(...e){return Fi.use(...e),We.defaults=Fi.defaults,GE(We.defaults),We},We.walkTokens=function(e,t){return Fi.walkTokens(e,t)},We.parseInline=Fi.parseInline,We.Parser=Ur,We.parser=Ur.parse,We.Renderer=Ed,We.TextRenderer=Ub,We.Lexer=Mr,We.lexer=Mr.lex,We.Tokenizer=Sd,We.Hooks=al,We.parse=We,We.options,We.setOptions,We.use,We.walkTokens,We.parseInline,Ur.parse,Mr.lex;Q3=["aria-label"],e6={class:"px-4 pb-2 pt-4"},t6=["innerHTML"],r6=["onClick"],n6=Ae({__name:"ChatCardBlock",props:{spec:{},inverted:{type:Boolean}},emits:["action"],setup(e,{emit:t}){let n=e,i=t,r=N(()=>{if(!n.spec.body)return"";let m=We.parse(n.spec.body,{async:!1});return f2.sanitize(m,{ADD_ATTR:["target"]})}),o=N(()=>n.inverted?"rgba(255, 255, 255, 0.22)":"rgba(0, 0, 0, 0.16)"),a=N(()=>n.inverted?"rgba(255, 255, 255, 0.12)":"color-mix(in oklch, var(--color-theme-200) 80%, transparent)"),s=N(()=>n.inverted?"rgba(255, 255, 255, 0.95)":"var(--color-theme-900)"),c=N(()=>n.inverted?"rgba(255, 255, 255, 0.8)":"var(--color-theme-800)"),u=N(()=>n.inverted?`inset 0 0 0 1px ${o.value}`:`inset 0 0 0 1px ${o.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`),d=N(()=>n.inverted?"transparent":"var(--color-theme-0)");function p(m){return m==="primary"||m==="destructive"?{background:n.inverted?"rgba(255, 255, 255, 0.92)":"var(--color-theme-900)",color:n.inverted?"var(--color-theme-900)":"#fff"}:{background:"var(--color-theme-100)",color:s.value}}return(m,f)=>(v(),x("div",{"data-test":"chat-card",class:"my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-2xl",style:we({background:d.value,boxShadow:u.value}),"aria-label":e.spec.title},[y("div",e6,[y("div",{class:"text-[14px] font-semibold leading-tight",style:we({color:s.value})},ce(e.spec.title),5)]),r.value?(v(),x("div",{key:0,class:"chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",style:we({color:c.value}),innerHTML:r.value},null,12,t6)):Y("",!0),e.spec.actions?.length?(v(),x("div",{key:1,class:"flex flex-wrap items-center gap-2 px-3 py-2.5",style:we({borderTop:`1px solid ${a.value}`})},[(v(!0),x(ge,null,et(e.spec.actions,S=>(v(),x("button",{key:S.label,type:"button","data-test":"chat-card-action",class:"inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",style:we(p(S.style)),onClick:z=>i("action",S.reply)},ce(S.label),13,r6))),128))],4)):Y("",!0)],12,Q3))}}),r2=112,bb=52,An=14,ca=54,n2=34,i6=260;d6=5.4,p6=10,m6=15,o2=16;h6=["data-visual-type","data-chart-type","data-stacking","data-diagram-type","aria-label"],g6={class:"mb-2.5"},v6=["aria-label"],b6={key:0,"data-test":"chat-visual-horizontal-bars",class:"grid gap-3"},y6={class:"mb-1 flex items-start justify-between gap-3 text-[12px]"},x6=["viewBox"],w6=["x1","x2","y1","y2"],k6=["x","y"],_6=["data-row-index","data-series-index","data-data-key","x","y","width","height"],$6=["data-trend-key","d"],S6=["d"],E6=["cx","cy"],I6=["cx","cy"],T6=["x","y","text-anchor","transform"],z6={key:2,class:"mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"},N6={key:1,class:"grid gap-3"},C6={class:"mb-1 flex items-baseline justify-between gap-3 text-[12px]"},A6={class:"shrink-0 tabular-nums"},O6={key:2,class:"overflow-x-auto"},D6=["viewBox","aria-label"],P6=["data-from","data-to","x1","y1","x2","y2"],R6=["cx","cy"],M6=["x","y"],U6=["data-node-id","data-node-kind","transform"],j6=["points"],L6=["width","height"],V6=["width","height"],F6={xmlns:"http://www.w3.org/1999/xhtml",class:"flex h-full min-w-0 flex-col items-center justify-center text-center"},B6=Ae({__name:"ChatVisualBlock",props:{result:{},inverted:{type:Boolean}},setup(e){let t=e,n=G(),i=Ye(360),r;It(()=>{typeof ResizeObserver>"u"||!n.value||(r=new ResizeObserver(w=>{let _=w[0]?.contentRect.width;_&&(i.value=Math.round(_))}),r.observe(n.value))}),Jo(()=>r?.disconnect());let o=N(()=>Math.min(720,Math.max(280,i.value))),a=N(()=>t.result.ok?t.result.spec:null),s=N(()=>a.value?.visualType==="chart"?a.value:null),c=N(()=>a.value?.visualType==="diagram"?a.value:null);function u(w){return w?.chartType==="bar"||w?.chartType==="line"||w?.chartType==="scatter"}function d(w){return w?.chartType==="pie"}let p=N(()=>s.value?.data??[]),m=N(()=>u(s.value)?s.value:null),f=N(()=>m.value?.series??[]),S=N(()=>d(s.value)?s.value:null),z=N(()=>m.value?.chartType==="bar"&&m.value.stacking==="stacked");function T(w){return typeof w=="number"&&Number.isFinite(w)?w:null}function L(w,_){return String(w[_]??"").trim()}function j(w,_){let b=w.map(A=>L(A,_)).filter(Boolean);if(!b.length)return!1;let C=Math.max(...b.map(A=>A.length)),I=b.reduce((A,oe)=>A+oe.length,0)/b.length;return C>=16||b.length>5&&I>=10}function D(w,_){return w.data.map((b,C)=>{let I=T(b[_]);return I===null?null:{index:C,value:I}}).filter(b=>b!==null)}function U(w){if(w.length<2)return null;let _=w.length,b=w.reduce((ue,fe)=>ue+fe.index,0),C=w.reduce((ue,fe)=>ue+fe.value,0),I=w.reduce((ue,fe)=>ue+fe.index*fe.index,0),A=w.reduce((ue,fe)=>ue+fe.index*fe.value,0),oe=_*I-b*b;if(oe===0)return null;let re=(_*A-b*C)/oe;return{slope:re,intercept:(C-re*b)/_}}let $=N(()=>{let w=[],_=m.value;if(!_)return w;if(_.chartType==="bar"&&_.stacking==="stacked")for(let b of _.data){let C=0,I=0;for(let A of _.series){let oe=T(b[A.dataKey]);oe!==null&&(oe>=0?C+=oe:I+=oe)}w.push(C,I)}else for(let b of _.data)for(let C of _.series){let I=T(b[C.dataKey]);I!==null&&w.push(I)}if(_.trendLine&&(_.chartType==="line"||_.chartType==="scatter")){let b=D(_,_.trendLine.dataKey);w.push(...b.map(I=>I.value));let C=U(b);if(C&&b.length){let I=b[0].index,A=b[b.length-1].index;w.push(C.intercept+C.slope*I,C.intercept+C.slope*A)}}return w});function B(w,_){let b=w>0?w:1,C=Math.floor(Math.log10(b)),I=b/10**C,A;return A=_?I<1.5?1:I<3?2:I<7?5:10:I<=1?1:I<=2?2:I<=5?5:10,A*10**C}let se=N(()=>{let w=$.value,_=w.length?Math.max(0,...w):1,b=w.length?Math.min(0,...w):0;if(b===_)return{min:0,max:_||1,ticks:[0,_||1]};let C=B(B(_-b,!1)/3,!0),I=Math.floor(b/C)*C,A=Math.ceil(_/C)*C,oe=[];for(let re=I;re<=A+C*.5;re+=C)oe.push(Number(re.toFixed(6)));return{min:I,max:A,ticks:oe}}),he=N(()=>c6({series:f.value})),te=N(()=>{let w=m.value;if(!w)return{mode:"horizontal",entries:[]};let _=w.xKey;return f6({labels:w.data.map(b=>String(b?.[_]??"")),plotWidth:Math.max(200,o.value-42)})}),W=N(()=>{let w=he.value?.valueFormat,_=!!(he.value&&(w==="currency"||w==="percent"||he.value.valuePrefix||he.value.valueSuffix)),b=w==="duration"?46:_?38:30,C=te.value.mode==="angled";return{width:o.value,height:168+(C?36:0),left:b,right:12,top:10,bottom:24+(C?36:0)}});function de(w,_){let b=m.value,C=W.value;if(b?.chartType==="bar"){let I=C.width-C.left-C.right;return C.left+(w+.5)*(I/Math.max(_,1))}return ie(w,_)}function ie(w,_){let b=W.value,C=b.width-b.left-b.right;return _<=1?b.left+C/2:b.left+C*w/(_-1)}function ye(w){let{min:_,max:b}=se.value,C=W.value,I=C.height-C.top-C.bottom;return C.top+(b-w)/(b-_||1)*I}function Be(w){let _=m.value;return _?_.data.map((b,C)=>{let I=T(b[w])??0;return`${C===0?"M":"L"} ${ie(C,_.data.length).toFixed(1)} ${ye(I).toFixed(1)}`}).join(" "):""}let mt=N(()=>{let w=m.value;if(!w?.trendLine||w.chartType!=="line"&&w.chartType!=="scatter")return null;let _=D(w,w.trendLine.dataKey),b=U(_);if(!b||!_.length)return null;let C=_[0].index,I=_[_.length-1].index,A=b.intercept+b.slope*C,oe=b.intercept+b.slope*I,re=Math.max(0,w.series.findIndex(ue=>ue.dataKey===w.trendLine?.dataKey));return{path:`M ${ie(C,w.data.length).toFixed(1)} ${ye(A).toFixed(1)} L ${ie(I,w.data.length).toFixed(1)} ${ye(oe).toFixed(1)}`,dataKey:w.trendLine.dataKey,seriesIndex:re}}),ft=N(()=>{let w=m.value;if(!w||w.chartType!=="bar")return[];let _=W.value,b=(_.width-_.left-_.right)/Math.max(w.data.length,1),C=ye(0);if(z.value){let ue=Math.max(4,Math.min(24,b*.42));return w.data.flatMap((fe,_e)=>{let Te=0,ae=0,Ke=_.left+_e*b+(b-ue)/2;return w.series.map((Xe,St)=>{let gt=T(fe[Xe.dataKey])??0,rr=gt>=0?Te:ae,vr=rr+gt,pt=ye(rr),ct=ye(vr);return gt>=0?Te=vr:ae=vr,{key:`${_e}-${Xe.dataKey}`,x:Ke,y:Math.min(pt,ct),width:ue,height:Math.max(1.5,Math.abs(pt-ct)),seriesIndex:St,rowIndex:_e,dataKey:Xe.dataKey}})})}let I=Math.max(w.series.length,1),A=I>1?2:0,oe=Math.max(3,Math.min(20,(b*.62-A*(I-1))/I)),re=oe*I+A*(I-1);return w.data.flatMap((ue,fe)=>w.series.map((_e,Te)=>{let ae=ye(T(ue[_e.dataKey])??0),Ke=_.left+fe*b+(b-re)/2+Te*(oe+A);return{key:`${fe}-${_e.dataKey}`,x:Ke,y:Math.min(ae,C),width:oe,height:Math.max(1.5,Math.abs(C-ae)),seriesIndex:Te,rowIndex:fe,dataKey:_e.dataKey}}))}),je=N(()=>{let w=m.value;if(!w)return[];let _=w.data;if(!_.length)return[];let b=_.length-1,C=te.value,I=C.mode==="angled";return C.entries.map(({index:A,text:oe})=>({key:`${A}`,label:oe,x:de(A,_.length),anchor:I?"end":A===0?"start":A===b?"end":"middle",angled:I})).filter(A=>A.label)}),De=N(()=>{let w=m.value;if(!w||w.chartType!=="bar"||w.series.length!==1||z.value)return[];let _=w.series[0],b=w.data.map((I,A)=>{let oe=L(I,w.xKey),re=T(I[_.dataKey]);return!oe||re===null?null:{key:`${A}-${oe}`,label:oe,rawValue:re}}).filter(I=>I!==null);if(!b.length||b.some(I=>I.rawValue<0)||!(w.layout==="horizontal"||j(w.data,w.xKey)))return[];let C=Math.max(...b.map(I=>I.rawValue),1);return b.map(I=>({key:I.key,label:I.label,value:yb({value:I.rawValue,series:_}),width:I.rawValue<=0?0:Math.max(2,I.rawValue/C*100),seriesIndex:0}))}),Tt=N(()=>{let w=m.value;if(!w?.data.length)return[];let _=w.data[w.data.length-1];return w.series.map((b,C)=>{let I=T(_?.[b.dataKey]);return{key:b.dataKey,label:b.label||b.dataKey,value:I===null?"\u2014":yb({value:I,series:b}),seriesIndex:C}})}),Ze=N(()=>{let w=m.value;if(!w?.data.length||w.chartType!=="line")return[];let _=w.data.length-1,b=w.data[_];return w.series.map((C,I)=>{let A=T(b?.[C.dataKey]);return A===null?null:{key:C.dataKey,cx:ie(_,w.data.length),cy:ye(A),seriesIndex:I}}).filter(C=>C!==null)}),gr=N(()=>{let w=S.value;if(!w)return[];let _=w.data.map(I=>({name:String(I[w.nameKey]??""),value:T(I[w.valueKey])??0})).filter(I=>I.name&&I.value>=0).sort((I,A)=>A.value-I.value),b=_.reduce((I,A)=>I+A.value,0)||1,C=w.series?.[0];return _.map((I,A)=>({...I,key:`${A}-${I.name}`,percent:I.value/b,display:yb({value:I.value,series:C})}))}),ht=N(()=>c.value?l6(c.value,{maxWidth:i.value}):null),vt=["var(--color-theme-900)","var(--color-primary-500)","color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"],Tr=["rgba(255, 255, 255, 0.92)","color-mix(in oklch, white 30%, var(--color-primary-500))","rgba(255, 255, 255, 0.55)"];function wt(w){let _=t.inverted?Tr:vt;return _[w%_.length]}function On(w){return t.inverted?w==="decision"?"rgba(255, 255, 255, 0.1)":"rgba(255, 255, 255, 0.06)":w==="decision"?"color-mix(in oklch, var(--color-primary-500) 6%, var(--color-theme-0))":w==="output"?"color-mix(in oklch, var(--color-theme-900) 5%, var(--color-theme-0))":"var(--color-theme-0)"}function kt(w){return t.inverted?"rgba(255, 255, 255, 0.22)":jr.value}let At=N(()=>t.inverted?"rgba(255, 255, 255, 0.95)":"var(--color-theme-900)"),Bt=N(()=>t.inverted?"rgba(255, 255, 255, 0.6)":"var(--color-theme-500)"),Ge=N(()=>t.inverted?"rgba(255, 255, 255, 0.45)":"color-mix(in oklch, var(--color-theme-900) 42%, transparent)"),Zt=N(()=>t.inverted?"rgba(255, 255, 255, 0.1)":"color-mix(in oklch, var(--color-theme-900) 8%, transparent)"),He=N(()=>t.inverted?"rgba(255, 255, 255, 0.24)":"color-mix(in oklch, var(--color-theme-900) 18%, transparent)"),jr=N(()=>t.inverted?"rgba(255, 255, 255, 0.16)":"color-mix(in oklch, var(--color-theme-300) 55%, transparent)"),h=N(()=>t.inverted?"rgba(255, 255, 255, 0.14)":"color-mix(in oklch, var(--color-theme-900) 10%, transparent)"),k=N(()=>t.inverted?"transparent":"var(--color-theme-0)"),M=N(()=>t.inverted?"rgba(255, 255, 255, 0.18)":"color-mix(in oklch, var(--color-theme-900) 16%, transparent)"),K=N(()=>t.inverted?"rgba(255, 255, 255, 0.12)":"color-mix(in oklch, var(--color-theme-900) 9%, transparent)");return(w,_)=>a.value?(v(),x("section",{key:0,"data-test":"chat-visual","data-visual-type":a.value.visualType,"data-chart-type":s.value?.chartType,"data-stacking":z.value?"stacked":void 0,"data-diagram-type":c.value?.diagramType,class:"my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",style:we({background:k.value,boxShadow:`inset 0 0 0 1px ${h.value}`}),"aria-label":a.value.meta.title},[y("header",g6,[y("h4",{class:"text-[13px] font-semibold leading-tight",style:we({color:At.value})},ce(a.value.meta.title),5),a.value.meta.description?(v(),x("p",{key:0,class:"mt-0.5 text-[12px] leading-snug",style:we({color:Bt.value})},ce(a.value.meta.description),5)):Y("",!0)]),y("div",{ref_key:"bodyEl",ref:n},[m.value?(v(),x("div",{key:0,role:"img","aria-label":a.value.meta.title},[De.value.length?(v(),x("div",b6,[(v(!0),x(ge,null,et(De.value,b=>(v(),x("div",{key:b.key,"data-test":"chat-visual-horizontal-bar",class:"min-w-0"},[y("div",y6,[y("span",{class:"line-clamp-2 min-w-0 font-medium leading-snug",style:we({color:At.value})},ce(b.label),5),y("span",{class:"shrink-0 font-semibold tabular-nums",style:we({color:At.value})},ce(b.value),5)]),y("div",{class:"h-2 w-full overflow-hidden rounded-full",style:we({background:K.value})},[y("div",{class:"h-full rounded-full",style:we({width:`${b.width}%`,background:wt(b.seriesIndex)})},null,4)],4)]))),128))])):(v(),x("svg",{key:1,class:"block h-auto w-full overflow-visible",viewBox:`0 0 ${W.value.width} ${W.value.height}`,style:we({aspectRatio:`${W.value.width} / ${W.value.height}`}),preserveAspectRatio:"xMidYMid meet","aria-hidden":"true"},[(v(!0),x(ge,null,et(se.value.ticks,b=>(v(),x("line",{key:`grid-${b}`,x1:W.value.left,x2:W.value.width-W.value.right,y1:ye(b),y2:ye(b),"stroke-width":"1","vector-effect":"non-scaling-stroke",style:we({stroke:b===0?He.value:Zt.value})},null,12,w6))),128)),y("g",null,[(v(!0),x(ge,null,et(se.value.ticks,b=>(v(),x("text",{key:`y-${b}`,x:W.value.left-7,y:ye(b)+3,"text-anchor":"end","font-size":"9.5",style:we({fill:Ge.value})},ce(Ie(u6)({value:b,shared:he.value})),13,k6))),128))]),m.value.chartType==="bar"?(v(!0),x(ge,{key:0},et(ft.value,b=>(v(),x("rect",{key:b.key,"data-test":"chat-visual-bar","data-row-index":b.rowIndex,"data-series-index":b.seriesIndex,"data-data-key":b.dataKey,x:b.x,y:b.y,width:b.width,height:b.height,rx:"2.5",style:we({fill:wt(b.seriesIndex)})},null,12,_6))),128)):(v(),x(ge,{key:1},[mt.value?(v(),x("path",{key:0,"data-test":"chat-visual-trend-line","data-trend-key":mt.value.dataKey,d:mt.value.path,fill:"none","stroke-width":"1.4","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"4 3","vector-effect":"non-scaling-stroke",style:we({stroke:wt(mt.value.seriesIndex)})},null,12,$6)):Y("",!0),(v(!0),x(ge,null,et(f.value,(b,C)=>(v(),x("g",{key:b.dataKey},[m.value.chartType==="line"?(v(),x("path",{key:0,d:Be(b.dataKey),fill:"none","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","vector-effect":"non-scaling-stroke",style:we({stroke:wt(C)})},null,12,S6)):Y("",!0),(v(!0),x(ge,null,et(p.value,(I,A)=>(v(),x(ge,{key:`${b.dataKey}-${A}`},[m.value.chartType==="scatter"?(v(),x("circle",{key:0,cx:ie(A,p.value.length),cy:ye(T(I[b.dataKey])??0),r:"2.6",style:we({fill:wt(C)})},null,12,E6)):Y("",!0)],64))),128))]))),128)),(v(!0),x(ge,null,et(Ze.value,b=>(v(),x("circle",{key:`marker-${b.key}`,cx:b.cx,cy:b.cy,r:"3",style:we({fill:wt(b.seriesIndex)})},null,12,I6))),128))],64)),(v(!0),x(ge,null,et(je.value,b=>(v(),x("text",{key:b.key,x:b.x,y:b.angled?W.value.height-W.value.bottom+12:W.value.height-6,"text-anchor":b.anchor,"font-size":"9.5",transform:b.angled?`rotate(${Ie(-40)} ${b.x} ${W.value.height-W.value.bottom+12})`:void 0,style:we({fill:Ge.value})},ce(b.label),13,T6))),128))],12,x6)),Tt.value.length>1||m.value.chartType!=="bar"?(v(),x("div",z6,[(v(!0),x(ge,null,et(Tt.value,b=>(v(),x("div",{key:b.key,class:"inline-flex items-center gap-1.5 text-[11.5px] leading-none"},[y("span",{class:"size-2.5 shrink-0 rounded-full",style:we({background:wt(b.seriesIndex)})},null,4),y("span",{style:we({color:Bt.value})},ce(b.label),5),y("span",{class:"font-semibold tabular-nums",style:we({color:At.value})},ce(b.value),5)]))),128))])):Y("",!0)],8,v6)):S.value?(v(),x("div",N6,[(v(!0),x(ge,null,et(gr.value,(b,C)=>(v(),x("div",{key:b.key},[y("div",C6,[y("span",{class:"truncate font-medium",style:we({color:At.value})},ce(b.name),5),y("span",A6,[y("span",{class:"font-semibold",style:we({color:At.value})},ce(b.display),5),y("span",{class:"ml-1.5",style:we({color:Bt.value})},ce(Math.round(b.percent*100))+"%",5)])]),y("div",{class:"h-1.5 w-full overflow-hidden rounded-full",style:we({background:K.value})},[y("div",{class:"h-full rounded-full",style:we({width:`${Math.max(2,b.percent*100)}%`,background:wt(C)})},null,4)],4)]))),128))])):c.value&&ht.value?(v(),x("div",O6,[(v(),x("svg",{"data-test":"chat-visual-diagram-svg",class:"block h-auto overflow-visible",viewBox:`0 0 ${ht.value.width} ${ht.value.height}`,style:we({width:`${ht.value.width}px`,aspectRatio:`${ht.value.width} / ${ht.value.height}`}),role:"img","aria-label":a.value.meta.title},[(v(!0),x(ge,null,et(ht.value.edges,b=>(v(),x("line",{key:b.key,"data-test":"chat-visual-diagram-edge","data-from":b.from,"data-to":b.to,x1:b.x1,y1:b.y1,x2:b.x2,y2:b.y2,"stroke-width":"1.4","stroke-linecap":"round","vector-effect":"non-scaling-stroke",style:we({stroke:M.value})},null,12,P6))),128)),(v(!0),x(ge,null,et(ht.value.edges,b=>(v(),x("circle",{key:`${b.key}-dot`,cx:b.x2,cy:b.y2,r:"2.4",style:we({fill:M.value})},null,12,R6))),128)),(v(!0),x(ge,null,et(ht.value.edges.filter(b=>b.label),b=>(v(),x("foreignObject",{key:`${b.key}-label`,x:b.labelX-55,y:b.labelY-12,width:"110",height:"24"},[y("div",{xmlns:"http://www.w3.org/1999/xhtml",class:"flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",style:we({color:Bt.value,background:t.inverted?"var(--color-theme-900)":"var(--color-theme-0)"})},ce(b.label),5)],8,M6))),128)),(v(!0),x(ge,null,et(ht.value.nodes,b=>(v(),x("g",{key:b.id,"data-test":"chat-visual-diagram-node","data-node-id":b.id,"data-node-kind":b.kind,transform:`translate(${b.x} ${b.y})`},[b.kind==="decision"?(v(),x("polygon",{key:0,points:`${b.width/2},0 ${b.width},${b.height/2} ${b.width/2},${b.height} 0,${b.height/2}`,"stroke-width":"1","vector-effect":"non-scaling-stroke",style:we({fill:On(b.kind),stroke:kt(b.kind)})},null,12,j6)):(v(),x("rect",{key:1,width:b.width,height:b.height,rx:"9","stroke-width":"1","vector-effect":"non-scaling-stroke",style:we({fill:On(b.kind),stroke:kt(b.kind)})},null,12,L6)),(v(),x("foreignObject",{x:"8",y:"5",width:b.width-16,height:b.height-10},[y("div",F6,[y("div",{class:"line-clamp-2 text-[13px] font-medium leading-snug",style:we({color:At.value})},ce(b.label),5),b.detail?(v(),x("div",{key:0,class:"mt-0.5 line-clamp-1 text-[10.5px] leading-none",style:we({color:Bt.value})},ce(b.detail),5)):Y("",!0)])],8,V6))],8,U6))),128))],12,D6))])):Y("",!0)],512),a.value.meta.footer?(v(),x("footer",{key:0,class:"mt-3 text-[11px] leading-snug",style:we({color:Ge.value})},ce(a.value.meta.footer),5)):Y("",!0)],12,h6)):Y("",!0)}}),Z6=["innerHTML"],nl=Ae({__name:"ChatRichText",props:{text:{},inverted:{type:Boolean},streaming:{type:Boolean}},emits:["action"],setup(e,{emit:t}){let n=e,i=t,r=Ye(n.text),o;lt([()=>n.text,()=>n.streaming],([z,T])=>{if(!T){o!==void 0&&(cancelAnimationFrame(o),o=void 0),r.value=z;return}o===void 0&&(o=requestAnimationFrame(()=>{o=void 0,r.value=n.text}))}),Jo(()=>{o!==void 0&&cancelAnimationFrame(o)});let a=new We.Renderer;a.link=({href:z,text:T})=>{let L=z.trim();if(!L||L==="#")return T;let j=!1;if(typeof window<"u")try{j=new URL(z,window.location.href).origin===window.location.origin}catch{j=!1}return j?`<a href="${z}">${T}</a>`:`<a href="${z}" target="_blank" rel="noopener noreferrer">${T}</a>`},We.setOptions({breaks:!0,gfm:!0,renderer:a});function s(z){if(!z)return"";let T=We.parse(z,{async:!1});return f2.sanitize(T,{ADD_ATTR:["target"],ADD_DATA_URI_TAGS:["img"]})}function c(z){if(typeof z!="string")return null;let T=z.trim();return T?T.slice(0,80):null}function u(z){try{let T=JSON.parse(z);if(!T||typeof T!="object"||Array.isArray(T))return{topLevelKeys:[],declaredVisualType:null,declaredChartType:null,declaredDiagramType:null,inputType:null};let L=T;return{topLevelKeys:Object.keys(L).sort().slice(0,24),declaredVisualType:c(L.visualType),declaredChartType:c(L.chartType),declaredDiagramType:c(L.diagramType),inputType:c(L.type)}}catch{return{topLevelKeys:[],declaredVisualType:null,declaredChartType:null,declaredDiagramType:null,inputType:null}}}function d(z){if(typeof window>"u")return null;try{return new URL(z.currentSrc||z.src,window.location.href).host||null}catch{return null}}function p(z){typeof HTMLImageElement>"u"||!(z.target instanceof HTMLImageElement)||typeof console<"u"&&console.warn("[chat-image] load_failed",{host:d(z.target),altPresent:!!z.target.alt?.trim(),width:z.target.naturalWidth||null,height:z.target.naturalHeight||null})}let m=/```(?:pl-visual|pl-platform-visual|pl-card)[ \t]*(?:\r?\n|$)/;function f(z){let{text:T,streaming:L}=z,j=[],D=/```(pl-visual|pl-platform-visual|pl-card)[ \t]*\r?\n([\s\S]*?)```/g,U=0,$=0,B=D.exec(T);for(;B!==null;){let W=s(T.slice(U,B.index));W&&j.push({kind:"markdown",key:`md-${$}`,html:W});let de=B[1],ie=B[2].trim();if(de==="pl-card"){let ye=od(ie);ye.ok?j.push({kind:"card",key:`card-${$}`,spec:ye.spec}):(typeof console<"u"&&console.warn("[pl-card] parse_failed",{reason:ye.reason,message:ye.message,payloadChars:ie.length}),j.push({kind:"markdown",key:`card-${$}`,html:s(`\`\`\`
174
174
  ${ie}
175
- \`\`\``)}))}else{let ye=sd(ie);if(ye.ok)j.push({kind:"visual",key:`visual-${$}`,result:ye});else{typeof console<"u"&&console.warn("[pl-visual] parse_failed",{reason:ye.reason,message:ye.message,hasFallbackMarkdown:!!ye.fallbackMarkdown,payloadChars:ie.length,...u(ie)});let Be=ye.fallbackMarkdown?s(ye.fallbackMarkdown):"";Be&&j.push({kind:"markdown",key:`visual-${$}`,html:Be})}}U=F.index+F[0].length,$+=1,F=D.exec(T)}let se=T.slice(U),he=L?m.exec(se):null;if(he){let W=s(se.slice(0,he.index));return W&&j.push({kind:"markdown",key:`md-${$}`,html:W}),j.push({kind:"pending-visual",key:`pending-${$}`}),j}let te=s(se);return te&&j.push({kind:"markdown",key:`md-${$}`,html:te}),j}let S=N(()=>{let z=r.value;return z?f({text:z,streaming:!!n.streaming}):[]});return(z,T)=>(v(),x("div",{class:"chat-msg-rich break-words text-[14px] leading-[1.55] @sm/chat:max-w-[55ch] @sm/chat:text-[15px] @sm/chat:leading-[1.5]",onErrorCapture:p},[(v(!0),x(ge,null,et(S.value,L=>(v(),x(ge,{key:L.key},[L.kind==="markdown"?(v(),x("div",{key:0,class:V(["chat-msg-prose",e.inverted?"chat-msg-prose-invert":""]),innerHTML:L.html},null,10,Z6)):L.kind==="visual"?(v(),Fe(B6,{key:1,result:L.result,inverted:e.inverted},null,8,["result","inverted"])):L.kind==="card"?(v(),Fe(n6,{key:2,spec:L.spec,inverted:e.inverted,onAction:T[0]||(T[0]=j=>i("action",j))},null,8,["spec","inverted"])):(v(),x("div",{key:3,"data-test":"chat-visual-pending",role:"status",class:"my-6 flex items-center gap-2.5 rounded-[20px] px-4 py-5 text-[12px] font-medium",style:we({background:e.inverted?"transparent":"var(--color-theme-0)",boxShadow:`inset 0 0 0 1px ${e.inverted?"rgba(255, 255, 255, 0.14)":"color-mix(in oklch, var(--color-theme-900) 8%, transparent)"}`,color:e.inverted?"rgba(255, 255, 255, 0.6)":"var(--color-theme-500)"})},[...T[1]||(T[1]=[y("span",{class:"size-2 shrink-0 animate-pulse rounded-full",style:{background:"currentcolor"}},null,-1),xt(" Preparing chart\u2026 ",-1)])],4))],64))),128))],32))}}),H6=80,K6=600,W6=Ae({__name:"ChatScroller",setup(e,{expose:t}){let n=G(),i=G(),r=G(!0),o,a,s=0;function c(){let f=n.value;f&&(f.scrollTop=f.scrollHeight)}function u(){let f=n.value;f&&(r.value=f.scrollHeight-f.scrollTop-f.clientHeight<=H6)}function d(){s=Date.now()+K6}function p(){r.value&&Date.now()>s&&c()}function m(){r.value=!0,s=0,c(),requestAnimationFrame(()=>{c(),requestAnimationFrame(c)})}return t({pin:m}),It(()=>{requestAnimationFrame(()=>{c(),requestAnimationFrame(c)}),i.value&&(o=new ResizeObserver(p),o.observe(i.value),n.value&&o.observe(n.value),a=new MutationObserver(p),a.observe(i.value,{childList:!0,subtree:!0}))}),Jo(()=>{o?.disconnect(),a?.disconnect()}),(f,S)=>(v(),x("div",{ref_key:"viewport",ref:n,class:V(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",r.value?"[overflow-anchor:none]":""]),onScrollPassive:u,onWheelPassive:d,onTouchstartPassive:d},[y("div",{ref_key:"content",ref:i,class:"flex-1 flex flex-col"},[er(f.$slots,"default")],512)],34))}}),G6={VOICE_MIC_UNAVAILABLE:"I couldn't reach your microphone. Check that this site is allowed to use it, then try again.",VOICE_AGENT_UNAVAILABLE:"Your assistant didn't pick up. Give it a moment and start the call again.",VOICE_CONNECT_TIMEOUT:"The call took too long to connect. Try again in a moment.",VOICE_CONNECTION_LOST:"The call dropped. Start it again when you're ready.",VOICE_UNAVAILABLE:"Voice isn't available right now. You can keep going by typing.",VOICE_MINT_INVALID:"That call couldn't be started. Refresh the page and try again.",VOICE_PROVIDER_ERROR:"The call ended unexpectedly. Try again, or keep going by typing."},J6="The call ended unexpectedly. Try again, or keep going by typing.";Id=[0,2,4,6,8],I2=5,Y6=33,X6=.7,a2=.1,Q6=60,e5=320,t5=.55,r5=.1,n5=.32,i5=.9,xb=Id.map(()=>0),o5=Id.map(()=>I2),a5=class{constructor(e=typeof window>"u"?void 0:window){Z(this,"browser",void 0),Z(this,"heights",Ye(o5)),Z(this,"targetBars",xb),Z(this,"displayBars",xb),Z(this,"level",{source:"mic",level:0}),Z(this,"isMuted",!1),Z(this,"usesIdleWave",!1),Z(this,"frameId",0),Z(this,"lastFrameAt",0),Z(this,"easeFrame",t=>{let n=this.browser;if(!n)return;this.frameId=0;let i=Math.min(64,Math.max(0,t-this.lastFrameAt));this.lastFrameAt=t;let r=this.usesIdleWave?Id.map((a,s)=>{let c=t/1e3*t5*2*Math.PI-s*i5;return r5+n5*(Math.sin(c)+1)/2}):this.targetBars;this.displayBars=this.displayBars.map((a,s)=>{let c=r[s]??0,u=c>a?Q6:e5;return a+(c-a)*(1-Math.exp(-i/u))}),this.publish();let o=this.displayBars.every((a,s)=>Math.abs((r[s]??0)-a)<=5e-4);(this.usesIdleWave||!o)&&(this.frameId=n.requestAnimationFrame(this.easeFrame))}),this.browser=e}updateLevel(e){this.level=e,this.updateTargets()}setMuted(e){this.isMuted=e,this.updateTargets()}setIdleWave(e){this.usesIdleWave!==e&&(this.usesIdleWave=e,this.start())}stop(){this.frameId&&this.browser?.cancelAnimationFrame(this.frameId),this.frameId=0}updateTargets(){let e=n=>Math.max(0,n-a2)/(1-a2),t=this.isMuted&&this.level.source==="mic";this.targetBars=Id.map(n=>t?0:e(Math.min(1,Math.max(0,this.level.bands?.[n]??this.level.level)))),this.start()}start(){if(!this.browser||this.browser.matchMedia("(prefers-reduced-motion: reduce)").matches){this.displayBars=this.usesIdleWave?xb:this.targetBars,this.publish();return}this.frameId||(this.lastFrameAt=this.browser.performance.now(),this.frameId=this.browser.requestAnimationFrame(this.easeFrame))}publish(){this.heights.value=this.displayBars.map(e=>Math.round((I2+Math.min(1,Math.max(0,e))**X6*Y6)*10)/10)}},s5={connecting:{label:"Connecting",tone:"bg-amber-500",waits:!0},listening:{label:"Listening",tone:"bg-green-500",waits:!1},thinking:{label:"Thinking",tone:"bg-amber-500",waits:!0,visibleText:"Thinking"},working:{label:"Working",tone:"bg-primary-500",waits:!0},speaking:{label:"Speaking",tone:"bg-primary-500",waits:!1},error:{label:"Connection problem",tone:"bg-red-500",waits:!1,visibleText:"Connection lost"}};u5=["data-voice-state","data-voice-activity"],d5=["src"],p5={key:1,"data-test":"voice-background-fallback","aria-hidden":"true",class:"pointer-events-none absolute inset-0 bg-[#0A1522]"},m5={"data-test":"voice-stage",class:"relative z-10 flex flex-1 flex-col items-center px-8"},f5={"data-voice-assistant-avatar":""},h5={"data-test":"voice-lower-stage",class:"flex flex-1 flex-col items-center pt-10"},g5={"data-test":"voice-histogram","aria-hidden":"true",class:"flex h-[38px] items-center gap-[5px]"},v5={"data-test":"voice-presence-status",role:"status","aria-live":"polite",class:"sr-only"},b5=["data-taking-longer"],y5={class:"absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12"},x5=["disabled","aria-label","aria-pressed","title"],w5=Ae({__name:"VoiceMode",props:{agent:{},chatController:{},isLight:{type:Boolean},backdropSrc:{}},emits:["end"],setup(e,{expose:t,emit:n}){let i=n,r=Ye(!1),o=Ye(!1),a=Ye({user:!1,agent:!1}),s=Ye({active:!1}),c=Ye(!1),u=Ye(!1),d=Ye(),p=N(()=>d.value?.state.value??"idle"),m=N(()=>d.value?.isMuted.value??!1),f=new a5,S=f.heights,z=s0("endButton"),T=s0("muteButton"),L=!1,j,D,U=N(()=>c5({sessionState:p.value,hadError:r.value,providerThinking:o.value,speaking:a.value,work:s.value,isMuted:m.value,takingLonger:c.value})),$=N(()=>{if(U.value.activity==="thinking")return"thinking";if(U.value.activity==="working")return`working:${s.value.description??""}`});lt(()=>U.value.usesIdleWave,W=>f.setIdleWave(W),{immediate:!0}),lt(m,W=>f.setMuted(W),{immediate:!0}),lt($,W=>{D&&clearTimeout(D),c.value=!1,W&&(D=setTimeout(()=>{D=void 0,c.value=!0},s2),D.unref?.())},{immediate:!0});async function F(){L=!0,await d.value?.end()}t({end:F});function se(){L||(L=!0,i("end"))}function he(W){W.shiftKey&&document.activeElement===z.value?(W.preventDefault(),T.value?.focus()):!W.shiftKey&&document.activeElement===T.value&&(W.preventDefault(),z.value?.focus())}async function te(){let W=d.value;!W||u.value||(u.value=!0,await W.toggleMuted(),u.value=!1)}return It(async()=>{z.value?.focus({preventScroll:!0});let W=e.chatController?.createVoiceClient({onLevel:de=>f.updateLevel(de),onStateChange:de=>{de==="ended"&&(r.value?j=setTimeout(se,1600):se())},onThinkingChange:de=>{o.value=de},onSpeakingChange:de=>{a.value=de},onWorkChange:de=>{s.value=de},onError:de=>{r.value=!0,e.chatController?.notify?.(q6(de.code)),e.chatController?.logger?.warn("voice.session.failed",{code:de.code,providerMessage:de.message})},onMetric:de=>{e.chatController?.logger?.info(de.name,{durationMs:de.durationMs})}});if(!W){se();return}d.value=W,await W.start()}),rn(()=>{L=!0,j&&clearTimeout(j),D&&clearTimeout(D),f.stop(),d.value?.end()}),(W,de)=>(v(),x("div",{"data-test":"voice-mode","data-voice-state":p.value,"data-voice-activity":U.value.activity,class:"relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[#0A1522] text-white",onKeydown:zn(he,["tab"])},[e.backdropSrc?(v(),x("img",{key:0,"data-test":"voice-background-image",src:e.backdropSrc,alt:"","aria-hidden":"true",draggable:"false",class:"pointer-events-none absolute inset-0 size-full object-cover"},null,8,d5)):(v(),x("div",p5)),de[2]||(de[2]=y("div",{"data-test":"voice-background-overlay","aria-hidden":"true",class:"pointer-events-none absolute inset-0 bg-gradient-to-b from-[#050F19]/65 via-[#050F19]/75 to-[#050F19]/90"},null,-1)),y("div",m5,[de[0]||(de[0]=y("div",{"data-test":"voice-stage-spacer","aria-hidden":"true",class:"flex-1"},null,-1)),y("div",f5,[be(_b,{agent:e.agent,"show-status":!1,"show-owner-mark":!1,"is-light":!1,class:"size-32"},null,8,["agent"])]),y("div",h5,[y("div",g5,[(v(!0),x(ge,null,et(Ie(S),(ie,ye)=>(v(),x("span",{key:ye,"data-test":"voice-histogram-bar",class:V(["w-[5px] rounded-full transition-colors duration-150",U.value.tone]),style:we({height:`${ie}px`})},null,6))),128))]),y("div",v5,ce(U.value.label),1),y("p",{"data-test":"voice-visible-status","data-taking-longer":U.value.takingLonger||void 0,"aria-hidden":"true",class:"mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"},ce(U.value.visibleStatus),9,b5)])]),y("div",y5,[y("button",{ref_key:"endButton",ref:z,type:"button","data-test":"voice-end-btn",class:"flex size-16 cursor-pointer items-center justify-center rounded-full bg-white/10 text-white ring-1 ring-white/20 transition-colors hover:bg-white/15 active:bg-white/25","aria-label":"Hang up",title:"Hang up",onClick:se},[...de[1]||(de[1]=[y("i",{class:"i-tabler-x size-[25px]","aria-hidden":"true"},null,-1)])],512),y("button",{ref_key:"muteButton",ref:T,type:"button","data-test":"voice-mute-btn",class:V(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70",[m.value?"bg-white text-[#050F19] ring-white":"bg-white/10 text-white ring-white/20",p.value==="live"&&!u.value?"cursor-pointer":"cursor-default opacity-50"]]),disabled:p.value!=="live"||u.value,"aria-label":m.value?"Unmute microphone":"Mute microphone","aria-pressed":m.value,title:m.value?"Unmute microphone":"Mute microphone",onClick:te},[y("i",{class:V([m.value?"i-tabler-microphone-off":"i-tabler-microphone","size-[25px]"]),"aria-hidden":"true"},null,2)],10,x5)])],40,u5))}}),k5={key:0,class:"pb-4"},_5={key:1,"data-test":"messaging-sdk-header",class:"shrink-0 border-b border-theme-100 px-4 py-3"},$5={class:"min-w-0 flex-1"},S5={class:"truncate text-base font-semibold leading-tight text-theme-900"},E5={class:"mt-1 truncate text-sm leading-tight text-theme-500"},I5={key:0,class:"shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"},T5=["aria-label"],z5={key:0,"data-test":"messaging-empty-state",class:"flex flex-col items-center justify-center px-4"},N5=["title"],C5={key:0,class:"flex items-center gap-3 py-3 px-2"},A5=["data-journal-outcome"],O5=["data-message-id","data-message-sender","data-conversation-id","data-message-sequence","data-system-kind","data-issue-code","data-issue-bucket","data-issue-action-label","data-issue-action-url","data-streaming"],D5={class:"max-w-[85%] min-w-0"},P5=["href"],R5=["data-message-id","data-message-sender","data-conversation-id","data-message-sequence","data-system-kind","data-issue-code","data-issue-bucket","data-streaming"],M5=["data-test","data-message-id","data-message-sender","data-conversation-id","data-message-sequence","data-system-kind","data-streaming","data-queued","aria-label"],U5=["src","alt"],j5=["src"],L5=["href"],V5={key:0,"data-test":"messaging-message-text-part"},F5=["src","alt","data-attachment-placement"],B5=["src","data-attachment-placement"],Z5=["href","data-attachment-placement"],H5=["data-journal-outcome"],K5=["data-journal-outcome"],W5=["data-test","data-working-description"],G5={key:0,class:"truncate"},J5={key:1,class:"sr-only"},q5=["data-issue-code"],Y5=["href"],X5=["inert","aria-hidden"],Q5=["data-seat-state"],eD=["src","alt"],tD={class:"max-w-20 truncate"},rD=["onClick"],nD={key:0,class:"shrink-0 flex items-center justify-center size-14"},iD=["data-composer-action"],oD=["placeholder","disabled"],aD={class:"font-mono text-sm tabular-nums"},sD={class:"mt-2.5 flex items-center"},lD=["disabled","aria-label","title"],cD={key:0,class:"i-svg-spinners-ring-resize size-5"},uD={key:1,class:"i-tabler-plus size-5"},dD={class:"sr-only"},pD={class:"flex items-center gap-2"},mD=["aria-label","title"],fD={class:"sr-only"},hD=["disabled","aria-label","title"],gD={class:"flex h-4 items-center gap-[2px]","aria-hidden":"true"},vD=["data-composer-action","disabled","aria-label","title"],bD={key:0,class:"i-tabler-player-stop-filled size-3.5"},yD={key:1,class:"i-tabler-arrow-up size-[17px]"},xD={class:"sr-only"},wD={key:2,"data-test":"messaging-ai-notice",class:"mx-auto max-w-[640px] @5xl/chat:max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"},kD=Ae({__name:"ElAgentChat",props:{chatController:{},agent:{},variant:{default:"dark"},scope:{default:"private"},scopeName:{},setupHint:{},emptyStateMessage:{},showHeader:{type:Boolean,default:!1},headerMeta:{},centered:{type:Boolean,default:!1}},setup(e){let t={private:{icon:"i-tabler-lock",label:"Private",tooltip:"Only you can see this conversation"},org:{icon:"i-tabler-users",label:"Workspace",tooltip:"Visible to workspace members"},public:{icon:"i-tabler-globe",label:"Public",tooltip:"Anyone with the link can see this"}},n=N(()=>{let K={...t[e.scope]};return e.scope==="org"&&e.scopeName&&(K.label=e.scopeName,K.tooltip=`Visible to ${e.scopeName} members`),K}),i=G(),r=G(),o=G();function a(K){return K?/\[[^\]]+\]\([^)]+\)/.test(K):!1}function s(K){return K.sender==="system"&&(!!K.issue||K.id===de.value)}function c(K,B){let ee=K[B],Je=K[B+1];return!Je||Je.sender!==ee.sender}let u=N(()=>e.chatController?.textState.value),d=N(()=>u.value?.isConnected??!1),p=N(()=>u.value?.isThinking??!1),m=N(()=>u.value?.connectionStatus!=="connected"&&!u.value?.error),f=N(()=>e.chatController?.liveTurnBlocks?.value??[]),S=N(()=>{for(let K=f.value.length-1;K>=0;K--){let B=f.value[K];if(B?.kind==="text")return B.id}}),z=N(()=>e.chatController?.liveStreamMessageId?.value),T=N(()=>{let K=e.chatController?.sharedMessages.value??[];return f.value.length&&z.value?K.filter(B=>B.id!==z.value):K}),L=N(()=>{if(!e.chatController?.workJournal?.value)return u.value?.workingDescription?.trim()||void 0}),j=N(()=>e.chatController?.workJournal?.value),D=N(()=>{if(!j.value&&!f.value.length)return;let K=T.value,B=K[K.length-1];if(B)return B.sender==="agent"||B.sender==="system"?K.length>=2?K[K.length-2].id:void 0:B.id}),U=N(()=>{let K={};for(let B of T.value){if(B.sender==="user"||!B.toolActivities?.length)continue;let ee=e.chatController?.workJournalFor?.({activities:B.toolActivities,outcome:oO(B),includeFailureNote:B.sender!=="system"});ee&&(K[B.id]=ee)}return K});function $(K){return U.value[K.id]}function F(K,B){return K.placement?.kind!=="inline"||!Number.isFinite(K.placement.offset)?null:Math.max(0,Math.min(B.length,Math.trunc(K.placement.offset)))}function se(K,B){return K.mediaId||`${K.src}:${B}`}function he(K){return(K.attachments??[]).map((B,ee)=>({attachment:B,index:ee})).filter(({attachment:B})=>F(B,K.text)===null)}function te(K){let B=K.text??"";if(K.sender!=="agent")return B?[{kind:"text",key:`${K.id}:text`,text:B}]:[];let ee=(K.attachments??[]).map(($e,cr)=>({attachment:$e,index:cr,offset:F($e,B)})).filter($e=>$e.offset!==null).sort(($e,cr)=>$e.offset-cr.offset||$e.index-cr.index);if(ee.length===0)return B?[{kind:"text",key:`${K.id}:text`,text:B}]:[];let Je=[],ke=0;for(let $e of ee)$e.offset>ke&&Je.push({kind:"text",key:`${K.id}:text:${ke}`,text:B.slice(ke,$e.offset)}),Je.push({kind:"attachment",key:`${K.id}:attachment:${se($e.attachment,$e.index)}`,attachment:$e.attachment,placement:"inline"}),ke=$e.offset;return ke<B.length&&Je.push({kind:"text",key:`${K.id}:text:${ke}`,text:B.slice(ke)}),Je}let W=N(()=>u.value?.transientIssue),de=N(()=>{if(!p.value)return;let K=T.value,B=K[K.length-1];return B?.sender==="agent"||B?.sender==="system"?B.id:void 0}),ie=N(()=>!p.value||L.value||j.value||f.value.length?!1:de.value===void 0),ye=N(()=>!!L.value||ie.value),Be=N(()=>u.value?.sendBlockedReason),mt=N(()=>Be.value==="agent_deleted"),ft=N(()=>m.value?"Connecting...":Be.value==="agent_deleted"?"This assistant was deleted":"Send a message"),je=N(()=>du(e.agent.state.value)),De=N(()=>{if(_.value||!je.value||je.value==="awake")return;let K=e.agent.displayName.value||e.agent.name.value||"Your assistant";return je.value==="changing"?`${K} will be right back\u2026`:`${K} is ${uu[je.value].toLowerCase()}.`}),Tt=N(()=>e.chatController?.composerState?.value??{text:"",pendingAttachments:[],isUploading:!1}),Ze=N({get:()=>Tt.value.text,set:K=>e.chatController?.setComposerText?.({text:K})}),gr=N(()=>Tt.value.pendingAttachments),ht=N(()=>Tt.value.isUploading),vt=N(()=>e.chatController?.voiceRecorder),Tr=N(()=>vt.value?.isBusy.value??!1),wt=N(()=>e.chatController?.canAttachFile?.value??!1),On=N(()=>e.chatController?.canRecordAudio?.value??!1),kt=N(()=>e.chatController?.composerAction?.value??"idle"),At=N(()=>kt.value!=="idle"),Bt=N(()=>e.chatController?.composerShowsSecondaryStop?.value??!1),Ge=N(()=>e.chatController?.queuedMessageIds?.value);function Zt(K){return Ge.value?.has(K)??!1}let He=N(()=>kt.value==="stop"?"Stop reply":Bt.value?"Send \u2014 answered after current work":"Send message"),jr=N(()=>On.value&&!Tr.value&&!!vt.value?.canUseBrowserRecording),h=N(()=>vt.value?.isActive.value??!1),k=N(()=>vt.value?.state.value.phase==="sending"),M=N(()=>vt.value?.elapsedLabel.value??"0:00"),H=N(()=>{let K=vt.value?.state.value.phase;return K==="preparing"||K==="sending"?vt.value?.statusText.value??"Starting microphone":br.value?"Release to send":"Click mic to send"}),w=N(()=>vt.value?.state.value.phase==="sending"?"Sending voice message":h.value?br.value?"Release to send voice message":"Stop and send voice message":"Record voice message"),_=G(!1),b=G(),C=G(),I=G(),A=0,oe=N(()=>e.chatController?.canStartVoice?.value??!1);lt([()=>e.agent.avatar.value?.src,oe],([K,B])=>{let ee=++A;if(I.value=void 0,!B||!K||typeof Image>"u")return;let Je=new Image;Je.onload=()=>{ee===A&&(I.value=K)},Je.src=K},{immediate:!0});let re=N(()=>oe.value&&!_.value&&!h.value&&kt.value==="idle"),ue=N(()=>!d.value),fe=N(()=>ue.value?`Voice available when ${e.agent.displayName.value||e.agent.name.value||"the assistant"} is awake`:"Start voice conversation");function _e(){!re.value||ue.value||(C.value=I.value,_.value=!0)}async function Te(){if(!_.value)return;let K=b.value?.end();_.value=!1,C.value=void 0,await Ri(),await K,r.value?.focus(),await e.chatController?.refreshMessages()}let ae=N(()=>e.variant==="light"),Ke=N(()=>ae.value?"bg-gradient-to-r from-transparent via-theme-300/70 to-transparent":"bg-gradient-to-r from-transparent via-white/15 to-transparent"),Xe=N(()=>ae.value?"text-theme-300":"text-white/30");It(async()=>{e.chatController&&!d.value&&await e.chatController.startTextConversation()}),rn(()=>{e.chatController?.voiceRecorder?.teardown()});async function St(){!e.chatController||kt.value!=="send"||(r.value&&(r.value.style.height="auto",window.matchMedia("(pointer: coarse)").matches?r.value.blur():r.value.focus()),i.value?.pin(),await e.chatController.sendComposerMessage())}async function gt(K){!e.chatController||mt.value||(i.value?.pin(),await e.chatController.sendChatMessage(K))}async function rr(){if(e.chatController){if(kt.value==="send"){await St();return}await e.chatController.handleComposerAction()}}async function vr(K){K.isComposing||K.key==="Enter"&&!K.shiftKey&&(K.preventDefault(),await St())}function pt(K){h.value||mt.value||K.target instanceof Element&&K.target.closest("button, a, textarea")||r.value?.focus()}function ct(){r.value&&(r.value.style.height="auto",r.value.style.height=`${Math.min(r.value.scrollHeight,150)}px`)}lt(Ze,()=>Ri(()=>ct()));function Dn(){o.value?.click()}async function di(K){let B=K.target,ee=B.files?.[0];!ee||!e.chatController||Tr.value||(await e.chatController.attachFile({file:ee}),B.value="")}function dl(K){e.chatController?.removeAttachment({index:K})}function Gi(){vt.value?.start()}function Pn(K){vt.value?.finish(K)}let br=Ye(!1),pn=!1;function yr(K){K.pointerType==="touch"&&(pn=!0,br.value=!0,K.currentTarget.setPointerCapture?.(K.pointerId),Gi())}function Rn(K){K.pointerType!=="touch"||!br.value||(br.value=!1,Pn({cancelled:!1}))}function ga(K){K.pointerType!=="touch"||!br.value||(br.value=!1,pn=!1,Pn({cancelled:!0}))}function va(){h.value?Pn({cancelled:!1}):Gi()}function Md(){if(pn){pn=!1;return}va()}function ba(K,B){if(B===0){let $e=K[B];return $e?.timestamp?Ji(new Date($e.timestamp)):null}let ee=K[B-1],Je=K[B];if(!ee?.timestamp||!Je?.timestamp)return null;let ke=new Date(ee.timestamp).getTime();return new Date(Je.timestamp).getTime()-ke>36e5?Ji(new Date(Je.timestamp)):null}function Ji(K){let B=new Date,ee=K.toDateString()===B.toDateString(),Je=new Date(B);Je.setDate(Je.getDate()-1);let ke=K.toDateString()===Je.toDateString(),$e=K.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});if(ee)return $e;if(ke)return`Yesterday, ${$e}`;let cr=K.getFullYear()===B.getFullYear();return`${K.toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric",...cr?{}:{year:"numeric"}})}, ${$e}`}return(K,B)=>(v(),x("div",{"data-test":"messaging-root",class:V(["@container/chat relative flex h-full flex-col",T.value.length===0?"min-h-0 [justify-content:safe_center] overflow-y-auto":""])},[e.showHeader&&!ae.value?(v(),x("div",k5,[be(Nd,{agent:e.agent,"is-online":d.value},null,8,["agent","is-online"])])):e.showHeader?(v(),x("div",_5,[y("div",{class:V(["flex items-center gap-3",e.centered?"max-w-[640px] @5xl/chat:max-w-[720px] mx-auto":""])},[be(_b,{agent:e.agent,"is-light":ae.value,class:"size-10"},null,8,["agent","is-light"]),y("div",$5,[y("div",S5,ce(e.agent.displayName.value),1),y("div",E5,ce(e.agent.title.value||"Assistant"),1)]),e.headerMeta?(v(),x("span",I5,ce(e.headerMeta),1)):Y("",!0)],2)])):Y("",!0),be(ni,{name:"voice-call"},{default:bt(()=>[_.value?(v(),x("div",{key:0,"data-test":"voice-call-overlay",role:"dialog","aria-modal":"true","aria-label":`Voice conversation with ${e.agent.displayName.value}`,class:"fixed inset-0 z-[100] flex items-stretch justify-stretch bg-[#050F19] sm:items-center sm:justify-center sm:bg-[#050F19]/45 sm:p-6",onKeydown:B[0]||(B[0]=zn(ee=>Te(),["esc"]))},[be(w5,{ref_key:"voiceMode",ref:b,agent:e.agent,"chat-controller":e.chatController,"backdrop-src":C.value,"is-light":!1,class:"voice-call-card h-full w-full sm:max-h-[620px] sm:max-w-[420px] sm:flex-none sm:rounded-[32px] sm:shadow-[0_32px_80px_rgba(5,15,25,0.45)]",onEnd:Te},null,8,["agent","chat-controller","backdrop-src"])],40,T5)):Y("",!0)]),_:1}),m.value?(v(),x("div",{key:2,class:V(["py-16 flex flex-col items-center justify-center gap-2 text-sm",ae.value?"text-theme-400":"text-theme-600"])},[be(kd,{class:"size-4"})],2)):e.setupHint?(v(),x("div",{key:3,class:V(["flex items-center justify-center gap-1.5 py-2 text-[11px]",Xe.value])},[B[14]||(B[14]=y("i",{class:"i-tabler-tool size-3"},null,-1)),y("span",null,ce(e.setupHint),1)],2)):Y("",!0),be(W6,{ref_key:"chatScroller",ref:i,inert:_.value,"aria-hidden":_.value?"true":void 0,class:V(T.value.length===0?"flex-none":"flex-1")},{default:bt(()=>[y("div",{class:V([T.value.length===0?"flex flex-col items-center justify-center px-3 py-4":e.centered?"pt-20 pb-5 px-3 @lg/chat:px-8 space-y-2":"pt-4 pb-[120px] px-3 @lg/chat:px-8 space-y-2",e.centered?T.value.length===0?"max-w-[900px] mx-auto w-full":"max-w-[640px] @5xl/chat:max-w-[720px] mx-auto w-full":""])},[T.value.length===0&&!m.value?(v(),x("div",z5,[er(K.$slots,"empty-heading",{agent:e.agent,isLight:ae.value},()=>[be(_b,{agent:e.agent,"is-light":ae.value,class:"mb-4 size-20 @sm/chat:size-24"},null,8,["agent","is-light"]),y("div",{class:V(["text-base @sm/chat:text-lg font-semibold",ae.value?"text-theme-900":"text-white"])},ce(e.agent.displayName.value),3)],!0),e.emptyStateMessage===""?Y("",!0):(v(),x(ge,{key:0},[y("p",{class:V(["mt-1 text-center text-xs @sm/chat:text-sm",Xe.value])},ce(e.emptyStateMessage||"Type your message to get started."),3),y("div",{class:V(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]",ae.value?"bg-theme-50 border border-theme-100 text-theme-400":"bg-white/10 border border-white/20 text-white/40"]),title:n.value.tooltip},[y("i",{class:V([n.value.icon,"size-3"])},null,2),y("span",null,ce(n.value.label),1)],10,N5)],64))])):Y("",!0),(v(!0),x(ge,null,et(T.value,(ee,Je)=>(v(),x(ge,{key:ee.id},[ba(T.value,Je)?(v(),x("div",C5,[y("div",{class:V(["flex-1 h-px",Ke.value])},null,2),y("span",{class:V(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase",Xe.value])},ce(ba(T.value,Je)),3),y("div",{class:V(["flex-1 h-px",Ke.value])},null,2)])):Y("",!0),$(ee)?(v(),x("div",{key:1,"data-test":"messaging-message-tool-activity","data-journal-outcome":$(ee)?.outcome,class:"mb-4 w-full"},[be(pb,{model:$(ee),"is-light":ae.value},null,8,["model","is-light"])],8,A5)):Y("",!0),s(ee)?(v(),x("div",{key:2,"data-test":"messaging-system-msg","data-message-id":ee.id,"data-message-sender":ee.sender,"data-conversation-id":ee.conversationId,"data-message-sequence":ee.sequence,"data-system-kind":ee.systemKind,"data-issue-code":ee.issue?.code,"data-issue-bucket":ee.issue?.bucket,"data-issue-action-label":ee.issue?.actionLabel,"data-issue-action-url":ee.issue?.actionUrl,"data-streaming":ee.id===de.value?"true":void 0,class:"flex gap-2 items-end justify-start mb-4"},[y("div",D5,[y("div",{class:V(["mb-1 pl-1 text-[11px] font-medium",ae.value?"text-theme-500":"text-white/45"])}," System Message ",2),y("div",{class:V(["pl-1",ae.value?"text-theme-700":"text-white/85"])},[ee.text?(v(),Fe(nl,{key:0,text:ee.text,inverted:!ae.value,streaming:ee.id===de.value,onClick:B[1]||(B[1]=_t(()=>{},["stop"])),onAction:gt},null,8,["text","inverted","streaming"])):ee.issue?.help?(v(),Fe(nl,{key:1,text:ee.issue.help,inverted:!ae.value},null,8,["text","inverted"])):Y("",!0),ee.issue?.actionUrl&&!a(ee.text)?(v(),x("a",{key:2,href:ee.issue.actionUrl,"data-test":"messaging-system-msg-action",class:V(["mt-2 text-[12px] font-medium inline-flex items-center gap-1",ae.value?"text-theme-900 hover:text-theme-700":"text-white hover:text-white/80"]),onClick:B[2]||(B[2]=_t(()=>{},["stop"]))},[xt(ce(ee.issue.actionLabel)+" ",1),B[15]||(B[15]=y("i",{class:"i-tabler-arrow-right size-3"},null,-1))],10,P5)):Y("",!0)],2)])],8,O5)):ee.sender==="system"?(v(),x("div",{key:3,"data-test":"messaging-system-status-msg","data-message-id":ee.id,"data-message-sender":ee.sender,"data-conversation-id":ee.conversationId,"data-message-sequence":ee.sequence,"data-system-kind":ee.systemKind,"data-issue-code":ee.issue?.code,"data-issue-bucket":ee.issue?.bucket,"data-streaming":ee.id===de.value?"true":void 0,class:V(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1",ae.value?"bg-theme-100 text-theme-600 ring-theme-200":"bg-white/10 text-white/70 ring-white/10"])},[B[16]||(B[16]=y("i",{class:"i-tabler-info-circle size-4 mt-0.5 shrink-0","aria-hidden":"true"},null,-1)),be(nl,{text:ee.text,inverted:!ae.value,onClick:B[3]||(B[3]=_t(()=>{},["stop"]))},null,8,["text","inverted"])],10,R5)):(v(),x("div",{key:4,"data-test":ee.sender==="agent"?"messaging-assistant-msg":ee.sender==="user"?"messaging-user-msg":void 0,"data-message-id":ee.id,"data-message-sender":ee.sender,"data-conversation-id":ee.conversationId,"data-message-sequence":ee.sequence,"data-system-kind":ee.systemKind,"data-streaming":ee.id===de.value?"true":void 0,"data-queued":Zt(ee.id)?"true":void 0,"aria-label":Zt(ee.id)?"Sent \u2014 will be answered after the current work finishes":void 0,class:V(["flex gap-2 items-end",{"justify-end":ee.sender==="user","justify-start":ee.sender==="agent","mb-6":c(T.value,Je),"opacity-70":Zt(ee.id)}])},[y("div",{"data-test":"messaging-message-body",class:V(ee.sender==="user"?"max-w-[min(78%,30rem)]":"w-full min-w-0")},[he(ee).length?(v(),x("div",{key:0,class:V(["mb-1 space-y-1",ee.sender==="user"?"flex flex-col items-end":""])},[(v(!0),x(ge,null,et(he(ee),({attachment:ke,index:$e})=>(v(),x(ge,{key:se(ke,$e)},[ke.type==="image"?(v(),x("img",{key:0,src:ke.src,alt:ke.filename,"data-test":"messaging-attachment","data-attachment-placement":"block",class:"rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"},null,8,U5)):ke.type==="audio"?(v(),x("audio",{key:1,src:ke.src,controls:"","data-test":"messaging-attachment","data-attachment-placement":"block",class:"max-w-full"},null,8,j5)):(v(),x("a",{key:2,href:ke.src,target:"_blank",rel:"noopener","data-test":"messaging-attachment","data-attachment-placement":"block",class:V(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",ae.value?"bg-theme-100 text-theme-600 hover:bg-theme-200":"bg-white/10 text-white/80 hover:bg-white/20"])},[B[17]||(B[17]=y("i",{class:"i-tabler-file size-3.5"},null,-1)),xt(" "+ce(ke.filename),1)],10,L5))],64))),128))],2)):Y("",!0),te(ee).length?(v(),x("div",{key:1,"data-test":"messaging-message-content",class:V(ee.sender==="user"?ae.value?"rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900":"rounded-[14px] px-4 py-2.5 bg-white/10 text-white":ae.value?"text-theme-800":"text-white/95")},[(v(!0),x(ge,null,et(te(ee),ke=>(v(),x(ge,{key:ke.key},[ke.kind==="text"&&ke.text?(v(),x("div",V5,[be(nl,{text:ke.text,inverted:ee.sender==="user"||!ae.value,streaming:ee.id===de.value,onClick:B[4]||(B[4]=_t(()=>{},["stop"])),onAction:gt},null,8,["text","inverted","streaming"])])):ke.kind==="attachment"&&ke.attachment.type==="image"?(v(),x("img",{key:1,src:ke.attachment.src,alt:ke.attachment.filename,"data-test":"messaging-attachment","data-attachment-placement":ke.placement,class:"my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"},null,8,F5)):ke.kind==="attachment"&&ke.attachment.type==="audio"?(v(),x("audio",{key:2,src:ke.attachment.src,controls:"","data-test":"messaging-attachment","data-attachment-placement":ke.placement,class:"my-2 max-w-full"},null,8,B5)):ke.kind==="attachment"?(v(),x("a",{key:3,href:ke.attachment.src,target:"_blank",rel:"noopener","data-test":"messaging-attachment","data-attachment-placement":ke.placement,class:V(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",ae.value?"bg-theme-100 text-theme-600 hover:bg-theme-200":"bg-white/10 text-white/80 hover:bg-white/20"])},[B[18]||(B[18]=y("i",{class:"i-tabler-file size-3.5"},null,-1)),xt(" "+ce(ke.attachment.filename),1)],10,Z5)):Y("",!0)],64))),128))],2)):Y("",!0)],2)],10,M5)),ee.id===D.value?(v(),x(ge,{key:5},[f.value.length?(v(!0),x(ge,{key:0},et(f.value,ke=>(v(),x(ge,{key:ke.id},[ke.kind==="work"?(v(),x("div",{key:0,"data-test":"messaging-tool-activity","data-journal-outcome":ke.journal.outcome,class:"chat-live-enter mb-4 w-full"},[be(pb,{model:ke.journal,"is-light":ae.value},null,8,["model","is-light"])],8,H5)):ke.kind==="text"&&ke.content?(v(),x("div",{key:1,"data-test":"messaging-live-text-block",class:V(["mb-4",ae.value?"text-theme-800":"text-white/95"])},[be(nl,{text:ke.content,inverted:!ae.value,streaming:ke.id===S.value,onClick:B[5]||(B[5]=_t(()=>{},["stop"])),onAction:gt},null,8,["text","inverted","streaming"])],2)):(v(),x("div",{key:2,"data-test":"messaging-tool-activity-tail","aria-label":"Assistant is still working",class:V(["chat-live-enter mb-4 grid h-[17px] w-5 place-items-center",ae.value?"text-theme-500":"text-white/70"])},[...B[19]||(B[19]=[y("span",{class:"chat-dots chat-dots--mini","aria-hidden":"true"},[y("span"),y("span"),y("span")],-1)])],2))],64))),128)):j.value?(v(),x("div",{key:1,"data-test":"messaging-tool-activity","data-journal-outcome":j.value.outcome,class:"chat-live-enter mb-4 w-full"},[be(pb,{model:j.value,"is-light":ae.value},null,8,["model","is-light"])],8,K5)):Y("",!0)],64)):Y("",!0)],64))),128)),ye.value?(v(),x("div",{key:1,"data-test":L.value?"messaging-working-state":"messaging-thinking-indicator","data-working-description":L.value,role:"status","aria-live":"polite",class:V(["chat-live-enter relative mb-4 flex h-[17px] items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug",ae.value?"text-theme-500":"text-white/50"])},[B[20]||(B[20]=y("span",{"data-test":"messaging-thinking-dots",class:"chat-dots shrink-0","aria-hidden":"true"},[y("span"),y("span"),y("span")],-1)),L.value?(v(),x("span",G5,ce(L.value),1)):(v(),x("span",J5,"Thinking"))],10,W5)):Y("",!0),W.value?(v(),x("div",{key:2,"data-test":"messaging-transient-issue","data-issue-code":W.value.code,class:V(["chat-live-enter flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug",ae.value?"text-theme-600":"text-white/60"])},[B[21]||(B[21]=y("i",{class:"i-tabler-alert-circle size-3.5 shrink-0 text-red-500","aria-hidden":"true"},null,-1)),y("span",null,[xt(ce(W.value.message),1),W.value.help?(v(),x(ge,{key:0},[xt(ce(W.value.help),1)],64)):Y("",!0)]),W.value.actionUrl&&W.value.actionLabel?(v(),x("a",{key:0,href:W.value.actionUrl,class:"shrink-0 underline underline-offset-2",onClick:B[6]||(B[6]=_t(()=>{},["stop"]))},ce(W.value.actionLabel),9,Y5)):Y("",!0)],10,q5)):Y("",!0)],2)]),_:3},8,["inert","aria-hidden","class"]),y("div",{"data-test":"messaging-composer-footer",inert:_.value,"aria-hidden":_.value?"true":void 0,class:V(["left-0 right-0 z-30 px-3 @lg/chat:px-8 pb-[max(env(safe-area-inset-bottom),1rem)]",[T.value.length===0||e.centered?"relative shrink-0":"absolute bottom-0",e.centered&&T.value.length>0?"pt-0 sm:pb-7":"pt-3",ae.value?e.centered?"bg-transparent":"bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent":"bg-gradient-to-t from-black/90 via-black/60 to-transparent"]])},[er(K.$slots,"composer",{},()=>[De.value?(v(),x("div",{key:0,"data-test":"messaging-seat","data-seat-state":je.value,role:"status","aria-live":"polite",class:V(["py-3 text-center text-[14px]",ae.value?"text-theme-500":"text-white/70"])},ce(De.value),11,Q5)):(v(),x(ge,{key:1},[gr.value.length>0?(v(),x("div",{key:0,class:V(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",e.centered?"max-w-[640px] @5xl/chat:max-w-[720px] mx-auto":""])},[(v(!0),x(ge,null,et(gr.value,(ee,Je)=>(v(),x("div",{key:Je,class:"relative shrink-0 group"},[ee.type==="image"?(v(),x("img",{key:0,src:ee.src,alt:ee.filename,class:V(["size-14 rounded-xl object-cover border",ae.value?"border-black/10":"border-white/20"])},null,10,eD)):(v(),x("div",{key:1,class:V(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border",ae.value?"border-black/10 bg-theme-50 text-theme-600":"border-white/20 bg-white/10 text-white/70"])},[B[22]||(B[22]=y("i",{class:"i-tabler-file size-4"},null,-1)),y("span",tD,ce(ee.filename),1)],2)),y("button",{class:"absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] cursor-pointer",onClick:ke=>dl(Je)},[...B[23]||(B[23]=[y("i",{class:"i-tabler-x size-3"},null,-1)])],8,rD)]))),128)),ht.value?(v(),x("div",nD,[be(kd,{class:"size-5"})])):Y("",!0)],2)):Y("",!0),wt.value?(v(),x("input",{key:1,ref_key:"fileInput",ref:o,type:"file",accept:"image/*,audio/*,video/*",class:"hidden",onChange:di},null,544)):Y("",!0),y("div",{"data-test":"messaging-composer","data-composer-action":kt.value,class:V(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200",[e.centered?"mx-auto max-w-[640px] @5xl/chat:max-w-[720px] @5xl/chat:px-5 @5xl/chat:pt-3.5 @5xl/chat:pb-3":"",ae.value?"bg-white shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_rgba(15,23,42,0.07)] ring-1 ring-theme-950/10 hover:ring-theme-950/15 focus-within:ring-theme-950/15":"bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),onClick:pt},[h.value?(v(),x("div",{key:1,"data-test":"messaging-recording-state",class:V(["flex min-w-0 items-center gap-2 py-1",ae.value?"text-theme-700":"text-white/80"])},[B[24]||(B[24]=y("span",{class:"size-2.5 shrink-0 rounded-full bg-red-500"},null,-1)),y("span",aD,ce(M.value),1),y("span",{class:V(["min-w-0 truncate text-sm",ae.value?"text-theme-400":"text-white/45"])},ce(H.value),3)],2)):Uu((v(),x("textarea",{key:0,ref_key:"textarea",ref:r,"onUpdate:modelValue":B[7]||(B[7]=ee=>Ze.value=ee),"data-test":"messaging-input",rows:"1",enterkeyhint:"send",inputmode:"text",autocomplete:"off",autocapitalize:"sentences",autocorrect:"on",spellcheck:"true",placeholder:ft.value,disabled:mt.value,style:{fontSize:"16px",resize:"none"},class:V(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",ae.value?"text-theme-900 placeholder-theme-400":"text-white placeholder-white/50"]),onKeydown:vr},null,42,oD)),[[Hu,Ze.value]]),y("div",sD,[y("button",{class:V(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11",[wt.value?"cursor-pointer":"cursor-default",ae.value?"text-theme-500":"text-white/50",ht.value||Tr.value?"opacity-50 pointer-events-none":""]]),disabled:mt.value||ht.value||Tr.value||!wt.value,"aria-label":wt.value?"Attach file":"File attachments unavailable",title:wt.value?"Attach file":"File attachments unavailable",onClick:B[8]||(B[8]=ee=>wt.value&&Dn())},[ht.value?(v(),x("i",cD)):(v(),x("i",uD)),y("span",dD,ce(wt.value?"Attach file":"File attachments unavailable"),1)],10,lD),B[28]||(B[28]=y("div",{class:"flex-1"},null,-1)),y("div",pD,[h.value&&!k.value&&!_.value?(v(),x("button",{key:0,"data-test":"messaging-record-discard-btn",class:V(["flex size-8 cursor-pointer items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11",ae.value?"text-theme-400":"text-white/40"]),"aria-label":"Discard recording",title:"Discard recording",onClick:B[9]||(B[9]=ee=>Pn({cancelled:!0}))},[...B[25]||(B[25]=[y("i",{class:"i-tabler-x size-[18px]","aria-hidden":"true"},null,-1)])],2)):Y("",!0),(jr.value||h.value)&&!k.value&&!_.value?(v(),x("button",{key:1,"data-test":"messaging-record-audio-btn",class:V(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] hover:opacity-70 pointer-coarse:size-11",h.value?ae.value?"text-theme-900 scale-110":"text-white scale-110":ae.value?"text-theme-500":"text-white/60"]),"aria-label":w.value,title:w.value,onPointerdown:_t(yr,["prevent"]),onPointerup:_t(Rn,["prevent"]),onPointercancel:_t(ga,["prevent"]),onClick:Md,onKeydown:B[10]||(B[10]=zn(_t(ee=>Pn({cancelled:!0}),["prevent"]),["escape"]))},[y("i",{class:V([h.value?"i-tabler-microphone-filled":"i-tabler-microphone","size-[18px]"])},null,2),y("span",fD,ce(w.value),1)],42,mD)):Y("",!0),re.value?(v(),x("button",{key:2,"data-test":"messaging-voice-start-btn",class:V(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",[ae.value?"bg-theme-900 text-theme-0 hover:bg-theme-800":"bg-theme-0 text-theme-950 hover:bg-theme-100",ue.value?"cursor-not-allowed opacity-40":"cursor-pointer"]]),disabled:ue.value,"aria-label":fe.value,title:fe.value,onClick:B[11]||(B[11]=ee=>_e())},[y("span",gD,[(v(),x(ge,null,et([7,13,16,11,14],ee=>y("span",{key:ee,class:"w-[2px] rounded-full bg-current",style:we({height:`${ee}px`})},null,4)),64))]),B[26]||(B[26]=y("span",{class:"sr-only"},"Start voice conversation",-1))],10,hD)):h.value?Y("",!0):(v(),x(ge,{key:3},[Bt.value?(v(),x("button",{key:0,"data-test":"messaging-secondary-stop-btn",class:V(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",ae.value?"bg-theme-100 text-theme-700 hover:bg-theme-200":"bg-white/10 text-white/70 hover:bg-white/15"]),"aria-label":"Stop work",title:"Stop work",onClick:B[12]||(B[12]=ee=>e.chatController?.stopChatTurn())},[...B[27]||(B[27]=[y("i",{class:"i-tabler-player-stop-filled size-3.5","aria-hidden":"true"},null,-1),y("span",{class:"sr-only"},"Stop work",-1)])],2)):Y("",!0),y("button",{"data-test":"messaging-send-btn","data-composer-action":kt.value,class:V(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",At.value?ae.value?"bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer":"bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer":ae.value?"bg-theme-100 text-theme-400":"bg-white/10 text-white/30"]),disabled:!At.value,"aria-label":He.value,title:He.value,onClick:B[13]||(B[13]=ee=>rr())},[kt.value==="stop"?(v(),x("i",bD)):(v(),x("i",yD)),y("span",xD,ce(He.value),1)],10,vD)],64))])])],10,iD),e.centered&&T.value.length>0?(v(),x("p",wD,ce(e.agent.displayName.value)+" is AI and can make mistakes. ",1)):Y("",!0)],64))],!0)],10,X5)],2))}}),jb=Yb((e,t)=>{let n=e.__vccOpts||e;for(let[i,r]of t)n[i]=r;return n},"default"),Hi=jb(kD,[["__scopeId","data-v-d662ddec"]]),_D={class:"agent-wrap"},$D={key:0,class:"flex items-center justify-center h-full"},SD={key:2,class:"flex h-full flex-col items-center justify-center gap-4 px-6 text-center",role:"status","aria-live":"polite","data-test":"agent-unavailable"},Od=Ae({__name:"AgentWrap",props:{sdk:{},agent:{},handle:{},context:{},clientContext:{},firstMessage:{},buttonText:{},buttonIcon:{},hasClose:{type:Boolean},chatOnly:{type:Boolean},bare:{type:Boolean},apiBase:{}},setup(e){let t=yn("AgentWrap"),n=e,i=n.sdk||Qs.getInstance({isDev:typeof window<"u"?window.location.hostname==="localhost"||window.location.hostname.includes("127.0.0.1"):!1,...n.apiBase&&{apiBase:n.apiBase}}),r=Ye(!n.agent),o=Ye(n.agent?new on({config:n.agent}):void 0),a=Ye();async function s(){if(n.agent){t.debug("Agent provided via props, skipping fetch",{agentId:n.agent.agentId,handle:n.agent.handle}),r.value=!1;return}if(!n.handle){a.value="No handle or agent provided",t.warn("AgentWrap mounted without handle or agent",{propsReceived:{handle:n.handle,agent:n.agent,context:n.clientContext??n.context,apiBase:n.apiBase},sdkState:{isDev:i.isDev,apiBase:i.apiBase}}),r.value=!1;return}try{r.value=!0,a.value=void 0,t.debug("Fetching public agent",{handle:n.handle});let c=await i.user.getPublicAgent({handle:n.handle});c?(o.value=new on({config:c}),t.debug("Successfully fetched public agent",{agentId:c.agentId,handle:c.handle}),c.agentId&&i.user.track({event:"view_profile",agentId:c.agentId,properties:{viewSource:"widget"}})):(a.value=i.error.value||"Agent not found",t.error("Failed to fetch public agent - no data returned",{handle:n.handle,sdkError:i.error.value,sdkState:{isDev:i.isDev,apiBase:i.apiBase,loading:i.loading.value}}))}catch(c){a.value=c instanceof Error?c.message:"Failed to fetch agent",t.error("Exception while fetching public agent",{handle:n.handle,error:c instanceof Error?{message:c.message,stack:c.stack}:c,sdkState:{isDev:i.isDev,apiBase:i.apiBase,error:i.error.value}})}finally{r.value=!1,o.value||t.debug("AgentWrap component will render unavailable state",{state:{loading:r.value,hasAgent:!!o.value,error:a.value},props:{handle:n.handle,context:n.clientContext??n.context,apiBase:n.apiBase},sdkState:{isDev:i.isDev,apiBase:i.apiBase,error:i.error.value}})}}return It(s),(c,u)=>(v(),x("div",_D,[r.value?(v(),x("div",$D,[y("div",{class:V(["size-6 animate-spin rounded-full border-b-2",n.bare?"border-theme-400":"border-white"])},null,2)])):o.value?er(c.$slots,"default",{sdk:Ie(i),agent:o.value,context:e.clientContext??e.context,firstMessage:e.firstMessage,buttonText:e.buttonText,buttonIcon:e.buttonIcon,loading:r.value},void 0,void 0,1):a.value?(v(),x("div",SD,[u[0]||(u[0]=y("p",{class:"text-sm font-medium text-theme-600"}," This assistant is unavailable right now. ",-1)),y("button",{type:"button",class:"min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700","data-test":"agent-unavailable-retry",onClick:s}," Try again ")])):Y("",!0)]))}})});function fa(e){let t=G(e.agent),n=G(e.context),i=G(e.firstMessage),r=G(e.buttonText),o=G(e.buttonIcon);function a(s){s.agent!==void 0&&(t.value=s.agent),s.context!==void 0&&(n.value=s.context),s.firstMessage!==void 0&&(i.value=s.firstMessage),s.buttonText!==void 0&&(r.value=s.buttonText),s.buttonIcon!==void 0&&(o.value=s.buttonIcon)}return{currentAgent:t,currentContext:n,currentFirstMessage:i,currentButtonText:r,currentButtonIcon:o,update:a}}var Dd=O(()=>{"use strict";mn();Nn()});var Ki,T2=O(()=>{"use strict";mn();Ki={linkedin:{label:"LinkedIn",icon:"i-simple-icons-linkedin",placeholder:"john-smith",getUrl:e=>`https://linkedin.com/in/${e}`},x:{label:"X",icon:"i-simple-icons-x",placeholder:"johnsmith",getUrl:e=>`https://x.com/${e}`},facebook:{label:"Facebook",icon:"i-simple-icons-facebook",placeholder:"johnsmith",getUrl:e=>`https://facebook.com/${e}`},tiktok:{label:"TikTok",icon:"i-simple-icons-tiktok",placeholder:"johnsmith",getUrl:e=>`https://tiktok.com/@${e}`},youtube:{label:"YouTube",icon:"i-tabler-brand-youtube",placeholder:"johnsmith",getUrl:e=>`https://youtube.com/@${e}`},github:{label:"GitHub",icon:"i-tabler-brand-github",placeholder:"johnsmith",getUrl:e=>`https://github.com/${e}`},instagram:{label:"Instagram",icon:"i-simple-icons-instagram",placeholder:"johnsmith",getUrl:e=>`https://instagram.com/${e}`},threads:{label:"Threads",icon:"i-simple-icons-threads",placeholder:"johnsmith",getUrl:e=>`https://threads.net/@${e}`},email:{label:"Email",icon:"i-tabler-mail",placeholder:"hello@example.com",getUrl:e=>`mailto:${e}`},phone:{label:"Phone",icon:"i-tabler-phone",placeholder:"+1-555-123-4567",getUrl:e=>`tel:${e.replace(/[^0-9+]/g,"")}`},website:{label:"Website",icon:"i-tabler-world",placeholder:"https://example.com",getUrl:e=>e},calendar:{label:"Calendar",icon:"i-tabler-calendar",placeholder:"https://cal.com/username",getUrl:e=>e}}});var ED,ID,TD,zD,ND,CD,AD,OD,z2,DD,PD,RD,MD,UD,jD,LD,VD,FD,BD,ZD,HD,KD,WD,GD,JD,qD,YD,XD,QD,eP,tP,rP,nP,iP,oP,aP,sP,lP,cP,uP,dP,N2,pP,mP,fP,hP,gP,vP,bP,yP,xP,wP,kP,_P,$P,SP,EP,IP,TP,zP,NP,CP,AP,OP,DP,Pd,Vb=O(()=>{"use strict";mn();T2();Lb();Ys();Nn();ED=Ae({__name:"EffectTransitionList",props:{disabled:{type:Boolean,default:!1},mode:{default:"block"}},setup(e){return(t,n)=>(v(),Fe(_0,{name:e.disabled?"":"nlist"},{default:bt(()=>[er(t.$slots,"default")]),_:3},8,["name"]))}}),ID=["data-test-mode"],TD={class:"w-full max-w-xs space-y-12"},zD={key:0,class:"text-xs text-theme-400 text-center"},ND={class:"text-base font-light text-white text-center"},CD={class:"space-y-6 relative"},AD={key:"email-field",class:"w-full"},OD={key:"code-field",class:"w-full"},z2=Ae({__name:"ElAuthGate",props:{sdk:{}},setup(e){let t=G({email:"",code:""}),n=G("email"),i=G(!1),r={email:{title:"Enter Your Email",button:{label:"Continue",disabled:()=>!t.value.email||i.value},action:async()=>{if(!i.value){i.value=!0;try{await e.sdk.auth.requestAuthCode({email:t.value.email})&&(n.value="code")}finally{i.value=!1}}}},code:{title:"Enter Verification Code",button:{label:"Verify",disabled:()=>t.value.code.length!==6||i.value},action:async()=>{if(!i.value){i.value=!0;try{await e.sdk.auth.loginWithCode({email:t.value.email,code:t.value.code})}finally{i.value=!1}}}}},o=N(()=>r[n.value]);return lt(()=>e.sdk.activeUser.value,a=>{a&&n.value==="code"&&console.log("[ElAuthGate] Authentication successful",{email:a.email})}),(a,s)=>(v(),x("div",{"data-test":"auth-form","data-test-mode":n.value,class:"flex flex-col items-center justify-center h-full p-6"},[y("div",TD,[e.sdk.error.value?(v(),x("p",zD,ce(e.sdk.error.value),1)):Y("",!0),y("h3",ND,ce(o.value.title),1),y("div",CD,[be(ED,null,{default:bt(()=>[n.value==="email"?(v(),x("div",AD,[be(Td,{modelValue:t.value.email,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value.email=c),"data-test":"auth-email-input",onKeyup:zn(o.value.action,["enter"])},null,8,["modelValue","onKeyup"])])):(v(),x("div",OD,[be(zd,{modelValue:t.value.code,"onUpdate:modelValue":s[1]||(s[1]=c=>t.value.code=c),length:6,"focus-first":!0,"data-test":"auth-code-input",onAutoSubmit:o.value.action},null,8,["modelValue","onAutoSubmit"])])),(v(),x("div",{key:o.value.button.label,class:"space-y-4 w-full"},[be(pa,{theme:"primary",size:"md",class:"w-full","data-test":"auth-submit",loading:e.sdk.loading.value,disabled:o.value.button.disabled()||e.sdk.loading.value,onClick:o.value.action},{default:bt(()=>[xt(ce(o.value.button.label),1)]),_:1},8,["loading","disabled","onClick"]),n.value==="code"?(v(),x("button",{key:0,class:"w-full text-xs text-white/50 hover:text-white/70 transition-colors py-2",onClick:s[2]||(s[2]=c=>n.value="email")}," Change Email ")):Y("",!0)]))]),_:1})])])],8,ID))}}),DD={class:"flex-1 flex flex-col min-h-0 py-6 space-y-6 h-full overflow-scroll [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden relative"},PD={class:"flex-1 space-y-6 pb-12"},RD={key:0,class:"text-sm bg-white/10 backdrop-blur-sm rounded-2xl p-4 border border-white/20 space-y-3"},MD=["innerHTML"],UD={key:1,class:"bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"},jD={class:"text-sm text-white/70 leading-relaxed"},LD={key:2,class:"space-y-3"},VD=["href"],FD={key:3,class:"space-y-3"},BD={class:"grid grid-cols-2 gap-3"},ZD=["href"],HD=Ae({__name:"ElAgentAbout",props:{agent:{},isOnline:{type:Boolean,default:!1}},setup(e){return(t,n)=>(v(),x("div",DD,[be(Nd,{agent:e.agent,"is-online":e.isOnline},null,8,["agent","is-online"]),y("div",PD,[e.agent.summary.value?(v(),x("div",RD,[n[0]||(n[0]=y("h3",{class:"font-medium text-white/50"}," About ",-1)),y("div",{class:"text-white/70 leading-relaxed",innerHTML:e.agent.summary.value},null,8,MD)])):Y("",!0),e.agent.entityType.value==="company"?(v(),x("div",UD,[n[1]||(n[1]=y("h3",{class:"text-sm font-medium text-white/90 mb-2"}," Company Info ",-1)),y("p",jD," This is a company agent representing "+ce(e.agent.name.value)+". ",1)])):Y("",!0),e.agent.email.value?(v(),x("div",LD,[n[3]||(n[3]=y("h3",{class:"text-sm font-medium text-white/90"}," Contact ",-1)),y("a",{href:`mailto:${e.agent.email.value}`,target:"_blank",rel:"noopener noreferrer",class:"relative inline-flex items-center justify-center gap-2 rounded-full px-4 py-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer bg-white/5 hover:bg-white/10 border border-white/10 text-white/80 text-sm justify-start h-10 w-full"},[...n[2]||(n[2]=[y("span",{class:"i-heroicons-envelope flex items-center size-[1.1em] mt-[-.07em]"},null,-1),xt(" Email ",-1)])],8,VD)])):Y("",!0),e.agent.accounts.value&&e.agent.accounts.value.length>0?(v(),x("div",FD,[n[4]||(n[4]=y("h3",{class:"text-sm font-medium text-white/90"}," Links ",-1)),y("div",BD,[(v(!0),x(ge,null,et(e.agent.accounts.value,i=>(v(),x("a",{key:`${i.platform}-${i.handle}`,href:Ie(Ki)[i.platform].getUrl(i.handle),target:"_blank",rel:"noopener noreferrer",class:"relative inline-flex items-center justify-center gap-2 rounded-full px-4 py-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer bg-white/10 hover:bg-white/20 border border-white/20 text-white/80 text-sm"},[y("span",{class:V(["flex items-center size-[1.1em] mt-[-.07em]",Ie(Ki)[i.platform].icon])},null,2),xt(" "+ce(Ie(Ki)[i.platform].label),1)],8,ZD))),128))])])):Y("",!0)])]))}}),KD={class:"flex flex-col items-center text-center gap-4"},WD={class:"relative flex-shrink-0"},GD={class:"w-20 h-20 sm:w-24 sm:h-24 rounded-full overflow-hidden border-4 border-white"},JD=["src","alt"],qD={class:"absolute top-1.5 right-1.5"},YD={key:1,class:"size-4 bg-theme-400 rounded-full ring-2 ring-white"},XD={class:"min-w-0"},QD={class:"text-3xl font-light text-white mb-2 truncate"},eP={class:"text-base font-light text-white/60 line-clamp-1"},tP=Ae({__name:"ElAgentHeader",props:{agent:{},isOnline:{type:Boolean,default:!1}},setup(e){return(t,n)=>(v(),x("div",KD,[y("div",WD,[y("div",GD,[y("img",{src:e.agent.avatarUrl.value,alt:e.agent.displayName.value,class:"w-full h-full object-cover",onError:n[0]||(n[0]=(...i)=>Ie(sl)&&Ie(sl)(...i))},null,40,JD)]),y("div",qD,[e.isOnline?(v(),x(ge,{key:0},[n[1]||(n[1]=y("div",{class:"size-4 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",style:{"animation-duration":"3s"}},null,-1)),n[2]||(n[2]=y("div",{class:"size-4 bg-green-500 rounded-full ring-2 ring-white"},null,-1))],64)):(v(),x("div",YD))])]),y("div",XD,[y("h1",QD,ce(e.agent.displayName.value),1),y("p",eP,ce(e.agent.title.value),1)])]))}}),rP={class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden"},nP=Ae({name:"SelfSidebarClose",__name:"AgentSidebarClose",emits:["click"],setup(e){let t=G(!1);return It(()=>{setTimeout(()=>{t.value=!0},100)}),(n,i)=>(v(),x("a",{class:"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",onClick:i[0]||(i[0]=r=>n.$emit("click",r))},[i[1]||(i[1]=y("span",{class:"absolute inset-0 rounded-full transition-all"},null,-1)),y("span",rP,[y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 rotate-45":"translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.15s"}},null,2),y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 -rotate-45":"-translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.45s"}},null,2)])]))}}),iP={key:0,class:"px-9 pt-12 pb-4"},oP={class:"text-base font-medium text-theme-400"},aP={key:1,class:"px-4 pb-8 border-b border-white/10"},sP=["disabled","onClick"],lP={class:"flex items-center gap-3"},cP={class:"flex-1"},uP={key:0,class:"text-xs text-white/50 mt-0.5"},dP={class:"p-6"},N2=Ae({name:"ElSidebar",inheritAttrs:!1,__name:"ElSidebar",props:{modelValue:{type:Boolean},items:{},position:{},title:{},widthClasses:{}},emits:["update:modelValue"],setup(e,{emit:t}){let n=e,i=t,r=n.position||"left",o=n.widthClasses||"w-[80%] max-w-[300px]",a=N({get:()=>n.modelValue,set:d=>i("update:modelValue",d)}),s=N(()=>n.items.filter(d=>!d.isHidden));function c(d){d.isDisabled||(d.onClick?d.onClick({item:d,event:new MouseEvent("click")}):d.href&&(d.href.includes("http")?window.open(d.href,d.target||"_self")?.focus():window.location.href=d.href),a.value=!1)}let u=N(()=>r==="left"?{enter:"-translate-x-full",leave:"-translate-x-full",position:"justify-start",closeButton:"-right-16"}:{enter:"translate-x-full",leave:"translate-x-full",position:"justify-end",closeButton:"-left-16"});return(d,p)=>(v(),x(ge,null,[be(ni,{"enter-active-class":"transition-opacity duration-300 ease-out","leave-active-class":"transition-opacity duration-200 ease-in","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:bt(()=>[a.value?(v(),x("div",{key:0,class:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm",onClick:p[0]||(p[0]=m=>a.value=!1)})):Y("",!0)]),_:1}),be(ni,{"enter-active-class":"transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)]","leave-active-class":"transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]","enter-from-class":u.value.enter,"enter-to-class":"translate-x-0","leave-from-class":"translate-x-0","leave-to-class":u.value.leave},{default:bt(()=>[a.value?(v(),x("div",{key:0,class:V(["absolute inset-0 z-50 flex",u.value.position]),onClick:p[3]||(p[3]=m=>a.value=!1)},[y("div",{class:V(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center",Ie(o)]),onClick:p[2]||(p[2]=_t(()=>{},["stop"]))},[be(nP,{class:V(["absolute top-4 z-10 text-white",u.value.closeButton]),onClick:p[1]||(p[1]=m=>a.value=!1)},null,8,["class"]),e.title?(v(),x("div",iP,[y("h3",oP,ce(e.title),1)])):Y("",!0),d.$slots.header?(v(),x("div",aP,[er(d.$slots,"header")])):Y("",!0),y("div",{class:V(["flex-1 p-6 space-y-2 overflow-y-auto",{"pt-6":!e.title&&!d.$slots.header,"pt-4":e.title||d.$slots.header}])},[be(_0,{"enter-active-class":"transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]","leave-active-class":"transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)]","enter-from-class":Ie(r)==="left"?"-translate-x-4 opacity-0":"translate-x-4 opacity-0","enter-to-class":"translate-x-0 opacity-100","leave-from-class":"translate-x-0 opacity-100","leave-to-class":Ie(r)==="left"?"-translate-x-4 opacity-0":"translate-x-4 opacity-0"},{default:bt(()=>[(v(!0),x(ge,null,et(s.value,(m,f)=>(v(),x("button",{key:m.key||m.label||f,style:we({transitionDelay:`${f*40}ms`}),class:V(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group",[m.isActive?"bg-primary-500/20 border border-primary-500/40":"hover:bg-white/10",m.isDisabled&&"opacity-50 cursor-not-allowed"]]),disabled:m.isDisabled,onClick:S=>c(m)},[y("div",lP,[m.icon?.src?(v(),x("i",{key:0,class:V(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110",[m.icon.src,m.isActive?"text-primary-400":"text-white/70 group-hover:text-white"]])},null,2)):Y("",!0),y("div",cP,[y("div",{class:V(["font-medium text-sm",m.isActive?"text-primary-300":"text-white"])},ce(m.label),3),m.subLabel?(v(),x("div",uP,ce(m.subLabel),1)):Y("",!0)])])],14,sP))),128))]),_:1},8,["enter-from-class","leave-to-class"])],2),y("div",dP,[er(d.$slots,"footer")])],2)],2)):Y("",!0)]),_:3},8,["enter-from-class","leave-to-class"])],64))}}),pP=Ae({name:"AgentModeSidebar",__name:"ElAgentModeSidebar",props:{modelValue:{type:Boolean},chatController:{}},emits:["update:modelValue"],setup(e,{emit:t}){let n=e,i=t,r=N({get:()=>n.modelValue,set:s=>i("update:modelValue",s)}),o=N(()=>n.chatController?.agentMode?.value??"self"),a=N(()=>zb.map(s=>({key:s.mode,icon:{src:s.icon},label:s.label,isActive:o.value===s.mode,onClick:()=>{n.chatController?.setMode(s.mode)}})));return(s,c)=>(v(),Fe(N2,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=u=>r.value=u),items:a.value,position:"right",title:"Mode","width-classes":"w-[80%] max-w-[255px]"},null,8,["modelValue","items"]))}}),mP=Ae({name:"AgentSidebar",__name:"ElAgentSidebar",props:{modelValue:{type:Boolean},agent:{},sdk:{},title:{}},emits:["update:modelValue"],setup(e,{emit:t}){let n=e,i=t,r=N({get:()=>n.modelValue,set:a=>i("update:modelValue",a)}),o=N(()=>{let a=[{key:"share",icon:{src:"i-tabler-share"},label:"Share this assistant",onClick:()=>{let s=`${window.location.origin}/@${n.agent.handle.value||n.agent.agentId.value}`;navigator.clipboard.writeText(s).catch(c=>{console.error("ElAgentSidebar: clipboard.writeText rejected",c)})}},{key:"profile",icon:{src:"i-tabler-user"},label:"View full profile",onClick:()=>{window.open(`/@${n.agent.handle.value||n.agent.agentId.value}`,"_blank")}},{key:"create",icon:{src:"i-tabler-sparkles"},label:"Create your own",onClick:()=>{window.open("/auth","_blank")}}];return n.sdk.activeUser.value&&a.push({key:"logout",icon:{src:"i-tabler-logout"},label:"Logout",onClick:async()=>{await n.sdk.auth.logout()}}),a});return(a,s)=>(v(),Fe(N2,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=c=>r.value=c),items:o.value,position:"left",title:e.title||"Menu"},null,8,["modelValue","items","title"]))}}),fP={key:0,class:"absolute inset-0 flex items-center justify-center bg-gradient-to-br from-theme-800 to-theme-950 rounded-3xl z-10"},hP=["data-quality"],gP={key:0,class:"flex flex-1 items-center gap-3 pl-2"},vP=["src","alt"],bP={class:"text-sm font-medium text-white/90"},yP={key:1,class:"flex justify-end"},xP={class:"text-sm"},wP={key:0,class:"flex-1 basis-0 flex justify-end"},kP={key:0,class:"h-full pb-12 flex-1 flex flex-col relative z-20 min-h-0 px-4 @[480px]/agent:px-6 max-w-md mx-auto w-full"},_P={class:"flex-1 basis-0 flex flex-col justify-start pt-8 gap-7"},$P={key:0,class:"flex items-center justify-center gap-3"},SP=["href"],EP={key:1,class:"flex-1 flex flex-col relative z-20 min-h-0 w-full gap-4 px-4"},IP={class:"max-w-md mx-auto"},TP={key:2,class:"flex-1 flex flex-col relative z-20 min-h-0 w-full px-4 @[480px]/agent:px-6"},zP={class:"flex-1 min-h-0 max-w-md mx-auto w-full"},NP={key:2,class:"bg-gradient-to-br from-theme-800 to-theme-950 text-white flex items-center justify-center h-full p-8"},CP={class:"text-center max-w-md space-y-4"},AP={class:"text-sm text-white/70 leading-relaxed"},OP={key:3,class:"bg-white/10 backdrop-blur-sm text-white/70 flex items-center justify-center h-full"},DP=Ae({__name:"AgentChat",props:{sdk:{},agent:{},context:{},firstMessage:{},buttonText:{},buttonIcon:{},hasClose:{type:Boolean,default:!1},isActive:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},theme:{default:"green"},requireAuth:{type:Boolean,default:!1},chatOnly:{type:Boolean,default:!1},bare:{type:Boolean,default:!1},emptyStateMessage:{},createVoiceClientFn:{type:Function}},emits:["close","error","turnStarted","turnCompleted"],setup(e,{emit:t}){let n=t,i=Ye(),r=G(!1),o=G(!1),a=G(),s=G(),c=N(()=>i.value?.agentMode?.value??"self"),u=N(()=>i.value?.textState.value.isConnected??!1),d=N(()=>e.sdk.activeUser.value!==void 0),p=N(()=>zb.find(D=>D.mode===c.value));function m(){i.value&&i.value.destroy();try{i.value=new ll({sdk:e.sdk,agent:e.agent,context:e.context,firstMessage:e.firstMessage,...e.createVoiceClientFn?{createVoiceClientFn:e.createVoiceClientFn}:{},onTurnStarted:()=>n("turnStarted"),onTurnCompleted:D=>n("turnCompleted",D)})}catch(D){throw console.error("AgentChatController creation failed:",D),D}}try{m()}catch(D){let U=D instanceof Error?D.message:"Couldn't initialize your assistant";a.value=U,n("error",U)}function f(D){if(!s.value)return;let U=av(D);Object.entries(U).forEach(([$,F])=>{s.value.style.setProperty(`--primary-${$}`,F)})}It(()=>{try{f(e.theme),e.chatOnly&&i.value&&i.value.setMode("chat")}catch(D){let U=D instanceof Error?D.message:"Couldn't initialize your assistant";a.value=U,n("error",U)}}),rn(()=>{i.value&&i.value.destroy()}),lt(()=>e.theme,D=>{f(D)}),lt(()=>e.sdk.activeUser.value,(D,U)=>{U&&!D&&i.value&&i.value.setMode("self")});let S=N(()=>!!(e.agent.cover.value?.src&&e.agent.cover.value?.quality==="low")||!!(e.agent.avatar.value?.src&&e.agent.avatar.value?.quality==="low")),z=N(()=>{let D=[S.value?"backdrop-blur-sm":""];return S.value&&c.value==="self"?D.push("from-black/80 via-black/60 to-black/80"):c.value==="self"?D.push("from-black/70 via-black/50 to-black/80"):D.push("from-black/90 via-black/90 to-black/100"),D.join(" ")}),T={phone:"i-heroicons-phone",calendar:"i-heroicons-calendar",question:"i-heroicons-question-mark-circle",message:"i-heroicons-chat-bubble-left-right",sparkles:"i-heroicons-sparkles"},L=N(()=>u2({template:e.buttonText||"Talk to {name}",agent:e.agent.toConfig()})),j=N(()=>T[e.buttonIcon||"phone"]||T.phone);return(D,U)=>(v(),x("div",{ref_key:"rootElement",ref:s,key:Ie(da)(e.agent.toConfig()),class:"pagelines-sdk @container/agent pagelines-agent w-full h-full overflow-hidden relative","data-test":"agent-chat"},[e.loading?(v(),x("div",fP,[be(kd,{class:"text-white size-8"})])):e.agent&&!a.value?(v(),x("div",{key:1,class:V(["absolute inset-0",e.bare?"":"bg-cover bg-center bg-no-repeat"]),style:we(e.bare?void 0:{backgroundImage:`url(${Ie(da)(e.agent.toConfig())})`}),"data-quality":e.agent.avatar.value?.quality||"none"},[e.bare?Y("",!0):(v(),x("div",{key:0,class:V(["absolute inset-0 bg-gradient-to-br z-0",z.value])},null,2)),y("div",{class:V(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform",e.isActive?"opacity-100 translate-y-0":"opacity-0 translate-y-2"])},[!e.bare||e.hasClose?(v(),x("div",{key:0,class:V(["relative z-30 p-2",!e.bare&&c.value!=="self"?"backdrop-blur-lg":""])},[e.chatOnly?(v(),x("div",{key:0,class:V(["flex items-center",e.bare?"justify-end":""])},[e.bare?Y("",!0):(v(),x("div",gP,[y("img",{src:Ie(da)(e.agent.toConfig()),alt:e.agent.displayName.value,class:"size-8 rounded-full object-cover"},null,8,vP),y("span",bP,ce(e.agent.displayName.value),1)])),e.hasClose?(v(),x("div",yP,[y("button",{class:V(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors",e.bare?"text-theme-500 hover:bg-theme-50":"text-white/70 hover:bg-white/10"]),onClick:U[0]||(U[0]=_t($=>n("close","button"),["stop"]))},[...U[7]||(U[7]=[y("i",{class:"size-6 i-tabler-x"},null,-1)])],2)])):Y("",!0)],2)):(v(),x("div",{key:1,class:V(["flex items-center",e.hasClose?"":"justify-between"])},[y("div",{class:V(e.hasClose?"flex-1 basis-0":"")},[y("button",{class:"cursor-pointer p-2 flex items-center gap-2 rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",onClick:U[1]||(U[1]=$=>r.value=!0)},[...U[8]||(U[8]=[y("i",{class:"i-tabler-menu size-7"},null,-1)])])],2),y("button",{class:V(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0",{"bg-white/10":o.value}]),onClick:U[2]||(U[2]=$=>o.value=!0)},[y("i",{class:V([p.value?.icon,"size-4 opacity-60"])},null,2),y("span",xP,ce(p.value?.label),1),U[9]||(U[9]=y("i",{class:"i-tabler-chevron-down size-4"},null,-1))],2),e.hasClose?(v(),x("div",wP,[y("button",{class:"cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",onClick:U[3]||(U[3]=_t($=>n("close","button"),["stop"]))},[...U[10]||(U[10]=[y("i",{class:"size-6 i-tabler-x"},null,-1)])])])):Y("",!0)],2))],2)):Y("",!0),e.chatOnly?(v(),x("div",{key:1,class:V(["relative z-20 flex min-h-0 w-full flex-1 flex-col",e.bare?"":"px-4"])},[y("div",{class:V(["min-h-0 w-full flex-1",e.bare?"":"mx-auto max-w-md"])},[be(Hi,{"chat-controller":i.value,agent:e.agent,scope:d.value?"private":"public","empty-state-message":e.emptyStateMessage,variant:e.bare?"light":"dark","show-header":!e.bare,centered:e.bare},c0({_:2},[D.$slots["empty-heading"]?{name:"empty-heading",fn:bt($=>[er(D.$slots,"empty-heading",Lo(qo($)))]),key:"0"}:void 0]),1032,["chat-controller","agent","scope","empty-state-message","variant","show-header","centered"])],2)],2)):(v(),x(ge,{key:2},[c.value==="self"?(v(),x("div",kP,[U[11]||(U[11]=y("div",{class:"flex-1 basis-0 mb-12"},null,-1)),be(tP,{agent:e.agent,"is-online":u.value},null,8,["agent","is-online"]),y("div",_P,[be(pa,{theme:"primary",size:"lg",class:"w-full",icon:j.value,"data-test":"voice-button",onClick:U[4]||(U[4]=$=>i.value?.setMode("talk"))},{default:bt(()=>[xt(ce(L.value),1)]),_:1},8,["icon"]),e.agent.accounts.value&&e.agent.accounts.value.length>0?(v(),x("div",$P,[(v(!0),x(ge,null,et((e.agent.accounts.value||[]).filter($=>Ie(Ki)[$.platform]),$=>(v(),x("a",{key:`${$.platform}-${$.handle}`,href:Ie(Ki)[$.platform].getUrl($.handle),target:"_blank",class:"size-12 rounded-full text-white/60 hover:text-white hover:bg-white/5 border border-white/0 hover:border-white/10 flex items-center justify-center transition-all duration-200 hover:scale-105"},[y("i",{class:V([Ie(Ki)[$.platform].icon,"size-5"])},null,2)],8,SP))),128))])):Y("",!0)])])):c.value==="talk"?(v(),x("div",EP,[e.requireAuth&&!d.value?(v(),Fe(z2,{key:0,sdk:e.sdk},null,8,["sdk"])):(v(),x(ge,{key:1},[y("div",null,[y("div",IP,[be(Nd,{agent:e.agent,"is-online":u.value},null,8,["agent","is-online"])])]),be(Hi,{"chat-controller":i.value,agent:e.agent},null,8,["chat-controller","agent"])],64))])):(v(),x("div",TP,[y("div",zP,[c.value==="chat"?(v(),x(ge,{key:0},[e.requireAuth&&!d.value?(v(),Fe(z2,{key:0,sdk:e.sdk},null,8,["sdk"])):(v(),Fe(Hi,{key:1,"chat-controller":i.value,agent:e.agent,"show-header":""},null,8,["chat-controller","agent"]))],64)):c.value==="info"?(v(),Fe(HD,{key:1,agent:e.agent,"is-online":u.value},null,8,["agent","is-online"])):Y("",!0)])]))],64))],2)],14,hP)):a.value?(v(),x("div",NP,[y("div",CP,[U[12]||(U[12]=y("div",{class:"flex justify-center"},[y("div",{class:"rounded-full bg-red-500/20 flex items-center justify-center size-10"},[y("i",{class:"i-tabler-alert-circle size-6 text-red-400"})])],-1)),U[13]||(U[13]=y("h3",{class:"text-lg font-medium"}," Agent Error ",-1)),y("p",AP,ce(a.value),1)])])):(v(),x("div",OP," Couldn't load your assistant. Please try again later. ")),e.chatOnly?Y("",!0):(v(),Fe(mP,{key:4,modelValue:r.value,"onUpdate:modelValue":U[5]||(U[5]=$=>r.value=$),agent:e.agent,sdk:e.sdk,title:e.agent.displayName.value,"data-test":"agent-sidebar"},null,8,["modelValue","agent","sdk","title"])),e.chatOnly?Y("",!0):(v(),Fe(pP,{key:5,modelValue:o.value,"onUpdate:modelValue":U[6]||(U[6]=$=>o.value=$),"chat-controller":i.value,"data-test":"agent-mode-sidebar"},null,8,["modelValue","chat-controller"]))]))}}),Pd=Ae({__name:"AgentProvider",props:{sdk:{},agent:{},handle:{},context:{},clientContext:{},firstMessage:{},buttonText:{},buttonIcon:{},hasClose:{type:Boolean},chatOnly:{type:Boolean},bare:{type:Boolean},apiBase:{},emptyStateMessage:{}},emits:["close","error","turnStarted","turnCompleted"],setup(e,{emit:t}){let n=e,i=t;return(r,o)=>(v(),Fe(Od,h0(n,{class:"agent-provider size-full relative"}),{default:bt(a=>[be(DP,{sdk:a.sdk,agent:a.agent,context:a.context,"first-message":a.firstMessage,"button-text":n.buttonText,"button-icon":n.buttonIcon,"has-close":n.hasClose,"chat-only":n.chatOnly,bare:n.bare,"empty-state-message":n.emptyStateMessage,"is-active":!0,class:"size-full",onClose:o[0]||(o[0]=s=>i("close",s)),onError:o[1]||(o[1]=s=>i("error",s)),onTurnStarted:o[2]||(o[2]=s=>i("turnStarted")),onTurnCompleted:o[3]||(o[3]=s=>i("turnCompleted",s))},c0({_:2},[r.$slots["empty-heading"]?{name:"empty-heading",fn:bt(s=>[er(r.$slots,"empty-heading",Lo(qo(s)))]),key:"0"}:void 0]),1032,["sdk","agent","context","first-message","button-text","button-icon","has-close","chat-only","bare","empty-state-message"])]),_:3},16))}})});var C2={};Nr(C2,{default:()=>PP});var PP,A2=O(()=>{"use strict";mn();Vb();Dd();Nn();PP=Ae({__name:"AgentWidgetInline",props:{sdk:{},handle:{},agent:{},context:{},firstMessage:{},buttonText:{},buttonIcon:{},chatOnly:{type:Boolean}},setup(e,{expose:t}){let{currentAgent:n,currentContext:i,currentFirstMessage:r,currentButtonText:o,currentButtonIcon:a,update:s}=fa(e);return t({update:s}),(c,u)=>(v(),Fe(Pd,{sdk:e.sdk,handle:e.handle,agent:Ie(n),context:Ie(i),"first-message":Ie(r),"button-text":Ie(o),"button-icon":Ie(a),"chat-only":e.chatOnly},null,8,["sdk","handle","agent","context","first-message","button-text","button-icon","chat-only"]))}})});var O2={};Nr(O2,{default:()=>BP});var RP,MP,UP,jP,LP,VP,FP,BP,D2=O(()=>{"use strict";mn();Vb();Dd();Nn();RP=["aria-label"],MP={class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden"},UP=Ae({name:"FClose",__name:"FClose",props:{ariaLabel:{}},emits:["click"],setup(e){let t=G(!1);return It(()=>{setTimeout(()=>{t.value=!0},100)}),(n,i)=>(v(),x("button",{type:"button","aria-label":e.ariaLabel||"Close",class:"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",onClick:i[0]||(i[0]=r=>n.$emit("click",r))},[i[1]||(i[1]=y("span",{class:"absolute inset-0 rounded-full transition-all"},null,-1)),y("span",MP,[y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 rotate-45":"translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.15s"}},null,2),y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 -rotate-45":"-translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.45s"}},null,2)])],8,RP))}}),jP={class:"flex min-h-full items-center justify-center text-center p-4"},LP={key:0,class:"text-base p-4 font-semibold"},VP={key:1,class:"flex items-center gap-2 px-2"},FP=Ae({inheritAttrs:!1,name:"FModal",__name:"FModal",props:{vis:{type:Boolean,default:!1},modalClass:{},styleClass:{},fullScreen:{type:Boolean,default:!1},hasClose:{type:Boolean,default:!1},title:{default:""},transitionMode:{default:"modal"},teleportTo:{default:"body"},disableTeleport:{type:Boolean,default:!1}},emits:["update:vis","close","escape"],setup(e,{emit:t}){let n=t,i=G(!1);function r(d){let{reason:p}=d;n("update:vis",!1),n("close",!0),p==="escape"&&n("escape",!0)}let o=N(()=>{let d=e.modalClass?[e.modalClass]:["max-w-screen-md p-24"],p=e.styleClass?[e.styleClass]:["bg-theme-0","shadow-xl"];return e.fullScreen?d.push("fixed inset-0"):d.push("rounded-2xl"),["relative","text-left","transform","transition-all","w-full","overflow-hidden",...d,...p]}),a=G(!1),s=[];function c(d){d.key==="Escape"&&e.vis&&r({reason:"escape"})}It(async()=>{i.value=!0;let d=lt(()=>e.vis,p=>{p?setTimeout(()=>a.value=!0,300):a.value=!1},{immediate:!0});s.push(d),typeof document<"u"&&(document.addEventListener("keydown",c),s.push(()=>document.removeEventListener("keydown",c)))}),rn(()=>{s.forEach(d=>d())});let u=N(()=>e.transitionMode==="slideUp"?{enterActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",enterFromClass:"opacity-0 translate-y-full scale-95",enterToClass:"opacity-100 translate-y-0 scale-100",leaveActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",leaveFromClass:"opacity-100 translate-y-0 scale-100",leaveToClass:"opacity-0 translate-y-full scale-95"}:{enterActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",enterFromClass:"opacity-0 scale-75",enterToClass:"opacity-100 translate-y-0 scale-100",leaveActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",leaveFromClass:"opacity-100 translate-y-0 scale-100",leaveToClass:"opacity-0 scale-75"});return(d,p)=>i.value?(v(),Fe(N1,{key:0,to:e.teleportTo,disabled:e.disableTeleport},[y("div",{class:V(["fixed inset-0 z-50",e.vis?"":"pointer-events-none"]),"aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},[be(ni,{"enter-active-class":"ease-out duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:bt(()=>[e.vis?(v(),x("div",{key:0,class:"fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity",onClick:p[0]||(p[0]=m=>r({reason:"escape"}))})):Y("",!0)]),_:1}),y("div",{class:"fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar",onClick:p[3]||(p[3]=m=>r({reason:"escape"}))},[y("div",jP,[be(ni,Lo(qo(u.value)),{default:bt(()=>[e.vis?(v(),x("div",{key:0,class:V([o.value,"w-full"]),onClick:p[2]||(p[2]=_t(()=>{},["stop"]))},[e.hasClose||e.title||d.$slots.actions?(v(),x("div",{key:0,class:V(!e.title&&(e.hasClose||d.$slots.actions)?"absolute top-0 right-0 z-10":"flex justify-between items-center")},[e.title?(v(),x("h2",LP,ce(e.title),1)):Y("",!0),e.hasClose||d.$slots.actions?(v(),x("div",VP,[er(d.$slots,"actions"),e.hasClose?(v(),Fe(UP,{key:0,class:"relative","data-test-id":"close-modal",onClick:p[1]||(p[1]=_t(m=>r({reason:"escape"}),["stop"]))})):Y("",!0)])):Y("",!0)],2)):Y("",!0),er(d.$slots,"default")],2)):Y("",!0)]),_:3},16)])])],2)],8,["to","disabled"])):Y("",!0)}}),BP=Ae({__name:"AgentWidgetModal",props:{sdk:{},handle:{},agent:{},context:{},firstMessage:{},buttonText:{},buttonIcon:{},chatOnly:{type:Boolean},onClose:{type:Function}},setup(e,{expose:t}){let n=e,{currentAgent:i,currentContext:r,currentFirstMessage:o,currentButtonText:a,currentButtonIcon:s,update:c}=fa(n),u=G(!1);It(async()=>{await Ri(),setTimeout(()=>{u.value=!0},10)});function d(){u.value=!1,setTimeout(()=>{n.onClose&&n.onClose()},300)}function p(){u.value=!0}return t({update:c,close:d,open:p}),(m,f)=>(v(),Fe(FP,{vis:u.value,"disable-teleport":!0,"modal-class":"max-w-4xl h-[80vh] md:h-[600px]","has-close":!1,"onUpdate:vis":f[0]||(f[0]=S=>u.value=S),onClose:d},{default:bt(()=>[be(Pd,{sdk:e.sdk,handle:e.handle,agent:Ie(i),context:Ie(r),"first-message":Ie(o),"button-text":Ie(a),"button-icon":Ie(s),"chat-only":e.chatOnly,"has-close":!0,onClose:d},null,8,["sdk","handle","agent","context","first-message","button-text","button-icon","chat-only"])]),_:1},8,["vis"]))}})});mn();ub();Lb();Dd();Ys();Nn();var ZP=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
175
+ \`\`\``)}))}else{let ye=sd(ie);if(ye.ok)j.push({kind:"visual",key:`visual-${$}`,result:ye});else{typeof console<"u"&&console.warn("[pl-visual] parse_failed",{reason:ye.reason,message:ye.message,hasFallbackMarkdown:!!ye.fallbackMarkdown,payloadChars:ie.length,...u(ie)});let Be=ye.fallbackMarkdown?s(ye.fallbackMarkdown):"";Be&&j.push({kind:"markdown",key:`visual-${$}`,html:Be})}}U=B.index+B[0].length,$+=1,B=D.exec(T)}let se=T.slice(U),he=L?m.exec(se):null;if(he){let W=s(se.slice(0,he.index));return W&&j.push({kind:"markdown",key:`md-${$}`,html:W}),j.push({kind:"pending-visual",key:`pending-${$}`}),j}let te=s(se);return te&&j.push({kind:"markdown",key:`md-${$}`,html:te}),j}let S=N(()=>{let z=r.value;return z?f({text:z,streaming:!!n.streaming}):[]});return(z,T)=>(v(),x("div",{class:"chat-msg-rich break-words text-[14px] leading-[1.55] @sm/chat:max-w-[55ch] @sm/chat:text-[15px] @sm/chat:leading-[1.5]",onErrorCapture:p},[(v(!0),x(ge,null,et(S.value,L=>(v(),x(ge,{key:L.key},[L.kind==="markdown"?(v(),x("div",{key:0,class:V(["chat-msg-prose",e.inverted?"chat-msg-prose-invert":""]),innerHTML:L.html},null,10,Z6)):L.kind==="visual"?(v(),Fe(B6,{key:1,result:L.result,inverted:e.inverted},null,8,["result","inverted"])):L.kind==="card"?(v(),Fe(n6,{key:2,spec:L.spec,inverted:e.inverted,onAction:T[0]||(T[0]=j=>i("action",j))},null,8,["spec","inverted"])):(v(),x("div",{key:3,"data-test":"chat-visual-pending",role:"status",class:"my-6 flex items-center gap-2.5 rounded-[20px] px-4 py-5 text-[12px] font-medium",style:we({background:e.inverted?"transparent":"var(--color-theme-0)",boxShadow:`inset 0 0 0 1px ${e.inverted?"rgba(255, 255, 255, 0.14)":"color-mix(in oklch, var(--color-theme-900) 8%, transparent)"}`,color:e.inverted?"rgba(255, 255, 255, 0.6)":"var(--color-theme-500)"})},[...T[1]||(T[1]=[y("span",{class:"size-2 shrink-0 animate-pulse rounded-full",style:{background:"currentcolor"}},null,-1),xt(" Preparing chart\u2026 ",-1)])],4))],64))),128))],32))}}),H6=80,K6=600,W6=Ae({__name:"ChatScroller",setup(e,{expose:t}){let n=G(),i=G(),r=G(!0),o,a,s=0;function c(){let f=n.value;f&&(f.scrollTop=f.scrollHeight)}function u(){let f=n.value;f&&(r.value=f.scrollHeight-f.scrollTop-f.clientHeight<=H6)}function d(){s=Date.now()+K6}function p(){r.value&&Date.now()>s&&c()}function m(){r.value=!0,s=0,c(),requestAnimationFrame(()=>{c(),requestAnimationFrame(c)})}return t({pin:m}),It(()=>{requestAnimationFrame(()=>{c(),requestAnimationFrame(c)}),i.value&&(o=new ResizeObserver(p),o.observe(i.value),n.value&&o.observe(n.value),a=new MutationObserver(p),a.observe(i.value,{childList:!0,subtree:!0}))}),Jo(()=>{o?.disconnect(),a?.disconnect()}),(f,S)=>(v(),x("div",{ref_key:"viewport",ref:n,class:V(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",r.value?"[overflow-anchor:none]":""]),onScrollPassive:u,onWheelPassive:d,onTouchstartPassive:d},[y("div",{ref_key:"content",ref:i,class:"flex-1 flex flex-col"},[er(f.$slots,"default")],512)],34))}}),G6={VOICE_MIC_UNAVAILABLE:"I couldn't reach your microphone. Check that this site is allowed to use it, then try again.",VOICE_AGENT_UNAVAILABLE:"Your assistant didn't pick up. Give it a moment and start the call again.",VOICE_CONNECT_TIMEOUT:"The call took too long to connect. Try again in a moment.",VOICE_CONNECTION_LOST:"The call dropped. Start it again when you're ready.",VOICE_UNAVAILABLE:"Voice isn't available right now. You can keep going by typing.",VOICE_MINT_INVALID:"That call couldn't be started. Refresh the page and try again.",VOICE_PROVIDER_ERROR:"The call ended unexpectedly. Try again, or keep going by typing."},J6="The call ended unexpectedly. Try again, or keep going by typing.";Id=[0,2,4,6,8],I2=5,Y6=33,X6=.7,a2=.1,Q6=60,e5=320,t5=.55,r5=.1,n5=.32,i5=.9,xb=Id.map(()=>0),o5=Id.map(()=>I2),a5=class{constructor(e=typeof window>"u"?void 0:window){Z(this,"browser",void 0),Z(this,"heights",Ye(o5)),Z(this,"targetBars",xb),Z(this,"displayBars",xb),Z(this,"level",{source:"mic",level:0}),Z(this,"isMuted",!1),Z(this,"usesIdleWave",!1),Z(this,"frameId",0),Z(this,"lastFrameAt",0),Z(this,"easeFrame",t=>{let n=this.browser;if(!n)return;this.frameId=0;let i=Math.min(64,Math.max(0,t-this.lastFrameAt));this.lastFrameAt=t;let r=this.usesIdleWave?Id.map((a,s)=>{let c=t/1e3*t5*2*Math.PI-s*i5;return r5+n5*(Math.sin(c)+1)/2}):this.targetBars;this.displayBars=this.displayBars.map((a,s)=>{let c=r[s]??0,u=c>a?Q6:e5;return a+(c-a)*(1-Math.exp(-i/u))}),this.publish();let o=this.displayBars.every((a,s)=>Math.abs((r[s]??0)-a)<=5e-4);(this.usesIdleWave||!o)&&(this.frameId=n.requestAnimationFrame(this.easeFrame))}),this.browser=e}updateLevel(e){this.level=e,this.updateTargets()}setMuted(e){this.isMuted=e,this.updateTargets()}setIdleWave(e){this.usesIdleWave!==e&&(this.usesIdleWave=e,this.start())}stop(){this.frameId&&this.browser?.cancelAnimationFrame(this.frameId),this.frameId=0}updateTargets(){let e=n=>Math.max(0,n-a2)/(1-a2),t=this.isMuted&&this.level.source==="mic";this.targetBars=Id.map(n=>t?0:e(Math.min(1,Math.max(0,this.level.bands?.[n]??this.level.level)))),this.start()}start(){if(!this.browser||this.browser.matchMedia("(prefers-reduced-motion: reduce)").matches){this.displayBars=this.usesIdleWave?xb:this.targetBars,this.publish();return}this.frameId||(this.lastFrameAt=this.browser.performance.now(),this.frameId=this.browser.requestAnimationFrame(this.easeFrame))}publish(){this.heights.value=this.displayBars.map(e=>Math.round((I2+Math.min(1,Math.max(0,e))**X6*Y6)*10)/10)}},s5={connecting:{label:"Connecting",tone:"bg-amber-500",waits:!0},listening:{label:"Listening",tone:"bg-green-500",waits:!1},thinking:{label:"Thinking",tone:"bg-amber-500",waits:!0,visibleText:"Thinking"},working:{label:"Working",tone:"bg-primary-500",waits:!0},speaking:{label:"Speaking",tone:"bg-primary-500",waits:!1},error:{label:"Connection problem",tone:"bg-red-500",waits:!1,visibleText:"Connection lost"}};u5=["data-voice-state","data-voice-activity"],d5=["src"],p5={key:1,"data-test":"voice-background-fallback","aria-hidden":"true",class:"pointer-events-none absolute inset-0 bg-[#0A1522]"},m5={"data-test":"voice-stage",class:"relative z-10 flex flex-1 flex-col items-center px-8"},f5={"data-voice-assistant-avatar":""},h5={"data-test":"voice-lower-stage",class:"flex flex-1 flex-col items-center pt-10"},g5={"data-test":"voice-histogram","aria-hidden":"true",class:"flex h-[38px] items-center gap-[5px]"},v5={"data-test":"voice-presence-status",role:"status","aria-live":"polite",class:"sr-only"},b5=["data-taking-longer"],y5={class:"absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12"},x5=["disabled","aria-label","aria-pressed","title"],w5=Ae({__name:"VoiceMode",props:{agent:{},chatController:{},isLight:{type:Boolean},backdropSrc:{}},emits:["end"],setup(e,{expose:t,emit:n}){let i=n,r=Ye(!1),o=Ye(!1),a=Ye({user:!1,agent:!1}),s=Ye({active:!1}),c=Ye(!1),u=Ye(!1),d=Ye(),p=N(()=>d.value?.state.value??"idle"),m=N(()=>d.value?.isMuted.value??!1),f=new a5,S=f.heights,z=s0("endButton"),T=s0("muteButton"),L=!1,j,D,U=N(()=>c5({sessionState:p.value,hadError:r.value,providerThinking:o.value,speaking:a.value,work:s.value,isMuted:m.value,takingLonger:c.value})),$=N(()=>{if(U.value.activity==="thinking")return"thinking";if(U.value.activity==="working")return`working:${s.value.description??""}`});lt(()=>U.value.usesIdleWave,W=>f.setIdleWave(W),{immediate:!0}),lt(m,W=>f.setMuted(W),{immediate:!0}),lt($,W=>{D&&clearTimeout(D),c.value=!1,W&&(D=setTimeout(()=>{D=void 0,c.value=!0},s2),D.unref?.())},{immediate:!0});async function B(){L=!0,await d.value?.end()}t({end:B});function se(){L||(L=!0,i("end"))}function he(W){W.shiftKey&&document.activeElement===z.value?(W.preventDefault(),T.value?.focus()):!W.shiftKey&&document.activeElement===T.value&&(W.preventDefault(),z.value?.focus())}async function te(){let W=d.value;!W||u.value||(u.value=!0,await W.toggleMuted(),u.value=!1)}return It(async()=>{z.value?.focus({preventScroll:!0});let W=e.chatController?.createVoiceClient({onLevel:de=>f.updateLevel(de),onStateChange:de=>{de==="ended"&&(r.value?j=setTimeout(se,1600):se())},onThinkingChange:de=>{o.value=de},onSpeakingChange:de=>{a.value=de},onWorkChange:de=>{s.value=de},onError:de=>{r.value=!0,e.chatController?.notify?.(q6(de.code)),e.chatController?.logger?.warn("voice.session.failed",{code:de.code,providerMessage:de.message})},onMetric:de=>{e.chatController?.logger?.info(de.name,{durationMs:de.durationMs})}});if(!W){se();return}d.value=W,await W.start()}),rn(()=>{L=!0,j&&clearTimeout(j),D&&clearTimeout(D),f.stop(),d.value?.end()}),(W,de)=>(v(),x("div",{"data-test":"voice-mode","data-voice-state":p.value,"data-voice-activity":U.value.activity,class:"relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[#0A1522] text-white",onKeydown:zn(he,["tab"])},[e.backdropSrc?(v(),x("img",{key:0,"data-test":"voice-background-image",src:e.backdropSrc,alt:"","aria-hidden":"true",draggable:"false",class:"pointer-events-none absolute inset-0 size-full object-cover"},null,8,d5)):(v(),x("div",p5)),de[2]||(de[2]=y("div",{"data-test":"voice-background-overlay","aria-hidden":"true",class:"pointer-events-none absolute inset-0 bg-gradient-to-b from-[#050F19]/65 via-[#050F19]/75 to-[#050F19]/90"},null,-1)),y("div",m5,[de[0]||(de[0]=y("div",{"data-test":"voice-stage-spacer","aria-hidden":"true",class:"flex-1"},null,-1)),y("div",f5,[be(_b,{agent:e.agent,"show-status":!1,"show-owner-mark":!1,"is-light":!1,class:"size-32"},null,8,["agent"])]),y("div",h5,[y("div",g5,[(v(!0),x(ge,null,et(Ie(S),(ie,ye)=>(v(),x("span",{key:ye,"data-test":"voice-histogram-bar",class:V(["w-[5px] rounded-full transition-colors duration-150",U.value.tone]),style:we({height:`${ie}px`})},null,6))),128))]),y("div",v5,ce(U.value.label),1),y("p",{"data-test":"voice-visible-status","data-taking-longer":U.value.takingLonger||void 0,"aria-hidden":"true",class:"mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"},ce(U.value.visibleStatus),9,b5)])]),y("div",y5,[y("button",{ref_key:"endButton",ref:z,type:"button","data-test":"voice-end-btn",class:"flex size-16 cursor-pointer items-center justify-center rounded-full bg-white/10 text-white ring-1 ring-white/20 transition-colors hover:bg-white/15 active:bg-white/25","aria-label":"Hang up",title:"Hang up",onClick:se},[...de[1]||(de[1]=[y("i",{class:"i-tabler-x size-[25px]","aria-hidden":"true"},null,-1)])],512),y("button",{ref_key:"muteButton",ref:T,type:"button","data-test":"voice-mute-btn",class:V(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70",[m.value?"bg-white text-[#050F19] ring-white":"bg-white/10 text-white ring-white/20",p.value==="live"&&!u.value?"cursor-pointer":"cursor-default opacity-50"]]),disabled:p.value!=="live"||u.value,"aria-label":m.value?"Unmute microphone":"Mute microphone","aria-pressed":m.value,title:m.value?"Unmute microphone":"Mute microphone",onClick:te},[y("i",{class:V([m.value?"i-tabler-microphone-off":"i-tabler-microphone","size-[25px]"]),"aria-hidden":"true"},null,2)],10,x5)])],40,u5))}}),k5={key:0,class:"pb-4"},_5={key:1,"data-test":"messaging-sdk-header",class:"shrink-0 border-b border-theme-100 px-4 py-3"},$5={class:"min-w-0 flex-1"},S5={class:"truncate text-base font-semibold leading-tight text-theme-900"},E5={class:"mt-1 truncate text-sm leading-tight text-theme-500"},I5={key:0,class:"shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"},T5=["aria-label"],z5={key:0,"data-test":"messaging-empty-state",class:"flex flex-col items-center justify-center px-4"},N5=["title"],C5={key:0,class:"flex items-center gap-3 py-3 px-2"},A5=["data-journal-outcome"],O5=["data-message-id","data-message-sender","data-conversation-id","data-message-sequence","data-system-kind","data-issue-code","data-issue-bucket","data-issue-action-label","data-issue-action-url","data-streaming"],D5={class:"max-w-[85%] min-w-0"},P5=["href"],R5=["data-message-id","data-message-sender","data-conversation-id","data-message-sequence","data-system-kind","data-issue-code","data-issue-bucket","data-streaming"],M5=["data-test","data-message-id","data-message-sender","data-conversation-id","data-message-sequence","data-system-kind","data-streaming","data-queued","aria-label"],U5=["src","alt"],j5=["src"],L5=["href"],V5={key:0,"data-test":"messaging-message-text-part"},F5=["src","alt","data-attachment-placement"],B5=["src","data-attachment-placement"],Z5=["href","data-attachment-placement"],H5=["data-journal-outcome"],K5=["data-journal-outcome"],W5=["data-test","data-working-description"],G5={key:0,class:"truncate"},J5={key:1,class:"sr-only"},q5=["data-issue-code"],Y5=["href"],X5=["inert","aria-hidden"],Q5=["data-seat-state"],eD=["src","alt"],tD={class:"max-w-20 truncate"},rD=["onClick"],nD={key:0,class:"shrink-0 flex items-center justify-center size-14"},iD=["data-composer-action"],oD=["placeholder","disabled"],aD={class:"font-mono text-sm tabular-nums"},sD={class:"mt-2.5 flex items-center"},lD=["disabled","aria-label","title"],cD={key:0,class:"i-svg-spinners-ring-resize size-5"},uD={key:1,class:"i-tabler-plus size-5"},dD={class:"sr-only"},pD={class:"flex items-center gap-2"},mD=["aria-label","title"],fD={class:"sr-only"},hD=["disabled","aria-label","title"],gD={class:"flex h-4 items-center gap-[2px]","aria-hidden":"true"},vD=["data-composer-action","disabled","aria-label","title"],bD={key:0,class:"i-tabler-player-stop-filled size-3.5"},yD={key:1,class:"i-tabler-arrow-up size-[17px]"},xD={class:"sr-only"},wD={key:2,"data-test":"messaging-ai-notice",class:"mx-auto max-w-[640px] @5xl/chat:max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"},kD=Ae({__name:"ElAgentChat",props:{chatController:{},agent:{},variant:{default:"dark"},scope:{default:"private"},scopeName:{},setupHint:{},emptyStateMessage:{},showHeader:{type:Boolean,default:!1},headerMeta:{},centered:{type:Boolean,default:!1}},setup(e){let t={private:{icon:"i-tabler-lock",label:"Private",tooltip:"Only you can see this conversation"},org:{icon:"i-tabler-users",label:"Workspace",tooltip:"Visible to workspace members"},public:{icon:"i-tabler-globe",label:"Public",tooltip:"Anyone with the link can see this"}},n=N(()=>{let H={...t[e.scope]};return e.scope==="org"&&e.scopeName&&(H.label=e.scopeName,H.tooltip=`Visible to ${e.scopeName} members`),H}),i=G(),r=G(),o=G();function a(H){return H?/\[[^\]]+\]\([^)]+\)/.test(H):!1}function s(H){return H.sender==="system"&&(!!H.issue||H.id===de.value)}function c(H,F){let ee=H[F],Je=H[F+1];return!Je||Je.sender!==ee.sender}let u=N(()=>e.chatController?.textState.value),d=N(()=>u.value?.isConnected??!1),p=N(()=>u.value?.isThinking??!1),m=N(()=>u.value?.connectionStatus!=="connected"&&!u.value?.error),f=N(()=>e.chatController?.liveTurnBlocks?.value??[]),S=N(()=>{for(let H=f.value.length-1;H>=0;H--){let F=f.value[H];if(F?.kind==="text")return F.id}}),z=N(()=>e.chatController?.liveStreamMessageId?.value),T=N(()=>{let H=e.chatController?.sharedMessages.value??[];return f.value.length&&z.value?H.filter(F=>F.id!==z.value):H}),L=N(()=>{if(!e.chatController?.workJournal?.value)return u.value?.workingDescription?.trim()||void 0}),j=N(()=>e.chatController?.workJournal?.value),D=N(()=>{if(!j.value&&!f.value.length)return;let H=T.value,F=H[H.length-1];if(F)return F.sender==="agent"||F.sender==="system"?H.length>=2?H[H.length-2].id:void 0:F.id}),U=N(()=>{let H={};for(let F of T.value){if(F.sender==="user"||!F.toolActivities?.length)continue;let ee=e.chatController?.workJournalFor?.({activities:F.toolActivities,outcome:oO(F),includeFailureNote:F.sender!=="system"});ee&&(H[F.id]=ee)}return H});function $(H){return U.value[H.id]}function B(H,F){return H.placement?.kind!=="inline"||!Number.isFinite(H.placement.offset)?null:Math.max(0,Math.min(F.length,Math.trunc(H.placement.offset)))}function se(H,F){return H.mediaId||`${H.src}:${F}`}function he(H){return(H.attachments??[]).map((F,ee)=>({attachment:F,index:ee})).filter(({attachment:F})=>B(F,H.text)===null)}function te(H){let F=H.text??"";if(H.sender!=="agent")return F?[{kind:"text",key:`${H.id}:text`,text:F}]:[];let ee=(H.attachments??[]).map(($e,cr)=>({attachment:$e,index:cr,offset:B($e,F)})).filter($e=>$e.offset!==null).sort(($e,cr)=>$e.offset-cr.offset||$e.index-cr.index);if(ee.length===0)return F?[{kind:"text",key:`${H.id}:text`,text:F}]:[];let Je=[],ke=0;for(let $e of ee)$e.offset>ke&&Je.push({kind:"text",key:`${H.id}:text:${ke}`,text:F.slice(ke,$e.offset)}),Je.push({kind:"attachment",key:`${H.id}:attachment:${se($e.attachment,$e.index)}`,attachment:$e.attachment,placement:"inline"}),ke=$e.offset;return ke<F.length&&Je.push({kind:"text",key:`${H.id}:text:${ke}`,text:F.slice(ke)}),Je}let W=N(()=>u.value?.transientIssue),de=N(()=>{if(!p.value)return;let H=T.value,F=H[H.length-1];return F?.sender==="agent"||F?.sender==="system"?F.id:void 0}),ie=N(()=>!p.value||L.value||j.value||f.value.length?!1:de.value===void 0),ye=N(()=>!!L.value||ie.value),Be=N(()=>u.value?.sendBlockedReason),mt=N(()=>Be.value==="agent_deleted"),ft=N(()=>m.value?"Connecting...":Be.value==="agent_deleted"?"This assistant was deleted":"Send a message"),je=N(()=>du(e.agent.state.value)),De=N(()=>{if(_.value||!je.value||je.value==="awake")return;let H=e.agent.displayName.value||e.agent.name.value||"Your assistant";return je.value==="changing"?`${H} will be right back\u2026`:`${H} is ${uu[je.value].toLowerCase()}.`}),Tt=N(()=>e.chatController?.composerState?.value??{text:"",pendingAttachments:[],isUploading:!1}),Ze=N({get:()=>Tt.value.text,set:H=>e.chatController?.setComposerText?.({text:H})}),gr=N(()=>Tt.value.pendingAttachments),ht=N(()=>Tt.value.isUploading),vt=N(()=>e.chatController?.voiceRecorder),Tr=N(()=>vt.value?.isBusy.value??!1),wt=N(()=>e.chatController?.canAttachFile?.value??!1),On=N(()=>e.chatController?.canRecordAudio?.value??!1),kt=N(()=>e.chatController?.composerAction?.value??"idle"),At=N(()=>kt.value!=="idle"),Bt=N(()=>e.chatController?.composerShowsSecondaryStop?.value??!1),Ge=N(()=>e.chatController?.queuedMessageIds?.value);function Zt(H){return Ge.value?.has(H)??!1}let He=N(()=>kt.value==="stop"?"Stop reply":Bt.value?"Send \u2014 answered after current work":"Send message"),jr=N(()=>On.value&&!Tr.value&&!!vt.value?.canUseBrowserRecording),h=N(()=>vt.value?.isActive.value??!1),k=N(()=>vt.value?.state.value.phase==="sending"),M=N(()=>vt.value?.elapsedLabel.value??"0:00"),K=N(()=>{let H=vt.value?.state.value.phase;return H==="preparing"||H==="sending"?vt.value?.statusText.value??"Starting microphone":br.value?"Release to send":"Click mic to send"}),w=N(()=>vt.value?.state.value.phase==="sending"?"Sending voice message":h.value?br.value?"Release to send voice message":"Stop and send voice message":"Record voice message"),_=G(!1),b=G(),C=G(),I=G(),A=0,oe=N(()=>e.chatController?.canStartVoice?.value??!1);lt([()=>e.agent.avatar.value?.src,oe],([H,F])=>{let ee=++A;if(I.value=void 0,!F||!H||typeof Image>"u")return;let Je=new Image;Je.onload=()=>{ee===A&&(I.value=H)},Je.src=H},{immediate:!0});let re=N(()=>oe.value&&!_.value&&!h.value&&kt.value==="idle"),ue=N(()=>!d.value),fe=N(()=>ue.value?`Voice available when ${e.agent.displayName.value||e.agent.name.value||"the assistant"} is awake`:"Start voice conversation");function _e(){!re.value||ue.value||(C.value=I.value,_.value=!0)}async function Te(){if(!_.value)return;let H=b.value;_.value=!1,C.value=void 0,await Ri(),await new Promise(F=>setTimeout(F,80)),await H?.end(),window.matchMedia("(pointer: coarse)").matches||r.value?.focus(),await e.chatController?.refreshMessages()}let ae=N(()=>e.variant==="light"),Ke=N(()=>ae.value?"bg-gradient-to-r from-transparent via-theme-300/70 to-transparent":"bg-gradient-to-r from-transparent via-white/15 to-transparent"),Xe=N(()=>ae.value?"text-theme-300":"text-white/30");It(async()=>{e.chatController&&!d.value&&await e.chatController.startTextConversation()}),rn(()=>{e.chatController?.voiceRecorder?.teardown()});async function St(){!e.chatController||kt.value!=="send"||(r.value&&(r.value.style.height="auto",window.matchMedia("(pointer: coarse)").matches?(r.value.blur(),requestAnimationFrame(()=>{let H=document.activeElement;H&&(H.tagName==="TEXTAREA"||H.tagName==="INPUT")&&H.blur()})):r.value.focus()),i.value?.pin(),await e.chatController.sendComposerMessage())}async function gt(H){!e.chatController||mt.value||(i.value?.pin(),await e.chatController.sendChatMessage(H))}async function rr(){if(e.chatController){if(kt.value==="send"){await St();return}await e.chatController.handleComposerAction()}}async function vr(H){H.isComposing||H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),await St())}function pt(H){h.value||mt.value||H.target instanceof Element&&H.target.closest("button, a, textarea")||r.value?.focus()}function ct(){r.value&&(r.value.style.height="auto",r.value.style.height=`${Math.min(r.value.scrollHeight,150)}px`)}lt(Ze,()=>Ri(()=>ct()));function Dn(){o.value?.click()}async function di(H){let F=H.target,ee=F.files?.[0];!ee||!e.chatController||Tr.value||(await e.chatController.attachFile({file:ee}),F.value="")}function dl(H){e.chatController?.removeAttachment({index:H})}function Gi(){vt.value?.start()}function Pn(H){vt.value?.finish(H)}let br=Ye(!1),pn=!1;function yr(H){H.pointerType==="touch"&&(pn=!0,br.value=!0,H.currentTarget.setPointerCapture?.(H.pointerId),Gi())}function Rn(H){H.pointerType!=="touch"||!br.value||(br.value=!1,Pn({cancelled:!1}))}function ga(H){H.pointerType!=="touch"||!br.value||(br.value=!1,pn=!1,Pn({cancelled:!0}))}function va(){h.value?Pn({cancelled:!1}):Gi()}function Md(){if(pn){pn=!1;return}va()}function ba(H,F){if(F===0){let $e=H[F];return $e?.timestamp?Ji(new Date($e.timestamp)):null}let ee=H[F-1],Je=H[F];if(!ee?.timestamp||!Je?.timestamp)return null;let ke=new Date(ee.timestamp).getTime();return new Date(Je.timestamp).getTime()-ke>36e5?Ji(new Date(Je.timestamp)):null}function Ji(H){let F=new Date,ee=H.toDateString()===F.toDateString(),Je=new Date(F);Je.setDate(Je.getDate()-1);let ke=H.toDateString()===Je.toDateString(),$e=H.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});if(ee)return $e;if(ke)return`Yesterday, ${$e}`;let cr=H.getFullYear()===F.getFullYear();return`${H.toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric",...cr?{}:{year:"numeric"}})}, ${$e}`}return(H,F)=>(v(),x("div",{"data-test":"messaging-root",class:V(["@container/chat relative flex h-full flex-col",T.value.length===0?"min-h-0 [justify-content:safe_center] overflow-y-auto":""])},[e.showHeader&&!ae.value?(v(),x("div",k5,[be(Nd,{agent:e.agent,"is-online":d.value},null,8,["agent","is-online"])])):e.showHeader?(v(),x("div",_5,[y("div",{class:V(["flex items-center gap-3",e.centered?"max-w-[640px] @5xl/chat:max-w-[720px] mx-auto":""])},[be(_b,{agent:e.agent,"is-light":ae.value,class:"size-10"},null,8,["agent","is-light"]),y("div",$5,[y("div",S5,ce(e.agent.displayName.value),1),y("div",E5,ce(e.agent.title.value||"Assistant"),1)]),e.headerMeta?(v(),x("span",I5,ce(e.headerMeta),1)):Y("",!0)],2)])):Y("",!0),be(ni,{name:"voice-call"},{default:bt(()=>[_.value?(v(),x("div",{key:0,"data-test":"voice-call-overlay",role:"dialog","aria-modal":"true","aria-label":`Voice conversation with ${e.agent.displayName.value}`,class:"fixed inset-0 z-[100] flex items-stretch justify-stretch bg-[#050F19] sm:items-center sm:justify-center sm:bg-[#050F19]/45 sm:p-6",onKeydown:F[0]||(F[0]=zn(ee=>Te(),["esc"]))},[be(w5,{ref_key:"voiceMode",ref:b,agent:e.agent,"chat-controller":e.chatController,"backdrop-src":C.value,"is-light":!1,class:"voice-call-card h-full w-full sm:max-h-[620px] sm:max-w-[420px] sm:flex-none sm:rounded-[32px] sm:shadow-[0_32px_80px_rgba(5,15,25,0.45)]",onEnd:Te},null,8,["agent","chat-controller","backdrop-src"])],40,T5)):Y("",!0)]),_:1}),m.value?(v(),x("div",{key:2,class:V(["py-16 flex flex-col items-center justify-center gap-2 text-sm",ae.value?"text-theme-400":"text-theme-600"])},[be(kd,{class:"size-4"})],2)):e.setupHint?(v(),x("div",{key:3,class:V(["flex items-center justify-center gap-1.5 py-2 text-[11px]",Xe.value])},[F[14]||(F[14]=y("i",{class:"i-tabler-tool size-3"},null,-1)),y("span",null,ce(e.setupHint),1)],2)):Y("",!0),be(W6,{ref_key:"chatScroller",ref:i,inert:_.value,"aria-hidden":_.value?"true":void 0,class:V(T.value.length===0?"flex-none":"flex-1")},{default:bt(()=>[y("div",{class:V([T.value.length===0?"flex flex-col items-center justify-center px-3 py-4":e.centered?"pt-20 pb-5 px-3 @lg/chat:px-8 space-y-2":"pt-4 pb-[120px] px-3 @lg/chat:px-8 space-y-2",e.centered?T.value.length===0?"max-w-[900px] mx-auto w-full":"max-w-[640px] @5xl/chat:max-w-[720px] mx-auto w-full":""])},[T.value.length===0&&!m.value?(v(),x("div",z5,[er(H.$slots,"empty-heading",{agent:e.agent,isLight:ae.value},()=>[be(_b,{agent:e.agent,"is-light":ae.value,class:"mb-4 size-20 @sm/chat:size-24"},null,8,["agent","is-light"]),y("div",{class:V(["text-base @sm/chat:text-lg font-semibold",ae.value?"text-theme-900":"text-white"])},ce(e.agent.displayName.value),3)],!0),e.emptyStateMessage===""?Y("",!0):(v(),x(ge,{key:0},[y("p",{class:V(["mt-1 text-center text-xs @sm/chat:text-sm",Xe.value])},ce(e.emptyStateMessage||"Type your message to get started."),3),y("div",{class:V(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]",ae.value?"bg-theme-50 border border-theme-100 text-theme-400":"bg-white/10 border border-white/20 text-white/40"]),title:n.value.tooltip},[y("i",{class:V([n.value.icon,"size-3"])},null,2),y("span",null,ce(n.value.label),1)],10,N5)],64))])):Y("",!0),(v(!0),x(ge,null,et(T.value,(ee,Je)=>(v(),x(ge,{key:ee.id},[ba(T.value,Je)?(v(),x("div",C5,[y("div",{class:V(["flex-1 h-px",Ke.value])},null,2),y("span",{class:V(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase",Xe.value])},ce(ba(T.value,Je)),3),y("div",{class:V(["flex-1 h-px",Ke.value])},null,2)])):Y("",!0),$(ee)?(v(),x("div",{key:1,"data-test":"messaging-message-tool-activity","data-journal-outcome":$(ee)?.outcome,class:"mb-4 w-full"},[be(pb,{model:$(ee),"is-light":ae.value},null,8,["model","is-light"])],8,A5)):Y("",!0),s(ee)?(v(),x("div",{key:2,"data-test":"messaging-system-msg","data-message-id":ee.id,"data-message-sender":ee.sender,"data-conversation-id":ee.conversationId,"data-message-sequence":ee.sequence,"data-system-kind":ee.systemKind,"data-issue-code":ee.issue?.code,"data-issue-bucket":ee.issue?.bucket,"data-issue-action-label":ee.issue?.actionLabel,"data-issue-action-url":ee.issue?.actionUrl,"data-streaming":ee.id===de.value?"true":void 0,class:"flex gap-2 items-end justify-start mb-4"},[y("div",D5,[y("div",{class:V(["mb-1 pl-1 text-[11px] font-medium",ae.value?"text-theme-500":"text-white/45"])}," System Message ",2),y("div",{class:V(["pl-1",ae.value?"text-theme-700":"text-white/85"])},[ee.text?(v(),Fe(nl,{key:0,text:ee.text,inverted:!ae.value,streaming:ee.id===de.value,onClick:F[1]||(F[1]=_t(()=>{},["stop"])),onAction:gt},null,8,["text","inverted","streaming"])):ee.issue?.help?(v(),Fe(nl,{key:1,text:ee.issue.help,inverted:!ae.value},null,8,["text","inverted"])):Y("",!0),ee.issue?.actionUrl&&!a(ee.text)?(v(),x("a",{key:2,href:ee.issue.actionUrl,"data-test":"messaging-system-msg-action",class:V(["mt-2 text-[12px] font-medium inline-flex items-center gap-1",ae.value?"text-theme-900 hover:text-theme-700":"text-white hover:text-white/80"]),onClick:F[2]||(F[2]=_t(()=>{},["stop"]))},[xt(ce(ee.issue.actionLabel)+" ",1),F[15]||(F[15]=y("i",{class:"i-tabler-arrow-right size-3"},null,-1))],10,P5)):Y("",!0)],2)])],8,O5)):ee.sender==="system"?(v(),x("div",{key:3,"data-test":"messaging-system-status-msg","data-message-id":ee.id,"data-message-sender":ee.sender,"data-conversation-id":ee.conversationId,"data-message-sequence":ee.sequence,"data-system-kind":ee.systemKind,"data-issue-code":ee.issue?.code,"data-issue-bucket":ee.issue?.bucket,"data-streaming":ee.id===de.value?"true":void 0,class:V(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1",ae.value?"bg-theme-100 text-theme-600 ring-theme-200":"bg-white/10 text-white/70 ring-white/10"])},[F[16]||(F[16]=y("i",{class:"i-tabler-info-circle size-4 mt-0.5 shrink-0","aria-hidden":"true"},null,-1)),be(nl,{text:ee.text,inverted:!ae.value,onClick:F[3]||(F[3]=_t(()=>{},["stop"]))},null,8,["text","inverted"])],10,R5)):(v(),x("div",{key:4,"data-test":ee.sender==="agent"?"messaging-assistant-msg":ee.sender==="user"?"messaging-user-msg":void 0,"data-message-id":ee.id,"data-message-sender":ee.sender,"data-conversation-id":ee.conversationId,"data-message-sequence":ee.sequence,"data-system-kind":ee.systemKind,"data-streaming":ee.id===de.value?"true":void 0,"data-queued":Zt(ee.id)?"true":void 0,"aria-label":Zt(ee.id)?"Sent \u2014 will be answered after the current work finishes":void 0,class:V(["flex gap-2 items-end",{"justify-end":ee.sender==="user","justify-start":ee.sender==="agent","mb-6":c(T.value,Je),"opacity-70":Zt(ee.id)}])},[y("div",{"data-test":"messaging-message-body",class:V(ee.sender==="user"?"max-w-[min(78%,30rem)]":"w-full min-w-0")},[he(ee).length?(v(),x("div",{key:0,class:V(["mb-1 space-y-1",ee.sender==="user"?"flex flex-col items-end":""])},[(v(!0),x(ge,null,et(he(ee),({attachment:ke,index:$e})=>(v(),x(ge,{key:se(ke,$e)},[ke.type==="image"?(v(),x("img",{key:0,src:ke.src,alt:ke.filename,"data-test":"messaging-attachment","data-attachment-placement":"block",class:"rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"},null,8,U5)):ke.type==="audio"?(v(),x("audio",{key:1,src:ke.src,controls:"","data-test":"messaging-attachment","data-attachment-placement":"block",class:"max-w-full"},null,8,j5)):(v(),x("a",{key:2,href:ke.src,target:"_blank",rel:"noopener","data-test":"messaging-attachment","data-attachment-placement":"block",class:V(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",ae.value?"bg-theme-100 text-theme-600 hover:bg-theme-200":"bg-white/10 text-white/80 hover:bg-white/20"])},[F[17]||(F[17]=y("i",{class:"i-tabler-file size-3.5"},null,-1)),xt(" "+ce(ke.filename),1)],10,L5))],64))),128))],2)):Y("",!0),te(ee).length?(v(),x("div",{key:1,"data-test":"messaging-message-content",class:V(ee.sender==="user"?ae.value?"rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900":"rounded-[14px] px-4 py-2.5 bg-white/10 text-white":ae.value?"text-theme-800":"text-white/95")},[(v(!0),x(ge,null,et(te(ee),ke=>(v(),x(ge,{key:ke.key},[ke.kind==="text"&&ke.text?(v(),x("div",V5,[be(nl,{text:ke.text,inverted:ee.sender==="user"||!ae.value,streaming:ee.id===de.value,onClick:F[4]||(F[4]=_t(()=>{},["stop"])),onAction:gt},null,8,["text","inverted","streaming"])])):ke.kind==="attachment"&&ke.attachment.type==="image"?(v(),x("img",{key:1,src:ke.attachment.src,alt:ke.attachment.filename,"data-test":"messaging-attachment","data-attachment-placement":ke.placement,class:"my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"},null,8,F5)):ke.kind==="attachment"&&ke.attachment.type==="audio"?(v(),x("audio",{key:2,src:ke.attachment.src,controls:"","data-test":"messaging-attachment","data-attachment-placement":ke.placement,class:"my-2 max-w-full"},null,8,B5)):ke.kind==="attachment"?(v(),x("a",{key:3,href:ke.attachment.src,target:"_blank",rel:"noopener","data-test":"messaging-attachment","data-attachment-placement":ke.placement,class:V(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs",ae.value?"bg-theme-100 text-theme-600 hover:bg-theme-200":"bg-white/10 text-white/80 hover:bg-white/20"])},[F[18]||(F[18]=y("i",{class:"i-tabler-file size-3.5"},null,-1)),xt(" "+ce(ke.attachment.filename),1)],10,Z5)):Y("",!0)],64))),128))],2)):Y("",!0)],2)],10,M5)),ee.id===D.value?(v(),x(ge,{key:5},[f.value.length?(v(!0),x(ge,{key:0},et(f.value,ke=>(v(),x(ge,{key:ke.id},[ke.kind==="work"?(v(),x("div",{key:0,"data-test":"messaging-tool-activity","data-journal-outcome":ke.journal.outcome,class:"chat-live-enter mb-4 w-full"},[be(pb,{model:ke.journal,"is-light":ae.value},null,8,["model","is-light"])],8,H5)):ke.kind==="text"&&ke.content?(v(),x("div",{key:1,"data-test":"messaging-live-text-block",class:V(["mb-4",ae.value?"text-theme-800":"text-white/95"])},[be(nl,{text:ke.content,inverted:!ae.value,streaming:ke.id===S.value,onClick:F[5]||(F[5]=_t(()=>{},["stop"])),onAction:gt},null,8,["text","inverted","streaming"])],2)):(v(),x("div",{key:2,"data-test":"messaging-tool-activity-tail","aria-label":"Assistant is still working",class:V(["chat-live-enter mb-4 grid h-[17px] w-5 place-items-center",ae.value?"text-theme-500":"text-white/70"])},[...F[19]||(F[19]=[y("span",{class:"chat-dots chat-dots--mini","aria-hidden":"true"},[y("span"),y("span"),y("span")],-1)])],2))],64))),128)):j.value?(v(),x("div",{key:1,"data-test":"messaging-tool-activity","data-journal-outcome":j.value.outcome,class:"chat-live-enter mb-4 w-full"},[be(pb,{model:j.value,"is-light":ae.value},null,8,["model","is-light"])],8,K5)):Y("",!0)],64)):Y("",!0)],64))),128)),ye.value?(v(),x("div",{key:1,"data-test":L.value?"messaging-working-state":"messaging-thinking-indicator","data-working-description":L.value,role:"status","aria-live":"polite",class:V(["chat-live-enter relative mb-4 flex h-[17px] items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug",ae.value?"text-theme-500":"text-white/50"])},[F[20]||(F[20]=y("span",{"data-test":"messaging-thinking-dots",class:"chat-dots shrink-0","aria-hidden":"true"},[y("span"),y("span"),y("span")],-1)),L.value?(v(),x("span",G5,ce(L.value),1)):(v(),x("span",J5,"Thinking"))],10,W5)):Y("",!0),W.value?(v(),x("div",{key:2,"data-test":"messaging-transient-issue","data-issue-code":W.value.code,class:V(["chat-live-enter flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug",ae.value?"text-theme-600":"text-white/60"])},[F[21]||(F[21]=y("i",{class:"i-tabler-alert-circle size-3.5 shrink-0 text-red-500","aria-hidden":"true"},null,-1)),y("span",null,[xt(ce(W.value.message),1),W.value.help?(v(),x(ge,{key:0},[xt(ce(W.value.help),1)],64)):Y("",!0)]),W.value.actionUrl&&W.value.actionLabel?(v(),x("a",{key:0,href:W.value.actionUrl,class:"shrink-0 underline underline-offset-2",onClick:F[6]||(F[6]=_t(()=>{},["stop"]))},ce(W.value.actionLabel),9,Y5)):Y("",!0)],10,q5)):Y("",!0)],2)]),_:3},8,["inert","aria-hidden","class"]),y("div",{"data-test":"messaging-composer-footer",inert:_.value,"aria-hidden":_.value?"true":void 0,class:V(["left-0 right-0 z-30 px-3 @lg/chat:px-8 pb-[max(env(safe-area-inset-bottom),1rem)]",[T.value.length===0||e.centered?"relative shrink-0":"absolute bottom-0",e.centered&&T.value.length>0?"pt-0 sm:pb-7":"pt-3",ae.value?e.centered?"bg-transparent":"bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent":"bg-gradient-to-t from-black/90 via-black/60 to-transparent"]])},[er(H.$slots,"composer",{},()=>[De.value?(v(),x("div",{key:0,"data-test":"messaging-seat","data-seat-state":je.value,role:"status","aria-live":"polite",class:V(["py-3 text-center text-[14px]",ae.value?"text-theme-500":"text-white/70"])},ce(De.value),11,Q5)):(v(),x(ge,{key:1},[gr.value.length>0?(v(),x("div",{key:0,class:V(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",e.centered?"max-w-[640px] @5xl/chat:max-w-[720px] mx-auto":""])},[(v(!0),x(ge,null,et(gr.value,(ee,Je)=>(v(),x("div",{key:Je,class:"relative shrink-0 group"},[ee.type==="image"?(v(),x("img",{key:0,src:ee.src,alt:ee.filename,class:V(["size-14 rounded-xl object-cover border",ae.value?"border-black/10":"border-white/20"])},null,10,eD)):(v(),x("div",{key:1,class:V(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border",ae.value?"border-black/10 bg-theme-50 text-theme-600":"border-white/20 bg-white/10 text-white/70"])},[F[22]||(F[22]=y("i",{class:"i-tabler-file size-4"},null,-1)),y("span",tD,ce(ee.filename),1)],2)),y("button",{class:"absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] cursor-pointer",onClick:ke=>dl(Je)},[...F[23]||(F[23]=[y("i",{class:"i-tabler-x size-3"},null,-1)])],8,rD)]))),128)),ht.value?(v(),x("div",nD,[be(kd,{class:"size-5"})])):Y("",!0)],2)):Y("",!0),wt.value?(v(),x("input",{key:1,ref_key:"fileInput",ref:o,type:"file",accept:"image/*,audio/*,video/*",class:"hidden",onChange:di},null,544)):Y("",!0),y("div",{"data-test":"messaging-composer","data-composer-action":kt.value,class:V(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200",[e.centered?"mx-auto max-w-[640px] @5xl/chat:max-w-[720px] @5xl/chat:px-5 @5xl/chat:pt-3.5 @5xl/chat:pb-3":"",ae.value?"bg-white shadow-[0_1px_2px_rgba(15,23,42,0.04),0_12px_32px_rgba(15,23,42,0.07)] ring-1 ring-theme-950/10 hover:ring-theme-950/15 focus-within:ring-theme-950/15":"bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),onClick:pt},[h.value?(v(),x("div",{key:1,"data-test":"messaging-recording-state",class:V(["flex min-w-0 items-center gap-2 py-1",ae.value?"text-theme-700":"text-white/80"])},[F[24]||(F[24]=y("span",{class:"size-2.5 shrink-0 rounded-full bg-red-500"},null,-1)),y("span",aD,ce(M.value),1),y("span",{class:V(["min-w-0 truncate text-sm",ae.value?"text-theme-400":"text-white/45"])},ce(K.value),3)],2)):Uu((v(),x("textarea",{key:0,ref_key:"textarea",ref:r,"onUpdate:modelValue":F[7]||(F[7]=ee=>Ze.value=ee),"data-test":"messaging-input",rows:"1",enterkeyhint:"send",inputmode:"text",autocomplete:"off",autocapitalize:"sentences",autocorrect:"on",spellcheck:"true",placeholder:ft.value,disabled:mt.value,style:{fontSize:"16px",resize:"none"},class:V(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",ae.value?"text-theme-900 placeholder-theme-400":"text-white placeholder-white/50"]),onKeydown:vr},null,42,oD)),[[Hu,Ze.value]]),y("div",sD,[y("button",{class:V(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11",[wt.value?"cursor-pointer":"cursor-default",ae.value?"text-theme-500":"text-white/50",ht.value||Tr.value?"opacity-50 pointer-events-none":""]]),disabled:mt.value||ht.value||Tr.value||!wt.value,"aria-label":wt.value?"Attach file":"File attachments unavailable",title:wt.value?"Attach file":"File attachments unavailable",onClick:F[8]||(F[8]=ee=>wt.value&&Dn())},[ht.value?(v(),x("i",cD)):(v(),x("i",uD)),y("span",dD,ce(wt.value?"Attach file":"File attachments unavailable"),1)],10,lD),F[28]||(F[28]=y("div",{class:"flex-1"},null,-1)),y("div",pD,[h.value&&!k.value&&!_.value?(v(),x("button",{key:0,"data-test":"messaging-record-discard-btn",class:V(["flex size-8 cursor-pointer items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11",ae.value?"text-theme-400":"text-white/40"]),"aria-label":"Discard recording",title:"Discard recording",onClick:F[9]||(F[9]=ee=>Pn({cancelled:!0}))},[...F[25]||(F[25]=[y("i",{class:"i-tabler-x size-[18px]","aria-hidden":"true"},null,-1)])],2)):Y("",!0),(jr.value||h.value)&&!k.value&&!_.value?(v(),x("button",{key:1,"data-test":"messaging-record-audio-btn",class:V(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] hover:opacity-70 pointer-coarse:size-11",h.value?ae.value?"text-theme-900 scale-110":"text-white scale-110":ae.value?"text-theme-500":"text-white/60"]),"aria-label":w.value,title:w.value,onPointerdown:_t(yr,["prevent"]),onPointerup:_t(Rn,["prevent"]),onPointercancel:_t(ga,["prevent"]),onClick:Md,onKeydown:F[10]||(F[10]=zn(_t(ee=>Pn({cancelled:!0}),["prevent"]),["escape"]))},[y("i",{class:V([h.value?"i-tabler-microphone-filled":"i-tabler-microphone","size-[18px]"])},null,2),y("span",fD,ce(w.value),1)],42,mD)):Y("",!0),re.value?(v(),x("button",{key:2,"data-test":"messaging-voice-start-btn",class:V(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",[ae.value?"bg-theme-900 text-theme-0 hover:bg-theme-800":"bg-theme-0 text-theme-950 hover:bg-theme-100",ue.value?"cursor-not-allowed opacity-40":"cursor-pointer"]]),disabled:ue.value,"aria-label":fe.value,title:fe.value,onClick:F[11]||(F[11]=ee=>_e())},[y("span",gD,[(v(),x(ge,null,et([7,13,16,11,14],ee=>y("span",{key:ee,class:"w-[2px] rounded-full bg-current",style:we({height:`${ee}px`})},null,4)),64))]),F[26]||(F[26]=y("span",{class:"sr-only"},"Start voice conversation",-1))],10,hD)):h.value?Y("",!0):(v(),x(ge,{key:3},[Bt.value?(v(),x("button",{key:0,"data-test":"messaging-secondary-stop-btn",class:V(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",ae.value?"bg-theme-100 text-theme-700 hover:bg-theme-200":"bg-white/10 text-white/70 hover:bg-white/15"]),"aria-label":"Stop work",title:"Stop work",onClick:F[12]||(F[12]=ee=>e.chatController?.stopChatTurn())},[...F[27]||(F[27]=[y("i",{class:"i-tabler-player-stop-filled size-3.5","aria-hidden":"true"},null,-1),y("span",{class:"sr-only"},"Stop work",-1)])],2)):Y("",!0),y("button",{"data-test":"messaging-send-btn","data-composer-action":kt.value,class:V(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11",At.value?ae.value?"bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer":"bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer":ae.value?"bg-theme-100 text-theme-400":"bg-white/10 text-white/30"]),disabled:!At.value,"aria-label":He.value,title:He.value,onClick:F[13]||(F[13]=ee=>rr())},[kt.value==="stop"?(v(),x("i",bD)):(v(),x("i",yD)),y("span",xD,ce(He.value),1)],10,vD)],64))])])],10,iD),e.centered&&T.value.length>0?(v(),x("p",wD,ce(e.agent.displayName.value)+" is AI and can make mistakes. ",1)):Y("",!0)],64))],!0)],10,X5)],2))}}),jb=Yb((e,t)=>{let n=e.__vccOpts||e;for(let[i,r]of t)n[i]=r;return n},"default"),Hi=jb(kD,[["__scopeId","data-v-96b5c96e"]]),_D={class:"agent-wrap"},$D={key:0,class:"flex items-center justify-center h-full"},SD={key:2,class:"flex h-full flex-col items-center justify-center gap-4 px-6 text-center",role:"status","aria-live":"polite","data-test":"agent-unavailable"},Od=Ae({__name:"AgentWrap",props:{sdk:{},agent:{},handle:{},context:{},clientContext:{},firstMessage:{},buttonText:{},buttonIcon:{},hasClose:{type:Boolean},chatOnly:{type:Boolean},bare:{type:Boolean},apiBase:{}},setup(e){let t=yn("AgentWrap"),n=e,i=n.sdk||Qs.getInstance({isDev:typeof window<"u"?window.location.hostname==="localhost"||window.location.hostname.includes("127.0.0.1"):!1,...n.apiBase&&{apiBase:n.apiBase}}),r=Ye(!n.agent),o=Ye(n.agent?new on({config:n.agent}):void 0),a=Ye();async function s(){if(n.agent){t.debug("Agent provided via props, skipping fetch",{agentId:n.agent.agentId,handle:n.agent.handle}),r.value=!1;return}if(!n.handle){a.value="No handle or agent provided",t.warn("AgentWrap mounted without handle or agent",{propsReceived:{handle:n.handle,agent:n.agent,context:n.clientContext??n.context,apiBase:n.apiBase},sdkState:{isDev:i.isDev,apiBase:i.apiBase}}),r.value=!1;return}try{r.value=!0,a.value=void 0,t.debug("Fetching public agent",{handle:n.handle});let c=await i.user.getPublicAgent({handle:n.handle});c?(o.value=new on({config:c}),t.debug("Successfully fetched public agent",{agentId:c.agentId,handle:c.handle}),c.agentId&&i.user.track({event:"view_profile",agentId:c.agentId,properties:{viewSource:"widget"}})):(a.value=i.error.value||"Agent not found",t.error("Failed to fetch public agent - no data returned",{handle:n.handle,sdkError:i.error.value,sdkState:{isDev:i.isDev,apiBase:i.apiBase,loading:i.loading.value}}))}catch(c){a.value=c instanceof Error?c.message:"Failed to fetch agent",t.error("Exception while fetching public agent",{handle:n.handle,error:c instanceof Error?{message:c.message,stack:c.stack}:c,sdkState:{isDev:i.isDev,apiBase:i.apiBase,error:i.error.value}})}finally{r.value=!1,o.value||t.debug("AgentWrap component will render unavailable state",{state:{loading:r.value,hasAgent:!!o.value,error:a.value},props:{handle:n.handle,context:n.clientContext??n.context,apiBase:n.apiBase},sdkState:{isDev:i.isDev,apiBase:i.apiBase,error:i.error.value}})}}return It(s),(c,u)=>(v(),x("div",_D,[r.value?(v(),x("div",$D,[y("div",{class:V(["size-6 animate-spin rounded-full border-b-2",n.bare?"border-theme-400":"border-white"])},null,2)])):o.value?er(c.$slots,"default",{sdk:Ie(i),agent:o.value,context:e.clientContext??e.context,firstMessage:e.firstMessage,buttonText:e.buttonText,buttonIcon:e.buttonIcon,loading:r.value},void 0,void 0,1):a.value?(v(),x("div",SD,[u[0]||(u[0]=y("p",{class:"text-sm font-medium text-theme-600"}," This assistant is unavailable right now. ",-1)),y("button",{type:"button",class:"min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700","data-test":"agent-unavailable-retry",onClick:s}," Try again ")])):Y("",!0)]))}})});function fa(e){let t=G(e.agent),n=G(e.context),i=G(e.firstMessage),r=G(e.buttonText),o=G(e.buttonIcon);function a(s){s.agent!==void 0&&(t.value=s.agent),s.context!==void 0&&(n.value=s.context),s.firstMessage!==void 0&&(i.value=s.firstMessage),s.buttonText!==void 0&&(r.value=s.buttonText),s.buttonIcon!==void 0&&(o.value=s.buttonIcon)}return{currentAgent:t,currentContext:n,currentFirstMessage:i,currentButtonText:r,currentButtonIcon:o,update:a}}var Dd=O(()=>{"use strict";mn();Nn()});var Ki,T2=O(()=>{"use strict";mn();Ki={linkedin:{label:"LinkedIn",icon:"i-simple-icons-linkedin",placeholder:"john-smith",getUrl:e=>`https://linkedin.com/in/${e}`},x:{label:"X",icon:"i-simple-icons-x",placeholder:"johnsmith",getUrl:e=>`https://x.com/${e}`},facebook:{label:"Facebook",icon:"i-simple-icons-facebook",placeholder:"johnsmith",getUrl:e=>`https://facebook.com/${e}`},tiktok:{label:"TikTok",icon:"i-simple-icons-tiktok",placeholder:"johnsmith",getUrl:e=>`https://tiktok.com/@${e}`},youtube:{label:"YouTube",icon:"i-tabler-brand-youtube",placeholder:"johnsmith",getUrl:e=>`https://youtube.com/@${e}`},github:{label:"GitHub",icon:"i-tabler-brand-github",placeholder:"johnsmith",getUrl:e=>`https://github.com/${e}`},instagram:{label:"Instagram",icon:"i-simple-icons-instagram",placeholder:"johnsmith",getUrl:e=>`https://instagram.com/${e}`},threads:{label:"Threads",icon:"i-simple-icons-threads",placeholder:"johnsmith",getUrl:e=>`https://threads.net/@${e}`},email:{label:"Email",icon:"i-tabler-mail",placeholder:"hello@example.com",getUrl:e=>`mailto:${e}`},phone:{label:"Phone",icon:"i-tabler-phone",placeholder:"+1-555-123-4567",getUrl:e=>`tel:${e.replace(/[^0-9+]/g,"")}`},website:{label:"Website",icon:"i-tabler-world",placeholder:"https://example.com",getUrl:e=>e},calendar:{label:"Calendar",icon:"i-tabler-calendar",placeholder:"https://cal.com/username",getUrl:e=>e}}});var ED,ID,TD,zD,ND,CD,AD,OD,z2,DD,PD,RD,MD,UD,jD,LD,VD,FD,BD,ZD,HD,KD,WD,GD,JD,qD,YD,XD,QD,eP,tP,rP,nP,iP,oP,aP,sP,lP,cP,uP,dP,N2,pP,mP,fP,hP,gP,vP,bP,yP,xP,wP,kP,_P,$P,SP,EP,IP,TP,zP,NP,CP,AP,OP,DP,Pd,Vb=O(()=>{"use strict";mn();T2();Lb();Ys();Nn();ED=Ae({__name:"EffectTransitionList",props:{disabled:{type:Boolean,default:!1},mode:{default:"block"}},setup(e){return(t,n)=>(v(),Fe(_0,{name:e.disabled?"":"nlist"},{default:bt(()=>[er(t.$slots,"default")]),_:3},8,["name"]))}}),ID=["data-test-mode"],TD={class:"w-full max-w-xs space-y-12"},zD={key:0,class:"text-xs text-theme-400 text-center"},ND={class:"text-base font-light text-white text-center"},CD={class:"space-y-6 relative"},AD={key:"email-field",class:"w-full"},OD={key:"code-field",class:"w-full"},z2=Ae({__name:"ElAuthGate",props:{sdk:{}},setup(e){let t=G({email:"",code:""}),n=G("email"),i=G(!1),r={email:{title:"Enter Your Email",button:{label:"Continue",disabled:()=>!t.value.email||i.value},action:async()=>{if(!i.value){i.value=!0;try{await e.sdk.auth.requestAuthCode({email:t.value.email})&&(n.value="code")}finally{i.value=!1}}}},code:{title:"Enter Verification Code",button:{label:"Verify",disabled:()=>t.value.code.length!==6||i.value},action:async()=>{if(!i.value){i.value=!0;try{await e.sdk.auth.loginWithCode({email:t.value.email,code:t.value.code})}finally{i.value=!1}}}}},o=N(()=>r[n.value]);return lt(()=>e.sdk.activeUser.value,a=>{a&&n.value==="code"&&console.log("[ElAuthGate] Authentication successful",{email:a.email})}),(a,s)=>(v(),x("div",{"data-test":"auth-form","data-test-mode":n.value,class:"flex flex-col items-center justify-center h-full p-6"},[y("div",TD,[e.sdk.error.value?(v(),x("p",zD,ce(e.sdk.error.value),1)):Y("",!0),y("h3",ND,ce(o.value.title),1),y("div",CD,[be(ED,null,{default:bt(()=>[n.value==="email"?(v(),x("div",AD,[be(Td,{modelValue:t.value.email,"onUpdate:modelValue":s[0]||(s[0]=c=>t.value.email=c),"data-test":"auth-email-input",onKeyup:zn(o.value.action,["enter"])},null,8,["modelValue","onKeyup"])])):(v(),x("div",OD,[be(zd,{modelValue:t.value.code,"onUpdate:modelValue":s[1]||(s[1]=c=>t.value.code=c),length:6,"focus-first":!0,"data-test":"auth-code-input",onAutoSubmit:o.value.action},null,8,["modelValue","onAutoSubmit"])])),(v(),x("div",{key:o.value.button.label,class:"space-y-4 w-full"},[be(pa,{theme:"primary",size:"md",class:"w-full","data-test":"auth-submit",loading:e.sdk.loading.value,disabled:o.value.button.disabled()||e.sdk.loading.value,onClick:o.value.action},{default:bt(()=>[xt(ce(o.value.button.label),1)]),_:1},8,["loading","disabled","onClick"]),n.value==="code"?(v(),x("button",{key:0,class:"w-full text-xs text-white/50 hover:text-white/70 transition-colors py-2",onClick:s[2]||(s[2]=c=>n.value="email")}," Change Email ")):Y("",!0)]))]),_:1})])])],8,ID))}}),DD={class:"flex-1 flex flex-col min-h-0 py-6 space-y-6 h-full overflow-scroll [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden relative"},PD={class:"flex-1 space-y-6 pb-12"},RD={key:0,class:"text-sm bg-white/10 backdrop-blur-sm rounded-2xl p-4 border border-white/20 space-y-3"},MD=["innerHTML"],UD={key:1,class:"bg-white/5 backdrop-blur-sm rounded-2xl p-4 border border-white/10"},jD={class:"text-sm text-white/70 leading-relaxed"},LD={key:2,class:"space-y-3"},VD=["href"],FD={key:3,class:"space-y-3"},BD={class:"grid grid-cols-2 gap-3"},ZD=["href"],HD=Ae({__name:"ElAgentAbout",props:{agent:{},isOnline:{type:Boolean,default:!1}},setup(e){return(t,n)=>(v(),x("div",DD,[be(Nd,{agent:e.agent,"is-online":e.isOnline},null,8,["agent","is-online"]),y("div",PD,[e.agent.summary.value?(v(),x("div",RD,[n[0]||(n[0]=y("h3",{class:"font-medium text-white/50"}," About ",-1)),y("div",{class:"text-white/70 leading-relaxed",innerHTML:e.agent.summary.value},null,8,MD)])):Y("",!0),e.agent.entityType.value==="company"?(v(),x("div",UD,[n[1]||(n[1]=y("h3",{class:"text-sm font-medium text-white/90 mb-2"}," Company Info ",-1)),y("p",jD," This is a company agent representing "+ce(e.agent.name.value)+". ",1)])):Y("",!0),e.agent.email.value?(v(),x("div",LD,[n[3]||(n[3]=y("h3",{class:"text-sm font-medium text-white/90"}," Contact ",-1)),y("a",{href:`mailto:${e.agent.email.value}`,target:"_blank",rel:"noopener noreferrer",class:"relative inline-flex items-center justify-center gap-2 rounded-full px-4 py-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer bg-white/5 hover:bg-white/10 border border-white/10 text-white/80 text-sm justify-start h-10 w-full"},[...n[2]||(n[2]=[y("span",{class:"i-heroicons-envelope flex items-center size-[1.1em] mt-[-.07em]"},null,-1),xt(" Email ",-1)])],8,VD)])):Y("",!0),e.agent.accounts.value&&e.agent.accounts.value.length>0?(v(),x("div",FD,[n[4]||(n[4]=y("h3",{class:"text-sm font-medium text-white/90"}," Links ",-1)),y("div",BD,[(v(!0),x(ge,null,et(e.agent.accounts.value,i=>(v(),x("a",{key:`${i.platform}-${i.handle}`,href:Ie(Ki)[i.platform].getUrl(i.handle),target:"_blank",rel:"noopener noreferrer",class:"relative inline-flex items-center justify-center gap-2 rounded-full px-4 py-2 font-medium transition-colors duration-200 focus:outline-none active:opacity-80 cursor-pointer bg-white/10 hover:bg-white/20 border border-white/20 text-white/80 text-sm"},[y("span",{class:V(["flex items-center size-[1.1em] mt-[-.07em]",Ie(Ki)[i.platform].icon])},null,2),xt(" "+ce(Ie(Ki)[i.platform].label),1)],8,ZD))),128))])])):Y("",!0)])]))}}),KD={class:"flex flex-col items-center text-center gap-4"},WD={class:"relative flex-shrink-0"},GD={class:"w-20 h-20 sm:w-24 sm:h-24 rounded-full overflow-hidden border-4 border-white"},JD=["src","alt"],qD={class:"absolute top-1.5 right-1.5"},YD={key:1,class:"size-4 bg-theme-400 rounded-full ring-2 ring-white"},XD={class:"min-w-0"},QD={class:"text-3xl font-light text-white mb-2 truncate"},eP={class:"text-base font-light text-white/60 line-clamp-1"},tP=Ae({__name:"ElAgentHeader",props:{agent:{},isOnline:{type:Boolean,default:!1}},setup(e){return(t,n)=>(v(),x("div",KD,[y("div",WD,[y("div",GD,[y("img",{src:e.agent.avatarUrl.value,alt:e.agent.displayName.value,class:"w-full h-full object-cover",onError:n[0]||(n[0]=(...i)=>Ie(sl)&&Ie(sl)(...i))},null,40,JD)]),y("div",qD,[e.isOnline?(v(),x(ge,{key:0},[n[1]||(n[1]=y("div",{class:"size-4 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",style:{"animation-duration":"3s"}},null,-1)),n[2]||(n[2]=y("div",{class:"size-4 bg-green-500 rounded-full ring-2 ring-white"},null,-1))],64)):(v(),x("div",YD))])]),y("div",XD,[y("h1",QD,ce(e.agent.displayName.value),1),y("p",eP,ce(e.agent.title.value),1)])]))}}),rP={class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden"},nP=Ae({name:"SelfSidebarClose",__name:"AgentSidebarClose",emits:["click"],setup(e){let t=G(!1);return It(()=>{setTimeout(()=>{t.value=!0},100)}),(n,i)=>(v(),x("a",{class:"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",onClick:i[0]||(i[0]=r=>n.$emit("click",r))},[i[1]||(i[1]=y("span",{class:"absolute inset-0 rounded-full transition-all"},null,-1)),y("span",rP,[y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 rotate-45":"translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.15s"}},null,2),y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 -rotate-45":"-translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.45s"}},null,2)])]))}}),iP={key:0,class:"px-9 pt-12 pb-4"},oP={class:"text-base font-medium text-theme-400"},aP={key:1,class:"px-4 pb-8 border-b border-white/10"},sP=["disabled","onClick"],lP={class:"flex items-center gap-3"},cP={class:"flex-1"},uP={key:0,class:"text-xs text-white/50 mt-0.5"},dP={class:"p-6"},N2=Ae({name:"ElSidebar",inheritAttrs:!1,__name:"ElSidebar",props:{modelValue:{type:Boolean},items:{},position:{},title:{},widthClasses:{}},emits:["update:modelValue"],setup(e,{emit:t}){let n=e,i=t,r=n.position||"left",o=n.widthClasses||"w-[80%] max-w-[300px]",a=N({get:()=>n.modelValue,set:d=>i("update:modelValue",d)}),s=N(()=>n.items.filter(d=>!d.isHidden));function c(d){d.isDisabled||(d.onClick?d.onClick({item:d,event:new MouseEvent("click")}):d.href&&(d.href.includes("http")?window.open(d.href,d.target||"_self")?.focus():window.location.href=d.href),a.value=!1)}let u=N(()=>r==="left"?{enter:"-translate-x-full",leave:"-translate-x-full",position:"justify-start",closeButton:"-right-16"}:{enter:"translate-x-full",leave:"translate-x-full",position:"justify-end",closeButton:"-left-16"});return(d,p)=>(v(),x(ge,null,[be(ni,{"enter-active-class":"transition-opacity duration-300 ease-out","leave-active-class":"transition-opacity duration-200 ease-in","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:bt(()=>[a.value?(v(),x("div",{key:0,class:"absolute inset-0 z-40 bg-black/50 backdrop-blur-sm",onClick:p[0]||(p[0]=m=>a.value=!1)})):Y("",!0)]),_:1}),be(ni,{"enter-active-class":"transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)]","leave-active-class":"transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]","enter-from-class":u.value.enter,"enter-to-class":"translate-x-0","leave-from-class":"translate-x-0","leave-to-class":u.value.leave},{default:bt(()=>[a.value?(v(),x("div",{key:0,class:V(["absolute inset-0 z-50 flex",u.value.position]),onClick:p[3]||(p[3]=m=>a.value=!1)},[y("div",{class:V(["relative h-full shadow-2xl bg-black/30 backdrop-blur-xl flex flex-col justify-center",Ie(o)]),onClick:p[2]||(p[2]=_t(()=>{},["stop"]))},[be(nP,{class:V(["absolute top-4 z-10 text-white",u.value.closeButton]),onClick:p[1]||(p[1]=m=>a.value=!1)},null,8,["class"]),e.title?(v(),x("div",iP,[y("h3",oP,ce(e.title),1)])):Y("",!0),d.$slots.header?(v(),x("div",aP,[er(d.$slots,"header")])):Y("",!0),y("div",{class:V(["flex-1 p-6 space-y-2 overflow-y-auto",{"pt-6":!e.title&&!d.$slots.header,"pt-4":e.title||d.$slots.header}])},[be(_0,{"enter-active-class":"transition-all duration-400 ease-[cubic-bezier(0.25,1,0.33,1)]","leave-active-class":"transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)]","enter-from-class":Ie(r)==="left"?"-translate-x-4 opacity-0":"translate-x-4 opacity-0","enter-to-class":"translate-x-0 opacity-100","leave-from-class":"translate-x-0 opacity-100","leave-to-class":Ie(r)==="left"?"-translate-x-4 opacity-0":"translate-x-4 opacity-0"},{default:bt(()=>[(v(!0),x(ge,null,et(s.value,(m,f)=>(v(),x("button",{key:m.key||m.label||f,style:we({transitionDelay:`${f*40}ms`}),class:V(["cursor-pointer w-full text-left p-3 rounded-xl transition-all duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group",[m.isActive?"bg-primary-500/20 border border-primary-500/40":"hover:bg-white/10",m.isDisabled&&"opacity-50 cursor-not-allowed"]]),disabled:m.isDisabled,onClick:S=>c(m)},[y("div",lP,[m.icon?.src?(v(),x("i",{key:0,class:V(["size-5 flex-shrink-0 transition-transform duration-200 ease-[cubic-bezier(0.25,1,0.33,1)] group-hover:scale-110",[m.icon.src,m.isActive?"text-primary-400":"text-white/70 group-hover:text-white"]])},null,2)):Y("",!0),y("div",cP,[y("div",{class:V(["font-medium text-sm",m.isActive?"text-primary-300":"text-white"])},ce(m.label),3),m.subLabel?(v(),x("div",uP,ce(m.subLabel),1)):Y("",!0)])])],14,sP))),128))]),_:1},8,["enter-from-class","leave-to-class"])],2),y("div",dP,[er(d.$slots,"footer")])],2)],2)):Y("",!0)]),_:3},8,["enter-from-class","leave-to-class"])],64))}}),pP=Ae({name:"AgentModeSidebar",__name:"ElAgentModeSidebar",props:{modelValue:{type:Boolean},chatController:{}},emits:["update:modelValue"],setup(e,{emit:t}){let n=e,i=t,r=N({get:()=>n.modelValue,set:s=>i("update:modelValue",s)}),o=N(()=>n.chatController?.agentMode?.value??"self"),a=N(()=>zb.map(s=>({key:s.mode,icon:{src:s.icon},label:s.label,isActive:o.value===s.mode,onClick:()=>{n.chatController?.setMode(s.mode)}})));return(s,c)=>(v(),Fe(N2,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=u=>r.value=u),items:a.value,position:"right",title:"Mode","width-classes":"w-[80%] max-w-[255px]"},null,8,["modelValue","items"]))}}),mP=Ae({name:"AgentSidebar",__name:"ElAgentSidebar",props:{modelValue:{type:Boolean},agent:{},sdk:{},title:{}},emits:["update:modelValue"],setup(e,{emit:t}){let n=e,i=t,r=N({get:()=>n.modelValue,set:a=>i("update:modelValue",a)}),o=N(()=>{let a=[{key:"share",icon:{src:"i-tabler-share"},label:"Share this assistant",onClick:()=>{let s=`${window.location.origin}/@${n.agent.handle.value||n.agent.agentId.value}`;navigator.clipboard.writeText(s).catch(c=>{console.error("ElAgentSidebar: clipboard.writeText rejected",c)})}},{key:"profile",icon:{src:"i-tabler-user"},label:"View full profile",onClick:()=>{window.open(`/@${n.agent.handle.value||n.agent.agentId.value}`,"_blank")}},{key:"create",icon:{src:"i-tabler-sparkles"},label:"Create your own",onClick:()=>{window.open("/auth","_blank")}}];return n.sdk.activeUser.value&&a.push({key:"logout",icon:{src:"i-tabler-logout"},label:"Logout",onClick:async()=>{await n.sdk.auth.logout()}}),a});return(a,s)=>(v(),Fe(N2,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=c=>r.value=c),items:o.value,position:"left",title:e.title||"Menu"},null,8,["modelValue","items","title"]))}}),fP={key:0,class:"absolute inset-0 flex items-center justify-center bg-gradient-to-br from-theme-800 to-theme-950 rounded-3xl z-10"},hP=["data-quality"],gP={key:0,class:"flex flex-1 items-center gap-3 pl-2"},vP=["src","alt"],bP={class:"text-sm font-medium text-white/90"},yP={key:1,class:"flex justify-end"},xP={class:"text-sm"},wP={key:0,class:"flex-1 basis-0 flex justify-end"},kP={key:0,class:"h-full pb-12 flex-1 flex flex-col relative z-20 min-h-0 px-4 @[480px]/agent:px-6 max-w-md mx-auto w-full"},_P={class:"flex-1 basis-0 flex flex-col justify-start pt-8 gap-7"},$P={key:0,class:"flex items-center justify-center gap-3"},SP=["href"],EP={key:1,class:"flex-1 flex flex-col relative z-20 min-h-0 w-full gap-4 px-4"},IP={class:"max-w-md mx-auto"},TP={key:2,class:"flex-1 flex flex-col relative z-20 min-h-0 w-full px-4 @[480px]/agent:px-6"},zP={class:"flex-1 min-h-0 max-w-md mx-auto w-full"},NP={key:2,class:"bg-gradient-to-br from-theme-800 to-theme-950 text-white flex items-center justify-center h-full p-8"},CP={class:"text-center max-w-md space-y-4"},AP={class:"text-sm text-white/70 leading-relaxed"},OP={key:3,class:"bg-white/10 backdrop-blur-sm text-white/70 flex items-center justify-center h-full"},DP=Ae({__name:"AgentChat",props:{sdk:{},agent:{},context:{},firstMessage:{},buttonText:{},buttonIcon:{},hasClose:{type:Boolean,default:!1},isActive:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},theme:{default:"green"},requireAuth:{type:Boolean,default:!1},chatOnly:{type:Boolean,default:!1},bare:{type:Boolean,default:!1},emptyStateMessage:{},createVoiceClientFn:{type:Function}},emits:["close","error","turnStarted","turnCompleted"],setup(e,{emit:t}){let n=t,i=Ye(),r=G(!1),o=G(!1),a=G(),s=G(),c=N(()=>i.value?.agentMode?.value??"self"),u=N(()=>i.value?.textState.value.isConnected??!1),d=N(()=>e.sdk.activeUser.value!==void 0),p=N(()=>zb.find(D=>D.mode===c.value));function m(){i.value&&i.value.destroy();try{i.value=new ll({sdk:e.sdk,agent:e.agent,context:e.context,firstMessage:e.firstMessage,...e.createVoiceClientFn?{createVoiceClientFn:e.createVoiceClientFn}:{},onTurnStarted:()=>n("turnStarted"),onTurnCompleted:D=>n("turnCompleted",D)})}catch(D){throw console.error("AgentChatController creation failed:",D),D}}try{m()}catch(D){let U=D instanceof Error?D.message:"Couldn't initialize your assistant";a.value=U,n("error",U)}function f(D){if(!s.value)return;let U=av(D);Object.entries(U).forEach(([$,B])=>{s.value.style.setProperty(`--primary-${$}`,B)})}It(()=>{try{f(e.theme),e.chatOnly&&i.value&&i.value.setMode("chat")}catch(D){let U=D instanceof Error?D.message:"Couldn't initialize your assistant";a.value=U,n("error",U)}}),rn(()=>{i.value&&i.value.destroy()}),lt(()=>e.theme,D=>{f(D)}),lt(()=>e.sdk.activeUser.value,(D,U)=>{U&&!D&&i.value&&i.value.setMode("self")});let S=N(()=>!!(e.agent.cover.value?.src&&e.agent.cover.value?.quality==="low")||!!(e.agent.avatar.value?.src&&e.agent.avatar.value?.quality==="low")),z=N(()=>{let D=[S.value?"backdrop-blur-sm":""];return S.value&&c.value==="self"?D.push("from-black/80 via-black/60 to-black/80"):c.value==="self"?D.push("from-black/70 via-black/50 to-black/80"):D.push("from-black/90 via-black/90 to-black/100"),D.join(" ")}),T={phone:"i-heroicons-phone",calendar:"i-heroicons-calendar",question:"i-heroicons-question-mark-circle",message:"i-heroicons-chat-bubble-left-right",sparkles:"i-heroicons-sparkles"},L=N(()=>u2({template:e.buttonText||"Talk to {name}",agent:e.agent.toConfig()})),j=N(()=>T[e.buttonIcon||"phone"]||T.phone);return(D,U)=>(v(),x("div",{ref_key:"rootElement",ref:s,key:Ie(da)(e.agent.toConfig()),class:"pagelines-sdk @container/agent pagelines-agent w-full h-full overflow-hidden relative","data-test":"agent-chat"},[e.loading?(v(),x("div",fP,[be(kd,{class:"text-white size-8"})])):e.agent&&!a.value?(v(),x("div",{key:1,class:V(["absolute inset-0",e.bare?"":"bg-cover bg-center bg-no-repeat"]),style:we(e.bare?void 0:{backgroundImage:`url(${Ie(da)(e.agent.toConfig())})`}),"data-quality":e.agent.avatar.value?.quality||"none"},[e.bare?Y("",!0):(v(),x("div",{key:0,class:V(["absolute inset-0 bg-gradient-to-br z-0",z.value])},null,2)),y("div",{class:V(["relative z-10 flex flex-col h-full transition-all duration-500 ease-[cubic-bezier(0.25,1,0.33,1)] will-change-transform",e.isActive?"opacity-100 translate-y-0":"opacity-0 translate-y-2"])},[!e.bare||e.hasClose?(v(),x("div",{key:0,class:V(["relative z-30 p-2",!e.bare&&c.value!=="self"?"backdrop-blur-lg":""])},[e.chatOnly?(v(),x("div",{key:0,class:V(["flex items-center",e.bare?"justify-end":""])},[e.bare?Y("",!0):(v(),x("div",gP,[y("img",{src:Ie(da)(e.agent.toConfig()),alt:e.agent.displayName.value,class:"size-8 rounded-full object-cover"},null,8,vP),y("span",bP,ce(e.agent.displayName.value),1)])),e.hasClose?(v(),x("div",yP,[y("button",{class:V(["flex cursor-pointer items-center rounded-2xl p-3 transition-colors",e.bare?"text-theme-500 hover:bg-theme-50":"text-white/70 hover:bg-white/10"]),onClick:U[0]||(U[0]=_t($=>n("close","button"),["stop"]))},[...U[7]||(U[7]=[y("i",{class:"size-6 i-tabler-x"},null,-1)])],2)])):Y("",!0)],2)):(v(),x("div",{key:1,class:V(["flex items-center",e.hasClose?"":"justify-between"])},[y("div",{class:V(e.hasClose?"flex-1 basis-0":"")},[y("button",{class:"cursor-pointer p-2 flex items-center gap-2 rounded-2xl text-white/70 hover:bg-white/10 transition-all duration-300 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-105 active:scale-95",onClick:U[1]||(U[1]=$=>r.value=!0)},[...U[8]||(U[8]=[y("i",{class:"i-tabler-menu size-7"},null,-1)])])],2),y("button",{class:V(["flex items-center gap-2 px-3.5 py-3 rounded-2xl text-white/90 hover:bg-white/10 transition-all cursor-pointer flex-grow-0",{"bg-white/10":o.value}]),onClick:U[2]||(U[2]=$=>o.value=!0)},[y("i",{class:V([p.value?.icon,"size-4 opacity-60"])},null,2),y("span",xP,ce(p.value?.label),1),U[9]||(U[9]=y("i",{class:"i-tabler-chevron-down size-4"},null,-1))],2),e.hasClose?(v(),x("div",wP,[y("button",{class:"cursor-pointer flex items-center p-3 rounded-2xl text-white/70 hover:bg-white/10 transition-colors",onClick:U[3]||(U[3]=_t($=>n("close","button"),["stop"]))},[...U[10]||(U[10]=[y("i",{class:"size-6 i-tabler-x"},null,-1)])])])):Y("",!0)],2))],2)):Y("",!0),e.chatOnly?(v(),x("div",{key:1,class:V(["relative z-20 flex min-h-0 w-full flex-1 flex-col",e.bare?"":"px-4"])},[y("div",{class:V(["min-h-0 w-full flex-1",e.bare?"":"mx-auto max-w-md"])},[be(Hi,{"chat-controller":i.value,agent:e.agent,scope:d.value?"private":"public","empty-state-message":e.emptyStateMessage,variant:e.bare?"light":"dark","show-header":!e.bare,centered:e.bare},c0({_:2},[D.$slots["empty-heading"]?{name:"empty-heading",fn:bt($=>[er(D.$slots,"empty-heading",Lo(qo($)))]),key:"0"}:void 0]),1032,["chat-controller","agent","scope","empty-state-message","variant","show-header","centered"])],2)],2)):(v(),x(ge,{key:2},[c.value==="self"?(v(),x("div",kP,[U[11]||(U[11]=y("div",{class:"flex-1 basis-0 mb-12"},null,-1)),be(tP,{agent:e.agent,"is-online":u.value},null,8,["agent","is-online"]),y("div",_P,[be(pa,{theme:"primary",size:"lg",class:"w-full",icon:j.value,"data-test":"voice-button",onClick:U[4]||(U[4]=$=>i.value?.setMode("talk"))},{default:bt(()=>[xt(ce(L.value),1)]),_:1},8,["icon"]),e.agent.accounts.value&&e.agent.accounts.value.length>0?(v(),x("div",$P,[(v(!0),x(ge,null,et((e.agent.accounts.value||[]).filter($=>Ie(Ki)[$.platform]),$=>(v(),x("a",{key:`${$.platform}-${$.handle}`,href:Ie(Ki)[$.platform].getUrl($.handle),target:"_blank",class:"size-12 rounded-full text-white/60 hover:text-white hover:bg-white/5 border border-white/0 hover:border-white/10 flex items-center justify-center transition-all duration-200 hover:scale-105"},[y("i",{class:V([Ie(Ki)[$.platform].icon,"size-5"])},null,2)],8,SP))),128))])):Y("",!0)])])):c.value==="talk"?(v(),x("div",EP,[e.requireAuth&&!d.value?(v(),Fe(z2,{key:0,sdk:e.sdk},null,8,["sdk"])):(v(),x(ge,{key:1},[y("div",null,[y("div",IP,[be(Nd,{agent:e.agent,"is-online":u.value},null,8,["agent","is-online"])])]),be(Hi,{"chat-controller":i.value,agent:e.agent},null,8,["chat-controller","agent"])],64))])):(v(),x("div",TP,[y("div",zP,[c.value==="chat"?(v(),x(ge,{key:0},[e.requireAuth&&!d.value?(v(),Fe(z2,{key:0,sdk:e.sdk},null,8,["sdk"])):(v(),Fe(Hi,{key:1,"chat-controller":i.value,agent:e.agent,"show-header":""},null,8,["chat-controller","agent"]))],64)):c.value==="info"?(v(),Fe(HD,{key:1,agent:e.agent,"is-online":u.value},null,8,["agent","is-online"])):Y("",!0)])]))],64))],2)],14,hP)):a.value?(v(),x("div",NP,[y("div",CP,[U[12]||(U[12]=y("div",{class:"flex justify-center"},[y("div",{class:"rounded-full bg-red-500/20 flex items-center justify-center size-10"},[y("i",{class:"i-tabler-alert-circle size-6 text-red-400"})])],-1)),U[13]||(U[13]=y("h3",{class:"text-lg font-medium"}," Agent Error ",-1)),y("p",AP,ce(a.value),1)])])):(v(),x("div",OP," Couldn't load your assistant. Please try again later. ")),e.chatOnly?Y("",!0):(v(),Fe(mP,{key:4,modelValue:r.value,"onUpdate:modelValue":U[5]||(U[5]=$=>r.value=$),agent:e.agent,sdk:e.sdk,title:e.agent.displayName.value,"data-test":"agent-sidebar"},null,8,["modelValue","agent","sdk","title"])),e.chatOnly?Y("",!0):(v(),Fe(pP,{key:5,modelValue:o.value,"onUpdate:modelValue":U[6]||(U[6]=$=>o.value=$),"chat-controller":i.value,"data-test":"agent-mode-sidebar"},null,8,["modelValue","chat-controller"]))]))}}),Pd=Ae({__name:"AgentProvider",props:{sdk:{},agent:{},handle:{},context:{},clientContext:{},firstMessage:{},buttonText:{},buttonIcon:{},hasClose:{type:Boolean},chatOnly:{type:Boolean},bare:{type:Boolean},apiBase:{},emptyStateMessage:{}},emits:["close","error","turnStarted","turnCompleted"],setup(e,{emit:t}){let n=e,i=t;return(r,o)=>(v(),Fe(Od,h0(n,{class:"agent-provider size-full relative"}),{default:bt(a=>[be(DP,{sdk:a.sdk,agent:a.agent,context:a.context,"first-message":a.firstMessage,"button-text":n.buttonText,"button-icon":n.buttonIcon,"has-close":n.hasClose,"chat-only":n.chatOnly,bare:n.bare,"empty-state-message":n.emptyStateMessage,"is-active":!0,class:"size-full",onClose:o[0]||(o[0]=s=>i("close",s)),onError:o[1]||(o[1]=s=>i("error",s)),onTurnStarted:o[2]||(o[2]=s=>i("turnStarted")),onTurnCompleted:o[3]||(o[3]=s=>i("turnCompleted",s))},c0({_:2},[r.$slots["empty-heading"]?{name:"empty-heading",fn:bt(s=>[er(r.$slots,"empty-heading",Lo(qo(s)))]),key:"0"}:void 0]),1032,["sdk","agent","context","first-message","button-text","button-icon","has-close","chat-only","bare","empty-state-message"])]),_:3},16))}})});var C2={};Nr(C2,{default:()=>PP});var PP,A2=O(()=>{"use strict";mn();Vb();Dd();Nn();PP=Ae({__name:"AgentWidgetInline",props:{sdk:{},handle:{},agent:{},context:{},firstMessage:{},buttonText:{},buttonIcon:{},chatOnly:{type:Boolean}},setup(e,{expose:t}){let{currentAgent:n,currentContext:i,currentFirstMessage:r,currentButtonText:o,currentButtonIcon:a,update:s}=fa(e);return t({update:s}),(c,u)=>(v(),Fe(Pd,{sdk:e.sdk,handle:e.handle,agent:Ie(n),context:Ie(i),"first-message":Ie(r),"button-text":Ie(o),"button-icon":Ie(a),"chat-only":e.chatOnly},null,8,["sdk","handle","agent","context","first-message","button-text","button-icon","chat-only"]))}})});var O2={};Nr(O2,{default:()=>BP});var RP,MP,UP,jP,LP,VP,FP,BP,D2=O(()=>{"use strict";mn();Vb();Dd();Nn();RP=["aria-label"],MP={class:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[28px] h-[28px] overflow-hidden"},UP=Ae({name:"FClose",__name:"FClose",props:{ariaLabel:{}},emits:["click"],setup(e){let t=G(!1);return It(()=>{setTimeout(()=>{t.value=!0},100)}),(n,i)=>(v(),x("button",{type:"button","aria-label":e.ariaLabel||"Close",class:"close block cursor-pointer w-[60px] h-[60px] rounded-full transition-all duration-1000 ease-[cubic-bezier(0.25,1,0.33,1)] hover:scale-110 active:scale-90 hover:rotate-90",onClick:i[0]||(i[0]=r=>n.$emit("click",r))},[i[1]||(i[1]=y("span",{class:"absolute inset-0 rounded-full transition-all"},null,-1)),y("span",MP,[y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 rotate-45":"translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.15s"}},null,2),y("span",{class:V(["absolute h-full w-[3px] rounded-[5px] left-[13px] transition-all duration-[400ms] ease-[cubic-bezier(0.52,0.01,0.16,1)]",t.value?"translate-y-0 translate-x-0 -rotate-45":"-translate-y-[30px] -translate-x-[30px] rotate-0"]),style:{"background-color":"currentColor","transition-delay":"0.45s"}},null,2)])],8,RP))}}),jP={class:"flex min-h-full items-center justify-center text-center p-4"},LP={key:0,class:"text-base p-4 font-semibold"},VP={key:1,class:"flex items-center gap-2 px-2"},FP=Ae({inheritAttrs:!1,name:"FModal",__name:"FModal",props:{vis:{type:Boolean,default:!1},modalClass:{},styleClass:{},fullScreen:{type:Boolean,default:!1},hasClose:{type:Boolean,default:!1},title:{default:""},transitionMode:{default:"modal"},teleportTo:{default:"body"},disableTeleport:{type:Boolean,default:!1}},emits:["update:vis","close","escape"],setup(e,{emit:t}){let n=t,i=G(!1);function r(d){let{reason:p}=d;n("update:vis",!1),n("close",!0),p==="escape"&&n("escape",!0)}let o=N(()=>{let d=e.modalClass?[e.modalClass]:["max-w-screen-md p-24"],p=e.styleClass?[e.styleClass]:["bg-theme-0","shadow-xl"];return e.fullScreen?d.push("fixed inset-0"):d.push("rounded-2xl"),["relative","text-left","transform","transition-all","w-full","overflow-hidden",...d,...p]}),a=G(!1),s=[];function c(d){d.key==="Escape"&&e.vis&&r({reason:"escape"})}It(async()=>{i.value=!0;let d=lt(()=>e.vis,p=>{p?setTimeout(()=>a.value=!0,300):a.value=!1},{immediate:!0});s.push(d),typeof document<"u"&&(document.addEventListener("keydown",c),s.push(()=>document.removeEventListener("keydown",c)))}),rn(()=>{s.forEach(d=>d())});let u=N(()=>e.transitionMode==="slideUp"?{enterActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",enterFromClass:"opacity-0 translate-y-full scale-95",enterToClass:"opacity-100 translate-y-0 scale-100",leaveActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",leaveFromClass:"opacity-100 translate-y-0 scale-100",leaveToClass:"opacity-0 translate-y-full scale-95"}:{enterActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",enterFromClass:"opacity-0 scale-75",enterToClass:"opacity-100 translate-y-0 scale-100",leaveActiveClass:"ease-[cubic-bezier(0.25,1,0.33,1)] duration-500",leaveFromClass:"opacity-100 translate-y-0 scale-100",leaveToClass:"opacity-0 scale-75"});return(d,p)=>i.value?(v(),Fe(N1,{key:0,to:e.teleportTo,disabled:e.disableTeleport},[y("div",{class:V(["fixed inset-0 z-50",e.vis?"":"pointer-events-none"]),"aria-labelledby":"modal-title",role:"dialog","aria-modal":"true"},[be(ni,{"enter-active-class":"ease-out duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:bt(()=>[e.vis?(v(),x("div",{key:0,class:"fixed inset-0 bg-theme-800/60 active:bg-theme-800/80 cursor-pointer dark:bg-theme-600/90 backdrop-blur-sm transition-opacity",onClick:p[0]||(p[0]=m=>r({reason:"escape"}))})):Y("",!0)]),_:1}),y("div",{class:"fixed inset-0 z-40 overflow-y-auto overscroll-contain no-scrollbar",onClick:p[3]||(p[3]=m=>r({reason:"escape"}))},[y("div",jP,[be(ni,Lo(qo(u.value)),{default:bt(()=>[e.vis?(v(),x("div",{key:0,class:V([o.value,"w-full"]),onClick:p[2]||(p[2]=_t(()=>{},["stop"]))},[e.hasClose||e.title||d.$slots.actions?(v(),x("div",{key:0,class:V(!e.title&&(e.hasClose||d.$slots.actions)?"absolute top-0 right-0 z-10":"flex justify-between items-center")},[e.title?(v(),x("h2",LP,ce(e.title),1)):Y("",!0),e.hasClose||d.$slots.actions?(v(),x("div",VP,[er(d.$slots,"actions"),e.hasClose?(v(),Fe(UP,{key:0,class:"relative","data-test-id":"close-modal",onClick:p[1]||(p[1]=_t(m=>r({reason:"escape"}),["stop"]))})):Y("",!0)])):Y("",!0)],2)):Y("",!0),er(d.$slots,"default")],2)):Y("",!0)]),_:3},16)])])],2)],8,["to","disabled"])):Y("",!0)}}),BP=Ae({__name:"AgentWidgetModal",props:{sdk:{},handle:{},agent:{},context:{},firstMessage:{},buttonText:{},buttonIcon:{},chatOnly:{type:Boolean},onClose:{type:Function}},setup(e,{expose:t}){let n=e,{currentAgent:i,currentContext:r,currentFirstMessage:o,currentButtonText:a,currentButtonIcon:s,update:c}=fa(n),u=G(!1);It(async()=>{await Ri(),setTimeout(()=>{u.value=!0},10)});function d(){u.value=!1,setTimeout(()=>{n.onClose&&n.onClose()},300)}function p(){u.value=!0}return t({update:c,close:d,open:p}),(m,f)=>(v(),Fe(FP,{vis:u.value,"disable-teleport":!0,"modal-class":"max-w-4xl h-[80vh] md:h-[600px]","has-close":!1,"onUpdate:vis":f[0]||(f[0]=S=>u.value=S),onClose:d},{default:bt(()=>[be(Pd,{sdk:e.sdk,handle:e.handle,agent:Ie(i),context:Ie(r),"first-message":Ie(o),"button-text":Ie(a),"button-icon":Ie(s),"chat-only":e.chatOnly,"has-close":!0,onClose:d},null,8,["sdk","handle","agent","context","first-message","button-text","button-icon","chat-only"])]),_:1},8,["vis"]))}})});mn();ub();Lb();Dd();Ys();Nn();var ZP=`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
176
176
  @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;--font-mono:"DM Mono", "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;--color-red-300:#ffa3a3;--color-red-400:#ff6568;--color-red-500:#fb2c36;--color-red-600:#e40014;--color-amber-500:#f99c00;--color-green-300:#7bf1a8;--color-green-400:#05df72;--color-green-500:#00c758;--color-green-600:#00a544;--color-slate-200:#e2e8f0;--color-slate-950:#020618;--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-md:48rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-4xl:56rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-light:300;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-lg:16px;--blur-xl:24px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-theme-0:var(--theme-0,#fff);--color-theme-25:var(--theme-25,#f8fafc);--color-theme-50:var(--theme-50,#f3f4f6);--color-theme-100:var(--theme-100,#e5e7eb);--color-theme-200:var(--theme-200,#d1d5db);--color-theme-300:var(--theme-300,#9ca3af);--color-theme-400:var(--theme-400,#6b7280);--color-theme-500:var(--theme-500,#4b5563);--color-theme-600:var(--theme-600,#374151);--color-theme-700:var(--theme-700,#1f2a44);--color-theme-800:var(--theme-800,#111827);--color-theme-900:var(--theme-900,#0c0a13);--color-theme-950:var(--theme-950,#030712);--color-primary-300:var(--primary-300,#60a5fa);--color-primary-400:var(--primary-400,#3b82f6);--color-primary-500:var(--primary-500,#2563eb);--color-primary-600:var(--primary-600,#1d4ed8)}@supports (color:color(display-p3 0 0 0)){:root,:host{--color-red-300:color(display-p3 .956922 .651886 .645122);--color-red-400:color(display-p3 .933534 .431676 .423491);--color-red-500:color(display-p3 .903738 .262579 .253307);--color-red-600:color(display-p3 .830323 .140383 .133196);--color-amber-500:color(display-p3 .93994 .620584 .0585367);--color-green-300:color(display-p3 .600292 .935514 .68114);--color-green-400:color(display-p3 .399536 .862346 .49324);--color-green-500:color(display-p3 .308734 .774754 .374307);--color-green-600:color(display-p3 .243882 .640824 .294808);--color-slate-200:color(display-p3 .890322 .909405 .939294);--color-slate-950:color(display-p3 .0102437 .0227555 .0878731)}}@supports (color:lab(0% 0 0)){:root,:host{--color-red-300:lab(76.5514% 36.422 15.5335);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-500:lab(55.4814% 75.0732 48.8528);--color-red-600:lab(48.4493% 77.4328 61.5452);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-green-300:lab(86.9953% -47.2691 25.0054);--color-green-400:lab(78.503% -64.9265 39.7492);--color-green-500:lab(70.5521% -66.5147 45.8073);--color-green-600:lab(59.0978% -58.6621 41.2579);--color-slate-200:lab(91.7353% -.998765 -4.76968);--color-slate-950:lab(1.76974% 1.32743 -9.28855)}}}@layer base{*,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::-webkit-file-upload-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::-webkit-file-upload-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:-webkit-any([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:-webkit-any([multiple],[size])) optgroup option{padding-inline-start:20px}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::-webkit-file-upload-button{margin-inline-end:4px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-year-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-month-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-day-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-hour-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-minute-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-second-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-millisecond-field{padding-block-start:0;padding-block-end:0}::-webkit-datetime-edit-meridiem-field{padding-block-start:0;padding-block-end:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button{-webkit-appearance:button;appearance:button}input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;appearance:button}::-webkit-file-upload-button{-webkit-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.\\@container\\/agent{container:agent/inline-size}.\\@container\\/chat{container:chat/inline-size}.\\@container\\/chat-preview{container:chat-preview/inline-size}.\\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{top:0;bottom:0;left:0;right:0}.inset-x-0{left:0;right:0}.-top-1\\.5{top:calc(var(--spacing) * -1.5)}.top-0{top:0}.top-0\\.5{top:calc(var(--spacing) * .5)}.top-1{top:var(--spacing)}.top-1\\.5{top:calc(var(--spacing) * 1.5)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing) * 4)}.top-6{top:calc(var(--spacing) * 6)}.top-\\[5\\%\\]{top:5%}.-right-1\\.5{right:calc(var(--spacing) * -1.5)}.-right-16{right:calc(var(--spacing) * -16)}.right-0{right:0}.right-0\\.5{right:calc(var(--spacing) * .5)}.right-1{right:var(--spacing)}.right-1\\.5{right:calc(var(--spacing) * 1.5)}.right-4{right:calc(var(--spacing) * 4)}.right-6{right:calc(var(--spacing) * 6)}.right-\\[5\\%\\]{right:5%}.-bottom-\\[3\\%\\]{bottom:-3%}.bottom-0{bottom:0}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-6{bottom:calc(var(--spacing) * 6)}.-left-16{left:calc(var(--spacing) * -16)}.-left-\\[3\\%\\]{left:-3%}.left-0{left:0}.left-1\\/2{left:50%}.left-4{left:calc(var(--spacing) * 4)}.left-6{left:calc(var(--spacing) * 6)}.left-\\[13px\\]{left:13px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[999999\\]{z-index:999999}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline-start:auto;margin-inline-end:auto}.my-2{margin-block:calc(var(--spacing) * 2)}.my-6{margin-block:calc(var(--spacing) * 6)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-\\[-\\.07em\\]{margin-top:-.07em}.-mr-1{margin-right:calc(var(--spacing) * -1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.mb-12{margin-bottom:calc(var(--spacing) * 12)}.-ml-2{margin-left:calc(var(--spacing) * -2)}.ml-1\\.5{margin-left:calc(var(--spacing) * 1.5)}.i-heroicons-calendar{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-heroicons-chat-bubble-left-right{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193q-.51.041-1.02.072v3.091l-3-3q-2.031 0-4.02-.163a2.1 2.1 0 0 1-.825-.242m9.345-8.334a2 2 0 0 0-.476-.095a48.6 48.6 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.5 48.5 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402c-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235q.865.113 1.74.194V21l4.155-4.155'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-heroicons-envelope{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-heroicons-phone{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.04 12.04 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5z'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-heroicons-question-mark-circle{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M9.879 7.519c1.172-1.025 3.071-1.025 4.243 0c1.171 1.025 1.171 2.687 0 3.712q-.308.268-.67.442c-.746.361-1.452.999-1.452 1.827v.75M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9 5.25h.008v.008H12z'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-heroicons-sparkles{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09m8.445-7.188L18 9.75l-.259-1.035a3.38 3.38 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.38 3.38 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.38 3.38 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.38 3.38 0 0 0-2.456 2.456m-1.365 11.852L16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183l.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394l-1.183.394a2.25 2.25 0 0 0-1.423 1.423'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-simple-icons-facebook{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978c.401 0 .955.042 1.468.103a9 9 0 0 1 1.141.195v3.325a9 9 0 0 0-.653-.036a27 27 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.7 1.7 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103l-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-simple-icons-instagram{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.9 5.9 0 0 0-2.124 1.388a5.9 5.9 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076s-.069 1.688-.063 4.947s.021 3.667.083 4.947c.061 1.277.264 2.149.563 2.911c.308.789.72 1.457 1.388 2.123a5.9 5.9 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552c1.278.056 1.689.069 4.947.063s3.668-.021 4.947-.082c1.28-.06 2.147-.265 2.91-.563a5.9 5.9 0 0 0 2.123-1.388a5.9 5.9 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912c.056-1.28.07-1.69.063-4.948c-.006-3.258-.02-3.667-.081-4.947c-.06-1.28-.264-2.148-.564-2.911a5.9 5.9 0 0 0-1.387-2.123a5.9 5.9 0 0 0-2.128-1.38c-.764-.294-1.636-.496-2.914-.55C15.647.009 15.236-.006 11.977 0S8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.7 3.7 0 0 1-1.382-.895a3.7 3.7 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228c-.06-1.264-.072-1.644-.08-4.848c-.006-3.204.006-3.583.061-4.848c.05-1.169.246-1.805.408-2.228c.216-.561.477-.96.895-1.382a3.7 3.7 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417c1.265-.06 1.644-.072 4.848-.08c3.203-.006 3.583.006 4.85.062c1.168.05 1.804.244 2.227.408c.56.216.96.475 1.382.895s.681.817.9 1.378c.165.422.362 1.056.417 2.227c.06 1.265.074 1.645.08 4.848c.005 3.203-.006 3.583-.061 4.848c-.051 1.17-.245 1.805-.408 2.23c-.216.56-.477.96-.896 1.38a3.7 3.7 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418c-1.266.06-1.645.072-4.85.079s-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442a1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024a6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16A4 4 0 0 1 8 12.008'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-simple-icons-linkedin{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-simple-icons-threads{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M18.263 11.097c-.03-3.486-1.92-5.586-5.111-5.586c-2.13 0-3.922.963-4.863 2.499l2.062 1.438c.535-.843 1.272-1.543 2.628-1.543c1.528 0 2.318.85 2.544 2.431a15 15 0 0 0-2.236-.173c-4.125 0-6.068 1.867-6.068 4.336s1.943 3.99 4.804 3.99c3.139 0 5.013-2.115 5.781-4.735c.798.361 1.348 1.204 1.348 2.47c0 3.387-3.907 5.232-7.22 5.232c-4.885 0-8.077-3.207-8.077-8.424c0-6.392 4.223-10.487 9.9-10.487c3.808 0 5.69 1.671 6.97 3.914l2.108-1.475C21.44 2.078 18.331 0 13.663 0C6.227 0 1.168 5.277 1.168 12.934c0 7 4.953 11.066 10.856 11.066c4.878 0 9.809-2.846 9.809-7.716c0-2.545-1.46-4.231-3.569-5.187m-6.33 4.855c-1.077 0-2.026-.512-2.026-1.453c0-1.483 1.822-1.934 3.606-1.934c.678 0 1.34.045 1.927.173c-.422 1.927-1.671 3.215-3.508 3.214Z'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-simple-icons-tiktok{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12.525.02c1.31-.02 2.61-.01 3.91-.02c.08 1.53.63 3.09 1.75 4.17c1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97c-.57-.26-1.1-.59-1.62-.93c-.01 2.92.01 5.84-.02 8.75c-.08 1.4-.54 2.79-1.35 3.94c-1.31 1.92-3.58 3.17-5.91 3.21c-1.43.08-2.86-.31-4.08-1.03c-2.02-1.19-3.44-3.37-3.65-5.71c-.02-.5-.03-1-.01-1.49c.18-1.9 1.12-3.72 2.58-4.96c1.66-1.44 3.98-2.13 6.15-1.72c.02 1.48-.04 2.96-.04 4.44c-.99-.32-2.15-.23-3.02.37c-.63.41-1.11 1.04-1.36 1.75c-.21.51-.15 1.07-.14 1.61c.24 1.64 1.82 3.02 3.5 2.87c1.12-.01 2.19-.66 2.77-1.61c.19-.33.4-.67.41-1.06c.1-1.79.06-3.57.07-5.36c.01-4.03-.01-8.05.02-12.07'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-simple-icons-x{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M14.234 10.162L22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299l-.929-1.329L3.076 1.56h3.182l5.965 8.532l.929 1.329l7.754 11.09h-3.182z'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-svg-spinners-90-ring-with-bg{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath fill='black' d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-svg-spinners-ring-resize{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg stroke='black'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-linecap='round' stroke-width='3'%3E%3Canimate attributeName='stroke-dasharray' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0 150;42 150;42 150;42 150'/%3E%3Canimate attributeName='stroke-dashoffset' calcMode='spline' dur='1.5s' keySplines='0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1' keyTimes='0;0.475;0.95;1' repeatCount='indefinite' values='0;-16;-59;-59'/%3E%3C/circle%3E%3CanimateTransform attributeName='transform' dur='2s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-alert-circle{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-4v4m0 4h.01'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-arrow-right{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 12h14m-6 6l6-6m-6-6l6 6'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-arrow-up{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 5v14m6-8l-6-6m-6 6l6-6'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-brand-github{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 19c-4.3 1.4-4.3-2.5-6-3m12 5v-3.5c0-1 .1-1.4-.5-2c2.8-.3 5.5-1.4 5.5-6a4.6 4.6 0 0 0-1.3-3.2a4.2 4.2 0 0 0-.1-3.2s-1.1-.3-3.5 1.3a12.3 12.3 0 0 0-6.2 0C6.5 2.8 5.4 3.1 5.4 3.1a4.2 4.2 0 0 0-.1 3.2A4.6 4.6 0 0 0 4 9.5c0 4.6 2.7 5.7 5.5 6c-.6.6-.6 1.2-.5 2V21'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-brand-youtube{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M2 8a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4z'/%3E%3Cpath d='m10 9l5 3l-5 3z'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-calendar{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm12-4v4M8 3v4m-4 4h16m-9 4h1m0 0v3'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-check{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m5 12l5 5L20 7'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-chevron-down{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 9l6 6l6-6'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-chevron-right{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 6l6 6l-6 6'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-circle-check{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0'/%3E%3Cpath d='m9 12l2 2l4-4'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-file{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M14 3v4a1 1 0 0 0 1 1h4'/%3E%3Cpath d='M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-globe{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M7 9a4 4 0 1 0 8 0a4 4 0 0 0-8 0'/%3E%3Cpath d='M5.75 15A8.015 8.015 0 1 0 15 2m-4 15v4m-4 0h8'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-info-circle{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01'/%3E%3Cpath d='M11 12h1v4h1'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-lock{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M5 13a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z'/%3E%3Cpath d='M11 16a1 1 0 1 0 2 0a1 1 0 0 0-2 0m-3-5V7a4 4 0 1 1 8 0v4'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-logout{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M14 8V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2-2v-2'/%3E%3Cpath d='M9 12h12l-3-3m0 6l3-3'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-mail{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M3 7a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpath d='m3 7l9 6l9-6'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-menu{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h16M4 16h16'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-message-circle{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m3 20l1.3-3.9C1.976 12.663 2.874 8.228 6.4 5.726c3.526-2.501 8.59-2.296 11.845.48c3.255 2.777 3.695 7.266 1.029 10.501S11.659 20.922 7.7 19z'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-microphone{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M9 5a3 3 0 0 1 3-3a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3a3 3 0 0 1-3-3z'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M8 21h8m-4-4v4'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-microphone-filled{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M19 9a1 1 0 0 1 1 1a8 8 0 0 1-6.999 7.938L13 20h3a1 1 0 0 1 0 2H8a1 1 0 0 1 0-2h3v-2.062A8 8 0 0 1 4 10a1 1 0 1 1 2 0a6 6 0 0 0 12 0a1 1 0 0 1 1-1m-7-8a4 4 0 0 1 4 4v5a4 4 0 1 1-8 0V5a4 4 0 0 1 4-4'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-microphone-off{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='m3 3l18 18M9 5a3 3 0 0 1 6 0v5a3 3 0 0 1-.13.874m-2 2A3 3 0 0 1 9 10.002v-1'/%3E%3Cpath d='M5 10a7 7 0 0 0 10.846 5.85m2-2A6.97 6.97 0 0 0 18.998 10M8 21h8m-4-4v4'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-phone{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 4h4l2 5l-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-player-stop-filled{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M17 4H7a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-plus{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 5v14m-7-7h14'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-share{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0m12-6a3 3 0 1 0 6 0a3 3 0 1 0-6 0m0 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0m-6.3-7.3l6.6-3.4m-6.6 6l6.6 3.4'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-sparkles{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2-2a2 2 0 0 1-2-2a2 2 0 0 1-2 2m0-12a2 2 0 0 1 2 2a2 2 0 0 1 2-2a2 2 0 0 1-2-2a2 2 0 0 1-2 2M9 18a6 6 0 0 1 6-6a6 6 0 0 1-6-6a6 6 0 0 1-6 6a6 6 0 0 1 6 6'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-tool{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M7 10h3V7L6.5 3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1-3 3l-6-6a6 6 0 0 1-8-8z'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-user{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7a4 4 0 1 0 8 0a4 4 0 0 0-8 0M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-user-circle{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0'/%3E%3Cpath d='M9 10a3 3 0 1 0 6 0a3 3 0 1 0-6 0m-2.832 8.849A4 4 0 0 1 10 16h4a4 4 0 0 1 3.834 2.855'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-user-square-rounded{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M12 13a3 3 0 1 0 0-6a3 3 0 0 0 0 6'/%3E%3Cpath d='M12 3c7.2 0 9 1.8 9 9s-1.8 9-9 9s-9-1.8-9-9s1.8-9 9-9'/%3E%3Cpath d='M6 20.05V20a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v.05'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-users{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-world{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cg fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m.6-3h16.8M3.6 15h16.8'/%3E%3Cpath d='M11.5 3a17 17 0 0 0 0 18m1-18a17 17 0 0 1 0 18'/%3E%3C/g%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.i-tabler-x{width:1em;height:1em;-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);-webkit-mask-image:var(--svg);mask-image:var(--svg);--svg:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");background-color:currentColor;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.table{display:table}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-14{width:calc(var(--spacing) * 14);height:calc(var(--spacing) * 14)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.size-32{width:calc(var(--spacing) * 32);height:calc(var(--spacing) * 32)}.size-\\[1\\.1em\\]{width:1.1em;height:1.1em}.size-\\[9px\\]{width:9px;height:9px}.size-\\[13px\\]{width:13px;height:13px}.size-\\[17px\\]{width:17px;height:17px}.size-\\[18px\\]{width:18px;height:18px}.size-\\[25px\\]{width:25px;height:25px}.size-\\[36\\%\\]{width:36%;height:36%}.size-full{width:100%;height:100%}.h-1\\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-10{height:calc(var(--spacing) * 10)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-\\[17px\\]{height:17px}.h-\\[28px\\]{height:28px}.h-\\[38px\\]{height:38px}.h-\\[60px\\]{height:60px}.h-\\[80px\\]{height:80px}.h-\\[80vh\\]{height:80vh}.h-\\[600px\\]{height:600px}.h-\\[min\\(600px\\,calc\\(100vh-4rem\\)\\)\\]{height:min(600px,100vh - 4rem)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-\\[calc\\(100vh-48px\\)\\]{max-height:calc(100vh - 48px)}.min-h-0{min-height:0}.min-h-5{min-height:calc(var(--spacing) * 5)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-\\[20px\\]{min-height:20px}.min-h-full{min-height:100%}.w-0{width:0}.w-5{width:calc(var(--spacing) * 5)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-96{width:calc(var(--spacing) * 96)}.w-\\[2px\\]{width:2px}.w-\\[3px\\]{width:3px}.w-\\[5px\\]{width:5px}.w-\\[28px\\]{width:28px}.w-\\[60px\\]{width:60px}.w-\\[80\\%\\]{width:80%}.w-\\[80px\\]{width:80px}.w-\\[min\\(400px\\,calc\\(100vw-2rem\\)\\)\\]{width:min(400px,100vw - 2rem)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-4xl{max-width:var(--container-4xl)}.max-w-20{max-width:calc(var(--spacing) * 20)}.max-w-\\[55ch\\]{max-width:55ch}.max-w-\\[85\\%\\]{max-width:85%}.max-w-\\[88\\%\\]{max-width:88%}.max-w-\\[240px\\]{max-width:240px}.max-w-\\[255px\\]{max-width:255px}.max-w-\\[260px\\]{max-width:260px}.max-w-\\[300px\\]{max-width:300px}.max-w-\\[640px\\]{max-width:640px}.max-w-\\[900px\\]{max-width:900px}.max-w-\\[calc\\(100vw-48px\\)\\]{max-width:calc(100vw - 48px)}.max-w-\\[min\\(78\\%\\,30rem\\)\\]{max-width:min(78%,30rem)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--container-md)}.max-w-screen-md{max-width:var(--breakpoint-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:0}.flex-1{flex:1}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow-0{flex-grow:0}.grow{flex-grow:1}.basis-0{flex-basis:0}.origin-center{transform-origin:50%}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-4{--tw-translate-x:calc(var(--spacing) * -4);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-\\[30px\\]{--tw-translate-x:calc(30px * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-\\[30px\\]{--tw-translate-y:calc(30px * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:0px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-2{--tw-translate-y:calc(var(--spacing) * 2);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\\[30px\\]{--tw-translate-y:30px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-0{--tw-scale-x:0%;--tw-scale-y:0%;--tw-scale-z:0%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-110{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.-rotate-45{rotate:-45deg}.rotate-0{rotate:0deg}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform-gpu{transform:translateZ(0) var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.\\[scrollbar-width\\:none\\]{scrollbar-width:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.\\[justify-content\\:safe_center\\]{justify-content:safe center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-stretch{justify-content:stretch}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-7{gap:calc(var(--spacing) * 7)}.gap-\\[2px\\]{gap:2px}.gap-\\[5px\\]{gap:5px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-12>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 12) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 12) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-2\\.5{column-gap:calc(var(--spacing) * 2.5)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1\\.5{row-gap:calc(var(--spacing) * 1.5)}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[5px\\]{border-radius:5px}.rounded-\\[14px\\]{border-radius:14px}.rounded-\\[20px\\]{border-radius:20px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-black\\/10{border-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.border-black\\/10{border-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.border-green-400{border-color:var(--color-green-400)}.border-primary-400{border-color:var(--color-primary-400)}.border-primary-500\\/40{border-color:var(--color-primary-500)}@supports (color:color-mix(in lab, red, red)){.border-primary-500\\/40{border-color:color-mix(in oklab, var(--color-primary-500) 40%, transparent)}}.border-red-400{border-color:var(--color-red-400)}.border-slate-200{border-color:var(--color-slate-200)}.border-theme-100{border-color:var(--color-theme-100)}.border-theme-200{border-color:var(--color-theme-200)}.border-theme-300{border-color:var(--color-theme-300)}.border-theme-400{border-color:var(--color-theme-400)}.border-transparent{border-color:#0000}.border-white{border-color:var(--color-white)}.border-white\\/0{border-color:#0000}@supports (color:color-mix(in lab, red, red)){.border-white\\/0{border-color:color-mix(in oklab, var(--color-white) 0%, transparent)}}.border-white\\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.border-white\\/10{border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.border-white\\/20{border-color:#fff3}@supports (color:color-mix(in lab, red, red)){.border-white\\/20{border-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.border-white\\/25{border-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.border-white\\/25{border-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.border-t-primary-500{border-top-color:var(--color-primary-500)}.bg-\\[\\#0A1522\\]{background-color:#0a1522}.bg-\\[\\#050F19\\]{background-color:#050f19}.bg-amber-500{background-color:var(--color-amber-500)}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-current{background-color:currentColor}.bg-green-500{background-color:var(--color-green-500)}.bg-green-600{background-color:var(--color-green-600)}.bg-primary-500,.bg-primary-500\\/20{background-color:var(--color-primary-500)}@supports (color:color-mix(in lab, red, red)){.bg-primary-500\\/20{background-color:color-mix(in oklab, var(--color-primary-500) 20%, transparent)}}.bg-primary-600{background-color:var(--color-primary-600)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.bg-red-500\\/20{background-color:color-mix(in oklab, var(--color-red-500) 20%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-slate-950{background-color:var(--color-slate-950)}.bg-theme-0{background-color:var(--color-theme-0)}.bg-theme-50{background-color:var(--color-theme-50)}.bg-theme-100{background-color:var(--color-theme-100)}.bg-theme-200{background-color:var(--color-theme-200)}.bg-theme-300{background-color:var(--color-theme-300)}.bg-theme-400{background-color:var(--color-theme-400)}.bg-theme-500{background-color:var(--color-theme-500)}.bg-theme-800,.bg-theme-800\\/60{background-color:var(--color-theme-800)}@supports (color:color-mix(in lab, red, red)){.bg-theme-800\\/60{background-color:color-mix(in oklab, var(--color-theme-800) 60%, transparent)}}.bg-theme-900{background-color:var(--color-theme-900)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\\/5{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.bg-white\\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.bg-white\\/10{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.bg-white\\/15{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.bg-white\\/55{background-color:#ffffff8c}@supports (color:color-mix(in lab, red, red)){.bg-white\\/55{background-color:color-mix(in oklab, var(--color-white) 55%, transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\\[\\#050F19\\]\\/65{--tw-gradient-from:#050f19a6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}@supports (color:color(display-p3 0 0 0)){.from-\\[\\#050F19\\]\\/65{--tw-gradient-from:color(display-p3 .0270841 .0577423 .0947219/.65)}}@supports (color:lab(0% 0 0)){.from-\\[\\#050F19\\]\\/65{--tw-gradient-from:lab(3.9307% -1.22581 -7.24003/.65)}}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab, red, red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab, var(--color-black) 70%, transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab, red, red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab, var(--color-black) 80%, transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-black\\/90{--tw-gradient-from:#000000e6}@supports (color:color-mix(in lab, red, red)){.from-black\\/90{--tw-gradient-from:color-mix(in oklab, var(--color-black) 90%, transparent)}}.from-black\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-theme-0\\/90{--tw-gradient-from:var(--color-theme-0)}@supports (color:color-mix(in lab, red, red)){.from-theme-0\\/90{--tw-gradient-from:color-mix(in oklab, var(--color-theme-0) 90%, transparent)}}.from-theme-0\\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-theme-800{--tw-gradient-from:var(--color-theme-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-\\[\\#050F19\\]\\/75{--tw-gradient-via:#050f19bf;--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}@supports (color:color(display-p3 0 0 0)){.via-\\[\\#050F19\\]\\/75{--tw-gradient-via:color(display-p3 .0270841 .0577423 .0947219/.75)}}@supports (color:lab(0% 0 0)){.via-\\[\\#050F19\\]\\/75{--tw-gradient-via:lab(3.9307% -1.22581 -7.24003/.75)}}.via-black\\/10{--tw-gradient-via:#0000001a}@supports (color:color-mix(in lab, red, red)){.via-black\\/10{--tw-gradient-via:color-mix(in oklab, var(--color-black) 10%, transparent)}}.via-black\\/10{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-black\\/50{--tw-gradient-via:#00000080}@supports (color:color-mix(in lab, red, red)){.via-black\\/50{--tw-gradient-via:color-mix(in oklab, var(--color-black) 50%, transparent)}}.via-black\\/50{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-black\\/60{--tw-gradient-via:#0009}@supports (color:color-mix(in lab, red, red)){.via-black\\/60{--tw-gradient-via:color-mix(in oklab, var(--color-black) 60%, transparent)}}.via-black\\/60{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-black\\/90{--tw-gradient-via:#000000e6}@supports (color:color-mix(in lab, red, red)){.via-black\\/90{--tw-gradient-via:color-mix(in oklab, var(--color-black) 90%, transparent)}}.via-black\\/90{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-theme-0\\/55{--tw-gradient-via:var(--color-theme-0)}@supports (color:color-mix(in lab, red, red)){.via-theme-0\\/55{--tw-gradient-via:color-mix(in oklab, var(--color-theme-0) 55%, transparent)}}.via-theme-0\\/55{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-theme-300\\/70{--tw-gradient-via:var(--color-theme-300)}@supports (color:color-mix(in lab, red, red)){.via-theme-300\\/70{--tw-gradient-via:color-mix(in oklab, var(--color-theme-300) 70%, transparent)}}.via-theme-300\\/70{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\\/15{--tw-gradient-via:#ffffff26}@supports (color:color-mix(in lab, red, red)){.via-white\\/15{--tw-gradient-via:color-mix(in oklab, var(--color-white) 15%, transparent)}}.via-white\\/15{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\\[\\#050F19\\]\\/90{--tw-gradient-to:#050f19e6;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}@supports (color:color(display-p3 0 0 0)){.to-\\[\\#050F19\\]\\/90{--tw-gradient-to:color(display-p3 .0270841 .0577423 .0947219/.9)}}@supports (color:lab(0% 0 0)){.to-\\[\\#050F19\\]\\/90{--tw-gradient-to:lab(3.9307% -1.22581 -7.24003/.9)}}.to-black\\/40{--tw-gradient-to:#0006}@supports (color:color-mix(in lab, red, red)){.to-black\\/40{--tw-gradient-to:color-mix(in oklab, var(--color-black) 40%, transparent)}}.to-black\\/40{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-black\\/80{--tw-gradient-to:#000c}@supports (color:color-mix(in lab, red, red)){.to-black\\/80{--tw-gradient-to:color-mix(in oklab, var(--color-black) 80%, transparent)}}.to-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-black\\/100{--tw-gradient-to:var(--color-black);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-theme-950{--tw-gradient-to:var(--color-theme-950);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-cover{background-size:cover}.bg-center{background-position:50%}.bg-no-repeat{background-repeat:no-repeat}.object-cover{object-fit:cover}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-24{padding:calc(var(--spacing) * 24)}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-9{padding-inline:calc(var(--spacing) * 9)}.px-14{padding-inline:calc(var(--spacing) * 14)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-0{padding-top:0}.pt-0\\.5{padding-top:calc(var(--spacing) * .5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-20{padding-top:calc(var(--spacing) * 20)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pb-1{padding-bottom:var(--spacing)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3\\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pb-\\[120px\\]{padding-bottom:120px}.pb-\\[max\\(3rem\\,env\\(safe-area-inset-bottom\\)\\)\\]{padding-bottom:max(3rem, env(safe-area-inset-bottom))}.pb-\\[max\\(env\\(safe-area-inset-bottom\\)\\,1rem\\)\\]{padding-bottom:max(env(safe-area-inset-bottom), 1rem)}.pl-0\\.5{padding-left:calc(var(--spacing) * .5)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-\\[22px\\]{padding-left:22px}.pl-\\[30px\\]{padding-left:30px}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10\\.5px\\]{font-size:10.5px}.text-\\[10px\\]{font-size:10px}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[11px\\]{font-size:11px}.text-\\[12\\.5px\\]{font-size:12.5px}.text-\\[12px\\]{font-size:12px}.text-\\[13\\.5px\\]{font-size:13.5px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.leading-\\[1\\.55\\]{--tw-leading:1.55;line-height:1.55}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.35em\\]{--tw-tracking:.35em;letter-spacing:.35em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.text-\\[\\#050F19\\]{color:#050f19}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-primary-300{color:var(--color-primary-300)}.text-primary-400{color:var(--color-primary-400)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-950{color:var(--color-slate-950)}.text-theme-0{color:var(--color-theme-0)}.text-theme-300{color:var(--color-theme-300)}.text-theme-400{color:var(--color-theme-400)}.text-theme-500{color:var(--color-theme-500)}.text-theme-600{color:var(--color-theme-600)}.text-theme-700{color:var(--color-theme-700)}.text-theme-800{color:var(--color-theme-800)}.text-theme-900{color:var(--color-theme-900)}.text-theme-950{color:var(--color-theme-950)}.text-white{color:var(--color-white)}.text-white\\/30{color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.text-white\\/30{color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.text-white\\/40{color:#fff6}@supports (color:color-mix(in lab, red, red)){.text-white\\/40{color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.text-white\\/45{color:#ffffff73}@supports (color:color-mix(in lab, red, red)){.text-white\\/45{color:color-mix(in oklab, var(--color-white) 45%, transparent)}}.text-white\\/50{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.text-white\\/50{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.text-white\\/55{color:#ffffff8c}@supports (color:color-mix(in lab, red, red)){.text-white\\/55{color:color-mix(in oklab, var(--color-white) 55%, transparent)}}.text-white\\/60{color:#fff9}@supports (color:color-mix(in lab, red, red)){.text-white\\/60{color:color-mix(in oklab, var(--color-white) 60%, transparent)}}.text-white\\/70{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.text-white\\/70{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.text-white\\/80{color:#fffc}@supports (color:color-mix(in lab, red, red)){.text-white\\/80{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.text-white\\/85{color:#ffffffd9}@supports (color:color-mix(in lab, red, red)){.text-white\\/85{color:color-mix(in oklab, var(--color-white) 85%, transparent)}}.text-white\\/90{color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.text-white\\/90{color:color-mix(in oklab, var(--color-white) 90%, transparent)}}.text-white\\/95{color:#fffffff2}@supports (color:color-mix(in lab, red, red)){.text-white\\/95{color:color-mix(in oklab, var(--color-white) 95%, transparent)}}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.placeholder-theme-300::placeholder{color:var(--color-theme-300)}.placeholder-theme-400::placeholder{color:var(--color-theme-400)}.placeholder-theme-500::placeholder{color:var(--color-theme-500)}.placeholder-white\\/50::placeholder{color:#ffffff80}@supports (color:color-mix(in lab, red, red)){.placeholder-white\\/50::placeholder{color:color-mix(in oklab, var(--color-white) 50%, transparent)}}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_1px_2px_rgba\\(15\\,23\\,42\\,0\\.04\\)\\,0_12px_32px_rgba\\(15\\,23\\,42\\,0\\.07\\)\\]{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0f172a0a), 0 12px 32px var(--tw-shadow-color,#0f172a12);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_8px_32px_-4px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 8px 32px -4px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_24px_80px_-12px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\,0_8px_24px_-8px_rgba\\(0\\,0\\,0\\,0\\.08\\)\\]{--tw-shadow:0 24px 80px -12px var(--tw-shadow-color,#0003), 0 8px 24px -8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-black\\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.ring-black\\/5{--tw-ring-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.ring-theme-200{--tw-ring-color:var(--color-theme-200)}.ring-theme-900{--tw-ring-color:var(--color-theme-900)}.ring-theme-950\\/10{--tw-ring-color:var(--color-theme-950)}@supports (color:color-mix(in lab, red, red)){.ring-theme-950\\/10{--tw-ring-color:color-mix(in oklab, var(--color-theme-950) 10%, transparent)}}.ring-white{--tw-ring-color:var(--color-white)}.ring-white\\/10{--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.ring-white\\/10{--tw-ring-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.ring-white\\/15{--tw-ring-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.ring-white\\/15{--tw-ring-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.ring-white\\/20{--tw-ring-color:#fff3}@supports (color:color-mix(in lab, red, red)){.ring-white\\/20{--tw-ring-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-lg{--tw-backdrop-blur:blur(var(--blur-lg));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-1000{--tw-duration:1s;transition-duration:1s}.duration-\\[400ms\\]{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\.25\\,1\\,0\\.33\\,1\\)\\]{--tw-ease:cubic-bezier(.25,1,.33,1);transition-timing-function:cubic-bezier(.25,1,.33,1)}.ease-\\[cubic-bezier\\(0\\.52\\,0\\.01\\,0\\.16\\,1\\)\\]{--tw-ease:cubic-bezier(.52,.01,.16,1);transition-timing-function:cubic-bezier(.52,.01,.16,1)}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.\\[-ms-overflow-style\\:none\\]{-ms-overflow-style:none}.\\[animation-duration\\:3s\\]{animation-duration:3s}.\\[overflow-anchor\\:none\\]{overflow-anchor:none}@media (hover:hover){.group-hover\\:scale-100:is(:where(.group):hover *){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\\:opacity-40:is(:where(.group):hover *){opacity:.4}}.focus-within\\:bg-white\\/15:focus-within{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.focus-within\\:bg-white\\/15:focus-within{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.focus-within\\:ring-theme-950\\/15:focus-within{--tw-ring-color:var(--color-theme-950)}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-theme-950\\/15:focus-within{--tw-ring-color:color-mix(in oklab, var(--color-theme-950) 15%, transparent)}}.focus-within\\:ring-white\\/25:focus-within{--tw-ring-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.focus-within\\:ring-white\\/25:focus-within{--tw-ring-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}@media (hover:hover){.hover\\:translate-y-\\[-1px\\]:hover{--tw-translate-y:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:rotate-90:hover{rotate:90deg}.hover\\:border-green-300:hover{border-color:var(--color-green-300)}.hover\\:border-primary-300:hover{border-color:var(--color-primary-300)}.hover\\:border-red-300:hover{border-color:var(--color-red-300)}.hover\\:border-theme-200:hover{border-color:var(--color-theme-200)}.hover\\:border-theme-300:hover{border-color:var(--color-theme-300)}.hover\\:border-white\\/10:hover{border-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:border-white\\/10:hover{border-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\\:border-white\\/40:hover{border-color:#fff6}@supports (color:color-mix(in lab, red, red)){.hover\\:border-white\\/40:hover{border-color:color-mix(in oklab, var(--color-white) 40%, transparent)}}.hover\\:bg-green-500:hover{background-color:var(--color-green-500)}.hover\\:bg-primary-500:hover{background-color:var(--color-primary-500)}.hover\\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\\:bg-theme-25:hover{background-color:var(--color-theme-25)}.hover\\:bg-theme-50:hover{background-color:var(--color-theme-50)}.hover\\:bg-theme-100:hover{background-color:var(--color-theme-100)}.hover\\:bg-theme-200:hover{background-color:var(--color-theme-200)}.hover\\:bg-theme-700:hover{background-color:var(--color-theme-700)}.hover\\:bg-theme-800:hover{background-color:var(--color-theme-800)}.hover\\:bg-white\\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/5:hover{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.hover\\:bg-white\\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/10:hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.hover\\:bg-white\\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/15:hover{background-color:color-mix(in oklab, var(--color-white) 15%, transparent)}}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\\:text-primary-600:hover{color:var(--color-primary-600)}.hover\\:text-theme-400:hover{color:var(--color-theme-400)}.hover\\:text-theme-500:hover{color:var(--color-theme-500)}.hover\\:text-theme-600:hover{color:var(--color-theme-600)}.hover\\:text-theme-700:hover{color:var(--color-theme-700)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-white\\/70:hover{color:#ffffffb3}@supports (color:color-mix(in lab, red, red)){.hover\\:text-white\\/70:hover{color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.hover\\:text-white\\/80:hover{color:#fffc}@supports (color:color-mix(in lab, red, red)){.hover\\:text-white\\/80:hover{color:color-mix(in oklab, var(--color-white) 80%, transparent)}}.hover\\:opacity-70:hover{opacity:.7}.hover\\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:ring-theme-950\\/15:hover{--tw-ring-color:var(--color-theme-950)}@supports (color:color-mix(in lab, red, red)){.hover\\:ring-theme-950\\/15:hover{--tw-ring-color:color-mix(in oklab, var(--color-theme-950) 15%, transparent)}}.hover\\:ring-white\\/25:hover{--tw-ring-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.hover\\:ring-white\\/25:hover{--tw-ring-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.focus\\:border-theme-900:focus{border-color:var(--color-theme-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-theme-900:focus-visible{--tw-ring-color:var(--color-theme-900)}.focus-visible\\:ring-white:focus-visible{--tw-ring-color:var(--color-white)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:-translate-y-0\\.5:active{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\\:scale-\\[0\\.98\\]:active{scale:.98}.active\\:scale-\\[1\\.06\\]:active{scale:1.06}.active\\:bg-theme-800\\/80:active{background-color:var(--color-theme-800)}@supports (color:color-mix(in lab, red, red)){.active\\:bg-theme-800\\/80:active{background-color:color-mix(in oklab, var(--color-theme-800) 80%, transparent)}}.active\\:bg-white\\/25:active{background-color:#ffffff40}@supports (color:color-mix(in lab, red, red)){.active\\:bg-white\\/25:active{background-color:color-mix(in oklab, var(--color-white) 25%, transparent)}}.active\\:opacity-70:active{opacity:.7}.active\\:opacity-80:active{opacity:.8}.active\\:duration-100:active{--tw-duration:.1s;transition-duration:.1s}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.sm\\:top-6{top:calc(var(--spacing) * 6)}.sm\\:right-6{right:calc(var(--spacing) * 6)}.sm\\:bottom-6{bottom:calc(var(--spacing) * 6)}.sm\\:left-6{left:calc(var(--spacing) * 6)}.sm\\:size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.sm\\:h-24{height:calc(var(--spacing) * 24)}.sm\\:max-h-\\[620px\\]{max-height:620px}.sm\\:w-24{width:calc(var(--spacing) * 24)}.sm\\:max-w-\\[420px\\]{max-width:420px}.sm\\:flex-none{flex:none}.sm\\:items-center{align-items:center}.sm\\:justify-center{justify-content:center}.sm\\:rounded-\\[32px\\]{border-radius:32px}.sm\\:bg-\\[\\#050F19\\]\\/45{background-color:#050f1973;background-color:color(display-p3 .0270841 .0577423 .0947219/.45);background-color:lab(3.9307% -1.22581 -7.24003/.45)}.sm\\:p-6{padding:calc(var(--spacing) * 6)}.sm\\:px-12{padding-inline:calc(var(--spacing) * 12)}.sm\\:pb-7{padding-bottom:calc(var(--spacing) * 7)}.sm\\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\\:shadow-\\[0_32px_80px_rgba\\(5\\,15\\,25\\,0\\.45\\)\\]{--tw-shadow:0 32px 80px var(--tw-shadow-color,#050f1973);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@media (min-width:48rem){.md\\:h-\\[600px\\]{height:600px}}@container agent (width>=480px){.\\@\\[480px\\]\\/agent\\:px-6{padding-inline:calc(var(--spacing) * 6)}}@container chat (width>=24rem){.\\@sm\\/chat\\:size-24{width:calc(var(--spacing) * 24);height:calc(var(--spacing) * 24)}}@container chat-preview (width>=24rem){.\\@sm\\/chat-preview\\:max-w-\\[78\\%\\]{max-width:78%}}@container chat (width>=24rem){.\\@sm\\/chat\\:max-w-\\[55ch\\]{max-width:55ch}.\\@sm\\/chat\\:max-w-\\[320px\\]{max-width:320px}.\\@sm\\/chat\\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\\@sm\\/chat\\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\\@sm\\/chat\\:text-\\[11px\\]{font-size:11px}.\\@sm\\/chat\\:text-\\[15px\\]{font-size:15px}.\\@sm\\/chat\\:leading-\\[1\\.5\\]{--tw-leading:1.5;line-height:1.5}}@container chat (width>=32rem){.\\@lg\\/chat\\:px-8{padding-inline:calc(var(--spacing) * 8)}}@container chat (width>=64rem){.\\@5xl\\/chat\\:max-w-\\[720px\\]{max-width:720px}.\\@5xl\\/chat\\:px-5{padding-inline:calc(var(--spacing) * 5)}.\\@5xl\\/chat\\:pt-3\\.5{padding-top:calc(var(--spacing) * 3.5)}.\\@5xl\\/chat\\:pb-3{padding-bottom:calc(var(--spacing) * 3)}}@media (prefers-color-scheme:dark){.dark\\:bg-theme-600\\/90{background-color:var(--color-theme-600)}@supports (color:color-mix(in lab, red, red)){.dark\\:bg-theme-600\\/90{background-color:color-mix(in oklab, var(--color-theme-600) 90%, transparent)}}}@media (pointer:coarse){.pointer-coarse\\:size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:hidden::-webkit-scrollbar{display:none}}.chat-dots{align-items:center;gap:3px;display:inline-flex}.chat-dots>span{background:currentColor;border-radius:9999px;width:5px;height:5px;animation:1.4s cubic-bezier(.25,1,.33,1) infinite chat-dot}.chat-dots>span:nth-child(2){animation-delay:.16s}.chat-dots>span:nth-child(3){animation-delay:.32s}@keyframes chat-dot{0%,52%,to{opacity:.25;transform:translateY(0)}22%{opacity:1;transform:translateY(-1.5px)}}.chat-dots--mini{gap:2.5px}.chat-dots--mini>span{width:3.5px;height:3.5px}.chat-pulse-dot{animation:1.4s cubic-bezier(.25,1,.33,1) infinite chat-pulse-dot}@keyframes chat-pulse-dot{0%,to{opacity:.35;transform:scale(.7)}35%{opacity:1;transform:scale(1)}}.chat-live-enter{animation:.28s cubic-bezier(.25,1,.33,1) both chat-live-enter}@keyframes chat-live-enter{0%{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){.chat-dots>span,.chat-pulse-dot{opacity:.55;animation:none}.chat-live-enter{animation:none}}.chat-msg-prose :first-child{margin-top:0}.chat-msg-prose :last-child{margin-bottom:0}.chat-msg-prose+.chat-msg-prose{margin-top:1em}.chat-msg-prose strong{font-weight:600}.chat-msg-prose em{font-style:italic}.chat-msg-prose a{color:var(--color-primary-500);text-underline-offset:3px;text-decoration:underline;-webkit-text-decoration-color:var(--color-primary-500);-webkit-text-decoration-color:var(--color-primary-500);-webkit-text-decoration-color:var(--color-primary-500);text-decoration-color:var(--color-primary-500)}@supports (color:color-mix(in lab, red, red)){.chat-msg-prose a{-webkit-text-decoration-color:color-mix(in oklch, var(--color-primary-500) 40%, transparent);-webkit-text-decoration-color:color-mix(in oklch, var(--color-primary-500) 40%, transparent);-webkit-text-decoration-color:color-mix(in oklch, var(--color-primary-500) 40%, transparent);text-decoration-color:color-mix(in oklch, var(--color-primary-500) 40%, transparent)}}.chat-msg-prose a{font-weight:500;transition:text-decoration-color .15s}.chat-msg-prose a:hover{-webkit-text-decoration-color:var(--color-primary-500);-webkit-text-decoration-color:var(--color-primary-500);-webkit-text-decoration-color:var(--color-primary-500);text-decoration-color:var(--color-primary-500)}.chat-msg-prose.chat-msg-prose-invert a{color:#fff;text-decoration-color:#ffffff73}.chat-msg-prose.chat-msg-prose-invert a:hover{text-decoration-color:#fff}.chat-msg-prose.chat-msg-prose-invert pre,.chat-msg-prose.chat-msg-prose-invert table{background:#ffffff14;border-color:#ffffff2e}.chat-msg-prose.chat-msg-prose-invert td{border-top-color:#ffffff1f}.chat-msg-prose.chat-msg-prose-invert :not(pre)>code{background:#ffffff24}.chat-msg-prose.chat-msg-prose-invert hr{border-top-color:#ffffff38}.chat-msg-prose p{margin:1em 0;line-height:1.55}.chat-msg-prose h1{letter-spacing:-.012em;margin:1.1em 0 .5em;font-size:1.25em;font-weight:600;line-height:1.3}.chat-msg-prose h2{letter-spacing:-.01em;margin:1.1em 0 .45em;font-size:1.15em;font-weight:600;line-height:1.3}.chat-msg-prose h3{letter-spacing:-.008em;margin:1em 0 .4em;font-size:1.05em;font-weight:600;line-height:1.35}.chat-msg-prose h4,.chat-msg-prose h5,.chat-msg-prose h6{margin:.9em 0 .35em;font-size:1em;font-weight:600;line-height:1.4}.chat-msg-prose ul,.chat-msg-prose ol{margin:.7em 0 .9em;padding-left:1.4em;line-height:1.55}.chat-msg-prose ul{list-style-type:disc}.chat-msg-prose ol{list-style-type:decimal}.chat-msg-prose li{margin-bottom:.35em}.chat-msg-prose li p{margin:0}.chat-msg-prose li::marker{color:currentColor;opacity:.4}.chat-msg-prose li:has(>input[type=checkbox]){margin-left:-1.4em;list-style:none}.chat-msg-prose li>input[type=checkbox]{-webkit-appearance:none;appearance:none;vertical-align:-.06em;border:1px solid var(--color-theme-300);background:0 0;border-radius:.22em;width:.82em;height:.82em;margin:0 .5em 0 .1em}.chat-msg-prose li>input[type=checkbox]:checked{border-color:var(--color-theme-900);background:var(--color-theme-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2 3.8 6.8 9 1.2' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / .55em no-repeat}.chat-msg-prose.chat-msg-prose-invert li>input[type=checkbox]{border-color:#fff6}.chat-msg-prose.chat-msg-prose-invert li>input[type=checkbox]:checked{background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2 3.8 6.8 9 1.2' fill='none' stroke='%230c0a13' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");border-color:#fff}.chat-msg-prose pre{background:var(--color-theme-25);border:1px solid var(--color-theme-200);border-radius:.625rem;margin:1.4em 0;padding:.85em 1em;font-family:SF Mono,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:.82em;line-height:1.5;overflow-x:auto}.chat-msg-prose pre code{font-size:inherit;background:0 0;padding:0;font-family:inherit}.chat-msg-prose :not(pre)>code{background:var(--color-theme-200);border-radius:.3rem;padding:.15em .4em;font-size:.85em}@supports (color:color-mix(in lab, red, red)){.chat-msg-prose :not(pre)>code{background:color-mix(in oklch, var(--color-theme-200) 45%, transparent)}}.chat-msg-prose :not(pre)>code{font-family:SF Mono,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace}.chat-msg-prose blockquote{opacity:.8;margin:1.3em 0;padding:0 0 0 1.1em;font-style:italic}.chat-msg-prose blockquote p{margin:.15em 0}.chat-msg-prose table{background:var(--color-theme-0);border-collapse:separate;border-spacing:0;border:1px solid var(--color-theme-200);border-radius:.625rem;width:100%;margin:1.4em 0;font-size:.9em;line-height:1.45;overflow:hidden}.chat-msg-prose th,.chat-msg-prose td{text-align:left;padding:.65em .8em}.chat-msg-prose th{font-weight:600}.chat-msg-prose td{border-top:1px solid var(--color-theme-200)}@supports (color:color-mix(in lab, red, red)){.chat-msg-prose td{border-top:1px solid color-mix(in oklch, var(--color-theme-200) 45%, transparent)}}.chat-msg-prose td{color:currentColor}@supports (color:color-mix(in lab, red, red)){.chat-msg-prose td{color:color-mix(in oklch, currentColor 75%, transparent)}}.chat-msg-prose td:first-child{color:inherit}.chat-msg-prose [align=center]{text-align:center}.chat-msg-prose [align=right]{text-align:right}.chat-msg-prose [align=left]{text-align:left}.chat-msg-prose hr{border:none;border-top:1px solid var(--color-theme-200)}@supports (color:color-mix(in lab, red, red)){.chat-msg-prose hr{border-top:1px solid color-mix(in oklch, var(--color-theme-200) 42%, transparent)}}.chat-msg-prose hr{margin:1.2em 0}.chat-msg-prose img{border-radius:.5rem;max-width:100%;height:auto;margin:.6em 0}.chat-msg-prose p+p{margin-top:.65em}.chat-msg-prose p+ul,.chat-msg-prose p+ol{margin-top:.4em}.chat-msg-prose h1+p,.chat-msg-prose h2+p,.chat-msg-prose h3+p{margin-top:.2em}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`,HP={"data-test":"auth-panel",class:"flex flex-col justify-end h-full px-5 pb-8 pt-6"},KP={class:"flex-1 flex flex-col justify-center"},WP={key:0,class:"text-xs text-red-500 mb-4"},GP={class:"space-y-3"},JP={key:0},qP={key:1,class:"space-y-3"},YP={key:2,class:"space-y-3"},XP={class:"text-xs text-theme-400"},QP=Ae({__name:"ElAuthPanel",props:{sdk:{}},setup(e){let t=G(!1),n=G("email"),i=G({email:"",code:""}),r=G(!1);function o(){e.sdk.error.value=null,e.sdk.auth.loginWithGoogle({onError:c=>{e.sdk.error.value=c}})}async function a(){if(!r.value){r.value=!0,e.sdk.error.value=null;try{await e.sdk.auth.requestAuthCode({email:i.value.email})&&(n.value="code")}finally{r.value=!1}}}async function s(){if(!r.value){r.value=!0,e.sdk.error.value=null;try{await e.sdk.auth.loginWithCode({email:i.value.email,code:i.value.code})}finally{r.value=!1}}}return(c,u)=>(v(),x("div",HP,[y("div",KP,[u[4]||(u[4]=y("div",{class:"space-y-3 mb-10"},[y("h3",{class:"text-2xl font-light text-theme-900 leading-snug"},[xt(" Your AI assistant,"),y("br"),xt("ready in two minutes. ")]),y("p",{class:"text-sm text-theme-400 leading-relaxed max-w-[260px]"}," Sign in to create and deploy a personal AI that works for you. ")],-1)),e.sdk.error.value?(v(),x("p",WP,ce(e.sdk.error.value),1)):Y("",!0)]),y("div",GP,[y("button",{"data-test":"google-auth-btn",class:"w-full flex items-center justify-center gap-3 px-5 py-3.5 rounded-xl border border-theme-200 bg-theme-0 text-theme-800 font-medium text-sm transition-all duration-150 hover:border-theme-300 hover:bg-theme-25 active:scale-[0.98] cursor-pointer",onClick:o},[...u[5]||(u[5]=[a$('<svg class="size-[18px]" viewBox="0 0 24 24"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 0 1-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z" fill="#4285F4"></path><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="#34A853"></path><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" fill="#FBBC05"></path><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" fill="#EA4335"></path></svg> Continue with Google ',2)])]),u[8]||(u[8]=y("div",{class:"flex items-center gap-3 py-1"},[y("div",{class:"flex-1 h-px bg-theme-100"}),y("span",{class:"text-[11px] text-theme-300 uppercase tracking-widest"},"or"),y("div",{class:"flex-1 h-px bg-theme-100"})],-1)),t.value?Y("",!0):(v(),x("div",JP,[y("button",{"data-test":"email-auth-link",class:"w-full px-5 py-3 rounded-xl border border-theme-100 text-sm text-theme-500 transition-all duration-150 hover:border-theme-200 hover:text-theme-700 cursor-pointer",onClick:u[0]||(u[0]=d=>t.value=!0)}," Use email instead ")])),t.value&&n.value==="email"?(v(),x("div",qP,[be(Td,{modelValue:i.value.email,"onUpdate:modelValue":u[1]||(u[1]=d=>i.value.email=d),"data-test":"auth-email-input",onKeyup:zn(a,["enter"])},null,8,["modelValue"]),be(pa,{"data-test":"auth-send-code",theme:"dark",size:"md",class:"w-full",loading:r.value,disabled:!i.value.email||r.value,onClick:a},{default:bt(()=>[...u[6]||(u[6]=[xt(" Send verification code ",-1)])]),_:1},8,["loading","disabled"])])):Y("",!0),t.value&&n.value==="code"?(v(),x("div",YP,[y("p",XP," Code sent to "+ce(i.value.email),1),be(zd,{modelValue:i.value.code,"onUpdate:modelValue":u[2]||(u[2]=d=>i.value.code=d),length:6,"focus-first":!0,"data-test":"auth-code-input",onAutoSubmit:s},null,8,["modelValue"]),be(pa,{"data-test":"auth-verify-code",theme:"dark",size:"md",class:"w-full",loading:r.value,disabled:i.value.code.length!==6||r.value,onClick:s},{default:bt(()=>[...u[7]||(u[7]=[xt(" Verify ",-1)])]),_:1},8,["loading","disabled"]),y("button",{class:"w-full text-xs text-theme-300 hover:text-theme-500 transition-colors py-1 cursor-pointer",onClick:u[3]||(u[3]=d=>n.value="email")}," Use a different email ")])):Y("",!0)])]))}}),eR={"data-test":"create-panel",class:"flex flex-col justify-end h-full px-5 pb-8 pt-6"},tR={class:"flex-1 flex flex-col justify-center"},rR={key:0,class:"text-xs text-red-500 mb-4"},nR={class:"space-y-3"},iR=["disabled"],oR=Ae({__name:"ElCreateAgent",props:{sdk:{}},emits:["created"],setup(e,{emit:t}){let n=t,i=G(""),r=G(!1),o=G(null);async function a(){if(!(r.value||!i.value.trim())){r.value=!0,o.value=null;try{let s=await e.sdk.agent.create({name:i.value.trim()});n("created",s)}catch(s){o.value=s instanceof Error?s.message:"Failed to create agent"}finally{r.value=!1}}}return(s,c)=>(v(),x("div",eR,[y("div",tR,[c[1]||(c[1]=y("div",{class:"space-y-3 mb-10"},[y("h3",{class:"text-2xl font-light text-theme-900 leading-snug"},[xt(" What should we call"),y("br"),xt("your assistant? ")]),y("p",{class:"text-sm text-theme-400 leading-relaxed max-w-[260px]"}," Pick a name. You can change it later. ")],-1)),o.value?(v(),x("p",rR,ce(o.value),1)):Y("",!0)]),y("div",nR,[Uu(y("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>i.value=u),"data-test":"agent-name-input",type:"text",placeholder:"e.g. Alex, Casey, Jordan",class:"w-full px-4 py-3 text-theme-900 placeholder-theme-300 bg-theme-0 border border-theme-200 rounded-xl focus:outline-none focus:border-theme-900 transition-colors",style:{"font-size":"16px"},onKeyup:zn(a,["enter"])},null,544),[[Hu,i.value]]),y("button",{"data-test":"agent-create-btn",class:"w-full px-5 py-3.5 rounded-xl bg-primary-600 text-white text-sm font-medium transition-all duration-150 hover:bg-primary-500 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",disabled:!i.value.trim()||r.value,onClick:a},ce(r.value?"Creating...":"Create assistant"),9,iR)])]))}}),aR={"data-test":"provisioning-panel",class:"flex flex-col items-center justify-center h-full p-6"},sR={class:"w-full max-w-xs space-y-6 text-center"},lR={class:"text-sm text-theme-500"},cR={class:"text-sm text-red-500"},uR=Ae({__name:"ElProvisioningStatus",props:{sdk:{},agentId:{}},emits:["ready","error"],setup(e,{emit:t}){let n=e,i=t,r=G("Setting up your assistant\u2026"),o=G(!1),a=G(""),s={starting:"Starting your assistant\u2026",running:"Ready!",stopped:"Setting up your assistant\u2026"};async function c(){o.value=!1,a.value="";try{await n.sdk.agent.waitUntilReady({agentId:n.agentId,onStatus:u=>{r.value=s[u]??"Setting up your assistant\u2026"}}),i("ready")}catch(u){o.value=!0,a.value=u instanceof Error?u.message:"Something went wrong",i("error",a.value)}}return It(()=>{c()}),(u,d)=>(v(),x("div",aR,[y("div",sR,[o.value?(v(),x(ge,{key:1},[y("p",cR,ce(a.value),1),y("button",{"data-test":"provision-retry-btn",class:"px-6 py-2.5 rounded-lg bg-primary-600 text-white text-sm font-medium hover:bg-primary-500 transition-colors cursor-pointer",onClick:c}," Try again ")],64)):(v(),x(ge,{key:0},[d[0]||(d[0]=y("div",{class:"flex justify-center"},[y("div",{class:"animate-spin rounded-full size-6 border-2 border-theme-200 border-t-primary-500"})],-1)),y("p",lR,ce(r.value),1)],64))])]))}});function dR(e){return e.hasToken?e.hasAgent?e.isNewAgent?e.provisionError?"error":e.botReady?"chat":"provisioning":"chat":"create":"auth"}var pR=["data-test-state"],mR={class:"flex items-center justify-between px-4 py-3 border-b border-theme-100"},fR={class:"text-sm font-medium text-theme-800"},hR={class:"flex-1 overflow-hidden"},gR={key:4,class:"flex flex-col items-center justify-center h-full p-6"},vR={class:"w-full max-w-xs space-y-6 text-center"},bR={class:"text-sm text-red-500"},yR={key:0,class:"border-t border-theme-100 px-4 py-2 text-center"},xR=["href"],wR=Ae({__name:"AgentWidgetOnboard",props:{sdk:{},onClose:{type:Function}},setup(e){let t=e,n=t.sdk||Qs.getInstance({isDev:typeof window<"u"?window.location.hostname==="localhost"||window.location.hostname.includes("127.0.0.1"):!1}),i=Ye(),r=G(!1),o=G(),a=G(!1),s=N(()=>{if(i.value)return i.value;let T=n.activeUser.value;if(!T?.agents?.length)return;let L=T.primaryAgentId;return T.agents.find(j=>j.agentId===L)||T.agents[0]}),c=Ye(),u=Ye();lt(()=>s.value?.agentId,T=>{if(!T||!s.value){c.value=void 0,u.value=void 0;return}let L=new on({config:s.value});c.value=L,u.value=new ll({sdk:n,agent:L,chatStreamFn:async j=>{await n.chat.chatStreamAuthenticated({agentId:T,message:j.message,attachments:j.attachments,conversationId:j.conversationId,history:j.history,onDelta:j.onDelta,onDone:j.onDone,onError:j.onError,onStatus:j.onStatus,onToolActivity:j.onToolActivity,onWorkingEnd:j.onWorkingEnd})}})},{immediate:!0});let d=N(()=>dR({hasToken:!!n.token.value,hasAgent:!!s.value,isNewAgent:a.value,botReady:r.value,provisionError:o.value})),p=N(()=>`${Er(n.apiBase,n.isDev)}/`);function m(T){i.value=T,o.value=void 0,r.value=!1,a.value=!0}function f(){r.value=!0}function S(T){o.value=T}function z(){o.value=void 0,r.value=!1}return(T,L)=>(v(),x("div",{class:"size-full flex flex-col bg-theme-0","data-test":"onboard-widget","data-test-state":d.value},[y("div",mR,[y("span",fR,ce(s.value?.name||"PageLines"),1),t.onClose?(v(),x("button",{key:0,class:"text-theme-400 hover:text-theme-600 transition-colors cursor-pointer",onClick:L[0]||(L[0]=j=>t.onClose?.())},[...L[1]||(L[1]=[y("svg",{xmlns:"http://www.w3.org/2000/svg",class:"size-5",viewBox:"0 0 20 20",fill:"currentColor"},[y("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)])])):Y("",!0)]),y("div",hR,[d.value==="auth"?(v(),Fe(QP,{key:0,sdk:Ie(n)},null,8,["sdk"])):Y("",!0),d.value==="create"?(v(),Fe(oR,{key:1,sdk:Ie(n),onCreated:m},null,8,["sdk"])):Y("",!0),d.value==="provisioning"&&s.value?(v(),Fe(uR,{key:2,sdk:Ie(n),"agent-id":s.value.agentId||"",onReady:f,onError:S},null,8,["sdk","agent-id"])):Y("",!0),d.value==="chat"&&c.value&&u.value?(v(),Fe(Hi,{key:3,"chat-controller":u.value,agent:c.value,variant:"light",class:"size-full"},null,8,["chat-controller","agent"])):Y("",!0),d.value==="error"?(v(),x("div",gR,[y("div",vR,[y("p",bR,ce(o.value),1),y("button",{class:"px-6 py-2.5 rounded-lg bg-primary-600 text-white text-sm font-medium hover:bg-primary-500 transition-colors cursor-pointer",onClick:z}," Try again ")])])):Y("",!0)]),d.value==="chat"?(v(),x("div",yR,[y("a",{href:p.value,target:"_blank",class:"text-xs text-theme-400 hover:text-primary-600 transition-colors"}," Go to Dashboard \u2192 ",8,xR)])):Y("",!0)],8,pR))}}),kR={class:"relative size-16 rounded-full overflow-hidden"},_R=["src","alt"],$R={class:"flex items-center shrink-0 border-b border-theme-100 px-4 py-3"},SR={class:"flex items-center gap-3 flex-1 min-w-0"},ER=["src","alt"],IR={class:"min-w-0"},TR={class:"text-sm font-medium text-theme-900 truncate"},zR={class:"flex-1 overflow-hidden"},NR={class:"shrink-0 flex items-center justify-center border-t border-theme-100 py-1.5"},CR=["href"],AR=jb(Ae({__name:"AgentWidgetPopup",props:{sdk:{},handle:{},agent:{},context:{},firstMessage:{},position:{},chatController:{}},setup(e,{expose:t}){let n=e,i=G(!1),r=G(!1),o=Ye(),{currentAgent:a,currentContext:s,currentFirstMessage:c,update:u}=fa(n),d=N(()=>({"bottom-left":"bottom-4 left-4 sm:bottom-6 sm:left-6","top-right":"top-4 right-4 sm:top-6 sm:right-6","top-left":"top-4 left-4 sm:top-6 sm:left-6","bottom-right":"bottom-4 right-4 sm:bottom-6 sm:right-6"})[n.position||"bottom-right"]),p=N(()=>({"bottom-left":"bottom left","top-right":"top right","top-left":"top left","bottom-right":"bottom right"})[n.position||"bottom-right"]),m=N(()=>({"bottom-left":"bottom-0 left-0","top-right":"top-0 right-0","top-left":"top-0 left-0","bottom-right":"bottom-0 right-0"})[n.position||"bottom-right"]);function f(L,j){n.chatController||o.value||(o.value=new ll({sdk:j,agent:L.toConfig(),context:s.value,firstMessage:c.value}))}lt(i,async L=>{if(!L||r.value)return;r.value=!0;let j=n.chatController||o.value;if(j)try{await j.startTextConversation()}catch(D){console.error("AgentWidgetPopup: startTextConversation failed",D)}});function S(){i.value=!i.value}function z(){i.value=!0}function T(){i.value=!1}return t({toggle:S,open:z,close:T,update:u}),(L,j)=>(v(),Fe(Od,{sdk:e.sdk,handle:e.handle,agent:Ie(a),context:Ie(s),"first-message":Ie(c)},{default:bt(({agent:D,sdk:U})=>[D?(v(),x("div",{key:0,ref:()=>f(D,U),class:V(["fixed z-[999999] pointer-events-auto",d.value])},[y("div",{class:V(["widget-container transform-gpu overflow-hidden",i.value?"w-[min(400px,calc(100vw-2rem))] h-[min(600px,calc(100vh-4rem))] shadow-[0_24px_80px_-12px_rgba(0,0,0,0.2),0_8px_24px_-8px_rgba(0,0,0,0.08)]":"w-16 h-16 shadow-[0_8px_32px_-4px_rgba(0,0,0,0.15)] cursor-pointer"]),style:we({"border-radius":i.value?"16px":"32px","transform-origin":p.value}),onClick:j[0]||(j[0]=$=>i.value?void 0:S())},[y("div",{class:V(["absolute size-16 transition-opacity duration-200",[m.value,i.value?"opacity-0 pointer-events-none":"opacity-100"]])},[y("div",kR,[y("img",{src:Ie(da)(D.toConfig()),alt:`${D.name.value} agent`,class:"h-full w-full object-cover pointer-events-none",width:"64",height:"64"},null,8,_R),j[1]||(j[1]=y("div",{class:"absolute inset-0 pointer-events-none bg-gradient-to-br from-transparent via-black/10 to-black/40 opacity-60"},null,-1))])],2),y("div",{class:V(["absolute inset-0 flex flex-col bg-white transition-opacity duration-250",i.value?"opacity-100":"opacity-0 pointer-events-none"])},[y("div",$R,[y("div",SR,[y("img",{src:D.avatarUrl.value,alt:D.name.value,class:"size-8 rounded-full object-cover shrink-0"},null,8,ER),y("div",IR,[y("div",TR,ce(D.displayName.value),1),y("div",{class:V(["text-[11px]",D.desiredStatus.value==="active"?"text-green-500":"text-theme-400"])},ce(D.desiredStatus.value==="active"?"Online":"Offline"),3)])]),y("button",{class:"cursor-pointer flex items-center justify-center p-2 -mr-1 rounded-xl text-theme-400 hover:text-theme-600 hover:bg-theme-50 transition-colors",onClick:_t(T,["stop"])},[...j[2]||(j[2]=[y("i",{class:"size-5 i-tabler-x"},null,-1)])])]),y("div",zR,[r.value?(v(),Fe(Hi,{key:0,"chat-controller":e.chatController||o.value,agent:D,variant:"light","setup-hint":"","empty-state-message":"Send a message to get started"},null,8,["chat-controller","agent"])):Y("",!0)]),y("div",NR,[y("a",{href:Ie(Yi).urls.app,target:"_blank",rel:"noopener",class:"text-[10px] text-theme-300 hover:text-theme-400 transition-colors"}," Learning Agent\u2122 by PageLines ",8,CR)])],2)],6),D.desiredStatus.value==="active"?(v(),x("div",{key:0,class:V(["absolute top-[5%] right-[5%] transition-opacity duration-200 pointer-events-none",i.value?"opacity-0":"opacity-100"])},[...j[3]||(j[3]=[y("div",{class:"size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",style:{"animation-duration":"5s"}},null,-1),y("div",{class:"size-3 bg-green-500 rounded-full ring-2 ring-white"},null,-1)])],2)):Y("",!0)],2)):Y("",!0)]),_:1},8,["sdk","handle","agent","context","first-message"]))}}),[["__scopeId","data-v-96deba7b"]]),un=yn("PLWidget"),ul=class Wi{static create(t){return new Wi(t)}static collectPageContext(){if(typeof window>"u"||typeof document>"u")return"";let t=[],n=window.location.href;n&&t.push(`Page URL: ${n}`);let i=document.title;i&&t.push(`Page title: ${i}`);let r=document.querySelector('meta[name="description"]')?.getAttribute("content");r&&t.push(`Page description: ${r}`);let o=document.querySelector('meta[property="og:title"]')?.getAttribute("content");o&&o!==i&&t.push(`OG title: ${o}`);let a=document.referrer;a&&t.push(`Referrer: ${a}`);let s=window.location.pathname;return s&&s!=="/"&&t.push(`Path: ${s}`),t.join(`
177
177
  `)}constructor(t){Z(this,"app",null),Z(this,"shadowRoot",null),Z(this,"widgetInstance",null),Z(this,"config",void 0),Z(this,"sdk",void 0),Z(this,"container",null);let n=[Wi.collectPageContext(),t.context||""].filter(Boolean).join(`
178
178