tracer-sh 0.2.5 → 0.2.7

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.
@@ -1,191 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-C3igFa7L.js","assets/index-B7y1naN3.js","assets/index-CxrnanDH.css","assets/SearchableSelect-B006wjjM.js"])))=>i.map(i=>d[i]);
2
- import{s as SP,e as CP,f as or,g as te,_ as Vu,h as KT,l as IP,i as es,o as ze,k as me,m as qt,n as $n,p as OP,q as _s,v as PP,w as NP,x as Ke,y as DP,r as m,z as In,j as E,B as nc,D as Xp,R as RP,c as Vt,b as z,E as LP,F as bn,G as MP,H as GT,W as Oa,t as bt,U as va,I as XT,J as ZT,K as Pg,L as iu,N as jP,O as Ng,P as gh,C as BP}from"./index-B7y1naN3.js";import{r as ks,u as FP}from"./SearchableSelect-B006wjjM.js";const QT=new Set(["timestamp","start","end","created_at","updated_at","time"]);function $P(e,t){return QT.has(e)?t>1e12:/time/i.test(e)&&t>1e12&&t<3e12}function UP(e,t){return QT.has(e)?t>1e9&&t<1e12:/time/i.test(e)&&t>1e9&&t<3e9}var JT="vercel.ai.error",HP=Symbol.for(JT),Dg,Rg,nn=class ew extends(Rg=Error,Dg=HP,Rg){constructor({name:t,message:r,cause:n}){super(r),this[Dg]=!0,this.name=t,this.cause=n}static isInstance(t){return ew.hasMarker(t,JT)}static hasMarker(t,r){const n=Symbol.for(r);return t!=null&&typeof t=="object"&&n in t&&typeof t[n]=="boolean"&&t[n]===!0}};function tw(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var rw="AI_InvalidArgumentError",nw=`vercel.ai.error.${rw}`,zP=Symbol.for(nw),Lg,Mg,qP=class extends(Mg=nn,Lg=zP,Mg){constructor({message:e,cause:t,argument:r}){super({name:rw,message:e,cause:t}),this[Lg]=!0,this.argument=r}static isInstance(e){return nn.hasMarker(e,nw)}},iw="AI_JSONParseError",aw=`vercel.ai.error.${iw}`,WP=Symbol.for(aw),jg,Bg,Fg=class extends(Bg=nn,jg=WP,Bg){constructor({text:e,cause:t}){super({name:iw,message:`JSON parsing failed: Text: ${e}.
3
- Error message: ${tw(t)}`,cause:t}),this[jg]=!0,this.text=e}static isInstance(e){return nn.hasMarker(e,aw)}},ow="AI_TypeValidationError",sw=`vercel.ai.error.${ow}`,VP=Symbol.for(sw),$g,Ug,Pa=class bh extends(Ug=nn,$g=VP,Ug){constructor({value:t,cause:r,context:n}){let i="Type validation failed";if(n?.field&&(i+=` for ${n.field}`),n?.entityName||n?.entityId){i+=" (";const a=[];n.entityName&&a.push(n.entityName),n.entityId&&a.push(`id: "${n.entityId}"`),i+=a.join(", "),i+=")"}super({name:ow,message:`${i}: Value: ${JSON.stringify(t)}.
4
- Error message: ${tw(r)}`,cause:r}),this[$g]=!0,this.value=t,this.context=n}static isInstance(t){return nn.hasMarker(t,sw)}static wrap({value:t,cause:r,context:n}){var i,a,o;return bh.isInstance(r)&&r.value===t&&((i=r.context)==null?void 0:i.field)===n?.field&&((a=r.context)==null?void 0:a.entityName)===n?.entityName&&((o=r.context)==null?void 0:o.entityId)===n?.entityId?r:new bh({value:t,cause:r,context:n})}},ts;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function r(i){throw new Error}e.assertNever=r,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ts||(ts={}));var Hg;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Hg||(Hg={}));ts.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);ts.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Yu extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){const r=t||function(a){return a.message},n={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)n._errors.push(r(o));else{let s=n,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(o))):s[l]=s[l]||{_errors:[]},s=s[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof Yu))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ts.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r=Object.create(null),n=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];r[a]=r[a]||[],r[a].push(t(i))}else n.push(t(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Yu.create=e=>new Yu(e);var zg;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(zg||(zg={}));var ye;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(ye||(ye={}));class qg extends Error{constructor(t,r){super(t),this.name="ParseError",this.type=r.type,this.field=r.field,this.value=r.value,this.line=r.line}}const Wg=10,YP=13,fi=32;function df(e){}function KP(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=df,onError:r=df,onRetry:n=df,onComment:i}=e,a=[];let o=!0,s,u="",l=0,c;function f(v){if(o&&(o=!1,v.charCodeAt(0)===239&&v.charCodeAt(1)===187&&v.charCodeAt(2)===191&&(v=v.slice(3))),a.length===0){const _=d(v);_!==""&&a.push(_);return}if(v.indexOf(`
5
- `)===-1&&v.indexOf("\r")===-1){a.push(v);return}a.push(v);const T=a.join("");a.length=0;const x=d(T);x!==""&&a.push(x)}function d(v){let T=0;if(v.indexOf("\r")===-1){let x=v.indexOf(`
6
- `,T);for(;x!==-1;){if(T===x){l>0&&t({id:s,event:c,data:u}),s=void 0,u="",l=0,c=void 0,T=x+1,x=v.indexOf(`
7
- `,T);continue}const _=v.charCodeAt(T);if(Vg(v,T,_)){const w=v.charCodeAt(T+5)===fi?T+6:T+5,A=v.slice(w,x);if(l===0&&v.charCodeAt(x+1)===Wg){t({id:s,event:c,data:A}),s=void 0,u="",c=void 0,T=x+2,x=v.indexOf(`
8
- `,T);continue}u=l===0?A:`${u}
9
- ${A}`,l++}else Yg(v,T,_)?c=v.slice(v.charCodeAt(T+6)===fi?T+7:T+6,x)||void 0:h(v,T,x);T=x+1,x=v.indexOf(`
10
- `,T)}return v.slice(T)}for(;T<v.length;){const x=v.indexOf("\r",T),_=v.indexOf(`
11
- `,T);let w=-1;if(x!==-1&&_!==-1?w=x<_?x:_:x!==-1?x===v.length-1?w=-1:w=x:_!==-1&&(w=_),w===-1)break;h(v,T,w),T=w+1,v.charCodeAt(T-1)===YP&&v.charCodeAt(T)===Wg&&T++}return v.slice(T)}function h(v,T,x){if(T===x){b();return}const _=v.charCodeAt(T);if(Vg(v,T,_)){const C=v.charCodeAt(T+5)===fi?T+6:T+5,M=v.slice(C,x);u=l===0?M:`${u}
12
- ${M}`,l++;return}if(Yg(v,T,_)){c=v.slice(v.charCodeAt(T+6)===fi?T+7:T+6,x)||void 0;return}if(_===105&&v.charCodeAt(T+1)===100&&v.charCodeAt(T+2)===58){const C=v.slice(v.charCodeAt(T+3)===fi?T+4:T+3,x);s=C.includes("\0")?void 0:C;return}if(_===58){if(i){const C=v.slice(T,x);i(C.slice(v.charCodeAt(T+1)===fi?2:1))}return}const w=v.slice(T,x),A=w.indexOf(":");if(A===-1){p(w,"",w);return}const S=w.slice(0,A),O=w.charCodeAt(A+1)===fi?2:1,R=w.slice(A+O);p(S,R,w)}function p(v,T,x){switch(v){case"event":c=T||void 0;break;case"data":u=l===0?T:`${u}
13
- ${T}`,l++;break;case"id":s=T.includes("\0")?void 0:T;break;case"retry":/^\d+$/.test(T)?n(parseInt(T,10)):r(new qg(`Invalid \`retry\` value: "${T}"`,{type:"invalid-retry",value:T,line:x}));break;default:r(new qg(`Unknown field "${v.length>20?`${v.slice(0,20)}…`:v}"`,{type:"unknown-field",field:v,value:T,line:x}));break}}function b(){l>0&&t({id:s,event:c,data:u}),s=void 0,u="",l=0,c=void 0}function y(v={}){if(v.consume&&a.length>0){const T=a.join("");h(T,0,T.length)}o=!0,s=void 0,u="",l=0,c=void 0,a.length=0}return{feed:f,reset:y}}function Vg(e,t,r){return r===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function Yg(e,t,r){return r===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}class GP extends TransformStream{constructor({onError:t,onRetry:r,onComment:n}={}){let i;super({start(a){i=KP({onEvent:o=>{a.enqueue(o)},onError(o){t==="terminate"?a.error(o):typeof t=="function"&&t(o)},onRetry:r,onComment:n})},transform(a){i.feed(a)}})}}var Ss=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{const i=()=>{const a=r.length,o=new Array(t);for(let s=0;s<t;s++)o[s]=r[Math.random()*a|0];return o.join("")};if(e==null)return i;if(r.includes(n))throw new qP({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${r}".`});return()=>`${e}${n}${i()}`},XP=Ss();function na(e){if(e==null)return{};const t={};if(e instanceof Headers)e.forEach((r,n)=>{t[n.toLowerCase()]=r});else{Array.isArray(e)||(e=Object.entries(e));for(const[r,n]of e)n!=null&&(t[r.toLowerCase()]=n)}return t}var ZP=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,QP=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Kg(e){const t=JSON.parse(e);return t===null||typeof t!="object"||ZP.test(e)===!1&&QP.test(e)===!1?t:JP(t)}function JP(e){let t=[e];for(;t.length;){const r=t;t=[];for(const n of r){if(Object.prototype.hasOwnProperty.call(n,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(n,"constructor")&&n.constructor!==null&&typeof n.constructor=="object"&&Object.prototype.hasOwnProperty.call(n.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const i in n){const a=n[i];a&&typeof a=="object"&&t.push(a)}}}return e}function eN(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return Kg(e)}try{return Kg(e)}finally{Error.stackTraceLimit=t}}function Zp(e){if(e.type==="object"||Array.isArray(e.type)&&e.type.includes("object")){e.additionalProperties=!1;const{properties:r}=e;if(r!=null)for(const n of Object.keys(r))r[n]=di(r[n])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(di):di(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(di)),e.allOf!=null&&(e.allOf=e.allOf.map(di)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(di));const{definitions:t}=e;if(t!=null)for(const r of Object.keys(t))t[r]=di(t[r]);return e}function di(e){return typeof e=="boolean"?e:Zp(e)}var tN=Symbol("Let zodToJsonSchema decide on which parser to use"),Gg={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},rN=e=>typeof e=="string"?{...Gg,name:e}:{...Gg,...e};function gr(){return{}}function nN(e,t){var r,n,i;const a={type:"array"};return(r=e.type)!=null&&r._def&&((i=(n=e.type)==null?void 0:n._def)==null?void 0:i.typeName)!==ye.ZodAny&&(a.items=je(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(a.minItems=e.minLength.value),e.maxLength&&(a.maxItems=e.maxLength.value),e.exactLength&&(a.minItems=e.exactLength.value,a.maxItems=e.exactLength.value),a}function iN(e){const t={type:"integer",format:"int64"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function aN(){return{type:"boolean"}}function uw(e,t){return je(e.type._def,t)}var oN=(e,t)=>je(e.innerType._def,t);function lw(e,t,r){const n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,a)=>lw(e,t,i))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return sN(e)}}var sN=e=>{const t={type:"integer",format:"unix-time"};for(const r of e.checks)switch(r.kind){case"min":t.minimum=r.value;break;case"max":t.maximum=r.value;break}return t};function uN(e,t){return{...je(e.innerType._def,t),default:e.defaultValue()}}function lN(e,t){return t.effectStrategy==="input"?je(e.schema._def,t):gr()}function cN(e){return{type:"string",enum:Array.from(e.values)}}var fN=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function dN(e,t){const r=[je(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),je(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=[];return r.forEach(i=>{if(fN(i))n.push(...i.allOf);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:o,...s}=i;a=s}n.push(a)}}),n.length?{allOf:n}:void 0}function hN(e){const t=typeof e.value;return t!=="bigint"&&t!=="number"&&t!=="boolean"&&t!=="string"?{type:Array.isArray(e.value)?"array":"object"}:{type:t==="bigint"?"integer":t,const:e.value}}var hf=void 0,Nr={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(hf===void 0&&(hf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),hf),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function cw(e,t){const r={type:"string"};if(e.checks)for(const n of e.checks)switch(n.kind){case"min":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value;break;case"max":r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"email":switch(t.emailStrategy){case"format:email":Dr(r,"email",n.message,t);break;case"format:idn-email":Dr(r,"idn-email",n.message,t);break;case"pattern:zod":Ut(r,Nr.email,n.message,t);break}break;case"url":Dr(r,"uri",n.message,t);break;case"uuid":Dr(r,"uuid",n.message,t);break;case"regex":Ut(r,n.regex,n.message,t);break;case"cuid":Ut(r,Nr.cuid,n.message,t);break;case"cuid2":Ut(r,Nr.cuid2,n.message,t);break;case"startsWith":Ut(r,RegExp(`^${pf(n.value,t)}`),n.message,t);break;case"endsWith":Ut(r,RegExp(`${pf(n.value,t)}$`),n.message,t);break;case"datetime":Dr(r,"date-time",n.message,t);break;case"date":Dr(r,"date",n.message,t);break;case"time":Dr(r,"time",n.message,t);break;case"duration":Dr(r,"duration",n.message,t);break;case"length":r.minLength=typeof r.minLength=="number"?Math.max(r.minLength,n.value):n.value,r.maxLength=typeof r.maxLength=="number"?Math.min(r.maxLength,n.value):n.value;break;case"includes":{Ut(r,RegExp(pf(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Dr(r,"ipv4",n.message,t),n.version!=="v4"&&Dr(r,"ipv6",n.message,t);break}case"base64url":Ut(r,Nr.base64url,n.message,t);break;case"jwt":Ut(r,Nr.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&Ut(r,Nr.ipv4Cidr,n.message,t),n.version!=="v4"&&Ut(r,Nr.ipv6Cidr,n.message,t);break}case"emoji":Ut(r,Nr.emoji(),n.message,t);break;case"ulid":{Ut(r,Nr.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Dr(r,"binary",n.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{Ut(r,Nr.base64,n.message,t);break}}break}case"nanoid":Ut(r,Nr.nanoid,n.message,t)}return r}function pf(e,t){return t.patternStrategy==="escape"?mN(e):e}var pN=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function mN(e){let t="";for(let r=0;r<e.length;r++)pN.has(e[r])||(t+="\\"),t+=e[r];return t}function Dr(e,t,r,n){var i;e.format||(i=e.anyOf)!=null&&i.some(a=>a.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):e.format=t}function Ut(e,t,r,n){var i;e.pattern||(i=e.allOf)!=null&&i.some(a=>a.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:Xg(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=Xg(t,n)}function Xg(e,t){var r;if(!t.applyRegexFlags||!e.flags)return e.source;const n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},i=n.i?e.source.toLowerCase():e.source;let a="",o=!1,s=!1,u=!1;for(let l=0;l<i.length;l++){if(o){a+=i[l],o=!1;continue}if(n.i){if(s){if(i[l].match(/[a-z]/)){u?(a+=i[l],a+=`${i[l-2]}-${i[l]}`.toUpperCase(),u=!1):i[l+1]==="-"&&((r=i[l+2])!=null&&r.match(/[a-z]/))?(a+=i[l],u=!0):a+=`${i[l]}${i[l].toUpperCase()}`;continue}}else if(i[l].match(/[a-z]/)){a+=`[${i[l]}${i[l].toUpperCase()}]`;continue}}if(n.m){if(i[l]==="^"){a+=`(^|(?<=[\r
14
- ]))`;continue}else if(i[l]==="$"){a+=`($|(?=[\r
15
- ]))`;continue}}if(n.s&&i[l]==="."){a+=s?`${i[l]}\r
16
- `:`[${i[l]}\r
17
- ]`;continue}a+=i[l],i[l]==="\\"?o=!0:s&&i[l]==="]"?s=!1:!s&&i[l]==="["&&(s=!0)}try{new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}function fw(e,t){var r,n,i,a,o,s;const u={type:"object",additionalProperties:(r=je(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===ye.ZodString&&((i=e.keyType._def.checks)!=null&&i.length)){const{type:l,...c}=cw(e.keyType._def,t);return{...u,propertyNames:c}}else{if(((a=e.keyType)==null?void 0:a._def.typeName)===ye.ZodEnum)return{...u,propertyNames:{enum:e.keyType._def.values}};if(((o=e.keyType)==null?void 0:o._def.typeName)===ye.ZodBranded&&e.keyType._def.type._def.typeName===ye.ZodString&&((s=e.keyType._def.type._def.checks)!=null&&s.length)){const{type:l,...c}=uw(e.keyType._def,t);return{...u,propertyNames:c}}}return u}function gN(e,t){if(t.mapStrategy==="record")return fw(e,t);const r=je(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||gr(),n=je(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||gr();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function bN(e){const t=e.values,n=Object.keys(e.values).filter(a=>typeof t[t[a]]!="number").map(a=>t[a]),i=Array.from(new Set(n.map(a=>typeof a)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:n}}function yN(){return{not:gr()}}function vN(){return{type:"null"}}var yh={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function xN(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in yh&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((i,a)=>{const o=yh[a._def.typeName];return o&&!i.includes(o)?[...i,o]:i},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((i,a)=>{const o=typeof a._def.value;switch(o){case"string":case"number":case"boolean":return[...i,o];case"bigint":return[...i,"integer"];case"object":if(a._def.value===null)return[...i,"null"];default:return i}},[]);if(n.length===r.length){const i=n.filter((a,o,s)=>s.indexOf(a)===o);return{type:i.length>1?i:i[0],enum:r.reduce((a,o)=>a.includes(o._def.value)?a:[...a,o._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,i)=>[...n,...i._def.values.filter(a=>!n.includes(a))],[])};return EN(e,t)}var EN=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,i)=>je(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${i}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function TN(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[yh[e.innerType._def.typeName],"null"]};const r=je(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function wN(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function AN(e,t){const r={type:"object",properties:{}},n=[],i=e.shape();for(const o in i){let s=i[o];if(s===void 0||s._def===void 0)continue;const u=kN(s),l=je(s._def,{...t,currentPath:[...t.currentPath,"properties",o],propertyPath:[...t.currentPath,"properties",o]});l!==void 0&&(r.properties[o]=l,u||n.push(o))}n.length&&(r.required=n);const a=_N(e,t);return a!==void 0&&(r.additionalProperties=a),r}function _N(e,t){if(e.catchall._def.typeName!=="ZodNever")return je(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function kN(e){try{return e.isOptional()}catch{return!0}}var SN=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return je(e.innerType._def,t);const n=je(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:gr()},n]}:gr()},CN=(e,t)=>{if(t.pipeStrategy==="input")return je(e.in._def,t);if(t.pipeStrategy==="output")return je(e.out._def,t);const r=je(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=je(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}};function IN(e,t){return je(e.type._def,t)}function ON(e,t){const n={type:"array",uniqueItems:!0,items:je(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function PN(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>je(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:je(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>je(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function NN(){return{not:gr()}}function DN(){return gr()}var RN=(e,t)=>je(e.innerType._def,t),LN=(e,t,r)=>{switch(t){case ye.ZodString:return cw(e,r);case ye.ZodNumber:return wN(e);case ye.ZodObject:return AN(e,r);case ye.ZodBigInt:return iN(e);case ye.ZodBoolean:return aN();case ye.ZodDate:return lw(e,r);case ye.ZodUndefined:return NN();case ye.ZodNull:return vN();case ye.ZodArray:return nN(e,r);case ye.ZodUnion:case ye.ZodDiscriminatedUnion:return xN(e,r);case ye.ZodIntersection:return dN(e,r);case ye.ZodTuple:return PN(e,r);case ye.ZodRecord:return fw(e,r);case ye.ZodLiteral:return hN(e);case ye.ZodEnum:return cN(e);case ye.ZodNativeEnum:return bN(e);case ye.ZodNullable:return TN(e,r);case ye.ZodOptional:return SN(e,r);case ye.ZodMap:return gN(e,r);case ye.ZodSet:return ON(e,r);case ye.ZodLazy:return()=>e.getter()._def;case ye.ZodPromise:return IN(e,r);case ye.ZodNaN:case ye.ZodNever:return yN();case ye.ZodEffects:return lN(e,r);case ye.ZodAny:return gr();case ye.ZodUnknown:return DN();case ye.ZodDefault:return uN(e,r);case ye.ZodBranded:return uw(e,r);case ye.ZodReadonly:return RN(e,r);case ye.ZodCatch:return oN(e,r);case ye.ZodPipeline:return CN(e,r);case ye.ZodFunction:case ye.ZodVoid:case ye.ZodSymbol:return;default:return(n=>{})()}},MN=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function je(e,t,r=!1){var n;const i=t.seen.get(e);if(t.override){const u=(n=t.override)==null?void 0:n.call(t,e,t,i,r);if(u!==tN)return u}if(i&&!r){const u=jN(i,t);if(u!==void 0)return u}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const o=LN(e,e.typeName,t),s=typeof o=="function"?je(o(),t):o;if(s&&BN(e,t,s),t.postProcess){const u=t.postProcess(s,e,t);return a.jsonSchema=s,u}return a.jsonSchema=s,s}var jN=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:MN(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),gr()):t.$refStrategy==="seen"?gr():void 0}},BN=(e,t,r)=>(e.description&&(r.description=e.description),r),FN=e=>{const t=rN(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,i])=>[i._def,{def:i._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},$N=(e,t)=>{var r;const n=FN(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[c,f])=>{var d;return{...l,[c]:(d=je(f._def,{...n,currentPath:[...n.basePath,n.definitionPath,c]},!0))!=null?d:gr()}},{}):void 0;const a=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,o=(r=je(e._def,a===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1))!=null?r:gr(),s=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;s!==void 0&&(o.title=s);const u=a===void 0?i?{...o,[n.definitionPath]:i}:o:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,a].join("/"),[n.definitionPath]:{...i,[a]:o}};return u.$schema="http://json-schema.org/draft-07/schema#",u},vh=Symbol.for("vercel.ai.schema");function UN(e){let t;return()=>(t==null&&(t=e()),t)}function ic(e,{validate:t}={}){return{[vh]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function HN(e){return typeof e=="object"&&e!==null&&vh in e&&e[vh]===!0&&"jsonSchema"in e&&"validate"in e}function Qp(e){return e==null?ic({properties:{},additionalProperties:!1}):HN(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?dw(e):zN(e):e()}function zN(e){return ic(()=>Zp(e["~standard"].jsonSchema.input({target:"draft-07"})),{validate:async t=>{const r=await e["~standard"].validate(t);return"value"in r?{success:!0,value:r.value}:{success:!1,error:new Pa({value:t,cause:r.issues})}}})}function qN(e,t){var r;const n=(r=void 0)!=null?r:!1;return ic(()=>$N(e,{$refStrategy:n?"root":"none"}),{validate:async i=>{const a=await e.safeParseAsync(i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function WN(e,t){var r;const n=(r=void 0)!=null?r:!1;return ic(()=>Zp(CP(e,{target:"draft-7",io:"input",reused:n?"ref":"inline"})),{validate:async i=>{const a=await SP(e,i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function VN(e){return"_zod"in e}function dw(e,t){return VN(e)?WN(e):qN(e)}async function Zg({value:e,schema:t,context:r}){const n=await rs({value:e,schema:t,context:r});if(!n.success)throw Pa.wrap({value:e,cause:n.error,context:r});return n.value}async function rs({value:e,schema:t,context:r}){const n=Qp(t);try{if(n.validate==null)return{success:!0,value:e,rawValue:e};const i=await n.validate(e);return i.success?{success:!0,value:i.value,rawValue:e}:{success:!1,error:Pa.wrap({value:e,cause:i.error,context:r}),rawValue:e}}catch(i){return{success:!1,error:Pa.wrap({value:e,cause:i,context:r}),rawValue:e}}}async function Di({text:e,schema:t}){try{const r=eN(e);return t==null?{success:!0,value:r,rawValue:r}:await rs({value:r,schema:t})}catch(r){return{success:!1,error:Fg.isInstance(r)?r:new Fg({text:e,cause:r}),rawValue:void 0}}}function YN({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new GP).pipeThrough(new TransformStream({async transform({data:r},n){r!=="[DONE]"&&n.enqueue(await Di({text:r,schema:t}))}}))}async function qn(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var KN=Object.defineProperty,GN=(e,t)=>{for(var r in t)KN(e,r,{get:t[r],enumerable:!0})},hw="AI_NoObjectGeneratedError",pw=`vercel.ai.error.${hw}`,XN=Symbol.for(pw),mw,Zn=class extends nn{constructor({message:e="No object generated.",cause:t,text:r,response:n,usage:i,finishReason:a}){super({name:hw,message:e,cause:t}),this[mw]=!0,this.text=r,this.response=n,this.usage=i,this.finishReason=a}static isInstance(e){return nn.hasMarker(e,pw)}};mw=XN;var gw="AI_UIMessageStreamError",bw=`vercel.ai.error.${gw}`,ZN=Symbol.for(bw),yw,ia=class extends nn{constructor({chunkType:e,chunkId:t,message:r}){super({name:gw,message:r}),this[yw]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return nn.hasMarker(e,bw)}};yw=ZN;var vw=or([te(),Vu(Uint8Array),Vu(ArrayBuffer),KT(e=>{var t,r;return(r=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?r:!1},{message:"Must be a Buffer"})]),ns=IP(()=>or([PP(),te(),NP(),qt(),es(te(),ns.optional()),_s(ns)])),Se=es(te(),es(te(),ns.optional())),xw=ze({type:me("text"),text:te(),providerOptions:Se.optional()}),QN=ze({type:me("image"),image:or([vw,Vu(URL)]),mediaType:te().optional(),providerOptions:Se.optional()}),Ew=ze({type:me("file"),data:or([vw,Vu(URL)]),filename:te().optional(),mediaType:te(),providerOptions:Se.optional()}),JN=ze({type:me("reasoning"),text:te(),providerOptions:Se.optional()}),e3=ze({type:me("tool-call"),toolCallId:te(),toolName:te(),input:$n(),providerOptions:Se.optional(),providerExecuted:qt().optional()}),t3=OP("type",[ze({type:me("text"),value:te(),providerOptions:Se.optional()}),ze({type:me("json"),value:ns,providerOptions:Se.optional()}),ze({type:me("execution-denied"),reason:te().optional(),providerOptions:Se.optional()}),ze({type:me("error-text"),value:te(),providerOptions:Se.optional()}),ze({type:me("error-json"),value:ns,providerOptions:Se.optional()}),ze({type:me("content"),value:_s(or([ze({type:me("text"),text:te(),providerOptions:Se.optional()}),ze({type:me("media"),data:te(),mediaType:te()}),ze({type:me("file-data"),data:te(),mediaType:te(),filename:te().optional(),providerOptions:Se.optional()}),ze({type:me("file-url"),url:te(),providerOptions:Se.optional()}),ze({type:me("file-id"),fileId:or([te(),es(te(),te())]),providerOptions:Se.optional()}),ze({type:me("image-data"),data:te(),mediaType:te(),providerOptions:Se.optional()}),ze({type:me("image-url"),url:te(),providerOptions:Se.optional()}),ze({type:me("image-file-id"),fileId:or([te(),es(te(),te())]),providerOptions:Se.optional()}),ze({type:me("custom"),providerOptions:Se.optional()})]))})]),Tw=ze({type:me("tool-result"),toolCallId:te(),toolName:te(),output:t3,providerOptions:Se.optional()}),r3=ze({type:me("tool-approval-request"),approvalId:te(),toolCallId:te()}),n3=ze({type:me("tool-approval-response"),approvalId:te(),approved:qt(),reason:te().optional()}),i3=ze({role:me("system"),content:te(),providerOptions:Se.optional()}),a3=ze({role:me("user"),content:or([te(),_s(or([xw,QN,Ew]))]),providerOptions:Se.optional()}),o3=ze({role:me("assistant"),content:or([te(),_s(or([xw,Ew,JN,e3,Tw,r3]))]),providerOptions:Se.optional()}),s3=ze({role:me("tool"),content:_s(or([Tw,n3])),providerOptions:Se.optional()});or([i3,a3,o3,s3]);function ww(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const r={...e};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const i=t[n];if(i===void 0)continue;const a=n in e?e[n]:void 0,o=i!==null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=a!=null&&typeof a=="object"&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);o&&s?r[n]=ww(a,i):r[n]=i}return r}var u3={};GN(u3,{array:()=>d3,choice:()=>h3,json:()=>p3,object:()=>f3,text:()=>c3});function l3(e){const t=["ROOT"];let r=-1,n=null;function i(u,l,c){switch(u){case'"':{r=l,t.pop(),t.push(c),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{r=l,n=l,t.pop(),t.push(c),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=l,t.pop(),t.push(c),t.push("INSIDE_NUMBER");break}case"{":{r=l,t.pop(),t.push(c),t.push("INSIDE_OBJECT_START");break}case"[":{r=l,t.pop(),t.push(c),t.push("INSIDE_ARRAY_START");break}}}function a(u,l){switch(u){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{r=l,t.pop();break}}}function o(u,l){switch(u){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=l,t.pop();break}}}for(let u=0;u<e.length;u++){const l=e[u];switch(t[t.length-1]){case"ROOT":i(l,u,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{r=u,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_KEY"));break}case"INSIDE_OBJECT_KEY":{l==='"'&&(t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY"));break}case"INSIDE_OBJECT_AFTER_KEY":{l===":"&&(t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE"));break}case"INSIDE_OBJECT_BEFORE_VALUE":{i(l,u,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{a(l,u);break}case"INSIDE_STRING":{switch(l){case'"':{t.pop(),r=u;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:r=u}break}case"INSIDE_ARRAY_START":{l==="]"?(r=u,t.pop()):(r=u,i(l,u,"INSIDE_ARRAY_AFTER_VALUE"));break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=u,t.pop();break}default:{r=u;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{i(l,u,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),r=u;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=u;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&o(l,u),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,u);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&a(l,u);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&o(l,u);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{const f=e.substring(n,u+1);!"false".startsWith(f)&&!"true".startsWith(f)&&!"null".startsWith(f)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?a(l,u):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&o(l,u)):r=u;break}}}let s=e.slice(0,r+1);for(let u=t.length-1;u>=0;u--)switch(t[u]){case"INSIDE_STRING":{s+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{s+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{s+="]";break}case"INSIDE_LITERAL":{const c=e.substring(n,e.length);"true".startsWith(c)?s+="true".slice(c.length):"false".startsWith(c)?s+="false".slice(c.length):"null".startsWith(c)&&(s+="null".slice(c.length))}}return s}async function Cs(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Di({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Di({text:l3(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var c3=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),f3=({schema:e,name:t,description:r})=>{const n=Qp(e);return{name:"object",responseFormat:qn(n.jsonSchema).then(i=>({type:"json",schema:i,...t!=null&&{name:t},...r!=null&&{description:r}})),async parseCompleteOutput({text:i},a){const o=await Di({text:i});if(!o.success)throw new Zn({message:"No object generated: could not parse the response.",cause:o.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const s=await rs({value:o.value,schema:n});if(!s.success)throw new Zn({message:"No object generated: response did not match schema.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});return s.value},async parsePartialOutput({text:i}){const a=await Cs(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:a.value}}},createElementStreamTransform(){}}},d3=({element:e,name:t,description:r})=>{const n=Qp(e);return{name:"array",responseFormat:qn(n.jsonSchema).then(i=>{const{$schema:a,...o}=i;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:o}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}}),async parseCompleteOutput({text:i},a){const o=await Di({text:i});if(!o.success)throw new Zn({message:"No object generated: could not parse the response.",cause:o.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const s=o.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))throw new Zn({message:"No object generated: response did not match schema.",cause:new Pa({value:s,cause:"response must be an object with an elements array"}),text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});for(const u of s.elements){const l=await rs({value:u,schema:n});if(!l.success)throw new Zn({message:"No object generated: response did not match schema.",cause:l.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason})}return s.elements},async parsePartialOutput({text:i}){const a=await Cs(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const o=a.value;if(o==null||typeof o!="object"||!("elements"in o)||!Array.isArray(o.elements))return;const s=a.state==="repaired-parse"&&o.elements.length>0?o.elements.slice(0,-1):o.elements,u=[];for(const l of s){const c=await rs({value:l,schema:n});c.success&&u.push(c.value)}return{partial:u}}}},createElementStreamTransform(){let i=0;return new TransformStream({transform({partialOutput:a},o){if(a!=null)for(;i<a.length;i++)o.enqueue(a[i])}})}}},h3=({options:e,name:t,description:r})=>({name:"choice",responseFormat:Promise.resolve({type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}),async parseCompleteOutput({text:n},i){const a=await Di({text:n});if(!a.success)throw new Zn({message:"No object generated: could not parse the response.",cause:a.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});const o=a.value;if(o==null||typeof o!="object"||!("result"in o)||typeof o.result!="string"||!e.includes(o.result))throw new Zn({message:"No object generated: response did not match schema.",cause:new Pa({value:o,cause:"response must be an object that contains a choice value."}),text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});return o.result},async parsePartialOutput({text:n}){const i=await Cs(n);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const a=i.value;if(a==null||typeof a!="object"||!("result"in a)||typeof a.result!="string")return;const o=e.filter(s=>s.startsWith(a.result));return i.state==="successful-parse"?o.includes(a.result)?{partial:a.result}:void 0:o.length===1?{partial:o[0]}:void 0}}},createElementStreamTransform(){}}),p3=({name:e,description:t}={})=>({name:"json",responseFormat:Promise.resolve({type:"json",...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:r},n){const i=await Di({text:r});if(!i.success)throw new Zn({message:"No object generated: could not parse the response.",cause:i.error,text:r,response:n.response,usage:n.usage,finishReason:n.finishReason});return i.value},async parsePartialOutput({text:r}){const n=await Cs(r);switch(n.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return n.value===void 0?void 0:{partial:n.value}}},createElementStreamTransform(){}});Ss({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
18
-
19
- `)},flush(e){e.enqueue(`data: [DONE]
20
-
21
- `)}})}});var m3=UN(()=>dw(or([Ke({type:me("text-start"),id:te(),providerMetadata:Se.optional()}),Ke({type:me("text-delta"),id:te(),delta:te(),providerMetadata:Se.optional()}),Ke({type:me("text-end"),id:te(),providerMetadata:Se.optional()}),Ke({type:me("error"),errorText:te()}),Ke({type:me("tool-input-start"),toolCallId:te(),toolName:te(),providerExecuted:qt().optional(),providerMetadata:Se.optional(),dynamic:qt().optional(),title:te().optional()}),Ke({type:me("tool-input-delta"),toolCallId:te(),inputTextDelta:te()}),Ke({type:me("tool-input-available"),toolCallId:te(),toolName:te(),input:$n(),providerExecuted:qt().optional(),providerMetadata:Se.optional(),dynamic:qt().optional(),title:te().optional()}),Ke({type:me("tool-input-error"),toolCallId:te(),toolName:te(),input:$n(),providerExecuted:qt().optional(),providerMetadata:Se.optional(),dynamic:qt().optional(),errorText:te(),title:te().optional()}),Ke({type:me("tool-approval-request"),approvalId:te(),toolCallId:te()}),Ke({type:me("tool-output-available"),toolCallId:te(),output:$n(),providerExecuted:qt().optional(),providerMetadata:Se.optional(),dynamic:qt().optional(),preliminary:qt().optional()}),Ke({type:me("tool-output-error"),toolCallId:te(),errorText:te(),providerExecuted:qt().optional(),providerMetadata:Se.optional(),dynamic:qt().optional()}),Ke({type:me("tool-output-denied"),toolCallId:te()}),Ke({type:me("reasoning-start"),id:te(),providerMetadata:Se.optional()}),Ke({type:me("reasoning-delta"),id:te(),delta:te(),providerMetadata:Se.optional()}),Ke({type:me("reasoning-end"),id:te(),providerMetadata:Se.optional()}),Ke({type:me("source-url"),sourceId:te(),url:te(),title:te().optional(),providerMetadata:Se.optional()}),Ke({type:me("source-document"),sourceId:te(),mediaType:te(),title:te(),filename:te().optional(),providerMetadata:Se.optional()}),Ke({type:me("file"),url:te(),mediaType:te(),providerMetadata:Se.optional()}),Ke({type:KT(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:te().optional(),data:$n(),transient:qt().optional()}),Ke({type:me("start-step")}),Ke({type:me("finish-step")}),Ke({type:me("start"),messageId:te().optional(),messageMetadata:$n().optional()}),Ke({type:me("finish"),finishReason:DP(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:$n().optional()}),Ke({type:me("abort"),reason:te().optional()}),Ke({type:me("message-metadata"),messageMetadata:$n()})])));function g3(e){return e.type.startsWith("data-")}function xh(e){return e.type.startsWith("tool-")}function b3(e){return e.type==="dynamic-tool"}function Ku(e){return xh(e)||b3(e)}function Qg(e){return e.type.split("-").slice(1).join("-")}function Aw({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function _w({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:n,onError:i,onToolCall:a,onData:o}){return e.pipeThrough(new TransformStream({async transform(s,u){await n(async({state:l,write:c})=>{var f,d,h,p;function b(x){const w=l.message.parts.filter(Ku).find(A=>A.toolCallId===x);if(w==null)throw new ia({chunkType:"tool-invocation",chunkId:x,message:`No tool invocation found for tool call ID "${x}".`});return w}function y(x){var _;const w=l.message.parts.find(O=>xh(O)&&O.toolCallId===x.toolCallId),A=x,S=w;if(w!=null){w.state=x.state,S.input=A.input,S.output=A.output,S.errorText=A.errorText,S.rawInput=A.rawInput,S.preliminary=A.preliminary,x.title!==void 0&&(S.title=x.title),S.providerExecuted=(_=A.providerExecuted)!=null?_:w.providerExecuted;const O=A.providerMetadata;if(O!=null)if(x.state==="output-available"||x.state==="output-error"){const R=w;R.resultProviderMetadata=O}else w.callProviderMetadata=O}else l.message.parts.push({type:`tool-${x.toolName}`,toolCallId:x.toolCallId,state:x.state,title:x.title,input:A.input,output:A.output,rawInput:A.rawInput,errorText:A.errorText,providerExecuted:A.providerExecuted,preliminary:A.preliminary,...A.providerMetadata!=null&&(x.state==="output-available"||x.state==="output-error")?{resultProviderMetadata:A.providerMetadata}:{},...A.providerMetadata!=null&&!(x.state==="output-available"||x.state==="output-error")?{callProviderMetadata:A.providerMetadata}:{}})}function v(x){var _,w;const A=l.message.parts.find(R=>R.type==="dynamic-tool"&&R.toolCallId===x.toolCallId),S=x,O=A;if(A!=null){A.state=x.state,O.toolName=x.toolName,O.input=S.input,O.output=S.output,O.errorText=S.errorText,O.rawInput=(_=S.rawInput)!=null?_:O.rawInput,O.preliminary=S.preliminary,x.title!==void 0&&(O.title=x.title),O.providerExecuted=(w=S.providerExecuted)!=null?w:A.providerExecuted;const R=S.providerMetadata;if(R!=null)if(x.state==="output-available"||x.state==="output-error"){const C=A;C.resultProviderMetadata=R}else A.callProviderMetadata=R}else l.message.parts.push({type:"dynamic-tool",toolName:x.toolName,toolCallId:x.toolCallId,state:x.state,input:S.input,output:S.output,errorText:S.errorText,preliminary:S.preliminary,providerExecuted:S.providerExecuted,title:x.title,...S.providerMetadata!=null&&(x.state==="output-available"||x.state==="output-error")?{resultProviderMetadata:S.providerMetadata}:{},...S.providerMetadata!=null&&!(x.state==="output-available"||x.state==="output-error")?{callProviderMetadata:S.providerMetadata}:{}})}async function T(x){if(x!=null){const _=l.message.metadata!=null?ww(l.message.metadata,x):x;t!=null&&await Zg({value:_,schema:t,context:{field:"message.metadata",entityId:l.message.id}}),l.message.metadata=_}}switch(s.type){case"text-start":{const x={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeTextParts[s.id]=x,l.message.parts.push(x),c();break}case"text-delta":{const x=l.activeTextParts[s.id];if(x==null)throw new ia({chunkType:"text-delta",chunkId:s.id,message:`Received text-delta for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});x.text+=s.delta,x.providerMetadata=(f=s.providerMetadata)!=null?f:x.providerMetadata,c();break}case"text-end":{const x=l.activeTextParts[s.id];if(x==null)throw new ia({chunkType:"text-end",chunkId:s.id,message:`Received text-end for missing text part with ID "${s.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});x.state="done",x.providerMetadata=(d=s.providerMetadata)!=null?d:x.providerMetadata,delete l.activeTextParts[s.id],c();break}case"reasoning-start":{const x={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeReasoningParts[s.id]=x,l.message.parts.push(x),c();break}case"reasoning-delta":{const x=l.activeReasoningParts[s.id];if(x==null)throw new ia({chunkType:"reasoning-delta",chunkId:s.id,message:`Received reasoning-delta for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});x.text+=s.delta,x.providerMetadata=(h=s.providerMetadata)!=null?h:x.providerMetadata,c();break}case"reasoning-end":{const x=l.activeReasoningParts[s.id];if(x==null)throw new ia({chunkType:"reasoning-end",chunkId:s.id,message:`Received reasoning-end for missing reasoning part with ID "${s.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});x.providerMetadata=(p=s.providerMetadata)!=null?p:x.providerMetadata,x.state="done",delete l.activeReasoningParts[s.id],c();break}case"file":{l.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url,...s.providerMetadata!=null?{providerMetadata:s.providerMetadata}:{}}),c();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),c();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),c();break}case"tool-input-start":{const x=l.message.parts.filter(xh);l.partialToolCalls[s.toolCallId]={text:"",toolName:s.toolName,index:x.length,dynamic:s.dynamic,title:s.title},s.dynamic?v({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,providerMetadata:s.providerMetadata}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted,title:s.title,providerMetadata:s.providerMetadata}),c();break}case"tool-input-delta":{const x=l.partialToolCalls[s.toolCallId];if(x==null)throw new ia({chunkType:"tool-input-delta",chunkId:s.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${s.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});x.text+=s.inputTextDelta;const{value:_}=await Cs(x.text);x.dynamic?v({toolCallId:s.toolCallId,toolName:x.toolName,state:"input-streaming",input:_,title:x.title}):y({toolCallId:s.toolCallId,toolName:x.toolName,state:"input-streaming",input:_,title:x.title}),c();break}case"tool-input-available":{s.dynamic?v({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:s.title}),c(),a&&!s.providerExecuted&&await a({toolCall:s});break}case"tool-input-error":{const x=l.message.parts.filter(Ku).find(w=>w.toolCallId===s.toolCallId);(x!=null?x.type==="dynamic-tool":!!s.dynamic)?v({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):y({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:void 0,rawInput:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),c();break}case"tool-approval-request":{const x=b(s.toolCallId);x.state="approval-requested",x.approval={id:s.approvalId},c();break}case"tool-output-denied":{const x=b(s.toolCallId);x.state="output-denied",c();break}case"tool-output-available":{const x=b(s.toolCallId);x.type==="dynamic-tool"?v({toolCallId:s.toolCallId,toolName:x.toolName,state:"output-available",input:x.input,output:s.output,preliminary:s.preliminary,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:x.title}):y({toolCallId:s.toolCallId,toolName:Qg(x),state:"output-available",input:x.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary,providerMetadata:s.providerMetadata,title:x.title}),c();break}case"tool-output-error":{const x=b(s.toolCallId);x.type==="dynamic-tool"?v({toolCallId:s.toolCallId,toolName:x.toolName,state:"output-error",input:x.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:x.title}):y({toolCallId:s.toolCallId,toolName:Qg(x),state:"output-error",input:x.input,rawInput:x.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata,title:x.title}),c();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{s.messageId!=null&&(l.message.id=s.messageId),await T(s.messageMetadata),(s.messageId!=null||s.messageMetadata!=null)&&c();break}case"finish":{s.finishReason!=null&&(l.finishReason=s.finishReason),await T(s.messageMetadata),s.messageMetadata!=null&&c();break}case"message-metadata":{await T(s.messageMetadata),s.messageMetadata!=null&&c();break}case"error":{i?.(new Error(s.errorText));break}default:if(g3(s)){if(r?.[s.type]!=null){const w=l.message.parts.findIndex(S=>"id"in S&&"data"in S&&S.id===s.id&&S.type===s.type),A=w>=0?w:l.message.parts.length;await Zg({value:s.data,schema:r[s.type],context:{field:`message.parts[${A}].data`,entityName:s.type,entityId:s.id}})}const x=s;if(x.transient){o?.(x);break}const _=x.id!=null?l.message.parts.find(w=>x.type===w.type&&x.id===w.id):void 0;_!=null?_.data=x.data:l.message.parts.push(x),o?.(x),c()}}u.enqueue(s)})}}))}function y3(e){const t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){const r=this.getReader();let n=!1;async function i(a){var o;if(!n){n=!0;try{a&&await((o=r.cancel)==null?void 0:o.call(r))}finally{try{r.releaseLock()}catch{}}}}return{async next(){if(n)return{done:!0,value:void 0};const{done:a,value:o}=await r.read();return a?(await i(!0),{done:!0,value:void 0}):{done:!1,value:o}},async return(){return await i(!0),{done:!0,value:void 0}},async throw(a){throw await i(!0),a}}},t}async function kw({stream:e,onError:t}){const r=e.getReader();try{for(;;){const{done:n}=await r.read();if(n)break}}catch(n){t?.(n)}finally{r.releaseLock()}}Ss({prefix:"aitxt",size:24});function v3({message:e,stream:t,onError:r,terminateOnError:n=!1}){var i;let a,o=!1;const s=new ReadableStream({start(c){a=c}}),u=Aw({messageId:(i=e?.id)!=null?i:"",lastMessage:e}),l=c=>{r?.(c),!o&&n&&(o=!0,a?.error(c))};return kw({stream:_w({stream:t,runUpdateMessageJob(c){return c({state:u,write:()=>{a?.enqueue(structuredClone(u.message))}})},onError:l}),onError:l}).finally(()=>{o||a?.close()}),y3(s)}Ss({prefix:"aiobj",size:24});var x3=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,r)=>{this.queue.push(async()=>{try{await e(),t()}catch(n){r(n)}}),this.processQueue()})}};Ss({prefix:"aiobj",size:24});async function E3(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{const{name:r,type:n}=t,i=await new Promise((a,o)=>{const s=new FileReader;s.onload=u=>{var l;a((l=u.target)==null?void 0:l.result)},s.onerror=u=>o(u),s.readAsDataURL(t)});return{type:"file",mediaType:n,filename:r,url:i}}))}var T3=class{constructor({api:e="/api/chat",credentials:t,headers:r,body:n,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=r,this.body=n,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){var r,n,i,a,o;const s=await qn(this.body),u=await qn(this.headers),l=await qn(this.credentials),c={...na(u),...na(t.headers)},f=await((r=this.prepareSendMessagesRequest)==null?void 0:r.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...s,...t.body},headers:c,credentials:l,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),d=(n=f?.api)!=null?n:this.api,h=f?.headers!==void 0?na(f.headers):c,p=f?.body!==void 0?f.body:{...s,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},b=(i=f?.credentials)!=null?i:l,v=await((a=this.fetch)!=null?a:globalThis.fetch)(d,{method:"POST",headers:{"Content-Type":"application/json",...h},body:JSON.stringify(p),credentials:b,signal:e});if(!v.ok)throw new Error((o=await v.text())!=null?o:"Failed to fetch the chat response.");if(!v.body)throw new Error("The response body is empty.");return this.processResponseStream(v.body)}async reconnectToStream(e){var t,r,n,i,a;const o=await qn(this.body),s=await qn(this.headers),u=await qn(this.credentials),l={...na(s),...na(e.headers)},c=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...o,...e.body},headers:l,credentials:u,requestMetadata:e.metadata})),f=(r=c?.api)!=null?r:`${this.api}/${e.chatId}/stream`,d=c?.headers!==void 0?na(c.headers):l,h=(n=c?.credentials)!=null?n:u,b=await((i=this.fetch)!=null?i:globalThis.fetch)(f,{method:"GET",headers:d,credentials:h});if(b.status===204)return null;if(!b.ok)throw new Error((a=await b.text())!=null?a:"Failed to fetch the chat response.");if(!b.body)throw new Error("The response body is empty.");return this.processResponseStream(b.body)}},Sw=class extends T3{constructor(e={}){super(e)}processResponseStream(e){return YN({stream:e,schema:m3}).pipeThrough(new TransformStream({async transform(t,r){if(!t.success)throw t.error;r.enqueue(t.value)}}))}},w3=class{constructor({generateId:e=XP,id:t=e(),transport:r=new Sw,messageMetadataSchema:n,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:u,onData:l,sendAutomaticallyWhen:c}){this.activeResponse=void 0,this.jobExecutor=new x3,this.sendMessage=async(f,d)=>{var h,p,b,y;if(f==null){await this.makeRequest({trigger:"submit-message",messageId:(h=this.lastMessage)==null?void 0:h.id,...d});return}let v;if("text"in f||"files"in f?v={parts:[...Array.isArray(f.files)?f.files:await E3(f.files),..."text"in f&&f.text!=null?[{type:"text",text:f.text}]:[]]}:v=f,f.messageId!=null){const T=this.state.messages.findIndex(x=>x.id===f.messageId);if(T===-1)throw new Error(`message with id ${f.messageId} not found`);if(this.state.messages[T].role!=="user")throw new Error(`message with id ${f.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,T+1),this.state.replaceMessage(T,{...v,id:f.messageId,role:(p=v.role)!=null?p:"user",metadata:f.metadata})}else this.state.pushMessage({...v,id:(b=v.id)!=null?b:this.generateId(),role:(y=v.role)!=null?y:"user",metadata:f.metadata});await this.makeRequest({trigger:"submit-message",messageId:f.messageId,...d})},this.regenerate=async({messageId:f,...d}={})=>{const h=f==null?this.state.messages.length-1:this.state.messages.findIndex(p=>p.id===f);if(h===-1)throw new Error(`message ${f} not found`);this.state.messages=this.state.messages.slice(0,this.messages[h].role==="assistant"?h:h+1),await this.makeRequest({trigger:"regenerate-message",messageId:f,...d})},this.resumeStream=async(f={})=>{await this.makeRequest({trigger:"resume-stream",...f})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolApprovalResponse=async({id:f,approved:d,reason:h,options:p})=>this.jobExecutor.run(async()=>{const b=this.state.messages,y=b[b.length-1],v=T=>Ku(T)&&T.state==="approval-requested"&&T.approval.id===f?{...T,state:"approval-responded",approval:{id:f,approved:d,reason:h}}:T;this.state.replaceMessage(b.length-1,{...y,parts:y.parts.map(v)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(v)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(T=>{var x;T&&this.makeRequest({trigger:"submit-message",messageId:(x=this.lastMessage)==null?void 0:x.id,...p})})}),this.addToolOutput=async({state:f="output-available",toolCallId:d,output:h,errorText:p,options:b})=>this.jobExecutor.run(async()=>{const y=this.state.messages,v=y[y.length-1],T=x=>Ku(x)&&x.toolCallId===d?{...x,state:f,output:h,errorText:p}:x;this.state.replaceMessage(y.length-1,{...v,parts:v.parts.map(T)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(T)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(x=>{var _;x&&this.makeRequest({trigger:"submit-message",messageId:(_=this.lastMessage)==null?void 0:_.id,...b})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var f;this.status!=="streaming"&&this.status!=="submitted"||(f=this.activeResponse)!=null&&f.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=r,this.generateId=e,this.messageMetadataSchema=n,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=u,this.onData=l,this.sendAutomaticallyWhen=c}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;const e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e=="object"&&"then"in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:r,body:n,messageId:i}){var a,o,s;let u;if(e==="resume-stream")try{const h=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:r,body:n});if(h==null)return;u=h}catch(h){this.onError&&h instanceof Error&&this.onError(h),this.setStatus({status:"error",error:h});return}this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let c=!1,f=!1,d=!1;try{const h={state:Aw({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};h.abortController.signal.addEventListener("abort",()=>{c=!0}),this.activeResponse=h;let p;e==="resume-stream"?p=u:p=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:h.abortController.signal,metadata:t,headers:r,body:n,trigger:e,messageId:i});const b=y=>this.jobExecutor.run(()=>y({state:h.state,write:()=>{var v;this.setStatus({status:"streaming"}),h.state.message.id===((v=this.lastMessage)==null?void 0:v.id)?this.state.replaceMessage(this.state.messages.length-1,h.state.message):this.state.pushMessage(h.state.message)}}));await kw({stream:_w({stream:p,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:b,onError:y=>{throw y}}),onError:y=>{throw y}}),this.setStatus({status:"ready"})}catch(h){if(c||h.name==="AbortError")return c=!0,this.setStatus({status:"ready"}),null;d=!0,h instanceof TypeError&&(h.message.toLowerCase().includes("fetch")||h.message.toLowerCase().includes("network"))&&(f=!0),this.onError&&h instanceof Error&&this.onError(h),this.setStatus({status:"error",error:h})}finally{try{(o=this.onFinish)==null||o.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:f,isError:d,finishReason:(a=this.activeResponse)==null?void 0:a.state.finishReason})}catch(h){console.error(h)}this.activeResponse=void 0}!d&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:"submit-message",messageId:(s=this.lastMessage)==null?void 0:s.id,metadata:t,headers:r,body:n})}};class Cw{data=new Map;listeners=new Map;pendingIds=new Set;rafId=null;update(t,r){const n=this.data.get(t);this.data.set(t,r(n)),this.pendingIds.add(t),this.rafId===null&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null;const i=new Set(this.pendingIds);this.pendingIds.clear();for(const a of i)this.listeners.get(a)?.forEach(o=>o())}))}getSnapshot(t){return this.data.get(t)}clear(){this.data.clear(),this.listeners.clear(),this.pendingIds.clear(),this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}subscribe(t,r){let n=this.listeners.get(t);return n||(n=new Set,this.listeners.set(t,n)),n.add(r),()=>{n.delete(r)}}}function A3(e,t){const r=m.useCallback(i=>t?e.subscribe(t,i):()=>{},[e,t]),n=m.useCallback(()=>t?e.getSnapshot(t):void 0,[e,t]);return m.useSyncExternalStore(r,n)}const ac=(function(e){if(e==null)return C3;if(typeof e=="function")return oc(e);if(typeof e=="object")return Array.isArray(e)?_3(e):k3(e);if(typeof e=="string")return S3(e);throw new Error("Expected function, string, or object as test")});function _3(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=ac(e[r]);return oc(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function k3(e){const t=e;return oc(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function S3(e){return oc(t);function t(r){return r&&r.type===e}}function oc(e){return t;function t(r,n,i){return!!(I3(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function C3(){return!0}function I3(e){return e!==null&&typeof e=="object"&&"type"in e}const Iw=[],Oo=!0,Eh=!1,xa="skip";function Jp(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=ac(i),o=n?-1:1;s(e,void 0,[])();function s(u,l,c){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(u.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=Iw,p,b,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(h=O3(r(u,c)),h[0]===Eh))return h;if("children"in u&&u.children){const v=u;if(v.children&&h[0]!==xa)for(b=(n?v.children.length:-1)+o,y=c.concat(v);b>-1&&b<v.children.length;){const T=v.children[b];if(p=s(T,b,y)(),p[0]===Eh)return p;b=typeof p[1]=="number"?p[1]:b+o}}return h}}}function O3(e){return Array.isArray(e)?e:typeof e=="number"?[Oo,e]:e==null?Iw:[e]}function an(e,t,r,n){let i,a,o;typeof t=="function"&&typeof r!="function"?(a=void 0,o=t,i=r):(a=t,o=r,i=n),Jp(e,a,s,i);function s(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return o(u,f,c)}}const Na={indicator:"indicator",textOnly:"text-only",remove:"remove"};function P3({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:r=[],allowDataImages:n=!1,allowedProtocols:i=[],blockedImageClass:a="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:s=Na.indicator,imageBlockPolicy:u=Na.indicator}){const l=t.length&&!t.every(f=>f==="*"),c=r.length&&!r.every(f=>f==="*");if(!e&&(l||c))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return f=>{const d=j3(e,t,r,n,i,a,o,s,u);Ow(f),an(f,d)}}function Jg(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function N3(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const D3=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),R3=new Set(["javascript:","data:","file:","vbscript:"]);function eb(e,t,r,n=!1,i=!1,a=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&n&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const c=e.substring(5);if(c&&c.length>0&&c!=="invalid")return e}}catch{return null}return null}const o=Jg(e,r);if(!o||R3.has(o.protocol)||!(D3.has(o.protocol)||a.includes(o.protocol)||a.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const u=N3(e);return o&&t.some(l=>{const c=Jg(l,r);return!c||c.origin!==o.origin?!1:o.href.startsWith(c.href)})?u?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:u?o.pathname+o.search+o.hash:o.href:null}function Ow(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Ow(t)}}const mf=Symbol("node-seen");function L3(e,t,r){return t===Na.remove?{type:"remove"}:t===Na.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:r},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function M3(e,t,r){if(t===Na.remove)return{type:"remove"};if(t===Na.textOnly){const n=String(e.properties.alt||"");return n?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:n}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:r},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const j3=(e,t,r,n,i,a,o,s,u)=>{const l=(c,f,d)=>{if(c.type!=="element"||c[mf])return Oo;if(c.tagName==="a"){const h=eb(c.properties.href,t,e,!1,!1,i);if(h===null){if(c[mf]=!0,an(c,l),d&&typeof f=="number"){const p=L3(c,s,o);if(p.type==="remove")return d.children.splice(f,1),[xa,f];d.children[f]=p.element}return xa}else return c.properties.href=h,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Oo}if(c.tagName==="img"){const h=eb(c.properties.src,r,e,n,!0,i);if(h===null){if(c[mf]=!0,an(c,l),d&&typeof f=="number"){const p=M3(c,u,a);if(p.type==="remove")return d.children.splice(f,1),[xa,f];d.children[f]=p.element}return xa}else return c.properties.src=h,Oo}return Oo};return l},Pw=-1,sc=0,$o=1,Gu=2,em=3,tm=4,rm=5,nm=6,Nw=7,Dw=8,tb=typeof self=="object"?self:globalThis,B3=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case sc:case Pw:return r(o,i);case $o:{const s=r([],i);for(const u of o)s.push(n(u));return s}case Gu:{const s=r({},i);for(const[u,l]of o)s[n(u)]=n(l);return s}case em:return r(new Date(o),i);case tm:{const{source:s,flags:u}=o;return r(new RegExp(s,u),i)}case rm:{const s=r(new Map,i);for(const[u,l]of o)s.set(n(u),n(l));return s}case nm:{const s=r(new Set,i);for(const u of o)s.add(n(u));return s}case Nw:{const{name:s,message:u}=o;return r(new tb[s](u),i)}case Dw:return r(BigInt(o),i);case"BigInt":return r(Object(BigInt(o)),i);case"ArrayBuffer":return r(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:s}=new Uint8Array(o);return r(new DataView(s),o)}}return r(new tb[a](o),i)};return n},rb=e=>B3(new Map,e)(0),aa="",{toString:F3}={},{keys:$3}=Object,lo=e=>{const t=typeof e;if(t!=="object"||!e)return[sc,t];const r=F3.call(e).slice(8,-1);switch(r){case"Array":return[$o,aa];case"Object":return[Gu,aa];case"Date":return[em,aa];case"RegExp":return[tm,aa];case"Map":return[rm,aa];case"Set":return[nm,aa];case"DataView":return[$o,r]}return r.includes("Array")?[$o,r]:r.includes("Error")?[Nw,r]:[Gu,r]},au=([e,t])=>e===sc&&(t==="function"||t==="symbol"),U3=(e,t,r,n)=>{const i=(o,s)=>{const u=n.push(o)-1;return r.set(s,u),u},a=o=>{if(r.has(o))return r.get(o);let[s,u]=lo(o);switch(s){case sc:{let c=o;switch(u){case"bigint":s=Dw,c=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([Pw],o)}return i([s,c],o)}case $o:{if(u){let d=o;return u==="DataView"?d=new Uint8Array(o.buffer):u==="ArrayBuffer"&&(d=new Uint8Array(o)),i([u,[...d]],o)}const c=[],f=i([s,c],o);for(const d of o)c.push(a(d));return f}case Gu:{if(u)switch(u){case"BigInt":return i([u,o.toString()],o);case"Boolean":case"Number":case"String":return i([u,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const c=[],f=i([s,c],o);for(const d of $3(o))(e||!au(lo(o[d])))&&c.push([a(d),a(o[d])]);return f}case em:return i([s,o.toISOString()],o);case tm:{const{source:c,flags:f}=o;return i([s,{source:c,flags:f}],o)}case rm:{const c=[],f=i([s,c],o);for(const[d,h]of o)(e||!(au(lo(d))||au(lo(h))))&&c.push([a(d),a(h)]);return f}case nm:{const c=[],f=i([s,c],o);for(const d of o)(e||!au(lo(d)))&&c.push(a(d));return f}}const{message:l}=o;return i([s,{name:u,message:l}],o)};return a},nb=(e,{json:t,lossy:r}={})=>{const n=[];return U3(!(t||r),!!t,new Map,n)(e),n},Ri=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?rb(nb(e,t)):structuredClone(e):(e,t)=>rb(nb(e,t));class Is{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Is.prototype.normal={};Is.prototype.property={};Is.prototype.space=void 0;function Rw(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Is(r,n,t)}function is(e){return e.toLowerCase()}class sr{constructor(t,r){this.attribute=r,this.property=t}}sr.prototype.attribute="";sr.prototype.booleanish=!1;sr.prototype.boolean=!1;sr.prototype.commaOrSpaceSeparated=!1;sr.prototype.commaSeparated=!1;sr.prototype.defined=!1;sr.prototype.mustUseProperty=!1;sr.prototype.number=!1;sr.prototype.overloadedBoolean=!1;sr.prototype.property="";sr.prototype.spaceSeparated=!1;sr.prototype.space=void 0;let H3=0;const Ee=Wi(),ct=Wi(),Th=Wi(),Z=Wi(),Ve=Wi(),Aa=Wi(),fr=Wi();function Wi(){return 2**++H3}const wh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:ct,commaOrSpaceSeparated:fr,commaSeparated:Aa,number:Z,overloadedBoolean:Th,spaceSeparated:Ve},Symbol.toStringTag,{value:"Module"})),gf=Object.keys(wh);class im extends sr{constructor(t,r,n,i){let a=-1;if(super(t,r),ib(this,"space",i),typeof n=="number")for(;++a<gf.length;){const o=gf[a];ib(this,gf[a],(n&wh[o])===wh[o])}}}im.prototype.defined=!0;function ib(e,t,r){r&&(e[t]=r)}function Wa(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new im(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[is(n)]=n,r[is(a.attribute)]=n}return new Is(t,r,e.space)}const Lw=Wa({properties:{ariaActiveDescendant:null,ariaAtomic:ct,ariaAutoComplete:null,ariaBusy:ct,ariaChecked:ct,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Ve,ariaCurrent:null,ariaDescribedBy:Ve,ariaDetails:null,ariaDisabled:ct,ariaDropEffect:Ve,ariaErrorMessage:null,ariaExpanded:ct,ariaFlowTo:Ve,ariaGrabbed:ct,ariaHasPopup:null,ariaHidden:ct,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ve,ariaLevel:Z,ariaLive:null,ariaModal:ct,ariaMultiLine:ct,ariaMultiSelectable:ct,ariaOrientation:null,ariaOwns:Ve,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:ct,ariaReadOnly:ct,ariaRelevant:null,ariaRequired:ct,ariaRoleDescription:Ve,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:ct,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Mw(e,t){return t in e?e[t]:t}function jw(e,t){return Mw(e,t.toLowerCase())}const z3=Wa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Aa,acceptCharset:Ve,accessKey:Ve,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:Ve,autoFocus:Ee,autoPlay:Ee,blocking:Ve,capture:null,charSet:null,checked:Ee,cite:null,className:Ve,cols:Z,colSpan:null,content:null,contentEditable:ct,controls:Ee,controlsList:Ve,coords:Z|Aa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:Th,draggable:ct,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:Ve,height:Z,hidden:Th,high:Z,href:null,hrefLang:null,htmlFor:Ve,httpEquiv:Ve,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:Ve,itemRef:Ve,itemScope:Ee,itemType:Ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ee,optimum:Z,pattern:null,ping:Ve,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:Ve,required:Ee,reversed:Ee,rows:Z,rowSpan:Z,sandbox:Ve,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:ct,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:ct,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ve,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:ct,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ee,disableRemotePlayback:Ee,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:jw}),q3=Wa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:fr,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Ve,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Aa,g2:Aa,glyphName:Aa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:fr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:fr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:fr,rev:fr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:fr,requiredFeatures:fr,requiredFonts:fr,requiredFormats:fr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:fr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:fr,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:fr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Mw}),Bw=Wa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Fw=Wa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:jw}),$w=Wa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),W3={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},V3=/[A-Z]/g,ab=/-[a-z]/g,Y3=/^data[-\w.:]+$/i;function uc(e,t){const r=is(t);let n=t,i=sr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Y3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ab,G3);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ab.test(a)){let o=a.replace(V3,K3);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=im}return new i(n,t)}function K3(e){return"-"+e.toLowerCase()}function G3(e){return e.charAt(1).toUpperCase()}const Os=Rw([Lw,z3,Bw,Fw,$w],"html"),oi=Rw([Lw,q3,Bw,Fw,$w],"svg");function ob(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const o=r.slice(i,n).trim();(o||!a)&&t.push(o),i=n+1,n=r.indexOf(",",i)}return t}function Uw(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const sb=/[#.]/g;function X3(e,t){const r=e||"",n={};let i=0,a,o;for(;i<r.length;){sb.lastIndex=i;const s=sb.exec(r),u=r.slice(i,s?s.index:r.length);u&&(a?a==="#"?n.id=u:Array.isArray(n.className)?n.className.push(u):n.className=[u]:o=u,i+=u.length),s&&(a=s[0],i++)}return{type:"element",tagName:o||t||"div",properties:n,children:[]}}function ub(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Hw(e){return e.join(" ").trim()}function zw(e,t,r){const n=r?eD(r):void 0;function i(a,o,...s){let u;if(a==null){u={type:"root",children:[]};const l=o;s.unshift(l)}else{u=X3(a,t);const l=u.tagName.toLowerCase(),c=n?n.get(l):void 0;if(u.tagName=c||l,Z3(o))s.unshift(o);else for(const[f,d]of Object.entries(o))Q3(e,u.properties,f,d)}for(const l of s)Ah(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function Z3(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,r=Object.keys(e);for(const n of r){const i=t[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const o of a)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Q3(e,t,r,n){const i=uc(e,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=ub(n):i.commaSeparated?a=ob(n):i.commaOrSpaceSeparated?a=ub(ob(n).join(" ")):a=lb(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?J3(n):String(n);if(Array.isArray(a)){const o=[];for(const s of a)o.push(lb(i,i.property,s));a=o}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Ah(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const r of t)Ah(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ah(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function lb(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||is(r)===is(t)))return!0}return r}function J3(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function eD(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const tD=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],rD=zw(Os,"div"),nD=zw(oi,"g",tD);function iD(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let o=0;for(;;){let s=r[o];if(s===void 0){const u=cb(t,r[o-1]);s=u===-1?t.length+1:u+1,r[o]=s}if(s>a)return{line:o+1,column:a-(o>0?r[o-1]:0)+1,offset:a};o++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const s=r[r.length-1],u=cb(t,s),l=u===-1?t.length+1:u+1;if(s===l)break;r.push(l)}const o=(a.line>1?r[a.line-2]:0)+a.column-1;if(o<r[a.line-1])return o}}}function cb(e,t){const r=e.indexOf("\r",t),n=e.indexOf(`
22
- `,t);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const Ai={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qw={}.hasOwnProperty,aD=Object.prototype;function oD(e,t){const r=t||{};return am({file:r.file||void 0,location:!1,schema:r.space==="svg"?oi:Os,verbose:r.verbose||!1},e)}function am(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},Nu(e,n,r),r}case"#document":case"#document-fragment":{const n=t,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:Ww(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),o=iD(a),s=o.toPoint(0),u=o.toPoint(a.length);r.position={start:s,end:u}}return r}case"#documentType":{const n=t;return r={type:"doctype"},Nu(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},Nu(e,n,r),r}default:return r=sD(e,t),r}}function Ww(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=am(e,t[r]);n.push(i)}return n}function sD(e,t){const r=e.schema;e.schema=t.namespaceURI===Ai.svg?oi:Os;let n=-1;const i={};for(;++n<t.attrs.length;){const s=t.attrs[n],u=(s.prefix?s.prefix+":":"")+s.name;qw.call(aD,u)||(i[u]=s.value)}const o=(e.schema.space==="svg"?nD:rD)(t.tagName,i,Ww(e,t.childNodes));if(Nu(e,t,o),o.tagName==="template"){const s=t,u=s.sourceCodeLocation,l=u&&u.startTag&&Ea(u.startTag),c=u&&u.endTag&&Ea(u.endTag),f=am(e,s.content);l&&c&&e.file&&(f.position={start:l.end,end:c.start}),o.content=f}return e.schema=r,o}function Nu(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=uD(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function uD(e,t,r){const n=Ea(r);if(t.type==="element"){const i=t.children[t.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),e.verbose){const a={};let o;if(r.attrs)for(o in r.attrs)qw.call(r.attrs,o)&&(a[uc(e.schema,o).property]=Ea(r.attrs[o]));r.startTag;const s=Ea(r.startTag),u=r.endTag?Ea(r.endTag):void 0,l={opening:s};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return n}function Ea(e){const t=fb({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=fb({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function fb(e){return e.line&&e.column?e:void 0}const db={}.hasOwnProperty;function Vw(e,t){const r=t||{};function n(i,...a){let o=n.invalid;const s=n.handlers;if(i&&db.call(i,e)){const u=String(i[e]);o=db.call(s,u)?s[u]:n.unknown}if(o)return o.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const lD={},cD={}.hasOwnProperty,Yw=Vw("type",{handlers:{root:dD,element:bD,text:mD,comment:gD,doctype:pD}});function fD(e,t){const n=(t||lD).space;return Yw(e,n==="svg"?oi:Os)}function dD(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=om(e.children,r,t),Va(e,r),r}function hD(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=om(e.children,r,t),Va(e,r),r}function pD(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Va(e,t),t}function mD(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Va(e,t),t}function gD(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Va(e,t),t}function bD(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=oi);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&cD.call(e.properties,a)){const u=yD(n,a,e.properties[a]);u&&i.push(u)}}const o=n.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Ai[o],childNodes:[],parentNode:null};return s.childNodes=om(e.children,s,n),Va(e,s),e.tagName==="template"&&e.content&&(s.content=hD(e.content,n)),s}function yD(e,t,r){const n=uc(e,t);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?Uw(r):Hw(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=n.attribute.slice(0,a)),i.namespace=Ai[n.space]}return i}function om(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const a=Yw(e[n],r);a.parentNode=t,i.push(a)}return i}function Va(e,t){const r=e.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,t.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const vD=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],xD=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Je="�";var k;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(k||(k={}));const tr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Kw(e){return e>=55296&&e<=57343}function ED(e){return e>=56320&&e<=57343}function TD(e,t){return(e-55296)*1024+9216+t}function Gw(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Xw(e){return e>=64976&&e<=65007||xD.has(e)}var $;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})($||($={}));const wD=65536;class AD{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=wD,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){const{line:n,col:i,offset:a}=this,o=i+r,s=a+r;return{code:t,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const r=this.html.charCodeAt(this.pos+1);if(ED(r))return this.pos++,this._addGap(),TD(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,k.EOF;return this._err($.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n<t.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==t.charCodeAt(n))return!1;return!0}peek(t){const r=this.pos+t;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;const n=this.html.charCodeAt(r);return n===k.CARRIAGE_RETURN?k.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,k.EOF;let t=this.html.charCodeAt(this.pos);return t===k.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,k.LINE_FEED):t===k.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Kw(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===k.LINE_FEED||t===k.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Gw(t)?this._err($.controlCharacterInInputStream):Xw(t)&&this._err($.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var _e;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(_e||(_e={}));function Zw(e,t){for(let r=e.attrs.length-1;r>=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}const _D=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),kD=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function SD(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=kD.get(e))!==null&&t!==void 0?t:e}var wt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(wt||(wt={}));const CD=32;var Gn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Gn||(Gn={}));function _h(e){return e>=wt.ZERO&&e<=wt.NINE}function ID(e){return e>=wt.UPPER_A&&e<=wt.UPPER_F||e>=wt.LOWER_A&&e<=wt.LOWER_F}function OD(e){return e>=wt.UPPER_A&&e<=wt.UPPER_Z||e>=wt.LOWER_A&&e<=wt.LOWER_Z||_h(e)}function PD(e){return e===wt.EQUALS||OD(e)}var Et;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Et||(Et={}));var vn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(vn||(vn={}));class ND{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=Et.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=vn.Strict}startEntity(t){this.decodeMode=t,this.state=Et.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Et.EntityStart:return t.charCodeAt(r)===wt.NUM?(this.state=Et.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Et.NamedEntity,this.stateNamedEntity(t,r));case Et.NumericStart:return this.stateNumericStart(t,r);case Et.NumericDecimal:return this.stateNumericDecimal(t,r);case Et.NumericHex:return this.stateNumericHex(t,r);case Et.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|CD)===wt.LOWER_X?(this.state=Et.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Et.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){const a=n-r;this.result=this.result*Math.pow(i,a)+Number.parseInt(t.substr(r,a),i),this.consumed+=a}}stateNumericHex(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(_h(i)||ID(i))r+=1;else return this.addToNumericResult(t,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,n,r,16),-1}stateNumericDecimal(t,r){const n=r;for(;r<t.length;){const i=t.charCodeAt(r);if(_h(i))r+=1;else return this.addToNumericResult(t,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,n,r,10),-1}emitNumericEntity(t,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===wt.SEMI)this.consumed+=1;else if(this.decodeMode===vn.Strict)return 0;return this.emitCodePoint(SD(this.result),this.consumed),this.errors&&(t!==wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:n}=this;let i=n[this.treeIndex],a=(i&Gn.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const o=t.charCodeAt(r);if(this.treeIndex=DD(n,i,this.treeIndex+Math.max(1,a),o),this.treeIndex<0)return this.result===0||this.decodeMode===vn.Attribute&&(a===0||PD(o))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],a=(i&Gn.VALUE_LENGTH)>>14,a!==0){if(o===wt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==vn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:n}=this,i=(n[r]&Gn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~Gn.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case Et.NamedEntity:return this.result!==0&&(this.decodeMode!==vn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Et.NumericDecimal:return this.emitNumericEntity(0,2);case Et.NumericHex:return this.emitNumericEntity(0,3);case Et.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Et.EntityStart:return 0}}}function DD(e,t,r,n){const i=(t&Gn.BRANCH_LENGTH)>>7,a=t&Gn.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const u=n-a;return u<0||u>=i?-1:e[r+u]-1}let o=r,s=o+i-1;for(;o<=s;){const u=o+s>>>1,l=e[u];if(l<n)o=u+1;else if(l>n)s=u-1;else return e[u+i]}return-1}var K;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(K||(K={}));var Ii;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Ii||(Ii={}));var Ar;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Ar||(Ar={}));var j;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(j||(j={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const RD=new Map([[j.A,g.A],[j.ADDRESS,g.ADDRESS],[j.ANNOTATION_XML,g.ANNOTATION_XML],[j.APPLET,g.APPLET],[j.AREA,g.AREA],[j.ARTICLE,g.ARTICLE],[j.ASIDE,g.ASIDE],[j.B,g.B],[j.BASE,g.BASE],[j.BASEFONT,g.BASEFONT],[j.BGSOUND,g.BGSOUND],[j.BIG,g.BIG],[j.BLOCKQUOTE,g.BLOCKQUOTE],[j.BODY,g.BODY],[j.BR,g.BR],[j.BUTTON,g.BUTTON],[j.CAPTION,g.CAPTION],[j.CENTER,g.CENTER],[j.CODE,g.CODE],[j.COL,g.COL],[j.COLGROUP,g.COLGROUP],[j.DD,g.DD],[j.DESC,g.DESC],[j.DETAILS,g.DETAILS],[j.DIALOG,g.DIALOG],[j.DIR,g.DIR],[j.DIV,g.DIV],[j.DL,g.DL],[j.DT,g.DT],[j.EM,g.EM],[j.EMBED,g.EMBED],[j.FIELDSET,g.FIELDSET],[j.FIGCAPTION,g.FIGCAPTION],[j.FIGURE,g.FIGURE],[j.FONT,g.FONT],[j.FOOTER,g.FOOTER],[j.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[j.FORM,g.FORM],[j.FRAME,g.FRAME],[j.FRAMESET,g.FRAMESET],[j.H1,g.H1],[j.H2,g.H2],[j.H3,g.H3],[j.H4,g.H4],[j.H5,g.H5],[j.H6,g.H6],[j.HEAD,g.HEAD],[j.HEADER,g.HEADER],[j.HGROUP,g.HGROUP],[j.HR,g.HR],[j.HTML,g.HTML],[j.I,g.I],[j.IMG,g.IMG],[j.IMAGE,g.IMAGE],[j.INPUT,g.INPUT],[j.IFRAME,g.IFRAME],[j.KEYGEN,g.KEYGEN],[j.LABEL,g.LABEL],[j.LI,g.LI],[j.LINK,g.LINK],[j.LISTING,g.LISTING],[j.MAIN,g.MAIN],[j.MALIGNMARK,g.MALIGNMARK],[j.MARQUEE,g.MARQUEE],[j.MATH,g.MATH],[j.MENU,g.MENU],[j.META,g.META],[j.MGLYPH,g.MGLYPH],[j.MI,g.MI],[j.MO,g.MO],[j.MN,g.MN],[j.MS,g.MS],[j.MTEXT,g.MTEXT],[j.NAV,g.NAV],[j.NOBR,g.NOBR],[j.NOFRAMES,g.NOFRAMES],[j.NOEMBED,g.NOEMBED],[j.NOSCRIPT,g.NOSCRIPT],[j.OBJECT,g.OBJECT],[j.OL,g.OL],[j.OPTGROUP,g.OPTGROUP],[j.OPTION,g.OPTION],[j.P,g.P],[j.PARAM,g.PARAM],[j.PLAINTEXT,g.PLAINTEXT],[j.PRE,g.PRE],[j.RB,g.RB],[j.RP,g.RP],[j.RT,g.RT],[j.RTC,g.RTC],[j.RUBY,g.RUBY],[j.S,g.S],[j.SCRIPT,g.SCRIPT],[j.SEARCH,g.SEARCH],[j.SECTION,g.SECTION],[j.SELECT,g.SELECT],[j.SOURCE,g.SOURCE],[j.SMALL,g.SMALL],[j.SPAN,g.SPAN],[j.STRIKE,g.STRIKE],[j.STRONG,g.STRONG],[j.STYLE,g.STYLE],[j.SUB,g.SUB],[j.SUMMARY,g.SUMMARY],[j.SUP,g.SUP],[j.TABLE,g.TABLE],[j.TBODY,g.TBODY],[j.TEMPLATE,g.TEMPLATE],[j.TEXTAREA,g.TEXTAREA],[j.TFOOT,g.TFOOT],[j.TD,g.TD],[j.TH,g.TH],[j.THEAD,g.THEAD],[j.TITLE,g.TITLE],[j.TR,g.TR],[j.TRACK,g.TRACK],[j.TT,g.TT],[j.U,g.U],[j.UL,g.UL],[j.SVG,g.SVG],[j.VAR,g.VAR],[j.WBR,g.WBR],[j.XMP,g.XMP]]);function Ya(e){var t;return(t=RD.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const X=g,LD={[K.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[K.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[K.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},kh=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var I;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(I||(I={}));const ut={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function MD(e){return e>=k.DIGIT_0&&e<=k.DIGIT_9}function Po(e){return e>=k.LATIN_CAPITAL_A&&e<=k.LATIN_CAPITAL_Z}function jD(e){return e>=k.LATIN_SMALL_A&&e<=k.LATIN_SMALL_Z}function Un(e){return jD(e)||Po(e)}function hb(e){return Un(e)||MD(e)}function ou(e){return e+32}function Qw(e){return e===k.SPACE||e===k.LINE_FEED||e===k.TABULATION||e===k.FORM_FEED}function pb(e){return Qw(e)||e===k.SOLIDUS||e===k.GREATER_THAN_SIGN}function BD(e){return e===k.NULL?$.nullCharacterReference:e>1114111?$.characterReferenceOutsideUnicodeRange:Kw(e)?$.surrogateCharacterReference:Xw(e)?$.noncharacterCharacterReference:Gw(e)||e===k.CARRIAGE_RETURN?$.controlCharacterReference:null}class FD{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=I.DATA,this.returnState=I.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new AD(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ND(_D,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err($.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err($.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=BD(n);i&&this._err(i,1)}}:void 0)}_err(t,r=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let r=0;r<t;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,r){return this.preprocessor.startsWith(t,r)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:_e.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:_e.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:_e.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:_e.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,r){this.currentCharacterToken={type:t,chars:r,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,r;const n=this.currentToken;if(Zw(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const i=(t=(r=n.location).attrs)!==null&&t!==void 0?t:r.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err($.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Ya(t.tagName),t.type===_e.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err($.endTagWithAttributes),t.selfClosing&&this._err($.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case _e.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case _e.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case _e.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:_e.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){const r=Qw(t)?_e.WHITESPACE_CHARACTER:t===k.NULL?_e.NULL_CHARACTER:_e.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(_e.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?vn.Attribute:vn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===I.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===I.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case I.DATA:{this._stateData(t);break}case I.RCDATA:{this._stateRcdata(t);break}case I.RAWTEXT:{this._stateRawtext(t);break}case I.SCRIPT_DATA:{this._stateScriptData(t);break}case I.PLAINTEXT:{this._statePlaintext(t);break}case I.TAG_OPEN:{this._stateTagOpen(t);break}case I.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case I.TAG_NAME:{this._stateTagName(t);break}case I.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case I.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case I.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case I.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case I.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case I.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case I.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case I.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case I.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case I.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case I.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case I.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case I.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case I.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case I.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case I.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case I.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case I.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case I.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case I.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case I.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case I.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case I.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case I.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case I.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case I.BOGUS_COMMENT:{this._stateBogusComment(t);break}case I.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case I.COMMENT_START:{this._stateCommentStart(t);break}case I.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case I.COMMENT:{this._stateComment(t);break}case I.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case I.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case I.COMMENT_END:{this._stateCommentEnd(t);break}case I.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case I.DOCTYPE:{this._stateDoctype(t);break}case I.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case I.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case I.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case I.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case I.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case I.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case I.CDATA_SECTION:{this._stateCdataSection(t);break}case I.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case I.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case I.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case I.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitCodePoint(t);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case k.AMPERSAND:{this._startCharacterReference();break}case k.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Un(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case k.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case k.QUESTION_MARK:{this._err($.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case k.EOF:{this._err($.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Un(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case k.GREATER_THAN_SIGN:{this._err($.missingEndTagName),this.state=I.DATA;break}case k.EOF:{this._err($.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err($.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err($.unexpectedNullCharacter),r.tagName+=Je;break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(Po(t)?ou(t):t)}}_stateRcdataLessThanSign(t){t===k.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Un(t)?(this.state=I.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case k.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case k.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=I.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===k.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Un(t)?(this.state=I.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case k.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case k.EXCLAMATION_MARK:{this.state=I.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=I.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Un(t)?(this.state=I.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===k.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===k.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Un(t)?(this._emitChars("<"),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Un(t)?(this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(tr.SCRIPT,!1)&&pb(this.preprocessor.peek(tr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<tr.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err($.unexpectedNullCharacter),this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case k.HYPHEN_MINUS:{this._emitChars("-");break}case k.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case k.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case k.NULL:{this._err($.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case k.EOF:{this._err($.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===k.SOLIDUS?(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(tr.SCRIPT,!1)&&pb(this.preprocessor.peek(tr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<tr.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=I.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._err($.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=I.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:case k.SOLIDUS:case k.GREATER_THAN_SIGN:case k.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case k.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:{this._err($.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.name+=Je;break}default:this.currentAttr.name+=String.fromCodePoint(Po(t)?ou(t):t)}}_stateAfterAttributeName(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case k.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case k.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.AMPERSAND:{this._startCharacterReference();break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.NULL:{this._err($.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case k.QUOTATION_MARK:case k.APOSTROPHE:case k.LESS_THAN_SIGN:case k.EQUALS_SIGN:case k.GRAVE_ACCENT:{this._err($.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case k.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case k.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case k.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case k.EOF:{this._err($.eofInTag),this._emitEOFToken();break}default:this._err($.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(r);break}case k.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case k.NULL:{this._err($.unexpectedNullCharacter),r.data+=Je;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(tr.DASH_DASH,!0)?(this._createCommentToken(tr.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(tr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(tr.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(tr.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err($.cdataInHtmlContent),this._createCommentToken(tr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err($.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case k.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=I.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.GREATER_THAN_SIGN:{this._err($.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(r);break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateComment(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case k.LESS_THAN_SIGN:{r.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.data+=Je;break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case k.EXCLAMATION_MARK:{r.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case k.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===k.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==k.GREATER_THAN_SIGN&&t!==k.EOF&&this._err($.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const r=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(r);break}case k.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case k.HYPHEN_MINUS:{r.data+="-";break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=I.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const r=this.currentToken;switch(t){case k.HYPHEN_MINUS:{r.data+="--!",this.state=I.COMMENT_END_DASH;break}case k.GREATER_THAN_SIGN:{this._err($.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(r);break}case k.EOF:{this._err($.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case k.EOF:{this._err($.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Po(t))this._createDoctypeToken(String.fromCharCode(ou(t))),this.state=I.DOCTYPE_NAME;else switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.NULL:{this._err($.unexpectedNullCharacter),this._createDoctypeToken(Je),this.state=I.DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=I.DOCTYPE_NAME}}_stateDoctypeName(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.NULL:{this._err($.unexpectedNullCharacter),r.name+=Je;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(Po(t)?ou(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(tr.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(tr.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err($.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.publicId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.publicId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case k.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.QUOTATION_MARK:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err($.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.QUOTATION_MARK:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.QUOTATION_MARK:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{this._err($.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.QUOTATION_MARK:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case k.APOSTROPHE:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case k.GREATER_THAN_SIGN:{this._err($.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case k.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.systemId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const r=this.currentToken;switch(t){case k.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case k.NULL:{this._err($.unexpectedNullCharacter),r.systemId+=Je;break}case k.GREATER_THAN_SIGN:{this._err($.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case k.SPACE:case k.LINE_FEED:case k.TABULATION:case k.FORM_FEED:break;case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.EOF:{this._err($.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err($.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case k.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case k.NULL:{this._err($.unexpectedNullCharacter);break}case k.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case k.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case k.EOF:{this._err($.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===k.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case k.GREATER_THAN_SIGN:{this.state=I.DATA;break}case k.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(k.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&hb(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){hb(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===k.SEMICOLON&&this._err($.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Jw=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),mb=new Set([...Jw,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Xu=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),$D=new Set([...Xu,g.OL,g.UL]),UD=new Set([...Xu,g.BUTTON]),gb=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),bb=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),HD=new Set([g.TR,g.TEMPLATE,g.HTML]),zD=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),qD=new Set([g.TABLE,g.TEMPLATE,g.HTML]),WD=new Set([g.TD,g.TH]);class VD{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===K.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){const n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){const i=this._indexOf(t)+1;this.items.splice(i,0,r),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==K.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(t){for(;this.stackTop>=t;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<t)}}popUntilElementPopped(t){const r=this._indexOf(t);this.shortenToLength(Math.max(r,0))}popUntilPopped(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(kh,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(WD,K.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,r){for(let n=this.stackTop;n>=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){const n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(qD,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(zD,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(HD,K.HTML)}remove(t){const r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case K.HTML:{if(i===t)return!0;if(r.has(i))return!1;break}case K.SVG:{if(bb.has(i))return!1;break}case K.MATHML:{if(gb.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xu)}hasInListItemScope(t){return this.hasInDynamicScope(t,$D)}hasInButtonScope(t){return this.hasInDynamicScope(t,UD)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case K.HTML:{if(kh.has(r))return!0;if(Xu.has(r))return!1;break}case K.SVG:{if(bb.has(r))return!1;break}case K.MATHML:{if(gb.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===K.HTML)switch(this.tagIDs[r]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===K.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===K.HTML)switch(this.tagIDs[r]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Jw.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&mb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&mb.has(this.currentTagId);)this.pop()}}const bf=3;var Qr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Qr||(Qr={}));const yb={type:Qr.Marker};class YD{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],i=r.length,a=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const u=this.entries[s];if(u.type===Qr.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===o){const c=this.treeAdapter.getAttrList(l);c.length===i&&n.push({idx:s,attrs:c})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<bf)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<bf)return;const i=new Map(r.map(o=>[o.name,o.value]));let a=0;for(let o=0;o<n.length;o++){const s=n[o];s.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=bf&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(yb)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:Qr.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:Qr.Element,element:t,token:r})}removeEntry(t){const r=this.entries.indexOf(t);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const t=this.entries.indexOf(yb);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===Qr.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===Qr.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===Qr.Element&&r.element===t)}}const Hn={createDocument(){return{nodeName:"#document",mode:Ar.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){const n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){const i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{const a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};Hn.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const r=e.childNodes[e.childNodes.length-1];if(Hn.isTextNode(r)){r.value+=t;return}}Hn.appendChild(e,Hn.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&Hn.isTextNode(n)?n.value+=t:Hn.insertBefore(e,Hn.createTextNode(t),r)},adoptAttributes(e,t){const r=new Set(e.attrs.map(n=>n.name));for(let n=0;n<t.length;n++)r.has(t[n].name)||e.attrs.push(t[n])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},eA="html",KD="about:legacy-compat",GD="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",tA=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],XD=[...tA,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],ZD=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),rA=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],QD=[...rA,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function vb(e,t){return t.some(r=>e.startsWith(r))}function JD(e){return e.name===eA&&e.publicId===null&&(e.systemId===null||e.systemId===KD)}function eR(e){if(e.name!==eA)return Ar.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===GD)return Ar.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),ZD.has(r))return Ar.QUIRKS;let n=t===null?XD:tA;if(vb(r,n))return Ar.QUIRKS;if(n=t===null?rA:QD,vb(r,n))return Ar.LIMITED_QUIRKS}return Ar.NO_QUIRKS}const xb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},tR="definitionurl",rR="definitionURL",nR=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),iR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:K.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:K.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:K.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:K.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:K.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:K.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:K.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:K.XML}],["xml:space",{prefix:"xml",name:"space",namespace:K.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:K.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:K.XMLNS}]]),aR=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),oR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function sR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:n})=>n===Ii.COLOR||n===Ii.SIZE||n===Ii.FACE)||oR.has(t)}function nA(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===tR){e.attrs[t].name=rR;break}}function iA(e){for(let t=0;t<e.attrs.length;t++){const r=nR.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function sm(e){for(let t=0;t<e.attrs.length;t++){const r=iR.get(e.attrs[t].name);r&&(e.attrs[t].prefix=r.prefix,e.attrs[t].name=r.name,e.attrs[t].namespace=r.namespace)}}function uR(e){const t=aR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ya(e.tagName))}function lR(e,t){return t===K.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function cR(e,t,r){if(t===K.MATHML&&e===g.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===Ii.ENCODING){const i=r[n].value.toLowerCase();return i===xb.TEXT_HTML||i===xb.APPLICATION_XML}}return t===K.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function fR(e,t,r,n){return(!n||n===K.HTML)&&cR(e,t,r)||(!n||n===K.MATHML)&&lR(e,t)}const dR="hidden",hR=8,pR=3;var D;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(D||(D={}));const mR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},aA=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Eb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Hn,onParseError:null};class Tb{constructor(t,r,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=D.INITIAL,this.originalInsertionMode=D.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Eb,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new FD(this.options,this),this.activeFormattingElements=new YD(this.treeAdapter),this.fragmentContextID=n?Ya(this.treeAdapter.getTagName(n)):g.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new VD(this.document,this.treeAdapter,this)}static parse(t,r){const n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){const n={...Eb,...r};t??(t=n.treeAdapter.createElement(j.TEMPLATE,K.HTML,[]));const i=n.treeAdapter.createElement("documentmock",K.HTML,[]),a=new this(n,i,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(D.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var i;if(!this.onParseError)return;const a=(i=t.location)!==null&&i!==void 0?i:mR,o={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(t,r,n){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,t,this.openElements.current),r){let a,o;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,o=this.fragmentContextID):{current:a,currentTagId:o}=this.openElements,this._setContextModes(a,o)}}_setContextModes(t,r){const n=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===K.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&t!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,K.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=D.TEXT}switchToPlaintextParsing(){this.insertionMode=D.TEXT,this.originalInsertionMode=D.IN_BODY,this.tokenizer.state=ut.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==K.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=ut.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=ut.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=ut.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=ut.PLAINTEXT;break}}}_setDocumentType(t){const r=t.name||"",n=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,i),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,t)}}_appendElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){const n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){const n=this.treeAdapter.createElement(t,K.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){const r=this.treeAdapter.createElement(t.tagName,K.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(j.HTML,K.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,r){const n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(r),a=n?i.lastIndexOf(n):i.length,o=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:u,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){const n=r.location,i=this.treeAdapter.getTagName(t),a=r.type===_e.END_TAG&&i===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(r)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===K.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,K.HTML)}_processToken(t){switch(t.type){case _e.CHARACTER:{this.onCharacter(t);break}case _e.NULL_CHARACTER:{this.onNullCharacter(t);break}case _e.COMMENT:{this.onComment(t);break}case _e.DOCTYPE:{this.onDoctype(t);break}case _e.START_TAG:{this._processStartTag(t);break}case _e.END_TAG:{this.onEndTag(t);break}case _e.EOF:{this.onEof(t);break}case _e.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const i=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return fR(t,i,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(i=>i.type===Qr.Marker||this.openElements.contains(i.element)),n=r===-1?t-1:r-1;for(let i=n;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=D.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=D.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=D.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=D.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=D.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=D.IN_TABLE;return}case g.BODY:{this.insertionMode=D.IN_BODY;return}case g.FRAMESET:{this.insertionMode=D.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?D.AFTER_HEAD:D.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=D.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=D.IN_HEAD;return}break}}this.insertionMode=D.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===g.TEMPLATE)break;if(n===g.TABLE){this.insertionMode=D.IN_SELECT_IN_TABLE;return}}this.insertionMode=D.IN_SELECT}_isElementCausesFosterParenting(t){return aA.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===K.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case g.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){const n=this.treeAdapter.getNamespaceURI(t);return LD[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){WL(this,t);return}switch(this.insertionMode){case D.INITIAL:{co(this,t);break}case D.BEFORE_HTML:{Uo(this,t);break}case D.BEFORE_HEAD:{Ho(this,t);break}case D.IN_HEAD:{zo(this,t);break}case D.IN_HEAD_NO_SCRIPT:{qo(this,t);break}case D.AFTER_HEAD:{Wo(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{sA(this,t);break}case D.TEXT:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{yf(this,t);break}case D.IN_TABLE_TEXT:{hA(this,t);break}case D.IN_COLUMN_GROUP:{Zu(this,t);break}case D.AFTER_BODY:{Qu(this,t);break}case D.AFTER_AFTER_BODY:{Du(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){qL(this,t);return}switch(this.insertionMode){case D.INITIAL:{co(this,t);break}case D.BEFORE_HTML:{Uo(this,t);break}case D.BEFORE_HEAD:{Ho(this,t);break}case D.IN_HEAD:{zo(this,t);break}case D.IN_HEAD_NO_SCRIPT:{qo(this,t);break}case D.AFTER_HEAD:{Wo(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{yf(this,t);break}case D.IN_COLUMN_GROUP:{Zu(this,t);break}case D.AFTER_BODY:{Qu(this,t);break}case D.AFTER_AFTER_BODY:{Du(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Sh(this,t);return}switch(this.insertionMode){case D.INITIAL:case D.BEFORE_HTML:case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_TEMPLATE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{Sh(this,t);break}case D.IN_TABLE_TEXT:{fo(this,t);break}case D.AFTER_BODY:{TR(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{wR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{AR(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,$.misplacedDoctype);break}case D.IN_TABLE_TEXT:{fo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,$.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?VL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{co(this,t);break}case D.BEFORE_HTML:{_R(this,t);break}case D.BEFORE_HEAD:{SR(this,t);break}case D.IN_HEAD:{Hr(this,t);break}case D.IN_HEAD_NO_SCRIPT:{OR(this,t);break}case D.AFTER_HEAD:{NR(this,t);break}case D.IN_BODY:{Bt(this,t);break}case D.IN_TABLE:{Da(this,t);break}case D.IN_TABLE_TEXT:{fo(this,t);break}case D.IN_CAPTION:{CL(this,t);break}case D.IN_COLUMN_GROUP:{cm(this,t);break}case D.IN_TABLE_BODY:{fc(this,t);break}case D.IN_ROW:{dc(this,t);break}case D.IN_CELL:{PL(this,t);break}case D.IN_SELECT:{gA(this,t);break}case D.IN_SELECT_IN_TABLE:{DL(this,t);break}case D.IN_TEMPLATE:{LL(this,t);break}case D.AFTER_BODY:{jL(this,t);break}case D.IN_FRAMESET:{BL(this,t);break}case D.AFTER_FRAMESET:{$L(this,t);break}case D.AFTER_AFTER_BODY:{HL(this,t);break}case D.AFTER_AFTER_FRAMESET:{zL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?YL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{co(this,t);break}case D.BEFORE_HTML:{kR(this,t);break}case D.BEFORE_HEAD:{CR(this,t);break}case D.IN_HEAD:{IR(this,t);break}case D.IN_HEAD_NO_SCRIPT:{PR(this,t);break}case D.AFTER_HEAD:{DR(this,t);break}case D.IN_BODY:{cc(this,t);break}case D.TEXT:{yL(this,t);break}case D.IN_TABLE:{as(this,t);break}case D.IN_TABLE_TEXT:{fo(this,t);break}case D.IN_CAPTION:{IL(this,t);break}case D.IN_COLUMN_GROUP:{OL(this,t);break}case D.IN_TABLE_BODY:{Ch(this,t);break}case D.IN_ROW:{mA(this,t);break}case D.IN_CELL:{NL(this,t);break}case D.IN_SELECT:{bA(this,t);break}case D.IN_SELECT_IN_TABLE:{RL(this,t);break}case D.IN_TEMPLATE:{ML(this,t);break}case D.AFTER_BODY:{vA(this,t);break}case D.IN_FRAMESET:{FL(this,t);break}case D.AFTER_FRAMESET:{UL(this,t);break}case D.AFTER_AFTER_BODY:{Du(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{co(this,t);break}case D.BEFORE_HTML:{Uo(this,t);break}case D.BEFORE_HEAD:{Ho(this,t);break}case D.IN_HEAD:{zo(this,t);break}case D.IN_HEAD_NO_SCRIPT:{qo(this,t);break}case D.AFTER_HEAD:{Wo(this,t);break}case D.IN_BODY:case D.IN_TABLE:case D.IN_CAPTION:case D.IN_COLUMN_GROUP:case D.IN_TABLE_BODY:case D.IN_ROW:case D.IN_CELL:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:{fA(this,t);break}case D.TEXT:{vL(this,t);break}case D.IN_TABLE_TEXT:{fo(this,t);break}case D.IN_TEMPLATE:{yA(this,t);break}case D.AFTER_BODY:case D.IN_FRAMESET:case D.AFTER_FRAMESET:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{lm(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===k.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:case D.TEXT:case D.IN_COLUMN_GROUP:case D.IN_SELECT:case D.IN_SELECT_IN_TABLE:case D.IN_FRAMESET:case D.AFTER_FRAMESET:{this._insertCharacters(t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:case D.AFTER_BODY:case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{oA(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{yf(this,t);break}case D.IN_TABLE_TEXT:{dA(this,t);break}}}}function gR(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):cA(e,t),r}function bR(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){const i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(Math.max(n,0)),e.activeFormattingElements.removeEntry(t)),r}function yR(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==r;a++,o=i){i=e.openElements.getCommonAncestor(o);const s=e.activeFormattingElements.getElementEntry(o),u=s&&a>=pR;!s||u?(u&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(o)):(o=vR(e,s),n===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(o,n),n=o)}return n}function vR(e,t){const r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function xR(e,t,r){const n=e.treeAdapter.getTagName(t),i=Ya(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{const a=e.treeAdapter.getNamespaceURI(t);i===g.TEMPLATE&&a===K.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function ER(e,t,r){const n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,i.tagID)}function um(e,t){for(let r=0;r<hR;r++){const n=gR(e,t);if(!n)break;const i=bR(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const a=yR(e,i,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&xR(e,o,a),ER(e,i,n)}}function Sh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function TR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function wR(e,t){e._appendCommentNode(t,e.document)}function lm(e,t){if(e.stopped=!0,t.location){const r=e.fragmentContext?0:2;for(let n=e.openElements.stackTop;n>=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(a);o&&!o.endTag&&e._setEndLocation(a,t)}}}}function AR(e,t){e._setDocumentType(t);const r=t.forceQuirks?Ar.QUIRKS:eR(t);JD(t)||e._err(t,$.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=D.BEFORE_HTML}function co(e,t){e._err(t,$.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ar.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function _R(e,t){t.tagID===g.HTML?(e._insertElement(t,K.HTML),e.insertionMode=D.BEFORE_HEAD):Uo(e,t)}function kR(e,t){const r=t.tagID;(r===g.HTML||r===g.HEAD||r===g.BODY||r===g.BR)&&Uo(e,t)}function Uo(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function SR(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.HEAD:{e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:Ho(e,t)}}function CR(e,t){const r=t.tagID;r===g.HEAD||r===g.BODY||r===g.HTML||r===g.BR?Ho(e,t):e._err(t,$.endTagWithoutMatchingOpenElement)}function Ho(e,t){e._insertFakeElement(j.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function Hr(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,ut.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ut.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,ut.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,ut.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=D.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(D.IN_TEMPLATE);break}case g.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:zo(e,t)}}function IR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=D.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{zo(e,t);break}case g.TEMPLATE:{Vi(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function Vi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,$.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,$.endTagWithoutMatchingOpenElement)}function zo(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function OR(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Hr(e,t);break}case g.NOSCRIPT:{e._err(t,$.nestedNoscriptInHead);break}default:qo(e,t)}}function PR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case g.BR:{qo(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function qo(e,t){const r=t.type===_e.EOF?$.openElementsLeftAfterEof:$.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function NR(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.BODY:{e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=D.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,K.HTML),e.insertionMode=D.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,$.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Hr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,$.misplacedStartTagForHeadElement);break}default:Wo(e,t)}}function DR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Wo(e,t);break}case g.TEMPLATE:{Vi(e,t);break}default:e._err(t,$.endTagWithoutMatchingOpenElement)}}function Wo(e,t){e._insertFakeElement(j.BODY,g.BODY),e.insertionMode=D.IN_BODY,lc(e,t)}function lc(e,t){switch(t.type){case _e.CHARACTER:{sA(e,t);break}case _e.WHITESPACE_CHARACTER:{oA(e,t);break}case _e.COMMENT:{Sh(e,t);break}case _e.START_TAG:{Bt(e,t);break}case _e.END_TAG:{cc(e,t);break}case _e.EOF:{fA(e,t);break}}}function oA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function sA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function RR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function LR(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function MR(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_FRAMESET)}function jR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function BR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&kh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function FR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function $R(e,t){const r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),r||(e.formElement=e.openElements.current))}function UR(e,t){e.framesetOk=!1;const r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){const i=e.openElements.tagIDs[n];if(r===g.LI&&i===g.LI||(r===g.DD||r===g.DT)&&(i===g.DD||i===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function HR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=ut.PLAINTEXT}function zR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1}function qR(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);r&&(um(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function WR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function VR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(um(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function YR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function KR(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ar.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=D.IN_TABLE}function uA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function lA(e){const t=Zw(e,Ii.TYPE);return t!=null&&t.toLowerCase()===dR}function GR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),lA(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function XR(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function ZR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function QR(e,t){t.tagName=j.IMG,t.tagID=g.IMG,uA(e,t)}function JR(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ut.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function eL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ut.RAWTEXT)}function tL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ut.RAWTEXT)}function wb(e,t){e._switchToTextParsing(t,ut.RAWTEXT)}function rL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===D.IN_TABLE||e.insertionMode===D.IN_CAPTION||e.insertionMode===D.IN_TABLE_BODY||e.insertionMode===D.IN_ROW||e.insertionMode===D.IN_CELL?D.IN_SELECT_IN_TABLE:D.IN_SELECT}function nL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function iL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function aL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,K.HTML)}function oL(e,t){e._reconstructActiveFormattingElements(),nA(t),sm(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function sL(e,t){e._reconstructActiveFormattingElements(),iA(t),sm(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function Ab(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function Bt(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{WR(e,t);break}case g.A:{qR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{BR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{jR(e,t);break}case g.LI:case g.DD:case g.DT:{UR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{uA(e,t);break}case g.HR:{ZR(e,t);break}case g.RB:case g.RTC:{iL(e,t);break}case g.RT:case g.RP:{aL(e,t);break}case g.PRE:case g.LISTING:{FR(e,t);break}case g.XMP:{eL(e,t);break}case g.SVG:{sL(e,t);break}case g.HTML:{RR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Hr(e,t);break}case g.BODY:{LR(e,t);break}case g.FORM:{$R(e,t);break}case g.NOBR:{VR(e,t);break}case g.MATH:{oL(e,t);break}case g.TABLE:{KR(e,t);break}case g.INPUT:{GR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{XR(e,t);break}case g.IMAGE:{QR(e,t);break}case g.BUTTON:{zR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{YR(e,t);break}case g.IFRAME:{tL(e,t);break}case g.SELECT:{rL(e,t);break}case g.OPTION:case g.OPTGROUP:{nL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{wb(e,t);break}case g.FRAMESET:{MR(e,t);break}case g.TEXTAREA:{JR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?wb(e,t):Ab(e,t);break}case g.PLAINTEXT:{HR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Ab(e,t)}}function uL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,e.options.sourceCodeLocationInfo)){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function lL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,vA(e,t))}function cL(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function fL(e){const t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):r&&e.openElements.remove(r))}function dL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(j.P,g.P),e._closePElement()}function hL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function pL(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function mL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function gL(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function bL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function cA(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],o=e.openElements.tagIDs[i];if(n===o&&(n!==g.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,o))break}}function cc(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{um(e,t);break}case g.P:{dL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{cL(e,t);break}case g.LI:{hL(e);break}case g.DD:case g.DT:{pL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{mL(e);break}case g.BR:{bL(e);break}case g.BODY:{uL(e,t);break}case g.HTML:{lL(e,t);break}case g.FORM:{fL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{gL(e,t);break}case g.TEMPLATE:{Vi(e,t);break}default:cA(e,t)}}function fA(e,t){e.tmplInsertionModeStack.length>0?yA(e,t):lm(e,t)}function yL(e,t){var r;t.tagID===g.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function vL(e,t){e._err(t,$.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yf(e,t){if(e.openElements.currentTagId!==void 0&&aA.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=D.IN_TABLE_TEXT,t.type){case _e.CHARACTER:{hA(e,t);break}case _e.WHITESPACE_CHARACTER:{dA(e,t);break}}else Ps(e,t)}function xL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_CAPTION}function EL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function TL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,g.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,cm(e,t)}function wL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_TABLE_BODY}function AL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,g.TBODY),e.insertionMode=D.IN_TABLE_BODY,fc(e,t)}function _L(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function kL(e,t){lA(t)?e._appendElement(t,K.HTML):Ps(e,t),t.ackSelfClosing=!0}function SL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Da(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{AL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Hr(e,t);break}case g.COL:{TL(e,t);break}case g.FORM:{SL(e,t);break}case g.TABLE:{_L(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{wL(e,t);break}case g.INPUT:{kL(e,t);break}case g.CAPTION:{xL(e,t);break}case g.COLGROUP:{EL(e,t);break}default:Ps(e,t)}}function as(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Vi(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ps(e,t)}}function Ps(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,lc(e,t),e.fosterParentingEnabled=r}function dA(e,t){e.pendingCharacterTokens.push(t)}function hA(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function fo(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Ps(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const pA=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function CL(e,t){const r=t.tagID;pA.has(r)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,Da(e,t)):Bt(e,t)}function IL(e,t){const r=t.tagID;switch(r){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,r===g.TABLE&&as(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:cc(e,t)}}function cm(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.COL:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Hr(e,t);break}default:Zu(e,t)}}function OL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case g.TEMPLATE:{Vi(e,t);break}case g.COL:break;default:Zu(e,t)}}function Zu(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE,e._processToken(t))}function fc(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,g.TR),e.insertionMode=D.IN_ROW,dc(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE,Da(e,t));break}default:Da(e,t)}}function Ch(e,t){const r=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(r)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE,as(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:as(e,t)}}function dc(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,fc(e,t));break}default:Da(e,t)}}function mA(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,Ch(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=D.IN_TABLE_BODY,Ch(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:as(e,t)}}function PL(e,t){const r=t.tagID;pA.has(r)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),dc(e,t)):Bt(e,t)}function NL(e,t){const r=t.tagID;switch(r){case g.TD:case g.TH:{e.openElements.hasInTableScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(r)&&(e._closeTableCell(),mA(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:cc(e,t)}}function gA(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,K.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,K.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Hr(e,t);break}}}function bA(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Vi(e,t);break}}}function DL(e,t){const r=t.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):gA(e,t)}function RL(e,t){const r=t.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):bA(e,t)}function LL(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Hr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=D.IN_TABLE,e.insertionMode=D.IN_TABLE,Da(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,cm(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,fc(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,dc(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,Bt(e,t)}}function ML(e,t){t.tagID===g.TEMPLATE&&Vi(e,t)}function yA(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):lm(e,t)}function jL(e,t){t.tagID===g.HTML?Bt(e,t):Qu(e,t)}function vA(e,t){var r;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=D.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else Qu(e,t)}function Qu(e,t){e.insertionMode=D.IN_BODY,lc(e,t)}function BL(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.FRAMESET:{e._insertElement(t,K.HTML);break}case g.FRAME:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Hr(e,t);break}}}function FL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=D.AFTER_FRAMESET))}function $L(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.NOFRAMES:{Hr(e,t);break}}}function UL(e,t){t.tagID===g.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function HL(e,t){t.tagID===g.HTML?Bt(e,t):Du(e,t)}function Du(e,t){e.insertionMode=D.IN_BODY,lc(e,t)}function zL(e,t){switch(t.tagID){case g.HTML:{Bt(e,t);break}case g.NOFRAMES:{Hr(e,t);break}}}function qL(e,t){t.chars=Je,e._insertCharacters(t)}function WL(e,t){e._insertCharacters(t),e.framesetOk=!1}function xA(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==K.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function VL(e,t){if(sR(t))xA(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===K.MATHML?nA(t):n===K.SVG&&(uR(t),iA(t)),sm(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function YL(e,t){if(t.tagID===g.P||t.tagID===g.BR){xA(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){const n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===K.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const hc=EA("end"),ln=EA("start");function EA(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function TA(e){const t=ln(e),r=hc(e);if(t&&r)return{start:t,end:r}}const KL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,GL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),_b={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function wA(e,t){const r=aM(e),n=Vw("type",{handlers:{root:XL,element:ZL,text:QL,comment:_A,doctype:JL,raw:tM},unknown:rM}),i={parser:r?new Tb(_b):Tb.getFragmentParser(void 0,_b),handle(s){n(s,i)},stitches:!1,options:t||{}};n(e,i),Ka(i,ln());const a=r?i.parser.document:i.parser.getFragment(),o=oD(a,{file:i.options.file});return i.stitches&&an(o,"comment",function(s,u,l){const c=s;if(c.value.stitch&&l&&u!==void 0){const f=l.children;return f[u]=c.value.stitch,u}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function AA(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function XL(e,t){AA(e.children,t)}function ZL(e,t){nM(e,t),AA(e.children,t),iM(e,t)}function QL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:_e.CHARACTER,chars:e.value,location:Ns(e)};Ka(t,ln(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function JL(e,t){const r={type:_e.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ns(e)};Ka(t,ln(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function eM(e,t){t.stitches=!0;const r=oM(e);if("children"in e&&"children"in r){const n=wA({type:"root",children:e.children},t.options);r.children=n.children}_A({type:"comment",value:{stitch:r}},t)}function _A(e,t){const r=e.value,n={type:_e.COMMENT,data:r,location:Ns(e)};Ka(t,ln(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function tM(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,kA(t,ln(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(KL,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=t.parser.tokenizer._consume();t.parser.tokenizer._callState(r)}}function rM(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))eM(r,t);else{let n="";throw GL.has(r.type)&&(n=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+r.type+"` node"+n)}}function Ka(e,t){kA(e,t);const r=e.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=e.parser.tokenizer.preprocessor.line,r.location.endCol=e.parser.tokenizer.preprocessor.col+1,r.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=ut.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function kA(e,t){if(t&&t.offset!==void 0){const r={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=r}}function nM(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ut.PLAINTEXT)return;Ka(t,ln(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:Ai.html;i===Ai.html&&r==="svg"&&(i=Ai.svg);const a=fD({...e,children:[]},{space:i===Ai.svg?"svg":"html"}),o={type:_e.START_TAG,tagName:r,tagID:Ya(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ns(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function iM(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&vD.includes(r)||t.parser.tokenizer.state===ut.PLAINTEXT)return;Ka(t,hc(e));const n={type:_e.END_TAG,tagName:r,tagID:Ya(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ns(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ut.RCDATA||t.parser.tokenizer.state===ut.RAWTEXT||t.parser.tokenizer.state===ut.SCRIPT_DATA)&&(t.parser.tokenizer.state=ut.DATA)}function aM(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ns(e){const t=ln(e)||{line:void 0,column:void 0,offset:void 0},r=hc(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function oM(e){return"children"in e?Ri({...e,children:[]}):Ri(e)}function Ih(e){return function(t,r){return wA(t,{...e,file:r})}}const hi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],wi={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...hi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...hi],h2:[["className","sr-only"]],img:[...hi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...hi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...hi],table:[...hi],ul:[...hi,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Wn={}.hasOwnProperty;function sM(e,t){let r={type:"root",children:[]};const n={schema:t?{...wi,...t}:wi,stack:[]},i=SA(n,e);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}function SA(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return uM(e,r);case"doctype":return lM(e,r);case"element":return cM(e,r);case"root":return fM(e,r);case"text":return dM(e,r)}}}function uM(e,t){if(e.schema.allowComments){const r=typeof t.value=="string"?t.value:"",n=r.indexOf("-->"),a={type:"comment",value:n<0?r:r.slice(0,n)};return Ds(a,t),a}}function lM(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return Ds(r,t),r}}function cM(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=CA(e,t.children),i=hM(e,t.properties);e.stack.pop();let a=!1;if(r&&r!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(r))&&(a=!0,e.schema.ancestors&&Wn.call(e.schema.ancestors,r))){const s=e.schema.ancestors[r];let u=-1;for(a=!1;++u<s.length;)e.stack.includes(s[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const o={type:"element",tagName:r,properties:i,children:n};return Ds(o,t),o}function fM(e,t){const n={type:"root",children:CA(e,t.children)};return Ds(n,t),n}function dM(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return Ds(n,t),n}function CA(e,t){const r=[];if(Array.isArray(t)){const n=t;let i=-1;for(;++i<n.length;){const a=SA(e,n[i]);a&&(Array.isArray(a)?r.push(...a):r.push(a))}}return r}function hM(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,i=e.schema.required,a=n&&Wn.call(n,r)?n[r]:void 0,o=n&&Wn.call(n,"*")?n["*"]:void 0,s=t&&typeof t=="object"?t:{},u={};let l;for(l in s)if(Wn.call(s,l)){const c=s[l];let f=kb(e,Sb(a,l),l,c);f==null&&(f=kb(e,Sb(o,l),l,c)),f!=null&&(u[l]=f)}if(i&&Wn.call(i,r)){const c=i[r];for(l in c)Wn.call(c,l)&&!Wn.call(u,l)&&(u[l]=c[l])}return u}function kb(e,t,r,n){return t?Array.isArray(n)?pM(e,t,r,n):IA(e,t,r,n):void 0}function pM(e,t,r,n){let i=-1;const a=[];for(;++i<n.length;){const o=IA(e,t,r,n[i]);(typeof o=="number"||typeof o=="string")&&a.push(o)}return a}function IA(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&mM(e,r,n)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const o=t[a];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(n))){i=!0;break}}else if(o===n){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(r)?e.schema.clobberPrefix+n:n}}function mM(e,t,r){const n=e.schema.protocols&&Wn.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!n||n.length===0)return!0;const i=String(r),a=i.indexOf(":"),o=i.indexOf("?"),s=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<n.length;){const c=n[l];if(a===c.length&&i.slice(0,c.length)===c)return!0}return!1}function Ds(e,t){const r=TA(t);t.data&&(e.data=Ri(t.data)),r&&(e.position=r)}function Sb(e,t){let r,n=-1;if(e)for(;++n<e.length;){const i=e[n],a=typeof i=="string"?i:i[0];if(a===t)return i;a==="data*"&&(r=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return r}function OA(e){return function(t){return sM(t,e)}}function Cb(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(t);for(;i!==-1;)n++,i=r.indexOf(t,i+t.length);return n}const Yt=si(/[A-Za-z]/),Mt=si(/[\dA-Za-z]/),gM=si(/[#-'*+\--9=?A-Z^-~]/);function Ju(e){return e!==null&&(e<32||e===127)}const Oh=si(/\d/),bM=si(/[\dA-Fa-f]/),yM=si(/[!-/:-@[-`{-~]/);function de(e){return e!==null&&e<-2}function We(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const pc=si(new RegExp("\\p{P}|\\p{S}","u")),Li=si(/\s/);function si(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function vM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function xM(e,t,r){const i=ac((r||{}).ignore||[]),a=EM(t);let o=-1;for(;++o<a.length;)Jp(e,"text",s);function s(l,c){let f=-1,d;for(;++f<c.length;){const h=c[f],p=d?d.children:void 0;if(i(h,p?p.indexOf(h):void 0,d))return;d=h}if(d)return u(l,c)}function u(l,c){const f=c[c.length-1],d=a[o][0],h=a[o][1];let p=0;const y=f.children.indexOf(l);let v=!1,T=[];d.lastIndex=0;let x=d.exec(l.value);for(;x;){const _=x.index,w={index:x.index,input:x.input,stack:[...c,l]};let A=h(...x,w);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?d.lastIndex=_+1:(p!==_&&T.push({type:"text",value:l.value.slice(p,_)}),Array.isArray(A)?T.push(...A):A&&T.push(A),p=_+x[0].length,v=!0),!d.global)break;x=d.exec(l.value)}return v?(p<l.value.length&&T.push({type:"text",value:l.value.slice(p)}),f.children.splice(y,1,...T)):T=[l],y+T.length}}function EM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let n=-1;for(;++n<r.length;){const i=r[n];t.push([TM(i[0]),wM(i[1])])}return t}function TM(e){return typeof e=="string"?new RegExp(vM(e),"g"):e}function wM(e){return typeof e=="function"?e:function(){return e}}const vf="phrasing",xf=["autolink","link","image","label"];function AM(){return{transforms:[PM],enter:{literalAutolink:kM,literalAutolinkEmail:Ef,literalAutolinkHttp:Ef,literalAutolinkWww:Ef},exit:{literalAutolink:OM,literalAutolinkEmail:IM,literalAutolinkHttp:SM,literalAutolinkWww:CM}}}function _M(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vf,notInConstruct:xf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vf,notInConstruct:xf},{character:":",before:"[ps]",after:"\\/",inConstruct:vf,notInConstruct:xf}]}}function kM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ef(e){this.config.enter.autolinkProtocol.call(this,e)}function SM(e){this.config.exit.autolinkProtocol.call(this,e)}function CM(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function IM(e){this.config.exit.autolinkEmail.call(this,e)}function OM(e){this.exit(e)}function PM(e){xM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,NM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),DM]],{ignore:["link","linkReference"]})}function NM(e,t,r,n,i){let a="";if(!PA(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!RM(r)))return!1;const o=LM(r+n);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function DM(e,t,r,n){return!PA(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function RM(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function LM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")");const i=Cb(e,"(");let a=Cb(e,")");for(;n!==-1&&i>a;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[e,r]}function PA(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Li(r)||pc(r))&&(!t||r!==47)}function Br(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}NA.peek=qM;function MM(){this.buffer()}function jM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function BM(){this.buffer()}function FM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function $M(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Br(this.sliceSerialize(e)).toLowerCase(),r.label=t}function UM(e){this.exit(e)}function HM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Br(this.sliceSerialize(e)).toLowerCase(),r.label=t}function zM(e){this.exit(e)}function qM(){return"["}function NA(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const o=r.enter("footnoteReference"),s=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),s(),o(),a+=i.move("]"),a}function WM(){return{enter:{gfmFootnoteCallString:MM,gfmFootnoteCall:jM,gfmFootnoteDefinitionLabelString:BM,gfmFootnoteDefinition:FM},exit:{gfmFootnoteCallString:$M,gfmFootnoteCall:UM,gfmFootnoteDefinitionLabelString:HM,gfmFootnoteDefinition:zM}}}function VM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:NA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,o){const s=a.createTracker(o);let u=s.move("[^");const l=a.enter("footnoteDefinition"),c=a.enter("label");return u+=s.move(a.safe(a.associationId(n),{before:u,after:"]"})),c(),u+=s.move("]:"),n.children&&n.children.length>0&&(s.shift(4),u+=s.move((t?`
23
- `:" ")+a.indentLines(a.containerFlow(n,s.current()),t?DA:YM))),l(),u}}function YM(e,t,r){return t===0?e:DA(e,t,r)}function DA(e,t,r){return(r?"":" ")+e}const KM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RA.peek=JM;function GM(){return{canContainEols:["delete"],enter:{strikethrough:ZM},exit:{strikethrough:QM}}}function XM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:KM}],handlers:{delete:RA}}}function ZM(e){this.enter({type:"delete",children:[]},e)}function QM(e){this.exit(e)}function RA(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let o=i.move("~~");return o+=r.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function JM(){return"~"}function e6(e){return e.length}function t6(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||e6,a=[],o=[],s=[],u=[];let l=0,c=-1;for(;++c<e.length;){const b=[],y=[];let v=-1;for(e[c].length>l&&(l=e[c].length);++v<e[c].length;){const T=r6(e[c][v]);if(r.alignDelimiters!==!1){const x=i(T);y[v]=x,(u[v]===void 0||x>u[v])&&(u[v]=x)}b.push(T)}o[c]=b,s[c]=y}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)a[f]=Ib(n[f]);else{const b=Ib(n);for(;++f<l;)a[f]=b}f=-1;const d=[],h=[];for(;++f<l;){const b=a[f];let y="",v="";b===99?(y=":",v=":"):b===108?y=":":b===114&&(v=":");let T=r.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-v.length);const x=y+"-".repeat(T)+v;r.alignDelimiters!==!1&&(T=y.length+T+v.length,T>u[f]&&(u[f]=T),h[f]=T),d[f]=x}o.splice(1,0,d),s.splice(1,0,h),c=-1;const p=[];for(;++c<o.length;){const b=o[c],y=s[c];f=-1;const v=[];for(;++f<l;){const T=b[f]||"";let x="",_="";if(r.alignDelimiters!==!1){const w=u[f]-(y[f]||0),A=a[f];A===114?x=" ".repeat(w):A===99?w%2?(x=" ".repeat(w/2+.5),_=" ".repeat(w/2-.5)):(x=" ".repeat(w/2),_=x):_=" ".repeat(w)}r.delimiterStart!==!1&&!f&&v.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&T==="")&&(r.delimiterStart!==!1||f)&&v.push(" "),r.alignDelimiters!==!1&&v.push(x),v.push(T),r.alignDelimiters!==!1&&v.push(_),r.padding!==!1&&v.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&v.push("|")}p.push(r.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return p.join(`
24
- `)}function r6(e){return e==null?"":String(e)}function Ib(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function n6(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const o=r.indentLines(r.containerFlow(e,a.current()),i6);return i(),o}function i6(e,t,r){return">"+(r?"":" ")+e}function a6(e,t){return Ob(e,t.inConstruct,!0)&&!Ob(e,t.notInConstruct,!1)}function Ob(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function Pb(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
25
- `&&a6(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
26
- `}function o6(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>o&&(o=a):a=1,i=n+t.length,n=r.indexOf(t,i);return o}function s6(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function u6(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function l6(e,t,r,n){const i=u6(r),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(s6(e,r)){const f=r.enter("codeIndented"),d=r.indentLines(a,c6);return f(),d}const s=r.createTracker(n),u=i.repeat(Math.max(o6(a,i)+1,3)),l=r.enter("codeFenced");let c=s.move(u);if(e.lang){const f=r.enter(`codeFencedLang${o}`);c+=s.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${o}`);c+=s.move(" "),c+=s.move(r.safe(e.meta,{before:c,after:`
27
- `,encode:["`"],...s.current()})),f()}return c+=s.move(`
28
- `),a&&(c+=s.move(a+`
29
- `)),c+=s.move(u),l(),c}function c6(e,t,r){return(r?"":" ")+e}function fm(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function f6(e,t,r,n){const i=fm(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("definition");let s=r.enter("label");const u=r.createTracker(n);let l=u.move("[");return l+=u.move(r.safe(r.associationId(e),{before:l,after:"]",...u.current()})),l+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":`
30
- `,...u.current()}))),s(),e.title&&(s=r.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),o(),l}function d6(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function os(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ra(e){if(e===null||We(e)||Li(e))return 1;if(pc(e))return 2}function el(e,t,r){const n=Ra(e),i=Ra(t);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}LA.peek=h6;function LA(e,t,r,n){const i=d6(r),a=r.enter("emphasis"),o=r.createTracker(n),s=o.move(i);let u=o.move(r.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=u.charCodeAt(0),c=el(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=os(l)+u.slice(1));const f=u.charCodeAt(u.length-1),d=el(n.after.charCodeAt(0),f,i);d.inside&&(u=u.slice(0,-1)+os(f));const h=o.move(i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+u+h}function h6(e,t,r){return r.options.emphasis||"*"}const p6={};function dm(e,t){const r=p6,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return MA(e,n,i)}function MA(e,t,r){if(m6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Nb(e.children,t,r)}return Array.isArray(e)?Nb(e,t,r):""}function Nb(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=MA(e[i],t,r);return n.join("")}function m6(e){return!!(e&&typeof e=="object")}function g6(e,t){let r=!1;return an(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Eh}),!!((!e.depth||e.depth<3)&&dm(e)&&(t.options.setext||r))}function b6(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(g6(e,r)){const c=r.enter("headingSetext"),f=r.enter("phrasing"),d=r.containerPhrasing(e,{...a.current(),before:`
31
- `,after:`
32
- `});return f(),c(),d+`
33
- `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
34
- `))+1))}const o="#".repeat(i),s=r.enter("headingAtx"),u=r.enter("phrasing");a.move(o+" ");let l=r.containerPhrasing(e,{before:"# ",after:`
35
- `,...a.current()});return/^[\t ]/.test(l)&&(l=os(l.charCodeAt(0))+l.slice(1)),l=l?o+" "+l:o,r.options.closeAtx&&(l+=" "+o),u(),s(),l}jA.peek=y6;function jA(e){return e.value||""}function y6(){return"<"}BA.peek=v6;function BA(e,t,r,n){const i=fm(r),a=i==='"'?"Quote":"Apostrophe",o=r.enter("image");let s=r.enter("label");const u=r.createTracker(n);let l=u.move("![");return l+=u.move(r.safe(e.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(s=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=r.enter(`title${a}`),l+=u.move(" "+i),l+=u.move(r.safe(e.title,{before:l,after:i,...u.current()})),l+=u.move(i),s()),l+=u.move(")"),o(),l}function v6(){return"!"}FA.peek=x6;function FA(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let o=r.enter("label");const s=r.createTracker(n);let u=s.move("![");const l=r.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return o(),r.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function x6(){return"!"}$A.peek=E6;function $A(e,t,r){let n=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const o=r.unsafe[a],s=r.compilePattern(o);let u;if(o.atBreak)for(;u=s.exec(n);){let l=u.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(u.index+1)}}return i+n+i}function E6(){return"`"}function UA(e,t){const r=dm(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}HA.peek=T6;function HA(e,t,r,n){const i=fm(r),a=i==='"'?"Quote":"Apostrophe",o=r.createTracker(n);let s,u;if(UA(e,r)){const c=r.stack;r.stack=[],s=r.enter("autolink");let f=o.move("<");return f+=o.move(r.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),r.stack=c,f}s=r.enter("link"),u=r.enter("label");let l=o.move("[");return l+=o.move(r.containerPhrasing(e,{before:l,after:"](",...o.current()})),l+=o.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),l+=o.move("<"),l+=o.move(r.safe(e.url,{before:l,after:">",...o.current()})),l+=o.move(">")):(u=r.enter("destinationRaw"),l+=o.move(r.safe(e.url,{before:l,after:e.title?" ":")",...o.current()}))),u(),e.title&&(u=r.enter(`title${a}`),l+=o.move(" "+i),l+=o.move(r.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),u()),l+=o.move(")"),s(),l}function T6(e,t,r){return UA(e,r)?"<":"["}zA.peek=w6;function zA(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let o=r.enter("label");const s=r.createTracker(n);let u=s.move("[");const l=r.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(l+"]["),o();const c=r.stack;r.stack=[],o=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...s.current()});return o(),r.stack=c,a(),i==="full"||!l||l!==f?u+=s.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function w6(){return"["}function hm(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function A6(e){const t=hm(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function _6(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function qA(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function k6(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let o=e.ordered?_6(r):hm(r);const s=e.ordered?o==="."?")":".":A6(r);let u=t&&r.bulletLastUsed?o===r.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&c&&(!c.children||!c.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(u=!0),qA(r)===o&&c){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(o=s),r.bulletCurrent=o;const l=r.containerFlow(e,n);return r.bulletLastUsed=o,r.bulletCurrent=a,i(),l}function S6(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function C6(e,t,r,n){const i=S6(r);let a=r.bulletCurrent||hm(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=r.createTracker(n);s.move(a+" ".repeat(o-a.length)),s.shift(o);const u=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),c);return u(),l;function c(f,d,h){return d?(h?"":" ".repeat(o))+f:(h?a:a+" ".repeat(o-a.length))+f}}function I6(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),o=r.containerPhrasing(e,n);return a(),i(),o}const O6=ac(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function P6(e,t,r,n){return(e.children.some(function(o){return O6(o)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function N6(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}WA.peek=D6;function WA(e,t,r,n){const i=N6(r),a=r.enter("strong"),o=r.createTracker(n),s=o.move(i+i);let u=o.move(r.containerPhrasing(e,{after:i,before:s,...o.current()}));const l=u.charCodeAt(0),c=el(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=os(l)+u.slice(1));const f=u.charCodeAt(u.length-1),d=el(n.after.charCodeAt(0),f,i);d.inside&&(u=u.slice(0,-1)+os(f));const h=o.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},s+u+h}function D6(e,t,r){return r.options.strong||"*"}function R6(e,t,r,n){return r.safe(e.value,n)}function L6(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function M6(e,t,r){const n=(qA(r)+(r.options.ruleSpaces?" ":"")).repeat(L6(r));return r.options.ruleSpaces?n.slice(0,-1):n}const VA={blockquote:n6,break:Pb,code:l6,definition:f6,emphasis:LA,hardBreak:Pb,heading:b6,html:jA,image:BA,imageReference:FA,inlineCode:$A,link:HA,linkReference:zA,list:k6,listItem:C6,paragraph:I6,root:P6,strong:WA,text:R6,thematicBreak:M6},Db=document.createElement("i");function pm(e){const t="&"+e+";";Db.innerHTML=t;const r=Db.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function YA(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}const j6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function B6(e){return e.replace(j6,F6)}function F6(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return YA(r.slice(a?2:1),a?16:10)}return pm(r)||e}function $6(){return{enter:{table:U6,tableData:Rb,tableHeader:Rb,tableRow:z6},exit:{codeText:q6,table:H6,tableData:Tf,tableHeader:Tf,tableRow:Tf}}}function U6(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function H6(e){this.exit(e),this.data.inTable=void 0}function z6(e){this.enter({type:"tableRow",children:[]},e)}function Tf(e){this.exit(e)}function Rb(e){this.enter({type:"tableCell",children:[]},e)}function q6(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,W6));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function W6(e,t){return t==="|"?t:e}function V6(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,i=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
36
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:u,tableRow:s}};function o(h,p,b,y){return l(c(h,b,y),h.align)}function s(h,p,b,y){const v=f(h,b,y),T=l([v]);return T.slice(0,T.indexOf(`
37
- `))}function u(h,p,b,y){const v=b.enter("tableCell"),T=b.enter("phrasing"),x=b.containerPhrasing(h,{...y,before:a,after:a});return T(),v(),x}function l(h,p){return t6(h,{align:p,alignDelimiters:n,padding:r,stringLength:i})}function c(h,p,b){const y=h.children;let v=-1;const T=[],x=p.enter("table");for(;++v<y.length;)T[v]=f(y[v],p,b);return x(),T}function f(h,p,b){const y=h.children;let v=-1;const T=[],x=p.enter("tableRow");for(;++v<y.length;)T[v]=u(y[v],h,p,b);return x(),T}function d(h,p,b){let y=VA.inlineCode(h,p,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function Y6(){return{exit:{taskListCheckValueChecked:Lb,taskListCheckValueUnchecked:Lb,paragraph:G6}}}function K6(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:X6}}}function Lb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function G6(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function X6(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);a&&s.move(o);let u=VA.listItem(e,t,r,{...n,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+o}}function Z6(){return[AM(),WM(),GM(),$6(),Y6()]}function Q6(e){return{extensions:[_M(),VM(e),XM(),V6(e),K6()]}}function pr(e,t,r,n){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)o=Array.from(n),o.unshift(t,r),e.splice(...o);else for(r&&e.splice(t,r);a<n.length;)o=n.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function _r(e,t){return e.length>0?(pr(e,e.length,0,t),e):t}const Mb={}.hasOwnProperty;function KA(e){const t={};let r=-1;for(;++r<e.length;)J6(t,e[r]);return t}function J6(e,t){let r;for(r in t){const i=(Mb.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let o;if(a)for(o in a){Mb.call(i,o)||(i[o]=[]);const s=a[o];e4(i[o],Array.isArray(s)?s:s?[s]:[])}}}function e4(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);pr(e,0,0,n)}const t4={tokenize:s4,partial:!0},GA={tokenize:u4,partial:!0},XA={tokenize:l4,partial:!0},ZA={tokenize:c4,partial:!0},r4={tokenize:f4,partial:!0},QA={name:"wwwAutolink",tokenize:a4,previous:e2},JA={name:"protocolAutolink",tokenize:o4,previous:t2},On={name:"emailAutolink",tokenize:i4,previous:r2},cn={};function n4(){return{text:cn}}let pi=48;for(;pi<123;)cn[pi]=On,pi++,pi===58?pi=65:pi===91&&(pi=97);cn[43]=On;cn[45]=On;cn[46]=On;cn[95]=On;cn[72]=[On,JA];cn[104]=[On,JA];cn[87]=[On,QA];cn[119]=[On,QA];function i4(e,t,r){const n=this;let i,a;return o;function o(f){return!Ph(f)||!r2.call(n,n.previous)||mm(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Ph(f)?(e.consume(f),s):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(r4,c,l)(f):f===45||f===95||Mt(f)?(a=!0,e.consume(f),u):c(f)}function l(f){return e.consume(f),i=!0,u}function c(f){return a&&i&&Yt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function a4(e,t,r){const n=this;return i;function i(o){return o!==87&&o!==119||!e2.call(n,n.previous)||mm(n.events)?r(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(t4,e.attempt(GA,e.attempt(XA,a),r),r)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function o4(e,t,r){const n=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&t2.call(n,n.previous)&&!mm(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):r(f)}function s(f){if(Yt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),u}return r(f)}function u(f){return f===47?(e.consume(f),a?l:(a=!0,u)):r(f)}function l(f){return f===null||Ju(f)||We(f)||Li(f)||pc(f)?r(f):e.attempt(GA,e.attempt(XA,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function s4(e,t,r){let n=0;return i;function i(o){return(o===87||o===119)&&n<3?(n++,e.consume(o),i):o===46&&n===3?(e.consume(o),a):r(o)}function a(o){return o===null?r(o):t(o)}}function u4(e,t,r){let n,i,a;return o;function o(l){return l===46||l===95?e.check(ZA,u,s)(l):l===null||We(l)||Li(l)||l!==45&&pc(l)?u(l):(a=!0,e.consume(l),o)}function s(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),o}function u(l){return i||n||!a?r(l):t(l)}}function l4(e,t){let r=0,n=0;return i;function i(o){return o===40?(r++,e.consume(o),i):o===41&&n<r?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(ZA,t,a)(o):o===null||We(o)||Li(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&n++,e.consume(o),i}}function c4(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||We(s)||Li(s)?t(s):r(s)}function i(s){return s===null||s===40||s===91||We(s)||Li(s)?t(s):n(s)}function a(s){return Yt(s)?o(s):r(s)}function o(s){return s===59?(e.consume(s),n):Yt(s)?(e.consume(s),o):r(s)}}function f4(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return Mt(a)?r(a):t(a)}}function e2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||We(e)}function t2(e){return!Yt(e)}function r2(e){return!(e===47||Ph(e))}function Ph(e){return e===43||e===45||e===46||e===95||Mt(e)}function mm(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function Ga(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let o="";if(a===37&&Mt(e.charCodeAt(r+1))&&Mt(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(r+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(n,r),encodeURIComponent(o)),n=r+i+1,o=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function mc(e,t,r){const n=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!n.includes(a)&&(t=a(t,r),n.push(a))}return t}const Nh={name:"attention",resolveAll:d4,tokenize:h4};function d4(e,t){let r=-1,n,i,a,o,s,u,l,c;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;u=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const f={...e[n][1].end},d={...e[r][1].start};jb(f,-u),jb(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:d},a={type:u>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[r][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...s.end}},e[n][1].end={...o.start},e[r][1].start={...s.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=_r(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=_r(l,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),l=_r(l,mc(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=_r(l,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=_r(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,pr(e,n-1,r-n+3,l),r=n+l.length-c-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function h4(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ra(n);let a;return o;function o(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const l=e.exit("attentionSequence"),c=Ra(u),f=!c||c===2&&i||r.includes(u),d=!i||i===2&&c||r.includes(n);return l._open=!!(a===42?f:f&&(i||!d)),l._close=!!(a===42?d:d&&(c||!f)),t(u)}}function jb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const p4={name:"autolink",tokenize:m4};function m4(e,t,r){let n=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(h){return Yt(h)?(e.consume(h),o):h===64?r(h):l(h)}function o(h){return h===43||h===45||h===46||Mt(h)?(n=1,s(h)):l(h)}function s(h){return h===58?(e.consume(h),n=0,u):(h===43||h===45||h===46||Mt(h))&&n++<32?(e.consume(h),s):(n=0,l(h))}function u(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Ju(h)?r(h):(e.consume(h),u)}function l(h){return h===64?(e.consume(h),c):gM(h)?(e.consume(h),l):r(h)}function c(h){return Mt(h)?f(h):r(h)}function f(h){return h===46?(e.consume(h),n=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):d(h)}function d(h){if((h===45||Mt(h))&&n++<63){const p=h===45?d:f;return e.consume(h),p}return r(h)}}function Pe(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(u){return Ce(u)?(e.enter(r),s(u)):t(u)}function s(u){return Ce(u)&&a++<i?(e.consume(u),s):(e.exit(r),t(u))}}const Rs={partial:!0,tokenize:g4};function g4(e,t,r){return n;function n(a){return Ce(a)?Pe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||de(a)?t(a):r(a)}}const n2={continuation:{tokenize:y4},exit:v4,name:"blockQuote",tokenize:b4};function b4(e,t,r){const n=this;return i;function i(o){if(o===62){const s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return r(o)}function a(o){return Ce(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function y4(e,t,r){const n=this;return i;function i(o){return Ce(o)?Pe(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(n2,t,r)(o)}}function v4(e){e.exit("blockQuote")}const i2={name:"characterEscape",tokenize:x4};function x4(e,t,r){return n;function n(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return yM(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const a2={name:"characterReference",tokenize:E4};function E4(e,t,r){const n=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),a=31,o=Mt,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=bM,c):(e.enter("characterReferenceValue"),a=7,o=Oh,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===Mt&&!pm(n.sliceSerialize(d))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),c):r(f)}}const Bb={partial:!0,tokenize:w4},Fb={concrete:!0,name:"codeFenced",tokenize:T4};function T4(e,t,r){const n=this,i={partial:!0,tokenize:w};let a=0,o=0,s;return u;function u(A){return l(A)}function l(A){const S=n.events[n.events.length-1];return a=S&&S[1].type==="linePrefix"?S[2].sliceSerialize(S[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===s?(o++,e.consume(A),c):o<3?r(A):(e.exit("codeFencedFenceSequence"),Ce(A)?Pe(e,f,"whitespace")(A):f(A))}function f(A){return A===null||de(A)?(e.exit("codeFencedFence"),n.interrupt?t(A):e.check(Bb,b,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(A))}function d(A){return A===null||de(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):Ce(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Pe(e,h,"whitespace")(A)):A===96&&A===s?r(A):(e.consume(A),d)}function h(A){return A===null||de(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||de(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===s?r(A):(e.consume(A),p)}function b(A){return e.attempt(i,_,y)(A)}function y(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),v}function v(A){return a>0&&Ce(A)?Pe(e,T,"linePrefix",a+1)(A):T(A)}function T(A){return A===null||de(A)?e.check(Bb,b,_)(A):(e.enter("codeFlowValue"),x(A))}function x(A){return A===null||de(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),x)}function _(A){return e.exit("codeFenced"),t(A)}function w(A,S,O){let R=0;return C;function C(U){return A.enter("lineEnding"),A.consume(U),A.exit("lineEnding"),M}function M(U){return A.enter("codeFencedFence"),Ce(U)?Pe(A,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):L(U)}function L(U){return U===s?(A.enter("codeFencedFenceSequence"),Q(U)):O(U)}function Q(U){return U===s?(R++,A.consume(U),Q):R>=o?(A.exit("codeFencedFenceSequence"),Ce(U)?Pe(A,H,"whitespace")(U):H(U)):O(U)}function H(U){return U===null||de(U)?(A.exit("codeFencedFence"),S(U)):O(U)}}}function w4(e,t,r){const n=this;return i;function i(o){return o===null?r(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}const wf={name:"codeIndented",tokenize:_4},A4={partial:!0,tokenize:k4};function _4(e,t,r){const n=this;return i;function i(l){return e.enter("codeIndented"),Pe(e,a,"linePrefix",5)(l)}function a(l){const c=n.events[n.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(l):r(l)}function o(l){return l===null?u(l):de(l)?e.attempt(A4,o,u)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||de(l)?(e.exit("codeFlowValue"),o(l)):(e.consume(l),s)}function u(l){return e.exit("codeIndented"),t(l)}}function k4(e,t,r){const n=this;return i;function i(o){return n.parser.lazy[n.now().line]?r(o):de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Pe(e,a,"linePrefix",5)(o)}function a(o){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):de(o)?i(o):r(o)}}const S4={name:"codeText",previous:I4,resolve:C4,tokenize:O4};function C4(e){let t=e.length-4,r=3,n,i;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)i===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(i=n):(n===t||e[n][1].type==="lineEnding")&&(e[i][1].type="codeTextData",n!==i+2&&(e[i][1].end=e[n-1][1].end,e.splice(i+2,n-i-2),t-=n-i-2,n=i+2),i=void 0);return e}function I4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function O4(e,t,r){let n=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),n++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),i=0,c(f)):de(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),l(f))}function l(f){return f===null||f===32||f===96||de(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),l)}function c(f){return f===96?(e.consume(f),i++,c):i===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",l(f))}}class P4{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const n=r??Number.POSITIVE_INFINITY;return n<this.left.length?this.left.slice(t,n):t>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(t,r,n){const i=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&ho(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ho(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ho(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);ho(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ho(this.left,r.reverse())}}}function ho(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function o2(e){const t={};let r=-1,n,i,a,o,s,u,l;const c=new P4(e);for(;++r<c.length;){for(;r in t;)r=t[r];if(n=c.get(r),r&&n[1].type==="chunkFlow"&&c.get(r-1)[1].type==="listItemPrefix"&&(u=n[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,N4(c,r)),r=t[r],l=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(o=c.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},s=c.slice(i,r),s.unshift(n),c.splice(i,r-i+1,s))}}return pr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function N4(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let o=r._tokenizer;o||(o=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const s=o.events,u=[],l={};let c,f,d=-1,h=r,p=0,b=0;const y=[b];for(;h;){for(;e.get(++i)[1]!==h;);a.push(i),h._tokenizer||(c=n.sliceStream(h),h.next||c.push(null),f&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=r;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(b=d+1,y.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),T=a.pop();u.push([T,T+v.length-1]),e.splice(T,2,v)}for(u.reverse(),d=-1;++d<u.length;)l[p+u[d][0]]=p+u[d][1],p+=u[d][1]-u[d][0]-1;return l}const D4={resolve:L4,tokenize:M4},R4={partial:!0,tokenize:j4};function L4(e){return o2(e),e}function M4(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):de(s)?e.check(R4,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function j4(e,t,r){const n=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Pe(e,a,"linePrefix")}function a(o){if(o===null||de(o))return r(o);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(n.parser.constructs.flow,r,t)(o)}}function s2(e,t,r,n,i,a,o,s,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(v){return v===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||Ju(v)?r(v):(e.enter(n),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),b(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||de(v)?r(v):(e.consume(v),v===92?p:h)}function p(v){return v===60||v===62||v===92?(e.consume(v),h):h(v)}function b(v){return!c&&(v===null||v===41||We(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(n),t(v)):c<l&&v===40?(e.consume(v),c++,b):v===41?(e.consume(v),c--,b):v===null||v===32||v===40||Ju(v)?r(v):(e.consume(v),v===92?y:b)}function y(v){return v===40||v===41||v===92?(e.consume(v),b):b(v)}}function u2(e,t,r,n,i,a){const o=this;let s=0,u;return l;function l(h){return e.enter(n),e.enter(i),e.consume(h),e.exit(i),e.enter(a),c}function c(h){return s>999||h===null||h===91||h===93&&!u||h===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?r(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(n),t):de(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||de(h)||s++>999?(e.exit("chunkString"),c(h)):(e.consume(h),u||(u=!Ce(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(e.consume(h),s++,f):f(h)}}function l2(e,t,r,n,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(n),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):r(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):(e.enter(a),l(d))}function l(d){return d===o?(e.exit(a),u(o)):d===null?r(d):de(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Pe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||de(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:c)}function f(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Vo(e,t){let r;return n;function n(i){return de(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Ce(i)?Pe(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const B4={name:"definition",tokenize:$4},F4={partial:!0,tokenize:U4};function $4(e,t,r){const n=this;let i;return a;function a(h){return e.enter("definition"),o(h)}function o(h){return u2.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function s(h){return i=Br(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),u):r(h)}function u(h){return We(h)?Vo(e,l)(h):l(h)}function l(h){return s2(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(F4,f,f)(h)}function f(h){return Ce(h)?Pe(e,d,"whitespace")(h):d(h)}function d(h){return h===null||de(h)?(e.exit("definition"),n.parser.defined.push(i),t(h)):r(h)}}function U4(e,t,r){return n;function n(s){return We(s)?Vo(e,i)(s):r(s)}function i(s){return l2(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ce(s)?Pe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||de(s)?t(s):r(s)}}const H4={name:"hardBreakEscape",tokenize:z4};function z4(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return de(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const q4={name:"headingAtx",resolve:W4,tokenize:V4};function W4(e,t){let r=e.length-2,n=3,i,a;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},a={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},pr(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function V4(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&n++<6?(e.consume(c),o):c===null||We(c)?(e.exit("atxHeadingSequence"),s(c)):r(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||de(c)?(e.exit("atxHeading"),t(c)):Ce(c)?Pe(e,s,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function l(c){return c===null||c===35||We(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),l)}}const Y4=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$b=["pre","script","style","textarea"],K4={concrete:!0,name:"htmlFlow",resolveTo:Z4,tokenize:Q4},G4={partial:!0,tokenize:e5},X4={partial:!0,tokenize:J4};function Z4(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Q4(e,t,r){const n=this;let i,a,o,s,u;return l;function l(P){return c(P)}function c(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),f}function f(P){return P===33?(e.consume(P),d):P===47?(e.consume(P),a=!0,b):P===63?(e.consume(P),i=3,n.interrupt?t:N):Yt(P)?(e.consume(P),o=String.fromCharCode(P),y):r(P)}function d(P){return P===45?(e.consume(P),i=2,h):P===91?(e.consume(P),i=5,s=0,p):Yt(P)?(e.consume(P),i=4,n.interrupt?t:N):r(P)}function h(P){return P===45?(e.consume(P),n.interrupt?t:N):r(P)}function p(P){const pe="CDATA[";return P===pe.charCodeAt(s++)?(e.consume(P),s===pe.length?n.interrupt?t:L:p):r(P)}function b(P){return Yt(P)?(e.consume(P),o=String.fromCharCode(P),y):r(P)}function y(P){if(P===null||P===47||P===62||We(P)){const pe=P===47,we=o.toLowerCase();return!pe&&!a&&$b.includes(we)?(i=1,n.interrupt?t(P):L(P)):Y4.includes(o.toLowerCase())?(i=6,pe?(e.consume(P),v):n.interrupt?t(P):L(P)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(P):a?T(P):x(P))}return P===45||Mt(P)?(e.consume(P),o+=String.fromCharCode(P),y):r(P)}function v(P){return P===62?(e.consume(P),n.interrupt?t:L):r(P)}function T(P){return Ce(P)?(e.consume(P),T):C(P)}function x(P){return P===47?(e.consume(P),C):P===58||P===95||Yt(P)?(e.consume(P),_):Ce(P)?(e.consume(P),x):C(P)}function _(P){return P===45||P===46||P===58||P===95||Mt(P)?(e.consume(P),_):w(P)}function w(P){return P===61?(e.consume(P),A):Ce(P)?(e.consume(P),w):x(P)}function A(P){return P===null||P===60||P===61||P===62||P===96?r(P):P===34||P===39?(e.consume(P),u=P,S):Ce(P)?(e.consume(P),A):O(P)}function S(P){return P===u?(e.consume(P),u=null,R):P===null||de(P)?r(P):(e.consume(P),S)}function O(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||We(P)?w(P):(e.consume(P),O)}function R(P){return P===47||P===62||Ce(P)?x(P):r(P)}function C(P){return P===62?(e.consume(P),M):r(P)}function M(P){return P===null||de(P)?L(P):Ce(P)?(e.consume(P),M):r(P)}function L(P){return P===45&&i===2?(e.consume(P),q):P===60&&i===1?(e.consume(P),J):P===62&&i===4?(e.consume(P),le):P===63&&i===3?(e.consume(P),N):P===93&&i===5?(e.consume(P),re):de(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(G4,he,Q)(P)):P===null||de(P)?(e.exit("htmlFlowData"),Q(P)):(e.consume(P),L)}function Q(P){return e.check(X4,H,he)(P)}function H(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),U}function U(P){return P===null||de(P)?Q(P):(e.enter("htmlFlowData"),L(P))}function q(P){return P===45?(e.consume(P),N):L(P)}function J(P){return P===47?(e.consume(P),o="",V):L(P)}function V(P){if(P===62){const pe=o.toLowerCase();return $b.includes(pe)?(e.consume(P),le):L(P)}return Yt(P)&&o.length<8?(e.consume(P),o+=String.fromCharCode(P),V):L(P)}function re(P){return P===93?(e.consume(P),N):L(P)}function N(P){return P===62?(e.consume(P),le):P===45&&i===2?(e.consume(P),N):L(P)}function le(P){return P===null||de(P)?(e.exit("htmlFlowData"),he(P)):(e.consume(P),le)}function he(P){return e.exit("htmlFlow"),t(P)}}function J4(e,t,r){const n=this;return i;function i(o){return de(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):r(o)}function a(o){return n.parser.lazy[n.now().line]?r(o):t(o)}}function e5(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Rs,t,r)}}const t5={name:"htmlText",tokenize:r5};function r5(e,t,r){const n=this;let i,a,o;return s;function s(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),u}function u(N){return N===33?(e.consume(N),l):N===47?(e.consume(N),w):N===63?(e.consume(N),x):Yt(N)?(e.consume(N),O):r(N)}function l(N){return N===45?(e.consume(N),c):N===91?(e.consume(N),a=0,p):Yt(N)?(e.consume(N),T):r(N)}function c(N){return N===45?(e.consume(N),h):r(N)}function f(N){return N===null?r(N):N===45?(e.consume(N),d):de(N)?(o=f,J(N)):(e.consume(N),f)}function d(N){return N===45?(e.consume(N),h):f(N)}function h(N){return N===62?q(N):N===45?d(N):f(N)}function p(N){const le="CDATA[";return N===le.charCodeAt(a++)?(e.consume(N),a===le.length?b:p):r(N)}function b(N){return N===null?r(N):N===93?(e.consume(N),y):de(N)?(o=b,J(N)):(e.consume(N),b)}function y(N){return N===93?(e.consume(N),v):b(N)}function v(N){return N===62?q(N):N===93?(e.consume(N),v):b(N)}function T(N){return N===null||N===62?q(N):de(N)?(o=T,J(N)):(e.consume(N),T)}function x(N){return N===null?r(N):N===63?(e.consume(N),_):de(N)?(o=x,J(N)):(e.consume(N),x)}function _(N){return N===62?q(N):x(N)}function w(N){return Yt(N)?(e.consume(N),A):r(N)}function A(N){return N===45||Mt(N)?(e.consume(N),A):S(N)}function S(N){return de(N)?(o=S,J(N)):Ce(N)?(e.consume(N),S):q(N)}function O(N){return N===45||Mt(N)?(e.consume(N),O):N===47||N===62||We(N)?R(N):r(N)}function R(N){return N===47?(e.consume(N),q):N===58||N===95||Yt(N)?(e.consume(N),C):de(N)?(o=R,J(N)):Ce(N)?(e.consume(N),R):q(N)}function C(N){return N===45||N===46||N===58||N===95||Mt(N)?(e.consume(N),C):M(N)}function M(N){return N===61?(e.consume(N),L):de(N)?(o=M,J(N)):Ce(N)?(e.consume(N),M):R(N)}function L(N){return N===null||N===60||N===61||N===62||N===96?r(N):N===34||N===39?(e.consume(N),i=N,Q):de(N)?(o=L,J(N)):Ce(N)?(e.consume(N),L):(e.consume(N),H)}function Q(N){return N===i?(e.consume(N),i=void 0,U):N===null?r(N):de(N)?(o=Q,J(N)):(e.consume(N),Q)}function H(N){return N===null||N===34||N===39||N===60||N===61||N===96?r(N):N===47||N===62||We(N)?R(N):(e.consume(N),H)}function U(N){return N===47||N===62||We(N)?R(N):r(N)}function q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):r(N)}function J(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),V}function V(N){return Ce(N)?Pe(e,re,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):re(N)}function re(N){return e.enter("htmlTextData"),o(N)}}const gm={name:"labelEnd",resolveAll:o5,resolveTo:s5,tokenize:u5},n5={tokenize:l5},i5={tokenize:c5},a5={tokenize:f5};function o5(e){let t=-1;const r=[];for(;++t<e.length;){const n=e[t][1];if(r.push(e[t]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",t+=i}}return e.length!==r.length&&pr(e,0,e.length,r),e}function s5(e,t){let r=e.length,n=0,i,a,o,s;for(;r--;)if(i=e[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(o=r);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},c={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[o-2][1].start}};return s=[["enter",u,t],["enter",l,t]],s=_r(s,e.slice(a+1,a+n+3)),s=_r(s,[["enter",c,t]]),s=_r(s,mc(t.parser.constructs.insideSpan.null,e.slice(a+n+4,o-3),t)),s=_r(s,[["exit",c,t],e[o-2],e[o-1],["exit",l,t]]),s=_r(s,e.slice(o+1)),s=_r(s,[["exit",u,t]]),pr(e,a,e.length,s),e}function u5(e,t,r){const n=this;let i=n.events.length,a,o;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=n.parser.defined.includes(Br(n.sliceSerialize({start:a.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),u):r(d)}function u(d){return d===40?e.attempt(n5,c,o?c:f)(d):d===91?e.attempt(i5,c,o?l:f)(d):o?c(d):f(d)}function l(d){return e.attempt(a5,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,r(d)}}function l5(e,t,r){return n;function n(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return We(f)?Vo(e,a)(f):a(f)}function a(f){return f===41?c(f):s2(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return We(f)?Vo(e,u)(f):c(f)}function s(f){return r(f)}function u(f){return f===34||f===39||f===40?l2(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return We(f)?Vo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):r(f)}}function c5(e,t,r){const n=this;return i;function i(s){return u2.call(n,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return n.parser.defined.includes(Br(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function o(s){return r(s)}}function f5(e,t,r){return n;function n(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const d5={name:"labelStartImage",resolveAll:gm.resolveAll,tokenize:h5};function h5(e,t,r){const n=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):r(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const p5={name:"labelStartLink",resolveAll:gm.resolveAll,tokenize:m5};function m5(e,t,r){const n=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const Af={name:"lineEnding",tokenize:g5};function g5(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Pe(e,t,"linePrefix")}}const Ru={name:"thematicBreak",tokenize:b5};function b5(e,t,r){let n=0,i;return a;function a(l){return e.enter("thematicBreak"),o(l)}function o(l){return i=l,s(l)}function s(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||de(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),Ce(l)?Pe(e,s,"whitespace")(l):s(l))}}const rr={continuation:{tokenize:E5},exit:w5,name:"list",tokenize:x5},y5={partial:!0,tokenize:A5},v5={partial:!0,tokenize:T5};function x5(e,t,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(h){const p=n.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||h===n.containerState.marker:Oh(h)){if(n.containerState.type||(n.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Ru,r,l)(h):l(h);if(!n.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(h)}return r(h)}function u(h){return Oh(h)&&++o<10?(e.consume(h),u):(!n.interrupt||o<2)&&(n.containerState.marker?h===n.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):r(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||h,e.check(Rs,n.interrupt?r:c,e.attempt(y5,d,f))}function c(h){return n.containerState.initialBlankLine=!0,a++,d(h)}function f(h){return Ce(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):r(h)}function d(h){return n.containerState.size=a+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function E5(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Rs,i,a);function i(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Pe(e,t,"listItemIndent",n.containerState.size+1)(s)}function a(s){return n.containerState.furtherBlankLines||!Ce(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,o(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(v5,t,o)(s))}function o(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Pe(e,e.attempt(rr,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function T5(e,t,r){const n=this;return Pe(e,i,"listItemIndent",n.containerState.size+1);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===n.containerState.size?t(a):r(a)}}function w5(e){e.exit(this.containerState.type)}function A5(e,t,r){const n=this;return Pe(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=n.events[n.events.length-1];return!Ce(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const Ub={name:"setextUnderline",resolveTo:_5,tokenize:k5};function _5(e,t){let r=e.length,n,i,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(i=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=o,e.push(["exit",o,t]),e}function k5(e,t,r){const n=this;let i;return a;function a(l){let c=n.events.length,f;for(;c--;)if(n.events[c][1].type!=="lineEnding"&&n.events[c][1].type!=="linePrefix"&&n.events[c][1].type!=="content"){f=n.events[c][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||f)?(e.enter("setextHeadingLine"),i=l,o(l)):r(l)}function o(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===i?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),Ce(l)?Pe(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||de(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}const S5={tokenize:L5,partial:!0};function C5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:N5,continuation:{tokenize:D5},exit:R5}},text:{91:{name:"gfmFootnoteCall",tokenize:P5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:I5,resolveTo:O5}}}}function I5(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let o;for(;i--;){const u=n.events[i][1];if(u.type==="labelImage"){o=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!o||!o._balanced)return r(u);const l=Br(n.sliceSerialize({start:o.end,end:n.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?r(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function O5(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function P5(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?r(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(f){if(a>999||f===93&&!o||f===null||f===91||We(f))return r(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Br(n.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return We(f)||(o=!0),a++,e.consume(f),f===92?c:l}function c(f){return f===91||f===92||f===93?(e.consume(f),a++,l):l(f)}}function N5(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,o=0,s;return u;function u(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):r(p)}function c(p){if(o>999||p===93&&!s||p===null||p===91||We(p))return r(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=Br(n.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return We(p)||(s=!0),o++,e.consume(p),p===92?f:c}function f(p){return p===91||p===92||p===93?(e.consume(p),o++,c):c(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(a)||i.push(a),Pe(e,h,"gfmFootnoteDefinitionWhitespace")):r(p)}function h(p){return t(p)}}function D5(e,t,r){return e.check(Rs,t,e.attempt(S5,t,r))}function R5(e){e.exit("gfmFootnoteDefinition")}function L5(e,t,r){const n=this;return Pe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=n.events[n.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):r(a)}}function M5(e){let r=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(o,s){let u=-1;for(;++u<o.length;)if(o[u][0]==="enter"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._close){let l=u;for(;l--;)if(o[l][0]==="exit"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._open&&o[u][1].end.offset-o[u][1].start.offset===o[l][1].end.offset-o[l][1].start.offset){o[u][1].type="strikethroughSequence",o[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},o[l][1].start),end:Object.assign({},o[u][1].end)},f={type:"strikethroughText",start:Object.assign({},o[l][1].end),end:Object.assign({},o[u][1].start)},d=[["enter",c,s],["enter",o[l][1],s],["exit",o[l][1],s],["enter",f,s]],h=s.parser.constructs.insideSpan.null;h&&pr(d,d.length,0,mc(h,o.slice(l+1,u),s)),pr(d,d.length,0,[["exit",f,s],["enter",o[u][1],s],["exit",o[u][1],s],["exit",c,s]]),pr(o,l-1,u-l+3,d),u=l+d.length-2;break}}for(u=-1;++u<o.length;)o[u][1].type==="strikethroughSequenceTemporary"&&(o[u][1].type="data");return o}function a(o,s,u){const l=this.previous,c=this.events;let f=0;return d;function d(p){return l===126&&c[c.length-1][1].type!=="characterEscape"?u(p):(o.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const b=Ra(l);if(p===126)return f>1?u(p):(o.consume(p),f++,h);if(f<2&&!r)return u(p);const y=o.exit("strikethroughSequenceTemporary"),v=Ra(p);return y._open=!v||v===2&&!!b,y._close=!b||b===2&&!!v,s(p)}}}class j5{constructor(){this.map=[]}add(t,r,n){B5(this,t,r,n)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push(t.slice()),t.length=0;let i=n.pop();for(;i;){for(const a of i)t.push(a);i=n.pop()}this.map.length=0}}function B5(e,t,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=r,e.map[i][2].push(...n);return}i+=1}e.map.push([t,r,n])}}function F5(e,t){let r=!1;const n=[];for(;t<e.length;){const i=e[t];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function $5(){return{flow:{null:{name:"table",tokenize:U5,resolveAll:H5}}}}function U5(e,t,r){const n=this;let i=0,a=0,o;return s;function s(C){let M=n.events.length-1;for(;M>-1;){const H=n.events[M][1].type;if(H==="lineEnding"||H==="linePrefix")M--;else break}const L=M>-1?n.events[M][1].type:null,Q=L==="tableHead"||L==="tableRow"?A:u;return Q===A&&n.parser.lazy[n.now().line]?r(C):Q(C)}function u(C){return e.enter("tableHead"),e.enter("tableRow"),l(C)}function l(C){return C===124||(o=!0,a+=1),c(C)}function c(C){return C===null?r(C):de(C)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),h):r(C):Ce(C)?Pe(e,c,"whitespace")(C):(a+=1,o&&(o=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),o=!0,c):(e.enter("data"),f(C)))}function f(C){return C===null||C===124||We(C)?(e.exit("data"),c(C)):(e.consume(C),C===92?d:f)}function d(C){return C===92||C===124?(e.consume(C),f):f(C)}function h(C){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(C):(e.enter("tableDelimiterRow"),o=!1,Ce(C)?Pe(e,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):p(C))}function p(C){return C===45||C===58?y(C):C===124?(o=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),b):w(C)}function b(C){return Ce(C)?Pe(e,y,"whitespace")(C):y(C)}function y(C){return C===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),v):C===45?(a+=1,v(C)):C===null||de(C)?_(C):w(C)}function v(C){return C===45?(e.enter("tableDelimiterFiller"),T(C)):w(C)}function T(C){return C===45?(e.consume(C),T):C===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(C))}function x(C){return Ce(C)?Pe(e,_,"whitespace")(C):_(C)}function _(C){return C===124?p(C):C===null||de(C)?!o||i!==a?w(C):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(C)):w(C)}function w(C){return r(C)}function A(C){return e.enter("tableRow"),S(C)}function S(C){return C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),S):C===null||de(C)?(e.exit("tableRow"),t(C)):Ce(C)?Pe(e,S,"whitespace")(C):(e.enter("data"),O(C))}function O(C){return C===null||C===124||We(C)?(e.exit("data"),S(C)):(e.consume(C),C===92?R:O)}function R(C){return C===92||C===124?(e.consume(C),O):O(C)}}function H5(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,u=0,l,c,f;const d=new j5;for(;++r<e.length;){const h=e[r],p=h[1];h[0]==="enter"?p.type==="tableHead"?(s=!1,u!==0&&(Hb(d,t,u,l,c),c=void 0,u=0),l={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",l,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(n=!0,f=void 0,a=[0,0,0,0],o=[0,r+1,0,0],s&&(s=!1,c={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",c,t]])),i=p.type==="tableDelimiterRow"?2:c?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(n=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=su(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=r)):p.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(o[0]=o[1],f=su(d,t,a,i,void 0,f)),a=o,o=[a[1],r,0,0])):p.type==="tableHead"?(s=!0,u=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=r,a[1]!==0?(o[0]=o[1],f=su(d,t,a,i,r,f)):o[1]!==0&&(f=su(d,t,o,i,r,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(o[3]=r)}for(u!==0&&Hb(d,t,u,l,c),d.consume(t.events),r=-1;++r<t.events.length;){const h=t.events[r];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=F5(t.events,r))}return e}function su(e,t,r,n,i,a){const o=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(a.end=Object.assign({},ma(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const u=ma(t.events,r[1]);if(a={type:o,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const l=ma(t.events,r[2]),c=ma(t.events,r[3]),f={type:s,start:Object.assign({},l),end:Object.assign({},c)};if(e.add(r[2],0,[["enter",f,t]]),n!==2){const d=t.events[r[2]],h=t.events[r[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",r[3]>r[2]+1){const p=r[2]+1,b=r[3]-r[2]-1;e.add(p,b,[])}}e.add(r[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},ma(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Hb(e,t,r,n,i){const a=[],o=ma(t.events,r);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),n.end=Object.assign({},o),a.push(["exit",n,t]),e.add(r+1,0,a)}function ma(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const z5={name:"tasklistCheck",tokenize:W5};function q5(){return{text:{91:z5}}}function W5(e,t,r){const n=this;return i;function i(u){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return We(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),o):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),o):r(u)}function o(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(u)}function s(u){return de(u)?t(u):Ce(u)?e.check({tokenize:V5},t,r)(u):r(u)}}function V5(e,t,r){return Pe(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function Y5(e){return KA([n4(),C5(),M5(e),$5(),q5()])}const K5={};function G5(e){const t=this,r=e||K5,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(Y5(r)),a.push(Z6()),o.push(Q6(r))}var X5=Object.defineProperty,Z5=Object.defineProperties,Q5=Object.getOwnPropertyDescriptors,zb=Object.getOwnPropertySymbols,J5=Object.prototype.hasOwnProperty,ej=Object.prototype.propertyIsEnumerable,qb=(e,t,r)=>t in e?X5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c2=(e,t)=>{for(var r in t||(t={}))J5.call(t,r)&&qb(e,r,t[r]);if(zb)for(var r of zb(t))ej.call(t,r)&&qb(e,r,t[r]);return e},f2=(e,t)=>Z5(e,Q5(t)),Xt=(e,t)=>{let r=!1,n=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){n=!n,i+=2;continue}!n&&e[i]==="`"&&(r=!r)}return r||n},tj=(e,t)=>{let r=e.substring(t,t+3)==="```",n=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return r||n||i},rj=e=>{let t=0;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"&&r+1<e.length&&e[r+1]==="`"){r+=1;continue}e[r]==="`"&&!tj(e,r)&&(t+=1)}return t},ei=(e,t)=>{let r=!1,n=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){n=!n,a+=2;continue}if(!n&&e[a]==="`")if(r){if(i<t&&t<a)return!0;r=!1,i=-1}else r=!0,i=a}return!1},nj=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,ij=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(nj,(t,r,n,i)=>Xt(e,i)?t:`${r}\\>${n}`),aj=/(\*\*)([^*]*\*?)$/,oj=/(__)([^_]*?)$/,sj=/(\*\*\*)([^*]*?)$/,uj=/(\*)([^*]*?)$/,lj=/(_)([^_]*?)$/,cj=/(`)([^`]*?)$/,fj=/(~~)([^~]*?)$/,Yi=/^[\s_~*`]*$/,d2=/^[\s]*[-*+][\s]+$/,dj=/[\p{L}\p{N}_]/u,hj=/^```[^`\n]*```?$/,pj=/^\*{4,}$/,mj=/(__)([^_]+)_$/,gj=/(~~)([^~]+)~$/,Wb=/~~/g,ti=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:dj.test(e)},bj=(e,t)=>{let r=1;for(let n=t-1;n>=0;n-=1)if(e[n]==="]")r+=1;else if(e[n]==="["&&(r-=1,r===0))return n;return-1},h2=(e,t)=>{let r=1;for(let n=t+1;n<e.length;n+=1)if(e[n]==="[")r+=1;else if(e[n]==="]"&&(r-=1,r===0))return n;return-1},gc=(e,t)=>{let r=!1,n=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(n=!n,i+=1,r=!1):n||(r=!r))}return r||n},yj=(e,t)=>{for(let r=t;r<e.length;r+=1){if(e[r]===")")return!0;if(e[r]===`
38
- `)return!1}return!1},p2=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===")")return!1;if(e[r]==="(")return r>0&&e[r-1]==="]"?yj(e,t):!1;if(e[r]===`
39
- `)return!1}return!1},vj=(e,t)=>{for(let r=t-1;r>=0;r-=1){if(e[r]===">")return!1;if(e[r]==="<"){let n=r+1<e.length?e[r+1]:"";return n>="a"&&n<="z"||n>="A"&&n<="Z"||n==="/"}if(e[r]===`
40
- `)return!1}return!1},bm=(e,t,r)=>{let n=0;for(let u=t-1;u>=0;u-=1)if(e[u]===`
41
- `){n=u+1;break}let i=e.length;for(let u=t;u<e.length;u+=1)if(e[u]===`
42
- `){i=u;break}let a=e.substring(n,i),o=0,s=!1;for(let u of a)if(u===r)o+=1;else if(u!==" "&&u!==" "){s=!0;break}return o>=3&&!s},xj=(e,t,r,n)=>r==="\\"||e.includes("$")&&gc(e,t)?!0:r!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(r==="*"||r&&n&&ti(r)&&ti(n)||(!r||r===" "||r===" "||r===`
43
- `)&&(!n||n===" "||n===" "||n===`
44
- `)),m2=e=>{let t=0,r=!1,n=e.length;for(let i=0;i<n;i+=1){if(e[i]==="`"&&i+2<n&&e[i+1]==="`"&&e[i+2]==="`"){r=!r,i+=2;continue}if(r||e[i]!=="*")continue;let a=i>0?e[i-1]:"",o=i<n-1?e[i+1]:"";xj(e,i,a,o)||(t+=1)}return t},Ej=(e,t,r,n)=>!!(r==="\\"||e.includes("$")&&gc(e,t)||p2(e,t)||vj(e,t)||r==="_"||n==="_"||r&&n&&ti(r)&&ti(n)),Tj=e=>{let t=0,r=!1,n=e.length;for(let i=0;i<n;i+=1){if(e[i]==="`"&&i+2<n&&e[i+1]==="`"&&e[i+2]==="`"){r=!r,i+=2;continue}if(r||e[i]!=="_")continue;let a=i>0?e[i-1]:"",o=i<n-1?e[i+1]:"";Ej(e,i,a,o)||(t+=1)}return t},wj=e=>{let t=0,r=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){r>=3&&(t+=Math.floor(r/3)),r=0,n=!n,i+=2;continue}n||(e[i]==="*"?r+=1:(r>=3&&(t+=Math.floor(r/3)),r=0))}return r>=3&&(t+=Math.floor(r/3)),t},ym=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){r=!r,n+=2;continue}r||e[n]==="*"&&n+1<e.length&&e[n+1]==="*"&&(t+=1,n+=1)}return t},Vb=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){r=!r,n+=2;continue}r||e[n]==="_"&&n+1<e.length&&e[n+1]==="_"&&(t+=1,n+=1)}return t},Aj=(e,t,r)=>{if(!t||Yi.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
45
- `),i=n===-1?0:n+1,a=e.substring(i,r);return d2.test(a)&&t.includes(`
46
- `)?!0:bm(e,r,"*")},_j=e=>{let t=e.match(aj);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return Xt(e,n)||ei(e,n)||Aj(e,r,n)?e:ym(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},kj=(e,t,r)=>{if(!t||Yi.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
47
- `),i=n===-1?0:n+1,a=e.substring(i,r);return d2.test(a)&&t.includes(`
48
- `)?!0:bm(e,r,"_")},Sj=e=>{let t=e.match(oj);if(!t){let i=e.match(mj);if(i){let a=e.lastIndexOf(i[1]);if(!(Xt(e,a)||ei(e,a))&&Vb(e)%2===1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return Xt(e,n)||ei(e,n)||kj(e,r,n)?e:Vb(e)%2===1?`${e}__`:e},Cj=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="*"&&e[r-1]!=="*"&&e[r+1]!=="*"&&e[r-1]!=="\\"&&!gc(e,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if((!n||n===" "||n===" "||n===`
49
- `)&&(!i||i===" "||i===" "||i===`
50
- `)||n&&i&&ti(n)&&ti(i))continue;return r}}return-1},Ij=e=>{if(!e.match(uj))return e;let t=Cj(e);if(t===-1||Xt(e,t)||ei(e,t))return e;let r=e.substring(t+1);return!r||Yi.test(r)?e:m2(e)%2===1?`${e}*`:e},g2=e=>{let t=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){t=!t,r+=2;continue}if(!t&&e[r]==="_"&&e[r-1]!=="_"&&e[r+1]!=="_"&&e[r-1]!=="\\"&&!gc(e,r)&&!p2(e,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if(n&&i&&ti(n)&&ti(i))continue;return r}}return-1},Oj=e=>{let t=e.length;for(;t>0&&e[t-1]===`
51
- `;)t-=1;if(t<e.length){let r=e.slice(0,t),n=e.slice(t);return`${r}_${n}`}return`${e}_`},Pj=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(ym(t)%2!==1)return null;let r=t.indexOf("**"),n=g2(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},Nj=e=>{if(!e.match(lj))return e;let t=g2(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||Yi.test(r)||Xt(e,t)||ei(e,t))return e;if(Tj(e)%2===1){let n=Pj(e);return n!==null?n:Oj(e)}return e},Dj=e=>{let t=ym(e),r=m2(e);return t%2===0&&r%2===0},Rj=(e,t,r)=>!t||Yi.test(t)||Xt(e,r)||ei(e,r)?!0:bm(e,r,"*"),Lj=e=>{if(pj.test(e))return e;let t=e.match(sj);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return Rj(e,r,n)?e:wj(e)%2===1?Dj(e)?e:`${e}***`:e},Mj=/<[a-zA-Z/][^>]*$/,jj=e=>{let t=e.match(Mj);return!t||t.index===void 0||Xt(e,t.index)?e:e.substring(0,t.index).trimEnd()},Bj=e=>!e.match(hj)||e.includes(`
52
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Fj=e=>(e.match(/```/g)||[]).length%2===1,$j=e=>{let t=Bj(e);if(t!==null)return t;let r=e.match(cj);if(r&&!Fj(e)){let n=r[2];if(!n||Yi.test(n))return e;if(rj(e)%2===1)return`${e}\``}return e},b2=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",Uj=e=>{let t=0,r=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!b2(e,n)&&(r=!r),!r&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},Hj=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}if(e[n]==="`"&&!b2(e,n)){r=!r;continue}!r&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:t+=1)}return t},zj=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
53
- `,t)!==-1&&!e.endsWith(`
54
- `)?`${e}
55
- $$`:`${e}$$`},qj=e=>Uj(e)%2===0?e:zj(e),Wj=e=>Hj(e)%2===1?`${e}$`:e,Vj=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=bj(e,t);if(n===-1||Xt(e,n))return null;let i=n>0&&e[n-1]==="!",a=i?n-1:n,o=e.substring(0,a);if(i)return o;let s=e.substring(n+1,t);return r==="text-only"?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},Yb=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!Xt(e,r)){if(r>0&&e[r-1]==="!")continue;let n=h2(e,r);if(n===-1)return r;if(n+1<e.length&&e[n+1]==="("){let i=e.indexOf(")",n+2);i!==-1&&(r=i)}}return t},Yj=(e,t,r)=>{let n=t>0&&e[t-1]==="!",i=n?t-1:t;if(!e.substring(t+1).includes("]")){let a=e.substring(0,i);if(n)return a;if(r==="text-only"){let o=Yb(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}if(h2(e,t)===-1){let a=e.substring(0,i);if(n)return a;if(r==="text-only"){let o=Yb(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}return null},y2=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(r!==-1&&!Xt(e,r)){let n=Vj(e,r,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!Xt(e,n)){let i=Yj(e,n,t);if(i!==null)return i}return e},Kj=/^-{1,2}$/,Gj=/^[\s]*-{1,2}[\s]+$/,Xj=/^={1,2}$/,Zj=/^[\s]*={1,2}[\s]+$/,Qj=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
56
- `);if(t===-1)return e;let r=e.substring(t+1),n=e.substring(0,t),i=r.trim();if(Kj.test(i)&&!r.match(Gj)){let a=n.split(`
57
- `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(Xj.test(i)&&!r.match(Zj)){let a=n.split(`
58
- `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},Jj=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),e8=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(Jj,(t,r)=>Xt(e,r)?t:"\\~"),t8=e=>{var t,r;let n=e.match(fj);if(n){let i=n[2];if(!i||Yi.test(i))return e;let a=e.lastIndexOf(n[1]);if(Xt(e,a)||ei(e,a))return e;if(((t=e.match(Wb))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(gj);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(Xt(e,a)||ei(e,a))return e;if(((r=e.match(Wb))==null?void 0:r.length)%2===1)return`${e}~`}}return e},_f=e=>e!==!1,r8=e=>e===!0,zt={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},n8=[{handler:{name:"singleTilde",handle:e8,priority:zt.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:ij,priority:zt.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:jj,priority:zt.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Qj,priority:zt.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:y2,priority:zt.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Lj,priority:zt.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:_j,priority:zt.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:Sj,priority:zt.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Ij,priority:zt.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Nj,priority:zt.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:$j,priority:zt.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:t8,priority:zt.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:qj,priority:zt.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:Wj,priority:zt.INLINE_KATEX},optionKey:"inlineKatex"}],i8=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return n8.filter(({handler:n,optionKey:i})=>n.name==="links"?_f(e?.links)||_f(e?.images):n.name==="inlineKatex"?r8(e?.inlineKatex):_f(e?.[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:f2(c2({},n),{handle:a=>y2(a,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},a8=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=i8(t),a=((r=t?.handlers)!=null?r:[]).map(s=>{var u;return{handler:f2(c2({},s),{priority:(u=s.priority)!=null?u:zt.DEFAULT}),earlyReturn:void 0}}),o=[...i,...a].sort((s,u)=>{var l,c;return((l=s.handler.priority)!=null?l:0)-((c=u.handler.priority)!=null?c:0)});for(let{handler:s,earlyReturn:u}of o)if(n=s.handle(n),u!=null&&u(n))return n;return n},o8=a8;function v2(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=v2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Le(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=v2(e))&&(n&&(n+=" "),n+=t);return n}const s8=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},u8=(e,t)=>({classGroupId:e,validator:t}),x2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),tl="-",Kb=[],l8="arbitrary..",c8=e=>{const t=d8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return f8(o);const s=o.split(tl),u=s[0]===""&&s.length>1?1:0;return E2(s,u,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const u=n[o],l=r[o];return u?l?s8(l,u):u:l||Kb}return r[o]||Kb}}},E2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const l=E2(e,t+1,a);if(l)return l}const o=r.validators;if(o===null)return;const s=t===0?e.join(tl):e.slice(t).join(tl),u=o.length;for(let l=0;l<u;l++){const c=o[l];if(c.validator(s))return c.classGroupId}},f8=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?l8+n:void 0})(),d8=e=>{const{theme:t,classGroups:r}=e;return h8(r,t)},h8=(e,t)=>{const r=x2();for(const n in e){const i=e[n];vm(i,r,n,t)}return r},vm=(e,t,r,n)=>{const i=e.length;for(let a=0;a<i;a++){const o=e[a];p8(o,t,r,n)}},p8=(e,t,r,n)=>{if(typeof e=="string"){m8(e,t,r);return}if(typeof e=="function"){g8(e,t,r,n);return}b8(e,t,r,n)},m8=(e,t,r)=>{const n=e===""?t:T2(t,e);n.classGroupId=r},g8=(e,t,r,n)=>{if(y8(e)){vm(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(u8(r,e))},b8=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let o=0;o<a;o++){const[s,u]=i[o];vm(u,T2(t,s),r,n)}},T2=(e,t)=>{let r=e;const n=t.split(tl),i=n.length;for(let a=0;a<i;a++){const o=n[a];let s=r.nextPart.get(o);s||(s=x2(),r.nextPart.set(o,s)),r=s}return r},y8=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,v8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,o)=>{r[a]=o,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let o=r[a];if(o!==void 0)return o;if((o=n[a])!==void 0)return i(a,o),o},set(a,o){a in r?r[a]=o:i(a,o)}}},Dh="!",Gb=":",x8=[],Xb=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),E8=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let o=0,s=0,u=0,l;const c=i.length;for(let b=0;b<c;b++){const y=i[b];if(o===0&&s===0){if(y===Gb){a.push(i.slice(u,b)),u=b+1;continue}if(y==="/"){l=b;continue}}y==="["?o++:y==="]"?o--:y==="("?s++:y===")"&&s--}const f=a.length===0?i:i.slice(u);let d=f,h=!1;f.endsWith(Dh)?(d=f.slice(0,-1),h=!0):f.startsWith(Dh)&&(d=f.slice(1),h=!0);const p=l&&l>u?l-u:void 0;return Xb(a,h,d,p)};if(t){const i=t+Gb,a=n;n=o=>o.startsWith(i)?a(o.slice(i.length)):Xb(x8,!1,o,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},T8=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const o=r[a],s=o[0]==="[",u=t.has(o);s||u?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(o)):i.push(o)}return i.length>0&&(i.sort(),n.push(...i)),n}},w8=e=>({cache:v8(e.cacheSize),parseClassName:E8(e),sortModifiers:T8(e),...c8(e)}),A8=/\s+/,_8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(A8);let u="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:b}=r(c);if(f){u=c+(u.length>0?" "+u:u);continue}let y=!!b,v=n(y?p.substring(0,b):p);if(!v){if(!y){u=c+(u.length>0?" "+u:u);continue}if(v=n(p),!v){u=c+(u.length>0?" "+u:u);continue}y=!1}const T=d.length===0?"":d.length===1?d[0]:a(d).join(":"),x=h?T+Dh:T,_=x+v;if(o.indexOf(_)>-1)continue;o.push(_);const w=i(v,y);for(let A=0;A<w.length;++A){const S=w[A];o.push(x+S)}u=c+(u.length>0?" "+u:u)}return u},k8=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=w2(r))&&(i&&(i+=" "),i+=n);return i},w2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=w2(e[n]))&&(r&&(r+=" "),r+=t);return r},S8=(e,...t)=>{let r,n,i,a;const o=u=>{const l=t.reduce((c,f)=>f(c),e());return r=w8(l),n=r.cache.get,i=r.cache.set,a=s,s(u)},s=u=>{const l=n(u);if(l)return l;const c=_8(u,r);return i(u,c),c};return a=o,(...u)=>a(k8(...u))},C8=[],ht=e=>{const t=r=>r[e]||C8;return t.isThemeGetter=!0,t},A2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,I8=/^\d+\/\d+$/,O8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,P8=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,N8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,D8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,oa=e=>I8.test(e),Ae=e=>!!e&&!Number.isNaN(Number(e)),jn=e=>!!e&&Number.isInteger(Number(e)),kf=e=>e.endsWith("%")&&Ae(e.slice(0,-1)),mn=e=>O8.test(e),L8=()=>!0,M8=e=>P8.test(e)&&!N8.test(e),k2=()=>!1,j8=e=>D8.test(e),B8=e=>R8.test(e),F8=e=>!ie(e)&&!ae(e),$8=e=>Xa(e,I2,k2),ie=e=>A2.test(e),mi=e=>Xa(e,O2,M8),Sf=e=>Xa(e,W8,Ae),Zb=e=>Xa(e,S2,k2),U8=e=>Xa(e,C2,B8),uu=e=>Xa(e,P2,j8),ae=e=>_2.test(e),po=e=>Za(e,O2),H8=e=>Za(e,V8),Qb=e=>Za(e,S2),z8=e=>Za(e,I2),q8=e=>Za(e,C2),lu=e=>Za(e,P2,!0),Xa=(e,t,r)=>{const n=A2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Za=(e,t,r=!1)=>{const n=_2.exec(e);return n?n[1]?t(n[1]):r:!1},S2=e=>e==="position"||e==="percentage",C2=e=>e==="image"||e==="url",I2=e=>e==="length"||e==="size"||e==="bg-size",O2=e=>e==="length",W8=e=>e==="number",V8=e=>e==="family-name",P2=e=>e==="shadow",Y8=()=>{const e=ht("color"),t=ht("font"),r=ht("text"),n=ht("font-weight"),i=ht("tracking"),a=ht("leading"),o=ht("breakpoint"),s=ht("container"),u=ht("spacing"),l=ht("radius"),c=ht("shadow"),f=ht("inset-shadow"),d=ht("text-shadow"),h=ht("drop-shadow"),p=ht("blur"),b=ht("perspective"),y=ht("aspect"),v=ht("ease"),T=ht("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[..._(),ae,ie],A=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],O=()=>[ae,ie,u],R=()=>[oa,"full","auto",...O()],C=()=>[jn,"none","subgrid",ae,ie],M=()=>["auto",{span:["full",jn,ae,ie]},jn,ae,ie],L=()=>[jn,"auto",ae,ie],Q=()=>["auto","min","max","fr",ae,ie],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...O()],J=()=>[oa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],V=()=>[e,ae,ie],re=()=>[..._(),Qb,Zb,{position:[ae,ie]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],le=()=>["auto","cover","contain",z8,$8,{size:[ae,ie]}],he=()=>[kf,po,mi],P=()=>["","none","full",l,ae,ie],pe=()=>["",Ae,po,mi],we=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Ae,kf,Qb,Zb],ge=()=>["","none",p,ae,ie],Y=()=>["none",Ae,ae,ie],G=()=>["none",Ae,ae,ie],ue=()=>[Ae,ae,ie],W=()=>[oa,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[mn],breakpoint:[mn],color:[L8],container:[mn],"drop-shadow":[mn],ease:["in","out","in-out"],font:[F8],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[mn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[mn],shadow:[mn],spacing:["px",Ae],text:[mn],"text-shadow":[mn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",oa,ie,ae,y]}],container:["container"],columns:[{columns:[Ae,ie,ae,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[jn,"auto",ae,ie]}],basis:[{basis:[oa,"full","auto",s,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,oa,"auto","initial","none",ie]}],grow:[{grow:["",Ae,ae,ie]}],shrink:[{shrink:["",Ae,ae,ie]}],order:[{order:[jn,"first","last","none",ae,ie]}],"grid-cols":[{"grid-cols":C()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":C()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Q()}],"auto-rows":[{"auto-rows":Q()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:J()}],w:[{w:[s,"screen",...J()]}],"min-w":[{"min-w":[s,"screen","none",...J()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...J()]}],h:[{h:["screen","lh",...J()]}],"min-h":[{"min-h":["screen","lh","none",...J()]}],"max-h":[{"max-h":["screen","lh",...J()]}],"font-size":[{text:["base",r,po,mi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ae,Sf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kf,ie]}],"font-family":[{font:[H8,ie,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ae,ie]}],"line-clamp":[{"line-clamp":[Ae,"none",ae,Sf]}],leading:[{leading:[a,...O()]}],"list-image":[{"list-image":["none",ae,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",ae,mi]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ae,"auto",ae,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:le()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jn,ae,ie],radial:["",ae,ie],conic:[jn,ae,ie]},q8,U8]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:he()}],"gradient-via-pos":[{via:he()}],"gradient-to-pos":[{to:he()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,ae,ie]}],"outline-w":[{outline:["",Ae,po,mi]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",c,lu,uu]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",f,lu,uu]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ae,mi]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",d,lu,uu]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ae,ae,ie]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[ae,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":_()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:le()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,ie]}],filter:[{filter:["","none",ae,ie]}],blur:[{blur:ge()}],brightness:[{brightness:[Ae,ae,ie]}],contrast:[{contrast:[Ae,ae,ie]}],"drop-shadow":[{"drop-shadow":["","none",h,lu,uu]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ae,ae,ie]}],"hue-rotate":[{"hue-rotate":[Ae,ae,ie]}],invert:[{invert:["",Ae,ae,ie]}],saturate:[{saturate:[Ae,ae,ie]}],sepia:[{sepia:["",Ae,ae,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,ie]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,ae,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,ae,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,ae,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,ae,ie]}],"backdrop-invert":[{"backdrop-invert":["",Ae,ae,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,ae,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,ae,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,ae,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",ae,ie]}],ease:[{ease:["linear","initial",v,ae,ie]}],delay:[{delay:[Ae,ae,ie]}],animate:[{animate:["none",T,ae,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ae,ie]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:G()}],"scale-x":[{"scale-x":G()}],"scale-y":[{"scale-y":G()}],"scale-z":[{"scale-z":G()}],"scale-3d":["scale-3d"],skew:[{skew:ue()}],"skew-x":[{"skew-x":ue()}],"skew-y":[{"skew-y":ue()}],transform:[{transform:[ae,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:W()}],"translate-x":[{"translate-x":W()}],"translate-y":[{"translate-y":W()}],"translate-z":[{"translate-z":W()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,ie]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ae,po,mi,Sf]}],stroke:[{stroke:["none",...V()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},N2=S8(Y8),K8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,G8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,X8={};function Jb(e,t){return(X8.jsx?G8:K8).test(e)}const Z8=/[ \t\n\f\r]/g;function Q8(e){return typeof e=="object"?e.type==="text"?ey(e.value):!1:ey(e)}function ey(e){return e.replace(Z8,"")===""}var sa={},Cf,ty;function J8(){if(ty)return Cf;ty=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,s=/^\s+|\s+$/g,u=`
59
- `,l="/",c="*",f="",d="comment",h="declaration";function p(y,v){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];v=v||{};var T=1,x=1;function _(H){var U=H.match(t);U&&(T+=U.length);var q=H.lastIndexOf(u);x=~q?H.length-q:x+H.length}function w(){var H={line:T,column:x};return function(U){return U.position=new A(H),R(),U}}function A(H){this.start=H,this.end={line:T,column:x},this.source=v.source}A.prototype.content=y;function S(H){var U=new Error(v.source+":"+T+":"+x+": "+H);if(U.reason=H,U.filename=v.source,U.line=T,U.column=x,U.source=y,!v.silent)throw U}function O(H){var U=H.exec(y);if(U){var q=U[0];return _(q),y=y.slice(q.length),U}}function R(){O(r)}function C(H){var U;for(H=H||[];U=M();)U!==!1&&H.push(U);return H}function M(){var H=w();if(!(l!=y.charAt(0)||c!=y.charAt(1))){for(var U=2;f!=y.charAt(U)&&(c!=y.charAt(U)||l!=y.charAt(U+1));)++U;if(U+=2,f===y.charAt(U-1))return S("End of comment missing");var q=y.slice(2,U-2);return x+=2,_(q),y=y.slice(U),x+=2,H({type:d,comment:q})}}function L(){var H=w(),U=O(n);if(U){if(M(),!O(i))return S("property missing ':'");var q=O(a),J=H({type:h,property:b(U[0].replace(e,f)),value:q?b(q[0].replace(e,f)):f});return O(o),J}}function Q(){var H=[];C(H);for(var U;U=L();)U!==!1&&(H.push(U),C(H));return H}return R(),Q()}function b(y){return y?y.replace(s,f):f}return Cf=p,Cf}var ry;function e9(){if(ry)return sa;ry=1;var e=sa&&sa.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=r;const t=e(J8());function r(n,i){let a=null;if(!n||typeof n!="string")return a;const o=(0,t.default)(n),s=typeof i=="function";return o.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:c}=u;s?i(l,c,u):c&&(a=a||{},a[l]=c)}),a}return sa}var mo={},ny;function t9(){if(ny)return mo;ny=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,n=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(l){return!l||r.test(l)||e.test(l)},o=function(l,c){return c.toUpperCase()},s=function(l,c){return"".concat(c,"-")},u=function(l,c){return c===void 0&&(c={}),a(l)?l:(l=l.toLowerCase(),c.reactCompat?l=l.replace(i,s):l=l.replace(n,s),l.replace(t,o))};return mo.camelCase=u,mo}var go,iy;function r9(){if(iy)return go;iy=1;var e=go&&go.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(e9()),r=t9();function n(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(s,u){s&&u&&(o[(0,r.camelCase)(s,a)]=u)}),o}return n.default=n,go=n,go}var n9=r9();const i9=In(n9);function Yo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ay(e.position):"start"in e||"end"in e?ay(e):"line"in e||"column"in e?Rh(e):""}function Rh(e){return oy(e&&e.line)+":"+oy(e&&e.column)}function ay(e){return Rh(e&&e.start)+"-"+Rh(e&&e.end)}function oy(e){return e&&typeof e=="number"?e:1}class Ft extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},o=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof n=="string"){const u=n.indexOf(":");u===-1?a.ruleId=n:(a.source=n.slice(0,u),a.ruleId=n.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Yo(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ft.prototype.file="";Ft.prototype.name="";Ft.prototype.reason="";Ft.prototype.message="";Ft.prototype.stack="";Ft.prototype.column=void 0;Ft.prototype.line=void 0;Ft.prototype.ancestors=void 0;Ft.prototype.cause=void 0;Ft.prototype.fatal=void 0;Ft.prototype.place=void 0;Ft.prototype.ruleId=void 0;Ft.prototype.source=void 0;const xm={}.hasOwnProperty,a9=new Map,o9=/[A-Z]/g,s9=new Set(["table","tbody","thead","tfoot","tr"]),u9=new Set(["td","th"]),D2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function l9(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=b9(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=g9(r,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?oi:Os,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=R2(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function R2(e,t,r){if(t.type==="element")return c9(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return f9(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return h9(e,t,r);if(t.type==="mdxjsEsm")return d9(e,t);if(t.type==="root")return p9(e,t,r);if(t.type==="text")return m9(e,t)}function c9(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=oi,e.schema=i),e.ancestors.push(t);const a=M2(e,t.tagName,!1),o=y9(e,t);let s=Tm(e,t);return s9.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!Q8(u):!0})),L2(e,o,a,t),Em(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function f9(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ss(e,t.position)}function d9(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ss(e,t.position)}function h9(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=oi,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:M2(e,t.name,!0),o=v9(e,t),s=Tm(e,t);return L2(e,o,a,t),Em(o,s),e.ancestors.pop(),e.schema=n,e.create(t,a,o,r)}function p9(e,t,r){const n={};return Em(n,Tm(e,t)),e.create(t,e.Fragment,n,r)}function m9(e,t){return t.value}function L2(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Em(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function g9(e,t,r){return n;function n(i,a,o,s){const l=Array.isArray(o.children)?r:t;return s?l(a,o,s):l(a,o)}}function b9(e,t){return r;function r(n,i,a,o){const s=Array.isArray(a.children),u=ln(n);return t(i,a,o,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function y9(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&xm.call(t.properties,i)){const a=x9(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&u9.has(t.tagName)?n=s:r[o]=s}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function v9(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const a=n.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else ss(e,t.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else ss(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function Tm(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:a9;for(;++n<t.children.length;){const a=t.children[n];let o;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const l=i.get(u)||0;o=u+"-"+l,i.set(u,l+1)}}const s=R2(e,a,o);s!==void 0&&r.push(s)}return r}function x9(e,t,r){const n=uc(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?Uw(r):Hw(r)),n.property==="style"){let i=typeof r=="object"?r:E9(e,String(r));return e.stylePropertyNameCase==="css"&&(i=T9(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?W3[n.property]||n.property:n.attribute,r]}}function E9(e,t){try{return i9(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Ft("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=D2+"#cannot-parse-style-attribute",i}}function M2(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=Jb(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}n=o}else n=Jb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return xm.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);ss(e)}function ss(e,t){const r=new Ft("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=D2+"#cannot-handle-mdx-estrees-without-createevaluater",r}function T9(e){const t={};let r;for(r in e)xm.call(e,r)&&(t[w9(r)]=e[r]);return t}function w9(e){let t=e.replace(o9,A9);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function A9(e){return"-"+e.toLowerCase()}const If={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},_9={tokenize:k9};function k9(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Pe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return de(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const S9={tokenize:C9},sy={tokenize:I9};function C9(e){const t=this,r=[];let n=0,i,a,o;return s;function s(x){if(n<r.length){const _=r[n];return t.containerState=_[1],e.attempt(_[0].continuation,u,l)(x)}return l(x)}function u(x){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const _=t.events.length;let w=_,A;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){A=t.events[w][1].end;break}v(n);let S=_;for(;S<t.events.length;)t.events[S][1].end={...A},S++;return pr(t.events,w+1,0,t.events.slice(_)),t.events.length=S,l(x)}return s(x)}function l(x){if(n===r.length){if(!i)return d(x);if(i.currentConstruct&&i.currentConstruct.concrete)return p(x);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sy,c,f)(x)}function c(x){return i&&T(),v(n),d(x)}function f(x){return t.parser.lazy[t.now().line]=n!==r.length,o=t.now().offset,p(x)}function d(x){return t.containerState={},e.attempt(sy,h,p)(x)}function h(x){return n++,r.push([t.currentConstruct,t.containerState]),d(x)}function p(x){if(x===null){i&&T(),v(0),e.consume(x);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),b(x)}function b(x){if(x===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(x);return}return de(x)?(e.consume(x),y(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(x),b)}function y(x,_){const w=t.sliceStream(x);if(_&&w.push(null),x.previous=a,a&&(a.next=x),a=x,i.defineSkip(x.start),i.write(w),t.parser.lazy[x.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<o&&(!i.events[A][1].end||i.events[A][1].end.offset>o))return;const S=t.events.length;let O=S,R,C;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(R){C=t.events[O][1].end;break}R=!0}for(v(n),A=S;A<t.events.length;)t.events[A][1].end={...C},A++;pr(t.events,O+1,0,t.events.slice(S)),t.events.length=A}}function v(x){let _=r.length;for(;_-- >x;){const w=r[_];t.containerState=w[1],w[0].exit.call(t,e)}r.length=x}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function I9(e,t,r){return Pe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const O9={tokenize:P9};function P9(e){const t=this,r=e.attempt(Rs,n,e.attempt(this.parser.constructs.flowInitial,i,Pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(D4,i)),"linePrefix")));return r;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const N9={resolveAll:B2()},D9=j2("string"),R9=j2("text");function j2(e){return{resolveAll:B2(e==="text"?L9:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,o,s);return o;function o(c){return l(c)?a(c):s(c)}function s(c){if(c===null){r.consume(c);return}return r.enter("data"),r.consume(c),u}function u(c){return l(c)?(r.exit("data"),a(c)):(r.consume(c),u)}function l(c){if(c===null)return!0;const f=i[c];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(n,n.previous))return!0}return!1}}}function B2(e){return t;function t(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(r,n):r}}function L9(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],i=t.sliceStream(n);let a=i.length,o=-1,s=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(o=l.length;l.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(l===-2)u=!0,s++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(s=0),s){const l={type:r===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:n.start._bufferIndex+o,_index:n.start._index+a,line:n.end.line,column:n.end.column-s,offset:n.end.offset-s},end:{...n.end}};n.end={...l.start},n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}const M9={42:rr,43:rr,45:rr,48:rr,49:rr,50:rr,51:rr,52:rr,53:rr,54:rr,55:rr,56:rr,57:rr,62:n2},j9={91:B4},B9={[-2]:wf,[-1]:wf,32:wf},F9={35:q4,42:Ru,45:[Ub,Ru],60:K4,61:Ub,95:Ru,96:Fb,126:Fb},$9={38:a2,92:i2},U9={[-5]:Af,[-4]:Af,[-3]:Af,33:d5,38:a2,42:Nh,60:[p4,t5],91:p5,92:[H4,i2],93:gm,95:Nh,96:S4},H9={null:[Nh,N9]},z9={null:[42,95]},q9={null:[]},W9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:z9,contentInitial:j9,disable:q9,document:M9,flow:F9,flowInitial:B9,insideSpan:H9,string:$9,text:U9},Symbol.toStringTag,{value:"Module"}));function V9(e,t,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let o=[],s=[];const u={attempt:S(w),check:S(A),consume:T,enter:x,exit:_,interrupt:S(A,{interrupt:!0})},l={code:null,containerState:{},defineSkip:b,events:[],now:p,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:f};let c=t.tokenize.call(l,u);return t.resolveAll&&a.push(t),l;function f(M){return o=_r(o,M),y(),o[o.length-1]!==null?[]:(O(t,0),l.events=mc(a,l.events,l),l.events)}function d(M,L){return K9(h(M),L)}function h(M){return Y9(o,M)}function p(){const{_bufferIndex:M,_index:L,line:Q,column:H,offset:U}=n;return{_bufferIndex:M,_index:L,line:Q,column:H,offset:U}}function b(M){i[M.line]=M.column,C()}function y(){let M;for(;n._index<o.length;){const L=o[n._index];if(typeof L=="string")for(M=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===M&&n._bufferIndex<L.length;)v(L.charCodeAt(n._bufferIndex));else v(L)}}function v(M){c=c(M)}function T(M){de(M)?(n.line++,n.column=1,n.offset+=M===-3?2:1,C()):M!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===o[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=M}function x(M,L){const Q=L||{};return Q.type=M,Q.start=p(),l.events.push(["enter",Q,l]),s.push(Q),Q}function _(M){const L=s.pop();return L.end=p(),l.events.push(["exit",L,l]),L}function w(M,L){O(M,L.from)}function A(M,L){L.restore()}function S(M,L){return Q;function Q(H,U,q){let J,V,re,N;return Array.isArray(H)?he(H):"tokenize"in H?he([H]):le(H);function le(ce){return fe;function fe(ge){const Y=ge!==null&&ce[ge],G=ge!==null&&ce.null,ue=[...Array.isArray(Y)?Y:Y?[Y]:[],...Array.isArray(G)?G:G?[G]:[]];return he(ue)(ge)}}function he(ce){return J=ce,V=0,ce.length===0?q:P(ce[V])}function P(ce){return fe;function fe(ge){return N=R(),re=ce,ce.partial||(l.currentConstruct=ce),ce.name&&l.parser.constructs.disable.null.includes(ce.name)?we():ce.tokenize.call(L?Object.assign(Object.create(l),L):l,u,pe,we)(ge)}}function pe(ce){return M(re,N),U}function we(ce){return N.restore(),++V<J.length?P(J[V]):q}}}function O(M,L){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&pr(l.events,L,l.events.length-L,M.resolve(l.events.slice(L),l)),M.resolveTo&&(l.events=M.resolveTo(l.events,l))}function R(){const M=p(),L=l.previous,Q=l.currentConstruct,H=l.events.length,U=Array.from(s);return{from:H,restore:q};function q(){n=M,l.previous=L,l.currentConstruct=Q,l.events.length=H,s=U,C()}}function C(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function Y9(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(r===i)o=[e[r].slice(n,a)];else{if(o=e.slice(r,i),n>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(n):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function K9(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
60
- `;break}case-3:{o=`\r
61
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}function G9(e){const n={constructs:KA([W9,...(e||{}).extensions||[]]),content:i(_9),defined:[],document:i(S9),flow:i(O9),lazy:{},string:i(D9),text:i(R9)};return n;function i(a){return o;function o(s){return V9(n,a,s)}}}function X9(e){for(;!o2(e););return e}const uy=/[\0\t\n\r]/g;function Z9(){let e=1,t="",r=!0,n;return i;function i(a,o,s){const u=[];let l,c,f,d,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(uy.lastIndex=f,l=uy.exec(a),d=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(d),!l){t=a.slice(f);break}if(h===10&&f===d&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),f<d&&(u.push(a.slice(f,d)),e+=d-f),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}f=d+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}const F2={}.hasOwnProperty;function Q9(e,t,r){return typeof t!="string"&&(r=t,t=void 0),J9(r)(X9(G9(r).document().write(Z9()(e,t,!0))))}function J9(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a($e),autolinkProtocol:R,autolinkEmail:R,atxHeading:a(st),blockQuote:a(G),characterEscape:R,characterReference:R,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(W,o),codeTextData:R,data:R,codeFlowValue:R,definition:a(Fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Ie),hardBreakEscape:a(rt),hardBreakTrailing:a(rt),htmlFlow:a(er,o),htmlFlowData:R,htmlText:a(er,o),htmlTextData:R,image:a(xe),label:o,link:a($e),listItem:a(lr),listItemValue:d,listOrdered:a(xt,f),listUnordered:a(xt),paragraph:a(Vr),reference:P,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(st),strong:a(cf),thematicBreak:a(Ne)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:Y,autolinkProtocol:ge,blockQuote:u(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:ce,characterReference:fe,codeFenced:u(y),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:u(v),codeText:u(U),codeTextData:C,data:C,definition:u(),definitionDestinationString:_,definitionLabelString:T,definitionTitleString:x,emphasis:u(),hardBreakEscape:u(L),hardBreakTrailing:u(L),htmlFlow:u(Q),htmlFlowData:C,htmlText:u(H),htmlTextData:C,image:u(J),label:re,labelText:V,lineEnding:M,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:pe,resourceDestinationString:N,resourceTitleString:le,resource:he,setextHeading:u(O),setextHeadingLineSequence:S,setextHeadingText:A,strong:u(),thematicBreak:u()}};$2(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(F){let ee={type:"root",children:[]};const be={stack:[ee],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:c,data:r},ve=[];let He=-1;for(;++He<F.length;)if(F[He][1].type==="listOrdered"||F[He][1].type==="listUnordered")if(F[He][0]==="enter")ve.push(He);else{const Pr=ve.pop();He=i(F,Pr,He)}for(He=-1;++He<F.length;){const Pr=t[F[He][0]];F2.call(Pr,F[He][1].type)&&Pr[F[He][1].type].call(Object.assign({sliceSerialize:F[He][2].sliceSerialize},be),F[He][1])}if(be.tokenStack.length>0){const Pr=be.tokenStack[be.tokenStack.length-1];(Pr[1]||ly).call(be,void 0,Pr[0])}for(ee.position={start:Bn(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:Bn(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<t.transforms.length;)ee=t.transforms[He](ee)||ee;return ee}function i(F,ee,be){let ve=ee-1,He=-1,Pr=!1,ci,hn,so,uo;for(;++ve<=be;){const cr=F[ve];switch(cr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{cr[0]==="enter"?He++:He--,uo=void 0;break}case"lineEndingBlank":{cr[0]==="enter"&&(ci&&!uo&&!He&&!so&&(so=ve),uo=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:uo=void 0}if(!He&&cr[0]==="enter"&&cr[1].type==="listItemPrefix"||He===-1&&cr[0]==="exit"&&(cr[1].type==="listUnordered"||cr[1].type==="listOrdered")){if(ci){let ra=ve;for(hn=void 0;ra--;){const pn=F[ra];if(pn[1].type==="lineEnding"||pn[1].type==="lineEndingBlank"){if(pn[0]==="exit")continue;hn&&(F[hn][1].type="lineEndingBlank",Pr=!0),pn[1].type="lineEnding",hn=ra}else if(!(pn[1].type==="linePrefix"||pn[1].type==="blockQuotePrefix"||pn[1].type==="blockQuotePrefixWhitespace"||pn[1].type==="blockQuoteMarker"||pn[1].type==="listItemIndent"))break}so&&(!hn||so<hn)&&(ci._spread=!0),ci.end=Object.assign({},hn?F[hn][1].start:cr[1].end),F.splice(hn||ve,0,["exit",ci,cr[2]]),ve++,be++}if(cr[1].type==="listItemPrefix"){const ra={type:"listItem",_spread:!1,start:Object.assign({},cr[1].start),end:void 0};ci=ra,F.splice(ve,0,["enter",ra,cr[2]]),ve++,be++,so=void 0,uo=!0}}}return F[ee][1]._spread=Pr,be}function a(F,ee){return be;function be(ve){s.call(this,F(ve),ve),ee&&ee.call(this,ve)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(F,ee,be){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([ee,be||void 0]),F.position={start:Bn(ee.start),end:void 0}}function u(F){return ee;function ee(be){F&&F.call(this,be),l.call(this,be)}}function l(F,ee){const be=this.stack.pop(),ve=this.tokenStack.pop();if(ve)ve[0].type!==F.type&&(ee?ee.call(this,F,ve[0]):(ve[1]||ly).call(this,F,ve[0]));else throw new Error("Cannot close `"+F.type+"` ("+Yo({start:F.start,end:F.end})+"): it’s not open");be.position.end=Bn(F.end)}function c(){return dm(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(F){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function h(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=F}function p(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=F}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F.replace(/(\r?\n|\r)$/g,"")}function T(F){const ee=this.resume(),be=this.stack[this.stack.length-1];be.label=ee,be.identifier=Br(this.sliceSerialize(F)).toLowerCase()}function x(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.title=F}function _(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.url=F}function w(F){const ee=this.stack[this.stack.length-1];if(!ee.depth){const be=this.sliceSerialize(F).length;ee.depth=be}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function S(F){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function R(F){const be=this.stack[this.stack.length-1].children;let ve=be[be.length-1];(!ve||ve.type!=="text")&&(ve=ff(),ve.position={start:Bn(F.start),end:void 0},be.push(ve)),this.stack.push(ve)}function C(F){const ee=this.stack.pop();ee.value+=this.sliceSerialize(F),ee.position.end=Bn(F.end)}function M(F){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const be=ee.children[ee.children.length-1];be.position.end=Bn(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ee.type)&&(R.call(this,F),C.call(this,F))}function L(){this.data.atHardBreak=!0}function Q(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function H(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function U(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function q(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ee,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function J(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ee,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function V(F){const ee=this.sliceSerialize(F),be=this.stack[this.stack.length-2];be.label=B6(ee),be.identifier=Br(ee).toLowerCase()}function re(){const F=this.stack[this.stack.length-1],ee=this.resume(),be=this.stack[this.stack.length-1];if(this.data.inReference=!0,be.type==="link"){const ve=F.children;be.children=ve}else be.alt=ee}function N(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.url=F}function le(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.title=F}function he(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function pe(F){const ee=this.resume(),be=this.stack[this.stack.length-1];be.label=ee,be.identifier=Br(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function we(F){this.data.characterReferenceType=F.type}function ce(F){const ee=this.sliceSerialize(F),be=this.data.characterReferenceType;let ve;be?(ve=YA(ee,be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ve=pm(ee);const He=this.stack[this.stack.length-1];He.value+=ve}function fe(F){const ee=this.stack.pop();ee.position.end=Bn(F.end)}function ge(F){C.call(this,F);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(F)}function Y(F){C.call(this,F);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(F)}function G(){return{type:"blockquote",children:[]}}function ue(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function Fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ie(){return{type:"emphasis",children:[]}}function st(){return{type:"heading",depth:0,children:[]}}function rt(){return{type:"break"}}function er(){return{type:"html",value:""}}function xe(){return{type:"image",title:null,url:"",alt:null}}function $e(){return{type:"link",title:null,url:"",children:[]}}function xt(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function lr(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Vr(){return{type:"paragraph",children:[]}}function cf(){return{type:"strong",children:[]}}function ff(){return{type:"text",value:""}}function Ne(){return{type:"thematicBreak"}}}function Bn(e){return{line:e.line,column:e.column,offset:e.offset}}function $2(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?$2(e,n):eB(e,n)}}function eB(e,t){let r;for(r in t)if(F2.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function ly(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Yo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Yo({start:t.start,end:t.end})+") is still open")}function tB(e){const t=this;t.parser=r;function r(n){return Q9(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rB(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function nB(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
62
- `}]}function iB(e,t){const r=t.value?t.value+`
63
- `:"",n={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function aB(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function oB(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function sB(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=Ga(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let o,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(n,s);const u={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function uB(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lB(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function U2(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=n:i.push({type:"text",value:n}),i}function cB(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return U2(e,t);const i={src:Ga(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fB(e,t){const r={src:Ga(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function dB(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function hB(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return U2(e,t);const i={href:Ga(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function pB(e,t){const r={href:Ga(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mB(e,t,r){const n=e.all(t),i=r?gB(r):H2(t),a={},o=[];if(typeof t.checked=="boolean"){const c=n[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},n.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const c=n[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
64
- `}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const u=n[n.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
65
- `});const l={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function gB(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let n=-1;for(;!t&&++n<r.length;)t=H2(r[n])}return t}function H2(e){const t=e.spread;return t??e.children.length>1}function bB(e,t){const r={},n=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++i<n.length;){const o=n[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,a),e.applyData(t,a)}function yB(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function vB(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function xB(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function EB(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],o),i.push(o)}if(r.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},s=ln(t.children[1]),u=hc(t.children[t.children.length-1]);s&&u&&(o.position={start:s,end:u}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function TB(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",o=r&&r.type==="table"?r.align:void 0,s=o?o.length:t.children.length;let u=-1;const l=[];for(;++u<s;){const f=t.children[u],d={},h=o?o[u]:void 0;h&&(d.align=h);let p={type:"element",tagName:a,properties:d,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),l.push(p)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)}function wB(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const cy=9,fy=32;function AB(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(dy(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(dy(t.slice(i),i>0,!1)),a.join("")}function dy(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===cy||a===fy;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===cy||a===fy;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function _B(e,t){const r={type:"text",value:AB(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function kB(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const SB={blockquote:rB,break:nB,code:iB,delete:aB,emphasis:oB,footnoteReference:sB,heading:uB,html:lB,imageReference:cB,image:fB,inlineCode:dB,linkReference:hB,link:pB,listItem:mB,list:bB,paragraph:yB,root:vB,strong:xB,table:EB,tableCell:wB,tableRow:TB,text:_B,thematicBreak:kB,toml:cu,yaml:cu,definition:cu,footnoteDefinition:cu};function cu(){}function CB(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function IB(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function OB(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||CB,n=e.options.footnoteBackLabel||IB,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[u]);if(!l)continue;const c=e.all(l),f=String(l.identifier).toUpperCase(),d=Ga(f.toLowerCase());let h=0;const p=[],b=e.footnoteCounts.get(f);for(;b!==void 0&&++h<=b;){p.length>0&&p.push({type:"text",value:" "});let T=typeof r=="string"?r:r(u,h);typeof T=="string"&&(T={type:"text",value:T}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(u,h),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const y=c[c.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const T=y.children[y.children.length-1];T&&T.type==="text"?T.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...p)}else c.push(...p);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(l,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Ri(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
66
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
67
- `}]}}const Lh={}.hasOwnProperty,PB={};function NB(e,t){const r=t||PB,n=new Map,i=new Map,a=new Map,o={...SB,...r.handlers},s={all:l,applyData:RB,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:u,options:r,patch:DB,wrap:MB};return an(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?n:i,d=String(c.identifier).toUpperCase();f.has(d)||f.set(d,c)}}),s;function u(c,f){const d=c.type,h=s.handlers[d];if(Lh.call(s.handlers,d)&&h)return h(s,c,f);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in c){const{children:b,...y}=c,v=Ri(y);return v.children=s.all(c),v}return Ri(c)}return(s.options.unknownHandler||LB)(s,c,f)}function l(c){const f=[];if("children"in c){const d=c.children;let h=-1;for(;++h<d.length;){const p=s.one(d[h],c);if(p){if(h&&d[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=hy(p.value)),!Array.isArray(p)&&p.type==="element")){const b=p.children[0];b&&b.type==="text"&&(b.value=hy(b.value))}Array.isArray(p)?f.push(...p):f.push(p)}}}return f}}function DB(e,t){e.position&&(t.position=TA(e))}function RB(e,t){let r=t;if(e&&e.data){const n=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const o="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:o}}r.type==="element"&&a&&Object.assign(r.properties,Ri(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function LB(e,t){const r=t.data||{},n="value"in t&&!(Lh.call(r,"hProperties")||Lh.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MB(e,t){const r=[];let n=-1;for(t&&r.push({type:"text",value:`
68
- `});++n<e.length;)n&&r.push({type:"text",value:`
69
- `}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
70
- `}),r}function hy(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function py(e,t){const r=NB(e,t),n=r.one(e,void 0),i=OB(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
71
- `},i),a}function jB(e,t){return e&&"run"in e?async function(r,n){const i=py(r,{file:n,...t});await e.run(i,n)}:function(r,n){return py(r,{file:n,...e||t})}}function my(e){if(e)throw e}var Of,gy;function BB(){if(gy)return Of;gy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},a=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var c=e.call(l,"constructor"),f=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!c&&!f)return!1;var d;for(d in l);return typeof d>"u"||e.call(l,d)},o=function(l,c){r&&c.name==="__proto__"?r(l,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):l[c.name]=c.newValue},s=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(n)return n(l,c).value}else return;return l[c]};return Of=function u(){var l,c,f,d,h,p,b=arguments[0],y=1,v=arguments.length,T=!1;for(typeof b=="boolean"&&(T=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<v;++y)if(l=arguments[y],l!=null)for(c in l)f=s(b,c),d=s(l,c),b!==d&&(T&&d&&(a(d)||(h=i(d)))?(h?(h=!1,p=f&&i(f)?f:[]):p=f&&a(f)?f:{},o(b,{name:c,newValue:u(T,p,d)})):typeof d<"u"&&o(b,{name:c,newValue:d}));return b},Of}var FB=BB();const Pf=In(FB);function Mh(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function $B(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(u,...l){const c=e[++a];let f=-1;if(u){o(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?UB(c,s)(...l):o(null,...l)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function UB(e,t){let r;return n;function n(...o){const s=e.length>o.length;let u;s&&o.push(i);try{u=e.apply(this,o)}catch(l){const c=l;if(s&&r)throw c;return i(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(o,...s){r||(r=!0,t(o,...s))}function a(o){i(null,o)}}const Zr={basename:HB,dirname:zB,extname:qB,join:WB,sep:"/"};function HB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ls(e);let r=0,n=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(n=i):(s=-1,n=o));return r===n?n=o:n<0&&(n=e.length),e.slice(r,n)}function zB(e){if(Ls(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.codePointAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function qB(e){Ls(e);let t=e.length,r=-1,n=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){n=t+1;break}continue}r<0&&(o=!0,r=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":e.slice(i,r)}function WB(...e){let t=-1,r;for(;++t<e.length;)Ls(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":VB(r)}function VB(e){Ls(e);const t=e.codePointAt(0)===47;let r=YB(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function YB(e,t){let r="",n=0,i=-1,a=0,o=-1,s,u;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(u=r.lastIndexOf("/"),u!==r.length-1){u<0?(r="",n=0):(r=r.slice(0,u),n=r.length-1-r.lastIndexOf("/")),i=o,a=0;continue}}else if(r.length>0){r="",n=0,i=o,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,o):r=e.slice(i+1,o),n=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return r}function Ls(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const KB={cwd:GB};function GB(){return"/"}function jh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function XB(e){if(typeof e=="string")e=new URL(e);else if(!jh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ZB(e)}function ZB(e){if(e.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const n=t.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Nf=["history","path","basename","stem","extname","dirname"];class QB{constructor(t){let r;t?jh(t)?r={path:t}:typeof t=="string"||JB(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":KB.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Nf.length;){const a=Nf[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)Nf.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?Zr.basename(this.path):void 0}set basename(t){Rf(t,"basename"),Df(t,"basename"),this.path=Zr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Zr.dirname(this.path):void 0}set dirname(t){by(this.basename,"dirname"),this.path=Zr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Zr.extname(this.path):void 0}set extname(t){if(Df(t,"extname"),by(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Zr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){jh(t)&&(t=XB(t)),Rf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Zr.basename(this.path,this.extname):void 0}set stem(t){Rf(t,"stem"),Df(t,"stem"),this.path=Zr.join(this.dirname||"",t+(this.extname||""))}fail(t,r,n){const i=this.message(t,r,n);throw i.fatal=!0,i}info(t,r,n){const i=this.message(t,r,n);return i.fatal=void 0,i}message(t,r,n){const i=new Ft(t,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Df(e,t){if(e&&e.includes(Zr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Zr.sep+"`")}function Rf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function by(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function JB(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const eF=(function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),tF={}.hasOwnProperty;class wm extends eF{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=$B()}copy(){const t=new wm;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Pf(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(jf("data",this.frozen),this.namespace[t]=r,this):tF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(jf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(t,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=fu(t),n=this.parser||this.Parser;return Lf("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),Lf("process",this.parser||this.Parser),Mf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,o){const s=fu(t),u=n.parse(s);n.run(u,s,function(c,f,d){if(c||!f||!d)return l(c);const h=f,p=n.stringify(h,d);iF(p)?d.value=p:d.result=p,l(c,d)});function l(c,f){c||!f?o(c):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),Lf("processSync",this.parser||this.Parser),Mf("processSync",this.compiler||this.Compiler),this.process(t,i),vy("processSync","process",r),n;function i(a,o){r=!0,my(a),n=o}}run(t,r,n){yy(t),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(o,s){const u=fu(r);i.run(t,u,l);function l(c,f,d){const h=f||t;c?s(c):o?o(h):n(void 0,h,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),vy("runSync","run",n),i;function a(o,s){my(o),i=s,n=!0}}stringify(t,r){this.freeze();const n=fu(r),i=this.compiler||this.Compiler;return Mf("stringify",i),yy(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(jf("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(l){if(typeof l=="function")u(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[c,...f]=l;u(c,f)}else o(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function o(l){if(!("plugins"in l)&&!("settings"in l))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(l.plugins),l.settings&&(i.settings=Pf(!0,i.settings,l.settings))}function s(l){let c=-1;if(l!=null)if(Array.isArray(l))for(;++c<l.length;){const f=l[c];a(f)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function u(l,c){let f=-1,d=-1;for(;++f<n.length;)if(n[f][0]===l){d=f;break}if(d===-1)n.push([l,...c]);else if(c.length>0){let[h,...p]=c;const b=n[d][1];Mh(b)&&Mh(h)&&(h=Pf(!0,b,h)),n[d]=[l,h,...p]}}}}const rF=new wm().freeze();function Lf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Mf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function jf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function yy(e){if(!Mh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vy(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fu(e){return nF(e)?e:new QB(e)}function nF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function iF(e){return typeof e=="string"||aF(e)}function aF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Am(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ki=Am();function z2(e){Ki=e}var Ko={exec:()=>null};function De(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Kt.caret,"$1"),r=r.replace(i,o),n},getRegex:()=>new RegExp(r,t)};return n}var oF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Kt={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,listReplaceTabs:/^\t+/,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},sF=/^(?:[ \t]*(?:\n|$))+/,uF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Ms=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,cF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_m=/(?:[*+-]|\d{1,9}[.)])/,q2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,W2=De(q2).replace(/bull/g,_m).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),fF=De(q2).replace(/bull/g,_m).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}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),km=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,dF=/^[^\n]+/,Sm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hF=De(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Sm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),pF=De(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_m).getRegex(),bc="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",Cm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,mF=De("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\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",Cm).replace("tag",bc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V2=De(km).replace("hr",Ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bc).getRegex(),gF=De(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",V2).getRegex(),Im={blockquote:gF,code:uF,def:hF,fences:lF,heading:cF,hr:Ms,html:mF,lheading:W2,list:pF,newline:sF,paragraph:V2,table:Ko,text:dF},xy=De("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bc).getRegex(),bF={...Im,lheading:fF,table:xy,paragraph:De(km).replace("hr",Ms).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",xy).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",bc).getRegex()},yF={...Im,html:De(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cm).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:Ko,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:De(km).replace("hr",Ms).replace("heading",` *#{1,6} *[^
72
- ]`).replace("lheading",W2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},vF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xF=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Y2=/^( {2,}|\\)\n(?!\s*$)/,EF=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,yc=/[\p{P}\p{S}]/u,Om=/[\s\p{P}\p{S}]/u,K2=/[^\s\p{P}\p{S}]/u,TF=De(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Om).getRegex(),G2=/(?!~)[\p{P}\p{S}]/u,wF=/(?!~)[\s\p{P}\p{S}]/u,AF=/(?:[^\s\p{P}\p{S}]|~)/u,_F=De(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",oF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),X2=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,kF=De(X2,"u").replace(/punct/g,yc).getRegex(),SF=De(X2,"u").replace(/punct/g,G2).getRegex(),Z2="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",CF=De(Z2,"gu").replace(/notPunctSpace/g,K2).replace(/punctSpace/g,Om).replace(/punct/g,yc).getRegex(),IF=De(Z2,"gu").replace(/notPunctSpace/g,AF).replace(/punctSpace/g,wF).replace(/punct/g,G2).getRegex(),OF=De("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,K2).replace(/punctSpace/g,Om).replace(/punct/g,yc).getRegex(),PF=De(/\\(punct)/,"gu").replace(/punct/g,yc).getRegex(),NF=De(/^<(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(),DF=De(Cm).replace("(?:-->|$)","-->").getRegex(),RF=De("^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",DF).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),rl=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,LF=De(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",rl).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q2=De(/^!?\[(label)\]\[(ref)\]/).replace("label",rl).replace("ref",Sm).getRegex(),J2=De(/^!?\[(ref)\](?:\[\])?/).replace("ref",Sm).getRegex(),MF=De("reflink|nolink(?!\\()","g").replace("reflink",Q2).replace("nolink",J2).getRegex(),Ey=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Pm={_backpedal:Ko,anyPunctuation:PF,autolink:NF,blockSkip:_F,br:Y2,code:xF,del:Ko,emStrongLDelim:kF,emStrongRDelimAst:CF,emStrongRDelimUnd:OF,escape:vF,link:LF,nolink:J2,punctuation:TF,reflink:Q2,reflinkSearch:MF,tag:RF,text:EF,url:Ko},jF={...Pm,link:De(/^!?\[(label)\]\((.*?)\)/).replace("label",rl).getRegex(),reflink:De(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",rl).getRegex()},Bh={...Pm,emStrongRDelimAst:IF,emStrongLDelim:SF,url:De(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ey).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:De(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ey).getRegex()},BF={...Bh,br:De(Y2).replace("{2,}","*").getRegex(),text:De(Bh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},du={normal:Im,gfm:bF,pedantic:yF},bo={normal:Pm,gfm:Bh,breaks:BF,pedantic:jF},FF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ty=e=>FF[e];function gn(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,Ty)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,Ty);return e}function wy(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch{return null}return e}function Ay(e,t){let r=e.replace(Kt.findPipe,(a,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),n=r.split(Kt.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(Kt.slashPipe,"|");return n}function yo(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function $F(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function _y(e,t,r,n,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:s,tokens:n.inlineTokens(s)};return n.state.inLink=!1,u}function UF(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
73
- `).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[s]=o;return s.length>=i.length?a.slice(i.length):a}).join(`
74
- `)}var nl=class{options;rules;lexer;constructor(t){this.options=t||Ki}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:yo(n,`
75
- `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=UF(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=yo(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:yo(r[0],`
76
- `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=yo(r[0],`
77
- `).split(`
78
- `),i="",a="",o=[];for(;n.length>0;){let s=!1,u=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))u.push(n[l]),s=!0;else if(!s)u.push(n[l]);else break;n=n.slice(l);let c=u.join(`
79
- `),f=c.replace(this.rules.other.blockquoteSetextReplace,`
80
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
81
- ${c}`:c,a=a?`${a}
82
- ${f}`:f;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=d,n.length===0)break;let h=o.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let p=h,b=p.raw+`
83
- `+n.join(`
84
- `),y=this.blockquote(b);o[o.length-1]=y,i=i.substring(0,i.length-p.raw.length)+y.raw,a=a.substring(0,a.length-p.text.length)+y.text;break}else if(h?.type==="list"){let p=h,b=p.raw+`
85
- `+n.join(`
86
- `),y=this.list(b);o[o.length-1]=y,i=i.substring(0,i.length-h.raw.length)+y.raw,a=a.substring(0,a.length-p.raw.length)+y.raw,n=b.substring(o.at(-1).raw.length).split(`
87
- `);continue}}return{type:"blockquote",raw:i,tokens:o,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=this.rules.other.listItemRegex(n),s=!1;for(;t;){let l=!1,c="",f="";if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let d=r[2].split(`
88
- `,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),h=t.split(`
89
- `,1)[0],p=!d.trim(),b=0;if(this.options.pedantic?(b=2,f=d.trimStart()):p?b=r[1].length+1:(b=r[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,f=d.slice(b),b+=r[1].length),p&&this.rules.other.blankLine.test(h)&&(c+=h+`
90
- `,t=t.substring(h.length+1),l=!0),!l){let y=this.rules.other.nextBulletRegex(b),v=this.rules.other.hrRegex(b),T=this.rules.other.fencesBeginRegex(b),x=this.rules.other.headingBeginRegex(b),_=this.rules.other.htmlBeginRegex(b);for(;t;){let w=t.split(`
91
- `,1)[0],A;if(h=w,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),A=h):A=h.replace(this.rules.other.tabCharGlobal," "),T.test(h)||x.test(h)||_.test(h)||y.test(h)||v.test(h))break;if(A.search(this.rules.other.nonSpaceChar)>=b||!h.trim())f+=`
92
- `+A.slice(b);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(d)||x.test(d)||v.test(d))break;f+=`
93
- `+h}!p&&!h.trim()&&(p=!0),c+=w+`
94
- `,t=t.substring(w.length+1),d=A.slice(b)}}a.loose||(s?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(s=!0)),a.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),a.raw+=c}let u=a.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let l of a.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let c=this.rules.other.listTaskCheckbox.exec(l.raw);if(c){let f={type:"checkbox",raw:c[0]+" ",checked:c[0]!=="[ ]"};l.checked=f.checked,a.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=f.raw+l.tokens[0].raw,l.tokens[0].text=f.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(f)):l.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):l.tokens.unshift(f)}}if(!a.loose){let c=l.tokens.filter(d=>d.type==="space"),f=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=f}}if(a.loose)for(let l of a.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=Ay(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
95
- `):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let s of i)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<n.length;s++)o.header.push({text:n[s],tokens:this.lexer.inline(n[s]),header:!0,align:o.align[s]});for(let s of a)o.rows.push(Ay(s,o.header.length).map((u,l)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[l]})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===`
96
- `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=yo(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=$F(r[2],"()");if(o===-2)return;if(o>-1){let s=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,s).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),_y(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[i.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return _y(n,a,n[0],this.lexer,this.rules)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,o,s,u=a,l=0,c=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+a);(i=c.exec(r))!=null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(s=[...o].length,i[3]||i[4]){u+=s;continue}else if((i[5]||i[6])&&a%3&&!((a+s)%3)){l+=s;continue}if(u-=s,u>0)continue;s=Math.min(s,s+u+l);let f=[...i[0]][0].length,d=t.slice(0,a+i.index+f+s);if(Math.min(a,s)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let h=d.slice(2,-2);return{type:"strong",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=r[0],i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=r[0],r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},kr=class Fh{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ki,this.options.tokenizer=this.options.tokenizer||new nl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Kt,block:du.normal,inline:bo.normal};this.options.pedantic?(r.block=du.pedantic,r.inline=bo.pedantic):this.options.gfm&&(r.block=du.gfm,this.options.breaks?r.inline=bo.breaks:r.inline=bo.gfm),this.tokenizer.rules=r}static get rules(){return{block:du,inline:bo}}static lex(t,r){return new Fh(r).lex(t)}static lexInline(t,r){return new Fh(r).inlineTokens(t)}lex(t){t=t.replace(Kt.carriageReturn,`
97
- `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){for(this.options.pedantic&&(t=t.replace(Kt.tabCharGlobal," ").replace(Kt.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(o=>(i=o.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=r.at(-1);i.raw.length===1&&o!==void 0?o.raw+=`
98
- `:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
99
- `)?"":`
100
- `)+i.raw,o.text+=`
101
- `+i.text,this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(`
102
- `)?"":`
103
- `)+i.raw,o.text+=`
104
- `+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0,s=t.slice(1),u;this.options.extensions.startBlock.forEach(l=>{u=l.call({lexer:this},s),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let o=r.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(`
105
- `)?"":`
106
- `)+i.raw,o.text+=`
107
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i),n=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(`
108
- `)?"":`
109
- `)+i.raw,o.text+=`
110
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)u.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let o=!1,s="";for(;t;){o||(s=""),o=!1;let u;if(this.options.extensions?.inline?.some(c=>(u=c.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let c=r.at(-1);u.type==="text"&&c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,n,s)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let l=t;if(this.options.extensions?.startInline){let c=1/0,f=t.slice(1),d;this.options.extensions.startInline.forEach(h=>{d=h.call({lexer:this},f),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(u=this.tokenizer.inlineText(l)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),o=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=u.raw,c.text+=u.text):r.push(u);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},il=class{options;parser;constructor(t){this.options=t||Ki}space(t){return""}code({text:t,lang:r,escaped:n}){let i=(r||"").match(Kt.notSpaceStart)?.[0],a=t.replace(Kt.endingNewline,"")+`
111
- `;return i?'<pre><code class="language-'+gn(i)+'">'+(n?a:gn(a,!0))+`</code></pre>
112
- `:"<pre><code>"+(n?a:gn(a,!0))+`</code></pre>
113
- `}blockquote({tokens:t}){return`<blockquote>
114
- ${this.parser.parse(t)}</blockquote>
115
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
116
- `}hr(t){return`<hr>
117
- `}list(t){let r=t.ordered,n=t.start,i="";for(let s=0;s<t.items.length;s++){let u=t.items[s];i+=this.listitem(u)}let a=r?"ol":"ul",o=r&&n!==1?' start="'+n+'"':"";return"<"+a+o+`>
118
- `+i+"</"+a+`>
119
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
120
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
121
- `}table(t){let r="",n="";for(let a=0;a<t.header.length;a++)n+=this.tablecell(t.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<t.rows.length;a++){let o=t.rows[a];n="";for(let s=0;s<o.length;s++)n+=this.tablecell(o[s]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
122
- <thead>
123
- `+r+`</thead>
124
- `+i+`</table>
125
- `}tablerow({text:t}){return`<tr>
126
- ${t}</tr>
127
- `}tablecell(t){let r=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+r+`</${n}>
128
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${gn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:n}){let i=this.parser.parseInline(n),a=wy(t);if(a===null)return i;t=a;let o='<a href="'+t+'"';return r&&(o+=' title="'+gn(r)+'"'),o+=">"+i+"</a>",o}image({href:t,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=wy(t);if(a===null)return gn(n);t=a;let o=`<img src="${t}" alt="${n}"`;return r&&(o+=` title="${gn(r)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:gn(t.text)}},Nm=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}},Rr=class $h{options;renderer;textRenderer;constructor(t){this.options=t||Ki,this.options.renderer=this.options.renderer||new il,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Nm}static parse(t,r){return new $h(r).parse(t)}static parseInline(t,r){return new $h(r).parseInline(t)}parse(t){let r="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let o=i,s=this.options.extensions.renderers[o.type].call({parser:this},o);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){r+=s||"";continue}}let a=i;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}parseInline(t,r=this.renderer){let n="";for(let i=0;i<t.length;i++){let a=t[i];if(this.options.extensions?.renderers?.[a.type]){let s=this.options.extensions.renderers[a.type].call({parser:this},a);if(s!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=s||"";continue}}let o=a;switch(o.type){case"escape":{n+=r.text(o);break}case"html":{n+=r.html(o);break}case"link":{n+=r.link(o);break}case"image":{n+=r.image(o);break}case"checkbox":{n+=r.checkbox(o);break}case"strong":{n+=r.strong(o);break}case"em":{n+=r.em(o);break}case"codespan":{n+=r.codespan(o);break}case"br":{n+=r.br(o);break}case"del":{n+=r.del(o);break}case"text":{n+=r.text(o);break}default:{let s='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}return n}},No=class{options;block;constructor(e){this.options=e||Ki}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?kr.lex:kr.lexInline}provideParser(){return this.block?Rr.parse:Rr.parseInline}},HF=class{defaults=Am();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Rr;Renderer=il;TextRenderer=Nm;Lexer=kr;Tokenizer=nl;Hooks=No;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let n of e)switch(r=r.concat(t.call(this,n)),n.type){case"table":{let i=n;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,t));for(let a of i.rows)for(let o of a)r=r.concat(this.walkTokens(o.tokens,t));break}case"list":{let i=n;r=r.concat(this.walkTokens(i.items,t));break}default:{let i=n;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let o=i[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...o){let s=i.renderer.apply(this,o);return s===!1&&(s=a.apply(this,o)),s}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new il(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,s=r.renderer[o],u=i[o];i[o]=(...l)=>{let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new nl(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,s=r.tokenizer[o],u=i[o];i[o]=(...l)=>{let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new No;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,s=r.hooks[o],u=i[o];No.passThroughHooks.has(a)?i[o]=l=>{if(this.defaults.async&&No.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await s.call(i,l);return u.call(i,f)})();let c=s.call(i,l);return u.call(i,c)}:i[o]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await s.apply(i,l);return f===!1&&(f=await u.apply(i,l)),f})();let c=s.apply(i,l);return c===!1&&(c=u.apply(i,l)),c}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(o){let s=[];return s.push(a.call(this,o)),i&&(s=s.concat(i.call(this,o))),s}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return kr.lex(e,t??this.defaults)}parser(e,t){return Rr.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(new 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 a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(t):t,s=await(i.hooks?await i.hooks.provideLexer():e?kr.lex:kr.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(s):s;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():e?Rr.parse:Rr.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let o=(i.hooks?i.hooks.provideLexer():e?kr.lex:kr.lexInline)(t,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let s=(i.hooks?i.hooks.provideParser():e?Rr.parse:Rr.parseInline)(o,i);return i.hooks&&(s=i.hooks.postprocess(s)),s}catch(o){return a(o)}}}onError(e,t){return r=>{if(r.message+=`
129
- Please report this to https://github.com/markedjs/marked.`,e){let n="<p>An error occurred:</p><pre>"+gn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Mi=new HF;function Ue(e,t){return Mi.parse(e,t)}Ue.options=Ue.setOptions=function(e){return Mi.setOptions(e),Ue.defaults=Mi.defaults,z2(Ue.defaults),Ue};Ue.getDefaults=Am;Ue.defaults=Ki;Ue.use=function(...e){return Mi.use(...e),Ue.defaults=Mi.defaults,z2(Ue.defaults),Ue};Ue.walkTokens=function(e,t){return Mi.walkTokens(e,t)};Ue.parseInline=Mi.parseInline;Ue.Parser=Rr;Ue.parser=Rr.parse;Ue.Renderer=il;Ue.TextRenderer=Nm;Ue.Lexer=kr;Ue.lexer=kr.lex;Ue.Tokenizer=nl;Ue.Hooks=No;Ue.parse=Ue;Ue.options;Ue.setOptions;Ue.use;Ue.walkTokens;Ue.parseInline;Rr.parse;kr.lex;var zF=300,qF="300px",WF=500;function VF(e={}){let{immediate:t=!1,debounceDelay:r=zF,rootMargin:n=qF,idleTimeout:i=WF}=e,[a,o]=m.useState(!1),s=m.useRef(null),u=m.useRef(null),l=m.useRef(null),c=m.useMemo(()=>h=>{let p=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-p))})},1)},[]),f=m.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,p)=>window.requestIdleCallback(h,p):c,[c]),d=m.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return m.useEffect(()=>{if(t){o(!0);return}let h=s.current;if(!h)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(d(l.current),l.current=null);let p=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(d(l.current),l.current=null)},b=x=>{l.current=f(_=>{_.timeRemaining()>0||_.didTimeout?(o(!0),x.disconnect()):l.current=f(()=>{o(!0),x.disconnect()},{timeout:i/2})},{timeout:i})},y=x=>{p(),u.current=window.setTimeout(()=>{var _,w;let A=x.takeRecords();(A.length===0||(w=(_=A.at(-1))==null?void 0:_.isIntersecting)!=null&&w)&&b(x)},r)},v=(x,_)=>{x.isIntersecting?y(_):p()},T=new IntersectionObserver(x=>{for(let _ of x)v(_,T)},{rootMargin:n,threshold:0});return T.observe(h),()=>{u.current&&clearTimeout(u.current),l.current&&d(l.current),T.disconnect()}},[t,r,n,i,d,f]),{shouldRender:a,containerRef:s}}var e_=/\s/,YF=/^\s+$/,KF=new Set(["code","pre","svg","math","annotation"]),GF=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",XF=e=>e.some(t=>GF(t)&&KF.has(t.tagName)),ZF=e=>{let t=[],r="",n=!1;for(let i of e){let a=e_.test(i);a!==n&&r&&(t.push(r),r=""),r+=i,n=a}return r&&t.push(r),t},QF=e=>{let t=[],r="";for(let n of e)e_.test(n)?r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&t.push(r),t},JF=(e,t,r,n,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:r}ms;--sd-easing:${n}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:o},children:[{type:"text",value:e}]}},e7=(e,t,r,n,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(XF(t))return xa;let o=a,s=o.children.indexOf(e);if(s===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let l=r.sep==="char"?QF(u):ZF(u),c=n.prevContentLength,f=l.map(d=>{let h=i.count;if(i.count+=d.length,YF.test(d))return{type:"text",value:d};let p=c>0&&h<c,b=p?0:i.newIndex++*r.stagger;return JF(d,r.animation,r.duration,r.easing,p,b)});return o.children.splice(s,1,...f),s+f.length},t7=0;function Uh(e){var t,r,n,i,a;let o={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(r=e?.duration)!=null?r:150,easing:(n=e?.easing)!=null?n:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(a=e?.stagger)!=null?a:40},s={prevContentLength:0,lastRenderCharCount:0},u=t7++,l=()=>c=>{let f={count:0,newIndex:0};Jp(c,"text",(d,h)=>e7(d,h,o,s,f)),s.lastRenderCharCount=f.count,s.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(c){s.prevContentLength=c},getLastRenderCharCount(){let c=s.lastRenderCharCount;return s.lastRenderCharCount=0,c}}}Uh();var t_=m.createContext(!1),r7=()=>m.useContext(t_),Dm=(...e)=>N2(Le(e)),n7=(e,t)=>{if(!e||!t)return t;let r=`${e}:`;return t.split(/\s+/).filter(Boolean).map(n=>n.startsWith(r)?n:`${e}:${n}`).join(" ")},i7=e=>e?(...t)=>n7(e,N2(Le(t))):Dm,_a=(e,t,r)=>{let n=typeof t=="string"&&r.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([n+t],{type:r}):t,a=URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},Hh=m.createContext(Dm),ke=()=>m.useContext(Hh),a7=Dm("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),o7=e=>{let t={};for(let r of e.split(";")){let n=r.indexOf(":");if(n>0){let i=r.slice(0,n).trim(),a=r.slice(n+1).trim();i&&a&&(t[i]=a)}}return t},s7=m.memo(({children:e,result:t,language:r,className:n,startLine:i,lineNumbers:a=!0,...o})=>{let s=ke(),u=m.useMemo(()=>s(a7),[s]),l=m.useMemo(()=>{let c={};return t.bg&&(c["--sdm-bg"]=t.bg),t.fg&&(c["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(c,o7(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return E.jsx("div",{className:s(n,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",...o,children:E.jsx("pre",{className:s(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:l,children:E.jsx("code",{className:a?s("[counter-increment:line_0] [counter-reset:line]"):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((c,f)=>E.jsx("span",{className:a?u:void 0,children:c.length===0||c.length===1&&c[0].content===""?`
130
- `:c.map((d,h)=>{let p={},b=!!d.bgColor;if(d.color&&(p["--sdm-c"]=d.color),d.bgColor&&(p["--sdm-tbg"]=d.bgColor),d.htmlStyle)for(let[y,v]of Object.entries(d.htmlStyle))y==="color"?p["--sdm-c"]=v:y==="background-color"?(p["--sdm-tbg"]=v,b=!0):p[y]=v;return E.jsx("span",{className:s("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",b&&"bg-[var(--sdm-tbg)]",b&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:p,...d.htmlAttrs,children:d.content},h)})},f))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),u7=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let a=ke();return E.jsx("div",{className:a("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":n||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...r},...i})},r_=m.createContext({code:""}),n_=()=>m.useContext(r_),l7=({language:e})=>{let t=ke();return E.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:E.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},c7=e=>{let t=e.length;for(;t>0&&e[t-1]===`
131
- `;)t--;return e.slice(0,t)},f7=m.lazy(()=>nc(()=>import("./highlighted-body-OFNGDK62-C3igFa7L.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.HighlightedCodeBlockBody}))),d7=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let u=ke(),l=m.useMemo(()=>c7(e),[e]),c=m.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:l.split(`
132
- `).map(f=>[{content:f,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[l]);return E.jsx(r_.Provider,{value:{code:e},children:E.jsxs(u7,{isIncomplete:i,language:t,children:[E.jsx(l7,{language:t}),n?E.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsx("div",{className:u("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:n})}):null,E.jsx(m.Suspense,{fallback:E.jsx(s7,{className:r,language:t,lineNumbers:o,result:c,startLine:a,...s}),children:E.jsx(f7,{className:r,code:l,language:t,lineNumbers:o,raw:c,startLine:a,...s})})]})})},h7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),p7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),m7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),g7=e=>E.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[E.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),E.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),b7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),y7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),v7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),x7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),E7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),T7=e=>E.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:E.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Do={CheckIcon:h7,CopyIcon:p7,DownloadIcon:m7,ExternalLinkIcon:x7,Loader2Icon:g7,Maximize2Icon:b7,RotateCcwIcon:y7,XIcon:v7,ZoomInIcon:E7,ZoomOutIcon:T7},i_=m.createContext(Do),w7=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let r=Object.keys(e),n=Object.keys(t);return r.length!==n.length?!1:r.every(i=>e[i]===t[i])},ky=({icons:e,children:t})=>{let r=m.useRef(e),n=m.useRef(e?{...Do,...e}:Do);w7(r.current,e)||(r.current=e,n.current=e?{...Do,...e}:Do);let i=n.current;return E.jsx(i_.Provider,{value:i,children:t})},zr=()=>m.useContext(i_),a_={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},zh=m.createContext(a_),Pn=()=>m.useContext(zh),Sy=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...o})=>{let s=ke(),[u,l]=m.useState(!1),c=m.useRef(0),{code:f}=n_(),{isAnimating:d}=m.useContext(br),h=Pn(),p=a??f,b=async()=>{var T;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.writeText)){t?.(new Error("Clipboard API not available"));return}try{u||(await navigator.clipboard.writeText(p),l(!0),e?.(),c.current=window.setTimeout(()=>l(!1),r))}catch(x){t?.(x)}};m.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=zr(),v=u?y.CheckIcon:y.CopyIcon;return E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:b,title:h.copyCode,type:"button",...o,children:n??E.jsx(v,{size:14})})},Cy={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},A7=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...o})=>{let s=ke(),{code:u}=n_(),{isAnimating:l}=m.useContext(br),c=Pn(),f=zr(),d=a??u,h=`file.${r&&r in Cy?Cy[r]:"txt"}`,p="text/plain",b=()=>{try{_a(h,d,p),e?.()}catch(y){t?.(y)}};return E.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:l,onClick:b,title:c.downloadFile,type:"button",...o,children:n??E.jsx(f.DownloadIcon,{size:14})})},Iy=()=>{let{Loader2Icon:e}=zr(),t=ke();return E.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[E.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),E.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:E.jsx(e,{className:t("size-4 animate-spin")})})]})},_7=/\.[^/.]+$/,k7=({node:e,className:t,src:r,alt:n,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=zr(),u=ke(),l=m.useRef(null),[c,f]=m.useState(!1),[d,h]=m.useState(!1),p=Pn(),b=o.width!=null||o.height!=null,y=(c||b)&&!d,v=d&&!b;m.useEffect(()=>{let w=l.current;if(w!=null&&w.complete){let A=w.naturalWidth>0;f(A),h(!A)}},[]);let T=m.useCallback(w=>{f(!0),h(!1),i?.(w)},[i]),x=m.useCallback(w=>{f(!1),h(!0),a?.(w)},[a]),_=async()=>{if(r)try{let w=await(await fetch(r)).blob(),A=new URL(r,window.location.origin).pathname.split("/").pop()||"",S=A.split(".").pop(),O=A.includes(".")&&S!==void 0&&S.length<=4,R="";if(O)R=A;else{let C=w.type,M="png";C.includes("jpeg")||C.includes("jpg")?M="jpg":C.includes("png")?M="png":C.includes("svg")?M="svg":C.includes("gif")?M="gif":C.includes("webp")&&(M="webp"),R=`${(n||A||"image").replace(_7,"")}.${M}`}_a(R,w,w.type)}catch{window.open(r,"_blank")}};return r?E.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[E.jsx("img",{alt:n,className:u("max-w-full rounded-lg",v&&"hidden",t),"data-streamdown":"image",onError:x,onLoad:T,ref:l,src:r,...o}),v&&E.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:p.imageNotAvailable}),E.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&E.jsx("button",{className:u("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:_,title:p.downloadImage,type:"button",children:E.jsx(s,{size:14})})]}):null},Go=0,Rm=()=>{Go+=1,Go===1&&(document.body.style.overflow="hidden")},Lm=()=>{Go=Math.max(0,Go-1),Go===0&&(document.body.style.overflow="")},S7=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=zr(),u=ke(),[l,c]=m.useState(!1),f=Pn(),d=m.useCallback(async()=>{try{await navigator.clipboard.writeText(e),c(!0),setTimeout(()=>c(!1),2e3)}catch{}},[e]),h=m.useCallback(()=>{n(),r()},[n,r]);return m.useEffect(()=>{if(t){Rm();let p=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),Lm()}}},[t,r]),t?E.jsx("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:r,onKeyDown:p=>{p.key==="Escape"&&r()},role:"button",tabIndex:0,children:E.jsxs("div",{className:u("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:p=>p.stopPropagation(),onKeyDown:p=>p.stopPropagation(),role:"presentation",children:[E.jsx("button",{className:u("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:r,title:f.close,type:"button",children:E.jsx(s,{size:16})}),E.jsxs("div",{className:u("flex flex-col gap-2"),children:[E.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[E.jsx(o,{size:20}),E.jsx("span",{children:f.openExternalLink})]}),E.jsx("p",{className:u("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),E.jsx("div",{className:u("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),E.jsxs("div",{className:u("flex gap-2"),children:[E.jsx("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:d,type:"button",children:l?E.jsxs(E.Fragment,{children:[E.jsx(i,{size:14}),E.jsx("span",{children:f.copied})]}):E.jsxs(E.Fragment,{children:[E.jsx(a,{size:14}),E.jsx("span",{children:f.copyLink})]})}),E.jsxs("button",{className:u("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:h,type:"button",children:[E.jsx(o,{size:14}),E.jsx("span",{children:f.openLink})]})]})]})}):null},qh=m.createContext(null),Mm=()=>m.useContext(qh),$oe=()=>{var e;let t=Mm();return(e=t?.code)!=null?e:null},jm=()=>{var e;let t=Mm();return(e=t?.mermaid)!=null?e:null},C7=e=>{var t;let r=Mm();return r!=null&&r.renderers&&e&&(t=r.renderers.find(n=>Array.isArray(n.language)?n.language.includes(e):n.language===e))!=null?t:null},I7=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),s=new Image;s.crossOrigin="anonymous",s.onload=()=>{let u=document.createElement("canvas"),l=s.width*n,c=s.height*n;u.width=l,u.height=c;let f=u.getContext("2d");if(!f){a(new Error("Failed to create 2D canvas context for PNG export"));return}f.drawImage(s,0,0,l,c),u.toBlob(d=>{if(!d){a(new Error("Failed to create PNG blob"));return}i(d)},"image/png")},s.onerror=()=>a(new Error("Failed to load SVG image")),s.src=o})},O7=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let o=ke(),[s,u]=m.useState(!1),l=m.useRef(null),{isAnimating:c}=m.useContext(br),f=zr(),d=jm(),h=Pn(),p=async b=>{try{if(b==="mmd"){_a("diagram.mmd",e,"text/plain"),u(!1),n?.(b);return}if(!d){a?.(new Error("Mermaid plugin not available"));return}let y=d.getMermaid(i),v=e.split("").reduce((_,w)=>(_<<5)-_+w.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:x}=await y.render(T,e);if(!x){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){_a("diagram.svg",x,"image/svg+xml"),u(!1),n?.(b);return}if(b==="png"){let _=await I7(x);_a("diagram.png",_,"image/png"),n?.(b),u(!1);return}}catch(y){a?.(y)}};return m.useEffect(()=>{let b=y=>{let v=y.composedPath();l.current&&!v.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),E.jsxs("div",{className:o("relative"),ref:l,children:[E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>u(!s),title:h.downloadDiagram,type:"button",children:t??E.jsx(f.DownloadIcon,{size:14})}),s?E.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("svg"),title:h.downloadDiagramAsSvg,type:"button",children:h.mermaidFormatSvg}),E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("png"),title:h.downloadDiagramAsPng,type:"button",children:h.mermaidFormatPng}),E.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("mmd"),title:h.downloadDiagramAsMmd,type:"button",children:h.mermaidFormatMmd})]}):null]})},P7=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=zr(),u=ke(),[l,c]=m.useState(!1),{isAnimating:f,controls:d}=m.useContext(br),h=Pn(),p=(()=>{if(typeof d=="boolean")return d;let y=d.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),b=()=>{c(!l)};return m.useEffect(()=>{if(l){Rm();let y=v=>{v.key==="Escape"&&c(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),Lm()}}},[l]),m.useEffect(()=>{l?r?.():n&&n()},[l,r,n]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:f,onClick:b,title:h.viewFullscreen,type:"button",...a,children:E.jsx(o,{size:14})}),l?ks.createPortal(E.jsxs("div",{className:u("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:b,onKeyDown:y=>{y.key==="Escape"&&b()},role:"button",tabIndex:0,children:[E.jsx("button",{className:u("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:b,title:h.exitFullscreen,type:"button",children:E.jsx(s,{size:20})}),E.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:E.jsx(F_,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:p})})]}),document.body):null]})},o_=e=>{var t,r;let n=[],i=[],a=e.querySelectorAll("thead th");for(let s of a)n.push(((t=s.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let s of o){let u=[],l=s.querySelectorAll("td");for(let c of l)u.push(((r=c.textContent)==null?void 0:r.trim())||"");i.push(u)}return{headers:n,rows:i}},s_=e=>{let{headers:t,rows:r}=e,n=s=>{let u=!1,l=!1;for(let c of s){if(c==='"'){u=!0,l=!0;break}(c===","||c===`
133
- `)&&(u=!0)}return u?l?`"${s.replace(/"/g,'""')}"`:`"${s}"`:s},i=t.length>0?r.length+1:r.length,a=new Array(i),o=0;t.length>0&&(a[o]=t.map(n).join(","),o+=1);for(let s of r)a[o]=s.map(n).join(","),o+=1;return a.join(`
134
- `)},N7=e=>{let{headers:t,rows:r}=e,n=s=>{let u=!1;for(let c of s)if(c===" "||c===`
135
- `||c==="\r"){u=!0;break}if(!u)return s;let l=[];for(let c of s)c===" "?l.push("\\t"):c===`
136
- `?l.push("\\n"):c==="\r"?l.push("\\r"):l.push(c);return l.join("")},i=t.length>0?r.length+1:r.length,a=new Array(i),o=0;t.length>0&&(a[o]=t.map(n).join(" "),o+=1);for(let s of r)a[o]=s.map(n).join(" "),o+=1;return a.join(`
137
- `)},Bf=e=>{let t=!1;for(let n of e)if(n==="\\"||n==="|"){t=!0;break}if(!t)return e;let r=[];for(let n of e)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):r.push(n);return r.join("")},Wh=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),i=0,a=t.map(s=>Bf(s));n[i]=`| ${a.join(" | ")} |`,i+=1;let o=new Array(t.length);for(let s=0;s<t.length;s+=1)o[s]="---";n[i]=`| ${o.join(" | ")} |`,i+=1;for(let s of r)if(s.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<s.length?Bf(s[l]):"";n[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=s.map(l=>Bf(l));n[i]=`| ${u.join(" | ")} |`,i+=1}return n.join(`
138
- `)},u_=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let a=ke(),[o,s]=m.useState(!1),[u,l]=m.useState(!1),c=m.useRef(null),f=m.useRef(0),{isAnimating:d}=m.useContext(br),h=Pn(),p=async v=>{var T,x;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.write)){n?.(new Error("Clipboard API not available"));return}try{let _=(x=c.current)==null?void 0:x.closest('[data-streamdown="table-wrapper"]'),w=_?.querySelector("table");if(!w){n?.(new Error("Table not found"));return}let A=o_(w),S=({csv:s_,tsv:N7,md:Wh}[v]||Wh)(A),O=new ClipboardItem({"text/plain":new Blob([S],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([O]),l(!0),s(!1),r?.(v),f.current=window.setTimeout(()=>l(!1),i)}catch(_){n?.(_)}};m.useEffect(()=>{let v=T=>{let x=T.composedPath();c.current&&!x.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v),window.clearTimeout(f.current)}},[]);let b=zr(),y=u?b.CheckIcon:b.CopyIcon;return E.jsxs("div",{className:a("relative"),ref:c,children:[E.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!o),title:h.copyTable,type:"button",children:e??E.jsx(y,{height:14,width:14})}),o?E.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("md"),title:h.copyTableAsMarkdown,type:"button",children:h.tableFormatMarkdown}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("csv"),title:h.copyTableAsCsv,type:"button",children:h.tableFormatCsv}),E.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>p("tsv"),title:h.copyTableAsTsv,type:"button",children:h.tableFormatTsv})]}):null]})},l_=({children:e,className:t,onDownload:r,onError:n})=>{let i=ke(),[a,o]=m.useState(!1),s=m.useRef(null),{isAnimating:u}=m.useContext(br),l=Pn(),c=zr(),f=d=>{var h;try{let p=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),b=p?.querySelector("table");if(!b){n?.(new Error("Table not found"));return}let y=o_(b),v=d==="csv"?s_(y):Wh(y);_a(`table.${d==="csv"?"csv":"md"}`,v,d==="csv"?"text/csv":"text/markdown"),o(!1),r?.(d)}catch(p){n?.(p)}};return m.useEffect(()=>{let d=h=>{let p=h.composedPath();s.current&&!p.includes(s.current)&&o(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),E.jsxs("div",{className:i("relative"),ref:s,children:[E.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:()=>o(!a),title:l.downloadTable,type:"button",children:e??E.jsx(c.DownloadIcon,{size:14})}),a?E.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("csv"),title:l.downloadTableAsCsv,type:"button",children:l.tableFormatCsv}),E.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>f("markdown"),title:l.downloadTableAsMarkdown,type:"button",children:l.tableFormatMarkdown})]}):null]})},D7=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:a}=zr(),o=ke(),[s,u]=m.useState(!1),{isAnimating:l}=m.useContext(br),c=Pn(),f=()=>{u(!0)},d=()=>{u(!1)};return m.useEffect(()=>{if(s){Rm();let h=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),Lm()}}},[s]),E.jsxs(E.Fragment,{children:[E.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:l,onClick:f,title:c.viewFullscreen,type:"button",children:E.jsx(i,{size:14})}),s?ks.createPortal(E.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:d,onKeyDown:h=>{h.key==="Escape"&&d()},role:"dialog",children:E.jsxs("div",{className:o("flex h-full flex-col"),onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:[E.jsxs("div",{className:o("flex items-center justify-end gap-1 p-4"),children:[r?E.jsx(u_,{}):null,n?E.jsx(l_,{}):null,E.jsx("button",{className:o("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:d,title:c.exitFullscreen,type:"button",children:E.jsx(a,{size:20})})]}),E.jsx("div",{className:o("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:E.jsx("table",{className:o("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},R7=({children:e,className:t,showControls:r,showCopy:n=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=ke(),u=r&&n,l=r&&i,c=r&&a,f=u||l||c;return E.jsxs("div",{className:s("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[f?E.jsxs("div",{className:s("flex items-center justify-end gap-1"),children:[u?E.jsx(u_,{}):null,l?E.jsx(l_,{}):null,c?E.jsx(D7,{showCopy:u,showDownload:l,children:e}):null]}):null,E.jsx("div",{className:s("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:E.jsx("table",{className:s("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},L7=/startLine=(\d+)/,M7=/\bnoLineNumbers\b/,j7=m.lazy(()=>nc(()=>Promise.resolve().then(()=>Loe),void 0).then(e=>({default:e.Mermaid}))),B7=/language-([^\s]+)/;function vc(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let r=e.position.start,n=t.position.start,i=e.position.end,a=t.position.end;return r?.line===n?.line&&r?.column===n?.column&&i?.line===a?.line&&i?.column===a?.column}function ot(e,t){return e.className===t.className&&vc(e.node,t.node)}var Vh=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Ff=(e,t)=>{if(typeof e=="boolean")return e;let r=e.table;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Oy=(e,t)=>{if(typeof e=="boolean")return e;let r=e.code;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},hu=(e,t)=>{if(typeof e=="boolean")return e;let r=e.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[t]!==!1},Bm=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>ot(e,t));Bm.displayName="MarkdownOl";var c_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&vc(e.node,t.node));c_.displayName="MarkdownLi";var f_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>ot(e,t));f_.displayName="MarkdownUl";var d_=m.memo(({className:e,node:t,...r})=>{let n=ke();return E.jsx("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>ot(e,t));d_.displayName="MarkdownHr";var h_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>ot(e,t));h_.displayName="MarkdownStrong";var F7=({children:e,className:t,href:r,node:n,...i})=>{let a=ke(),{linkSafety:o}=m.useContext(br),[s,u]=m.useState(!1),l=r==="streamdown:incomplete-link",c=m.useCallback(async p=>{if(!(!(o!=null&&o.enabled&&r)||l)){if(p.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}u(!0)}},[o,r,l]),f=m.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),d=m.useCallback(()=>{u(!1)},[]),h={url:r??"",isOpen:s,onClose:d,onConfirm:f};return o!=null&&o.enabled&&r?E.jsxs(E.Fragment,{children:[E.jsx("button",{className:a("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:e}),o.renderModal?o.renderModal(h):E.jsx(S7,{...h})]}):E.jsx("a",{className:a("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":l,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:e})},p_=m.memo(F7,(e,t)=>ot(e,t)&&e.href===t.href);p_.displayName="MarkdownA";var m_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>ot(e,t));m_.displayName="MarkdownH1";var g_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>ot(e,t));g_.displayName="MarkdownH2";var b_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>ot(e,t));b_.displayName="MarkdownH3";var y_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>ot(e,t));y_.displayName="MarkdownH4";var v_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>ot(e,t));v_.displayName="MarkdownH5";var x_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>ot(e,t));x_.displayName="MarkdownH6";var E_=m.memo(({children:e,className:t,node:r,...n})=>{let{controls:i}=m.useContext(br),a=Vh(i,"table"),o=Ff(i,"copy"),s=Ff(i,"download"),u=Ff(i,"fullscreen");return E.jsx(R7,{className:t,showControls:a,showCopy:o,showDownload:s,showFullscreen:u,...n,children:e})},(e,t)=>ot(e,t));E_.displayName="MarkdownTable";var T_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>ot(e,t));T_.displayName="MarkdownThead";var w_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>ot(e,t));w_.displayName="MarkdownTbody";var A_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>ot(e,t));A_.displayName="MarkdownTr";var __=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...n,children:e})},(e,t)=>ot(e,t));__.displayName="MarkdownTh";var k_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>ot(e,t));k_.displayName="MarkdownTd";var S_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...n,children:e})},(e,t)=>ot(e,t));S_.displayName="MarkdownBlockquote";var C_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>ot(e,t));C_.displayName="MarkdownSup";var I_=m.memo(({children:e,className:t,node:r,...n})=>{let i=ke();return E.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>ot(e,t));I_.displayName="MarkdownSub";var O_=m.memo(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=o=>{var s,u;if(!m.isValidElement(o))return!1;let l=Array.isArray(o.props.children)?o.props.children:[o.props.children],c=!1,f=!1;for(let d of l)if(d){if(typeof d=="string")d.trim()!==""&&(c=!0);else if(m.isValidElement(d))if(((s=d.props)==null?void 0:s["data-footnote-backref"])!==void 0)f=!0;else{let h=Array.isArray(d.props.children)?d.props.children:[d.props.children];for(let p of h){if(typeof p=="string"&&p.trim()!==""){c=!0;break}if(m.isValidElement(p)&&((u=p.props)==null?void 0:u["data-footnote-backref"])===void 0){c=!0;break}}}}return f&&!c},a=Array.isArray(e)?e.map(o=>{if(!m.isValidElement(o))return o;if(o.type===Bm){let s=(Array.isArray(o.props.children)?o.props.children:[o.props.children]).filter(u=>!i(u));return s.length===0?null:{...o,props:{...o.props,children:s}}}return o}):e;return(Array.isArray(a)?a.some(o=>o!==null):a!==null)?E.jsx("section",{className:t,...n,children:a}):null}return E.jsx("section",{className:t,...n,children:e})},(e,t)=>ot(e,t));O_.displayName="MarkdownSection";var $7=({node:e,className:t,children:r,...n})=>{var i,a;let o=ke(),s=!("data-block"in n),{mermaid:u,controls:l,lineNumbers:c}=m.useContext(br),f=jm(),d=r7(),h=t?.match(B7),p=(i=h?.at(1))!=null?i:"",b=C7(p);if(s)return E.jsx("code",{className:o("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...n,children:r});let y=(a=e?.properties)==null?void 0:a.metastring,v=y?.match(L7),T=v?Number.parseInt(v[1],10):void 0,x=T!==void 0&&T>=1?T:void 0,_=!(y&&M7.test(y))&&c!==!1,w="";if(m.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?w=r.props.children:typeof r=="string"&&(w=r),b){let R=b.component;return E.jsx(m.Suspense,{fallback:E.jsx(Iy,{}),children:E.jsx(R,{code:w,isIncomplete:d,language:p,meta:y})})}if(p==="mermaid"&&f){let R=Vh(l,"mermaid"),C=hu(l,"download"),M=hu(l,"copy"),L=hu(l,"fullscreen"),Q=hu(l,"panZoom"),H=R&&(C||M||L);return E.jsx(m.Suspense,{fallback:E.jsx(Iy,{}),children:E.jsxs("div",{className:o("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[E.jsx("div",{className:o("flex h-8 items-center text-muted-foreground text-xs"),children:E.jsx("span",{className:o("ml-1 font-mono lowercase"),children:"mermaid"})}),H?E.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:E.jsxs("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[C?E.jsx(O7,{chart:w,config:u?.config}):null,M?E.jsx(Sy,{code:w}):null,L?E.jsx(P7,{chart:w,config:u?.config}):null]})}):null,E.jsx("div",{className:o("rounded-md border border-border bg-background"),children:E.jsx(j7,{chart:w,config:u?.config,showControls:Q})})]})})}let A=Vh(l,"code"),S=Oy(l,"download"),O=Oy(l,"copy");return E.jsx(d7,{className:t,code:w,isIncomplete:d,language:p,lineNumbers:_,startLine:x,children:A?E.jsxs(E.Fragment,{children:[S?E.jsx(A7,{code:w,language:p}):null,O?E.jsx(Sy,{}):null]}):null})},P_=m.memo($7,(e,t)=>e.className===t.className&&vc(e.node,t.node));P_.displayName="MarkdownCode";var N_=m.memo(k7,(e,t)=>e.className===t.className&&vc(e.node,t.node));N_.displayName="MarkdownImg";var D_=m.memo(({children:e,node:t,...r})=>{let n=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(n.length===1&&m.isValidElement(n[0])){let i=n[0].props.node,a=i?.tagName;if(a==="img")return E.jsx(E.Fragment,{children:e});if(a==="code"&&"data-block"in n[0].props)return E.jsx(E.Fragment,{children:e})}return E.jsx("p",{...r,children:e})},(e,t)=>ot(e,t));D_.displayName="MarkdownParagraph";var U7={ol:Bm,li:c_,ul:f_,hr:d_,strong:h_,a:p_,h1:m_,h2:g_,h3:b_,h4:y_,h5:v_,h6:x_,table:E_,thead:T_,tbody:w_,tr:A_,th:__,td:k_,blockquote:S_,code:P_,img:N_,pre:({children:e})=>m.isValidElement(e)?m.cloneElement(e,{"data-block":"true"}):e,sup:C_,sub:I_,p:D_,section:O_},H7=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,z7=new RegExp("\\p{L}","u");function Py(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let r of t){if(H7.test(r))return"rtl";if(z7.test(r))return"ltr"}return"ltr"}var q7=/^[ \t]{0,3}(`{3,}|~{3,})/,W7=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ny=e=>{let t=e.split(`
139
- `),r=null,n=0;for(let i of t){let a=q7.exec(i);if(r===null){if(a){let o=a[1];r=o[0],n=o.length}}else if(a){let o=a[1],s=o[0],u=o.length;s===r&&u>=n&&(r=null,n=0)}}return r!==null},V7=e=>{let t=e.split(`
140
- `);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&W7.test(n))return!0}return!1},Y7=()=>e=>{an(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},Dy=[],Ry={allowDangerousHtml:!0},pu=new WeakMap,K7=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let r=e.rehypePlugins,n=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(r||n||i)){let c="default";return this.keyCache.set(e,c),c}let a=c=>{if(!c||c.length===0)return"";let f="";for(let d=0;d<c.length;d+=1){let h=c[d];if(d>0&&(f+=","),Array.isArray(h)){let[p,b]=h;if(typeof p=="function"){let y=pu.get(p);y||(y=p.name,pu.set(p,y)),f+=y}else f+=String(p);f+=":",f+=JSON.stringify(b)}else if(typeof h=="function"){let p=pu.get(h);p||(p=h.name,pu.set(h,p)),f+=p}else f+=String(h)}return f},o=a(r),s=a(n),u=i?JSON.stringify(i):"",l=`${s}::${o}::${u}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),r=this.cache.get(t);return r&&(this.cache.delete(t),this.cache.set(t,r)),r}set(e,t){let r=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let n=this.cache.keys().next().value;n&&this.cache.delete(n)}this.cache.set(r,t)}clear(){this.cache.clear()}},Ly=new K7,R_=e=>{let t=G7(e),r=e.children||"",n=t.runSync(t.parse(r),r);return r$(n,e)},G7=e=>{let t=Ly.get(e);if(t)return t;let r=Z7(e);return Ly.set(e,r),r},X7=e=>e.some(t=>Array.isArray(t)?t[0]===Ih:t===Ih),Z7=e=>{let t=e.rehypePlugins||Dy,r=e.remarkPlugins||Dy,n=X7(t)?r:[...r,Y7],i=e.remarkRehypeOptions?{...Ry,...e.remarkRehypeOptions}:Ry;return rF().use(tB).use(n).use(jB,i).use(t)},Q7=e=>e,J7=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},e$=(e,t)=>{var r;for(let n in If)if(Object.hasOwn(If,n)&&Object.hasOwn(e.properties,n)){let i=e.properties[n],a=If[n];(a===null||a.includes(e.tagName))&&(e.properties[n]=(r=t(String(i||""),n,e))!=null?r:void 0)}},t$=(e,t,r,n,i,a)=>{let o=!1;return n?o=!n.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t=="number"&&(o=!a(e,t,r)),o},r$=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(r||n||i||a||s){let u=s||Q7;an(e,(l,c,f)=>{if(l.type==="raw"&&f&&typeof c=="number")return J7(f,c,a,l.value),c;if(l.type==="element"&&(e$(l,u),t$(l,c,f,n,i,r)&&f&&typeof c=="number"))return o&&l.children?f.children.splice(c,1,...l.children):f.children.splice(c,1),c})}return l9(e,{Fragment:E.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0})},n$=/\[\^[\w-]{1,200}\](?!:)/,i$=/\[\^[\w-]{1,200}\]:/,a$=/<(\w+)[\s>]/,o$=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),My=new Map,jy=new Map,s$=e=>{let t=e.toLowerCase(),r=My.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return My.set(t,n),n},u$=e=>{let t=e.toLowerCase(),r=jy.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return jy.set(t,n),n},By=(e,t)=>{if(o$.has(t.toLowerCase()))return 0;let r=e.match(s$(t));if(!r)return 0;let n=0;for(let i of r)i.trimEnd().endsWith("/>")||(n+=1);return n},Fy=(e,t)=>{let r=e.match(u$(t));return r?r.length:0},l$=e=>{let t=0;for(let r=0;r<e.length-1;r+=1)e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},c$=e=>{let t=n$.test(e),r=i$.test(e);if(t||r)return[e];let n=kr.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let s of n){let u=s.raw,l=i.length;if(a.length>0){i[l-1]+=u;let c=a.at(-1),f=By(u,c),d=Fy(u,c);for(let h=0;h<f;h+=1)a.push(c);for(let h=0;h<d;h+=1)a.length>0&&a.at(-1)===c&&a.pop();continue}if(s.type==="html"&&s.block){let c=u.match(a$);if(c){let f=c[1],d=By(u,f),h=Fy(u,f);d>h&&a.push(f)}}if(l>0&&!o){let c=i[l-1];if(l$(c)%2===1){i[l-1]=c+u;continue}}i.push(u),s.type!=="space"&&(o=s.type==="code")}return i},f$=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,o,s,u)=>{if(!s.includes(`
141
-
142
- `))return o+s+u;let l=s.replace(/\n\n/g,`
143
- <!---->
144
- `),c=(l.startsWith(`
145
- `)?"":`
146
- `)+l+(l.endsWith(`
147
- `)?"":`
148
- `);return`${o}${c}${u}
149
-
150
- `})}return r},d$=/([\\`*_~[\]|])/g,h$=e=>e.replace(d$,"\\$1"),p$=(e,t)=>{if(!t.length)return e;let r=e;for(let n of t){let i=new RegExp(`(<${n}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${n}\\s*>)`,"gi");r=r.replace(i,(a,o,s,u)=>{let l=h$(s).replace(/\n\n/g,"&#10;&#10;");return o+l+u})}return r},L_=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(L_).join(""):"",m$=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));an(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let i=L_(n);n.children=i?[{type:"text",value:i}]:[]}})},g$=()=>e=>{an(e,"code",t=>{var r,n;t.meta&&(t.data=(r=t.data)!=null?r:{},t.data.hProperties={...(n=t.data.hProperties)!=null?n:{},metastring:t.meta})})},b$=/^[ \t]*<[\w!/?-]/,y$=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,v$=e=>typeof e!="string"||e.length===0||!b$.test(e)?e:e.replace(y$,"$1"),$y,Uy,Hy,zy,Lu={...wi,protocols:{...wi.protocols,href:[...(Uy=($y=wi.protocols)==null?void 0:$y.href)!=null?Uy:[],"tel"]},attributes:{...wi.attributes,code:[...(zy=(Hy=wi.attributes)==null?void 0:Hy.code)!=null?zy:[],"metastring"]}},Yh={raw:Ih,sanitize:[OA,Lu],harden:[P3,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},x$={gfm:[G5,{}],codeMeta:g$},qy=Object.values(Yh),E$=Object.values(x$),T$={block:" ▋",circle:" ●"},M_=["github-light","github-dark"],j_={enabled:!0},w$={shikiTheme:M_,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:j_},br=m.createContext(w$),B_=m.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let c=o.getLastRenderCharCount();o.setPrevContentLength(c)}let u=typeof e=="string"&&r?v$(e):e,l=E.jsx(R_,{...s,children:u});return E.jsx(t_.Provider,{value:i,children:a?E.jsx("div",{dir:a,style:{display:"contents"},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let r=Object.keys(e.components||{}),n=Object.keys(t.components||{});if(r.length!==n.length||r.some(i=>{var a,o;return((a=e.components)==null?void 0:a[i])!==((o=t.components)==null?void 0:o[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});B_.displayName="Block";var Gi=m.memo(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=qy,remarkPlugins:s=E$,className:u,shikiTheme:l=M_,mermaid:c,controls:f=!0,isAnimating:d=!1,animated:h,BlockComponent:p=B_,parseMarkdownIntoBlocksFn:b=c$,caret:y,plugins:v,remend:T,linkSafety:x=j_,lineNumbers:_=!0,allowedTags:w,literalTagContent:A,translations:S,icons:O,prefix:R,onAnimationStart:C,onAnimationEnd:M,...L})=>{let Q=m.useId(),[H,U]=m.useTransition(),q=m.useMemo(()=>i7(R),[R]),J=m.useRef(null),V=m.useRef(C),re=m.useRef(M);V.current=C,re.current=M,m.useEffect(()=>{var xe,$e,xt;if(t==="static")return;let lr=J.current;if(J.current=d,lr===null){d&&((xe=V.current)==null||xe.call(V));return}d&&!lr?($e=V.current)==null||$e.call(V):!d&&lr&&((xt=re.current)==null||xt.call(re))},[d,t]);let N=m.useMemo(()=>w?Object.keys(w):[],[w]),le=m.useMemo(()=>{if(typeof e!="string")return"";let xe=t==="streaming"&&n?o8(e,T):e;return A&&A.length>0&&(xe=p$(xe,A)),N.length>0&&(xe=f$(xe,N)),xe},[e,t,n,T,N,A]),he=m.useMemo(()=>b(le),[le,b]),[P,pe]=m.useState(he);m.useEffect(()=>{t==="streaming"&&!Y?U(()=>{pe(he)}):pe(he)},[he,t]);let we=t==="streaming"?P:he,ce=m.useMemo(()=>r==="auto"?we.map(Py):void 0,[we,r]),fe=m.useMemo(()=>we.map((xe,$e)=>`${Q}-${$e}`),[we.length,Q]),ge=m.useMemo(()=>h===!0?"true":h?JSON.stringify(h):"",[h]),Y=m.useMemo(()=>ge?ge==="true"?Uh():Uh(h):null,[ge]),G=m.useMemo(()=>{var xe,$e;return{shikiTheme:($e=(xe=v?.code)==null?void 0:xe.getThemes())!=null?$e:l,controls:f,isAnimating:d,lineNumbers:_,mode:t,mermaid:c,linkSafety:x}},[l,f,d,_,t,c,x,v?.code]),ue=m.useMemo(()=>S?JSON.stringify(S):"",[S]),W=m.useMemo(()=>({...a_,...S}),[ue]),Fe=m.useMemo(()=>{let{inlineCode:xe,...$e}=a??{},xt={...U7,...$e};if(xe){let lr=xt.code;xt.code=Vr=>"data-block"in Vr?lr?m.createElement(lr,Vr):null:m.createElement(xe,Vr)}return xt},[a]),Ie=m.useMemo(()=>{let xe=[];return v!=null&&v.cjk&&(xe=[...xe,...v.cjk.remarkPluginsBefore]),xe=[...xe,...s],v!=null&&v.cjk&&(xe=[...xe,...v.cjk.remarkPluginsAfter]),v!=null&&v.math&&(xe=[...xe,v.math.remarkPlugin]),xe},[s,v?.math,v?.cjk]),st=m.useMemo(()=>{var xe;let $e=o;if(w&&Object.keys(w).length>0&&o===qy){let xt={...Lu,tagNames:[...(xe=Lu.tagNames)!=null?xe:[],...Object.keys(w)],attributes:{...Lu.attributes,...w}};$e=[Yh.raw,[OA,xt],Yh.harden]}return A&&A.length>0&&($e=[...$e,[m$,A]]),v!=null&&v.math&&($e=[...$e,v.math.rehypePlugin]),Y&&d&&($e=[...$e,Y.rehypePlugin]),$e},[o,v?.math,Y,d,w,A]),rt=m.useMemo(()=>{if(!d||we.length===0)return!1;let xe=we.at(-1);return Ny(xe)||V7(xe)},[d,we]),er=m.useMemo(()=>y&&d&&!rt?{"--streamdown-caret":`"${T$[y]}"`}:void 0,[y,d,rt]);return t==="static"?E.jsx(zh.Provider,{value:W,children:E.jsx(qh.Provider,{value:v??null,children:E.jsx(br.Provider,{value:G,children:E.jsx(ky,{icons:O,children:E.jsx(Hh.Provider,{value:q,children:E.jsx("div",{className:q("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",u),dir:r==="auto"?Py(le):r,children:E.jsx(R_,{components:Fe,rehypePlugins:st,remarkPlugins:Ie,...L,children:le})})})})})})}):E.jsx(zh.Provider,{value:W,children:E.jsx(qh.Provider,{value:v??null,children:E.jsx(br.Provider,{value:G,children:E.jsx(ky,{icons:O,children:E.jsx(Hh.Provider,{value:q,children:E.jsxs("div",{className:q("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",y&&!rt?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,u),style:er,children:[we.length===0&&y&&d&&E.jsx("span",{}),we.map((xe,$e)=>{var xt;let lr=$e===we.length-1,Vr=d&&lr&&Ny(xe);return E.jsx(p,{animatePlugin:Y,components:Fe,content:xe,dir:(xt=ce?.[$e])!=null?xt:r!=="auto"?r:void 0,index:$e,isIncomplete:Vr,rehypePlugins:st,remarkPlugins:Ie,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:n,...L},fe[$e])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Gi.displayName="Streamdown";var A$=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:u,ZoomInIcon:l,ZoomOutIcon:c}=zr(),f=ke(),d=m.useRef(null),h=m.useRef(null),[p,b]=m.useState(o),[y,v]=m.useState({x:0,y:0}),[T,x]=m.useState(!1),[_,w]=m.useState({x:0,y:0}),[A,S]=m.useState({x:0,y:0}),O=m.useCallback(q=>{b(J=>Math.max(r,Math.min(n,J+q)))},[r,n]),R=m.useCallback(()=>{O(i)},[O,i]),C=m.useCallback(()=>{O(-i)},[O,i]),M=m.useCallback(()=>{b(o),v({x:0,y:0})},[o]),L=m.useCallback(q=>{q.preventDefault();let J=q.deltaY>0?-i:i;O(J)},[O,i]),Q=m.useCallback(q=>{if(q.button!==0||q.isPrimary===!1)return;x(!0),w({x:q.clientX,y:q.clientY}),S(y);let J=q.currentTarget;J instanceof HTMLElement&&J.setPointerCapture(q.pointerId)},[y]),H=m.useCallback(q=>{if(!T)return;q.preventDefault();let J=q.clientX-_.x,V=q.clientY-_.y;v({x:A.x+J,y:A.y+V})},[T,_,A]),U=m.useCallback(q=>{x(!1);let J=q.currentTarget;J instanceof HTMLElement&&J.releasePointerCapture(q.pointerId)},[]);return m.useEffect(()=>{let q=d.current;if(q)return q.addEventListener("wheel",L,{passive:!1}),()=>{q.removeEventListener("wheel",L)}},[L]),m.useEffect(()=>{let q=h.current;if(q&&T)return document.body.style.userSelect="none",q.addEventListener("pointermove",H,{passive:!1}),q.addEventListener("pointerup",U),q.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",q.removeEventListener("pointermove",H),q.removeEventListener("pointerup",U),q.removeEventListener("pointercancel",U)}},[T,H,U]),E.jsxs("div",{className:f("relative flex flex-col",s?"h-full w-full":"min-h-28 w-full",t),ref:d,style:{cursor:T?"grabbing":"grab"},children:[a?E.jsxs("div",{className:f("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",s?"bottom-4 left-4":"bottom-2 left-2"),children:[E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:p>=n,onClick:R,title:"Zoom in",type:"button",children:E.jsx(l,{size:16})}),E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:p<=r,onClick:C,title:"Zoom out",type:"button",children:E.jsx(c,{size:16})}),E.jsx("button",{className:f("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:M,title:"Reset zoom and pan",type:"button",children:E.jsx(u,{size:16})})]}):null,E.jsx("div",{className:f("flex-1 origin-center transition-transform duration-150 ease-out",s?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Q,ref:h,role:"application",style:{transform:`translate(${y.x}px, ${y.y}px) scale(${p})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},F_=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let a=ke(),[o,s]=m.useState(null),[u,l]=m.useState(!1),[c,f]=m.useState(""),[d,h]=m.useState(""),[p,b]=m.useState(0),{mermaid:y}=m.useContext(br),v=jm(),T=y?.errorComponent,{shouldRender:x,containerRef:_}=VF({immediate:n});if(m.useEffect(()=>{if(x){if(!v){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),l(!0);let A=v.getMermaid(r),S=e.split("").reduce((C,M)=>(C<<5)-C+M.charCodeAt(0)|0,0),O=`mermaid-${Math.abs(S)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:R}=await A.render(O,e);f(R),h(R)}catch(A){if(!(d||c)){let S=A instanceof Error?A.message:"Failed to render Mermaid chart";s(S)}}finally{l(!1)}})()}},[e,r,p,x,v]),!(x||c||d))return E.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:_});if(u&&!c&&!d)return E.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:_,children:E.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[E.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),E.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(o&&!c&&!d){let A=()=>b(S=>S+1);return T?E.jsx("div",{ref:_,children:E.jsx(T,{chart:e,error:o,retry:A})}):E.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:_,children:[E.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",o]}),E.jsxs("details",{className:a("mt-2"),children:[E.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),E.jsx("pre",{className:a("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let w=c||d;return E.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:_,children:E.jsx(A$,{className:a(n?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:E.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:w},role:"img"})})})};const _$=e=>typeof e=="boolean"||e instanceof Boolean,k$=e=>typeof e=="number"||e instanceof Number,S$=e=>typeof e=="bigint"||e instanceof BigInt,$_=e=>!!e&&e instanceof Date,C$=e=>typeof e=="string"||e instanceof String,I$=e=>Array.isArray(e),U_=e=>typeof e=="object"&&e!==null,H_=e=>!!e&&e instanceof Object&&typeof e=="function";function al(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function O$(e,t,r){return r?JSON.stringify(e):t?`"${e}"`:e}function z_(e){let{field:t,value:r,data:n,lastElement:i,openBracket:a,closeBracket:o,level:s,style:u,shouldExpandNode:l,clickToExpandNode:c,outerRef:f,beforeExpandChange:d}=e;const h=m.useRef(!1),[p,b]=m.useState(()=>l(s,r,t)),y=m.useRef(null);m.useEffect(()=>{h.current?b(l(s,r,t)):h.current=!0},[l]);const v=m.useId();if(n.length===0)return P$({field:t,openBracket:a,closeBracket:o,lastElement:i,style:u});const T=p?u.collapseIcon:u.expandIcon,x=p?u.ariaLables.collapseJson:u.ariaLables.expandJson,_=s+1,w=n.length-1,A=R=>{p!==R&&(!d||d({level:s,value:r,field:t,newExpandValue:R}))&&b(R)},S=R=>{if(R.key==="ArrowRight"||R.key==="ArrowLeft")R.preventDefault(),A(R.key==="ArrowRight");else if(R.key==="ArrowUp"||R.key==="ArrowDown"){R.preventDefault();const C=R.key==="ArrowUp"?-1:1;if(!f.current)return;const M=f.current.querySelectorAll("[role=button]");let L=-1;for(let H=0;H<M.length;H++)if(M[H].tabIndex===0){L=H;break}if(L<0)return;const Q=(L+C+M.length)%M.length;M[L].tabIndex=-1,M[Q].tabIndex=0,M[Q].focus()}},O=()=>{var R;A(!p);const C=y.current;if(!C)return;const M=(R=f.current)===null||R===void 0?void 0:R.querySelector('[role=button][tabindex="0"]');M&&(M.tabIndex=-1),C.tabIndex=0,C.focus()};return m.createElement("div",{className:u.basicChildStyle,role:"treeitem","aria-expanded":p,"aria-selected":void 0},m.createElement("span",{className:T,onClick:O,onKeyDown:S,role:"button","aria-label":x,"aria-expanded":p,"aria-controls":p?v:void 0,ref:y,tabIndex:s===0?0:-1}),(t||t==="")&&(c?m.createElement("span",{className:u.clickableLabel,onClick:O,onKeyDown:S},al(t,u.quotesForFieldNames),":"):m.createElement("span",{className:u.label},al(t,u.quotesForFieldNames),":")),m.createElement("span",{className:u.punctuation},a),p?m.createElement("ul",{id:v,role:"group",className:u.childFieldsContainer},n.map((R,C)=>m.createElement(Kh,{key:R[0]||C,field:R[0],value:R[1],style:u,lastElement:C===w,level:_,shouldExpandNode:l,clickToExpandNode:c,beforeExpandChange:d,outerRef:f}))):m.createElement("span",{className:u.collapsedContent,onClick:O,onKeyDown:S}),m.createElement("span",{className:u.punctuation},o),!i&&m.createElement("span",{className:u.punctuation},","))}function P$(e){let{field:t,openBracket:r,closeBracket:n,lastElement:i,style:a}=e;return m.createElement("div",{className:a.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&m.createElement("span",{className:a.label},al(t,a.quotesForFieldNames),":"),m.createElement("span",{className:a.punctuation},r),m.createElement("span",{className:a.punctuation},n),!i&&m.createElement("span",{className:a.punctuation},","))}function N$(e){let{field:t,value:r,style:n,lastElement:i,shouldExpandNode:a,clickToExpandNode:o,level:s,outerRef:u,beforeExpandChange:l}=e;return z_({field:t,value:r,lastElement:i||!1,level:s,openBracket:"{",closeBracket:"}",style:n,shouldExpandNode:a,clickToExpandNode:o,data:Object.keys(r).map(c=>[c,r[c]]),outerRef:u,beforeExpandChange:l})}function D$(e){let{field:t,value:r,style:n,lastElement:i,level:a,shouldExpandNode:o,clickToExpandNode:s,outerRef:u,beforeExpandChange:l}=e;return z_({field:t,value:r,lastElement:i||!1,level:a,openBracket:"[",closeBracket:"]",style:n,shouldExpandNode:o,clickToExpandNode:s,data:r.map(c=>[void 0,c]),outerRef:u,beforeExpandChange:l})}function R$(e){let{field:t,value:r,style:n,lastElement:i}=e,a,o=n.otherValue;return r===null?(a="null",o=n.nullValue):r===void 0?(a="undefined",o=n.undefinedValue):C$(r)?(a=O$(r,!n.noQuotesForStringValues,n.stringifyStringValues),o=n.stringValue):_$(r)?(a=r?"true":"false",o=n.booleanValue):k$(r)?(a=r.toString(),o=n.numberValue):S$(r)?(a=`${r.toString()}n`,o=n.numberValue):$_(r)?a=r.toISOString():H_(r)?a="function() { }":a=r.toString(),m.createElement("div",{className:n.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&m.createElement("span",{className:n.label},al(t,n.quotesForFieldNames),":"),m.createElement("span",{className:o},a),!i&&m.createElement("span",{className:n.punctuation},","))}function Kh(e){const t=e.value;return I$(t)?m.createElement(D$,Object.assign({},e)):U_(t)&&!$_(t)&&!H_(t)?m.createElement(N$,Object.assign({},e)):m.createElement(R$,Object.assign({},e))}var Ht={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti"};const L$={collapseJson:"collapse JSON",expandJson:"expand JSON"},Mu={container:Ht["container-light"],basicChildStyle:Ht["basic-element-style"],childFieldsContainer:Ht["child-fields-container"],label:Ht["label-light"],clickableLabel:Ht["clickable-label-light"],nullValue:Ht["value-null-light"],undefinedValue:Ht["value-undefined-light"],stringValue:Ht["value-string-light"],booleanValue:Ht["value-boolean-light"],numberValue:Ht["value-number-light"],otherValue:Ht["value-other-light"],punctuation:Ht["punctuation-light"],collapseIcon:Ht["collapse-icon-light"],expandIcon:Ht["expand-icon-light"],collapsedContent:Ht["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:L$,stringifyStringValues:!1},M$=()=>!0,j$=e=>e<1,B$=e=>{let{data:t,style:r=Mu,shouldExpandNode:n=M$,clickToExpandNode:i=!1,beforeExpandChange:a,compactTopLevel:o,...s}=e;const u=m.useRef(null);return m.createElement("div",Object.assign({"aria-label":"JSON view"},s,{className:r.container,ref:u,role:"tree"}),o&&U_(t)?Object.entries(t).map(l=>{let[c,f]=l;return m.createElement(Kh,{key:c,field:c,value:f,style:{...Mu,...r},lastElement:!0,level:1,shouldExpandNode:n,clickToExpandNode:i,beforeExpandChange:a,outerRef:u})}):m.createElement(Kh,{value:t,style:{...Mu,...r},lastElement:!0,level:0,shouldExpandNode:n,clickToExpandNode:i,outerRef:u,beforeExpandChange:a}))},F$=()=>!1;function Fm({data:e,collapsed:t}){return E.jsx("div",{className:"text-xs font-mono",children:E.jsx(B$,{data:e,shouldExpandNode:t?F$:j$,style:Mu})})}var $$=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function $m(e){if(typeof e!="string")return!1;var t=$$;return t.includes(e)}var U$=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],H$=new Set(U$);function q_(e){return typeof e!="string"?!1:H$.has(e)}function W_(e){return typeof e=="string"&&e.startsWith("data-")}function Fr(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(q_(r)||W_(r))&&(t[r]=e[r]);return t}function js(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Fr(t)}return typeof e=="object"&&!Array.isArray(e)?Fr(e):null}function Nt(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(q_(r)||W_(r)||$m(r))&&(t[r]=e[r]);return t}function z$(e){return e==null?null:m.isValidElement(e)?Nt(e.props):typeof e=="object"&&!Array.isArray(e)?Nt(e):null}var q$=["children","width","height","viewBox","className","style","title","desc"];function Gh(){return Gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gh.apply(null,arguments)}function W$(e,t){if(e==null)return{};var r,n,i=V$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function V$(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var V_=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:u,desc:l}=e,c=W$(e,q$),f=a||{width:n,height:i,x:0,y:0},d=Le("recharts-surface",o);return m.createElement("svg",Gh({},Nt(c),{className:d,width:n,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),m.createElement("title",null,u),m.createElement("desc",null,l),r)}),Y$=["children","className"];function Xh(){return Xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xh.apply(null,arguments)}function K$(e,t){if(e==null)return{};var r,n,i=G$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function G$(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zt=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=K$(e,Y$),a=Le("recharts-layer",n);return m.createElement("g",Xh({className:a},Nt(i),{ref:t}),r)}),X$=m.createContext(null);function Ye(e){return function(){return e}}const Y_=Math.cos,ol=Math.sin,qr=Math.sqrt,sl=Math.PI,xc=2*sl,Zh=Math.PI,Qh=2*Zh,xi=1e-6,Z$=Qh-xi;function K_(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Q$(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return K_;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class J${constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?K_:Q$(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,u=n-t,l=i-r,c=o-t,f=s-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>xi)if(!(Math.abs(f*u-l*c)>xi)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,p=i-s,b=u*u+l*l,y=h*h+p*p,v=Math.sqrt(b),T=Math.sqrt(d),x=a*Math.tan((Zh-Math.acos((b+d-y)/(2*v*T)))/2),_=x/T,w=x/v;Math.abs(_-1)>xi&&this._append`L${t+_*c},${r+_*f}`,this._append`A${a},${a},0,0,${+(f*h>c*p)},${this._x1=t+w*u},${this._y1=r+w*l}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),u=n*Math.sin(i),l=t+s,c=r+u,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>xi||Math.abs(this._y1-c)>xi)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Qh+Qh),d>Z$?this._append`A${n},${n},0,1,${f},${t-s},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:d>xi&&this._append`A${n},${n},0,${+(d>=Zh)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Um(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new J$(t)}function Hm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function G_(e){this._context=e}G_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ec(e){return new G_(e)}function X_(e){return e[0]}function Z_(e){return e[1]}function Q_(e,t){var r=Ye(!0),n=null,i=Ec,a=null,o=Um(s);e=typeof e=="function"?e:e===void 0?X_:Ye(e),t=typeof t=="function"?t:t===void 0?Z_:Ye(t);function s(u){var l,c=(u=Hm(u)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),l=0;l<=c;++l)!(l<c&&r(f=u[l],l,u))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,l,u),+t(f,l,u));if(h)return a=null,h+""||null}return s.x=function(u){return arguments.length?(e=typeof u=="function"?u:Ye(+u),s):e},s.y=function(u){return arguments.length?(t=typeof u=="function"?u:Ye(+u),s):t},s.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Ye(!!u),s):r},s.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),s):i},s.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),s):n},s}function mu(e,t,r){var n=null,i=Ye(!0),a=null,o=Ec,s=null,u=Um(l);e=typeof e=="function"?e:e===void 0?X_:Ye(+e),t=typeof t=="function"?t:Ye(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Z_:Ye(+r);function l(f){var d,h,p,b=(f=Hm(f)).length,y,v=!1,T,x=new Array(b),_=new Array(b);for(a==null&&(s=o(T=u())),d=0;d<=b;++d){if(!(d<b&&i(y=f[d],d,f))===v)if(v=!v)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(x[p],_[p]);s.lineEnd(),s.areaEnd()}v&&(x[d]=+e(y,d,f),_[d]=+t(y,d,f),s.point(n?+n(y,d,f):x[d],r?+r(y,d,f):_[d]))}if(T)return s=null,T+""||null}function c(){return Q_().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ye(+f),n=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ye(+f),l):e},l.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ye(+f),l):n},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ye(+f),r=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ye(+f),l):t},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ye(+f),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(n).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ye(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}class J_{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function eU(e){return new J_(e,!0)}function tU(e){return new J_(e,!1)}const zm={draw(e,t){const r=qr(t/sl);e.moveTo(r,0),e.arc(0,0,r,0,xc)}},rU={draw(e,t){const r=qr(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},ek=qr(1/3),nU=ek*2,iU={draw(e,t){const r=qr(t/nU),n=r*ek;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},aU={draw(e,t){const r=qr(t),n=-r/2;e.rect(n,n,r,r)}},oU=.8908130915292852,tk=ol(sl/10)/ol(7*sl/10),sU=ol(xc/10)*tk,uU=-Y_(xc/10)*tk,lU={draw(e,t){const r=qr(t*oU),n=sU*r,i=uU*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=xc*a/5,s=Y_(o),u=ol(o);e.lineTo(u*r,-s*r),e.lineTo(s*n-u*i,u*n+s*i)}e.closePath()}},$f=qr(3),cU={draw(e,t){const r=-qr(t/($f*3));e.moveTo(0,r*2),e.lineTo(-$f*r,-r),e.lineTo($f*r,-r),e.closePath()}},xr=-.5,Er=qr(3)/2,Jh=1/qr(12),fU=(Jh/2+1)*3,dU={draw(e,t){const r=qr(t/fU),n=r/2,i=r*Jh,a=n,o=r*Jh+r,s=-a,u=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,u),e.lineTo(xr*n-Er*i,Er*n+xr*i),e.lineTo(xr*a-Er*o,Er*a+xr*o),e.lineTo(xr*s-Er*u,Er*s+xr*u),e.lineTo(xr*n+Er*i,xr*i-Er*n),e.lineTo(xr*a+Er*o,xr*o-Er*a),e.lineTo(xr*s+Er*u,xr*u-Er*s),e.closePath()}};function hU(e,t){let r=null,n=Um(i);e=typeof e=="function"?e:Ye(e||zm),t=typeof t=="function"?t:Ye(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ye(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ye(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function ul(){}function ll(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function rk(e){this._context=e}rk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ll(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ll(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pU(e){return new rk(e)}function nk(e){this._context=e}nk.prototype={areaStart:ul,areaEnd:ul,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ll(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mU(e){return new nk(e)}function ik(e){this._context=e}ik.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ll(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gU(e){return new ik(e)}function ak(e){this._context=e}ak.prototype={areaStart:ul,areaEnd:ul,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bU(e){return new ak(e)}function Wy(e){return e<0?-1:1}function Vy(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Wy(a)+Wy(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Yy(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Uf(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function cl(e){this._context=e}cl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Uf(this,this._t0,Yy(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Uf(this,Yy(this,r=Vy(this,e,t)),r);break;default:Uf(this,this._t0,r=Vy(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ok(e){this._context=new sk(e)}(ok.prototype=Object.create(cl.prototype)).point=function(e,t){cl.prototype.point.call(this,t,e)};function sk(e){this._context=e}sk.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function yU(e){return new cl(e)}function vU(e){return new ok(e)}function uk(e){this._context=e}uk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Ky(e),i=Ky(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Ky(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function xU(e){return new uk(e)}function Tc(e,t){this._context=e,this._t=t}Tc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function EU(e){return new Tc(e,.5)}function TU(e){return new Tc(e,0)}function wU(e){return new Tc(e,1)}function ji(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function ep(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function AU(e,t){return e[t]}function _U(e){const t=[];return t.key=e,t}function kU(){var e=Ye([]),t=ep,r=ji,n=AU;function i(a){var o=Array.from(e.apply(this,arguments),_U),s,u=o.length,l=-1,c;for(const f of a)for(s=0,++l;s<u;++s)(o[s][l]=[0,+n(f,o[s].key,l,a)]).data=f;for(s=0,c=Hm(t(o));s<u;++s)o[c[s]].index=s;return r(o,c),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ye(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ye(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ep:typeof a=="function"?a:Ye(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ji,i):r},i}function SU(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}ji(e,t)}}function CU(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}ji(e,t)}}function IU(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,u=0,l=0;s<o;++s){for(var c=e[t[s]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var b=e[t[p]],y=b[n][1]||0,v=b[n-1][1]||0;h+=y-v}u+=f,l+=h*f}i[n-1][1]+=i[n-1][0]=r,u&&(r-=l/u)}i[n-1][1]+=i[n-1][0]=r,ji(e,t)}}var Hf={},zf={},Gy;function OU(){return Gy||(Gy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(zf)),zf}var qf={},Xy;function lk(){return Xy||(Xy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(qf)),qf}var Wf={},Zy;function qm(){return Zy||(Zy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(Wf)),Wf}var Vf={},Yf={},Qy;function PU(){return Qy||(Qy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Yf)),Yf}var Jy;function Wm(){return Jy||(Jy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PU(),r=qm();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],o=i.length;if(o===0)return a;let s=0,u="",l="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),s++);s<o;){const f=i[s];l?f==="\\"&&s+1<o?(s++,u+=i[s]):f===l?l="":u+=f:c?f==='"'||f==="'"?l=f:f==="]"?(c=!1,a.push(u),u=""):u+=f:f==="["?(c=!0,u&&(a.push(u),u="")):f==="."?u&&(a.push(u),u=""):u+=f,s++}return u&&a.push(u),a}e.toPath=n})(Vf)),Vf}var ev;function Vm(){return ev||(ev=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OU(),r=lk(),n=qm(),i=Wm();function a(s,u,l){if(s==null)return l;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?r.isDeepKey(u)?a(s,i.toPath(u),l):l:c}case"number":case"symbol":{typeof u=="number"&&(u=n.toKey(u));const c=s[u];return c===void 0?l:c}default:{if(Array.isArray(u))return o(s,u,l);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return l;const c=s[u];return c===void 0?l:c}}}function o(s,u,l){if(u.length===0)return l;let c=s;for(let f=0;f<u.length;f++){if(c==null||t.isUnsafeProperty(u[f]))return l;c=c[u[f]]}return c===void 0?l:c}e.get=a})(Hf)),Hf}var Kf,tv;function NU(){return tv||(tv=1,Kf=Vm().get),Kf}var DU=NU();const La=In(DU);var RU=4;function Xn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:RU,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function it(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,a,o)=>{var s=r[o-1];return typeof s=="string"?i+s+a:s!==void 0?i+Xn(s)+a:i+a},"")}var nr=e=>e===0?0:e>0?1:-1,on=e=>typeof e=="number"&&e!=+e,tp=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,se=e=>(typeof e=="number"||e instanceof Number)&&!on(e),jt=e=>se(e)||typeof e=="string",LU=0,us=e=>{var t=++LU;return"".concat(e||"").concat(t)},$r=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!se(t)&&typeof t!="string")return n;var a;if(tp(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return on(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},ck=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function at(e,t,r){return se(e)&&se(t)?Xn(e+r*(t-e)):t}function fk(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):La(n,t))===r)}var tt=e=>e===null||typeof e>"u",Bs=e=>tt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function ir(e){return e!=null}function Qa(){}var MU=["type","size","sizeType"];function rp(){return rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rp.apply(null,arguments)}function rv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rv(Object(r),!0).forEach(function(n){jU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jU(e,t,r){return(t=BU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BU(e){var t=FU(e,"string");return typeof t=="symbol"?t:t+""}function FU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $U(e,t){if(e==null)return{};var r,n,i=UU(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function UU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var dk={symbolCircle:zm,symbolCross:rU,symbolDiamond:iU,symbolSquare:aU,symbolStar:lU,symbolTriangle:cU,symbolWye:dU},HU=Math.PI/180,zU=e=>{var t="symbol".concat(Bs(e));return dk[t]||zm},qU=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*HU;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},WU=(e,t)=>{dk["symbol".concat(Bs(e))]=t},hk=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=$U(e,MU),a=nv(nv({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var s=()=>{var d=zU(o),h=hU().type(d).size(qU(r,n,o)),p=h();if(p!==null)return p},{className:u,cx:l,cy:c}=a,f=Nt(a);return se(l)&&se(c)&&se(r)?m.createElement("path",rp({},f,{className:Le("recharts-symbols",u),transform:"translate(".concat(l,", ").concat(c,")"),d:s()})):null};hk.registerSymbol=WU;var pk=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ym=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(m.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{$m(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},VU=(e,t,r)=>n=>(e(t,r,n),null),Km=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];$m(i)&&typeof a=="function"&&(n||(n={}),n[i]=VU(a,t,r))}),n};function iv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function YU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iv(Object(r),!0).forEach(function(n){KU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KU(e,t,r){return(t=GU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GU(e){var t=XU(e,"string");return typeof t=="symbol"?t:t+""}function XU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dt(e,t){var r=YU({},e),n=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&n[s]!==void 0&&(o[s]=n[s]),o),r);return a}var Gf={},Xf={},av;function ZU(){return av||(av=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const o=r[a],s=n(o,a,r);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t})(Xf)),Xf}var Zf={},ov;function QU(){return ov||(ov=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(Zf)),Zf}var Qf={},sv;function mk(){return sv||(sv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Qf)),Qf}var Jf={},ed={},td={},uv;function JU(){return uv||(uv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(td)),td}var lv;function gk(){return lv||(lv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JU();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(ed)),ed}var rd={},cv;function eH(){return cv||(cv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(rd)),rd}var fv;function tH(){return fv||(fv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=gk(),r=eH();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(Jf)),Jf}var nd={},id={},dv;function rH(){return dv||(dv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Vm();function r(n){return function(i){return t.get(i,n)}}e.property=r})(id)),id}var ad={},od={},sd={},ud={},hv;function bk(){return hv||(hv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(ud)),ud}var ld={},pv;function yk(){return pv||(pv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(ld)),ld}var cd={},mv;function vk(){return mv||(mv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(cd)),cd}var gv;function nH(){return gv||(gv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bk(),r=yk(),n=vk();function i(c,f,d){return typeof d!="function"?i(c,f,()=>{}):a(c,f,function h(p,b,y,v,T,x){const _=d(p,b,y,v,T,x);return _!==void 0?!!_:a(p,b,h,x)},new Map)}function a(c,f,d,h){if(f===c)return!0;switch(typeof f){case"object":return o(c,f,d,h);case"function":return Object.keys(f).length>0?a(c,{...f},d,h):n.isEqualsSameValueZero(c,f);default:return t.isObject(c)?typeof f=="string"?f==="":!0:n.isEqualsSameValueZero(c,f)}}function o(c,f,d,h){if(f==null)return!0;if(Array.isArray(f))return u(c,f,d,h);if(f instanceof Map)return s(c,f,d,h);if(f instanceof Set)return l(c,f,d,h);const p=Object.keys(f);if(c==null||r.isPrimitive(c))return p.length===0;if(p.length===0)return!0;if(h?.has(f))return h.get(f)===c;h?.set(f,c);try{for(let b=0;b<p.length;b++){const y=p[b];if(!r.isPrimitive(c)&&!(y in c)||f[y]===void 0&&c[y]!==void 0||f[y]===null&&c[y]!==null||!d(c[y],f[y],y,c,f,h))return!1}return!0}finally{h?.delete(f)}}function s(c,f,d,h){if(f.size===0)return!0;if(!(c instanceof Map))return!1;for(const[p,b]of f.entries()){const y=c.get(p);if(d(y,b,p,c,f,h)===!1)return!1}return!0}function u(c,f,d,h){if(f.length===0)return!0;if(!Array.isArray(c))return!1;const p=new Set;for(let b=0;b<f.length;b++){const y=f[b];let v=!1;for(let T=0;T<c.length;T++){if(p.has(T))continue;const x=c[T];let _=!1;if(d(x,y,b,c,f,h)&&(_=!0),_){p.add(T),v=!0;break}}if(!v)return!1}return!0}function l(c,f,d,h){return f.size===0?!0:c instanceof Set?u([...c],[...f],d,h):!1}e.isMatchWith=i,e.isSetMatch=l})(sd)),sd}var bv;function xk(){return bv||(bv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nH();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(od)),od}var fd={},dd={},hd={},yv;function iH(){return yv||(yv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(hd)),hd}var pd={},vv;function Gm(){return vv||(vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(pd)),pd}var md={},xv;function Ek(){return xv||(xv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",u="[object Map]",l="[object Set]",c="[object Array]",f="[object Function]",d="[object ArrayBuffer]",h="[object Object]",p="[object Error]",b="[object DataView]",y="[object Uint8Array]",v="[object Uint8ClampedArray]",T="[object Uint16Array]",x="[object Uint32Array]",_="[object BigUint64Array]",w="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",O="[object BigInt64Array]",R="[object Float32Array]",C="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=c,e.bigInt64ArrayTag=O,e.bigUint64ArrayTag=_,e.booleanTag=i,e.dataViewTag=b,e.dateTag=s,e.errorTag=p,e.float32ArrayTag=R,e.float64ArrayTag=C,e.functionTag=f,e.int16ArrayTag=A,e.int32ArrayTag=S,e.int8ArrayTag=w,e.mapTag=u,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=l,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=T,e.uint32ArrayTag=x,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=v})(md)),md}var gd={},Ev;function aH(){return Ev||(Ev=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(gd)),gd}var Tv;function Tk(){return Tv||(Tv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iH(),r=Gm(),n=Ek(),i=yk(),a=aH();function o(c,f){return s(c,void 0,c,new Map,f)}function s(c,f,d,h=new Map,p=void 0){const b=p?.(c,f,d,h);if(b!==void 0)return b;if(i.isPrimitive(c))return c;if(h.has(c))return h.get(c);if(Array.isArray(c)){const y=new Array(c.length);h.set(c,y);for(let v=0;v<c.length;v++)y[v]=s(c[v],v,d,h,p);return Object.hasOwn(c,"index")&&(y.index=c.index),Object.hasOwn(c,"input")&&(y.input=c.input),y}if(c instanceof Date)return new Date(c.getTime());if(c instanceof RegExp){const y=new RegExp(c.source,c.flags);return y.lastIndex=c.lastIndex,y}if(c instanceof Map){const y=new Map;h.set(c,y);for(const[v,T]of c)y.set(v,s(T,v,d,h,p));return y}if(c instanceof Set){const y=new Set;h.set(c,y);for(const v of c)y.add(s(v,void 0,d,h,p));return y}if(typeof Buffer<"u"&&Buffer.isBuffer(c))return c.subarray();if(a.isTypedArray(c)){const y=new(Object.getPrototypeOf(c)).constructor(c.length);h.set(c,y);for(let v=0;v<c.length;v++)y[v]=s(c[v],v,d,h,p);return y}if(c instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&c instanceof SharedArrayBuffer)return c.slice(0);if(c instanceof DataView){const y=new DataView(c.buffer.slice(0),c.byteOffset,c.byteLength);return h.set(c,y),u(y,c,d,h,p),y}if(typeof File<"u"&&c instanceof File){const y=new File([c],c.name,{type:c.type});return h.set(c,y),u(y,c,d,h,p),y}if(typeof Blob<"u"&&c instanceof Blob){const y=new Blob([c],{type:c.type});return h.set(c,y),u(y,c,d,h,p),y}if(c instanceof Error){const y=new c.constructor;return h.set(c,y),y.message=c.message,y.name=c.name,y.stack=c.stack,y.cause=c.cause,u(y,c,d,h,p),y}if(c instanceof Boolean){const y=new Boolean(c.valueOf());return h.set(c,y),u(y,c,d,h,p),y}if(c instanceof Number){const y=new Number(c.valueOf());return h.set(c,y),u(y,c,d,h,p),y}if(c instanceof String){const y=new String(c.valueOf());return h.set(c,y),u(y,c,d,h,p),y}if(typeof c=="object"&&l(c)){const y=Object.create(Object.getPrototypeOf(c));return h.set(c,y),u(y,c,d,h,p),y}return c}function u(c,f,d=c,h,p){const b=[...Object.keys(f),...t.getSymbols(f)];for(let y=0;y<b.length;y++){const v=b[y],T=Object.getOwnPropertyDescriptor(c,v);(T==null||T.writable)&&(c[v]=s(f[v],v,d,h,p))}}function l(c){switch(r.getTag(c)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=u})(dd)),dd}var wv;function oH(){return wv||(wv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tk();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(fd)),fd}var Av;function sH(){return Av||(Av=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xk(),r=oH();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(ad)),ad}var bd={},yd={},vd={},_v;function uH(){return _v||(_v=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tk(),r=Gm(),n=Ek();function i(a,o){return t.cloneDeepWith(a,(s,u,l,c)=>{const f=o?.(s,u,l,c);if(f!==void 0)return f;if(typeof a=="object"){if(r.getTag(a)===n.objectTag&&typeof a.constructor!="function"){const d={};return c.set(a,d),t.copyProperties(d,a,l,c),d}switch(Object.prototype.toString.call(a)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new a.constructor(a?.valueOf());return t.copyProperties(d,a),d}case n.argumentsTag:{const d={};return t.copyProperties(d,a),d.length=a.length,d[Symbol.iterator]=a[Symbol.iterator],d}default:return}}})}e.cloneDeepWith=i})(vd)),vd}var kv;function lH(){return kv||(kv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uH();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(yd)),yd}var xd={},Ed={},Sv;function wk(){return Sv||(Sv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(Ed)),Ed}var Td={},Cv;function cH(){return Cv||(Cv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gm();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Td)),Td}var Iv;function fH(){return Iv||(Iv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lk(),r=wk(),n=cH(),i=Wm();function a(o,s){let u;if(Array.isArray(s)?u=s:typeof s=="string"&&t.isDeepKey(s)&&o?.[s]==null?u=i.toPath(s):u=[s],u.length===0)return!1;let l=o;for(let c=0;c<u.length;c++){const f=u[c];if((l==null||!Object.hasOwn(l,f))&&!((Array.isArray(l)||n.isArguments(l))&&r.isIndex(f)&&f<l.length))return!1;l=l[f]}return!0}e.has=a})(xd)),xd}var Ov;function dH(){return Ov||(Ov=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xk(),r=qm(),n=lH(),i=Vm(),a=fH();function o(s,u){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=r.toKey(s);break}}return u=n.cloneDeep(u),function(l){const c=i.get(l,s);return c===void 0?a.has(l,s):u===void 0?c===void 0:t.isMatch(c,u)}}e.matchesProperty=o})(bd)),bd}var Pv;function hH(){return Pv||(Pv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mk(),r=rH(),n=sH(),i=dH();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=a})(nd)),nd}var Nv;function pH(){return Nv||(Nv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZU(),r=QU(),n=mk(),i=tH(),a=hH();function o(s,u=n.identity){return i.isArrayLikeObject(s)?t.uniqBy(Array.from(s),r.ary(a.iteratee(u),1)):[]}e.uniqBy=o})(Gf)),Gf}var wd,Dv;function mH(){return Dv||(Dv=1,wd=pH().uniqBy),wd}var gH=mH();const Rv=In(gH);function bH(e,t,r){return t===!0?Rv(e,r):typeof t=="function"?Rv(e,t):e}var Ad={exports:{}},_d={},kd={exports:{}},Sd={};var Lv;function yH(){if(Lv)return Sd;Lv=1;var e=Xp();function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var h=d(),p=n({inst:{value:h,getSnapshot:d}}),b=p[0].inst,y=p[1];return a(function(){b.value=h,b.getSnapshot=d,u(b)&&y({inst:b})},[f,h,d]),i(function(){return u(b)&&y({inst:b}),f(function(){u(b)&&y({inst:b})})},[f]),o(h),h}function u(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!r(f,h)}catch{return!0}}function l(f,d){return d()}var c=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return Sd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Sd}var Mv;function vH(){return Mv||(Mv=1,kd.exports=yH()),kd.exports}var jv;function xH(){if(jv)return _d;jv=1;var e=Xp(),t=vH();function r(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,u=e.useDebugValue;return _d.useSyncExternalStoreWithSelector=function(l,c,f,d,h){var p=a(null);if(p.current===null){var b={hasValue:!1,value:null};p.current=b}else b=p.current;p=s(function(){function v(A){if(!T){if(T=!0,x=A,A=d(A),h!==void 0&&b.hasValue){var S=b.value;if(h(S,A))return _=S}return _=A}if(S=_,n(x,A))return S;var O=d(A);return h!==void 0&&h(S,O)?(x=A,S):(x=A,_=O)}var T=!1,x,_,w=f===void 0?null:f;return[function(){return v(c())},w===null?void 0:function(){return v(w())}]},[c,f,d,h]);var y=i(l,p[0],p[1]);return o(function(){b.hasValue=!0,b.value=y},[y]),u(y),y},_d}var Bv;function EH(){return Bv||(Bv=1,Ad.exports=xH()),Ad.exports}var TH=EH(),Xm=m.createContext(null),wH=e=>e,Qe=()=>{var e=m.useContext(Xm);return e?e.store.dispatch:wH},ju=()=>{},AH=()=>ju,_H=(e,t)=>e===t;function oe(e){var t=m.useContext(Xm),r=m.useMemo(()=>t?n=>{if(n!=null)return e(n)}:ju,[t,e]);return TH.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:AH,t?t.store.getState:ju,t?t.store.getState:ju,r,_H)}function kH(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function SH(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function CH(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Fv=e=>Array.isArray(e)?e:[e];function IH(e){const t=Array.isArray(e[0])?e[0]:e;return CH(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function OH(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var PH=class{constructor(e){this.value=e}deref(){return this.value}},NH=typeof WeakRef<"u"?WeakRef:PH,DH=0,$v=1;function gu(){return{s:DH,v:void 0,o:null,p:null}}function Ak(e,t={}){let r=gu();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let s=r;const{length:u}=arguments;for(let f=0,d=u;f<d;f++){const h=arguments[f];if(typeof h=="function"||typeof h=="object"&&h!==null){let p=s.o;p===null&&(s.o=p=new WeakMap);const b=p.get(h);b===void 0?(s=gu(),p.set(h,s)):s=b}else{let p=s.p;p===null&&(s.p=p=new Map);const b=p.get(h);b===void 0?(s=gu(),p.set(h,s)):s=b}}const l=s;let c;if(s.s===$v)c=s.v;else if(c=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,c)&&(c=f,a!==0&&a--),i=typeof c=="object"&&c!==null||typeof c=="function"?new NH(c):c}return l.s=$v,l.v=c,c}return o.clearCache=()=>{r=gu(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function RH(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),kH(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...r,...u},{memoize:f,memoizeOptions:d=[],argsMemoize:h=Ak,argsMemoizeOptions:p=[]}=c,b=Fv(d),y=Fv(p),v=IH(i),T=f(function(){return a++,l.apply(null,arguments)},...b),x=h(function(){o++;const w=OH(v,arguments);return s=T.apply(null,w),s},...y);return Object.assign(x,{resultFunc:l,memoizedResultFunc:T,dependencies:v,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var B=RH(Ak),LH=Object.assign((e,t=B)=>{SH(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((o,s,u)=>(o[r[u]]=s,o),{}))},{withTypes:()=>LH}),Cd={},Id={},Od={},Uv;function MH(){return Uv||(Uv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const o=t(n),s=t(i);if(o===s&&o===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=r})(Od)),Od}var Pd={},Nd={},Hv;function _k(){return Hv||(Hv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Nd)),Nd}var zv;function jH(){return zv||(zv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_k(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(Pd)),Pd}var qv;function BH(){return qv||(qv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MH(),r=jH(),n=Wm();function i(a,o,s,u){if(a==null)return[];s=u?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const l=(h,p)=>{let b=h;for(let y=0;y<p.length&&b!=null;++y)b=b[p[y]];return b},c=(h,p)=>p==null||h==null?p:typeof h=="object"&&"key"in h?Object.hasOwn(p,h.key)?p[h.key]:l(p,h.path):typeof h=="function"?h(p):Array.isArray(h)?l(p,h):typeof p=="object"?p[h]:p,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(p=>c(p,h))})).slice().sort((h,p)=>{for(let b=0;b<f.length;b++){const y=t.compareValues(h.criteria[b],p.criteria[b],s[b]);if(y!==0)return y}return 0}).map(h=>h.original)}e.orderBy=i})(Id)),Id}var Dd={},Wv;function FH(){return Wv||(Wv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),o=(s,u)=>{for(let l=0;l<s.length;l++){const c=s[l];Array.isArray(c)&&u<a?o(c,u+1):i.push(c)}};return o(r,0),i}e.flatten=t})(Dd)),Dd}var Rd={},Vv;function kk(){return Vv||(Vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wk(),r=gk(),n=bk(),i=vk();function a(o,s,u){return n.isObject(u)&&(typeof s=="number"&&r.isArrayLike(u)&&t.isIndex(s)&&s<u.length||typeof s=="string"&&s in u)?i.isEqualsSameValueZero(u[s],o):!1}e.isIterateeCall=a})(Rd)),Rd}var Yv;function $H(){return Yv||(Yv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BH(),r=FH(),n=kk();function i(a,...o){const s=o.length;return s>1&&n.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,r.flatten(o),["asc"])}e.sortBy=i})(Cd)),Cd}var Ld,Kv;function UH(){return Kv||(Kv=1,Ld=$H().sortBy),Ld}var HH=UH();const wc=In(HH);var Sk=e=>e.legend.settings,zH=e=>e.legend.size,qH=e=>e.legend.payload;B([qH,Sk],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?wc(n,r):n});var bu=1;function WH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=m.useState({height:0,left:0,top:0,width:0}),n=m.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>bu||Math.abs(o.left-t.left)>bu||Math.abs(o.top-t.top)>bu||Math.abs(o.width-t.width)>bu)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function It(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var VH=typeof Symbol=="function"&&Symbol.observable||"@@observable",Gv=VH,Md=()=>Math.random().toString(36).substring(7).split("").join("."),YH={INIT:`@@redux/INIT${Md()}`,REPLACE:`@@redux/REPLACE${Md()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Md()}`},fl=YH;function Zm(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ck(e,t,r){if(typeof e!="function")throw new Error(It(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(It(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(It(1));return r(Ck)(e,t)}let n=e,i=t,a=new Map,o=a,s=0,u=!1;function l(){o===a&&(o=new Map,a.forEach((y,v)=>{o.set(v,y)}))}function c(){if(u)throw new Error(It(3));return i}function f(y){if(typeof y!="function")throw new Error(It(4));if(u)throw new Error(It(5));let v=!0;l();const T=s++;return o.set(T,y),function(){if(v){if(u)throw new Error(It(6));v=!1,l(),o.delete(T),a=null}}}function d(y){if(!Zm(y))throw new Error(It(7));if(typeof y.type>"u")throw new Error(It(8));if(typeof y.type!="string")throw new Error(It(17));if(u)throw new Error(It(9));try{u=!0,i=n(i,y)}finally{u=!1}return(a=o).forEach(T=>{T()}),y}function h(y){if(typeof y!="function")throw new Error(It(10));n=y,d({type:fl.REPLACE})}function p(){const y=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(It(11));function T(){const _=v;_.next&&_.next(c())}return T(),{unsubscribe:y(T)}},[Gv](){return this}}}return d({type:fl.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:h,[Gv]:p}}function KH(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:fl.INIT})>"u")throw new Error(It(12));if(typeof r(void 0,{type:fl.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(It(13))})}function Ik(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const o=t[a];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{KH(r)}catch(a){i=a}return function(o={},s){if(i)throw i;let u=!1;const l={};for(let c=0;c<n.length;c++){const f=n[c],d=r[f],h=o[f],p=d(h,s);if(typeof p>"u")throw s&&s.type,new Error(It(14));l[f]=p,u=u||p!==h}return u=u||n.length!==Object.keys(o).length,u?l:o}}function dl(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function GH(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(It(15))};const o={getState:i.getState,dispatch:(u,...l)=>a(u,...l)},s=e.map(u=>u(o));return a=dl(...s)(i.dispatch),{...i,dispatch:a}}}function Ok(e){return Zm(e)&&"type"in e&&typeof e.type=="string"}var Pk=Symbol.for("immer-nothing"),Xv=Symbol.for("immer-draftable"),Qt=Symbol.for("immer-state");function Lr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var hr=Object,Ma=hr.getPrototypeOf,hl="constructor",Ac="prototype",np="configurable",pl="enumerable",Bu="writable",ls="value",_n=e=>!!e&&!!e[Qt];function Ur(e){return e?Nk(e)||kc(e)||!!e[Xv]||!!e[hl]?.[Xv]||Sc(e)||Cc(e):!1}var XH=hr[Ac][hl].toString(),Zv=new WeakMap;function Nk(e){if(!e||!Qm(e))return!1;const t=Ma(e);if(t===null||t===hr[Ac])return!0;const r=hr.hasOwnProperty.call(t,hl)&&t[hl];if(r===Object)return!0;if(!ga(r))return!1;let n=Zv.get(r);return n===void 0&&(n=Function.toString.call(r),Zv.set(r,n)),n===XH}function _c(e,t,r=!0){Fs(e)===0?(r?Reflect.ownKeys(e):hr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Fs(e){const t=e[Qt];return t?t.type_:kc(e)?1:Sc(e)?2:Cc(e)?3:0}var Qv=(e,t,r=Fs(e))=>r===2?e.has(t):hr[Ac].hasOwnProperty.call(e,t),ip=(e,t,r=Fs(e))=>r===2?e.get(t):e[t],ml=(e,t,r,n=Fs(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function ZH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var kc=Array.isArray,Sc=e=>e instanceof Map,Cc=e=>e instanceof Set,Qm=e=>typeof e=="object",ga=e=>typeof e=="function",jd=e=>typeof e=="boolean";function QH(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var yn=e=>e.copy_||e.base_,Jm=e=>e.modified_?e.copy_:e.base_;function ap(e,t){if(Sc(e))return new Map(e);if(Cc(e))return new Set(e);if(kc(e))return Array[Ac].slice.call(e);const r=Nk(e);if(t===!0||t==="class_only"&&!r){const n=hr.getOwnPropertyDescriptors(e);delete n[Qt];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s[Bu]===!1&&(s[Bu]=!0,s[np]=!0),(s.get||s.set)&&(n[o]={[np]:!0,[Bu]:!0,[pl]:s[pl],[ls]:e[o]})}return hr.create(Ma(e),n)}else{const n=Ma(e);if(n!==null&&r)return{...e};const i=hr.create(n);return hr.assign(i,e)}}function e0(e,t=!1){return Ic(e)||_n(e)||!Ur(e)||(Fs(e)>1&&hr.defineProperties(e,{set:yu,add:yu,clear:yu,delete:yu}),hr.freeze(e),t&&_c(e,(r,n)=>{e0(n,!0)},!1)),e}function JH(){Lr(2)}var yu={[ls]:JH};function Ic(e){return e===null||!Qm(e)?!0:hr.isFrozen(e)}var gl="MapSet",op="Patches",Jv="ArrayMethods",Dk={};function Bi(e){const t=Dk[e];return t||Lr(0,e),t}var e1=e=>!!Dk[e],cs,Rk=()=>cs,ez=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:e1(gl)?Bi(gl):void 0,arrayMethodsPlugin_:e1(Jv)?Bi(Jv):void 0});function t1(e,t){t&&(e.patchPlugin_=Bi(op),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function sp(e){up(e),e.drafts_.forEach(tz),e.drafts_=null}function up(e){e===cs&&(cs=e.parent_)}var r1=e=>cs=ez(cs,e);function tz(e){const t=e[Qt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function n1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Qt].modified_&&(sp(t),Lr(4)),Ur(e)&&(e=i1(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Qt].base_,e,t)}else e=i1(t,r);return rz(t,e,!0),sp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Pk?e:void 0}function i1(e,t){if(Ic(t))return t;const r=t[Qt];if(!r)return bl(t,e.handledSet_,e);if(!Oc(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);jk(r,e)}return r.copy_}function rz(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&e0(t,r)}function Lk(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Oc=(e,t)=>e.scope_===t,nz=[];function Mk(e,t,r,n){const i=yn(e),a=e.type_;if(n!==void 0&&ip(i,n,a)===t){ml(i,n,r,a);return}if(!e.draftLocations_){const s=e.draftLocations_=new Map;_c(i,(u,l)=>{if(_n(l)){const c=s.get(l)||[];c.push(u),s.set(l,c)}})}const o=e.draftLocations_.get(t)??nz;for(const s of o)ml(i,s,r,a)}function iz(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!Oc(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const o=Jm(a);Mk(e,a.draft_??a,o,r),jk(a,i)})}function jk(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const i=n.getPath(e);i&&n.generatePatches_(e,i,t)}Lk(e)}}function az(e,t,r){const{scope_:n}=e;if(_n(r)){const i=r[Qt];Oc(i,n)&&i.callbacks_.push(function(){Fu(e);const o=Jm(i);Mk(e,r,o,t)})}else Ur(r)&&e.callbacks_.push(function(){const a=yn(e);e.type_===3?a.has(r)&&bl(r,n.handledSet_,n):ip(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&bl(ip(e.copy_,t,e.type_),n.handledSet_,n)})}function bl(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||_n(e)||t.has(e)||!Ur(e)||Ic(e)||(t.add(e),_c(e,(n,i)=>{if(_n(i)){const a=i[Qt];if(Oc(a,r)){const o=Jm(a);ml(e,n,o,e.type_),Lk(a)}}else Ur(i)&&bl(i,t,r)})),e}function oz(e,t){const r=kc(e),n={type_:r?1:0,scope_:t?t.scope_:Rk(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,a=yl;r&&(i=[n],a=fs);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,[s,n]}var yl={get(e,t){if(t===Qt)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=yn(e);if(!Qv(i,t,e.type_))return sz(e,i,t);const a=i[t];if(e.finalized_||!Ur(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&QH(t))return a;if(a===Bd(e.base_,t)){Fu(e);const o=e.type_===1?+t:t,s=cp(e.scope_,a,e,o);return e.copy_[o]=s}return a},has(e,t){return t in yn(e)},ownKeys(e){return Reflect.ownKeys(yn(e))},set(e,t,r){const n=Bk(yn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Bd(yn(e),t),a=i?.[Qt];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(ZH(r,i)&&(r!==void 0||Qv(e.base_,t,e.type_)))return!0;Fu(e),lp(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),az(e,t,r)),!0},deleteProperty(e,t){return Fu(e),Bd(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),lp(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=yn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Bu]:!0,[np]:e.type_!==1||t!=="length",[pl]:n[pl],[ls]:r[t]}},defineProperty(){Lr(11)},getPrototypeOf(e){return Ma(e.base_)},setPrototypeOf(){Lr(12)}},fs={};for(let e in yl){let t=yl[e];fs[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}fs.deleteProperty=function(e,t){return fs.set.call(this,e,t,void 0)};fs.set=function(e,t,r){return yl.set.call(this,e[0],t,r,e[0])};function Bd(e,t){const r=e[Qt];return(r?yn(r):e)[t]}function sz(e,t,r){const n=Bk(t,r);return n?ls in n?n[ls]:n.get?.call(e.draft_):void 0}function Bk(e,t){if(!(t in e))return;let r=Ma(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ma(r)}}function lp(e){e.modified_||(e.modified_=!0,e.parent_&&lp(e.parent_))}function Fu(e){e.copy_||(e.assigned_=new Map,e.copy_=ap(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var uz=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(ga(r)&&!ga(n)){const o=n;n=r;const s=this;return function(l=o,...c){return s.produce(l,f=>n.call(this,f,...c))}}ga(n)||Lr(6),i!==void 0&&!ga(i)&&Lr(7);let a;if(Ur(r)){const o=r1(this),s=cp(o,r,void 0);let u=!0;try{a=n(s),u=!1}finally{u?sp(o):up(o)}return t1(o,i),n1(a,o)}else if(!r||!Qm(r)){if(a=n(r),a===void 0&&(a=r),a===Pk&&(a=void 0),this.autoFreeze_&&e0(a,!0),i){const o=[],s=[];Bi(op).generateReplacementPatches_(r,a,{patches_:o,inversePatches_:s}),i(o,s)}return a}else Lr(1,r)},this.produceWithPatches=(r,n)=>{if(ga(r))return(s,...u)=>this.produceWithPatches(s,l=>r(l,...u));let i,a;return[this.produce(r,n,(s,u)=>{i=s,a=u}),i,a]},jd(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),jd(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),jd(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Ur(t)||Lr(8),_n(t)&&(t=Sr(t));const r=r1(this),n=cp(r,t,void 0);return n[Qt].isManual_=!0,up(r),n}finishDraft(t,r){const n=t&&t[Qt];(!n||!n.isManual_)&&Lr(9);const{scope_:i}=n;return t1(i,r),n1(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const a=r[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(r=r.slice(n+1));const i=Bi(op).applyPatches_;return _n(t)?i(t,r):this.produce(t,a=>i(a,r))}};function cp(e,t,r,n){const[i,a]=Sc(t)?Bi(gl).proxyMap_(t,r):Cc(t)?Bi(gl).proxySet_(t,r):oz(t,r);return(r?.scope_??Rk()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?iz(r,a,n):a.callbacks_.push(function(u){u.mapSetPlugin_?.fixSetContents(a);const{patchPlugin_:l}=u;a.modified_&&l&&l.generatePatches_(a,[],u)}),i}function Sr(e){return _n(e)||Lr(10,e),Fk(e)}function Fk(e){if(!Ur(e)||Ic(e))return e;const t=e[Qt];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ap(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ap(e,!0);return _c(r,(i,a)=>{ml(r,i,Fk(a))},n),t&&(t.finalized_=!1),r}var lz=new uz,$k=lz.produce;function Uk(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var cz=Uk(),fz=Uk,dz=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?dl:dl.apply(null,arguments)};function yr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(mr(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Ok(n)&&n.type===e,r}var Hk=class Ro extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ro.prototype)}static get[Symbol.species](){return Ro}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ro(...t[0].concat(this)):new Ro(...t.concat(this))}};function a1(e){return Ur(e)?$k(e,()=>{}):e}function vu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function hz(e){return typeof e=="boolean"}var pz=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new Hk;return r&&(hz(r)?o.push(cz):o.push(fz(r.extraArgument))),o},zk="RTK_autoBatch",Xe=()=>e=>({payload:e,meta:{[zk]:!0}}),o1=e=>t=>{setTimeout(t,e)},qk=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:o1(10):e.type==="callback"?e.queueNotification:o1(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(c=>c()))};return Object.assign({},n,{subscribe(c){const f=()=>i&&c(),d=n.subscribe(f);return s.add(c),()=>{d(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[zk],a=!i,a&&(o||(o=!0,u(l))),n.dispatch(c)}finally{i=!0}}})},mz=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Hk(e);return n&&i.push(qk(typeof n=="object"?n:void 0)),i};function gz(e){const t=pz(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:o=void 0}=e||{};let s;if(typeof r=="function")s=r;else if(Zm(r))s=Ik(r);else throw new Error(mr(1));let u;typeof n=="function"?u=n(t):u=t();let l=dl;i&&(l=dz({trace:!1,...typeof i=="object"&&i}));const c=GH(...u),f=mz(c);let d=typeof o=="function"?o(f):f();const h=l(...d);return Ck(s,a,h)}function Wk(e){const t={},r=[];let n;const i={addCase(a,o){const s=typeof a=="string"?a:a.type;if(!s)throw new Error(mr(28));if(s in t)throw new Error(mr(29));return t[s]=o,i},addAsyncThunk(a,o){return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function bz(e){return typeof e=="function"}function yz(e,t){let[r,n,i]=Wk(t),a;if(bz(e))a=()=>a1(e());else{const s=a1(e);a=()=>s}function o(s=a(),u){let l=[r[u.type],...n.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(_n(c)){const h=f(c,u);return h===void 0?c:h}else{if(Ur(c))return $k(c,d=>f(d,u));{const d=f(c,u);if(d===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return c},s)}return o.getInitialState=a,o}var vz="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xz=(e=21)=>{let t="",r=e;for(;r--;)t+=vz[Math.random()*64|0];return t},Ez=Symbol.for("rtk-slice-createasyncthunk");function Tz(e,t){return`${e}/${t}`}function wz({creators:e}={}){const t=e?.asyncThunk?.[Ez];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(mr(11));const o=(typeof n.reducers=="function"?n.reducers(_z()):n.reducers)||{},s=Object.keys(o),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,_){const w=typeof x=="string"?x:x.type;if(!w)throw new Error(mr(12));if(w in u.sliceCaseReducersByType)throw new Error(mr(13));return u.sliceCaseReducersByType[w]=_,l},addMatcher(x,_){return u.sliceMatchers.push({matcher:x,reducer:_}),l},exposeAction(x,_){return u.actionCreators[x]=_,l},exposeCaseReducer(x,_){return u.sliceCaseReducersByName[x]=_,l}};s.forEach(x=>{const _=o[x],w={reducerName:x,type:Tz(i,x),createNotation:typeof n.reducers=="function"};Sz(_)?Iz(w,_,l,t):kz(w,_,l)});function c(){const[x={},_=[],w=void 0]=typeof n.extraReducers=="function"?Wk(n.extraReducers):[n.extraReducers],A={...x,...u.sliceCaseReducersByType};return yz(n.initialState,S=>{for(let O in A)S.addCase(O,A[O]);for(let O of u.sliceMatchers)S.addMatcher(O.matcher,O.reducer);for(let O of _)S.addMatcher(O.matcher,O.reducer);w&&S.addDefaultCase(w)})}const f=x=>x,d=new Map,h=new WeakMap;let p;function b(x,_){return p||(p=c()),p(x,_)}function y(){return p||(p=c()),p.getInitialState()}function v(x,_=!1){function w(S){let O=S[x];return typeof O>"u"&&_&&(O=vu(h,w,y)),O}function A(S=f){const O=vu(d,_,()=>new WeakMap);return vu(O,S,()=>{const R={};for(const[C,M]of Object.entries(n.selectors??{}))R[C]=Az(M,S,()=>vu(h,S,y),_);return R})}return{reducerPath:x,getSelectors:A,get selectors(){return A(w)},selectSlice:w}}const T={name:i,reducer:b,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:y,...v(a),injectInto(x,{reducerPath:_,...w}={}){const A=_??a;return x.inject({reducerPath:A,reducer:b},w),{...T,...v(A,!0)}}};return T}}function Az(e,t,r,n){function i(a,...o){let s=t(a);return typeof s>"u"&&n&&(s=r()),e(s,...o)}return i.unwrapped=e,i}var $t=wz();function _z(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function kz({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!Cz(n))throw new Error(mr(17));a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?yr(e,o):yr(e))}function Sz(e){return e._reducerDefinitionType==="asyncThunk"}function Cz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Iz({type:e,reducerName:t},r,n,i){if(!i)throw new Error(mr(18));const{payloadCreator:a,fulfilled:o,pending:s,rejected:u,settled:l,options:c}=r,f=i(e,a,c);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),s&&n.addCase(f.pending,s),u&&n.addCase(f.rejected,u),l&&n.addMatcher(f.settled,l),n.exposeCaseReducer(t,{fulfilled:o||xu,pending:s||xu,rejected:u||xu,settled:l||xu})}function xu(){}var Oz="task",Vk="listener",Yk="completed",t0="cancelled",Pz=`task-${t0}`,Nz=`task-${Yk}`,fp=`${Vk}-${t0}`,Dz=`${Vk}-${Yk}`,Pc=class{constructor(e){this.code=e,this.message=`${Oz} ${t0} (reason: ${e})`}name="TaskAbortError";message},r0=(e,t)=>{if(typeof e!="function")throw new TypeError(mr(32))},vl=()=>{},Kk=(e,t=vl)=>(e.catch(t),e),Gk=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Oi=e=>{if(e.aborted)throw new Pc(e.reason)};function Xk(e,t){let r=vl;return new Promise((n,i)=>{const a=()=>i(new Pc(e.reason));if(e.aborted){a();return}r=Gk(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=vl})}var Rz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Pc?"cancelled":"rejected",error:r}}finally{t?.()}},xl=e=>t=>Kk(Xk(e,t).then(r=>(Oi(e),r))),Zk=e=>{const t=xl(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:ka}=Object,s1={},Nc="listenerMiddleware",Lz=(e,t)=>{const r=n=>Gk(e,()=>n.abort(e.reason));return(n,i)=>{r0(n);const a=new AbortController;r(a);const o=Rz(async()=>{Oi(e),Oi(a.signal);const s=await n({pause:xl(a.signal),delay:Zk(a.signal),signal:a.signal});return Oi(a.signal),s},()=>a.abort(Nz));return i?.autoJoin&&t.push(o.catch(vl)),{result:xl(e)(o),cancel(){a.abort(Pz)}}}},Mz=(e,t)=>{const r=async(n,i)=>{Oi(t);let a=()=>{};const s=[new Promise((u,l)=>{let c=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),u([f,d.getState(),d.getOriginalState()])}});a=()=>{c(),l()}})];i!=null&&s.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await Xk(t,Promise.race(s));return Oi(t),u}finally{a()}};return(n,i)=>Kk(r(n,i))},Qk=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=yr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(mr(21));return r0(a),{predicate:i,type:t,effect:a}},Jk=ka(e=>{const{type:t,predicate:r,effect:n}=Qk(e);return{id:xz(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(mr(22))}}},{withTypes:()=>Jk}),u1=(e,t)=>{const{type:r,effect:n,predicate:i}=Qk(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},dp=e=>{e.pending.forEach(t=>{t.abort(fp)})},jz=(e,t)=>()=>{for(const r of t.keys())dp(r);e.clear()},l1=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},eS=ka(yr(`${Nc}/add`),{withTypes:()=>eS}),Bz=yr(`${Nc}/removeAll`),tS=ka(yr(`${Nc}/remove`),{withTypes:()=>tS}),Fz=(...e)=>{console.error(`${Nc}/error`,...e)},$s=(e={})=>{const t=new Map,r=new Map,n=h=>{const p=r.get(h)??0;r.set(h,p+1)},i=h=>{const p=r.get(h)??1;p===1?r.delete(h):r.set(h,p-1)},{extra:a,onError:o=Fz}=e;r0(o);const s=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&dp(h)}),u=h=>{const p=u1(t,h)??Jk(h);return s(p)};ka(u,{withTypes:()=>u});const l=h=>{const p=u1(t,h);return p&&(p.unsubscribe(),h.cancelActive&&dp(p)),!!p};ka(l,{withTypes:()=>l});const c=async(h,p,b,y)=>{const v=new AbortController,T=Mz(u,v.signal),x=[];try{h.pending.add(v),n(h),await Promise.resolve(h.effect(p,ka({},b,{getOriginalState:y,condition:(_,w)=>T(_,w).then(Boolean),take:T,delay:Zk(v.signal),pause:xl(v.signal),extra:a,signal:v.signal,fork:Lz(v.signal,x),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((_,w,A)=>{_!==v&&(_.abort(fp),A.delete(_))})},cancel:()=>{v.abort(fp),h.pending.delete(v)},throwIfCancelled:()=>{Oi(v.signal)}})))}catch(_){_ instanceof Pc||l1(o,_,{raisedBy:"effect"})}finally{await Promise.all(x),v.abort(Dz),i(h),h.pending.delete(v)}},f=jz(t,r);return{middleware:h=>p=>b=>{if(!Ok(b))return p(b);if(eS.match(b))return u(b.payload);if(Bz.match(b)){f();return}if(tS.match(b))return l(b.payload);let y=h.getState();const v=()=>{if(y===s1)throw new Error(mr(23));return y};let T;try{if(T=p(b),t.size>0){const x=h.getState(),_=Array.from(t.values());for(const w of _){let A=!1;try{A=w.predicate(b,x,y)}catch(S){A=!1,l1(o,S,{raisedBy:"predicate"})}A&&c(w,b,h,v)}}}finally{y=s1}return T},startListening:u,stopListening:l,clearListeners:f}};function mr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $z={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},rS=$t({name:"chartLayout",initialState:$z,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Uz,setLayout:Hz,setChartSize:zz,setScale:qz}=rS.actions,Wz=rS.reducer;function nS(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Te(e){return Number.isFinite(e)}function ja(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function c1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ta(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c1(Object(r),!0).forEach(function(n){Vz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vz(e,t,r){return(t=Yz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yz(e){var t=Kz(e,"string");return typeof t=="symbol"?t:t+""}function Kz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lt(e,t,r){return tt(e)||tt(t)?r:jt(t)?La(e,t,r):typeof t=="function"?t(e):r}var Gz=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&se(e[a]))return Ta(Ta({},e),{},{[a]:e[a]+(n||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&se(e[o]))return Ta(Ta({},e),{},{[o]:e[o]+(i||0)})}return e},Nn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",iS=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var i,a,o=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===r&&(a=!0),s.coordinate));return i||o.push(t),a||o.push(r),o},aS=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:o,realScaleType:s,isCategorical:u,categoricalDomain:l,tickCount:c,ticks:f,niceTicks:d,axisType:h}=e;if(!o)return null;var p=s==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,b=i==="category"&&o.bandwidth?o.bandwidth()/p:0;if(b=h==="angleAxis"&&a&&a.length>=2?nr(a[0]-a[1])*2*b:b,f||d){var y=(f||d||[]).map((v,T)=>{var x=n?n.indexOf(v):v,_=o.map(x);return Te(_)?{coordinate:_+b,value:v,offset:b,index:T}:null}).filter(ir);return y}return u&&l?l.map((v,T)=>{var x=o.map(v);return Te(x)?{coordinate:x+b,value:v,index:T,offset:b}:null}).filter(ir):o.ticks&&c!=null?o.ticks(c).map((v,T)=>{var x=o.map(v);return Te(x)?{coordinate:x+b,value:v,index:T,offset:b}:null}).filter(ir):o.domain().map((v,T)=>{var x=o.map(v);return Te(x)?{coordinate:x+b,value:n?n[v]:v,index:T,offset:b}:null}).filter(ir)},Xz=(e,t)=>{if(!t||t.length!==2||!se(t[0])||!se(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!se(e[0])||e[0]<r)&&(i[0]=r),(!se(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},Zz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0,s=0;s<r;++s){var u=e[s],l=u?.[i];if(l!=null){var c=l[1],f=l[0],d=on(c)?f:c;d>=0?(l[0]=a,a+=d,l[1]=a):(l[0]=o,o+=d,l[1]=o)}}}},Qz=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var a=0,o=0;o<r;++o){var s=e[o],u=s?.[i];if(u!=null){var l=on(u[1])?u[0]:u[1];l>=0?(u[0]=a,a+=l,u[1]=a):(u[0]=0,u[1]=0)}}}},Jz={sign:Zz,expand:SU,none:ji,silhouette:CU,wiggle:IU,positive:Qz},eq=(e,t,r)=>{var n,i=(n=Jz[r])!==null&&n!==void 0?n:ji,a=kU().keys(t).value((s,u)=>Number(lt(s,u,0))).order(ep).offset(i),o=a(e);return o.forEach((s,u)=>{s.forEach((l,c)=>{var f=lt(e[c],t[u],0);Array.isArray(f)&&f.length===2&&se(f[0])&&se(f[1])&&(l[0]=f[0],l[1]=f[1])})}),o};function tq(e){return e==null?void 0:String(e)}function f1(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!tt(i[t.dataKey])){var s=fk(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r!=null&&r[a]?r[a].coordinate+n/2:null}var u=lt(i,tt(o)?t.dataKey:o),l=t.scale.map(u);return se(l)?l:null}var d1=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var s=lt(a,t.dataKey,t.scale.domain()[o]);if(tt(s))return null;var u=t.scale.map(s);return se(u)?u-i/2+n:null},rq=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},nq=e=>{var t=e.flat(2).filter(se);return[Math.min(...t),Math.max(...t)]},iq=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],aq=(e,t,r)=>{if(e!=null)return iq(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var{stackedData:o}=a,s=o.reduce((u,l)=>{var c=nS(l,t,r),f=nq(c);return!Te(f[0])||!Te(f[1])?u:[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},h1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,p1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ba=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=wc(t,c=>c.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var u=i[o],l=i[o-1];a=Math.min((u?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function m1(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return Ta(Ta({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Dc(e,t){if(e)return String(e);if(typeof t=="string")return t}var oq=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},sq=(e,t)=>t==="centric"?e.angle:e.radius,Dn=e=>e.layout.width,Rn=e=>e.layout.height,uq=e=>e.layout.scale,oS=e=>e.layout.margin,Rc=B(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Lc=B(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),lq="data-recharts-item-index",cq="data-recharts-item-id",Us=60;function g1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Eu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g1(Object(r),!0).forEach(function(n){fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fq(e,t,r){return(t=dq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dq(e){var t=hq(e,"string");return typeof t=="symbol"?t:t+""}function hq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pq=e=>e.brush.height;function mq(e){var t=Lc(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Us;return r+i}return r},0)}function gq(e){var t=Lc(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:Us;return r+i}return r},0)}function bq(e){var t=Rc(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function yq(e){var t=Rc(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var At=B([Dn,Rn,oS,pq,mq,gq,bq,yq,Sk,zH],(e,t,r,n,i,a,o,s,u,l)=>{var c={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+s},d=Eu(Eu({},f),c),h=d.bottom;d.bottom+=n,d=Gz(d,u,l);var p=e-d.left-d.right,b=t-d.top-d.bottom;return Eu(Eu({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(b,0)})}),vq=B(At,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),n0=B(Dn,Rn,(e,t)=>({x:0,y:0,width:e,height:t})),xq=m.createContext(null),_t=()=>m.useContext(xq)!=null,Mc=e=>e.brush,jc=B([Mc,At,oS],(e,t,r)=>({height:e.height,x:se(e.x)?e.x:t.left,y:se(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:se(e.width)?e.width:t.width})),b1=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},Eq={initialDimension:{width:-1,height:-1}},Tq=m.createContext(Eq.initialDimension),sS=()=>m.useContext(Tq);function i0(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Hs=()=>{var e,t=_t(),r=oe(vq),n=oe(jc),i=(e=oe(Mc))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},wq={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},uS=()=>{var e;return(e=oe(At))!==null&&e!==void 0?e:wq},lS=()=>oe(Dn),cS=()=>oe(Rn),Be=e=>e.layout.layoutType,Xi=()=>oe(Be),fS=()=>{var e=Xi();if(e==="horizontal"||e==="vertical")return e},dS=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Aq=()=>{var e=Xi();return e!==void 0},zs=e=>{var t=Qe(),r=_t(),{width:n,height:i}=e,a=sS(),o=n,s=i;return a&&(o=a.width>0?a.width:n,s=a.height>0?a.height:i),m.useEffect(()=>{!r&&ja(o)&&ja(s)&&t(zz({width:o,height:s}))},[t,r,o,s]),null},hS=Symbol.for("immer-nothing"),y1=Symbol.for("immer-draftable"),vr=Symbol.for("immer-state");function Mr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ds=Object.getPrototypeOf;function Fa(e){return!!e&&!!e[vr]}function Fi(e){return e?pS(e)||Array.isArray(e)||!!e[y1]||!!e.constructor?.[y1]||qs(e)||Fc(e):!1}var _q=Object.prototype.constructor.toString(),v1=new WeakMap;function pS(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=v1.get(r);return n===void 0&&(n=Function.toString.call(r),v1.set(r,n)),n===_q}function El(e,t,r=!0){Bc(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Bc(e){const t=e[vr];return t?t.type_:Array.isArray(e)?1:qs(e)?2:Fc(e)?3:0}function hp(e,t){return Bc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mS(e,t,r){const n=Bc(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function kq(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function qs(e){return e instanceof Map}function Fc(e){return e instanceof Set}function Ei(e){return e.copy_||e.base_}function pp(e,t){if(qs(e))return new Map(e);if(Fc(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=pS(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[vr];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(ds(e),n)}else{const n=ds(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function a0(e,t=!1){return $c(e)||Fa(e)||!Fi(e)||(Bc(e)>1&&Object.defineProperties(e,{set:Tu,add:Tu,clear:Tu,delete:Tu}),Object.freeze(e),t&&Object.values(e).forEach(r=>a0(r,!0))),e}function Sq(){Mr(2)}var Tu={value:Sq};function $c(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Cq={};function $i(e){const t=Cq[e];return t||Mr(0,e),t}var hs;function gS(){return hs}function Iq(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function x1(e,t){t&&($i("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function mp(e){gp(e),e.drafts_.forEach(Oq),e.drafts_=null}function gp(e){e===hs&&(hs=e.parent_)}function E1(e){return hs=Iq(hs,e)}function Oq(e){const t=e[vr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function T1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[vr].modified_&&(mp(t),Mr(4)),Fi(e)&&(e=Tl(t,e),t.parent_||wl(t,e)),t.patches_&&$i("Patches").generateReplacementPatches_(r[vr].base_,e,t.patches_,t.inversePatches_)):e=Tl(t,r,[]),mp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==hS?e:void 0}function Tl(e,t,r){if($c(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[vr];if(!i)return El(t,(a,o)=>w1(e,i,t,a,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return wl(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let o=a,s=!1;i.type_===3&&(o=new Set(a),a.clear(),s=!0),El(o,(u,l)=>w1(e,i,a,u,l,r,s),n),wl(e,a,!1),r&&e.patches_&&$i("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function w1(e,t,r,n,i,a,o){if(i==null||typeof i!="object"&&!o)return;const s=$c(i);if(!(s&&!o)){if(Fa(i)){const u=a&&t&&t.type_!==3&&!hp(t.assigned_,n)?a.concat(n):void 0,l=Tl(e,i,u);if(mS(r,n,l),Fa(l))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(Fi(i)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&s)return;Tl(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(qs(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&wl(e,i)}}}function wl(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&a0(t,r)}function Pq(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:gS(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=o0;r&&(i=[n],a=ps);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var o0={get(e,t){if(t===vr)return e;const r=Ei(e);if(!hp(r,t))return Nq(e,r,t);const n=r[t];return e.finalized_||!Fi(n)?n:n===Fd(e.base_,t)?($d(e),e.copy_[t]=yp(n,e)):n},has(e,t){return t in Ei(e)},ownKeys(e){return Reflect.ownKeys(Ei(e))},set(e,t,r){const n=bS(Ei(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Fd(Ei(e),t),a=i?.[vr];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(kq(r,i)&&(r!==void 0||hp(e.base_,t)))return!0;$d(e),bp(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Fd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$d(e),bp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ei(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Mr(11)},getPrototypeOf(e){return ds(e.base_)},setPrototypeOf(){Mr(12)}},ps={};El(o0,(e,t)=>{ps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ps.deleteProperty=function(e,t){return ps.set.call(this,e,t,void 0)};ps.set=function(e,t,r){return o0.set.call(this,e[0],t,r,e[0])};function Fd(e,t){const r=e[vr];return(r?Ei(r):e)[t]}function Nq(e,t,r){const n=bS(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function bS(e,t){if(!(t in e))return;let r=ds(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ds(r)}}function bp(e){e.modified_||(e.modified_=!0,e.parent_&&bp(e.parent_))}function $d(e){e.copy_||(e.copy_=pp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Dq=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const o=this;return function(u=a,...l){return o.produce(u,c=>r.call(this,c,...l))}}typeof r!="function"&&Mr(6),n!==void 0&&typeof n!="function"&&Mr(7);let i;if(Fi(t)){const a=E1(this),o=yp(t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?mp(a):gp(a)}return x1(a,n),T1(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===hS&&(i=void 0),this.autoFreeze_&&a0(i,!0),n){const a=[],o=[];$i("Patches").generateReplacementPatches_(t,i,a,o),n(a,o)}return i}else Mr(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,u=>t(u,...s));let n,i;return[this.produce(t,r,(o,s)=>{n=o,i=s}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof e?.useStrictIteration=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Fi(e)||Mr(8),Fa(e)&&(e=Rq(e));const t=E1(this),r=yp(e,void 0);return r[vr].isManual_=!0,gp(t),r}finishDraft(e,t){const r=e&&e[vr];(!r||!r.isManual_)&&Mr(9);const{scope_:n}=r;return x1(n,t),T1(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=$i("Patches").applyPatches_;return Fa(e)?n(e,t):this.produce(e,i=>n(i,t))}};function yp(e,t){const r=qs(e)?$i("MapSet").proxyMap_(e,t):Fc(e)?$i("MapSet").proxySet_(e,t):Pq(e,t);return(t?t.scope_:gS()).drafts_.push(r),r}function Rq(e){return Fa(e)||Mr(10,e),yS(e)}function yS(e){if(!Fi(e)||$c(e))return e;const t=e[vr];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=pp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=pp(e,!0);return El(r,(i,a)=>{mS(r,i,yS(a))},n),t&&(t.finalized_=!1),r}var Lq=new Dq;Lq.produce;var Mq={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},vS=$t({name:"legend",initialState:Mq,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Xe()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sr(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:Xe()},removeLegendPayload:{reducer(e,t){var r=Sr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:Xe()}}}),{setLegendSize:Hoe,setLegendSettings:zoe,addLegendPayload:jq,replaceLegendPayload:Bq,removeLegendPayload:Fq}=vS.actions,$q=vS.reducer,Ud={exports:{}},Hd={};var A1;function Uq(){if(A1)return Hd;A1=1;var e=Xp();function t(u,l){return u===l&&(u!==0||1/u===1/l)||u!==u&&l!==l}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;return Hd.useSyncExternalStoreWithSelector=function(u,l,c,f,d){var h=i(null);if(h.current===null){var p={hasValue:!1,value:null};h.current=p}else p=h.current;h=o(function(){function y(w){if(!v){if(v=!0,T=w,w=f(w),d!==void 0&&p.hasValue){var A=p.value;if(d(A,w))return x=A}return x=w}if(A=x,r(T,w))return A;var S=f(w);return d!==void 0&&d(A,S)?(T=w,A):(T=w,x=S)}var v=!1,T,x,_=c===void 0?null:c;return[function(){return y(l())},_===null?void 0:function(){return y(_())}]},[l,c,f,d]);var b=n(u,h[0],h[1]);return a(function(){p.hasValue=!0,p.value=b},[b]),s(b),b},Hd}var _1;function Hq(){return _1||(_1=1,Ud.exports=Uq()),Ud.exports}Hq();function zq(e){e()}function qq(){let e=null,t=null;return{clear(){e=null,t=null},notify(){zq(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var k1={notify(){},get:()=>[]};function Wq(e,t){let r,n=k1,i=0,a=!1;function o(b){c();const y=n.subscribe(b);let v=!1;return()=>{v||(v=!0,y(),f())}}function s(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e.subscribe(u),n=qq())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=k1)}function d(){a||(a=!0,c())}function h(){a&&(a=!1,f())}const p={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return p}var Vq=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yq=Vq(),Kq=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Gq=Kq(),Xq=()=>Yq||Gq?m.useLayoutEffect:m.useEffect,Zq=Xq();function S1(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Qq(e,t){if(S1(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!S1(e[r[i]],t[r[i]]))return!1;return!0}var Jq=Symbol.for("react-redux-context"),eW=typeof globalThis<"u"?globalThis:{};function tW(){if(!m.createContext)return{};const e=eW[Jq]??=new Map;let t=e.get(m.createContext);return t||(t=m.createContext(null),e.set(m.createContext,t)),t}var rW=tW();function nW(e){const{children:t,context:r,serverState:n,store:i}=e,a=m.useMemo(()=>{const u=Wq(i);return{store:i,subscription:u,getServerState:n?()=>n:void 0}},[i,n]),o=m.useMemo(()=>i.getState(),[i]);Zq(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),o!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,o]);const s=r||rW;return m.createElement(s.Provider,{value:a},t)}var iW=nW,aW=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function oW(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ws(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(aW.has(n)){if(e[n]==null&&t[n]==null)continue;if(!Qq(e[n],t[n]))return!1}else if(!oW(e[n],t[n]))return!1;return!0}function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vp.apply(null,arguments)}function C1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?C1(Object(r),!0).forEach(function(n){sW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sW(e,t,r){return(t=uW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uW(e){var t=lW(e,"string");return typeof t=="symbol"?t:t+""}function lW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cW(e){return Array.isArray(e)&&jt(e[0])&&jt(e[1])?e.join(" ~ "):e}var ua={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function fW(e,t){return t==null?e:wc(e,t)}var dW=e=>{var{separator:t=ua.separator,contentStyle:r,itemStyle:n,labelStyle:i=ua.labelStyle,payload:a,formatter:o,itemSorter:s,wrapperClassName:u,labelClassName:l,label:c,labelFormatter:f,accessibilityLayer:d=ua.accessibilityLayer}=e,h=()=>{if(a&&a.length){var w={padding:0,margin:0},A=fW(a,s),S=A.map((O,R)=>{if(!O||O.type==="none")return null;var C=O.formatter||o||cW,{value:M,name:L}=O,Q=M,H=L;if(C){var U=C(M,L,O,R,a);if(Array.isArray(U))[Q,H]=U;else if(U!=null)Q=U;else return null}var q=vo(vo({},ua.itemStyle),{},{color:O.color||ua.itemStyle.color},n);return m.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:q},jt(H)?m.createElement("span",{className:"recharts-tooltip-item-name"},H):null,jt(H)?m.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,m.createElement("span",{className:"recharts-tooltip-item-value"},Q),m.createElement("span",{className:"recharts-tooltip-item-unit"},O.unit||""))});return m.createElement("ul",{className:"recharts-tooltip-item-list",style:w},S)}return null},p=vo(vo({},ua.contentStyle),r),b=vo({margin:0},i),y=!tt(c),v=y?c:"",T=Le("recharts-default-tooltip",u),x=Le("recharts-tooltip-label",l);y&&f&&a!==void 0&&a!==null&&(v=f(c,a));var _=d?{role:"status","aria-live":"assertive"}:{};return m.createElement("div",vp({className:T,style:p},_),m.createElement("p",{className:x,style:b},m.isValidElement(v)?v:"".concat(v)),h())},xo="recharts-tooltip-wrapper",hW={visibility:"hidden"};function pW(e){var{coordinate:t,translateX:r,translateY:n}=e;return Le(xo,{["".concat(xo,"-right")]:se(r)&&t&&se(t.x)&&r>=t.x,["".concat(xo,"-left")]:se(r)&&t&&se(t.x)&&r<t.x,["".concat(xo,"-bottom")]:se(n)&&t&&se(t.y)&&n>=t.y,["".concat(xo,"-top")]:se(n)&&t&&se(t.y)&&n<t.y})}function I1(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:u,viewBoxDimension:l}=e;if(a&&se(a[n]))return a[n];var c=r[n]-s-(i>0?i:0),f=r[n]+i;if(t[n])return o[n]?c:f;var d=u[n];if(d==null)return 0;if(o[n]){var h=c,p=d;return h<p?Math.max(f,d):Math.max(c,d)}if(l==null)return 0;var b=f+s,y=d+l;return b>y?Math.max(c,d):Math.max(f,d)}function mW(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function gW(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:a,reverseDirection:o,tooltipBox:s,useTranslate3d:u,viewBox:l}=e,c,f,d;return s.height>0&&s.width>0&&r?(f=I1({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),d=I1({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=mW({translateX:f,translateY:d,useTranslate3d:u})):c=hW,{cssProperties:c,cssClasses:pW({translateX:f,translateY:d,coordinate:r})}}var bW=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Vs={isSsr:bW()};function xS(){var[e,t]=m.useState(()=>Vs.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return m.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}}},[]),e}function O1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function la(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O1(Object(r),!0).forEach(function(n){yW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yW(e,t,r){return(t=vW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vW(e){var t=xW(e,"string");return typeof t=="symbol"?t:t+""}function xW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function EW(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function TW(e){var t,r,n,i,a,o,s=xS(),[u,l]=m.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));m.useEffect(()=>{var p=b=>{if(b.key==="Escape"){var y,v,T,x;l({dismissed:!0,dismissedAtCoordinate:{x:(y=(v=e.coordinate)===null||v===void 0?void 0:v.x)!==null&&y!==void 0?y:0,y:(T=(x=e.coordinate)===null||x===void 0?void 0:x.y)!==null&&T!==void 0?T:0}})}};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),u.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==u.dismissedAtCoordinate.x||((a=(o=e.coordinate)===null||o===void 0?void 0:o.y)!==null&&a!==void 0?a:0)!==u.dismissedAtCoordinate.y)&&l(la(la({},u),{},{dismissed:!1}));var{cssClasses:c,cssProperties:f}=gW({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),d=e.hasPortalFromProps?{}:la(la({transition:EW({prefersReducedMotion:s,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=la(la({},d),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return m.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:c,style:h,ref:e.innerRef},e.children)}var wW=m.memo(TW),ES=()=>{var e;return(e=oe(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function xp(){return xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xp.apply(null,arguments)}function P1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function N1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P1(Object(r),!0).forEach(function(n){AW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AW(e,t,r){return(t=_W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _W(e){var t=kW(e,"string");return typeof t=="symbol"?t:t+""}function kW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var D1={curveBasisClosed:mU,curveBasisOpen:gU,curveBasis:pU,curveBumpX:eU,curveBumpY:tU,curveLinearClosed:bU,curveLinear:Ec,curveMonotoneX:yU,curveMonotoneY:vU,curveNatural:xU,curveStep:EU,curveStepAfter:wU,curveStepBefore:TU},Al=e=>Te(e.x)&&Te(e.y),R1=e=>e.base!=null&&Al(e.base)&&Al(e),Eo=e=>e.x,To=e=>e.y,SW=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Bs(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=D1["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return D1[r]||Ec},L1={connectNulls:!1,type:"linear"},CW=e=>{var{type:t=L1.type,points:r=[],baseLine:n,layout:i,connectNulls:a=L1.connectNulls}=e,o=SW(t,i),s=a?r.filter(Al):r;if(Array.isArray(n)){var u,l=r.map((p,b)=>N1(N1({},p),{},{base:n[b]}));i==="vertical"?u=mu().y(To).x1(Eo).x0(p=>p.base.x):u=mu().x(Eo).y1(To).y0(p=>p.base.y);var c=u.defined(R1).curve(o),f=a?l.filter(R1):l;return c(f)}var d;i==="vertical"&&se(n)?d=mu().y(To).x1(Eo).x0(n):se(n)?d=mu().x(Eo).y1(To).y0(n):d=Q_().x(Eo).y(To);var h=d.defined(Al).curve(o);return h(s)},TS=e=>{var{className:t,points:r,path:n,pathRef:i}=e,a=Xi();if((!r||!r.length)&&!n)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=r&&r.length?CW(o):n;return m.createElement("path",xp({},Fr(e),Ym(e),{className:Le("recharts-curve",t),d:s===null?void 0:s,ref:i}))},IW=["x","y","top","left","width","height","className"];function Ep(){return Ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ep.apply(null,arguments)}function M1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?M1(Object(r),!0).forEach(function(n){PW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PW(e,t,r){return(t=NW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NW(e){var t=DW(e,"string");return typeof t=="symbol"?t:t+""}function DW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RW(e,t){if(e==null)return{};var r,n,i=LW(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function LW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var MW=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),jW=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:o=0,className:s}=e,u=RW(e,IW),l=OW({x:t,y:r,top:n,left:i,width:a,height:o},u);return!se(t)||!se(r)||!se(a)||!se(o)||!se(n)||!se(i)?null:m.createElement("path",Ep({},Nt(l),{className:Le("recharts-cross",s),d:MW(t,r,a,o,n,i)}))};function BW(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function j1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function B1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j1(Object(r),!0).forEach(function(n){FW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FW(e,t,r){return(t=$W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $W(e){var t=UW(e,"string");return typeof t=="symbol"?t:t+""}function UW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HW=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),wS=(e,t,r)=>e.map(n=>"".concat(HW(n)," ").concat(t,"ms ").concat(r)).join(","),zW=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),ms=(e,t)=>Object.keys(t).reduce((r,n)=>B1(B1({},r),{},{[n]:e(n,t[n])}),{});function F1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?F1(Object(r),!0).forEach(function(n){qW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qW(e,t,r){return(t=WW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WW(e){var t=VW(e,"string");return typeof t=="symbol"?t:t+""}function VW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _l=(e,t,r)=>e+(t-e)*r,Tp=e=>{var{from:t,to:r}=e;return t!==r},AS=(e,t,r)=>{var n=ms((i,a)=>{if(Tp(a)){var[o,s]=e(a.from,a.to,a.velocity);return gt(gt({},a),{},{from:o,velocity:s})}return a},t);return r<1?ms((i,a)=>Tp(a)&&n[i]!=null?gt(gt({},a),{},{velocity:_l(a.velocity,n[i].velocity,r),from:_l(a.from,n[i].from,r)}):a,t):AS(e,n,r-1)};function YW(e,t,r,n,i,a){var o,s=n.reduce((d,h)=>gt(gt({},d),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),u=()=>ms((d,h)=>h.from,s),l=()=>!Object.values(s).filter(Tp).length,c=null,f=d=>{o||(o=d);var h=d-o,p=h/r.dt;s=AS(r,s,p),i(gt(gt(gt({},e),t),u())),o=d,l()||(c=a.setTimeout(f))};return()=>(c=a.setTimeout(f),()=>{var d;(d=c)===null||d===void 0||d()})}function KW(e,t,r,n,i,a,o){var s=null,u=i.reduce((f,d)=>{var h=e[d],p=t[d];return h==null||p==null?f:gt(gt({},f),{},{[d]:[h,p]})},{}),l,c=f=>{l||(l=f);var d=(f-l)/n,h=ms((b,y)=>_l(...y,r(d)),u);if(a(gt(gt(gt({},e),t),h)),d<1)s=o.setTimeout(c);else{var p=ms((b,y)=>_l(...y,r(1)),u);a(gt(gt(gt({},e),t),p))}};return()=>(s=o.setTimeout(c),()=>{var f;(f=s)===null||f===void 0||f()})}const GW=(e,t,r,n,i,a)=>{var o=zW(e,t);return r==null?()=>(i(gt(gt({},e),t)),()=>{}):r.isStepper===!0?YW(e,t,r,o,i,a):KW(e,t,r,n,o,i,a)};var kl=1e-4,_S=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],kS=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),$1=(e,t)=>r=>{var n=_S(e,t);return kS(n,r)},XW=(e,t)=>r=>{var n=_S(e,t),i=[...n.map((a,o)=>a*o).slice(1),0];return kS(i,r)},ZW=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(a=>parseFloat(a));return[i[0],i[1],i[2],i[3]]},QW=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=ZW(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},JW=(e,t,r,n)=>{var i=$1(e,r),a=$1(t,n),o=XW(e,r),s=l=>l>1?1:l<0?0:l,u=l=>{for(var c=l>1?1:l,f=c,d=0;d<8;++d){var h=i(f)-c,p=o(f);if(Math.abs(h-c)<kl||p<kl)return a(f);f=s(f-h/p)}return a(f)};return u.isStepper=!1,u},U1=function(){return JW(...QW(...arguments))},eV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(o,s,u)=>{var l=-(o-s)*r,c=u*n,f=u+(l-c)*i/1e3,d=u*i/1e3+o;return Math.abs(d-s)<kl&&Math.abs(f)<kl?[s,0]:[d,f]};return a.isStepper=!0,a.dt=i,a},tV=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return U1(e);case"spring":return eV();default:if(e.split("(")[0]==="cubic-bezier")return U1(e)}return typeof e=="function"?e:null};function rV(e){var t,r=()=>null,n=!1,i=null,a=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,[u,...l]=s;if(typeof u=="number"){i=e.setTimeout(a.bind(null,l),u);return}a(u),i=e.setTimeout(a.bind(null,l));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,i&&(i(),i=null),a(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class nV{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function iV(){return rV(new nV)}var aV=m.createContext(iV);function oV(e,t){var r=m.useContext(aV);return m.useMemo(()=>t??r(e),[e,t,r])}var sV={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},H1={t:0},zd={t:1};function Uc(e){var t=Dt(e,sV),{isActive:r,canBegin:n,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:u,children:l}=t,c=xS(),f=r==="auto"?!Vs.isSsr&&!c:r,d=oV(t.animationId,t.animationManager),[h,p]=m.useState(f?H1:zd),b=m.useRef(null);return m.useEffect(()=>{f||p(zd)},[f]),m.useEffect(()=>{if(!f||!n)return Qa;var y=GW(H1,zd,tV(a),i,p,d.getTimeoutController()),v=()=>{b.current=y()};return d.start([u,o,v,i,s]),()=>{d.stop(),b.current&&b.current(),s()}},[f,n,i,a,o,u,s,d]),l(h.t)}function Hc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=m.useRef(us(t)),n=m.useRef(e);return n.current!==e&&(r.current=us(t),n.current=e),r.current}var uV=["radius"],lV=["radius"],z1,q1,W1,V1,Y1,K1,G1,X1,Z1,Q1;function J1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ex(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?J1(Object(r),!0).forEach(function(n){cV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):J1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cV(e,t,r){return(t=fV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fV(e){var t=dV(e,"string");return typeof t=="symbol"?t:t+""}function dV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sl(){return Sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sl.apply(null,arguments)}function tx(e,t){if(e==null)return{};var r,n,i=hV(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hV(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var rx=(e,t,r,n,i)=>{var a=Xn(r),o=Xn(n),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),u=o>=0?1:-1,l=a>=0?1:-1,c=o>=0&&a>=0||o<0&&a<0?1:0,f;if(s>0&&Array.isArray(i)){for(var d=[0,0,0,0],h=0,p=4;h<p;h++){var b,y=(b=i[h])!==null&&b!==void 0?b:0;d[h]=y>s?s:y}f=it(z1||(z1=Yr(["M",",",""])),e,t+u*d[0]),d[0]>0&&(f+=it(q1||(q1=Yr(["A ",",",",0,0,",",",",",""])),d[0],d[0],c,e+l*d[0],t)),f+=it(W1||(W1=Yr(["L ",",",""])),e+r-l*d[1],t),d[1]>0&&(f+=it(V1||(V1=Yr(["A ",",",",0,0,",`,
151
- `,",",""])),d[1],d[1],c,e+r,t+u*d[1])),f+=it(Y1||(Y1=Yr(["L ",",",""])),e+r,t+n-u*d[2]),d[2]>0&&(f+=it(K1||(K1=Yr(["A ",",",",0,0,",`,
152
- `,",",""])),d[2],d[2],c,e+r-l*d[2],t+n)),f+=it(G1||(G1=Yr(["L ",",",""])),e+l*d[3],t+n),d[3]>0&&(f+=it(X1||(X1=Yr(["A ",",",",0,0,",`,
153
- `,",",""])),d[3],d[3],c,e,t+n-u*d[3])),f+="Z"}else if(s>0&&i===+i&&i>0){var v=Math.min(s,i);f=it(Z1||(Z1=Yr(["M ",",",`
154
- A `,",",",0,0,",",",",",`
155
- L `,",",`
156
- A `,",",",0,0,",",",",",`
157
- L `,",",`
158
- A `,",",",0,0,",",",",",`
159
- L `,",",`
160
- A `,",",",0,0,",",",","," Z"])),e,t+u*v,v,v,c,e+l*v,t,e+r-l*v,t,v,v,c,e+r,t+u*v,e+r,t+n-u*v,v,v,c,e+r-l*v,t+n,e+l*v,t+n,v,v,c,e,t+n-u*v)}else f=it(Q1||(Q1=Yr(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return f},nx={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},s0=e=>{var t=Dt(e,nx),r=m.useRef(null),[n,i]=m.useState(-1);m.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var J=r.current.getTotalLength();J&&i(J)}catch{}},[]);var{x:a,y:o,width:s,height:u,radius:l,className:c}=t,{animationEasing:f,animationDuration:d,animationBegin:h,isAnimationActive:p,isUpdateAnimationActive:b}=t,y=m.useRef(s),v=m.useRef(u),T=m.useRef(a),x=m.useRef(o),_=m.useMemo(()=>({x:a,y:o,width:s,height:u,radius:l}),[a,o,s,u,l]),w=Hc(_,"rectangle-");if(a!==+a||o!==+o||s!==+s||u!==+u||s===0||u===0)return null;var A=Le("recharts-rectangle",c);if(!b){var S=Nt(t),{radius:O}=S,R=tx(S,uV);return m.createElement("path",Sl({},R,{x:Xn(a),y:Xn(o),width:Xn(s),height:Xn(u),radius:typeof l=="number"?l:void 0,className:A,d:rx(a,o,s,u,l)}))}var C=y.current,M=v.current,L=T.current,Q=x.current,H="0px ".concat(n===-1?1:n,"px"),U="".concat(n,"px ").concat(n,"px"),q=wS(["strokeDasharray"],d,typeof f=="string"?f:nx.animationEasing);return m.createElement(Uc,{animationId:w,key:w,canBegin:n>0,duration:d,easing:f,isActive:b,begin:h},J=>{var V=at(C,s,J),re=at(M,u,J),N=at(L,a,J),le=at(Q,o,J);r.current&&(y.current=V,v.current=re,T.current=N,x.current=le);var he;p?J>0?he={transition:q,strokeDasharray:U}:he={strokeDasharray:H}:he={strokeDasharray:U};var P=Nt(t),{radius:pe}=P,we=tx(P,lV);return m.createElement("path",Sl({},we,{radius:typeof l=="number"?l:void 0,className:A,d:rx(N,le,V,re,l),ref:r,style:ex(ex({},he),t.style)}))})};function ix(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ax(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ix(Object(r),!0).forEach(function(n){pV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ix(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pV(e,t,r){return(t=mV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mV(e){var t=gV(e,"string");return typeof t=="symbol"?t:t+""}function gV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cl=Math.PI/180,bV=e=>e*180/Math.PI,Pt=(e,t,r,n)=>({x:e+Math.cos(-Cl*n)*r,y:t+Math.sin(-Cl*n)*r}),yV=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},vV=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},xV=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,o=vV({x:r,y:n},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(r-i)/o,u=Math.acos(s);return n>a&&(u=2*Math.PI-u),{radius:o,angle:bV(u),angleInRadian:u}},EV=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},TV=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return e+o*360},wV=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:a}=xV({x:r,y:n},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s||i===0)return null;var{startAngle:u,endAngle:l}=EV(t),c=a,f;if(u<=l){for(;c>l;)c-=360;for(;c<u;)c+=360;f=c>=u&&c<=l}else{for(;c>u;)c-=360;for(;c<l;)c+=360;f=c>=l&&c<=u}return f?ax(ax({},t),{},{radius:i,angle:TV(c,t)}):null};function SS(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e,o=Pt(t,r,n,i),s=Pt(t,r,n,a);return{points:[o,s],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}var ox,sx,ux,lx,cx,fx,dx;function wp(){return wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wp.apply(null,arguments)}function _i(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var AV=(e,t)=>{var r=nr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},wu=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:o,cornerRadius:s,cornerIsExternal:u}=e,l=s*(o?1:-1)+n,c=Math.asin(s/l)/Cl,f=u?i:i+a*c,d=Pt(t,r,l,f),h=Pt(t,r,n,f),p=u?i-a*c:i,b=Pt(t,r,l*Math.cos(c*Cl),p);return{center:d,circleTangency:h,lineTangency:b,theta:c}},CS=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:o}=e,s=AV(a,o),u=a+s,l=Pt(t,r,i,a),c=Pt(t,r,i,u),f=it(ox||(ox=_i(["M ",",",`
161
- A `,",",`,0,
162
- `,",",`,
163
- `,",",`
164
- `])),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>u),c.x,c.y);if(n>0){var d=Pt(t,r,n,a),h=Pt(t,r,n,u);f+=it(sx||(sx=_i(["L ",",",`
165
- A `,",",`,0,
166
- `,",",`,
167
- `,","," Z"])),h.x,h.y,n,n,+(Math.abs(s)>180),+(a<=u),d.x,d.y)}else f+=it(ux||(ux=_i(["L ",","," Z"])),t,r);return f},_V=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:o,cornerIsExternal:s,startAngle:u,endAngle:l}=e,c=nr(l-u),{circleTangency:f,lineTangency:d,theta:h}=wu({cx:t,cy:r,radius:i,angle:u,sign:c,cornerRadius:a,cornerIsExternal:s}),{circleTangency:p,lineTangency:b,theta:y}=wu({cx:t,cy:r,radius:i,angle:l,sign:-c,cornerRadius:a,cornerIsExternal:s}),v=s?Math.abs(u-l):Math.abs(u-l)-h-y;if(v<0)return o?it(lx||(lx=_i(["M ",",",`
168
- a`,",",",0,0,1,",`,0
169
- a`,",",",0,0,1,",`,0
170
- `])),d.x,d.y,a,a,a*2,a,a,-a*2):CS({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:u,endAngle:l});var T=it(cx||(cx=_i(["M ",",",`
171
- A`,",",",0,0,",",",",",`
172
- A`,",",",0,",",",",",",",`
173
- A`,",",",0,0,",",",",",`
174
- `])),d.x,d.y,a,a,+(c<0),f.x,f.y,i,i,+(v>180),+(c<0),p.x,p.y,a,a,+(c<0),b.x,b.y);if(n>0){var{circleTangency:x,lineTangency:_,theta:w}=wu({cx:t,cy:r,radius:n,angle:u,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:A,lineTangency:S,theta:O}=wu({cx:t,cy:r,radius:n,angle:l,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),R=s?Math.abs(u-l):Math.abs(u-l)-w-O;if(R<0&&a===0)return"".concat(T,"L").concat(t,",").concat(r,"Z");T+=it(fx||(fx=_i(["L",",",`
175
- A`,",",",0,0,",",",",",`
176
- A`,",",",0,",",",",",",",`
177
- A`,",",",0,0,",",",",","Z"])),S.x,S.y,a,a,+(c<0),A.x,A.y,n,n,+(R>180),+(c>0),x.x,x.y,a,a,+(c<0),_.x,_.y)}else T+=it(dx||(dx=_i(["L",",","Z"])),t,r);return T},kV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},IS=e=>{var t=Dt(e,kV),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:u,startAngle:l,endAngle:c,className:f}=t;if(a<i||l===c)return null;var d=Le("recharts-sector",f),h=a-i,p=$r(o,h,0,!0),b;return p>0&&Math.abs(l-c)<360?b=_V({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(p,h/2),forceCornerRadius:s,cornerIsExternal:u,startAngle:l,endAngle:c}):b=CS({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:l,endAngle:c}),m.createElement("path",wp({},Nt(t),{className:d,d:b}))};function SV(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(pk(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:a,outerRadius:o,angle:s}=t,u=Pt(n,i,a,s),l=Pt(n,i,o,s);return[{x:u.x,y:u.y},{x:l.x,y:l.y}]}return SS(t)}}var qd={},Wd={},Vd={},hx;function CV(){return hx||(hx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_k();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Vd)),Vd}var px;function IV(){return px||(px=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CV();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Wd)),Wd}var mx;function OV(){return mx||(mx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kk(),r=IV();function n(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),o=o===void 0?i<a?1:-1:r.toFinite(o);const s=Math.max(Math.ceil((a-i)/(o||1)),0),u=new Array(s);for(let l=0;l<s;l++)u[l]=i,i+=o;return u}e.range=n})(qd)),qd}var Yd,gx;function PV(){return gx||(gx=1,Yd=OV().range),Yd}var NV=PV();const OS=In(NV);var Wr=e=>e.chartData,u0=B([Wr],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Ys=(e,t,r,n)=>n?u0(e):Wr(e),DV=(e,t,r)=>r?u0(e):Wr(e),RV=B([Ys],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});B([u0],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var LV=B([Wr],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function tn(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Te(t)&&Te(r))return!0}return!1}function bx(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function PS(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(Te(r))i=r;else if(typeof r=="function")return;if(Te(n))a=n;else if(typeof n=="function")return;var o=[i,a];if(tn(o))return o}}function MV(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(tn(n))return bx(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i==="auto")t!=null&&(o=Math.min(...t));else if(se(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i=="string"&&h1.test(i)){var u=h1.exec(i);if(u==null||u[1]==null||t==null)o=void 0;else{var l=+u[1];o=t[0]-l}}else o=t?.[0];if(a==="auto")t!=null&&(s=Math.max(...t));else if(se(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&p1.test(a)){var c=p1.exec(a);if(c==null||c[1]==null||t==null)s=void 0;else{var f=+c[1];s=t[1]+f}}else s=t?.[1];var d=[o,s];if(tn(d))return t==null?d:bx(d,t,r)}}}var Ja=1e9,jV={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},c0,et=!0,Ir="[DecimalError] ",Pi=Ir+"Invalid argument: ",l0=Ir+"Exponent out of range: ",eo=Math.floor,Ti=Math.pow,BV=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,dr,Tt=1e7,Ze=7,NS=9007199254740991,Il=eo(NS/Ze),ne={};ne.absoluteValue=ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ne.comparedTo=ne.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1};ne.decimalPlaces=ne.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ze;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ne.dividedBy=ne.div=function(e){return wn(this,new this.constructor(e))};ne.dividedToIntegerBy=ne.idiv=function(e){var t=this,r=t.constructor;return qe(wn(t,new r(e),0,1),r.precision)};ne.equals=ne.eq=function(e){return!this.cmp(e)};ne.exponent=function(){return dt(this)};ne.greaterThan=ne.gt=function(e){return this.cmp(e)>0};ne.greaterThanOrEqualTo=ne.gte=function(e){return this.cmp(e)>=0};ne.isInteger=ne.isint=function(){return this.e>this.d.length-2};ne.isNegative=ne.isneg=function(){return this.s<0};ne.isPositive=ne.ispos=function(){return this.s>0};ne.isZero=function(){return this.s===0};ne.lessThan=ne.lt=function(e){return this.cmp(e)<0};ne.lessThanOrEqualTo=ne.lte=function(e){return this.cmp(e)<1};ne.logarithm=ne.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(dr))throw Error(Ir+"NaN");if(r.s<1)throw Error(Ir+(r.s?"NaN":"-Infinity"));return r.eq(dr)?new n(0):(et=!1,t=wn(gs(r,a),gs(e,a),a),et=!0,qe(t,i))};ne.minus=ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?LS(t,e):DS(t,(e.s=-e.s,e))};ne.modulo=ne.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Ir+"NaN");return r.s?(et=!1,t=wn(r,e,0,1).times(e),et=!0,r.minus(t)):qe(new n(r),i)};ne.naturalExponential=ne.exp=function(){return RS(this)};ne.naturalLogarithm=ne.ln=function(){return gs(this)};ne.negated=ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ne.plus=ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?DS(t,e):LS(t,(e.s=-e.s,e))};ne.precision=ne.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Pi+e);if(t=dt(i)+1,n=i.d.length-1,r=n*Ze+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};ne.squareRoot=ne.sqrt=function(){var e,t,r,n,i,a,o,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(Ir+"NaN")}for(e=dt(s),et=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=en(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=eo((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new u(t)):n=new u(i.toString()),r=u.precision,i=o=r+3;;)if(a=n,n=a.plus(wn(s,a,o+2)).times(.5),en(a.d).slice(0,o)===(t=en(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(qe(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return et=!0,qe(n,r)};ne.times=ne.mul=function(e){var t,r,n,i,a,o,s,u,l,c=this,f=c.constructor,d=c.d,h=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,r=c.e+e.e,u=d.length,l=h.length,u<l&&(a=d,d=h,h=a,o=u,u=l,l=o),a=[],o=u+l,n=o;n--;)a.push(0);for(n=l;--n>=0;){for(t=0,i=u+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%Tt|0,t=s/Tt|0;a[i]=(a[i]+t)%Tt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,et?qe(e,f.precision):e};ne.toDecimalPlaces=ne.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(sn(e,0,Ja),t===void 0?t=n.rounding:sn(t,0,8),qe(r,e+dt(r)+1,t))};ne.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Ui(n,!0):(sn(e,0,Ja),t===void 0?t=i.rounding:sn(t,0,8),n=qe(new i(n),e+1,t),r=Ui(n,!0,e+1)),r};ne.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Ui(i):(sn(e,0,Ja),t===void 0?t=a.rounding:sn(t,0,8),n=qe(new a(i),e+dt(i)+1,t),r=Ui(n.abs(),!1,e+dt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ne.toInteger=ne.toint=function(){var e=this,t=e.constructor;return qe(new t(e),dt(e)+1,t.rounding)};ne.toNumber=function(){return+this};ne.toPower=ne.pow=function(e){var t,r,n,i,a,o,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(dr);if(s=new u(s),!s.s){if(e.s<1)throw Error(Ir+"Infinity");return s}if(s.eq(dr))return s;if(n=u.precision,e.eq(dr))return qe(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=c<0?-c:c)<=NS){for(i=new u(dr),t=Math.ceil(n/Ze+4),et=!1;r%2&&(i=i.times(s),vx(i.d,t)),r=eo(r/2),r!==0;)s=s.times(s),vx(s.d,t);return et=!0,e.s<0?new u(dr).div(i):qe(i,n)}}else if(a<0)throw Error(Ir+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,et=!1,i=e.times(gs(s,n+l)),et=!0,i=RS(i),i.s=a,i};ne.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=dt(i),n=Ui(i,r<=a.toExpNeg||r>=a.toExpPos)):(sn(e,1,Ja),t===void 0?t=a.rounding:sn(t,0,8),i=qe(new a(i),e,t),r=dt(i),n=Ui(i,e<=r||r<=a.toExpNeg,e)),n};ne.toSignificantDigits=ne.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(sn(e,1,Ja),t===void 0?t=n.rounding:sn(t,0,8)),qe(new n(r),e,t)};ne.toString=ne.valueOf=ne.val=ne.toJSON=ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=dt(e),r=e.constructor;return Ui(e,t<=r.toExpNeg||t>=r.toExpPos)};function DS(e,t){var r,n,i,a,o,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),et?qe(t,f):t;if(u=e.d,l=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(n=u,a=-a,s=l.length):(n=l,i=o,s=u.length),o=Math.ceil(f/Ze),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=u.length,a=l.length,s-a<0&&(a=s,n=l,l=u,u=n),r=0;a;)r=(u[--a]=u[a]+l[a]+r)/Tt|0,u[a]%=Tt;for(r&&(u.unshift(r),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,et?qe(t,f):t}function sn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Pi+e)}function en(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Ze-n.length,r&&(a+=Vn(r)),a+=n;o=e[t],n=o+"",r=Ze-n.length,r&&(a+=Vn(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var wn=(function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%Tt|0,o=a/Tt|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,u;if(a!=o)u=a>o?1:-1;else for(s=u=0;s<a;s++)if(n[s]!=i[s]){u=n[s]>i[s]?1:-1;break}return u}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*Tt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,u,l,c,f,d,h,p,b,y,v,T,x,_,w,A,S,O,R=n.constructor,C=n.s==i.s?1:-1,M=n.d,L=i.d;if(!n.s)return new R(n);if(!i.s)throw Error(Ir+"Division by zero");for(u=n.e-i.e,S=L.length,w=M.length,h=new R(C),p=h.d=[],l=0;L[l]==(M[l]||0);)++l;if(L[l]>(M[l]||0)&&--u,a==null?T=a=R.precision:o?T=a+(dt(n)-dt(i))+1:T=a,T<0)return new R(0);if(T=T/Ze+2|0,l=0,S==1)for(c=0,L=L[0],T++;(l<w||c)&&T--;l++)x=c*Tt+(M[l]||0),p[l]=x/L|0,c=x%L|0;else{for(c=Tt/(L[0]+1)|0,c>1&&(L=e(L,c),M=e(M,c),S=L.length,w=M.length),_=S,b=M.slice(0,S),y=b.length;y<S;)b[y++]=0;O=L.slice(),O.unshift(0),A=L[0],L[1]>=Tt/2&&++A;do c=0,s=t(L,b,S,y),s<0?(v=b[0],S!=y&&(v=v*Tt+(b[1]||0)),c=v/A|0,c>1?(c>=Tt&&(c=Tt-1),f=e(L,c),d=f.length,y=b.length,s=t(f,b,d,y),s==1&&(c--,r(f,S<d?O:L,d))):(c==0&&(s=c=1),f=L.slice()),d=f.length,d<y&&f.unshift(0),r(b,f,y),s==-1&&(y=b.length,s=t(L,b,S,y),s<1&&(c++,r(b,S<y?O:L,y))),y=b.length):s===0&&(c++,b=[0]),p[l++]=c,s&&b[0]?b[y++]=M[_]||0:(b=[M[_]],y=1);while((_++<w||b[0]!==void 0)&&T--)}return p[0]||p.shift(),h.e=u,qe(h,o?a+dt(h)+1:a)}})();function RS(e,t){var r,n,i,a,o,s,u=0,l=0,c=e.constructor,f=c.precision;if(dt(e)>16)throw Error(l0+dt(e));if(!e.s)return new c(dr);for(et=!1,s=f,o=new c(.03125);e.abs().gte(.1);)e=e.times(o),l+=5;for(n=Math.log(Ti(2,l))/Math.LN10*2+5|0,s+=n,r=i=a=new c(dr),c.precision=s;;){if(i=qe(i.times(e),s),r=r.times(++u),o=a.plus(wn(i,r,s)),en(o.d).slice(0,s)===en(a.d).slice(0,s)){for(;l--;)a=qe(a.times(a),s);return c.precision=f,t==null?(et=!0,qe(a,f)):a}a=o}}function dt(e){for(var t=e.e*Ze,r=e.d[0];r>=10;r/=10)t++;return t}function Kd(e,t,r){if(t>e.LN10.sd())throw et=!0,r&&(e.precision=r),Error(Ir+"LN10 precision limit exceeded");return qe(new e(e.LN10),t)}function Vn(e){for(var t="";e--;)t+="0";return t}function gs(e,t){var r,n,i,a,o,s,u,l,c,f=1,d=10,h=e,p=h.d,b=h.constructor,y=b.precision;if(h.s<1)throw Error(Ir+(h.s?"NaN":"-Infinity"));if(h.eq(dr))return new b(0);if(t==null?(et=!1,l=y):l=t,h.eq(10))return t==null&&(et=!0),Kd(b,l);if(l+=d,b.precision=l,r=en(p),n=r.charAt(0),a=dt(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=en(h.d),n=r.charAt(0),f++;a=dt(h),n>1?(h=new b("0."+r),a++):h=new b(n+"."+r.slice(1))}else return u=Kd(b,l+2,y).times(a+""),h=gs(new b(n+"."+r.slice(1)),l-d).plus(u),b.precision=y,t==null?(et=!0,qe(h,y)):h;for(s=o=h=wn(h.minus(dr),h.plus(dr),l),c=qe(h.times(h),l),i=3;;){if(o=qe(o.times(c),l),u=s.plus(wn(o,new b(i),l)),en(u.d).slice(0,l)===en(s.d).slice(0,l))return s=s.times(2),a!==0&&(s=s.plus(Kd(b,l+2,y).times(a+""))),s=wn(s,new b(f),l),b.precision=y,t==null?(et=!0,qe(s,y)):s;s=u,i+=2}}function yx(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=eo(r/Ze),e.d=[],n=(r+1)%Ze,r<0&&(n+=Ze),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Ze;n<i;)e.d.push(+t.slice(n,n+=Ze));t=t.slice(n),n=Ze-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),et&&(e.e>Il||e.e<-Il))throw Error(l0+r)}else e.s=0,e.e=0,e.d=[0];return e}function qe(e,t,r){var n,i,a,o,s,u,l,c,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Ze,i=t,l=f[c=0];else{if(c=Math.ceil((n+1)/Ze),a=f.length,c>=a)return e;for(l=a=f[c],o=1;a>=10;a/=10)o++;n%=Ze,i=n-Ze+o}if(r!==void 0&&(a=Ti(10,o-i-1),s=l/a%10|0,u=t<0||f[c+1]!==void 0||l%a,u=r<4?(s||u)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||u||r==6&&(n>0?i>0?l/Ti(10,o-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return u?(a=dt(e),f.length=1,t=t-a-1,f[0]=Ti(10,(Ze-t%Ze)%Ze),e.e=eo(-t/Ze)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=c,a=1,c--):(f.length=c+1,a=Ti(10,Ze-n),f[c]=i>0?(l/Ti(10,o-i)%Ti(10,i)|0)*a:0),u)for(;;)if(c==0){(f[0]+=a)==Tt&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=Tt)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(et&&(e.e>Il||e.e<-Il))throw Error(l0+dt(e));return e}function LS(e,t){var r,n,i,a,o,s,u,l,c,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),et?qe(t,h):t;if(u=e.d,f=t.d,n=t.e,l=e.e,u=u.slice(),o=l-n,o){for(c=o<0,c?(r=u,o=-o,s=f.length):(r=f,n=l,s=u.length),i=Math.max(Math.ceil(h/Ze),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=u.length,s=f.length,c=i<s,c&&(s=i),i=0;i<s;i++)if(u[i]!=f[i]){c=u[i]<f[i];break}o=0}for(c&&(r=u,u=f,f=r,t.s=-t.s),s=u.length,i=f.length-s;i>0;--i)u[s++]=0;for(i=f.length;i>o;){if(u[--i]<f[i]){for(a=i;a&&u[--a]===0;)u[a]=Tt-1;--u[a],u[i]+=Tt}u[i]-=f[i]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(t.d=u,t.e=n,et?qe(t,h):t):new d(0)}function Ui(e,t,r){var n,i=dt(e),a=en(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Vn(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Vn(-i-1)+a,r&&(n=r-o)>0&&(a+=Vn(n))):i>=o?(a+=Vn(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Vn(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Vn(n))),e.s<0?"-"+a:a}function vx(e,t){if(e.length>t)return e.length=t,!0}function MS(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Pi+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return yx(o,a.toString())}else if(typeof a!="string")throw Error(Pi+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,BV.test(a))yx(o,a);else throw Error(Pi+a)}if(i.prototype=ne,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=MS,i.config=i.set=FV,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function FV(e){if(!e||typeof e!="object")throw Error(Ir+"Object expected");var t,r,n,i=["precision",1,Ja,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(eo(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Pi+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Pi+r+": "+n);return this}var c0=MS(jV);dr=new c0(1);const Oe=c0;function jS(e){var t;return e===0?t=1:t=Math.floor(new Oe(e).abs().log(10).toNumber())+1,t}function BS(e,t,r){for(var n=new Oe(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var FS=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},f0=(e,t,r)=>{if(e.lte(0))return new Oe(0);var n=jS(e.toNumber()),i=new Oe(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Oe(Math.ceil(a.div(o).toNumber())).add(r).mul(o),u=s.mul(i);return t?new Oe(u.toNumber()):new Oe(Math.ceil(u.toNumber()))},$S=(e,t,r)=>{var n;if(e.lte(0))return new Oe(0);var i=[1,2,2.5,5],a=e.toNumber(),o=Math.floor(new Oe(a).abs().log(10).toNumber()),s=new Oe(10).pow(o),u=e.div(s).toNumber(),l=i.findIndex(h=>h>=u-1e-10);if(l===-1&&(s=s.mul(10),l=0),l+=r,l>=i.length){var c=Math.floor(l/i.length);l%=i.length,s=s.mul(new Oe(10).pow(c))}var f=(n=i[l])!==null&&n!==void 0?n:1,d=new Oe(f).mul(s);return t?d:new Oe(Math.ceil(d.toNumber()))},$V=(e,t,r)=>{var n=new Oe(1),i=new Oe(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Oe(10).pow(jS(e)-1),i=new Oe(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Oe(Math.floor(e)))}else e===0?i=new Oe(Math.floor((t-1)/2)):r||(i=new Oe(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],u=0;u<t;u++)s.push(i.add(new Oe(u-o).mul(n)).toNumber());return s},US=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:f0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Oe(0),tickMin:new Oe(0),tickMax:new Oe(0)};var s=o(new Oe(r).sub(t).div(n-1),i,a),u;t<=0&&r>=0?u=new Oe(0):(u=new Oe(t).add(r).div(2),u=u.sub(new Oe(u).mod(s)));var l=Math.ceil(u.sub(t).div(s).toNumber()),c=Math.ceil(new Oe(r).sub(u).div(s).toNumber()),f=l+c+1;return f>n?US(t,r,n,i,a+1,o):(f<n&&(c=r>0?c+(n-f):c,l=r>0?l:l+(n-f)),{step:s,tickMin:u.sub(new Oe(l).mul(s)),tickMax:u.add(new Oe(c).mul(s))})},xx=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",s=Math.max(i,2),[u,l]=FS([r,n]);if(u===-1/0||l===1/0){var c=l===1/0?[u,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),l];return r>n?c.reverse():c}if(u===l)return $V(u,i,a);var f=o==="snap125"?$S:f0,{step:d,tickMin:h,tickMax:p}=US(u,l,s,a,0,f),b=BS(h,p.add(new Oe(.1).mul(d)),d);return r>n?b.reverse():b},Ex=function(t,r){var[n,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[s,u]=FS([n,i]);if(s===-1/0||u===1/0)return[n,i];if(s===u)return[s];var l=o==="snap125"?$S:f0,c=Math.max(r,2),f=l(new Oe(u).sub(s).div(c-1),a,0),d=[...BS(new Oe(s),new Oe(u),f),u];return a===!1&&(d=d.map(h=>Math.round(h))),n>i?d.reverse():d},HS=e=>e.rootProps.maxBarSize,UV=e=>e.rootProps.barGap,zS=e=>e.rootProps.barCategoryGap,HV=e=>e.rootProps.barSize,zc=e=>e.rootProps.stackOffset,qS=e=>e.rootProps.reverseStackOrder,d0=e=>e.options.chartName,h0=e=>e.rootProps.syncId,WS=e=>e.rootProps.syncMethod,p0=e=>e.options.eventEmitter,ft={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},gi={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Kr={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},qc=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Wc(e,t,r){if(r!=="auto")return r;if(e!=null)return Nn(e,t)?"category":"number"}function Tx(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ol(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tx(Object(r),!0).forEach(function(n){zV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zV(e,t,r){return(t=qV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qV(e){var t=WV(e,"string");return typeof t=="symbol"?t:t+""}function WV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wx={allowDataOverflow:gi.allowDataOverflow,allowDecimals:gi.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:gi.angleAxisId,includeHidden:!1,name:void 0,reversed:gi.reversed,scale:gi.scale,tick:gi.tick,tickCount:void 0,ticks:void 0,type:gi.type,unit:void 0,niceTicks:"auto"},Ax={allowDataOverflow:Kr.allowDataOverflow,allowDecimals:Kr.allowDecimals,allowDuplicatedCategory:Kr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Kr.radiusAxisId,includeHidden:Kr.includeHidden,name:void 0,reversed:Kr.reversed,scale:Kr.scale,tick:Kr.tick,tickCount:Kr.tickCount,ticks:void 0,type:Kr.type,unit:void 0,niceTicks:"auto"},VV=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},m0=B([VV,dS],(e,t)=>{var r;if(e!=null)return e;var n=(r=Wc(t,"angleAxis",wx.type))!==null&&r!==void 0?r:"category";return Ol(Ol({},wx),{},{type:n})}),YV=(e,t)=>e.polarAxis.radiusAxis[t],g0=B([YV,dS],(e,t)=>{var r;if(e!=null)return e;var n=(r=Wc(t,"radiusAxis",Ax.type))!==null&&r!==void 0?r:"category";return Ol(Ol({},Ax),{},{type:n})}),Vc=e=>e.polarOptions,b0=B([Dn,Rn,At],yV),VS=B([Vc,b0],(e,t)=>{if(e!=null)return $r(e.innerRadius,t,0)}),YS=B([Vc,b0],(e,t)=>{if(e!=null)return $r(e.outerRadius,t,t*.8)}),KV=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},KS=B([Vc],KV);B([m0,KS],qc);var GS=B([b0,VS,YS],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});B([g0,GS],qc);var XS=B([Be,Vc,VS,YS,Dn,Rn],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:s,startAngle:u,endAngle:l}=t;return{cx:$r(o,i,i/2),cy:$r(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:u,endAngle:l,clockWise:!1}}}),kt=(e,t)=>t,Yc=(e,t,r)=>r;function y0(e){return e?.id}function ZS(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,o=new Map;return e.forEach(s=>{var u,l=(u=s.data)!==null&&u!==void 0?u:n;if(!(l==null||l.length===0)){var c=y0(s);l.forEach((f,d)=>{var h=a==null||i?d:String(lt(f,a,null)),p=lt(f,s.dataKey,0),b;o.has(h)?b=o.get(h):b={},Object.assign(b,{[c]:p}),o.set(h,b)})}}),Array.from(o.values())}function Kc(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Gc=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Xc(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function GV(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var St=e=>{var t=Be(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},to=e=>e.tooltip.settings.axisId;function v0(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(a){function o(){return a.apply(this,arguments)}return o.toString=function(){return a.toString()},o})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(a){var o=i[0],s=i[1];return o<=s?a>=o&&a<=s:a>=s&&a<=o},bandwidth:r?()=>r.call(e):void 0,ticks:t?a=>t.call(e,a):void 0,map:(a,o)=>{var s=e(a);if(s!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var u=e.bandwidth();switch(o.position){case"middle":s+=u/2;break;case"end":s+=u;break}}return s}}}}}var XV=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!tn(t)){for(var r,n,i=0;i<t.length;i++){var a=t[i];Te(a)&&((r===void 0||a<r)&&(r=a),(n===void 0||a>n)&&(n=a))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Qn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ZV(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function x0(e){let t,r,n;e.length!==2?(t=Qn,r=(s,u)=>Qn(e(s),u),n=(s,u)=>e(s)-u):(t=e===Qn||e===ZV?e:QV,r=e,n=e);function i(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<0?l=f+1:c=f}while(l<c)}return l}function a(s,u,l=0,c=s.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;r(s[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function o(s,u,l=0,c=s.length){const f=i(s,u,l,c-1);return f>l&&n(s[f-1],u)>-n(s[f],u)?f-1:f}return{left:i,center:o,right:a}}function QV(){return 0}function QS(e){return e===null?NaN:+e}function*JV(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const eY=x0(Qn),Ks=eY.right;x0(QS).center;class _x extends Map{constructor(t,r=nY){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(kx(this,t))}has(t){return super.has(kx(this,t))}set(t,r){return super.set(tY(this,t),r)}delete(t){return super.delete(rY(this,t))}}function kx({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function tY({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function rY({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function nY(e){return e!==null&&typeof e=="object"?e.valueOf():e}function iY(e=Qn){if(e===Qn)return JS;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function JS(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const aY=Math.sqrt(50),oY=Math.sqrt(10),sY=Math.sqrt(2);function Pl(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=aY?10:a>=oY?5:a>=sY?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),u=Math.round(t*l),s/l<e&&++s,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),u=Math.round(t/l),s*l<e&&++s,u*l>t&&--u),u<s&&.5<=r&&r<2?Pl(e,t,r*2):[s,u,l]}function Ap(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?Pl(t,e,r):Pl(e,t,r);if(!(a>=i))return[];const s=a-i+1,u=new Array(s);if(n)if(o<0)for(let l=0;l<s;++l)u[l]=(a-l)/-o;else for(let l=0;l<s;++l)u[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)u[l]=(i+l)/-o;else for(let l=0;l<s;++l)u[l]=(i+l)*o;return u}function _p(e,t,r){return t=+t,e=+e,r=+r,Pl(e,t,r)[2]}function kp(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?_p(t,e,r):_p(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Sx(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Cx(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function eC(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?JS:iY(i);n>r;){if(n-r>600){const u=n-r+1,l=t-r+1,c=Math.log(u),f=.5*Math.exp(2*c/3),d=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),h=Math.max(r,Math.floor(t-l*f/u+d)),p=Math.min(n,Math.floor(t+(u-l)*f/u+d));eC(e,t,h,p,i)}const a=e[t];let o=r,s=n;for(wo(e,r,t),i(e[n],a)>0&&wo(e,r,n);o<s;){for(wo(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?wo(e,r,s):(++s,wo(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function wo(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function uY(e,t,r){if(e=Float64Array.from(JV(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Cx(e);if(t>=1)return Sx(e);var n,i=(n-1)*t,a=Math.floor(i),o=Sx(eC(e,a).subarray(0,a+1)),s=Cx(e.subarray(a+1));return o+(s-o)*(i-a)}}function lY(e,t,r=QS){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function cY(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function Or(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ln(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Sp=Symbol("implicit");function E0(){var e=new _x,t=[],r=[],n=Sp;function i(a){let o=e.get(a);if(o===void 0){if(n!==Sp)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new _x;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return E0(t,r).unknown(n)},Or.apply(i,arguments),i}function T0(){var e=E0().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,u=0,l=0,c=.5;delete e.unknown;function f(){var d=t().length,h=i<n,p=h?i:n,b=h?n:i;a=(b-p)/Math.max(1,d-u+l*2),s&&(a=Math.floor(a)),p+=(b-p-a*(d-u))*c,o=a*(1-u),s&&(p=Math.round(p),o=Math.round(o));var y=cY(d).map(function(v){return p+a*v});return r(h?y.reverse():y)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(u=Math.min(1,l=+d),f()):u},e.paddingInner=function(d){return arguments.length?(u=Math.min(1,d),f()):u},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(c=Math.max(0,Math.min(1,d)),f()):c},e.copy=function(){return T0(t(),[n,i]).round(s).paddingInner(u).paddingOuter(l).align(c)},Or.apply(f(),arguments)}function tC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return tC(t())},e}function fY(){return tC(T0.apply(null,arguments).paddingInner(1))}function w0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function rC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Gs(){}var bs=.7,Nl=1/bs,Sa="\\s*([+-]?\\d+)\\s*",ys="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dY=/^#([0-9a-f]{3,8})$/,hY=new RegExp(`^rgb\\(${Sa},${Sa},${Sa}\\)$`),pY=new RegExp(`^rgb\\(${rn},${rn},${rn}\\)$`),mY=new RegExp(`^rgba\\(${Sa},${Sa},${Sa},${ys}\\)$`),gY=new RegExp(`^rgba\\(${rn},${rn},${rn},${ys}\\)$`),bY=new RegExp(`^hsl\\(${ys},${rn},${rn}\\)$`),yY=new RegExp(`^hsla\\(${ys},${rn},${rn},${ys}\\)$`),Ix={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};w0(Gs,vs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ox,formatHex:Ox,formatHex8:vY,formatHsl:xY,formatRgb:Px,toString:Px});function Ox(){return this.rgb().formatHex()}function vY(){return this.rgb().formatHex8()}function xY(){return nC(this).formatHsl()}function Px(){return this.rgb().formatRgb()}function vs(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=dY.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Nx(t):r===3?new ar(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Au(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Au(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=hY.exec(e))?new ar(t[1],t[2],t[3],1):(t=pY.exec(e))?new ar(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mY.exec(e))?Au(t[1],t[2],t[3],t[4]):(t=gY.exec(e))?Au(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=bY.exec(e))?Lx(t[1],t[2]/100,t[3]/100,1):(t=yY.exec(e))?Lx(t[1],t[2]/100,t[3]/100,t[4]):Ix.hasOwnProperty(e)?Nx(Ix[e]):e==="transparent"?new ar(NaN,NaN,NaN,0):null}function Nx(e){return new ar(e>>16&255,e>>8&255,e&255,1)}function Au(e,t,r,n){return n<=0&&(e=t=r=NaN),new ar(e,t,r,n)}function EY(e){return e instanceof Gs||(e=vs(e)),e?(e=e.rgb(),new ar(e.r,e.g,e.b,e.opacity)):new ar}function Cp(e,t,r,n){return arguments.length===1?EY(e):new ar(e,t,r,n??1)}function ar(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}w0(ar,Cp,rC(Gs,{brighter(e){return e=e==null?Nl:Math.pow(Nl,e),new ar(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?bs:Math.pow(bs,e),new ar(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ar(Ni(this.r),Ni(this.g),Ni(this.b),Dl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dx,formatHex:Dx,formatHex8:TY,formatRgb:Rx,toString:Rx}));function Dx(){return`#${ki(this.r)}${ki(this.g)}${ki(this.b)}`}function TY(){return`#${ki(this.r)}${ki(this.g)}${ki(this.b)}${ki((isNaN(this.opacity)?1:this.opacity)*255)}`}function Rx(){const e=Dl(this.opacity);return`${e===1?"rgb(":"rgba("}${Ni(this.r)}, ${Ni(this.g)}, ${Ni(this.b)}${e===1?")":`, ${e})`}`}function Dl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ni(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ki(e){return e=Ni(e),(e<16?"0":"")+e.toString(16)}function Lx(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new jr(e,t,r,n)}function nC(e){if(e instanceof jr)return new jr(e.h,e.s,e.l,e.opacity);if(e instanceof Gs||(e=vs(e)),!e)return new jr;if(e instanceof jr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,u=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new jr(o,s,u,e.opacity)}function wY(e,t,r,n){return arguments.length===1?nC(e):new jr(e,t,r,n??1)}function jr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}w0(jr,wY,rC(Gs,{brighter(e){return e=e==null?Nl:Math.pow(Nl,e),new jr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?bs:Math.pow(bs,e),new jr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ar(Gd(e>=240?e-240:e+120,i,n),Gd(e,i,n),Gd(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new jr(Mx(this.h),_u(this.s),_u(this.l),Dl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Dl(this.opacity);return`${e===1?"hsl(":"hsla("}${Mx(this.h)}, ${_u(this.s)*100}%, ${_u(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mx(e){return e=(e||0)%360,e<0?e+360:e}function _u(e){return Math.max(0,Math.min(1,e||0))}function Gd(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const A0=e=>()=>e;function AY(e,t){return function(r){return e+r*t}}function _Y(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function kY(e){return(e=+e)==1?iC:function(t,r){return r-t?_Y(t,r,e):A0(isNaN(t)?r:t)}}function iC(e,t){var r=t-e;return r?AY(e,r):A0(isNaN(e)?t:e)}const jx=(function e(t){var r=kY(t);function n(i,a){var o=r((i=Cp(i)).r,(a=Cp(a)).r),s=r(i.g,a.g),u=r(i.b,a.b),l=iC(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return n.gamma=e,n})(1);function SY(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function CY(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function IY(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=ro(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function OY(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Rl(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function PY(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=ro(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Ip=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xd=new RegExp(Ip.source,"g");function NY(e){return function(){return e}}function DY(e){return function(t){return e(t)+""}}function RY(e,t){var r=Ip.lastIndex=Xd.lastIndex=0,n,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(n=Ip.exec(e))&&(i=Xd.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:Rl(n,i)})),r=Xd.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?DY(u[0].x):NY(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)s[(f=u[c]).i]=f.x(l);return s.join("")})}function ro(e,t){var r=typeof t,n;return t==null||r==="boolean"?A0(t):(r==="number"?Rl:r==="string"?(n=vs(t))?(t=n,jx):RY:t instanceof vs?jx:t instanceof Date?OY:CY(t)?SY:Array.isArray(t)?IY:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?PY:Rl)(e,t)}function _0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function LY(e,t){t===void 0&&(t=e,e=ro);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function MY(e){return function(){return e}}function Ll(e){return+e}var Bx=[0,1];function Gt(e){return e}function Op(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:MY(isNaN(t)?NaN:.5)}function jY(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function BY(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=Op(i,n),a=r(o,a)):(n=Op(n,i),a=r(a,o)),function(s){return a(n(s))}}function FY(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=Op(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var u=Ks(e,s,1,n)-1;return a[u](i[u](s))}}function Xs(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Zc(){var e=Bx,t=Bx,r=ro,n,i,a,o=Gt,s,u,l;function c(){var d=Math.min(e.length,t.length);return o!==Gt&&(o=jY(e[0],e[d-1])),s=d>2?FY:BY,u=l=null,f}function f(d){return d==null||isNaN(d=+d)?a:(u||(u=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((l||(l=s(t,e.map(n),Rl)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,Ll),c()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),c()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=_0,c()},f.clamp=function(d){return arguments.length?(o=d?!0:Gt,c()):o!==Gt},f.interpolate=function(d){return arguments.length?(r=d,c()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return n=d,i=h,c()}}function k0(){return Zc()(Gt,Gt)}function $Y(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Ml(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $a(e){return e=Ml(Math.abs(e)),e?e[1]:NaN}function UY(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),a.push(r.substring(i-=s,i+s)),!((u+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function HY(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var zY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xs(e){if(!(t=zY.exec(e)))throw new Error("invalid format: "+e);var t;return new S0({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}xs.prototype=S0.prototype;function S0(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}S0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function qY(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var jl;function WY(e,t){var r=Ml(e,t);if(!r)return jl=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-(jl=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Ml(e,Math.max(0,t+a-1))[0]}function Fx(e,t){var r=Ml(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const $x={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:$Y,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Fx(e*100,t),r:Fx,s:WY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Ux(e){return e}var Hx=Array.prototype.map,zx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function VY(e){var t=e.grouping===void 0||e.thousands===void 0?Ux:UY(Hx.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Ux:HY(Hx.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f,d){f=xs(f);var h=f.fill,p=f.align,b=f.sign,y=f.symbol,v=f.zero,T=f.width,x=f.comma,_=f.precision,w=f.trim,A=f.type;A==="n"?(x=!0,A="g"):$x[A]||(_===void 0&&(_=12),w=!0,A="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var S=(d&&d.prefix!==void 0?d.prefix:"")+(y==="$"?r:y==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),O=(y==="$"?n:/[%p]/.test(A)?o:"")+(d&&d.suffix!==void 0?d.suffix:""),R=$x[A],C=/[defgprs%]/.test(A);_=_===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function M(L){var Q=S,H=O,U,q,J;if(A==="c")H=R(L)+H,L="";else{L=+L;var V=L<0||1/L<0;if(L=isNaN(L)?u:R(Math.abs(L),_),w&&(L=qY(L)),V&&+L==0&&b!=="+"&&(V=!1),Q=(V?b==="("?b:s:b==="-"||b==="("?"":b)+Q,H=(A==="s"&&!isNaN(L)&&jl!==void 0?zx[8+jl/3]:"")+H+(V&&b==="("?")":""),C){for(U=-1,q=L.length;++U<q;)if(J=L.charCodeAt(U),48>J||J>57){H=(J===46?i+L.slice(U+1):L.slice(U))+H,L=L.slice(0,U);break}}}x&&!v&&(L=t(L,1/0));var re=Q.length+L.length+H.length,N=re<T?new Array(T-re+1).join(h):"";switch(x&&v&&(L=t(N+L,N.length?T-H.length:1/0),N=""),p){case"<":L=Q+L+H+N;break;case"=":L=Q+N+L+H;break;case"^":L=N.slice(0,re=N.length>>1)+Q+L+H+N.slice(re);break;default:L=N+Q+L+H;break}return a(L)}return M.toString=function(){return f+""},M}function c(f,d){var h=Math.max(-8,Math.min(8,Math.floor($a(d)/3)))*3,p=Math.pow(10,-h),b=l((f=xs(f),f.type="f",f),{suffix:zx[8+h/3]});return function(y){return b(p*y)}}return{format:l,formatPrefix:c}}var ku,C0,aC;YY({thousands:",",grouping:[3],currency:["$",""]});function YY(e){return ku=VY(e),C0=ku.format,aC=ku.formatPrefix,ku}function KY(e){return Math.max(0,-$a(Math.abs(e)))}function GY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($a(t)/3)))*3-$a(Math.abs(e)))}function XY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$a(t)-$a(e))+1}function oC(e,t,r,n){var i=kp(e,t,r),a;switch(n=xs(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=GY(i,o))&&(n.precision=a),aC(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=XY(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=KY(i))&&(n.precision=a-(n.type==="%")*2);break}}return C0(n)}function ui(e){var t=e.domain;return e.ticks=function(r){var n=t();return Ap(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return oC(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],u,l,c=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);c-- >0;){if(l=_p(o,s,r),l===u)return n[i]=o,n[a]=s,t(n);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function sC(){var e=k0();return e.copy=function(){return Xs(e,sC())},Or.apply(e,arguments),ui(e)}function uC(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,Ll),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return uC(e).unknown(t)},e=arguments.length?Array.from(e,Ll):[0,1],ui(r)}function lC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function qx(e){return Math.log(e)}function Wx(e){return Math.exp(e)}function ZY(e){return-Math.log(-e)}function QY(e){return-Math.exp(-e)}function JY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function eK(e){return e===10?JY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function tK(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Vx(e){return(t,r)=>-e(-t,r)}function I0(e){const t=e(qx,Wx),r=t.domain;let n=10,i,a;function o(){return i=tK(n),a=eK(n),r()[0]<0?(i=Vx(i),a=Vx(a),e(ZY,QY)):e(qx,Wx),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const u=r();let l=u[0],c=u[u.length-1];const f=c<l;f&&([l,c]=[c,l]);let d=i(l),h=i(c),p,b;const y=s==null?10:+s;let v=[];if(!(n%1)&&h-d<y){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(p=1;p<n;++p)if(b=d<0?p/a(-d):p*a(d),!(b<l)){if(b>c)break;v.push(b)}}else for(;d<=h;++d)for(p=n-1;p>=1;--p)if(b=d>0?p/a(-d):p*a(d),!(b<l)){if(b>c)break;v.push(b)}v.length*2<y&&(v=Ap(l,c,y))}else v=Ap(d,h,Math.min(h-d,y)).map(a);return f?v.reverse():v},t.tickFormat=(s,u)=>{if(s==null&&(s=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=xs(u)).precision==null&&(u.trim=!0),u=C0(u)),s===1/0)return u;const l=Math.max(1,n*s/t.ticks().length);return c=>{let f=c/a(Math.round(i(c)));return f*n<n-.5&&(f*=n),f<=l?u(c):""}},t.nice=()=>r(lC(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function cC(){const e=I0(Zc()).domain([1,10]);return e.copy=()=>Xs(e,cC()).base(e.base()),Or.apply(e,arguments),e}function Yx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Kx(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function O0(e){var t=1,r=e(Yx(t),Kx(t));return r.constant=function(n){return arguments.length?e(Yx(t=+n),Kx(t)):t},ui(r)}function fC(){var e=O0(Zc());return e.copy=function(){return Xs(e,fC()).constant(e.constant())},Or.apply(e,arguments)}function Gx(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function nK(e){return e<0?-e*e:e*e}function P0(e){var t=e(Gt,Gt),r=1;function n(){return r===1?e(Gt,Gt):r===.5?e(rK,nK):e(Gx(r),Gx(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ui(t)}function N0(){var e=P0(Zc());return e.copy=function(){return Xs(e,N0()).exponent(e.exponent())},Or.apply(e,arguments),e}function iK(){return N0.apply(null,arguments).exponent(.5)}function Xx(e){return Math.sign(e)*e*e}function aK(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function dC(){var e=k0(),t=[0,1],r=!1,n;function i(a){var o=aK(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(Xx(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Ll)).map(Xx)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return dC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Or.apply(i,arguments),ui(i)}function hC(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=lY(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[Ks(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Qn),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return hC().domain(e).range(t).unknown(n)},Or.apply(a,arguments)}function pC(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Ks(n,u,0,r)]:a}function s(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*t-(u-r)*e)/(r+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,s()):[e,t]},o.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,s()):i.slice()},o.invertExtent=function(u){var l=i.indexOf(u);return l<0?[NaN,NaN]:l<1?[e,n[0]]:l>=r?[n[r-1],t]:[n[l-1],n[l]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return n.slice()},o.copy=function(){return pC().domain([e,t]).range(i).unknown(a)},Or.apply(ui(o),arguments)}function mC(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Ks(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return mC().domain(e).range(t).unknown(r)},Or.apply(i,arguments)}const Zd=new Date,Qd=new Date;function yt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const u=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return u;let l;do u.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return u},i.filter=a=>yt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Zd.setTime(+a),Qd.setTime(+o),e(Zd),e(Qd),Math.floor(r(Zd,Qd))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Bl=yt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?yt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Bl);Bl.range;const En=1e3,Cr=En*60,Tn=Cr*60,kn=Tn*24,D0=kn*7,Zx=kn*30,Jd=kn*365,Si=yt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCSeconds());Si.range;const R0=yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*En)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getMinutes());R0.range;const L0=yt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Cr)},(e,t)=>(t-e)/Cr,e=>e.getUTCMinutes());L0.range;const M0=yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*En-e.getMinutes()*Cr)},(e,t)=>{e.setTime(+e+t*Tn)},(e,t)=>(t-e)/Tn,e=>e.getHours());M0.range;const j0=yt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Tn)},(e,t)=>(t-e)/Tn,e=>e.getUTCHours());j0.range;const Zs=yt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Cr)/kn,e=>e.getDate()-1);Zs.range;const Qc=yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/kn,e=>e.getUTCDate()-1);Qc.range;const gC=yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/kn,e=>Math.floor(e/kn));gC.range;function Zi(e){return yt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Cr)/D0)}const Jc=Zi(0),Fl=Zi(1),oK=Zi(2),sK=Zi(3),Ua=Zi(4),uK=Zi(5),lK=Zi(6);Jc.range;Fl.range;oK.range;sK.range;Ua.range;uK.range;lK.range;function Qi(e){return yt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/D0)}const ef=Qi(0),$l=Qi(1),cK=Qi(2),fK=Qi(3),Ha=Qi(4),dK=Qi(5),hK=Qi(6);ef.range;$l.range;cK.range;fK.range;Ha.range;dK.range;hK.range;const B0=yt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());B0.range;const F0=yt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());F0.range;const Sn=yt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Sn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Sn.range;const Cn=yt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Cn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Cn.range;function bC(e,t,r,n,i,a){const o=[[Si,1,En],[Si,5,5*En],[Si,15,15*En],[Si,30,30*En],[a,1,Cr],[a,5,5*Cr],[a,15,15*Cr],[a,30,30*Cr],[i,1,Tn],[i,3,3*Tn],[i,6,6*Tn],[i,12,12*Tn],[n,1,kn],[n,2,2*kn],[r,1,D0],[t,1,Zx],[t,3,3*Zx],[e,1,Jd]];function s(l,c,f){const d=c<l;d&&([l,c]=[c,l]);const h=f&&typeof f.range=="function"?f:u(l,c,f),p=h?h.range(l,+c+1):[];return d?p.reverse():p}function u(l,c,f){const d=Math.abs(c-l)/f,h=x0(([,,y])=>y).right(o,d);if(h===o.length)return e.every(kp(l/Jd,c/Jd,f));if(h===0)return Bl.every(Math.max(kp(l,c,f),1));const[p,b]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return p.every(b)}return[s,u]}const[pK,mK]=bC(Cn,F0,ef,gC,j0,L0),[gK,bK]=bC(Sn,B0,Jc,Zs,M0,R0);function eh(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function th(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ao(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function yK(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,l=_o(i),c=ko(i),f=_o(a),d=ko(a),h=_o(o),p=ko(o),b=_o(s),y=ko(s),v=_o(u),T=ko(u),x={a:J,A:V,b:re,B:N,c:null,d:nE,e:nE,f:UK,g:ZK,G:JK,H:BK,I:FK,j:$K,L:yC,m:HK,M:zK,p:le,q:he,Q:oE,s:sE,S:qK,u:WK,U:VK,V:YK,w:KK,W:GK,x:null,X:null,y:XK,Y:QK,Z:eG,"%":aE},_={a:P,A:pe,b:we,B:ce,c:null,d:iE,e:iE,f:iG,g:pG,G:gG,H:tG,I:rG,j:nG,L:xC,m:aG,M:oG,p:fe,q:ge,Q:oE,s:sE,S:sG,u:uG,U:lG,V:cG,w:fG,W:dG,x:null,X:null,y:hG,Y:mG,Z:bG,"%":aE},w={a:C,A:M,b:L,B:Q,c:H,d:tE,e:tE,f:RK,g:eE,G:Jx,H:rE,I:rE,j:OK,L:DK,m:IK,M:PK,p:R,q:CK,Q:MK,s:jK,S:NK,u:wK,U:AK,V:_K,w:TK,W:kK,x:U,X:q,y:eE,Y:Jx,Z:SK,"%":LK};x.x=A(r,x),x.X=A(n,x),x.c=A(t,x),_.x=A(r,_),_.X=A(n,_),_.c=A(t,_);function A(Y,G){return function(ue){var W=[],Fe=-1,Ie=0,st=Y.length,rt,er,xe;for(ue instanceof Date||(ue=new Date(+ue));++Fe<st;)Y.charCodeAt(Fe)===37&&(W.push(Y.slice(Ie,Fe)),(er=Qx[rt=Y.charAt(++Fe)])!=null?rt=Y.charAt(++Fe):er=rt==="e"?" ":"0",(xe=G[rt])&&(rt=xe(ue,er)),W.push(rt),Ie=Fe+1);return W.push(Y.slice(Ie,Fe)),W.join("")}}function S(Y,G){return function(ue){var W=Ao(1900,void 0,1),Fe=O(W,Y,ue+="",0),Ie,st;if(Fe!=ue.length)return null;if("Q"in W)return new Date(W.Q);if("s"in W)return new Date(W.s*1e3+("L"in W?W.L:0));if(G&&!("Z"in W)&&(W.Z=0),"p"in W&&(W.H=W.H%12+W.p*12),W.m===void 0&&(W.m="q"in W?W.q:0),"V"in W){if(W.V<1||W.V>53)return null;"w"in W||(W.w=1),"Z"in W?(Ie=th(Ao(W.y,0,1)),st=Ie.getUTCDay(),Ie=st>4||st===0?$l.ceil(Ie):$l(Ie),Ie=Qc.offset(Ie,(W.V-1)*7),W.y=Ie.getUTCFullYear(),W.m=Ie.getUTCMonth(),W.d=Ie.getUTCDate()+(W.w+6)%7):(Ie=eh(Ao(W.y,0,1)),st=Ie.getDay(),Ie=st>4||st===0?Fl.ceil(Ie):Fl(Ie),Ie=Zs.offset(Ie,(W.V-1)*7),W.y=Ie.getFullYear(),W.m=Ie.getMonth(),W.d=Ie.getDate()+(W.w+6)%7)}else("W"in W||"U"in W)&&("w"in W||(W.w="u"in W?W.u%7:"W"in W?1:0),st="Z"in W?th(Ao(W.y,0,1)).getUTCDay():eh(Ao(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(st+5)%7:W.w+W.U*7-(st+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,th(W)):eh(W)}}function O(Y,G,ue,W){for(var Fe=0,Ie=G.length,st=ue.length,rt,er;Fe<Ie;){if(W>=st)return-1;if(rt=G.charCodeAt(Fe++),rt===37){if(rt=G.charAt(Fe++),er=w[rt in Qx?G.charAt(Fe++):rt],!er||(W=er(Y,ue,W))<0)return-1}else if(rt!=ue.charCodeAt(W++))return-1}return W}function R(Y,G,ue){var W=l.exec(G.slice(ue));return W?(Y.p=c.get(W[0].toLowerCase()),ue+W[0].length):-1}function C(Y,G,ue){var W=h.exec(G.slice(ue));return W?(Y.w=p.get(W[0].toLowerCase()),ue+W[0].length):-1}function M(Y,G,ue){var W=f.exec(G.slice(ue));return W?(Y.w=d.get(W[0].toLowerCase()),ue+W[0].length):-1}function L(Y,G,ue){var W=v.exec(G.slice(ue));return W?(Y.m=T.get(W[0].toLowerCase()),ue+W[0].length):-1}function Q(Y,G,ue){var W=b.exec(G.slice(ue));return W?(Y.m=y.get(W[0].toLowerCase()),ue+W[0].length):-1}function H(Y,G,ue){return O(Y,t,G,ue)}function U(Y,G,ue){return O(Y,r,G,ue)}function q(Y,G,ue){return O(Y,n,G,ue)}function J(Y){return o[Y.getDay()]}function V(Y){return a[Y.getDay()]}function re(Y){return u[Y.getMonth()]}function N(Y){return s[Y.getMonth()]}function le(Y){return i[+(Y.getHours()>=12)]}function he(Y){return 1+~~(Y.getMonth()/3)}function P(Y){return o[Y.getUTCDay()]}function pe(Y){return a[Y.getUTCDay()]}function we(Y){return u[Y.getUTCMonth()]}function ce(Y){return s[Y.getUTCMonth()]}function fe(Y){return i[+(Y.getUTCHours()>=12)]}function ge(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var G=A(Y+="",x);return G.toString=function(){return Y},G},parse:function(Y){var G=S(Y+="",!1);return G.toString=function(){return Y},G},utcFormat:function(Y){var G=A(Y+="",_);return G.toString=function(){return Y},G},utcParse:function(Y){var G=S(Y+="",!0);return G.toString=function(){return Y},G}}}var Qx={"-":"",_:" ",0:"0"},Ct=/^\s*\d+/,vK=/^%/,xK=/[\\^$*+?|[\]().{}]/g;function Re(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function EK(e){return e.replace(xK,"\\$&")}function _o(e){return new RegExp("^(?:"+e.map(EK).join("|")+")","i")}function ko(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function TK(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function wK(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function AK(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function _K(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function kK(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Jx(e,t,r){var n=Ct.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function eE(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function SK(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function CK(e,t,r){var n=Ct.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function IK(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function tE(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function OK(e,t,r){var n=Ct.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function rE(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function PK(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function NK(e,t,r){var n=Ct.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function DK(e,t,r){var n=Ct.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function RK(e,t,r){var n=Ct.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function LK(e,t,r){var n=vK.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function MK(e,t,r){var n=Ct.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function jK(e,t,r){var n=Ct.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function nE(e,t){return Re(e.getDate(),t,2)}function BK(e,t){return Re(e.getHours(),t,2)}function FK(e,t){return Re(e.getHours()%12||12,t,2)}function $K(e,t){return Re(1+Zs.count(Sn(e),e),t,3)}function yC(e,t){return Re(e.getMilliseconds(),t,3)}function UK(e,t){return yC(e,t)+"000"}function HK(e,t){return Re(e.getMonth()+1,t,2)}function zK(e,t){return Re(e.getMinutes(),t,2)}function qK(e,t){return Re(e.getSeconds(),t,2)}function WK(e){var t=e.getDay();return t===0?7:t}function VK(e,t){return Re(Jc.count(Sn(e)-1,e),t,2)}function vC(e){var t=e.getDay();return t>=4||t===0?Ua(e):Ua.ceil(e)}function YK(e,t){return e=vC(e),Re(Ua.count(Sn(e),e)+(Sn(e).getDay()===4),t,2)}function KK(e){return e.getDay()}function GK(e,t){return Re(Fl.count(Sn(e)-1,e),t,2)}function XK(e,t){return Re(e.getFullYear()%100,t,2)}function ZK(e,t){return e=vC(e),Re(e.getFullYear()%100,t,2)}function QK(e,t){return Re(e.getFullYear()%1e4,t,4)}function JK(e,t){var r=e.getDay();return e=r>=4||r===0?Ua(e):Ua.ceil(e),Re(e.getFullYear()%1e4,t,4)}function eG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Re(t/60|0,"0",2)+Re(t%60,"0",2)}function iE(e,t){return Re(e.getUTCDate(),t,2)}function tG(e,t){return Re(e.getUTCHours(),t,2)}function rG(e,t){return Re(e.getUTCHours()%12||12,t,2)}function nG(e,t){return Re(1+Qc.count(Cn(e),e),t,3)}function xC(e,t){return Re(e.getUTCMilliseconds(),t,3)}function iG(e,t){return xC(e,t)+"000"}function aG(e,t){return Re(e.getUTCMonth()+1,t,2)}function oG(e,t){return Re(e.getUTCMinutes(),t,2)}function sG(e,t){return Re(e.getUTCSeconds(),t,2)}function uG(e){var t=e.getUTCDay();return t===0?7:t}function lG(e,t){return Re(ef.count(Cn(e)-1,e),t,2)}function EC(e){var t=e.getUTCDay();return t>=4||t===0?Ha(e):Ha.ceil(e)}function cG(e,t){return e=EC(e),Re(Ha.count(Cn(e),e)+(Cn(e).getUTCDay()===4),t,2)}function fG(e){return e.getUTCDay()}function dG(e,t){return Re($l.count(Cn(e)-1,e),t,2)}function hG(e,t){return Re(e.getUTCFullYear()%100,t,2)}function pG(e,t){return e=EC(e),Re(e.getUTCFullYear()%100,t,2)}function mG(e,t){return Re(e.getUTCFullYear()%1e4,t,4)}function gG(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ha(e):Ha.ceil(e),Re(e.getUTCFullYear()%1e4,t,4)}function bG(){return"+0000"}function aE(){return"%"}function oE(e){return+e}function sE(e){return Math.floor(+e/1e3)}var ca,TC,wC;yG({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function yG(e){return ca=yK(e),TC=ca.format,ca.parse,wC=ca.utcFormat,ca.utcParse,ca}function vG(e){return new Date(e)}function xG(e){return e instanceof Date?+e:+new Date(+e)}function $0(e,t,r,n,i,a,o,s,u,l){var c=k0(),f=c.invert,d=c.domain,h=l(".%L"),p=l(":%S"),b=l("%I:%M"),y=l("%I %p"),v=l("%a %d"),T=l("%b %d"),x=l("%B"),_=l("%Y");function w(A){return(u(A)<A?h:s(A)<A?p:o(A)<A?b:a(A)<A?y:n(A)<A?i(A)<A?v:T:r(A)<A?x:_)(A)}return c.invert=function(A){return new Date(f(A))},c.domain=function(A){return arguments.length?d(Array.from(A,xG)):d().map(vG)},c.ticks=function(A){var S=d();return e(S[0],S[S.length-1],A??10)},c.tickFormat=function(A,S){return S==null?w:l(S)},c.nice=function(A){var S=d();return(!A||typeof A.range!="function")&&(A=t(S[0],S[S.length-1],A??10)),A?d(lC(S,A)):c},c.copy=function(){return Xs(c,$0(e,t,r,n,i,a,o,s,u,l))},c}function EG(){return Or.apply($0(gK,bK,Sn,B0,Jc,Zs,M0,R0,Si,TC).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function TG(){return Or.apply($0(pK,mK,Cn,F0,ef,Qc,j0,L0,Si,wC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function tf(){var e=0,t=1,r,n,i,a,o=Gt,s=!1,u;function l(f){return f==null||isNaN(f=+f)?u:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),l):[e,t]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(o=f,l):o};function c(f){return function(d){var h,p;return arguments.length?([h,p]=d,o=f(h,p),l):[o(0),o(1)]}}return l.range=c(ro),l.rangeRound=c(_0),l.unknown=function(f){return arguments.length?(u=f,l):u},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),l}}function li(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function AC(){var e=ui(tf()(Gt));return e.copy=function(){return li(e,AC())},Ln.apply(e,arguments)}function _C(){var e=I0(tf()).domain([1,10]);return e.copy=function(){return li(e,_C()).base(e.base())},Ln.apply(e,arguments)}function kC(){var e=O0(tf());return e.copy=function(){return li(e,kC()).constant(e.constant())},Ln.apply(e,arguments)}function U0(){var e=P0(tf());return e.copy=function(){return li(e,U0()).exponent(e.exponent())},Ln.apply(e,arguments)}function wG(){return U0.apply(null,arguments).exponent(.5)}function SC(){var e=[],t=Gt;function r(n){if(n!=null&&!isNaN(n=+n))return t((Ks(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Qn),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>uY(e,a/n))},r.copy=function(){return SC(t).domain(e)},Ln.apply(r,arguments)}function rf(){var e=0,t=.5,r=1,n=1,i,a,o,s,u,l=Gt,c,f=!1,d;function h(b){return isNaN(b=+b)?d:(b=.5+((b=+c(b))-a)*(n*b<n*a?s:u),l(f?Math.max(0,Math.min(1,b)):b))}h.domain=function(b){return arguments.length?([e,t,r]=b,i=c(e=+e),a=c(t=+t),o=c(r=+r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(b){return arguments.length?(f=!!b,h):f},h.interpolator=function(b){return arguments.length?(l=b,h):l};function p(b){return function(y){var v,T,x;return arguments.length?([v,T,x]=y,l=LY(b,[v,T,x]),h):[l(0),l(.5),l(1)]}}return h.range=p(ro),h.rangeRound=p(_0),h.unknown=function(b){return arguments.length?(d=b,h):d},function(b){return c=b,i=b(e),a=b(t),o=b(r),s=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function CC(){var e=ui(rf()(Gt));return e.copy=function(){return li(e,CC())},Ln.apply(e,arguments)}function IC(){var e=I0(rf()).domain([.1,1,10]);return e.copy=function(){return li(e,IC()).base(e.base())},Ln.apply(e,arguments)}function OC(){var e=O0(rf());return e.copy=function(){return li(e,OC()).constant(e.constant())},Ln.apply(e,arguments)}function H0(){var e=P0(rf());return e.copy=function(){return li(e,H0()).exponent(e.exponent())},Ln.apply(e,arguments)}function AG(){return H0.apply(null,arguments).exponent(.5)}const PC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:T0,scaleDiverging:CC,scaleDivergingLog:IC,scaleDivergingPow:H0,scaleDivergingSqrt:AG,scaleDivergingSymlog:OC,scaleIdentity:uC,scaleImplicit:Sp,scaleLinear:sC,scaleLog:cC,scaleOrdinal:E0,scalePoint:fY,scalePow:N0,scaleQuantile:hC,scaleQuantize:pC,scaleRadial:dC,scaleSequential:AC,scaleSequentialLog:_C,scaleSequentialPow:U0,scaleSequentialQuantile:SC,scaleSequentialSqrt:wG,scaleSequentialSymlog:kC,scaleSqrt:iK,scaleSymlog:fC,scaleThreshold:mC,scaleTime:EG,scaleUtc:TG,tickFormat:oC},Symbol.toStringTag,{value:"Module"}));function _G(e){var t=PC;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Bs(e));if(r in t&&typeof t[r]=="function")return t[r]()}function uE(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=_G(e);if(n!=null)return n.domain(t).range(r),n}}function z0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?uE(e.scale,r,n):uE(t,r,n)}function kG(e){return"scale".concat(Bs(e))}function SG(e){return kG(e)in PC}var NC=(e,t,r)=>{if(e!=null){var{scale:n,type:i}=e;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return SG(n)?n:"point"}};function CG(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var a=Math.floor((r+n)/2);(i?e[a]<t:e[a]>t)?r=a+1:n=a}return r}function DC(e,t){if(e){var r=t??e.domain(),n=r.map(a=>{var o;return(o=e(a))!==null&&o!==void 0?o:0}),i=e.range();if(!(r.length===0||i.length<2))return a=>{var o,s,u=CG(n,a);if(u<=0)return r[0];if(u>=r.length)return r[r.length-1];var l=(o=n[u-1])!==null&&o!==void 0?o:0,c=(s=n[u])!==null&&s!==void 0?s:0;return Math.abs(a-l)<=Math.abs(a-c)?r[u-1]:r[u]}}}function IG(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):DC(e,void 0)}function lE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lE(Object(r),!0).forEach(function(n){OG(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OG(e,t,r){return(t=PG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PG(e){var t=NG(e,"string");return typeof t=="symbol"?t:t+""}function NG(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pp=[0,"auto"],pt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},RC=(e,t)=>e.cartesianAxis.xAxis[t],fn=(e,t)=>{var r=RC(e,t);return r??pt},mt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Pp,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Us},LC=(e,t)=>e.cartesianAxis.yAxis[t],dn=(e,t)=>{var r=LC(e,t);return r??mt},DG={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},q0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??DG},Jt=(e,t,r)=>{switch(t){case"xAxis":return fn(e,r);case"yAxis":return dn(e,r);case"zAxis":return q0(e,r);case"angleAxis":return m0(e,r);case"radiusAxis":return g0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},RG=(e,t,r)=>{switch(t){case"xAxis":return fn(e,r);case"yAxis":return dn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Qs=(e,t,r)=>{switch(t){case"xAxis":return fn(e,r);case"yAxis":return dn(e,r);case"angleAxis":return m0(e,r);case"radiusAxis":return g0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},MC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function jC(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var nf=e=>e.graphicalItems.cartesianItems,LG=B([kt,Yc],jC),BC=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),no=B([nf,Jt,LG],BC,{memoizeOptions:{resultEqualityCheck:Xc}}),FC=B([no],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Kc)),$C=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),MG=B([no],$C),UC=e=>e.map(t=>t.data).filter(Boolean).flat(1),jG=B([no],e=>e.some(t=>!t.data)),HC=B([no],UC,{memoizeOptions:{resultEqualityCheck:Xc}}),zC=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},W0=B([HC,Ys],zC),BG=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:lt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:lt(i,n)}))):e.map(n=>({value:n})),qC=(e,t,r,n,i,a)=>{var{chartData:o=[],dataStartIndex:s,dataEndIndex:u}=n,l=BG(e,t,r);if(i&&t?.dataKey!=null&&a.length>0){var c=o.slice(s,u+1),f=c.map(d=>({value:lt(d,t.dataKey)})).filter(d=>d.value!=null);return[...f,...l]}return l},Js=B([W0,Jt,no,Ys,jG,HC],qC);function Ca(e){if(jt(e)||e instanceof Date){var t=Number(e);if(Te(t))return t}}function cE(e){if(Array.isArray(e)){var t=[Ca(e[0]),Ca(e[1])];return tn(t)?t:void 0}var r=Ca(e);if(r!=null)return[r,r]}function un(e){return e.map(Ca).filter(ir)}function FG(e,t){var r=Ca(e),n=Ca(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var $G=B([Js],e=>e?.map(t=>t.value).sort(FG));function WC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function UG(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!on(t))n=t;else if(Array.isArray(t)){var i=un(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:un(r.flatMap(a=>{var o=lt(e,a.dataKey),s,u;if(Array.isArray(o)?[s,u]=o:s=u=o,!(!Te(s)||!Te(u)))return[n-s,n+u]}))}var vt=e=>{var t=St(e),r=to(e);return Qs(e,t,r)},za=B([vt],e=>e?.dataKey),HG=B([FC,Ys,vt],ZS),VC=(e,t,r,n)=>{var i={},a=t.reduce((o,s)=>{if(s.stackId==null)return o;var u=o[s.stackId];return u==null&&(u=[]),u.push(s),o[s.stackId]=u,o},i);return Object.fromEntries(Object.entries(a).map(o=>{var[s,u]=o,l=n?[...u].reverse():u,c=l.map(y0);return[s,{stackedData:eq(e,c,r),graphicalItems:l}]}))},Np=B([HG,FC,zc,qS],VC),YC=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var o=aq(e,i,a);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},zG=B([Jt],e=>e.allowDataOverflow),V0=e=>{var t;if(e==null||!("domain"in e))return Pp;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=un(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Pp},KC=B([Jt],V0),GC=B([KC,zG],PS),qG=B([Np,Wr,kt,GC],YC,{memoizeOptions:{resultEqualityCheck:Gc}}),Y0=e=>e.errorBars,WG=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>WC(r,n)),Hl=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),s=Math.max(...a);return[o,s]}},XC=function(t,r,n,i,a){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],s,u;if(n.length>0&&n.forEach(l=>{var c,f=l.data!=null?[...l.data]:o,d=(c=i[l.id])===null||c===void 0?void 0:c.filter(h=>WC(a,h));f.forEach(h=>{var p,b=lt(h,(p=r.dataKey)!==null&&p!==void 0?p:l.dataKey),y=UG(h,b,d);if(y.length>=2){var v=Math.min(...y),T=Math.max(...y);(s==null||v<s)&&(s=v),(u==null||T>u)&&(u=T)}var x=cE(b);x!=null&&(s=s==null?x[0]:Math.min(s,x[0]),u=u==null?x[1]:Math.max(u,x[1]))})}),r?.dataKey!=null&&n.length===0&&t.forEach(l=>{var c=cE(lt(l,r.dataKey));c!=null&&(s=s==null?c[0]:Math.min(s,c[0]),u=u==null?c[1]:Math.max(u,c[1]))}),Te(s)&&Te(u))return[s,u]},VG=B([W0,Jt,MG,Y0,kt,RV],XC,{memoizeOptions:{resultEqualityCheck:Gc}});function YG(e){var{value:t}=e;if(jt(t)||t instanceof Date)return t}var KG=(e,t,r)=>{var n=e.map(YG).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&ck(n))?OS(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},ZC=e=>e.referenceElements.dots,io=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),GG=B([ZC,kt,Yc],io),QC=e=>e.referenceElements.areas,XG=B([QC,kt,Yc],io),JC=e=>e.referenceElements.lines,ZG=B([JC,kt,Yc],io),eI=(e,t)=>{if(e!=null){var r=un(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},QG=B(GG,kt,eI),tI=(e,t)=>{if(e!=null){var r=un(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},JG=B([XG,kt],tI);function eX(e){var t;if(e.x!=null)return un([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:un(r)}function tX(e){var t;if(e.y!=null)return un([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:un(r)}var rI=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?eX(n):tX(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},rX=B([ZG,kt],rI),nX=B(QG,rX,JG,(e,t,r)=>Hl(e,r,t)),nI=(e,t,r,n,i,a,o,s)=>{if(r!=null)return r;var u=o==="vertical"&&s==="xAxis"||o==="horizontal"&&s==="yAxis",l=u?Hl(n,a,i):Hl(a,i);return MV(t,l,e.allowDataOverflow)},iX=B([Jt,KC,GC,qG,VG,nX,Be,kt],nI,{memoizeOptions:{resultEqualityCheck:Gc}}),aX=[0,1],iI=(e,t,r,n,i,a,o)=>{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:s,type:u}=e,l=Nn(t,a);if(l&&s==null){var c;return OS(0,(c=r?.length)!==null&&c!==void 0?c:0)}return u==="category"?KG(n,e,l):i==="expand"&&!l?aX:o}},K0=B([Jt,Be,W0,Js,zc,kt,iX],iI),ao=B([Jt,MC,d0],NC),aI=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=V0(t),a=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&tn(e)){if(a)return xx(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return Ex(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(a&&tn(e))return xx(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&tn(e))return Ex(e,t.tickCount,t.allowDecimals,"adaptive")}}},G0=B([K0,Qs,ao],aI),oI=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&tn(t)&&Array.isArray(r)&&r.length>0){var i,a,o=t[0],s=(i=r[0])!==null&&i!==void 0?i:0,u=t[1],l=(a=r[r.length-1])!==null&&a!==void 0?a:0;return[Math.min(o,s),Math.max(u,l)]}return t},oX=B([Jt,K0,G0,kt],oI),sX=B(Js,Jt,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(un(e.map(f=>f.value))).sort((f,d)=>f-d),i=n[0],a=n[n.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<n.length-1;s++){var u=n[s],l=n[s+1];if(!(u==null||l==null)){var c=l-u;r=Math.min(r,c)}}return r/o}}),sI=B(sX,Be,zS,At,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Te(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=$r(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),uX=(e,t,r)=>{var n=fn(e,t);return n==null||typeof n.padding!="string"?0:sI(e,"xAxis",t,r,n.padding)},lX=(e,t,r)=>{var n=dn(e,t);return n==null||typeof n.padding!="string"?0:sI(e,"yAxis",t,r,n.padding)},cX=B(fn,uX,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),fX=B(dn,lX,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),dX=B([At,cX,jc,Mc,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),hX=B([At,Be,fX,jc,Mc,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:o}=i;return a?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),eu=(e,t,r,n)=>{var i;switch(t){case"xAxis":return dX(e,r,n);case"yAxis":return hX(e,r,n);case"zAxis":return(i=q0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return KS(e);case"radiusAxis":return GS(e,r);default:return}},uI=B([Jt,eu],qc),pX=B([ao,oX],XV),X0=B([Jt,ao,pX,uI],z0),lI=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,o=Nn(e,n);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},Z0=B([Be,Js,Qs,kt],lI),ri=B([X0],v0);B([X0],IG);B([X0,$G],DC);B([no,Y0,kt],WG);function cI(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var af=(e,t)=>t,of=(e,t,r)=>r,mX=B(Rc,af,of,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(cI)),gX=B(Lc,af,of,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(cI)),fI=(e,t)=>({width:e.width,height:t.height}),bX=(e,t)=>{var r=typeof t.width=="number"?t.width:Us;return{width:r,height:e.height}},dI=B(At,fn,fI),yX=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},vX=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},xX=B(Rn,At,mX,af,of,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var u=fI(t,s);o==null&&(o=yX(t,n,e));var l=n==="top"&&!i||n==="bottom"&&i;a[s.id]=o-Number(l)*u.height,o+=(l?-1:1)*u.height}),a}),EX=B(Dn,At,gX,af,of,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var u=bX(t,s);o==null&&(o=vX(t,n,e));var l=n==="left"&&!i||n==="right"&&i;a[s.id]=o-Number(l)*u.width,o+=(l?-1:1)*u.width}),a}),TX=(e,t)=>{var r=fn(e,t);if(r!=null)return xX(e,r.orientation,r.mirror)},wX=B([At,fn,TX,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),AX=(e,t)=>{var r=dn(e,t);if(r!=null)return EX(e,r.orientation,r.mirror)},_X=B([At,dn,AX,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),hI=B(At,dn,(e,t)=>{var r=typeof t.width=="number"?t.width:Us;return{width:r,height:e.height}}),fE=(e,t,r)=>{switch(t){case"xAxis":return dI(e,r).width;case"yAxis":return hI(e,r).height;default:return}},pI=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=Nn(e,n),u=t.map(c=>c.value),l=u.filter(c=>c!=null);if(o&&s&&a==="category"&&i&&ck(l))return u}},Q0=B([Be,Js,Jt,kt],pI),dE=B([Be,RG,ao,ri,Q0,Z0,eu,G0,kt],(e,t,r,n,i,a,o,s,u)=>{if(t!=null){var l=Nn(e,u);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:u,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:r,scale:n}}}),kX=(e,t,r,n,i,a,o,s,u)=>{if(!(t==null||n==null)){var l=Nn(e,u),{type:c,ticks:f,tickCount:d}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,p=c==="category"&&n.bandwidth?n.bandwidth()/h:0;p=u==="angleAxis"&&a!=null&&a.length>=2?nr(a[0]-a[1])*2*p:p;var b=f||i;return b?b.map((y,v)=>{var T=o?o.indexOf(y):y,x=n.map(T);return Te(x)?{index:v,coordinate:x+p,value:y,offset:p}:null}).filter(ir):l&&s?s.map((y,v)=>{var T=n.map(y);return Te(T)?{coordinate:T+p,value:y,index:v,offset:p}:null}).filter(ir):n.ticks?n.ticks(d).map((y,v)=>{var T=n.map(y);return Te(T)?{coordinate:T+p,value:y,index:v,offset:p}:null}).filter(ir):n.domain().map((y,v)=>{var T=n.map(y);return Te(T)?{coordinate:T+p,value:o?o[y]:y,index:v,offset:p}:null}).filter(ir)}},mI=B([Be,Qs,ao,ri,G0,eu,Q0,Z0,kt],kX),SX=(e,t,r,n,i,a,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=Nn(e,o),{tickCount:u}=t,l=0;return l=o==="angleAxis"&&n?.length>=2?nr(n[0]-n[1])*2*l:l,s&&a?a.map((c,f)=>{var d=r.map(c);return Te(d)?{coordinate:d+l,value:c,index:f,offset:l}:null}).filter(ir):r.ticks?r.ticks(u).map((c,f)=>{var d=r.map(c);return Te(d)?{coordinate:d+l,value:c,index:f,offset:l}:null}).filter(ir):r.domain().map((c,f)=>{var d=r.map(c);return Te(d)?{coordinate:d+l,value:i?i[c]:c,index:f,offset:l}:null}).filter(ir)}},ni=B([Be,Qs,ri,eu,Q0,Z0,kt],SX),ii=B(Jt,ri,(e,t)=>{if(!(e==null||t==null))return Ul(Ul({},e),{},{scale:t})}),CX=B([Jt,ao,K0,uI],z0),IX=B([CX],v0);B((e,t,r)=>q0(e,r),IX,(e,t)=>{if(!(e==null||t==null))return Ul(Ul({},e),{},{scale:t})});var OX=B([Be,Rc,Lc],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),PX=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};B([PX],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var a of e){var o=Math.abs(a.coordinate-t);o<n&&(n=o,i=a)}return(r=i)===null||r===void 0?void 0:r.value}});var gI=e=>e.options.defaultTooltipEventType,bI=e=>e.options.validateTooltipEventTypes;function yI(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function tu(e,t){var r=gI(e),n=bI(e);return yI(t,r,n)}function NX(e){return oe(t=>tu(t,e))}var vI=(e,t)=>{var r,n=Number(t);if(!(on(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},DX=e=>e.tooltip.settings,Kn={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},RX={itemInteraction:{click:Kn,hover:Kn},axisInteraction:{click:Kn,hover:Kn},keyboardInteraction:Kn,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},xI=$t({name:"tooltip",initialState:RX,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Xe()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sr(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:Xe()},removeTooltipEntrySettings:{reducer(e,t){var r=Sr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:Xe()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:LX,replaceTooltipEntrySettings:MX,removeTooltipEntrySettings:jX,setTooltipSettingsState:BX,setActiveMouseOverItemIndex:EI,mouseLeaveItem:FX,mouseLeaveChart:TI,setActiveClickItemIndex:$X,setMouseOverAxisIndex:wI,setMouseClickAxisIndex:UX,setSyncInteraction:Lo,setKeyboardInteraction:zl}=xI.actions,HX=xI.reducer;function hE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Su(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hE(Object(r),!0).forEach(function(n){zX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zX(e,t,r){return(t=qX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qX(e){var t=WX(e,"string");return typeof t=="symbol"?t:t+""}function WX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VX(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function YX(e){return e.index!=null}var AI=(e,t,r,n)=>{if(t==null)return Kn;var i=VX(e,t,r);if(i==null)return Kn;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(YX(i)){if(a)return Su(Su({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Su(Su({},Kn),{},{coordinate:i.coordinate})};function KX(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function GX(e,t){var r=KX(e),n=t[0],i=t[1];if(r===void 0)return!1;var a=Math.min(n,i),o=Math.max(n,i);return r>=a&&r<=o}function XX(e,t,r){if(r==null||t==null)return!0;var n=lt(e,t);return n==null||!tn(r)?!0:GX(n,r)}var Xo=(e,t,r,n)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!Te(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var u=Math.max(o,Math.min(a,s)),l=t[u];return l==null||XX(l,r,n)?String(u):null},_I=(e,t,r,n,i,a,o)=>{if(a!=null){var s=o[0],u=s?.getPosition(a);if(u!=null)return u;var l=i?.[Number(a)];if(l)return r==="horizontal"?{x:l.coordinate,y:(n.top+t)/2}:{x:(n.left+e)/2,y:l.coordinate}}},kI=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a!=null?[a]:[]}return e.tooltipItemPayloads.filter(o=>{var s;return((s=o.settings)===null||s===void 0?void 0:s.graphicalItemId)===i})},SI=e=>e.options.tooltipPayloadSearcher,oo=e=>e.tooltip;function pE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pE(Object(r),!0).forEach(function(n){ZX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ZX(e,t,r){return(t=QX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QX(e){var t=JX(e,"string");return typeof t=="symbol"?t:t+""}function JX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eZ(e){if(typeof e=="string"||typeof e=="number")return e}function tZ(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function rZ(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function gE(e){if(typeof e=="string")return e}function nZ(e){if(!(e==null||typeof e!="object")){var t="name"in e?eZ(e.name):void 0,r="unit"in e?tZ(e.unit):void 0,n="dataKey"in e?rZ(e.dataKey):void 0,i="payload"in e?e.payload:void 0,a="color"in e?gE(e.color):void 0,o="fill"in e?gE(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:a,fill:o}}}function iZ(e,t){return e??t}var CI=(e,t,r,n,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:u,dataStartIndex:l,dataEndIndex:c}=r,f=[];return e.reduce((d,h)=>{var p,{dataDefinedOnItem:b,settings:y}=h,v=iZ(b,s),T=Array.isArray(v)?nS(v,l,c):v,x=(p=y?.dataKey)!==null&&p!==void 0?p:n,_=y?.nameKey,w;if(n&&Array.isArray(T)&&!Array.isArray(T[0])&&o==="axis"?w=fk(T,n,i):w=a(T,t,u,_),Array.isArray(w))w.forEach(S=>{var O,R,C=nZ(S),M=C?.name,L=C?.dataKey,Q=C?.payload,H=mE(mE({},y),{},{name:M,unit:C?.unit,color:(O=C?.color)!==null&&O!==void 0?O:y?.color,fill:(R=C?.fill)!==null&&R!==void 0?R:y?.fill});d.push(m1({tooltipEntrySettings:H,dataKey:L,payload:Q,value:lt(Q,L),name:M==null?void 0:String(M)}))});else{var A;d.push(m1({tooltipEntrySettings:y,dataKey:x,payload:w,value:lt(w,x),name:(A=lt(w,_))!==null&&A!==void 0?A:y?.name}))}return d},f)}},J0=B([vt,MC,d0],NC),aZ=B([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),oZ=B([St,to],jC),Ji=B([aZ,vt,oZ],BC,{memoizeOptions:{resultEqualityCheck:Xc}}),sZ=B([Ji],e=>e.filter(Kc)),II=B([Ji],UC,{memoizeOptions:{resultEqualityCheck:Xc}}),uZ=B([Ji],e=>e.some(t=>!t.data)),Hi=B([II,Wr],zC),lZ=B([sZ,Wr,vt],ZS),eg=B([Hi,vt,Ji,Wr,uZ,II],qC),OI=B([vt],V0),cZ=B([vt],e=>e.allowDataOverflow),PI=B([OI,cZ],PS),fZ=B([Ji],e=>e.filter(Kc)),dZ=B([lZ,fZ,zc,qS],VC),hZ=B([dZ,Wr,St,PI],YC),pZ=B([Ji],$C),mZ=B([Hi,vt,pZ,Y0,St,LV],XC,{memoizeOptions:{resultEqualityCheck:Gc}}),gZ=B([ZC,St,to],io),bZ=B([gZ,St],eI),yZ=B([QC,St,to],io),vZ=B([yZ,St],tI),xZ=B([JC,St,to],io),EZ=B([xZ,St],rI),TZ=B([bZ,EZ,vZ],Hl),wZ=B([vt,OI,PI,hZ,mZ,TZ,Be,St],nI),qa=B([vt,Be,Hi,eg,zc,St,wZ],iI),AZ=B([qa,vt,J0],aI),_Z=B([vt,qa,AZ,St],oI),NI=e=>{var t=St(e),r=to(e),n=!1;return eu(e,t,r,n)},DI=B([vt,NI],qc),kZ=B([vt,J0,_Z,DI],z0),RI=B([kZ],v0),SZ=B([Be,eg,vt,St],pI),CZ=B([Be,eg,vt,St],lI),IZ=(e,t,r,n,i,a,o,s)=>{if(t){var{type:u}=t,l=Nn(e,s);if(n){var c=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=u==="category"&&n.bandwidth?n.bandwidth()/c:0;return f=s==="angleAxis"&&i!=null&&i?.length>=2?nr(i[0]-i[1])*2*f:f,l&&o?o.map((d,h)=>{var p=n.map(d);return Te(p)?{coordinate:p+f,value:d,index:h,offset:f}:null}).filter(ir):n.domain().map((d,h)=>{var p=n.map(d);return Te(p)?{coordinate:p+f,value:a?a[d]:d,index:h,offset:f}:null}).filter(ir)}}},Mn=B([Be,vt,J0,RI,NI,SZ,CZ,St],IZ),tg=B([gI,bI,DX],(e,t,r)=>yI(r.shared,e,t)),LI=e=>e.tooltip.settings.trigger,rg=e=>e.tooltip.settings.defaultIndex,ru=B([oo,tg,LI,rg],AI),zi=B([ru,Hi,za,qa],Xo),MI=B([Mn,zi],vI),jI=B([ru],e=>{if(e)return e.dataKey}),OZ=B([ru],e=>{if(e)return e.graphicalItemId}),BI=B([oo,tg,LI,rg],kI),PZ=B([Dn,Rn,Be,At,Mn,rg,BI],_I),NZ=B([ru,PZ],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),DZ=B([ru],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),RZ=B([BI,zi,Wr,za,MI,SI,tg],CI),LZ=B([RZ],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function bE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bE(Object(r),!0).forEach(function(n){MZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MZ(e,t,r){return(t=jZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jZ(e){var t=BZ(e,"string");return typeof t=="symbol"?t:t+""}function BZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FZ=()=>oe(vt),$Z=()=>{var e=FZ(),t=oe(Mn),r=oe(RI);return Ba(!e||!r?void 0:yE(yE({},e),{},{scale:r}),t)};function vE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vE(Object(r),!0).forEach(function(n){UZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UZ(e,t,r){return(t=HZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HZ(e){var t=zZ(e,"string");return typeof t=="symbol"?t:t+""}function zZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qZ=(e,t,r,n)=>{var i=t.find(a=>a&&a.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},WZ=(e,t,r,n)=>{var i=t.find(l=>l&&l.index===r);if(i){if(e==="centric"){var a=i.coordinate,{radius:o}=n;return fa(fa(fa({},n),Pt(n.cx,n.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:u}=n;return fa(fa(fa({},n),Pt(n.cx,n.cy,s,u)),{},{angle:u,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function VZ(e,t){var{relativeX:r,relativeY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var FI=(e,t,r,n,i)=>{var a,o=(a=t?.length)!==null&&a!==void 0?a:0;if(o<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var s=0;s<o;s++){var u,l,c,f,d,h=s>0?(u=r[s-1])===null||u===void 0?void 0:u.coordinate:(l=r[o-1])===null||l===void 0?void 0:l.coordinate,p=(c=r[s])===null||c===void 0?void 0:c.coordinate,b=s>=o-1?(f=r[0])===null||f===void 0?void 0:f.coordinate:(d=r[s+1])===null||d===void 0?void 0:d.coordinate,y=void 0;if(!(h==null||p==null||b==null))if(nr(p-h)!==nr(b-p)){var v=[];if(nr(b-p)===nr(i[1]-i[0])){y=b;var T=p+i[1]-i[0];v[0]=Math.min(T,(T+h)/2),v[1]=Math.max(T,(T+h)/2)}else{y=h;var x=b+i[1]-i[0];v[0]=Math.min(p,(x+p)/2),v[1]=Math.max(p,(x+p)/2)}var _=[Math.min(p,(y+p)/2),Math.max(p,(y+p)/2)];if(e>_[0]&&e<=_[1]||e>=v[0]&&e<=v[1]){var w;return(w=r[s])===null||w===void 0?void 0:w.index}}else{var A=Math.min(h,b),S=Math.max(h,b);if(e>(A+p)/2&&e<=(S+p)/2){var O;return(O=r[s])===null||O===void 0?void 0:O.index}}}else if(t)for(var R=0;R<o;R++){var C=t[R];if(C!=null){var M=t[R+1],L=t[R-1];if(R===0&&M!=null&&e<=(C.coordinate+M.coordinate)/2||R===o-1&&L!=null&&e>(C.coordinate+L.coordinate)/2||R>0&&R<o-1&&L!=null&&M!=null&&e>(C.coordinate+L.coordinate)/2&&e<=(C.coordinate+M.coordinate)/2)return C.index}}return-1},YZ=()=>oe(d0),ng=(e,t)=>t,$I=(e,t,r)=>r,ig=(e,t,r,n)=>n,KZ=B(Mn,e=>wc(e,t=>t.coordinate)),ag=B([oo,ng,$I,ig],AI),og=B([ag,Hi,za,qa],Xo),GZ=(e,t,r)=>{if(t!=null){var n=oo(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},UI=B([oo,ng,$I,ig],kI),ql=B([Dn,Rn,Be,At,Mn,ig,UI],_I),XZ=B([ag,ql],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),HI=B([Mn,og],vI),ZZ=B([UI,og,Wr,za,HI,SI,ng],CI),QZ=B([ag,og],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),JZ=(e,t,r,n,i,a,o)=>{if(!(!e||!r||!n||!i)&&VZ(e,o)){var s=oq(e,t),u=FI(s,a,i,r,n),l=qZ(t,i,u,e);return{activeIndex:String(u),activeCoordinate:l}}},eQ=(e,t,r,n,i,a,o)=>{if(!(!e||!n||!i||!a||!r)){var s=wV(e,r);if(s){var u=sq(s,t),l=FI(u,o,a,n,i),c=WZ(t,a,l,s);return{activeIndex:String(l),activeCoordinate:c}}}},tQ=(e,t,r,n,i,a,o,s)=>{if(!(!e||!t||!n||!i||!a))return t==="horizontal"||t==="vertical"?JZ(e,t,n,i,a,o,s):eQ(e,t,r,n,i,a,o)},rQ=B(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),nQ=B(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(ft)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:GV}});function xE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xE(Object(r),!0).forEach(function(n){iQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iQ(e,t,r){return(t=aQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aQ(e){var t=oQ(e,"string");return typeof t=="symbol"?t:t+""}function oQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sQ={},uQ={zIndexMap:Object.values(ft).reduce((e,t)=>EE(EE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),sQ)},lQ=new Set(Object.values(ft));function cQ(e){return lQ.has(e)}var zI=$t({name:"zIndex",initialState:uQ,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Xe()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!cQ(r)&&delete e.zIndexMap[r])},prepare:Xe()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:Xe()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:Xe()}}}),{registerZIndexPortal:fQ,unregisterZIndexPortal:rh,registerZIndexPortalElement:dQ,unregisterZIndexPortalElement:hQ}=zI.actions,pQ=zI.reducer;function ur(e){var{zIndex:t,children:r}=e,n=Aq(),i=n&&t!==void 0&&t!==0,a=_t(),o=m.useRef(void 0),s=m.useRef(new Set),u=Qe(),l=oe(f=>rQ(f,t,a));if(m.useLayoutEffect(()=>{if(!i){var f=s.current;f.forEach(h=>{u(rh({zIndex:h}))}),f.clear(),o.current=void 0;return}if(s.current.has(t)||(u(fQ({zIndex:t})),s.current.add(t)),l){o.current=l;var d=s.current;d.forEach(h=>{h!==t&&(u(rh({zIndex:h})),d.delete(h))})}},[u,t,i,l]),m.useLayoutEffect(()=>{var f=s.current;return()=>{f.forEach(d=>{u(rh({zIndex:d}))}),f.clear()}},[u]),!i)return r;var c=l??o.current;return c?ks.createPortal(r,c):null}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dp.apply(null,arguments)}function TE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Cu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TE(Object(r),!0).forEach(function(n){mQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mQ(e,t,r){return(t=gQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gQ(e){var t=bQ(e,"string");return typeof t=="symbol"?t:t+""}function bQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yQ(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return m.isValidElement(t)?m.cloneElement(t,n):m.createElement(r,n)}function vQ(e){var t,{coordinate:r,payload:n,index:i,offset:a,tooltipAxisBandSize:o,layout:s,cursor:u,tooltipEventType:l,chartName:c}=e,f=r,d=n,h=i;if(!u||!f||c!=="ScatterChart"&&l!=="axis")return null;var p,b,y;if(c==="ScatterChart")p=f,b=jW,y=ft.cursorLine;else if(c==="BarChart")p=BW(s,f,a,o),b=s0,y=ft.cursorRectangle;else if(s==="radial"&&pk(f)){var{cx:v,cy:T,radius:x,startAngle:_,endAngle:w}=SS(f);p={cx:v,cy:T,startAngle:_,endAngle:w,innerRadius:x,outerRadius:x},b=IS,y=ft.cursorLine}else p={points:SV(s,f,a)},b=TS,y=ft.cursorLine;var A=typeof u=="object"&&"className"in u?u.className:void 0,S=Cu(Cu(Cu(Cu({stroke:"#ccc",pointerEvents:"none"},a),p),js(u)),{},{payload:d,payloadIndex:h,className:Le("recharts-tooltip-cursor",A)});return m.createElement(ur,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:y},m.createElement(yQ,{cursor:u,cursorComp:b,cursorProps:S}))}function xQ(e){var t=$Z(),r=uS(),n=Xi(),i=YZ();return t==null||r==null||n==null||i==null?null:m.createElement(vQ,Dp({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var qI=m.createContext(null),EQ=()=>m.useContext(qI),nh={exports:{}},wE;function TQ(){return wE||(wE=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(u,l,c){this.fn=u,this.context=l,this.once=c||!1}function a(u,l,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var h=new i(c,f||u,d),p=r?r+l:l;return u._events[p]?u._events[p].fn?u._events[p]=[u._events[p],h]:u._events[p].push(h):(u._events[p]=h,u._eventsCount++),u}function o(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var l=[],c,f;if(this._eventsCount===0)return l;for(f in c=this._events)t.call(c,f)&&l.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},s.prototype.listeners=function(l){var c=r?r+l:l,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,p=new Array(h);d<h;d++)p[d]=f[d].fn;return p},s.prototype.listenerCount=function(l){var c=r?r+l:l,f=this._events[c];return f?f.fn?1:f.length:0},s.prototype.emit=function(l,c,f,d,h,p){var b=r?r+l:l;if(!this._events[b])return!1;var y=this._events[b],v=arguments.length,T,x;if(y.fn){switch(y.once&&this.removeListener(l,y.fn,void 0,!0),v){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,c),!0;case 3:return y.fn.call(y.context,c,f),!0;case 4:return y.fn.call(y.context,c,f,d),!0;case 5:return y.fn.call(y.context,c,f,d,h),!0;case 6:return y.fn.call(y.context,c,f,d,h,p),!0}for(x=1,T=new Array(v-1);x<v;x++)T[x-1]=arguments[x];y.fn.apply(y.context,T)}else{var _=y.length,w;for(x=0;x<_;x++)switch(y[x].once&&this.removeListener(l,y[x].fn,void 0,!0),v){case 1:y[x].fn.call(y[x].context);break;case 2:y[x].fn.call(y[x].context,c);break;case 3:y[x].fn.call(y[x].context,c,f);break;case 4:y[x].fn.call(y[x].context,c,f,d);break;default:if(!T)for(w=1,T=new Array(v-1);w<v;w++)T[w-1]=arguments[w];y[x].fn.apply(y[x].context,T)}}return!0},s.prototype.on=function(l,c,f){return a(this,l,c,f,!1)},s.prototype.once=function(l,c,f){return a(this,l,c,f,!0)},s.prototype.removeListener=function(l,c,f,d){var h=r?r+l:l;if(!this._events[h])return this;if(!c)return o(this,h),this;var p=this._events[h];if(p.fn)p.fn===c&&(!d||p.once)&&(!f||p.context===f)&&o(this,h);else{for(var b=0,y=[],v=p.length;b<v;b++)(p[b].fn!==c||d&&!p[b].once||f&&p[b].context!==f)&&y.push(p[b]);y.length?this._events[h]=y.length===1?y[0]:y:o(this,h)}return this},s.prototype.removeAllListeners=function(l){var c;return l?(c=r?r+l:l,this._events[c]&&o(this,c)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(nh)),nh.exports}var wQ=TQ();const AQ=In(wQ);var Es=new AQ,Rp="recharts.syncEvent.tooltip",AE="recharts.syncEvent.brush",WI=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!on(r))return e[r]}},_Q={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},VI=$t({name:"options",initialState:_Q,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),kQ=VI.reducer,{createEventEmitter:SQ}=VI.actions;function CQ(e){return e.tooltip.syncInteraction}var IQ={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},YI=$t({name:"chartData",initialState:IQ,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:_E,setDataStartEndIndexes:OQ,setComputedData:qoe}=YI.actions,PQ=YI.reducer,NQ=["x","y"];function kE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function da(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kE(Object(r),!0).forEach(function(n){DQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DQ(e,t,r){return(t=RQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RQ(e){var t=LQ(e,"string");return typeof t=="symbol"?t:t+""}function LQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MQ(e,t){if(e==null)return{};var r,n,i=jQ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jQ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function BQ(){var e=oe(h0),t=oe(p0),r=Qe(),n=oe(WS),i=oe(Mn),a=Xi(),o=Hs(),s=oe(u=>u.rootProps.className);m.useEffect(()=>{if(e==null)return Qa;var u=(l,c,f)=>{if(t!==f&&e===l){if(c.payload.active===!1){r(Lo({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var d;if(o&&c!==null&&c!==void 0&&(d=c.payload)!==null&&d!==void 0&&d.coordinate&&c.payload.sourceViewBox){var h=c.payload.coordinate,{x:p,y:b}=h,y=MQ(h,NQ),{x:v,y:T,width:x,height:_}=c.payload.sourceViewBox,w=da(da({},y),{},{x:o.x+(x?(p-v)/x:0)*o.width,y:o.y+(_?(b-T)/_:0)*o.height});r(da(da({},c),{},{payload:da(da({},c.payload),{},{coordinate:w})}))}else r(c);return}if(i!=null){var A;if(typeof n=="function"){var S={activeTooltipIndex:c.payload.index==null?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:c.payload.index==null?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate},O=n(i,S);A=i[O]}else n==="value"&&(A=i.find(q=>String(q.value)===c.payload.label));var{coordinate:R}=c.payload;if(R==null||o==null){r(Lo({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(A==null){r(Lo({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:C,y:M}=R,L=Math.min(C,o.x+o.width),Q=Math.min(M,o.y+o.height),H={x:a==="horizontal"?A.coordinate:L,y:a==="horizontal"?Q:A.coordinate},U=Lo({active:c.payload.active,coordinate:H,dataKey:c.payload.dataKey,index:String(A.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});r(U)}}};return Es.on(Rp,u),()=>{Es.off(Rp,u)}},[s,r,t,e,n,i,a,o])}function FQ(){var e=oe(h0),t=oe(p0),r=Qe();m.useEffect(()=>{if(e==null)return Qa;var n=(i,a,o)=>{t!==o&&e===i&&r(OQ(a))};return Es.on(AE,n),()=>{Es.off(AE,n)}},[r,t,e])}function $Q(){var e=Qe();m.useEffect(()=>{e(SQ())},[e]),BQ(),FQ()}function UQ(e,t,r,n,i,a){var o=oe(p=>GZ(p,e,t)),s=oe(OZ),u=oe(p0),l=oe(h0),c=oe(WS),f=oe(CQ),d=f?.sourceViewBox!=null,h=Hs();m.useEffect(()=>{if(!d&&l!=null&&u!=null){var p=Lo({active:a,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:h,graphicalItemId:s});Es.emit(Rp,l,p,u)}},[d,r,o,s,i,n,u,l,c,a,h])}function SE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function CE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SE(Object(r),!0).forEach(function(n){HQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HQ(e,t,r){return(t=zQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zQ(e){var t=qQ(e,"string");return typeof t=="symbol"?t:t+""}function qQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WQ(e){return e.dataKey}function VQ(e,t){return m.isValidElement(e)?m.cloneElement(e,t):typeof e=="function"?m.createElement(e,t):m.createElement(dW,t)}var IE=[],YQ={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function KI(e){var t,r,n=Dt(e,YQ),{active:i,allowEscapeViewBox:a,animationDuration:o,animationEasing:s,content:u,filterNull:l,isAnimationActive:c,offset:f,payloadUniqBy:d,position:h,reverseDirection:p,useTranslate3d:b,wrapperStyle:y,cursor:v,shared:T,trigger:x,defaultIndex:_,portal:w,axisId:A}=n,S=Qe(),O=typeof _=="number"?String(_):_;m.useEffect(()=>{S(BX({shared:T,trigger:x,axisId:A,active:i,defaultIndex:O}))},[S,T,x,A,i,O]);var R=Hs(),C=ES(),M=NX(T),{activeIndex:L,isActive:Q}=(t=oe(ge=>QZ(ge,M,x,O)))!==null&&t!==void 0?t:{},H=oe(ge=>ZZ(ge,M,x,O)),U=oe(ge=>HI(ge,M,x,O)),q=oe(ge=>XZ(ge,M,x,O)),J=H,V=EQ(),re=(r=i??Q)!==null&&r!==void 0?r:!1,[N,le]=WH([J,re]),he=M==="axis"?U:void 0;UQ(M,x,q,he,L,re);var P=w??V;if(P==null||R==null||M==null)return null;var pe=J??IE;re||(pe=IE),l&&pe.length&&(pe=bH(pe.filter(ge=>ge.value!=null&&(ge.hide!==!0||n.includeHidden)),d,WQ));var we=pe.length>0,ce=CE(CE({},n),{},{payload:pe,label:he,active:re,activeIndex:L,coordinate:q,accessibilityLayer:C}),fe=m.createElement(wW,{allowEscapeViewBox:a,animationDuration:o,animationEasing:s,isAnimationActive:c,active:re,coordinate:q,hasPayload:we,offset:f,position:h,reverseDirection:p,useTranslate3d:b,viewBox:R,wrapperStyle:y,lastBoundingBox:N,innerRef:le,hasPortalFromProps:!!w},VQ(u,ce));return m.createElement(m.Fragment,null,ks.createPortal(fe,P),re&&m.createElement(xQ,{cursor:v,tooltipEventType:M,coordinate:q,payload:pe,index:L}))}var GI=e=>null;GI.displayName="Cell";function KQ(e,t,r){return(t=GQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GQ(e){var t=XQ(e,"string");return typeof t=="symbol"?t:t+""}function XQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class ZQ{constructor(t){KQ(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function OE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OE(Object(r),!0).forEach(function(n){JQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JQ(e,t,r){return(t=eJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eJ(e){var t=tJ(e,"string");return typeof t=="symbol"?t:t+""}function tJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rJ={cacheSize:2e3,enableCache:!0},XI=QQ({},rJ),PE=new ZQ(XI.cacheSize),nJ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},NE="recharts_measurement_span";function iJ(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(s)}var DE=(e,t)=>{try{var r=document.getElementById(NE);r||(r=document.createElement("span"),r.setAttribute("id",NE),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,nJ,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Zo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Vs.isSsr)return{width:0,height:0};if(!XI.enableCache)return DE(t,r);var n=iJ(t,r),i=PE.get(n);if(i)return i;var a=DE(t,r);return PE.set(n,a),a},ZI;function aJ(e,t,r){return(t=oJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oJ(e){var t=sJ(e,"string");return typeof t=="symbol"?t:t+""}function sJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,LE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,uJ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,lJ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,cJ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},fJ=["cm","mm","pt","pc","in","Q","px"];function dJ(e){return fJ.includes(e)}var wa="NaN";function hJ(e,t){return e*cJ[t]}class Ot{static parse(t){var r,[,n,i]=(r=lJ.exec(t))!==null&&r!==void 0?r:[];return n==null?Ot.NaN:new Ot(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,on(t)&&(this.unit=""),r!==""&&!uJ.test(r)&&(this.num=NaN,this.unit=""),dJ(r)&&(this.num=hJ(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Ot(NaN,""):new Ot(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return on(this.num)}}ZI=Ot;aJ(Ot,"NaN",new ZI(NaN,""));function QI(e){if(e==null||e.includes(wa))return wa;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=RE.exec(t))!==null&&r!==void 0?r:[],o=Ot.parse(n??""),s=Ot.parse(a??""),u=i==="*"?o.multiply(s):o.divide(s);if(u.isNaN())return wa;t=t.replace(RE,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,[,c,f,d]=(l=LE.exec(t))!==null&&l!==void 0?l:[],h=Ot.parse(c??""),p=Ot.parse(d??""),b=f==="+"?h.add(p):h.subtract(p);if(b.isNaN())return wa;t=t.replace(LE,b.toString())}return t}var ME=/\(([^()]*)\)/;function pJ(e){for(var t=e,r;(r=ME.exec(t))!=null;){var[,n]=r;t=t.replace(ME,QI(n))}return t}function mJ(e){var t=e.replace(/\s+/g,"");return t=pJ(t),t=QI(t),t}function gJ(e){try{return mJ(e)}catch{return wa}}function ih(e){var t=gJ(e.slice(5,-1));return t===wa?"":t}var bJ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],yJ=["dx","dy","angle","className","breakAll"];function Lp(){return Lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lp.apply(null,arguments)}function jE(e,t){if(e==null)return{};var r,n,i=vJ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function vJ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var JI=/[ \f\n\r\t\v\u2028\u2029]+/,eO=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];tt(t)||(r?i=t.toString().split(""):i=t.toString().split(JI));var a=i.map(s=>({word:s,width:Zo(s,n).width})),o=r?0:Zo(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}};function tO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function xJ(e){return tt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var rO=(e,t,r,n)=>e.reduce((i,a)=>{var{word:o,width:s}=a,u=i[i.length-1];if(u&&s!=null&&(t==null||n||u.width+s+r<Number(t)))u.words.push(o),u.width+=s+r;else{var l={words:[o],width:s};i.push(l)}return i},[]),nO=e=>e.reduce((t,r)=>t.width>r.width?t:r),EJ="…",BE=(e,t,r,n,i,a,o,s)=>{var u=e.slice(0,t),l=eO({breakAll:r,style:n,children:u+EJ});if(!l)return[!1,[]];var c=rO(l.wordsWithComputedWidth,a,o,s),f=c.length>i||nO(c).width>Number(a);return[f,c]},TJ=(e,t,r,n,i)=>{var{maxLines:a,children:o,style:s,breakAll:u}=e,l=se(a),c=String(o),f=rO(t,n,r,i);if(!l||i)return f;var d=f.length>a||nO(f).width>Number(n);if(!d)return f;for(var h=0,p=c.length-1,b=0,y;h<=p&&b<=c.length-1;){var v=Math.floor((h+p)/2),T=v-1,[x,_]=BE(c,T,u,s,a,n,r,i),[w]=BE(c,v,u,s,a,n,r,i);if(!x&&!w&&(h=v+1),x&&w&&(p=v-1),!x&&w){y=_;break}b++}return y||f},FE=e=>{var t=tt(e)?[]:e.toString().split(JI);return[{words:t,width:void 0}]},wJ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:o}=e;if((t||r)&&!Vs.isSsr){var s,u,l=eO({breakAll:a,children:n,style:i});if(l){var{wordsWithComputedWidth:c,spaceWidth:f}=l;s=c,u=f}else return FE(n);return TJ({breakAll:a,children:n,maxLines:o,style:i},s,u,t,!!r)}return FE(n)},iO="#808080",AJ={angle:0,breakAll:!1,capHeight:"0.71em",fill:iO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},sg=m.forwardRef((e,t)=>{var r=Dt(e,AJ),{x:n,y:i,lineHeight:a,capHeight:o,fill:s,scaleToFit:u,textAnchor:l,verticalAnchor:c}=r,f=jE(r,bJ),d=m.useMemo(()=>wJ({breakAll:f.breakAll,children:f.children,maxLines:f.maxLines,scaleToFit:u,style:f.style,width:f.width}),[f.breakAll,f.children,f.maxLines,u,f.style,f.width]),{dx:h,dy:p,angle:b,className:y,breakAll:v}=f,T=jE(f,yJ);if(!jt(n)||!jt(i)||d.length===0)return null;var x=Number(n)+(se(h)?h:0),_=Number(i)+(se(p)?p:0);if(!Te(x)||!Te(_))return null;var w;switch(c){case"start":w=ih("calc(".concat(o,")"));break;case"middle":w=ih("calc(".concat((d.length-1)/2," * -").concat(a," + (").concat(o," / 2))"));break;default:w=ih("calc(".concat(d.length-1," * -").concat(a,")"));break}var A=[],S=d[0];if(u&&S!=null){var O=S.width,{width:R}=f;A.push("scale(".concat(se(R)&&se(O)?R/O:1,")"))}return b&&A.push("rotate(".concat(b,", ").concat(x,", ").concat(_,")")),A.length&&(T.transform=A.join(" ")),m.createElement("text",Lp({},Nt(T),{ref:t,x,y:_,className:Le("recharts-text",y),textAnchor:l,fill:s.includes("url")?iO:s}),d.map((C,M)=>{var L=C.words.join(v?"":" ");return m.createElement("tspan",{x,dy:M===0?w:a,key:"".concat(L,"-").concat(M)},L)}))});sg.displayName="Text";function $E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$E(Object(r),!0).forEach(function(n){_J(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$E(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _J(e,t,r){return(t=kJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kJ(e){var t=SJ(e,"string");return typeof t=="symbol"?t:t+""}function SJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CJ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:a,y:o,height:s,upperWidth:u,lowerWidth:l}=i0(t),c=a,f=a+(u-l)/2,d=(c+f)/2,h=(u+l)/2,p=c+u/2,b=s>=0?1:-1,y=b*n,v=b>0?"end":"start",T=b>0?"start":"end",x=u>=0?1:-1,_=x*n,w=x>0?"end":"start",A=x>0?"start":"end",S=i;if(r==="top"){var O={x:c+u/2,y:o-y,horizontalAnchor:"middle",verticalAnchor:v};return S&&(O.height=Math.max(o-S.y,0),O.width=u),O}if(r==="bottom"){var R={x:f+l/2,y:o+s+y,horizontalAnchor:"middle",verticalAnchor:T};return S&&(R.height=Math.max(S.y+S.height-(o+s),0),R.width=l),R}if(r==="left"){var C={x:d-_,y:o+s/2,horizontalAnchor:w,verticalAnchor:"middle"};return S&&(C.width=Math.max(C.x-S.x,0),C.height=s),C}if(r==="right"){var M={x:d+h+_,y:o+s/2,horizontalAnchor:A,verticalAnchor:"middle"};return S&&(M.width=Math.max(S.x+S.width-M.x,0),M.height=s),M}var L=S?{width:h,height:s}:{};return r==="insideLeft"?Gr({x:d+_,y:o+s/2,horizontalAnchor:A,verticalAnchor:"middle"},L):r==="insideRight"?Gr({x:d+h-_,y:o+s/2,horizontalAnchor:w,verticalAnchor:"middle"},L):r==="insideTop"?Gr({x:c+u/2,y:o+y,horizontalAnchor:"middle",verticalAnchor:T},L):r==="insideBottom"?Gr({x:f+l/2,y:o+s-y,horizontalAnchor:"middle",verticalAnchor:v},L):r==="insideTopLeft"?Gr({x:c+_,y:o+y,horizontalAnchor:A,verticalAnchor:T},L):r==="insideTopRight"?Gr({x:c+u-_,y:o+y,horizontalAnchor:w,verticalAnchor:T},L):r==="insideBottomLeft"?Gr({x:f+_,y:o+s-y,horizontalAnchor:A,verticalAnchor:v},L):r==="insideBottomRight"?Gr({x:f+l-_,y:o+s-y,horizontalAnchor:w,verticalAnchor:v},L):r&&typeof r=="object"&&(se(r.x)||tp(r.x))&&(se(r.y)||tp(r.y))?Gr({x:a+$r(r.x,h),y:o+$r(r.y,s),horizontalAnchor:"end",verticalAnchor:"end"},L):Gr({x:p,y:o+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},L)},IJ=["labelRef"],OJ=["content"];function UE(e,t){if(e==null)return{};var r,n,i=PJ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function PJ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function HE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Mo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HE(Object(r),!0).forEach(function(n){NJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NJ(e,t,r){return(t=DJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DJ(e){var t=RJ(e,"string");return typeof t=="symbol"?t:t+""}function RJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xn(){return xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},xn.apply(null,arguments)}var aO=m.createContext(null),ug=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o,children:s}=e,u=m.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:o}),[t,r,n,i,a,o]);return m.createElement(aO.Provider,{value:u},s)},oO=()=>{var e=m.useContext(aO),t=Hs();return e||(t?i0(t):void 0)},LJ=m.createContext(null),MJ=()=>{var e=m.useContext(LJ),t=oe(XS);return e||t},jJ=e=>{var{value:t,formatter:r}=e,n=tt(e.children)?t:e.children;return typeof r=="function"?r(n):n},lg=e=>e!=null&&typeof e=="function",BJ=(e,t)=>{var r=nr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},FJ=(e,t,r,n,i)=>{var{offset:a,className:o}=e,{cx:s,cy:u,innerRadius:l,outerRadius:c,startAngle:f,endAngle:d,clockWise:h}=i,p=(l+c)/2,b=BJ(f,d),y=b>=0?1:-1,v,T;switch(t){case"insideStart":v=f+y*a,T=h;break;case"insideEnd":v=d-y*a,T=!h;break;case"end":v=d+y*a,T=h;break;default:throw new Error("Unsupported position ".concat(t))}T=b<=0?T:!T;var x=Pt(s,u,p,v),_=Pt(s,u,p,v+(T?1:-1)*359),w="M".concat(x.x,",").concat(x.y,`
178
- A`).concat(p,",").concat(p,",0,1,").concat(T?0:1,`,
179
- `).concat(_.x,",").concat(_.y),A=tt(e.id)?us("recharts-radial-line-"):e.id;return m.createElement("text",xn({},n,{dominantBaseline:"central",className:Le("recharts-radial-bar-label",o)}),m.createElement("defs",null,m.createElement("path",{id:A,d:w})),m.createElement("textPath",{xlinkHref:"#".concat(A)},r))},$J=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:s,endAngle:u}=e,l=(s+u)/2;if(r==="outside"){var{x:c,y:f}=Pt(n,i,o+t,l);return{x:c,y:f,textAnchor:c>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(a+o)/2,{x:h,y:p}=Pt(n,i,d,l);return{x:h,y:p,textAnchor:"middle",verticalAnchor:"middle"}},$u=e=>e!=null&&"cx"in e&&se(e.cx),UJ={angle:0,offset:5,zIndex:ft.label,position:"middle",textBreakAll:!1};function HJ(e){if(!$u(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function Yn(e){var t=Dt(e,UJ),{viewBox:r,parentViewBox:n,position:i,value:a,children:o,content:s,className:u="",textBreakAll:l,labelRef:c}=t,f=MJ(),d=oO(),h=i==="center"?d:f??d,p,b,y;r==null?p=h:$u(r)?p=r:p=i0(r);var v=HJ(p);if(!p||tt(a)&&tt(o)&&!m.isValidElement(s)&&typeof s!="function")return null;var T=Mo(Mo({},t),{},{viewBox:p});if(m.isValidElement(s)){var{labelRef:x}=T,_=UE(T,IJ);return m.cloneElement(s,_)}if(typeof s=="function"){var{content:w}=T,A=UE(T,OJ);if(b=m.createElement(s,A),m.isValidElement(b))return b}else b=jJ(t);var S=Nt(t);if($u(p)){if(i==="insideStart"||i==="insideEnd"||i==="end")return FJ(t,i,b,S,p);y=$J(p,t.offset,t.position)}else{if(!v)return null;var O=CJ({viewBox:v,position:i,offset:t.offset,parentViewBox:$u(n)?void 0:n});y=Mo(Mo({x:O.x,y:O.y,textAnchor:O.horizontalAnchor,verticalAnchor:O.verticalAnchor},O.width!==void 0?{width:O.width}:{}),O.height!==void 0?{height:O.height}:{})}return m.createElement(ur,{zIndex:t.zIndex},m.createElement(sg,xn({ref:c,className:Le("recharts-label",u)},S,y,{textAnchor:tO(S.textAnchor)?S.textAnchor:y.textAnchor,breakAll:l}),b))}Yn.displayName="Label";var zJ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?m.createElement(Yn,xn({key:"label-implicit"},n)):jt(e)?m.createElement(Yn,xn({key:"label-implicit",value:e},n)):m.isValidElement(e)?e.type===Yn?m.cloneElement(e,Mo({key:"label-implicit"},n)):m.createElement(Yn,xn({key:"label-implicit",content:e},n)):lg(e)?m.createElement(Yn,xn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?m.createElement(Yn,xn({},e,{key:"label-implicit"},n)):null};function cg(e){var{label:t,labelRef:r}=e,n=oO();return zJ(t,n,r)||null}var qJ=["valueAccessor"],WJ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wl.apply(null,arguments)}function zE(e,t){if(e==null)return{};var r,n,i=VJ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function VJ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var YJ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(xJ(t))return t},sO=m.createContext(void 0),uO=sO.Provider,lO=m.createContext(void 0);lO.Provider;function KJ(){return m.useContext(sO)}function GJ(){return m.useContext(lO)}function Uu(e){var{valueAccessor:t=YJ}=e,r=zE(e,qJ),{dataKey:n,clockWise:i,id:a,textBreakAll:o,zIndex:s}=r,u=zE(r,WJ),l=KJ(),c=GJ(),f=l||c;return!f||!f.length?null:m.createElement(ur,{zIndex:s??ft.label},m.createElement(Zt,{className:"recharts-label-list"},f.map((d,h)=>{var p,b=tt(n)?t(d,h):lt(d.payload,n),y=tt(a)?{}:{id:"".concat(a,"-").concat(h)};return m.createElement(Yn,Wl({key:"label-".concat(h)},Nt(d),u,y,{fill:(p=r.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:b,textBreakAll:o,viewBox:d.viewBox,index:h,zIndex:0}))})))}Uu.displayName="LabelList";function cO(e){var{label:t}=e;return t?t===!0?m.createElement(Uu,{key:"labelList-implicit"}):m.isValidElement(t)||lg(t)?m.createElement(Uu,{key:"labelList-implicit",content:t}):typeof t=="object"?m.createElement(Uu,Wl({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Mp(){return Mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Mp.apply(null,arguments)}var fO=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=Le("recharts-dot",i);return se(t)&&se(r)&&se(n)?m.createElement("circle",Mp({},Fr(e),Ym(e),{className:a,cx:t,cy:r,r:n})):null},XJ={radiusAxis:{},angleAxis:{}},dO=$t({name:"polarAxis",initialState:XJ,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:Woe,removeRadiusAxis:Voe,addAngleAxis:Yoe,removeAngleAxis:Koe}=dO.actions,ZJ=dO.reducer;function QJ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var ah={exports:{}},Me={};var qE;function JJ(){if(qE)return Me;qE=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function x(w){if(typeof w=="object"&&w!==null){var A=w.$$typeof;switch(A){case t:switch(w=w.type,w){case u:case l:case n:case a:case i:case f:return w;default:switch(w=w&&w.$$typeof,w){case s:case c:case p:case h:case o:return w;default:return A}}case r:return A}}}function _(w){return x(w)===l}return Me.AsyncMode=u,Me.ConcurrentMode=l,Me.ContextConsumer=s,Me.ContextProvider=o,Me.Element=t,Me.ForwardRef=c,Me.Fragment=n,Me.Lazy=p,Me.Memo=h,Me.Portal=r,Me.Profiler=a,Me.StrictMode=i,Me.Suspense=f,Me.isAsyncMode=function(w){return _(w)||x(w)===u},Me.isConcurrentMode=_,Me.isContextConsumer=function(w){return x(w)===s},Me.isContextProvider=function(w){return x(w)===o},Me.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},Me.isForwardRef=function(w){return x(w)===c},Me.isFragment=function(w){return x(w)===n},Me.isLazy=function(w){return x(w)===p},Me.isMemo=function(w){return x(w)===h},Me.isPortal=function(w){return x(w)===r},Me.isProfiler=function(w){return x(w)===a},Me.isStrictMode=function(w){return x(w)===i},Me.isSuspense=function(w){return x(w)===f},Me.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===l||w===a||w===i||w===f||w===d||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===h||w.$$typeof===o||w.$$typeof===s||w.$$typeof===c||w.$$typeof===y||w.$$typeof===v||w.$$typeof===T||w.$$typeof===b)},Me.typeOf=x,Me}var WE;function eee(){return WE||(WE=1,ah.exports=JJ()),ah.exports}var tee=eee(),VE=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",YE=null,oh=null,hO=e=>{if(e===YE&&Array.isArray(oh))return oh;var t=[];return m.Children.forEach(e,r=>{tt(r)||(tee.isFragment(r)?t=t.concat(hO(r.props.children)):t.push(r))}),oh=t,YE=e,t};function ree(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>VE(i)):n=[VE(t)],hO(e).forEach(i=>{var a=La(i,"type.displayName")||La(i,"type.name");a&&n.indexOf(a)!==-1&&r.push(i)}),r}var pO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,sh={},KE;function nee(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(sh)),sh}var uh,GE;function iee(){return GE||(GE=1,uh=nee().isPlainObject),uh}var aee=iee();const oee=In(aee);var XE,ZE,QE,JE,eT;function tT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tT(Object(r),!0).forEach(function(n){see(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function see(e,t,r){return(t=uee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uee(e){var t=lee(e,"string");return typeof t=="symbol"?t:t+""}function lee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vl.apply(null,arguments)}function So(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var nT=(e,t,r,n,i)=>{var a=r-n,o;return o=it(XE||(XE=So(["M ",",",""])),e,t),o+=it(ZE||(ZE=So(["L ",",",""])),e+r,t),o+=it(QE||(QE=So(["L ",",",""])),e+r-a/2,t+i),o+=it(JE||(JE=So(["L ",",",""])),e+r-a/2-n,t+i),o+=it(eT||(eT=So(["L ",","," Z"])),e,t),o},cee={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fee=e=>{var t=Dt(e,cee),{x:r,y:n,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:u,animationDuration:l,animationBegin:c,isUpdateAnimationActive:f}=t,d=m.useRef(null),[h,p]=m.useState(-1),b=m.useRef(i),y=m.useRef(a),v=m.useRef(o),T=m.useRef(r),x=m.useRef(n),_=Hc(e,"trapezoid-");if(m.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var H=d.current.getTotalLength();H&&p(H)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var w=Le("recharts-trapezoid",s);if(!f)return m.createElement("g",null,m.createElement("path",Vl({},Nt(t),{className:w,d:nT(r,n,i,a,o)})));var A=b.current,S=y.current,O=v.current,R=T.current,C=x.current,M="0px ".concat(h===-1?1:h,"px"),L="".concat(h,"px ").concat(h,"px"),Q=wS(["strokeDasharray"],l,u);return m.createElement(Uc,{animationId:_,key:_,canBegin:h>0,duration:l,easing:u,isActive:f,begin:c},H=>{var U=at(A,i,H),q=at(S,a,H),J=at(O,o,H),V=at(R,r,H),re=at(C,n,H);d.current&&(b.current=U,y.current=q,v.current=J,T.current=V,x.current=re);var N=H>0?{transition:Q,strokeDasharray:L}:{strokeDasharray:M};return m.createElement("path",Vl({},Nt(t),{className:w,d:nT(V,re,U,q,J),ref:d,style:rT(rT({},N),t.style)}))})},dee=["option","shapeType","activeClassName","inActiveClassName"];function hee(e,t){if(e==null)return{};var r,n,i=pee(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function iT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iT(Object(r),!0).forEach(function(n){mee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mee(e,t,r){return(t=gee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gee(e){var t=bee(e,"string");return typeof t=="symbol"?t:t+""}function bee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yee(e,t){return Yl(Yl({},t),e)}function vee(e,t){return e==="symbols"}function aT(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return m.createElement(s0,r);case"trapezoid":return m.createElement(fee,r);case"sector":return m.createElement(IS,r);case"symbols":if(vee(t))return m.createElement(hk,r);break;case"curve":return m.createElement(TS,r);default:return null}}function xee(e){return m.isValidElement(e)?e.props:e}function mO(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,a=hee(e,dee),o;if(m.isValidElement(t))o=m.cloneElement(t,Yl(Yl({},a),xee(t)));else if(typeof t=="function")o=t(a,a.index);else if(oee(t)&&typeof t!="boolean"){var s=yee(t,a);o=m.createElement(aT,{shapeType:r,elementProps:s})}else{var u=a;o=m.createElement(aT,{shapeType:r,elementProps:u})}return a.isActive?m.createElement(Zt,{className:n},o):m.createElement(Zt,{className:i},o)}var gO=(e,t,r)=>{var n=Qe();return(i,a)=>o=>{e?.(i,a,o),n(EI({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},bO=e=>{var t=Qe();return(r,n)=>i=>{e?.(r,n,i),t(FX())}},yO=(e,t,r)=>{var n=Qe();return(i,a)=>o=>{e?.(i,a,o),n($X({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function vO(e){var{tooltipEntrySettings:t}=e,r=Qe(),n=_t(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(LX(t)):i.current!==t&&r(MX({prev:i.current,next:t})),i.current=t)},[t,r,n]),m.useLayoutEffect(()=>()=>{i.current&&(r(jX(i.current)),i.current=null)},[r]),null}function xO(e){var{legendPayload:t}=e,r=Qe(),n=_t(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(jq(t)):i.current!==t&&r(Bq({prev:i.current,next:t})),i.current=t)},[r,n,t]),m.useLayoutEffect(()=>()=>{i.current&&(r(Fq(i.current)),i.current=null)},[r]),null}var lh,Eee=()=>{var[e]=m.useState(()=>us("uid-"));return e},Tee=(lh=RP.useId)!==null&&lh!==void 0?lh:Eee;function wee(e,t){var r=Tee();return t||(e?"".concat(e,"-").concat(r):r)}var Aee=m.createContext(void 0),EO=e=>{var{id:t,type:r,children:n}=e,i=wee("recharts-".concat(r),t);return m.createElement(Aee.Provider,{value:i},n(i))},_ee={cartesianItems:[],polarItems:[]},TO=$t({name:"graphicalItems",initialState:_ee,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Xe()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sr(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:Xe()},removeCartesianGraphicalItem:{reducer(e,t){var r=Sr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:Xe()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Xe()},removePolarGraphicalItem:{reducer(e,t){var r=Sr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:Xe()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sr(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:Xe()}}}),{addCartesianGraphicalItem:kee,replaceCartesianGraphicalItem:See,removeCartesianGraphicalItem:Cee,addPolarGraphicalItem:Goe,removePolarGraphicalItem:Xoe,replacePolarGraphicalItem:Zoe}=TO.actions,Iee=TO.reducer,Oee=e=>{var t=Qe(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(kee(e)):r.current!==e&&t(See({prev:r.current,next:e})),r.current=e},[t,e]),m.useLayoutEffect(()=>()=>{r.current&&(t(Cee(r.current)),r.current=null)},[t]),null},wO=m.memo(Oee),Pee=["points"];function oT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oT(Object(r),!0).forEach(function(n){Nee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Nee(e,t,r){return(t=Dee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dee(e){var t=Ree(e,"string");return typeof t=="symbol"?t:t+""}function Ree(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Kl.apply(null,arguments)}function Lee(e,t){if(e==null)return{};var r,n,i=Mee(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Mee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function jee(e){var{option:t,dotProps:r,className:n}=e;if(m.isValidElement(t))return m.cloneElement(t,r);if(typeof t=="function")return t(r);var i=Le(n,typeof t!="boolean"?t.className:""),a=r??{},{points:o}=a,s=Lee(a,Pee);return m.createElement(fO,Kl({},s,{className:i}))}function Bee(e,t){return e==null?!1:t?!0:e.length===1}function Fee(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:a,baseProps:o,needClip:s,clipPathId:u,zIndex:l=ft.scatter}=e;if(!Bee(t,r))return null;var c=pO(r),f=z$(r),d=t.map((p,b)=>{var y,v,T=ch(ch(ch({r:3},o),f),{},{index:b,cx:(y=p.x)!==null&&y!==void 0?y:void 0,cy:(v=p.y)!==null&&v!==void 0?v:void 0,dataKey:a,value:p.value,payload:p.payload,points:t});return m.createElement(jee,{key:"dot-".concat(b),option:r,dotProps:T,className:i})}),h={};return s&&u!=null&&(h.clipPath="url(#clipPath-".concat(c?"":"dots-").concat(u,")")),m.createElement(ur,{zIndex:l},m.createElement(Zt,Kl({className:n},h),d))}function sT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function uT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sT(Object(r),!0).forEach(function(n){$ee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $ee(e,t,r){return(t=Uee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uee(e){var t=Hee(e,"string");return typeof t=="symbol"?t:t+""}function Hee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AO=0,zee={xAxis:{},yAxis:{},zAxis:{}},_O=$t({name:"cartesianAxis",initialState:zee,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Xe()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:Xe()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Xe()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Xe()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:Xe()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Xe()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Xe()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:Xe()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Xe()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var a,o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&n===o[1]&&n!==i.width&&Math.abs(n-((a=o[0])!==null&&a!==void 0?a:0))<=1)return;var s=[...o,n].slice(-3);e.yAxis[r]=uT(uT({},i),{},{width:n,widthHistory:s})}}}}),{addXAxis:qee,replaceXAxis:Wee,removeXAxis:Vee,addYAxis:Yee,replaceYAxis:Kee,removeYAxis:Gee,addZAxis:Qoe,replaceZAxis:Joe,removeZAxis:ese,updateYAxisWidth:Xee}=_O.actions,Zee=_O.reducer,Qee=B([At],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Jee=B([Qee,Dn,Rn],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),fg=()=>oe(Jee),ete=()=>oe(LZ);function lT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lT(Object(r),!0).forEach(function(n){tte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tte(e,t,r){return(t=rte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rte(e){var t=nte(e,"string");return typeof t=="symbol"?t:t+""}function nte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ite=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var s={index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},u=fh(fh(fh({},s),js(i)),Ym(i)),l;return m.isValidElement(i)?l=m.cloneElement(i,u):typeof i=="function"?l=i(u):l=m.createElement(fO,u),m.createElement(Zt,{className:"recharts-active-dot",clipPath:o},l)};function ate(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:a,zIndex:o=ft.activeDot}=e,s=oe(zi),u=ete();if(t==null||u==null)return null;var l=t.find(c=>u.includes(c.payload));return tt(l)?null:m.createElement(ur,{zIndex:o},m.createElement(ite,{point:l,childIndex:Number(s),mainColor:r,dataKey:i,activeDot:n,clipPath:a}))}var cT=(e,t,r)=>{var n=r??e;if(!tt(n))return $r(n,t,0)},ote=(e,t,r)=>{var n={},i=e.filter(Kc),a=e.filter(l=>l.stackId==null),o=i.reduce((l,c)=>{var f=l[c.stackId];return f==null&&(f=[]),f.push(c),l[c.stackId]=f,l},n),s=Object.entries(o).map(l=>{var c,[f,d]=l,h=d.map(b=>b.dataKey),p=cT(t,r,(c=d[0])===null||c===void 0?void 0:c.barSize);return{stackId:f,dataKeys:h,barSize:p}}),u=a.map(l=>{var c=[l.dataKey].filter(d=>d!=null),f=cT(t,r,l.barSize);return{stackId:void 0,dataKeys:c,barSize:f}});return[...s,...u]};function fT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Iu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fT(Object(r),!0).forEach(function(n){ste(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ste(e,t,r){return(t=ute(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ute(e){var t=lte(e,"string");return typeof t=="symbol"?t:t+""}function lte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cte(e,t,r,n,i){var a,o=n.length;if(!(o<1)){var s=$r(e,r,0,!0),u,l=[];if(Te((a=n[0])===null||a===void 0?void 0:a.barSize)){var c=!1,f=r/o,d=n.reduce((T,x)=>T+(x.barSize||0),0);d+=(o-1)*s,d>=r&&(d-=(o-1)*s,s=0),d>=r&&f>0&&(c=!0,f*=.9,d=o*f);var h=(r-d)/2>>0,p={offset:h-s,size:0};u=n.reduce((T,x)=>{var _,w={stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:p.offset+p.size+s,size:c?f:(_=x.barSize)!==null&&_!==void 0?_:0}},A=[...T,w];return p=w.position,A},l)}else{var b=$r(t,r,0,!0);r-2*b-(o-1)*s<=0&&(s=0);var y=(r-2*b-(o-1)*s)/o;y>1&&(y>>=0);var v=Te(i)?Math.min(y,i):y;u=n.reduce((T,x,_)=>[...T,{stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:b+(y+s)*_+(y-v)/2,size:v}}],l)}return u}}var fte=(e,t,r,n,i,a,o)=>{var s=tt(o)?t:o,u=cte(r,n,i!==a?i:a,e,s);return i!==a&&u!=null&&(u=u.map(l=>Iu(Iu({},l),{},{position:Iu(Iu({},l.position),{},{offset:l.position.offset-i/2})}))),u},dte=(e,t)=>{var r=y0(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(o=>o.key===r)}}}},hte=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function pte(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Te(e.zIndex)?e.zIndex:t}var mte=e=>{var{chartData:t}=e,r=Qe(),n=_t();return m.useEffect(()=>n?()=>{}:(r(_E(t)),()=>{r(_E(void 0))}),[t,r,n]),null},dT={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},kO=$t({name:"brush",initialState:dT,reducers:{setBrushSettings(e,t){return t.payload==null?dT:t.payload}}}),{setBrushSettings:tse}=kO.actions,gte=kO.reducer,SO=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return{x:Math.min(r,i),y:Math.min(n,a),width:Math.abs(i-r),height:Math.abs(a-n)}},bte=e=>{var{x1:t,y1:r,x2:n,y2:i}=e;return SO({x:t,y:r},{x:n,y:i})};function yte(e){return(e%180+180)%180}var vte=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=yte(i),o=a*Math.PI/180,s=Math.atan(n/r),u=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(u)},xte={dots:[],areas:[],lines:[]},CO=$t({name:"referenceElements",initialState:xte,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Sr(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Sr(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Sr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:rse,removeDot:nse,addArea:Ete,removeArea:Tte,addLine:wte,removeLine:Ate}=CO.actions,_te=CO.reducer,IO=m.createContext(void 0),kte=e=>{var{children:t}=e,[r]=m.useState("".concat(us("recharts"),"-clip")),n=fg();if(n==null)return null;var{x:i,y:a,width:o,height:s}=n;return m.createElement(IO.Provider,{value:r},m.createElement("defs",null,m.createElement("clipPath",{id:r},m.createElement("rect",{x:i,y:a,height:s,width:o}))),t)},OO=()=>m.useContext(IO);class PO{constructor(t){var{x:r,y:n}=t;this.xAxisScale=r,this.yAxisScale=n}map(t,r){var n,i,{position:a}=r;return{x:(n=this.xAxisScale.map(t.x,{position:a}))!==null&&n!==void 0?n:0,y:(i=this.yAxisScale.map(t.y,{position:a}))!==null&&i!==void 0?i:0}}mapWithFallback(t,r){var n,i,{position:a,fallback:o}=r,s,u;return o==="rangeMin"?s=this.yAxisScale.rangeMin():o==="rangeMax"?s=this.yAxisScale.rangeMax():s=0,o==="rangeMin"?u=this.xAxisScale.rangeMin():o==="rangeMax"?u=this.xAxisScale.rangeMax():u=0,{x:(n=this.xAxisScale.map(t.x,{position:a}))!==null&&n!==void 0?n:u,y:(i=this.yAxisScale.map(t.y,{position:a}))!==null&&i!==void 0?i:s}}isInRange(t){var{x:r,y:n}=t,i=r==null||this.xAxisScale.isInRange(r),a=n==null||this.yAxisScale.isInRange(n);return i&&a}}function hT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hT(Object(r),!0).forEach(function(n){Ste(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ste(e,t,r){return(t=Cte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cte(e){var t=Ite(e,"string");return typeof t=="symbol"?t:t+""}function Ite(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gl(){return Gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gl.apply(null,arguments)}var Ote=(e,t)=>{var r;if(m.isValidElement(e))r=m.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{if(!Te(t.x1)||!Te(t.y1)||!Te(t.x2)||!Te(t.y2))return null;r=m.createElement("line",Gl({},t,{className:"recharts-reference-line-line"}))}return r},Pte=(e,t,r,n,i,a)=>{var{x:o,width:s}=a,u=i.map(e,{position:r});if(!Te(u)||t==="discard"&&!i.isInRange(u))return null;var l=[{x:o+s,y:u},{x:o,y:u}];return n==="left"?l.reverse():l},Nte=(e,t,r,n,i,a)=>{var{y:o,height:s}=a,u=i.map(e,{position:r});if(!Te(u)||t==="discard"&&!i.isInRange(u))return null;var l=[{x:u,y:o+s},{x:u,y:o}];return n==="top"?l.reverse():l},Dte=(e,t,r,n)=>{var i=[n.mapWithFallback(e[0],{position:r,fallback:"rangeMin"}),n.mapWithFallback(e[1],{position:r,fallback:"rangeMax"})];return t==="discard"&&i.some(a=>!n.isInRange(a))?null:i},Rte=(e,t,r,n,i,a,o)=>{var{x:s,y:u,segment:l,ifOverflow:c}=o,f=jt(s),d=jt(u);return d?Pte(u,c,n,a,t,r):f?Nte(s,c,n,i,e,r):l!=null&&l.length===2?Dte(l,c,n,new PO({x:e,y:t})):null};function Lte(e){var t=Qe();return m.useEffect(()=>(t(wte(e)),()=>{t(Ate(e))})),null}function Mte(e){var{xAxisId:t,yAxisId:r,shape:n,className:i,ifOverflow:a}=e,o=_t(),s=OO(),u=oe(S=>fn(S,t)),l=oe(S=>dn(S,r)),c=oe(S=>ri(S,"xAxis",t,o)),f=oe(S=>ri(S,"yAxis",r,o)),d=Hs();if(!s||!d||u==null||l==null||c==null||f==null)return null;var h=Rte(c,f,d,e.position,u.orientation,l.orientation,e);if(!h)return null;var p=h[0],b=h[1];if(p==null||b==null)return null;var{x:y,y:v}=p,{x:T,y:x}=b,_=a==="hidden"?"url(#".concat(s,")"):void 0,w=pT(pT({clipPath:_},Nt(e)),{},{x1:y,y1:v,x2:T,y2:x}),A=bte({x1:y,y1:v,x2:T,y2:x});return m.createElement(ur,{zIndex:e.zIndex},m.createElement(Zt,{className:Le("recharts-reference-line",i)},Ote(n,w),m.createElement(ug,Gl({},A,{lowerWidth:A.width,upperWidth:A.width}),m.createElement(cg,{label:e.label}),e.children)))}var jte={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:ft.line};function NO(e){var t=Dt(e,jte);return m.createElement(m.Fragment,null,m.createElement(Lte,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x:t.x,y:t.y,segment:t.segment}),m.createElement(Mte,t))}NO.displayName="ReferenceLine";function mT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function gT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(r),!0).forEach(function(n){Bte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bte(e,t,r){return(t=Fte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fte(e){var t=$te(e,"string");return typeof t=="symbol"?t:t+""}function $te(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xl(){return Xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xl.apply(null,arguments)}var Ute=(e,t,r,n,i,a,o)=>{var s,u,l,c,{x1:f,x2:d,y1:h,y2:p}=o;if(i==null||a==null)return null;var b=new PO({x:i,y:a}),y={x:e?(s=i.map(f,{position:"start"}))!==null&&s!==void 0?s:null:i.rangeMin(),y:r?(u=a.map(h,{position:"start"}))!==null&&u!==void 0?u:null:a.rangeMin()},v={x:t?(l=i.map(d,{position:"end"}))!==null&&l!==void 0?l:null:i.rangeMax(),y:n?(c=a.map(p,{position:"end"}))!==null&&c!==void 0?c:null:a.rangeMax()};return o.ifOverflow==="discard"&&(!b.isInRange(y)||!b.isInRange(v))?null:SO(y,v)},Hte=(e,t)=>{var r;return m.isValidElement(e)?r=m.cloneElement(e,t):typeof e=="function"?r=e(t):r=m.createElement(s0,Xl({},t,{className:"recharts-reference-area-rect"})),r};function zte(e){var t=Qe();return m.useEffect(()=>(t(Ete(e)),()=>{t(Tte(e))})),null}function qte(e){var{x1:t,x2:r,y1:n,y2:i,className:a,shape:o,xAxisId:s,yAxisId:u}=e,l=OO(),c=_t(),f=oe(_=>ri(_,"xAxis",s,c)),d=oe(_=>ri(_,"yAxis",u,c));if(f==null||d==null)return null;var h=jt(t),p=jt(r),b=jt(n),y=jt(i);if(!h&&!p&&!b&&!y&&!o)return null;var v=Ute(h,p,b,y,f,d,e);if(!v&&!o)return null;var T=e.ifOverflow==="hidden",x=T?"url(#".concat(l,")"):void 0;return m.createElement(ur,{zIndex:e.zIndex},m.createElement(Zt,{className:Le("recharts-reference-area",a)},Hte(o,gT(gT({clipPath:x},Nt(e)),v)),v!=null&&m.createElement(ug,Xl({},v,{lowerWidth:v.width,upperWidth:v.width}),m.createElement(cg,{label:e.label}),e.children)))}var Wte={ifOverflow:"discard",xAxisId:0,yAxisId:0,radius:0,fill:"#ccc",label:!1,fillOpacity:.5,stroke:"none",strokeWidth:1,zIndex:ft.area};function jp(e){var t=Dt(e,Wte);return m.createElement(m.Fragment,null,m.createElement(zte,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),m.createElement(qte,t))}jp.displayName="ReferenceArea";function DO(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function Vte(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return vte(n,r)}function Yte(e,t,r){var n=r==="width",{x:i,y:a,width:o,height:s}=e;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function Ts(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function Kte(e,t){return DO(e,t+1)}function Gte(e,t,r,n,i){for(var a=(n||[]).slice(),{start:o,end:s}=t,u=0,l=1,c=o,f=function(){var p=n?.[u];if(p===void 0)return{v:DO(n,l)};var b=u,y,v=()=>(y===void 0&&(y=r(p,b)),y),T=p.coordinate,x=u===0||Ts(e,T,v,c,s);x||(u=0,c=o,l+=1),x&&(c=T+e*(v()/2+i),u+=l)},d;l<=a.length;)if(d=f(),d)return d.v;return[]}function Xte(e,t,r,n,i){var a=(n||[]).slice(),o=a.length;if(o===0)return[];for(var{start:s,end:u}=t,l=1;l<=o;l++){for(var c=(o-1)%l,f=s,d=!0,h=function(){var _=n[b];if(_==null)return 0;var w=b,A,S=()=>(A===void 0&&(A=r(_,w)),A),O=_.coordinate,R=b===c||Ts(e,O,S,f,u);if(!R)return d=!1,1;R&&(f=O+e*(S()/2+i))},p,b=c;b<o&&(p=h(),!(p!==0&&p===1));b+=l);if(d){for(var y=[],v=c;v<o;v+=l){var T=n[v];T!=null&&y.push(T)}return y}}return[]}function bT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bT(Object(r),!0).forEach(function(n){Zte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zte(e,t,r){return(t=Qte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qte(e){var t=Jte(e,"string");return typeof t=="symbol"?t:t+""}function Jte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ere(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,{start:s}=t,{end:u}=t,l=function(d){var h=a[d];if(h==null)return 1;var p=h,b,y=()=>(b===void 0&&(b=r(h,d)),b);if(d===o-1){var v=e*(p.coordinate+e*y()/2-u);a[d]=p=Rt(Rt({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate})}else a[d]=p=Rt(Rt({},p),{},{tickCoord:p.coordinate});if(p.tickCoord!=null){var T=Ts(e,p.tickCoord,y,s,u);T&&(u=p.tickCoord-e*(y()/2+i),a[d]=Rt(Rt({},p),{},{isShow:!0}))}},c=o-1;c>=0;c--)l(c);return a}function tre(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,{start:u,end:l}=t;if(a){var c=n[s-1];if(c!=null){var f=r(c,s-1),d=e*(c.coordinate+e*f/2-l);if(o[s-1]=c=Rt(Rt({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate}),c.tickCoord!=null){var h=Ts(e,c.tickCoord,()=>f,u,l);h&&(l=c.tickCoord-e*(f/2+i),o[s-1]=Rt(Rt({},c),{},{isShow:!0}))}}}for(var p=a?s-1:s,b=function(T){var x=o[T];if(x==null)return 1;var _=x,w,A=()=>(w===void 0&&(w=r(x,T)),w);if(T===0){var S=e*(_.coordinate-e*A()/2-u);o[T]=_=Rt(Rt({},_),{},{tickCoord:S<0?_.coordinate-S*e:_.coordinate})}else o[T]=_=Rt(Rt({},_),{},{tickCoord:_.coordinate});if(_.tickCoord!=null){var O=Ts(e,_.tickCoord,A,u,l);O&&(u=_.tickCoord+e*(A()/2+i),o[T]=Rt(Rt({},_),{},{isShow:!0}))}},y=0;y<p;y++)b(y);return o}function dg(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:o,orientation:s,interval:u,tickFormatter:l,unit:c,angle:f}=e;if(!i||!i.length||!n)return[];if(se(u)||Vs.isSsr){var d;return(d=Kte(i,se(u)?u:0))!==null&&d!==void 0?d:[]}var h=[],p=s==="top"||s==="bottom"?"width":"height",b=c&&p==="width"?Zo(c,{fontSize:t,letterSpacing:r}):{width:0,height:0},y=(w,A)=>{var S=typeof l=="function"?l(w.value,A):w.value;return p==="width"?Vte(Zo(S,{fontSize:t,letterSpacing:r}),b,f):Zo(S,{fontSize:t,letterSpacing:r})[p]},v=i[0],T=i[1],x=i.length>=2&&v!=null&&T!=null?nr(T.coordinate-v.coordinate):1,_=Yte(a,x,p);return u==="equidistantPreserveStart"?Gte(x,_,y,i,o):u==="equidistantPreserveEnd"?Xte(x,_,y,i,o):(u==="preserveStart"||u==="preserveStartEnd"?h=tre(x,_,y,i,o,u==="preserveStartEnd"):h=ere(x,_,y,i,o),h.filter(w=>w.isShow))}var rre=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){Array.from(t).forEach(c=>{if(c){var f=c.getBoundingClientRect();f.width>o&&(o=f.width)}});var s=r?r.getBoundingClientRect().width:0,u=i+a,l=o+u+s+(r?n:0);return Math.round(l)}return 0},nre={xAxis:{},yAxis:{}},RO=$t({name:"renderedTicks",initialState:nre,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:n,ticks:i}=t.payload;e[r][n]=i},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:n}=t.payload;delete e[r][n]}}}),{setRenderedTicks:ire,removeRenderedTicks:are}=RO.actions,ore=RO.reducer,sre=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function ure(e,t){if(e==null)return{};var r,n,i=lre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qi.apply(null,arguments)}function yT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yT(Object(r),!0).forEach(function(n){cre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cre(e,t,r){return(t=fre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fre(e){var t=dre(e,"string");return typeof t=="symbol"?t:t+""}function dre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var An={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:ft.axis};function hre(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:o,axisLine:s,otherSvgProps:u}=e;if(!s)return null;var l=nt(nt(nt({},u),Fr(s)),{},{fill:"none"});if(a==="top"||a==="bottom"){var c=+(a==="top"&&!o||a==="bottom"&&o);l=nt(nt({},l),{},{x1:t,y1:r+c*i,x2:t+n,y2:r+c*i})}else{var f=+(a==="left"&&!o||a==="right"&&o);l=nt(nt({},l),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return m.createElement("line",qi({},l,{className:Le("recharts-cartesian-axis-line",La(s,"className"))}))}function pre(e,t,r,n,i,a,o,s,u){var l,c,f,d,h,p,b=s?-1:1,y=e.tickSize||o,v=se(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":l=c=e.coordinate,d=r+ +!s*i,f=d-b*y,p=f-b*u,h=v;break;case"left":f=d=e.coordinate,c=t+ +!s*n,l=c-b*y,h=l-b*u,p=v;break;case"right":f=d=e.coordinate,c=t+ +s*n,l=c+b*y,h=l+b*u,p=v;break;default:l=c=e.coordinate,d=r+ +s*i,f=d+b*y,p=f+b*u,h=v;break}return{line:{x1:l,y1:f,x2:c,y2:d},tick:{x:h,y:p}}}function mre(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function gre(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function bre(e){var{option:t,tickProps:r,value:n}=e,i,a=Le(r.className,"recharts-cartesian-axis-tick-value");if(m.isValidElement(t))i=m.cloneElement(t,nt(nt({},r),{},{className:a}));else if(typeof t=="function")i=t(nt(nt({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=Le(o,QJ(t))),i=m.createElement(sg,qi({},r,{className:o}),n)}return i}function yre(e){var{ticks:t,axisType:r,axisId:n}=e,i=Qe();return m.useEffect(()=>{if(n==null||r==null)return Qa;var a=t.map(o=>({value:o.value,coordinate:o.coordinate,offset:o.offset,index:o.index}));return i(ire({ticks:a,axisId:n,axisType:r})),()=>{i(are({axisId:n,axisType:r}))}},[i,t,n,r]),null}var vre=m.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:a,tickFormatter:o,unit:s,padding:u,tickTextProps:l,orientation:c,mirror:f,x:d,y:h,width:p,height:b,tickSize:y,tickMargin:v,fontSize:T,letterSpacing:x,getTicksConfig:_,events:w,axisType:A,axisId:S}=e,O=dg(nt(nt({},_),{},{ticks:r}),T,x),R=Fr(_),C=js(n),M=tO(R.textAnchor)?R.textAnchor:mre(c,f),L=gre(c,f),Q={};typeof i=="object"&&(Q=i);var H=nt(nt({},R),{},{fill:"none"},Q),U=O.map(V=>nt({entry:V},pre(V,d,h,p,b,c,y,f,v))),q=U.map(V=>{var{entry:re,line:N}=V;return m.createElement(Zt,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},i&&m.createElement("line",qi({},H,N,{className:Le("recharts-cartesian-axis-tick-line",La(i,"className"))})))}),J=U.map((V,re)=>{var N,le,{entry:he,tick:P}=V,pe=nt(nt(nt(nt({verticalAnchor:L},R),{},{textAnchor:M,stroke:"none",fill:a},P),{},{index:re,payload:he,visibleTicksCount:O.length,tickFormatter:o,padding:u},l),{},{angle:(N=(le=l?.angle)!==null&&le!==void 0?le:R.angle)!==null&&N!==void 0?N:0}),we=nt(nt({},pe),C);return m.createElement(Zt,qi({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(he.value,"-").concat(he.coordinate,"-").concat(he.tickCoord)},Km(w,he,re)),n&&m.createElement(bre,{option:n,tickProps:we,value:"".concat(typeof o=="function"?o(he.value,re):he.value).concat(s||"")}))});return m.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(A,"-ticks")},m.createElement(yre,{ticks:O,axisId:S,axisType:A}),J.length>0&&m.createElement(ur,{zIndex:ft.label},m.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(A,"-tick-labels"),ref:t},J)),q.length>0&&m.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(A,"-tick-lines")},q))}),xre=m.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s,axisType:u,axisId:l}=e,c=ure(e,sre),[f,d]=m.useState(""),[h,p]=m.useState(""),b=m.useRef(null);m.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var v;return rre({ticks:b.current,label:(v=e.labelRef)===null||v===void 0?void 0:v.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var y=m.useCallback(v=>{if(v){var T=v.getElementsByClassName("recharts-cartesian-axis-tick-value");b.current=T;var x=T[0];if(x){var _=window.getComputedStyle(x),w=_.fontSize,A=_.letterSpacing;(w!==f||A!==h)&&(d(w),p(A))}}},[f,h]);return o||n!=null&&n<=0||i!=null&&i<=0?null:m.createElement(ur,{zIndex:e.zIndex},m.createElement(Zt,{className:Le("recharts-cartesian-axis",a)},m.createElement(hre,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Fr(e)}),m.createElement(vre,{ref:y,axisType:u,events:c,fontSize:f,getTicksConfig:e,height:e.height,letterSpacing:h,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:l}),m.createElement(ug,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},m.createElement(cg,{label:e.label,labelRef:e.labelRef}),e.children)))}),hg=m.forwardRef((e,t)=>{var r=Dt(e,An);return m.createElement(xre,qi({},r,{ref:t}))});hg.displayName="CartesianAxis";var Ere=["x1","y1","x2","y2","key"],Tre=["offset"],wre=["xAxisId","yAxisId"],Are=["xAxisId","yAxisId"];function vT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vT(Object(r),!0).forEach(function(n){_re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _re(e,t,r){return(t=kre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kre(e){var t=Sre(e,"string");return typeof t=="symbol"?t:t+""}function Sre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ci(){return Ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ci.apply(null,arguments)}function Zl(e,t){if(e==null)return{};var r,n,i=Cre(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Cre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ire=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:o,ry:s}=e;return m.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function LO(e){var{option:t,lineItemProps:r}=e,n;if(m.isValidElement(t))n=m.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:a,y1:o,x2:s,y2:u,key:l}=r,c=Zl(r,Ere),f=(i=Fr(c))!==null&&i!==void 0?i:{},{offset:d}=f,h=Zl(f,Tre);n=m.createElement("line",Ci({},h,{x1:a,y1:o,x2:s,y2:u,fill:"none",key:l}))}return n}function Ore(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=Zl(e,wre),u=i.map((l,c)=>{var f=Lt(Lt({},s),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return m.createElement(LO,{key:"line-".concat(c),option:n,lineItemProps:f})});return m.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Pre(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=Zl(e,Are),u=i.map((l,c)=>{var f=Lt(Lt({},s),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return m.createElement(LO,{option:n,lineItemProps:f,key:"line-".concat(c)})});return m.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Nre(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:o,horizontalPoints:s,horizontal:u=!0}=e;if(!u||!t||!t.length||s==null)return null;var l=s.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==l[0]&&l.unshift(0);var c=l.map((f,d)=>{var h=l[d+1],p=h==null,b=p?i+o-f:h-f;if(b<=0)return null;var y=d%t.length;return m.createElement("rect",{key:"react-".concat(d),y:f,x:n,height:b,width:a,stroke:"none",fill:t[y],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function Dre(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:o,height:s,verticalPoints:u}=e;if(!t||!r||!r.length)return null;var l=u.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==l[0]&&l.unshift(0);var c=l.map((f,d)=>{var h=l[d+1],p=h==null,b=p?i+o-f:h-f;if(b<=0)return null;var y=d%r.length;return m.createElement("rect",{key:"react-".concat(d),x:f,y:a,width:b,height:s,stroke:"none",fill:r[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var Rre=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return iS(dg(Lt(Lt(Lt({},An),r),{},{ticks:aS(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},Lre=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return iS(dg(Lt(Lt(Lt({},An),r),{},{ticks:aS(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},Mre={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:ft.grid};function pg(e){var t=lS(),r=cS(),n=uS(),i=Lt(Lt({},Dt(e,Mre)),{},{x:se(e.x)?e.x:n.left,y:se(e.y)?e.y:n.top,width:se(e.width)?e.width:n.width,height:se(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:o,x:s,y:u,width:l,height:c,syncWithTicks:f,horizontalValues:d,verticalValues:h}=i,p=_t(),b=oe(R=>dE(R,"xAxis",a,p)),y=oe(R=>dE(R,"yAxis",o,p));if(!ja(l)||!ja(c)||!se(s)||!se(u))return null;var v=i.verticalCoordinatesGenerator||Rre,T=i.horizontalCoordinatesGenerator||Lre,{horizontalPoints:x,verticalPoints:_}=i;if((!x||!x.length)&&typeof T=="function"){var w=d&&d.length,A=T({yAxis:y?Lt(Lt({},y),{},{ticks:w?d:y.ticks}):void 0,width:t??l,height:r??c,offset:n},w?!0:f);b1(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(x=A)}if((!_||!_.length)&&typeof v=="function"){var S=h&&h.length,O=v({xAxis:b?Lt(Lt({},b),{},{ticks:S?h:b.ticks}):void 0,width:t??l,height:r??c,offset:n},S?!0:f);b1(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(_=O)}return m.createElement(ur,{zIndex:i.zIndex},m.createElement("g",{className:"recharts-cartesian-grid"},m.createElement(Ire,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),m.createElement(Nre,Ci({},i,{horizontalPoints:x})),m.createElement(Dre,Ci({},i,{verticalPoints:_})),m.createElement(Ore,Ci({},i,{offset:n,horizontalPoints:x,xAxis:b,yAxis:y})),m.createElement(Pre,Ci({},i,{offset:n,verticalPoints:_,xAxis:b,yAxis:y}))))}pg.displayName="CartesianGrid";var jre={},MO=$t({name:"errorBars",initialState:jre,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:ise,replaceErrorBar:ase,removeErrorBar:ose}=MO.actions,Bre=MO.reducer,Fre=["children"];function $re(e,t){if(e==null)return{};var r,n,i=Ure(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Ure(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Hre={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},zre=m.createContext(Hre);function jO(e){var{children:t}=e,r=$re(e,Fre);return m.createElement(zre.Provider,{value:r},t)}function mg(e,t){var r,n,i=oe(l=>fn(l,e)),a=oe(l=>dn(l,t)),o=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:pt.allowDataOverflow,s=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:mt.allowDataOverflow,u=o||s;return{needClip:u,needClipX:o,needClipY:s}}function BO(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=fg(),{needClipX:a,needClipY:o,needClip:s}=mg(t,r);if(!s||!i)return null;var{x:u,y:l,width:c,height:f}=i;return m.createElement("clipPath",{id:"clipPath-".concat(n)},m.createElement("rect",{x:a?u:u-c/2,y:o?l:l-f/2,width:a?c:c*2,height:o?f:f*2}))}var FO=(e,t,r,n)=>ii(e,"xAxis",t,n),$O=(e,t,r,n)=>ni(e,"xAxis",t,n),UO=(e,t,r,n)=>ii(e,"yAxis",r,n),HO=(e,t,r,n)=>ni(e,"yAxis",r,n),qre=B([Be,FO,UO,$O,HO],(e,t,r,n,i)=>Nn(e,"xAxis")?Ba(t,n,!1):Ba(r,i,!1)),Wre=(e,t,r,n,i)=>i;function Vre(e){return e.type==="line"}var Yre=B([nf,Wre],(e,t)=>e.filter(Vre).find(r=>r.id===t)),Kre=B([Be,FO,UO,$O,HO,Yre,qre,Ys],(e,t,r,n,i,a,o,s)=>{var{chartData:u,dataStartIndex:l,dataEndIndex:c}=s;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||o==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:f,data:d}=a,h;if(d!=null&&d.length>0?h=d:h=u?.slice(l,c+1),h!=null)return mne({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:o,displayedData:h})}});function Gre(e){var t=js(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:a}=t,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=r),(Number.isNaN(s)||s<0)&&(s=n),{r:o,strokeWidth:s}}return{r,strokeWidth:n}}var Xre=["id"],Zre=["type","layout","connectNulls","needClip","shape"],Qre=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function ws(){return ws=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ws.apply(null,arguments)}function xT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xT(Object(r),!0).forEach(function(n){Jre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jre(e,t,r){return(t=ene(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ene(e){var t=tne(e,"string");return typeof t=="symbol"?t:t+""}function tne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gg(e,t){if(e==null)return{};var r,n,i=rne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var nne=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Dc(r,t),payload:e}]},ine=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,unit:u,tooltipType:l,id:c}=e,f={dataDefinedOnItem:r,getPosition:Qa,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Dc(o,t),hide:s,type:l,color:n,unit:u,graphicalItemId:c}};return m.createElement(vO,{tooltipEntrySettings:f})}),zO=(e,t)=>"".concat(t,"px ").concat(e,"px");function ane(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var one=(e,t,r)=>{var n=r.reduce((d,h)=>d+h,0);if(!n)return zO(t,e);for(var i=Math.floor(e/n),a=e%n,o=[],s=0,u=0;s<r.length;u+=(l=r[s])!==null&&l!==void 0?l:0,++s){var l,c=r[s];if(c!=null&&u+c>a){o=[...r.slice(0,s),a-u];break}}var f=o.length%2===0?[0,t]:[t];return[...ane(r,i),...o,...f].map(d=>"".concat(d,"px")).join(", ")};function sne(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n,{id:s}=n,u=gg(n,Xre),l=Fr(u);return m.createElement(Fee,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:l,needClip:o,clipPathId:t})}function une(e){var{showLabels:t,children:r,points:n}=e,i=m.useMemo(()=>n?.map(a=>{var o,s,u={x:(o=a.x)!==null&&o!==void 0?o:0,y:(s=a.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Jr(Jr({},u),{},{value:a.value,payload:a.payload,viewBox:u,parentViewBox:void 0,fill:void 0})}),[n]);return m.createElement(uO,{value:t?i:void 0},r)}function ET(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:u,needClip:l,shape:c}=a,f=gg(a,Zre),d=Jr(Jr({},Nt(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:l?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:s,connectNulls:u,strokeDasharray:i??a.strokeDasharray});return m.createElement(m.Fragment,null,n?.length>1&&m.createElement(mO,ws({shapeType:"curve",option:c},d,{pathRef:r})),m.createElement(sne,{points:n,clipPathId:t,props:a}))}function lne(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function cne(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:u,animationBegin:l,animationDuration:c,animationEasing:f,animateNewValues:d,width:h,height:p,onAnimationEnd:b,onAnimationStart:y}=r,v=i.current,T=Hc(o,"recharts-line-"),x=m.useRef(T),[_,w]=m.useState(!1),A=!_,S=m.useCallback(()=>{typeof b=="function"&&b(),w(!1)},[b]),O=m.useCallback(()=>{typeof y=="function"&&y(),w(!0)},[y]),R=lne(n.current),C=m.useRef(0);x.current!==T&&(C.current=a.current,x.current=T);var M=C.current;return m.createElement(une,{points:o,showLabels:A},r.children,m.createElement(Uc,{animationId:T,begin:l,duration:c,isActive:u,easing:f,onAnimationEnd:S,onAnimationStart:O,key:T},L=>{var Q=at(M,R+M,L),H=Math.min(Q,R),U;if(u)if(s){var q="".concat(s).split(/[,\s]+/gim).map(re=>parseFloat(re));U=one(H,R,q)}else U=zO(R,H);else U=s==null?void 0:String(s);if(L>0&&R>0&&(i.current=o,a.current=Math.max(a.current,H)),v){var J=v.length/o.length,V=L===1?o:o.map((re,N)=>{var le=Math.floor(N*J);if(v[le]){var he=v[le];return Jr(Jr({},re),{},{x:at(he.x,re.x,L),y:at(he.y,re.y,L)})}return d?Jr(Jr({},re),{},{x:at(h*2,re.x,L),y:at(p/2,re.y,L)}):Jr(Jr({},re),{},{x:re.x,y:re.y})});return i.current=V,m.createElement(ET,{props:r,points:V,clipPathId:t,pathRef:n,strokeDasharray:U})}return m.createElement(ET,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:U})}),m.createElement(cO,{label:r.label}))}function fne(e){var{clipPathId:t,props:r}=e,n=m.useRef(null),i=m.useRef(0),a=m.useRef(null);return m.createElement(cne,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var dne=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:lt(e.payload,t)}};class hne extends m.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:a,yAxisId:o,top:s,left:u,width:l,height:c,id:f,needClip:d,zIndex:h}=this.props;if(t)return null;var p=Le("recharts-line",i),b=f,{r:y,strokeWidth:v}=Gre(r),T=pO(r),x=y*2+v,_=d?"url(#clipPath-".concat(T?"":"dots-").concat(b,")"):void 0;return m.createElement(ur,{zIndex:h},m.createElement(Zt,{className:p},d&&m.createElement("defs",null,m.createElement(BO,{clipPathId:b,xAxisId:a,yAxisId:o}),!T&&m.createElement("clipPath",{id:"clipPath-dots-".concat(b)},m.createElement("rect",{x:u-x/2,y:s-x/2,width:l+x,height:c+x}))),m.createElement(jO,{xAxisId:a,yAxisId:o,data:n,dataPointFormatter:dne,errorBarOffset:0},m.createElement(fne,{props:this.props,clipPathId:b}))),m.createElement(ate,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:_}))}}var qO={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:ft.line,type:"linear"};function pne(e){var t=Dt(e,qO),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:u,hide:l,isAnimationActive:c,label:f,legendType:d,xAxisId:h,yAxisId:p,id:b}=t,y=gg(t,Qre),{needClip:v}=mg(h,p),T=fg(),x=Xi(),_=_t(),w=oe(C=>Kre(C,h,p,_,b));if(x!=="horizontal"&&x!=="vertical"||w==null||T==null)return null;var{height:A,width:S,x:O,y:R}=T;return m.createElement(hne,ws({},y,{id:b,connectNulls:s,dot:u,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:c,hide:l,label:f,legendType:d,xAxisId:h,yAxisId:p,points:w,layout:x,height:A,width:S,left:O,top:R,needClip:v}))}function mne(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:u}=e;return u.map((l,c)=>{var f=lt(l,o);if(t==="horizontal"){var d=f1({axis:r,ticks:i,bandSize:s,entry:l,index:c}),h=tt(f)?null:n.scale.map(f);return{x:d,y:h??null,value:f,payload:l}}var p=tt(f)?null:r.scale.map(f),b=f1({axis:n,ticks:a,bandSize:s,entry:l,index:c});return p==null||b==null?null:{x:p,y:b,value:f,payload:l}}).filter(Boolean)}function gne(e){var t=Dt(e,qO),r=_t();return m.createElement(EO,{id:t.id,type:"line"},n=>m.createElement(m.Fragment,null,m.createElement(xO,{legendPayload:nne(t)}),m.createElement(ine,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),m.createElement(wO,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),m.createElement(pne,ws({},t,{id:n}))))}var WO=m.memo(gne,Ws);WO.displayName="Line";function ea(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:AO}function ta(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:AO}var bne="Invariant failed";function yne(e,t){throw new Error(bne)}function Bp(){return Bp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bp.apply(null,arguments)}function bg(e){return m.createElement(mO,Bp({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var vne=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(se(t))return t;var a=se(n)||tt(n);return a?t(n,i):(a||yne(),r)}},xne=(e,t,r)=>r,Ene=(e,t)=>t,nu=B([nf,Ene],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Tne=B([nu],e=>e?.maxBarSize),wne=(e,t,r,n)=>n,Ane=B([Be,nf,ea,ta,xne],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),_ne=(e,t,r)=>{var n=Be(e),i=ea(e,t),a=ta(e,t);if(!(i==null||a==null))return n==="horizontal"?Np(e,"yAxis",a,r):Np(e,"xAxis",i,r)},kne=(e,t)=>{var r=Be(e),n=ea(e,t),i=ta(e,t);if(!(n==null||i==null))return r==="horizontal"?fE(e,"xAxis",n):fE(e,"yAxis",i)},Sne=B([Ane,HV,kne],ote),Cne=(e,t,r)=>{var n,i,a=nu(e,t);if(a==null)return 0;var o=ea(e,t),s=ta(e,t);if(o==null||s==null)return 0;var u=Be(e),l=HS(e),{maxBarSize:c}=a,f=tt(c)?l:c,d,h;return u==="horizontal"?(d=ii(e,"xAxis",o,r),h=ni(e,"xAxis",o,r)):(d=ii(e,"yAxis",s,r),h=ni(e,"yAxis",s,r)),(n=(i=Ba(d,h,!0))!==null&&i!==void 0?i:f)!==null&&n!==void 0?n:0},VO=(e,t,r)=>{var n=Be(e),i=ea(e,t),a=ta(e,t);if(!(i==null||a==null)){var o,s;return n==="horizontal"?(o=ii(e,"xAxis",i,r),s=ni(e,"xAxis",i,r)):(o=ii(e,"yAxis",a,r),s=ni(e,"yAxis",a,r)),Ba(o,s)}},Ine=B([Sne,HS,UV,zS,Cne,VO,Tne],fte),One=(e,t,r)=>{var n=ea(e,t);if(n!=null)return ii(e,"xAxis",n,r)},Pne=(e,t,r)=>{var n=ta(e,t);if(n!=null)return ii(e,"yAxis",n,r)},Nne=(e,t,r)=>{var n=ea(e,t);if(n!=null)return ni(e,"xAxis",n,r)},Dne=(e,t,r)=>{var n=ta(e,t);if(n!=null)return ni(e,"yAxis",n,r)},Rne=B([Ine,nu],hte),Lne=B([_ne,nu],dte),Mne=B([At,n0,One,Pne,Nne,Dne,Rne,Be,DV,VO,Lne,nu,wne],(e,t,r,n,i,a,o,s,u,l,c,f,d)=>{var{chartData:h,dataStartIndex:p,dataEndIndex:b}=u;if(!(f==null||o==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||i==null||a==null||l==null)){var{data:y}=f,v;if(y!=null&&y.length>0?v=y:v=h?.slice(p,b+1),v!=null)return cie({layout:s,barSettings:f,pos:o,parentViewBox:t,bandSize:l,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:c,displayedData:v,offset:e,cells:d,dataStartIndex:p})}}),jne=["index"];function Fp(){return Fp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fp.apply(null,arguments)}function Bne(e,t){if(e==null)return{};var r,n,i=Fne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Fne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var YO=m.createContext(void 0),$ne=e=>{var t=m.useContext(YO);if(t!=null)return t.stackId;if(e!=null)return tq(e)},Une=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Hne=e=>{var t=m.useContext(YO);if(t!=null){var{stackId:r}=t;return"url(#".concat(Une(r,e),")")}},KO=e=>{var{index:t}=e,r=Bne(e,jne),n=Hne(t);return m.createElement(Zt,Fp({className:"recharts-bar-stack-layer",clipPath:n},r))},zne=["onMouseEnter","onMouseLeave","onClick"],qne=["value","background","tooltipPosition"],Wne=["id"],Vne=["onMouseEnter","onClick","onMouseLeave"];function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ai.apply(null,arguments)}function TT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TT(Object(r),!0).forEach(function(n){Yne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yne(e,t,r){return(t=Kne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kne(e){var t=Gne(e,"string");return typeof t=="symbol"?t:t+""}function Gne(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ql(e,t){if(e==null)return{};var r,n,i=Xne(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Xne(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Zne=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Dc(r,t),payload:e}]},Qne=m.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:o,unit:s,tooltipType:u,id:l}=e,c={dataDefinedOnItem:void 0,getPosition:Qa,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:Dc(a,t),hide:o,type:u,color:i,unit:s,graphicalItemId:l}};return m.createElement(vO,{tooltipEntrySettings:c})});function Jne(e){var t=oe(zi),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:u}=a,l=Ql(a,zne),c=gO(o,n,a.id),f=bO(s),d=yO(u,n,a.id);if(!i||r==null)return null;var h=js(i);return m.createElement(ur,{zIndex:pte(i,ft.barBackground)},r.map((p,b)=>{var{value:y,background:v,tooltipPosition:T}=p,x=Ql(p,qne);if(!v)return null;var _=c(p,b),w=f(p,b),A=d(p,b),S=Wt(Wt(Wt(Wt(Wt({option:i,isActive:String(b)===t},x),{},{fill:"#eee"},v),h),Km(l,p,b)),{},{onMouseEnter:_,onMouseLeave:w,onClick:A,dataKey:n,index:b,className:"recharts-bar-background-rectangle"});return m.createElement(bg,ai({key:"background-bar-".concat(b)},S))}))}function eie(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var o={x:a.x,y:a.y,width:a.width,lowerWidth:a.width,upperWidth:a.width,height:a.height};return Wt(Wt({},o),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:o,fill:a.fill})});return m.createElement(uO,{value:t?i:void 0},r)}function tie(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:o}=e,s=oe(zi),u=oe(jI),l=r&&String(i.originalDataIndex)===s&&(u==null||o===u),[c,f]=m.useState(!1),[d,h]=m.useState(!1);m.useEffect(()=>{var x;return l?(f(!0),x=requestAnimationFrame(()=>{h(!0)})):h(!1),()=>{cancelAnimationFrame(x)}},[l]);var p=m.useCallback(()=>{l||f(!1)},[l]),b=l&&d,y=l||c,v;l?r===!0?v=t:v=r:v=t;var T=m.createElement(bg,ai({},n,{name:String(n.name)},i,{isActive:b,option:v,index:a,dataKey:o,onTransitionEnd:p}));return y?m.createElement(ur,{zIndex:ft.activeBar},m.createElement(KO,{index:i.originalDataIndex},T)):T}function rie(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return m.createElement(bg,ai({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function nie(e){var t,{data:r,props:n}=e,i=(t=Fr(n))!==null&&t!==void 0?t:{},{id:a}=i,o=Ql(i,Wne),{shape:s,dataKey:u,activeBar:l}=n,{onMouseEnter:c,onClick:f,onMouseLeave:d}=n,h=Ql(n,Vne),p=gO(c,u,a),b=bO(d),y=yO(f,u,a);return r?m.createElement(m.Fragment,null,r.map((v,T)=>m.createElement(KO,ai({index:v.originalDataIndex,key:"rectangle-".concat(v?.x,"-").concat(v?.y,"-").concat(v?.value,"-").concat(T),className:"recharts-bar-rectangle"},Km(h,v,T),{onMouseEnter:p(v,T),onMouseLeave:b(v,T),onClick:y(v,T)}),l?m.createElement(tie,{shape:s,activeBar:l,baseProps:o,entry:v,index:T,dataKey:u}):m.createElement(rie,{shape:s,baseProps:o,entry:v,index:T,dataKey:u})))):null}function iie(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:u,onAnimationEnd:l,onAnimationStart:c}=t,f=r.current,d=Hc(t,"recharts-bar-"),[h,p]=m.useState(!1),b=!h,y=m.useCallback(()=>{typeof l=="function"&&l(),p(!1)},[l]),v=m.useCallback(()=>{typeof c=="function"&&c(),p(!0)},[c]);return m.createElement(eie,{showLabels:b,rects:n},m.createElement(Uc,{animationId:d,begin:o,duration:s,isActive:a,easing:u,onAnimationEnd:y,onAnimationStart:v,key:d},T=>{var x=T===1?n:n?.map((_,w)=>{var A=f&&f[w];if(A)return Wt(Wt({},_),{},{x:at(A.x,_.x,T),y:at(A.y,_.y,T),width:at(A.width,_.width,T),height:at(A.height,_.height,T)});if(i==="horizontal"){var S=at(0,_.height,T),O=at(_.stackedBarStart,_.y,T);return Wt(Wt({},_),{},{y:O,height:S})}var R=at(0,_.width,T),C=at(_.stackedBarStart,_.x,T);return Wt(Wt({},_),{},{width:R,x:C})});return T>0&&(r.current=x??null),x==null?null:m.createElement(Zt,null,m.createElement(nie,{props:t,data:x}))}),m.createElement(cO,{label:t.label}),t.children)}function aie(e){var t=m.useRef(null);return m.createElement(iie,{previousRectanglesRef:t,props:e})}var GO=0,oie=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:lt(e,t)}};class sie extends m.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:o,needClip:s,background:u,id:l}=this.props;if(t||r==null)return null;var c=Le("recharts-bar",i),f=l;return m.createElement(Zt,{className:c,id:l},s&&m.createElement("defs",null,m.createElement(BO,{clipPathId:f,xAxisId:a,yAxisId:o})),m.createElement(Zt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},m.createElement(Jne,{data:r,dataKey:n,background:u,allOtherBarProps:this.props}),m.createElement(aie,this.props)))}}var uie={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:GO,xAxisId:0,yAxisId:0,zIndex:ft.bar};function lie(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:u,animationEasing:l,isAnimationActive:c}=e,{needClip:f}=mg(t,r),d=Xi(),h=_t(),p=ree(e.children,GI),b=oe(T=>Mne(T,e.id,h,p));if(d!=="vertical"&&d!=="horizontal")return null;var y,v=b?.[0];return v==null||v.height==null||v.width==null?y=0:y=d==="vertical"?v.height/2:v.width/2,m.createElement(jO,{xAxisId:t,yAxisId:r,data:b,dataPointFormatter:oie,errorBarOffset:y},m.createElement(sie,ai({},e,{layout:d,needClip:f,data:b,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:u,animationEasing:l,isAnimationActive:c})))}function cie(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:a,bandSize:o,xAxis:s,yAxis:u,xAxisTicks:l,yAxisTicks:c,stackedData:f,displayedData:d,offset:h,cells:p,parentViewBox:b,dataStartIndex:y}=e,v=t==="horizontal"?u:s,T=f?v.scale.domain():null,x=rq({numericAxis:v}),_=v.scale.map(x);return d.map((w,A)=>{var S,O,R,C,M,L;if(f){var Q=f[A+y];if(Q==null)return null;S=Xz(Q,T)}else S=lt(w,r),Array.isArray(S)||(S=[x,S]);var H=vne(n,GO)(S[1],A);if(t==="horizontal"){var U,q=u.scale.map(S[0]),J=u.scale.map(S[1]);if(q==null||J==null)return null;O=d1({axis:s,ticks:l,bandSize:o,offset:a.offset,entry:w,index:A}),R=(U=J??q)!==null&&U!==void 0?U:void 0,C=a.size;var V=q-J;if(M=on(V)?0:V,L={x:O,y:h.top,width:C,height:h.height},Math.abs(H)>0&&Math.abs(M)<Math.abs(H)){var re=nr(M||H)*(Math.abs(H)-Math.abs(M));R-=re,M+=re}}else{var N=s.scale.map(S[0]),le=s.scale.map(S[1]);if(N==null||le==null)return null;if(O=N,R=d1({axis:u,ticks:c,bandSize:o,offset:a.offset,entry:w,index:A}),C=le-N,M=a.size,L={x:h.left,y:R,width:h.width,height:M},Math.abs(H)>0&&Math.abs(C)<Math.abs(H)){var he=nr(C||H)*(Math.abs(H)-Math.abs(C));C+=he}}if(O==null||R==null||C==null||M==null||!i&&(C===0||M===0))return null;var P=Wt(Wt({},w),{},{stackedBarStart:_,x:O,y:R,width:C,height:M,value:f?S:S[1],payload:w,background:L,tooltipPosition:{x:O+C/2,y:R+M/2},parentViewBox:b,originalDataIndex:A},p&&p[A]&&p[A].props);return P}).filter(Boolean)}function fie(e){var t=Dt(e,uie),r=$ne(t.stackId),n=_t();return m.createElement(EO,{id:t.id,type:"bar"},i=>m.createElement(m.Fragment,null,m.createElement(xO,{legendPayload:Zne(t)}),m.createElement(Qne,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),m.createElement(wO,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n,hasCustomShape:t.shape!=null}),m.createElement(ur,{zIndex:t.zIndex},m.createElement(lie,ai({},t,{id:i})))))}var XO=m.memo(fie,Ws);XO.displayName="Bar";var die=["domain","range"],hie=["domain","range"];function wT(e,t){if(e==null)return{};var r,n,i=pie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function AT(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function ZO(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=wT(e,die),{domain:a,range:o}=t,s=wT(t,hie);return!AT(r,a)||!AT(n,o)?!1:Ws(i,s)}var mie=["type"],gie=["dangerouslySetInnerHTML","ticks","scale"],bie=["id","scale"];function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$p.apply(null,arguments)}function _T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_T(Object(r),!0).forEach(function(n){yie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yie(e,t,r){return(t=vie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vie(e){var t=xie(e,"string");return typeof t=="symbol"?t:t+""}function xie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Up(e,t){if(e==null)return{};var r,n,i=Eie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Eie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Tie(e){var t=Qe(),r=m.useRef(null),n=fS(),{type:i}=e,a=Up(e,mie),o=Wc(n,"xAxis",i),s=m.useMemo(()=>{if(o!=null)return kT(kT({},a),{},{type:o})},[a,o]);return m.useLayoutEffect(()=>{s!=null&&(r.current===null?t(qee(s)):r.current!==s&&t(Wee({prev:r.current,next:s})),r.current=s)},[s,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(Vee(r.current)),r.current=null)},[t]),null}var wie=e=>{var{xAxisId:t,className:r}=e,n=oe(n0),i=_t(),a="xAxis",o=oe(v=>mI(v,a,t,i)),s=oe(v=>dI(v,t)),u=oe(v=>wX(v,t)),l=oe(v=>RC(v,t));if(s==null||u==null||l==null)return null;var{dangerouslySetInnerHTML:c,ticks:f,scale:d}=e,h=Up(e,gie),{id:p,scale:b}=l,y=Up(l,bie);return m.createElement(hg,$p({},h,y,{x:u.x,y:u.y,width:s.width,height:s.height,className:Le("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:o,axisType:a,axisId:t}))},Aie={allowDataOverflow:pt.allowDataOverflow,allowDecimals:pt.allowDecimals,allowDuplicatedCategory:pt.allowDuplicatedCategory,angle:pt.angle,axisLine:An.axisLine,height:pt.height,hide:!1,includeHidden:pt.includeHidden,interval:pt.interval,label:!1,minTickGap:pt.minTickGap,mirror:pt.mirror,orientation:pt.orientation,padding:pt.padding,reversed:pt.reversed,scale:pt.scale,tick:pt.tick,tickCount:pt.tickCount,tickLine:An.tickLine,tickSize:An.tickSize,type:pt.type,niceTicks:pt.niceTicks,xAxisId:0},_ie=e=>{var t=Dt(e,Aie);return m.createElement(m.Fragment,null,m.createElement(Tie,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),m.createElement(wie,t))},yg=m.memo(_ie,ZO);yg.displayName="XAxis";var kie=["type"],Sie=["dangerouslySetInnerHTML","ticks","scale"],Cie=["id","scale"];function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hp.apply(null,arguments)}function ST(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function CT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ST(Object(r),!0).forEach(function(n){Iie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ST(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Iie(e,t,r){return(t=Oie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oie(e){var t=Pie(e,"string");return typeof t=="symbol"?t:t+""}function Pie(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zp(e,t){if(e==null)return{};var r,n,i=Nie(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Nie(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Die(e){var t=Qe(),r=m.useRef(null),n=fS(),{type:i}=e,a=zp(e,kie),o=Wc(n,"yAxis",i),s=m.useMemo(()=>{if(o!=null)return CT(CT({},a),{},{type:o})},[o,a]);return m.useLayoutEffect(()=>{s!=null&&(r.current===null?t(Yee(s)):r.current!==s&&t(Kee({prev:r.current,next:s})),r.current=s)},[s,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(Gee(r.current)),r.current=null)},[t]),null}function Rie(e){var{yAxisId:t,className:r,width:n,label:i}=e,a=m.useRef(null),o=m.useRef(null),s=oe(n0),u=_t(),l=Qe(),c="yAxis",f=oe(A=>hI(A,t)),d=oe(A=>_X(A,t)),h=oe(A=>mI(A,c,t,u)),p=oe(A=>LC(A,t));if(m.useLayoutEffect(()=>{if(!(n!=="auto"||!f||lg(i)||m.isValidElement(i)||p==null)){var A=a.current;if(A){var S=A.getCalculatedWidth();Math.round(f.width)!==Math.round(S)&&l(Xee({id:t,width:S}))}}},[h,f,l,i,t,n,p]),f==null||d==null||p==null)return null;var{dangerouslySetInnerHTML:b,ticks:y,scale:v}=e,T=zp(e,Sie),{id:x,scale:_}=p,w=zp(p,Cie);return m.createElement(hg,Hp({},T,w,{ref:a,labelRef:o,x:d.x,y:d.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:Le("recharts-".concat(c," ").concat(c),r),viewBox:s,ticks:h,axisType:c,axisId:t}))}var Lie={allowDataOverflow:mt.allowDataOverflow,allowDecimals:mt.allowDecimals,allowDuplicatedCategory:mt.allowDuplicatedCategory,angle:mt.angle,axisLine:An.axisLine,hide:!1,includeHidden:mt.includeHidden,interval:mt.interval,label:!1,minTickGap:mt.minTickGap,mirror:mt.mirror,orientation:mt.orientation,padding:mt.padding,reversed:mt.reversed,scale:mt.scale,tick:mt.tick,tickCount:mt.tickCount,tickLine:An.tickLine,tickSize:An.tickSize,type:mt.type,niceTicks:mt.niceTicks,width:mt.width,yAxisId:0},Mie=e=>{var t=Dt(e,Lie);return m.createElement(m.Fragment,null,m.createElement(Die,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),m.createElement(Rie,t))},vg=m.memo(Mie,ZO);vg.displayName="YAxis";var jie=(e,t)=>t,xg=B([jie,Be,XS,St,DI,Mn,KZ,At],tQ);function Bie(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Eg(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Bie(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var a=e.currentTarget;r=a.offsetWidth>0?t.width/a.offsetWidth:1,n=a.offsetHeight>0?t.height/a.offsetHeight:1}var o=(s,u)=>({relativeX:Math.round((s-t.left)/r),relativeY:Math.round((u-t.top)/n)});return"touches"in e?Array.from(e.touches).map(s=>o(s.clientX,s.clientY)):o(e.clientX,e.clientY)}var QO=yr("mouseClick"),JO=$s();JO.startListening({actionCreator:QO,effect:(e,t)=>{var r=e.payload,n=xg(t.getState(),Eg(r));n?.activeIndex!=null&&t.dispatch(UX({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var qp=yr("mouseMove"),eP=$s(),ha=null,bi=null,dh=null;eP.startListening({actionCreator:qp,effect:(e,t)=>{var r=e.payload,n=t.getState(),{throttleDelay:i,throttledEvents:a}=n.eventSettings,o=a==="all"||a?.includes("mousemove");ha!==null&&(cancelAnimationFrame(ha),ha=null),bi!==null&&(typeof i!="number"||!o)&&(clearTimeout(bi),bi=null),dh=Eg(r);var s=()=>{var u=t.getState(),l=tu(u,u.tooltip.settings.shared);if(!dh){ha=null,bi=null;return}if(l==="axis"){var c=xg(u,dh);c?.activeIndex!=null?t.dispatch(wI({activeIndex:c.activeIndex,activeDataKey:void 0,activeCoordinate:c.activeCoordinate})):t.dispatch(TI())}ha=null,bi=null};if(!o){s();return}i==="raf"?ha=requestAnimationFrame(s):typeof i=="number"&&bi===null&&(bi=setTimeout(s,i))}});function Fie(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var IT={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},tP=$t({name:"rootProps",initialState:IT,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:IT.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),$ie=tP.reducer,{updateOptions:Uie}=tP.actions,Hie=null,zie={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},rP=$t({name:"polarOptions",initialState:Hie,reducers:zie}),{updatePolarOptions:sse}=rP.actions,qie=rP.reducer,nP=yr("keyDown"),iP=yr("focus"),aP=yr("blur"),sf=$s(),pa=null,yi=null,Ou=null;sf.startListening({actionCreator:nP,effect:(e,t)=>{Ou=e.payload,pa!==null&&(cancelAnimationFrame(pa),pa=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,a=i==="all"||i.includes("keydown");yi!==null&&(typeof n!="number"||!a)&&(clearTimeout(yi),yi=null);var o=()=>{try{var s=t.getState(),u=s.rootProps.accessibilityLayer!==!1;if(!u)return;var{keyboardInteraction:l}=s.tooltip,c=Ou;if(c!=="ArrowRight"&&c!=="ArrowLeft"&&c!=="Enter")return;var f=Xo(l,Hi(s),za(s),qa(s)),d=f==null?-1:Number(f),h=!Number.isFinite(d)||d<0,p=Mn(s),b=Hi(s),y=tu(s,s.tooltip.settings.shared);if(c==="Enter"){if(h)return;var v=ql(s,y,"hover",String(l.index));t.dispatch(zl({active:!l.active,activeIndex:l.index,activeCoordinate:v}));return}var T=OX(s),x=T==="left-to-right"?1:-1,_=c==="ArrowRight"?1:-1,w;if(h){var A=za(s),S=qa(s),O=_*x,R=H=>({active:!1,index:String(H),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(w=-1,O>0){for(var C=0;C<b.length;C++)if(Xo(R(C),b,A,S)!=null){w=C;break}}else for(var M=b.length-1;M>=0;M--)if(Xo(R(M),b,A,S)!=null){w=M;break}if(w<0)return}else{w=d+_*x;var L=p?.length||b.length;if(L===0||w>=L||w<0)return}var Q=ql(s,y,"hover",String(w));t.dispatch(zl({active:!0,activeIndex:w.toString(),activeCoordinate:Q}))}finally{pa=null,yi=null}};if(!a){o();return}n==="raf"?pa=requestAnimationFrame(o):typeof n=="number"&&yi===null&&(o(),Ou=null,yi=setTimeout(()=>{Ou?o():(yi=null,pa=null)},n))}});sf.startListening({actionCreator:iP,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=tu(r,r.tooltip.settings.shared),s=ql(r,o,"hover",String(a));t.dispatch(zl({active:!0,activeIndex:a,activeCoordinate:s}))}}}});sf.startListening({actionCreator:aP,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(zl({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function oP(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var Tr=yr("externalEvent"),sP=$s(),Pu=new Map,Co=new Map,hh=new Map;sP.startListening({actionCreator:Tr,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,a=oP(n);hh.set(i,{handler:r,reactEvent:a});var o=Pu.get(i);o!==void 0&&(cancelAnimationFrame(o),Pu.delete(i));var s=t.getState(),{throttleDelay:u,throttledEvents:l}=s.eventSettings,c=l,f=c==="all"||c?.includes(i),d=Co.get(i);d!==void 0&&(typeof u!="number"||!f)&&(clearTimeout(d),Co.delete(i));var h=()=>{var y=hh.get(i);try{if(!y)return;var{handler:v,reactEvent:T}=y,x=t.getState(),_={activeCoordinate:NZ(x),activeDataKey:jI(x),activeIndex:zi(x),activeLabel:MI(x),activeTooltipIndex:zi(x),isTooltipActive:DZ(x)};v&&v(_,T)}finally{Pu.delete(i),Co.delete(i),hh.delete(i)}};if(!f){h();return}if(u==="raf"){var p=requestAnimationFrame(h);Pu.set(i,p)}else if(typeof u=="number"){if(!Co.has(i)){h();var b=setTimeout(h,u);Co.set(i,b)}}else h()}}});var Wie=B([oo],e=>e.tooltipItemPayloads),Vie=B([Wie,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(a=>a.settings.graphicalItemId===r);if(n!=null){var{getPosition:i}=n;if(i!=null)return i(t)}}}),uP=yr("touchMove"),lP=$s(),vi=null,Fn=null,OT=null,Io=null;lP.startListening({actionCreator:uP,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Io=oP(r);var n=t.getState(),{throttleDelay:i,throttledEvents:a}=n.eventSettings,o=a==="all"||a.includes("touchmove");vi!==null&&(cancelAnimationFrame(vi),vi=null),Fn!==null&&(typeof i!="number"||!o)&&(clearTimeout(Fn),Fn=null),OT=Array.from(r.touches).map(u=>Eg({clientX:u.clientX,clientY:u.clientY,currentTarget:r.currentTarget}));var s=()=>{if(Io!=null){var u=t.getState(),l=tu(u,u.tooltip.settings.shared);if(l==="axis"){var c,f=(c=OT)===null||c===void 0?void 0:c[0];if(f==null){vi=null,Fn=null;return}var d=xg(u,f);d?.activeIndex!=null&&t.dispatch(wI({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate}))}else if(l==="item"){var h,p=Io.touches[0];if(document.elementFromPoint==null||p==null)return;var b=document.elementFromPoint(p.clientX,p.clientY);if(!b||!b.getAttribute)return;var y=b.getAttribute(lq),v=(h=b.getAttribute(cq))!==null&&h!==void 0?h:void 0,T=Ji(u).find(w=>w.id===v);if(y==null||T==null||v==null)return;var{dataKey:x}=T,_=Vie(u,y,v);t.dispatch(EI({activeDataKey:x,activeIndex:y,activeCoordinate:_,activeGraphicalItemId:v}))}vi=null,Fn=null}};if(!o){s();return}i==="raf"?vi=requestAnimationFrame(s):typeof i=="number"&&Fn===null&&(s(),Io=null,Fn=setTimeout(()=>{Io?s():(Fn=null,vi=null)},i))}}});var cP={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},fP=$t({name:"eventSettings",initialState:cP,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Yie}=fP.actions,Kie=fP.reducer,Gie=Ik({brush:gte,cartesianAxis:Zee,chartData:PQ,errorBars:Bre,eventSettings:Kie,graphicalItems:Iee,layout:Wz,legend:$q,options:kQ,polarAxis:ZJ,polarOptions:qie,referenceElements:_te,renderedTicks:ore,rootProps:$ie,tooltip:HX,zIndex:pQ}),Xie=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return gz({reducer:Gie,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([JO.middleware,eP.middleware,sf.middleware,sP.middleware,lP.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(qk({type:"raf"}))},devTools:{serialize:{replacer:Fie},name:"recharts-".concat(r)}})};function Zie(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=_t(),a=m.useRef(null);if(i)return r;a.current==null&&(a.current=Xie(t,n));var o=Xm;return m.createElement(iW,{context:o,store:a.current},r)}function Qie(e){var{layout:t,margin:r}=e,n=Qe(),i=_t();return m.useEffect(()=>{i||(n(Hz(t)),n(Uz(r)))},[n,i,t,r]),null}var Jie=m.memo(Qie,Ws);function eae(e){var t=Qe();return m.useEffect(()=>{t(Uie(e))},[t,e]),null}var tae=e=>{var t=Qe();return m.useEffect(()=>{t(Yie(e))},[t,e]),null},rae=m.memo(tae,Ws);function PT(e){var{zIndex:t,isPanorama:r}=e,n=m.useRef(null),i=Qe();return m.useLayoutEffect(()=>(n.current&&i(dQ({zIndex:t,element:n.current,isPanorama:r})),()=>{i(hQ({zIndex:t,isPanorama:r}))}),[i,t,r]),m.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function NT(e){var{children:t,isPanorama:r}=e,n=oe(nQ);if(!n||n.length===0)return t;var i=n.filter(o=>o<0),a=n.filter(o=>o>0);return m.createElement(m.Fragment,null,i.map(o=>m.createElement(PT,{key:o,zIndex:o,isPanorama:r})),t,a.map(o=>m.createElement(PT,{key:o,zIndex:o,isPanorama:r})))}var nae=["children"];function iae(e,t){if(e==null)return{};var r,n,i=aae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function aae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jl.apply(null,arguments)}var oae={width:"100%",height:"100%",display:"block"},sae=m.forwardRef((e,t)=>{var r=lS(),n=cS(),i=ES();if(!ja(r)||!ja(n))return null;var{children:a,otherAttributes:o,title:s,desc:u}=e,l,c;return o!=null&&(typeof o.tabIndex=="number"?l=o.tabIndex:l=i?0:void 0,typeof o.role=="string"?c=o.role:c=i?"application":void 0),m.createElement(V_,Jl({},o,{title:s,desc:u,role:c,tabIndex:l,width:r,height:n,style:oae,ref:t}),a)}),uae=e=>{var{children:t}=e,r=oe(jc);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return m.createElement(V_,{width:n,height:i,x:o,y:a},t)},DT=m.forwardRef((e,t)=>{var{children:r}=e,n=iae(e,nae),i=_t();return i?m.createElement(uae,null,m.createElement(NT,{isPanorama:!0},r)):m.createElement(sae,Jl({ref:t},n),m.createElement(NT,{isPanorama:!1},r))});function lae(){var e=Qe(),[t,r]=m.useState(null),n=oe(uq);return m.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Te(a)&&a!==n&&e(qz(a))}},[t,e,n]),r}function RT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RT(Object(r),!0).forEach(function(n){fae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fae(e,t,r){return(t=dae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dae(e){var t=hae(e,"string");return typeof t=="symbol"?t:t+""}function hae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jn(){return Jn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jn.apply(null,arguments)}var pae=()=>($Q(),null);function ec(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var mae=m.forwardRef((e,t)=>{var r,n,i=m.useRef(null),[a,o]=m.useState({containerWidth:ec((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:ec((n=e.style)===null||n===void 0?void 0:n.height)}),s=m.useCallback((l,c)=>{o(f=>{var d=Math.round(l),h=Math.round(c);return f.containerWidth===d&&f.containerHeight===h?f:{containerWidth:d,containerHeight:h}})},[]),u=m.useCallback(l=>{if(typeof t=="function"&&t(l),i.current!=null&&(i.current.disconnect(),i.current=null),l!=null&&typeof ResizeObserver<"u"){var{width:c,height:f}=l.getBoundingClientRect();s(c,f);var d=p=>{var b=p[0];if(b!=null){var{width:y,height:v}=b.contentRect;s(y,v)}},h=new ResizeObserver(d);h.observe(l),i.current=h}},[t,s]);return m.useEffect(()=>()=>{var l=i.current;l?.disconnect()},[s]),m.createElement(m.Fragment,null,m.createElement(zs,{width:a.containerWidth,height:a.containerHeight}),m.createElement("div",Jn({ref:u},e)))}),gae=m.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=m.useState({containerWidth:ec(r),containerHeight:ec(n)}),o=m.useCallback((u,l)=>{a(c=>{var f=Math.round(u),d=Math.round(l);return c.containerWidth===f&&c.containerHeight===d?c:{containerWidth:f,containerHeight:d}})},[]),s=m.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null){var{width:l,height:c}=u.getBoundingClientRect();o(l,c)}},[t,o]);return m.createElement(m.Fragment,null,m.createElement(zs,{width:i.containerWidth,height:i.containerHeight}),m.createElement("div",Jn({ref:s},e)))}),bae=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return m.createElement(m.Fragment,null,m.createElement(zs,{width:r,height:n}),m.createElement("div",Jn({ref:t},e)))}),yae=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?m.createElement(gae,Jn({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?m.createElement(bae,Jn({},e,{width:r,height:n,ref:t})):m.createElement(m.Fragment,null,m.createElement(zs,{width:r,height:n}),m.createElement("div",Jn({ref:t},e)))});function vae(e){return e?mae:yae}var xae=m.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:u,onMouseEnter:l,onMouseLeave:c,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:p,onTouchStart:b,style:y,width:v,responsive:T,dispatchTouchEvents:x=!0}=e,_=m.useRef(null),w=Qe(),[A,S]=m.useState(null),[O,R]=m.useState(null),C=lae(),M=sS(),L=M?.width>0?M.width:v,Q=M?.height>0?M.height:i,H=m.useCallback(G=>{C(G),typeof t=="function"&&t(G),S(G),R(G),G!=null&&(_.current=G)},[C,t,S,R]),U=m.useCallback(G=>{w(QO(G)),w(Tr({handler:a,reactEvent:G}))},[w,a]),q=m.useCallback(G=>{w(qp(G)),w(Tr({handler:l,reactEvent:G}))},[w,l]),J=m.useCallback(G=>{w(TI()),w(Tr({handler:c,reactEvent:G}))},[w,c]),V=m.useCallback(G=>{w(qp(G)),w(Tr({handler:f,reactEvent:G}))},[w,f]),re=m.useCallback(()=>{w(iP())},[w]),N=m.useCallback(()=>{w(aP())},[w]),le=m.useCallback(G=>{w(nP(G.key))},[w]),he=m.useCallback(G=>{w(Tr({handler:o,reactEvent:G}))},[w,o]),P=m.useCallback(G=>{w(Tr({handler:s,reactEvent:G}))},[w,s]),pe=m.useCallback(G=>{w(Tr({handler:u,reactEvent:G}))},[w,u]),we=m.useCallback(G=>{w(Tr({handler:d,reactEvent:G}))},[w,d]),ce=m.useCallback(G=>{w(Tr({handler:b,reactEvent:G}))},[w,b]),fe=m.useCallback(G=>{x&&w(uP(G)),w(Tr({handler:p,reactEvent:G}))},[w,x,p]),ge=m.useCallback(G=>{w(Tr({handler:h,reactEvent:G}))},[w,h]),Y=vae(T);return m.createElement(qI.Provider,{value:A},m.createElement(X$.Provider,{value:O},m.createElement(Y,{width:L??y?.width,height:Q??y?.height,className:Le("recharts-wrapper",n),style:cae({position:"relative",cursor:"default",width:L,height:Q},y),onClick:U,onContextMenu:he,onDoubleClick:P,onFocus:re,onBlur:N,onKeyDown:le,onMouseDown:pe,onMouseEnter:q,onMouseLeave:J,onMouseMove:V,onMouseUp:we,onTouchEnd:ge,onTouchMove:fe,onTouchStart:ce,ref:H},m.createElement(pae,null),r)))}),Eae=["width","height","responsive","children","className","style","compact","title","desc"];function Tae(e,t){if(e==null)return{};var r,n,i=wae(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wae(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Aae=m.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:a,className:o,style:s,compact:u,title:l,desc:c}=e,f=Tae(e,Eae),d=Fr(f);return u?m.createElement(m.Fragment,null,m.createElement(zs,{width:r,height:n}),m.createElement(DT,{otherAttributes:d,title:l,desc:c},a)):m.createElement(xae,{className:o,style:s,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},m.createElement(DT,{otherAttributes:d,title:l,desc:c,ref:t},m.createElement(kte,null,a)))});function Wp(){return Wp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wp.apply(null,arguments)}function LT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LT(Object(r),!0).forEach(function(n){kae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kae(e,t,r){return(t=Sae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Sae(e){var t=Cae(e,"string");return typeof t=="symbol"?t:t+""}function Cae(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iae={top:5,right:5,bottom:5,left:5},Oae=_ae({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Iae,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},cP),dP=m.forwardRef(function(t,r){var n,i=Dt(t.categoricalChartProps,Oae),{chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:s,tooltipPayloadSearcher:u,categoricalChartProps:l}=t,c={chartName:a,defaultTooltipEventType:o,validateTooltipEventTypes:s,tooltipPayloadSearcher:u,eventEmitter:void 0};return m.createElement(Zie,{preloadedState:{options:c},reduxStoreName:(n=l.id)!==null&&n!==void 0?n:a},m.createElement(mte,{chartData:l.data}),m.createElement(Jie,{layout:i.layout,margin:i.margin}),m.createElement(rae,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),m.createElement(eae,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),m.createElement(Aae,Wp({},i,{ref:r})))}),Pae=["axis"],Nae=m.forwardRef((e,t)=>m.createElement(dP,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Pae,tooltipPayloadSearcher:WI,categoricalChartProps:e,ref:t})),Dae=["axis","item"],Rae=m.forwardRef((e,t)=>m.createElement(dP,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Dae,tooltipPayloadSearcher:WI,categoricalChartProps:e,ref:t}));const Qo=new Set(["beginTimeSeconds","endTimeSeconds","inspectedCount"]);function MT(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Tg(e){if(e==null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.keys(e);return t.length===1&&!isNaN(Number(t[0]))}function uf(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(Tg(e)){const t=Object.values(e)[0];return typeof t=="number"&&Number.isFinite(t)?t:null}return null}function As(e,t){return e==null?"—":typeof e=="number"?t&&$P(t,e)?MT(e):t&&UP(t,e)?MT(e*1e3):Number.isInteger(e)||Math.abs(e)>1e3?e.toLocaleString():e.toFixed(2):Array.isArray(e)?e.length<=5?e.join(", "):`[${e.length} items]`:typeof e=="object"?Tg(e)?As(Object.values(e)[0],t):JSON.stringify(e):String(e)}function ph(e){const t=[],r=e[0],n=r.facet,i=new Set;if(n!==void 0)if(Array.isArray(n))n.forEach((s,u)=>{const l=Object.keys(r).find(c=>c!=="facet"&&!Qo.has(c)&&r[c]===s);l&&i.add(l),t.push({key:`facet-${u}`,label:l??`Group ${u+1}`,get:c=>c.facet[u]})});else{const s=Object.keys(r).find(u=>u!=="facet"&&!Qo.has(u)&&r[u]===n);s&&i.add(s),t.push({key:"facet",label:s??"Name",get:u=>u.facet})}const a=[],o=new Set;for(const s of e)for(const u of Object.keys(s))o.has(u)||(o.add(u),a.push(u));for(const s of a)s==="facet"||Qo.has(s)||i.has(s)||t.push({key:s,label:s,get:u=>u[s]});return t}function Lae(e){const t=Object.keys(e[0]).filter(l=>l!=="facet"&&l!=="comparison"&&!Qo.has(l)),r=e[0],n=r.facet,i=new Set;for(const l of t)(Array.isArray(n)?n.includes(r[l]):r[l]===n)&&i.add(l);const a=[...i][0]??(typeof n=="string"?"Name":"Group"),o=t.filter(l=>!i.has(l)),s=[];for(const l of e){const c=String(l.comparison);s.includes(c)||s.push(c)}const u=new Map;for(const l of e){const c=Array.isArray(l.facet)?JSON.stringify(l.facet):String(l.facet);u.has(c)||u.set(c,{label:l.facet,byPeriod:new Map}),u.get(c).byPeriod.set(String(l.comparison),l)}return{facetLabel:a,valueKeys:o,periods:s,grouped:u}}const Mae=new Set(["beginTimeSeconds","endTimeSeconds","inspectedCount","facet","comparison"]);function wg(e){const[t,r]=m.useState(new Set),n=a=>r(o=>{const s=new Set(o);return s.has(a)?s.delete(a):s.add(a),s}),i=m.useMemo(()=>t.size===0?e:e.filter(a=>t.has(a.name)),[e,t]);return{selected:t,toggle:n,visible:i}}function Ag(e){const t=new Date(e*1e3),r=t.getMonth()+1,n=t.getDate(),i=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0");return`${r}/${n} ${i}:${a}`}function tc(e){if(e==null)return"—";const t=Number(e);return isNaN(t)?String(e):Math.abs(t)>=1e6?`${(t/1e6).toFixed(1)}M`:Math.abs(t)>=1e3?`${(t/1e3).toFixed(1)}K`:Number.isInteger(t)?t.toLocaleString():t.toFixed(2)}function _g(e){return Object.keys(e).filter(t=>!Mae.has(t)&&!jae(e,t))}function jae(e,t){const r=e.facet;return r===void 0?!1:Array.isArray(r)?r.includes(e[t]):e[t]===r}const hP={background:Vt.paper,border:`1px solid ${Vt.border}`,borderRadius:4,fontSize:11},Bae={color:Vt.inkMuted,marginBottom:2},Fae={color:Vt.inkLight};function kg({width:e,height:t,series:r,formatX:n,threshold:i}){const a=m.useMemo(()=>{const u=new Map(r.map(f=>[f.name,new Map(f.data.map(d=>[d.x,d.y]))])),l=new Set;for(const f of r)f.data.forEach(d=>l.add(d.x));return[...l].sort((f,d)=>f-d).map(f=>{const d={x:f};for(const h of r)d[h.name]=u.get(h.name)?.get(f)??null;return d})},[r]),o=i&&(i.operator===">"||i.operator===">="),s=i&&(i.operator==="<"||i.operator==="<=");return E.jsxs(Nae,{width:e,height:t,data:a,margin:{top:10,right:20,bottom:30,left:50},children:[E.jsx(pg,{strokeDasharray:"3 3",stroke:Vt.border}),E.jsx(yg,{dataKey:"x",tickFormatter:n,tick:{fontSize:10,fill:Vt.inkMuted},tickLine:!1,axisLine:{stroke:Vt.inkFaint}}),E.jsx(vg,{tickFormatter:tc,tick:{fontSize:11,fill:Vt.inkMuted},tickLine:!1,axisLine:!1,width:48}),E.jsx(KI,{contentStyle:hP,labelStyle:Bae,itemStyle:Fae,labelFormatter:u=>n(u),formatter:(u,l)=>[tc(u),l]}),i&&E.jsx(NO,{y:i.value,stroke:"#b33a2a",strokeWidth:1.5,strokeDasharray:"6 4"}),o&&E.jsx(jp,{y1:i.value,fill:"rgba(179, 58, 42, 0.12)"}),s&&E.jsx(jp,{y2:i.value,fill:"rgba(179, 58, 42, 0.12)"}),r.map(u=>E.jsx(WO,{type:"monotone",dataKey:u.name,stroke:u.color,strokeWidth:2,strokeDasharray:u.dashed?"6 4":void 0,dot:!1,activeDot:{r:4,strokeWidth:2,stroke:"#fff"},connectNulls:!0},u.name))]})}function $ae({width:e,height:t,data:r,color:n}){return E.jsxs(Rae,{width:e,height:t,data:r,margin:{top:10,right:20,bottom:30,left:50},children:[E.jsx(pg,{strokeDasharray:"3 3",stroke:Vt.border,vertical:!1}),E.jsx(yg,{dataKey:"label",tick:{fontSize:10,fill:Vt.inkMuted},tickLine:!1,axisLine:{stroke:Vt.inkFaint}}),E.jsx(vg,{tickFormatter:tc,tick:{fontSize:11,fill:Vt.inkMuted},tickLine:!1,axisLine:!1,width:48}),E.jsx(KI,{contentStyle:hP,labelStyle:{color:Vt.inkMuted},formatter:i=>[tc(i),"count"]}),E.jsx(XO,{dataKey:"value",fill:n,radius:[2,2,0,0],maxBarSize:60})]})}function Sg({items:e,selectedNames:t,onToggle:r}){if(e.length<=1)return null;const n=t&&t.size>0;return E.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-2",children:e.map(i=>{const a=n&&!t.has(i.name);return E.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-sans",style:{color:Vt.inkMuted,cursor:r?"pointer":void 0,opacity:a?.35:1,textDecoration:a?"line-through":void 0,userSelect:"none"},onClick:r?()=>r(i.name):void 0,children:[E.jsx("svg",{width:16,height:2,children:E.jsx("line",{x1:0,y1:1,x2:16,y2:1,stroke:i.color,strokeWidth:2,strokeDasharray:i.dashed?"4 3":void 0})}),i.name]},i.name)})})}function lf({containerSize:e,defaultHeight:t,legendHeight:r=0,children:n}){const{ref:i,size:{width:a}}=LP();if(e){const o=Math.max(e.width-8,100),s=Math.max(e.height-r-8,80);return E.jsx(E.Fragment,{children:n({width:o,height:s})})}return E.jsx("div",{ref:i,className:z.chartContainer,children:a>0&&n({width:a-32,height:t})})}function jT({rows:e,containerSize:t,threshold:r}){const n="facet"in e[0],i="comparison"in e[0];return n?E.jsx(Hae,{rows:e,containerSize:t,threshold:r}):i?E.jsx(zae,{rows:e,containerSize:t}):E.jsx(Uae,{rows:e,containerSize:t,threshold:r})}function Uae({rows:e,containerSize:t,threshold:r}){const n=m.useMemo(()=>_g(e[0]),[e]),i=m.useMemo(()=>n.map((l,c)=>({name:l,color:z.chartColors[c%z.chartColors.length],data:e.map(f=>({x:f.beginTimeSeconds,y:uf(f[l])}))})),[e,n]),{selected:a,toggle:o,visible:s}=wg(i),u=i.length>1?28:0;return E.jsx(lf,{containerSize:t,defaultHeight:280,legendHeight:u,children:({width:l,height:c})=>E.jsxs("div",{children:[E.jsx(kg,{width:l,height:c,series:s,formatX:Ag,threshold:r}),E.jsx(Sg,{items:i,selectedNames:a,onToggle:o})]})})}function Hae({rows:e,containerSize:t,threshold:r}){const n=m.useMemo(()=>{const l=_g(e[0])[0];if(!l)return[];const c=[];for(const p of e){const b=Array.isArray(p.facet)?p.facet.join(", "):String(p.facet);c.includes(b)||c.push(b)}const f=new Set;for(const p of e)f.add(p.beginTimeSeconds);const d=[...f].sort((p,b)=>p-b),h=new Map;for(const p of e){const b=p.beginTimeSeconds,y=Array.isArray(p.facet)?p.facet.join(", "):String(p.facet);h.has(b)||h.set(b,new Map),h.get(b).set(y,uf(p[l]))}return c.map((p,b)=>({name:p,color:z.chartColors[b%z.chartColors.length],data:d.map(y=>({x:y,y:h.get(y)?.get(p)??null}))}))},[e]),{selected:i,toggle:a,visible:o}=wg(n),s=n.length>1?28:0;return E.jsx(lf,{containerSize:t,defaultHeight:300,legendHeight:s,children:({width:u,height:l})=>E.jsxs("div",{children:[E.jsx(kg,{width:u,height:l,series:o,formatX:Ag,threshold:r}),E.jsx(Sg,{items:n,selectedNames:i,onToggle:a})]})})}function zae({rows:e,containerSize:t}){const r=m.useMemo(()=>{const u=_g(e[0])[0];if(!u)return[];const l=new Map,c=[];for(const h of e){const p=String(h.comparison);c.includes(p)||c.push(p),l.has(p)||l.set(p,[]),l.get(p).push(h)}let f=0;const d=l.get("current");if(d&&c.length>1){let h=1/0;for(const b of d)h=Math.min(h,b.beginTimeSeconds);const p=c.find(b=>b!=="current");if(p){let b=1/0;for(const y of l.get(p))b=Math.min(b,y.beginTimeSeconds);f=h-b}}return c.map((h,p)=>({name:`${u} (${h})`,color:z.chartColors[p%z.chartColors.length],dashed:h!=="current",data:(l.get(h)??[]).map(b=>({x:b.beginTimeSeconds+(h!=="current"?f:0),y:uf(b[u])})).sort((b,y)=>b.x-y.x)}))},[e]),{selected:n,toggle:i,visible:a}=wg(r),o=r.length>1?28:0;return E.jsx(lf,{containerSize:t,defaultHeight:280,legendHeight:o,children:({width:s,height:u})=>E.jsxs("div",{children:[E.jsx(kg,{width:s,height:u,series:a,formatX:Ag}),E.jsx(Sg,{items:r,selectedNames:n,onToggle:i})]})})}function BT({row:e,containerSize:t}){const r=Object.keys(e).find(a=>a.startsWith("histogram.")),{data:n,metricName:i}=m.useMemo(()=>{if(!r)return{data:[],metricName:""};const a=e[r],o=Object.keys(a).map(Number).sort((s,u)=>s-u);return{metricName:r.replace("histogram.",""),data:o.map((s,u)=>{const l=o[u+1];return{label:l!==void 0?`${s}–${l}`:`${s}+`,value:a[String(s)]}})}},[e,r]);return r?E.jsx(lf,{containerSize:t,defaultHeight:260,legendHeight:24,children:({width:a,height:o})=>E.jsxs("div",{children:[E.jsxs("div",{className:"text-xs font-sans mb-1",style:{color:Vt.inkMuted},children:[i," distribution"]}),E.jsx($ae,{width:a,height:o,data:n,color:"#6b9fd4"})]})}):null}function FT({columns:e,row:t}){return E.jsx("div",{className:"flex flex-wrap gap-3 my-2",children:e.map(r=>E.jsxs("div",{className:`${z.card} min-w-[120px]`,children:[E.jsx("div",{className:z.cardTitle,children:r.label}),E.jsx("div",{className:z.cardValue,children:As(r.get(t),r.key)})]},r.key))})}function rc({value:e}){return E.jsx("span",{className:z.tableCellText,title:e,children:e})}function Hu({value:e,colKey:t}){return e!=null&&typeof e=="object"&&!Array.isArray(e)?Tg(e)?E.jsx(rc,{value:As(e,t)}):E.jsx(Fm,{data:e,collapsed:!0}):E.jsx(rc,{value:As(e,t)})}function $T({columns:e,rows:t}){return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsx("tr",{className:z.tableHeaderRow,children:e.map(r=>E.jsx("th",{className:z.tableHeaderCell,children:r.label},r.key))})}),E.jsx("tbody",{children:t.map((r,n)=>E.jsx("tr",{className:z.tableRow,children:e.map(i=>E.jsx("td",{className:z.tableCell,children:E.jsx(Hu,{value:i.get(r),colKey:i.key})},i.key))},n))})]})})}const Vp=m.memo(function({data:t,containerSize:r,threshold:n,chartType:i}){if(typeof t=="string")return E.jsx("div",{className:z.analysisBlock,children:E.jsx(Gi,{linkSafety:{enabled:!1},children:t})});if(t&&typeof t=="object"&&!Array.isArray(t)&&"error"in t)return E.jsx("div",{className:z.resultErrorMessage,children:String(t.error)});if(t&&typeof t=="object"&&!Array.isArray(t))return E.jsx(Fm,{data:t});if(!Array.isArray(t)||t.length===0)return E.jsx("div",{className:z.toolLoading,children:"No results returned."});if(t.every(h=>typeof h!="object"||h===null))return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsx("tr",{className:z.tableHeaderRow,children:E.jsx("th",{className:z.tableHeaderCell,children:"Value"})})}),E.jsx("tbody",{children:t.map((h,p)=>E.jsx("tr",{className:z.tableRow,children:E.jsx("td",{className:z.tableCell,children:E.jsx(rc,{value:As(h)})})},p))})]})});const a=t;if(i&&i!=="auto"){if(i==="timeseries")return E.jsx(jT,{rows:a,containerSize:r,threshold:n});if(i==="histogram"&&a.length>=1)return E.jsx(BT,{row:a[0],containerSize:r});if(i==="scalar"){const p=ph([a[0]]).filter(b=>!b.key.startsWith("facet"));return E.jsx(FT,{columns:p,row:a[0]})}if(i==="table"){const h=ph(a);return E.jsx($T,{columns:h,rows:a})}}const o="beginTimeSeconds"in a[0],s=a.length===1&&Object.keys(a[0]).some(h=>h.startsWith("histogram."));if(o)return E.jsx(jT,{rows:a,containerSize:r,threshold:n});if(s)return E.jsx(BT,{row:a[0],containerSize:r});if(a.length===1){const h=Object.keys(a[0]).filter(p=>!Qo.has(p));if(h.length===1){const p=a[0][h[0]];if(Array.isArray(p)&&p.every(b=>typeof b!="object"||b===null))return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsx("tr",{className:z.tableHeaderRow,children:E.jsx("th",{className:z.tableHeaderCell,children:h[0]})})}),E.jsx("tbody",{children:p.map((b,y)=>E.jsx("tr",{className:z.tableRow,children:E.jsx("td",{className:z.resultListItem,children:String(b)})},y))})]})})}}if("comparison"in a[0]){const{facetLabel:h,valueKeys:p,periods:b,grouped:y}=Lae(a);if(!("facet"in a[0])){const T=[...y.values()][0];return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsxs("tr",{className:z.tableHeaderRow,children:[E.jsx("th",{className:z.tableHeaderCell,children:"Metric"}),b.map(x=>E.jsx("th",{className:z.tableHeaderCell,children:x},x))]})}),E.jsx("tbody",{children:p.map(x=>E.jsxs("tr",{className:z.tableRow,children:[E.jsx("td",{className:z.tableCell,children:E.jsx(rc,{value:x})}),b.map(_=>E.jsx("td",{className:z.tableCell,children:E.jsx(Hu,{value:T?.byPeriod.get(_)?.[x],colKey:x})},_))]},x))})]})})}return E.jsx("div",{className:`${z.tableContainer} my-2`,children:E.jsxs("table",{className:"w-full",children:[E.jsx("thead",{className:"sticky top-0 z-10",children:E.jsxs("tr",{className:z.tableHeaderRow,children:[E.jsx("th",{className:z.tableHeaderCell,children:h}),p.map(T=>b.map(x=>E.jsx("th",{className:z.tableHeaderCell,children:p.length>1?`${T} (${x})`:x},`${T}-${x}`)))]})}),E.jsx("tbody",{children:[...y.values()].map((T,x)=>E.jsxs("tr",{className:z.tableRow,children:[E.jsx("td",{className:z.tableCell,children:E.jsx(Hu,{value:T.label,colKey:h})}),p.map(_=>b.map(w=>E.jsx("td",{className:z.tableCell,children:E.jsx(Hu,{value:T.byPeriod.get(w)?.[_],colKey:_})},`${_}-${w}`)))]},x))})]})})}const l=ph(a),c="facet"in a[0],f=l.filter(h=>!h.key.startsWith("facet"));return a.length===1&&!c&&f.length>0&&f.every(h=>uf(h.get(a[0]))!==null)?E.jsx(FT,{columns:f,row:a[0]}):E.jsx($T,{columns:l,rows:a})}),pP=m.memo(function({content:t,isAnimating:r}){return E.jsxs("details",{className:"mb-2 border border-[#e8e3da]/30 rounded-md",children:[E.jsx("summary",{className:"cursor-pointer select-none px-3 py-1.5 text-xs text-[#9c9890] italic hover:text-[#6b6560] transition-colors",children:"Thinking"}),E.jsx("div",{className:"px-3 pb-2 text-sm text-[#9c9890] italic",children:E.jsx(Gi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:t})})]})});function mP({children:e,actions:t,containerRef:r}){return E.jsxs("div",{ref:r,className:`${z.analysisContainer} relative group/analysis`,children:[E.jsxs("div",{className:"flex items-center justify-between mb-1",children:[E.jsx("div",{className:z.summaryLabel,children:"Analysis"}),t]}),e]})}const UT={[bn.CREATE_WIDGET]:{done:"Widget Created",loading:"Creating widget...",errorLabel:"Widget Error"},[bn.UPDATE_WIDGET]:{done:"Widget Updated",loading:"Updating widget...",errorLabel:"Widget Error"},[bn.DELETE_WIDGET]:{done:"Widget Deleted",loading:"Deleting widget...",errorLabel:"Widget Error"},[bn.CREATE_MONITOR]:{done:"Monitor Created",loading:"Creating monitor...",errorLabel:"Monitor Error"},[bn.UPDATE_MONITOR]:{done:"Monitor Updated",loading:"Updating monitor...",errorLabel:"Monitor Error"},[bn.DELETE_MONITOR]:{done:"Monitor Deleted",loading:"Deleting monitor...",errorLabel:"Monitor Error"},[bn.TOGGLE_MONITOR]:{done:"Monitor Toggled",loading:"Toggling monitor...",errorLabel:"Monitor Error"}},qae={"tool-execute_nrql":"New Relic","tool-execute_hogql":"PostHog","tool-nrql":"New Relic","tool-newrelic":"New Relic","tool-hogql":"PostHog","tool-posthog":"PostHog"};function Wae(e){return qae[e]??"Google Cloud"}const Vae={"tool-execute_nrql":"newrelic","tool-execute_hogql":"posthog","tool-nrql":"newrelic","tool-newrelic":"newrelic","tool-hogql":"posthog","tool-posthog":"posthog"};function Yae(e){const t=Vae[e]??"gcp";return z.investigationAccents[t]??{container:z.investigationContainer,label:z.investigationLabel}}function HT(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return"parts"in t||"queries"in t||"analysis"in t||"error"in t}function Kae(e){const t=[];if(e.queries)for(const r of e.queries)t.push({type:"query",query:r.query,results:r.results});return e.analysis&&t.push({type:"text",content:e.analysis}),t}function gP(e){return e.filter(t=>t.type==="query").length}const Gae={execute_nrql:"Executing NRQL query",execute_hogql:"Executing HogQL query"},Xae=m.memo(function({toolName:t}){const r=Gae[t]??t;return E.jsxs("div",{className:"flex items-center gap-2 py-2",children:[E.jsx("span",{className:"inline-block w-3.5 h-3.5 border-2 border-[#2b5ea7] border-t-transparent rounded-full animate-spin"}),E.jsx("span",{className:"text-sm text-[#2b5ea7] font-sans",children:r})]})}),Zae=m.memo(function({content:t,isAnimating:r}){return E.jsx("div",{className:z.analysisBlock,children:E.jsx(Gi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:t})})}),Qae=m.memo(function({content:t}){return E.jsxs("div",{className:z.summaryBlock,children:[E.jsx("div",{className:z.summaryLabel,children:"Analysis"}),E.jsx(Gi,{isAnimating:!1,controls:{code:!0},linkSafety:{enabled:!1},children:t})]})}),Jae=m.memo(function({query:t,results:r,index:n,total:i}){return E.jsxs("div",{className:"mb-3",children:[E.jsxs("details",{className:"mb-2",open:i===1,children:[E.jsxs("summary",{className:z.toolQueryToggle,children:["Query ",i>1?`${n+1}: `:"",t.length>80?t.slice(0,80)+"...":t]}),E.jsx("div",{className:z.toolQueryCode,children:t})]}),E.jsx(Vp,{data:r})]})});function zT(e,t,r,n,i,a){if(e.type==="tool-call")return r?E.jsx(Xae,{toolName:e.toolName},t):null;if(e.type==="reasoning")return E.jsx(pP,{content:e.content,isAnimating:r},t);if(e.type==="text")return a?e.content.trim()?E.jsx(Gi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:e.content},t):null:E.jsx(Zae,{content:e.content,isAnimating:r},t);if(e.type==="summary")return E.jsx(Qae,{content:e.content},t);if(e.type==="query"&&e.query){const o=i();return E.jsx(Jae,{query:e.query,results:e.results,index:o,total:n},t)}return null}const eoe=m.memo(function({parts:t,isAnimating:r}){const n=gP(t);let i=0;const a=()=>i++,o=t.findIndex(l=>l.type==="analysis-start"),s=o===-1?t:t.slice(0,o),u=o===-1?[]:t.slice(o+1);return E.jsxs(E.Fragment,{children:[s.map((l,c)=>zT(l,c,r,n,a,!1)),u.length>0&&E.jsx(mP,{children:u.map((l,c)=>zT(l,s.length+1+c,r,n,a,!0))}),r&&E.jsx(Ig,{className:z.investigationThinking})]})}),toe=m.memo(function({part:t,progressStore:r}){if(t.type===bn.BEGIN_ANALYSIS)return null;const n=t.type.startsWith("tool-"),i=t.type in UT,a=n&&!i,o=A3(r,a?t.toolCallId:void 0);if(a){const u=Wae(t.type),l=Yae(t.type),c=t.state==="output-available",f=c?t.output:void 0;if(c&&HT(f)&&f.error)return E.jsxs("div",{className:l.container,children:[E.jsx("div",{className:l.label,children:u}),E.jsx("div",{className:z.resultErrorMessage,children:f.error})]});let d;if(c&&HT(f)?d=o?.parts?.length?o.parts:f.parts?.length?f.parts:Kae(f):o?.parts?.length?d=o.parts:c||(d=[]),d){const h=gP(d),p=c?`${u} (${h} ${h===1?"query":"queries"})`:h>0?`${u} — investigating (${h} ${h===1?"query":"queries"})`:`Querying ${u}...`;return E.jsxs("div",{className:l.container,children:[E.jsx("div",{className:l.label,children:p}),t.input?.task&&E.jsxs("div",{className:z.investigationTask,children:["Task: ",t.input.task]}),E.jsx(eoe,{parts:d,isAnimating:!c})]})}if(c&&Array.isArray(f)){const h=t.input?.query;return E.jsxs("div",{children:[E.jsxs("div",{className:z.toolLabel,children:[u," Result"]}),h&&E.jsxs("details",{className:"mb-2",children:[E.jsx("summary",{className:z.toolQueryToggle,children:"Show query"}),E.jsx("div",{className:z.toolQueryCode,children:h})]}),E.jsx(Vp,{data:f})]})}return c&&f!=null?E.jsxs("div",{children:[E.jsxs("div",{className:z.toolLabel,children:[u," Result"]}),E.jsx(Vp,{data:f})]}):null}const s=UT[t.type];if(s){if(t.state==="output-available"){const u=t.output,l=u&&"error"in u;return E.jsxs("div",{children:[E.jsx("div",{className:z.toolLabel,children:l?s.errorLabel:s.done}),E.jsxs("details",{className:"mb-2",children:[E.jsx("summary",{className:z.toolQueryToggle,children:"Show details"}),E.jsx("div",{className:z.toolQueryCode,children:E.jsx(Fm,{data:u})})]})]})}return E.jsx("div",{className:z.toolLoading,children:s.loading})}return null});function roe(e){return e.replace(/^#{1,6}\s+/gm,"").replace(/\*\*(.+?)\*\*/g,"$1").replace(/__(.+?)__/g,"$1").replace(/\*(.+?)\*/g,"$1").replace(/_(.+?)_/g,"$1").replace(/~~(.+?)~~/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/^>\s+/gm,"").replace(/^(\s*)[-*+]\s+/gm,"$1").replace(/^(\s*)\d+\.\s+/gm,"$1").replace(/^```\w*\n?/gm,"").replace(/^```$/gm,"").replace(/^[-*_]{3,}\s*$/gm,"")}function noe(e){const t=[];for(const r of e)if(r.type==="text")t.push(roe(r.text.replace(zu,"")));else if(r.type!=="reasoning"){const n=r;n.input?.task&&t.push(`Task: ${n.input.task}`),n.input?.query&&t.push(`Query: ${n.input.query}`)}return t.join(`
180
-
181
- `).trim()}function Cg({contentRef:e,parts:t,size:r=14}){const[n,i]=m.useState(!1),[a,o]=m.useState(!1),s=m.useCallback(async()=>{const l=noe(t);l&&(await navigator.clipboard.writeText(l),i(!0),setTimeout(()=>i(!1),1500))},[t]),u=m.useCallback(async()=>{const l=e.current;if(l)try{const{domToPng:c}=await nc(async()=>{const{domToPng:p}=await import("./index-NB5FNsou.js");return{domToPng:p}},[]),f=await c(l,{scale:2}),h=await(await fetch(f)).blob();await navigator.clipboard.write([new ClipboardItem({"image/png":h})]),o(!0),setTimeout(()=>o(!1),1500)}catch{}},[e]);return E.jsxs(E.Fragment,{children:[E.jsx("button",{type:"button",onClick:s,className:z.chatActionButton,title:n?"Copied!":"Copy as text","aria-label":n?"Copied":"Copy as text",children:n?E.jsx(qT,{size:r}):E.jsx(ioe,{size:r})}),E.jsx("button",{type:"button",onClick:u,className:z.chatActionButton,title:a?"Copied!":"Copy as image","aria-label":a?"Copied":"Copy as image",children:a?E.jsx(qT,{size:r}):E.jsx(aoe,{size:r})})]})}function qT({size:e=14}){return E.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:E.jsx("polyline",{points:"20 6 9 17 4 12"})})}function ioe({size:e=14}){return E.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),E.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function aoe({size:e=14}){return E.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"}),E.jsx("circle",{cx:"12",cy:"13",r:"3"})]})}const Ia=Uint8Array.from([84,82,67,49]),ooe=4,Jo=Ia.length+ooe,soe=10*1024*1024;async function bP(e){const t=new Blob([e.buffer],{type:"image/png"});return createImageBitmap(t,{colorSpaceConversion:"none",premultiplyAlpha:"none"})}function yP(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("canvas 2D context unavailable");r.drawImage(e,0,0);const n=r.getImageData(0,0,t.width,t.height);return{canvas:t,ctx:r,imageData:n}}function uoe(e,t){const r=t.length*8;let n=0;for(let i=0;i<e.length&&n<r;i+=4)if(e[i+3]===255)for(let a=0;a<3&&n<r;a++){const o=n>>3,s=7-(n&7),u=t[o]>>s&1;e[i+a]=e[i+a]&254|u,n++}if(n<r)throw new Error("LSB write ran out of capacity mid-stream")}function WT(e,t){const r=new Uint8Array(t),n=t*8;let i=0;for(let a=0;a<e.length&&i<n;a+=4)if(e[a+3]===255)for(let o=0;o<3&&i<n;o++){const s=i>>3,u=7-(i&7);r[s]|=(e[a+o]&1)<<u,i++}return i>=n?r:null}function loe(e){return new Promise((t,r)=>{e.toBlob(async n=>{if(!n){r(new Error("canvas.toBlob returned null"));return}t(new Uint8Array(await n.arrayBuffer()))},"image/png")})}async function coe(e,t){const r=await bP(e);try{const{canvas:n,ctx:i,imageData:a}=yP(r),o=new Uint8Array(Jo+t.length);return o.set(Ia,0),new DataView(o.buffer).setUint32(Ia.length,t.length,!1),o.set(t,Jo),uoe(a.data,o),i.putImageData(a,0,0),await loe(n)}finally{r.close?.()}}async function foe(e){const t=await bP(e);try{const{imageData:{data:r}}=yP(t),n=WT(r,Jo);if(!n)return null;for(let o=0;o<Ia.length;o++)if(n[o]!==Ia[o])return null;const i=new DataView(n.buffer,n.byteOffset,n.byteLength).getUint32(Ia.length,!1);if(i<=0||i>soe)return null;const a=WT(r,Jo+i);return a?a.subarray(Jo):null}finally{t.close?.()}}const zu="<analysis>";function doe({parts:e,children:t,sourceTitle:r,sourceCreatedAt:n,resolveSourceTitle:i}){const a=m.useRef(null),[o,s]=m.useState(null),u=m.useCallback(async()=>{const l=a.current;if(l)try{const{domToPng:c}=await nc(async()=>{const{domToPng:w}=await import("./index-NB5FNsou.js");return{domToPng:w}},[]),f=await c(l,{scale:2}),d=new Uint8Array(await(await fetch(f)).arrayBuffer()),h=await i?.()??r??"",p=JSON.stringify({v:1,kind:"analysis",sourceTitle:h,sourceCreatedAt:n??Math.floor(Date.now()/1e3),parts:e});if(p.length>2*1024*1024){s("Analysis too large to embed metadata"),setTimeout(()=>s(null),2500);return}const b=await coe(d,new TextEncoder().encode(p)),y=new Blob([b.buffer],{type:"image/png"}),v=URL.createObjectURL(y),T=document.createElement("a");T.href=v;const x=new Date,_=`${x.toISOString().slice(0,10)}-${String(x.getHours()).padStart(2,"0")}-${String(x.getMinutes()).padStart(2,"0")}`;T.download=`analysis-${_}.png`,T.click(),setTimeout(()=>URL.revokeObjectURL(v),5e3)}catch{}},[e,r,n,i]);return E.jsx(mP,{containerRef:a,actions:E.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/analysis:opacity-100 transition-opacity",children:[o&&E.jsx("span",{className:"text-[10px] text-[#b33a2a] mr-1",children:o}),E.jsx(Cg,{contentRef:a,parts:e,size:12}),E.jsx("button",{type:"button",onClick:u,className:z.chatActionButton,title:"Download as image","aria-label":"Download as image",children:E.jsx(hoe,{size:12})})]}),children:t})}function hoe({size:e=14}){return E.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),E.jsx("polyline",{points:"7 10 12 15 17 10"}),E.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}const vP=MP.memo(function({parts:t,isAnimating:r,progressStore:n,sourceTitle:i,sourceCreatedAt:a,resolveSourceTitle:o}){if(t.length===0&&!r)return E.jsx("span",{className:"text-sm italic text-[#9c9890]",children:"(interrupted)"});let s=null;for(let d=0;d<t.length;d++)if(t[d].type===bn.BEGIN_ANALYSIS){s={kind:"tool",partIdx:d};break}if(!s)for(let d=0;d<t.length;d++){const h=t[d];if(h.type==="text"){const p=h.text.indexOf(zu);if(p!==-1){s={kind:"text",partIdx:d,charIdx:p};break}}}function u(d,h,p){if(d.type==="reasoning")return E.jsx(pP,{content:d.text,isAnimating:r},h);if(d.type==="text"){const b=p??d.text;return b.trim()?E.jsx(Gi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:b},h):null}return E.jsx(toe,{part:d,progressStore:n},h)}if(!s)return E.jsx(E.Fragment,{children:t.map((d,h)=>u(d,h))});const l=[],c=[];for(let d=0;d<t.length;d++)if(d<s.partIdx)l.push(u(t[d],d));else if(d===s.partIdx){if(s.kind==="text"){const h=t[d],p=h.text.slice(0,s.charIdx),b=h.text.slice(s.charIdx+zu.length);p.trim()&&l.push(u(t[d],d,p)),b.trim()&&c.push(u(t[d],`${d}-after`,b))}}else c.push(u(t[d],d));const f=[];for(let d=s.partIdx;d<t.length;d++){const h=t[d];if(d===s.partIdx){if(s.kind==="text"&&h.type==="text"){const p=h.text.slice(s.charIdx+zu.length);p.trim()&&f.push({type:"text",text:p})}}else f.push(h)}return E.jsxs(E.Fragment,{children:[l,E.jsx(doe,{parts:f,sourceTitle:i,sourceCreatedAt:a,resolveSourceTitle:o,children:c})]})},(e,t)=>{if(e.isAnimating||t.isAnimating||e.sourceTitle!==t.sourceTitle||e.sourceCreatedAt!==t.sourceCreatedAt)return!1;if(e.parts===t.parts)return!0;if(e.parts.length!==t.parts.length)return!1;for(let r=0;r<e.parts.length;r++)if(e.parts[r]!==t.parts[r])return!1;return!0});function Ig({className:e}){return E.jsx("div",{className:e,children:E.jsx("span",{className:"inline-flex items-center gap-1",children:poe.map(t=>E.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-current",style:moe[t]},t))})})}const poe=[0,150,300],moe={0:{animation:"dot-bounce 1.2s ease-in-out infinite",animationDelay:"0ms"},150:{animation:"dot-bounce 1.2s ease-in-out infinite",animationDelay:"150ms"},300:{animation:"dot-bounce 1.2s ease-in-out infinite",animationDelay:"300ms"}};function xP({isAtBottom:e,scrollToBottom:t}){return e?null:E.jsx("button",{type:"button",onClick:()=>t({animation:"instant"}),className:"absolute bottom-3 left-1/2 -translate-x-1/2 z-30 bg-[#2b5ea7] text-white rounded-full p-2 shadow-lg hover:bg-[#1e4a8a] transition-colors",title:"Scroll to bottom","aria-label":"Scroll to bottom",children:E.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:E.jsx("polyline",{points:"6 9 12 15 18 9"})})})}function EP(e,t){e.update(t.toolCallId,r=>{if(t.part.type==="reset")return{parts:[]};const n=[...r?.parts??[]];if(t.part.type==="tool-call")n.push({type:"tool-call",toolName:t.part.toolName});else if(t.part.type==="text-delta"){const i=n[n.length-1];i?.type==="text"?n[n.length-1]={...i,content:i.content+t.part.delta}:n.push({type:"text",content:t.part.delta})}else if(t.part.type==="reasoning-delta"){const i=n[n.length-1];i?.type==="reasoning"?n[n.length-1]={...i,content:i.content+t.part.delta}:n.push({type:"reasoning",content:t.part.delta})}else if(t.part.type==="query"){let i=-1;for(let a=n.length-1;a>=0;a--)if(n[a].type==="tool-call"){i=a;break}i!==-1&&n.splice(i,1),n.push({type:"query",query:t.part.query,results:t.part.results})}else if(t.part.type==="begin-analysis")n.push({type:"analysis-start"});else if(t.part.type==="mark-summary"){for(let i=n.length-1;i>=0;i--)if(n[i].type==="text"){n[i]={...n[i],type:"summary"};break}}return{parts:n}})}function TP(e){const t=window.getSelection();!t||t.isCollapsed||(e.clipboardData.setData("text/plain",t.toString().trimEnd()),e.preventDefault())}function goe({sessionId:e,initialMessages:t,onComplete:r,header:n,beforeInput:i}){const[a,o]=m.useState(t),s=m.useRef(new Cw).current,u=m.useRef(t);u.current=t;const l=m.useRef(r);l.current=r;const{scrollRef:c,contentRef:f,isAtBottom:d,handleWheel:h,scrollToBottom:p}=GT();m.useEffect(()=>{let T=!1;const x=new EventSource(`/api/chat/subscribe/${e}`);let _;const w=new ReadableStream({start(O){_=O}});let A=0,S=null;return x.addEventListener("part",O=>{if(!T){A=0;try{const R=JSON.parse(O.data);R.type==="data-provider-part"&&EP(s,R.data),_.enqueue(R)}catch{}}}),x.addEventListener("done",()=>{try{_.close()}catch{}x.close()}),x.onerror=()=>{if(x.readyState===EventSource.CLOSED){try{_.close()}catch{}return}if(A++,A>=Oa.maxSseErrors){try{_.close()}catch{}x.close();return}S&&clearTimeout(S),S=setTimeout(()=>{A=0},1e4)},(async()=>{let O=null,R=null;const C=()=>{R=null;const M=O;O=null,!T&&M&&o([...u.current,M])};try{for await(const M of v3({stream:w})){if(T)break;O=M,R===null&&(R=setTimeout(C,Oa.chatThrottleMs))}}catch{}R!==null&&clearTimeout(R),C(),T||l.current()})(),()=>{T=!0,x.close(),S&&clearTimeout(S);try{_.close()}catch{}s.clear()}},[e,s]);const b=async()=>{try{await fetch("/api/chat/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:e})})}catch{}},y=a.length>0&&a[a.length-1]?.role==="user",v=a.length-1;return E.jsxs("div",{className:z.chatContainer,children:[E.jsxs("div",{className:"relative flex-1 min-h-0",children:[E.jsx("div",{ref:c,className:"overflow-y-auto overflow-x-hidden h-full",onWheel:h,onCopy:TP,children:E.jsxs("div",{ref:f,children:[n,a.map((T,x)=>{const _=T.role==="assistant"&&x===v;return E.jsxs("div",{className:"px-10",children:[x>0&&E.jsx("div",{className:z.chatSeparator}),E.jsxs("div",{children:[E.jsx("div",{className:T.role==="user"?z.chatUserLabel:z.chatAssistantLabel,children:T.role==="user"?"you":"assistant"}),E.jsx("div",{className:T.role==="user"?z.chatUserMessage:z.chatAssistantMessage,children:E.jsx(vP,{parts:T.parts,isAnimating:_,progressStore:s})})]})]},T.id||`msg-${x}`)}),y&&E.jsxs("div",{className:"px-10",children:[E.jsx("div",{className:z.chatSeparator}),E.jsx(Ig,{className:z.chatThinking})]}),E.jsx("div",{style:{height:"40px"}})]})}),E.jsx(xP,{isAtBottom:d,scrollToBottom:p})]}),i,E.jsx("div",{className:z.chatInputArea,children:E.jsxs("div",{className:"flex gap-3 items-start",children:[E.jsx("textarea",{placeholder:"Ask a debugging question...",disabled:!0,rows:1,className:z.chatInput}),E.jsx("button",{type:"button",onClick:b,"aria-label":"Stop generating",className:z.chatStopButton,children:"Stop"})]})})]})}var mh,VT;function boe(){if(VT)return mh;VT=1;function e(t,r){if(typeof t!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);let n,i=0;return function(...o){clearTimeout(n);const s=Date.now(),u=s-i,l=r-u;l<=0?(i=s,t.apply(this,o)):n=setTimeout(()=>{i=Date.now(),t.apply(this,o)},l)}}return mh=e,mh}var yoe=boe();const voe=In(yoe);var wP=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Ge=(e,t,r)=>(wP(e,t,"read from private field"),r?r.call(e):t.get(e)),Xr=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},zn=(e,t,r,n)=>(wP(e,t,"write to private field"),t.set(e,r),r);function xoe(e,t){return t!=null?voe(e,t):e}var wr,qu,Wu,jo,Bo,Fo,ba,Yp,Kp,Eoe=class{constructor(e=[]){Xr(this,wr,void 0),Xr(this,qu,"ready"),Xr(this,Wu,void 0),Xr(this,jo,new Set),Xr(this,Bo,new Set),Xr(this,Fo,new Set),this.pushMessage=t=>{zn(this,wr,Ge(this,wr).concat(t)),Ge(this,ba).call(this)},this.popMessage=()=>{zn(this,wr,Ge(this,wr).slice(0,-1)),Ge(this,ba).call(this)},this.replaceMessage=(t,r)=>{zn(this,wr,[...Ge(this,wr).slice(0,t),this.snapshot(r),...Ge(this,wr).slice(t+1)]),Ge(this,ba).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,r)=>{const n=r?xoe(t,r):t;return Ge(this,jo).add(n),()=>{Ge(this,jo).delete(n)}},this["~registerStatusCallback"]=t=>(Ge(this,Bo).add(t),()=>{Ge(this,Bo).delete(t)}),this["~registerErrorCallback"]=t=>(Ge(this,Fo).add(t),()=>{Ge(this,Fo).delete(t)}),Xr(this,ba,()=>{Ge(this,jo).forEach(t=>t())}),Xr(this,Yp,()=>{Ge(this,Bo).forEach(t=>t())}),Xr(this,Kp,()=>{Ge(this,Fo).forEach(t=>t())}),zn(this,wr,e)}get status(){return Ge(this,qu)}set status(e){zn(this,qu,e),Ge(this,Yp).call(this)}get error(){return Ge(this,Wu)}set error(e){zn(this,Wu,e),Ge(this,Kp).call(this)}get messages(){return Ge(this,wr)}set messages(e){zn(this,wr,[...e]),Ge(this,ba).call(this)}};wr=new WeakMap;qu=new WeakMap;Wu=new WeakMap;jo=new WeakMap;Bo=new WeakMap;Fo=new WeakMap;ba=new WeakMap;Yp=new WeakMap;Kp=new WeakMap;var ya,Gp=class extends w3{constructor({messages:e,...t}){const r=new Eoe(e);super({...t,state:r}),Xr(this,ya,void 0),this["~registerMessagesCallback"]=(n,i)=>Ge(this,ya)["~registerMessagesCallback"](n,i),this["~registerStatusCallback"]=n=>Ge(this,ya)["~registerStatusCallback"](n),this["~registerErrorCallback"]=n=>Ge(this,ya)["~registerErrorCallback"](n),zn(this,ya,r)}};ya=new WeakMap;function Toe({experimental_throttle:e,resume:t=!1,...r}={}){const n=m.useRef("chat"in r?{}:{onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen});"chat"in r||(n.current={onToolCall:r.onToolCall,onData:r.onData,onFinish:r.onFinish,onError:r.onError,sendAutomaticallyWhen:r.sendAutomaticallyWhen});const i={...r,onToolCall:d=>{var h,p;return(p=(h=n.current).onToolCall)==null?void 0:p.call(h,d)},onData:d=>{var h,p;return(p=(h=n.current).onData)==null?void 0:p.call(h,d)},onFinish:d=>{var h,p;return(p=(h=n.current).onFinish)==null?void 0:p.call(h,d)},onError:d=>{var h,p;return(p=(h=n.current).onError)==null?void 0:p.call(h,d)},sendAutomaticallyWhen:d=>{var h,p,b;return(b=(p=(h=n.current).sendAutomaticallyWhen)==null?void 0:p.call(h,d))!=null?b:!1}},a=m.useRef("chat"in r?r.chat:new Gp(i));("chat"in r&&r.chat!==a.current||"id"in r&&a.current.id!==r.id)&&(a.current="chat"in r?r.chat:new Gp(i));const s=m.useCallback(d=>a.current["~registerMessagesCallback"](d,e),[e,a.current.id]),u=m.useSyncExternalStore(s,()=>a.current.messages,()=>a.current.messages),l=m.useSyncExternalStore(a.current["~registerStatusCallback"],()=>a.current.status,()=>a.current.status),c=m.useSyncExternalStore(a.current["~registerErrorCallback"],()=>a.current.error,()=>a.current.error),f=m.useCallback(d=>{typeof d=="function"&&(d=d(a.current.messages)),a.current.messages=d},[a]);return m.useEffect(()=>{t&&a.current.resumeStream()},[t,a]),{id:a.current.id,messages:u,setMessages:f,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:c,resumeStream:a.current.resumeStream,status:l,addToolResult:a.current.addToolOutput,addToolOutput:a.current.addToolOutput,addToolApprovalResponse:a.current.addToolApprovalResponse}}const AP={full:{userMessage:z.chatUserMessage,assistantMessage:z.chatAssistantMessage,separator:z.chatSeparator,thinking:z.chatThinking,emptyState:z.chatEmptyState,inputArea:z.chatInputArea,textarea:z.chatInput,sendBtn:z.chatButton,stopBtn:z.chatStopButton,continueMargin:"mt-4"},panel:{userMessage:z.panelChatUserMessage,assistantMessage:z.panelChatAssistantMessage,separator:z.panelChatSeparator,thinking:z.panelChatThinking,emptyState:z.panelChatEmptyState,inputArea:z.panelChatInputArea,textarea:z.panelChatTextarea,sendBtn:z.primaryBtn,stopBtn:z.secondaryBtn,continueMargin:"mt-3"}},woe=m.memo(function({msg:t,msgIndex:r,isAnimating:n,progressStore:i,variant:a,sourceTitle:o,sourceCreatedAt:s,resolveSourceTitle:u,renderMessage:l}){const c=AP[a],f=a==="panel"?"px-4":"px-10",d=m.useRef(null),h=E.jsx("div",{className:t.role==="user"?z.chatUserLabel:z.chatAssistantLabel,children:t.role==="user"?"you":"assistant"}),p=E.jsx("div",{className:t.role==="user"?c.userMessage:c.assistantMessage,children:E.jsx(vP,{parts:t.parts,isAnimating:n,progressStore:i,sourceTitle:o,sourceCreatedAt:s,resolveSourceTitle:u})}),b=E.jsxs("div",{className:"relative group",children:[!n&&E.jsx("div",{className:z.chatMessageActions,children:E.jsx(Cg,{contentRef:d,parts:t.parts})}),E.jsxs("div",{ref:d,className:z.chatMessageCard,children:[h,p]})]});return E.jsxs("div",{className:f,children:[r>0&&E.jsx("div",{className:c.separator}),l?l(t,r,{label:h,content:p}):b]})}),_P=m.forwardRef(function({chatId:t,apiEndpoint:r,placeholder:n="Send a message...",extraBody:i,onData:a,initialMessages:o,onStatusChange:s,onBeforeStop:u,variant:l="full",header:c,scrollHeader:f,emptyStateExtras:d,beforeInput:h,afterMessages:p,renderMessage:b,readOnly:y=!1,sourceTitle:v,sourceCreatedAt:T,resolveSourceTitle:x,className:_},w){const[A,S]=m.useState(""),O=m.useRef(new Cw).current,R=AP[l],C=l==="panel"?"px-4":"px-10",M=m.useRef(null),{scrollRef:L,contentRef:Q,isAtBottom:H,handleWheel:U,scrollToBottom:q,scrollToTop:J}=GT(),V=m.useRef(a);V.current=a;const re=m.useRef(i);re.current=i;const N=m.useMemo(()=>new Gp({id:t,messages:o,transport:new Sw({api:r,prepareSendMessagesRequest:({id:Ne,messages:F})=>({body:{id:Ne,message:F[F.length-1],...re.current}})}),onData:Ne=>{Ne.type==="data-provider-part"&&EP(O,Ne.data),V.current?.(Ne)}}),[]),{messages:le,setMessages:he,status:P,sendMessage:pe,stop:we,error:ce}=Toe({chat:N,experimental_throttle:Oa.chatThrottleMs}),fe=m.useRef(pe);fe.current=pe;const ge=m.useRef(le);ge.current=le;const Y=P==="submitted"||P==="streaming",G=m.useRef(P),ue=m.useRef(s);ue.current=s,m.useEffect(()=>{G.current!==P&&(P==="ready"&&(O.clear(),M.current?.focus()),ue.current?.(P,le)),G.current=P},[P,le]);const W=le[le.length-1],Fe=W?.parts[W.parts.length-1],Ie=!Y&&le.length>0&&W?.role==="assistant"&&Fe?.type.startsWith("tool-"),st=Fe?.state,rt=Fe?.type.startsWith("tool-")&&st!=="output-available",er=Fe?.type==="text"||Fe?.type==="reasoning",xe=P==="submitted"||P==="streaming"&&!er&&!rt,$e=P==="streaming"?le[le.length-1]?.id:null,xt=()=>{u?.({messages:le,progressStore:O}),fetch("/api/chat/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})}).catch(()=>{}),we()},lr=m.useRef(xt);lr.current=xt,m.useEffect(()=>{if(!Y)return;const Ne=F=>{F.key==="Escape"&&lr.current()};return document.addEventListener("keydown",Ne),()=>document.removeEventListener("keydown",Ne)},[Y]);const Vr=Ne=>{Ne.preventDefault();const F=A.trim();!F||Y||(S(""),q({animation:"instant"}),pe({text:F}),M.current?.focus())},cf=m.useCallback(()=>{q({animation:"instant"}),fe.current({text:"Continue"})},[q]),ff=m.useCallback(()=>{const Ne=ge.current;let F=-1;for(let ve=Ne.length-1;ve>=0;ve--)if(Ne[ve]?.role==="user"){F=ve;break}if(F===-1)return;const be=Ne[F].parts.find(ve=>ve.type==="text");!be||be.type!=="text"||(he(Ne.slice(0,F)),fe.current({text:be.text}))},[he]);return m.useImperativeHandle(w,()=>({messages:le,setMessages:he,sendMessage:pe,stop:we,scrollToBottom:q,scrollToTop:J,progressStore:O,status:P,isLoading:Y,error:ce}),[le,he,pe,we,q,J,O,P,Y,ce]),E.jsxs("div",{className:`flex flex-col h-full ${_??""}`,children:[c,E.jsxs("div",{className:"relative flex-1 min-h-0",children:[E.jsx("div",{ref:L,className:`overflow-y-auto overflow-x-hidden h-full${l==="panel"?" py-4":""}`,onWheel:U,onCopy:TP,children:E.jsxs("div",{ref:Q,className:"min-h-full flex flex-col",children:[f,le.length===0&&P!=="submitted"&&E.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-6 py-16",children:d??E.jsx("span",{className:R.emptyState,children:n})}),le.map((Ne,F)=>E.jsx(woe,{msg:Ne,msgIndex:F,isAnimating:Ne.id===$e,progressStore:O,variant:l,sourceTitle:v,sourceCreatedAt:T,resolveSourceTitle:x,renderMessage:b},Ne.id||`msg-${F}`)),xe&&E.jsxs("div",{className:C,children:[le.length>0&&E.jsx("div",{className:R.separator}),E.jsx(Ig,{className:R.thinking})]}),!y&&Ie&&E.jsxs("div",{className:`flex flex-col items-center gap-2 ${R.continueMargin} ${C}`,children:[E.jsx("span",{className:"text-xs text-[#9c9890] font-sans",children:"Response was interrupted"}),E.jsx("button",{type:"button",onClick:cf,className:z.chatContinueButton,children:"Continue"})]}),p&&E.jsx("div",{className:C,children:p}),!y&&ce&&E.jsx("div",{className:C,children:E.jsxs("div",{className:"mt-3 text-sm text-[#b33a2a] bg-[#b33a2a]/5 border border-[#b33a2a]/20 rounded px-4 py-3 flex items-center gap-3",children:[E.jsx("span",{className:"flex-1",children:ce.message}),E.jsx("button",{type:"button",onClick:ff,className:"text-xs underline shrink-0 font-sans",children:"Retry"})]})}),E.jsx("div",{style:{height:"40px"}})]})}),E.jsx(xP,{isAtBottom:H,scrollToBottom:q})]}),h,!y&&E.jsx("form",{onSubmit:Vr,className:R.inputArea,children:E.jsxs("div",{className:l==="full"?"flex gap-3 items-start":"flex gap-2",children:[E.jsx("textarea",{ref:M,value:A,onChange:Ne=>{S(Ne.target.value),Ne.target.style.height="auto",Ne.target.style.height=`${Ne.target.scrollHeight}px`},onKeyDown:Ne=>{if(Ne.key==="Enter"&&!Ne.shiftKey){Ne.preventDefault(),Vr(Ne);const F=Ne.target;F.style.height="auto"}},placeholder:n,rows:1,autoFocus:!0,className:R.textarea}),Y?E.jsx("button",{type:"button",onClick:xt,"aria-label":"Stop generating",className:R.stopBtn,children:"Stop"}):E.jsx("button",{type:"submit",disabled:!A.trim(),"aria-label":"Send message",className:R.sendBtn,children:"Send"})]})})]})});function Aoe({projectId:e,existingConfig:t}){const[r,n]=m.useState(!1),[i,a]=m.useState(""),o=m.useRef(null),s=m.useRef(null),u=m.useRef(null),[l,c]=m.useState({bottom:0,right:0}),[f,d]=FP("gcp-projectId"),h=bt.useUtils(),{data:p,isLoading:b}=bt.provider.listGcpProjects.useQuery(void 0,{staleTime:Oa.updateCheckStaleTimeMs,enabled:r}),y=bt.provider.saveConfig.useMutation({onSuccess:()=>h.provider.getConfigs.invalidate()}),v=m.useMemo(()=>(p??[]).map(w=>({value:w.projectId,label:w.name?`${w.name} (${w.projectId})`:w.projectId})),[p]),T=m.useMemo(()=>{const w=i.toLowerCase();return[...w?v.filter(S=>S.label.toLowerCase().includes(w)):v].sort((S,O)=>{const R=f.has(S.value)?0:1,C=f.has(O.value)?0:1;return R!==C?R-C:S.label.localeCompare(O.label)})},[v,i,f]);m.useEffect(()=>{if(!r)return;const w=o.current.getBoundingClientRect();c({bottom:window.innerHeight-w.top+4,right:window.innerWidth-w.right}),a(""),requestAnimationFrame(()=>u.current?.focus())},[r]),m.useEffect(()=>{if(!r)return;const w=A=>{o.current?.contains(A.target)||s.current?.contains(A.target)||n(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[r]);function x(w){y.mutate({type:"gcp",config:{...t,projectId:w}}),n(!1)}const _=r?ks.createPortal(E.jsxs("div",{ref:s,className:"fixed z-[100] bg-white border border-[#d4d2cd] rounded shadow-lg w-72",style:{bottom:l.bottom,right:l.right},children:[E.jsx("div",{className:"p-1.5 border-b border-[#e8e6e1]",children:E.jsx("input",{ref:u,type:"text",value:i,onChange:w=>a(w.target.value),placeholder:"Search projects...",className:"w-full px-2 py-1.5 text-xs font-sans bg-[#f5f4f0] border border-[#e8e6e1] rounded focus:outline-none focus:border-[#2b5ea7] placeholder:text-[#9c9890] text-[#2c2c2c]",onKeyDown:w=>{w.key==="Escape"&&n(!1),w.key==="Enter"&&T.length>0&&x(T[0].value)}})}),E.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:b?E.jsx("div",{className:"px-3 py-3 text-xs text-[#9c9890] text-center font-sans",children:"Loading…"}):T.length===0?E.jsx("div",{className:"px-3 py-3 text-xs text-[#9c9890] text-center font-sans",children:"No projects found"}):T.map(w=>{const A=w.value===e,S=f.has(w.value);return E.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1.5 text-xs font-sans cursor-pointer transition-colors ${A?"bg-[#2b5ea7]/10 text-[#2b5ea7]":"text-[#2c2c2c] hover:bg-[#f5f4f0]"}`,onClick:()=>x(w.value),children:[E.jsx("button",{type:"button",onClick:O=>{O.stopPropagation(),d(w.value)},className:`shrink-0 w-4 h-4 flex items-center justify-center text-[10px] transition-colors ${S?"text-[#d4a017]":"text-[#d4d2cd] hover:text-[#9c9890]"}`,title:S?"Unstar":"Star to pin to top",children:S?"★":"☆"}),E.jsx("span",{className:"truncate flex-1",children:w.label})]},w.value)})})]}),document.body):null;return E.jsxs(E.Fragment,{children:[E.jsx("button",{ref:o,type:"button",onClick:()=>n(w=>!w),className:`text-[10px] font-sans max-w-[16ch] truncate transition-colors ${r?"text-[#2b5ea7]":e?"text-[#9c9890] hover:text-[#6b6560]":"text-[#b0a898] hover:text-[#9c9890]"}`,title:e||"Select GCP project",children:e||"select project"}),_]})}const _oe={newrelic:"NR",gcp:"GCP",posthog:"PH",[va]:"ALL"},YT={gcp:0,newrelic:1,posthog:2};function koe(e){return[...e].sort((t,r)=>(YT[t.type]??99)-(YT[r.type]??99))}function Og({activeProvider:e,onToggle:t}){const{data:r,isLoading:n}=bt.provider.ping.useQuery(void 0,{staleTime:Oa.sessionStaleTimeMs}),{data:i}=bt.provider.getConfigs.useQuery(void 0,{staleTime:Oa.monitorPollingMs}),a=koe(r?.filter(f=>f.ok)??[]),o=a.map(f=>f.type).join(","),s=i?.find(f=>f.type==="gcp")?.config??null,u=s?.projectId??"";if(m.useEffect(()=>{if(a.length===0)return;e===va||a.some(d=>d.type===e)||t(va)},[e,o]),!r&&n||a.length===0)return null;const l=a.some(f=>f.type==="gcp")&&s!==null,c=[{type:va,name:"Unified"},...a];return E.jsxs("div",{className:"flex items-center gap-1.5",children:[l&&E.jsx("span",{className:`mr-0.5 transition-opacity ${e==="gcp"?"opacity-100":"opacity-0 pointer-events-none"}`,children:E.jsx(Aoe,{projectId:u,existingConfig:s})}),c.map(f=>{const d=e===f.type,h=f.type===va;return E.jsxs("button",{type:"button",onClick:()=>t(f.type),title:h?`Unified: one agent with every connected provider's query tools in one session${d?" (active)":""}`:`${f.name}: ${d?"active":"click to switch"}`,className:`flex items-center gap-1 px-2 py-0.5 text-[10px] font-sans rounded border transition-all ${d?"border-[#c4c0b8] bg-[#ede9e3] text-[#4a4540] shadow-[inset_0_1px_2px_rgba(0,0,0,0.1)]":"border-[#e0dbd3] text-[#b0a898] hover:text-[#6b6560] hover:border-[#c4c0b8]"}`,children:[E.jsx("span",{className:`inline-block w-1.5 h-1.5 ${h?`rounded-[1px] ${d?"bg-[#2b5ea7]":"bg-[#b9c4d4]"}`:`rounded-full ${d?z.statusDot.connected:"bg-[#d4d0c8]"}`}`}),_oe[f.type]??f.type.toUpperCase()]},f.type)})]})}const Soe={create:{icon:"+",verb:"Saved"},update:{icon:"~",verb:"Updated"},delete:{icon:"-",verb:"Deleted"}};function Coe({sessionId:e,streaming:t,onCostDataReady:r}){const[n,i]=m.useState(!1),a=m.useRef(null),o=bt.useUtils(),s=bt.memory.bySession.useQuery({sessionId:e}),u=s.data,{startedCount:l,completedCount:c}=u?.reduce((x,_)=>(_.operation==="started"?x.startedCount++:_.operation==="completed"&&x.completedCount++,x),{startedCount:0,completedCount:0})??{startedCount:0,completedCount:0},f=l>0&&l===c,d=u?.filter(x=>x.operation!=="completed"&&x.operation!=="started")??[],[h,p]=m.useState(!1);m.useEffect(()=>{if(t){p(!1);return}const x=setTimeout(()=>p(!0),3e4);return()=>clearTimeout(x)},[t]);const b=m.useRef(t);m.useEffect(()=>{b.current&&!t&&o.memory.bySession.invalidate({sessionId:e}),b.current=t},[t,e,o]);const y=m.useRef(!1);m.useEffect(()=>{!y.current&&f&&r?.(),y.current=f},[f,r]);const v=!t&&!f&&!h&&s.status==="success"&&(u?.length??0)>0;XT(()=>o.memory.bySession.invalidate({sessionId:e}),3e3,v),ZT(a,()=>i(!1));const T=h&&!f;return d.length?E.jsxs("div",{className:"relative",ref:a,children:[E.jsxs("button",{type:"button",onClick:()=>i(x=>!x),className:`flex items-center gap-1.5 text-xs font-sans transition-colors ${T?"text-[#b0a89f] hover:text-[#9c9890]":"text-[#666666] hover:text-[#2b5ea7]"}`,title:T?"Memory agent did not respond":void 0,children:[E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7z"}),E.jsx("line",{x1:"9",y1:"21",x2:"15",y2:"21"}),E.jsx("line",{x1:"10",y1:"24",x2:"14",y2:"24"})]}),E.jsx("span",{className:"inline-flex items-center justify-center min-w-[16px] h-4 px-1 rounded-full bg-[#2b5ea7]/10 text-[#2b5ea7] text-[10px] font-medium",children:d.length})]}),n&&E.jsxs("div",{className:`right-0 top-full mt-1 ${z.popoverWide}`,children:[E.jsx("div",{className:z.popoverLabel,children:"Memory Log"}),d.map(x=>{const _=Soe[x.operation]??{icon:"?",verb:x.operation};return E.jsxs("div",{className:z.popoverRow,children:[E.jsx("span",{className:"shrink-0 w-4 h-4 rounded text-center leading-4 font-mono text-[10px] bg-[#e8e3da]/30",children:_.icon}),E.jsxs("span",{children:[E.jsx("span",{className:"font-medium",children:_.verb}),x.note&&E.jsxs("span",{className:"opacity-80",children:[": ",x.note]})]})]},x.id)})]})]}):null}function kP({chatId:e,hasMessages:t,isLoading:r,onPostMortem:n,streaming:i,onCostDataReady:a,onTitleClick:o}){const s=bt.sessions.getTitle.useQuery({id:e}),u=s.data?.title,l=s.data?.titlePending??!0,c=bt.useUtils(),f=t&&l,[d,h]=m.useState(!1);m.useEffect(()=>{if(!f){h(!1);return}const b=setTimeout(()=>h(!0),6e4);return()=>clearTimeout(b)},[f]),XT(()=>c.sessions.getTitle.invalidate({id:e}),5e3,f&&!d);const p=m.useRef(l);return m.useEffect(()=>{p.current&&!l&&a?.(),p.current=l},[l,a]),E.jsx("div",{className:z.titleBar,children:E.jsxs("div",{className:"flex items-center justify-between",children:[(()=>{const b=!l&&u,y=`${z.titleText} transition-opacity duration-500 ${b?"opacity-100":"opacity-0"}`,v=b?u:" ";return o?E.jsx("button",{type:"button",onClick:o,title:"Scroll to top",className:`${y} text-left hover:opacity-80 cursor-pointer`,children:v}):E.jsx("h2",{className:y,children:v})})(),E.jsxs("div",{className:"flex items-center gap-3",children:[t&&E.jsx(Coe,{sessionId:e,streaming:i??!1,onCostDataReady:a}),i?E.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-[#9c9890] font-sans",children:[E.jsx("span",{className:z.streamingDot}),"Streaming"]}):t&&!r&&E.jsxs("button",{type:"button",onClick:n,className:`flex items-center gap-1.5 ${z.metaLink}`,children:[E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),E.jsx("polyline",{points:"14 2 14 8 20 8"}),E.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),E.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),E.jsx("polyline",{points:"10 9 9 9 8 9"})]}),"Post-Mortem"]})]})]})})}function Ioe(e){const t=e.map(s=>({label:s.label,model:s.model,cost:Pg(s.model,s.input,s.output,s.cached,s.cacheWrite)}));let r=0,n=0,i=0;for(const s of e)r+=s.input,n+=s.output,i+=s.cached;const a=t.reduce((s,u)=>s+u.cost,0),o=e.reduce((s,u)=>s+Pg(u.model,u.input,u.output,0,0),0);return{agents:t,totalCost:a,totalCostWithoutCache:o,totalInput:r,totalOutput:n,totalCached:i}}function Ooe({breakdown:e,activeProvider:t,onToggle:r}){const[n,i]=m.useState(!1),a=m.useRef(null);return ZT(a,()=>i(!1)),E.jsxs("div",{className:"relative px-10 pt-2",ref:a,children:[E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsxs("button",{type:"button",className:z.tokenSummary,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:()=>i(o=>!o),children:[e.totalInput.toLocaleString()," in · ",e.totalOutput.toLocaleString()," out",e.totalCost>0&&E.jsxs(E.Fragment,{children:[" · ",iu(e.totalCost)]})]}),E.jsx(Og,{activeProvider:t,onToggle:r})]}),n&&e.agents.length>0&&E.jsxs("div",{className:`bottom-full left-10 mb-1 ${z.popoverWide}`,children:[E.jsx("div",{className:z.popoverLabel,children:"Cost Breakdown"}),e.agents.map((o,s)=>E.jsxs("div",{className:z.popoverItemRow,children:[E.jsxs("span",{className:"truncate mr-2",children:[o.label,o.model&&E.jsxs("span",{className:"text-[#9c9890] ml-1",children:["(",o.model,")"]})]}),E.jsx("span",{className:"shrink-0 tabular-nums",children:iu(o.cost)})]},s)),e.agents.length>1&&E.jsxs(E.Fragment,{children:[E.jsx("div",{className:z.popoverDivider}),E.jsxs("div",{className:"flex items-center justify-between text-[11px] text-[#4a4540] font-sans font-medium",children:[E.jsx("span",{children:"Total"}),E.jsx("span",{className:"tabular-nums",children:iu(e.totalCost)})]})]}),e.totalCached>0&&E.jsxs("div",{className:z.popoverFootnote,children:[e.totalCached.toLocaleString()," cached tokens",e.totalCostWithoutCache>e.totalCost&&E.jsxs(E.Fragment,{children:[" · saved ",iu(e.totalCostWithoutCache-e.totalCost)]})]})]})]})}function Poe({initialText:e,onSave:t,onCancel:r}){const[n,i]=m.useState(e);return E.jsxs(E.Fragment,{children:[E.jsx("textarea",{className:z.chatEditTextarea,value:n,onChange:a=>i(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),t(n)),a.key==="Escape"&&r()},rows:Math.max(2,n.split(`
182
- `).length),autoFocus:!0}),E.jsxs("div",{className:z.chatEditActions,children:[E.jsx("button",{type:"button",onClick:()=>t(n),className:z.chatEditSave,disabled:!n.trim(),children:"Save & Send"}),E.jsx("button",{type:"button",onClick:r,className:z.chatEditCancel,children:"Cancel"})]})]})}function Noe({sessionId:e,onSessionChange:t}){const r=m.useMemo(()=>e??crypto.randomUUID(),[e]);m.useEffect(()=>{e||t(r)},[e,r,t]);const[n,i]=m.useState(0),[a,o]=m.useState(null),s=bt.sessions.importAnalysis.useMutation(),u=bt.useUtils(),l=m.useCallback(async S=>{S.preventDefault(),i(0);const O=S.dataTransfer.files;if(!O||O.length!==1||O[0].type!=="image/png"){o("Only single PNG files are supported.");return}const R=O[0];if(R.size>10*1024*1024){o("PNG is too large (>10 MB).");return}try{const C=new Uint8Array(await R.arrayBuffer());let M;try{M=await foe(C)}catch{o("Not a valid PNG file.");return}if(!M){o("No analysis data found in this image.");return}let L;try{L=jP.parse(JSON.parse(new TextDecoder().decode(M)))}catch{o("Analysis data is malformed or from an incompatible version.");return}const{id:Q}=await s.mutateAsync(L);u.sessions.list.setData(void 0,H=>{const U={id:Q,title:L.sourceTitle.slice(0,80)||gh,status:"idle",kind:Ng.IMPORTED,updatedAt:Math.floor(Date.now()/1e3),titlePending:!1};return H?[U,...H]:[U]}),o(null),t(Q)}catch{o("Couldn't import analysis.")}},[s,u,t]),c={onDragEnter:S=>{Array.from(S.dataTransfer.types).includes("Files")&&(S.preventDefault(),i(O=>O+1))},onDragOver:S=>{Array.from(S.dataTransfer.types).includes("Files")&&S.preventDefault()},onDragLeave:()=>i(S=>Math.max(0,S-1)),onDrop:l},f=n>0?E.jsx("div",{className:"absolute inset-0 z-40 pointer-events-none flex items-center justify-center bg-[#2b5ea7]/10 border-2 border-dashed border-[#2b5ea7] rounded",children:E.jsx("span",{className:"text-sm font-medium text-[#2b5ea7] bg-white/90 px-4 py-2 rounded shadow-sm",children:"Drop PNG to import analysis"})}):null,d=a?E.jsxs("div",{className:"absolute top-2 left-1/2 -translate-x-1/2 z-40 text-sm text-[#b33a2a] bg-[#b33a2a]/5 border border-[#b33a2a]/20 rounded px-4 py-2 flex items-center gap-3 shadow-sm",children:[E.jsx("span",{children:a}),E.jsx("button",{type:"button",onClick:()=>o(null),className:"text-xs underline shrink-0 font-sans",children:"dismiss"})]}):null,[h,p]=m.useState(()=>localStorage.getItem("tracer:activeProvider")??va),b=m.useCallback(S=>{localStorage.setItem("tracer:activeProvider",S),p(S)},[]),y=bt.useUtils(),v=bt.sessions.markViewed.useMutation();m.useEffect(()=>{if(!e)return;const O=y.sessions.list.getData()?.find(R=>R.id===e);!O||O.status==="idle"||O.status==="streaming"||(y.sessions.list.setData(void 0,R=>R?.map(C=>C.id===e?{...C,status:"idle"}:C)),y.sessions.activeCount.setData(void 0,R=>R&&{...R,done:Math.max(0,R.done-1)}),v.mutate({id:e}))},[e]);const T=bt.sessions.get.useQuery({id:r},{enabled:!!e,gcTime:0}),x=T.data?.messages,_=bt.sessions.getCost.useQuery({id:r},{enabled:!!e}),w=m.useMemo(()=>{const S=_.data;return S?.agents?.length?Ioe(S.agents):null},[_.data]);let A;return e&&T.isLoading?A=E.jsx("div",{className:z.chatContainer,children:E.jsx("div",{className:"flex items-center justify-center h-full",children:E.jsx("span",{className:z.chatEmptyState,children:"Loading session..."})})}):T.data?.status==="streaming"?A=E.jsx(goe,{sessionId:r,initialMessages:x??[],onComplete:()=>T.refetch(),header:E.jsx(kP,{chatId:r,hasMessages:!0,isLoading:!1,onPostMortem:()=>{},streaming:!0}),beforeInput:E.jsx("div",{className:"px-10 pt-2 flex justify-end",children:E.jsx(Og,{activeProvider:h,onToggle:b})})},r):T.data?.kind===Ng.IMPORTED?A=E.jsx(Doe,{sessionId:r,sessionTitle:T.data.title,initialMessages:x??[]},r):A=E.jsx(Roe,{chatId:r,initialMessages:x,costBreakdown:w,activeProvider:h,setActiveProvider:b,sessionTitle:T.data?.title,sessionUpdatedAt:T.data?.updatedAt},r),E.jsxs("div",{className:"relative h-full",...c,children:[A,d,f]})}function Doe({sessionId:e,sessionTitle:t,initialMessages:r}){const n=m.useRef(null),i=r[0],a=i?.metadata?.sourceTitle??t,o=i?.metadata?.sourceCreatedAt,s=m.useMemo(()=>{if(!o)return"";try{return new Date(o*1e3).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}},[o]),u=E.jsxs("div",{className:z.titleBar,children:[a&&E.jsx("h2",{className:z.titleText,children:a}),E.jsxs("div",{className:"text-xs text-[#9c9890] mt-1",children:["Imported",s?` · originally ${s}`:""]})]});return E.jsx("div",{className:z.chatContainer,children:E.jsx(_P,{ref:n,chatId:e,apiEndpoint:"/api/chat",initialMessages:r,variant:"full",readOnly:!0,sourceTitle:a,sourceCreatedAt:o,scrollHeader:u})})}function Roe({chatId:e,initialMessages:t,costBreakdown:r,activeProvider:n,setActiveProvider:i,sessionTitle:a,sessionUpdatedAt:o}){const[s,u]=m.useState(null),[l,c]=m.useState(""),[f,d]=m.useState(null),[h,p]=m.useState(!1),[b,y]=m.useState(!!t?.length),[v,T]=m.useState(()=>t?.length?t[t.length-1]?.role==="user":!1),x=m.useRef(null),_=m.useRef(!1),w=bt.useUtils(),A=bt.sessions.markViewed.useMutation(),S=bt.sessions.truncateMessages.useMutation(),O=bt.sessions.saveMessages.useMutation(),R=m.useCallback(async()=>(await w.sessions.get.fetch({id:e}))?.title,[w,e]),C=()=>{if(!x.current)return;const ce=x.current.messages,fe=ce[ce.length-1];if(!fe||fe.role!=="user")return;const ge=fe.parts.find(Y=>Y.type==="text");!ge||ge.type!=="text"||(x.current.setMessages(ce.slice(0,-1)),x.current.scrollToBottom({animation:"instant"}),x.current.sendMessage({text:ge.text}))},M=()=>{x.current&&(x.current.scrollToBottom({animation:"instant"}),x.current.sendMessage({text:`Generate a Post-Mortem Report for this investigation session.
183
-
184
- Structure it with these sections:
185
- - **Summary**: Concise overview of the incident and key findings
186
- - **Impact**: Quantified impact based on data discovered (error rates, affected services, latency, etc.)
187
- - **Timeline**: Chronological sequence of key events and findings with timestamps
188
- - **Root Cause**: Technical explanation of what caused the issue
189
- - **Resolution**: What fixed the issue or recommended next steps
190
-
191
- Base the report entirely on the investigation data and findings from this conversation. Be specific — include actual error messages, metric values, service names, and query results where relevant.`}))},L=ce=>{d(ce)},Q=async()=>{f===null||!x.current||(await S.mutateAsync({id:e,keepCount:f}),x.current.setMessages(x.current.messages.slice(0,f)),d(null))},H=ce=>{const ge=x.current?.messages[ce]?.parts.find(Y=>Y.type==="text");!ge||ge.type!=="text"||(u(ce),c(ge.text))},U=()=>{u(null)},q=async ce=>{if(s===null||!ce.trim()||!x.current)return;const fe=ce.trim();await S.mutateAsync({id:e,keepCount:s}),x.current.setMessages(x.current.messages.slice(0,s)),u(null),x.current.scrollToBottom({animation:"instant"}),x.current.sendMessage({text:fe})},J=({messages:ce,progressStore:fe})=>{const ge=ce.map(Y=>{if(Y.role!=="assistant")return Y;const G=Y.parts.map(ue=>{const W=ue;if(W.toolCallId&&W.state!=="output-available"){const Fe=fe.getSnapshot(W.toolCallId),Ie=Fe?.parts?.length?{parts:Fe.parts}:{error:"Aborted"};return{...W,state:"output-available",output:Ie}}return ue});return{...Y,parts:G}});O.mutate({id:e,messages:ge})},V=m.useRef(H);V.current=H;const re=m.useRef(L);re.current=L;const N=m.useRef(q);N.current=q;const le=m.useRef(U);le.current=U;const he=m.useCallback((ce,fe,{label:ge,content:Y})=>{const G=m.createRef();return E.jsxs("div",{className:"relative group",children:[!h&&s===null&&E.jsxs("div",{className:z.chatMessageActions,children:[E.jsx(Cg,{contentRef:G,parts:ce.parts}),ce.role==="user"&&E.jsx("button",{type:"button",onClick:()=>V.current(fe),className:z.chatActionButton,title:"Edit message","aria-label":"Edit message",children:E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),E.jsx("path",{d:"m15 5 4 4"})]})}),E.jsx("button",{type:"button",onClick:()=>re.current(fe),className:z.chatActionButton,title:"Delete this message and everything after it","aria-label":"Delete message",children:E.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E.jsx("path",{d:"M18 6 6 18"}),E.jsx("path",{d:"m6 6 12 12"})]})})]}),s===fe?E.jsx(Poe,{initialText:l,onSave:ue=>N.current(ue),onCancel:()=>le.current()}):E.jsxs("div",{ref:G,className:z.chatMessageCard,children:[ge,Y]})]})},[h,s]),P=m.useCallback(()=>{w.sessions.getCost.invalidate({id:e})},[w,e]),pe=E.jsx(kP,{chatId:e,hasMessages:b,isLoading:h,onPostMortem:M,streaming:h,onCostDataReady:P,onTitleClick:()=>x.current?.scrollToTop({animation:"smooth"})}),we=E.jsxs("ul",{className:"max-w-md space-y-4 text-sm text-[#b8b5af] font-serif text-center",children:[E.jsxs("li",{children:[E.jsx("div",{className:"text-[#9c9890]",children:"Garbage in, garbage out."}),E.jsx("div",{children:"The clearer your question, the sharper the answer — vague ones can still work."})]}),E.jsxs("li",{children:[E.jsx("div",{className:"text-[#9c9890]",children:"Models hallucinate."}),E.jsx("div",{children:"Don't take every claim at face value — verify the parts that matter."})]}),E.jsxs("li",{children:[E.jsx("div",{className:"text-[#9c9890]",children:"Self-review still matters."}),E.jsx("div",{children:"Don't share findings with teammates until you've checked them yourself."})]})]});return E.jsxs("div",{className:z.chatContainer,children:[E.jsx(_P,{ref:x,chatId:e,apiEndpoint:"/api/chat",placeholder:"Ask a debugging question...",initialMessages:t,variant:"full",sourceTitle:a,sourceCreatedAt:o,resolveSourceTitle:R,scrollHeader:pe,emptyStateExtras:we,onBeforeStop:J,onStatusChange:(ce,fe)=>{const ge=ce==="submitted"||ce==="streaming";p(ge),ge&&(_.current=!1),fe.length>0&&y(!0);const Y=fe[fe.length-1];if(T(!ge&&fe.length>0&&Y?.role==="user"),ce==="submitted"){let G=!1;w.sessions.list.setData(void 0,ue=>!ue||ue.some(W=>W.id===e)?ue:(G=!0,[{id:e,title:gh,status:"streaming",kind:null,updatedAt:Math.floor(Date.now()/1e3),titlePending:!0},...ue])),G&&w.sessions.activeCount.setData(void 0,ue=>ue&&{...ue,streaming:ue.streaming+1})}ce==="ready"&&(_.current||(_.current=!0,A.mutate({id:e})),w.sessions.getCost.invalidate({id:e}),a===gh&&w.sessions.get.invalidate({id:e}))},extraBody:n?{activeProvider:n}:void 0,beforeInput:r&&(r.totalInput>0||r.totalOutput>0)?E.jsx(Ooe,{breakdown:r,activeProvider:n,onToggle:i}):E.jsx("div",{className:"px-10 pt-2 flex justify-end",children:E.jsx(Og,{activeProvider:n,onToggle:i})}),afterMessages:v?E.jsx("div",{className:"flex justify-center mt-4",children:E.jsx("button",{type:"button",onClick:C,className:z.chatContinueButton,children:"Retry"})}):void 0,renderMessage:he}),E.jsx(BP,{open:f!==null,title:"Delete messages",message:"This message and all messages after it will be removed. This cannot be undone.",confirmLabel:"Delete",onConfirm:Q,onCancel:()=>d(null)})]})}const use=Object.freeze(Object.defineProperty({__proto__:null,Debug:Noe},Symbol.toStringTag,{value:"Module"})),Loe=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:F_},Symbol.toStringTag,{value:"Module"}));export{s7 as A,use as D,$oe as L,br as R};