tracer-sh 0.2.4 → 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.
@@ -0,0 +1,191 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62-tPjSIaIA.js","assets/index-IihLiR83.js","assets/index-B4Hwftt4.css","assets/SearchableSelect-BPzDtKhB.js"])))=>i.map(i=>d[i]);
2
+ import{s as LN,e as MN,f as dr,g as ne,_ as Gu,h as QT,l as jN,i as ro,o as Ve,k as de,m as Zt,n as Hn,p as BN,q as Co,v as FN,w as $N,x as Je,y as UN,r as m,z as Nn,j as v,B as sc,D as em,R as HN,c as Jt,b as F,E as zN,F as zn,G as vh,H as qN,I as WN,J as JT,W as Ra,K as ew,C as tw,t as dt,U as wa,L as rw,N as nw,O as Rg,P as ou,Q as VN,T as Lg,V as xh,X as YN,Y as KN}from"./index-IihLiR83.js";import{r as Io,u as GN}from"./SearchableSelect-BPzDtKhB.js";const iw=new Set(["timestamp","start","end","created_at","updated_at","time"]);function XN(e,t){return iw.has(e)?t>1e12:/time/i.test(e)&&t>1e12&&t<3e12}function ZN(e,t){return iw.has(e)?t>1e9&&t<1e12:/time/i.test(e)&&t>1e9&&t<3e9}var aw="vercel.ai.error",QN=Symbol.for(aw),Mg,jg,un=class sw extends(jg=Error,Mg=QN,jg){constructor({name:t,message:r,cause:n}){super(r),this[Mg]=!0,this.name=t,this.cause=n}static isInstance(t){return sw.hasMarker(t,aw)}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 ow(e){return e==null?"unknown error":typeof e=="string"?e:e instanceof Error?e.message:JSON.stringify(e)}var uw="AI_InvalidArgumentError",lw=`vercel.ai.error.${uw}`,JN=Symbol.for(lw),Bg,Fg,eP=class extends(Fg=un,Bg=JN,Fg){constructor({message:e,cause:t,argument:r}){super({name:uw,message:e,cause:t}),this[Bg]=!0,this.argument=r}static isInstance(e){return un.hasMarker(e,lw)}},cw="AI_JSONParseError",fw=`vercel.ai.error.${cw}`,tP=Symbol.for(fw),$g,Ug,Hg=class extends(Ug=un,$g=tP,Ug){constructor({text:e,cause:t}){super({name:cw,message:`JSON parsing failed: Text: ${e}.
3
+ Error message: ${ow(t)}`,cause:t}),this[$g]=!0,this.text=e}static isInstance(e){return un.hasMarker(e,fw)}},dw="AI_TypeValidationError",hw=`vercel.ai.error.${dw}`,rP=Symbol.for(hw),zg,qg,La=class Eh extends(qg=un,zg=rP,qg){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:dw,message:`${i}: Value: ${JSON.stringify(t)}.
4
+ Error message: ${ow(r)}`,cause:r}),this[zg]=!0,this.value=t,this.context=n}static isInstance(t){return un.hasMarker(t,hw)}static wrap({value:t,cause:r,context:n}){var i,a,s;return Eh.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&&((s=r.context)==null?void 0:s.entityId)===n?.entityId?r:new Eh({value:t,cause:r,context:n})}},no;(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 s of i)a[s]=s;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return e.objectValues(s)},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 s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(const s of i)if(a(s))return s},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(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=n,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(no||(no={}));var Wg;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Wg||(Wg={}));no.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);no.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 Xu 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 s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let o=n,u=0;for(;u<s.path.length;){const l=s.path[u];u===s.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(r(s))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return i(this),n}static assert(t){if(!(t instanceof Xu))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,no.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()}}Xu.create=e=>new Xu(e);var Vg;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Vg||(Vg={}));var Ee;(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"})(Ee||(Ee={}));class Yg 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 Kg=10,nP=13,pi=32;function pf(e){}function iP(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=pf,onError:r=pf,onRetry:n=pf,onComment:i}=e,a=[];let s=!0,o,u="",l=0,c;function f(x){if(s&&(s=!1,x.charCodeAt(0)===239&&x.charCodeAt(1)===187&&x.charCodeAt(2)===191&&(x=x.slice(3))),a.length===0){const k=d(x);k!==""&&a.push(k);return}if(x.indexOf(`
5
+ `)===-1&&x.indexOf("\r")===-1){a.push(x);return}a.push(x);const T=a.join("");a.length=0;const E=d(T);E!==""&&a.push(E)}function d(x){let T=0;if(x.indexOf("\r")===-1){let E=x.indexOf(`
6
+ `,T);for(;E!==-1;){if(T===E){l>0&&t({id:o,event:c,data:u}),o=void 0,u="",l=0,c=void 0,T=E+1,E=x.indexOf(`
7
+ `,T);continue}const k=x.charCodeAt(T);if(Gg(x,T,k)){const w=x.charCodeAt(T+5)===pi?T+6:T+5,A=x.slice(w,E);if(l===0&&x.charCodeAt(E+1)===Kg){t({id:o,event:c,data:A}),o=void 0,u="",c=void 0,T=E+2,E=x.indexOf(`
8
+ `,T);continue}u=l===0?A:`${u}
9
+ ${A}`,l++}else Xg(x,T,k)?c=x.slice(x.charCodeAt(T+6)===pi?T+7:T+6,E)||void 0:h(x,T,E);T=E+1,E=x.indexOf(`
10
+ `,T)}return x.slice(T)}for(;T<x.length;){const E=x.indexOf("\r",T),k=x.indexOf(`
11
+ `,T);let w=-1;if(E!==-1&&k!==-1?w=E<k?E:k:E!==-1?E===x.length-1?w=-1:w=E:k!==-1&&(w=k),w===-1)break;h(x,T,w),T=w+1,x.charCodeAt(T-1)===nP&&x.charCodeAt(T)===Kg&&T++}return x.slice(T)}function h(x,T,E){if(T===E){b();return}const k=x.charCodeAt(T);if(Gg(x,T,k)){const C=x.charCodeAt(T+5)===pi?T+6:T+5,M=x.slice(C,E);u=l===0?M:`${u}
12
+ ${M}`,l++;return}if(Xg(x,T,k)){c=x.slice(x.charCodeAt(T+6)===pi?T+7:T+6,E)||void 0;return}if(k===105&&x.charCodeAt(T+1)===100&&x.charCodeAt(T+2)===58){const C=x.slice(x.charCodeAt(T+3)===pi?T+4:T+3,E);o=C.includes("\0")?void 0:C;return}if(k===58){if(i){const C=x.slice(T,E);i(C.slice(x.charCodeAt(T+1)===pi?2:1))}return}const w=x.slice(T,E),A=w.indexOf(":");if(A===-1){p(w,"",w);return}const S=w.slice(0,A),O=w.charCodeAt(A+1)===pi?2:1,R=w.slice(A+O);p(S,R,w)}function p(x,T,E){switch(x){case"event":c=T||void 0;break;case"data":u=l===0?T:`${u}
13
+ ${T}`,l++;break;case"id":o=T.includes("\0")?void 0:T;break;case"retry":/^\d+$/.test(T)?n(parseInt(T,10)):r(new Yg(`Invalid \`retry\` value: "${T}"`,{type:"invalid-retry",value:T,line:E}));break;default:r(new Yg(`Unknown field "${x.length>20?`${x.slice(0,20)}…`:x}"`,{type:"unknown-field",field:x,value:T,line:E}));break}}function b(){l>0&&t({id:o,event:c,data:u}),o=void 0,u="",l=0,c=void 0}function y(x={}){if(x.consume&&a.length>0){const T=a.join("");h(T,0,T.length)}s=!0,o=void 0,u="",l=0,c=void 0,a.length=0}return{feed:f,reset:y}}function Gg(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 Xg(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 aP extends TransformStream{constructor({onError:t,onRetry:r,onComment:n}={}){let i;super({start(a){i=iP({onEvent:s=>{a.enqueue(s)},onError(s){t==="terminate"?a.error(s):typeof t=="function"&&t(s)},onRetry:r,onComment:n})},transform(a){i.feed(a)}})}}var Oo=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:n="-"}={})=>{const i=()=>{const a=r.length,s=new Array(t);for(let o=0;o<t;o++)s[o]=r[Math.random()*a|0];return s.join("")};if(e==null)return i;if(r.includes(n))throw new eP({argument:"separator",message:`The separator "${n}" must not be part of the alphabet "${r}".`});return()=>`${e}${n}${i()}`},sP=Oo();function oa(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 oP=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,uP=/"(?: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 Zg(e){const t=JSON.parse(e);return t===null||typeof t!="object"||oP.test(e)===!1&&uP.test(e)===!1?t:lP(t)}function lP(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 cP(e){const{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return Zg(e)}try{return Zg(e)}finally{Error.stackTraceLimit=t}}function tm(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]=mi(r[n])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(mi):mi(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(mi)),e.allOf!=null&&(e.allOf=e.allOf.map(mi)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(mi));const{definitions:t}=e;if(t!=null)for(const r of Object.keys(t))t[r]=mi(t[r]);return e}function mi(e){return typeof e=="boolean"?e:tm(e)}var fP=Symbol("Let zodToJsonSchema decide on which parser to use"),Qg={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"},dP=e=>typeof e=="string"?{...Qg,name:e}:{...Qg,...e};function Er(){return{}}function hP(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)!==Ee.ZodAny&&(a.items=Ue(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 pP(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 mP(){return{type:"boolean"}}function pw(e,t){return Ue(e.type._def,t)}var gP=(e,t)=>Ue(e.innerType._def,t);function mw(e,t,r){const n=r??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((i,a)=>mw(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 bP(e)}}var bP=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 yP(e,t){return{...Ue(e.innerType._def,t),default:e.defaultValue()}}function vP(e,t){return t.effectStrategy==="input"?Ue(e.schema._def,t):Er()}function xP(e){return{type:"string",enum:Array.from(e.values)}}var EP=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function TP(e,t){const r=[Ue(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),Ue(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),n=[];return r.forEach(i=>{if(EP(i))n.push(...i.allOf);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:s,...o}=i;a=o}n.push(a)}}),n.length?{allOf:n}:void 0}function wP(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 mf=void 0,jr={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:()=>(mf===void 0&&(mf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),mf),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 gw(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":Br(r,"email",n.message,t);break;case"format:idn-email":Br(r,"idn-email",n.message,t);break;case"pattern:zod":Kt(r,jr.email,n.message,t);break}break;case"url":Br(r,"uri",n.message,t);break;case"uuid":Br(r,"uuid",n.message,t);break;case"regex":Kt(r,n.regex,n.message,t);break;case"cuid":Kt(r,jr.cuid,n.message,t);break;case"cuid2":Kt(r,jr.cuid2,n.message,t);break;case"startsWith":Kt(r,RegExp(`^${gf(n.value,t)}`),n.message,t);break;case"endsWith":Kt(r,RegExp(`${gf(n.value,t)}$`),n.message,t);break;case"datetime":Br(r,"date-time",n.message,t);break;case"date":Br(r,"date",n.message,t);break;case"time":Br(r,"time",n.message,t);break;case"duration":Br(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":{Kt(r,RegExp(gf(n.value,t)),n.message,t);break}case"ip":{n.version!=="v6"&&Br(r,"ipv4",n.message,t),n.version!=="v4"&&Br(r,"ipv6",n.message,t);break}case"base64url":Kt(r,jr.base64url,n.message,t);break;case"jwt":Kt(r,jr.jwt,n.message,t);break;case"cidr":{n.version!=="v6"&&Kt(r,jr.ipv4Cidr,n.message,t),n.version!=="v4"&&Kt(r,jr.ipv6Cidr,n.message,t);break}case"emoji":Kt(r,jr.emoji(),n.message,t);break;case"ulid":{Kt(r,jr.ulid,n.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Br(r,"binary",n.message,t);break}case"contentEncoding:base64":{r.contentEncoding="base64";break}case"pattern:zod":{Kt(r,jr.base64,n.message,t);break}}break}case"nanoid":Kt(r,jr.nanoid,n.message,t)}return r}function gf(e,t){return t.patternStrategy==="escape"?kP(e):e}var AP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function kP(e){let t="";for(let r=0;r<e.length;r++)AP.has(e[r])||(t+="\\"),t+=e[r];return t}function Br(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 Kt(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:Jg(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):e.pattern=Jg(t,n)}function Jg(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="",s=!1,o=!1,u=!1;for(let l=0;l<i.length;l++){if(s){a+=i[l],s=!1;continue}if(n.i){if(o){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+=o?`${i[l]}\r
16
+ `:`[${i[l]}\r
17
+ ]`;continue}a+=i[l],i[l]==="\\"?s=!0:o&&i[l]==="]"?o=!1:!o&&i[l]==="["&&(o=!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 bw(e,t){var r,n,i,a,s,o;const u={type:"object",additionalProperties:(r=Ue(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===Ee.ZodString&&((i=e.keyType._def.checks)!=null&&i.length)){const{type:l,...c}=gw(e.keyType._def,t);return{...u,propertyNames:c}}else{if(((a=e.keyType)==null?void 0:a._def.typeName)===Ee.ZodEnum)return{...u,propertyNames:{enum:e.keyType._def.values}};if(((s=e.keyType)==null?void 0:s._def.typeName)===Ee.ZodBranded&&e.keyType._def.type._def.typeName===Ee.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){const{type:l,...c}=pw(e.keyType._def,t);return{...u,propertyNames:c}}}return u}function _P(e,t){if(t.mapStrategy==="record")return bw(e,t);const r=Ue(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Er(),n=Ue(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Er();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function SP(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 CP(){return{not:Er()}}function IP(){return{type:"null"}}var Th={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function OP(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in Th&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((i,a)=>{const s=Th[a._def.typeName];return s&&!i.includes(s)?[...i,s]: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 s=typeof a._def.value;switch(s){case"string":case"number":case"boolean":return[...i,s];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,s,o)=>o.indexOf(a)===s);return{type:i.length>1?i:i[0],enum:r.reduce((a,s)=>a.includes(s._def.value)?a:[...a,s._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 NP(e,t)}var NP=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,i)=>Ue(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 PP(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[Th[e.innerType._def.typeName],"null"]};const r=Ue(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function DP(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 RP(e,t){const r={type:"object",properties:{}},n=[],i=e.shape();for(const s in i){let o=i[s];if(o===void 0||o._def===void 0)continue;const u=MP(o),l=Ue(o._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(r.properties[s]=l,u||n.push(s))}n.length&&(r.required=n);const a=LP(e,t);return a!==void 0&&(r.additionalProperties=a),r}function LP(e,t){if(e.catchall._def.typeName!=="ZodNever")return Ue(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 MP(e){try{return e.isOptional()}catch{return!0}}var jP=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Ue(e.innerType._def,t);const n=Ue(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Er()},n]}:Er()},BP=(e,t)=>{if(t.pipeStrategy==="input")return Ue(e.in._def,t);if(t.pipeStrategy==="output")return Ue(e.out._def,t);const r=Ue(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Ue(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(i=>i!==void 0)}};function FP(e,t){return Ue(e.type._def,t)}function $P(e,t){const n={type:"array",uniqueItems:!0,items:Ue(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 UP(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Ue(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Ue(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Ue(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function HP(){return{not:Er()}}function zP(){return Er()}var qP=(e,t)=>Ue(e.innerType._def,t),WP=(e,t,r)=>{switch(t){case Ee.ZodString:return gw(e,r);case Ee.ZodNumber:return DP(e);case Ee.ZodObject:return RP(e,r);case Ee.ZodBigInt:return pP(e);case Ee.ZodBoolean:return mP();case Ee.ZodDate:return mw(e,r);case Ee.ZodUndefined:return HP();case Ee.ZodNull:return IP();case Ee.ZodArray:return hP(e,r);case Ee.ZodUnion:case Ee.ZodDiscriminatedUnion:return OP(e,r);case Ee.ZodIntersection:return TP(e,r);case Ee.ZodTuple:return UP(e,r);case Ee.ZodRecord:return bw(e,r);case Ee.ZodLiteral:return wP(e);case Ee.ZodEnum:return xP(e);case Ee.ZodNativeEnum:return SP(e);case Ee.ZodNullable:return PP(e,r);case Ee.ZodOptional:return jP(e,r);case Ee.ZodMap:return _P(e,r);case Ee.ZodSet:return $P(e,r);case Ee.ZodLazy:return()=>e.getter()._def;case Ee.ZodPromise:return FP(e,r);case Ee.ZodNaN:case Ee.ZodNever:return CP();case Ee.ZodEffects:return vP(e,r);case Ee.ZodAny:return Er();case Ee.ZodUnknown:return zP();case Ee.ZodDefault:return yP(e,r);case Ee.ZodBranded:return pw(e,r);case Ee.ZodReadonly:return qP(e,r);case Ee.ZodCatch:return gP(e,r);case Ee.ZodPipeline:return BP(e,r);case Ee.ZodFunction:case Ee.ZodVoid:case Ee.ZodSymbol:return;default:return(n=>{})()}},VP=(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 Ue(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!==fP)return u}if(i&&!r){const u=YP(i,t);if(u!==void 0)return u}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const s=WP(e,e.typeName,t),o=typeof s=="function"?Ue(s(),t):s;if(o&&KP(e,t,o),t.postProcess){const u=t.postProcess(o,e,t);return a.jsonSchema=o,u}return a.jsonSchema=o,o}var YP=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:VP(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`),Er()):t.$refStrategy==="seen"?Er():void 0}},KP=(e,t,r)=>(e.description&&(r.description=e.description),r),GP=e=>{const t=dP(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}]))}},XP=(e,t)=>{var r;const n=GP(t);let i=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((l,[c,f])=>{var d;return{...l,[c]:(d=Ue(f._def,{...n,currentPath:[...n.basePath,n.definitionPath,c]},!0))!=null?d:Er()}},{}):void 0;const a=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,s=(r=Ue(e._def,a===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,a]},!1))!=null?r:Er(),o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(s.title=o);const u=a===void 0?i?{...s,[n.definitionPath]:i}:s:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,a].join("/"),[n.definitionPath]:{...i,[a]:s}};return u.$schema="http://json-schema.org/draft-07/schema#",u},wh=Symbol.for("vercel.ai.schema");function ZP(e){let t;return()=>(t==null&&(t=e()),t)}function oc(e,{validate:t}={}){return{[wh]:!0,_type:void 0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function QP(e){return typeof e=="object"&&e!==null&&wh in e&&e[wh]===!0&&"jsonSchema"in e&&"validate"in e}function rm(e){return e==null?oc({properties:{},additionalProperties:!1}):QP(e)?e:"~standard"in e?e["~standard"].vendor==="zod"?yw(e):JP(e):e()}function JP(e){return oc(()=>tm(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 La({value:t,cause:r.issues})}}})}function e3(e,t){var r;const n=(r=void 0)!=null?r:!1;return oc(()=>XP(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 t3(e,t){var r;const n=(r=void 0)!=null?r:!1;return oc(()=>tm(MN(e,{target:"draft-7",io:"input",reused:n?"ref":"inline"})),{validate:async i=>{const a=await LN(e,i);return a.success?{success:!0,value:a.data}:{success:!1,error:a.error}}})}function r3(e){return"_zod"in e}function yw(e,t){return r3(e)?t3(e):e3(e)}async function eb({value:e,schema:t,context:r}){const n=await io({value:e,schema:t,context:r});if(!n.success)throw La.wrap({value:e,cause:n.error,context:r});return n.value}async function io({value:e,schema:t,context:r}){const n=rm(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:La.wrap({value:e,cause:i.error,context:r}),rawValue:e}}catch(i){return{success:!1,error:La.wrap({value:e,cause:i,context:r}),rawValue:e}}}async function Mi({text:e,schema:t}){try{const r=cP(e);return t==null?{success:!0,value:r,rawValue:r}:await io({value:r,schema:t})}catch(r){return{success:!1,error:Hg.isInstance(r)?r:new Hg({text:e,cause:r}),rawValue:void 0}}}function n3({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new aP).pipeThrough(new TransformStream({async transform({data:r},n){r!=="[DONE]"&&n.enqueue(await Mi({text:r,schema:t}))}}))}async function Yn(e){return typeof e=="function"&&(e=e()),Promise.resolve(e)}var i3=Object.defineProperty,a3=(e,t)=>{for(var r in t)i3(e,r,{get:t[r],enumerable:!0})},vw="AI_NoObjectGeneratedError",xw=`vercel.ai.error.${vw}`,s3=Symbol.for(xw),Ew,ei=class extends un{constructor({message:e="No object generated.",cause:t,text:r,response:n,usage:i,finishReason:a}){super({name:vw,message:e,cause:t}),this[Ew]=!0,this.text=r,this.response=n,this.usage=i,this.finishReason=a}static isInstance(e){return un.hasMarker(e,xw)}};Ew=s3;var Tw="AI_UIMessageStreamError",ww=`vercel.ai.error.${Tw}`,o3=Symbol.for(ww),Aw,ua=class extends un{constructor({chunkType:e,chunkId:t,message:r}){super({name:Tw,message:r}),this[Aw]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return un.hasMarker(e,ww)}};Aw=o3;var kw=dr([ne(),Gu(Uint8Array),Gu(ArrayBuffer),QT(e=>{var t,r;return(r=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?r:!1},{message:"Must be a Buffer"})]),ao=jN(()=>dr([FN(),ne(),$N(),Zt(),ro(ne(),ao.optional()),Co(ao)])),Ne=ro(ne(),ro(ne(),ao.optional())),_w=Ve({type:de("text"),text:ne(),providerOptions:Ne.optional()}),u3=Ve({type:de("image"),image:dr([kw,Gu(URL)]),mediaType:ne().optional(),providerOptions:Ne.optional()}),Sw=Ve({type:de("file"),data:dr([kw,Gu(URL)]),filename:ne().optional(),mediaType:ne(),providerOptions:Ne.optional()}),l3=Ve({type:de("reasoning"),text:ne(),providerOptions:Ne.optional()}),c3=Ve({type:de("tool-call"),toolCallId:ne(),toolName:ne(),input:Hn(),providerOptions:Ne.optional(),providerExecuted:Zt().optional()}),f3=BN("type",[Ve({type:de("text"),value:ne(),providerOptions:Ne.optional()}),Ve({type:de("json"),value:ao,providerOptions:Ne.optional()}),Ve({type:de("execution-denied"),reason:ne().optional(),providerOptions:Ne.optional()}),Ve({type:de("error-text"),value:ne(),providerOptions:Ne.optional()}),Ve({type:de("error-json"),value:ao,providerOptions:Ne.optional()}),Ve({type:de("content"),value:Co(dr([Ve({type:de("text"),text:ne(),providerOptions:Ne.optional()}),Ve({type:de("media"),data:ne(),mediaType:ne()}),Ve({type:de("file-data"),data:ne(),mediaType:ne(),filename:ne().optional(),providerOptions:Ne.optional()}),Ve({type:de("file-url"),url:ne(),providerOptions:Ne.optional()}),Ve({type:de("file-id"),fileId:dr([ne(),ro(ne(),ne())]),providerOptions:Ne.optional()}),Ve({type:de("image-data"),data:ne(),mediaType:ne(),providerOptions:Ne.optional()}),Ve({type:de("image-url"),url:ne(),providerOptions:Ne.optional()}),Ve({type:de("image-file-id"),fileId:dr([ne(),ro(ne(),ne())]),providerOptions:Ne.optional()}),Ve({type:de("custom"),providerOptions:Ne.optional()})]))})]),Cw=Ve({type:de("tool-result"),toolCallId:ne(),toolName:ne(),output:f3,providerOptions:Ne.optional()}),d3=Ve({type:de("tool-approval-request"),approvalId:ne(),toolCallId:ne()}),h3=Ve({type:de("tool-approval-response"),approvalId:ne(),approved:Zt(),reason:ne().optional()}),p3=Ve({role:de("system"),content:ne(),providerOptions:Ne.optional()}),m3=Ve({role:de("user"),content:dr([ne(),Co(dr([_w,u3,Sw]))]),providerOptions:Ne.optional()}),g3=Ve({role:de("assistant"),content:dr([ne(),Co(dr([_w,Sw,l3,c3,Cw,d3]))]),providerOptions:Ne.optional()}),b3=Ve({role:de("tool"),content:Co(dr([Cw,h3])),providerOptions:Ne.optional()});dr([p3,m3,g3,b3]);function Iw(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,s=i!==null&&typeof i=="object"&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),o=a!=null&&typeof a=="object"&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);s&&o?r[n]=Iw(a,i):r[n]=i}return r}var y3={};a3(y3,{array:()=>T3,choice:()=>w3,json:()=>A3,object:()=>E3,text:()=>x3});function v3(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 s(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"&&s(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"&&s(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"&&s(l,u)):r=u;break}}}let o=e.slice(0,r+1);for(let u=t.length-1;u>=0;u--)switch(t[u]){case"INSIDE_STRING":{o+='"';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":{o+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{o+="]";break}case"INSIDE_LITERAL":{const c=e.substring(n,e.length);"true".startsWith(c)?o+="true".slice(c.length):"false".startsWith(c)?o+="false".slice(c.length):"null".startsWith(c)&&(o+="null".slice(c.length))}}return o}async function No(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await Mi({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await Mi({text:v3(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}var x3=()=>({name:"text",responseFormat:Promise.resolve({type:"text"}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),E3=({schema:e,name:t,description:r})=>{const n=rm(e);return{name:"object",responseFormat:Yn(n.jsonSchema).then(i=>({type:"json",schema:i,...t!=null&&{name:t},...r!=null&&{description:r}})),async parseCompleteOutput({text:i},a){const s=await Mi({text:i});if(!s.success)throw new ei({message:"No object generated: could not parse the response.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const o=await io({value:s.value,schema:n});if(!o.success)throw new ei({message:"No object generated: response did not match schema.",cause:o.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});return o.value},async parsePartialOutput({text:i}){const a=await No(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:a.value}}},createElementStreamTransform(){}}},T3=({element:e,name:t,description:r})=>{const n=rm(e);return{name:"array",responseFormat:Yn(n.jsonSchema).then(i=>{const{$schema:a,...s}=i;return{type:"json",schema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:s}},required:["elements"],additionalProperties:!1},...t!=null&&{name:t},...r!=null&&{description:r}}}),async parseCompleteOutput({text:i},a){const s=await Mi({text:i});if(!s.success)throw new ei({message:"No object generated: could not parse the response.",cause:s.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason});const o=s.value;if(o==null||typeof o!="object"||!("elements"in o)||!Array.isArray(o.elements))throw new ei({message:"No object generated: response did not match schema.",cause:new La({value:o,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 o.elements){const l=await io({value:u,schema:n});if(!l.success)throw new ei({message:"No object generated: response did not match schema.",cause:l.error,text:i,response:a.response,usage:a.usage,finishReason:a.finishReason})}return o.elements},async parsePartialOutput({text:i}){const a=await No(i);switch(a.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":{const s=a.value;if(s==null||typeof s!="object"||!("elements"in s)||!Array.isArray(s.elements))return;const o=a.state==="repaired-parse"&&s.elements.length>0?s.elements.slice(0,-1):s.elements,u=[];for(const l of o){const c=await io({value:l,schema:n});c.success&&u.push(c.value)}return{partial:u}}}},createElementStreamTransform(){let i=0;return new TransformStream({transform({partialOutput:a},s){if(a!=null)for(;i<a.length;i++)s.enqueue(a[i])}})}}},w3=({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 Mi({text:n});if(!a.success)throw new ei({message:"No object generated: could not parse the response.",cause:a.error,text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});const s=a.value;if(s==null||typeof s!="object"||!("result"in s)||typeof s.result!="string"||!e.includes(s.result))throw new ei({message:"No object generated: response did not match schema.",cause:new La({value:s,cause:"response must be an object that contains a choice value."}),text:n,response:i.response,usage:i.usage,finishReason:i.finishReason});return s.result},async parsePartialOutput({text:n}){const i=await No(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 s=e.filter(o=>o.startsWith(a.result));return i.state==="successful-parse"?s.includes(a.result)?{partial:a.result}:void 0:s.length===1?{partial:s[0]}:void 0}}},createElementStreamTransform(){}}),A3=({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 Mi({text:r});if(!i.success)throw new ei({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 No(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(){}});Oo({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 k3=ZP(()=>yw(dr([Je({type:de("text-start"),id:ne(),providerMetadata:Ne.optional()}),Je({type:de("text-delta"),id:ne(),delta:ne(),providerMetadata:Ne.optional()}),Je({type:de("text-end"),id:ne(),providerMetadata:Ne.optional()}),Je({type:de("error"),errorText:ne()}),Je({type:de("tool-input-start"),toolCallId:ne(),toolName:ne(),providerExecuted:Zt().optional(),providerMetadata:Ne.optional(),dynamic:Zt().optional(),title:ne().optional()}),Je({type:de("tool-input-delta"),toolCallId:ne(),inputTextDelta:ne()}),Je({type:de("tool-input-available"),toolCallId:ne(),toolName:ne(),input:Hn(),providerExecuted:Zt().optional(),providerMetadata:Ne.optional(),dynamic:Zt().optional(),title:ne().optional()}),Je({type:de("tool-input-error"),toolCallId:ne(),toolName:ne(),input:Hn(),providerExecuted:Zt().optional(),providerMetadata:Ne.optional(),dynamic:Zt().optional(),errorText:ne(),title:ne().optional()}),Je({type:de("tool-approval-request"),approvalId:ne(),toolCallId:ne()}),Je({type:de("tool-output-available"),toolCallId:ne(),output:Hn(),providerExecuted:Zt().optional(),providerMetadata:Ne.optional(),dynamic:Zt().optional(),preliminary:Zt().optional()}),Je({type:de("tool-output-error"),toolCallId:ne(),errorText:ne(),providerExecuted:Zt().optional(),providerMetadata:Ne.optional(),dynamic:Zt().optional()}),Je({type:de("tool-output-denied"),toolCallId:ne()}),Je({type:de("reasoning-start"),id:ne(),providerMetadata:Ne.optional()}),Je({type:de("reasoning-delta"),id:ne(),delta:ne(),providerMetadata:Ne.optional()}),Je({type:de("reasoning-end"),id:ne(),providerMetadata:Ne.optional()}),Je({type:de("source-url"),sourceId:ne(),url:ne(),title:ne().optional(),providerMetadata:Ne.optional()}),Je({type:de("source-document"),sourceId:ne(),mediaType:ne(),title:ne(),filename:ne().optional(),providerMetadata:Ne.optional()}),Je({type:de("file"),url:ne(),mediaType:ne(),providerMetadata:Ne.optional()}),Je({type:QT(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:ne().optional(),data:Hn(),transient:Zt().optional()}),Je({type:de("start-step")}),Je({type:de("finish-step")}),Je({type:de("start"),messageId:ne().optional(),messageMetadata:Hn().optional()}),Je({type:de("finish"),finishReason:UN(["stop","length","content-filter","tool-calls","error","other"]).optional(),messageMetadata:Hn().optional()}),Je({type:de("abort"),reason:ne().optional()}),Je({type:de("message-metadata"),messageMetadata:Hn()})])));function _3(e){return e.type.startsWith("data-")}function Ah(e){return e.type.startsWith("tool-")}function S3(e){return e.type==="dynamic-tool"}function Zu(e){return Ah(e)||S3(e)}function tb(e){return e.type.split("-").slice(1).join("-")}function Ow({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Nw({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:n,onError:i,onToolCall:a,onData:s}){return e.pipeThrough(new TransformStream({async transform(o,u){await n(async({state:l,write:c})=>{var f,d,h,p;function b(E){const w=l.message.parts.filter(Zu).find(A=>A.toolCallId===E);if(w==null)throw new ua({chunkType:"tool-invocation",chunkId:E,message:`No tool invocation found for tool call ID "${E}".`});return w}function y(E){var k;const w=l.message.parts.find(O=>Ah(O)&&O.toolCallId===E.toolCallId),A=E,S=w;if(w!=null){w.state=E.state,S.input=A.input,S.output=A.output,S.errorText=A.errorText,S.rawInput=A.rawInput,S.preliminary=A.preliminary,E.title!==void 0&&(S.title=E.title),S.providerExecuted=(k=A.providerExecuted)!=null?k:w.providerExecuted;const O=A.providerMetadata;if(O!=null)if(E.state==="output-available"||E.state==="output-error"){const R=w;R.resultProviderMetadata=O}else w.callProviderMetadata=O}else l.message.parts.push({type:`tool-${E.toolName}`,toolCallId:E.toolCallId,state:E.state,title:E.title,input:A.input,output:A.output,rawInput:A.rawInput,errorText:A.errorText,providerExecuted:A.providerExecuted,preliminary:A.preliminary,...A.providerMetadata!=null&&(E.state==="output-available"||E.state==="output-error")?{resultProviderMetadata:A.providerMetadata}:{},...A.providerMetadata!=null&&!(E.state==="output-available"||E.state==="output-error")?{callProviderMetadata:A.providerMetadata}:{}})}function x(E){var k,w;const A=l.message.parts.find(R=>R.type==="dynamic-tool"&&R.toolCallId===E.toolCallId),S=E,O=A;if(A!=null){A.state=E.state,O.toolName=E.toolName,O.input=S.input,O.output=S.output,O.errorText=S.errorText,O.rawInput=(k=S.rawInput)!=null?k:O.rawInput,O.preliminary=S.preliminary,E.title!==void 0&&(O.title=E.title),O.providerExecuted=(w=S.providerExecuted)!=null?w:A.providerExecuted;const R=S.providerMetadata;if(R!=null)if(E.state==="output-available"||E.state==="output-error"){const C=A;C.resultProviderMetadata=R}else A.callProviderMetadata=R}else l.message.parts.push({type:"dynamic-tool",toolName:E.toolName,toolCallId:E.toolCallId,state:E.state,input:S.input,output:S.output,errorText:S.errorText,preliminary:S.preliminary,providerExecuted:S.providerExecuted,title:E.title,...S.providerMetadata!=null&&(E.state==="output-available"||E.state==="output-error")?{resultProviderMetadata:S.providerMetadata}:{},...S.providerMetadata!=null&&!(E.state==="output-available"||E.state==="output-error")?{callProviderMetadata:S.providerMetadata}:{}})}async function T(E){if(E!=null){const k=l.message.metadata!=null?Iw(l.message.metadata,E):E;t!=null&&await eb({value:k,schema:t,context:{field:"message.metadata",entityId:l.message.id}}),l.message.metadata=k}}switch(o.type){case"text-start":{const E={type:"text",text:"",providerMetadata:o.providerMetadata,state:"streaming"};l.activeTextParts[o.id]=E,l.message.parts.push(E),c();break}case"text-delta":{const E=l.activeTextParts[o.id];if(E==null)throw new ua({chunkType:"text-delta",chunkId:o.id,message:`Received text-delta for missing text part with ID "${o.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});E.text+=o.delta,E.providerMetadata=(f=o.providerMetadata)!=null?f:E.providerMetadata,c();break}case"text-end":{const E=l.activeTextParts[o.id];if(E==null)throw new ua({chunkType:"text-end",chunkId:o.id,message:`Received text-end for missing text part with ID "${o.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});E.state="done",E.providerMetadata=(d=o.providerMetadata)!=null?d:E.providerMetadata,delete l.activeTextParts[o.id],c();break}case"reasoning-start":{const E={type:"reasoning",text:"",providerMetadata:o.providerMetadata,state:"streaming"};l.activeReasoningParts[o.id]=E,l.message.parts.push(E),c();break}case"reasoning-delta":{const E=l.activeReasoningParts[o.id];if(E==null)throw new ua({chunkType:"reasoning-delta",chunkId:o.id,message:`Received reasoning-delta for missing reasoning part with ID "${o.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});E.text+=o.delta,E.providerMetadata=(h=o.providerMetadata)!=null?h:E.providerMetadata,c();break}case"reasoning-end":{const E=l.activeReasoningParts[o.id];if(E==null)throw new ua({chunkType:"reasoning-end",chunkId:o.id,message:`Received reasoning-end for missing reasoning part with ID "${o.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});E.providerMetadata=(p=o.providerMetadata)!=null?p:E.providerMetadata,E.state="done",delete l.activeReasoningParts[o.id],c();break}case"file":{l.message.parts.push({type:"file",mediaType:o.mediaType,url:o.url,...o.providerMetadata!=null?{providerMetadata:o.providerMetadata}:{}}),c();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:o.sourceId,url:o.url,title:o.title,providerMetadata:o.providerMetadata}),c();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:o.sourceId,mediaType:o.mediaType,title:o.title,filename:o.filename,providerMetadata:o.providerMetadata}),c();break}case"tool-input-start":{const E=l.message.parts.filter(Ah);l.partialToolCalls[o.toolCallId]={text:"",toolName:o.toolName,index:E.length,dynamic:o.dynamic,title:o.title},o.dynamic?x({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-streaming",input:void 0,providerExecuted:o.providerExecuted,title:o.title,providerMetadata:o.providerMetadata}):y({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-streaming",input:void 0,providerExecuted:o.providerExecuted,title:o.title,providerMetadata:o.providerMetadata}),c();break}case"tool-input-delta":{const E=l.partialToolCalls[o.toolCallId];if(E==null)throw new ua({chunkType:"tool-input-delta",chunkId:o.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${o.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});E.text+=o.inputTextDelta;const{value:k}=await No(E.text);E.dynamic?x({toolCallId:o.toolCallId,toolName:E.toolName,state:"input-streaming",input:k,title:E.title}):y({toolCallId:o.toolCallId,toolName:E.toolName,state:"input-streaming",input:k,title:E.title}),c();break}case"tool-input-available":{o.dynamic?x({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-available",input:o.input,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:o.title}):y({toolCallId:o.toolCallId,toolName:o.toolName,state:"input-available",input:o.input,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:o.title}),c(),a&&!o.providerExecuted&&await a({toolCall:o});break}case"tool-input-error":{const E=l.message.parts.filter(Zu).find(w=>w.toolCallId===o.toolCallId);(E!=null?E.type==="dynamic-tool":!!o.dynamic)?x({toolCallId:o.toolCallId,toolName:o.toolName,state:"output-error",input:o.input,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata}):y({toolCallId:o.toolCallId,toolName:o.toolName,state:"output-error",input:void 0,rawInput:o.input,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata}),c();break}case"tool-approval-request":{const E=b(o.toolCallId);E.state="approval-requested",E.approval={id:o.approvalId},c();break}case"tool-output-denied":{const E=b(o.toolCallId);E.state="output-denied",c();break}case"tool-output-available":{const E=b(o.toolCallId);E.type==="dynamic-tool"?x({toolCallId:o.toolCallId,toolName:E.toolName,state:"output-available",input:E.input,output:o.output,preliminary:o.preliminary,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:E.title}):y({toolCallId:o.toolCallId,toolName:tb(E),state:"output-available",input:E.input,output:o.output,providerExecuted:o.providerExecuted,preliminary:o.preliminary,providerMetadata:o.providerMetadata,title:E.title}),c();break}case"tool-output-error":{const E=b(o.toolCallId);E.type==="dynamic-tool"?x({toolCallId:o.toolCallId,toolName:E.toolName,state:"output-error",input:E.input,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:E.title}):y({toolCallId:o.toolCallId,toolName:tb(E),state:"output-error",input:E.input,rawInput:E.rawInput,errorText:o.errorText,providerExecuted:o.providerExecuted,providerMetadata:o.providerMetadata,title:E.title}),c();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{o.messageId!=null&&(l.message.id=o.messageId),await T(o.messageMetadata),(o.messageId!=null||o.messageMetadata!=null)&&c();break}case"finish":{o.finishReason!=null&&(l.finishReason=o.finishReason),await T(o.messageMetadata),o.messageMetadata!=null&&c();break}case"message-metadata":{await T(o.messageMetadata),o.messageMetadata!=null&&c();break}case"error":{i?.(new Error(o.errorText));break}default:if(_3(o)){if(r?.[o.type]!=null){const w=l.message.parts.findIndex(S=>"id"in S&&"data"in S&&S.id===o.id&&S.type===o.type),A=w>=0?w:l.message.parts.length;await eb({value:o.data,schema:r[o.type],context:{field:`message.parts[${A}].data`,entityName:o.type,entityId:o.id}})}const E=o;if(E.transient){s?.(E);break}const k=E.id!=null?l.message.parts.find(w=>E.type===w.type&&E.id===w.id):void 0;k!=null?k.data=E.data:l.message.parts.push(E),s?.(E),c()}}u.enqueue(o)})}}))}function C3(e){const t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=function(){const r=this.getReader();let n=!1;async function i(a){var s;if(!n){n=!0;try{a&&await((s=r.cancel)==null?void 0:s.call(r))}finally{try{r.releaseLock()}catch{}}}}return{async next(){if(n)return{done:!0,value:void 0};const{done:a,value:s}=await r.read();return a?(await i(!0),{done:!0,value:void 0}):{done:!1,value:s}},async return(){return await i(!0),{done:!0,value:void 0}},async throw(a){throw await i(!0),a}}},t}async function Pw({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()}}Oo({prefix:"aitxt",size:24});function I3({message:e,stream:t,onError:r,terminateOnError:n=!1}){var i;let a,s=!1;const o=new ReadableStream({start(c){a=c}}),u=Ow({messageId:(i=e?.id)!=null?i:"",lastMessage:e}),l=c=>{r?.(c),!s&&n&&(s=!0,a?.error(c))};return Pw({stream:Nw({stream:t,runUpdateMessageJob(c){return c({state:u,write:()=>{a?.enqueue(structuredClone(u.message))}})},onError:l}),onError:l}).finally(()=>{s||a?.close()}),C3(o)}Oo({prefix:"aiobj",size:24});var O3=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()})}};Oo({prefix:"aiobj",size:24});async function N3(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,s)=>{const o=new FileReader;o.onload=u=>{var l;a((l=u.target)==null?void 0:l.result)},o.onerror=u=>s(u),o.readAsDataURL(t)});return{type:"file",mediaType:n,filename:r,url:i}}))}var P3=class{constructor({api:e="/api/chat",credentials:t,headers:r,body:n,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:s}){this.api=e,this.credentials=t,this.headers=r,this.body=n,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=s}async sendMessages({abortSignal:e,...t}){var r,n,i,a,s;const o=await Yn(this.body),u=await Yn(this.headers),l=await Yn(this.credentials),c={...oa(u),...oa(t.headers)},f=await((r=this.prepareSendMessagesRequest)==null?void 0:r.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...o,...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?oa(f.headers):c,p=f?.body!==void 0?f.body:{...o,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},b=(i=f?.credentials)!=null?i:l,x=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(!x.ok)throw new Error((s=await x.text())!=null?s:"Failed to fetch the chat response.");if(!x.body)throw new Error("The response body is empty.");return this.processResponseStream(x.body)}async reconnectToStream(e){var t,r,n,i,a;const s=await Yn(this.body),o=await Yn(this.headers),u=await Yn(this.credentials),l={...oa(o),...oa(e.headers)},c=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...s,...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?oa(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)}},Dw=class extends P3{constructor(e={}){super(e)}processResponseStream(e){return n3({stream:e,schema:k3}).pipeThrough(new TransformStream({async transform(t,r){if(!t.success)throw t.error;r.enqueue(t.value)}}))}},D3=class{constructor({generateId:e=sP,id:t=e(),transport:r=new Dw,messageMetadataSchema:n,dataPartSchemas:i,state:a,onError:s,onToolCall:o,onFinish:u,onData:l,sendAutomaticallyWhen:c}){this.activeResponse=void 0,this.jobExecutor=new O3,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 x;if("text"in f||"files"in f?x={parts:[...Array.isArray(f.files)?f.files:await N3(f.files),..."text"in f&&f.text!=null?[{type:"text",text:f.text}]:[]]}:x=f,f.messageId!=null){const T=this.state.messages.findIndex(E=>E.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,{...x,id:f.messageId,role:(p=x.role)!=null?p:"user",metadata:f.metadata})}else this.state.pushMessage({...x,id:(b=x.id)!=null?b:this.generateId(),role:(y=x.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],x=T=>Zu(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(x)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(x)),this.status!=="streaming"&&this.status!=="submitted"&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(T=>{var E;T&&this.makeRequest({trigger:"submit-message",messageId:(E=this.lastMessage)==null?void 0:E.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,x=y[y.length-1],T=E=>Zu(E)&&E.toolCallId===d?{...E,state:f,output:h,errorText:p}:E;this.state.replaceMessage(y.length-1,{...x,parts:x.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(E=>{var k;E&&this.makeRequest({trigger:"submit-message",messageId:(k=this.lastMessage)==null?void 0:k.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=s,this.onToolCall=o,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,s,o;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:Ow({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 x;this.setStatus({status:"streaming"}),h.state.message.id===((x=this.lastMessage)==null?void 0:x.id)?this.state.replaceMessage(this.state.messages.length-1,h.state.message):this.state.pushMessage(h.state.message)}}));await Pw({stream:Nw({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{(s=this.onFinish)==null||s.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:(o=this.lastMessage)==null?void 0:o.id,metadata:t,headers:r,body:n})}};class Rw{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(s=>s())}))}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 R3(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 uc=(function(e){if(e==null)return B3;if(typeof e=="function")return lc(e);if(typeof e=="object")return Array.isArray(e)?L3(e):M3(e);if(typeof e=="string")return j3(e);throw new Error("Expected function, string, or object as test")});function L3(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=uc(e[r]);return lc(n);function n(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function M3(e){const t=e;return lc(r);function r(n){const i=n;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function j3(e){return lc(t);function t(r){return r&&r.type===e}}function lc(e){return t;function t(r,n,i){return!!(F3(r)&&e.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function B3(){return!0}function F3(e){return e!==null&&typeof e=="object"&&"type"in e}const Lw=[],Ps=!0,kh=!1,Aa="skip";function nm(e,t,r,n){let i;typeof t=="function"&&typeof r!="function"?(n=r,r=t):i=t;const a=uc(i),s=n?-1:1;o(e,void 0,[])();function o(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=Lw,p,b,y;if((!t||a(u,l,c[c.length-1]||void 0))&&(h=$3(r(u,c)),h[0]===kh))return h;if("children"in u&&u.children){const x=u;if(x.children&&h[0]!==Aa)for(b=(n?x.children.length:-1)+s,y=c.concat(x);b>-1&&b<x.children.length;){const T=x.children[b];if(p=o(T,b,y)(),p[0]===kh)return p;b=typeof p[1]=="number"?p[1]:b+s}}return h}}}function $3(e){return Array.isArray(e)?e:typeof e=="number"?[Ps,e]:e==null?Lw:[e]}function ln(e,t,r,n){let i,a,s;typeof t=="function"&&typeof r!="function"?(a=void 0,s=t,i=r):(a=t,s=r,i=n),nm(e,a,o,i);function o(u,l){const c=l[l.length-1],f=c?c.children.indexOf(u):void 0;return s(u,f,c)}}const Ma={indicator:"indicator",textOnly:"text-only",remove:"remove"};function U3({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:s="text-gray-500",linkBlockPolicy:o=Ma.indicator,imageBlockPolicy:u=Ma.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=Y3(e,t,r,n,i,a,s,o,u);Mw(f),ln(f,d)}}function rb(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 H3(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const z3=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),q3=new Set(["javascript:","data:","file:","vbscript:"]);function nb(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 s=rb(e,r);if(!s||q3.has(s.protocol)||!(z3.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const u=H3(e);return s&&t.some(l=>{const c=rb(l,r);return!c||c.origin!==s.origin?!1:s.href.startsWith(c.href)})?u?s.pathname+s.search+s.hash:s.href:t.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:u?s.pathname+s.search+s.hash:s.href:null}function Mw(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Mw(t)}}const bf=Symbol("node-seen");function W3(e,t,r){return t===Ma.remove?{type:"remove"}:t===Ma.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 V3(e,t,r){if(t===Ma.remove)return{type:"remove"};if(t===Ma.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 Y3=(e,t,r,n,i,a,s,o,u)=>{const l=(c,f,d)=>{if(c.type!=="element"||c[bf])return Ps;if(c.tagName==="a"){const h=nb(c.properties.href,t,e,!1,!1,i);if(h===null){if(c[bf]=!0,ln(c,l),d&&typeof f=="number"){const p=W3(c,o,s);if(p.type==="remove")return d.children.splice(f,1),[Aa,f];d.children[f]=p.element}return Aa}else return c.properties.href=h,c.properties.target="_blank",c.properties.rel="noopener noreferrer",Ps}if(c.tagName==="img"){const h=nb(c.properties.src,r,e,n,!0,i);if(h===null){if(c[bf]=!0,ln(c,l),d&&typeof f=="number"){const p=V3(c,u,a);if(p.type==="remove")return d.children.splice(f,1),[Aa,f];d.children[f]=p.element}return Aa}else return c.properties.src=h,Ps}return Ps};return l},jw=-1,cc=0,Hs=1,Qu=2,im=3,am=4,sm=5,om=6,Bw=7,Fw=8,ib=typeof self=="object"?self:globalThis,K3=(e,t)=>{const r=(i,a)=>(e.set(a,i),i),n=i=>{if(e.has(i))return e.get(i);const[a,s]=t[i];switch(a){case cc:case jw:return r(s,i);case Hs:{const o=r([],i);for(const u of s)o.push(n(u));return o}case Qu:{const o=r({},i);for(const[u,l]of s)o[n(u)]=n(l);return o}case im:return r(new Date(s),i);case am:{const{source:o,flags:u}=s;return r(new RegExp(o,u),i)}case sm:{const o=r(new Map,i);for(const[u,l]of s)o.set(n(u),n(l));return o}case om:{const o=r(new Set,i);for(const u of s)o.add(n(u));return o}case Bw:{const{name:o,message:u}=s;return r(new ib[o](u),i)}case Fw:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return r(new DataView(o),s)}}return r(new ib[a](s),i)};return n},ab=e=>K3(new Map,e)(0),la="",{toString:G3}={},{keys:X3}=Object,ds=e=>{const t=typeof e;if(t!=="object"||!e)return[cc,t];const r=G3.call(e).slice(8,-1);switch(r){case"Array":return[Hs,la];case"Object":return[Qu,la];case"Date":return[im,la];case"RegExp":return[am,la];case"Map":return[sm,la];case"Set":return[om,la];case"DataView":return[Hs,r]}return r.includes("Array")?[Hs,r]:r.includes("Error")?[Bw,r]:[Qu,r]},uu=([e,t])=>e===cc&&(t==="function"||t==="symbol"),Z3=(e,t,r,n)=>{const i=(s,o)=>{const u=n.push(s)-1;return r.set(o,u),u},a=s=>{if(r.has(s))return r.get(s);let[o,u]=ds(s);switch(o){case cc:{let c=s;switch(u){case"bigint":o=Fw,c=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return i([jw],s)}return i([o,c],s)}case Hs:{if(u){let d=s;return u==="DataView"?d=new Uint8Array(s.buffer):u==="ArrayBuffer"&&(d=new Uint8Array(s)),i([u,[...d]],s)}const c=[],f=i([o,c],s);for(const d of s)c.push(a(d));return f}case Qu:{if(u)switch(u){case"BigInt":return i([u,s.toString()],s);case"Boolean":case"Number":case"String":return i([u,s.valueOf()],s)}if(t&&"toJSON"in s)return a(s.toJSON());const c=[],f=i([o,c],s);for(const d of X3(s))(e||!uu(ds(s[d])))&&c.push([a(d),a(s[d])]);return f}case im:return i([o,s.toISOString()],s);case am:{const{source:c,flags:f}=s;return i([o,{source:c,flags:f}],s)}case sm:{const c=[],f=i([o,c],s);for(const[d,h]of s)(e||!(uu(ds(d))||uu(ds(h))))&&c.push([a(d),a(h)]);return f}case om:{const c=[],f=i([o,c],s);for(const d of s)(e||!uu(ds(d)))&&c.push(a(d));return f}}const{message:l}=s;return i([o,{name:u,message:l}],s)};return a},sb=(e,{json:t,lossy:r}={})=>{const n=[];return Z3(!(t||r),!!t,new Map,n)(e),n},ji=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ab(sb(e,t)):structuredClone(e):(e,t)=>ab(sb(e,t));class Po{constructor(t,r,n){this.normal=r,this.property=t,n&&(this.space=n)}}Po.prototype.normal={};Po.prototype.property={};Po.prototype.space=void 0;function $w(e,t){const r={},n={};for(const i of e)Object.assign(r,i.property),Object.assign(n,i.normal);return new Po(r,n,t)}function so(e){return e.toLowerCase()}class hr{constructor(t,r){this.attribute=r,this.property=t}}hr.prototype.attribute="";hr.prototype.booleanish=!1;hr.prototype.boolean=!1;hr.prototype.commaOrSpaceSeparated=!1;hr.prototype.commaSeparated=!1;hr.prototype.defined=!1;hr.prototype.mustUseProperty=!1;hr.prototype.number=!1;hr.prototype.overloadedBoolean=!1;hr.prototype.property="";hr.prototype.spaceSeparated=!1;hr.prototype.space=void 0;let Q3=0;const Ae=Ki(),bt=Ki(),_h=Ki(),Q=Ki(),Xe=Ki(),Ca=Ki(),gr=Ki();function Ki(){return 2**++Q3}const Sh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ae,booleanish:bt,commaOrSpaceSeparated:gr,commaSeparated:Ca,number:Q,overloadedBoolean:_h,spaceSeparated:Xe},Symbol.toStringTag,{value:"Module"})),yf=Object.keys(Sh);class um extends hr{constructor(t,r,n,i){let a=-1;if(super(t,r),ob(this,"space",i),typeof n=="number")for(;++a<yf.length;){const s=yf[a];ob(this,yf[a],(n&Sh[s])===Sh[s])}}}um.prototype.defined=!0;function ob(e,t,r){r&&(e[t]=r)}function Ga(e){const t={},r={};for(const[n,i]of Object.entries(e.properties)){const a=new um(n,e.transform(e.attributes||{},n),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),t[n]=a,r[so(n)]=n,r[so(a.attribute)]=n}return new Po(t,r,e.space)}const Uw=Ga({properties:{ariaActiveDescendant:null,ariaAtomic:bt,ariaAutoComplete:null,ariaBusy:bt,ariaChecked:bt,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Xe,ariaCurrent:null,ariaDescribedBy:Xe,ariaDetails:null,ariaDisabled:bt,ariaDropEffect:Xe,ariaErrorMessage:null,ariaExpanded:bt,ariaFlowTo:Xe,ariaGrabbed:bt,ariaHasPopup:null,ariaHidden:bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Xe,ariaLevel:Q,ariaLive:null,ariaModal:bt,ariaMultiLine:bt,ariaMultiSelectable:bt,ariaOrientation:null,ariaOwns:Xe,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:bt,ariaReadOnly:bt,ariaRelevant:null,ariaRequired:bt,ariaRoleDescription:Xe,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:bt,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Hw(e,t){return t in e?e[t]:t}function zw(e,t){return Hw(e,t.toLowerCase())}const J3=Ga({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ca,acceptCharset:Xe,accessKey:Xe,action:null,allow:null,allowFullScreen:Ae,allowPaymentRequest:Ae,allowUserMedia:Ae,alt:null,as:null,async:Ae,autoCapitalize:null,autoComplete:Xe,autoFocus:Ae,autoPlay:Ae,blocking:Xe,capture:null,charSet:null,checked:Ae,cite:null,className:Xe,cols:Q,colSpan:null,content:null,contentEditable:bt,controls:Ae,controlsList:Xe,coords:Q|Ca,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ae,defer:Ae,dir:null,dirName:null,disabled:Ae,download:_h,draggable:bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ae,formTarget:null,headers:Xe,height:Q,hidden:_h,high:Q,href:null,hrefLang:null,htmlFor:Xe,httpEquiv:Xe,id:null,imageSizes:null,imageSrcSet:null,inert:Ae,inputMode:null,integrity:null,is:null,isMap:Ae,itemId:null,itemProp:Xe,itemRef:Xe,itemScope:Ae,itemType:Xe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ae,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Ae,muted:Ae,name:null,nonce:null,noModule:Ae,noValidate:Ae,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:Ae,optimum:Q,pattern:null,ping:Xe,placeholder:null,playsInline:Ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ae,referrerPolicy:null,rel:Xe,required:Ae,reversed:Ae,rows:Q,rowSpan:Q,sandbox:Xe,scope:null,scoped:Ae,seamless:Ae,selected:Ae,shadowRootClonable:Ae,shadowRootDelegatesFocus:Ae,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Ae,useMap:null,value:bt,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Xe,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ae,declare:Ae,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Ae,noHref:Ae,noShade:Ae,noWrap:Ae,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:bt,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ae,disableRemotePlayback:Ae,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:zw}),eD=Ga({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:gr,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Xe,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:Ca,g2:Ca,glyphName:Ca,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:gr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Xe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gr,rev:gr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gr,requiredFeatures:gr,requiredFonts:gr,requiredFormats:gr,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:gr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gr,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Hw}),qw=Ga({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()}}),Ww=Ga({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:zw}),Vw=Ga({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),tD={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"},rD=/[A-Z]/g,ub=/-[a-z]/g,nD=/^data[-\w.:]+$/i;function fc(e,t){const r=so(t);let n=t,i=hr;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&nD.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(ub,aD);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!ub.test(a)){let s=a.replace(rD,iD);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=um}return new i(n,t)}function iD(e){return"-"+e.toLowerCase()}function aD(e){return e.charAt(1).toUpperCase()}const Do=$w([Uw,J3,qw,Ww,Vw],"html"),li=$w([Uw,eD,qw,Ww,Vw],"svg");function lb(e){const t=[],r=String(e||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const s=r.slice(i,n).trim();(s||!a)&&t.push(s),i=n+1,n=r.indexOf(",",i)}return t}function Yw(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const cb=/[#.]/g;function sD(e,t){const r=e||"",n={};let i=0,a,s;for(;i<r.length;){cb.lastIndex=i;const o=cb.exec(r),u=r.slice(i,o?o.index:r.length);u&&(a?a==="#"?n.id=u:Array.isArray(n.className)?n.className.push(u):n.className=[u]:s=u,i+=u.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||t||"div",properties:n,children:[]}}function fb(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Kw(e){return e.join(" ").trim()}function Gw(e,t,r){const n=r?cD(r):void 0;function i(a,s,...o){let u;if(a==null){u={type:"root",children:[]};const l=s;o.unshift(l)}else{u=sD(a,t);const l=u.tagName.toLowerCase(),c=n?n.get(l):void 0;if(u.tagName=c||l,oD(s))o.unshift(s);else for(const[f,d]of Object.entries(s))uD(e,u.properties,f,d)}for(const l of o)Ch(u.children,l);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return i}function oD(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 s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function uD(e,t,r,n){const i=fc(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=fb(n):i.commaSeparated?a=lb(n):i.commaOrSpaceSeparated?a=fb(lb(n).join(" ")):a=db(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?lD(n):String(n);if(Array.isArray(a)){const s=[];for(const o of a)s.push(db(i,i.property,o));a=s}i.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Ch(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)Ch(e,r);else if(typeof t=="object"&&"type"in t)t.type==="root"?Ch(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function db(e,t,r){if(typeof r=="string"){if(e.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((e.boolean||e.overloadedBoolean)&&(r===""||so(r)===so(t)))return!0}return r}function lD(e){const t=[];for(const[r,n]of Object.entries(e))t.push([r,n].join(": "));return t.join("; ")}function cD(e){const t=new Map;for(const r of e)t.set(r.toLowerCase(),r);return t}const fD=["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"],dD=Gw(Do,"div"),hD=Gw(li,"g",fD);function pD(e){const t=String(e),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=t.length){let s=0;for(;;){let o=r[s];if(o===void 0){const u=hb(t,r[s-1]);o=u===-1?t.length+1:u+1,r[s]=o}if(o>a)return{line:s+1,column:a-(s>0?r[s-1]:0)+1,offset:a};s++}}}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 o=r[r.length-1],u=hb(t,o),l=u===-1?t.length+1:u+1;if(o===l)break;r.push(l)}const s=(a.line>1?r[a.line-2]:0)+a.column-1;if(s<r[a.line-1])return s}}}function hb(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 Si={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/"},Xw={}.hasOwnProperty,mD=Object.prototype;function gD(e,t){const r=t||{};return lm({file:r.file||void 0,location:!1,schema:r.space==="svg"?li:Do,verbose:r.verbose||!1},e)}function lm(e,t){let r;switch(t.nodeName){case"#comment":{const n=t;return r={type:"comment",value:n.data},Lu(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:Zw(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const a=String(e.file),s=pD(a),o=s.toPoint(0),u=s.toPoint(a.length);r.position={start:o,end:u}}return r}case"#documentType":{const n=t;return r={type:"doctype"},Lu(e,n,r),r}case"#text":{const n=t;return r={type:"text",value:n.value},Lu(e,n,r),r}default:return r=bD(e,t),r}}function Zw(e,t){let r=-1;const n=[];for(;++r<t.length;){const i=lm(e,t[r]);n.push(i)}return n}function bD(e,t){const r=e.schema;e.schema=t.namespaceURI===Si.svg?li:Do;let n=-1;const i={};for(;++n<t.attrs.length;){const o=t.attrs[n],u=(o.prefix?o.prefix+":":"")+o.name;Xw.call(mD,u)||(i[u]=o.value)}const s=(e.schema.space==="svg"?hD:dD)(t.tagName,i,Zw(e,t.childNodes));if(Lu(e,t,s),s.tagName==="template"){const o=t,u=o.sourceCodeLocation,l=u&&u.startTag&&ka(u.startTag),c=u&&u.endTag&&ka(u.endTag),f=lm(e,o.content);l&&c&&e.file&&(f.position={start:l.end,end:c.start}),s.content=f}return e.schema=r,s}function Lu(e,t,r){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const n=yD(e,r,t.sourceCodeLocation);n&&(e.location=!0,r.position=n)}}function yD(e,t,r){const n=ka(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 s;if(r.attrs)for(s in r.attrs)Xw.call(r.attrs,s)&&(a[fc(e.schema,s).property]=ka(r.attrs[s]));r.startTag;const o=ka(r.startTag),u=r.endTag?ka(r.endTag):void 0,l={opening:o};u&&(l.closing=u),l.properties=a,t.data={position:l}}}return n}function ka(e){const t=pb({line:e.startLine,column:e.startCol,offset:e.startOffset}),r=pb({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||r?{start:t,end:r}:void 0}function pb(e){return e.line&&e.column?e:void 0}const mb={}.hasOwnProperty;function Qw(e,t){const r=t||{};function n(i,...a){let s=n.invalid;const o=n.handlers;if(i&&mb.call(i,e)){const u=String(i[e]);s=mb.call(o,u)?o[u]:n.unknown}if(s)return s.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const vD={},xD={}.hasOwnProperty,Jw=Qw("type",{handlers:{root:TD,element:SD,text:kD,comment:_D,doctype:AD}});function ED(e,t){const n=(t||vD).space;return Jw(e,n==="svg"?li:Do)}function TD(e,t){const r={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=cm(e.children,r,t),Xa(e,r),r}function wD(e,t){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=cm(e.children,r,t),Xa(e,r),r}function AD(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Xa(e,t),t}function kD(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Xa(e,t),t}function _D(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Xa(e,t),t}function SD(e,t){const r=t;let n=r;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=li);const i=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&xD.call(e.properties,a)){const u=CD(n,a,e.properties[a]);u&&i.push(u)}}const s=n.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Si[s],childNodes:[],parentNode:null};return o.childNodes=cm(e.children,o,n),Xa(e,o),e.tagName==="template"&&e.content&&(o.content=wD(e.content,n)),o}function CD(e,t,r){const n=fc(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?Yw(r):Kw(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=Si[n.space]}return i}function cm(e,t,r){let n=-1;const i=[];if(e)for(;++n<e.length;){const a=Jw(e[n],r);a.parentNode=t,i.push(a)}return i}function Xa(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 ID=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],OD=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]),at="�";var _;(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"})(_||(_={}));const or={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function eA(e){return e>=55296&&e<=57343}function ND(e){return e>=56320&&e<=57343}function PD(e,t){return(e-55296)*1024+9216+t}function tA(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function rA(e){return e>=64976&&e<=65007||OD.has(e)}var H;(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"})(H||(H={}));const DD=65536;class RD{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=DD,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,s=i+r,o=a+r;return{code:t,startLine:n,endLine:n,startCol:s,endCol:s,startOffset:o,endOffset:o}}_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(ND(r))return this.pos++,this._addGap(),PD(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(H.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,_.EOF;const n=this.html.charCodeAt(r);return n===_.CARRIAGE_RETURN?_.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,_.EOF;let t=this.html.charCodeAt(this.pos);return t===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):t===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,eA(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===_.LINE_FEED||t===_.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){tA(t)?this._err(H.controlCharacterInInputStream):rA(t)&&this._err(H.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ce;(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"})(Ce||(Ce={}));function nA(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 LD=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))),MD=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 jD(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=MD.get(e))!==null&&t!==void 0?t:e}var Ot;(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"})(Ot||(Ot={}));const BD=32;var Qn;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Qn||(Qn={}));function Ih(e){return e>=Ot.ZERO&&e<=Ot.NINE}function FD(e){return e>=Ot.UPPER_A&&e<=Ot.UPPER_F||e>=Ot.LOWER_A&&e<=Ot.LOWER_F}function $D(e){return e>=Ot.UPPER_A&&e<=Ot.UPPER_Z||e>=Ot.LOWER_A&&e<=Ot.LOWER_Z||Ih(e)}function UD(e){return e===Ot.EQUALS||$D(e)}var Ct;(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"})(Ct||(Ct={}));var En;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(En||(En={}));class HD{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=Ct.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=En.Strict}startEntity(t){this.decodeMode=t,this.state=Ct.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case Ct.EntityStart:return t.charCodeAt(r)===Ot.NUM?(this.state=Ct.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=Ct.NamedEntity,this.stateNamedEntity(t,r));case Ct.NumericStart:return this.stateNumericStart(t,r);case Ct.NumericDecimal:return this.stateNumericDecimal(t,r);case Ct.NumericHex:return this.stateNumericHex(t,r);case Ct.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|BD)===Ot.LOWER_X?(this.state=Ct.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=Ct.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(Ih(i)||FD(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(Ih(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===Ot.SEMI)this.consumed+=1;else if(this.decodeMode===En.Strict)return 0;return this.emitCodePoint(jD(this.result),this.consumed),this.errors&&(t!==Ot.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&Qn.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const s=t.charCodeAt(r);if(this.treeIndex=zD(n,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===En.Attribute&&(a===0||UD(s))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],a=(i&Qn.VALUE_LENGTH)>>14,a!==0){if(s===Ot.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==En.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]&Qn.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]&~Qn.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case Ct.NamedEntity:return this.result!==0&&(this.decodeMode!==En.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ct.NumericDecimal:return this.emitNumericEntity(0,2);case Ct.NumericHex:return this.emitNumericEntity(0,3);case Ct.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ct.EntityStart:return 0}}}function zD(e,t,r,n){const i=(t&Qn.BRANCH_LENGTH)>>7,a=t&Qn.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 s=r,o=s+i-1;for(;s<=o;){const u=s+o>>>1,l=e[u];if(l<n)s=u+1;else if(l>n)o=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 Pi;(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"})(Pi||(Pi={}));var Or;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Or||(Or={}));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 qD=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 Za(e){var t;return(t=qD.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const G=g,WD={[K.HTML]:new Set([G.ADDRESS,G.APPLET,G.AREA,G.ARTICLE,G.ASIDE,G.BASE,G.BASEFONT,G.BGSOUND,G.BLOCKQUOTE,G.BODY,G.BR,G.BUTTON,G.CAPTION,G.CENTER,G.COL,G.COLGROUP,G.DD,G.DETAILS,G.DIR,G.DIV,G.DL,G.DT,G.EMBED,G.FIELDSET,G.FIGCAPTION,G.FIGURE,G.FOOTER,G.FORM,G.FRAME,G.FRAMESET,G.H1,G.H2,G.H3,G.H4,G.H5,G.H6,G.HEAD,G.HEADER,G.HGROUP,G.HR,G.HTML,G.IFRAME,G.IMG,G.INPUT,G.LI,G.LINK,G.LISTING,G.MAIN,G.MARQUEE,G.MENU,G.META,G.NAV,G.NOEMBED,G.NOFRAMES,G.NOSCRIPT,G.OBJECT,G.OL,G.P,G.PARAM,G.PLAINTEXT,G.PRE,G.SCRIPT,G.SECTION,G.SELECT,G.SOURCE,G.STYLE,G.SUMMARY,G.TABLE,G.TBODY,G.TD,G.TEMPLATE,G.TEXTAREA,G.TFOOT,G.TH,G.THEAD,G.TITLE,G.TR,G.TRACK,G.UL,G.WBR,G.XMP]),[K.MATHML]:new Set([G.MI,G.MO,G.MN,G.MS,G.MTEXT,G.ANNOTATION_XML]),[K.SVG]:new Set([G.TITLE,G.FOREIGN_OBJECT,G.DESC]),[K.XLINK]:new Set,[K.XML]:new Set,[K.XMLNS]:new Set},Oh=new Set([G.H1,G.H2,G.H3,G.H4,G.H5,G.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 mt={DATA:I.DATA,RCDATA:I.RCDATA,RAWTEXT:I.RAWTEXT,SCRIPT_DATA:I.SCRIPT_DATA,PLAINTEXT:I.PLAINTEXT,CDATA_SECTION:I.CDATA_SECTION};function VD(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function Ds(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function YD(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function qn(e){return YD(e)||Ds(e)}function gb(e){return qn(e)||VD(e)}function lu(e){return e+32}function iA(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function bb(e){return iA(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function KD(e){return e===_.NULL?H.nullCharacterReference:e>1114111?H.characterReferenceOutsideUnicodeRange:eA(e)?H.surrogateCharacterReference:rA(e)?H.noncharacterCharacterReference:tA(e)||e===_.CARRIAGE_RETURN?H.controlCharacterReference:null}class GD{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 RD(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new HD(LD,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(H.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(H.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=KD(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:Ce.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ce.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ce.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ce.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(nA(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(H.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=Za(t.tagName),t.type===Ce.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(H.endTagWithAttributes),t.selfClosing&&this._err(H.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 Ce.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ce.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ce.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:Ce.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=iA(t)?Ce.WHITESPACE_CHARACTER:t===_.NULL?Ce.NULL_CHARACTER:Ce.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ce.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=I.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?En.Attribute:En.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 _.LESS_THAN_SIGN:{this.state=I.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitCodePoint(t);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=I.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(at);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=I.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(at);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(at);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(at);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(qn(t))this._createStartTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=I.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=I.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(H.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(H.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(H.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=I.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(qn(t))this._createEndTagToken(),this.state=I.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(H.missingEndTagName),this.state=I.DATA;break}case _.EOF:{this._err(H.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(H.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const r=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=I.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.tagName+=at;break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(Ds(t)?lu(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=I.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){qn(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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=I.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=I.SELF_CLOSING_START_TAG,!1;case _.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===_.SOLIDUS?this.state=I.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=I.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){qn(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 _.SOLIDUS:{this.state=I.SCRIPT_DATA_END_TAG_OPEN;break}case _.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){qn(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===_.HYPHEN_MINUS?(this.state=I.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=I.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.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 _.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(at);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(at);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_ESCAPED,this._emitChars(at);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=I.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:qn(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){qn(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(or.SCRIPT,!1)&&bb(this.preprocessor.peek(or.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<or.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 _.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this._emitChars(at);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(at);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=I.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(at);break}case _.EOF:{this._err(H.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=I.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.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(or.SCRIPT,!1)&&bb(this.preprocessor.peek(or.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r<or.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(H.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=I.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(H.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.name+=at;break}default:this.currentAttr.name+=String.fromCodePoint(Ds(t)?lu(t):t)}}_stateAfterAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=I.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=I.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=I.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=I.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=I.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingAttributeValue),this.state=I.DATA,this.emitCurrentTagToken();break}default:this.state=I.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=at;break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=I.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=at;break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(H.unexpectedNullCharacter),this.currentAttr.value+=at;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(H.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=I.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=I.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=I.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this._err(H.missingWhitespaceBetweenAttributes),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=I.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(H.eofInTag),this._emitEOFToken();break}default:this._err(H.unexpectedSolidusInTag),this.state=I.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const r=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(r);break}case _.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.data+=at;break}default:r.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(or.DASH_DASH,!0)?(this._createCommentToken(or.DASH_DASH.length+1),this.state=I.COMMENT_START):this._consumeSequenceIfMatch(or.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(or.DOCTYPE.length+1),this.state=I.DOCTYPE):this._consumeSequenceIfMatch(or.CDATA_START,!0)?this.inForeignNode?this.state=I.CDATA_SECTION:(this._err(H.cdataInHtmlContent),this._createCommentToken(or.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=I.BOGUS_COMMENT):this._ensureHibernation()||(this._err(H.incorrectlyOpenedComment),this._createCommentToken(2),this.state=I.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=I.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(H.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 _.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptClosingOfEmptyComment),this.state=I.DATA,this.emitCurrentComment(r);break}case _.EOF:{this._err(H.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 _.HYPHEN_MINUS:{this.state=I.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{r.data+="<",this.state=I.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.data+=at;break}case _.EOF:{this._err(H.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const r=this.currentToken;switch(t){case _.EXCLAMATION_MARK:{r.data+="!",this.state=I.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=I.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=I.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=I.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=I.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(H.nestedComment),this.state=I.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const r=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=I.COMMENT_END;break}case _.EOF:{this._err(H.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 _.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentComment(r);break}case _.EXCLAMATION_MARK:{this.state=I.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{r.data+="-";break}case _.EOF:{this._err(H.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 _.HYPHEN_MINUS:{r.data+="--!",this.state=I.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(H.incorrectlyClosedComment),this.state=I.DATA,this.emitCurrentComment(r);break}case _.EOF:{this._err(H.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=I.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.EOF:{this._err(H.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.missingWhitespaceBeforeDoctypeName),this.state=I.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ds(t))this._createDoctypeToken(String.fromCharCode(lu(t))),this.state=I.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(H.unexpectedNullCharacter),this._createDoctypeToken(at),this.state=I.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.EOF:{this._err(H.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=I.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.name+=at;break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(Ds(t)?lu(t):t)}}_stateAfterDoctypeName(t){const r=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(or.PUBLIC,!1)?this.state=I.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(or.SYSTEM,!1)?this.state=I.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(H.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const r=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(H.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(H.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const r=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{r.publicId="",this.state=I.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.publicId+=at;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.EOF:{this._err(H.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 _.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.publicId+=at;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.EOF:{this._err(H.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=I.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=I.DATA,this.emitCurrentDoctype(r);break}case _.QUOTATION_MARK:{this._err(H.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(H.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const r=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.QUOTATION_MARK:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const r=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=I.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(H.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(H.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const r=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{r.systemId="",this.state=I.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(H.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.DATA,this.emitCurrentDoctype(r);break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const r=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.systemId+=at;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.EOF:{this._err(H.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 _.APOSTROPHE:{this.state=I.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(H.unexpectedNullCharacter),r.systemId+=at;break}case _.GREATER_THAN_SIGN:{this._err(H.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.EOF:{this._err(H.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.EOF:{this._err(H.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(H.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=I.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const r=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=I.DATA;break}case _.NULL:{this._err(H.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=I.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(H.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=I.CDATA_SECTION_END:(this._emitChars("]"),this.state=I.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=I.DATA;break}case _.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(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&gb(this.preprocessor.peek(1))?I.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){gb(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(H.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const aA=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),yb=new Set([...aA,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ju=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),XD=new Set([...Ju,g.OL,g.UL]),ZD=new Set([...Ju,g.BUTTON]),vb=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),xb=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),QD=new Set([g.TR,g.TEMPLATE,g.HTML]),JD=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),eR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),tR=new Set([g.TD,g.TH]);class rR{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(Oh,K.HTML)}popUntilTableCellPopped(){this.popUntilPopped(tR,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(eR,K.HTML)}clearBackToTableBodyContext(){this.clearBackTo(JD,K.HTML)}clearBackToTableRowContext(){this.clearBackTo(QD,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(xb.has(i))return!1;break}case K.MATHML:{if(vb.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ju)}hasInListItemScope(t){return this.hasInDynamicScope(t,XD)}hasInButtonScope(t){return this.hasInDynamicScope(t,ZD)}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(Oh.has(r))return!0;if(Ju.has(r))return!1;break}case K.SVG:{if(xb.has(r))return!1;break}case K.MATHML:{if(vb.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&&aA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&yb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&yb.has(this.currentTagId);)this.pop()}}const vf=3;var rn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(rn||(rn={}));const Eb={type:rn.Marker};class nR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){const n=[],i=r.length,a=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const u=this.entries[o];if(u.type===rn.Marker)break;const{element:l}=u;if(this.treeAdapter.getTagName(l)===a&&this.treeAdapter.getNamespaceURI(l)===s){const c=this.treeAdapter.getAttrList(l);c.length===i&&n.push({idx:o,attrs:c})}}return n}_ensureNoahArkCondition(t){if(this.entries.length<vf)return;const r=this.treeAdapter.getAttrList(t),n=this._getNoahArkConditionCandidates(t,r);if(n.length<vf)return;const i=new Map(r.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<n.length;s++){const o=n[s];o.attrs.every(u=>i.get(u.name)===u.value)&&(a+=1,a>=vf&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(Eb)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:rn.Element,element:t,token:r})}insertElementAfterBookmark(t,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:rn.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(Eb);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const r=this.entries.find(n=>n.type===rn.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===rn.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===rn.Element&&r.element===t)}}const Wn={createDocument(){return{nodeName:"#document",mode:Or.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};Wn.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(Wn.isTextNode(r)){r.value+=t;return}}Wn.appendChild(e,Wn.createTextNode(t))},insertTextBefore(e,t,r){const n=e.childNodes[e.childNodes.indexOf(r)-1];n&&Wn.isTextNode(n)?n.value+=t:Wn.insertBefore(e,Wn.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}}},sA="html",iR="about:legacy-compat",aR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",oA=["+//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//"],sR=[...oA,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],oR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),uA=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],uR=[...uA,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Tb(e,t){return t.some(r=>e.startsWith(r))}function lR(e){return e.name===sA&&e.publicId===null&&(e.systemId===null||e.systemId===iR)}function cR(e){if(e.name!==sA)return Or.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===aR)return Or.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),oR.has(r))return Or.QUIRKS;let n=t===null?sR:oA;if(Tb(r,n))return Or.QUIRKS;if(n=t===null?uA:uR,Tb(r,n))return Or.LIMITED_QUIRKS}return Or.NO_QUIRKS}const wb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},fR="definitionurl",dR="definitionURL",hR=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])),pR=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}]]),mR=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])),gR=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 bR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:n})=>n===Pi.COLOR||n===Pi.SIZE||n===Pi.FACE)||gR.has(t)}function lA(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===fR){e.attrs[t].name=dR;break}}function cA(e){for(let t=0;t<e.attrs.length;t++){const r=hR.get(e.attrs[t].name);r!=null&&(e.attrs[t].name=r)}}function fm(e){for(let t=0;t<e.attrs.length;t++){const r=pR.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 yR(e){const t=mR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Za(e.tagName))}function vR(e,t){return t===K.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function xR(e,t,r){if(t===K.MATHML&&e===g.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===Pi.ENCODING){const i=r[n].value.toLowerCase();return i===wb.TEXT_HTML||i===wb.APPLICATION_XML}}return t===K.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function ER(e,t,r,n){return(!n||n===K.HTML)&&xR(e,t,r)||(!n||n===K.MATHML)&&vR(e,t)}const TR="hidden",wR=8,AR=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 kR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},fA=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Ab={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Wn,onParseError:null};class kb{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={...Ab,...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 GD(this.options,this),this.activeFormattingElements=new nR(this.treeAdapter),this.fragmentContextID=n?Za(this.treeAdapter.getTagName(n)):g.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new rR(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={...Ab,...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:kR,s={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(s)}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,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_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=mt.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=mt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=mt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=mt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=mt.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 s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,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,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:u,endCol:l,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:u,endCol:l,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,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===Ce.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 Ce.CHARACTER:{this.onCharacter(t);break}case Ce.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ce.COMMENT:{this.onComment(t);break}case Ce.DOCTYPE:{this.onDoctype(t);break}case Ce.START_TAG:{this._processStartTag(t);break}case Ce.END_TAG:{this.onEndTag(t);break}case Ce.EOF:{this.onEof(t);break}case Ce.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){const i=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return ER(t,i,a,n)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const r=this.activeFormattingElements.entries.findIndex(i=>i.type===rn.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 fA.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 WD[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){tM(this,t);return}switch(this.insertionMode){case D.INITIAL:{hs(this,t);break}case D.BEFORE_HTML:{zs(this,t);break}case D.BEFORE_HEAD:{qs(this,t);break}case D.IN_HEAD:{Ws(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Vs(this,t);break}case D.AFTER_HEAD:{Ys(this,t);break}case D.IN_BODY:case D.IN_CAPTION:case D.IN_CELL:case D.IN_TEMPLATE:{hA(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:{xf(this,t);break}case D.IN_TABLE_TEXT:{vA(this,t);break}case D.IN_COLUMN_GROUP:{el(this,t);break}case D.AFTER_BODY:{tl(this,t);break}case D.AFTER_AFTER_BODY:{Mu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eM(this,t);return}switch(this.insertionMode){case D.INITIAL:{hs(this,t);break}case D.BEFORE_HTML:{zs(this,t);break}case D.BEFORE_HEAD:{qs(this,t);break}case D.IN_HEAD:{Ws(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Vs(this,t);break}case D.AFTER_HEAD:{Ys(this,t);break}case D.TEXT:{this._insertCharacters(t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{xf(this,t);break}case D.IN_COLUMN_GROUP:{el(this,t);break}case D.AFTER_BODY:{tl(this,t);break}case D.AFTER_AFTER_BODY:{Mu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Nh(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:{Nh(this,t);break}case D.IN_TABLE_TEXT:{ps(this,t);break}case D.AFTER_BODY:{PR(this,t);break}case D.AFTER_AFTER_BODY:case D.AFTER_AFTER_FRAMESET:{DR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case D.INITIAL:{RR(this,t);break}case D.BEFORE_HEAD:case D.IN_HEAD:case D.IN_HEAD_NO_SCRIPT:case D.AFTER_HEAD:{this._err(t,H.misplacedDoctype);break}case D.IN_TABLE_TEXT:{ps(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,H.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?rM(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{hs(this,t);break}case D.BEFORE_HTML:{LR(this,t);break}case D.BEFORE_HEAD:{jR(this,t);break}case D.IN_HEAD:{Yr(this,t);break}case D.IN_HEAD_NO_SCRIPT:{$R(this,t);break}case D.AFTER_HEAD:{HR(this,t);break}case D.IN_BODY:{Wt(this,t);break}case D.IN_TABLE:{ja(this,t);break}case D.IN_TABLE_TEXT:{ps(this,t);break}case D.IN_CAPTION:{BL(this,t);break}case D.IN_COLUMN_GROUP:{pm(this,t);break}case D.IN_TABLE_BODY:{pc(this,t);break}case D.IN_ROW:{mc(this,t);break}case D.IN_CELL:{UL(this,t);break}case D.IN_SELECT:{TA(this,t);break}case D.IN_SELECT_IN_TABLE:{zL(this,t);break}case D.IN_TEMPLATE:{WL(this,t);break}case D.AFTER_BODY:{YL(this,t);break}case D.IN_FRAMESET:{KL(this,t);break}case D.AFTER_FRAMESET:{XL(this,t);break}case D.AFTER_AFTER_BODY:{QL(this,t);break}case D.AFTER_AFTER_FRAMESET:{JL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?nM(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case D.INITIAL:{hs(this,t);break}case D.BEFORE_HTML:{MR(this,t);break}case D.BEFORE_HEAD:{BR(this,t);break}case D.IN_HEAD:{FR(this,t);break}case D.IN_HEAD_NO_SCRIPT:{UR(this,t);break}case D.AFTER_HEAD:{zR(this,t);break}case D.IN_BODY:{hc(this,t);break}case D.TEXT:{CL(this,t);break}case D.IN_TABLE:{oo(this,t);break}case D.IN_TABLE_TEXT:{ps(this,t);break}case D.IN_CAPTION:{FL(this,t);break}case D.IN_COLUMN_GROUP:{$L(this,t);break}case D.IN_TABLE_BODY:{Ph(this,t);break}case D.IN_ROW:{EA(this,t);break}case D.IN_CELL:{HL(this,t);break}case D.IN_SELECT:{wA(this,t);break}case D.IN_SELECT_IN_TABLE:{qL(this,t);break}case D.IN_TEMPLATE:{VL(this,t);break}case D.AFTER_BODY:{kA(this,t);break}case D.IN_FRAMESET:{GL(this,t);break}case D.AFTER_FRAMESET:{ZL(this,t);break}case D.AFTER_AFTER_BODY:{Mu(this,t);break}}}onEof(t){switch(this.insertionMode){case D.INITIAL:{hs(this,t);break}case D.BEFORE_HTML:{zs(this,t);break}case D.BEFORE_HEAD:{qs(this,t);break}case D.IN_HEAD:{Ws(this,t);break}case D.IN_HEAD_NO_SCRIPT:{Vs(this,t);break}case D.AFTER_HEAD:{Ys(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:{bA(this,t);break}case D.TEXT:{IL(this,t);break}case D.IN_TABLE_TEXT:{ps(this,t);break}case D.IN_TEMPLATE:{AA(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:{hm(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===_.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:{dA(this,t);break}case D.IN_TABLE:case D.IN_TABLE_BODY:case D.IN_ROW:{xf(this,t);break}case D.IN_TABLE_TEXT:{yA(this,t);break}}}}function _R(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):gA(e,t),r}function SR(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 CR(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,s=i;s!==r;a++,s=i){i=e.openElements.getCommonAncestor(s);const o=e.activeFormattingElements.getElementEntry(s),u=o&&a>=AR;!o||u?(u&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(s)):(s=IR(e,o),n===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(s,n),n=s)}return n}function IR(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 OR(e,t,r){const n=e.treeAdapter.getTagName(t),i=Za(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 NR(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 dm(e,t){for(let r=0;r<wR;r++){const n=_R(e,t);if(!n)break;const i=SR(e,n);if(!i)break;e.activeFormattingElements.bookmark=n;const a=CR(e,i,n.element),s=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),s&&OR(e,s,a),NR(e,i,n)}}function Nh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function PR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function DR(e,t){e._appendCommentNode(t,e.document)}function hm(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],s=e.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&e._setEndLocation(a,t)}}}}function RR(e,t){e._setDocumentType(t);const r=t.forceQuirks?Or.QUIRKS:cR(t);lR(t)||e._err(t,H.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=D.BEFORE_HTML}function hs(e,t){e._err(t,H.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Or.QUIRKS),e.insertionMode=D.BEFORE_HTML,e._processToken(t)}function LR(e,t){t.tagID===g.HTML?(e._insertElement(t,K.HTML),e.insertionMode=D.BEFORE_HEAD):zs(e,t)}function MR(e,t){const r=t.tagID;(r===g.HTML||r===g.HEAD||r===g.BODY||r===g.BR)&&zs(e,t)}function zs(e,t){e._insertFakeRootElement(),e.insertionMode=D.BEFORE_HEAD,e._processToken(t)}function jR(e,t){switch(t.tagID){case g.HTML:{Wt(e,t);break}case g.HEAD:{e._insertElement(t,K.HTML),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD;break}default:qs(e,t)}}function BR(e,t){const r=t.tagID;r===g.HEAD||r===g.BODY||r===g.HTML||r===g.BR?qs(e,t):e._err(t,H.endTagWithoutMatchingOpenElement)}function qs(e,t){e._insertFakeElement(j.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=D.IN_HEAD,e._processToken(t)}function Yr(e,t){switch(t.tagID){case g.HTML:{Wt(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,mt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,mt.RAWTEXT):(e._insertElement(t,K.HTML),e.insertionMode=D.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,mt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,mt.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,H.misplacedStartTagForHeadElement);break}default:Ws(e,t)}}function FR(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:{Ws(e,t);break}case g.TEMPLATE:{Gi(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Gi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,H.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,H.endTagWithoutMatchingOpenElement)}function Ws(e,t){e.openElements.pop(),e.insertionMode=D.AFTER_HEAD,e._processToken(t)}function $R(e,t){switch(t.tagID){case g.HTML:{Wt(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Yr(e,t);break}case g.NOSCRIPT:{e._err(t,H.nestedNoscriptInHead);break}default:Vs(e,t)}}function UR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=D.IN_HEAD;break}case g.BR:{Vs(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Vs(e,t){const r=t.type===Ce.EOF?H.openElementsLeftAfterEof:H.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=D.IN_HEAD,e._processToken(t)}function HR(e,t){switch(t.tagID){case g.HTML:{Wt(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,H.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Yr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,H.misplacedStartTagForHeadElement);break}default:Ys(e,t)}}function zR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ys(e,t);break}case g.TEMPLATE:{Gi(e,t);break}default:e._err(t,H.endTagWithoutMatchingOpenElement)}}function Ys(e,t){e._insertFakeElement(j.BODY,g.BODY),e.insertionMode=D.IN_BODY,dc(e,t)}function dc(e,t){switch(t.type){case Ce.CHARACTER:{hA(e,t);break}case Ce.WHITESPACE_CHARACTER:{dA(e,t);break}case Ce.COMMENT:{Nh(e,t);break}case Ce.START_TAG:{Wt(e,t);break}case Ce.END_TAG:{hc(e,t);break}case Ce.EOF:{bA(e,t);break}}}function dA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hA(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function qR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function WR(e,t){const r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function VR(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 YR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML)}function KR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Oh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,K.HTML)}function GR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function XR(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 ZR(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 QR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.tokenizer.state=mt.PLAINTEXT}function JR(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 eL(e,t){const r=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);r&&(dm(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 tL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function rL(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(dm(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,K.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function nL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function iL(e,t){e.treeAdapter.getDocumentMode(e.document)!==Or.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,K.HTML),e.framesetOk=!1,e.insertionMode=D.IN_TABLE}function pA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function mA(e){const t=nA(e,Pi.TYPE);return t!=null&&t.toLowerCase()===TR}function aL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,K.HTML),mA(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function sL(e,t){e._appendElement(t,K.HTML),t.ackSelfClosing=!0}function oL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,K.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function uL(e,t){t.tagName=j.IMG,t.tagID=g.IMG,pA(e,t)}function lL(e,t){e._insertElement(t,K.HTML),e.skipNextNewLine=!0,e.tokenizer.state=mt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=D.TEXT}function cL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,mt.RAWTEXT)}function fL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,mt.RAWTEXT)}function _b(e,t){e._switchToTextParsing(t,mt.RAWTEXT)}function dL(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 hL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function pL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,K.HTML)}function mL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,K.HTML)}function gL(e,t){e._reconstructActiveFormattingElements(),lA(t),fm(t),t.selfClosing?e._appendElement(t,K.MATHML):e._insertElement(t,K.MATHML),t.ackSelfClosing=!0}function bL(e,t){e._reconstructActiveFormattingElements(),cA(t),fm(t),t.selfClosing?e._appendElement(t,K.SVG):e._insertElement(t,K.SVG),t.ackSelfClosing=!0}function Sb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,K.HTML)}function Wt(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:{tL(e,t);break}case g.A:{eL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{KR(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:{YR(e,t);break}case g.LI:case g.DD:case g.DT:{ZR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{pA(e,t);break}case g.HR:{oL(e,t);break}case g.RB:case g.RTC:{pL(e,t);break}case g.RT:case g.RP:{mL(e,t);break}case g.PRE:case g.LISTING:{GR(e,t);break}case g.XMP:{cL(e,t);break}case g.SVG:{bL(e,t);break}case g.HTML:{qR(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:{Yr(e,t);break}case g.BODY:{WR(e,t);break}case g.FORM:{XR(e,t);break}case g.NOBR:{rL(e,t);break}case g.MATH:{gL(e,t);break}case g.TABLE:{iL(e,t);break}case g.INPUT:{aL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{sL(e,t);break}case g.IMAGE:{uL(e,t);break}case g.BUTTON:{JR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{nL(e,t);break}case g.IFRAME:{fL(e,t);break}case g.SELECT:{dL(e,t);break}case g.OPTION:case g.OPTGROUP:{hL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{_b(e,t);break}case g.FRAMESET:{VR(e,t);break}case g.TEXTAREA:{lL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?_b(e,t):Sb(e,t);break}case g.PLAINTEXT:{QR(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:Sb(e,t)}}function yL(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 vL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=D.AFTER_BODY,kA(e,t))}function xL(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function EL(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 TL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(j.P,g.P),e._closePElement()}function wL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function AL(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function kL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _L(e,t){const r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function SL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function gA(e,t){const r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const a=e.openElements.items[i],s=e.openElements.tagIDs[i];if(n===s&&(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,s))break}}function hc(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:{dm(e,t);break}case g.P:{TL(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:{xL(e,t);break}case g.LI:{wL(e);break}case g.DD:case g.DT:{AL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{kL(e);break}case g.BR:{SL(e);break}case g.BODY:{yL(e,t);break}case g.HTML:{vL(e,t);break}case g.FORM:{EL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{_L(e,t);break}case g.TEMPLATE:{Gi(e,t);break}default:gA(e,t)}}function bA(e,t){e.tmplInsertionModeStack.length>0?AA(e,t):hm(e,t)}function CL(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 IL(e,t){e._err(t,H.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function xf(e,t){if(e.openElements.currentTagId!==void 0&&fA.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 Ce.CHARACTER:{vA(e,t);break}case Ce.WHITESPACE_CHARACTER:{yA(e,t);break}}else Ro(e,t)}function OL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_CAPTION}function NL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_COLUMN_GROUP}function PL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,g.COLGROUP),e.insertionMode=D.IN_COLUMN_GROUP,pm(e,t)}function DL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,K.HTML),e.insertionMode=D.IN_TABLE_BODY}function RL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,g.TBODY),e.insertionMode=D.IN_TABLE_BODY,pc(e,t)}function LL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ML(e,t){mA(t)?e._appendElement(t,K.HTML):Ro(e,t),t.ackSelfClosing=!0}function jL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,K.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ja(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{RL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Yr(e,t);break}case g.COL:{PL(e,t);break}case g.FORM:{jL(e,t);break}case g.TABLE:{LL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{DL(e,t);break}case g.INPUT:{ML(e,t);break}case g.CAPTION:{OL(e,t);break}case g.COLGROUP:{NL(e,t);break}default:Ro(e,t)}}function oo(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Gi(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:Ro(e,t)}}function Ro(e,t){const r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,dc(e,t),e.fosterParentingEnabled=r}function yA(e,t){e.pendingCharacterTokens.push(t)}function vA(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ps(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r<e.pendingCharacterTokens.length;r++)Ro(e,e.pendingCharacterTokens[r]);else for(;r<e.pendingCharacterTokens.length;r++)e._insertCharacters(e.pendingCharacterTokens[r]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const xA=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function BL(e,t){const r=t.tagID;xA.has(r)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=D.IN_TABLE,ja(e,t)):Wt(e,t)}function FL(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&&oo(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:hc(e,t)}}function pm(e,t){switch(t.tagID){case g.HTML:{Wt(e,t);break}case g.COL:{e._appendElement(t,K.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Yr(e,t);break}default:el(e,t)}}function $L(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:{Gi(e,t);break}case g.COL:break;default:el(e,t)}}function el(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=D.IN_TABLE,e._processToken(t))}function pc(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,mc(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,ja(e,t));break}default:ja(e,t)}}function Ph(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,oo(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:oo(e,t)}}function mc(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,pc(e,t));break}default:ja(e,t)}}function EA(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,Ph(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,Ph(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:oo(e,t)}}function UL(e,t){const r=t.tagID;xA.has(r)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),mc(e,t)):Wt(e,t)}function HL(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(),EA(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:hc(e,t)}}function TA(e,t){switch(t.tagID){case g.HTML:{Wt(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:{Yr(e,t);break}}}function wA(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:{Gi(e,t);break}}}function zL(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)):TA(e,t)}function qL(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)):wA(e,t)}function WL(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:{Yr(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,ja(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=D.IN_COLUMN_GROUP,e.insertionMode=D.IN_COLUMN_GROUP,pm(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=D.IN_TABLE_BODY,e.insertionMode=D.IN_TABLE_BODY,pc(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=D.IN_ROW,e.insertionMode=D.IN_ROW,mc(e,t);break}default:e.tmplInsertionModeStack[0]=D.IN_BODY,e.insertionMode=D.IN_BODY,Wt(e,t)}}function VL(e,t){t.tagID===g.TEMPLATE&&Gi(e,t)}function AA(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):hm(e,t)}function YL(e,t){t.tagID===g.HTML?Wt(e,t):tl(e,t)}function kA(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 tl(e,t)}function tl(e,t){e.insertionMode=D.IN_BODY,dc(e,t)}function KL(e,t){switch(t.tagID){case g.HTML:{Wt(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:{Yr(e,t);break}}}function GL(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 XL(e,t){switch(t.tagID){case g.HTML:{Wt(e,t);break}case g.NOFRAMES:{Yr(e,t);break}}}function ZL(e,t){t.tagID===g.HTML&&(e.insertionMode=D.AFTER_AFTER_FRAMESET)}function QL(e,t){t.tagID===g.HTML?Wt(e,t):Mu(e,t)}function Mu(e,t){e.insertionMode=D.IN_BODY,dc(e,t)}function JL(e,t){switch(t.tagID){case g.HTML:{Wt(e,t);break}case g.NOFRAMES:{Yr(e,t);break}}}function eM(e,t){t.chars=at,e._insertCharacters(t)}function tM(e,t){e._insertCharacters(t),e.framesetOk=!1}function _A(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 rM(e,t){if(bR(t))_A(e),e._startTagOutsideForeignContent(t);else{const r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===K.MATHML?lA(t):n===K.SVG&&(yR(t),cA(t)),fm(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function nM(e,t){if(t.tagID===g.P||t.tagID===g.BR){_A(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 gc=SA("end"),hn=SA("start");function SA(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 CA(e){const t=hn(e),r=gc(e);if(t&&r)return{start:t,end:r}}const iM=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,aM=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Cb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function IA(e,t){const r=mM(e),n=Qw("type",{handlers:{root:sM,element:oM,text:uM,comment:NA,doctype:lM,raw:fM},unknown:dM}),i={parser:r?new kb(Cb):kb.getFragmentParser(void 0,Cb),handle(o){n(o,i)},stitches:!1,options:t||{}};n(e,i),Qa(i,hn());const a=r?i.parser.document:i.parser.getFragment(),s=gD(a,{file:i.options.file});return i.stitches&&ln(s,"comment",function(o,u,l){const c=o;if(c.value.stitch&&l&&u!==void 0){const f=l.children;return f[u]=c.value.stitch,u}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function OA(e,t){let r=-1;if(e)for(;++r<e.length;)t.handle(e[r])}function sM(e,t){OA(e.children,t)}function oM(e,t){hM(e,t),OA(e.children,t),pM(e,t)}function uM(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const r={type:Ce.CHARACTER,chars:e.value,location:Lo(e)};Qa(t,hn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function lM(e,t){const r={type:Ce.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Lo(e)};Qa(t,hn(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function cM(e,t){t.stitches=!0;const r=gM(e);if("children"in e&&"children"in r){const n=IA({type:"root",children:e.children},t.options);r.children=n.children}NA({type:"comment",value:{stitch:r}},t)}function NA(e,t){const r=e.value,n={type:Ce.COMMENT,data:r,location:Lo(e)};Qa(t,hn(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function fM(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,PA(t,hn(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(iM,"&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 dM(e,t){const r=e;if(t.options.passThrough&&t.options.passThrough.includes(r.type))cM(r,t);else{let n="";throw aM.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 Qa(e,t){PA(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=mt.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 PA(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 hM(e,t){const r=e.tagName.toLowerCase();if(t.parser.tokenizer.state===mt.PLAINTEXT)return;Qa(t,hn(e));const n=t.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:Si.html;i===Si.html&&r==="svg"&&(i=Si.svg);const a=ED({...e,children:[]},{space:i===Si.svg?"svg":"html"}),s={type:Ce.START_TAG,tagName:r,tagID:Za(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Lo(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=r}function pM(e,t){const r=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ID.includes(r)||t.parser.tokenizer.state===mt.PLAINTEXT)return;Qa(t,gc(e));const n={type:Ce.END_TAG,tagName:r,tagID:Za(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Lo(e)};t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken),r===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===mt.RCDATA||t.parser.tokenizer.state===mt.RAWTEXT||t.parser.tokenizer.state===mt.SCRIPT_DATA)&&(t.parser.tokenizer.state=mt.DATA)}function mM(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Lo(e){const t=hn(e)||{line:void 0,column:void 0,offset:void 0},r=gc(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 gM(e){return"children"in e?ji({...e,children:[]}):ji(e)}function Dh(e){return function(t,r){return IA(t,{...e,file:r})}}const gi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],_i={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...gi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...gi],h2:[["className","sr-only"]],img:[...gi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...gi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...gi],table:[...gi],ul:[...gi,["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"]},Kn={}.hasOwnProperty;function bM(e,t){let r={type:"root",children:[]};const n={schema:t?{..._i,...t}:_i,stack:[]},i=DA(n,e);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}function DA(e,t){if(t&&typeof t=="object"){const r=t;switch(typeof r.type=="string"?r.type:""){case"comment":return yM(e,r);case"doctype":return vM(e,r);case"element":return xM(e,r);case"root":return EM(e,r);case"text":return TM(e,r)}}}function yM(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 Mo(a,t),a}}function vM(e,t){if(e.schema.allowDoctypes){const r={type:"doctype"};return Mo(r,t),r}}function xM(e,t){const r=typeof t.tagName=="string"?t.tagName:"";e.stack.push(r);const n=RA(e,t.children),i=wM(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&&Kn.call(e.schema.ancestors,r))){const o=e.schema.ancestors[r];let u=-1;for(a=!1;++u<o.length;)e.stack.includes(o[u])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(r)?n:void 0;const s={type:"element",tagName:r,properties:i,children:n};return Mo(s,t),s}function EM(e,t){const n={type:"root",children:RA(e,t.children)};return Mo(n,t),n}function TM(e,t){const n={type:"text",value:typeof t.value=="string"?t.value:""};return Mo(n,t),n}function RA(e,t){const r=[];if(Array.isArray(t)){const n=t;let i=-1;for(;++i<n.length;){const a=DA(e,n[i]);a&&(Array.isArray(a)?r.push(...a):r.push(a))}}return r}function wM(e,t){const r=e.stack[e.stack.length-1],n=e.schema.attributes,i=e.schema.required,a=n&&Kn.call(n,r)?n[r]:void 0,s=n&&Kn.call(n,"*")?n["*"]:void 0,o=t&&typeof t=="object"?t:{},u={};let l;for(l in o)if(Kn.call(o,l)){const c=o[l];let f=Ib(e,Ob(a,l),l,c);f==null&&(f=Ib(e,Ob(s,l),l,c)),f!=null&&(u[l]=f)}if(i&&Kn.call(i,r)){const c=i[r];for(l in c)Kn.call(c,l)&&!Kn.call(u,l)&&(u[l]=c[l])}return u}function Ib(e,t,r,n){return t?Array.isArray(n)?AM(e,t,r,n):LA(e,t,r,n):void 0}function AM(e,t,r,n){let i=-1;const a=[];for(;++i<n.length;){const s=LA(e,t,r,n[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function LA(e,t,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&kM(e,r,n)){if(typeof t=="object"&&t.length>1){let i=!1,a=0;for(;++a<t.length;){const s=t[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(n))){i=!0;break}}else if(s===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 kM(e,t,r){const n=e.schema.protocols&&Kn.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(":"),s=i.indexOf("?"),o=i.indexOf("#"),u=i.indexOf("/");if(a<0||u>-1&&a>u||s>-1&&a>s||o>-1&&a>o)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 Mo(e,t){const r=CA(t);t.data&&(e.data=ji(t.data)),r&&(e.position=r)}function Ob(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 MA(e){return function(t){return bM(t,e)}}function Nb(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 er=ci(/[A-Za-z]/),zt=ci(/[\dA-Za-z]/),_M=ci(/[#-'*+\--9=?A-Z^-~]/);function rl(e){return e!==null&&(e<32||e===127)}const Rh=ci(/\d/),SM=ci(/[\dA-Fa-f]/),CM=ci(/[!-/:-@[-`{-~]/);function ce(e){return e!==null&&e<-2}function Ke(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const bc=ci(new RegExp("\\p{P}|\\p{S}","u")),Bi=ci(/\s/);function ci(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function IM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function OM(e,t,r){const i=uc((r||{}).ignore||[]),a=NM(t);let s=-1;for(;++s<a.length;)nm(e,"text",o);function o(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[s][0],h=a[s][1];let p=0;const y=f.children.indexOf(l);let x=!1,T=[];d.lastIndex=0;let E=d.exec(l.value);for(;E;){const k=E.index,w={index:E.index,input:E.input,stack:[...c,l]};let A=h(...E,w);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?d.lastIndex=k+1:(p!==k&&T.push({type:"text",value:l.value.slice(p,k)}),Array.isArray(A)?T.push(...A):A&&T.push(A),p=k+E[0].length,x=!0),!d.global)break;E=d.exec(l.value)}return x?(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 NM(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([PM(i[0]),DM(i[1])])}return t}function PM(e){return typeof e=="string"?new RegExp(IM(e),"g"):e}function DM(e){return typeof e=="function"?e:function(){return e}}const Ef="phrasing",Tf=["autolink","link","image","label"];function RM(){return{transforms:[UM],enter:{literalAutolink:MM,literalAutolinkEmail:wf,literalAutolinkHttp:wf,literalAutolinkWww:wf},exit:{literalAutolink:$M,literalAutolinkEmail:FM,literalAutolinkHttp:jM,literalAutolinkWww:BM}}}function LM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ef,notInConstruct:Tf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ef,notInConstruct:Tf},{character:":",before:"[ps]",after:"\\/",inConstruct:Ef,notInConstruct:Tf}]}}function MM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wf(e){this.config.enter.autolinkProtocol.call(this,e)}function jM(e){this.config.exit.autolinkProtocol.call(this,e)}function BM(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 FM(e){this.config.exit.autolinkEmail.call(this,e)}function $M(e){this.exit(e)}function UM(e){OM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),zM]],{ignore:["link","linkReference"]})}function HM(e,t,r,n,i){let a="";if(!jA(i)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!qM(r)))return!1;const s=WM(r+n);if(!s[0])return!1;const o={type:"link",title:null,url:a+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function zM(e,t,r,n){return!jA(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function qM(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 WM(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=Nb(e,"(");let a=Nb(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 jA(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||Bi(r)||bc(r))&&(!t||r!==47)}function zr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}BA.peek=e6;function VM(){this.buffer()}function YM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function KM(){this.buffer()}function GM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function XM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=zr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function ZM(e){this.exit(e)}function QM(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=zr(this.sliceSerialize(e)).toLowerCase(),r.label=t}function JM(e){this.exit(e)}function e6(){return"["}function BA(e,t,r,n){const i=r.createTracker(n);let a=i.move("[^");const s=r.enter("footnoteReference"),o=r.enter("reference");return a+=i.move(r.safe(r.associationId(e),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function t6(){return{enter:{gfmFootnoteCallString:VM,gfmFootnoteCall:YM,gfmFootnoteDefinitionLabelString:KM,gfmFootnoteDefinition:GM},exit:{gfmFootnoteCallString:XM,gfmFootnoteCall:ZM,gfmFootnoteDefinitionLabelString:QM,gfmFootnoteDefinition:JM}}}function r6(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:BA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,s){const o=a.createTracker(s);let u=o.move("[^");const l=a.enter("footnoteDefinition"),c=a.enter("label");return u+=o.move(a.safe(a.associationId(n),{before:u,after:"]"})),c(),u+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),u+=o.move((t?`
23
+ `:" ")+a.indentLines(a.containerFlow(n,o.current()),t?FA:n6))),l(),u}}function n6(e,t,r){return t===0?e:FA(e,t,r)}function FA(e,t,r){return(r?"":" ")+e}const i6=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];$A.peek=l6;function a6(){return{canContainEols:["delete"],enter:{strikethrough:o6},exit:{strikethrough:u6}}}function s6(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:i6}],handlers:{delete:$A}}}function o6(e){this.enter({type:"delete",children:[]},e)}function u6(e){this.exit(e)}function $A(e,t,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let s=i.move("~~");return s+=r.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function l6(){return"~"}function c6(e){return e.length}function f6(e,t){const r=t||{},n=(r.align||[]).concat(),i=r.stringLength||c6,a=[],s=[],o=[],u=[];let l=0,c=-1;for(;++c<e.length;){const b=[],y=[];let x=-1;for(e[c].length>l&&(l=e[c].length);++x<e[c].length;){const T=d6(e[c][x]);if(r.alignDelimiters!==!1){const E=i(T);y[x]=E,(u[x]===void 0||E>u[x])&&(u[x]=E)}b.push(T)}s[c]=b,o[c]=y}let f=-1;if(typeof n=="object"&&"length"in n)for(;++f<l;)a[f]=Pb(n[f]);else{const b=Pb(n);for(;++f<l;)a[f]=b}f=-1;const d=[],h=[];for(;++f<l;){const b=a[f];let y="",x="";b===99?(y=":",x=":"):b===108?y=":":b===114&&(x=":");let T=r.alignDelimiters===!1?1:Math.max(1,u[f]-y.length-x.length);const E=y+"-".repeat(T)+x;r.alignDelimiters!==!1&&(T=y.length+T+x.length,T>u[f]&&(u[f]=T),h[f]=T),d[f]=E}s.splice(1,0,d),o.splice(1,0,h),c=-1;const p=[];for(;++c<s.length;){const b=s[c],y=o[c];f=-1;const x=[];for(;++f<l;){const T=b[f]||"";let E="",k="";if(r.alignDelimiters!==!1){const w=u[f]-(y[f]||0),A=a[f];A===114?E=" ".repeat(w):A===99?w%2?(E=" ".repeat(w/2+.5),k=" ".repeat(w/2-.5)):(E=" ".repeat(w/2),k=E):k=" ".repeat(w)}r.delimiterStart!==!1&&!f&&x.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&T==="")&&(r.delimiterStart!==!1||f)&&x.push(" "),r.alignDelimiters!==!1&&x.push(E),x.push(T),r.alignDelimiters!==!1&&x.push(k),r.padding!==!1&&x.push(" "),(r.delimiterEnd!==!1||f!==l-1)&&x.push("|")}p.push(r.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return p.join(`
24
+ `)}function d6(e){return e==null?"":String(e)}function Pb(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 h6(e,t,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const s=r.indentLines(r.containerFlow(e,a.current()),p6);return i(),s}function p6(e,t,r){return">"+(r?"":" ")+e}function m6(e,t){return Db(e,t.inConstruct,!0)&&!Db(e,t.notInConstruct,!1)}function Db(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 Rb(e,t,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
25
+ `&&m6(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
26
+ `}function g6(e,t){const r=String(e);let n=r.indexOf(t),i=n,a=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>s&&(s=a):a=1,i=n+t.length,n=r.indexOf(t,i);return s}function b6(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 y6(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 v6(e,t,r,n){const i=y6(r),a=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(b6(e,r)){const f=r.enter("codeIndented"),d=r.indentLines(a,x6);return f(),d}const o=r.createTracker(n),u=i.repeat(Math.max(g6(a,i)+1,3)),l=r.enter("codeFenced");let c=o.move(u);if(e.lang){const f=r.enter(`codeFencedLang${s}`);c+=o.move(r.safe(e.lang,{before:c,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=r.enter(`codeFencedMeta${s}`);c+=o.move(" "),c+=o.move(r.safe(e.meta,{before:c,after:`
27
+ `,encode:["`"],...o.current()})),f()}return c+=o.move(`
28
+ `),a&&(c+=o.move(a+`
29
+ `)),c+=o.move(u),l(),c}function x6(e,t,r){return(r?"":" ")+e}function mm(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 E6(e,t,r,n){const i=mm(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("definition");let o=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("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":`
30
+ `,...u.current()}))),o(),e.title&&(o=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),o()),s(),l}function T6(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 uo(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ba(e){if(e===null||Ke(e)||Bi(e))return 1;if(bc(e))return 2}function nl(e,t,r){const n=Ba(e),i=Ba(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}}UA.peek=w6;function UA(e,t,r,n){const i=T6(r),a=r.enter("emphasis"),s=r.createTracker(n),o=s.move(i);let u=s.move(r.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),c=nl(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=uo(l)+u.slice(1));const f=u.charCodeAt(u.length-1),d=nl(n.after.charCodeAt(0),f,i);d.inside&&(u=u.slice(0,-1)+uo(f));const h=s.move(i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},o+u+h}function w6(e,t,r){return r.options.emphasis||"*"}const A6={};function gm(e,t){const r=A6,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return HA(e,n,i)}function HA(e,t,r){if(k6(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 Lb(e.children,t,r)}return Array.isArray(e)?Lb(e,t,r):""}function Lb(e,t,r){const n=[];let i=-1;for(;++i<e.length;)n[i]=HA(e[i],t,r);return n.join("")}function k6(e){return!!(e&&typeof e=="object")}function _6(e,t){let r=!1;return ln(e,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,kh}),!!((!e.depth||e.depth<3)&&gm(e)&&(t.options.setext||r))}function S6(e,t,r,n){const i=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(n);if(_6(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 s="#".repeat(i),o=r.enter("headingAtx"),u=r.enter("phrasing");a.move(s+" ");let l=r.containerPhrasing(e,{before:"# ",after:`
35
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=uo(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,r.options.closeAtx&&(l+=" "+s),u(),o(),l}zA.peek=C6;function zA(e){return e.value||""}function C6(){return"<"}qA.peek=I6;function qA(e,t,r,n){const i=mm(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("image");let o=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("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=r.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(r.safe(e.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=r.enter("destinationRaw"),l+=u.move(r.safe(e.url,{before:l,after:e.title?" ":")",...u.current()}))),o(),e.title&&(o=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),o()),l+=u.move(")"),s(),l}function I6(){return"!"}WA.peek=O6;function WA(e,t,r,n){const i=e.referenceType,a=r.enter("imageReference");let s=r.enter("label");const o=r.createTracker(n);let u=o.move("![");const l=r.safe(e.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const c=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...o.current()});return s(),r.stack=c,a(),i==="full"||!l||l!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function O6(){return"!"}VA.peek=N6;function VA(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 s=r.unsafe[a],o=r.compilePattern(s);let u;if(s.atBreak)for(;u=o.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 N6(){return"`"}function YA(e,t){const r=gm(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))}KA.peek=P6;function KA(e,t,r,n){const i=mm(r),a=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let o,u;if(YA(e,r)){const c=r.stack;r.stack=[],o=r.enter("autolink");let f=s.move("<");return f+=s.move(r.containerPhrasing(e,{before:f,after:">",...s.current()})),f+=s.move(">"),o(),r.stack=c,f}o=r.enter("link"),u=r.enter("label");let l=s.move("[");return l+=s.move(r.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=r.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(r.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(u=r.enter("destinationRaw"),l+=s.move(r.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),u(),e.title&&(u=r.enter(`title${a}`),l+=s.move(" "+i),l+=s.move(r.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),u()),l+=s.move(")"),o(),l}function P6(e,t,r){return YA(e,r)?"<":"["}GA.peek=D6;function GA(e,t,r,n){const i=e.referenceType,a=r.enter("linkReference");let s=r.enter("label");const o=r.createTracker(n);let u=o.move("[");const l=r.containerPhrasing(e,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),s();const c=r.stack;r.stack=[],s=r.enter("reference");const f=r.safe(r.associationId(e),{before:u,after:"]",...o.current()});return s(),r.stack=c,a(),i==="full"||!l||l!==f?u+=o.move(f+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function D6(){return"["}function bm(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 R6(e){const t=bm(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 L6(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 XA(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 M6(e,t,r,n){const i=r.enter("list"),a=r.bulletCurrent;let s=e.ordered?L6(r):bm(r);const o=e.ordered?s==="."?")":".":R6(r);let u=t&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!e.ordered){const c=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&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),XA(r)===s&&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&&(s=o),r.bulletCurrent=s;const l=r.containerFlow(e,n);return r.bulletLastUsed=s,r.bulletCurrent=a,i(),l}function j6(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 B6(e,t,r,n){const i=j6(r);let a=r.bulletCurrent||bm(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 s=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const o=r.createTracker(n);o.move(a+" ".repeat(s-a.length)),o.shift(s);const u=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,o.current()),c);return u(),l;function c(f,d,h){return d?(h?"":" ".repeat(s))+f:(h?a:a+" ".repeat(s-a.length))+f}}function F6(e,t,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),s=r.containerPhrasing(e,n);return a(),i(),s}const $6=uc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function U6(e,t,r,n){return(e.children.some(function(s){return $6(s)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function H6(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ZA.peek=z6;function ZA(e,t,r,n){const i=H6(r),a=r.enter("strong"),s=r.createTracker(n),o=s.move(i+i);let u=s.move(r.containerPhrasing(e,{after:i,before:o,...s.current()}));const l=u.charCodeAt(0),c=nl(n.before.charCodeAt(n.before.length-1),l,i);c.inside&&(u=uo(l)+u.slice(1));const f=u.charCodeAt(u.length-1),d=nl(n.after.charCodeAt(0),f,i);d.inside&&(u=u.slice(0,-1)+uo(f));const h=s.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:c.outside},o+u+h}function z6(e,t,r){return r.options.strong||"*"}function q6(e,t,r,n){return r.safe(e.value,n)}function W6(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 V6(e,t,r){const n=(XA(r)+(r.options.ruleSpaces?" ":"")).repeat(W6(r));return r.options.ruleSpaces?n.slice(0,-1):n}const QA={blockquote:h6,break:Rb,code:v6,definition:E6,emphasis:UA,hardBreak:Rb,heading:S6,html:zA,image:qA,imageReference:WA,inlineCode:VA,link:KA,linkReference:GA,list:M6,listItem:B6,paragraph:F6,root:U6,strong:ZA,text:q6,thematicBreak:V6},Mb=document.createElement("i");function ym(e){const t="&"+e+";";Mb.innerHTML=t;const r=Mb.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function JA(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 Y6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function K6(e){return e.replace(Y6,G6)}function G6(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return JA(r.slice(a?2:1),a?16:10)}return ym(r)||e}function X6(){return{enter:{table:Z6,tableData:jb,tableHeader:jb,tableRow:J6},exit:{codeText:e4,table:Q6,tableData:Af,tableHeader:Af,tableRow:Af}}}function Z6(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 Q6(e){this.exit(e),this.data.inTable=void 0}function J6(e){this.enter({type:"tableRow",children:[]},e)}function Af(e){this.exit(e)}function jb(e){this.enter({type:"tableCell",children:[]},e)}function e4(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,t4));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function t4(e,t){return t==="|"?t:e}function r4(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:s,tableCell:u,tableRow:o}};function s(h,p,b,y){return l(c(h,b,y),h.align)}function o(h,p,b,y){const x=f(h,b,y),T=l([x]);return T.slice(0,T.indexOf(`
37
+ `))}function u(h,p,b,y){const x=b.enter("tableCell"),T=b.enter("phrasing"),E=b.containerPhrasing(h,{...y,before:a,after:a});return T(),x(),E}function l(h,p){return f6(h,{align:p,alignDelimiters:n,padding:r,stringLength:i})}function c(h,p,b){const y=h.children;let x=-1;const T=[],E=p.enter("table");for(;++x<y.length;)T[x]=f(y[x],p,b);return E(),T}function f(h,p,b){const y=h.children;let x=-1;const T=[],E=p.enter("tableRow");for(;++x<y.length;)T[x]=u(y[x],h,p,b);return E(),T}function d(h,p,b){let y=QA.inlineCode(h,p,b);return b.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function n4(){return{exit:{taskListCheckValueChecked:Bb,taskListCheckValueUnchecked:Bb,paragraph:a4}}}function i4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:s4}}}function Bb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function a4(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,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===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 s4(e,t,r,n){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",o=r.createTracker(n);a&&o.move(s);let u=QA.listItem(e,t,r,{...n,...o.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(c){return c+s}}function o4(){return[RM(),t6(),a6(),X6(),n4()]}function u4(e){return{extensions:[LM(),r6(e),s6(),r4(e),i4()]}}function vr(e,t,r,n){const i=e.length;let a=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);a<n.length;)s=n.slice(a,a+1e4),s.unshift(t,0),e.splice(...s),a+=1e4,t+=1e4}function Nr(e,t){return e.length>0?(vr(e,e.length,0,t),e):t}const Fb={}.hasOwnProperty;function e2(e){const t={};let r=-1;for(;++r<e.length;)l4(t,e[r]);return t}function l4(e,t){let r;for(r in t){const i=(Fb.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let s;if(a)for(s in a){Fb.call(i,s)||(i[s]=[]);const o=a[s];c4(i[s],Array.isArray(o)?o:o?[o]:[])}}}function c4(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);vr(e,0,0,n)}const f4={tokenize:b4,partial:!0},t2={tokenize:y4,partial:!0},r2={tokenize:v4,partial:!0},n2={tokenize:x4,partial:!0},d4={tokenize:E4,partial:!0},i2={name:"wwwAutolink",tokenize:m4,previous:s2},a2={name:"protocolAutolink",tokenize:g4,previous:o2},Pn={name:"emailAutolink",tokenize:p4,previous:u2},pn={};function h4(){return{text:pn}}let bi=48;for(;bi<123;)pn[bi]=Pn,bi++,bi===58?bi=65:bi===91&&(bi=97);pn[43]=Pn;pn[45]=Pn;pn[46]=Pn;pn[95]=Pn;pn[72]=[Pn,a2];pn[104]=[Pn,a2];pn[87]=[Pn,i2];pn[119]=[Pn,i2];function p4(e,t,r){const n=this;let i,a;return s;function s(f){return!Lh(f)||!u2.call(n,n.previous)||vm(n.events)?r(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return Lh(f)?(e.consume(f),o):f===64?(e.consume(f),u):r(f)}function u(f){return f===46?e.check(d4,c,l)(f):f===45||f===95||zt(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&&er(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):r(f)}}function m4(e,t,r){const n=this;return i;function i(s){return s!==87&&s!==119||!s2.call(n,n.previous)||vm(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(f4,e.attempt(t2,e.attempt(r2,a),r),r)(s))}function a(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function g4(e,t,r){const n=this;let i="",a=!1;return s;function s(f){return(f===72||f===104)&&o2.call(n,n.previous)&&!vm(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):r(f)}function o(f){if(er(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;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||rl(f)||Ke(f)||Bi(f)||bc(f)?r(f):e.attempt(t2,e.attempt(r2,c),r)(f)}function c(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function b4(e,t,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),i):s===46&&n===3?(e.consume(s),a):r(s)}function a(s){return s===null?r(s):t(s)}}function y4(e,t,r){let n,i,a;return s;function s(l){return l===46||l===95?e.check(n2,u,o)(l):l===null||Ke(l)||Bi(l)||l!==45&&bc(l)?u(l):(a=!0,e.consume(l),s)}function o(l){return l===95?n=!0:(i=n,n=void 0),e.consume(l),s}function u(l){return i||n||!a?r(l):t(l)}}function v4(e,t){let r=0,n=0;return i;function i(s){return s===40?(r++,e.consume(s),i):s===41&&n<r?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(n2,t,a)(s):s===null||Ke(s)||Bi(s)?t(s):(e.consume(s),i)}function a(s){return s===41&&n++,e.consume(s),i}}function x4(e,t,r){return n;function n(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),n):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Ke(o)||Bi(o)?t(o):r(o)}function i(o){return o===null||o===40||o===91||Ke(o)||Bi(o)?t(o):n(o)}function a(o){return er(o)?s(o):r(o)}function s(o){return o===59?(e.consume(o),n):er(o)?(e.consume(o),s):r(o)}}function E4(e,t,r){return n;function n(a){return e.consume(a),i}function i(a){return zt(a)?r(a):t(a)}}function s2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ke(e)}function o2(e){return!er(e)}function u2(e){return!(e===47||Lh(e))}function Lh(e){return e===43||e===45||e===46||e===95||zt(e)}function vm(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 Ja(e){const t=[];let r=-1,n=0,i=0;for(;++r<e.length;){const a=e.charCodeAt(r);let s="";if(a===37&&zt(e.charCodeAt(r+1))&&zt(e.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=e.charCodeAt(r+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+i+1,s=""),i&&(r+=i,i=0)}return t.join("")+e.slice(n)}function yc(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 Mh={name:"attention",resolveAll:T4,tokenize:w4};function T4(e,t){let r=-1,n,i,a,s,o,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};$b(f,-u),$b(d,u),s={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[n][1].end}},o={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:{...s.start},end:{...o.end}},e[n][1].end={...s.start},e[r][1].start={...o.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Nr(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Nr(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",a,t]]),l=Nr(l,yc(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=Nr(l,[["exit",a,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[r][1].end.offset-e[r][1].start.offset?(c=2,l=Nr(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):c=0,vr(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 w4(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=Ba(n);let a;return s;function s(u){return a=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===a)return e.consume(u),o;const l=e.exit("attentionSequence"),c=Ba(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 $b(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const A4={name:"autolink",tokenize:k4};function k4(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 er(h)?(e.consume(h),s):h===64?r(h):l(h)}function s(h){return h===43||h===45||h===46||zt(h)?(n=1,o(h)):l(h)}function o(h){return h===58?(e.consume(h),n=0,u):(h===43||h===45||h===46||zt(h))&&n++<32?(e.consume(h),o):(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||rl(h)?r(h):(e.consume(h),u)}function l(h){return h===64?(e.consume(h),c):_M(h)?(e.consume(h),l):r(h)}function c(h){return zt(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||zt(h))&&n++<63){const p=h===45?d:f;return e.consume(h),p}return r(h)}}function Re(e,t,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(u){return Pe(u)?(e.enter(r),o(u)):t(u)}function o(u){return Pe(u)&&a++<i?(e.consume(u),o):(e.exit(r),t(u))}}const jo={partial:!0,tokenize:_4};function _4(e,t,r){return n;function n(a){return Pe(a)?Re(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ce(a)?t(a):r(a)}}const l2={continuation:{tokenize:C4},exit:I4,name:"blockQuote",tokenize:S4};function S4(e,t,r){const n=this;return i;function i(s){if(s===62){const o=n.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),a}return r(s)}function a(s){return Pe(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function C4(e,t,r){const n=this;return i;function i(s){return Pe(s)?Re(e,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return e.attempt(l2,t,r)(s)}}function I4(e){e.exit("blockQuote")}const c2={name:"characterEscape",tokenize:O4};function O4(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 CM(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const f2={name:"characterReference",tokenize:N4};function N4(e,t,r){const n=this;let i=0,a,s;return o;function o(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,s=zt,c(f))}function l(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,s=SM,c):(e.enter("characterReferenceValue"),a=7,s=Rh,c(f))}function c(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return s===zt&&!ym(n.sliceSerialize(d))?r(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(f)&&i++<a?(e.consume(f),c):r(f)}}const Ub={partial:!0,tokenize:D4},Hb={concrete:!0,name:"codeFenced",tokenize:P4};function P4(e,t,r){const n=this,i={partial:!0,tokenize:w};let a=0,s=0,o;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,o=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===o?(s++,e.consume(A),c):s<3?r(A):(e.exit("codeFencedFenceSequence"),Pe(A)?Re(e,f,"whitespace")(A):f(A))}function f(A){return A===null||ce(A)?(e.exit("codeFencedFence"),n.interrupt?t(A):e.check(Ub,b,k)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(A))}function d(A){return A===null||ce(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):Pe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Re(e,h,"whitespace")(A)):A===96&&A===o?r(A):(e.consume(A),d)}function h(A){return A===null||ce(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||ce(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===o?r(A):(e.consume(A),p)}function b(A){return e.attempt(i,k,y)(A)}function y(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),x}function x(A){return a>0&&Pe(A)?Re(e,T,"linePrefix",a+1)(A):T(A)}function T(A){return A===null||ce(A)?e.check(Ub,b,k)(A):(e.enter("codeFlowValue"),E(A))}function E(A){return A===null||ce(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),E)}function k(A){return e.exit("codeFenced"),t(A)}function w(A,S,O){let R=0;return C;function C($){return A.enter("lineEnding"),A.consume($),A.exit("lineEnding"),M}function M($){return A.enter("codeFencedFence"),Pe($)?Re(A,L,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):L($)}function L($){return $===o?(A.enter("codeFencedFenceSequence"),X($)):O($)}function X($){return $===o?(R++,A.consume($),X):R>=s?(A.exit("codeFencedFenceSequence"),Pe($)?Re(A,U,"whitespace")($):U($)):O($)}function U($){return $===null||ce($)?(A.exit("codeFencedFence"),S($)):O($)}}}function D4(e,t,r){const n=this;return i;function i(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}const kf={name:"codeIndented",tokenize:L4},R4={partial:!0,tokenize:M4};function L4(e,t,r){const n=this;return i;function i(l){return e.enter("codeIndented"),Re(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?s(l):r(l)}function s(l){return l===null?u(l):ce(l)?e.attempt(R4,s,u)(l):(e.enter("codeFlowValue"),o(l))}function o(l){return l===null||ce(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),o)}function u(l){return e.exit("codeIndented"),t(l)}}function M4(e,t,r){const n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Re(e,a,"linePrefix",5)(s)}function a(s){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):ce(s)?i(s):r(s)}}const j4={name:"codeText",previous:F4,resolve:B4,tokenize:$4};function B4(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 F4(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $4(e,t,r){let n=0,i,a;return s;function s(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),n++,o):(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)):ce(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||ce(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 U4{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&&ms(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),ms(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ms(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);ms(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ms(this.left,r.reverse())}}}function ms(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 d2(e){const t={};let r=-1,n,i,a,s,o,u,l;const c=new U4(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,H4(c,r)),r=t[r],l=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(s=c.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...c.get(i)[1].start},o=c.slice(i,r),o.unshift(n),c.splice(i,r-i+1,o))}}return vr(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!l}function H4(e,t){const r=e.get(t)[1],n=e.get(t)[2];let i=t-1;const a=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.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&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(c),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=r;++d<o.length;)o[d][0]==="exit"&&o[d-1][0]==="enter"&&o[d][1].type===o[d-1][1].type&&o[d][1].start.line!==o[d][1].end.line&&(b=d+1,y.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):y.pop(),d=y.length;d--;){const x=o.slice(y[d],y[d+1]),T=a.pop();u.push([T,T+x.length-1]),e.splice(T,2,x)}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 z4={resolve:W4,tokenize:V4},q4={partial:!0,tokenize:Y4};function W4(e){return d2(e),e}function V4(e,t){let r;return n;function n(o){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):ce(o)?e.check(q4,s,a)(o):(e.consume(o),i)}function a(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function s(o){return e.consume(o),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function Y4(e,t,r){const n=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Re(e,a,"linePrefix")}function a(s){if(s===null||ce(s))return r(s);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function h2(e,t,r,n,i,a,s,o,u){const l=u||Number.POSITIVE_INFINITY;let c=0;return f;function f(x){return x===60?(e.enter(n),e.enter(i),e.enter(a),e.consume(x),e.exit(a),d):x===null||x===32||x===41||rl(x)?r(x):(e.enter(n),e.enter(s),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(x))}function d(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),e.exit(n),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(x))}function h(x){return x===62?(e.exit("chunkString"),e.exit(o),d(x)):x===null||x===60||ce(x)?r(x):(e.consume(x),x===92?p:h)}function p(x){return x===60||x===62||x===92?(e.consume(x),h):h(x)}function b(x){return!c&&(x===null||x===41||Ke(x))?(e.exit("chunkString"),e.exit(o),e.exit(s),e.exit(n),t(x)):c<l&&x===40?(e.consume(x),c++,b):x===41?(e.consume(x),c--,b):x===null||x===32||x===40||rl(x)?r(x):(e.consume(x),x===92?y:b)}function y(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function p2(e,t,r,n,i,a){const s=this;let o=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 o>999||h===null||h===91||h===93&&!u||h===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?r(h):h===93?(e.exit(a),e.enter(i),e.consume(h),e.exit(i),e.exit(n),t):ce(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||ce(h)||o++>999?(e.exit("chunkString"),c(h)):(e.consume(h),u||(u=!Pe(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function m2(e,t,r,n,i,a){let s;return o;function o(d){return d===34||d===39||d===40?(e.enter(n),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,u):r(d)}function u(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(n),t):(e.enter(a),l(d))}function l(d){return d===s?(e.exit(a),u(s)):d===null?r(d):ce(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Re(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===s||d===null||ce(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?f:c)}function f(d){return d===s||d===92?(e.consume(d),c):c(d)}}function Ks(e,t){let r;return n;function n(i){return ce(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r=!0,n):Pe(i)?Re(e,n,r?"linePrefix":"lineSuffix")(i):t(i)}}const K4={name:"definition",tokenize:X4},G4={partial:!0,tokenize:Z4};function X4(e,t,r){const n=this;let i;return a;function a(h){return e.enter("definition"),s(h)}function s(h){return p2.call(n,e,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=zr(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 Ke(h)?Ks(e,l)(h):l(h)}function l(h){return h2(e,c,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(G4,f,f)(h)}function f(h){return Pe(h)?Re(e,d,"whitespace")(h):d(h)}function d(h){return h===null||ce(h)?(e.exit("definition"),n.parser.defined.push(i),t(h)):r(h)}}function Z4(e,t,r){return n;function n(o){return Ke(o)?Ks(e,i)(o):r(o)}function i(o){return m2(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return Pe(o)?Re(e,s,"whitespace")(o):s(o)}function s(o){return o===null||ce(o)?t(o):r(o)}}const Q4={name:"hardBreakEscape",tokenize:J4};function J4(e,t,r){return n;function n(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ce(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const e5={name:"headingAtx",resolve:t5,tokenize:r5};function t5(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"},vr(e,n,r-n+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function r5(e,t,r){let n=0;return i;function i(c){return e.enter("atxHeading"),a(c)}function a(c){return e.enter("atxHeadingSequence"),s(c)}function s(c){return c===35&&n++<6?(e.consume(c),s):c===null||Ke(c)?(e.exit("atxHeadingSequence"),o(c)):r(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||ce(c)?(e.exit("atxHeading"),t(c)):Pe(c)?Re(e,o,"whitespace")(c):(e.enter("atxHeadingText"),l(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),o(c))}function l(c){return c===null||c===35||Ke(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),l)}}const n5=["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"],zb=["pre","script","style","textarea"],i5={concrete:!0,name:"htmlFlow",resolveTo:o5,tokenize:u5},a5={partial:!0,tokenize:c5},s5={partial:!0,tokenize:l5};function o5(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 u5(e,t,r){const n=this;let i,a,s,o,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):er(P)?(e.consume(P),s=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,o=0,p):er(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 ge="CDATA[";return P===ge.charCodeAt(o++)?(e.consume(P),o===ge.length?n.interrupt?t:L:p):r(P)}function b(P){return er(P)?(e.consume(P),s=String.fromCharCode(P),y):r(P)}function y(P){if(P===null||P===47||P===62||Ke(P)){const ge=P===47,Oe=s.toLowerCase();return!ge&&!a&&zb.includes(Oe)?(i=1,n.interrupt?t(P):L(P)):n5.includes(s.toLowerCase())?(i=6,ge?(e.consume(P),x):n.interrupt?t(P):L(P)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(P):a?T(P):E(P))}return P===45||zt(P)?(e.consume(P),s+=String.fromCharCode(P),y):r(P)}function x(P){return P===62?(e.consume(P),n.interrupt?t:L):r(P)}function T(P){return Pe(P)?(e.consume(P),T):C(P)}function E(P){return P===47?(e.consume(P),C):P===58||P===95||er(P)?(e.consume(P),k):Pe(P)?(e.consume(P),E):C(P)}function k(P){return P===45||P===46||P===58||P===95||zt(P)?(e.consume(P),k):w(P)}function w(P){return P===61?(e.consume(P),A):Pe(P)?(e.consume(P),w):E(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):Pe(P)?(e.consume(P),A):O(P)}function S(P){return P===u?(e.consume(P),u=null,R):P===null||ce(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||Ke(P)?w(P):(e.consume(P),O)}function R(P){return P===47||P===62||Pe(P)?E(P):r(P)}function C(P){return P===62?(e.consume(P),M):r(P)}function M(P){return P===null||ce(P)?L(P):Pe(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),Y):P===62&&i===4?(e.consume(P),ye):P===63&&i===3?(e.consume(P),N):P===93&&i===5?(e.consume(P),re):ce(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(a5,pe,X)(P)):P===null||ce(P)?(e.exit("htmlFlowData"),X(P)):(e.consume(P),L)}function X(P){return e.check(s5,U,pe)(P)}function U(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),$}function $(P){return P===null||ce(P)?X(P):(e.enter("htmlFlowData"),L(P))}function q(P){return P===45?(e.consume(P),N):L(P)}function Y(P){return P===47?(e.consume(P),s="",V):L(P)}function V(P){if(P===62){const ge=s.toLowerCase();return zb.includes(ge)?(e.consume(P),ye):L(P)}return er(P)&&s.length<8?(e.consume(P),s+=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),ye):P===45&&i===2?(e.consume(P),N):L(P)}function ye(P){return P===null||ce(P)?(e.exit("htmlFlowData"),pe(P)):(e.consume(P),ye)}function pe(P){return e.exit("htmlFlow"),t(P)}}function l5(e,t,r){const n=this;return i;function i(s){return ce(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):r(s)}function a(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function c5(e,t,r){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(jo,t,r)}}const f5={name:"htmlText",tokenize:d5};function d5(e,t,r){const n=this;let i,a,s;return o;function o(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),E):er(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):er(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):ce(N)?(s=f,Y(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 ye="CDATA[";return N===ye.charCodeAt(a++)?(e.consume(N),a===ye.length?b:p):r(N)}function b(N){return N===null?r(N):N===93?(e.consume(N),y):ce(N)?(s=b,Y(N)):(e.consume(N),b)}function y(N){return N===93?(e.consume(N),x):b(N)}function x(N){return N===62?q(N):N===93?(e.consume(N),x):b(N)}function T(N){return N===null||N===62?q(N):ce(N)?(s=T,Y(N)):(e.consume(N),T)}function E(N){return N===null?r(N):N===63?(e.consume(N),k):ce(N)?(s=E,Y(N)):(e.consume(N),E)}function k(N){return N===62?q(N):E(N)}function w(N){return er(N)?(e.consume(N),A):r(N)}function A(N){return N===45||zt(N)?(e.consume(N),A):S(N)}function S(N){return ce(N)?(s=S,Y(N)):Pe(N)?(e.consume(N),S):q(N)}function O(N){return N===45||zt(N)?(e.consume(N),O):N===47||N===62||Ke(N)?R(N):r(N)}function R(N){return N===47?(e.consume(N),q):N===58||N===95||er(N)?(e.consume(N),C):ce(N)?(s=R,Y(N)):Pe(N)?(e.consume(N),R):q(N)}function C(N){return N===45||N===46||N===58||N===95||zt(N)?(e.consume(N),C):M(N)}function M(N){return N===61?(e.consume(N),L):ce(N)?(s=M,Y(N)):Pe(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,X):ce(N)?(s=L,Y(N)):Pe(N)?(e.consume(N),L):(e.consume(N),U)}function X(N){return N===i?(e.consume(N),i=void 0,$):N===null?r(N):ce(N)?(s=X,Y(N)):(e.consume(N),X)}function U(N){return N===null||N===34||N===39||N===60||N===61||N===96?r(N):N===47||N===62||Ke(N)?R(N):(e.consume(N),U)}function $(N){return N===47||N===62||Ke(N)?R(N):r(N)}function q(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):r(N)}function Y(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),V}function V(N){return Pe(N)?Re(e,re,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):re(N)}function re(N){return e.enter("htmlTextData"),s(N)}}const xm={name:"labelEnd",resolveAll:g5,resolveTo:b5,tokenize:y5},h5={tokenize:v5},p5={tokenize:x5},m5={tokenize:E5};function g5(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&&vr(e,0,e.length,r),e}function b5(e,t){let r=e.length,n=0,i,a,s,o;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(s){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"&&(s=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[s][1].end}},c={type:"labelText",start:{...e[a+n+2][1].end},end:{...e[s-2][1].start}};return o=[["enter",u,t],["enter",l,t]],o=Nr(o,e.slice(a+1,a+n+3)),o=Nr(o,[["enter",c,t]]),o=Nr(o,yc(t.parser.constructs.insideSpan.null,e.slice(a+n+4,s-3),t)),o=Nr(o,[["exit",c,t],e[s-2],e[s-1],["exit",l,t]]),o=Nr(o,e.slice(s+1)),o=Nr(o,[["exit",u,t]]),vr(e,a,e.length,o),e}function y5(e,t,r){const n=this;let i=n.events.length,a,s;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 o;function o(d){return a?a._inactive?f(d):(s=n.parser.defined.includes(zr(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(h5,c,s?c:f)(d):d===91?e.attempt(p5,c,s?l:f)(d):s?c(d):f(d)}function l(d){return e.attempt(m5,c,f)(d)}function c(d){return t(d)}function f(d){return a._balanced=!0,r(d)}}function v5(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 Ke(f)?Ks(e,a)(f):a(f)}function a(f){return f===41?c(f):h2(e,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function s(f){return Ke(f)?Ks(e,u)(f):c(f)}function o(f){return r(f)}function u(f){return f===34||f===39||f===40?m2(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function l(f){return Ke(f)?Ks(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 x5(e,t,r){const n=this;return i;function i(o){return p2.call(n,e,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return n.parser.defined.includes(zr(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(o):r(o)}function s(o){return r(o)}}function E5(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 T5={name:"labelStartImage",resolveAll:xm.resolveAll,tokenize:w5};function w5(e,t,r){const n=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),a}function a(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),s):r(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):t(o)}}const A5={name:"labelStartLink",resolveAll:xm.resolveAll,tokenize:k5};function k5(e,t,r){const n=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const _f={name:"lineEnding",tokenize:_5};function _5(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Re(e,t,"linePrefix")}}const ju={name:"thematicBreak",tokenize:S5};function S5(e,t,r){let n=0,i;return a;function a(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,o(l)}function o(l){return l===i?(e.enter("thematicBreakSequence"),u(l)):n>=3&&(l===null||ce(l))?(e.exit("thematicBreak"),t(l)):r(l)}function u(l){return l===i?(e.consume(l),n++,u):(e.exit("thematicBreakSequence"),Pe(l)?Re(e,o,"whitespace")(l):o(l))}}const ur={continuation:{tokenize:N5},exit:D5,name:"list",tokenize:O5},C5={partial:!0,tokenize:R5},I5={partial:!0,tokenize:P5};function O5(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,s=0;return o;function o(h){const p=n.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||h===n.containerState.marker:Rh(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(ju,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 Rh(h)&&++s<10?(e.consume(h),u):(!n.interrupt||s<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(jo,n.interrupt?r:c,e.attempt(C5,d,f))}function c(h){return n.containerState.initialBlankLine=!0,a++,d(h)}function f(h){return Pe(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 N5(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(jo,i,a);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Re(e,t,"listItemIndent",n.containerState.size+1)(o)}function a(o){return n.containerState.furtherBlankLines||!Pe(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(I5,t,s)(o))}function s(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,Re(e,e.attempt(ur,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function P5(e,t,r){const n=this;return Re(e,i,"listItemIndent",n.containerState.size+1);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(a):r(a)}}function D5(e){e.exit(this.containerState.type)}function R5(e,t,r){const n=this;return Re(e,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=n.events[n.events.length-1];return!Pe(a)&&s&&s[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const qb={name:"setextUnderline",resolveTo:L5,tokenize:M5};function L5(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 s={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",s,t]),e.splice(a+1,0,["exit",e[n][1],t]),e[n][1].end={...e[a][1].end}):e[n][1]=s,e.push(["exit",s,t]),e}function M5(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,s(l)):r(l)}function s(l){return e.enter("setextHeadingLineSequence"),o(l)}function o(l){return l===i?(e.consume(l),o):(e.exit("setextHeadingLineSequence"),Pe(l)?Re(e,u,"lineSuffix")(l):u(l))}function u(l){return l===null||ce(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}const j5={tokenize:W5,partial:!0};function B5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:H5,continuation:{tokenize:z5},exit:q5}},text:{91:{name:"gfmFootnoteCall",tokenize:U5},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:F5,resolveTo:$5}}}}function F5(e,t,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;i--;){const u=n.events[i][1];if(u.type==="labelImage"){s=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!s||!s._balanced)return r(u);const l=zr(n.sliceSerialize({start:s.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 $5(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)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[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",s,t],["exit",s,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...o),e}function U5(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,s;return o;function o(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&&!s||f===null||f===91||Ke(f))return r(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(zr(n.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(f)}return Ke(f)||(s=!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 H5(e,t,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,s=0,o;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(s>999||p===93&&!o||p===null||p===91||Ke(p))return r(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return a=zr(n.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return Ke(p)||(o=!0),s++,e.consume(p),p===92?f:c}function f(p){return p===91||p===92||p===93?(e.consume(p),s++,c):c(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(a)||i.push(a),Re(e,h,"gfmFootnoteDefinitionWhitespace")):r(p)}function h(p){return t(p)}}function z5(e,t,r){return e.check(jo,t,e.attempt(j5,t,r))}function q5(e){e.exit("gfmFootnoteDefinition")}function W5(e,t,r){const n=this;return Re(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(a):r(a)}}function V5(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(s,o){let u=-1;for(;++u<s.length;)if(s[u][0]==="enter"&&s[u][1].type==="strikethroughSequenceTemporary"&&s[u][1]._close){let l=u;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[u][1].end.offset-s[u][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[u][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const c={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[u][1].end)},f={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[u][1].start)},d=[["enter",c,o],["enter",s[l][1],o],["exit",s[l][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&vr(d,d.length,0,yc(h,s.slice(l+1,u),o)),vr(d,d.length,0,[["exit",f,o],["enter",s[u][1],o],["exit",s[u][1],o],["exit",c,o]]),vr(s,l-1,u-l+3,d),u=l+d.length-2;break}}for(u=-1;++u<s.length;)s[u][1].type==="strikethroughSequenceTemporary"&&(s[u][1].type="data");return s}function a(s,o,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):(s.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const b=Ba(l);if(p===126)return f>1?u(p):(s.consume(p),f++,h);if(f<2&&!r)return u(p);const y=s.exit("strikethroughSequenceTemporary"),x=Ba(p);return y._open=!x||x===2&&!!b,y._close=!b||b===2&&!!x,o(p)}}}class Y5{constructor(){this.map=[]}add(t,r,n){K5(this,t,r,n)}consume(t){if(this.map.sort(function(a,s){return a[0]-s[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 K5(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 G5(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 X5(){return{flow:{null:{name:"table",tokenize:Z5,resolveAll:Q5}}}}function Z5(e,t,r){const n=this;let i=0,a=0,s;return o;function o(C){let M=n.events.length-1;for(;M>-1;){const U=n.events[M][1].type;if(U==="lineEnding"||U==="linePrefix")M--;else break}const L=M>-1?n.events[M][1].type:null,X=L==="tableHead"||L==="tableRow"?A:u;return X===A&&n.parser.lazy[n.now().line]?r(C):X(C)}function u(C){return e.enter("tableHead"),e.enter("tableRow"),l(C)}function l(C){return C===124||(s=!0,a+=1),c(C)}function c(C){return C===null?r(C):ce(C)?a>1?(a=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),h):r(C):Pe(C)?Re(e,c,"whitespace")(C):(a+=1,s&&(s=!1,i+=1),C===124?(e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),s=!0,c):(e.enter("data"),f(C)))}function f(C){return C===null||C===124||Ke(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"),s=!1,Pe(C)?Re(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?(s=!0,e.enter("tableCellDivider"),e.consume(C),e.exit("tableCellDivider"),b):w(C)}function b(C){return Pe(C)?Re(e,y,"whitespace")(C):y(C)}function y(C){return C===58?(a+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),x):C===45?(a+=1,x(C)):C===null||ce(C)?k(C):w(C)}function x(C){return C===45?(e.enter("tableDelimiterFiller"),T(C)):w(C)}function T(C){return C===45?(e.consume(C),T):C===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(C),e.exit("tableDelimiterMarker"),E):(e.exit("tableDelimiterFiller"),E(C))}function E(C){return Pe(C)?Re(e,k,"whitespace")(C):k(C)}function k(C){return C===124?p(C):C===null||ce(C)?!s||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||ce(C)?(e.exit("tableRow"),t(C)):Pe(C)?Re(e,S,"whitespace")(C):(e.enter("data"),O(C))}function O(C){return C===null||C===124||Ke(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 Q5(e,t){let r=-1,n=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,u=0,l,c,f;const d=new Y5;for(;++r<e.length;){const h=e[r],p=h[1];h[0]==="enter"?p.type==="tableHead"?(o=!1,u!==0&&(Wb(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],s=[0,r+1,0,0],o&&(o=!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,s[2]===0&&(a[1]!==0&&(s[0]=s[1],f=cu(d,t,a,i,void 0,f),a=[0,0,0,0]),s[2]=r)):p.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(s[0]=s[1],f=cu(d,t,a,i,void 0,f)),a=s,s=[a[1],r,0,0])):p.type==="tableHead"?(o=!0,u=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(u=r,a[1]!==0?(s[0]=s[1],f=cu(d,t,a,i,r,f)):s[1]!==0&&(f=cu(d,t,s,i,r,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=r)}for(u!==0&&Wb(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=G5(t.events,r))}return e}function cu(e,t,r,n,i,a){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(a.end=Object.assign({},va(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const u=va(t.events,r[1]);if(a={type:s,start:Object.assign({},u),end:Object.assign({},u)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const l=va(t.events,r[2]),c=va(t.events,r[3]),f={type:o,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({},va(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function Wb(e,t,r,n,i){const a=[],s=va(t.events,r);i&&(i.end=Object.assign({},s),a.push(["exit",i,t])),n.end=Object.assign({},s),a.push(["exit",n,t]),e.add(r+1,0,a)}function va(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const J5={name:"tasklistCheck",tokenize:tj};function ej(){return{text:{91:J5}}}function tj(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 Ke(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),s):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),s):r(u)}function s(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):r(u)}function o(u){return ce(u)?t(u):Pe(u)?e.check({tokenize:rj},t,r)(u):r(u)}}function rj(e,t,r){return Re(e,n,"whitespace");function n(i){return i===null?r(i):t(i)}}function nj(e){return e2([h4(),B5(),V5(e),X5(),ej()])}const ij={};function aj(e){const t=this,r=e||ij,n=t.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(nj(r)),a.push(o4()),s.push(u4(r))}var sj=Object.defineProperty,oj=Object.defineProperties,uj=Object.getOwnPropertyDescriptors,Vb=Object.getOwnPropertySymbols,lj=Object.prototype.hasOwnProperty,cj=Object.prototype.propertyIsEnumerable,Yb=(e,t,r)=>t in e?sj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g2=(e,t)=>{for(var r in t||(t={}))lj.call(t,r)&&Yb(e,r,t[r]);if(Vb)for(var r of Vb(t))cj.call(t,r)&&Yb(e,r,t[r]);return e},b2=(e,t)=>oj(e,uj(t)),nr=(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},fj=(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},dj=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]==="`"&&!fj(e,r)&&(t+=1)}return t},ni=(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},hj=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,pj=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(hj,(t,r,n,i)=>nr(e,i)?t:`${r}\\>${n}`),mj=/(\*\*)([^*]*\*?)$/,gj=/(__)([^_]*?)$/,bj=/(\*\*\*)([^*]*?)$/,yj=/(\*)([^*]*?)$/,vj=/(_)([^_]*?)$/,xj=/(`)([^`]*?)$/,Ej=/(~~)([^~]*?)$/,Xi=/^[\s_~*`]*$/,y2=/^[\s]*[-*+][\s]+$/,Tj=/[\p{L}\p{N}_]/u,wj=/^```[^`\n]*```?$/,Aj=/^\*{4,}$/,kj=/(__)([^_]+)_$/,_j=/(~~)([^~]+)~$/,Kb=/~~/g,ii=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:Tj.test(e)},Sj=(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},v2=(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},vc=(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},Cj=(e,t)=>{for(let r=t;r<e.length;r+=1){if(e[r]===")")return!0;if(e[r]===`
38
+ `)return!1}return!1},x2=(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]==="]"?Cj(e,t):!1;if(e[r]===`
39
+ `)return!1}return!1},Ij=(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},Em=(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),s=0,o=!1;for(let u of a)if(u===r)s+=1;else if(u!==" "&&u!==" "){o=!0;break}return s>=3&&!o},Oj=(e,t,r,n)=>r==="\\"||e.includes("$")&&vc(e,t)?!0:r!=="*"&&n==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(r==="*"||r&&n&&ii(r)&&ii(n)||(!r||r===" "||r===" "||r===`
43
+ `)&&(!n||n===" "||n===" "||n===`
44
+ `)),E2=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]:"",s=i<n-1?e[i+1]:"";Oj(e,i,a,s)||(t+=1)}return t},Nj=(e,t,r,n)=>!!(r==="\\"||e.includes("$")&&vc(e,t)||x2(e,t)||Ij(e,t)||r==="_"||n==="_"||r&&n&&ii(r)&&ii(n)),Pj=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]:"",s=i<n-1?e[i+1]:"";Nj(e,i,a,s)||(t+=1)}return t},Dj=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},Tm=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},Gb=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},Rj=(e,t,r)=>{if(!t||Xi.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
45
+ `),i=n===-1?0:n+1,a=e.substring(i,r);return y2.test(a)&&t.includes(`
46
+ `)?!0:Em(e,r,"*")},Lj=e=>{let t=e.match(mj);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return nr(e,n)||ni(e,n)||Rj(e,r,n)?e:Tm(e)%2===1?r.endsWith("*")?`${e}*`:`${e}**`:e},Mj=(e,t,r)=>{if(!t||Xi.test(t))return!0;let n=e.substring(0,r).lastIndexOf(`
47
+ `),i=n===-1?0:n+1,a=e.substring(i,r);return y2.test(a)&&t.includes(`
48
+ `)?!0:Em(e,r,"_")},jj=e=>{let t=e.match(gj);if(!t){let i=e.match(kj);if(i){let a=e.lastIndexOf(i[1]);if(!(nr(e,a)||ni(e,a))&&Gb(e)%2===1)return`${e}_`}return e}let r=t[2],n=e.lastIndexOf(t[1]);return nr(e,n)||ni(e,n)||Mj(e,r,n)?e:Gb(e)%2===1?`${e}__`:e},Bj=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]!=="\\"&&!vc(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&&ii(n)&&ii(i))continue;return r}}return-1},Fj=e=>{if(!e.match(yj))return e;let t=Bj(e);if(t===-1||nr(e,t)||ni(e,t))return e;let r=e.substring(t+1);return!r||Xi.test(r)?e:E2(e)%2===1?`${e}*`:e},T2=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]!=="\\"&&!vc(e,r)&&!x2(e,r)){let n=r>0?e[r-1]:"",i=r<e.length-1?e[r+1]:"";if(n&&i&&ii(n)&&ii(i))continue;return r}}return-1},$j=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}_`},Uj=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Tm(t)%2!==1)return null;let r=t.indexOf("**"),n=T2(t);return r!==-1&&n!==-1&&r<n?`${t}_**`:null},Hj=e=>{if(!e.match(vj))return e;let t=T2(e);if(t===-1)return e;let r=e.substring(t+1);if(!r||Xi.test(r)||nr(e,t)||ni(e,t))return e;if(Pj(e)%2===1){let n=Uj(e);return n!==null?n:$j(e)}return e},zj=e=>{let t=Tm(e),r=E2(e);return t%2===0&&r%2===0},qj=(e,t,r)=>!t||Xi.test(t)||nr(e,r)||ni(e,r)?!0:Em(e,r,"*"),Wj=e=>{if(Aj.test(e))return e;let t=e.match(bj);if(!t)return e;let r=t[2],n=e.lastIndexOf(t[1]);return qj(e,r,n)?e:Dj(e)%2===1?zj(e)?e:`${e}***`:e},Vj=/<[a-zA-Z/][^>]*$/,Yj=e=>{let t=e.match(Vj);return!t||t.index===void 0||nr(e,t.index)?e:e.substring(0,t.index).trimEnd()},Kj=e=>!e.match(wj)||e.includes(`
52
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,Gj=e=>(e.match(/```/g)||[]).length%2===1,Xj=e=>{let t=Kj(e);if(t!==null)return t;let r=e.match(xj);if(r&&!Gj(e)){let n=r[2];if(!n||Xi.test(n))return e;if(dj(e)%2===1)return`${e}\``}return e},w2=(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)==="```",Zj=e=>{let t=0,r=!1;for(let n=0;n<e.length-1;n+=1)e[n]==="`"&&!w2(e,n)&&(r=!r),!r&&e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},Qj=e=>{let t=0,r=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"){n+=1;continue}if(e[n]==="`"&&!w2(e,n)){r=!r;continue}!r&&e[n]==="$"&&(n+1<e.length&&e[n+1]==="$"?n+=1:t+=1)}return t},Jj=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}$$`},e8=e=>Zj(e)%2===0?e:Jj(e),t8=e=>Qj(e)%2===1?`${e}$`:e,r8=(e,t,r)=>{if(e.substring(t+2).includes(")"))return null;let n=Sj(e,t);if(n===-1||nr(e,n))return null;let i=n>0&&e[n-1]==="!",a=i?n-1:n,s=e.substring(0,a);if(i)return s;let o=e.substring(n+1,t);return r==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},Xb=(e,t)=>{for(let r=0;r<t;r++)if(e[r]==="["&&!nr(e,r)){if(r>0&&e[r-1]==="!")continue;let n=v2(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},n8=(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 s=Xb(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}if(v2(e,t)===-1){let a=e.substring(0,i);if(n)return a;if(r==="text-only"){let s=Xb(e,t);return e.substring(0,s)+e.substring(s+1)}return`${e}](streamdown:incomplete-link)`}return null},A2=(e,t="protocol")=>{let r=e.lastIndexOf("](");if(r!==-1&&!nr(e,r)){let n=r8(e,r,t);if(n!==null)return n}for(let n=e.length-1;n>=0;n-=1)if(e[n]==="["&&!nr(e,n)){let i=n8(e,n,t);if(i!==null)return i}return e},i8=/^-{1,2}$/,a8=/^[\s]*-{1,2}[\s]+$/,s8=/^={1,2}$/,o8=/^[\s]*={1,2}[\s]+$/,u8=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(i8.test(i)&&!r.match(a8)){let a=n.split(`
57
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}if(s8.test(i)&&!r.match(o8)){let a=n.split(`
58
+ `).at(-1);if(a&&a.trim().length>0)return`${e}​`}return e},l8=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),c8=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(l8,(t,r)=>nr(e,r)?t:"\\~"),f8=e=>{var t,r;let n=e.match(Ej);if(n){let i=n[2];if(!i||Xi.test(i))return e;let a=e.lastIndexOf(n[1]);if(nr(e,a)||ni(e,a))return e;if(((t=e.match(Kb))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(_j);if(i){let a=e.lastIndexOf(i[0].slice(0,2));if(nr(e,a)||ni(e,a))return e;if(((r=e.match(Kb))==null?void 0:r.length)%2===1)return`${e}~`}}return e},Sf=e=>e!==!1,d8=e=>e===!0,Xt={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},h8=[{handler:{name:"singleTilde",handle:c8,priority:Xt.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:pj,priority:Xt.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:Yj,priority:Xt.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:u8,priority:Xt.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:A2,priority:Xt.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:Wj,priority:Xt.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:Lj,priority:Xt.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:jj,priority:Xt.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:Fj,priority:Xt.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:Hj,priority:Xt.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:Xj,priority:Xt.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:f8,priority:Xt.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:e8,priority:Xt.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:t8,priority:Xt.INLINE_KATEX},optionKey:"inlineKatex"}],p8=e=>{var t;let r=(t=e?.linkMode)!=null?t:"protocol";return h8.filter(({handler:n,optionKey:i})=>n.name==="links"?Sf(e?.links)||Sf(e?.images):n.name==="inlineKatex"?d8(e?.inlineKatex):Sf(e?.[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:b2(g2({},n),{handle:a=>A2(a,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},m8=(e,t)=>{var r;if(!e||typeof e!="string")return e;let n=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=p8(t),a=((r=t?.handlers)!=null?r:[]).map(o=>{var u;return{handler:b2(g2({},o),{priority:(u=o.priority)!=null?u:Xt.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((o,u)=>{var l,c;return((l=o.handler.priority)!=null?l:0)-((c=u.handler.priority)!=null?c:0)});for(let{handler:o,earlyReturn:u}of s)if(n=o.handle(n),u!=null&&u(n))return n;return n},g8=m8;function k2(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=k2(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Fe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=k2(e))&&(n&&(n+=" "),n+=t);return n}const b8=(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},y8=(e,t)=>({classGroupId:e,validator:t}),_2=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),il="-",Zb=[],v8="arbitrary..",x8=e=>{const t=T8(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return E8(s);const o=s.split(il),u=o[0]===""&&o.length>1?1:0;return S2(o,u,t)},getConflictingClassGroupIds:(s,o)=>{if(o){const u=n[s],l=r[s];return u?l?b8(l,u):u:l||Zb}return r[s]||Zb}}},S2=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const i=e[t],a=r.nextPart.get(i);if(a){const l=S2(e,t+1,a);if(l)return l}const s=r.validators;if(s===null)return;const o=t===0?e.join(il):e.slice(t).join(il),u=s.length;for(let l=0;l<u;l++){const c=s[l];if(c.validator(o))return c.classGroupId}},E8=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?v8+n:void 0})(),T8=e=>{const{theme:t,classGroups:r}=e;return w8(r,t)},w8=(e,t)=>{const r=_2();for(const n in e){const i=e[n];wm(i,r,n,t)}return r},wm=(e,t,r,n)=>{const i=e.length;for(let a=0;a<i;a++){const s=e[a];A8(s,t,r,n)}},A8=(e,t,r,n)=>{if(typeof e=="string"){k8(e,t,r);return}if(typeof e=="function"){_8(e,t,r,n);return}S8(e,t,r,n)},k8=(e,t,r)=>{const n=e===""?t:C2(t,e);n.classGroupId=r},_8=(e,t,r,n)=>{if(C8(e)){wm(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(y8(r,e))},S8=(e,t,r,n)=>{const i=Object.entries(e),a=i.length;for(let s=0;s<a;s++){const[o,u]=i[s];wm(u,C2(t,o),r,n)}},C2=(e,t)=>{let r=e;const n=t.split(il),i=n.length;for(let a=0;a<i;a++){const s=n[a];let o=r.nextPart.get(s);o||(o=_2(),r.nextPart.set(s,o)),r=o}return r},C8=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,I8=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},jh="!",Qb=":",O8=[],Jb=(e,t,r,n,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),N8=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=i=>{const a=[];let s=0,o=0,u=0,l;const c=i.length;for(let b=0;b<c;b++){const y=i[b];if(s===0&&o===0){if(y===Qb){a.push(i.slice(u,b)),u=b+1;continue}if(y==="/"){l=b;continue}}y==="["?s++:y==="]"?s--:y==="("?o++:y===")"&&o--}const f=a.length===0?i:i.slice(u);let d=f,h=!1;f.endsWith(jh)?(d=f.slice(0,-1),h=!0):f.startsWith(jh)&&(d=f.slice(1),h=!0);const p=l&&l>u?l-u:void 0;return Jb(a,h,d,p)};if(t){const i=t+Qb,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):Jb(O8,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},P8=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 s=r[a],o=s[0]==="[",u=t.has(s);o||u?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},D8=e=>({cache:I8(e.cacheSize),parseClassName:N8(e),sortModifiers:P8(e),...x8(e)}),R8=/\s+/,L8=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=t,s=[],o=e.trim().split(R8);let u="";for(let l=o.length-1;l>=0;l-=1){const c=o[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,x=n(y?p.substring(0,b):p);if(!x){if(!y){u=c+(u.length>0?" "+u:u);continue}if(x=n(p),!x){u=c+(u.length>0?" "+u:u);continue}y=!1}const T=d.length===0?"":d.length===1?d[0]:a(d).join(":"),E=h?T+jh:T,k=E+x;if(s.indexOf(k)>-1)continue;s.push(k);const w=i(x,y);for(let A=0;A<w.length;++A){const S=w[A];s.push(E+S)}u=c+(u.length>0?" "+u:u)}return u},M8=(...e)=>{let t=0,r,n,i="";for(;t<e.length;)(r=e[t++])&&(n=I2(r))&&(i&&(i+=" "),i+=n);return i},I2=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=I2(e[n]))&&(r&&(r+=" "),r+=t);return r},j8=(e,...t)=>{let r,n,i,a;const s=u=>{const l=t.reduce((c,f)=>f(c),e());return r=D8(l),n=r.cache.get,i=r.cache.set,a=o,o(u)},o=u=>{const l=n(u);if(l)return l;const c=L8(u,r);return i(u,c),c};return a=s,(...u)=>a(M8(...u))},B8=[],Et=e=>{const t=r=>r[e]||B8;return t.isThemeGetter=!0,t},O2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,N2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F8=/^\d+\/\d+$/,$8=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,U8=/\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$/,H8=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,z8=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,q8=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ca=e=>F8.test(e),_e=e=>!!e&&!Number.isNaN(Number(e)),Fn=e=>!!e&&Number.isInteger(Number(e)),Cf=e=>e.endsWith("%")&&_e(e.slice(0,-1)),yn=e=>$8.test(e),W8=()=>!0,V8=e=>U8.test(e)&&!H8.test(e),P2=()=>!1,Y8=e=>z8.test(e),K8=e=>q8.test(e),G8=e=>!se(e)&&!oe(e),X8=e=>es(e,L2,P2),se=e=>O2.test(e),yi=e=>es(e,M2,V8),If=e=>es(e,t9,_e),ey=e=>es(e,D2,P2),Z8=e=>es(e,R2,K8),fu=e=>es(e,j2,Y8),oe=e=>N2.test(e),gs=e=>ts(e,M2),Q8=e=>ts(e,r9),ty=e=>ts(e,D2),J8=e=>ts(e,L2),e9=e=>ts(e,R2),du=e=>ts(e,j2,!0),es=(e,t,r)=>{const n=O2.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},ts=(e,t,r=!1)=>{const n=N2.exec(e);return n?n[1]?t(n[1]):r:!1},D2=e=>e==="position"||e==="percentage",R2=e=>e==="image"||e==="url",L2=e=>e==="length"||e==="size"||e==="bg-size",M2=e=>e==="length",t9=e=>e==="number",r9=e=>e==="family-name",j2=e=>e==="shadow",n9=()=>{const e=Et("color"),t=Et("font"),r=Et("text"),n=Et("font-weight"),i=Et("tracking"),a=Et("leading"),s=Et("breakpoint"),o=Et("container"),u=Et("spacing"),l=Et("radius"),c=Et("shadow"),f=Et("inset-shadow"),d=Et("text-shadow"),h=Et("drop-shadow"),p=Et("blur"),b=Et("perspective"),y=Et("aspect"),x=Et("ease"),T=Et("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...k(),oe,se],A=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],O=()=>[oe,se,u],R=()=>[ca,"full","auto",...O()],C=()=>[Fn,"none","subgrid",oe,se],M=()=>["auto",{span:["full",Fn,oe,se]},Fn,oe,se],L=()=>[Fn,"auto",oe,se],X=()=>["auto","min","max","fr",oe,se],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...O()],Y=()=>[ca,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],V=()=>[e,oe,se],re=()=>[...k(),ty,ey,{position:[oe,se]}],N=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ye=()=>["auto","cover","contain",J8,X8,{size:[oe,se]}],pe=()=>[Cf,gs,yi],P=()=>["","none","full",l,oe,se],ge=()=>["",_e,gs,yi],Oe=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[_e,Cf,ty,ey],ve=()=>["","none",p,oe,se],J=()=>["none",_e,oe,se],Z=()=>["none",_e,oe,se],fe=()=>[_e,oe,se],W=()=>[ca,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[yn],breakpoint:[yn],color:[W8],container:[yn],"drop-shadow":[yn],ease:["in","out","in-out"],font:[G8],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[yn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[yn],shadow:[yn],spacing:["px",_e],text:[yn],"text-shadow":[yn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ca,se,oe,y]}],container:["container"],columns:[{columns:[_e,se,oe,o]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:[Fn,"auto",oe,se]}],basis:[{basis:[ca,"full","auto",o,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,ca,"auto","initial","none",se]}],grow:[{grow:["",_e,oe,se]}],shrink:[{shrink:["",_e,oe,se]}],order:[{order:[Fn,"first","last","none",oe,se]}],"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":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],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:Y()}],w:[{w:[o,"screen",...Y()]}],"min-w":[{"min-w":[o,"screen","none",...Y()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",r,gs,yi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,oe,If]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Cf,se]}],"font-family":[{font:[Q8,se,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,oe,se]}],"line-clamp":[{"line-clamp":[_e,"none",oe,If]}],leading:[{leading:[a,...O()]}],"list-image":[{"list-image":["none",oe,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,se]}],"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:[...Oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",oe,yi]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[_e,"auto",oe,se]}],"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",oe,se]}],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",oe,se]}],"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:ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fn,oe,se],radial:["",oe,se],conic:[Fn,oe,se]},e9,Z8]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"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:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Oe(),"hidden","none"]}],"divide-style":[{divide:[...Oe(),"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:[...Oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,oe,se]}],"outline-w":[{outline:["",_e,gs,yi]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",c,du,fu]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",f,du,fu]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[_e,yi]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",d,du,fu]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[_e,oe,se]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"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":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"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":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"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":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"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":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"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":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"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":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[oe,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"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:ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,se]}],filter:[{filter:["","none",oe,se]}],blur:[{blur:ve()}],brightness:[{brightness:[_e,oe,se]}],contrast:[{contrast:[_e,oe,se]}],"drop-shadow":[{"drop-shadow":["","none",h,du,fu]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",_e,oe,se]}],"hue-rotate":[{"hue-rotate":[_e,oe,se]}],invert:[{invert:["",_e,oe,se]}],saturate:[{saturate:[_e,oe,se]}],sepia:[{sepia:["",_e,oe,se]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,se]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[_e,oe,se]}],"backdrop-contrast":[{"backdrop-contrast":[_e,oe,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,oe,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,oe,se]}],"backdrop-invert":[{"backdrop-invert":["",_e,oe,se]}],"backdrop-opacity":[{"backdrop-opacity":[_e,oe,se]}],"backdrop-saturate":[{"backdrop-saturate":[_e,oe,se]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,oe,se]}],"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",oe,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",oe,se]}],ease:[{ease:["linear","initial",x,oe,se]}],delay:[{delay:[_e,oe,se]}],animate:[{animate:["none",T,oe,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,oe,se]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:J()}],"rotate-x":[{"rotate-x":J()}],"rotate-y":[{"rotate-y":J()}],"rotate-z":[{"rotate-z":J()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[oe,se,"","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",oe,se]}],"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",oe,se]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[_e,gs,yi,If]}],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"]}},B2=j8(n9),i9=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,a9=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s9={};function ry(e,t){return(s9.jsx?a9:i9).test(e)}const o9=/[ \t\n\f\r]/g;function u9(e){return typeof e=="object"?e.type==="text"?ny(e.value):!1:ny(e)}function ny(e){return e.replace(o9,"")===""}var fa={},Of,iy;function l9(){if(iy)return Of;iy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,o=/^\s+|\s+$/g,u=`
59
+ `,l="/",c="*",f="",d="comment",h="declaration";function p(y,x){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];x=x||{};var T=1,E=1;function k(U){var $=U.match(t);$&&(T+=$.length);var q=U.lastIndexOf(u);E=~q?U.length-q:E+U.length}function w(){var U={line:T,column:E};return function($){return $.position=new A(U),R(),$}}function A(U){this.start=U,this.end={line:T,column:E},this.source=x.source}A.prototype.content=y;function S(U){var $=new Error(x.source+":"+T+":"+E+": "+U);if($.reason=U,$.filename=x.source,$.line=T,$.column=E,$.source=y,!x.silent)throw $}function O(U){var $=U.exec(y);if($){var q=$[0];return k(q),y=y.slice(q.length),$}}function R(){O(r)}function C(U){var $;for(U=U||[];$=M();)$!==!1&&U.push($);return U}function M(){var U=w();if(!(l!=y.charAt(0)||c!=y.charAt(1))){for(var $=2;f!=y.charAt($)&&(c!=y.charAt($)||l!=y.charAt($+1));)++$;if($+=2,f===y.charAt($-1))return S("End of comment missing");var q=y.slice(2,$-2);return E+=2,k(q),y=y.slice($),E+=2,U({type:d,comment:q})}}function L(){var U=w(),$=O(n);if($){if(M(),!O(i))return S("property missing ':'");var q=O(a),Y=U({type:h,property:b($[0].replace(e,f)),value:q?b(q[0].replace(e,f)):f});return O(s),Y}}function X(){var U=[];C(U);for(var $;$=L();)$!==!1&&(U.push($),C(U));return U}return R(),X()}function b(y){return y?y.replace(o,f):f}return Of=p,Of}var ay;function c9(){if(ay)return fa;ay=1;var e=fa&&fa.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(fa,"__esModule",{value:!0}),fa.default=r;const t=e(l9());function r(n,i){let a=null;if(!n||typeof n!="string")return a;const s=(0,t.default)(n),o=typeof i=="function";return s.forEach(u=>{if(u.type!=="declaration")return;const{property:l,value:c}=u;o?i(l,c,u):c&&(a=a||{},a[l]=c)}),a}return fa}var bs={},sy;function f9(){if(sy)return bs;sy=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.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)},s=function(l,c){return c.toUpperCase()},o=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,o):l=l.replace(n,o),l.replace(t,s))};return bs.camelCase=u,bs}var ys,oy;function d9(){if(oy)return ys;oy=1;var e=ys&&ys.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(c9()),r=f9();function n(i,a){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(o,u){o&&u&&(s[(0,r.camelCase)(o,a)]=u)}),s}return n.default=n,ys=n,ys}var h9=d9();const p9=Nn(h9);function Gs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?uy(e.position):"start"in e||"end"in e?uy(e):"line"in e||"column"in e?Bh(e):""}function Bh(e){return ly(e&&e.line)+":"+ly(e&&e.column)}function uy(e){return Bh(e&&e.start)+"-"+Bh(e&&e.end)}function ly(e){return e&&typeof e=="number"?e:1}class Vt extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},s=!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&&(s=!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 o=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=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Gs(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=s&&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}}Vt.prototype.file="";Vt.prototype.name="";Vt.prototype.reason="";Vt.prototype.message="";Vt.prototype.stack="";Vt.prototype.column=void 0;Vt.prototype.line=void 0;Vt.prototype.ancestors=void 0;Vt.prototype.cause=void 0;Vt.prototype.fatal=void 0;Vt.prototype.place=void 0;Vt.prototype.ruleId=void 0;Vt.prototype.source=void 0;const Am={}.hasOwnProperty,m9=new Map,g9=/[A-Z]/g,b9=new Set(["table","tbody","thead","tfoot","tr"]),y9=new Set(["td","th"]),F2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function v9(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=S9(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=_9(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"?li:Do,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=$2(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function $2(e,t,r){if(t.type==="element")return x9(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return E9(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return w9(e,t,r);if(t.type==="mdxjsEsm")return T9(e,t);if(t.type==="root")return A9(e,t,r);if(t.type==="text")return k9(e,t)}function x9(e,t,r){const n=e.schema;let i=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=li,e.schema=i),e.ancestors.push(t);const a=H2(e,t.tagName,!1),s=C9(e,t);let o=_m(e,t);return b9.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!u9(u):!0})),U2(e,s,a,t),km(s,o),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function E9(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)}lo(e,t.position)}function T9(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);lo(e,t.position)}function w9(e,t,r){const n=e.schema;let i=n;t.name==="svg"&&n.space==="html"&&(i=li,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:H2(e,t.name,!0),s=I9(e,t),o=_m(e,t);return U2(e,s,a,t),km(s,o),e.ancestors.pop(),e.schema=n,e.create(t,a,s,r)}function A9(e,t,r){const n={};return km(n,_m(e,t)),e.create(t,e.Fragment,n,r)}function k9(e,t){return t.value}function U2(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function km(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function _9(e,t,r){return n;function n(i,a,s,o){const l=Array.isArray(s.children)?r:t;return o?l(a,s,o):l(a,s)}}function S9(e,t){return r;function r(n,i,a,s){const o=Array.isArray(a.children),u=hn(n);return t(i,a,s,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function C9(e,t){const r={};let n,i;for(i in t.properties)if(i!=="children"&&Am.call(t.properties,i)){const a=O9(e,i,t.properties[i]);if(a){const[s,o]=a;e.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&y9.has(t.tagName)?n=o:r[s]=o}}if(n){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function I9(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 s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(r,e.evaluater.evaluateExpression(o.argument))}else lo(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 o=n.value.data.estree.body[0];o.type,a=e.evaluater.evaluateExpression(o.expression)}else lo(e,t.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function _m(e,t){const r=[];let n=-1;const i=e.passKeys?new Map:m9;for(;++n<t.children.length;){const a=t.children[n];let s;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;s=u+"-"+l,i.set(u,l+1)}}const o=$2(e,a,s);o!==void 0&&r.push(o)}return r}function O9(e,t,r){const n=fc(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?Yw(r):Kw(r)),n.property==="style"){let i=typeof r=="object"?r:N9(e,String(r));return e.stylePropertyNameCase==="css"&&(i=P9(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&n.space?tD[n.property]||n.property:n.attribute,r]}}function N9(e,t){try{return p9(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const n=r,i=new Vt("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=F2+"#cannot-parse-style-attribute",i}}function H2(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,s;for(;++a<i.length;){const o=ry(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}n=s}else n=ry(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const i=n.value;return Am.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(n);lo(e)}function lo(e,t){const r=new Vt("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=F2+"#cannot-handle-mdx-estrees-without-createevaluater",r}function P9(e){const t={};let r;for(r in e)Am.call(e,r)&&(t[D9(r)]=e[r]);return t}function D9(e){let t=e.replace(g9,R9);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function R9(e){return"-"+e.toLowerCase()}const Nf={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"]},L9={tokenize:M9};function M9(e){const t=e.attempt(this.parser.constructs.contentInitial,n,i);let r;return t;function n(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Re(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),a(o)}function a(o){const u=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=u),r=u,s(o)}function s(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ce(o)?(e.consume(o),e.exit("chunkText"),a):(e.consume(o),s)}}const j9={tokenize:B9},cy={tokenize:F9};function B9(e){const t=this,r=[];let n=0,i,a,s;return o;function o(E){if(n<r.length){const k=r[n];return t.containerState=k[1],e.attempt(k[0].continuation,u,l)(E)}return l(E)}function u(E){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&T();const k=t.events.length;let w=k,A;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){A=t.events[w][1].end;break}x(n);let S=k;for(;S<t.events.length;)t.events[S][1].end={...A},S++;return vr(t.events,w+1,0,t.events.slice(k)),t.events.length=S,l(E)}return o(E)}function l(E){if(n===r.length){if(!i)return d(E);if(i.currentConstruct&&i.currentConstruct.concrete)return p(E);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cy,c,f)(E)}function c(E){return i&&T(),x(n),d(E)}function f(E){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,p(E)}function d(E){return t.containerState={},e.attempt(cy,h,p)(E)}function h(E){return n++,r.push([t.currentConstruct,t.containerState]),d(E)}function p(E){if(E===null){i&&T(),x(0),e.consume(E);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),b(E)}function b(E){if(E===null){y(e.exit("chunkFlow"),!0),x(0),e.consume(E);return}return ce(E)?(e.consume(E),y(e.exit("chunkFlow")),n=0,t.interrupt=void 0,o):(e.consume(E),b)}function y(E,k){const w=t.sliceStream(E);if(k&&w.push(null),E.previous=a,a&&(a.next=E),a=E,i.defineSkip(E.start),i.write(w),t.parser.lazy[E.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<s&&(!i.events[A][1].end||i.events[A][1].end.offset>s))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(x(n),A=S;A<t.events.length;)t.events[A][1].end={...C},A++;vr(t.events,O+1,0,t.events.slice(S)),t.events.length=A}}function x(E){let k=r.length;for(;k-- >E;){const w=r[k];t.containerState=w[1],w[0].exit.call(t,e)}r.length=E}function T(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function F9(e,t,r){return Re(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const $9={tokenize:U9};function U9(e){const t=this,r=e.attempt(jo,n,e.attempt(this.parser.constructs.flowInitial,i,Re(e,e.attempt(this.parser.constructs.flow,i,e.attempt(z4,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 H9={resolveAll:q2()},z9=z2("string"),q9=z2("text");function z2(e){return{resolveAll:q2(e==="text"?W9:void 0),tokenize:t};function t(r){const n=this,i=this.parser.constructs[e],a=r.attempt(i,s,o);return s;function s(c){return l(c)?a(c):o(c)}function o(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 q2(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 W9(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,s=-1,o=0,u;for(;a--;){const l=i[a];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(l===-2)u=!0,o++;else if(l!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(o=0),o){const l={type:r===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:n.start._bufferIndex+s,_index:n.start._index+a,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},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 V9={42:ur,43:ur,45:ur,48:ur,49:ur,50:ur,51:ur,52:ur,53:ur,54:ur,55:ur,56:ur,57:ur,62:l2},Y9={91:K4},K9={[-2]:kf,[-1]:kf,32:kf},G9={35:e5,42:ju,45:[qb,ju],60:i5,61:qb,95:ju,96:Hb,126:Hb},X9={38:f2,92:c2},Z9={[-5]:_f,[-4]:_f,[-3]:_f,33:T5,38:f2,42:Mh,60:[A4,f5],91:A5,92:[Q4,c2],93:xm,95:Mh,96:j4},Q9={null:[Mh,H9]},J9={null:[42,95]},eB={null:[]},tB=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:J9,contentInitial:Y9,disable:eB,document:V9,flow:G9,flowInitial:K9,insideSpan:Q9,string:X9,text:Z9},Symbol.toStringTag,{value:"Module"}));function rB(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 s=[],o=[];const u={attempt:S(w),check:S(A),consume:T,enter:E,exit:k,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 s=Nr(s,M),y(),s[s.length-1]!==null?[]:(O(t,0),l.events=yc(a,l.events,l),l.events)}function d(M,L){return iB(h(M),L)}function h(M){return nB(s,M)}function p(){const{_bufferIndex:M,_index:L,line:X,column:U,offset:$}=n;return{_bufferIndex:M,_index:L,line:X,column:U,offset:$}}function b(M){i[M.line]=M.column,C()}function y(){let M;for(;n._index<s.length;){const L=s[n._index];if(typeof L=="string")for(M=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===M&&n._bufferIndex<L.length;)x(L.charCodeAt(n._bufferIndex));else x(L)}}function x(M){c=c(M)}function T(M){ce(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===s[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=M}function E(M,L){const X=L||{};return X.type=M,X.start=p(),l.events.push(["enter",X,l]),o.push(X),X}function k(M){const L=o.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 X;function X(U,$,q){let Y,V,re,N;return Array.isArray(U)?pe(U):"tokenize"in U?pe([U]):ye(U);function ye(he){return Te;function Te(ve){const J=ve!==null&&he[ve],Z=ve!==null&&he.null,fe=[...Array.isArray(J)?J:J?[J]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return pe(fe)(ve)}}function pe(he){return Y=he,V=0,he.length===0?q:P(he[V])}function P(he){return Te;function Te(ve){return N=R(),re=he,he.partial||(l.currentConstruct=he),he.name&&l.parser.constructs.disable.null.includes(he.name)?Oe():he.tokenize.call(L?Object.assign(Object.create(l),L):l,u,ge,Oe)(ve)}}function ge(he){return M(re,N),$}function Oe(he){return N.restore(),++V<Y.length?P(Y[V]):q}}}function O(M,L){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&vr(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,X=l.currentConstruct,U=l.events.length,$=Array.from(o);return{from:U,restore:q};function q(){n=M,l.previous=L,l.currentConstruct=X,l.events.length=U,o=$,C()}}function C(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function nB(e,t){const r=t.start._index,n=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let s;if(r===i)s=[e[r].slice(n,a)];else{if(s=e.slice(r,i),n>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(n):s.shift()}a>0&&s.push(e[i].slice(0,a))}return s}function iB(e,t){let r=-1;const n=[];let i;for(;++r<e.length;){const a=e[r];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
60
+ `;break}case-3:{s=`\r
61
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,n.push(s)}return n.join("")}function aB(e){const n={constructs:e2([tB,...(e||{}).extensions||[]]),content:i(L9),defined:[],document:i(j9),flow:i($9),lazy:{},string:i(z9),text:i(q9)};return n;function i(a){return s;function s(o){return rB(n,a,o)}}}function sB(e){for(;!d2(e););return e}const fy=/[\0\t\n\r]/g;function oB(){let e=1,t="",r=!0,n;return i;function i(a,s,o){const u=[];let l,c,f,d,h;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),f=0,t="",r&&(a.charCodeAt(0)===65279&&f++,r=void 0);f<a.length;){if(fy.lastIndex=f,l=fy.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 o&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}const W2={}.hasOwnProperty;function uB(e,t,r){return typeof t!="string"&&(r=t,t=void 0),lB(r)(sB(aB(r).document().write(oB()(e,t,!0))))}function lB(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Be),autolinkProtocol:R,autolinkEmail:R,atxHeading:a(Ge),blockQuote:a(Z),characterEscape:R,characterReference:R,codeFenced:a(fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(fe,s),codeText:a(W,s),codeTextData:R,data:R,codeFlowValue:R,definition:a(Qe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(we),hardBreakEscape:a(ze),hardBreakTrailing:a(ze),htmlFlow:a(St,s),htmlFlowData:R,htmlText:a(St,s),htmlTextData:R,image:a(xe),label:s,link:a(Be),listItem:a(xt),listItemValue:d,listOrdered:a(pt,f),listUnordered:a(pt),paragraph:a(kr),reference:P,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Ge),strong:a(ia),thematicBreak:a(fs)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:J,autolinkProtocol:ve,blockQuote:u(),characterEscapeValue:C,characterReferenceMarkerHexadecimal:Oe,characterReferenceMarkerNumeric:Oe,characterReferenceValue:he,characterReference:Te,codeFenced:u(y),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:C,codeIndented:u(x),codeText:u($),codeTextData:C,data:C,definition:u(),definitionDestinationString:k,definitionLabelString:T,definitionTitleString:E,emphasis:u(),hardBreakEscape:u(L),hardBreakTrailing:u(L),htmlFlow:u(X),htmlFlowData:C,htmlText:u(U),htmlTextData:C,image:u(Y),label:re,labelText:V,lineEnding:M,link:u(q),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ge,resourceDestinationString:N,resourceTitleString:ye,resource:pe,setextHeading:u(O),setextHeadingLineSequence:S,setextHeadingText:A,strong:u(),thematicBreak:u()}};V2(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(z){let te={type:"root",children:[]};const me={stack:[te],tokenStack:[],config:t,enter:o,exit:l,buffer:s,resume:c,data:r},ee=[];let ae=-1;for(;++ae<z.length;)if(z[ae][1].type==="listOrdered"||z[ae][1].type==="listUnordered")if(z[ae][0]==="enter")ee.push(ae);else{const Le=ee.pop();ae=i(z,Le,ae)}for(ae=-1;++ae<z.length;){const Le=t[z[ae][0]];W2.call(Le,z[ae][1].type)&&Le[z[ae][1].type].call(Object.assign({sliceSerialize:z[ae][2].sliceSerialize},me),z[ae][1])}if(me.tokenStack.length>0){const Le=me.tokenStack[me.tokenStack.length-1];(Le[1]||dy).call(me,void 0,Le[0])}for(te.position={start:$n(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:$n(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},ae=-1;++ae<t.transforms.length;)te=t.transforms[ae](te)||te;return te}function i(z,te,me){let ee=te-1,ae=-1,Le=!1,We,it,ut,be;for(;++ee<=me;){const Se=z[ee];switch(Se[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Se[0]==="enter"?ae++:ae--,be=void 0;break}case"lineEndingBlank":{Se[0]==="enter"&&(We&&!be&&!ae&&!ut&&(ut=ee),be=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:be=void 0}if(!ae&&Se[0]==="enter"&&Se[1].type==="listItemPrefix"||ae===-1&&Se[0]==="exit"&&(Se[1].type==="listUnordered"||Se[1].type==="listOrdered")){if(We){let bn=ee;for(it=void 0;bn--;){const mr=z[bn];if(mr[1].type==="lineEnding"||mr[1].type==="lineEndingBlank"){if(mr[0]==="exit")continue;it&&(z[it][1].type="lineEndingBlank",Le=!0),mr[1].type="lineEnding",it=bn}else if(!(mr[1].type==="linePrefix"||mr[1].type==="blockQuotePrefix"||mr[1].type==="blockQuotePrefixWhitespace"||mr[1].type==="blockQuoteMarker"||mr[1].type==="listItemIndent"))break}ut&&(!it||ut<it)&&(We._spread=!0),We.end=Object.assign({},it?z[it][1].start:Se[1].end),z.splice(it||ee,0,["exit",We,Se[2]]),ee++,me++}if(Se[1].type==="listItemPrefix"){const bn={type:"listItem",_spread:!1,start:Object.assign({},Se[1].start),end:void 0};We=bn,z.splice(ee,0,["enter",bn,Se[2]]),ee++,me++,ut=void 0,be=!0}}}return z[te][1]._spread=Le,me}function a(z,te){return me;function me(ee){o.call(this,z(ee),ee),te&&te.call(this,ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(z,te,me){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([te,me||void 0]),z.position={start:$n(te.start),end:void 0}}function u(z){return te;function te(me){z&&z.call(this,me),l.call(this,me)}}function l(z,te){const me=this.stack.pop(),ee=this.tokenStack.pop();if(ee)ee[0].type!==z.type&&(te?te.call(this,z,ee[0]):(ee[1]||dy).call(this,z,ee[0]));else throw new Error("Cannot close `"+z.type+"` ("+Gs({start:z.start,end:z.end})+"): it’s not open");me.position.end=$n(z.end)}function c(){return gm(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(z){if(this.data.expectingFirstListItemValue){const te=this.stack[this.stack.length-2];te.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function h(){const z=this.resume(),te=this.stack[this.stack.length-1];te.lang=z}function p(){const z=this.resume(),te=this.stack[this.stack.length-1];te.meta=z}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const z=this.resume(),te=this.stack[this.stack.length-1];te.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const z=this.resume(),te=this.stack[this.stack.length-1];te.value=z.replace(/(\r?\n|\r)$/g,"")}function T(z){const te=this.resume(),me=this.stack[this.stack.length-1];me.label=te,me.identifier=zr(this.sliceSerialize(z)).toLowerCase()}function E(){const z=this.resume(),te=this.stack[this.stack.length-1];te.title=z}function k(){const z=this.resume(),te=this.stack[this.stack.length-1];te.url=z}function w(z){const te=this.stack[this.stack.length-1];if(!te.depth){const me=this.sliceSerialize(z).length;te.depth=me}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function S(z){const te=this.stack[this.stack.length-1];te.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function R(z){const me=this.stack[this.stack.length-1].children;let ee=me[me.length-1];(!ee||ee.type!=="text")&&(ee=aa(),ee.position={start:$n(z.start),end:void 0},me.push(ee)),this.stack.push(ee)}function C(z){const te=this.stack.pop();te.value+=this.sliceSerialize(z),te.position.end=$n(z.end)}function M(z){const te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const me=te.children[te.children.length-1];me.position.end=$n(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(te.type)&&(R.call(this,z),C.call(this,z))}function L(){this.data.atHardBreak=!0}function X(){const z=this.resume(),te=this.stack[this.stack.length-1];te.value=z}function U(){const z=this.resume(),te=this.stack[this.stack.length-1];te.value=z}function $(){const z=this.resume(),te=this.stack[this.stack.length-1];te.value=z}function q(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=te,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function Y(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const te=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=te,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function V(z){const te=this.sliceSerialize(z),me=this.stack[this.stack.length-2];me.label=K6(te),me.identifier=zr(te).toLowerCase()}function re(){const z=this.stack[this.stack.length-1],te=this.resume(),me=this.stack[this.stack.length-1];if(this.data.inReference=!0,me.type==="link"){const ee=z.children;me.children=ee}else me.alt=te}function N(){const z=this.resume(),te=this.stack[this.stack.length-1];te.url=z}function ye(){const z=this.resume(),te=this.stack[this.stack.length-1];te.title=z}function pe(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ge(z){const te=this.resume(),me=this.stack[this.stack.length-1];me.label=te,me.identifier=zr(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function Oe(z){this.data.characterReferenceType=z.type}function he(z){const te=this.sliceSerialize(z),me=this.data.characterReferenceType;let ee;me?(ee=JA(te,me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ee=ym(te);const ae=this.stack[this.stack.length-1];ae.value+=ee}function Te(z){const te=this.stack.pop();te.position.end=$n(z.end)}function ve(z){C.call(this,z);const te=this.stack[this.stack.length-1];te.url=this.sliceSerialize(z)}function J(z){C.call(this,z);const te=this.stack[this.stack.length-1];te.url="mailto:"+this.sliceSerialize(z)}function Z(){return{type:"blockquote",children:[]}}function fe(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function Qe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function Ge(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function St(){return{type:"html",value:""}}function xe(){return{type:"image",title:null,url:"",alt:null}}function Be(){return{type:"link",title:null,url:"",children:[]}}function pt(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function xt(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function kr(){return{type:"paragraph",children:[]}}function ia(){return{type:"strong",children:[]}}function aa(){return{type:"text",value:""}}function fs(){return{type:"thematicBreak"}}}function $n(e){return{line:e.line,column:e.column,offset:e.offset}}function V2(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?V2(e,n):cB(e,n)}}function cB(e,t){let r;for(r in t)if(W2.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 dy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Gs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Gs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Gs({start:t.start,end:t.end})+") is still open")}function fB(e){const t=this;t.parser=r;function r(n){return uB(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function dB(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 hB(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
62
+ `}]}function pB(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 mB(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gB(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bB(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),i=Ja(n.toLowerCase()),a=e.footnoteOrder.indexOf(n);let s,o=e.footnoteCounts.get(n);o===void 0?(o=0,e.footnoteOrder.push(n),s=e.footnoteOrder.length):s=a+1,o+=1,e.footnoteCounts.set(n,o);const u={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,u);const l={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,l),e.applyData(t,l)}function yB(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 vB(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function Y2(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 s=i[i.length-1];return s&&s.type==="text"?s.value+=n:i.push({type:"text",value:n}),i}function xB(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Y2(e,t);const i={src:Ja(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 EB(e,t){const r={src:Ja(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 TB(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 wB(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return Y2(e,t);const i={href:Ja(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 AB(e,t){const r={href:Ja(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 kB(e,t,r){const n=e.all(t),i=r?_B(r):K2(t),a={},s=[];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 o=-1;for(;++o<n.length;){const c=n[o];(i||o!==0||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
64
+ `}),c.type==="element"&&c.tagName==="p"&&!i?s.push(...c.children):s.push(c)}const u=n[n.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
65
+ `});const l={type:"element",tagName:"li",properties:a,children:s};return e.patch(t,l),e.applyData(t,l)}function _B(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=K2(r[n])}return t}function K2(e){const t=e.spread;return t??e.children.length>1}function SB(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 s=n[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.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 CB(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function IB(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function OB(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function NB(e,t){const r=e.all(t),n=r.shift(),i=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),i.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},o=hn(t.children[1]),u=gc(t.children[t.children.length-1]);o&&u&&(s.position={start:o,end:u}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function PB(e,t,r){const n=r?r.children:void 0,a=(n?n.indexOf(t):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,o=s?s.length:t.children.length;let u=-1;const l=[];for(;++u<o;){const f=t.children[u],d={},h=s?s[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 DB(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const hy=9,py=32;function RB(e){const t=String(e),r=/\r?\n|\r/g;let n=r.exec(t),i=0;const a=[];for(;n;)a.push(my(t.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(t);return a.push(my(t.slice(i),i>0,!1)),a.join("")}function my(e,t,r){let n=0,i=e.length;if(t){let a=e.codePointAt(n);for(;a===hy||a===py;)n++,a=e.codePointAt(n)}if(r){let a=e.codePointAt(i-1);for(;a===hy||a===py;)i--,a=e.codePointAt(i-1)}return i>n?e.slice(n,i):""}function LB(e,t){const r={type:"text",value:RB(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function MB(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const jB={blockquote:dB,break:hB,code:pB,delete:mB,emphasis:gB,footnoteReference:bB,heading:yB,html:vB,imageReference:xB,image:EB,inlineCode:TB,linkReference:wB,link:AB,listItem:kB,list:SB,paragraph:CB,root:IB,strong:OB,table:NB,tableCell:DB,tableRow:PB,text:LB,thematicBreak:MB,toml:hu,yaml:hu,definition:hu,footnoteDefinition:hu};function hu(){}function BB(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 FB(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $B(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||BB,n=e.options.footnoteBackLabel||FB,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];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=Ja(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 x={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(l,x),o.push(x)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ji(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
66
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
67
+ `}]}}const Fh={}.hasOwnProperty,UB={};function HB(e,t){const r=t||UB,n=new Map,i=new Map,a=new Map,s={...jB,...r.handlers},o={all:l,applyData:qB,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:u,options:r,patch:zB,wrap:VB};return ln(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)}}),o;function u(c,f){const d=c.type,h=o.handlers[d];if(Fh.call(o.handlers,d)&&h)return h(o,c,f);if(o.options.passThrough&&o.options.passThrough.includes(d)){if("children"in c){const{children:b,...y}=c,x=ji(y);return x.children=o.all(c),x}return ji(c)}return(o.options.unknownHandler||WB)(o,c,f)}function l(c){const f=[];if("children"in c){const d=c.children;let h=-1;for(;++h<d.length;){const p=o.one(d[h],c);if(p){if(h&&d[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=gy(p.value)),!Array.isArray(p)&&p.type==="element")){const b=p.children[0];b&&b.type==="text"&&(b.value=gy(b.value))}Array.isArray(p)?f.push(...p):f.push(p)}}}return f}}function zB(e,t){e.position&&(t.position=CA(e))}function qB(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 s="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:s}}r.type==="element"&&a&&Object.assign(r.properties,ji(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function WB(e,t){const r=t.data||{},n="value"in t&&!(Fh.call(r,"hProperties")||Fh.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 VB(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 gy(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function by(e,t){const r=HB(e,t),n=r.one(e,void 0),i=$B(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 YB(e,t){return e&&"run"in e?async function(r,n){const i=by(r,{file:n,...t});await e.run(i,n)}:function(r,n){return by(r,{file:n,...e||t})}}function yy(e){if(e)throw e}var Pf,vy;function KB(){if(vy)return Pf;vy=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)},s=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},o=function(l,c){if(c==="__proto__")if(e.call(l,c)){if(n)return n(l,c).value}else return;return l[c]};return Pf=function u(){var l,c,f,d,h,p,b=arguments[0],y=1,x=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<x;++y)if(l=arguments[y],l!=null)for(c in l)f=o(b,c),d=o(l,c),b!==d&&(T&&d&&(a(d)||(h=i(d)))?(h?(h=!1,p=f&&i(f)?f:[]):p=f&&a(f)?f:{},s(b,{name:c,newValue:u(T,p,d)})):typeof d<"u"&&s(b,{name:c,newValue:d}));return b},Pf}var GB=KB();const Df=Nn(GB);function $h(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 XB(){const e=[],t={run:r,use:n};return t;function r(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(u,...l){const c=e[++a];let f=-1;if(u){s(u);return}for(;++f<i.length;)(l[f]===null||l[f]===void 0)&&(l[f]=i[f]);i=l,c?ZB(c,o)(...l):s(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 ZB(e,t){let r;return n;function n(...s){const o=e.length>s.length;let u;o&&s.push(i);try{u=e.apply(this,s)}catch(l){const c=l;if(o&&r)throw c;return i(c)}o||(u&&u.then&&typeof u.then=="function"?u.then(a,i):u instanceof Error?i(u):a(u))}function i(s,...o){r||(r=!0,t(s,...o))}function a(s){i(null,s)}}const tn={basename:QB,dirname:JB,extname:eF,join:tF,sep:"/"};function QB(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Bo(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 s=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){r=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(n=i):(o=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function JB(e){if(Bo(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 eF(e){Bo(e);let t=e.length,r=-1,n=0,i=-1,a=0,s;for(;t--;){const o=e.codePointAt(t);if(o===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),o===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 tF(...e){let t=-1,r;for(;++t<e.length;)Bo(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":rF(r)}function rF(e){Bo(e);const t=e.codePointAt(0)===47;let r=nF(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function nF(e,t){let r="",n=0,i=-1,a=0,s=-1,o,u;for(;++s<=e.length;){if(s<e.length)o=e.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-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=s,a=0;continue}}else if(r.length>0){r="",n=0,i=s,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),n=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return r}function Bo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iF={cwd:aF};function aF(){return"/"}function Uh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sF(e){if(typeof e=="string")e=new URL(e);else if(!Uh(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 oF(e)}function oF(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 Rf=["history","path","basename","stem","extname","dirname"];class uF{constructor(t){let r;t?Uh(t)?r={path:t}:typeof t=="string"||lF(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":iF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Rf.length;){const a=Rf[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)Rf.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?tn.basename(this.path):void 0}set basename(t){Mf(t,"basename"),Lf(t,"basename"),this.path=tn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?tn.dirname(this.path):void 0}set dirname(t){xy(this.basename,"dirname"),this.path=tn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?tn.extname(this.path):void 0}set extname(t){if(Lf(t,"extname"),xy(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=tn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Uh(t)&&(t=sF(t)),Mf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?tn.basename(this.path,this.extname):void 0}set stem(t){Mf(t,"stem"),Lf(t,"stem"),this.path=tn.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 Vt(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 Lf(e,t){if(e&&e.includes(tn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+tn.sep+"`")}function Mf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cF=(function(e){const n=this.constructor.prototype,i=n[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a}),fF={}.hasOwnProperty;class Sm extends cF{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=XB()}copy(){const t=new Sm;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];t.use(...n)}return t.data(Df(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Ff("data",this.frozen),this.namespace[t]=r,this):fF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ff("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=pu(t),n=this.parser||this.Parser;return jf("parse",n),n(String(r),r)}process(t,r){const n=this;return this.freeze(),jf("process",this.parser||this.Parser),Bf("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,s){const o=pu(t),u=n.parse(o);n.run(u,o,function(c,f,d){if(c||!f||!d)return l(c);const h=f,p=n.stringify(h,d);pF(p)?d.value=p:d.result=p,l(c,d)});function l(c,f){c||!f?s(c):a?a(f):r(void 0,f)}}}processSync(t){let r=!1,n;return this.freeze(),jf("processSync",this.parser||this.Parser),Bf("processSync",this.compiler||this.Compiler),this.process(t,i),Ty("processSync","process",r),n;function i(a,s){r=!0,yy(a),n=s}}run(t,r,n){Ey(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(s,o){const u=pu(r);i.run(t,u,l);function l(c,f,d){const h=f||t;c?o(c):s?s(h):n(void 0,h,d)}}}runSync(t,r){let n=!1,i;return this.run(t,r,a),Ty("runSync","run",n),i;function a(s,o){yy(s),i=o,n=!0}}stringify(t,r){this.freeze();const n=pu(r),i=this.compiler||this.Compiler;return Bf("stringify",i),Ey(t),i(t,n)}use(t,...r){const n=this.attachers,i=this.namespace;if(Ff("use",this.frozen),t!=null)if(typeof t=="function")u(t,r);else if(typeof t=="object")Array.isArray(t)?o(t):s(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 s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(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");o(l.plugins),l.settings&&(i.settings=Df(!0,i.settings,l.settings))}function o(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];$h(b)&&$h(h)&&(h=Df(!0,b,h)),n[d]=[l,h,...p]}}}}const dF=new Sm().freeze();function jf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ff(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 Ey(e){if(!$h(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ty(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pu(e){return hF(e)?e:new uF(e)}function hF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pF(e){return typeof e=="string"||mF(e)}function mF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function Cm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Zi=Cm();function G2(e){Zi=e}var Xs={exec:()=>null};function Me(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(tr.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,t)};return n}var gF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),tr={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")},bF=/^(?:[ \t]*(?:\n|$))+/,yF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Fo=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Im=/(?:[*+-]|\d{1,9}[.)])/,X2=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Z2=Me(X2).replace(/bull/g,Im).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(),EF=Me(X2).replace(/bull/g,Im).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(),Om=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,TF=/^[^\n]+/,Nm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wF=Me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Nm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),AF=Me(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Im).getRegex(),xc="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",Pm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,kF=Me("^ {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",Pm).replace("tag",xc).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Q2=Me(Om).replace("hr",Fo).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",xc).getRegex(),_F=Me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Q2).getRegex(),Dm={blockquote:_F,code:yF,def:wF,fences:vF,heading:xF,hr:Fo,html:kF,lheading:Z2,list:AF,newline:bF,paragraph:Q2,table:Xs,text:TF},wy=Me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Fo).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",xc).getRegex(),SF={...Dm,lheading:EF,table:wy,paragraph:Me(Om).replace("hr",Fo).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",wy).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",xc).getRegex()},CF={...Dm,html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Pm).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:Xs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Me(Om).replace("hr",Fo).replace("heading",` *#{1,6} *[^
72
+ ]`).replace("lheading",Z2).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},IF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,OF=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,J2=/^( {2,}|\\)\n(?!\s*$)/,NF=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ec=/[\p{P}\p{S}]/u,Rm=/[\s\p{P}\p{S}]/u,ek=/[^\s\p{P}\p{S}]/u,PF=Me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Rm).getRegex(),tk=/(?!~)[\p{P}\p{S}]/u,DF=/(?!~)[\s\p{P}\p{S}]/u,RF=/(?:[^\s\p{P}\p{S}]|~)/u,LF=Me(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rk=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,MF=Me(rk,"u").replace(/punct/g,Ec).getRegex(),jF=Me(rk,"u").replace(/punct/g,tk).getRegex(),nk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",BF=Me(nk,"gu").replace(/notPunctSpace/g,ek).replace(/punctSpace/g,Rm).replace(/punct/g,Ec).getRegex(),FF=Me(nk,"gu").replace(/notPunctSpace/g,RF).replace(/punctSpace/g,DF).replace(/punct/g,tk).getRegex(),$F=Me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ek).replace(/punctSpace/g,Rm).replace(/punct/g,Ec).getRegex(),UF=Me(/\\(punct)/,"gu").replace(/punct/g,Ec).getRegex(),HF=Me(/^<(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(),zF=Me(Pm).replace("(?:-->|$)","-->").getRegex(),qF=Me("^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",zF).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),al=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,WF=Me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",al).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ik=Me(/^!?\[(label)\]\[(ref)\]/).replace("label",al).replace("ref",Nm).getRegex(),ak=Me(/^!?\[(ref)\](?:\[\])?/).replace("ref",Nm).getRegex(),VF=Me("reflink|nolink(?!\\()","g").replace("reflink",ik).replace("nolink",ak).getRegex(),Ay=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Lm={_backpedal:Xs,anyPunctuation:UF,autolink:HF,blockSkip:LF,br:J2,code:OF,del:Xs,emStrongLDelim:MF,emStrongRDelimAst:BF,emStrongRDelimUnd:$F,escape:IF,link:WF,nolink:ak,punctuation:PF,reflink:ik,reflinkSearch:VF,tag:qF,text:NF,url:Xs},YF={...Lm,link:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",al).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",al).getRegex()},Hh={...Lm,emStrongRDelimAst:FF,emStrongLDelim:jF,url:Me(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ay).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:Me(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ay).getRegex()},KF={...Hh,br:Me(J2).replace("{2,}","*").getRegex(),text:Me(Hh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},mu={normal:Dm,gfm:SF,pedantic:CF},vs={normal:Lm,gfm:Hh,breaks:KF,pedantic:YF},GF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ky=e=>GF[e];function vn(e,t){if(t){if(tr.escapeTest.test(e))return e.replace(tr.escapeReplace,ky)}else if(tr.escapeTestNoEncode.test(e))return e.replace(tr.escapeReplaceNoEncode,ky);return e}function _y(e){try{e=encodeURI(e).replace(tr.percentDecode,"%")}catch{return null}return e}function Sy(e,t){let r=e.replace(tr.findPipe,(a,s,o)=>{let u=!1,l=s;for(;--l>=0&&o[l]==="\\";)u=!u;return u?"|":" |"}),n=r.split(tr.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(tr.slashPipe,"|");return n}function xs(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 XF(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 Cy(e,t,r,n,i){let a=t.href,s=t.title||null,o=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:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,u}function ZF(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 s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
74
+ `)}var sl=class{options;rules;lexer;constructor(t){this.options=t||Zi}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:xs(n,`
75
+ `)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=ZF(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=xs(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:xs(r[0],`
76
+ `)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=xs(r[0],`
77
+ `).split(`
78
+ `),i="",a="",s=[];for(;n.length>0;){let o=!1,u=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))u.push(n[l]),o=!0;else if(!o)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,s,!0),this.lexer.state.top=d,n.length===0)break;let h=s.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);s[s.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);s[s.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(s.at(-1).raw.length).split(`
87
+ `);continue}}return{type:"blockquote",raw:i,tokens:s,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 s=this.rules.other.listItemRegex(n),o=!1;for(;t;){let l=!1,c="",f="";if(!(r=s.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),x=this.rules.other.hrRegex(b),T=this.rules.other.fencesBeginRegex(b),E=this.rules.other.headingBeginRegex(b),k=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)||E.test(h)||k.test(h)||y.test(h)||x.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)||E.test(d)||x.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||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!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=Sy(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
95
+ `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let o of i)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<n.length;o++)s.header.push({text:n[o],tokens:this.lexer.inline(n[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(Sy(o,s.header.length).map((u,l)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[l]})));return s}}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 s=xs(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=XF(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],a=s[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)),Cy(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 s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return Cy(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,s,o,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(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(o=[...s].length,i[3]||i[4]){u+=o;continue}else if((i[5]||i[6])&&a%3&&!((a+o)%3)){l+=o;continue}if(u-=o,u>0)continue;o=Math.min(o,o+u+l);let f=[...i[0]][0].length,d=t.slice(0,a+i.index+f+o);if(Math.min(a,o)%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}}}},Pr=class zh{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Zi,this.options.tokenizer=this.options.tokenizer||new sl,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:tr,block:mu.normal,inline:vs.normal};this.options.pedantic?(r.block=mu.pedantic,r.inline=vs.pedantic):this.options.gfm&&(r.block=mu.gfm,this.options.breaks?r.inline=vs.breaks:r.inline=vs.gfm),this.tokenizer.rules=r}static get rules(){return{block:mu,inline:vs}}static lex(t,r){return new zh(r).lex(t)}static lexInline(t,r){return new zh(r).inlineTokens(t)}lex(t){t=t.replace(tr.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(tr.tabCharGlobal," ").replace(tr.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(s=>(i=s.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 s=r.at(-1);i.raw.length===1&&s!==void 0?s.raw+=`
98
+ `:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
99
+ `)?"":`
100
+ `)+i.raw,s.text+=`
101
+ `+i.text,this.inlineQueue.at(-1).src=s.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 s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
102
+ `)?"":`
103
+ `)+i.raw,s.text+=`
104
+ `+i.raw,this.inlineQueue.at(-1).src=s.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 s=1/0,o=t.slice(1),u;this.options.extensions.startBlock.forEach(l=>{u=l.call({lexer:this},o),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let s=r.at(-1);n&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
105
+ `)?"":`
106
+ `)+i.raw,s.text+=`
107
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.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 s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
108
+ `)?"":`
109
+ `)+i.raw,s.text+=`
110
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(i);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}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 s=!1,o="";for(;t;){s||(o=""),s=!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,o)){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)!=="_"&&(o=u.raw.slice(-1)),s=!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}},ol=class{options;parser;constructor(t){this.options=t||Zi}space(t){return""}code({text:t,lang:r,escaped:n}){let i=(r||"").match(tr.notSpaceStart)?.[0],a=t.replace(tr.endingNewline,"")+`
111
+ `;return i?'<pre><code class="language-'+vn(i)+'">'+(n?a:vn(a,!0))+`</code></pre>
112
+ `:"<pre><code>"+(n?a:vn(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 o=0;o<t.items.length;o++){let u=t.items[o];i+=this.listitem(u)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
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 s=t.rows[a];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);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>${vn(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=_y(t);if(a===null)return i;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+vn(r)+'"'),s+=">"+i+"</a>",s}image({href:t,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=_y(t);if(a===null)return vn(n);t=a;let s=`<img src="${t}" alt="${n}"`;return r&&(s+=` title="${vn(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:vn(t.text)}},Mm=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}},Fr=class qh{options;renderer;textRenderer;constructor(t){this.options=t||Zi,this.options.renderer=this.options.renderer||new ol,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mm}static parse(t,r){return new qh(r).parse(t)}static parseInline(t,r){return new qh(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 s=i,o=this.options.extensions.renderers[s.type].call({parser:this},s);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(s.type)){r+=o||"";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 s='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(s),"";throw new Error(s)}}}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 o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=o||"";continue}}let s=a;switch(s.type){case"escape":{n+=r.text(s);break}case"html":{n+=r.html(s);break}case"link":{n+=r.link(s);break}case"image":{n+=r.image(s);break}case"checkbox":{n+=r.checkbox(s);break}case"strong":{n+=r.strong(s);break}case"em":{n+=r.em(s);break}case"codespan":{n+=r.codespan(s);break}case"br":{n+=r.br(s);break}case"del":{n+=r.del(s);break}case"text":{n+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return n}},Rs=class{options;block;constructor(e){this.options=e||Zi}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?Pr.lex:Pr.lexInline}provideParser(){return this.block?Fr.parse:Fr.parseInline}},QF=class{defaults=Cm();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Fr;Renderer=ol;TextRenderer=Mm;Lexer=Pr;Tokenizer=sl;Hooks=Rs;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 s of a)r=r.concat(this.walkTokens(s.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 s=i[a].flat(1/0);r=r.concat(this.walkTokens(s,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(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}: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 ol(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 s=a,o=r.renderer[s],u=i[s];i[s]=(...l)=>{let c=o.apply(i,l);return c===!1&&(c=u.apply(i,l)),c||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new sl(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 s=a,o=r.tokenizer[s],u=i[s];i[s]=(...l)=>{let c=o.apply(i,l);return c===!1&&(c=u.apply(i,l)),c}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Rs;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 s=a,o=r.hooks[s],u=i[s];Rs.passThroughHooks.has(a)?i[s]=l=>{if(this.defaults.async&&Rs.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await o.call(i,l);return u.call(i,f)})();let c=o.call(i,l);return u.call(i,c)}:i[s]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await o.apply(i,l);return f===!1&&(f=await u.apply(i,l)),f})();let c=o.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(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Pr.lex(e,t??this.defaults)}parser(e,t){return Fr.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 s=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?Pr.lex:Pr.lexInline)(s,i),u=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():e?Fr.parse:Fr.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?Pr.lex:Pr.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?Fr.parse:Fr.parseInline)(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(s){return a(s)}}}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>"+vn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Fi=new QF;function qe(e,t){return Fi.parse(e,t)}qe.options=qe.setOptions=function(e){return Fi.setOptions(e),qe.defaults=Fi.defaults,G2(qe.defaults),qe};qe.getDefaults=Cm;qe.defaults=Zi;qe.use=function(...e){return Fi.use(...e),qe.defaults=Fi.defaults,G2(qe.defaults),qe};qe.walkTokens=function(e,t){return Fi.walkTokens(e,t)};qe.parseInline=Fi.parseInline;qe.Parser=Fr;qe.parser=Fr.parse;qe.Renderer=ol;qe.TextRenderer=Mm;qe.Lexer=Pr;qe.lexer=Pr.lex;qe.Tokenizer=sl;qe.Hooks=Rs;qe.parse=qe;qe.options;qe.setOptions;qe.use;qe.walkTokens;qe.parseInline;Fr.parse;Pr.lex;var JF=300,e7="300px",t7=500;function r7(e={}){let{immediate:t=!1,debounceDelay:r=JF,rootMargin:n=e7,idleTimeout:i=t7}=e,[a,s]=m.useState(!1),o=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){s(!0);return}let h=o.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=E=>{l.current=f(k=>{k.timeRemaining()>0||k.didTimeout?(s(!0),E.disconnect()):l.current=f(()=>{s(!0),E.disconnect()},{timeout:i/2})},{timeout:i})},y=E=>{p(),u.current=window.setTimeout(()=>{var k,w;let A=E.takeRecords();(A.length===0||(w=(k=A.at(-1))==null?void 0:k.isIntersecting)!=null&&w)&&b(E)},r)},x=(E,k)=>{E.isIntersecting?y(k):p()},T=new IntersectionObserver(E=>{for(let k of E)x(k,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:o}}var sk=/\s/,n7=/^\s+$/,i7=new Set(["code","pre","svg","math","annotation"]),a7=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",s7=e=>e.some(t=>a7(t)&&i7.has(t.tagName)),o7=e=>{let t=[],r="",n=!1;for(let i of e){let a=sk.test(i);a!==n&&r&&(t.push(r),r=""),r+=i,n=a}return r&&t.push(r),t},u7=e=>{let t=[],r="";for(let n of e)sk.test(n)?r+=n:(r&&(t.push(r),r=""),t.push(n));return r&&t.push(r),t},l7=(e,t,r,n,i,a)=>{let s=`--sd-animation:sd-${t};--sd-duration:${i?0:r}ms;--sd-easing:${n}`;return a&&(s+=`;--sd-delay:${a}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s},children:[{type:"text",value:e}]}},c7=(e,t,r,n,i)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(s7(t))return Aa;let s=a,o=s.children.indexOf(e);if(o===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let l=r.sep==="char"?u7(u):o7(u),c=n.prevContentLength,f=l.map(d=>{let h=i.count;if(i.count+=d.length,n7.test(d))return{type:"text",value:d};let p=c>0&&h<c,b=p?0:i.newIndex++*r.stagger;return l7(d,r.animation,r.duration,r.easing,p,b)});return s.children.splice(o,1,...f),o+f.length},f7=0;function Wh(e){var t,r,n,i,a;let s={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},o={prevContentLength:0,lastRenderCharCount:0},u=f7++,l=()=>c=>{let f={count:0,newIndex:0};nm(c,"text",(d,h)=>c7(d,h,s,o,f)),o.lastRenderCharCount=f.count,o.prevContentLength=0};return Object.defineProperty(l,"name",{value:`rehypeAnimate$${u}`}),{name:"animate",type:"animate",rehypePlugin:l,setPrevContentLength(c){o.prevContentLength=c},getLastRenderCharCount(){let c=o.lastRenderCharCount;return o.lastRenderCharCount=0,c}}}Wh();var ok=m.createContext(!1),d7=()=>m.useContext(ok),jm=(...e)=>B2(Fe(e)),h7=(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(" ")},p7=e=>e?(...t)=>h7(e,B2(Fe(t))):jm,Ia=(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),s=document.createElement("a");s.href=a,s.download=e,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a)},Vh=m.createContext(jm),Ie=()=>m.useContext(Vh),m7=jm("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"),g7=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},b7=m.memo(({children:e,result:t,language:r,className:n,startLine:i,lineNumbers:a=!0,...s})=>{let o=Ie(),u=m.useMemo(()=>o(m7),[o]),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,g7(t.rootStyle)),c},[t.bg,t.fg,t.rootStyle]);return v.jsx("div",{className:o(n,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":r,"data-streamdown":"code-block-body",...s,children:v.jsx("pre",{className:o(n,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:l,children:v.jsx("code",{className:a?o("[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)=>v.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,x]of Object.entries(d.htmlStyle))y==="color"?p["--sdm-c"]=x:y==="background-color"?(p["--sdm-tbg"]=x,b=!0):p[y]=x;return v.jsx("span",{className:o("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),y7=({className:e,language:t,style:r,isIncomplete:n,...i})=>{let a=Ie();return v.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})},uk=m.createContext({code:""}),lk=()=>m.useContext(uk),v7=({language:e})=>{let t=Ie();return v.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:v.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},x7=e=>{let t=e.length;for(;t>0&&e[t-1]===`
131
+ `;)t--;return e.slice(0,t)},E7=m.lazy(()=>sc(()=>import("./highlighted-body-OFNGDK62-tPjSIaIA.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.HighlightedCodeBlockBody}))),T7=({code:e,language:t,className:r,children:n,isIncomplete:i=!1,startLine:a,lineNumbers:s,...o})=>{let u=Ie(),l=m.useMemo(()=>x7(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 v.jsx(uk.Provider,{value:{code:e},children:v.jsxs(y7,{isIncomplete:i,language:t,children:[v.jsx(v7,{language:t}),n?v.jsx("div",{className:u("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:v.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,v.jsx(m.Suspense,{fallback:v.jsx(b7,{className:r,language:t,lineNumbers:s,result:c,startLine:a,...o}),children:v.jsx(E7,{className:r,code:l,language:t,lineNumbers:s,raw:c,startLine:a,...o})})]})})},w7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),A7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),k7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),_7=e=>v.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[v.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),v.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),S7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),C7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),I7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),O7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),N7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),P7=e=>v.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:v.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"})}),Ls={CheckIcon:w7,CopyIcon:A7,DownloadIcon:k7,ExternalLinkIcon:O7,Loader2Icon:_7,Maximize2Icon:S7,RotateCcwIcon:C7,XIcon:I7,ZoomInIcon:N7,ZoomOutIcon:P7},ck=m.createContext(Ls),D7=(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])},Iy=({icons:e,children:t})=>{let r=m.useRef(e),n=m.useRef(e?{...Ls,...e}:Ls);D7(r.current,e)||(r.current=e,n.current=e?{...Ls,...e}:Ls);let i=n.current;return v.jsx(ck.Provider,{value:i,children:t})},Kr=()=>m.useContext(ck),fk={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"},Yh=m.createContext(fk),Dn=()=>m.useContext(Yh),Oy=({onCopy:e,onError:t,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let o=Ie(),[u,l]=m.useState(!1),c=m.useRef(0),{code:f}=lk(),{isAnimating:d}=m.useContext(Tr),h=Dn(),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(E){t?.(E)}};m.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let y=Kr(),x=u?y.CheckIcon:y.CopyIcon;return v.jsx("button",{className:o("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",...s,children:n??v.jsx(x,{size:14})})},Ny={"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"},R7=({onDownload:e,onError:t,language:r,children:n,className:i,code:a,...s})=>{let o=Ie(),{code:u}=lk(),{isAnimating:l}=m.useContext(Tr),c=Dn(),f=Kr(),d=a??u,h=`file.${r&&r in Ny?Ny[r]:"txt"}`,p="text/plain",b=()=>{try{Ia(h,d,p),e?.()}catch(y){t?.(y)}};return v.jsx("button",{className:o("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",...s,children:n??v.jsx(f.DownloadIcon,{size:14})})},Py=()=>{let{Loader2Icon:e}=Kr(),t=Ie();return v.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[v.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),v.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:v.jsx(e,{className:t("size-4 animate-spin")})})]})},L7=/\.[^/.]+$/,M7=({node:e,className:t,src:r,alt:n,onLoad:i,onError:a,...s})=>{let{DownloadIcon:o}=Kr(),u=Ie(),l=m.useRef(null),[c,f]=m.useState(!1),[d,h]=m.useState(!1),p=Dn(),b=s.width!=null||s.height!=null,y=(c||b)&&!d,x=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]),E=m.useCallback(w=>{f(!1),h(!0),a?.(w)},[a]),k=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(L7,"")}.${M}`}Ia(R,w,w.type)}catch{window.open(r,"_blank")}};return r?v.jsxs("div",{className:u("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[v.jsx("img",{alt:n,className:u("max-w-full rounded-lg",x&&"hidden",t),"data-streamdown":"image",onError:E,onLoad:T,ref:l,src:r,...s}),x&&v.jsx("span",{className:u("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:p.imageNotAvailable}),v.jsx("div",{className:u("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),y&&v.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:k,title:p.downloadImage,type:"button",children:v.jsx(o,{size:14})})]}):null},Zs=0,Bm=()=>{Zs+=1,Zs===1&&(document.body.style.overflow="hidden")},Fm=()=>{Zs=Math.max(0,Zs-1),Zs===0&&(document.body.style.overflow="")},j7=({url:e,isOpen:t,onClose:r,onConfirm:n})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:s,XIcon:o}=Kr(),u=Ie(),[l,c]=m.useState(!1),f=Dn(),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){Bm();let p=b=>{b.key==="Escape"&&r()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p),Fm()}}},[t,r]),t?v.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:v.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:[v.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:v.jsx(o,{size:16})}),v.jsxs("div",{className:u("flex flex-col gap-2"),children:[v.jsxs("div",{className:u("flex items-center gap-2 font-semibold text-lg"),children:[v.jsx(s,{size:20}),v.jsx("span",{children:f.openExternalLink})]}),v.jsx("p",{className:u("text-muted-foreground text-sm"),children:f.externalLinkWarning})]}),v.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}),v.jsxs("div",{className:u("flex gap-2"),children:[v.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?v.jsxs(v.Fragment,{children:[v.jsx(i,{size:14}),v.jsx("span",{children:f.copied})]}):v.jsxs(v.Fragment,{children:[v.jsx(a,{size:14}),v.jsx("span",{children:f.copyLink})]})}),v.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:[v.jsx(s,{size:14}),v.jsx("span",{children:f.openLink})]})]})]})}):null},Kh=m.createContext(null),$m=()=>m.useContext(Kh),Qse=()=>{var e;let t=$m();return(e=t?.code)!=null?e:null},Um=()=>{var e;let t=$m();return(e=t?.mermaid)!=null?e:null},B7=e=>{var t;let r=$m();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},F7=(e,t)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*n,c=o.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(o,0,0,l,c),u.toBlob(d=>{if(!d){a(new Error("Failed to create PNG blob"));return}i(d)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},$7=({chart:e,children:t,className:r,onDownload:n,config:i,onError:a})=>{let s=Ie(),[o,u]=m.useState(!1),l=m.useRef(null),{isAnimating:c}=m.useContext(Tr),f=Kr(),d=Um(),h=Dn(),p=async b=>{try{if(b==="mmd"){Ia("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),x=e.split("").reduce((k,w)=>(k<<5)-k+w.charCodeAt(0)|0,0),T=`mermaid-${Math.abs(x)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:E}=await y.render(T,e);if(!E){a?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(b==="svg"){Ia("diagram.svg",E,"image/svg+xml"),u(!1),n?.(b);return}if(b==="png"){let k=await F7(E);Ia("diagram.png",k,"image/png"),n?.(b),u(!1);return}}catch(y){a?.(y)}};return m.useEffect(()=>{let b=y=>{let x=y.composedPath();l.current&&!x.includes(l.current)&&u(!1)};return document.addEventListener("mousedown",b),()=>{document.removeEventListener("mousedown",b)}},[]),v.jsxs("div",{className:s("relative"),ref:l,children:[v.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>u(!o),title:h.downloadDiagram,type:"button",children:t??v.jsx(f.DownloadIcon,{size:14})}),o?v.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[v.jsx("button",{className:s("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}),v.jsx("button",{className:s("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}),v.jsx("button",{className:s("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]})},U7=({chart:e,config:t,onFullscreen:r,onExit:n,className:i,...a})=>{let{Maximize2Icon:s,XIcon:o}=Kr(),u=Ie(),[l,c]=m.useState(!1),{isAnimating:f,controls:d}=m.useContext(Tr),h=Dn(),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){Bm();let y=x=>{x.key==="Escape"&&c(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),Fm()}}},[l]),m.useEffect(()=>{l?r?.():n&&n()},[l,r,n]),v.jsxs(v.Fragment,{children:[v.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:v.jsx(s,{size:14})}),l?Io.createPortal(v.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:[v.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:v.jsx(o,{size:20})}),v.jsx("div",{className:u("flex size-full items-center justify-center p-4"),onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:v.jsx(Wk,{chart:e,className:u("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:p})})]}),document.body):null]})},dk=e=>{var t,r;let n=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)n.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let u=[],l=o.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}},hk=e=>{let{headers:t,rows:r}=e,n=o=>{let u=!1,l=!1;for(let c of o){if(c==='"'){u=!0,l=!0;break}(c===","||c===`
133
+ `)&&(u=!0)}return u?l?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?r.length+1:r.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(n).join(","),s+=1);for(let o of r)a[s]=o.map(n).join(","),s+=1;return a.join(`
134
+ `)},H7=e=>{let{headers:t,rows:r}=e,n=o=>{let u=!1;for(let c of o)if(c===" "||c===`
135
+ `||c==="\r"){u=!0;break}if(!u)return o;let l=[];for(let c of o)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),s=0;t.length>0&&(a[s]=t.map(n).join(" "),s+=1);for(let o of r)a[s]=o.map(n).join(" "),s+=1;return a.join(`
137
+ `)},$f=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("")},Gh=e=>{let{headers:t,rows:r}=e;if(t.length===0)return"";let n=new Array(r.length+2),i=0,a=t.map(o=>$f(o));n[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";n[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of r)if(o.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<o.length?$f(o[l]):"";n[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(l=>$f(l));n[i]=`| ${u.join(" | ")} |`,i+=1}return n.join(`
138
+ `)},pk=({children:e,className:t,onCopy:r,onError:n,timeout:i=2e3})=>{let a=Ie(),[s,o]=m.useState(!1),[u,l]=m.useState(!1),c=m.useRef(null),f=m.useRef(0),{isAnimating:d}=m.useContext(Tr),h=Dn(),p=async x=>{var T,E;if(typeof window>"u"||!((T=navigator?.clipboard)!=null&&T.write)){n?.(new Error("Clipboard API not available"));return}try{let k=(E=c.current)==null?void 0:E.closest('[data-streamdown="table-wrapper"]'),w=k?.querySelector("table");if(!w){n?.(new Error("Table not found"));return}let A=dk(w),S=({csv:hk,tsv:H7,md:Gh}[x]||Gh)(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),o(!1),r?.(x),f.current=window.setTimeout(()=>l(!1),i)}catch(k){n?.(k)}};m.useEffect(()=>{let x=T=>{let E=T.composedPath();c.current&&!E.includes(c.current)&&o(!1)};return document.addEventListener("mousedown",x),()=>{document.removeEventListener("mousedown",x),window.clearTimeout(f.current)}},[]);let b=Kr(),y=u?b.CheckIcon:b.CopyIcon;return v.jsxs("div",{className:a("relative"),ref:c,children:[v.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:()=>o(!s),title:h.copyTable,type:"button",children:e??v.jsx(y,{height:14,width:14})}),s?v.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:[v.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}),v.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}),v.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]})},mk=({children:e,className:t,onDownload:r,onError:n})=>{let i=Ie(),[a,s]=m.useState(!1),o=m.useRef(null),{isAnimating:u}=m.useContext(Tr),l=Dn(),c=Kr(),f=d=>{var h;try{let p=(h=o.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=dk(b),x=d==="csv"?hk(y):Gh(y);Ia(`table.${d==="csv"?"csv":"md"}`,x,d==="csv"?"text/csv":"text/markdown"),s(!1),r?.(d)}catch(p){n?.(p)}};return m.useEffect(()=>{let d=h=>{let p=h.composedPath();o.current&&!p.includes(o.current)&&s(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),v.jsxs("div",{className:i("relative"),ref:o,children:[v.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:()=>s(!a),title:l.downloadTable,type:"button",children:e??v.jsx(c.DownloadIcon,{size:14})}),a?v.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:[v.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}),v.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]})},z7=({children:e,className:t,showCopy:r=!0,showDownload:n=!0})=>{let{Maximize2Icon:i,XIcon:a}=Kr(),s=Ie(),[o,u]=m.useState(!1),{isAnimating:l}=m.useContext(Tr),c=Dn(),f=()=>{u(!0)},d=()=>{u(!1)};return m.useEffect(()=>{if(o){Bm();let h=p=>{p.key==="Escape"&&u(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),Fm()}}},[o]),v.jsxs(v.Fragment,{children:[v.jsx("button",{className:s("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:v.jsx(i,{size:14})}),o?Io.createPortal(v.jsx("div",{"aria-label":c.viewFullscreen,"aria-modal":"true",className:s("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:v.jsxs("div",{className:s("flex h-full flex-col"),onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:[v.jsxs("div",{className:s("flex items-center justify-end gap-1 p-4"),children:[r?v.jsx(pk,{}):null,n?v.jsx(mk,{}):null,v.jsx("button",{className:s("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:d,title:c.exitFullscreen,type:"button",children:v.jsx(a,{size:20})})]}),v.jsx("div",{className:s("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:v.jsx("table",{className:s("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},q7=({children:e,className:t,showControls:r,showCopy:n=!0,showDownload:i=!0,showFullscreen:a=!0,...s})=>{let o=Ie(),u=r&&n,l=r&&i,c=r&&a,f=u||l||c;return v.jsxs("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[f?v.jsxs("div",{className:o("flex items-center justify-end gap-1"),children:[u?v.jsx(pk,{}):null,l?v.jsx(mk,{}):null,c?v.jsx(z7,{showCopy:u,showDownload:l,children:e}):null]}):null,v.jsx("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:v.jsx("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...s,children:e})})]})},W7=/startLine=(\d+)/,V7=/\bnoLineNumbers\b/,Y7=m.lazy(()=>sc(()=>Promise.resolve().then(()=>Yse),void 0).then(e=>({default:e.Mermaid}))),K7=/language-([^\s]+)/;function Tc(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 ht(e,t){return e.className===t.className&&Tc(e.node,t.node)}var Xh=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Uf=(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},Dy=(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},gu=(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},Hm=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...n,children:e})},(e,t)=>ht(e,t));Hm.displayName="MarkdownOl";var gk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...n,children:e})},(e,t)=>e.className===t.className&&Tc(e.node,t.node));gk.displayName="MarkdownLi";var bk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...n,children:e})},(e,t)=>ht(e,t));bk.displayName="MarkdownUl";var yk=m.memo(({className:e,node:t,...r})=>{let n=Ie();return v.jsx("hr",{className:n("my-6 border-border",e),"data-streamdown":"horizontal-rule",...r})},(e,t)=>ht(e,t));yk.displayName="MarkdownHr";var vk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...n,children:e})},(e,t)=>ht(e,t));vk.displayName="MarkdownStrong";var G7=({children:e,className:t,href:r,node:n,...i})=>{let a=Ie(),{linkSafety:s}=m.useContext(Tr),[o,u]=m.useState(!1),l=r==="streamdown:incomplete-link",c=m.useCallback(async p=>{if(!(!(s!=null&&s.enabled&&r)||l)){if(p.preventDefault(),s.onLinkCheck&&await s.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}u(!0)}},[s,r,l]),f=m.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),d=m.useCallback(()=>{u(!1)},[]),h={url:r??"",isOpen:o,onClose:d,onConfirm:f};return s!=null&&s.enabled&&r?v.jsxs(v.Fragment,{children:[v.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}),s.renderModal?s.renderModal(h):v.jsx(j7,{...h})]}):v.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})},xk=m.memo(G7,(e,t)=>ht(e,t)&&e.href===t.href);xk.displayName="MarkdownA";var Ek=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...n,children:e})},(e,t)=>ht(e,t));Ek.displayName="MarkdownH1";var Tk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...n,children:e})},(e,t)=>ht(e,t));Tk.displayName="MarkdownH2";var wk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...n,children:e})},(e,t)=>ht(e,t));wk.displayName="MarkdownH3";var Ak=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...n,children:e})},(e,t)=>ht(e,t));Ak.displayName="MarkdownH4";var kk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...n,children:e})},(e,t)=>ht(e,t));kk.displayName="MarkdownH5";var _k=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...n,children:e})},(e,t)=>ht(e,t));_k.displayName="MarkdownH6";var Sk=m.memo(({children:e,className:t,node:r,...n})=>{let{controls:i}=m.useContext(Tr),a=Xh(i,"table"),s=Uf(i,"copy"),o=Uf(i,"download"),u=Uf(i,"fullscreen");return v.jsx(q7,{className:t,showControls:a,showCopy:s,showDownload:o,showFullscreen:u,...n,children:e})},(e,t)=>ht(e,t));Sk.displayName="MarkdownTable";var Ck=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...n,children:e})},(e,t)=>ht(e,t));Ck.displayName="MarkdownThead";var Ik=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...n,children:e})},(e,t)=>ht(e,t));Ik.displayName="MarkdownTbody";var Ok=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...n,children:e})},(e,t)=>ht(e,t));Ok.displayName="MarkdownTr";var Nk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.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)=>ht(e,t));Nk.displayName="MarkdownTh";var Pk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...n,children:e})},(e,t)=>ht(e,t));Pk.displayName="MarkdownTd";var Dk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.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)=>ht(e,t));Dk.displayName="MarkdownBlockquote";var Rk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...n,children:e})},(e,t)=>ht(e,t));Rk.displayName="MarkdownSup";var Lk=m.memo(({children:e,className:t,node:r,...n})=>{let i=Ie();return v.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...n,children:e})},(e,t)=>ht(e,t));Lk.displayName="MarkdownSub";var Mk=m.memo(({children:e,className:t,node:r,...n})=>{if("data-footnotes"in n){let i=s=>{var o,u;if(!m.isValidElement(s))return!1;let l=Array.isArray(s.props.children)?s.props.children:[s.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(((o=d.props)==null?void 0:o["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(s=>{if(!m.isValidElement(s))return s;if(s.type===Hm){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?v.jsx("section",{className:t,...n,children:a}):null}return v.jsx("section",{className:t,...n,children:e})},(e,t)=>ht(e,t));Mk.displayName="MarkdownSection";var X7=({node:e,className:t,children:r,...n})=>{var i,a;let s=Ie(),o=!("data-block"in n),{mermaid:u,controls:l,lineNumbers:c}=m.useContext(Tr),f=Um(),d=d7(),h=t?.match(K7),p=(i=h?.at(1))!=null?i:"",b=B7(p);if(o)return v.jsx("code",{className:s("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,x=y?.match(W7),T=x?Number.parseInt(x[1],10):void 0,E=T!==void 0&&T>=1?T:void 0,k=!(y&&V7.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 v.jsx(m.Suspense,{fallback:v.jsx(Py,{}),children:v.jsx(R,{code:w,isIncomplete:d,language:p,meta:y})})}if(p==="mermaid"&&f){let R=Xh(l,"mermaid"),C=gu(l,"download"),M=gu(l,"copy"),L=gu(l,"fullscreen"),X=gu(l,"panZoom"),U=R&&(C||M||L);return v.jsx(m.Suspense,{fallback:v.jsx(Py,{}),children:v.jsxs("div",{className:s("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:[v.jsx("div",{className:s("flex h-8 items-center text-muted-foreground text-xs"),children:v.jsx("span",{className:s("ml-1 font-mono lowercase"),children:"mermaid"})}),U?v.jsx("div",{className:s("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:v.jsxs("div",{className:s("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?v.jsx($7,{chart:w,config:u?.config}):null,M?v.jsx(Oy,{code:w}):null,L?v.jsx(U7,{chart:w,config:u?.config}):null]})}):null,v.jsx("div",{className:s("rounded-md border border-border bg-background"),children:v.jsx(Y7,{chart:w,config:u?.config,showControls:X})})]})})}let A=Xh(l,"code"),S=Dy(l,"download"),O=Dy(l,"copy");return v.jsx(T7,{className:t,code:w,isIncomplete:d,language:p,lineNumbers:k,startLine:E,children:A?v.jsxs(v.Fragment,{children:[S?v.jsx(R7,{code:w,language:p}):null,O?v.jsx(Oy,{}):null]}):null})},jk=m.memo(X7,(e,t)=>e.className===t.className&&Tc(e.node,t.node));jk.displayName="MarkdownCode";var Bk=m.memo(M7,(e,t)=>e.className===t.className&&Tc(e.node,t.node));Bk.displayName="MarkdownImg";var Fk=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 v.jsx(v.Fragment,{children:e});if(a==="code"&&"data-block"in n[0].props)return v.jsx(v.Fragment,{children:e})}return v.jsx("p",{...r,children:e})},(e,t)=>ht(e,t));Fk.displayName="MarkdownParagraph";var Z7={ol:Hm,li:gk,ul:bk,hr:yk,strong:vk,a:xk,h1:Ek,h2:Tk,h3:wk,h4:Ak,h5:kk,h6:_k,table:Sk,thead:Ck,tbody:Ik,tr:Ok,th:Nk,td:Pk,blockquote:Dk,code:jk,img:Bk,pre:({children:e})=>m.isValidElement(e)?m.cloneElement(e,{"data-block":"true"}):e,sup:Rk,sub:Lk,p:Fk,section:Mk},Q7=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,J7=new RegExp("\\p{L}","u");function Ry(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(Q7.test(r))return"rtl";if(J7.test(r))return"ltr"}return"ltr"}var e$=/^[ \t]{0,3}(`{3,}|~{3,})/,t$=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ly=e=>{let t=e.split(`
139
+ `),r=null,n=0;for(let i of t){let a=e$.exec(i);if(r===null){if(a){let s=a[1];r=s[0],n=s.length}}else if(a){let s=a[1],o=s[0],u=s.length;o===r&&u>=n&&(r=null,n=0)}}return r!==null},r$=e=>{let t=e.split(`
140
+ `);for(let r of t){let n=r.trim();if(n.length>0&&n.includes("|")&&t$.test(n))return!0}return!1},n$=()=>e=>{ln(e,"html",(t,r,n)=>{!n||typeof r!="number"||(n.children[r]={type:"text",value:t.value})})},My=[],jy={allowDangerousHtml:!0},bu=new WeakMap,i$=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=bu.get(p);y||(y=p.name,bu.set(p,y)),f+=y}else f+=String(p);f+=":",f+=JSON.stringify(b)}else if(typeof h=="function"){let p=bu.get(h);p||(p=h.name,bu.set(h,p)),f+=p}else f+=String(h)}return f},s=a(r),o=a(n),u=i?JSON.stringify(i):"",l=`${o}::${s}::${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()}},By=new i$,$k=e=>{let t=a$(e),r=e.children||"",n=t.runSync(t.parse(r),r);return d$(n,e)},a$=e=>{let t=By.get(e);if(t)return t;let r=o$(e);return By.set(e,r),r},s$=e=>e.some(t=>Array.isArray(t)?t[0]===Dh:t===Dh),o$=e=>{let t=e.rehypePlugins||My,r=e.remarkPlugins||My,n=s$(t)?r:[...r,n$],i=e.remarkRehypeOptions?{...jy,...e.remarkRehypeOptions}:jy;return dF().use(fB).use(n).use(YB,i).use(t)},u$=e=>e,l$=(e,t,r,n)=>{r?e.children.splice(t,1):e.children[t]={type:"text",value:n}},c$=(e,t)=>{var r;for(let n in Nf)if(Object.hasOwn(Nf,n)&&Object.hasOwn(e.properties,n)){let i=e.properties[n],a=Nf[n];(a===null||a.includes(e.tagName))&&(e.properties[n]=(r=t(String(i||""),n,e))!=null?r:void 0)}},f$=(e,t,r,n,i,a)=>{let s=!1;return n?s=!n.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,r)),s},d$=(e,t)=>{let{allowElement:r,allowedElements:n,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:o}=t;if(r||n||i||a||o){let u=o||u$;ln(e,(l,c,f)=>{if(l.type==="raw"&&f&&typeof c=="number")return l$(f,c,a,l.value),c;if(l.type==="element"&&(c$(l,u),f$(l,c,f,n,i,r)&&f&&typeof c=="number"))return s&&l.children?f.children.splice(c,1,...l.children):f.children.splice(c,1),c})}return v9(e,{Fragment:v.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0})},h$=/\[\^[\w-]{1,200}\](?!:)/,p$=/\[\^[\w-]{1,200}\]:/,m$=/<(\w+)[\s>]/,g$=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Fy=new Map,$y=new Map,b$=e=>{let t=e.toLowerCase(),r=Fy.get(t);if(r)return r;let n=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Fy.set(t,n),n},y$=e=>{let t=e.toLowerCase(),r=$y.get(t);if(r)return r;let n=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return $y.set(t,n),n},Uy=(e,t)=>{if(g$.has(t.toLowerCase()))return 0;let r=e.match(b$(t));if(!r)return 0;let n=0;for(let i of r)i.trimEnd().endsWith("/>")||(n+=1);return n},Hy=(e,t)=>{let r=e.match(y$(t));return r?r.length:0},v$=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},x$=e=>{let t=h$.test(e),r=p$.test(e);if(t||r)return[e];let n=Pr.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let o of n){let u=o.raw,l=i.length;if(a.length>0){i[l-1]+=u;let c=a.at(-1),f=Uy(u,c),d=Hy(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(o.type==="html"&&o.block){let c=u.match(m$);if(c){let f=c[1],d=Uy(u,f),h=Hy(u,f);d>h&&a.push(f)}}if(l>0&&!s){let c=i[l-1];if(v$(c)%2===1){i[l-1]=c+u;continue}}i.push(u),o.type!=="space"&&(s=o.type==="code")}return i},E$=(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,s,o,u)=>{if(!o.includes(`
141
+
142
+ `))return s+o+u;let l=o.replace(/\n\n/g,`
143
+ <!---->
144
+ `),c=(l.startsWith(`
145
+ `)?"":`
146
+ `)+l+(l.endsWith(`
147
+ `)?"":`
148
+ `);return`${s}${c}${u}
149
+
150
+ `})}return r},T$=/([\\`*_~[\]|])/g,w$=e=>e.replace(T$,"\\$1"),A$=(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,s,o,u)=>{let l=w$(o).replace(/\n\n/g,"&#10;&#10;");return s+l+u})}return r},Uk=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Uk).join(""):"",k$=e=>t=>{if(!e||e.length===0)return;let r=new Set(e.map(n=>n.toLowerCase()));ln(t,"element",n=>{if(r.has(n.tagName.toLowerCase())){let i=Uk(n);n.children=i?[{type:"text",value:i}]:[]}})},_$=()=>e=>{ln(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})})},S$=/^[ \t]*<[\w!/?-]/,C$=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,I$=e=>typeof e!="string"||e.length===0||!S$.test(e)?e:e.replace(C$,"$1"),zy,qy,Wy,Vy,Bu={..._i,protocols:{..._i.protocols,href:[...(qy=(zy=_i.protocols)==null?void 0:zy.href)!=null?qy:[],"tel"]},attributes:{..._i.attributes,code:[...(Vy=(Wy=_i.attributes)==null?void 0:Wy.code)!=null?Vy:[],"metastring"]}},Zh={raw:Dh,sanitize:[MA,Bu],harden:[U3,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},O$={gfm:[aj,{}],codeMeta:_$},Yy=Object.values(Zh),N$=Object.values(O$),P$={block:" ▋",circle:" ●"},Hk=["github-light","github-dark"],zk={enabled:!0},D$={shikiTheme:Hk,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:zk},Tr=m.createContext(D$),qk=m.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:r,index:n,isIncomplete:i,dir:a,animatePlugin:s,...o})=>{if(s){let c=s.getLastRenderCharCount();s.setPrevContentLength(c)}let u=typeof e=="string"&&r?I$(e):e,l=v.jsx($k,{...o,children:u});return v.jsx(ok.Provider,{value:i,children:a?v.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,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});qk.displayName="Block";var fi=m.memo(({children:e,mode:t="streaming",dir:r,parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:s=Yy,remarkPlugins:o=N$,className:u,shikiTheme:l=Hk,mermaid:c,controls:f=!0,isAnimating:d=!1,animated:h,BlockComponent:p=qk,parseMarkdownIntoBlocksFn:b=x$,caret:y,plugins:x,remend:T,linkSafety:E=zk,lineNumbers:k=!0,allowedTags:w,literalTagContent:A,translations:S,icons:O,prefix:R,onAnimationStart:C,onAnimationEnd:M,...L})=>{let X=m.useId(),[U,$]=m.useTransition(),q=m.useMemo(()=>p7(R),[R]),Y=m.useRef(null),V=m.useRef(C),re=m.useRef(M);V.current=C,re.current=M,m.useEffect(()=>{var xe,Be,pt;if(t==="static")return;let xt=Y.current;if(Y.current=d,xt===null){d&&((xe=V.current)==null||xe.call(V));return}d&&!xt?(Be=V.current)==null||Be.call(V):!d&&xt&&((pt=re.current)==null||pt.call(re))},[d,t]);let N=m.useMemo(()=>w?Object.keys(w):[],[w]),ye=m.useMemo(()=>{if(typeof e!="string")return"";let xe=t==="streaming"&&n?g8(e,T):e;return A&&A.length>0&&(xe=A$(xe,A)),N.length>0&&(xe=E$(xe,N)),xe},[e,t,n,T,N,A]),pe=m.useMemo(()=>b(ye),[ye,b]),[P,ge]=m.useState(pe);m.useEffect(()=>{t==="streaming"&&!J?$(()=>{ge(pe)}):ge(pe)},[pe,t]);let Oe=t==="streaming"?P:pe,he=m.useMemo(()=>r==="auto"?Oe.map(Ry):void 0,[Oe,r]),Te=m.useMemo(()=>Oe.map((xe,Be)=>`${X}-${Be}`),[Oe.length,X]),ve=m.useMemo(()=>h===!0?"true":h?JSON.stringify(h):"",[h]),J=m.useMemo(()=>ve?ve==="true"?Wh():Wh(h):null,[ve]),Z=m.useMemo(()=>{var xe,Be;return{shikiTheme:(Be=(xe=x?.code)==null?void 0:xe.getThemes())!=null?Be:l,controls:f,isAnimating:d,lineNumbers:k,mode:t,mermaid:c,linkSafety:E}},[l,f,d,k,t,c,E,x?.code]),fe=m.useMemo(()=>S?JSON.stringify(S):"",[S]),W=m.useMemo(()=>({...fk,...S}),[fe]),Qe=m.useMemo(()=>{let{inlineCode:xe,...Be}=a??{},pt={...Z7,...Be};if(xe){let xt=pt.code;pt.code=kr=>"data-block"in kr?xt?m.createElement(xt,kr):null:m.createElement(xe,kr)}return pt},[a]),we=m.useMemo(()=>{let xe=[];return x!=null&&x.cjk&&(xe=[...xe,...x.cjk.remarkPluginsBefore]),xe=[...xe,...o],x!=null&&x.cjk&&(xe=[...xe,...x.cjk.remarkPluginsAfter]),x!=null&&x.math&&(xe=[...xe,x.math.remarkPlugin]),xe},[o,x?.math,x?.cjk]),Ge=m.useMemo(()=>{var xe;let Be=s;if(w&&Object.keys(w).length>0&&s===Yy){let pt={...Bu,tagNames:[...(xe=Bu.tagNames)!=null?xe:[],...Object.keys(w)],attributes:{...Bu.attributes,...w}};Be=[Zh.raw,[MA,pt],Zh.harden]}return A&&A.length>0&&(Be=[...Be,[k$,A]]),x!=null&&x.math&&(Be=[...Be,x.math.rehypePlugin]),J&&d&&(Be=[...Be,J.rehypePlugin]),Be},[s,x?.math,J,d,w,A]),ze=m.useMemo(()=>{if(!d||Oe.length===0)return!1;let xe=Oe.at(-1);return Ly(xe)||r$(xe)},[d,Oe]),St=m.useMemo(()=>y&&d&&!ze?{"--streamdown-caret":`"${P$[y]}"`}:void 0,[y,d,ze]);return t==="static"?v.jsx(Yh.Provider,{value:W,children:v.jsx(Kh.Provider,{value:x??null,children:v.jsx(Tr.Provider,{value:Z,children:v.jsx(Iy,{icons:O,children:v.jsx(Vh.Provider,{value:q,children:v.jsx("div",{className:q("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",u),dir:r==="auto"?Ry(ye):r,children:v.jsx($k,{components:Qe,rehypePlugins:Ge,remarkPlugins:we,...L,children:ye})})})})})})}):v.jsx(Yh.Provider,{value:W,children:v.jsx(Kh.Provider,{value:x??null,children:v.jsx(Tr.Provider,{value:Z,children:v.jsx(Iy,{icons:O,children:v.jsx(Vh.Provider,{value:q,children:v.jsxs("div",{className:q("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",y&&!ze?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,u),style:St,children:[Oe.length===0&&y&&d&&v.jsx("span",{}),Oe.map((xe,Be)=>{var pt;let xt=Be===Oe.length-1,kr=d&&xt&&Ly(xe);return v.jsx(p,{animatePlugin:J,components:Qe,content:xe,dir:(pt=he?.[Be])!=null?pt:r!=="auto"?r:void 0,index:Be,isIncomplete:kr,rehypePlugins:Ge,remarkPlugins:we,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:n,...L},Te[Be])})]})})})})})})},(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);fi.displayName="Streamdown";var R$=({children:e,className:t,minZoom:r=.5,maxZoom:n=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let{RotateCcwIcon:u,ZoomInIcon:l,ZoomOutIcon:c}=Kr(),f=Ie(),d=m.useRef(null),h=m.useRef(null),[p,b]=m.useState(s),[y,x]=m.useState({x:0,y:0}),[T,E]=m.useState(!1),[k,w]=m.useState({x:0,y:0}),[A,S]=m.useState({x:0,y:0}),O=m.useCallback(q=>{b(Y=>Math.max(r,Math.min(n,Y+q)))},[r,n]),R=m.useCallback(()=>{O(i)},[O,i]),C=m.useCallback(()=>{O(-i)},[O,i]),M=m.useCallback(()=>{b(s),x({x:0,y:0})},[s]),L=m.useCallback(q=>{q.preventDefault();let Y=q.deltaY>0?-i:i;O(Y)},[O,i]),X=m.useCallback(q=>{if(q.button!==0||q.isPrimary===!1)return;E(!0),w({x:q.clientX,y:q.clientY}),S(y);let Y=q.currentTarget;Y instanceof HTMLElement&&Y.setPointerCapture(q.pointerId)},[y]),U=m.useCallback(q=>{if(!T)return;q.preventDefault();let Y=q.clientX-k.x,V=q.clientY-k.y;x({x:A.x+Y,y:A.y+V})},[T,k,A]),$=m.useCallback(q=>{E(!1);let Y=q.currentTarget;Y instanceof HTMLElement&&Y.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",U,{passive:!1}),q.addEventListener("pointerup",$),q.addEventListener("pointercancel",$),()=>{document.body.style.userSelect="",q.removeEventListener("pointermove",U),q.removeEventListener("pointerup",$),q.removeEventListener("pointercancel",$)}},[T,U,$]),v.jsxs("div",{className:f("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:d,style:{cursor:T?"grabbing":"grab"},children:[a?v.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",o?"bottom-4 left-4":"bottom-2 left-2"),children:[v.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:v.jsx(l,{size:16})}),v.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:v.jsx(c,{size:16})}),v.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:v.jsx(u,{size:16})})]}):null,v.jsx("div",{className:f("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:X,ref:h,role:"application",style:{transform:`translate(${y.x}px, ${y.y}px) scale(${p})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Wk=({chart:e,className:t,config:r,fullscreen:n=!1,showControls:i=!0})=>{let a=Ie(),[s,o]=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(Tr),x=Um(),T=y?.errorComponent,{shouldRender:E,containerRef:k}=r7({immediate:n});if(m.useEffect(()=>{if(E){if(!x){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),l(!0);let A=x.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";o(S)}}finally{l(!1)}})()}},[e,r,p,E,x]),!(E||c||d))return v.jsx("div",{className:a("my-4 min-h-[200px]",t),ref:k});if(u&&!c&&!d)return v.jsx("div",{className:a("my-4 flex justify-center p-4",t),ref:k,children:v.jsxs("div",{className:a("flex items-center space-x-2 text-muted-foreground"),children:[v.jsx("div",{className:a("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),v.jsx("span",{className:a("text-sm"),children:"Loading diagram..."})]})});if(s&&!c&&!d){let A=()=>b(S=>S+1);return T?v.jsx("div",{ref:k,children:v.jsx(T,{chart:e,error:s,retry:A})}):v.jsxs("div",{className:a("rounded-md bg-red-50 p-4",t),ref:k,children:[v.jsxs("p",{className:a("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",s]}),v.jsxs("details",{className:a("mt-2"),children:[v.jsx("summary",{className:a("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),v.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 v.jsx("div",{className:a("size-full",t),"data-streamdown":"mermaid",ref:k,children:v.jsx(R$,{className:a(n?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:n,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:v.jsx("div",{"aria-label":"Mermaid chart",className:a("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:w},role:"img"})})})};const L$=e=>typeof e=="boolean"||e instanceof Boolean,M$=e=>typeof e=="number"||e instanceof Number,j$=e=>typeof e=="bigint"||e instanceof BigInt,Vk=e=>!!e&&e instanceof Date,B$=e=>typeof e=="string"||e instanceof String,F$=e=>Array.isArray(e),Yk=e=>typeof e=="object"&&e!==null,Kk=e=>!!e&&e instanceof Object&&typeof e=="function";function ul(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function $$(e,t,r){return r?JSON.stringify(e):t?`"${e}"`:e}function Gk(e){let{field:t,value:r,data:n,lastElement:i,openBracket:a,closeBracket:s,level:o,style:u,shouldExpandNode:l,clickToExpandNode:c,outerRef:f,beforeExpandChange:d}=e;const h=m.useRef(!1),[p,b]=m.useState(()=>l(o,r,t)),y=m.useRef(null);m.useEffect(()=>{h.current?b(l(o,r,t)):h.current=!0},[l]);const x=m.useId();if(n.length===0)return U$({field:t,openBracket:a,closeBracket:s,lastElement:i,style:u});const T=p?u.collapseIcon:u.expandIcon,E=p?u.ariaLables.collapseJson:u.ariaLables.expandJson,k=o+1,w=n.length-1,A=R=>{p!==R&&(!d||d({level:o,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 U=0;U<M.length;U++)if(M[U].tabIndex===0){L=U;break}if(L<0)return;const X=(L+C+M.length)%M.length;M[L].tabIndex=-1,M[X].tabIndex=0,M[X].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":E,"aria-expanded":p,"aria-controls":p?x:void 0,ref:y,tabIndex:o===0?0:-1}),(t||t==="")&&(c?m.createElement("span",{className:u.clickableLabel,onClick:O,onKeyDown:S},ul(t,u.quotesForFieldNames),":"):m.createElement("span",{className:u.label},ul(t,u.quotesForFieldNames),":")),m.createElement("span",{className:u.punctuation},a),p?m.createElement("ul",{id:x,role:"group",className:u.childFieldsContainer},n.map((R,C)=>m.createElement(Qh,{key:R[0]||C,field:R[0],value:R[1],style:u,lastElement:C===w,level:k,shouldExpandNode:l,clickToExpandNode:c,beforeExpandChange:d,outerRef:f}))):m.createElement("span",{className:u.collapsedContent,onClick:O,onKeyDown:S}),m.createElement("span",{className:u.punctuation},s),!i&&m.createElement("span",{className:u.punctuation},","))}function U$(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},ul(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 H$(e){let{field:t,value:r,style:n,lastElement:i,shouldExpandNode:a,clickToExpandNode:s,level:o,outerRef:u,beforeExpandChange:l}=e;return Gk({field:t,value:r,lastElement:i||!1,level:o,openBracket:"{",closeBracket:"}",style:n,shouldExpandNode:a,clickToExpandNode:s,data:Object.keys(r).map(c=>[c,r[c]]),outerRef:u,beforeExpandChange:l})}function z$(e){let{field:t,value:r,style:n,lastElement:i,level:a,shouldExpandNode:s,clickToExpandNode:o,outerRef:u,beforeExpandChange:l}=e;return Gk({field:t,value:r,lastElement:i||!1,level:a,openBracket:"[",closeBracket:"]",style:n,shouldExpandNode:s,clickToExpandNode:o,data:r.map(c=>[void 0,c]),outerRef:u,beforeExpandChange:l})}function q$(e){let{field:t,value:r,style:n,lastElement:i}=e,a,s=n.otherValue;return r===null?(a="null",s=n.nullValue):r===void 0?(a="undefined",s=n.undefinedValue):B$(r)?(a=$$(r,!n.noQuotesForStringValues,n.stringifyStringValues),s=n.stringValue):L$(r)?(a=r?"true":"false",s=n.booleanValue):M$(r)?(a=r.toString(),s=n.numberValue):j$(r)?(a=`${r.toString()}n`,s=n.numberValue):Vk(r)?a=r.toISOString():Kk(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},ul(t,n.quotesForFieldNames),":"),m.createElement("span",{className:s},a),!i&&m.createElement("span",{className:n.punctuation},","))}function Qh(e){const t=e.value;return F$(t)?m.createElement(z$,Object.assign({},e)):Yk(t)&&!Vk(t)&&!Kk(t)?m.createElement(H$,Object.assign({},e)):m.createElement(q$,Object.assign({},e))}var Gt={"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 W$={collapseJson:"collapse JSON",expandJson:"expand JSON"},Fu={container:Gt["container-light"],basicChildStyle:Gt["basic-element-style"],childFieldsContainer:Gt["child-fields-container"],label:Gt["label-light"],clickableLabel:Gt["clickable-label-light"],nullValue:Gt["value-null-light"],undefinedValue:Gt["value-undefined-light"],stringValue:Gt["value-string-light"],booleanValue:Gt["value-boolean-light"],numberValue:Gt["value-number-light"],otherValue:Gt["value-other-light"],punctuation:Gt["punctuation-light"],collapseIcon:Gt["collapse-icon-light"],expandIcon:Gt["expand-icon-light"],collapsedContent:Gt["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:W$,stringifyStringValues:!1},V$=()=>!0,Y$=e=>e<1,K$=e=>{let{data:t,style:r=Fu,shouldExpandNode:n=V$,clickToExpandNode:i=!1,beforeExpandChange:a,compactTopLevel:s,...o}=e;const u=m.useRef(null);return m.createElement("div",Object.assign({"aria-label":"JSON view"},o,{className:r.container,ref:u,role:"tree"}),s&&Yk(t)?Object.entries(t).map(l=>{let[c,f]=l;return m.createElement(Qh,{key:c,field:c,value:f,style:{...Fu,...r},lastElement:!0,level:1,shouldExpandNode:n,clickToExpandNode:i,beforeExpandChange:a,outerRef:u})}):m.createElement(Qh,{value:t,style:{...Fu,...r},lastElement:!0,level:0,shouldExpandNode:n,clickToExpandNode:i,outerRef:u,beforeExpandChange:a}))},G$=()=>!1;function zm({data:e,collapsed:t}){return v.jsx("div",{className:"text-xs font-mono",children:v.jsx(K$,{data:e,shouldExpandNode:t?G$:Y$,style:Fu})})}var X$=["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 qm(e){if(typeof e!="string")return!1;var t=X$;return t.includes(e)}var Z$=["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"],Q$=new Set(Z$);function Xk(e){return typeof e!="string"?!1:Q$.has(e)}function Zk(e){return typeof e=="string"&&e.startsWith("data-")}function qr(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Xk(r)||Zk(r))&&(t[r]=e[r]);return t}function $o(e){if(e==null)return null;if(m.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return qr(t)}return typeof e=="object"&&!Array.isArray(e)?qr(e):null}function Ft(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(Xk(r)||Zk(r)||qm(r))&&(t[r]=e[r]);return t}function J$(e){return e==null?null:m.isValidElement(e)?Ft(e.props):typeof e=="object"&&!Array.isArray(e)?Ft(e):null}var eU=["children","width","height","viewBox","className","style","title","desc"];function Jh(){return Jh=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},Jh.apply(null,arguments)}function tU(e,t){if(e==null)return{};var r,n,i=rU(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 rU(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 Qk=m.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:s,style:o,title:u,desc:l}=e,c=tU(e,eU),f=a||{width:n,height:i,x:0,y:0},d=Fe("recharts-surface",s);return m.createElement("svg",Jh({},Ft(c),{className:d,width:n,height:i,style:o,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)}),nU=["children","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 iU(e,t){if(e==null)return{};var r,n,i=aU(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 aU(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 ir=m.forwardRef((e,t)=>{var{children:r,className:n}=e,i=iU(e,nU),a=Fe("recharts-layer",n);return m.createElement("g",ep({className:a},Ft(i),{ref:t}),r)}),sU=m.createContext(null);function Ze(e){return function(){return e}}const Jk=Math.cos,ll=Math.sin,Gr=Math.sqrt,cl=Math.PI,wc=2*cl,tp=Math.PI,rp=2*tp,wi=1e-6,oU=rp-wi;function e_(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function uU(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return e_;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 lU{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?e_:uU(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,s){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}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 s=this._x1,o=this._y1,u=n-t,l=i-r,c=s-t,f=o-r,d=c*c+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>wi)if(!(Math.abs(f*u-l*c)>wi)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-s,p=i-o,b=u*u+l*l,y=h*h+p*p,x=Math.sqrt(b),T=Math.sqrt(d),E=a*Math.tan((tp-Math.acos((b+d-y)/(2*x*T)))/2),k=E/T,w=E/x;Math.abs(k-1)>wi&&this._append`L${t+k*c},${r+k*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,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),u=n*Math.sin(i),l=t+o,c=r+u,f=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>wi||Math.abs(this._y1-c)>wi)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%rp+rp),d>oU?this._append`A${n},${n},0,1,${f},${t-o},${r-u}A${n},${n},0,1,${f},${this._x1=l},${this._y1=c}`:d>wi&&this._append`A${n},${n},0,${+(d>=tp)},${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 Wm(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 lU(t)}function Vm(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function t_(e){this._context=e}t_.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 Ac(e){return new t_(e)}function r_(e){return e[0]}function n_(e){return e[1]}function i_(e,t){var r=Ze(!0),n=null,i=Ac,a=null,s=Wm(o);e=typeof e=="function"?e:e===void 0?r_:Ze(e),t=typeof t=="function"?t:t===void 0?n_:Ze(t);function o(u){var l,c=(u=Vm(u)).length,f,d=!1,h;for(n==null&&(a=i(h=s())),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 o.x=function(u){return arguments.length?(e=typeof u=="function"?u:Ze(+u),o):e},o.y=function(u){return arguments.length?(t=typeof u=="function"?u:Ze(+u),o):t},o.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Ze(!!u),o):r},o.curve=function(u){return arguments.length?(i=u,n!=null&&(a=i(n)),o):i},o.context=function(u){return arguments.length?(u==null?n=a=null:a=i(n=u),o):n},o}function yu(e,t,r){var n=null,i=Ze(!0),a=null,s=Ac,o=null,u=Wm(l);e=typeof e=="function"?e:e===void 0?r_:Ze(+e),t=typeof t=="function"?t:Ze(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?n_:Ze(+r);function l(f){var d,h,p,b=(f=Vm(f)).length,y,x=!1,T,E=new Array(b),k=new Array(b);for(a==null&&(o=s(T=u())),d=0;d<=b;++d){if(!(d<b&&i(y=f[d],d,f))===x)if(x=!x)h=d,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=d-1;p>=h;--p)o.point(E[p],k[p]);o.lineEnd(),o.areaEnd()}x&&(E[d]=+e(y,d,f),k[d]=+t(y,d,f),o.point(n?+n(y,d,f):E[d],r?+r(y,d,f):k[d]))}if(T)return o=null,T+""||null}function c(){return i_().defined(i).curve(s).context(a)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ze(+f),n=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ze(+f),l):e},l.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ze(+f),l):n},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ze(+f),r=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ze(+f),l):t},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ze(+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:Ze(!!f),l):i},l.curve=function(f){return arguments.length?(s=f,a!=null&&(o=s(a)),l):s},l.context=function(f){return arguments.length?(f==null?a=o=null:o=s(a=f),l):a},l}class a_{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 cU(e){return new a_(e,!0)}function fU(e){return new a_(e,!1)}const Ym={draw(e,t){const r=Gr(t/cl);e.moveTo(r,0),e.arc(0,0,r,0,wc)}},dU={draw(e,t){const r=Gr(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()}},s_=Gr(1/3),hU=s_*2,pU={draw(e,t){const r=Gr(t/hU),n=r*s_;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},mU={draw(e,t){const r=Gr(t),n=-r/2;e.rect(n,n,r,r)}},gU=.8908130915292852,o_=ll(cl/10)/ll(7*cl/10),bU=ll(wc/10)*o_,yU=-Jk(wc/10)*o_,vU={draw(e,t){const r=Gr(t*gU),n=bU*r,i=yU*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const s=wc*a/5,o=Jk(s),u=ll(s);e.lineTo(u*r,-o*r),e.lineTo(o*n-u*i,u*n+o*i)}e.closePath()}},Hf=Gr(3),xU={draw(e,t){const r=-Gr(t/(Hf*3));e.moveTo(0,r*2),e.lineTo(-Hf*r,-r),e.lineTo(Hf*r,-r),e.closePath()}},_r=-.5,Sr=Gr(3)/2,np=1/Gr(12),EU=(np/2+1)*3,TU={draw(e,t){const r=Gr(t/EU),n=r/2,i=r*np,a=n,s=r*np+r,o=-a,u=s;e.moveTo(n,i),e.lineTo(a,s),e.lineTo(o,u),e.lineTo(_r*n-Sr*i,Sr*n+_r*i),e.lineTo(_r*a-Sr*s,Sr*a+_r*s),e.lineTo(_r*o-Sr*u,Sr*o+_r*u),e.lineTo(_r*n+Sr*i,_r*i-Sr*n),e.lineTo(_r*a+Sr*s,_r*s-Sr*a),e.lineTo(_r*o+Sr*u,_r*u-Sr*o),e.closePath()}};function wU(e,t){let r=null,n=Wm(i);e=typeof e=="function"?e:Ze(e||Ym),t=typeof t=="function"?t:Ze(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:Ze(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ze(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function fl(){}function dl(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 u_(e){this._context=e}u_.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:dl(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:dl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function AU(e){return new u_(e)}function l_(e){this._context=e}l_.prototype={areaStart:fl,areaEnd:fl,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:dl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kU(e){return new l_(e)}function c_(e){this._context=e}c_.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:dl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _U(e){return new c_(e)}function f_(e){this._context=e}f_.prototype={areaStart:fl,areaEnd:fl,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 SU(e){return new f_(e)}function Ky(e){return e<0?-1:1}function Gy(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),s=(r-e._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(Ky(a)+Ky(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Xy(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function zf(e,t,r){var n=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-n)/3;e._context.bezierCurveTo(n+o,i+o*t,a-o,s-o*r,a,s)}function hl(e){this._context=e}hl.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:zf(this,this._t0,Xy(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,zf(this,Xy(this,r=Gy(this,e,t)),r);break;default:zf(this,this._t0,r=Gy(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function d_(e){this._context=new h_(e)}(d_.prototype=Object.create(hl.prototype)).point=function(e,t){hl.prototype.point.call(this,t,e)};function h_(e){this._context=e}h_.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 CU(e){return new hl(e)}function IU(e){return new d_(e)}function p_(e){this._context=e}p_.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=Zy(e),i=Zy(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[s],t[s]);(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 Zy(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,s[t]-=n*s[t-1];for(i[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(s[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 OU(e){return new p_(e)}function kc(e,t){this._context=e,this._t=t}kc.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 NU(e){return new kc(e,.5)}function PU(e){return new kc(e,0)}function DU(e){return new kc(e,1)}function $i(e,t){if((s=e.length)>1)for(var r=1,n,i,a=e[t[0]],s,o=a.length;r<s;++r)for(i=a,a=e[t[r]],n=0;n<o;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function ip(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function RU(e,t){return e[t]}function LU(e){const t=[];return t.key=e,t}function MU(){var e=Ze([]),t=ip,r=$i,n=RU;function i(a){var s=Array.from(e.apply(this,arguments),LU),o,u=s.length,l=-1,c;for(const f of a)for(o=0,++l;o<u;++o)(s[o][l]=[0,+n(f,s[o].key,l,a)]).data=f;for(o=0,c=Vm(t(s));o<u;++o)s[c[o]].index=o;return r(s,c),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ze(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ze(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ip:typeof a=="function"?a:Ze(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??$i,i):r},i}function jU(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=e[r][i][1]||0;if(s)for(r=0;r<n;++r)e[r][i][1]/=s}$i(e,t)}}function BU(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var s=0,o=0;s<i;++s)o+=e[s][r][1]||0;n[r][1]+=n[r][0]=-o/2}$i(e,t)}}function FU(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var o=0,u=0,l=0;o<s;++o){for(var c=e[t[o]],f=c[n][1]||0,d=c[n-1][1]||0,h=(f-d)/2,p=0;p<o;++p){var b=e[t[p]],y=b[n][1]||0,x=b[n-1][1]||0;h+=y-x}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,$i(e,t)}}var qf={},Wf={},Qy;function $U(){return Qy||(Qy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Wf)),Wf}var Vf={},Jy;function m_(){return Jy||(Jy=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})(Vf)),Vf}var Yf={},ev;function Km(){return ev||(ev=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})(Yf)),Yf}var Kf={},Gf={},tv;function UU(){return tv||(tv=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})(Gf)),Gf}var rv;function Gm(){return rv||(rv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=UU(),r=Km();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const a=[],s=i.length;if(s===0)return a;let o=0,u="",l="",c=!1;for(i.charCodeAt(0)===46&&(a.push(""),o++);o<s;){const f=i[o];l?f==="\\"&&o+1<s?(o++,u+=i[o]):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,o++}return u&&a.push(u),a}e.toPath=n})(Kf)),Kf}var nv;function Xm(){return nv||(nv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$U(),r=m_(),n=Km(),i=Gm();function a(o,u,l){if(o==null)return l;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return l;const c=o[u];return c===void 0?r.isDeepKey(u)?a(o,i.toPath(u),l):l:c}case"number":case"symbol":{typeof u=="number"&&(u=n.toKey(u));const c=o[u];return c===void 0?l:c}default:{if(Array.isArray(u))return s(o,u,l);if(Object.is(u?.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return l;const c=o[u];return c===void 0?l:c}}}function s(o,u,l){if(u.length===0)return l;let c=o;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})(qf)),qf}var Xf,iv;function HU(){return iv||(iv=1,Xf=Xm().get),Xf}var zU=HU();const Fa=Nn(zU);var qU=4;function Jn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qU,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function ct(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,s)=>{var o=r[s-1];return typeof o=="string"?i+o+a:o!==void 0?i+Jn(o)+a:i+a},"")}var lr=e=>e===0?0:e>0?1:-1,cn=e=>typeof e=="number"&&e!=+e,ap=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,le=e=>(typeof e=="number"||e instanceof Number)&&!cn(e),qt=e=>le(e)||typeof e=="string",WU=0,co=e=>{var t=++WU;return"".concat(e||"").concat(t)},Wr=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(!le(t)&&typeof t!="string")return n;var a;if(ap(t)){if(r==null)return n;var s=t.indexOf("%");a=r*parseFloat(t.slice(0,s))/100}else a=+t;return cn(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},g_=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 ft(e,t,r){return le(e)&&le(t)?Jn(e+r*(t-e)):t}function b_(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Fa(n,t))===r)}var ot=e=>e===null||typeof e>"u",Uo=e=>ot(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function cr(e){return e!=null}function rs(){}var VU=["type","size","sizeType"];function sp(){return sp=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},sp.apply(null,arguments)}function av(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 sv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?av(Object(r),!0).forEach(function(n){YU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):av(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YU(e,t,r){return(t=KU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KU(e){var t=GU(e,"string");return typeof t=="symbol"?t:t+""}function GU(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 XU(e,t){if(e==null)return{};var r,n,i=ZU(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 ZU(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 y_={symbolCircle:Ym,symbolCross:dU,symbolDiamond:pU,symbolSquare:mU,symbolStar:vU,symbolTriangle:xU,symbolWye:TU},QU=Math.PI/180,JU=e=>{var t="symbol".concat(Uo(e));return y_[t]||Ym},eH=(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*QU;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}},tH=(e,t)=>{y_["symbol".concat(Uo(e))]=t},v_=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=XU(e,VU),a=sv(sv({},i),{},{type:t,size:r,sizeType:n}),s="circle";typeof t=="string"&&(s=t);var o=()=>{var d=JU(s),h=wU().type(d).size(eH(r,n,s)),p=h();if(p!==null)return p},{className:u,cx:l,cy:c}=a,f=Ft(a);return le(l)&&le(c)&&le(r)?m.createElement("path",sp({},f,{className:Fe("recharts-symbols",u),transform:"translate(".concat(l,", ").concat(c,")"),d:o()})):null};v_.registerSymbol=tH;var x_=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Zm=(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=>{qm(i)&&typeof r[i]=="function"&&(n[i]=(a=>r[i](r,a)))}),n},rH=(e,t,r)=>n=>(e(t,r,n),null),Qm=(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];qm(i)&&typeof a=="function"&&(n||(n={}),n[i]=rH(a,t,r))}),n};function ov(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 nH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ov(Object(r),!0).forEach(function(n){iH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ov(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iH(e,t,r){return(t=aH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aH(e){var t=sH(e,"string");return typeof t=="symbol"?t:t+""}function sH(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 $t(e,t){var r=nH({},e),n=t,i=Object.keys(t),a=i.reduce((s,o)=>(s[o]===void 0&&n[o]!==void 0&&(s[o]=n[o]),s),r);return a}var Zf={},Qf={},uv;function oH(){return uv||(uv=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 s=r[a],o=n(s,a,r);i.has(o)||i.set(o,s)}return Array.from(i.values())}e.uniqBy=t})(Qf)),Qf}var Jf={},lv;function uH(){return lv||(lv=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})(Jf)),Jf}var ed={},cv;function E_(){return cv||(cv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(ed)),ed}var td={},rd={},nd={},fv;function lH(){return fv||(fv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(nd)),nd}var dv;function T_(){return dv||(dv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lH();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(rd)),rd}var id={},hv;function cH(){return hv||(hv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(id)),id}var pv;function fH(){return pv||(pv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=T_(),r=cH();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(td)),td}var ad={},sd={},mv;function dH(){return mv||(mv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xm();function r(n){return function(i){return t.get(i,n)}}e.property=r})(sd)),sd}var od={},ud={},ld={},cd={},gv;function w_(){return gv||(gv=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})(cd)),cd}var fd={},bv;function A_(){return bv||(bv=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})(fd)),fd}var dd={},yv;function k_(){return yv||(yv=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})(dd)),dd}var vv;function hH(){return vv||(vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=w_(),r=A_(),n=k_();function i(c,f,d){return typeof d!="function"?i(c,f,()=>{}):a(c,f,function h(p,b,y,x,T,E){const k=d(p,b,y,x,T,E);return k!==void 0?!!k:a(p,b,h,E)},new Map)}function a(c,f,d,h){if(f===c)return!0;switch(typeof f){case"object":return s(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 s(c,f,d,h){if(f==null)return!0;if(Array.isArray(f))return u(c,f,d,h);if(f instanceof Map)return o(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 o(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 x=!1;for(let T=0;T<c.length;T++){if(p.has(T))continue;const E=c[T];let k=!1;if(d(E,y,b,c,f,h)&&(k=!0),k){p.add(T),x=!0;break}}if(!x)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})(ld)),ld}var xv;function __(){return xv||(xv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hH();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(ud)),ud}var hd={},pd={},md={},Ev;function pH(){return Ev||(Ev=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})(md)),md}var gd={},Tv;function Jm(){return Tv||(Tv=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})(gd)),gd}var bd={},wv;function S_(){return wv||(wv=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]",s="[object Symbol]",o="[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]",x="[object Uint8ClampedArray]",T="[object Uint16Array]",E="[object Uint32Array]",k="[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=k,e.booleanTag=i,e.dataViewTag=b,e.dateTag=o,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=s,e.uint16ArrayTag=T,e.uint32ArrayTag=E,e.uint8ArrayTag=y,e.uint8ClampedArrayTag=x})(bd)),bd}var yd={},Av;function mH(){return Av||(Av=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(yd)),yd}var kv;function C_(){return kv||(kv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pH(),r=Jm(),n=S_(),i=A_(),a=mH();function s(c,f){return o(c,void 0,c,new Map,f)}function o(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 x=0;x<c.length;x++)y[x]=o(c[x],x,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[x,T]of c)y.set(x,o(T,x,d,h,p));return y}if(c instanceof Set){const y=new Set;h.set(c,y);for(const x of c)y.add(o(x,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 x=0;x<c.length;x++)y[x]=o(c[x],x,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 x=b[y],T=Object.getOwnPropertyDescriptor(c,x);(T==null||T.writable)&&(c[x]=o(f[x],x,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=s,e.cloneDeepWithImpl=o,e.copyProperties=u})(pd)),pd}var _v;function gH(){return _v||(_v=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C_();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(hd)),hd}var Sv;function bH(){return Sv||(Sv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=__(),r=gH();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(od)),od}var vd={},xd={},Ed={},Cv;function yH(){return Cv||(Cv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C_(),r=Jm(),n=S_();function i(a,s){return t.cloneDeepWith(a,(o,u,l,c)=>{const f=s?.(o,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})(Ed)),Ed}var Iv;function vH(){return Iv||(Iv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yH();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(xd)),xd}var Td={},wd={},Ov;function I_(){return Ov||(Ov=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})(wd)),wd}var Ad={},Nv;function xH(){return Nv||(Nv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Jm();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Ad)),Ad}var Pv;function EH(){return Pv||(Pv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m_(),r=I_(),n=xH(),i=Gm();function a(s,o){let u;if(Array.isArray(o)?u=o:typeof o=="string"&&t.isDeepKey(o)&&s?.[o]==null?u=i.toPath(o):u=[o],u.length===0)return!1;let l=s;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})(Td)),Td}var Dv;function TH(){return Dv||(Dv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=__(),r=Km(),n=vH(),i=Xm(),a=EH();function s(o,u){switch(typeof o){case"object":{Object.is(o?.valueOf(),-0)&&(o="-0");break}case"number":{o=r.toKey(o);break}}return u=n.cloneDeep(u),function(l){const c=i.get(l,o);return c===void 0?a.has(l,o):u===void 0?c===void 0:t.isMatch(c,u)}}e.matchesProperty=s})(vd)),vd}var Rv;function wH(){return Rv||(Rv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=E_(),r=dH(),n=bH(),i=TH();function a(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?i.matchesProperty(s[0],s[1]):n.matches(s);case"string":case"symbol":case"number":return r.property(s)}}e.iteratee=a})(ad)),ad}var Lv;function AH(){return Lv||(Lv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oH(),r=uH(),n=E_(),i=fH(),a=wH();function s(o,u=n.identity){return i.isArrayLikeObject(o)?t.uniqBy(Array.from(o),r.ary(a.iteratee(u),1)):[]}e.uniqBy=s})(Zf)),Zf}var kd,Mv;function kH(){return Mv||(Mv=1,kd=AH().uniqBy),kd}var _H=kH();const jv=Nn(_H);function SH(e,t,r){return t===!0?jv(e,r):typeof t=="function"?jv(e,t):e}var _d={exports:{}},Sd={},Cd={exports:{}},Id={};var Bv;function CH(){if(Bv)return Id;Bv=1;var e=em();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,s=e.useDebugValue;function o(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]),s(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:o;return Id.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:c,Id}var Fv;function IH(){return Fv||(Fv=1,Cd.exports=CH()),Cd.exports}var $v;function OH(){if($v)return Sd;$v=1;var e=em(),t=IH();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,s=e.useEffect,o=e.useMemo,u=e.useDebugValue;return Sd.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=o(function(){function x(A){if(!T){if(T=!0,E=A,A=d(A),h!==void 0&&b.hasValue){var S=b.value;if(h(S,A))return k=S}return k=A}if(S=k,n(E,A))return S;var O=d(A);return h!==void 0&&h(S,O)?(E=A,S):(E=A,k=O)}var T=!1,E,k,w=f===void 0?null:f;return[function(){return x(c())},w===null?void 0:function(){return x(w())}]},[c,f,d,h]);var y=i(l,p[0],p[1]);return s(function(){b.hasValue=!0,b.value=y},[y]),u(y),y},Sd}var Uv;function NH(){return Uv||(Uv=1,_d.exports=OH()),_d.exports}var PH=NH(),e0=m.createContext(null),DH=e=>e,nt=()=>{var e=m.useContext(e0);return e?e.store.dispatch:DH},$u=()=>{},RH=()=>$u,LH=(e,t)=>e===t;function ue(e){var t=m.useContext(e0),r=m.useMemo(()=>t?n=>{if(n!=null)return e(n)}:$u,[t,e]);return PH.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:RH,t?t.store.getState:$u,t?t.store.getState:$u,r,LH)}function MH(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function jH(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function BH(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 Hv=e=>Array.isArray(e)?e:[e];function FH(e){const t=Array.isArray(e[0])?e[0]:e;return BH(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $H(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var UH=class{constructor(e){this.value=e}deref(){return this.value}},HH=typeof WeakRef<"u"?WeakRef:UH,zH=0,zv=1;function vu(){return{s:zH,v:void 0,o:null,p:null}}function O_(e,t={}){let r=vu();const{resultEqualityCheck:n}=t;let i,a=0;function s(){let o=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=o.o;p===null&&(o.o=p=new WeakMap);const b=p.get(h);b===void 0?(o=vu(),p.set(h,o)):o=b}else{let p=o.p;p===null&&(o.p=p=new Map);const b=p.get(h);b===void 0?(o=vu(),p.set(h,o)):o=b}}const l=o;let c;if(o.s===zv)c=o.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 HH(c):c}return l.s=zv,l.v=c,c}return s.clearCache=()=>{r=vu(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}function qH(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,s=0,o,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),MH(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...r,...u},{memoize:f,memoizeOptions:d=[],argsMemoize:h=O_,argsMemoizeOptions:p=[]}=c,b=Hv(d),y=Hv(p),x=FH(i),T=f(function(){return a++,l.apply(null,arguments)},...b),E=h(function(){s++;const w=$H(x,arguments);return o=T.apply(null,w),o},...y);return Object.assign(E,{resultFunc:l,memoizedResultFunc:T,dependencies:x,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>o,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var B=qH(O_),WH=Object.assign((e,t=B)=>{jH(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((s,o,u)=>(s[r[u]]=o,s),{}))},{withTypes:()=>WH}),Od={},Nd={},Pd={},qv;function VH(){return qv||(qv=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 s=t(n),o=t(i);if(s===o&&s===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?o-s:s-o}return 0};e.compareValues=r})(Pd)),Pd}var Dd={},Rd={},Wv;function N_(){return Wv||(Wv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(Rd)),Rd}var Vv;function YH(){return Vv||(Vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=N_(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){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))||s!=null&&Object.hasOwn(s,a)}e.isKey=i})(Dd)),Dd}var Yv;function KH(){return Yv||(Yv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VH(),r=YH(),n=Gm();function i(a,s,o,u){if(a==null)return[];o=u?void 0:o,Array.isArray(a)||(a=Object.values(a)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(o)||(o=o==null?[]:[o]),o=o.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=s.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],o[b]);if(y!==0)return y}return 0}).map(h=>h.original)}e.orderBy=i})(Nd)),Nd}var Ld={},Kv;function GH(){return Kv||(Kv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),s=(o,u)=>{for(let l=0;l<o.length;l++){const c=o[l];Array.isArray(c)&&u<a?s(c,u+1):i.push(c)}};return s(r,0),i}e.flatten=t})(Ld)),Ld}var Md={},Gv;function P_(){return Gv||(Gv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=I_(),r=T_(),n=w_(),i=k_();function a(s,o,u){return n.isObject(u)&&(typeof o=="number"&&r.isArrayLike(u)&&t.isIndex(o)&&o<u.length||typeof o=="string"&&o in u)?i.isEqualsSameValueZero(u[o],s):!1}e.isIterateeCall=a})(Md)),Md}var Xv;function XH(){return Xv||(Xv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KH(),r=GH(),n=P_();function i(a,...s){const o=s.length;return o>1&&n.isIterateeCall(a,s[0],s[1])?s=[]:o>2&&n.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(a,r.flatten(s),["asc"])}e.sortBy=i})(Od)),Od}var jd,Zv;function ZH(){return Zv||(Zv=1,jd=XH().sortBy),jd}var QH=ZH();const _c=Nn(QH);var D_=e=>e.legend.settings,JH=e=>e.legend.size,ez=e=>e.legend.payload;B([ez,D_],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?_c(n,r):n});var xu=1;function tz(){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(),s={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(s.height-t.height)>xu||Math.abs(s.left-t.left)>xu||Math.abs(s.top-t.top)>xu||Math.abs(s.width-t.width)>xu)&&r({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function Mt(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 rz=typeof Symbol=="function"&&Symbol.observable||"@@observable",Qv=rz,Bd=()=>Math.random().toString(36).substring(7).split("").join("."),nz={INIT:`@@redux/INIT${Bd()}`,REPLACE:`@@redux/REPLACE${Bd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Bd()}`},pl=nz;function t0(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 R_(e,t,r){if(typeof e!="function")throw new Error(Mt(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Mt(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Mt(1));return r(R_)(e,t)}let n=e,i=t,a=new Map,s=a,o=0,u=!1;function l(){s===a&&(s=new Map,a.forEach((y,x)=>{s.set(x,y)}))}function c(){if(u)throw new Error(Mt(3));return i}function f(y){if(typeof y!="function")throw new Error(Mt(4));if(u)throw new Error(Mt(5));let x=!0;l();const T=o++;return s.set(T,y),function(){if(x){if(u)throw new Error(Mt(6));x=!1,l(),s.delete(T),a=null}}}function d(y){if(!t0(y))throw new Error(Mt(7));if(typeof y.type>"u")throw new Error(Mt(8));if(typeof y.type!="string")throw new Error(Mt(17));if(u)throw new Error(Mt(9));try{u=!0,i=n(i,y)}finally{u=!1}return(a=s).forEach(T=>{T()}),y}function h(y){if(typeof y!="function")throw new Error(Mt(10));n=y,d({type:pl.REPLACE})}function p(){const y=f;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(Mt(11));function T(){const k=x;k.next&&k.next(c())}return T(),{unsubscribe:y(T)}},[Qv](){return this}}}return d({type:pl.INIT}),{dispatch:d,subscribe:f,getState:c,replaceReducer:h,[Qv]:p}}function iz(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:pl.INIT})>"u")throw new Error(Mt(12));if(typeof r(void 0,{type:pl.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Mt(13))})}function L_(e){const t=Object.keys(e),r={};for(let a=0;a<t.length;a++){const s=t[a];typeof e[s]=="function"&&(r[s]=e[s])}const n=Object.keys(r);let i;try{iz(r)}catch(a){i=a}return function(s={},o){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=s[f],p=d(h,o);if(typeof p>"u")throw o&&o.type,new Error(Mt(14));l[f]=p,u=u||p!==h}return u=u||n.length!==Object.keys(s).length,u?l:s}}function ml(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function az(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(Mt(15))};const s={getState:i.getState,dispatch:(u,...l)=>a(u,...l)},o=e.map(u=>u(s));return a=ml(...o)(i.dispatch),{...i,dispatch:a}}}function M_(e){return t0(e)&&"type"in e&&typeof e.type=="string"}var j_=Symbol.for("immer-nothing"),Jv=Symbol.for("immer-draftable"),ar=Symbol.for("immer-state");function $r(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var yr=Object,$a=yr.getPrototypeOf,gl="constructor",Sc="prototype",op="configurable",bl="enumerable",Uu="writable",fo="value",Sn=e=>!!e&&!!e[ar];function Vr(e){return e?B_(e)||Ic(e)||!!e[Jv]||!!e[gl]?.[Jv]||Oc(e)||Nc(e):!1}var sz=yr[Sc][gl].toString(),e1=new WeakMap;function B_(e){if(!e||!r0(e))return!1;const t=$a(e);if(t===null||t===yr[Sc])return!0;const r=yr.hasOwnProperty.call(t,gl)&&t[gl];if(r===Object)return!0;if(!xa(r))return!1;let n=e1.get(r);return n===void 0&&(n=Function.toString.call(r),e1.set(r,n)),n===sz}function Cc(e,t,r=!0){Ho(e)===0?(r?Reflect.ownKeys(e):yr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function Ho(e){const t=e[ar];return t?t.type_:Ic(e)?1:Oc(e)?2:Nc(e)?3:0}var t1=(e,t,r=Ho(e))=>r===2?e.has(t):yr[Sc].hasOwnProperty.call(e,t),up=(e,t,r=Ho(e))=>r===2?e.get(t):e[t],yl=(e,t,r,n=Ho(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function oz(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Ic=Array.isArray,Oc=e=>e instanceof Map,Nc=e=>e instanceof Set,r0=e=>typeof e=="object",xa=e=>typeof e=="function",Fd=e=>typeof e=="boolean";function uz(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var xn=e=>e.copy_||e.base_,n0=e=>e.modified_?e.copy_:e.base_;function lp(e,t){if(Oc(e))return new Map(e);if(Nc(e))return new Set(e);if(Ic(e))return Array[Sc].slice.call(e);const r=B_(e);if(t===!0||t==="class_only"&&!r){const n=yr.getOwnPropertyDescriptors(e);delete n[ar];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const s=i[a],o=n[s];o[Uu]===!1&&(o[Uu]=!0,o[op]=!0),(o.get||o.set)&&(n[s]={[op]:!0,[Uu]:!0,[bl]:o[bl],[fo]:e[s]})}return yr.create($a(e),n)}else{const n=$a(e);if(n!==null&&r)return{...e};const i=yr.create(n);return yr.assign(i,e)}}function i0(e,t=!1){return Pc(e)||Sn(e)||!Vr(e)||(Ho(e)>1&&yr.defineProperties(e,{set:Eu,add:Eu,clear:Eu,delete:Eu}),yr.freeze(e),t&&Cc(e,(r,n)=>{i0(n,!0)},!1)),e}function lz(){$r(2)}var Eu={[fo]:lz};function Pc(e){return e===null||!r0(e)?!0:yr.isFrozen(e)}var vl="MapSet",cp="Patches",r1="ArrayMethods",F_={};function Ui(e){const t=F_[e];return t||$r(0,e),t}var n1=e=>!!F_[e],ho,$_=()=>ho,cz=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:n1(vl)?Ui(vl):void 0,arrayMethodsPlugin_:n1(r1)?Ui(r1):void 0});function i1(e,t){t&&(e.patchPlugin_=Ui(cp),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fp(e){dp(e),e.drafts_.forEach(fz),e.drafts_=null}function dp(e){e===ho&&(ho=e.parent_)}var a1=e=>ho=cz(ho,e);function fz(e){const t=e[ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function s1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[ar].modified_&&(fp(t),$r(4)),Vr(e)&&(e=o1(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[ar].base_,e,t)}else e=o1(t,r);return dz(t,e,!0),fp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==j_?e:void 0}function o1(e,t){if(Pc(t))return t;const r=t[ar];if(!r)return xl(t,e.handledSet_,e);if(!Dc(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);z_(r,e)}return r.copy_}function dz(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&i0(t,r)}function U_(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Dc=(e,t)=>e.scope_===t,hz=[];function H_(e,t,r,n){const i=xn(e),a=e.type_;if(n!==void 0&&up(i,n,a)===t){yl(i,n,r,a);return}if(!e.draftLocations_){const o=e.draftLocations_=new Map;Cc(i,(u,l)=>{if(Sn(l)){const c=o.get(l)||[];c.push(u),o.set(l,c)}})}const s=e.draftLocations_.get(t)??hz;for(const o of s)yl(i,o,r,a)}function pz(e,t,r){e.callbacks_.push(function(i){const a=t;if(!a||!Dc(a,i))return;i.mapSetPlugin_?.fixSetContents(a);const s=n0(a);H_(e,a.draft_??a,s,r),z_(a,i)})}function z_(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)}U_(e)}}function mz(e,t,r){const{scope_:n}=e;if(Sn(r)){const i=r[ar];Dc(i,n)&&i.callbacks_.push(function(){Hu(e);const s=n0(i);H_(e,r,s,t)})}else Vr(r)&&e.callbacks_.push(function(){const a=xn(e);e.type_===3?a.has(r)&&xl(r,n.handledSet_,n):up(a,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&xl(up(e.copy_,t,e.type_),n.handledSet_,n)})}function xl(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Sn(e)||t.has(e)||!Vr(e)||Pc(e)||(t.add(e),Cc(e,(n,i)=>{if(Sn(i)){const a=i[ar];if(Dc(a,r)){const s=n0(a);yl(e,n,s,e.type_),U_(a)}}else Vr(i)&&xl(i,t,r)})),e}function gz(e,t){const r=Ic(e),n={type_:r?1:0,scope_:t?t.scope_:$_(),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=El;r&&(i=[n],a=po);const{revoke:s,proxy:o}=Proxy.revocable(i,a);return n.draft_=o,n.revoke_=s,[o,n]}var El={get(e,t){if(t===ar)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=xn(e);if(!t1(i,t,e.type_))return bz(e,i,t);const a=i[t];if(e.finalized_||!Vr(a)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&uz(t))return a;if(a===$d(e.base_,t)){Hu(e);const s=e.type_===1?+t:t,o=pp(e.scope_,a,e,s);return e.copy_[s]=o}return a},has(e,t){return t in xn(e)},ownKeys(e){return Reflect.ownKeys(xn(e))},set(e,t,r){const n=q_(xn(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=$d(xn(e),t),a=i?.[ar];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(oz(r,i)&&(r!==void 0||t1(e.base_,t,e.type_)))return!0;Hu(e),hp(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),mz(e,t,r)),!0},deleteProperty(e,t){return Hu(e),$d(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),hp(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=xn(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Uu]:!0,[op]:e.type_!==1||t!=="length",[bl]:n[bl],[fo]:r[t]}},defineProperty(){$r(11)},getPrototypeOf(e){return $a(e.base_)},setPrototypeOf(){$r(12)}},po={};for(let e in El){let t=El[e];po[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}po.deleteProperty=function(e,t){return po.set.call(this,e,t,void 0)};po.set=function(e,t,r){return El.set.call(this,e[0],t,r,e[0])};function $d(e,t){const r=e[ar];return(r?xn(r):e)[t]}function bz(e,t,r){const n=q_(t,r);return n?fo in n?n[fo]:n.get?.call(e.draft_):void 0}function q_(e,t){if(!(t in e))return;let r=$a(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=$a(r)}}function hp(e){e.modified_||(e.modified_=!0,e.parent_&&hp(e.parent_))}function Hu(e){e.copy_||(e.assigned_=new Map,e.copy_=lp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yz=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(xa(r)&&!xa(n)){const s=n;n=r;const o=this;return function(l=s,...c){return o.produce(l,f=>n.call(this,f,...c))}}xa(n)||$r(6),i!==void 0&&!xa(i)&&$r(7);let a;if(Vr(r)){const s=a1(this),o=pp(s,r,void 0);let u=!0;try{a=n(o),u=!1}finally{u?fp(s):dp(s)}return i1(s,i),s1(a,s)}else if(!r||!r0(r)){if(a=n(r),a===void 0&&(a=r),a===j_&&(a=void 0),this.autoFreeze_&&i0(a,!0),i){const s=[],o=[];Ui(cp).generateReplacementPatches_(r,a,{patches_:s,inversePatches_:o}),i(s,o)}return a}else $r(1,r)},this.produceWithPatches=(r,n)=>{if(xa(r))return(o,...u)=>this.produceWithPatches(o,l=>r(l,...u));let i,a;return[this.produce(r,n,(o,u)=>{i=o,a=u}),i,a]},Fd(t?.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),Fd(t?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),Fd(t?.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Vr(t)||$r(8),Sn(t)&&(t=Dr(t));const r=a1(this),n=pp(r,t,void 0);return n[ar].isManual_=!0,dp(r),n}finishDraft(t,r){const n=t&&t[ar];(!n||!n.isManual_)&&$r(9);const{scope_:i}=n;return i1(i,r),s1(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=Ui(cp).applyPatches_;return Sn(t)?i(t,r):this.produce(t,a=>i(a,r))}};function pp(e,t,r,n){const[i,a]=Oc(t)?Ui(vl).proxyMap_(t,r):Nc(t)?Ui(vl).proxySet_(t,r):gz(t,r);return(r?.scope_??$_()).drafts_.push(i),a.callbacks_=r?.callbacks_??[],a.key_=n,r&&n!==void 0?pz(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 Dr(e){return Sn(e)||$r(10,e),W_(e)}function W_(e){if(!Vr(e)||Pc(e))return e;const t=e[ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=lp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=lp(e,!0);return Cc(r,(i,a)=>{yl(r,i,W_(a))},n),t&&(t.finalized_=!1),r}var vz=new yz,V_=vz.produce;function Y_(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var xz=Y_(),Ez=Y_,Tz=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ml:ml.apply(null,arguments)};function wr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(xr(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=>M_(n)&&n.type===e,r}var K_=class Ms extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ms.prototype)}static get[Symbol.species](){return Ms}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ms(...t[0].concat(this)):new Ms(...t.concat(this))}};function u1(e){return Vr(e)?V_(e,()=>{}):e}function Tu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function wz(e){return typeof e=="boolean"}var Az=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let s=new K_;return r&&(wz(r)?s.push(xz):s.push(Ez(r.extraArgument))),s},G_="RTK_autoBatch",tt=()=>e=>({payload:e,meta:{[G_]:!0}}),l1=e=>t=>{setTimeout(t,e)},X_=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,s=!1;const o=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:l1(10):e.type==="callback"?e.queueNotification:l1(e.timeout),l=()=>{s=!1,a&&(a=!1,o.forEach(c=>c()))};return Object.assign({},n,{subscribe(c){const f=()=>i&&c(),d=n.subscribe(f);return o.add(c),()=>{d(),o.delete(c)}},dispatch(c){try{return i=!c?.meta?.[G_],a=!i,a&&(s||(s=!0,u(l))),n.dispatch(c)}finally{i=!0}}})},kz=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new K_(e);return n&&i.push(X_(typeof n=="object"?n:void 0)),i};function _z(e){const t=Az(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let o;if(typeof r=="function")o=r;else if(t0(r))o=L_(r);else throw new Error(xr(1));let u;typeof n=="function"?u=n(t):u=t();let l=ml;i&&(l=Tz({trace:!1,...typeof i=="object"&&i}));const c=az(...u),f=kz(c);let d=typeof s=="function"?s(f):f();const h=l(...d);return R_(o,a,h)}function Z_(e){const t={},r=[];let n;const i={addCase(a,s){const o=typeof a=="string"?a:a.type;if(!o)throw new Error(xr(28));if(o in t)throw new Error(xr(29));return t[o]=s,i},addAsyncThunk(a,s){return s.pending&&(t[a.pending.type]=s.pending),s.rejected&&(t[a.rejected.type]=s.rejected),s.fulfilled&&(t[a.fulfilled.type]=s.fulfilled),s.settled&&r.push({matcher:a.settled,reducer:s.settled}),i},addMatcher(a,s){return r.push({matcher:a,reducer:s}),i},addDefaultCase(a){return n=a,i}};return e(i),[t,r,n]}function Sz(e){return typeof e=="function"}function Cz(e,t){let[r,n,i]=Z_(t),a;if(Sz(e))a=()=>u1(e());else{const o=u1(e);a=()=>o}function s(o=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(Sn(c)){const h=f(c,u);return h===void 0?c:h}else{if(Vr(c))return V_(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},o)}return s.getInitialState=a,s}var Iz="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Oz=(e=21)=>{let t="",r=e;for(;r--;)t+=Iz[Math.random()*64|0];return t},Nz=Symbol.for("rtk-slice-createasyncthunk");function Pz(e,t){return`${e}/${t}`}function Dz({creators:e}={}){const t=e?.asyncThunk?.[Nz];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(xr(11));const s=(typeof n.reducers=="function"?n.reducers(Lz()):n.reducers)||{},o=Object.keys(s),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(E,k){const w=typeof E=="string"?E:E.type;if(!w)throw new Error(xr(12));if(w in u.sliceCaseReducersByType)throw new Error(xr(13));return u.sliceCaseReducersByType[w]=k,l},addMatcher(E,k){return u.sliceMatchers.push({matcher:E,reducer:k}),l},exposeAction(E,k){return u.actionCreators[E]=k,l},exposeCaseReducer(E,k){return u.sliceCaseReducersByName[E]=k,l}};o.forEach(E=>{const k=s[E],w={reducerName:E,type:Pz(i,E),createNotation:typeof n.reducers=="function"};jz(k)?Fz(w,k,l,t):Mz(w,k,l)});function c(){const[E={},k=[],w=void 0]=typeof n.extraReducers=="function"?Z_(n.extraReducers):[n.extraReducers],A={...E,...u.sliceCaseReducersByType};return Cz(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 k)S.addMatcher(O.matcher,O.reducer);w&&S.addDefaultCase(w)})}const f=E=>E,d=new Map,h=new WeakMap;let p;function b(E,k){return p||(p=c()),p(E,k)}function y(){return p||(p=c()),p.getInitialState()}function x(E,k=!1){function w(S){let O=S[E];return typeof O>"u"&&k&&(O=Tu(h,w,y)),O}function A(S=f){const O=Tu(d,k,()=>new WeakMap);return Tu(O,S,()=>{const R={};for(const[C,M]of Object.entries(n.selectors??{}))R[C]=Rz(M,S,()=>Tu(h,S,y),k);return R})}return{reducerPath:E,getSelectors:A,get selectors(){return A(w)},selectSlice:w}}const T={name:i,reducer:b,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:y,...x(a),injectInto(E,{reducerPath:k,...w}={}){const A=k??a;return E.inject({reducerPath:A,reducer:b},w),{...T,...x(A,!0)}}};return T}}function Rz(e,t,r,n){function i(a,...s){let o=t(a);return typeof o>"u"&&n&&(o=r()),e(o,...s)}return i.unwrapped=e,i}var Yt=Dz();function Lz(){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 Mz({type:e,reducerName:t,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&!Bz(n))throw new Error(xr(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?wr(e,s):wr(e))}function jz(e){return e._reducerDefinitionType==="asyncThunk"}function Bz(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Fz({type:e,reducerName:t},r,n,i){if(!i)throw new Error(xr(18));const{payloadCreator:a,fulfilled:s,pending:o,rejected:u,settled:l,options:c}=r,f=i(e,a,c);n.exposeAction(t,f),s&&n.addCase(f.fulfilled,s),o&&n.addCase(f.pending,o),u&&n.addCase(f.rejected,u),l&&n.addMatcher(f.settled,l),n.exposeCaseReducer(t,{fulfilled:s||wu,pending:o||wu,rejected:u||wu,settled:l||wu})}function wu(){}var $z="task",Q_="listener",J_="completed",a0="cancelled",Uz=`task-${a0}`,Hz=`task-${J_}`,mp=`${Q_}-${a0}`,zz=`${Q_}-${J_}`,Rc=class{constructor(e){this.code=e,this.message=`${$z} ${a0} (reason: ${e})`}name="TaskAbortError";message},s0=(e,t)=>{if(typeof e!="function")throw new TypeError(xr(32))},Tl=()=>{},eS=(e,t=Tl)=>(e.catch(t),e),tS=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Di=e=>{if(e.aborted)throw new Rc(e.reason)};function rS(e,t){let r=Tl;return new Promise((n,i)=>{const a=()=>i(new Rc(e.reason));if(e.aborted){a();return}r=tS(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Tl})}var qz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Rc?"cancelled":"rejected",error:r}}finally{t?.()}},wl=e=>t=>eS(rS(e,t).then(r=>(Di(e),r))),nS=e=>{const t=wl(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Oa}=Object,c1={},Lc="listenerMiddleware",Wz=(e,t)=>{const r=n=>tS(e,()=>n.abort(e.reason));return(n,i)=>{s0(n);const a=new AbortController;r(a);const s=qz(async()=>{Di(e),Di(a.signal);const o=await n({pause:wl(a.signal),delay:nS(a.signal),signal:a.signal});return Di(a.signal),o},()=>a.abort(Hz));return i?.autoJoin&&t.push(s.catch(Tl)),{result:wl(e)(s),cancel(){a.abort(Uz)}}}},Vz=(e,t)=>{const r=async(n,i)=>{Di(t);let a=()=>{};const o=[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&&o.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await rS(t,Promise.race(o));return Di(t),u}finally{a()}};return(n,i)=>eS(r(n,i))},iS=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=wr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(xr(21));return s0(a),{predicate:i,type:t,effect:a}},aS=Oa(e=>{const{type:t,predicate:r,effect:n}=iS(e);return{id:Oz(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(xr(22))}}},{withTypes:()=>aS}),f1=(e,t)=>{const{type:r,effect:n,predicate:i}=iS(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},gp=e=>{e.pending.forEach(t=>{t.abort(mp)})},Yz=(e,t)=>()=>{for(const r of t.keys())gp(r);e.clear()},d1=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},sS=Oa(wr(`${Lc}/add`),{withTypes:()=>sS}),Kz=wr(`${Lc}/removeAll`),oS=Oa(wr(`${Lc}/remove`),{withTypes:()=>oS}),Gz=(...e)=>{console.error(`${Lc}/error`,...e)},zo=(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:s=Gz}=e;s0(s);const o=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),p=>{h.unsubscribe(),p?.cancelActive&&gp(h)}),u=h=>{const p=f1(t,h)??aS(h);return o(p)};Oa(u,{withTypes:()=>u});const l=h=>{const p=f1(t,h);return p&&(p.unsubscribe(),h.cancelActive&&gp(p)),!!p};Oa(l,{withTypes:()=>l});const c=async(h,p,b,y)=>{const x=new AbortController,T=Vz(u,x.signal),E=[];try{h.pending.add(x),n(h),await Promise.resolve(h.effect(p,Oa({},b,{getOriginalState:y,condition:(k,w)=>T(k,w).then(Boolean),take:T,delay:nS(x.signal),pause:wl(x.signal),extra:a,signal:x.signal,fork:Wz(x.signal,E),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((k,w,A)=>{k!==x&&(k.abort(mp),A.delete(k))})},cancel:()=>{x.abort(mp),h.pending.delete(x)},throwIfCancelled:()=>{Di(x.signal)}})))}catch(k){k instanceof Rc||d1(s,k,{raisedBy:"effect"})}finally{await Promise.all(E),x.abort(zz),i(h),h.pending.delete(x)}},f=Yz(t,r);return{middleware:h=>p=>b=>{if(!M_(b))return p(b);if(sS.match(b))return u(b.payload);if(Kz.match(b)){f();return}if(oS.match(b))return l(b.payload);let y=h.getState();const x=()=>{if(y===c1)throw new Error(xr(23));return y};let T;try{if(T=p(b),t.size>0){const E=h.getState(),k=Array.from(t.values());for(const w of k){let A=!1;try{A=w.predicate(b,E,y)}catch(S){A=!1,d1(s,S,{raisedBy:"predicate"})}A&&c(w,b,h,x)}}}finally{y=c1}return T},startListening:u,stopListening:l,clearListeners:f}};function xr(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 Xz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},uS=Yt({name:"chartLayout",initialState:Xz,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:Zz,setLayout:Qz,setChartSize:Jz,setScale:eq}=uS.actions,tq=uS.reducer;function lS(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function ke(e){return Number.isFinite(e)}function Ua(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function h1(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 _a(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?h1(Object(r),!0).forEach(function(n){rq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rq(e,t,r){return(t=nq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nq(e){var t=iq(e,"string");return typeof t=="symbol"?t:t+""}function iq(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 gt(e,t,r){return ot(e)||ot(t)?r:qt(t)?Fa(e,t,r):typeof t=="function"?t(e):r}var aq=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:s,layout:o}=t;if((o==="vertical"||o==="horizontal"&&s==="middle")&&a!=="center"&&le(e[a]))return _a(_a({},e),{},{[a]:e[a]+(n||0)});if((o==="horizontal"||o==="vertical"&&a==="center")&&s!=="middle"&&le(e[s]))return _a(_a({},e),{},{[s]:e[s]+(i||0)})}return e},Rn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",cS=(e,t,r,n)=>{if(n)return e.map(o=>o.coordinate);var i,a,s=e.map(o=>(o.coordinate===t&&(i=!0),o.coordinate===r&&(a=!0),o.coordinate));return i||s.push(t),a||s.push(r),s},fS=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:s,realScaleType:o,isCategorical:u,categoricalDomain:l,tickCount:c,ticks:f,niceTicks:d,axisType:h}=e;if(!s)return null;var p=o==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,b=i==="category"&&s.bandwidth?s.bandwidth()/p:0;if(b=h==="angleAxis"&&a&&a.length>=2?lr(a[0]-a[1])*2*b:b,f||d){var y=(f||d||[]).map((x,T)=>{var E=n?n.indexOf(x):x,k=s.map(E);return ke(k)?{coordinate:k+b,value:x,offset:b,index:T}:null}).filter(cr);return y}return u&&l?l.map((x,T)=>{var E=s.map(x);return ke(E)?{coordinate:E+b,value:x,index:T,offset:b}:null}).filter(cr):s.ticks&&c!=null?s.ticks(c).map((x,T)=>{var E=s.map(x);return ke(E)?{coordinate:E+b,value:x,index:T,offset:b}:null}).filter(cr):s.domain().map((x,T)=>{var E=s.map(x);return ke(E)?{coordinate:E+b,value:n?n[x]:x,index:T,offset:b}:null}).filter(cr)},sq=(e,t)=>{if(!t||t.length!==2||!le(t[0])||!le(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(!le(e[0])||e[0]<r)&&(i[0]=r),(!le(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},oq=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,s=0,o=0;o<r;++o){var u=e[o],l=u?.[i];if(l!=null){var c=l[1],f=l[0],d=cn(c)?f:c;d>=0?(l[0]=a,a+=d,l[1]=a):(l[0]=s,s+=d,l[1]=s)}}}},uq=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,s=0;s<r;++s){var o=e[s],u=o?.[i];if(u!=null){var l=cn(u[1])?u[0]:u[1];l>=0?(u[0]=a,a+=l,u[1]=a):(u[0]=0,u[1]=0)}}}},lq={sign:oq,expand:jU,none:$i,silhouette:BU,wiggle:FU,positive:uq},cq=(e,t,r)=>{var n,i=(n=lq[r])!==null&&n!==void 0?n:$i,a=MU().keys(t).value((o,u)=>Number(gt(o,u,0))).order(ip).offset(i),s=a(e);return s.forEach((o,u)=>{o.forEach((l,c)=>{var f=gt(e[c],t[u],0);Array.isArray(f)&&f.length===2&&le(f[0])&&le(f[1])&&(l[0]=f[0],l[1]=f[1])})}),s};function fq(e){return e==null?void 0:String(e)}function p1(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ot(i[t.dataKey])){var o=b_(r,"value",i[t.dataKey]);if(o)return o.coordinate+n/2}return r!=null&&r[a]?r[a].coordinate+n/2:null}var u=gt(i,ot(s)?t.dataKey:s),l=t.scale.map(u);return le(l)?l:null}var m1=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:s}=e;if(t.type==="category")return r[s]?r[s].coordinate+n:null;var o=gt(a,t.dataKey,t.scale.domain()[s]);if(ot(o))return null;var u=t.scale.map(o);return le(u)?u-i/2+n:null},dq=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]},hq=e=>{var t=e.flat(2).filter(le);return[Math.min(...t),Math.max(...t)]},pq=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],mq=(e,t,r)=>{if(e!=null)return pq(Object.keys(e).reduce((n,i)=>{var a=e[i];if(!a)return n;var{stackedData:s}=a,o=s.reduce((u,l)=>{var c=lS(l,t,r),f=hq(c);return!ke(f[0])||!ke(f[1])?u:[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(o[0],n[0]),Math.max(o[1],n[1])]},[1/0,-1/0]))},g1=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,b1=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ha=(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=_c(t,c=>c.coordinate),a=1/0,s=1,o=i.length;s<o;s++){var u=i[s],l=i[s-1];a=Math.min((u?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function y1(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return _a(_a({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Mc(e,t){if(e)return String(e);if(typeof t=="string")return t}var gq=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},bq=(e,t)=>t==="centric"?e.angle:e.radius,Ln=e=>e.layout.width,Mn=e=>e.layout.height,yq=e=>e.layout.scale,dS=e=>e.layout.margin,jc=B(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Bc=B(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),vq="data-recharts-item-index",xq="data-recharts-item-id",qo=60;function v1(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 Au(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(r),!0).forEach(function(n){Eq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eq(e,t,r){return(t=Tq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tq(e){var t=wq(e,"string");return typeof t=="symbol"?t:t+""}function wq(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 Aq=e=>e.brush.height;function kq(e){var t=Bc(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:qo;return r+i}return r},0)}function _q(e){var t=Bc(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:qo;return r+i}return r},0)}function Sq(e){var t=jc(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Cq(e){var t=jc(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Nt=B([Ln,Mn,dS,Aq,kq,_q,Sq,Cq,D_,JH],(e,t,r,n,i,a,s,o,u,l)=>{var c={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+s,bottom:(r.bottom||0)+o},d=Au(Au({},f),c),h=d.bottom;d.bottom+=n,d=aq(d,u,l);var p=e-d.left-d.right,b=t-d.top-d.bottom;return Au(Au({brushBottom:h},d),{},{width:Math.max(p,0),height:Math.max(b,0)})}),Iq=B(Nt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),o0=B(Ln,Mn,(e,t)=>({x:0,y:0,width:e,height:t})),Oq=m.createContext(null),Pt=()=>m.useContext(Oq)!=null,Fc=e=>e.brush,$c=B([Fc,Nt,dS],(e,t,r)=>({height:e.height,x:le(e.x)?e.x:t.left,y:le(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:le(e.width)?e.width:t.width})),x1=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 s=0;console.warn(r.replace(/%s/g,()=>i[s++]))}},Nq={initialDimension:{width:-1,height:-1}},Pq=m.createContext(Nq.initialDimension),hS=()=>m.useContext(Pq);function u0(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 Wo=()=>{var e,t=Pt(),r=ue(Iq),n=ue($c),i=(e=ue(Fc))===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}},Dq={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},pS=()=>{var e;return(e=ue(Nt))!==null&&e!==void 0?e:Dq},mS=()=>ue(Ln),gS=()=>ue(Mn),He=e=>e.layout.layoutType,Qi=()=>ue(He),bS=()=>{var e=Qi();if(e==="horizontal"||e==="vertical")return e},yS=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Rq=()=>{var e=Qi();return e!==void 0},Vo=e=>{var t=nt(),r=Pt(),{width:n,height:i}=e,a=hS(),s=n,o=i;return a&&(s=a.width>0?a.width:n,o=a.height>0?a.height:i),m.useEffect(()=>{!r&&Ua(s)&&Ua(o)&&t(Jz({width:s,height:o}))},[t,r,s,o]),null},vS=Symbol.for("immer-nothing"),E1=Symbol.for("immer-draftable"),Ar=Symbol.for("immer-state");function Ur(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var mo=Object.getPrototypeOf;function za(e){return!!e&&!!e[Ar]}function Hi(e){return e?xS(e)||Array.isArray(e)||!!e[E1]||!!e.constructor?.[E1]||Yo(e)||Hc(e):!1}var Lq=Object.prototype.constructor.toString(),T1=new WeakMap;function xS(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=T1.get(r);return n===void 0&&(n=Function.toString.call(r),T1.set(r,n)),n===Lq}function Al(e,t,r=!0){Uc(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 Uc(e){const t=e[Ar];return t?t.type_:Array.isArray(e)?1:Yo(e)?2:Hc(e)?3:0}function bp(e,t){return Uc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ES(e,t,r){const n=Uc(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Mq(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yo(e){return e instanceof Map}function Hc(e){return e instanceof Set}function Ai(e){return e.copy_||e.base_}function yp(e,t){if(Yo(e))return new Map(e);if(Hc(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=xS(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[Ar];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const s=i[a],o=n[s];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[s]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[s]})}return Object.create(mo(e),n)}else{const n=mo(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function l0(e,t=!1){return zc(e)||za(e)||!Hi(e)||(Uc(e)>1&&Object.defineProperties(e,{set:ku,add:ku,clear:ku,delete:ku}),Object.freeze(e),t&&Object.values(e).forEach(r=>l0(r,!0))),e}function jq(){Ur(2)}var ku={value:jq};function zc(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Bq={};function zi(e){const t=Bq[e];return t||Ur(0,e),t}var go;function TS(){return go}function Fq(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function w1(e,t){t&&(zi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vp(e){xp(e),e.drafts_.forEach($q),e.drafts_=null}function xp(e){e===go&&(go=e.parent_)}function A1(e){return go=Fq(go,e)}function $q(e){const t=e[Ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function k1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ar].modified_&&(vp(t),Ur(4)),Hi(e)&&(e=kl(t,e),t.parent_||_l(t,e)),t.patches_&&zi("Patches").generateReplacementPatches_(r[Ar].base_,e,t.patches_,t.inversePatches_)):e=kl(t,r,[]),vp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vS?e:void 0}function kl(e,t,r){if(zc(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[Ar];if(!i)return Al(t,(a,s)=>_1(e,i,t,a,s,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return _l(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const a=i.copy_;let s=a,o=!1;i.type_===3&&(s=new Set(a),a.clear(),o=!0),Al(s,(u,l)=>_1(e,i,a,u,l,r,o),n),_l(e,a,!1),r&&e.patches_&&zi("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function _1(e,t,r,n,i,a,s){if(i==null||typeof i!="object"&&!s)return;const o=zc(i);if(!(o&&!s)){if(za(i)){const u=a&&t&&t.type_!==3&&!bp(t.assigned_,n)?a.concat(n):void 0,l=kl(e,i,u);if(ES(r,n,l),za(l))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Hi(i)&&!o){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&o)return;kl(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Yo(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&_l(e,i)}}}function _l(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&l0(t,r)}function Uq(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:TS(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=c0;r&&(i=[n],a=bo);const{revoke:s,proxy:o}=Proxy.revocable(i,a);return n.draft_=o,n.revoke_=s,o}var c0={get(e,t){if(t===Ar)return e;const r=Ai(e);if(!bp(r,t))return Hq(e,r,t);const n=r[t];return e.finalized_||!Hi(n)?n:n===Ud(e.base_,t)?(Hd(e),e.copy_[t]=Tp(n,e)):n},has(e,t){return t in Ai(e)},ownKeys(e){return Reflect.ownKeys(Ai(e))},set(e,t,r){const n=wS(Ai(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=Ud(Ai(e),t),a=i?.[Ar];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Mq(r,i)&&(r!==void 0||bp(e.base_,t)))return!0;Hd(e),Ep(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 Ud(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Hd(e),Ep(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ai(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ur(11)},getPrototypeOf(e){return mo(e.base_)},setPrototypeOf(){Ur(12)}},bo={};Al(c0,(e,t)=>{bo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});bo.deleteProperty=function(e,t){return bo.set.call(this,e,t,void 0)};bo.set=function(e,t,r){return c0.set.call(this,e[0],t,r,e[0])};function Ud(e,t){const r=e[Ar];return(r?Ai(r):e)[t]}function Hq(e,t,r){const n=wS(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function wS(e,t){if(!(t in e))return;let r=mo(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=mo(r)}}function Ep(e){e.modified_||(e.modified_=!0,e.parent_&&Ep(e.parent_))}function Hd(e){e.copy_||(e.copy_=yp(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zq=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 s=this;return function(u=a,...l){return s.produce(u,c=>r.call(this,c,...l))}}typeof r!="function"&&Ur(6),n!==void 0&&typeof n!="function"&&Ur(7);let i;if(Hi(t)){const a=A1(this),s=Tp(t,void 0);let o=!0;try{i=r(s),o=!1}finally{o?vp(a):xp(a)}return w1(a,n),k1(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===vS&&(i=void 0),this.autoFreeze_&&l0(i,!0),n){const a=[],s=[];zi("Patches").generateReplacementPatches_(t,i,a,s),n(a,s)}return i}else Ur(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...o)=>this.produceWithPatches(s,u=>t(u,...o));let n,i;return[this.produce(t,r,(s,o)=>{n=s,i=o}),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){Hi(e)||Ur(8),za(e)&&(e=qq(e));const t=A1(this),r=Tp(e,void 0);return r[Ar].isManual_=!0,xp(t),r}finishDraft(e,t){const r=e&&e[Ar];(!r||!r.isManual_)&&Ur(9);const{scope_:n}=r;return w1(n,t),k1(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=zi("Patches").applyPatches_;return za(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Tp(e,t){const r=Yo(e)?zi("MapSet").proxyMap_(e,t):Hc(e)?zi("MapSet").proxySet_(e,t):Uq(e,t);return(t?t.scope_:TS()).drafts_.push(r),r}function qq(e){return za(e)||Ur(10,e),AS(e)}function AS(e){if(!Hi(e)||zc(e))return e;const t=e[Ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=yp(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=yp(e,!0);return Al(r,(i,a)=>{ES(r,i,AS(a))},n),t&&(t.finalized_=!1),r}var Wq=new zq;Wq.produce;var Vq={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},kS=Yt({name:"legend",initialState:Vq,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:tt()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Dr(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:tt()},removeLegendPayload:{reducer(e,t){var r=Dr(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:tt()}}}),{setLegendSize:eoe,setLegendSettings:toe,addLegendPayload:Yq,replaceLegendPayload:Kq,removeLegendPayload:Gq}=kS.actions,Xq=kS.reducer,zd={exports:{}},qd={};var S1;function Zq(){if(S1)return qd;S1=1;var e=em();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,s=e.useMemo,o=e.useDebugValue;return qd.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=s(function(){function y(w){if(!x){if(x=!0,T=w,w=f(w),d!==void 0&&p.hasValue){var A=p.value;if(d(A,w))return E=A}return E=w}if(A=E,r(T,w))return A;var S=f(w);return d!==void 0&&d(A,S)?(T=w,A):(T=w,E=S)}var x=!1,T,E,k=c===void 0?null:c;return[function(){return y(l())},k===null?void 0:function(){return y(k())}]},[l,c,f,d]);var b=n(u,h[0],h[1]);return a(function(){p.hasValue=!0,p.value=b},[b]),o(b),b},qd}var C1;function Qq(){return C1||(C1=1,zd.exports=Zq()),zd.exports}Qq();function Jq(e){e()}function eW(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Jq(()=>{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 I1={notify(){},get:()=>[]};function tW(e,t){let r,n=I1,i=0,a=!1;function s(b){c();const y=n.subscribe(b);let x=!1;return()=>{x||(x=!0,y(),f())}}function o(){n.notify()}function u(){p.onStateChange&&p.onStateChange()}function l(){return a}function c(){i++,r||(r=e.subscribe(u),n=eW())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=I1)}function d(){a||(a=!0,c())}function h(){a&&(a=!1,f())}const p={addNestedSub:s,notifyNestedSubs:o,handleChangeWrapper:u,isSubscribed:l,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return p}var rW=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nW=rW(),iW=()=>typeof navigator<"u"&&navigator.product==="ReactNative",aW=iW(),sW=()=>nW||aW?m.useLayoutEffect:m.useEffect,oW=sW();function O1(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function uW(e,t){if(O1(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])||!O1(e[r[i]],t[r[i]]))return!1;return!0}var lW=Symbol.for("react-redux-context"),cW=typeof globalThis<"u"?globalThis:{};function fW(){if(!m.createContext)return{};const e=cW[lW]??=new Map;let t=e.get(m.createContext);return t||(t=m.createContext(null),e.set(m.createContext,t)),t}var dW=fW();function hW(e){const{children:t,context:r,serverState:n,store:i}=e,a=m.useMemo(()=>{const u=tW(i);return{store:i,subscription:u,getServerState:n?()=>n:void 0}},[i,n]),s=m.useMemo(()=>i.getState(),[i]);oW(()=>{const{subscription:u}=a;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[a,s]);const o=r||dW;return m.createElement(o.Provider,{value:a},t)}var pW=hW,mW=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function gW(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ko(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(mW.has(n)){if(e[n]==null&&t[n]==null)continue;if(!uW(e[n],t[n]))return!1}else if(!gW(e[n],t[n]))return!1;return!0}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 N1(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 Es(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N1(Object(r),!0).forEach(function(n){bW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bW(e,t,r){return(t=yW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yW(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)}function xW(e){return Array.isArray(e)&&qt(e[0])&&qt(e[1])?e.join(" ~ "):e}var da={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 EW(e,t){return t==null?e:_c(e,t)}var TW=e=>{var{separator:t=da.separator,contentStyle:r,itemStyle:n,labelStyle:i=da.labelStyle,payload:a,formatter:s,itemSorter:o,wrapperClassName:u,labelClassName:l,label:c,labelFormatter:f,accessibilityLayer:d=da.accessibilityLayer}=e,h=()=>{if(a&&a.length){var w={padding:0,margin:0},A=EW(a,o),S=A.map((O,R)=>{if(!O||O.type==="none")return null;var C=O.formatter||s||xW,{value:M,name:L}=O,X=M,U=L;if(C){var $=C(M,L,O,R,a);if(Array.isArray($))[X,U]=$;else if($!=null)X=$;else return null}var q=Es(Es({},da.itemStyle),{},{color:O.color||da.itemStyle.color},n);return m.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(R),style:q},qt(U)?m.createElement("span",{className:"recharts-tooltip-item-name"},U):null,qt(U)?m.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,m.createElement("span",{className:"recharts-tooltip-item-value"},X),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=Es(Es({},da.contentStyle),r),b=Es({margin:0},i),y=!ot(c),x=y?c:"",T=Fe("recharts-default-tooltip",u),E=Fe("recharts-tooltip-label",l);y&&f&&a!==void 0&&a!==null&&(x=f(c,a));var k=d?{role:"status","aria-live":"assertive"}:{};return m.createElement("div",wp({className:T,style:p},k),m.createElement("p",{className:E,style:b},m.isValidElement(x)?x:"".concat(x)),h())},Ts="recharts-tooltip-wrapper",wW={visibility:"hidden"};function AW(e){var{coordinate:t,translateX:r,translateY:n}=e;return Fe(Ts,{["".concat(Ts,"-right")]:le(r)&&t&&le(t.x)&&r>=t.x,["".concat(Ts,"-left")]:le(r)&&t&&le(t.x)&&r<t.x,["".concat(Ts,"-bottom")]:le(n)&&t&&le(t.y)&&n>=t.y,["".concat(Ts,"-top")]:le(n)&&t&&le(t.y)&&n<t.y})}function P1(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:a,reverseDirection:s,tooltipDimension:o,viewBox:u,viewBoxDimension:l}=e;if(a&&le(a[n]))return a[n];var c=r[n]-o-(i>0?i:0),f=r[n]+i;if(t[n])return s[n]?c:f;var d=u[n];if(d==null)return 0;if(s[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+o,y=d+l;return b>y?Math.max(c,d):Math.max(f,d)}function kW(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 _W(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:a,reverseDirection:s,tooltipBox:o,useTranslate3d:u,viewBox:l}=e,c,f,d;return o.height>0&&o.width>0&&r?(f=P1({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:a,reverseDirection:s,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),d=P1({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:a,reverseDirection:s,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=kW({translateX:f,translateY:d,useTranslate3d:u})):c=wW,{cssProperties:c,cssClasses:AW({translateX:f,translateY:d,coordinate:r})}}var SW=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Go={isSsr:SW()};function _S(){var[e,t]=m.useState(()=>Go.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 D1(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 ha(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D1(Object(r),!0).forEach(function(n){CW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CW(e,t,r){return(t=IW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IW(e){var t=OW(e,"string");return typeof t=="symbol"?t:t+""}function OW(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 NW(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function PW(e){var t,r,n,i,a,s,o=_S(),[u,l]=m.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));m.useEffect(()=>{var p=b=>{if(b.key==="Escape"){var y,x,T,E;l({dismissed:!0,dismissedAtCoordinate:{x:(y=(x=e.coordinate)===null||x===void 0?void 0:x.x)!==null&&y!==void 0?y:0,y:(T=(E=e.coordinate)===null||E===void 0?void 0:E.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=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&a!==void 0?a:0)!==u.dismissedAtCoordinate.y)&&l(ha(ha({},u),{},{dismissed:!1}));var{cssClasses:c,cssProperties:f}=_W({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?{}:ha(ha({transition:NW({prefersReducedMotion:o,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=ha(ha({},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 DW=m.memo(PW),SS=()=>{var e;return(e=ue(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Ap(){return Ap=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},Ap.apply(null,arguments)}function R1(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 L1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R1(Object(r),!0).forEach(function(n){RW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RW(e,t,r){return(t=LW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LW(e){var t=MW(e,"string");return typeof t=="symbol"?t:t+""}function MW(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 M1={curveBasisClosed:kU,curveBasisOpen:_U,curveBasis:AU,curveBumpX:cU,curveBumpY:fU,curveLinearClosed:SU,curveLinear:Ac,curveMonotoneX:CU,curveMonotoneY:IU,curveNatural:OU,curveStep:NU,curveStepAfter:DU,curveStepBefore:PU},Sl=e=>ke(e.x)&&ke(e.y),j1=e=>e.base!=null&&Sl(e.base)&&Sl(e),ws=e=>e.x,As=e=>e.y,jW=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(Uo(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=M1["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return M1[r]||Ac},B1={connectNulls:!1,type:"linear"},BW=e=>{var{type:t=B1.type,points:r=[],baseLine:n,layout:i,connectNulls:a=B1.connectNulls}=e,s=jW(t,i),o=a?r.filter(Sl):r;if(Array.isArray(n)){var u,l=r.map((p,b)=>L1(L1({},p),{},{base:n[b]}));i==="vertical"?u=yu().y(As).x1(ws).x0(p=>p.base.x):u=yu().x(ws).y1(As).y0(p=>p.base.y);var c=u.defined(j1).curve(s),f=a?l.filter(j1):l;return c(f)}var d;i==="vertical"&&le(n)?d=yu().y(As).x1(ws).x0(n):le(n)?d=yu().x(ws).y1(As).y0(n):d=i_().x(ws).y(As);var h=d.defined(Sl).curve(s);return h(o)},CS=e=>{var{className:t,points:r,path:n,pathRef:i}=e,a=Qi();if((!r||!r.length)&&!n)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},o=r&&r.length?BW(s):n;return m.createElement("path",Ap({},qr(e),Zm(e),{className:Fe("recharts-curve",t),d:o===null?void 0:o,ref:i}))},FW=["x","y","top","left","width","height","className"];function kp(){return kp=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},kp.apply(null,arguments)}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 $W(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){UW(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 UW(e,t,r){return(t=HW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HW(e){var t=zW(e,"string");return typeof t=="symbol"?t:t+""}function zW(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 qW(e,t){if(e==null)return{};var r,n,i=WW(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 WW(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 VW=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),YW=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:s=0,className:o}=e,u=qW(e,FW),l=$W({x:t,y:r,top:n,left:i,width:a,height:s},u);return!le(t)||!le(r)||!le(a)||!le(s)||!le(n)||!le(i)?null:m.createElement("path",kp({},Ft(l),{className:Fe("recharts-cross",o),d:VW(t,r,a,s,n,i)}))};function KW(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 $1(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 U1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$1(Object(r),!0).forEach(function(n){GW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GW(e,t,r){return(t=XW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XW(e){var t=ZW(e,"string");return typeof t=="symbol"?t:t+""}function ZW(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 QW=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),IS=(e,t,r)=>e.map(n=>"".concat(QW(n)," ").concat(t,"ms ").concat(r)).join(","),JW=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),yo=(e,t)=>Object.keys(t).reduce((r,n)=>U1(U1({},r),{},{[n]:e(n,t[n])}),{});function H1(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 At(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?H1(Object(r),!0).forEach(function(n){eV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eV(e,t,r){return(t=tV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tV(e){var t=rV(e,"string");return typeof t=="symbol"?t:t+""}function rV(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=(e,t,r)=>e+(t-e)*r,_p=e=>{var{from:t,to:r}=e;return t!==r},OS=(e,t,r)=>{var n=yo((i,a)=>{if(_p(a)){var[s,o]=e(a.from,a.to,a.velocity);return At(At({},a),{},{from:s,velocity:o})}return a},t);return r<1?yo((i,a)=>_p(a)&&n[i]!=null?At(At({},a),{},{velocity:Cl(a.velocity,n[i].velocity,r),from:Cl(a.from,n[i].from,r)}):a,t):OS(e,n,r-1)};function nV(e,t,r,n,i,a){var s,o=n.reduce((d,h)=>At(At({},d),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),u=()=>yo((d,h)=>h.from,o),l=()=>!Object.values(o).filter(_p).length,c=null,f=d=>{s||(s=d);var h=d-s,p=h/r.dt;o=OS(r,o,p),i(At(At(At({},e),t),u())),s=d,l()||(c=a.setTimeout(f))};return()=>(c=a.setTimeout(f),()=>{var d;(d=c)===null||d===void 0||d()})}function iV(e,t,r,n,i,a,s){var o=null,u=i.reduce((f,d)=>{var h=e[d],p=t[d];return h==null||p==null?f:At(At({},f),{},{[d]:[h,p]})},{}),l,c=f=>{l||(l=f);var d=(f-l)/n,h=yo((b,y)=>Cl(...y,r(d)),u);if(a(At(At(At({},e),t),h)),d<1)o=s.setTimeout(c);else{var p=yo((b,y)=>Cl(...y,r(1)),u);a(At(At(At({},e),t),p))}};return()=>(o=s.setTimeout(c),()=>{var f;(f=o)===null||f===void 0||f()})}const aV=(e,t,r,n,i,a)=>{var s=JW(e,t);return r==null?()=>(i(At(At({},e),t)),()=>{}):r.isStepper===!0?nV(e,t,r,s,i,a):iV(e,t,r,n,s,i,a)};var Il=1e-4,NS=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],PS=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),z1=(e,t)=>r=>{var n=NS(e,t);return PS(n,r)},sV=(e,t)=>r=>{var n=NS(e,t),i=[...n.map((a,s)=>a*s).slice(1),0];return PS(i,r)},oV=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]]},uV=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=oV(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},lV=(e,t,r,n)=>{var i=z1(e,r),a=z1(t,n),s=sV(e,r),o=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=s(f);if(Math.abs(h-c)<Il||p<Il)return a(f);f=o(f-h/p)}return a(f)};return u.isStepper=!1,u},q1=function(){return lV(...uV(...arguments))},cV=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(s,o,u)=>{var l=-(s-o)*r,c=u*n,f=u+(l-c)*i/1e3,d=u*i/1e3+s;return Math.abs(d-o)<Il&&Math.abs(f)<Il?[o,0]:[d,f]};return a.isStepper=!0,a.dt=i,a},fV=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return q1(e);case"spring":return cV();default:if(e.split("(")[0]==="cubic-bezier")return q1(e)}return typeof e=="function"?e:null};function dV(e){var t,r=()=>null,n=!1,i=null,a=s=>{if(!n){if(Array.isArray(s)){if(!s.length)return;var o=s,[u,...l]=o;if(typeof u=="number"){i=e.setTimeout(a.bind(null,l),u);return}a(u),i=e.setTimeout(a.bind(null,l));return}typeof s=="string"&&(t=s,r(t)),typeof s=="object"&&(t=s,r(t)),typeof s=="function"&&s()}};return{stop:()=>{n=!0},start:s=>{n=!1,i&&(i(),i=null),a(s)},subscribe:s=>(r=s,()=>{r=()=>null}),getTimeoutController:()=>e}}class hV{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=s=>{s-n>=r?t(s):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{i!=null&&cancelAnimationFrame(i)}}}function pV(){return dV(new hV)}var mV=m.createContext(pV);function gV(e,t){var r=m.useContext(mV);return m.useMemo(()=>t??r(e),[e,t,r])}var bV={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},W1={t:0},Wd={t:1};function qc(e){var t=$t(e,bV),{isActive:r,canBegin:n,duration:i,easing:a,begin:s,onAnimationEnd:o,onAnimationStart:u,children:l}=t,c=_S(),f=r==="auto"?!Go.isSsr&&!c:r,d=gV(t.animationId,t.animationManager),[h,p]=m.useState(f?W1:Wd),b=m.useRef(null);return m.useEffect(()=>{f||p(Wd)},[f]),m.useEffect(()=>{if(!f||!n)return rs;var y=aV(W1,Wd,fV(a),i,p,d.getTimeoutController()),x=()=>{b.current=y()};return d.start([u,s,x,i,o]),()=>{d.stop(),b.current&&b.current(),o()}},[f,n,i,a,s,u,o,d]),l(h.t)}function Wc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=m.useRef(co(t)),n=m.useRef(e);return n.current!==e&&(r.current=co(t),n.current=e),r.current}var yV=["radius"],vV=["radius"],V1,Y1,K1,G1,X1,Z1,Q1,J1,ex,tx;function rx(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 nx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rx(Object(r),!0).forEach(function(n){xV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xV(e,t,r){return(t=EV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EV(e){var t=TV(e,"string");return typeof t=="symbol"?t:t+""}function TV(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 Ol(){return Ol=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},Ol.apply(null,arguments)}function ix(e,t){if(e==null)return{};var r,n,i=wV(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 wV(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 Zr(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ax=(e,t,r,n,i)=>{var a=Jn(r),s=Jn(n),o=Math.min(Math.abs(a)/2,Math.abs(s)/2),u=s>=0?1:-1,l=a>=0?1:-1,c=s>=0&&a>=0||s<0&&a<0?1:0,f;if(o>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>o?o:y}f=ct(V1||(V1=Zr(["M",",",""])),e,t+u*d[0]),d[0]>0&&(f+=ct(Y1||(Y1=Zr(["A ",",",",0,0,",",",",",""])),d[0],d[0],c,e+l*d[0],t)),f+=ct(K1||(K1=Zr(["L ",",",""])),e+r-l*d[1],t),d[1]>0&&(f+=ct(G1||(G1=Zr(["A ",",",",0,0,",`,
151
+ `,",",""])),d[1],d[1],c,e+r,t+u*d[1])),f+=ct(X1||(X1=Zr(["L ",",",""])),e+r,t+n-u*d[2]),d[2]>0&&(f+=ct(Z1||(Z1=Zr(["A ",",",",0,0,",`,
152
+ `,",",""])),d[2],d[2],c,e+r-l*d[2],t+n)),f+=ct(Q1||(Q1=Zr(["L ",",",""])),e+l*d[3],t+n),d[3]>0&&(f+=ct(J1||(J1=Zr(["A ",",",",0,0,",`,
153
+ `,",",""])),d[3],d[3],c,e,t+n-u*d[3])),f+="Z"}else if(o>0&&i===+i&&i>0){var x=Math.min(o,i);f=ct(ex||(ex=Zr(["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*x,x,x,c,e+l*x,t,e+r-l*x,t,x,x,c,e+r,t+u*x,e+r,t+n-u*x,x,x,c,e+r-l*x,t+n,e+l*x,t+n,x,x,c,e,t+n-u*x)}else f=ct(tx||(tx=Zr(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return f},sx={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},f0=e=>{var t=$t(e,sx),r=m.useRef(null),[n,i]=m.useState(-1);m.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var Y=r.current.getTotalLength();Y&&i(Y)}catch{}},[]);var{x:a,y:s,width:o,height:u,radius:l,className:c}=t,{animationEasing:f,animationDuration:d,animationBegin:h,isAnimationActive:p,isUpdateAnimationActive:b}=t,y=m.useRef(o),x=m.useRef(u),T=m.useRef(a),E=m.useRef(s),k=m.useMemo(()=>({x:a,y:s,width:o,height:u,radius:l}),[a,s,o,u,l]),w=Wc(k,"rectangle-");if(a!==+a||s!==+s||o!==+o||u!==+u||o===0||u===0)return null;var A=Fe("recharts-rectangle",c);if(!b){var S=Ft(t),{radius:O}=S,R=ix(S,yV);return m.createElement("path",Ol({},R,{x:Jn(a),y:Jn(s),width:Jn(o),height:Jn(u),radius:typeof l=="number"?l:void 0,className:A,d:ax(a,s,o,u,l)}))}var C=y.current,M=x.current,L=T.current,X=E.current,U="0px ".concat(n===-1?1:n,"px"),$="".concat(n,"px ").concat(n,"px"),q=IS(["strokeDasharray"],d,typeof f=="string"?f:sx.animationEasing);return m.createElement(qc,{animationId:w,key:w,canBegin:n>0,duration:d,easing:f,isActive:b,begin:h},Y=>{var V=ft(C,o,Y),re=ft(M,u,Y),N=ft(L,a,Y),ye=ft(X,s,Y);r.current&&(y.current=V,x.current=re,T.current=N,E.current=ye);var pe;p?Y>0?pe={transition:q,strokeDasharray:$}:pe={strokeDasharray:U}:pe={strokeDasharray:$};var P=Ft(t),{radius:ge}=P,Oe=ix(P,vV);return m.createElement("path",Ol({},Oe,{radius:typeof l=="number"?l:void 0,className:A,d:ax(N,ye,V,re,l),ref:r,style:nx(nx({},pe),t.style)}))})};function ox(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 ux(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ox(Object(r),!0).forEach(function(n){AV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AV(e,t,r){return(t=kV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kV(e){var t=_V(e,"string");return typeof t=="symbol"?t:t+""}function _V(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 Nl=Math.PI/180,SV=e=>e*180/Math.PI,Bt=(e,t,r,n)=>({x:e+Math.cos(-Nl*n)*r,y:t+Math.sin(-Nl*n)*r}),CV=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},IV=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},OV=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,s=IV({x:r,y:n},{x:i,y:a});if(s<=0)return{radius:s,angle:0};var o=(r-i)/s,u=Math.acos(o);return n>a&&(u=2*Math.PI-u),{radius:s,angle:SV(u),angleInRadian:u}},NV=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}},PV=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),s=Math.min(i,a);return e+s*360},DV=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:a}=OV({x:r,y:n},t),{innerRadius:s,outerRadius:o}=t;if(i<s||i>o||i===0)return null;var{startAngle:u,endAngle:l}=NV(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?ux(ux({},t),{},{radius:i,angle:PV(c,t)}):null};function DS(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:a}=e,s=Bt(t,r,n,i),o=Bt(t,r,n,a);return{points:[s,o],cx:t,cy:r,radius:n,startAngle:i,endAngle:a}}var lx,cx,fx,dx,hx,px,mx;function Sp(){return Sp=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},Sp.apply(null,arguments)}function Ci(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var RV=(e,t)=>{var r=lr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},_u=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:a,isExternal:s,cornerRadius:o,cornerIsExternal:u}=e,l=o*(s?1:-1)+n,c=Math.asin(o/l)/Nl,f=u?i:i+a*c,d=Bt(t,r,l,f),h=Bt(t,r,n,f),p=u?i-a*c:i,b=Bt(t,r,l*Math.cos(c*Nl),p);return{center:d,circleTangency:h,lineTangency:b,theta:c}},RS=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:a,endAngle:s}=e,o=RV(a,s),u=a+o,l=Bt(t,r,i,a),c=Bt(t,r,i,u),f=ct(lx||(lx=Ci(["M ",",",`
161
+ A `,",",`,0,
162
+ `,",",`,
163
+ `,",",`
164
+ `])),l.x,l.y,i,i,+(Math.abs(o)>180),+(a>u),c.x,c.y);if(n>0){var d=Bt(t,r,n,a),h=Bt(t,r,n,u);f+=ct(cx||(cx=Ci(["L ",",",`
165
+ A `,",",`,0,
166
+ `,",",`,
167
+ `,","," Z"])),h.x,h.y,n,n,+(Math.abs(o)>180),+(a<=u),d.x,d.y)}else f+=ct(fx||(fx=Ci(["L ",","," Z"])),t,r);return f},LV=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:o,startAngle:u,endAngle:l}=e,c=lr(l-u),{circleTangency:f,lineTangency:d,theta:h}=_u({cx:t,cy:r,radius:i,angle:u,sign:c,cornerRadius:a,cornerIsExternal:o}),{circleTangency:p,lineTangency:b,theta:y}=_u({cx:t,cy:r,radius:i,angle:l,sign:-c,cornerRadius:a,cornerIsExternal:o}),x=o?Math.abs(u-l):Math.abs(u-l)-h-y;if(x<0)return s?ct(dx||(dx=Ci(["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):RS({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:u,endAngle:l});var T=ct(hx||(hx=Ci(["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,+(x>180),+(c<0),p.x,p.y,a,a,+(c<0),b.x,b.y);if(n>0){var{circleTangency:E,lineTangency:k,theta:w}=_u({cx:t,cy:r,radius:n,angle:u,sign:c,isExternal:!0,cornerRadius:a,cornerIsExternal:o}),{circleTangency:A,lineTangency:S,theta:O}=_u({cx:t,cy:r,radius:n,angle:l,sign:-c,isExternal:!0,cornerRadius:a,cornerIsExternal:o}),R=o?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+=ct(px||(px=Ci(["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),E.x,E.y,a,a,+(c<0),k.x,k.y)}else T+=ct(mx||(mx=Ci(["L",",","Z"])),t,r);return T},MV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},LS=e=>{var t=$t(e,MV),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:s,forceCornerRadius:o,cornerIsExternal:u,startAngle:l,endAngle:c,className:f}=t;if(a<i||l===c)return null;var d=Fe("recharts-sector",f),h=a-i,p=Wr(s,h,0,!0),b;return p>0&&Math.abs(l-c)<360?b=LV({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(p,h/2),forceCornerRadius:o,cornerIsExternal:u,startAngle:l,endAngle:c}):b=RS({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:l,endAngle:c}),m.createElement("path",Sp({},Ft(t),{className:d,d:b}))};function jV(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(x_(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:a,outerRadius:s,angle:o}=t,u=Bt(n,i,a,o),l=Bt(n,i,s,o);return[{x:u.x,y:u.y},{x:l.x,y:l.y}]}return DS(t)}}var Vd={},Yd={},Kd={},gx;function BV(){return gx||(gx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=N_();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Kd)),Kd}var bx;function FV(){return bx||(bx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=BV();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})(Yd)),Yd}var yx;function $V(){return yx||(yx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=P_(),r=FV();function n(i,a,s){s&&typeof s!="number"&&t.isIterateeCall(i,a,s)&&(a=s=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),s=s===void 0?i<a?1:-1:r.toFinite(s);const o=Math.max(Math.ceil((a-i)/(s||1)),0),u=new Array(o);for(let l=0;l<o;l++)u[l]=i,i+=s;return u}e.range=n})(Vd)),Vd}var Gd,vx;function UV(){return vx||(vx=1,Gd=$V().range),Gd}var HV=UV();const MS=Nn(HV);var Xr=e=>e.chartData,d0=B([Xr],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Xo=(e,t,r,n)=>n?d0(e):Xr(e),zV=(e,t,r)=>r?d0(e):Xr(e),qV=B([Xo],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});B([d0],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var WV=B([Xr],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function sn(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(ke(t)&&ke(r))return!0}return!1}function xx(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function jS(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(ke(r))i=r;else if(typeof r=="function")return;if(ke(n))a=n;else if(typeof n=="function")return;var s=[i,a];if(sn(s))return s}}function VV(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(sn(n))return xx(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,s,o;if(i==="auto")t!=null&&(s=Math.min(...t));else if(le(i))s=i;else if(typeof i=="function")try{t!=null&&(s=i(t?.[0]))}catch{}else if(typeof i=="string"&&g1.test(i)){var u=g1.exec(i);if(u==null||u[1]==null||t==null)s=void 0;else{var l=+u[1];s=t[0]-l}}else s=t?.[0];if(a==="auto")t!=null&&(o=Math.max(...t));else if(le(a))o=a;else if(typeof a=="function")try{t!=null&&(o=a(t?.[1]))}catch{}else if(typeof a=="string"&&b1.test(a)){var c=b1.exec(a);if(c==null||c[1]==null||t==null)o=void 0;else{var f=+c[1];o=t[1]+f}}else o=t?.[1];var d=[s,o];if(sn(d))return t==null?d:xx(d,t,r)}}}var ns=1e9,YV={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},p0,st=!0,Lr="[DecimalError] ",Ri=Lr+"Invalid argument: ",h0=Lr+"Exponent out of range: ",is=Math.floor,ki=Math.pow,KV=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,br,It=1e7,rt=7,BS=9007199254740991,Pl=is(BS/rt),ie={};ie.absoluteValue=ie.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ie.comparedTo=ie.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};ie.decimalPlaces=ie.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*rt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};ie.dividedBy=ie.div=function(e){return kn(this,new this.constructor(e))};ie.dividedToIntegerBy=ie.idiv=function(e){var t=this,r=t.constructor;return Ye(kn(t,new r(e),0,1),r.precision)};ie.equals=ie.eq=function(e){return!this.cmp(e)};ie.exponent=function(){return vt(this)};ie.greaterThan=ie.gt=function(e){return this.cmp(e)>0};ie.greaterThanOrEqualTo=ie.gte=function(e){return this.cmp(e)>=0};ie.isInteger=ie.isint=function(){return this.e>this.d.length-2};ie.isNegative=ie.isneg=function(){return this.s<0};ie.isPositive=ie.ispos=function(){return this.s>0};ie.isZero=function(){return this.s===0};ie.lessThan=ie.lt=function(e){return this.cmp(e)<0};ie.lessThanOrEqualTo=ie.lte=function(e){return this.cmp(e)<1};ie.logarithm=ie.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(br))throw Error(Lr+"NaN");if(r.s<1)throw Error(Lr+(r.s?"NaN":"-Infinity"));return r.eq(br)?new n(0):(st=!1,t=kn(vo(r,a),vo(e,a),a),st=!0,Ye(t,i))};ie.minus=ie.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?US(t,e):FS(t,(e.s=-e.s,e))};ie.modulo=ie.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(Lr+"NaN");return r.s?(st=!1,t=kn(r,e,0,1).times(e),st=!0,r.minus(t)):Ye(new n(r),i)};ie.naturalExponential=ie.exp=function(){return $S(this)};ie.naturalLogarithm=ie.ln=function(){return vo(this)};ie.negated=ie.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ie.plus=ie.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FS(t,e):US(t,(e.s=-e.s,e))};ie.precision=ie.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ri+e);if(t=vt(i)+1,n=i.d.length-1,r=n*rt+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};ie.squareRoot=ie.sqrt=function(){var e,t,r,n,i,a,s,o=this,u=o.constructor;if(o.s<1){if(!o.s)return new u(0);throw Error(Lr+"NaN")}for(e=vt(o),st=!1,i=Math.sqrt(+o),i==0||i==1/0?(t=an(o.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=is((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=s=r+3;;)if(a=n,n=a.plus(kn(o,a,s+2)).times(.5),an(a.d).slice(0,s)===(t=an(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(Ye(a,r+1,0),a.times(a).eq(o)){n=a;break}}else if(t!="9999")break;s+=4}return st=!0,Ye(n,r)};ie.times=ie.mul=function(e){var t,r,n,i,a,s,o,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,s=u,u=l,l=s),a=[],s=u+l,n=s;n--;)a.push(0);for(n=l;--n>=0;){for(t=0,i=u+n;i>n;)o=a[i]+h[n]*d[i-n-1]+t,a[i--]=o%It|0,t=o/It|0;a[i]=(a[i]+t)%It|0}for(;!a[--s];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,st?Ye(e,f.precision):e};ie.toDecimalPlaces=ie.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(fn(e,0,ns),t===void 0?t=n.rounding:fn(t,0,8),Ye(r,e+vt(r)+1,t))};ie.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=qi(n,!0):(fn(e,0,ns),t===void 0?t=i.rounding:fn(t,0,8),n=Ye(new i(n),e+1,t),r=qi(n,!0,e+1)),r};ie.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?qi(i):(fn(e,0,ns),t===void 0?t=a.rounding:fn(t,0,8),n=Ye(new a(i),e+vt(i)+1,t),r=qi(n.abs(),!1,e+vt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};ie.toInteger=ie.toint=function(){var e=this,t=e.constructor;return Ye(new t(e),vt(e)+1,t.rounding)};ie.toNumber=function(){return+this};ie.toPower=ie.pow=function(e){var t,r,n,i,a,s,o=this,u=o.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(br);if(o=new u(o),!o.s){if(e.s<1)throw Error(Lr+"Infinity");return o}if(o.eq(br))return o;if(n=u.precision,e.eq(br))return Ye(o,n);if(t=e.e,r=e.d.length-1,s=t>=r,a=o.s,s){if((r=c<0?-c:c)<=BS){for(i=new u(br),t=Math.ceil(n/rt+4),st=!1;r%2&&(i=i.times(o),Tx(i.d,t)),r=is(r/2),r!==0;)o=o.times(o),Tx(o.d,t);return st=!0,e.s<0?new u(br).div(i):Ye(i,n)}}else if(a<0)throw Error(Lr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,o.s=1,st=!1,i=e.times(vo(o,n+l)),st=!0,i=$S(i),i.s=a,i};ie.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=vt(i),n=qi(i,r<=a.toExpNeg||r>=a.toExpPos)):(fn(e,1,ns),t===void 0?t=a.rounding:fn(t,0,8),i=Ye(new a(i),e,t),r=vt(i),n=qi(i,e<=r||r<=a.toExpNeg,e)),n};ie.toSignificantDigits=ie.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(fn(e,1,ns),t===void 0?t=n.rounding:fn(t,0,8)),Ye(new n(r),e,t)};ie.toString=ie.valueOf=ie.val=ie.toJSON=ie[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=vt(e),r=e.constructor;return qi(e,t<=r.toExpNeg||t>=r.toExpPos)};function FS(e,t){var r,n,i,a,s,o,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),st?Ye(t,f):t;if(u=e.d,l=t.d,s=e.e,i=t.e,u=u.slice(),a=s-i,a){for(a<0?(n=u,a=-a,o=l.length):(n=l,i=s,o=u.length),s=Math.ceil(f/rt),o=s>o?s+1:o+1,a>o&&(a=o,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(o=u.length,a=l.length,o-a<0&&(a=o,n=l,l=u,u=n),r=0;a;)r=(u[--a]=u[a]+l[a]+r)/It|0,u[a]%=It;for(r&&(u.unshift(r),++i),o=u.length;u[--o]==0;)u.pop();return t.d=u,t.e=i,st?Ye(t,f):t}function fn(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Ri+e)}function an(e){var t,r,n,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)n=e[t]+"",r=rt-n.length,r&&(a+=Gn(r)),a+=n;s=e[t],n=s+"",r=rt-n.length,r&&(a+=Gn(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var kn=(function(){function e(n,i){var a,s=0,o=n.length;for(n=n.slice();o--;)a=n[o]*i+s,n[o]=a%It|0,s=a/It|0;return s&&n.unshift(s),n}function t(n,i,a,s){var o,u;if(a!=s)u=a>s?1:-1;else for(o=u=0;o<a;o++)if(n[o]!=i[o]){u=n[o]>i[o]?1:-1;break}return u}function r(n,i,a){for(var s=0;a--;)n[a]-=s,s=n[a]<i[a]?1:0,n[a]=s*It+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,s){var o,u,l,c,f,d,h,p,b,y,x,T,E,k,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(Lr+"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:s?T=a+(vt(n)-vt(i))+1:T=a,T<0)return new R(0);if(T=T/rt+2|0,l=0,S==1)for(c=0,L=L[0],T++;(l<w||c)&&T--;l++)E=c*It+(M[l]||0),p[l]=E/L|0,c=E%L|0;else{for(c=It/(L[0]+1)|0,c>1&&(L=e(L,c),M=e(M,c),S=L.length,w=M.length),k=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]>=It/2&&++A;do c=0,o=t(L,b,S,y),o<0?(x=b[0],S!=y&&(x=x*It+(b[1]||0)),c=x/A|0,c>1?(c>=It&&(c=It-1),f=e(L,c),d=f.length,y=b.length,o=t(f,b,d,y),o==1&&(c--,r(f,S<d?O:L,d))):(c==0&&(o=c=1),f=L.slice()),d=f.length,d<y&&f.unshift(0),r(b,f,y),o==-1&&(y=b.length,o=t(L,b,S,y),o<1&&(c++,r(b,S<y?O:L,y))),y=b.length):o===0&&(c++,b=[0]),p[l++]=c,o&&b[0]?b[y++]=M[k]||0:(b=[M[k]],y=1);while((k++<w||b[0]!==void 0)&&T--)}return p[0]||p.shift(),h.e=u,Ye(h,s?a+vt(h)+1:a)}})();function $S(e,t){var r,n,i,a,s,o,u=0,l=0,c=e.constructor,f=c.precision;if(vt(e)>16)throw Error(h0+vt(e));if(!e.s)return new c(br);for(st=!1,o=f,s=new c(.03125);e.abs().gte(.1);)e=e.times(s),l+=5;for(n=Math.log(ki(2,l))/Math.LN10*2+5|0,o+=n,r=i=a=new c(br),c.precision=o;;){if(i=Ye(i.times(e),o),r=r.times(++u),s=a.plus(kn(i,r,o)),an(s.d).slice(0,o)===an(a.d).slice(0,o)){for(;l--;)a=Ye(a.times(a),o);return c.precision=f,t==null?(st=!0,Ye(a,f)):a}a=s}}function vt(e){for(var t=e.e*rt,r=e.d[0];r>=10;r/=10)t++;return t}function Xd(e,t,r){if(t>e.LN10.sd())throw st=!0,r&&(e.precision=r),Error(Lr+"LN10 precision limit exceeded");return Ye(new e(e.LN10),t)}function Gn(e){for(var t="";e--;)t+="0";return t}function vo(e,t){var r,n,i,a,s,o,u,l,c,f=1,d=10,h=e,p=h.d,b=h.constructor,y=b.precision;if(h.s<1)throw Error(Lr+(h.s?"NaN":"-Infinity"));if(h.eq(br))return new b(0);if(t==null?(st=!1,l=y):l=t,h.eq(10))return t==null&&(st=!0),Xd(b,l);if(l+=d,b.precision=l,r=an(p),n=r.charAt(0),a=vt(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=an(h.d),n=r.charAt(0),f++;a=vt(h),n>1?(h=new b("0."+r),a++):h=new b(n+"."+r.slice(1))}else return u=Xd(b,l+2,y).times(a+""),h=vo(new b(n+"."+r.slice(1)),l-d).plus(u),b.precision=y,t==null?(st=!0,Ye(h,y)):h;for(o=s=h=kn(h.minus(br),h.plus(br),l),c=Ye(h.times(h),l),i=3;;){if(s=Ye(s.times(c),l),u=o.plus(kn(s,new b(i),l)),an(u.d).slice(0,l)===an(o.d).slice(0,l))return o=o.times(2),a!==0&&(o=o.plus(Xd(b,l+2,y).times(a+""))),o=kn(o,new b(f),l),b.precision=y,t==null?(st=!0,Ye(o,y)):o;o=u,i+=2}}function Ex(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=is(r/rt),e.d=[],n=(r+1)%rt,r<0&&(n+=rt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=rt;n<i;)e.d.push(+t.slice(n,n+=rt));t=t.slice(n),n=rt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),st&&(e.e>Pl||e.e<-Pl))throw Error(h0+r)}else e.s=0,e.e=0,e.d=[0];return e}function Ye(e,t,r){var n,i,a,s,o,u,l,c,f=e.d;for(s=1,a=f[0];a>=10;a/=10)s++;if(n=t-s,n<0)n+=rt,i=t,l=f[c=0];else{if(c=Math.ceil((n+1)/rt),a=f.length,c>=a)return e;for(l=a=f[c],s=1;a>=10;a/=10)s++;n%=rt,i=n-rt+s}if(r!==void 0&&(a=ki(10,s-i-1),o=l/a%10|0,u=t<0||f[c+1]!==void 0||l%a,u=r<4?(o||u)&&(r==0||r==(e.s<0?3:2)):o>5||o==5&&(r==4||u||r==6&&(n>0?i>0?l/ki(10,s-i):0:f[c-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return u?(a=vt(e),f.length=1,t=t-a-1,f[0]=ki(10,(rt-t%rt)%rt),e.e=is(-t/rt)||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=ki(10,rt-n),f[c]=i>0?(l/ki(10,s-i)%ki(10,i)|0)*a:0),u)for(;;)if(c==0){(f[0]+=a)==It&&(f[0]=1,++e.e);break}else{if(f[c]+=a,f[c]!=It)break;f[c--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(st&&(e.e>Pl||e.e<-Pl))throw Error(h0+vt(e));return e}function US(e,t){var r,n,i,a,s,o,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),st?Ye(t,h):t;if(u=e.d,f=t.d,n=t.e,l=e.e,u=u.slice(),s=l-n,s){for(c=s<0,c?(r=u,s=-s,o=f.length):(r=f,n=l,o=u.length),i=Math.max(Math.ceil(h/rt),o)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=u.length,o=f.length,c=i<o,c&&(o=i),i=0;i<o;i++)if(u[i]!=f[i]){c=u[i]<f[i];break}s=0}for(c&&(r=u,u=f,f=r,t.s=-t.s),o=u.length,i=f.length-o;i>0;--i)u[o++]=0;for(i=f.length;i>s;){if(u[--i]<f[i]){for(a=i;a&&u[--a]===0;)u[a]=It-1;--u[a],u[i]+=It}u[i]-=f[i]}for(;u[--o]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(t.d=u,t.e=n,st?Ye(t,h):t):new d(0)}function qi(e,t,r){var n,i=vt(e),a=an(e.d),s=a.length;return t?(r&&(n=r-s)>0?a=a.charAt(0)+"."+a.slice(1)+Gn(n):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Gn(-i-1)+a,r&&(n=r-s)>0&&(a+=Gn(n))):i>=s?(a+=Gn(i+1-s),r&&(n=r-i-1)>0&&(a=a+"."+Gn(n))):((n=i+1)<s&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-s)>0&&(i+1===s&&(a+="."),a+=Gn(n))),e.s<0?"-"+a:a}function Tx(e,t){if(e.length>t)return e.length=t,!0}function HS(e){var t,r,n;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Ri+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return Ex(s,a.toString())}else if(typeof a!="string")throw Error(Ri+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,KV.test(a))Ex(s,a);else throw Error(Ri+a)}if(i.prototype=ie,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=HS,i.config=i.set=GV,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 GV(e){if(!e||typeof e!="object")throw Error(Lr+"Object expected");var t,r,n,i=["precision",1,ns,"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(is(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ri+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ri+r+": "+n);return this}var p0=HS(YV);br=new p0(1);const De=p0;function zS(e){var t;return e===0?t=1:t=Math.floor(new De(e).abs().log(10).toNumber())+1,t}function qS(e,t,r){for(var n=new De(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}var WS=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},m0=(e,t,r)=>{if(e.lte(0))return new De(0);var n=zS(e.toNumber()),i=new De(10).pow(n),a=e.div(i),s=n!==1?.05:.1,o=new De(Math.ceil(a.div(s).toNumber())).add(r).mul(s),u=o.mul(i);return t?new De(u.toNumber()):new De(Math.ceil(u.toNumber()))},VS=(e,t,r)=>{var n;if(e.lte(0))return new De(0);var i=[1,2,2.5,5],a=e.toNumber(),s=Math.floor(new De(a).abs().log(10).toNumber()),o=new De(10).pow(s),u=e.div(o).toNumber(),l=i.findIndex(h=>h>=u-1e-10);if(l===-1&&(o=o.mul(10),l=0),l+=r,l>=i.length){var c=Math.floor(l/i.length);l%=i.length,o=o.mul(new De(10).pow(c))}var f=(n=i[l])!==null&&n!==void 0?n:1,d=new De(f).mul(o);return t?d:new De(Math.ceil(d.toNumber()))},XV=(e,t,r)=>{var n=new De(1),i=new De(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new De(10).pow(zS(e)-1),i=new De(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new De(Math.floor(e)))}else e===0?i=new De(Math.floor((t-1)/2)):r||(i=new De(Math.floor(e)));for(var s=Math.floor((t-1)/2),o=[],u=0;u<t;u++)o.push(i.add(new De(u-s).mul(n)).toNumber());return o},YS=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:m0;if(!Number.isFinite((r-t)/(n-1)))return{step:new De(0),tickMin:new De(0),tickMax:new De(0)};var o=s(new De(r).sub(t).div(n-1),i,a),u;t<=0&&r>=0?u=new De(0):(u=new De(t).add(r).div(2),u=u.sub(new De(u).mod(o)));var l=Math.ceil(u.sub(t).div(o).toNumber()),c=Math.ceil(new De(r).sub(u).div(o).toNumber()),f=l+c+1;return f>n?YS(t,r,n,i,a+1,s):(f<n&&(c=r>0?c+(n-f):c,l=r>0?l:l+(n-f)),{step:o,tickMin:u.sub(new De(l).mul(o)),tickMax:u.add(new De(c).mul(o))})},wx=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,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",o=Math.max(i,2),[u,l]=WS([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 XV(u,i,a);var f=s==="snap125"?VS:m0,{step:d,tickMin:h,tickMax:p}=YS(u,l,o,a,0,f),b=qS(h,p.add(new De(.1).mul(d)),d);return r>n?b.reverse():b},Ax=function(t,r){var[n,i]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[o,u]=WS([n,i]);if(o===-1/0||u===1/0)return[n,i];if(o===u)return[o];var l=s==="snap125"?VS:m0,c=Math.max(r,2),f=l(new De(u).sub(o).div(c-1),a,0),d=[...qS(new De(o),new De(u),f),u];return a===!1&&(d=d.map(h=>Math.round(h))),n>i?d.reverse():d},KS=e=>e.rootProps.maxBarSize,ZV=e=>e.rootProps.barGap,GS=e=>e.rootProps.barCategoryGap,QV=e=>e.rootProps.barSize,Vc=e=>e.rootProps.stackOffset,XS=e=>e.rootProps.reverseStackOrder,g0=e=>e.options.chartName,b0=e=>e.rootProps.syncId,ZS=e=>e.rootProps.syncMethod,y0=e=>e.options.eventEmitter,yt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},vi={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Qr={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Yc=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Kc(e,t,r){if(r!=="auto")return r;if(e!=null)return Rn(e,t)?"category":"number"}function kx(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 Dl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kx(Object(r),!0).forEach(function(n){JV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JV(e,t,r){return(t=eY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eY(e){var t=tY(e,"string");return typeof t=="symbol"?t:t+""}function tY(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 _x={allowDataOverflow:vi.allowDataOverflow,allowDecimals:vi.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:vi.angleAxisId,includeHidden:!1,name:void 0,reversed:vi.reversed,scale:vi.scale,tick:vi.tick,tickCount:void 0,ticks:void 0,type:vi.type,unit:void 0,niceTicks:"auto"},Sx={allowDataOverflow:Qr.allowDataOverflow,allowDecimals:Qr.allowDecimals,allowDuplicatedCategory:Qr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Qr.radiusAxisId,includeHidden:Qr.includeHidden,name:void 0,reversed:Qr.reversed,scale:Qr.scale,tick:Qr.tick,tickCount:Qr.tickCount,ticks:void 0,type:Qr.type,unit:void 0,niceTicks:"auto"},rY=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},v0=B([rY,yS],(e,t)=>{var r;if(e!=null)return e;var n=(r=Kc(t,"angleAxis",_x.type))!==null&&r!==void 0?r:"category";return Dl(Dl({},_x),{},{type:n})}),nY=(e,t)=>e.polarAxis.radiusAxis[t],x0=B([nY,yS],(e,t)=>{var r;if(e!=null)return e;var n=(r=Kc(t,"radiusAxis",Sx.type))!==null&&r!==void 0?r:"category";return Dl(Dl({},Sx),{},{type:n})}),Gc=e=>e.polarOptions,E0=B([Ln,Mn,Nt],CV),QS=B([Gc,E0],(e,t)=>{if(e!=null)return Wr(e.innerRadius,t,0)}),JS=B([Gc,E0],(e,t)=>{if(e!=null)return Wr(e.outerRadius,t,t*.8)}),iY=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},eC=B([Gc],iY);B([v0,eC],Yc);var tC=B([E0,QS,JS],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});B([x0,tC],Yc);var rC=B([He,Gc,QS,JS,Ln,Mn],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:s,cy:o,startAngle:u,endAngle:l}=t;return{cx:Wr(s,i,i/2),cy:Wr(o,a,a/2),innerRadius:r,outerRadius:n,startAngle:u,endAngle:l,clockWise:!1}}}),Dt=(e,t)=>t,Xc=(e,t,r)=>r;function T0(e){return e?.id}function nC(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,s=new Map;return e.forEach(o=>{var u,l=(u=o.data)!==null&&u!==void 0?u:n;if(!(l==null||l.length===0)){var c=T0(o);l.forEach((f,d)=>{var h=a==null||i?d:String(gt(f,a,null)),p=gt(f,o.dataKey,0),b;s.has(h)?b=s.get(h):b={},Object.assign(b,{[c]:p}),s.set(h,b)})}}),Array.from(s.values())}function Zc(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Qc=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Jc(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function aY(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 Rt=e=>{var t=He(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},as=e=>e.tooltip.settings.axisId;function w0(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 s(){return a.apply(this,arguments)}return s.toString=function(){return a.toString()},s})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(a){var s=i[0],o=i[1];return s<=o?a>=s&&a<=o:a>=o&&a<=s},bandwidth:r?()=>r.call(e):void 0,ticks:t?a=>t.call(e,a):void 0,map:(a,s)=>{var o=e(a);if(o!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var u=e.bandwidth();switch(s.position){case"middle":o+=u/2;break;case"end":o+=u;break}}return o}}}}}var sY=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!sn(t)){for(var r,n,i=0;i<t.length;i++){var a=t[i];ke(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 ti(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function oY(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function A0(e){let t,r,n;e.length!==2?(t=ti,r=(o,u)=>ti(e(o),u),n=(o,u)=>e(o)-u):(t=e===ti||e===oY?e:uY,r=e,n=e);function i(o,u,l=0,c=o.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;r(o[f],u)<0?l=f+1:c=f}while(l<c)}return l}function a(o,u,l=0,c=o.length){if(l<c){if(t(u,u)!==0)return c;do{const f=l+c>>>1;r(o[f],u)<=0?l=f+1:c=f}while(l<c)}return l}function s(o,u,l=0,c=o.length){const f=i(o,u,l,c-1);return f>l&&n(o[f-1],u)>-n(o[f],u)?f-1:f}return{left:i,center:s,right:a}}function uY(){return 0}function iC(e){return e===null?NaN:+e}function*lY(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const cY=A0(ti),Zo=cY.right;A0(iC).center;class Cx extends Map{constructor(t,r=hY){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(Ix(this,t))}has(t){return super.has(Ix(this,t))}set(t,r){return super.set(fY(this,t),r)}delete(t){return super.delete(dY(this,t))}}function Ix({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function fY({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function dY({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function hY(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pY(e=ti){if(e===ti)return aC;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 aC(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const mY=Math.sqrt(50),gY=Math.sqrt(10),bY=Math.sqrt(2);function Rl(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=a>=mY?10:a>=gY?5:a>=bY?2:1;let o,u,l;return i<0?(l=Math.pow(10,-i)/s,o=Math.round(e*l),u=Math.round(t*l),o/l<e&&++o,u/l>t&&--u,l=-l):(l=Math.pow(10,i)*s,o=Math.round(e/l),u=Math.round(t/l),o*l<e&&++o,u*l>t&&--u),u<o&&.5<=r&&r<2?Rl(e,t,r*2):[o,u,l]}function Cp(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,s]=n?Rl(t,e,r):Rl(e,t,r);if(!(a>=i))return[];const o=a-i+1,u=new Array(o);if(n)if(s<0)for(let l=0;l<o;++l)u[l]=(a-l)/-s;else for(let l=0;l<o;++l)u[l]=(a-l)*s;else if(s<0)for(let l=0;l<o;++l)u[l]=(i+l)/-s;else for(let l=0;l<o;++l)u[l]=(i+l)*s;return u}function Ip(e,t,r){return t=+t,e=+e,r=+r,Rl(e,t,r)[2]}function Op(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?Ip(t,e,r):Ip(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Ox(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Nx(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function sC(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?aC:pY(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));sC(e,t,h,p,i)}const a=e[t];let s=r,o=n;for(ks(e,r,t),i(e[n],a)>0&&ks(e,r,n);s<o;){for(ks(e,s,o),++s,--o;i(e[s],a)<0;)++s;for(;i(e[o],a)>0;)--o}i(e[r],a)===0?ks(e,r,o):(++o,ks(e,o,n)),o<=t&&(r=o+1),t<=o&&(n=o-1)}return e}function ks(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function yY(e,t,r){if(e=Float64Array.from(lY(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Nx(e);if(t>=1)return Ox(e);var n,i=(n-1)*t,a=Math.floor(i),s=Ox(sC(e,a).subarray(0,a+1)),o=Nx(e.subarray(a+1));return s+(o-s)*(i-a)}}function vY(e,t,r=iC){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),s=+r(e[a],a,e),o=+r(e[a+1],a+1,e);return s+(o-s)*(i-a)}}function xY(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 Mr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function jn(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 Np=Symbol("implicit");function k0(){var e=new Cx,t=[],r=[],n=Np;function i(a){let s=e.get(a);if(s===void 0){if(n!==Np)return n;e.set(a,s=t.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Cx;for(const s of a)e.has(s)||e.set(s,t.push(s)-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 k0(t,r).unknown(n)},Mr.apply(i,arguments),i}function _0(){var e=k0().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,s,o=!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),o&&(a=Math.floor(a)),p+=(b-p-a*(d-u))*c,s=a*(1-u),o&&(p=Math.round(p),s=Math.round(s));var y=xY(d).map(function(x){return p+a*x});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,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(d){return arguments.length?(o=!!d,f()):o},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 _0(t(),[n,i]).round(o).paddingInner(u).paddingOuter(l).align(c)},Mr.apply(f(),arguments)}function oC(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return oC(t())},e}function EY(){return oC(_0.apply(null,arguments).paddingInner(1))}function S0(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function uC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Qo(){}var xo=.7,Ll=1/xo,Na="\\s*([+-]?\\d+)\\s*",Eo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",TY=/^#([0-9a-f]{3,8})$/,wY=new RegExp(`^rgb\\(${Na},${Na},${Na}\\)$`),AY=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),kY=new RegExp(`^rgba\\(${Na},${Na},${Na},${Eo}\\)$`),_Y=new RegExp(`^rgba\\(${on},${on},${on},${Eo}\\)$`),SY=new RegExp(`^hsl\\(${Eo},${on},${on}\\)$`),CY=new RegExp(`^hsla\\(${Eo},${on},${on},${Eo}\\)$`),Px={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};S0(Qo,To,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Dx,formatHex:Dx,formatHex8:IY,formatHsl:OY,formatRgb:Rx,toString:Rx});function Dx(){return this.rgb().formatHex()}function IY(){return this.rgb().formatHex8()}function OY(){return lC(this).formatHsl()}function Rx(){return this.rgb().formatRgb()}function To(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=TY.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Lx(t):r===3?new fr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Su(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Su(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=wY.exec(e))?new fr(t[1],t[2],t[3],1):(t=AY.exec(e))?new fr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=kY.exec(e))?Su(t[1],t[2],t[3],t[4]):(t=_Y.exec(e))?Su(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=SY.exec(e))?Bx(t[1],t[2]/100,t[3]/100,1):(t=CY.exec(e))?Bx(t[1],t[2]/100,t[3]/100,t[4]):Px.hasOwnProperty(e)?Lx(Px[e]):e==="transparent"?new fr(NaN,NaN,NaN,0):null}function Lx(e){return new fr(e>>16&255,e>>8&255,e&255,1)}function Su(e,t,r,n){return n<=0&&(e=t=r=NaN),new fr(e,t,r,n)}function NY(e){return e instanceof Qo||(e=To(e)),e?(e=e.rgb(),new fr(e.r,e.g,e.b,e.opacity)):new fr}function Pp(e,t,r,n){return arguments.length===1?NY(e):new fr(e,t,r,n??1)}function fr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}S0(fr,Pp,uC(Qo,{brighter(e){return e=e==null?Ll:Math.pow(Ll,e),new fr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?xo:Math.pow(xo,e),new fr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fr(Li(this.r),Li(this.g),Li(this.b),Ml(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:Mx,formatHex:Mx,formatHex8:PY,formatRgb:jx,toString:jx}));function Mx(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}`}function PY(){return`#${Ii(this.r)}${Ii(this.g)}${Ii(this.b)}${Ii((isNaN(this.opacity)?1:this.opacity)*255)}`}function jx(){const e=Ml(this.opacity);return`${e===1?"rgb(":"rgba("}${Li(this.r)}, ${Li(this.g)}, ${Li(this.b)}${e===1?")":`, ${e})`}`}function Ml(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Li(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ii(e){return e=Li(e),(e<16?"0":"")+e.toString(16)}function Bx(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Hr(e,t,r,n)}function lC(e){if(e instanceof Hr)return new Hr(e.h,e.s,e.l,e.opacity);if(e instanceof Qo||(e=To(e)),!e)return new Hr;if(e instanceof Hr)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),s=NaN,o=a-i,u=(a+i)/2;return o?(t===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-t)/o+2:s=(t-r)/o+4,o/=u<.5?a+i:2-a-i,s*=60):o=u>0&&u<1?0:s,new Hr(s,o,u,e.opacity)}function DY(e,t,r,n){return arguments.length===1?lC(e):new Hr(e,t,r,n??1)}function Hr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}S0(Hr,DY,uC(Qo,{brighter(e){return e=e==null?Ll:Math.pow(Ll,e),new Hr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?xo:Math.pow(xo,e),new Hr(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 fr(Zd(e>=240?e-240:e+120,i,n),Zd(e,i,n),Zd(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Hr(Fx(this.h),Cu(this.s),Cu(this.l),Ml(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=Ml(this.opacity);return`${e===1?"hsl(":"hsla("}${Fx(this.h)}, ${Cu(this.s)*100}%, ${Cu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fx(e){return e=(e||0)%360,e<0?e+360:e}function Cu(e){return Math.max(0,Math.min(1,e||0))}function Zd(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 C0=e=>()=>e;function RY(e,t){return function(r){return e+r*t}}function LY(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 MY(e){return(e=+e)==1?cC:function(t,r){return r-t?LY(t,r,e):C0(isNaN(t)?r:t)}}function cC(e,t){var r=t-e;return r?RY(e,r):C0(isNaN(e)?t:e)}const $x=(function e(t){var r=MY(t);function n(i,a){var s=r((i=Pp(i)).r,(a=Pp(a)).r),o=r(i.g,a.g),u=r(i.b,a.b),l=cC(i.opacity,a.opacity);return function(c){return i.r=s(c),i.g=o(c),i.b=u(c),i.opacity=l(c),i+""}}return n.gamma=e,n})(1);function jY(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 BY(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FY(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=ss(e[s],t[s]);for(;s<r;++s)a[s]=t[s];return function(o){for(s=0;s<n;++s)a[s]=i[s](o);return a}}function $Y(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function jl(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function UY(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]=ss(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Dp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qd=new RegExp(Dp.source,"g");function HY(e){return function(){return e}}function zY(e){return function(t){return e(t)+""}}function qY(e,t){var r=Dp.lastIndex=Qd.lastIndex=0,n,i,a,s=-1,o=[],u=[];for(e=e+"",t=t+"";(n=Dp.exec(e))&&(i=Qd.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,u.push({i:s,x:jl(n,i)})),r=Qd.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?u[0]?zY(u[0].x):HY(t):(t=u.length,function(l){for(var c=0,f;c<t;++c)o[(f=u[c]).i]=f.x(l);return o.join("")})}function ss(e,t){var r=typeof t,n;return t==null||r==="boolean"?C0(t):(r==="number"?jl:r==="string"?(n=To(t))?(t=n,$x):qY:t instanceof To?$x:t instanceof Date?$Y:BY(t)?jY:Array.isArray(t)?FY:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?UY:jl)(e,t)}function I0(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function WY(e,t){t===void 0&&(t=e,e=ss);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(s){var o=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[o](s-o)}}function VY(e){return function(){return e}}function Bl(e){return+e}var Ux=[0,1];function rr(e){return e}function Rp(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:VY(isNaN(t)?NaN:.5)}function YY(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function KY(e,t,r){var n=e[0],i=e[1],a=t[0],s=t[1];return i<n?(n=Rp(i,n),a=r(s,a)):(n=Rp(n,i),a=r(a,s)),function(o){return a(n(o))}}function GY(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)i[s]=Rp(e[s],e[s+1]),a[s]=r(t[s],t[s+1]);return function(o){var u=Zo(e,o,1,n)-1;return a[u](i[u](o))}}function Jo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ef(){var e=Ux,t=Ux,r=ss,n,i,a,s=rr,o,u,l;function c(){var d=Math.min(e.length,t.length);return s!==rr&&(s=YY(e[0],e[d-1])),o=d>2?GY:KY,u=l=null,f}function f(d){return d==null||isNaN(d=+d)?a:(u||(u=o(e.map(n),t,r)))(n(s(d)))}return f.invert=function(d){return s(i((l||(l=o(t,e.map(n),jl)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,Bl),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=I0,c()},f.clamp=function(d){return arguments.length?(s=d?!0:rr,c()):s!==rr},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 O0(){return ef()(rr,rr)}function XY(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Fl(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 qa(e){return e=Fl(Math.abs(e)),e?e[1]:NaN}function ZY(e,t){return function(r,n){for(var i=r.length,a=[],s=0,o=e[0],u=0;i>0&&o>0&&(u+o+1>n&&(o=Math.max(1,n-u)),a.push(r.substring(i-=o,i+o)),!((u+=o+1)>n));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function QY(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var JY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wo(e){if(!(t=JY.exec(e)))throw new Error("invalid format: "+e);var t;return new N0({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]})}wo.prototype=N0.prototype;function N0(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+""}N0.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 eK(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 $l;function tK(e,t){var r=Fl(e,t);if(!r)return $l=void 0,e.toPrecision(t);var n=r[0],i=r[1],a=i-($l=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Fl(e,Math.max(0,t+a-1))[0]}function Hx(e,t){var r=Fl(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 zx={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:XY,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)=>Hx(e*100,t),r:Hx,s:tK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function qx(e){return e}var Wx=Array.prototype.map,Vx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rK(e){var t=e.grouping===void 0||e.thousands===void 0?qx:ZY(Wx.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?qx:QY(Wx.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f,d){f=wo(f);var h=f.fill,p=f.align,b=f.sign,y=f.symbol,x=f.zero,T=f.width,E=f.comma,k=f.precision,w=f.trim,A=f.type;A==="n"?(E=!0,A="g"):zx[A]||(k===void 0&&(k=12),w=!0,A="g"),(x||h==="0"&&p==="=")&&(x=!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)?s:"")+(d&&d.suffix!==void 0?d.suffix:""),R=zx[A],C=/[defgprs%]/.test(A);k=k===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function M(L){var X=S,U=O,$,q,Y;if(A==="c")U=R(L)+U,L="";else{L=+L;var V=L<0||1/L<0;if(L=isNaN(L)?u:R(Math.abs(L),k),w&&(L=eK(L)),V&&+L==0&&b!=="+"&&(V=!1),X=(V?b==="("?b:o:b==="-"||b==="("?"":b)+X,U=(A==="s"&&!isNaN(L)&&$l!==void 0?Vx[8+$l/3]:"")+U+(V&&b==="("?")":""),C){for($=-1,q=L.length;++$<q;)if(Y=L.charCodeAt($),48>Y||Y>57){U=(Y===46?i+L.slice($+1):L.slice($))+U,L=L.slice(0,$);break}}}E&&!x&&(L=t(L,1/0));var re=X.length+L.length+U.length,N=re<T?new Array(T-re+1).join(h):"";switch(E&&x&&(L=t(N+L,N.length?T-U.length:1/0),N=""),p){case"<":L=X+L+U+N;break;case"=":L=X+N+L+U;break;case"^":L=N.slice(0,re=N.length>>1)+X+L+U+N.slice(re);break;default:L=N+X+L+U;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(qa(d)/3)))*3,p=Math.pow(10,-h),b=l((f=wo(f),f.type="f",f),{suffix:Vx[8+h/3]});return function(y){return b(p*y)}}return{format:l,formatPrefix:c}}var Iu,P0,fC;nK({thousands:",",grouping:[3],currency:["$",""]});function nK(e){return Iu=rK(e),P0=Iu.format,fC=Iu.formatPrefix,Iu}function iK(e){return Math.max(0,-qa(Math.abs(e)))}function aK(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qa(t)/3)))*3-qa(Math.abs(e)))}function sK(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qa(t)-qa(e))+1}function dC(e,t,r,n){var i=Op(e,t,r),a;switch(n=wo(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=aK(i,s))&&(n.precision=a),fC(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=sK(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=iK(i))&&(n.precision=a-(n.type==="%")*2);break}}return P0(n)}function di(e){var t=e.domain;return e.ticks=function(r){var n=t();return Cp(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return dC(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,s=n[i],o=n[a],u,l,c=10;for(o<s&&(l=s,s=o,o=l,l=i,i=a,a=l);c-- >0;){if(l=Ip(s,o,r),l===u)return n[i]=s,n[a]=o,t(n);if(l>0)s=Math.floor(s/l)*l,o=Math.ceil(o/l)*l;else if(l<0)s=Math.ceil(s*l)/l,o=Math.floor(o*l)/l;else break;u=l}return e},e}function hC(){var e=O0();return e.copy=function(){return Jo(e,hC())},Mr.apply(e,arguments),di(e)}function pC(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,Bl),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return pC(e).unknown(t)},e=arguments.length?Array.from(e,Bl):[0,1],di(r)}function mC(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),e[r]=t.floor(i),e[n]=t.ceil(a),e}function Yx(e){return Math.log(e)}function Kx(e){return Math.exp(e)}function oK(e){return-Math.log(-e)}function uK(e){return-Math.exp(-e)}function lK(e){return isFinite(e)?+("1e"+e):e<0?0:e}function cK(e){return e===10?lK:e===Math.E?Math.exp:t=>Math.pow(e,t)}function fK(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 Gx(e){return(t,r)=>-e(-t,r)}function D0(e){const t=e(Yx,Kx),r=t.domain;let n=10,i,a;function s(){return i=fK(n),a=cK(n),r()[0]<0?(i=Gx(i),a=Gx(a),e(oK,uK)):e(Yx,Kx),t}return t.base=function(o){return arguments.length?(n=+o,s()):n},t.domain=function(o){return arguments.length?(r(o),s()):r()},t.ticks=o=>{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=o==null?10:+o;let x=[];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;x.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;x.push(b)}x.length*2<y&&(x=Cp(l,c,y))}else x=Cp(d,h,Math.min(h-d,y)).map(a);return f?x.reverse():x},t.tickFormat=(o,u)=>{if(o==null&&(o=10),u==null&&(u=n===10?"s":","),typeof u!="function"&&(!(n%1)&&(u=wo(u)).precision==null&&(u.trim=!0),u=P0(u)),o===1/0)return u;const l=Math.max(1,n*o/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(mC(r(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),t}function gC(){const e=D0(ef()).domain([1,10]);return e.copy=()=>Jo(e,gC()).base(e.base()),Mr.apply(e,arguments),e}function Xx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Zx(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function R0(e){var t=1,r=e(Xx(t),Zx(t));return r.constant=function(n){return arguments.length?e(Xx(t=+n),Zx(t)):t},di(r)}function bC(){var e=R0(ef());return e.copy=function(){return Jo(e,bC()).constant(e.constant())},Mr.apply(e,arguments)}function Qx(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function dK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hK(e){return e<0?-e*e:e*e}function L0(e){var t=e(rr,rr),r=1;function n(){return r===1?e(rr,rr):r===.5?e(dK,hK):e(Qx(r),Qx(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},di(t)}function M0(){var e=L0(ef());return e.copy=function(){return Jo(e,M0()).exponent(e.exponent())},Mr.apply(e,arguments),e}function pK(){return M0.apply(null,arguments).exponent(.5)}function Jx(e){return Math.sign(e)*e*e}function mK(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function yC(){var e=O0(),t=[0,1],r=!1,n;function i(a){var s=mK(e(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return e.invert(Jx(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,Bl)).map(Jx)),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 yC(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Mr.apply(i,arguments),di(i)}function vC(){var e=[],t=[],r=[],n;function i(){var s=0,o=Math.max(1,t.length);for(r=new Array(o-1);++s<o;)r[s-1]=vY(e,s/o);return a}function a(s){return s==null||isNaN(s=+s)?n:t[Zo(r,s)]}return a.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?r[o-1]:e[0],o<r.length?r[o]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(ti),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return vC().domain(e).range(t).unknown(n)},Mr.apply(a,arguments)}function xC(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function s(u){return u!=null&&u<=u?i[Zo(n,u,0,r)]:a}function o(){var u=-1;for(n=new Array(r);++u<r;)n[u]=((u+1)*t-(u-r)*e)/(r+1);return s}return s.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,o()):[e,t]},s.range=function(u){return arguments.length?(r=(i=Array.from(u)).length-1,o()):i.slice()},s.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]]},s.unknown=function(u){return arguments.length&&(a=u),s},s.thresholds=function(){return n.slice()},s.copy=function(){return xC().domain([e,t]).range(i).unknown(a)},Mr.apply(di(s),arguments)}function EC(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[Zo(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 s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return EC().domain(e).range(t).unknown(r)},Mr.apply(i,arguments)}const Jd=new Date,eh=new Date;function kt(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 s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const u=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return u;let l;do u.push(l=new Date(+a)),t(a,o),e(a);while(l<a&&a<s);return u},i.filter=a=>kt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),r&&(i.count=(a,s)=>(Jd.setTime(+a),eh.setTime(+s),e(Jd),e(eh),Math.floor(r(Jd,eh))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?s=>n(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Ul=kt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ul.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?kt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Ul);Ul.range;const wn=1e3,Rr=wn*60,An=Rr*60,Cn=An*24,j0=Cn*7,eE=Cn*30,th=Cn*365,Oi=kt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*wn)},(e,t)=>(t-e)/wn,e=>e.getUTCSeconds());Oi.range;const B0=kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wn)},(e,t)=>{e.setTime(+e+t*Rr)},(e,t)=>(t-e)/Rr,e=>e.getMinutes());B0.range;const F0=kt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Rr)},(e,t)=>(t-e)/Rr,e=>e.getUTCMinutes());F0.range;const $0=kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*wn-e.getMinutes()*Rr)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getHours());$0.range;const U0=kt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*An)},(e,t)=>(t-e)/An,e=>e.getUTCHours());U0.range;const eu=kt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Rr)/Cn,e=>e.getDate()-1);eu.range;const tf=kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Cn,e=>e.getUTCDate()-1);tf.range;const TC=kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Cn,e=>Math.floor(e/Cn));TC.range;function Ji(e){return kt(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())*Rr)/j0)}const rf=Ji(0),Hl=Ji(1),gK=Ji(2),bK=Ji(3),Wa=Ji(4),yK=Ji(5),vK=Ji(6);rf.range;Hl.range;gK.range;bK.range;Wa.range;yK.range;vK.range;function ea(e){return kt(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)/j0)}const nf=ea(0),zl=ea(1),xK=ea(2),EK=ea(3),Va=ea(4),TK=ea(5),wK=ea(6);nf.range;zl.range;xK.range;EK.range;Va.range;TK.range;wK.range;const H0=kt(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());H0.range;const z0=kt(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());z0.range;const In=kt(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());In.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:kt(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)});In.range;const On=kt(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());On.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:kt(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)});On.range;function wC(e,t,r,n,i,a){const s=[[Oi,1,wn],[Oi,5,5*wn],[Oi,15,15*wn],[Oi,30,30*wn],[a,1,Rr],[a,5,5*Rr],[a,15,15*Rr],[a,30,30*Rr],[i,1,An],[i,3,3*An],[i,6,6*An],[i,12,12*An],[n,1,Cn],[n,2,2*Cn],[r,1,j0],[t,1,eE],[t,3,3*eE],[e,1,th]];function o(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=A0(([,,y])=>y).right(s,d);if(h===s.length)return e.every(Op(l/th,c/th,f));if(h===0)return Ul.every(Math.max(Op(l,c,f),1));const[p,b]=s[d/s[h-1][2]<s[h][2]/d?h-1:h];return p.every(b)}return[o,u]}const[AK,kK]=wC(On,z0,nf,TC,U0,F0),[_K,SK]=wC(In,H0,rf,eu,$0,B0);function rh(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 nh(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 _s(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function CK(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,u=e.shortMonths,l=Ss(i),c=Cs(i),f=Ss(a),d=Cs(a),h=Ss(s),p=Cs(s),b=Ss(o),y=Cs(o),x=Ss(u),T=Cs(u),E={a:Y,A:V,b:re,B:N,c:null,d:sE,e:sE,f:ZK,g:oG,G:lG,H:KK,I:GK,j:XK,L:AC,m:QK,M:JK,p:ye,q:pe,Q:lE,s:cE,S:eG,u:tG,U:rG,V:nG,w:iG,W:aG,x:null,X:null,y:sG,Y:uG,Z:cG,"%":uE},k={a:P,A:ge,b:Oe,B:he,c:null,d:oE,e:oE,f:pG,g:AG,G:_G,H:fG,I:dG,j:hG,L:_C,m:mG,M:gG,p:Te,q:ve,Q:lE,s:cE,S:bG,u:yG,U:vG,V:xG,w:EG,W:TG,x:null,X:null,y:wG,Y:kG,Z:SG,"%":uE},w={a:C,A:M,b:L,B:X,c:U,d:iE,e:iE,f:qK,g:nE,G:rE,H:aE,I:aE,j:$K,L:zK,m:FK,M:UK,p:R,q:BK,Q:VK,s:YK,S:HK,u:DK,U:RK,V:LK,w:PK,W:MK,x:$,X:q,y:nE,Y:rE,Z:jK,"%":WK};E.x=A(r,E),E.X=A(n,E),E.c=A(t,E),k.x=A(r,k),k.X=A(n,k),k.c=A(t,k);function A(J,Z){return function(fe){var W=[],Qe=-1,we=0,Ge=J.length,ze,St,xe;for(fe instanceof Date||(fe=new Date(+fe));++Qe<Ge;)J.charCodeAt(Qe)===37&&(W.push(J.slice(we,Qe)),(St=tE[ze=J.charAt(++Qe)])!=null?ze=J.charAt(++Qe):St=ze==="e"?" ":"0",(xe=Z[ze])&&(ze=xe(fe,St)),W.push(ze),we=Qe+1);return W.push(J.slice(we,Qe)),W.join("")}}function S(J,Z){return function(fe){var W=_s(1900,void 0,1),Qe=O(W,J,fe+="",0),we,Ge;if(Qe!=fe.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(Z&&!("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?(we=nh(_s(W.y,0,1)),Ge=we.getUTCDay(),we=Ge>4||Ge===0?zl.ceil(we):zl(we),we=tf.offset(we,(W.V-1)*7),W.y=we.getUTCFullYear(),W.m=we.getUTCMonth(),W.d=we.getUTCDate()+(W.w+6)%7):(we=rh(_s(W.y,0,1)),Ge=we.getDay(),we=Ge>4||Ge===0?Hl.ceil(we):Hl(we),we=eu.offset(we,(W.V-1)*7),W.y=we.getFullYear(),W.m=we.getMonth(),W.d=we.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),Ge="Z"in W?nh(_s(W.y,0,1)).getUTCDay():rh(_s(W.y,0,1)).getDay(),W.m=0,W.d="W"in W?(W.w+6)%7+W.W*7-(Ge+5)%7:W.w+W.U*7-(Ge+6)%7);return"Z"in W?(W.H+=W.Z/100|0,W.M+=W.Z%100,nh(W)):rh(W)}}function O(J,Z,fe,W){for(var Qe=0,we=Z.length,Ge=fe.length,ze,St;Qe<we;){if(W>=Ge)return-1;if(ze=Z.charCodeAt(Qe++),ze===37){if(ze=Z.charAt(Qe++),St=w[ze in tE?Z.charAt(Qe++):ze],!St||(W=St(J,fe,W))<0)return-1}else if(ze!=fe.charCodeAt(W++))return-1}return W}function R(J,Z,fe){var W=l.exec(Z.slice(fe));return W?(J.p=c.get(W[0].toLowerCase()),fe+W[0].length):-1}function C(J,Z,fe){var W=h.exec(Z.slice(fe));return W?(J.w=p.get(W[0].toLowerCase()),fe+W[0].length):-1}function M(J,Z,fe){var W=f.exec(Z.slice(fe));return W?(J.w=d.get(W[0].toLowerCase()),fe+W[0].length):-1}function L(J,Z,fe){var W=x.exec(Z.slice(fe));return W?(J.m=T.get(W[0].toLowerCase()),fe+W[0].length):-1}function X(J,Z,fe){var W=b.exec(Z.slice(fe));return W?(J.m=y.get(W[0].toLowerCase()),fe+W[0].length):-1}function U(J,Z,fe){return O(J,t,Z,fe)}function $(J,Z,fe){return O(J,r,Z,fe)}function q(J,Z,fe){return O(J,n,Z,fe)}function Y(J){return s[J.getDay()]}function V(J){return a[J.getDay()]}function re(J){return u[J.getMonth()]}function N(J){return o[J.getMonth()]}function ye(J){return i[+(J.getHours()>=12)]}function pe(J){return 1+~~(J.getMonth()/3)}function P(J){return s[J.getUTCDay()]}function ge(J){return a[J.getUTCDay()]}function Oe(J){return u[J.getUTCMonth()]}function he(J){return o[J.getUTCMonth()]}function Te(J){return i[+(J.getUTCHours()>=12)]}function ve(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var Z=A(J+="",E);return Z.toString=function(){return J},Z},parse:function(J){var Z=S(J+="",!1);return Z.toString=function(){return J},Z},utcFormat:function(J){var Z=A(J+="",k);return Z.toString=function(){return J},Z},utcParse:function(J){var Z=S(J+="",!0);return Z.toString=function(){return J},Z}}}var tE={"-":"",_:" ",0:"0"},Lt=/^\s*\d+/,IK=/^%/,OK=/[\\^$*+?|[\]().{}]/g;function je(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 NK(e){return e.replace(OK,"\\$&")}function Ss(e){return new RegExp("^(?:"+e.map(NK).join("|")+")","i")}function Cs(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function PK(e,t,r){var n=Lt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function DK(e,t,r){var n=Lt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function RK(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function LK(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function MK(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function rE(e,t,r){var n=Lt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function nE(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function jK(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 BK(e,t,r){var n=Lt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function FK(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function iE(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function $K(e,t,r){var n=Lt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function aE(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function UK(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function HK(e,t,r){var n=Lt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function zK(e,t,r){var n=Lt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function qK(e,t,r){var n=Lt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function WK(e,t,r){var n=IK.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function VK(e,t,r){var n=Lt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function YK(e,t,r){var n=Lt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function sE(e,t){return je(e.getDate(),t,2)}function KK(e,t){return je(e.getHours(),t,2)}function GK(e,t){return je(e.getHours()%12||12,t,2)}function XK(e,t){return je(1+eu.count(In(e),e),t,3)}function AC(e,t){return je(e.getMilliseconds(),t,3)}function ZK(e,t){return AC(e,t)+"000"}function QK(e,t){return je(e.getMonth()+1,t,2)}function JK(e,t){return je(e.getMinutes(),t,2)}function eG(e,t){return je(e.getSeconds(),t,2)}function tG(e){var t=e.getDay();return t===0?7:t}function rG(e,t){return je(rf.count(In(e)-1,e),t,2)}function kC(e){var t=e.getDay();return t>=4||t===0?Wa(e):Wa.ceil(e)}function nG(e,t){return e=kC(e),je(Wa.count(In(e),e)+(In(e).getDay()===4),t,2)}function iG(e){return e.getDay()}function aG(e,t){return je(Hl.count(In(e)-1,e),t,2)}function sG(e,t){return je(e.getFullYear()%100,t,2)}function oG(e,t){return e=kC(e),je(e.getFullYear()%100,t,2)}function uG(e,t){return je(e.getFullYear()%1e4,t,4)}function lG(e,t){var r=e.getDay();return e=r>=4||r===0?Wa(e):Wa.ceil(e),je(e.getFullYear()%1e4,t,4)}function cG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+je(t/60|0,"0",2)+je(t%60,"0",2)}function oE(e,t){return je(e.getUTCDate(),t,2)}function fG(e,t){return je(e.getUTCHours(),t,2)}function dG(e,t){return je(e.getUTCHours()%12||12,t,2)}function hG(e,t){return je(1+tf.count(On(e),e),t,3)}function _C(e,t){return je(e.getUTCMilliseconds(),t,3)}function pG(e,t){return _C(e,t)+"000"}function mG(e,t){return je(e.getUTCMonth()+1,t,2)}function gG(e,t){return je(e.getUTCMinutes(),t,2)}function bG(e,t){return je(e.getUTCSeconds(),t,2)}function yG(e){var t=e.getUTCDay();return t===0?7:t}function vG(e,t){return je(nf.count(On(e)-1,e),t,2)}function SC(e){var t=e.getUTCDay();return t>=4||t===0?Va(e):Va.ceil(e)}function xG(e,t){return e=SC(e),je(Va.count(On(e),e)+(On(e).getUTCDay()===4),t,2)}function EG(e){return e.getUTCDay()}function TG(e,t){return je(zl.count(On(e)-1,e),t,2)}function wG(e,t){return je(e.getUTCFullYear()%100,t,2)}function AG(e,t){return e=SC(e),je(e.getUTCFullYear()%100,t,2)}function kG(e,t){return je(e.getUTCFullYear()%1e4,t,4)}function _G(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Va(e):Va.ceil(e),je(e.getUTCFullYear()%1e4,t,4)}function SG(){return"+0000"}function uE(){return"%"}function lE(e){return+e}function cE(e){return Math.floor(+e/1e3)}var pa,CC,IC;CG({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 CG(e){return pa=CK(e),CC=pa.format,pa.parse,IC=pa.utcFormat,pa.utcParse,pa}function IG(e){return new Date(e)}function OG(e){return e instanceof Date?+e:+new Date(+e)}function q0(e,t,r,n,i,a,s,o,u,l){var c=O0(),f=c.invert,d=c.domain,h=l(".%L"),p=l(":%S"),b=l("%I:%M"),y=l("%I %p"),x=l("%a %d"),T=l("%b %d"),E=l("%B"),k=l("%Y");function w(A){return(u(A)<A?h:o(A)<A?p:s(A)<A?b:a(A)<A?y:n(A)<A?i(A)<A?x:T:r(A)<A?E:k)(A)}return c.invert=function(A){return new Date(f(A))},c.domain=function(A){return arguments.length?d(Array.from(A,OG)):d().map(IG)},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(mC(S,A)):c},c.copy=function(){return Jo(c,q0(e,t,r,n,i,a,s,o,u,l))},c}function NG(){return Mr.apply(q0(_K,SK,In,H0,rf,eu,$0,B0,Oi,CC).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function PG(){return Mr.apply(q0(AK,kK,On,z0,nf,tf,U0,F0,Oi,IC).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function af(){var e=0,t=1,r,n,i,a,s=rr,o=!1,u;function l(f){return f==null||isNaN(f=+f)?u:s(i===0?.5:(f=(a(f)-r)*i,o?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?(o=!!f,l):o},l.interpolator=function(f){return arguments.length?(s=f,l):s};function c(f){return function(d){var h,p;return arguments.length?([h,p]=d,s=f(h,p),l):[s(0),s(1)]}}return l.range=c(ss),l.rangeRound=c(I0),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 hi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function OC(){var e=di(af()(rr));return e.copy=function(){return hi(e,OC())},jn.apply(e,arguments)}function NC(){var e=D0(af()).domain([1,10]);return e.copy=function(){return hi(e,NC()).base(e.base())},jn.apply(e,arguments)}function PC(){var e=R0(af());return e.copy=function(){return hi(e,PC()).constant(e.constant())},jn.apply(e,arguments)}function W0(){var e=L0(af());return e.copy=function(){return hi(e,W0()).exponent(e.exponent())},jn.apply(e,arguments)}function DG(){return W0.apply(null,arguments).exponent(.5)}function DC(){var e=[],t=rr;function r(n){if(n!=null&&!isNaN(n=+n))return t((Zo(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(ti),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)=>yY(e,a/n))},r.copy=function(){return DC(t).domain(e)},jn.apply(r,arguments)}function sf(){var e=0,t=.5,r=1,n=1,i,a,s,o,u,l=rr,c,f=!1,d;function h(b){return isNaN(b=+b)?d:(b=.5+((b=+c(b))-a)*(n*b<n*a?o: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),s=c(r=+r),o=i===a?0:.5/(a-i),u=a===s?0:.5/(s-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 x,T,E;return arguments.length?([x,T,E]=y,l=WY(b,[x,T,E]),h):[l(0),l(.5),l(1)]}}return h.range=p(ss),h.rangeRound=p(I0),h.unknown=function(b){return arguments.length?(d=b,h):d},function(b){return c=b,i=b(e),a=b(t),s=b(r),o=i===a?0:.5/(a-i),u=a===s?0:.5/(s-a),n=a<i?-1:1,h}}function RC(){var e=di(sf()(rr));return e.copy=function(){return hi(e,RC())},jn.apply(e,arguments)}function LC(){var e=D0(sf()).domain([.1,1,10]);return e.copy=function(){return hi(e,LC()).base(e.base())},jn.apply(e,arguments)}function MC(){var e=R0(sf());return e.copy=function(){return hi(e,MC()).constant(e.constant())},jn.apply(e,arguments)}function V0(){var e=L0(sf());return e.copy=function(){return hi(e,V0()).exponent(e.exponent())},jn.apply(e,arguments)}function RG(){return V0.apply(null,arguments).exponent(.5)}const jC=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:_0,scaleDiverging:RC,scaleDivergingLog:LC,scaleDivergingPow:V0,scaleDivergingSqrt:RG,scaleDivergingSymlog:MC,scaleIdentity:pC,scaleImplicit:Np,scaleLinear:hC,scaleLog:gC,scaleOrdinal:k0,scalePoint:EY,scalePow:M0,scaleQuantile:vC,scaleQuantize:xC,scaleRadial:yC,scaleSequential:OC,scaleSequentialLog:NC,scaleSequentialPow:W0,scaleSequentialQuantile:DC,scaleSequentialSqrt:DG,scaleSequentialSymlog:PC,scaleSqrt:pK,scaleSymlog:bC,scaleThreshold:EC,scaleTime:NG,scaleUtc:PG,tickFormat:dC},Symbol.toStringTag,{value:"Module"}));function LG(e){var t=jC;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(Uo(e));if(r in t&&typeof t[r]=="function")return t[r]()}function fE(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=LG(e);if(n!=null)return n.domain(t).range(r),n}}function Y0(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?fE(e.scale,r,n):fE(t,r,n)}function MG(e){return"scale".concat(Uo(e))}function jG(e){return MG(e)in jC}var BC=(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 jG(n)?n:"point"}};function BG(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 FC(e,t){if(e){var r=t??e.domain(),n=r.map(a=>{var s;return(s=e(a))!==null&&s!==void 0?s:0}),i=e.range();if(!(r.length===0||i.length<2))return a=>{var s,o,u=BG(n,a);if(u<=0)return r[0];if(u>=r.length)return r[r.length-1];var l=(s=n[u-1])!==null&&s!==void 0?s:0,c=(o=n[u])!==null&&o!==void 0?o:0;return Math.abs(a-l)<=Math.abs(a-c)?r[u-1]:r[u]}}}function FG(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):FC(e,void 0)}function dE(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 ql(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dE(Object(r),!0).forEach(function(n){$G(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $G(e,t,r){return(t=UG(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UG(e){var t=HG(e,"string");return typeof t=="symbol"?t:t+""}function HG(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 Lp=[0,"auto"],Tt={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"},$C=(e,t)=>e.cartesianAxis.xAxis[t],mn=(e,t)=>{var r=$C(e,t);return r??Tt},wt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Lp,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:qo},UC=(e,t)=>e.cartesianAxis.yAxis[t],gn=(e,t)=>{var r=UC(e,t);return r??wt},zG={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:""},K0=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??zG},sr=(e,t,r)=>{switch(t){case"xAxis":return mn(e,r);case"yAxis":return gn(e,r);case"zAxis":return K0(e,r);case"angleAxis":return v0(e,r);case"radiusAxis":return x0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},qG=(e,t,r)=>{switch(t){case"xAxis":return mn(e,r);case"yAxis":return gn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},tu=(e,t,r)=>{switch(t){case"xAxis":return mn(e,r);case"yAxis":return gn(e,r);case"angleAxis":return v0(e,r);case"radiusAxis":return x0(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},HC=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function zC(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 of=e=>e.graphicalItems.cartesianItems,WG=B([Dt,Xc],zC),qC=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),os=B([of,sr,WG],qC,{memoizeOptions:{resultEqualityCheck:Jc}}),WC=B([os],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Zc)),VC=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),VG=B([os],VC),YC=e=>e.map(t=>t.data).filter(Boolean).flat(1),YG=B([os],e=>e.some(t=>!t.data)),KC=B([os],YC,{memoizeOptions:{resultEqualityCheck:Jc}}),GC=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},G0=B([KC,Xo],GC),KG=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:gt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:gt(i,n)}))):e.map(n=>({value:n})),XC=(e,t,r,n,i,a)=>{var{chartData:s=[],dataStartIndex:o,dataEndIndex:u}=n,l=KG(e,t,r);if(i&&t?.dataKey!=null&&a.length>0){var c=s.slice(o,u+1),f=c.map(d=>({value:gt(d,t.dataKey)})).filter(d=>d.value!=null);return[...f,...l]}return l},ru=B([G0,sr,os,Xo,YG,KC],XC);function Pa(e){if(qt(e)||e instanceof Date){var t=Number(e);if(ke(t))return t}}function hE(e){if(Array.isArray(e)){var t=[Pa(e[0]),Pa(e[1])];return sn(t)?t:void 0}var r=Pa(e);if(r!=null)return[r,r]}function dn(e){return e.map(Pa).filter(cr)}function GG(e,t){var r=Pa(e),n=Pa(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var XG=B([ru],e=>e?.map(t=>t.value).sort(GG));function ZC(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ZG(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!cn(t))n=t;else if(Array.isArray(t)){var i=dn(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:dn(r.flatMap(a=>{var s=gt(e,a.dataKey),o,u;if(Array.isArray(s)?[o,u]=s:o=u=s,!(!ke(o)||!ke(u)))return[n-o,n+u]}))}var _t=e=>{var t=Rt(e),r=as(e);return tu(e,t,r)},Ya=B([_t],e=>e?.dataKey),QG=B([WC,Xo,_t],nC),QC=(e,t,r,n)=>{var i={},a=t.reduce((s,o)=>{if(o.stackId==null)return s;var u=s[o.stackId];return u==null&&(u=[]),u.push(o),s[o.stackId]=u,s},i);return Object.fromEntries(Object.entries(a).map(s=>{var[o,u]=s,l=n?[...u].reverse():u,c=l.map(T0);return[o,{stackedData:cq(e,c,r),graphicalItems:l}]}))},Mp=B([QG,WC,Vc,XS],QC),JC=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:a}=t;if(n==null&&r!=="zAxis"){var s=mq(e,i,a);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},JG=B([sr],e=>e.allowDataOverflow),X0=e=>{var t;if(e==null||!("domain"in e))return Lp;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=dn(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:Lp},eI=B([sr],X0),tI=B([eI,JG],jS),eX=B([Mp,Xr,Dt,tI],JC,{memoizeOptions:{resultEqualityCheck:Qc}}),Z0=e=>e.errorBars,tX=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>ZC(r,n)),Wl=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(),s=Math.min(...a),o=Math.max(...a);return[s,o]}},rI=function(t,r,n,i,a){var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,u;if(n.length>0&&n.forEach(l=>{var c,f=l.data!=null?[...l.data]:s,d=(c=i[l.id])===null||c===void 0?void 0:c.filter(h=>ZC(a,h));f.forEach(h=>{var p,b=gt(h,(p=r.dataKey)!==null&&p!==void 0?p:l.dataKey),y=ZG(h,b,d);if(y.length>=2){var x=Math.min(...y),T=Math.max(...y);(o==null||x<o)&&(o=x),(u==null||T>u)&&(u=T)}var E=hE(b);E!=null&&(o=o==null?E[0]:Math.min(o,E[0]),u=u==null?E[1]:Math.max(u,E[1]))})}),r?.dataKey!=null&&n.length===0&&t.forEach(l=>{var c=hE(gt(l,r.dataKey));c!=null&&(o=o==null?c[0]:Math.min(o,c[0]),u=u==null?c[1]:Math.max(u,c[1]))}),ke(o)&&ke(u))return[o,u]},rX=B([G0,sr,VG,Z0,Dt,qV],rI,{memoizeOptions:{resultEqualityCheck:Qc}});function nX(e){var{value:t}=e;if(qt(t)||t instanceof Date)return t}var iX=(e,t,r)=>{var n=e.map(nX).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&g_(n))?MS(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},nI=e=>e.referenceElements.dots,us=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),aX=B([nI,Dt,Xc],us),iI=e=>e.referenceElements.areas,sX=B([iI,Dt,Xc],us),aI=e=>e.referenceElements.lines,oX=B([aI,Dt,Xc],us),sI=(e,t)=>{if(e!=null){var r=dn(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},uX=B(aX,Dt,sI),oI=(e,t)=>{if(e!=null){var r=dn(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)]}},lX=B([sX,Dt],oI);function cX(e){var t;if(e.x!=null)return dn([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:dn(r)}function fX(e){var t;if(e.y!=null)return dn([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:dn(r)}var uI=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?cX(n):fX(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},dX=B([oX,Dt],uI),hX=B(uX,dX,lX,(e,t,r)=>Wl(e,r,t)),lI=(e,t,r,n,i,a,s,o)=>{if(r!=null)return r;var u=s==="vertical"&&o==="xAxis"||s==="horizontal"&&o==="yAxis",l=u?Wl(n,a,i):Wl(a,i);return VV(t,l,e.allowDataOverflow)},pX=B([sr,eI,tI,eX,rX,hX,He,Dt],lI,{memoizeOptions:{resultEqualityCheck:Qc}}),mX=[0,1],cI=(e,t,r,n,i,a,s)=>{if(!((e==null||r==null||r.length===0)&&s===void 0)){var{dataKey:o,type:u}=e,l=Rn(t,a);if(l&&o==null){var c;return MS(0,(c=r?.length)!==null&&c!==void 0?c:0)}return u==="category"?iX(n,e,l):i==="expand"&&!l?mX:s}},Q0=B([sr,He,G0,ru,Vc,Dt,pX],cI),ls=B([sr,HC,g0],BC),fI=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=X0(t),a=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&sn(e)){if(a)return wx(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return Ax(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(a&&sn(e))return wx(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&sn(e))return Ax(e,t.tickCount,t.allowDecimals,"adaptive")}}},J0=B([Q0,tu,ls],fI),dI=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&sn(t)&&Array.isArray(r)&&r.length>0){var i,a,s=t[0],o=(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(s,o),Math.max(u,l)]}return t},gX=B([sr,Q0,J0,Dt],dI),bX=B(ru,sr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(dn(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 s=a-i;if(s===0)return 1/0;for(var o=0;o<n.length-1;o++){var u=n[o],l=n[o+1];if(!(u==null||l==null)){var c=l-u;r=Math.min(r,c)}}return r/s}}),hI=B(bX,He,GS,Nt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!ke(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var s=Wr(r,e*a),o=e*a/2;return o-s-(o-s)/a*s}return 0}),yX=(e,t,r)=>{var n=mn(e,t);return n==null||typeof n.padding!="string"?0:hI(e,"xAxis",t,r,n.padding)},vX=(e,t,r)=>{var n=gn(e,t);return n==null||typeof n.padding!="string"?0:hI(e,"yAxis",t,r,n.padding)},xX=B(mn,yX,(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}}),EX=B(gn,vX,(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}}),TX=B([Nt,xX,$c,Fc,(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]}),wX=B([Nt,He,EX,$c,Fc,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:s}=i;return a?[n.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),nu=(e,t,r,n)=>{var i;switch(t){case"xAxis":return TX(e,r,n);case"yAxis":return wX(e,r,n);case"zAxis":return(i=K0(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return eC(e);case"radiusAxis":return tC(e,r);default:return}},pI=B([sr,nu],Yc),AX=B([ls,gX],sY),eg=B([sr,ls,AX,pI],Y0),mI=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,s=Rn(e,n);if(s&&(i==="number"||a!=="auto"))return t.map(o=>o.value)}},tg=B([He,ru,tu,Dt],mI),ai=B([eg],w0);B([eg],FG);B([eg,XG],FC);B([os,Z0,Dt],tX);function gI(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var uf=(e,t)=>t,lf=(e,t,r)=>r,kX=B(jc,uf,lf,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(gI)),_X=B(Bc,uf,lf,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(gI)),bI=(e,t)=>({width:e.width,height:t.height}),SX=(e,t)=>{var r=typeof t.width=="number"?t.width:qo;return{width:r,height:e.height}},yI=B(Nt,mn,bI),CX=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},IX=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},OX=B(Mn,Nt,kX,uf,lf,(e,t,r,n,i)=>{var a={},s;return r.forEach(o=>{var u=bI(t,o);s==null&&(s=CX(t,n,e));var l=n==="top"&&!i||n==="bottom"&&i;a[o.id]=s-Number(l)*u.height,s+=(l?-1:1)*u.height}),a}),NX=B(Ln,Nt,_X,uf,lf,(e,t,r,n,i)=>{var a={},s;return r.forEach(o=>{var u=SX(t,o);s==null&&(s=IX(t,n,e));var l=n==="left"&&!i||n==="right"&&i;a[o.id]=s-Number(l)*u.width,s+=(l?-1:1)*u.width}),a}),PX=(e,t)=>{var r=mn(e,t);if(r!=null)return OX(e,r.orientation,r.mirror)},DX=B([Nt,mn,PX,(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}}}),RX=(e,t)=>{var r=gn(e,t);if(r!=null)return NX(e,r.orientation,r.mirror)},LX=B([Nt,gn,RX,(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}}}),vI=B(Nt,gn,(e,t)=>{var r=typeof t.width=="number"?t.width:qo;return{width:r,height:e.height}}),pE=(e,t,r)=>{switch(t){case"xAxis":return yI(e,r).width;case"yAxis":return vI(e,r).height;default:return}},xI=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:s}=r,o=Rn(e,n),u=t.map(c=>c.value),l=u.filter(c=>c!=null);if(s&&o&&a==="category"&&i&&g_(l))return u}},rg=B([He,ru,sr,Dt],xI),mE=B([He,qG,ls,ai,rg,tg,nu,J0,Dt],(e,t,r,n,i,a,s,o,u)=>{if(t!=null){var l=Rn(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:o,range:s,realScaleType:r,scale:n}}}),MX=(e,t,r,n,i,a,s,o,u)=>{if(!(t==null||n==null)){var l=Rn(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?lr(a[0]-a[1])*2*p:p;var b=f||i;return b?b.map((y,x)=>{var T=s?s.indexOf(y):y,E=n.map(T);return ke(E)?{index:x,coordinate:E+p,value:y,offset:p}:null}).filter(cr):l&&o?o.map((y,x)=>{var T=n.map(y);return ke(T)?{coordinate:T+p,value:y,index:x,offset:p}:null}).filter(cr):n.ticks?n.ticks(d).map((y,x)=>{var T=n.map(y);return ke(T)?{coordinate:T+p,value:y,index:x,offset:p}:null}).filter(cr):n.domain().map((y,x)=>{var T=n.map(y);return ke(T)?{coordinate:T+p,value:s?s[y]:y,index:x,offset:p}:null}).filter(cr)}},EI=B([He,tu,ls,ai,J0,nu,rg,tg,Dt],MX),jX=(e,t,r,n,i,a,s)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var o=Rn(e,s),{tickCount:u}=t,l=0;return l=s==="angleAxis"&&n?.length>=2?lr(n[0]-n[1])*2*l:l,o&&a?a.map((c,f)=>{var d=r.map(c);return ke(d)?{coordinate:d+l,value:c,index:f,offset:l}:null}).filter(cr):r.ticks?r.ticks(u).map((c,f)=>{var d=r.map(c);return ke(d)?{coordinate:d+l,value:c,index:f,offset:l}:null}).filter(cr):r.domain().map((c,f)=>{var d=r.map(c);return ke(d)?{coordinate:d+l,value:i?i[c]:c,index:f,offset:l}:null}).filter(cr)}},si=B([He,tu,ai,nu,rg,tg,Dt],jX),oi=B(sr,ai,(e,t)=>{if(!(e==null||t==null))return ql(ql({},e),{},{scale:t})}),BX=B([sr,ls,Q0,pI],Y0),FX=B([BX],w0);B((e,t,r)=>K0(e,r),FX,(e,t)=>{if(!(e==null||t==null))return ql(ql({},e),{},{scale:t})});var $X=B([He,jc,Bc],(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}}),UX=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};B([UX],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var a of e){var s=Math.abs(a.coordinate-t);s<n&&(n=s,i=a)}return(r=i)===null||r===void 0?void 0:r.value}});var TI=e=>e.options.defaultTooltipEventType,wI=e=>e.options.validateTooltipEventTypes;function AI(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function iu(e,t){var r=TI(e),n=wI(e);return AI(t,r,n)}function HX(e){return ue(t=>iu(t,e))}var kI=(e,t)=>{var r,n=Number(t);if(!(cn(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},zX=e=>e.tooltip.settings,Zn={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},qX={itemInteraction:{click:Zn,hover:Zn},axisInteraction:{click:Zn,hover:Zn},keyboardInteraction:Zn,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}},_I=Yt({name:"tooltip",initialState:qX,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:tt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Dr(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:tt()},removeTooltipEntrySettings:{reducer(e,t){var r=Dr(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:tt()},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:WX,replaceTooltipEntrySettings:VX,removeTooltipEntrySettings:YX,setTooltipSettingsState:KX,setActiveMouseOverItemIndex:SI,mouseLeaveItem:GX,mouseLeaveChart:CI,setActiveClickItemIndex:XX,setMouseOverAxisIndex:II,setMouseClickAxisIndex:ZX,setSyncInteraction:js,setKeyboardInteraction:Vl}=_I.actions,QX=_I.reducer;function gE(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 Ou(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gE(Object(r),!0).forEach(function(n){JX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JX(e,t,r){return(t=eZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eZ(e){var t=tZ(e,"string");return typeof t=="symbol"?t:t+""}function tZ(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 rZ(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function nZ(e){return e.index!=null}var OI=(e,t,r,n)=>{if(t==null)return Zn;var i=rZ(e,t,r);if(i==null)return Zn;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(nZ(i)){if(a)return Ou(Ou({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return Ou(Ou({},Zn),{},{coordinate:i.coordinate})};function iZ(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 aZ(e,t){var r=iZ(e),n=t[0],i=t[1];if(r===void 0)return!1;var a=Math.min(n,i),s=Math.max(n,i);return r>=a&&r<=s}function sZ(e,t,r){if(r==null||t==null)return!0;var n=gt(e,t);return n==null||!sn(r)?!0:aZ(n,r)}var Qs=(e,t,r,n)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!ke(a))return i;var s=0,o=1/0;t.length>0&&(o=t.length-1);var u=Math.max(s,Math.min(a,o)),l=t[u];return l==null||sZ(l,r,n)?String(u):null},NI=(e,t,r,n,i,a,s)=>{if(a!=null){var o=s[0],u=o?.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}}},PI=(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(s=>{var o;return((o=s.settings)===null||o===void 0?void 0:o.graphicalItemId)===i})},DI=e=>e.options.tooltipPayloadSearcher,cs=e=>e.tooltip;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){oZ(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 oZ(e,t,r){return(t=uZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uZ(e){var t=lZ(e,"string");return typeof t=="symbol"?t:t+""}function lZ(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 cZ(e){if(typeof e=="string"||typeof e=="number")return e}function fZ(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function dZ(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function vE(e){if(typeof e=="string")return e}function hZ(e){if(!(e==null||typeof e!="object")){var t="name"in e?cZ(e.name):void 0,r="unit"in e?fZ(e.unit):void 0,n="dataKey"in e?dZ(e.dataKey):void 0,i="payload"in e?e.payload:void 0,a="color"in e?vE(e.color):void 0,s="fill"in e?vE(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:a,fill:s}}}function pZ(e,t){return e??t}var RI=(e,t,r,n,i,a,s)=>{if(!(t==null||a==null)){var{chartData:o,computedData:u,dataStartIndex:l,dataEndIndex:c}=r,f=[];return e.reduce((d,h)=>{var p,{dataDefinedOnItem:b,settings:y}=h,x=pZ(b,o),T=Array.isArray(x)?lS(x,l,c):x,E=(p=y?.dataKey)!==null&&p!==void 0?p:n,k=y?.nameKey,w;if(n&&Array.isArray(T)&&!Array.isArray(T[0])&&s==="axis"?w=b_(T,n,i):w=a(T,t,u,k),Array.isArray(w))w.forEach(S=>{var O,R,C=hZ(S),M=C?.name,L=C?.dataKey,X=C?.payload,U=yE(yE({},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(y1({tooltipEntrySettings:U,dataKey:L,payload:X,value:gt(X,L),name:M==null?void 0:String(M)}))});else{var A;d.push(y1({tooltipEntrySettings:y,dataKey:E,payload:w,value:gt(w,E),name:(A=gt(w,k))!==null&&A!==void 0?A:y?.name}))}return d},f)}},ng=B([_t,HC,g0],BC),mZ=B([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),gZ=B([Rt,as],zC),ta=B([mZ,_t,gZ],qC,{memoizeOptions:{resultEqualityCheck:Jc}}),bZ=B([ta],e=>e.filter(Zc)),LI=B([ta],YC,{memoizeOptions:{resultEqualityCheck:Jc}}),yZ=B([ta],e=>e.some(t=>!t.data)),Wi=B([LI,Xr],GC),vZ=B([bZ,Xr,_t],nC),ig=B([Wi,_t,ta,Xr,yZ,LI],XC),MI=B([_t],X0),xZ=B([_t],e=>e.allowDataOverflow),jI=B([MI,xZ],jS),EZ=B([ta],e=>e.filter(Zc)),TZ=B([vZ,EZ,Vc,XS],QC),wZ=B([TZ,Xr,Rt,jI],JC),AZ=B([ta],VC),kZ=B([Wi,_t,AZ,Z0,Rt,WV],rI,{memoizeOptions:{resultEqualityCheck:Qc}}),_Z=B([nI,Rt,as],us),SZ=B([_Z,Rt],sI),CZ=B([iI,Rt,as],us),IZ=B([CZ,Rt],oI),OZ=B([aI,Rt,as],us),NZ=B([OZ,Rt],uI),PZ=B([SZ,NZ,IZ],Wl),DZ=B([_t,MI,jI,wZ,kZ,PZ,He,Rt],lI),Ka=B([_t,He,Wi,ig,Vc,Rt,DZ],cI),RZ=B([Ka,_t,ng],fI),LZ=B([_t,Ka,RZ,Rt],dI),BI=e=>{var t=Rt(e),r=as(e),n=!1;return nu(e,t,r,n)},FI=B([_t,BI],Yc),MZ=B([_t,ng,LZ,FI],Y0),$I=B([MZ],w0),jZ=B([He,ig,_t,Rt],xI),BZ=B([He,ig,_t,Rt],mI),FZ=(e,t,r,n,i,a,s,o)=>{if(t){var{type:u}=t,l=Rn(e,o);if(n){var c=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=u==="category"&&n.bandwidth?n.bandwidth()/c:0;return f=o==="angleAxis"&&i!=null&&i?.length>=2?lr(i[0]-i[1])*2*f:f,l&&s?s.map((d,h)=>{var p=n.map(d);return ke(p)?{coordinate:p+f,value:d,index:h,offset:f}:null}).filter(cr):n.domain().map((d,h)=>{var p=n.map(d);return ke(p)?{coordinate:p+f,value:a?a[d]:d,index:h,offset:f}:null}).filter(cr)}}},Bn=B([He,_t,ng,$I,BI,jZ,BZ,Rt],FZ),ag=B([TI,wI,zX],(e,t,r)=>AI(r.shared,e,t)),UI=e=>e.tooltip.settings.trigger,sg=e=>e.tooltip.settings.defaultIndex,au=B([cs,ag,UI,sg],OI),Vi=B([au,Wi,Ya,Ka],Qs),HI=B([Bn,Vi],kI),zI=B([au],e=>{if(e)return e.dataKey}),$Z=B([au],e=>{if(e)return e.graphicalItemId}),qI=B([cs,ag,UI,sg],PI),UZ=B([Ln,Mn,He,Nt,Bn,sg,qI],NI),HZ=B([au,UZ],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),zZ=B([au],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),qZ=B([qI,Vi,Xr,Ya,HI,DI,ag],RI),WZ=B([qZ],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});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){VZ(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 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)}var GZ=()=>ue(_t),XZ=()=>{var e=GZ(),t=ue(Bn),r=ue($I);return Ha(!e||!r?void 0:EE(EE({},e),{},{scale:r}),t)};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 ma(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){ZZ(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 ZZ(e,t,r){return(t=QZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QZ(e){var t=JZ(e,"string");return typeof t=="symbol"?t:t+""}function JZ(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 eQ=(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}},tQ=(e,t,r,n)=>{var i=t.find(l=>l&&l.index===r);if(i){if(e==="centric"){var a=i.coordinate,{radius:s}=n;return ma(ma(ma({},n),Bt(n.cx,n.cy,s,a)),{},{angle:a,radius:s})}var o=i.coordinate,{angle:u}=n;return ma(ma(ma({},n),Bt(n.cx,n.cy,o,u)),{},{angle:u,radius:o})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function rQ(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 WI=(e,t,r,n,i)=>{var a,s=(a=t?.length)!==null&&a!==void 0?a:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var o=0;o<s;o++){var u,l,c,f,d,h=o>0?(u=r[o-1])===null||u===void 0?void 0:u.coordinate:(l=r[s-1])===null||l===void 0?void 0:l.coordinate,p=(c=r[o])===null||c===void 0?void 0:c.coordinate,b=o>=s-1?(f=r[0])===null||f===void 0?void 0:f.coordinate:(d=r[o+1])===null||d===void 0?void 0:d.coordinate,y=void 0;if(!(h==null||p==null||b==null))if(lr(p-h)!==lr(b-p)){var x=[];if(lr(b-p)===lr(i[1]-i[0])){y=b;var T=p+i[1]-i[0];x[0]=Math.min(T,(T+h)/2),x[1]=Math.max(T,(T+h)/2)}else{y=h;var E=b+i[1]-i[0];x[0]=Math.min(p,(E+p)/2),x[1]=Math.max(p,(E+p)/2)}var k=[Math.min(p,(y+p)/2),Math.max(p,(y+p)/2)];if(e>k[0]&&e<=k[1]||e>=x[0]&&e<=x[1]){var w;return(w=r[o])===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[o])===null||O===void 0?void 0:O.index}}}else if(t)for(var R=0;R<s;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===s-1&&L!=null&&e>(C.coordinate+L.coordinate)/2||R>0&&R<s-1&&L!=null&&M!=null&&e>(C.coordinate+L.coordinate)/2&&e<=(C.coordinate+M.coordinate)/2)return C.index}}return-1},nQ=()=>ue(g0),og=(e,t)=>t,VI=(e,t,r)=>r,ug=(e,t,r,n)=>n,iQ=B(Bn,e=>_c(e,t=>t.coordinate)),lg=B([cs,og,VI,ug],OI),cg=B([lg,Wi,Ya,Ka],Qs),aQ=(e,t,r)=>{if(t!=null){var n=cs(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},YI=B([cs,og,VI,ug],PI),Yl=B([Ln,Mn,He,Nt,Bn,ug,YI],NI),sQ=B([lg,Yl],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),KI=B([Bn,cg],kI),oQ=B([YI,cg,Xr,Ya,KI,DI,og],RI),uQ=B([lg,cg],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),lQ=(e,t,r,n,i,a,s)=>{if(!(!e||!r||!n||!i)&&rQ(e,s)){var o=gq(e,t),u=WI(o,a,i,r,n),l=eQ(t,i,u,e);return{activeIndex:String(u),activeCoordinate:l}}},cQ=(e,t,r,n,i,a,s)=>{if(!(!e||!n||!i||!a||!r)){var o=DV(e,r);if(o){var u=bq(o,t),l=WI(u,s,a,n,i),c=tQ(t,a,l,o);return{activeIndex:String(l),activeCoordinate:c}}}},fQ=(e,t,r,n,i,a,s,o)=>{if(!(!e||!t||!n||!i||!a))return t==="horizontal"||t==="vertical"?lQ(e,t,n,i,a,s,o):cQ(e,t,r,n,i,a,s)},dQ=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}}),hQ=B(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(yt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:aY}});function wE(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?wE(Object(r),!0).forEach(function(n){pQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pQ(e,t,r){return(t=mQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mQ(e){var t=gQ(e,"string");return typeof t=="symbol"?t:t+""}function gQ(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 bQ={},yQ={zIndexMap:Object.values(yt).reduce((e,t)=>AE(AE({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),bQ)},vQ=new Set(Object.values(yt));function xQ(e){return vQ.has(e)}var GI=Yt({name:"zIndex",initialState:yQ,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:tt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!xQ(r)&&delete e.zIndexMap[r])},prepare:tt()},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:tt()},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:tt()}}}),{registerZIndexPortal:EQ,unregisterZIndexPortal:ih,registerZIndexPortalElement:TQ,unregisterZIndexPortalElement:wQ}=GI.actions,AQ=GI.reducer;function pr(e){var{zIndex:t,children:r}=e,n=Rq(),i=n&&t!==void 0&&t!==0,a=Pt(),s=m.useRef(void 0),o=m.useRef(new Set),u=nt(),l=ue(f=>dQ(f,t,a));if(m.useLayoutEffect(()=>{if(!i){var f=o.current;f.forEach(h=>{u(ih({zIndex:h}))}),f.clear(),s.current=void 0;return}if(o.current.has(t)||(u(EQ({zIndex:t})),o.current.add(t)),l){s.current=l;var d=o.current;d.forEach(h=>{h!==t&&(u(ih({zIndex:h})),d.delete(h))})}},[u,t,i,l]),m.useLayoutEffect(()=>{var f=o.current;return()=>{f.forEach(d=>{u(ih({zIndex:d}))}),f.clear()}},[u]),!i)return r;var c=l??s.current;return c?Io.createPortal(r,c):null}function jp(){return jp=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},jp.apply(null,arguments)}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 Nu(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){kQ(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 kQ(e,t,r){return(t=_Q(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Q(e){var t=SQ(e,"string");return typeof t=="symbol"?t:t+""}function SQ(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 CQ(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return m.isValidElement(t)?m.cloneElement(t,n):m.createElement(r,n)}function IQ(e){var t,{coordinate:r,payload:n,index:i,offset:a,tooltipAxisBandSize:s,layout:o,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=YW,y=yt.cursorLine;else if(c==="BarChart")p=KW(o,f,a,s),b=f0,y=yt.cursorRectangle;else if(o==="radial"&&x_(f)){var{cx:x,cy:T,radius:E,startAngle:k,endAngle:w}=DS(f);p={cx:x,cy:T,startAngle:k,endAngle:w,innerRadius:E,outerRadius:E},b=LS,y=yt.cursorLine}else p={points:jV(o,f,a)},b=CS,y=yt.cursorLine;var A=typeof u=="object"&&"className"in u?u.className:void 0,S=Nu(Nu(Nu(Nu({stroke:"#ccc",pointerEvents:"none"},a),p),$o(u)),{},{payload:d,payloadIndex:h,className:Fe("recharts-tooltip-cursor",A)});return m.createElement(pr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:y},m.createElement(CQ,{cursor:u,cursorComp:b,cursorProps:S}))}function OQ(e){var t=XZ(),r=pS(),n=Qi(),i=nQ();return t==null||r==null||n==null||i==null?null:m.createElement(IQ,jp({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var XI=m.createContext(null),NQ=()=>m.useContext(XI),ah={exports:{}},_E;function PQ(){return _E||(_E=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 s(u,l){--u._eventsCount===0?u._events=new n:delete u._events[l]}function o(){this._events=new n,this._eventsCount=0}o.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},o.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},o.prototype.listenerCount=function(l){var c=r?r+l:l,f=this._events[c];return f?f.fn?1:f.length:0},o.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],x=arguments.length,T,E;if(y.fn){switch(y.once&&this.removeListener(l,y.fn,void 0,!0),x){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(E=1,T=new Array(x-1);E<x;E++)T[E-1]=arguments[E];y.fn.apply(y.context,T)}else{var k=y.length,w;for(E=0;E<k;E++)switch(y[E].once&&this.removeListener(l,y[E].fn,void 0,!0),x){case 1:y[E].fn.call(y[E].context);break;case 2:y[E].fn.call(y[E].context,c);break;case 3:y[E].fn.call(y[E].context,c,f);break;case 4:y[E].fn.call(y[E].context,c,f,d);break;default:if(!T)for(w=1,T=new Array(x-1);w<x;w++)T[w-1]=arguments[w];y[E].fn.apply(y[E].context,T)}}return!0},o.prototype.on=function(l,c,f){return a(this,l,c,f,!1)},o.prototype.once=function(l,c,f){return a(this,l,c,f,!0)},o.prototype.removeListener=function(l,c,f,d){var h=r?r+l:l;if(!this._events[h])return this;if(!c)return s(this,h),this;var p=this._events[h];if(p.fn)p.fn===c&&(!d||p.once)&&(!f||p.context===f)&&s(this,h);else{for(var b=0,y=[],x=p.length;b<x;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:s(this,h)}return this},o.prototype.removeAllListeners=function(l){var c;return l?(c=r?r+l:l,this._events[c]&&s(this,c)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(ah)),ah.exports}var DQ=PQ();const RQ=Nn(DQ);var Ao=new RQ,Bp="recharts.syncEvent.tooltip",SE="recharts.syncEvent.brush",ZI=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!cn(r))return e[r]}},LQ={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},QI=Yt({name:"options",initialState:LQ,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),MQ=QI.reducer,{createEventEmitter:jQ}=QI.actions;function BQ(e){return e.tooltip.syncInteraction}var FQ={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},JI=Yt({name:"chartData",initialState:FQ,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:CE,setDataStartEndIndexes:$Q,setComputedData:roe}=JI.actions,UQ=JI.reducer,HQ=["x","y"];function IE(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 ga(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IE(Object(r),!0).forEach(function(n){zQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zQ(e,t,r){return(t=qQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qQ(e){var t=WQ(e,"string");return typeof t=="symbol"?t:t+""}function WQ(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 VQ(e,t){if(e==null)return{};var r,n,i=YQ(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 YQ(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 KQ(){var e=ue(b0),t=ue(y0),r=nt(),n=ue(ZS),i=ue(Bn),a=Qi(),s=Wo(),o=ue(u=>u.rootProps.className);m.useEffect(()=>{if(e==null)return rs;var u=(l,c,f)=>{if(t!==f&&e===l){if(c.payload.active===!1){r(js({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(s&&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=VQ(h,HQ),{x,y:T,width:E,height:k}=c.payload.sourceViewBox,w=ga(ga({},y),{},{x:s.x+(E?(p-x)/E:0)*s.width,y:s.y+(k?(b-T)/k:0)*s.height});r(ga(ga({},c),{},{payload:ga(ga({},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||s==null){r(js({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(A==null){r(js({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,s.x+s.width),X=Math.min(M,s.y+s.height),U={x:a==="horizontal"?A.coordinate:L,y:a==="horizontal"?X:A.coordinate},$=js({active:c.payload.active,coordinate:U,dataKey:c.payload.dataKey,index:String(A.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId});r($)}}};return Ao.on(Bp,u),()=>{Ao.off(Bp,u)}},[o,r,t,e,n,i,a,s])}function GQ(){var e=ue(b0),t=ue(y0),r=nt();m.useEffect(()=>{if(e==null)return rs;var n=(i,a,s)=>{t!==s&&e===i&&r($Q(a))};return Ao.on(SE,n),()=>{Ao.off(SE,n)}},[r,t,e])}function XQ(){var e=nt();m.useEffect(()=>{e(jQ())},[e]),KQ(),GQ()}function ZQ(e,t,r,n,i,a){var s=ue(p=>aQ(p,e,t)),o=ue($Z),u=ue(y0),l=ue(b0),c=ue(ZS),f=ue(BQ),d=f?.sourceViewBox!=null,h=Wo();m.useEffect(()=>{if(!d&&l!=null&&u!=null){var p=js({active:a,coordinate:r,dataKey:s,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:h,graphicalItemId:o});Ao.emit(Bp,l,p,u)}},[d,r,s,o,i,n,u,l,c,a,h])}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 NE(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){QQ(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 QQ(e,t,r){return(t=JQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function JQ(e){var t=eJ(e,"string");return typeof t=="symbol"?t:t+""}function eJ(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 tJ(e){return e.dataKey}function rJ(e,t){return m.isValidElement(e)?m.cloneElement(e,t):typeof e=="function"?m.createElement(e,t):m.createElement(TW,t)}var PE=[],nJ={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 eO(e){var t,r,n=$t(e,nJ),{active:i,allowEscapeViewBox:a,animationDuration:s,animationEasing:o,content:u,filterNull:l,isAnimationActive:c,offset:f,payloadUniqBy:d,position:h,reverseDirection:p,useTranslate3d:b,wrapperStyle:y,cursor:x,shared:T,trigger:E,defaultIndex:k,portal:w,axisId:A}=n,S=nt(),O=typeof k=="number"?String(k):k;m.useEffect(()=>{S(KX({shared:T,trigger:E,axisId:A,active:i,defaultIndex:O}))},[S,T,E,A,i,O]);var R=Wo(),C=SS(),M=HX(T),{activeIndex:L,isActive:X}=(t=ue(ve=>uQ(ve,M,E,O)))!==null&&t!==void 0?t:{},U=ue(ve=>oQ(ve,M,E,O)),$=ue(ve=>KI(ve,M,E,O)),q=ue(ve=>sQ(ve,M,E,O)),Y=U,V=NQ(),re=(r=i??X)!==null&&r!==void 0?r:!1,[N,ye]=tz([Y,re]),pe=M==="axis"?$:void 0;ZQ(M,E,q,pe,L,re);var P=w??V;if(P==null||R==null||M==null)return null;var ge=Y??PE;re||(ge=PE),l&&ge.length&&(ge=SH(ge.filter(ve=>ve.value!=null&&(ve.hide!==!0||n.includeHidden)),d,tJ));var Oe=ge.length>0,he=NE(NE({},n),{},{payload:ge,label:pe,active:re,activeIndex:L,coordinate:q,accessibilityLayer:C}),Te=m.createElement(DW,{allowEscapeViewBox:a,animationDuration:s,animationEasing:o,isAnimationActive:c,active:re,coordinate:q,hasPayload:Oe,offset:f,position:h,reverseDirection:p,useTranslate3d:b,viewBox:R,wrapperStyle:y,lastBoundingBox:N,innerRef:ye,hasPortalFromProps:!!w},rJ(u,he));return m.createElement(m.Fragment,null,Io.createPortal(Te,P),re&&m.createElement(OQ,{cursor:x,tooltipEventType:M,coordinate:q,payload:ge,index:L}))}var tO=e=>null;tO.displayName="Cell";function iJ(e,t,r){return(t=aJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aJ(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)}class oJ{constructor(t){iJ(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 DE(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 uJ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DE(Object(r),!0).forEach(function(n){lJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lJ(e,t,r){return(t=cJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cJ(e){var t=fJ(e,"string");return typeof t=="symbol"?t:t+""}function fJ(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 dJ={cacheSize:2e3,enableCache:!0},rO=uJ({},dJ),RE=new oJ(rO.cacheSize),hJ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},LE="recharts_measurement_span";function pJ(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",s=t.letterSpacing||"",o=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(s,"|").concat(o)}var ME=(e,t)=>{try{var r=document.getElementById(LE);r||(r=document.createElement("span"),r.setAttribute("id",LE),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,hJ,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Js=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Go.isSsr)return{width:0,height:0};if(!rO.enableCache)return ME(t,r);var n=pJ(t,r),i=RE.get(n);if(i)return i;var a=ME(t,r);return RE.set(n,a),a},nO;function mJ(e,t,r){return(t=gJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gJ(e){var t=bJ(e,"string");return typeof t=="symbol"?t:t+""}function bJ(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 jE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,BE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,yJ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,vJ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,xJ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},EJ=["cm","mm","pt","pc","in","Q","px"];function TJ(e){return EJ.includes(e)}var Sa="NaN";function wJ(e,t){return e*xJ[t]}class jt{static parse(t){var r,[,n,i]=(r=vJ.exec(t))!==null&&r!==void 0?r:[];return n==null?jt.NaN:new jt(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,cn(t)&&(this.unit=""),r!==""&&!yJ.test(r)&&(this.num=NaN,this.unit=""),TJ(r)&&(this.num=wJ(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new jt(NaN,""):new jt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new jt(NaN,""):new jt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new jt(NaN,""):new jt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new jt(NaN,""):new jt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return cn(this.num)}}nO=jt;mJ(jt,"NaN",new nO(NaN,""));function iO(e){if(e==null||e.includes(Sa))return Sa;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=jE.exec(t))!==null&&r!==void 0?r:[],s=jt.parse(n??""),o=jt.parse(a??""),u=i==="*"?s.multiply(o):s.divide(o);if(u.isNaN())return Sa;t=t.replace(jE,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var l,[,c,f,d]=(l=BE.exec(t))!==null&&l!==void 0?l:[],h=jt.parse(c??""),p=jt.parse(d??""),b=f==="+"?h.add(p):h.subtract(p);if(b.isNaN())return Sa;t=t.replace(BE,b.toString())}return t}var FE=/\(([^()]*)\)/;function AJ(e){for(var t=e,r;(r=FE.exec(t))!=null;){var[,n]=r;t=t.replace(FE,iO(n))}return t}function kJ(e){var t=e.replace(/\s+/g,"");return t=AJ(t),t=iO(t),t}function _J(e){try{return kJ(e)}catch{return Sa}}function sh(e){var t=_J(e.slice(5,-1));return t===Sa?"":t}var SJ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],CJ=["dx","dy","angle","className","breakAll"];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 $E(e,t){if(e==null)return{};var r,n,i=IJ(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 IJ(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 aO=/[ \f\n\r\t\v\u2028\u2029]+/,sO=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];ot(t)||(r?i=t.toString().split(""):i=t.toString().split(aO));var a=i.map(o=>({word:o,width:Js(o,n).width})),s=r?0:Js(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:s}}catch{return null}};function oO(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function OJ(e){return ot(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var uO=(e,t,r,n)=>e.reduce((i,a)=>{var{word:s,width:o}=a,u=i[i.length-1];if(u&&o!=null&&(t==null||n||u.width+o+r<Number(t)))u.words.push(s),u.width+=o+r;else{var l={words:[s],width:o};i.push(l)}return i},[]),lO=e=>e.reduce((t,r)=>t.width>r.width?t:r),NJ="…",UE=(e,t,r,n,i,a,s,o)=>{var u=e.slice(0,t),l=sO({breakAll:r,style:n,children:u+NJ});if(!l)return[!1,[]];var c=uO(l.wordsWithComputedWidth,a,s,o),f=c.length>i||lO(c).width>Number(a);return[f,c]},PJ=(e,t,r,n,i)=>{var{maxLines:a,children:s,style:o,breakAll:u}=e,l=le(a),c=String(s),f=uO(t,n,r,i);if(!l||i)return f;var d=f.length>a||lO(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 x=Math.floor((h+p)/2),T=x-1,[E,k]=UE(c,T,u,o,a,n,r,i),[w]=UE(c,x,u,o,a,n,r,i);if(!E&&!w&&(h=x+1),E&&w&&(p=x-1),!E&&w){y=k;break}b++}return y||f},HE=e=>{var t=ot(e)?[]:e.toString().split(aO);return[{words:t,width:void 0}]},DJ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:s}=e;if((t||r)&&!Go.isSsr){var o,u,l=sO({breakAll:a,children:n,style:i});if(l){var{wordsWithComputedWidth:c,spaceWidth:f}=l;o=c,u=f}else return HE(n);return PJ({breakAll:a,children:n,maxLines:s,style:i},o,u,t,!!r)}return HE(n)},cO="#808080",RJ={angle:0,breakAll:!1,capHeight:"0.71em",fill:cO,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},fg=m.forwardRef((e,t)=>{var r=$t(e,RJ),{x:n,y:i,lineHeight:a,capHeight:s,fill:o,scaleToFit:u,textAnchor:l,verticalAnchor:c}=r,f=$E(r,SJ),d=m.useMemo(()=>DJ({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:x}=f,T=$E(f,CJ);if(!qt(n)||!qt(i)||d.length===0)return null;var E=Number(n)+(le(h)?h:0),k=Number(i)+(le(p)?p:0);if(!ke(E)||!ke(k))return null;var w;switch(c){case"start":w=sh("calc(".concat(s,")"));break;case"middle":w=sh("calc(".concat((d.length-1)/2," * -").concat(a," + (").concat(s," / 2))"));break;default:w=sh("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(le(R)&&le(O)?R/O:1,")"))}return b&&A.push("rotate(".concat(b,", ").concat(E,", ").concat(k,")")),A.length&&(T.transform=A.join(" ")),m.createElement("text",Fp({},Ft(T),{ref:t,x:E,y:k,className:Fe("recharts-text",y),textAnchor:l,fill:o.includes("url")?cO:o}),d.map((C,M)=>{var L=C.words.join(x?"":" ");return m.createElement("tspan",{x:E,dy:M===0?w:a,key:"".concat(L,"-").concat(M)},L)}))});fg.displayName="Text";function zE(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?zE(Object(r),!0).forEach(function(n){LJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LJ(e,t,r){return(t=MJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MJ(e){var t=jJ(e,"string");return typeof t=="symbol"?t:t+""}function jJ(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 BJ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:a,y:s,height:o,upperWidth:u,lowerWidth:l}=u0(t),c=a,f=a+(u-l)/2,d=(c+f)/2,h=(u+l)/2,p=c+u/2,b=o>=0?1:-1,y=b*n,x=b>0?"end":"start",T=b>0?"start":"end",E=u>=0?1:-1,k=E*n,w=E>0?"end":"start",A=E>0?"start":"end",S=i;if(r==="top"){var O={x:c+u/2,y:s-y,horizontalAnchor:"middle",verticalAnchor:x};return S&&(O.height=Math.max(s-S.y,0),O.width=u),O}if(r==="bottom"){var R={x:f+l/2,y:s+o+y,horizontalAnchor:"middle",verticalAnchor:T};return S&&(R.height=Math.max(S.y+S.height-(s+o),0),R.width=l),R}if(r==="left"){var C={x:d-k,y:s+o/2,horizontalAnchor:w,verticalAnchor:"middle"};return S&&(C.width=Math.max(C.x-S.x,0),C.height=o),C}if(r==="right"){var M={x:d+h+k,y:s+o/2,horizontalAnchor:A,verticalAnchor:"middle"};return S&&(M.width=Math.max(S.x+S.width-M.x,0),M.height=o),M}var L=S?{width:h,height:o}:{};return r==="insideLeft"?Jr({x:d+k,y:s+o/2,horizontalAnchor:A,verticalAnchor:"middle"},L):r==="insideRight"?Jr({x:d+h-k,y:s+o/2,horizontalAnchor:w,verticalAnchor:"middle"},L):r==="insideTop"?Jr({x:c+u/2,y:s+y,horizontalAnchor:"middle",verticalAnchor:T},L):r==="insideBottom"?Jr({x:f+l/2,y:s+o-y,horizontalAnchor:"middle",verticalAnchor:x},L):r==="insideTopLeft"?Jr({x:c+k,y:s+y,horizontalAnchor:A,verticalAnchor:T},L):r==="insideTopRight"?Jr({x:c+u-k,y:s+y,horizontalAnchor:w,verticalAnchor:T},L):r==="insideBottomLeft"?Jr({x:f+k,y:s+o-y,horizontalAnchor:A,verticalAnchor:x},L):r==="insideBottomRight"?Jr({x:f+l-k,y:s+o-y,horizontalAnchor:w,verticalAnchor:x},L):r&&typeof r=="object"&&(le(r.x)||ap(r.x))&&(le(r.y)||ap(r.y))?Jr({x:a+Wr(r.x,h),y:s+Wr(r.y,o),horizontalAnchor:"end",verticalAnchor:"end"},L):Jr({x:p,y:s+o/2,horizontalAnchor:"middle",verticalAnchor:"middle"},L)},FJ=["labelRef"],$J=["content"];function qE(e,t){if(e==null)return{};var r,n,i=UJ(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 UJ(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 WE(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 Bs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WE(Object(r),!0).forEach(function(n){HJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HJ(e,t,r){return(t=zJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zJ(e){var t=qJ(e,"string");return typeof t=="symbol"?t:t+""}function qJ(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 Tn(){return Tn=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},Tn.apply(null,arguments)}var fO=m.createContext(null),dg=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:s,children:o}=e,u=m.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:a,height:s}),[t,r,n,i,a,s]);return m.createElement(fO.Provider,{value:u},o)},dO=()=>{var e=m.useContext(fO),t=Wo();return e||(t?u0(t):void 0)},WJ=m.createContext(null),VJ=()=>{var e=m.useContext(WJ),t=ue(rC);return e||t},YJ=e=>{var{value:t,formatter:r}=e,n=ot(e.children)?t:e.children;return typeof r=="function"?r(n):n},hg=e=>e!=null&&typeof e=="function",KJ=(e,t)=>{var r=lr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},GJ=(e,t,r,n,i)=>{var{offset:a,className:s}=e,{cx:o,cy:u,innerRadius:l,outerRadius:c,startAngle:f,endAngle:d,clockWise:h}=i,p=(l+c)/2,b=KJ(f,d),y=b>=0?1:-1,x,T;switch(t){case"insideStart":x=f+y*a,T=h;break;case"insideEnd":x=d-y*a,T=!h;break;case"end":x=d+y*a,T=h;break;default:throw new Error("Unsupported position ".concat(t))}T=b<=0?T:!T;var E=Bt(o,u,p,x),k=Bt(o,u,p,x+(T?1:-1)*359),w="M".concat(E.x,",").concat(E.y,`
178
+ A`).concat(p,",").concat(p,",0,1,").concat(T?0:1,`,
179
+ `).concat(k.x,",").concat(k.y),A=ot(e.id)?co("recharts-radial-line-"):e.id;return m.createElement("text",Tn({},n,{dominantBaseline:"central",className:Fe("recharts-radial-bar-label",s)}),m.createElement("defs",null,m.createElement("path",{id:A,d:w})),m.createElement("textPath",{xlinkHref:"#".concat(A)},r))},XJ=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:s,startAngle:o,endAngle:u}=e,l=(o+u)/2;if(r==="outside"){var{x:c,y:f}=Bt(n,i,s+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+s)/2,{x:h,y:p}=Bt(n,i,d,l);return{x:h,y:p,textAnchor:"middle",verticalAnchor:"middle"}},zu=e=>e!=null&&"cx"in e&&le(e.cx),ZJ={angle:0,offset:5,zIndex:yt.label,position:"middle",textBreakAll:!1};function QJ(e){if(!zu(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 Xn(e){var t=$t(e,ZJ),{viewBox:r,parentViewBox:n,position:i,value:a,children:s,content:o,className:u="",textBreakAll:l,labelRef:c}=t,f=VJ(),d=dO(),h=i==="center"?d:f??d,p,b,y;r==null?p=h:zu(r)?p=r:p=u0(r);var x=QJ(p);if(!p||ot(a)&&ot(s)&&!m.isValidElement(o)&&typeof o!="function")return null;var T=Bs(Bs({},t),{},{viewBox:p});if(m.isValidElement(o)){var{labelRef:E}=T,k=qE(T,FJ);return m.cloneElement(o,k)}if(typeof o=="function"){var{content:w}=T,A=qE(T,$J);if(b=m.createElement(o,A),m.isValidElement(b))return b}else b=YJ(t);var S=Ft(t);if(zu(p)){if(i==="insideStart"||i==="insideEnd"||i==="end")return GJ(t,i,b,S,p);y=XJ(p,t.offset,t.position)}else{if(!x)return null;var O=BJ({viewBox:x,position:i,offset:t.offset,parentViewBox:zu(n)?void 0:n});y=Bs(Bs({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(pr,{zIndex:t.zIndex},m.createElement(fg,Tn({ref:c,className:Fe("recharts-label",u)},S,y,{textAnchor:oO(S.textAnchor)?S.textAnchor:y.textAnchor,breakAll:l}),b))}Xn.displayName="Label";var JJ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?m.createElement(Xn,Tn({key:"label-implicit"},n)):qt(e)?m.createElement(Xn,Tn({key:"label-implicit",value:e},n)):m.isValidElement(e)?e.type===Xn?m.cloneElement(e,Bs({key:"label-implicit"},n)):m.createElement(Xn,Tn({key:"label-implicit",content:e},n)):hg(e)?m.createElement(Xn,Tn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?m.createElement(Xn,Tn({},e,{key:"label-implicit"},n)):null};function pg(e){var{label:t,labelRef:r}=e,n=dO();return JJ(t,n,r)||null}var eee=["valueAccessor"],tee=["dataKey","clockWise","id","textBreakAll","zIndex"];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 VE(e,t){if(e==null)return{};var r,n,i=ree(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 ree(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 nee=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(OJ(t))return t},hO=m.createContext(void 0),pO=hO.Provider,mO=m.createContext(void 0);mO.Provider;function iee(){return m.useContext(hO)}function aee(){return m.useContext(mO)}function qu(e){var{valueAccessor:t=nee}=e,r=VE(e,eee),{dataKey:n,clockWise:i,id:a,textBreakAll:s,zIndex:o}=r,u=VE(r,tee),l=iee(),c=aee(),f=l||c;return!f||!f.length?null:m.createElement(pr,{zIndex:o??yt.label},m.createElement(ir,{className:"recharts-label-list"},f.map((d,h)=>{var p,b=ot(n)?t(d,h):gt(d.payload,n),y=ot(a)?{}:{id:"".concat(a,"-").concat(h)};return m.createElement(Xn,Kl({key:"label-".concat(h)},Ft(d),u,y,{fill:(p=r.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:b,textBreakAll:s,viewBox:d.viewBox,index:h,zIndex:0}))})))}qu.displayName="LabelList";function gO(e){var{label:t}=e;return t?t===!0?m.createElement(qu,{key:"labelList-implicit"}):m.isValidElement(t)||hg(t)?m.createElement(qu,{key:"labelList-implicit",content:t}):typeof t=="object"?m.createElement(qu,Kl({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}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)}var bO=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=Fe("recharts-dot",i);return le(t)&&le(r)&&le(n)?m.createElement("circle",$p({},qr(e),Zm(e),{className:a,cx:t,cy:r,r:n})):null},see={radiusAxis:{},angleAxis:{}},yO=Yt({name:"polarAxis",initialState:see,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:noe,removeRadiusAxis:ioe,addAngleAxis:aoe,removeAngleAxis:soe}=yO.actions,oee=yO.reducer;function uee(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var oh={exports:{}},$e={};var YE;function lee(){if(YE)return $e;YE=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,s=e?Symbol.for("react.provider"):60109,o=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,x=e?Symbol.for("react.responder"):60118,T=e?Symbol.for("react.scope"):60119;function E(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 o:case c:case p:case h:case s:return w;default:return A}}case r:return A}}}function k(w){return E(w)===l}return $e.AsyncMode=u,$e.ConcurrentMode=l,$e.ContextConsumer=o,$e.ContextProvider=s,$e.Element=t,$e.ForwardRef=c,$e.Fragment=n,$e.Lazy=p,$e.Memo=h,$e.Portal=r,$e.Profiler=a,$e.StrictMode=i,$e.Suspense=f,$e.isAsyncMode=function(w){return k(w)||E(w)===u},$e.isConcurrentMode=k,$e.isContextConsumer=function(w){return E(w)===o},$e.isContextProvider=function(w){return E(w)===s},$e.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},$e.isForwardRef=function(w){return E(w)===c},$e.isFragment=function(w){return E(w)===n},$e.isLazy=function(w){return E(w)===p},$e.isMemo=function(w){return E(w)===h},$e.isPortal=function(w){return E(w)===r},$e.isProfiler=function(w){return E(w)===a},$e.isStrictMode=function(w){return E(w)===i},$e.isSuspense=function(w){return E(w)===f},$e.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===s||w.$$typeof===o||w.$$typeof===c||w.$$typeof===y||w.$$typeof===x||w.$$typeof===T||w.$$typeof===b)},$e.typeOf=E,$e}var KE;function cee(){return KE||(KE=1,oh.exports=lee()),oh.exports}var fee=cee(),GE=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",XE=null,uh=null,vO=e=>{if(e===XE&&Array.isArray(uh))return uh;var t=[];return m.Children.forEach(e,r=>{ot(r)||(fee.isFragment(r)?t=t.concat(vO(r.props.children)):t.push(r))}),uh=t,XE=e,t};function dee(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>GE(i)):n=[GE(t)],vO(e).forEach(i=>{var a=Fa(i,"type.displayName")||Fa(i,"type.name");a&&n.indexOf(a)!==-1&&r.push(i)}),r}var xO=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,lh={},ZE;function hee(){return ZE||(ZE=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})(lh)),lh}var ch,QE;function pee(){return QE||(QE=1,ch=hee().isPlainObject),ch}var mee=pee();const gee=Nn(mee);var JE,eT,tT,rT,nT;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 aT(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){bee(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 bee(e,t,r){return(t=yee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yee(e){var t=vee(e,"string");return typeof t=="symbol"?t:t+""}function vee(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)}function Is(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var sT=(e,t,r,n,i)=>{var a=r-n,s;return s=ct(JE||(JE=Is(["M ",",",""])),e,t),s+=ct(eT||(eT=Is(["L ",",",""])),e+r,t),s+=ct(tT||(tT=Is(["L ",",",""])),e+r-a/2,t+i),s+=ct(rT||(rT=Is(["L ",",",""])),e+r-a/2-n,t+i),s+=ct(nT||(nT=Is(["L ",","," Z"])),e,t),s},xee={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Eee=e=>{var t=$t(e,xee),{x:r,y:n,upperWidth:i,lowerWidth:a,height:s,className:o}=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),x=m.useRef(s),T=m.useRef(r),E=m.useRef(n),k=Wc(e,"trapezoid-");if(m.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var U=d.current.getTotalLength();U&&p(U)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||s!==+s||i===0&&a===0||s===0)return null;var w=Fe("recharts-trapezoid",o);if(!f)return m.createElement("g",null,m.createElement("path",Gl({},Ft(t),{className:w,d:sT(r,n,i,a,s)})));var A=b.current,S=y.current,O=x.current,R=T.current,C=E.current,M="0px ".concat(h===-1?1:h,"px"),L="".concat(h,"px ").concat(h,"px"),X=IS(["strokeDasharray"],l,u);return m.createElement(qc,{animationId:k,key:k,canBegin:h>0,duration:l,easing:u,isActive:f,begin:c},U=>{var $=ft(A,i,U),q=ft(S,a,U),Y=ft(O,s,U),V=ft(R,r,U),re=ft(C,n,U);d.current&&(b.current=$,y.current=q,x.current=Y,T.current=V,E.current=re);var N=U>0?{transition:X,strokeDasharray:L}:{strokeDasharray:M};return m.createElement("path",Gl({},Ft(t),{className:w,d:sT(V,re,$,q,Y),ref:d,style:aT(aT({},N),t.style)}))})},Tee=["option","shapeType","activeClassName","inActiveClassName"];function wee(e,t){if(e==null)return{};var r,n,i=Aee(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 Aee(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 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 Xl(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){kee(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 kee(e,t,r){return(t=_ee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _ee(e){var t=See(e,"string");return typeof t=="symbol"?t:t+""}function See(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 Cee(e,t){return Xl(Xl({},t),e)}function Iee(e,t){return e==="symbols"}function uT(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return m.createElement(f0,r);case"trapezoid":return m.createElement(Eee,r);case"sector":return m.createElement(LS,r);case"symbols":if(Iee(t))return m.createElement(v_,r);break;case"curve":return m.createElement(CS,r);default:return null}}function Oee(e){return m.isValidElement(e)?e.props:e}function EO(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,a=wee(e,Tee),s;if(m.isValidElement(t))s=m.cloneElement(t,Xl(Xl({},a),Oee(t)));else if(typeof t=="function")s=t(a,a.index);else if(gee(t)&&typeof t!="boolean"){var o=Cee(t,a);s=m.createElement(uT,{shapeType:r,elementProps:o})}else{var u=a;s=m.createElement(uT,{shapeType:r,elementProps:u})}return a.isActive?m.createElement(ir,{className:n},s):m.createElement(ir,{className:i},s)}var TO=(e,t,r)=>{var n=nt();return(i,a)=>s=>{e?.(i,a,s),n(SI({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},wO=e=>{var t=nt();return(r,n)=>i=>{e?.(r,n,i),t(GX())}},AO=(e,t,r)=>{var n=nt();return(i,a)=>s=>{e?.(i,a,s),n(XX({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function kO(e){var{tooltipEntrySettings:t}=e,r=nt(),n=Pt(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(WX(t)):i.current!==t&&r(VX({prev:i.current,next:t})),i.current=t)},[t,r,n]),m.useLayoutEffect(()=>()=>{i.current&&(r(YX(i.current)),i.current=null)},[r]),null}function _O(e){var{legendPayload:t}=e,r=nt(),n=Pt(),i=m.useRef(null);return m.useLayoutEffect(()=>{n||(i.current===null?r(Yq(t)):i.current!==t&&r(Kq({prev:i.current,next:t})),i.current=t)},[r,n,t]),m.useLayoutEffect(()=>()=>{i.current&&(r(Gq(i.current)),i.current=null)},[r]),null}var fh,Nee=()=>{var[e]=m.useState(()=>co("uid-"));return e},Pee=(fh=HN.useId)!==null&&fh!==void 0?fh:Nee;function Dee(e,t){var r=Pee();return t||(e?"".concat(e,"-").concat(r):r)}var Ree=m.createContext(void 0),SO=e=>{var{id:t,type:r,children:n}=e,i=Dee("recharts-".concat(r),t);return m.createElement(Ree.Provider,{value:i},n(i))},Lee={cartesianItems:[],polarItems:[]},CO=Yt({name:"graphicalItems",initialState:Lee,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:tt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Dr(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:tt()},removeCartesianGraphicalItem:{reducer(e,t){var r=Dr(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:tt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:tt()},removePolarGraphicalItem:{reducer(e,t){var r=Dr(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:tt()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Dr(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:tt()}}}),{addCartesianGraphicalItem:Mee,replaceCartesianGraphicalItem:jee,removeCartesianGraphicalItem:Bee,addPolarGraphicalItem:ooe,removePolarGraphicalItem:uoe,replacePolarGraphicalItem:loe}=CO.actions,Fee=CO.reducer,$ee=e=>{var t=nt(),r=m.useRef(null);return m.useLayoutEffect(()=>{r.current===null?t(Mee(e)):r.current!==e&&t(jee({prev:r.current,next:e})),r.current=e},[t,e]),m.useLayoutEffect(()=>()=>{r.current&&(t(Bee(r.current)),r.current=null)},[t]),null},IO=m.memo($ee),Uee=["points"];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 dh(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){Hee(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 Hee(e,t,r){return(t=zee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zee(e){var t=qee(e,"string");return typeof t=="symbol"?t:t+""}function qee(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 Zl(){return Zl=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},Zl.apply(null,arguments)}function Wee(e,t){if(e==null)return{};var r,n,i=Vee(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 Vee(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 Yee(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=Fe(n,typeof t!="boolean"?t.className:""),a=r??{},{points:s}=a,o=Wee(a,Uee);return m.createElement(bO,Zl({},o,{className:i}))}function Kee(e,t){return e==null?!1:t?!0:e.length===1}function Gee(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:a,baseProps:s,needClip:o,clipPathId:u,zIndex:l=yt.scatter}=e;if(!Kee(t,r))return null;var c=xO(r),f=J$(r),d=t.map((p,b)=>{var y,x,T=dh(dh(dh({r:3},s),f),{},{index:b,cx:(y=p.x)!==null&&y!==void 0?y:void 0,cy:(x=p.y)!==null&&x!==void 0?x:void 0,dataKey:a,value:p.value,payload:p.payload,points:t});return m.createElement(Yee,{key:"dot-".concat(b),option:r,dotProps:T,className:i})}),h={};return o&&u!=null&&(h.clipPath="url(#clipPath-".concat(c?"":"dots-").concat(u,")")),m.createElement(pr,{zIndex:l},m.createElement(ir,Zl({className:n},h),d))}function cT(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 fT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?cT(Object(r),!0).forEach(function(n){Xee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xee(e,t,r){return(t=Zee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Zee(e){var t=Qee(e,"string");return typeof t=="symbol"?t:t+""}function Qee(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 OO=0,Jee={xAxis:{},yAxis:{},zAxis:{}},NO=Yt({name:"cartesianAxis",initialState:Jee,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:tt()},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:tt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:tt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:tt()},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:tt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:tt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:tt()},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:tt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:tt()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var a,s=i.widthHistory||[];if(s.length===3&&s[0]===s[2]&&n===s[1]&&n!==i.width&&Math.abs(n-((a=s[0])!==null&&a!==void 0?a:0))<=1)return;var o=[...s,n].slice(-3);e.yAxis[r]=fT(fT({},i),{},{width:n,widthHistory:o})}}}}),{addXAxis:ete,replaceXAxis:tte,removeXAxis:rte,addYAxis:nte,replaceYAxis:ite,removeYAxis:ate,addZAxis:coe,replaceZAxis:foe,removeZAxis:doe,updateYAxisWidth:ste}=NO.actions,ote=NO.reducer,ute=B([Nt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),lte=B([ute,Ln,Mn],(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)}}),mg=()=>ue(lte),cte=()=>ue(WZ);function dT(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 hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dT(Object(r),!0).forEach(function(n){fte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fte(e,t,r){return(t=dte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dte(e){var t=hte(e,"string");return typeof t=="symbol"?t:t+""}function hte(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 pte=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a,clipPath:s}=e;if(i===!1||t.x==null||t.y==null)return null;var o={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=hh(hh(hh({},o),$o(i)),Zm(i)),l;return m.isValidElement(i)?l=m.cloneElement(i,u):typeof i=="function"?l=i(u):l=m.createElement(bO,u),m.createElement(ir,{className:"recharts-active-dot",clipPath:s},l)};function mte(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:a,zIndex:s=yt.activeDot}=e,o=ue(Vi),u=cte();if(t==null||u==null)return null;var l=t.find(c=>u.includes(c.payload));return ot(l)?null:m.createElement(pr,{zIndex:s},m.createElement(pte,{point:l,childIndex:Number(o),mainColor:r,dataKey:i,activeDot:n,clipPath:a}))}var hT=(e,t,r)=>{var n=r??e;if(!ot(n))return Wr(n,t,0)},gte=(e,t,r)=>{var n={},i=e.filter(Zc),a=e.filter(l=>l.stackId==null),s=i.reduce((l,c)=>{var f=l[c.stackId];return f==null&&(f=[]),f.push(c),l[c.stackId]=f,l},n),o=Object.entries(s).map(l=>{var c,[f,d]=l,h=d.map(b=>b.dataKey),p=hT(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=hT(t,r,l.barSize);return{stackId:void 0,dataKeys:c,barSize:f}});return[...o,...u]};function pT(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 Pu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(r),!0).forEach(function(n){bte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bte(e,t,r){return(t=yte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yte(e){var t=vte(e,"string");return typeof t=="symbol"?t:t+""}function vte(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 xte(e,t,r,n,i){var a,s=n.length;if(!(s<1)){var o=Wr(e,r,0,!0),u,l=[];if(ke((a=n[0])===null||a===void 0?void 0:a.barSize)){var c=!1,f=r/s,d=n.reduce((T,E)=>T+(E.barSize||0),0);d+=(s-1)*o,d>=r&&(d-=(s-1)*o,o=0),d>=r&&f>0&&(c=!0,f*=.9,d=s*f);var h=(r-d)/2>>0,p={offset:h-o,size:0};u=n.reduce((T,E)=>{var k,w={stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:p.offset+p.size+o,size:c?f:(k=E.barSize)!==null&&k!==void 0?k:0}},A=[...T,w];return p=w.position,A},l)}else{var b=Wr(t,r,0,!0);r-2*b-(s-1)*o<=0&&(o=0);var y=(r-2*b-(s-1)*o)/s;y>1&&(y>>=0);var x=ke(i)?Math.min(y,i):y;u=n.reduce((T,E,k)=>[...T,{stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:b+(y+o)*k+(y-x)/2,size:x}}],l)}return u}}var Ete=(e,t,r,n,i,a,s)=>{var o=ot(s)?t:s,u=xte(r,n,i!==a?i:a,e,o);return i!==a&&u!=null&&(u=u.map(l=>Pu(Pu({},l),{},{position:Pu(Pu({},l.position),{},{offset:l.position.offset-i/2})}))),u},Tte=(e,t)=>{var r=T0(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(s=>s.key===r)}}}},wte=(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 Ate(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&ke(e.zIndex)?e.zIndex:t}var kte=e=>{var{chartData:t}=e,r=nt(),n=Pt();return m.useEffect(()=>n?()=>{}:(r(CE(t)),()=>{r(CE(void 0))}),[t,r,n]),null},mT={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},PO=Yt({name:"brush",initialState:mT,reducers:{setBrushSettings(e,t){return t.payload==null?mT:t.payload}}}),{setBrushSettings:hoe}=PO.actions,_te=PO.reducer,DO=(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)}},Ste=e=>{var{x1:t,y1:r,x2:n,y2:i}=e;return DO({x:t,y:r},{x:n,y:i})};function Cte(e){return(e%180+180)%180}var Ite=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Cte(i),s=a*Math.PI/180,o=Math.atan(n/r),u=s>o&&s<Math.PI-o?n/Math.sin(s):r/Math.cos(s);return Math.abs(u)},Ote={dots:[],areas:[],lines:[]},RO=Yt({name:"referenceElements",initialState:Ote,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Dr(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=Dr(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=Dr(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:poe,removeDot:moe,addArea:Nte,removeArea:Pte,addLine:Dte,removeLine:Rte}=RO.actions,Lte=RO.reducer,LO=m.createContext(void 0),Mte=e=>{var{children:t}=e,[r]=m.useState("".concat(co("recharts"),"-clip")),n=mg();if(n==null)return null;var{x:i,y:a,width:s,height:o}=n;return m.createElement(LO.Provider,{value:r},m.createElement("defs",null,m.createElement("clipPath",{id:r},m.createElement("rect",{x:i,y:a,height:o,width:s}))),t)},MO=()=>m.useContext(LO);class jO{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:s}=r,o,u;return s==="rangeMin"?o=this.yAxisScale.rangeMin():s==="rangeMax"?o=this.yAxisScale.rangeMax():o=0,s==="rangeMin"?u=this.xAxisScale.rangeMin():s==="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:o}}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 gT(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 bT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gT(Object(r),!0).forEach(function(n){jte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jte(e,t,r){return(t=Bte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bte(e){var t=Fte(e,"string");return typeof t=="symbol"?t:t+""}function Fte(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(){return Ql=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},Ql.apply(null,arguments)}var $te=(e,t)=>{var r;if(m.isValidElement(e))r=m.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{if(!ke(t.x1)||!ke(t.y1)||!ke(t.x2)||!ke(t.y2))return null;r=m.createElement("line",Ql({},t,{className:"recharts-reference-line-line"}))}return r},Ute=(e,t,r,n,i,a)=>{var{x:s,width:o}=a,u=i.map(e,{position:r});if(!ke(u)||t==="discard"&&!i.isInRange(u))return null;var l=[{x:s+o,y:u},{x:s,y:u}];return n==="left"?l.reverse():l},Hte=(e,t,r,n,i,a)=>{var{y:s,height:o}=a,u=i.map(e,{position:r});if(!ke(u)||t==="discard"&&!i.isInRange(u))return null;var l=[{x:u,y:s+o},{x:u,y:s}];return n==="top"?l.reverse():l},zte=(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},qte=(e,t,r,n,i,a,s)=>{var{x:o,y:u,segment:l,ifOverflow:c}=s,f=qt(o),d=qt(u);return d?Ute(u,c,n,a,t,r):f?Hte(o,c,n,i,e,r):l!=null&&l.length===2?zte(l,c,n,new jO({x:e,y:t})):null};function Wte(e){var t=nt();return m.useEffect(()=>(t(Dte(e)),()=>{t(Rte(e))})),null}function Vte(e){var{xAxisId:t,yAxisId:r,shape:n,className:i,ifOverflow:a}=e,s=Pt(),o=MO(),u=ue(S=>mn(S,t)),l=ue(S=>gn(S,r)),c=ue(S=>ai(S,"xAxis",t,s)),f=ue(S=>ai(S,"yAxis",r,s)),d=Wo();if(!o||!d||u==null||l==null||c==null||f==null)return null;var h=qte(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:x}=p,{x:T,y:E}=b,k=a==="hidden"?"url(#".concat(o,")"):void 0,w=bT(bT({clipPath:k},Ft(e)),{},{x1:y,y1:x,x2:T,y2:E}),A=Ste({x1:y,y1:x,x2:T,y2:E});return m.createElement(pr,{zIndex:e.zIndex},m.createElement(ir,{className:Fe("recharts-reference-line",i)},$te(n,w),m.createElement(dg,Ql({},A,{lowerWidth:A.width,upperWidth:A.width}),m.createElement(pg,{label:e.label}),e.children)))}var Yte={ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",label:!1,stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle",zIndex:yt.line};function BO(e){var t=$t(e,Yte);return m.createElement(m.Fragment,null,m.createElement(Wte,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x:t.x,y:t.y,segment:t.segment}),m.createElement(Vte,t))}BO.displayName="ReferenceLine";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 vT(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){Kte(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 Kte(e,t,r){return(t=Gte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gte(e){var t=Xte(e,"string");return typeof t=="symbol"?t:t+""}function Xte(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 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 Zte=(e,t,r,n,i,a,s)=>{var o,u,l,c,{x1:f,x2:d,y1:h,y2:p}=s;if(i==null||a==null)return null;var b=new jO({x:i,y:a}),y={x:e?(o=i.map(f,{position:"start"}))!==null&&o!==void 0?o:null:i.rangeMin(),y:r?(u=a.map(h,{position:"start"}))!==null&&u!==void 0?u:null:a.rangeMin()},x={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 s.ifOverflow==="discard"&&(!b.isInRange(y)||!b.isInRange(x))?null:DO(y,x)},Qte=(e,t)=>{var r;return m.isValidElement(e)?r=m.cloneElement(e,t):typeof e=="function"?r=e(t):r=m.createElement(f0,Jl({},t,{className:"recharts-reference-area-rect"})),r};function Jte(e){var t=nt();return m.useEffect(()=>(t(Nte(e)),()=>{t(Pte(e))})),null}function ere(e){var{x1:t,x2:r,y1:n,y2:i,className:a,shape:s,xAxisId:o,yAxisId:u}=e,l=MO(),c=Pt(),f=ue(k=>ai(k,"xAxis",o,c)),d=ue(k=>ai(k,"yAxis",u,c));if(f==null||d==null)return null;var h=qt(t),p=qt(r),b=qt(n),y=qt(i);if(!h&&!p&&!b&&!y&&!s)return null;var x=Zte(h,p,b,y,f,d,e);if(!x&&!s)return null;var T=e.ifOverflow==="hidden",E=T?"url(#".concat(l,")"):void 0;return m.createElement(pr,{zIndex:e.zIndex},m.createElement(ir,{className:Fe("recharts-reference-area",a)},Qte(s,vT(vT({clipPath:E},Ft(e)),x)),x!=null&&m.createElement(dg,Jl({},x,{lowerWidth:x.width,upperWidth:x.width}),m.createElement(pg,{label:e.label}),e.children)))}var tre={ifOverflow:"discard",xAxisId:0,yAxisId:0,radius:0,fill:"#ccc",label:!1,fillOpacity:.5,stroke:"none",strokeWidth:1,zIndex:yt.area};function Up(e){var t=$t(e,tre);return m.createElement(m.Fragment,null,m.createElement(Jte,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),m.createElement(ere,t))}Up.displayName="ReferenceArea";function FO(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 rre(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return Ite(n,r)}function nre(e,t,r){var n=r==="width",{x:i,y:a,width:s,height:o}=e;return t===1?{start:n?i:a,end:n?i+s:a+o}:{start:n?i+s:a+o,end:n?i:a}}function ko(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 ire(e,t){return FO(e,t+1)}function are(e,t,r,n,i){for(var a=(n||[]).slice(),{start:s,end:o}=t,u=0,l=1,c=s,f=function(){var p=n?.[u];if(p===void 0)return{v:FO(n,l)};var b=u,y,x=()=>(y===void 0&&(y=r(p,b)),y),T=p.coordinate,E=u===0||ko(e,T,x,c,o);E||(u=0,c=s,l+=1),E&&(c=T+e*(x()/2+i),u+=l)},d;l<=a.length;)if(d=f(),d)return d.v;return[]}function sre(e,t,r,n,i){var a=(n||[]).slice(),s=a.length;if(s===0)return[];for(var{start:o,end:u}=t,l=1;l<=s;l++){for(var c=(s-1)%l,f=o,d=!0,h=function(){var k=n[b];if(k==null)return 0;var w=b,A,S=()=>(A===void 0&&(A=r(k,w)),A),O=k.coordinate,R=b===c||ko(e,O,S,f,u);if(!R)return d=!1,1;R&&(f=O+e*(S()/2+i))},p,b=c;b<s&&(p=h(),!(p!==0&&p===1));b+=l);if(d){for(var y=[],x=c;x<s;x+=l){var T=n[x];T!=null&&y.push(T)}return y}}return[]}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 Ut(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){ore(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 ore(e,t,r){return(t=ure(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ure(e){var t=lre(e,"string");return typeof t=="symbol"?t:t+""}function lre(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 cre(e,t,r,n,i){for(var a=(n||[]).slice(),s=a.length,{start:o}=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===s-1){var x=e*(p.coordinate+e*y()/2-u);a[d]=p=Ut(Ut({},p),{},{tickCoord:x>0?p.coordinate-x*e:p.coordinate})}else a[d]=p=Ut(Ut({},p),{},{tickCoord:p.coordinate});if(p.tickCoord!=null){var T=ko(e,p.tickCoord,y,o,u);T&&(u=p.tickCoord-e*(y()/2+i),a[d]=Ut(Ut({},p),{},{isShow:!0}))}},c=s-1;c>=0;c--)l(c);return a}function fre(e,t,r,n,i,a){var s=(n||[]).slice(),o=s.length,{start:u,end:l}=t;if(a){var c=n[o-1];if(c!=null){var f=r(c,o-1),d=e*(c.coordinate+e*f/2-l);if(s[o-1]=c=Ut(Ut({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate}),c.tickCoord!=null){var h=ko(e,c.tickCoord,()=>f,u,l);h&&(l=c.tickCoord-e*(f/2+i),s[o-1]=Ut(Ut({},c),{},{isShow:!0}))}}}for(var p=a?o-1:o,b=function(T){var E=s[T];if(E==null)return 1;var k=E,w,A=()=>(w===void 0&&(w=r(E,T)),w);if(T===0){var S=e*(k.coordinate-e*A()/2-u);s[T]=k=Ut(Ut({},k),{},{tickCoord:S<0?k.coordinate-S*e:k.coordinate})}else s[T]=k=Ut(Ut({},k),{},{tickCoord:k.coordinate});if(k.tickCoord!=null){var O=ko(e,k.tickCoord,A,u,l);O&&(u=k.tickCoord+e*(A()/2+i),s[T]=Ut(Ut({},k),{},{isShow:!0}))}},y=0;y<p;y++)b(y);return s}function gg(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:s,orientation:o,interval:u,tickFormatter:l,unit:c,angle:f}=e;if(!i||!i.length||!n)return[];if(le(u)||Go.isSsr){var d;return(d=ire(i,le(u)?u:0))!==null&&d!==void 0?d:[]}var h=[],p=o==="top"||o==="bottom"?"width":"height",b=c&&p==="width"?Js(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"?rre(Js(S,{fontSize:t,letterSpacing:r}),b,f):Js(S,{fontSize:t,letterSpacing:r})[p]},x=i[0],T=i[1],E=i.length>=2&&x!=null&&T!=null?lr(T.coordinate-x.coordinate):1,k=nre(a,E,p);return u==="equidistantPreserveStart"?are(E,k,y,i,s):u==="equidistantPreserveEnd"?sre(E,k,y,i,s):(u==="preserveStart"||u==="preserveStartEnd"?h=fre(E,k,y,i,s,u==="preserveStartEnd"):h=cre(E,k,y,i,s),h.filter(w=>w.isShow))}var dre=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,s=0;if(t){Array.from(t).forEach(c=>{if(c){var f=c.getBoundingClientRect();f.width>s&&(s=f.width)}});var o=r?r.getBoundingClientRect().width:0,u=i+a,l=s+u+o+(r?n:0);return Math.round(l)}return 0},hre={xAxis:{},yAxis:{}},$O=Yt({name:"renderedTicks",initialState:hre,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:pre,removeRenderedTicks:mre}=$O.actions,gre=$O.reducer,bre=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function yre(e,t){if(e==null)return{};var r,n,i=vre(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 vre(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 Yi(){return Yi=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},Yi.apply(null,arguments)}function ET(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?ET(Object(r),!0).forEach(function(n){xre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ET(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xre(e,t,r){return(t=Ere(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ere(e){var t=Tre(e,"string");return typeof t=="symbol"?t:t+""}function Tre(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 _n={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:yt.axis};function wre(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:s,axisLine:o,otherSvgProps:u}=e;if(!o)return null;var l=lt(lt(lt({},u),qr(o)),{},{fill:"none"});if(a==="top"||a==="bottom"){var c=+(a==="top"&&!s||a==="bottom"&&s);l=lt(lt({},l),{},{x1:t,y1:r+c*i,x2:t+n,y2:r+c*i})}else{var f=+(a==="left"&&!s||a==="right"&&s);l=lt(lt({},l),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return m.createElement("line",Yi({},l,{className:Fe("recharts-cartesian-axis-line",Fa(o,"className"))}))}function Are(e,t,r,n,i,a,s,o,u){var l,c,f,d,h,p,b=o?-1:1,y=e.tickSize||s,x=le(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":l=c=e.coordinate,d=r+ +!o*i,f=d-b*y,p=f-b*u,h=x;break;case"left":f=d=e.coordinate,c=t+ +!o*n,l=c-b*y,h=l-b*u,p=x;break;case"right":f=d=e.coordinate,c=t+ +o*n,l=c+b*y,h=l+b*u,p=x;break;default:l=c=e.coordinate,d=r+ +o*i,f=d+b*y,p=f+b*u,h=x;break}return{line:{x1:l,y1:f,x2:c,y2:d},tick:{x:h,y:p}}}function kre(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function _re(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Sre(e){var{option:t,tickProps:r,value:n}=e,i,a=Fe(r.className,"recharts-cartesian-axis-tick-value");if(m.isValidElement(t))i=m.cloneElement(t,lt(lt({},r),{},{className:a}));else if(typeof t=="function")i=t(lt(lt({},r),{},{className:a}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=Fe(s,uee(t))),i=m.createElement(fg,Yi({},r,{className:s}),n)}return i}function Cre(e){var{ticks:t,axisType:r,axisId:n}=e,i=nt();return m.useEffect(()=>{if(n==null||r==null)return rs;var a=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return i(pre({ticks:a,axisId:n,axisType:r})),()=>{i(mre({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Ire=m.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:a,tickFormatter:s,unit:o,padding:u,tickTextProps:l,orientation:c,mirror:f,x:d,y:h,width:p,height:b,tickSize:y,tickMargin:x,fontSize:T,letterSpacing:E,getTicksConfig:k,events:w,axisType:A,axisId:S}=e,O=gg(lt(lt({},k),{},{ticks:r}),T,E),R=qr(k),C=$o(n),M=oO(R.textAnchor)?R.textAnchor:kre(c,f),L=_re(c,f),X={};typeof i=="object"&&(X=i);var U=lt(lt({},R),{},{fill:"none"},X),$=O.map(V=>lt({entry:V},Are(V,d,h,p,b,c,y,f,x))),q=$.map(V=>{var{entry:re,line:N}=V;return m.createElement(ir,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},i&&m.createElement("line",Yi({},U,N,{className:Fe("recharts-cartesian-axis-tick-line",Fa(i,"className"))})))}),Y=$.map((V,re)=>{var N,ye,{entry:pe,tick:P}=V,ge=lt(lt(lt(lt({verticalAnchor:L},R),{},{textAnchor:M,stroke:"none",fill:a},P),{},{index:re,payload:pe,visibleTicksCount:O.length,tickFormatter:s,padding:u},l),{},{angle:(N=(ye=l?.angle)!==null&&ye!==void 0?ye:R.angle)!==null&&N!==void 0?N:0}),Oe=lt(lt({},ge),C);return m.createElement(ir,Yi({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(pe.value,"-").concat(pe.coordinate,"-").concat(pe.tickCoord)},Qm(w,pe,re)),n&&m.createElement(Sre,{option:n,tickProps:Oe,value:"".concat(typeof s=="function"?s(pe.value,re):pe.value).concat(o||"")}))});return m.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(A,"-ticks")},m.createElement(Cre,{ticks:O,axisId:S,axisType:A}),Y.length>0&&m.createElement(pr,{zIndex:yt.label},m.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(A,"-tick-labels"),ref:t},Y)),q.length>0&&m.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(A,"-tick-lines")},q))}),Ore=m.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:s,ticks:o,axisType:u,axisId:l}=e,c=yre(e,bre),[f,d]=m.useState(""),[h,p]=m.useState(""),b=m.useRef(null);m.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var x;return dre({ticks:b.current,label:(x=e.labelRef)===null||x===void 0?void 0:x.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var y=m.useCallback(x=>{if(x){var T=x.getElementsByClassName("recharts-cartesian-axis-tick-value");b.current=T;var E=T[0];if(E){var k=window.getComputedStyle(E),w=k.fontSize,A=k.letterSpacing;(w!==f||A!==h)&&(d(w),p(A))}}},[f,h]);return s||n!=null&&n<=0||i!=null&&i<=0?null:m.createElement(pr,{zIndex:e.zIndex},m.createElement(ir,{className:Fe("recharts-cartesian-axis",a)},m.createElement(wre,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:qr(e)}),m.createElement(Ire,{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:o,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:l}),m.createElement(dg,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},m.createElement(pg,{label:e.label,labelRef:e.labelRef}),e.children)))}),bg=m.forwardRef((e,t)=>{var r=$t(e,_n);return m.createElement(Ore,Yi({},r,{ref:t}))});bg.displayName="CartesianAxis";var Nre=["x1","y1","x2","y2","key"],Pre=["offset"],Dre=["xAxisId","yAxisId"],Rre=["xAxisId","yAxisId"];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 Ht(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){Lre(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 Lre(e,t,r){return(t=Mre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Mre(e){var t=jre(e,"string");return typeof t=="symbol"?t:t+""}function jre(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 Ni(){return Ni=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},Ni.apply(null,arguments)}function ec(e,t){if(e==null)return{};var r,n,i=Bre(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 Bre(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 Fre=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:s,ry:o}=e;return m.createElement("rect",{x:n,y:i,ry:o,width:a,height:s,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function UO(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:s,x2:o,y2:u,key:l}=r,c=ec(r,Nre),f=(i=qr(c))!==null&&i!==void 0?i:{},{offset:d}=f,h=ec(f,Pre);n=m.createElement("line",Ni({},h,{x1:a,y1:s,x2:o,y2:u,fill:"none",key:l}))}return n}function $re(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,o=ec(e,Dre),u=i.map((l,c)=>{var f=Ht(Ht({},o),{},{x1:t,y1:l,x2:t+r,y2:l,key:"line-".concat(c),index:c});return m.createElement(UO,{key:"line-".concat(c),option:n,lineItemProps:f})});return m.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Ure(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,o=ec(e,Rre),u=i.map((l,c)=>{var f=Ht(Ht({},o),{},{x1:l,y1:t,x2:l,y2:t+r,key:"line-".concat(c),index:c});return m.createElement(UO,{option:n,lineItemProps:f,key:"line-".concat(c)})});return m.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Hre(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:s,horizontalPoints:o,horizontal:u=!0}=e;if(!u||!t||!t.length||o==null)return null;var l=o.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+s-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 zre(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:s,height:o,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+s-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:o,stroke:"none",fill:r[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return m.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var qre=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return cS(gg(Ht(Ht(Ht({},_n),r),{},{ticks:fS(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},Wre=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return cS(gg(Ht(Ht(Ht({},_n),r),{},{ticks:fS(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},Vre={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:yt.grid};function yg(e){var t=mS(),r=gS(),n=pS(),i=Ht(Ht({},$t(e,Vre)),{},{x:le(e.x)?e.x:n.left,y:le(e.y)?e.y:n.top,width:le(e.width)?e.width:n.width,height:le(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:s,x:o,y:u,width:l,height:c,syncWithTicks:f,horizontalValues:d,verticalValues:h}=i,p=Pt(),b=ue(R=>mE(R,"xAxis",a,p)),y=ue(R=>mE(R,"yAxis",s,p));if(!Ua(l)||!Ua(c)||!le(o)||!le(u))return null;var x=i.verticalCoordinatesGenerator||qre,T=i.horizontalCoordinatesGenerator||Wre,{horizontalPoints:E,verticalPoints:k}=i;if((!E||!E.length)&&typeof T=="function"){var w=d&&d.length,A=T({yAxis:y?Ht(Ht({},y),{},{ticks:w?d:y.ticks}):void 0,width:t??l,height:r??c,offset:n},w?!0:f);x1(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof A,"]")),Array.isArray(A)&&(E=A)}if((!k||!k.length)&&typeof x=="function"){var S=h&&h.length,O=x({xAxis:b?Ht(Ht({},b),{},{ticks:S?h:b.ticks}):void 0,width:t??l,height:r??c,offset:n},S?!0:f);x1(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(k=O)}return m.createElement(pr,{zIndex:i.zIndex},m.createElement("g",{className:"recharts-cartesian-grid"},m.createElement(Fre,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),m.createElement(Hre,Ni({},i,{horizontalPoints:E})),m.createElement(zre,Ni({},i,{verticalPoints:k})),m.createElement($re,Ni({},i,{offset:n,horizontalPoints:E,xAxis:b,yAxis:y})),m.createElement(Ure,Ni({},i,{offset:n,verticalPoints:k,xAxis:b,yAxis:y}))))}yg.displayName="CartesianGrid";var Yre={},HO=Yt({name:"errorBars",initialState:Yre,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:goe,replaceErrorBar:boe,removeErrorBar:yoe}=HO.actions,Kre=HO.reducer,Gre=["children"];function Xre(e,t){if(e==null)return{};var r,n,i=Zre(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 Zre(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 Qre={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Jre=m.createContext(Qre);function zO(e){var{children:t}=e,r=Xre(e,Gre);return m.createElement(Jre.Provider,{value:r},t)}function vg(e,t){var r,n,i=ue(l=>mn(l,e)),a=ue(l=>gn(l,t)),s=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:Tt.allowDataOverflow,o=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:wt.allowDataOverflow,u=s||o;return{needClip:u,needClipX:s,needClipY:o}}function qO(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=mg(),{needClipX:a,needClipY:s,needClip:o}=vg(t,r);if(!o||!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:s?l:l-f/2,width:a?c:c*2,height:s?f:f*2}))}var WO=(e,t,r,n)=>oi(e,"xAxis",t,n),VO=(e,t,r,n)=>si(e,"xAxis",t,n),YO=(e,t,r,n)=>oi(e,"yAxis",r,n),KO=(e,t,r,n)=>si(e,"yAxis",r,n),ene=B([He,WO,YO,VO,KO],(e,t,r,n,i)=>Rn(e,"xAxis")?Ha(t,n,!1):Ha(r,i,!1)),tne=(e,t,r,n,i)=>i;function rne(e){return e.type==="line"}var nne=B([of,tne],(e,t)=>e.filter(rne).find(r=>r.id===t)),ine=B([He,WO,YO,VO,KO,nne,ene,Xo],(e,t,r,n,i,a,s,o)=>{var{chartData:u,dataStartIndex:l,dataEndIndex:c}=o;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||s==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 kne({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:s,displayedData:h})}});function ane(e){var t=$o(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:a}=t,s=Number(i),o=Number(a);return(Number.isNaN(s)||s<0)&&(s=r),(Number.isNaN(o)||o<0)&&(o=n),{r:s,strokeWidth:o}}return{r,strokeWidth:n}}var sne=["id"],one=["type","layout","connectNulls","needClip","shape"],une=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function _o(){return _o=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},_o.apply(null,arguments)}function wT(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 nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wT(Object(r),!0).forEach(function(n){lne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lne(e,t,r){return(t=cne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cne(e){var t=fne(e,"string");return typeof t=="symbol"?t:t+""}function fne(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 xg(e,t){if(e==null)return{};var r,n,i=dne(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 dne(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 hne=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Mc(r,t),payload:e}]},pne=m.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:s,hide:o,unit:u,tooltipType:l,id:c}=e,f={dataDefinedOnItem:r,getPosition:rs,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:Mc(s,t),hide:o,type:l,color:n,unit:u,graphicalItemId:c}};return m.createElement(kO,{tooltipEntrySettings:f})}),GO=(e,t)=>"".concat(t,"px ").concat(e,"px");function mne(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var gne=(e,t,r)=>{var n=r.reduce((d,h)=>d+h,0);if(!n)return GO(t,e);for(var i=Math.floor(e/n),a=e%n,s=[],o=0,u=0;o<r.length;u+=(l=r[o])!==null&&l!==void 0?l:0,++o){var l,c=r[o];if(c!=null&&u+c>a){s=[...r.slice(0,o),a-u];break}}var f=s.length%2===0?[0,t]:[t];return[...mne(r,i),...s,...f].map(d=>"".concat(d,"px")).join(", ")};function bne(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:s}=n,{id:o}=n,u=xg(n,sne),l=qr(u);return m.createElement(Gee,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:l,needClip:s,clipPathId:t})}function yne(e){var{showLabels:t,children:r,points:n}=e,i=m.useMemo(()=>n?.map(a=>{var s,o,u={x:(s=a.x)!==null&&s!==void 0?s:0,y:(o=a.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return nn(nn({},u),{},{value:a.value,payload:a.payload,viewBox:u,parentViewBox:void 0,fill:void 0})}),[n]);return m.createElement(pO,{value:t?i:void 0},r)}function AT(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:s,layout:o,connectNulls:u,needClip:l,shape:c}=a,f=xg(a,one),d=nn(nn({},Ft(f)),{},{fill:"none",className:"recharts-line-curve",clipPath:l?"url(#clipPath-".concat(t,")"):void 0,points:n,type:s,layout:o,connectNulls:u,strokeDasharray:i??a.strokeDasharray});return m.createElement(m.Fragment,null,n?.length>1&&m.createElement(EO,_o({shapeType:"curve",option:c},d,{pathRef:r})),m.createElement(bne,{points:n,clipPathId:t,props:a}))}function vne(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function xne(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:s,strokeDasharray:o,isAnimationActive:u,animationBegin:l,animationDuration:c,animationEasing:f,animateNewValues:d,width:h,height:p,onAnimationEnd:b,onAnimationStart:y}=r,x=i.current,T=Wc(s,"recharts-line-"),E=m.useRef(T),[k,w]=m.useState(!1),A=!k,S=m.useCallback(()=>{typeof b=="function"&&b(),w(!1)},[b]),O=m.useCallback(()=>{typeof y=="function"&&y(),w(!0)},[y]),R=vne(n.current),C=m.useRef(0);E.current!==T&&(C.current=a.current,E.current=T);var M=C.current;return m.createElement(yne,{points:s,showLabels:A},r.children,m.createElement(qc,{animationId:T,begin:l,duration:c,isActive:u,easing:f,onAnimationEnd:S,onAnimationStart:O,key:T},L=>{var X=ft(M,R+M,L),U=Math.min(X,R),$;if(u)if(o){var q="".concat(o).split(/[,\s]+/gim).map(re=>parseFloat(re));$=gne(U,R,q)}else $=GO(R,U);else $=o==null?void 0:String(o);if(L>0&&R>0&&(i.current=s,a.current=Math.max(a.current,U)),x){var Y=x.length/s.length,V=L===1?s:s.map((re,N)=>{var ye=Math.floor(N*Y);if(x[ye]){var pe=x[ye];return nn(nn({},re),{},{x:ft(pe.x,re.x,L),y:ft(pe.y,re.y,L)})}return d?nn(nn({},re),{},{x:ft(h*2,re.x,L),y:ft(p/2,re.y,L)}):nn(nn({},re),{},{x:re.x,y:re.y})});return i.current=V,m.createElement(AT,{props:r,points:V,clipPathId:t,pathRef:n,strokeDasharray:$})}return m.createElement(AT,{props:r,points:s,clipPathId:t,pathRef:n,strokeDasharray:$})}),m.createElement(gO,{label:r.label}))}function Ene(e){var{clipPathId:t,props:r}=e,n=m.useRef(null),i=m.useRef(0),a=m.useRef(null);return m.createElement(xne,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var Tne=(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:gt(e.payload,t)}};class wne extends m.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:a,yAxisId:s,top:o,left:u,width:l,height:c,id:f,needClip:d,zIndex:h}=this.props;if(t)return null;var p=Fe("recharts-line",i),b=f,{r:y,strokeWidth:x}=ane(r),T=xO(r),E=y*2+x,k=d?"url(#clipPath-".concat(T?"":"dots-").concat(b,")"):void 0;return m.createElement(pr,{zIndex:h},m.createElement(ir,{className:p},d&&m.createElement("defs",null,m.createElement(qO,{clipPathId:b,xAxisId:a,yAxisId:s}),!T&&m.createElement("clipPath",{id:"clipPath-dots-".concat(b)},m.createElement("rect",{x:u-E/2,y:o-E/2,width:l+E,height:c+E}))),m.createElement(zO,{xAxisId:a,yAxisId:s,data:n,dataPointFormatter:Tne,errorBarOffset:0},m.createElement(Ene,{props:this.props,clipPathId:b}))),m.createElement(mte,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:k}))}}var XO={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:yt.line,type:"linear"};function Ane(e){var t=$t(e,XO),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:s,connectNulls:o,dot:u,hide:l,isAnimationActive:c,label:f,legendType:d,xAxisId:h,yAxisId:p,id:b}=t,y=xg(t,une),{needClip:x}=vg(h,p),T=mg(),E=Qi(),k=Pt(),w=ue(C=>ine(C,h,p,k,b));if(E!=="horizontal"&&E!=="vertical"||w==null||T==null)return null;var{height:A,width:S,x:O,y:R}=T;return m.createElement(wne,_o({},y,{id:b,connectNulls:o,dot:u,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:s,isAnimationActive:c,hide:l,label:f,legendType:d,xAxisId:h,yAxisId:p,points:w,layout:E,height:A,width:S,left:O,top:R,needClip:x}))}function kne(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:s,bandSize:o,displayedData:u}=e;return u.map((l,c)=>{var f=gt(l,s);if(t==="horizontal"){var d=p1({axis:r,ticks:i,bandSize:o,entry:l,index:c}),h=ot(f)?null:n.scale.map(f);return{x:d,y:h??null,value:f,payload:l}}var p=ot(f)?null:r.scale.map(f),b=p1({axis:n,ticks:a,bandSize:o,entry:l,index:c});return p==null||b==null?null:{x:p,y:b,value:f,payload:l}}).filter(Boolean)}function _ne(e){var t=$t(e,XO),r=Pt();return m.createElement(SO,{id:t.id,type:"line"},n=>m.createElement(m.Fragment,null,m.createElement(_O,{legendPayload:hne(t)}),m.createElement(pne,{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(IO,{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(Ane,_o({},t,{id:n}))))}var ZO=m.memo(_ne,Ko);ZO.displayName="Line";function ra(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:OO}function na(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:OO}var Sne="Invariant failed";function Cne(e,t){throw new Error(Sne)}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 Eg(e){return m.createElement(EO,Hp({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Ine=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(le(t))return t;var a=le(n)||ot(n);return a?t(n,i):(a||Cne(),r)}},One=(e,t,r)=>r,Nne=(e,t)=>t,su=B([of,Nne],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Pne=B([su],e=>e?.maxBarSize),Dne=(e,t,r,n)=>n,Rne=B([He,of,ra,na,One],(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")),Lne=(e,t,r)=>{var n=He(e),i=ra(e,t),a=na(e,t);if(!(i==null||a==null))return n==="horizontal"?Mp(e,"yAxis",a,r):Mp(e,"xAxis",i,r)},Mne=(e,t)=>{var r=He(e),n=ra(e,t),i=na(e,t);if(!(n==null||i==null))return r==="horizontal"?pE(e,"xAxis",n):pE(e,"yAxis",i)},jne=B([Rne,QV,Mne],gte),Bne=(e,t,r)=>{var n,i,a=su(e,t);if(a==null)return 0;var s=ra(e,t),o=na(e,t);if(s==null||o==null)return 0;var u=He(e),l=KS(e),{maxBarSize:c}=a,f=ot(c)?l:c,d,h;return u==="horizontal"?(d=oi(e,"xAxis",s,r),h=si(e,"xAxis",s,r)):(d=oi(e,"yAxis",o,r),h=si(e,"yAxis",o,r)),(n=(i=Ha(d,h,!0))!==null&&i!==void 0?i:f)!==null&&n!==void 0?n:0},QO=(e,t,r)=>{var n=He(e),i=ra(e,t),a=na(e,t);if(!(i==null||a==null)){var s,o;return n==="horizontal"?(s=oi(e,"xAxis",i,r),o=si(e,"xAxis",i,r)):(s=oi(e,"yAxis",a,r),o=si(e,"yAxis",a,r)),Ha(s,o)}},Fne=B([jne,KS,ZV,GS,Bne,QO,Pne],Ete),$ne=(e,t,r)=>{var n=ra(e,t);if(n!=null)return oi(e,"xAxis",n,r)},Une=(e,t,r)=>{var n=na(e,t);if(n!=null)return oi(e,"yAxis",n,r)},Hne=(e,t,r)=>{var n=ra(e,t);if(n!=null)return si(e,"xAxis",n,r)},zne=(e,t,r)=>{var n=na(e,t);if(n!=null)return si(e,"yAxis",n,r)},qne=B([Fne,su],wte),Wne=B([Lne,su],Tte),Vne=B([Nt,o0,$ne,Une,Hne,zne,qne,He,zV,QO,Wne,su,Dne],(e,t,r,n,i,a,s,o,u,l,c,f,d)=>{var{chartData:h,dataStartIndex:p,dataEndIndex:b}=u;if(!(f==null||s==null||t==null||o!=="horizontal"&&o!=="vertical"||r==null||n==null||i==null||a==null||l==null)){var{data:y}=f,x;if(y!=null&&y.length>0?x=y:x=h?.slice(p,b+1),x!=null)return xie({layout:o,barSettings:f,pos:s,parentViewBox:t,bandSize:l,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:c,displayedData:x,offset:e,cells:d,dataStartIndex:p})}}),Yne=["index"];function zp(){return zp=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},zp.apply(null,arguments)}function Kne(e,t){if(e==null)return{};var r,n,i=Gne(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 Gne(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 JO=m.createContext(void 0),Xne=e=>{var t=m.useContext(JO);if(t!=null)return t.stackId;if(e!=null)return fq(e)},Zne=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Qne=e=>{var t=m.useContext(JO);if(t!=null){var{stackId:r}=t;return"url(#".concat(Zne(r,e),")")}},eN=e=>{var{index:t}=e,r=Kne(e,Yne),n=Qne(t);return m.createElement(ir,zp({className:"recharts-bar-stack-layer",clipPath:n},r))},Jne=["onMouseEnter","onMouseLeave","onClick"],eie=["value","background","tooltipPosition"],tie=["id"],rie=["onMouseEnter","onClick","onMouseLeave"];function ui(){return ui=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},ui.apply(null,arguments)}function kT(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 Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kT(Object(r),!0).forEach(function(n){nie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nie(e,t,r){return(t=iie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iie(e){var t=aie(e,"string");return typeof t=="symbol"?t:t+""}function aie(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 tc(e,t){if(e==null)return{};var r,n,i=sie(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 sie(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 oie=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Mc(r,t),payload:e}]},uie=m.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:s,unit:o,tooltipType:u,id:l}=e,c={dataDefinedOnItem:void 0,getPosition:rs,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:Mc(a,t),hide:s,type:u,color:i,unit:o,graphicalItemId:l}};return m.createElement(kO,{tooltipEntrySettings:c})});function lie(e){var t=ue(Vi),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:o,onClick:u}=a,l=tc(a,Jne),c=TO(s,n,a.id),f=wO(o),d=AO(u,n,a.id);if(!i||r==null)return null;var h=$o(i);return m.createElement(pr,{zIndex:Ate(i,yt.barBackground)},r.map((p,b)=>{var{value:y,background:x,tooltipPosition:T}=p,E=tc(p,eie);if(!x)return null;var k=c(p,b),w=f(p,b),A=d(p,b),S=Qt(Qt(Qt(Qt(Qt({option:i,isActive:String(b)===t},E),{},{fill:"#eee"},x),h),Qm(l,p,b)),{},{onMouseEnter:k,onMouseLeave:w,onClick:A,dataKey:n,index:b,className:"recharts-bar-background-rectangle"});return m.createElement(Eg,ui({key:"background-bar-".concat(b)},S))}))}function cie(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var s={x:a.x,y:a.y,width:a.width,lowerWidth:a.width,upperWidth:a.width,height:a.height};return Qt(Qt({},s),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:s,fill:a.fill})});return m.createElement(pO,{value:t?i:void 0},r)}function fie(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:s}=e,o=ue(Vi),u=ue(zI),l=r&&String(i.originalDataIndex)===o&&(u==null||s===u),[c,f]=m.useState(!1),[d,h]=m.useState(!1);m.useEffect(()=>{var E;return l?(f(!0),E=requestAnimationFrame(()=>{h(!0)})):h(!1),()=>{cancelAnimationFrame(E)}},[l]);var p=m.useCallback(()=>{l||f(!1)},[l]),b=l&&d,y=l||c,x;l?r===!0?x=t:x=r:x=t;var T=m.createElement(Eg,ui({},n,{name:String(n.name)},i,{isActive:b,option:x,index:a,dataKey:s,onTransitionEnd:p}));return y?m.createElement(pr,{zIndex:yt.activeBar},m.createElement(eN,{index:i.originalDataIndex},T)):T}function die(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return m.createElement(Eg,ui({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:a}))}function hie(e){var t,{data:r,props:n}=e,i=(t=qr(n))!==null&&t!==void 0?t:{},{id:a}=i,s=tc(i,tie),{shape:o,dataKey:u,activeBar:l}=n,{onMouseEnter:c,onClick:f,onMouseLeave:d}=n,h=tc(n,rie),p=TO(c,u,a),b=wO(d),y=AO(f,u,a);return r?m.createElement(m.Fragment,null,r.map((x,T)=>m.createElement(eN,ui({index:x.originalDataIndex,key:"rectangle-".concat(x?.x,"-").concat(x?.y,"-").concat(x?.value,"-").concat(T),className:"recharts-bar-rectangle"},Qm(h,x,T),{onMouseEnter:p(x,T),onMouseLeave:b(x,T),onClick:y(x,T)}),l?m.createElement(fie,{shape:o,activeBar:l,baseProps:s,entry:x,index:T,dataKey:u}):m.createElement(die,{shape:o,baseProps:s,entry:x,index:T,dataKey:u})))):null}function pie(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:s,animationDuration:o,animationEasing:u,onAnimationEnd:l,onAnimationStart:c}=t,f=r.current,d=Wc(t,"recharts-bar-"),[h,p]=m.useState(!1),b=!h,y=m.useCallback(()=>{typeof l=="function"&&l(),p(!1)},[l]),x=m.useCallback(()=>{typeof c=="function"&&c(),p(!0)},[c]);return m.createElement(cie,{showLabels:b,rects:n},m.createElement(qc,{animationId:d,begin:s,duration:o,isActive:a,easing:u,onAnimationEnd:y,onAnimationStart:x,key:d},T=>{var E=T===1?n:n?.map((k,w)=>{var A=f&&f[w];if(A)return Qt(Qt({},k),{},{x:ft(A.x,k.x,T),y:ft(A.y,k.y,T),width:ft(A.width,k.width,T),height:ft(A.height,k.height,T)});if(i==="horizontal"){var S=ft(0,k.height,T),O=ft(k.stackedBarStart,k.y,T);return Qt(Qt({},k),{},{y:O,height:S})}var R=ft(0,k.width,T),C=ft(k.stackedBarStart,k.x,T);return Qt(Qt({},k),{},{width:R,x:C})});return T>0&&(r.current=E??null),E==null?null:m.createElement(ir,null,m.createElement(hie,{props:t,data:E}))}),m.createElement(gO,{label:t.label}),t.children)}function mie(e){var t=m.useRef(null);return m.createElement(pie,{previousRectanglesRef:t,props:e})}var tN=0,gie=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:gt(e,t)}};class bie extends m.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:s,needClip:o,background:u,id:l}=this.props;if(t||r==null)return null;var c=Fe("recharts-bar",i),f=l;return m.createElement(ir,{className:c,id:l},o&&m.createElement("defs",null,m.createElement(qO,{clipPathId:f,xAxisId:a,yAxisId:s})),m.createElement(ir,{className:"recharts-bar-rectangles",clipPath:o?"url(#clipPath-".concat(f,")"):void 0},m.createElement(lie,{data:r,dataKey:n,background:u,allOtherBarProps:this.props}),m.createElement(mie,this.props)))}}var yie={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:tN,xAxisId:0,yAxisId:0,zIndex:yt.bar};function vie(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:o,animationDuration:u,animationEasing:l,isAnimationActive:c}=e,{needClip:f}=vg(t,r),d=Qi(),h=Pt(),p=dee(e.children,tO),b=ue(T=>Vne(T,e.id,h,p));if(d!=="vertical"&&d!=="horizontal")return null;var y,x=b?.[0];return x==null||x.height==null||x.width==null?y=0:y=d==="vertical"?x.height/2:x.width/2,m.createElement(zO,{xAxisId:t,yAxisId:r,data:b,dataPointFormatter:gie,errorBarOffset:y},m.createElement(bie,ui({},e,{layout:d,needClip:f,data:b,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:s,animationBegin:o,animationDuration:u,animationEasing:l,isAnimationActive:c})))}function xie(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:a,bandSize:s,xAxis:o,yAxis:u,xAxisTicks:l,yAxisTicks:c,stackedData:f,displayedData:d,offset:h,cells:p,parentViewBox:b,dataStartIndex:y}=e,x=t==="horizontal"?u:o,T=f?x.scale.domain():null,E=dq({numericAxis:x}),k=x.scale.map(E);return d.map((w,A)=>{var S,O,R,C,M,L;if(f){var X=f[A+y];if(X==null)return null;S=sq(X,T)}else S=gt(w,r),Array.isArray(S)||(S=[E,S]);var U=Ine(n,tN)(S[1],A);if(t==="horizontal"){var $,q=u.scale.map(S[0]),Y=u.scale.map(S[1]);if(q==null||Y==null)return null;O=m1({axis:o,ticks:l,bandSize:s,offset:a.offset,entry:w,index:A}),R=($=Y??q)!==null&&$!==void 0?$:void 0,C=a.size;var V=q-Y;if(M=cn(V)?0:V,L={x:O,y:h.top,width:C,height:h.height},Math.abs(U)>0&&Math.abs(M)<Math.abs(U)){var re=lr(M||U)*(Math.abs(U)-Math.abs(M));R-=re,M+=re}}else{var N=o.scale.map(S[0]),ye=o.scale.map(S[1]);if(N==null||ye==null)return null;if(O=N,R=m1({axis:u,ticks:c,bandSize:s,offset:a.offset,entry:w,index:A}),C=ye-N,M=a.size,L={x:h.left,y:R,width:h.width,height:M},Math.abs(U)>0&&Math.abs(C)<Math.abs(U)){var pe=lr(C||U)*(Math.abs(U)-Math.abs(C));C+=pe}}if(O==null||R==null||C==null||M==null||!i&&(C===0||M===0))return null;var P=Qt(Qt({},w),{},{stackedBarStart:k,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 Eie(e){var t=$t(e,yie),r=Xne(t.stackId),n=Pt();return m.createElement(SO,{id:t.id,type:"bar"},i=>m.createElement(m.Fragment,null,m.createElement(_O,{legendPayload:oie(t)}),m.createElement(uie,{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(IO,{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(pr,{zIndex:t.zIndex},m.createElement(vie,ui({},t,{id:i})))))}var rN=m.memo(Eie,Ko);rN.displayName="Bar";var Tie=["domain","range"],wie=["domain","range"];function _T(e,t){if(e==null)return{};var r,n,i=Aie(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 Aie(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 ST(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 nN(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=_T(e,Tie),{domain:a,range:s}=t,o=_T(t,wie);return!ST(r,a)||!ST(n,s)?!1:Ko(i,o)}var kie=["type"],_ie=["dangerouslySetInnerHTML","ticks","scale"],Sie=["id","scale"];function qp(){return qp=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},qp.apply(null,arguments)}function CT(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 IT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(r),!0).forEach(function(n){Cie(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Cie(e,t,r){return(t=Iie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Iie(e){var t=Oie(e,"string");return typeof t=="symbol"?t:t+""}function Oie(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 Wp(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 Pie(e){var t=nt(),r=m.useRef(null),n=bS(),{type:i}=e,a=Wp(e,kie),s=Kc(n,"xAxis",i),o=m.useMemo(()=>{if(s!=null)return IT(IT({},a),{},{type:s})},[a,s]);return m.useLayoutEffect(()=>{o!=null&&(r.current===null?t(ete(o)):r.current!==o&&t(tte({prev:r.current,next:o})),r.current=o)},[o,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(rte(r.current)),r.current=null)},[t]),null}var Die=e=>{var{xAxisId:t,className:r}=e,n=ue(o0),i=Pt(),a="xAxis",s=ue(x=>EI(x,a,t,i)),o=ue(x=>yI(x,t)),u=ue(x=>DX(x,t)),l=ue(x=>$C(x,t));if(o==null||u==null||l==null)return null;var{dangerouslySetInnerHTML:c,ticks:f,scale:d}=e,h=Wp(e,_ie),{id:p,scale:b}=l,y=Wp(l,Sie);return m.createElement(bg,qp({},h,y,{x:u.x,y:u.y,width:o.width,height:o.height,className:Fe("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:s,axisType:a,axisId:t}))},Rie={allowDataOverflow:Tt.allowDataOverflow,allowDecimals:Tt.allowDecimals,allowDuplicatedCategory:Tt.allowDuplicatedCategory,angle:Tt.angle,axisLine:_n.axisLine,height:Tt.height,hide:!1,includeHidden:Tt.includeHidden,interval:Tt.interval,label:!1,minTickGap:Tt.minTickGap,mirror:Tt.mirror,orientation:Tt.orientation,padding:Tt.padding,reversed:Tt.reversed,scale:Tt.scale,tick:Tt.tick,tickCount:Tt.tickCount,tickLine:_n.tickLine,tickSize:_n.tickSize,type:Tt.type,niceTicks:Tt.niceTicks,xAxisId:0},Lie=e=>{var t=$t(e,Rie);return m.createElement(m.Fragment,null,m.createElement(Pie,{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(Die,t))},Tg=m.memo(Lie,nN);Tg.displayName="XAxis";var Mie=["type"],jie=["dangerouslySetInnerHTML","ticks","scale"],Bie=["id","scale"];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 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 NT(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){Fie(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 Fie(e,t,r){return(t=$ie(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $ie(e){var t=Uie(e,"string");return typeof t=="symbol"?t:t+""}function Uie(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 Yp(e,t){if(e==null)return{};var r,n,i=Hie(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 Hie(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 zie(e){var t=nt(),r=m.useRef(null),n=bS(),{type:i}=e,a=Yp(e,Mie),s=Kc(n,"yAxis",i),o=m.useMemo(()=>{if(s!=null)return NT(NT({},a),{},{type:s})},[s,a]);return m.useLayoutEffect(()=>{o!=null&&(r.current===null?t(nte(o)):r.current!==o&&t(ite({prev:r.current,next:o})),r.current=o)},[o,t]),m.useLayoutEffect(()=>()=>{r.current&&(t(ate(r.current)),r.current=null)},[t]),null}function qie(e){var{yAxisId:t,className:r,width:n,label:i}=e,a=m.useRef(null),s=m.useRef(null),o=ue(o0),u=Pt(),l=nt(),c="yAxis",f=ue(A=>vI(A,t)),d=ue(A=>LX(A,t)),h=ue(A=>EI(A,c,t,u)),p=ue(A=>UC(A,t));if(m.useLayoutEffect(()=>{if(!(n!=="auto"||!f||hg(i)||m.isValidElement(i)||p==null)){var A=a.current;if(A){var S=A.getCalculatedWidth();Math.round(f.width)!==Math.round(S)&&l(ste({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:x}=e,T=Yp(e,jie),{id:E,scale:k}=p,w=Yp(p,Bie);return m.createElement(bg,Vp({},T,w,{ref:a,labelRef:s,x:d.x,y:d.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:f.width,height:f.height,className:Fe("recharts-".concat(c," ").concat(c),r),viewBox:o,ticks:h,axisType:c,axisId:t}))}var Wie={allowDataOverflow:wt.allowDataOverflow,allowDecimals:wt.allowDecimals,allowDuplicatedCategory:wt.allowDuplicatedCategory,angle:wt.angle,axisLine:_n.axisLine,hide:!1,includeHidden:wt.includeHidden,interval:wt.interval,label:!1,minTickGap:wt.minTickGap,mirror:wt.mirror,orientation:wt.orientation,padding:wt.padding,reversed:wt.reversed,scale:wt.scale,tick:wt.tick,tickCount:wt.tickCount,tickLine:_n.tickLine,tickSize:_n.tickSize,type:wt.type,niceTicks:wt.niceTicks,width:wt.width,yAxisId:0},Vie=e=>{var t=$t(e,Wie);return m.createElement(m.Fragment,null,m.createElement(zie,{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(qie,t))},wg=m.memo(Vie,nN);wg.displayName="YAxis";var Yie=(e,t)=>t,Ag=B([Yie,He,rC,Rt,FI,Bn,iQ,Nt],fQ);function Kie(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function kg(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(Kie(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 s=(o,u)=>({relativeX:Math.round((o-t.left)/r),relativeY:Math.round((u-t.top)/n)});return"touches"in e?Array.from(e.touches).map(o=>s(o.clientX,o.clientY)):s(e.clientX,e.clientY)}var iN=wr("mouseClick"),aN=zo();aN.startListening({actionCreator:iN,effect:(e,t)=>{var r=e.payload,n=Ag(t.getState(),kg(r));n?.activeIndex!=null&&t.dispatch(ZX({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Kp=wr("mouseMove"),sN=zo(),ba=null,xi=null,ph=null;sN.startListening({actionCreator:Kp,effect:(e,t)=>{var r=e.payload,n=t.getState(),{throttleDelay:i,throttledEvents:a}=n.eventSettings,s=a==="all"||a?.includes("mousemove");ba!==null&&(cancelAnimationFrame(ba),ba=null),xi!==null&&(typeof i!="number"||!s)&&(clearTimeout(xi),xi=null),ph=kg(r);var o=()=>{var u=t.getState(),l=iu(u,u.tooltip.settings.shared);if(!ph){ba=null,xi=null;return}if(l==="axis"){var c=Ag(u,ph);c?.activeIndex!=null?t.dispatch(II({activeIndex:c.activeIndex,activeDataKey:void 0,activeCoordinate:c.activeCoordinate})):t.dispatch(CI())}ba=null,xi=null};if(!s){o();return}i==="raf"?ba=requestAnimationFrame(o):typeof i=="number"&&xi===null&&(xi=setTimeout(o,i))}});function Gie(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 PT={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},oN=Yt({name:"rootProps",initialState:PT,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:PT.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}}}),Xie=oN.reducer,{updateOptions:Zie}=oN.actions,Qie=null,Jie={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)},uN=Yt({name:"polarOptions",initialState:Qie,reducers:Jie}),{updatePolarOptions:voe}=uN.actions,eae=uN.reducer,lN=wr("keyDown"),cN=wr("focus"),fN=wr("blur"),cf=zo(),ya=null,Ei=null,Du=null;cf.startListening({actionCreator:lN,effect:(e,t)=>{Du=e.payload,ya!==null&&(cancelAnimationFrame(ya),ya=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,a=i==="all"||i.includes("keydown");Ei!==null&&(typeof n!="number"||!a)&&(clearTimeout(Ei),Ei=null);var s=()=>{try{var o=t.getState(),u=o.rootProps.accessibilityLayer!==!1;if(!u)return;var{keyboardInteraction:l}=o.tooltip,c=Du;if(c!=="ArrowRight"&&c!=="ArrowLeft"&&c!=="Enter")return;var f=Qs(l,Wi(o),Ya(o),Ka(o)),d=f==null?-1:Number(f),h=!Number.isFinite(d)||d<0,p=Bn(o),b=Wi(o),y=iu(o,o.tooltip.settings.shared);if(c==="Enter"){if(h)return;var x=Yl(o,y,"hover",String(l.index));t.dispatch(Vl({active:!l.active,activeIndex:l.index,activeCoordinate:x}));return}var T=$X(o),E=T==="left-to-right"?1:-1,k=c==="ArrowRight"?1:-1,w;if(h){var A=Ya(o),S=Ka(o),O=k*E,R=U=>({active:!1,index:String(U),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(w=-1,O>0){for(var C=0;C<b.length;C++)if(Qs(R(C),b,A,S)!=null){w=C;break}}else for(var M=b.length-1;M>=0;M--)if(Qs(R(M),b,A,S)!=null){w=M;break}if(w<0)return}else{w=d+k*E;var L=p?.length||b.length;if(L===0||w>=L||w<0)return}var X=Yl(o,y,"hover",String(w));t.dispatch(Vl({active:!0,activeIndex:w.toString(),activeCoordinate:X}))}finally{ya=null,Ei=null}};if(!a){s();return}n==="raf"?ya=requestAnimationFrame(s):typeof n=="number"&&Ei===null&&(s(),Du=null,Ei=setTimeout(()=>{Du?s():(Ei=null,ya=null)},n))}});cf.startListening({actionCreator:cN,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",s=iu(r,r.tooltip.settings.shared),o=Yl(r,s,"hover",String(a));t.dispatch(Vl({active:!0,activeIndex:a,activeCoordinate:o}))}}}});cf.startListening({actionCreator:fN,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Vl({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function dN(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 Cr=wr("externalEvent"),hN=zo(),Ru=new Map,Os=new Map,mh=new Map;hN.startListening({actionCreator:Cr,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,a=dN(n);mh.set(i,{handler:r,reactEvent:a});var s=Ru.get(i);s!==void 0&&(cancelAnimationFrame(s),Ru.delete(i));var o=t.getState(),{throttleDelay:u,throttledEvents:l}=o.eventSettings,c=l,f=c==="all"||c?.includes(i),d=Os.get(i);d!==void 0&&(typeof u!="number"||!f)&&(clearTimeout(d),Os.delete(i));var h=()=>{var y=mh.get(i);try{if(!y)return;var{handler:x,reactEvent:T}=y,E=t.getState(),k={activeCoordinate:HZ(E),activeDataKey:zI(E),activeIndex:Vi(E),activeLabel:HI(E),activeTooltipIndex:Vi(E),isTooltipActive:zZ(E)};x&&x(k,T)}finally{Ru.delete(i),Os.delete(i),mh.delete(i)}};if(!f){h();return}if(u==="raf"){var p=requestAnimationFrame(h);Ru.set(i,p)}else if(typeof u=="number"){if(!Os.has(i)){h();var b=setTimeout(h,u);Os.set(i,b)}}else h()}}});var tae=B([cs],e=>e.tooltipItemPayloads),rae=B([tae,(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)}}}),pN=wr("touchMove"),mN=zo(),Ti=null,Un=null,DT=null,Ns=null;mN.startListening({actionCreator:pN,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Ns=dN(r);var n=t.getState(),{throttleDelay:i,throttledEvents:a}=n.eventSettings,s=a==="all"||a.includes("touchmove");Ti!==null&&(cancelAnimationFrame(Ti),Ti=null),Un!==null&&(typeof i!="number"||!s)&&(clearTimeout(Un),Un=null),DT=Array.from(r.touches).map(u=>kg({clientX:u.clientX,clientY:u.clientY,currentTarget:r.currentTarget}));var o=()=>{if(Ns!=null){var u=t.getState(),l=iu(u,u.tooltip.settings.shared);if(l==="axis"){var c,f=(c=DT)===null||c===void 0?void 0:c[0];if(f==null){Ti=null,Un=null;return}var d=Ag(u,f);d?.activeIndex!=null&&t.dispatch(II({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate}))}else if(l==="item"){var h,p=Ns.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(vq),x=(h=b.getAttribute(xq))!==null&&h!==void 0?h:void 0,T=ta(u).find(w=>w.id===x);if(y==null||T==null||x==null)return;var{dataKey:E}=T,k=rae(u,y,x);t.dispatch(SI({activeDataKey:E,activeIndex:y,activeCoordinate:k,activeGraphicalItemId:x}))}Ti=null,Un=null}};if(!s){o();return}i==="raf"?Ti=requestAnimationFrame(o):typeof i=="number"&&Un===null&&(o(),Ns=null,Un=setTimeout(()=>{Ns?o():(Un=null,Ti=null)},i))}}});var gN={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},bN=Yt({name:"eventSettings",initialState:gN,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:nae}=bN.actions,iae=bN.reducer,aae=L_({brush:_te,cartesianAxis:ote,chartData:UQ,errorBars:Kre,eventSettings:iae,graphicalItems:Fee,layout:tq,legend:Xq,options:MQ,polarAxis:oee,polarOptions:eae,referenceElements:Lte,renderedTicks:gre,rootProps:Xie,tooltip:QX,zIndex:AQ}),sae=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return _z({reducer:aae,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([aN.middleware,sN.middleware,cf.middleware,hN.middleware,mN.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(X_({type:"raf"}))},devTools:{serialize:{replacer:Gie},name:"recharts-".concat(r)}})};function oae(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Pt(),a=m.useRef(null);if(i)return r;a.current==null&&(a.current=sae(t,n));var s=e0;return m.createElement(pW,{context:s,store:a.current},r)}function uae(e){var{layout:t,margin:r}=e,n=nt(),i=Pt();return m.useEffect(()=>{i||(n(Qz(t)),n(Zz(r)))},[n,i,t,r]),null}var lae=m.memo(uae,Ko);function cae(e){var t=nt();return m.useEffect(()=>{t(Zie(e))},[t,e]),null}var fae=e=>{var t=nt();return m.useEffect(()=>{t(nae(e))},[t,e]),null},dae=m.memo(fae,Ko);function RT(e){var{zIndex:t,isPanorama:r}=e,n=m.useRef(null),i=nt();return m.useLayoutEffect(()=>(n.current&&i(TQ({zIndex:t,element:n.current,isPanorama:r})),()=>{i(wQ({zIndex:t,isPanorama:r}))}),[i,t,r]),m.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function LT(e){var{children:t,isPanorama:r}=e,n=ue(hQ);if(!n||n.length===0)return t;var i=n.filter(s=>s<0),a=n.filter(s=>s>0);return m.createElement(m.Fragment,null,i.map(s=>m.createElement(RT,{key:s,zIndex:s,isPanorama:r})),t,a.map(s=>m.createElement(RT,{key:s,zIndex:s,isPanorama:r})))}var hae=["children"];function pae(e,t){if(e==null)return{};var r,n,i=mae(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 mae(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 rc(){return rc=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},rc.apply(null,arguments)}var gae={width:"100%",height:"100%",display:"block"},bae=m.forwardRef((e,t)=>{var r=mS(),n=gS(),i=SS();if(!Ua(r)||!Ua(n))return null;var{children:a,otherAttributes:s,title:o,desc:u}=e,l,c;return s!=null&&(typeof s.tabIndex=="number"?l=s.tabIndex:l=i?0:void 0,typeof s.role=="string"?c=s.role:c=i?"application":void 0),m.createElement(Qk,rc({},s,{title:o,desc:u,role:c,tabIndex:l,width:r,height:n,style:gae,ref:t}),a)}),yae=e=>{var{children:t}=e,r=ue($c);if(!r)return null;var{width:n,height:i,y:a,x:s}=r;return m.createElement(Qk,{width:n,height:i,x:s,y:a},t)},MT=m.forwardRef((e,t)=>{var{children:r}=e,n=pae(e,hae),i=Pt();return i?m.createElement(yae,null,m.createElement(LT,{isPanorama:!0},r)):m.createElement(bae,rc({ref:t},n),m.createElement(LT,{isPanorama:!1},r))});function vae(){var e=nt(),[t,r]=m.useState(null),n=ue(yq);return m.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;ke(a)&&a!==n&&e(eq(a))}},[t,e,n]),r}function jT(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 xae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jT(Object(r),!0).forEach(function(n){Eae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eae(e,t,r){return(t=Tae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tae(e){var t=wae(e,"string");return typeof t=="symbol"?t:t+""}function wae(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 ri(){return ri=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},ri.apply(null,arguments)}var Aae=()=>(XQ(),null);function nc(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var kae=m.forwardRef((e,t)=>{var r,n,i=m.useRef(null),[a,s]=m.useState({containerWidth:nc((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:nc((n=e.style)===null||n===void 0?void 0:n.height)}),o=m.useCallback((l,c)=>{s(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();o(c,f);var d=p=>{var b=p[0];if(b!=null){var{width:y,height:x}=b.contentRect;o(y,x)}},h=new ResizeObserver(d);h.observe(l),i.current=h}},[t,o]);return m.useEffect(()=>()=>{var l=i.current;l?.disconnect()},[o]),m.createElement(m.Fragment,null,m.createElement(Vo,{width:a.containerWidth,height:a.containerHeight}),m.createElement("div",ri({ref:u},e)))}),_ae=m.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,a]=m.useState({containerWidth:nc(r),containerHeight:nc(n)}),s=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}})},[]),o=m.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null){var{width:l,height:c}=u.getBoundingClientRect();s(l,c)}},[t,s]);return m.createElement(m.Fragment,null,m.createElement(Vo,{width:i.containerWidth,height:i.containerHeight}),m.createElement("div",ri({ref:o},e)))}),Sae=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return m.createElement(m.Fragment,null,m.createElement(Vo,{width:r,height:n}),m.createElement("div",ri({ref:t},e)))}),Cae=m.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?m.createElement(_ae,ri({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?m.createElement(Sae,ri({},e,{width:r,height:n,ref:t})):m.createElement(m.Fragment,null,m.createElement(Vo,{width:r,height:n}),m.createElement("div",ri({ref:t},e)))});function Iae(e){return e?kae:Cae}var Oae=m.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:s,onDoubleClick:o,onMouseDown:u,onMouseEnter:l,onMouseLeave:c,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:p,onTouchStart:b,style:y,width:x,responsive:T,dispatchTouchEvents:E=!0}=e,k=m.useRef(null),w=nt(),[A,S]=m.useState(null),[O,R]=m.useState(null),C=vae(),M=hS(),L=M?.width>0?M.width:x,X=M?.height>0?M.height:i,U=m.useCallback(Z=>{C(Z),typeof t=="function"&&t(Z),S(Z),R(Z),Z!=null&&(k.current=Z)},[C,t,S,R]),$=m.useCallback(Z=>{w(iN(Z)),w(Cr({handler:a,reactEvent:Z}))},[w,a]),q=m.useCallback(Z=>{w(Kp(Z)),w(Cr({handler:l,reactEvent:Z}))},[w,l]),Y=m.useCallback(Z=>{w(CI()),w(Cr({handler:c,reactEvent:Z}))},[w,c]),V=m.useCallback(Z=>{w(Kp(Z)),w(Cr({handler:f,reactEvent:Z}))},[w,f]),re=m.useCallback(()=>{w(cN())},[w]),N=m.useCallback(()=>{w(fN())},[w]),ye=m.useCallback(Z=>{w(lN(Z.key))},[w]),pe=m.useCallback(Z=>{w(Cr({handler:s,reactEvent:Z}))},[w,s]),P=m.useCallback(Z=>{w(Cr({handler:o,reactEvent:Z}))},[w,o]),ge=m.useCallback(Z=>{w(Cr({handler:u,reactEvent:Z}))},[w,u]),Oe=m.useCallback(Z=>{w(Cr({handler:d,reactEvent:Z}))},[w,d]),he=m.useCallback(Z=>{w(Cr({handler:b,reactEvent:Z}))},[w,b]),Te=m.useCallback(Z=>{E&&w(pN(Z)),w(Cr({handler:p,reactEvent:Z}))},[w,E,p]),ve=m.useCallback(Z=>{w(Cr({handler:h,reactEvent:Z}))},[w,h]),J=Iae(T);return m.createElement(XI.Provider,{value:A},m.createElement(sU.Provider,{value:O},m.createElement(J,{width:L??y?.width,height:X??y?.height,className:Fe("recharts-wrapper",n),style:xae({position:"relative",cursor:"default",width:L,height:X},y),onClick:$,onContextMenu:pe,onDoubleClick:P,onFocus:re,onBlur:N,onKeyDown:ye,onMouseDown:ge,onMouseEnter:q,onMouseLeave:Y,onMouseMove:V,onMouseUp:Oe,onTouchEnd:ve,onTouchMove:Te,onTouchStart:he,ref:U},m.createElement(Aae,null),r)))}),Nae=["width","height","responsive","children","className","style","compact","title","desc"];function Pae(e,t){if(e==null)return{};var r,n,i=Dae(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 Dae(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 Rae=m.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:a,className:s,style:o,compact:u,title:l,desc:c}=e,f=Pae(e,Nae),d=qr(f);return u?m.createElement(m.Fragment,null,m.createElement(Vo,{width:r,height:n}),m.createElement(MT,{otherAttributes:d,title:l,desc:c},a)):m.createElement(Oae,{className:s,style:o,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(MT,{otherAttributes:d,title:l,desc:c,ref:t},m.createElement(Mte,null,a)))});function Gp(){return Gp=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},Gp.apply(null,arguments)}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 Lae(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){Mae(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 Mae(e,t,r){return(t=jae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jae(e){var t=Bae(e,"string");return typeof t=="symbol"?t:t+""}function Bae(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 Fae={top:5,right:5,bottom:5,left:5},$ae=Lae({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Fae,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},gN),yN=m.forwardRef(function(t,r){var n,i=$t(t.categoricalChartProps,$ae),{chartName:a,defaultTooltipEventType:s,validateTooltipEventTypes:o,tooltipPayloadSearcher:u,categoricalChartProps:l}=t,c={chartName:a,defaultTooltipEventType:s,validateTooltipEventTypes:o,tooltipPayloadSearcher:u,eventEmitter:void 0};return m.createElement(oae,{preloadedState:{options:c},reduxStoreName:(n=l.id)!==null&&n!==void 0?n:a},m.createElement(kte,{chartData:l.data}),m.createElement(lae,{layout:i.layout,margin:i.margin}),m.createElement(dae,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),m.createElement(cae,{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(Rae,Gp({},i,{ref:r})))}),Uae=["axis"],Hae=m.forwardRef((e,t)=>m.createElement(yN,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Uae,tooltipPayloadSearcher:ZI,categoricalChartProps:e,ref:t})),zae=["axis","item"],qae=m.forwardRef((e,t)=>m.createElement(yN,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:zae,tooltipPayloadSearcher:ZI,categoricalChartProps:e,ref:t}));const eo=new Set(["beginTimeSeconds","endTimeSeconds","inspectedCount"]);function FT(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function _g(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 ff(e){if(typeof e=="number")return Number.isFinite(e)?e:null;if(_g(e)){const t=Object.values(e)[0];return typeof t=="number"&&Number.isFinite(t)?t:null}return null}function So(e,t){return e==null?"—":typeof e=="number"?t&&XN(t,e)?FT(e):t&&ZN(t,e)?FT(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"?_g(e)?So(Object.values(e)[0],t):JSON.stringify(e):String(e)}function gh(e){const t=[],r=e[0],n=r.facet,i=new Set;if(n!==void 0)if(Array.isArray(n))n.forEach((o,u)=>{const l=Object.keys(r).find(c=>c!=="facet"&&!eo.has(c)&&r[c]===o);l&&i.add(l),t.push({key:`facet-${u}`,label:l??`Group ${u+1}`,get:c=>c.facet[u]})});else{const o=Object.keys(r).find(u=>u!=="facet"&&!eo.has(u)&&r[u]===n);o&&i.add(o),t.push({key:"facet",label:o??"Name",get:u=>u.facet})}const a=[],s=new Set;for(const o of e)for(const u of Object.keys(o))s.has(u)||(s.add(u),a.push(u));for(const o of a)o==="facet"||eo.has(o)||i.has(o)||t.push({key:o,label:o,get:u=>u[o]});return t}function Wae(e){const t=Object.keys(e[0]).filter(l=>l!=="facet"&&l!=="comparison"&&!eo.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"),s=t.filter(l=>!i.has(l)),o=[];for(const l of e){const c=String(l.comparison);o.includes(c)||o.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:s,periods:o,grouped:u}}const Vae=new Set(["beginTimeSeconds","endTimeSeconds","inspectedCount","facet","comparison"]);function Sg(e){const[t,r]=m.useState(new Set),n=a=>r(s=>{const o=new Set(s);return o.has(a)?o.delete(a):o.add(a),o}),i=m.useMemo(()=>t.size===0?e:e.filter(a=>t.has(a.name)),[e,t]);return{selected:t,toggle:n,visible:i}}function Cg(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 ic(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 Ig(e){return Object.keys(e).filter(t=>!Vae.has(t)&&!Yae(e,t))}function Yae(e,t){const r=e.facet;return r===void 0?!1:Array.isArray(r)?r.includes(e[t]):e[t]===r}const vN={background:Jt.paper,border:`1px solid ${Jt.border}`,borderRadius:4,fontSize:11},Kae={color:Jt.inkMuted,marginBottom:2},Gae={color:Jt.inkLight};function Og({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]),s=i&&(i.operator===">"||i.operator===">="),o=i&&(i.operator==="<"||i.operator==="<=");return v.jsxs(Hae,{width:e,height:t,data:a,margin:{top:10,right:20,bottom:30,left:50},children:[v.jsx(yg,{strokeDasharray:"3 3",stroke:Jt.border}),v.jsx(Tg,{dataKey:"x",tickFormatter:n,tick:{fontSize:10,fill:Jt.inkMuted},tickLine:!1,axisLine:{stroke:Jt.inkFaint}}),v.jsx(wg,{tickFormatter:ic,tick:{fontSize:11,fill:Jt.inkMuted},tickLine:!1,axisLine:!1,width:48}),v.jsx(eO,{contentStyle:vN,labelStyle:Kae,itemStyle:Gae,labelFormatter:u=>n(u),formatter:(u,l)=>[ic(u),l]}),i&&v.jsx(BO,{y:i.value,stroke:"#b33a2a",strokeWidth:1.5,strokeDasharray:"6 4"}),s&&v.jsx(Up,{y1:i.value,fill:"rgba(179, 58, 42, 0.12)"}),o&&v.jsx(Up,{y2:i.value,fill:"rgba(179, 58, 42, 0.12)"}),r.map(u=>v.jsx(ZO,{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 Xae({width:e,height:t,data:r,color:n}){return v.jsxs(qae,{width:e,height:t,data:r,margin:{top:10,right:20,bottom:30,left:50},children:[v.jsx(yg,{strokeDasharray:"3 3",stroke:Jt.border,vertical:!1}),v.jsx(Tg,{dataKey:"label",tick:{fontSize:10,fill:Jt.inkMuted},tickLine:!1,axisLine:{stroke:Jt.inkFaint}}),v.jsx(wg,{tickFormatter:ic,tick:{fontSize:11,fill:Jt.inkMuted},tickLine:!1,axisLine:!1,width:48}),v.jsx(eO,{contentStyle:vN,labelStyle:{color:Jt.inkMuted},formatter:i=>[ic(i),"count"]}),v.jsx(rN,{dataKey:"value",fill:n,radius:[2,2,0,0],maxBarSize:60})]})}function Ng({items:e,selectedNames:t,onToggle:r}){if(e.length<=1)return null;const n=t&&t.size>0;return v.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 v.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-sans",style:{color:Jt.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:[v.jsx("svg",{width:16,height:2,children:v.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 df({containerSize:e,defaultHeight:t,legendHeight:r=0,children:n}){const{ref:i,size:{width:a}}=zN();if(e){const s=Math.max(e.width-8,100),o=Math.max(e.height-r-8,80);return v.jsx(v.Fragment,{children:n({width:s,height:o})})}return v.jsx("div",{ref:i,className:F.chartContainer,children:a>0&&n({width:a-32,height:t})})}function $T({rows:e,containerSize:t,threshold:r}){const n="facet"in e[0],i="comparison"in e[0];return n?v.jsx(Qae,{rows:e,containerSize:t,threshold:r}):i?v.jsx(Jae,{rows:e,containerSize:t}):v.jsx(Zae,{rows:e,containerSize:t,threshold:r})}function Zae({rows:e,containerSize:t,threshold:r}){const n=m.useMemo(()=>Ig(e[0]),[e]),i=m.useMemo(()=>n.map((l,c)=>({name:l,color:F.chartColors[c%F.chartColors.length],data:e.map(f=>({x:f.beginTimeSeconds,y:ff(f[l])}))})),[e,n]),{selected:a,toggle:s,visible:o}=Sg(i),u=i.length>1?28:0;return v.jsx(df,{containerSize:t,defaultHeight:280,legendHeight:u,children:({width:l,height:c})=>v.jsxs("div",{children:[v.jsx(Og,{width:l,height:c,series:o,formatX:Cg,threshold:r}),v.jsx(Ng,{items:i,selectedNames:a,onToggle:s})]})})}function Qae({rows:e,containerSize:t,threshold:r}){const n=m.useMemo(()=>{const l=Ig(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,ff(p[l]))}return c.map((p,b)=>({name:p,color:F.chartColors[b%F.chartColors.length],data:d.map(y=>({x:y,y:h.get(y)?.get(p)??null}))}))},[e]),{selected:i,toggle:a,visible:s}=Sg(n),o=n.length>1?28:0;return v.jsx(df,{containerSize:t,defaultHeight:300,legendHeight:o,children:({width:u,height:l})=>v.jsxs("div",{children:[v.jsx(Og,{width:u,height:l,series:s,formatX:Cg,threshold:r}),v.jsx(Ng,{items:n,selectedNames:i,onToggle:a})]})})}function Jae({rows:e,containerSize:t}){const r=m.useMemo(()=>{const u=Ig(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:F.chartColors[p%F.chartColors.length],dashed:h!=="current",data:(l.get(h)??[]).map(b=>({x:b.beginTimeSeconds+(h!=="current"?f:0),y:ff(b[u])})).sort((b,y)=>b.x-y.x)}))},[e]),{selected:n,toggle:i,visible:a}=Sg(r),s=r.length>1?28:0;return v.jsx(df,{containerSize:t,defaultHeight:280,legendHeight:s,children:({width:o,height:u})=>v.jsxs("div",{children:[v.jsx(Og,{width:o,height:u,series:a,formatX:Cg}),v.jsx(Ng,{items:r,selectedNames:n,onToggle:i})]})})}function UT({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],s=Object.keys(a).map(Number).sort((o,u)=>o-u);return{metricName:r.replace("histogram.",""),data:s.map((o,u)=>{const l=s[u+1];return{label:l!==void 0?`${o}–${l}`:`${o}+`,value:a[String(o)]}})}},[e,r]);return r?v.jsx(df,{containerSize:t,defaultHeight:260,legendHeight:24,children:({width:a,height:s})=>v.jsxs("div",{children:[v.jsxs("div",{className:"text-xs font-sans mb-1",style:{color:Jt.inkMuted},children:[i," distribution"]}),v.jsx(Xae,{width:a,height:s,data:n,color:"#6b9fd4"})]})}):null}function HT({columns:e,row:t}){return v.jsx("div",{className:"flex flex-wrap gap-3 my-2",children:e.map(r=>v.jsxs("div",{className:`${F.card} min-w-[120px]`,children:[v.jsx("div",{className:F.cardTitle,children:r.label}),v.jsx("div",{className:F.cardValue,children:So(r.get(t),r.key)})]},r.key))})}function ac({value:e}){return v.jsx("span",{className:F.tableCellText,title:e,children:e})}function Wu({value:e,colKey:t}){return e!=null&&typeof e=="object"&&!Array.isArray(e)?_g(e)?v.jsx(ac,{value:So(e,t)}):v.jsx(zm,{data:e,collapsed:!0}):v.jsx(ac,{value:So(e,t)})}function zT({columns:e,rows:t}){return v.jsx("div",{className:`${F.tableContainer} my-2`,children:v.jsxs("table",{className:"w-full",children:[v.jsx("thead",{className:"sticky top-0 z-10",children:v.jsx("tr",{className:F.tableHeaderRow,children:e.map(r=>v.jsx("th",{className:F.tableHeaderCell,children:r.label},r.key))})}),v.jsx("tbody",{children:t.map((r,n)=>v.jsx("tr",{className:F.tableRow,children:e.map(i=>v.jsx("td",{className:F.tableCell,children:v.jsx(Wu,{value:i.get(r),colKey:i.key})},i.key))},n))})]})})}const Xp=m.memo(function({data:t,containerSize:r,threshold:n,chartType:i}){if(typeof t=="string")return v.jsx("div",{className:F.analysisBlock,children:v.jsx(fi,{linkSafety:{enabled:!1},children:t})});if(t&&typeof t=="object"&&!Array.isArray(t)&&"error"in t)return v.jsx("div",{className:F.resultErrorMessage,children:String(t.error)});if(t&&typeof t=="object"&&!Array.isArray(t))return v.jsx(zm,{data:t});if(!Array.isArray(t)||t.length===0)return v.jsx("div",{className:F.toolLoading,children:"No results returned."});if(t.every(h=>typeof h!="object"||h===null))return v.jsx("div",{className:`${F.tableContainer} my-2`,children:v.jsxs("table",{className:"w-full",children:[v.jsx("thead",{className:"sticky top-0 z-10",children:v.jsx("tr",{className:F.tableHeaderRow,children:v.jsx("th",{className:F.tableHeaderCell,children:"Value"})})}),v.jsx("tbody",{children:t.map((h,p)=>v.jsx("tr",{className:F.tableRow,children:v.jsx("td",{className:F.tableCell,children:v.jsx(ac,{value:So(h)})})},p))})]})});const a=t;if(i&&i!=="auto"){if(i==="timeseries")return v.jsx($T,{rows:a,containerSize:r,threshold:n});if(i==="histogram"&&a.length>=1)return v.jsx(UT,{row:a[0],containerSize:r});if(i==="scalar"){const p=gh([a[0]]).filter(b=>!b.key.startsWith("facet"));return v.jsx(HT,{columns:p,row:a[0]})}if(i==="table"){const h=gh(a);return v.jsx(zT,{columns:h,rows:a})}}const s="beginTimeSeconds"in a[0],o=a.length===1&&Object.keys(a[0]).some(h=>h.startsWith("histogram."));if(s)return v.jsx($T,{rows:a,containerSize:r,threshold:n});if(o)return v.jsx(UT,{row:a[0],containerSize:r});if(a.length===1){const h=Object.keys(a[0]).filter(p=>!eo.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 v.jsx("div",{className:`${F.tableContainer} my-2`,children:v.jsxs("table",{className:"w-full",children:[v.jsx("thead",{className:"sticky top-0 z-10",children:v.jsx("tr",{className:F.tableHeaderRow,children:v.jsx("th",{className:F.tableHeaderCell,children:h[0]})})}),v.jsx("tbody",{children:p.map((b,y)=>v.jsx("tr",{className:F.tableRow,children:v.jsx("td",{className:F.resultListItem,children:String(b)})},y))})]})})}}if("comparison"in a[0]){const{facetLabel:h,valueKeys:p,periods:b,grouped:y}=Wae(a);if(!("facet"in a[0])){const T=[...y.values()][0];return v.jsx("div",{className:`${F.tableContainer} my-2`,children:v.jsxs("table",{className:"w-full",children:[v.jsx("thead",{className:"sticky top-0 z-10",children:v.jsxs("tr",{className:F.tableHeaderRow,children:[v.jsx("th",{className:F.tableHeaderCell,children:"Metric"}),b.map(E=>v.jsx("th",{className:F.tableHeaderCell,children:E},E))]})}),v.jsx("tbody",{children:p.map(E=>v.jsxs("tr",{className:F.tableRow,children:[v.jsx("td",{className:F.tableCell,children:v.jsx(ac,{value:E})}),b.map(k=>v.jsx("td",{className:F.tableCell,children:v.jsx(Wu,{value:T?.byPeriod.get(k)?.[E],colKey:E})},k))]},E))})]})})}return v.jsx("div",{className:`${F.tableContainer} my-2`,children:v.jsxs("table",{className:"w-full",children:[v.jsx("thead",{className:"sticky top-0 z-10",children:v.jsxs("tr",{className:F.tableHeaderRow,children:[v.jsx("th",{className:F.tableHeaderCell,children:h}),p.map(T=>b.map(E=>v.jsx("th",{className:F.tableHeaderCell,children:p.length>1?`${T} (${E})`:E},`${T}-${E}`)))]})}),v.jsx("tbody",{children:[...y.values()].map((T,E)=>v.jsxs("tr",{className:F.tableRow,children:[v.jsx("td",{className:F.tableCell,children:v.jsx(Wu,{value:T.label,colKey:h})}),p.map(k=>b.map(w=>v.jsx("td",{className:F.tableCell,children:v.jsx(Wu,{value:T.byPeriod.get(w)?.[k],colKey:k})},`${k}-${w}`)))]},E))})]})})}const l=gh(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=>ff(h.get(a[0]))!==null)?v.jsx(HT,{columns:f,row:a[0]}):v.jsx(zT,{columns:l,rows:a})}),xN=m.memo(function({content:t,isAnimating:r}){return v.jsxs("details",{className:"mb-2 border border-[#e8e3da]/30 rounded-md",children:[v.jsx("summary",{className:"cursor-pointer select-none px-3 py-1.5 text-xs text-[#9c9890] italic hover:text-[#6b6560] transition-colors",children:"Thinking"}),v.jsx("div",{className:"px-3 pb-2 text-sm text-[#9c9890] italic",children:v.jsx(fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:t})})]})});function EN({children:e,actions:t,containerRef:r}){return v.jsxs("div",{ref:r,className:`${F.analysisContainer} relative group/analysis`,children:[v.jsxs("div",{className:"flex items-center justify-between mb-1",children:[v.jsx("div",{className:F.summaryLabel,children:"Analysis"}),t]}),e]})}const qT={[zn.CREATE_WIDGET]:{done:"Widget Created",loading:"Creating widget...",errorLabel:"Widget Error"},[zn.UPDATE_WIDGET]:{done:"Widget Updated",loading:"Updating widget...",errorLabel:"Widget Error"},[zn.DELETE_WIDGET]:{done:"Widget Deleted",loading:"Deleting widget...",errorLabel:"Widget Error"},[zn.CREATE_MONITOR]:{done:"Monitor Created",loading:"Creating monitor...",errorLabel:"Monitor Error"},[zn.UPDATE_MONITOR]:{done:"Monitor Updated",loading:"Updating monitor...",errorLabel:"Monitor Error"},[zn.DELETE_MONITOR]:{done:"Monitor Deleted",loading:"Deleting monitor...",errorLabel:"Monitor Error"},[zn.TOGGLE_MONITOR]:{done:"Monitor Toggled",loading:"Toggling monitor...",errorLabel:"Monitor Error"}},ese={"tool-execute_nrql":"New Relic","tool-execute_hogql":"PostHog","tool-nrql":"New Relic","tool-newrelic":"New Relic","tool-hogql":"PostHog","tool-posthog":"PostHog"};function tse(e){return ese[e]??"Google Cloud"}const rse={"tool-execute_nrql":"newrelic","tool-execute_hogql":"posthog","tool-nrql":"newrelic","tool-newrelic":"newrelic","tool-hogql":"posthog","tool-posthog":"posthog"};function nse(e){const t=rse[e]??"gcp";return F.investigationAccents[t]??{container:F.investigationContainer,label:F.investigationLabel}}function WT(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 ise(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 TN(e){return e.filter(t=>t.type==="query").length}const ase={execute_nrql:"Executing NRQL query",execute_hogql:"Executing HogQL query"},sse=m.memo(function({toolName:t}){const r=ase[t]??t;return v.jsxs("div",{className:"flex items-center gap-2 py-2",children:[v.jsx("span",{className:"inline-block w-3.5 h-3.5 border-2 border-[#2b5ea7] border-t-transparent rounded-full animate-spin"}),v.jsx("span",{className:"text-sm text-[#2b5ea7] font-sans",children:r})]})}),ose=m.memo(function({content:t,isAnimating:r}){return v.jsx("div",{className:F.analysisBlock,children:v.jsx(fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:t})})}),use=m.memo(function({content:t}){return v.jsxs("div",{className:F.summaryBlock,children:[v.jsx("div",{className:F.summaryLabel,children:"Analysis"}),v.jsx(fi,{isAnimating:!1,controls:{code:!0},linkSafety:{enabled:!1},children:t})]})}),lse=m.memo(function({query:t,results:r,index:n,total:i}){return v.jsxs("div",{className:"mb-3",children:[v.jsxs("details",{className:"mb-2",open:i===1,children:[v.jsxs("summary",{className:F.toolQueryToggle,children:["Query ",i>1?`${n+1}: `:"",t.length>80?t.slice(0,80)+"...":t]}),v.jsx("div",{className:F.toolQueryCode,children:t})]}),v.jsx(Xp,{data:r})]})});function VT(e,t,r,n,i,a){if(e.type==="tool-call")return r?v.jsx(sse,{toolName:e.toolName},t):null;if(e.type==="reasoning")return v.jsx(xN,{content:e.content,isAnimating:r},t);if(e.type==="text")return a?e.content.trim()?v.jsx(fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:e.content},t):null:v.jsx(ose,{content:e.content,isAnimating:r},t);if(e.type==="summary")return v.jsx(use,{content:e.content},t);if(e.type==="query"&&e.query){const s=i();return v.jsx(lse,{query:e.query,results:e.results,index:s,total:n},t)}return null}const cse=m.memo(function({parts:t,isAnimating:r}){const n=TN(t);let i=0;const a=()=>i++,s=t.findIndex(l=>l.type==="analysis-start"),o=s===-1?t:t.slice(0,s),u=s===-1?[]:t.slice(s+1);return v.jsxs(v.Fragment,{children:[o.map((l,c)=>VT(l,c,r,n,a,!1)),u.length>0&&v.jsx(EN,{children:u.map((l,c)=>VT(l,o.length+1+c,r,n,a,!0))}),r&&v.jsx(Pg,{className:F.investigationThinking})]})}),fse=m.memo(function({part:t,progressStore:r}){if(t.type===zn.BEGIN_ANALYSIS)return null;const n=t.type.startsWith("tool-"),i=t.type in qT,a=n&&!i,s=R3(r,a?t.toolCallId:void 0);if(a){const u=tse(t.type),l=nse(t.type),c=t.state==="output-available",f=c?t.output:void 0;if(c&&WT(f)&&f.error)return v.jsxs("div",{className:l.container,children:[v.jsx("div",{className:l.label,children:u}),v.jsx("div",{className:F.resultErrorMessage,children:f.error})]});let d;if(c&&WT(f)?d=s?.parts?.length?s.parts:f.parts?.length?f.parts:ise(f):s?.parts?.length?d=s.parts:c||(d=[]),d){const h=TN(d),p=c?`${u} (${h} ${h===1?"query":"queries"})`:h>0?`${u} — investigating (${h} ${h===1?"query":"queries"})`:`Querying ${u}...`;return v.jsxs("div",{className:l.container,children:[v.jsx("div",{className:l.label,children:p}),t.input?.task&&v.jsxs("div",{className:F.investigationTask,children:["Task: ",t.input.task]}),v.jsx(cse,{parts:d,isAnimating:!c})]})}if(c&&Array.isArray(f)){const h=t.input?.query;return v.jsxs("div",{children:[v.jsxs("div",{className:F.toolLabel,children:[u," Result"]}),h&&v.jsxs("details",{className:"mb-2",children:[v.jsx("summary",{className:F.toolQueryToggle,children:"Show query"}),v.jsx("div",{className:F.toolQueryCode,children:h})]}),v.jsx(Xp,{data:f})]})}return c&&f!=null?v.jsxs("div",{children:[v.jsxs("div",{className:F.toolLabel,children:[u," Result"]}),v.jsx(Xp,{data:f})]}):null}const o=qT[t.type];if(o){if(t.state==="output-available"){const u=t.output,l=u&&"error"in u;return v.jsxs("div",{children:[v.jsx("div",{className:F.toolLabel,children:l?o.errorLabel:o.done}),v.jsxs("details",{className:"mb-2",children:[v.jsx("summary",{className:F.toolQueryToggle,children:"Show details"}),v.jsx("div",{className:F.toolQueryCode,children:v.jsx(zm,{data:u})})]})]})}return v.jsx("div",{className:F.toolLoading,children:o.loading})}return null});function dse(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 hse(e){const t=[];for(const r of e)if(r.type==="text")t.push(dse(r.text.replace(vh,"")));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 hf({contentRef:e,parts:t,size:r=14}){const[n,i]=m.useState(!1),[a,s]=m.useState(!1),o=m.useCallback(async()=>{const l=hse(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 sc(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})]),s(!0),setTimeout(()=>s(!1),1500)}catch{}},[e]);return v.jsxs(v.Fragment,{children:[v.jsx("button",{type:"button",onClick:o,className:F.chatActionButton,title:n?"Copied!":"Copy as text","aria-label":n?"Copied":"Copy as text",children:n?v.jsx(YT,{size:r}):v.jsx(pse,{size:r})}),v.jsx("button",{type:"button",onClick:u,className:F.chatActionButton,title:a?"Copied!":"Copy as image","aria-label":a?"Copied":"Copy as image",children:a?v.jsx(YT,{size:r}):v.jsx(mse,{size:r})})]})}function YT({size:e=14}){return v.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:v.jsx("polyline",{points:"20 6 9 17 4 12"})})}function pse({size:e=14}){return v.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),v.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function mse({size:e=14}){return v.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.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"}),v.jsx("circle",{cx:"12",cy:"13",r:"3"})]})}const Da=Uint8Array.from([84,82,67,49]),gse=4,to=Da.length+gse,bse=10*1024*1024;async function wN(e){const t=new Blob([e.buffer],{type:"image/png"});return createImageBitmap(t,{colorSpaceConversion:"none",premultiplyAlpha:"none"})}function AN(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 yse(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 s=n>>3,o=7-(n&7),u=t[s]>>o&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 KT(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 s=0;s<3&&i<n;s++){const o=i>>3,u=7-(i&7);r[o]|=(e[a+s]&1)<<u,i++}return i>=n?r:null}function vse(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 xse(e,t){const r=await wN(e);try{const{canvas:n,ctx:i,imageData:a}=AN(r),s=new Uint8Array(to+t.length);return s.set(Da,0),new DataView(s.buffer).setUint32(Da.length,t.length,!1),s.set(t,to),yse(a.data,s),i.putImageData(a,0,0),await vse(n)}finally{r.close?.()}}async function Ese(e){const t=await wN(e);try{const{imageData:{data:r}}=AN(t),n=KT(r,to);if(!n)return null;for(let s=0;s<Da.length;s++)if(n[s]!==Da[s])return null;const i=new DataView(n.buffer,n.byteOffset,n.byteLength).getUint32(Da.length,!1);if(i<=0||i>bse)return null;const a=KT(r,to+i);return a?a.subarray(to):null}finally{t.close?.()}}function Tse({parts:e,children:t,sourceTitle:r,sourceCreatedAt:n,resolveSourceTitle:i}){const a=m.useRef(null),[s,o]=m.useState(null),u=m.useCallback(async()=>{const l=a.current;if(l)try{const{domToPng:c}=await sc(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){o("Analysis too large to embed metadata"),setTimeout(()=>o(null),2500);return}const b=await xse(d,new TextEncoder().encode(p)),y=new Blob([b.buffer],{type:"image/png"}),x=URL.createObjectURL(y),T=document.createElement("a");T.href=x;const E=new Date,k=`${E.toISOString().slice(0,10)}-${String(E.getHours()).padStart(2,"0")}-${String(E.getMinutes()).padStart(2,"0")}`;T.download=`analysis-${k}.png`,T.click(),setTimeout(()=>URL.revokeObjectURL(x),5e3)}catch{}},[e,r,n,i]);return v.jsx(EN,{containerRef:a,actions:v.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/analysis:opacity-100 transition-opacity",children:[s&&v.jsx("span",{className:"text-[10px] text-[#b33a2a] mr-1",children:s}),v.jsx(hf,{contentRef:a,parts:e,size:12}),v.jsx("button",{type:"button",onClick:u,className:F.chatActionButton,title:"Download as image","aria-label":"Download as image",children:v.jsx(wse,{size:12})})]}),children:t})}function wse({size:e=14}){return v.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),v.jsx("polyline",{points:"7 10 12 15 17 10"}),v.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}const kN=qN.memo(function({parts:t,isAnimating:r,progressStore:n,sourceTitle:i,sourceCreatedAt:a,resolveSourceTitle:s}){if(t.length===0&&!r)return v.jsx("span",{className:"text-sm italic text-[#9c9890]",children:"(interrupted)"});const o=WN(t);function u(d,h,p){if(d.type==="reasoning")return v.jsx(xN,{content:d.text,isAnimating:r},h);if(d.type==="text"){const b=p??d.text;return b.trim()?v.jsx(fi,{isAnimating:r,controls:{code:!0},linkSafety:{enabled:!1},children:b},h):null}return v.jsx(fse,{part:d,progressStore:n},h)}if(!o)return v.jsx(v.Fragment,{children:t.map((d,h)=>u(d,h))});const l=[],c=[];for(let d=0;d<t.length;d++)if(d<o.partIdx)l.push(u(t[d],d));else if(d===o.partIdx){if(o.kind==="text"){const h=t[d],p=h.text.slice(0,o.charIdx),b=h.text.slice(o.charIdx+vh.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=o.partIdx;d<t.length;d++){const h=t[d];if(d===o.partIdx){if(o.kind==="text"&&h.type==="text"){const p=h.text.slice(o.charIdx+vh.length);p.trim()&&f.push({type:"text",text:p})}}else f.push(h)}return v.jsxs(v.Fragment,{children:[l,v.jsx(Tse,{parts:f,sourceTitle:i,sourceCreatedAt:a,resolveSourceTitle:s,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 Pg({className:e}){return v.jsx("div",{className:e,children:v.jsx("span",{className:"inline-flex items-center gap-1",children:Ase.map(t=>v.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-current",style:kse[t]},t))})})}const Ase=[0,150,300],kse={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 _N({isAtBottom:e,scrollToBottom:t}){return e?null:v.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:v.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:v.jsx("polyline",{points:"6 9 12 15 18 9"})})})}function SN(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 CN(e){const t=window.getSelection();!t||t.isCollapsed||(e.clipboardData.setData("text/plain",t.toString().trimEnd()),e.preventDefault())}function _se({sessionId:e,initialMessages:t,onComplete:r,header:n,beforeInput:i}){const[a,s]=m.useState(t),o=m.useRef(new Rw).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}=JT();m.useEffect(()=>{let T=!1;const E=new EventSource(`/api/chat/subscribe/${e}`);let k;const w=new ReadableStream({start(O){k=O}});let A=0,S=null;return E.addEventListener("part",O=>{if(!T){A=0;try{const R=JSON.parse(O.data);R.type==="data-provider-part"&&SN(o,R.data),k.enqueue(R)}catch{}}}),E.addEventListener("done",()=>{try{k.close()}catch{}E.close()}),E.onerror=()=>{if(E.readyState===EventSource.CLOSED){try{k.close()}catch{}return}if(A++,A>=Ra.maxSseErrors){try{k.close()}catch{}E.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&&s([...u.current,M])};try{for await(const M of I3({stream:w})){if(T)break;O=M,R===null&&(R=setTimeout(C,Ra.chatThrottleMs))}}catch{}R!==null&&clearTimeout(R),C(),T||l.current()})(),()=>{T=!0,E.close(),S&&clearTimeout(S);try{k.close()}catch{}o.clear()}},[e,o]);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",x=a.length-1;return v.jsxs("div",{className:F.chatContainer,children:[v.jsxs("div",{className:"relative flex-1 min-h-0",children:[v.jsx("div",{ref:c,className:"overflow-y-auto overflow-x-hidden h-full",onWheel:h,onCopy:CN,children:v.jsxs("div",{ref:f,children:[n,a.map((T,E)=>{const k=T.role==="assistant"&&E===x;return v.jsxs("div",{className:"px-10",children:[E>0&&v.jsx("div",{className:F.chatSeparator}),v.jsxs("div",{children:[v.jsx("div",{className:T.role==="user"?F.chatUserLabel:F.chatAssistantLabel,children:T.role==="user"?"you":"assistant"}),v.jsx("div",{className:T.role==="user"?F.chatUserMessage:F.chatAssistantMessage,children:v.jsx(kN,{parts:T.parts,isAnimating:k,progressStore:o})})]})]},T.id||`msg-${E}`)}),y&&v.jsxs("div",{className:"px-10",children:[v.jsx("div",{className:F.chatSeparator}),v.jsx(Pg,{className:F.chatThinking})]}),v.jsx("div",{style:{height:"40px"}})]})}),v.jsx(_N,{isAtBottom:d,scrollToBottom:p})]}),i,v.jsx("div",{className:F.chatInputArea,children:v.jsxs("div",{className:"flex gap-3 items-start",children:[v.jsx("textarea",{placeholder:"Ask a debugging question...",disabled:!0,rows:1,className:F.chatInput}),v.jsx("button",{type:"button",onClick:b,"aria-label":"Stop generating",className:F.chatStopButton,children:"Stop"})]})})]})}var bh,GT;function Sse(){if(GT)return bh;GT=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(...s){clearTimeout(n);const o=Date.now(),u=o-i,l=r-u;l<=0?(i=o,t.apply(this,s)):n=setTimeout(()=>{i=Date.now(),t.apply(this,s)},l)}}return bh=e,bh}var Cse=Sse();const Ise=Nn(Cse);var IN=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},et=(e,t,r)=>(IN(e,t,"read from private field"),r?r.call(e):t.get(e)),en=(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)},Vn=(e,t,r,n)=>(IN(e,t,"write to private field"),t.set(e,r),r);function Ose(e,t){return t!=null?Ise(e,t):e}var Ir,Vu,Yu,Fs,$s,Us,Ea,Zp,Qp,Nse=class{constructor(e=[]){en(this,Ir,void 0),en(this,Vu,"ready"),en(this,Yu,void 0),en(this,Fs,new Set),en(this,$s,new Set),en(this,Us,new Set),this.pushMessage=t=>{Vn(this,Ir,et(this,Ir).concat(t)),et(this,Ea).call(this)},this.popMessage=()=>{Vn(this,Ir,et(this,Ir).slice(0,-1)),et(this,Ea).call(this)},this.replaceMessage=(t,r)=>{Vn(this,Ir,[...et(this,Ir).slice(0,t),this.snapshot(r),...et(this,Ir).slice(t+1)]),et(this,Ea).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,r)=>{const n=r?Ose(t,r):t;return et(this,Fs).add(n),()=>{et(this,Fs).delete(n)}},this["~registerStatusCallback"]=t=>(et(this,$s).add(t),()=>{et(this,$s).delete(t)}),this["~registerErrorCallback"]=t=>(et(this,Us).add(t),()=>{et(this,Us).delete(t)}),en(this,Ea,()=>{et(this,Fs).forEach(t=>t())}),en(this,Zp,()=>{et(this,$s).forEach(t=>t())}),en(this,Qp,()=>{et(this,Us).forEach(t=>t())}),Vn(this,Ir,e)}get status(){return et(this,Vu)}set status(e){Vn(this,Vu,e),et(this,Zp).call(this)}get error(){return et(this,Yu)}set error(e){Vn(this,Yu,e),et(this,Qp).call(this)}get messages(){return et(this,Ir)}set messages(e){Vn(this,Ir,[...e]),et(this,Ea).call(this)}};Ir=new WeakMap;Vu=new WeakMap;Yu=new WeakMap;Fs=new WeakMap;$s=new WeakMap;Us=new WeakMap;Ea=new WeakMap;Zp=new WeakMap;Qp=new WeakMap;var Ta,Jp=class extends D3{constructor({messages:e,...t}){const r=new Nse(e);super({...t,state:r}),en(this,Ta,void 0),this["~registerMessagesCallback"]=(n,i)=>et(this,Ta)["~registerMessagesCallback"](n,i),this["~registerStatusCallback"]=n=>et(this,Ta)["~registerStatusCallback"](n),this["~registerErrorCallback"]=n=>et(this,Ta)["~registerErrorCallback"](n),Vn(this,Ta,r)}};Ta=new WeakMap;function Pse({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 Jp(i));("chat"in r&&r.chat!==a.current||"id"in r&&a.current.id!==r.id)&&(a.current="chat"in r?r.chat:new Jp(i));const o=m.useCallback(d=>a.current["~registerMessagesCallback"](d,e),[e,a.current.id]),u=m.useSyncExternalStore(o,()=>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 ON={full:{userMessage:F.chatUserMessage,assistantMessage:F.chatAssistantMessage,separator:F.chatSeparator,thinking:F.chatThinking,emptyState:F.chatEmptyState,inputArea:F.chatInputArea,textarea:F.chatInput,sendBtn:F.chatButton,stopBtn:F.chatStopButton,continueMargin:"mt-4"},panel:{userMessage:F.panelChatUserMessage,assistantMessage:F.panelChatAssistantMessage,separator:F.panelChatSeparator,thinking:F.panelChatThinking,emptyState:F.panelChatEmptyState,inputArea:F.panelChatInputArea,textarea:F.panelChatTextarea,sendBtn:F.primaryBtn,stopBtn:F.secondaryBtn,continueMargin:"mt-3"}},Dse=m.memo(function({msg:t,msgIndex:r,showSeparator:n,isAnimating:i,progressStore:a,variant:s,sourceTitle:o,sourceCreatedAt:u,resolveSourceTitle:l,renderMessage:c}){const f=ON[s],d=s==="panel"?"px-4":"px-10",h=m.useRef(null),p=v.jsx("div",{className:t.role==="user"?F.chatUserLabel:F.chatAssistantLabel,children:t.role==="user"?"you":"assistant"}),b=v.jsx("div",{className:t.role==="user"?f.userMessage:f.assistantMessage,children:v.jsx(kN,{parts:t.parts,isAnimating:i,progressStore:a,sourceTitle:o,sourceCreatedAt:u,resolveSourceTitle:l})}),y=v.jsxs("div",{className:"relative group",children:[!i&&v.jsx("div",{className:F.chatMessageActions,children:v.jsx(hf,{contentRef:h,parts:t.parts})}),v.jsxs("div",{ref:h,className:F.chatMessageCard,children:[p,b]})]});return v.jsxs("div",{className:d,children:[n&&v.jsx("div",{className:f.separator}),c?c(t,r,{label:p,content:b}):y]})}),NN=m.forwardRef(function({chatId:t,apiEndpoint:r,placeholder:n="Send a message...",extraBody:i,onData:a,initialMessages:s,onStatusChange:o,onBeforeStop:u,variant:l="full",header:c,scrollHeader:f,beforeMessages:d,collapseCount:h=0,analysisOnlyIndex:p,emptyStateExtras:b,beforeInput:y,afterMessages:x,renderMessage:T,readOnly:E=!1,inputDisabled:k=!1,onRetryTruncate:w,sourceTitle:A,sourceCreatedAt:S,resolveSourceTitle:O,className:R},C){const[M,L]=m.useState(""),X=m.useRef(new Rw).current,U=ON[l],$=l==="panel"?"px-4":"px-10",q=m.useRef(null),{scrollRef:Y,contentRef:V,isAtBottom:re,handleWheel:N,scrollToBottom:ye,scrollToTop:pe}=JT(),P=m.useRef(a);P.current=a;const ge=m.useRef(i);ge.current=i;const Oe=m.useMemo(()=>new Jp({id:t,messages:s,transport:new Dw({api:r,prepareSendMessagesRequest:({id:be,messages:Se})=>({body:{id:be,message:Se[Se.length-1],...ge.current}})}),onData:be=>{be.type==="data-provider-part"&&SN(X,be.data),P.current?.(be)}}),[]),{messages:he,setMessages:Te,status:ve,sendMessage:J,stop:Z,error:fe}=Pse({chat:Oe,experimental_throttle:Ra.chatThrottleMs}),W=m.useRef(J);W.current=J;const Qe=m.useRef(he);Qe.current=he;const we=ve==="submitted"||ve==="streaming",Ge=h<=he.length?h:0,ze=p!==void 0?he[p]:void 0,St=m.useMemo(()=>{if(!ze||ze.role!=="assistant")return null;const be=ew(ze.parts);return be?{...ze,parts:be}:null},[ze]),xe=m.useRef(ve),Be=m.useRef(o);Be.current=o,m.useEffect(()=>{xe.current!==ve&&(ve==="ready"&&(X.clear(),q.current?.focus()),Be.current?.(ve,he)),xe.current=ve},[ve,he]);const pt=he[he.length-1],xt=pt?.parts[pt.parts.length-1],kr=!we&&he.length>Ge&&pt?.role==="assistant"&&xt?.type.startsWith("tool-"),ia=xt?.state,aa=xt?.type.startsWith("tool-")&&ia!=="output-available",fs=xt?.type==="text"||xt?.type==="reasoning",z=ve==="submitted"||ve==="streaming"&&!fs&&!aa,te=ve==="streaming"?he[he.length-1]?.id:null,me=()=>{u?.({messages:he,progressStore:X}),fetch("/api/chat/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})}).catch(()=>{}),Z()},ee=m.useRef(me);ee.current=me,m.useEffect(()=>{if(!we)return;const be=Se=>{Se.key==="Escape"&&ee.current()};return document.addEventListener("keydown",be),()=>document.removeEventListener("keydown",be)},[we]);const ae=m.useRef(k);m.useEffect(()=>{ae.current&&!k&&q.current?.focus(),ae.current=k},[k]);const Le=be=>{be.preventDefault();const Se=M.trim();!Se||we||k||(L(""),ye({animation:"instant"}),J({text:Se}),q.current?.focus())},We=m.useCallback(()=>{ye({animation:"instant"}),W.current({text:"Continue"})},[ye]),it=m.useRef(w);it.current=w;const ut=m.useCallback(async()=>{const be=Qe.current;let Se=-1;for(let sa=be.length-1;sa>=0;sa--)if(be[sa]?.role==="user"){Se=sa;break}if(Se===-1)return;const mr=be[Se].parts.find(sa=>sa.type==="text");if(!(!mr||mr.type!=="text")){try{await it.current?.(Se)}catch{return}Te(be.slice(0,Se)),W.current({text:mr.text})}},[Te]);return m.useImperativeHandle(C,()=>({messages:he,setMessages:Te,sendMessage:J,stop:Z,scrollToBottom:ye,scrollToTop:pe,progressStore:X,status:ve,isLoading:we,error:fe}),[he,Te,J,Z,ye,pe,X,ve,we,fe]),v.jsxs("div",{className:`flex flex-col h-full ${R??""}`,children:[c,v.jsxs("div",{className:"relative flex-1 min-h-0",children:[v.jsx("div",{ref:Y,className:`overflow-y-auto overflow-x-hidden h-full${l==="panel"?" py-4":""}`,onWheel:N,onCopy:CN,children:v.jsxs("div",{ref:V,className:"min-h-full flex flex-col",children:[f,d&&v.jsx("div",{className:$,children:d}),he.length===0&&ve!=="submitted"&&v.jsx("div",{className:"flex-1 flex flex-col items-center justify-center gap-6 py-16",children:b??v.jsx("span",{className:U.emptyState,children:n})}),he.map((be,Se)=>Se<Ge?null:v.jsx(Dse,{msg:Se===p&&St?St:be,msgIndex:Se,showSeparator:Se>Ge,isAnimating:be.id===te,progressStore:X,variant:l,sourceTitle:A,sourceCreatedAt:S,resolveSourceTitle:O,renderMessage:T},be.id||`msg-${Se}`)),z&&v.jsxs("div",{className:$,children:[he.length>0&&v.jsx("div",{className:U.separator}),v.jsx(Pg,{className:U.thinking})]}),!E&&!k&&kr&&v.jsxs("div",{className:`flex flex-col items-center gap-2 ${U.continueMargin} ${$}`,children:[v.jsx("span",{className:"text-xs text-[#9c9890] font-sans",children:"Response was interrupted"}),v.jsx("button",{type:"button",onClick:We,className:F.chatContinueButton,children:"Continue"})]}),x&&v.jsx("div",{className:$,children:x}),!E&&!k&&fe&&v.jsx("div",{className:$,children:v.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:[v.jsx("span",{className:"flex-1",children:fe.message}),v.jsx("button",{type:"button",onClick:ut,className:"text-xs underline shrink-0 font-sans",children:"Retry"})]})}),v.jsx("div",{style:{height:"40px"}})]})}),v.jsx(_N,{isAtBottom:re,scrollToBottom:ye})]}),y,!E&&v.jsx("form",{onSubmit:Le,className:U.inputArea,children:v.jsxs("div",{className:l==="full"?"flex gap-3 items-start":"flex gap-2",children:[v.jsx("textarea",{ref:q,value:M,onChange:be=>{L(be.target.value),be.target.style.height="auto",be.target.style.height=`${be.target.scrollHeight}px`},onKeyDown:be=>{if(be.key==="Enter"&&!be.shiftKey){be.preventDefault(),Le(be);const Se=be.target;Se.style.height="auto"}},placeholder:n,rows:1,autoFocus:!0,disabled:k,className:U.textarea}),we?v.jsx("button",{type:"button",onClick:me,"aria-label":"Stop generating",className:U.stopBtn,children:"Stop"}):v.jsx("button",{type:"submit",disabled:!M.trim()||k,"aria-label":"Send message",className:U.sendBtn,children:"Send"})]})})]})});function PN({summary:e,summarizedCount:t,createdAt:r,showOriginals:n=!1,onToggleOriginals:i,onSave:a,onDelete:s,readOnly:o=!1}){const[u,l]=m.useState(!0),[c,f]=m.useState(!1),[d,h]=m.useState(""),[p,b]=m.useState(!1),[y,x]=m.useState(null),[T,E]=m.useState(!1),k=m.useRef(null),w=m.useMemo(()=>[{type:"text",text:e}],[e]),A=[];t&&A.push(`${t} message${t===1?"":"s"} summarized`),r&&A.push(new Date(r*1e3).toLocaleDateString(void 0,{month:"short",day:"numeric"}));const S=()=>{h(e),x(null),f(!0),l(!0)},O=async()=>{const R=d.trim();if(!(!R||!a)){b(!0),x(null);try{await a(R),f(!1)}catch{x("Failed to save summary")}finally{b(!1)}}};return v.jsxs("div",{className:`${F.compactionContainer} relative group/summary`,children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("button",{type:"button",onClick:()=>l(R=>!R),className:"flex items-baseline gap-2 min-w-0 text-left",title:u?"Collapse summary":"Expand summary",children:[v.jsx("span",{className:`${F.compactionLabel} mb-0`,children:"Summary"}),A.length>0&&v.jsx("span",{className:"text-[11px] text-[#9c9890] font-sans truncate",children:A.join(" · ")}),v.jsx(Rse,{open:u})]}),!o&&!c&&v.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/summary:opacity-100 transition-opacity",children:[u&&v.jsx(hf,{contentRef:k,parts:w,size:12}),a&&v.jsx("button",{type:"button",onClick:S,className:F.chatActionButton,title:"Edit summary","aria-label":"Edit summary",children:v.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),v.jsx("path",{d:"m15 5 4 4"})]})}),s&&v.jsx("button",{type:"button",onClick:()=>E(!0),className:F.chatActionButton,title:"Delete summary","aria-label":"Delete summary",children:v.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M3 6h18"}),v.jsx("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),v.jsx("path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]}),c?v.jsxs("div",{className:"mt-2",children:[v.jsx("textarea",{value:d,onChange:R=>h(R.target.value),rows:14,className:`${F.chatEditTextarea} text-sm font-sans`,disabled:p}),v.jsxs("div",{className:F.chatEditActions,children:[v.jsx("button",{type:"button",onClick:O,disabled:p||!d.trim(),className:F.chatEditSave,children:p?"Saving…":"Save"}),v.jsx("button",{type:"button",onClick:()=>f(!1),disabled:p,className:F.chatEditCancel,children:"Cancel"}),y&&v.jsx("span",{className:"text-xs text-[#b33a2a] font-sans",children:y})]})]}):u&&v.jsx("div",{ref:k,className:"mt-2 text-sm text-[#2c2c2c] leading-relaxed",children:v.jsx(fi,{isAnimating:!1,controls:{code:!0},linkSafety:{enabled:!1},children:e})}),!o&&i&&v.jsx("button",{type:"button",onClick:i,className:"mt-1.5 text-[11px] font-sans text-[#8a6d3b] hover:underline",children:n?"Hide original messages":"Show original messages"}),v.jsx(tw,{open:T,title:"Delete summary?",message:"The summary will be removed and the next message will use the full conversation history again. The original messages are unaffected.",onConfirm:()=>{E(!1),s?.()},onCancel:()=>E(!1)})]})}function Rse({open:e}){return v.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:`shrink-0 self-center text-[#9c9890] transition-transform ${e?"rotate-180":""}`,children:v.jsx("polyline",{points:"6 9 12 15 18 9"})})}function Lse({projectId:e,existingConfig:t}){const[r,n]=m.useState(!1),[i,a]=m.useState(""),s=m.useRef(null),o=m.useRef(null),u=m.useRef(null),[l,c]=m.useState({bottom:0,right:0}),[f,d]=GN("gcp-projectId"),h=dt.useUtils(),{data:p,isLoading:b}=dt.provider.listGcpProjects.useQuery(void 0,{staleTime:Ra.updateCheckStaleTimeMs,enabled:r}),y=dt.provider.saveConfig.useMutation({onSuccess:()=>h.provider.getConfigs.invalidate()}),x=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?x.filter(S=>S.label.toLowerCase().includes(w)):x].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)})},[x,i,f]);m.useEffect(()=>{if(!r)return;const w=s.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=>{s.current?.contains(A.target)||o.current?.contains(A.target)||n(!1)};return document.addEventListener("mousedown",w),()=>document.removeEventListener("mousedown",w)},[r]);function E(w){y.mutate({type:"gcp",config:{...t,projectId:w}}),n(!1)}const k=r?Io.createPortal(v.jsxs("div",{ref:o,className:"fixed z-[100] bg-white border border-[#d4d2cd] rounded shadow-lg w-72",style:{bottom:l.bottom,right:l.right},children:[v.jsx("div",{className:"p-1.5 border-b border-[#e8e6e1]",children:v.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&&E(T[0].value)}})}),v.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:b?v.jsx("div",{className:"px-3 py-3 text-xs text-[#9c9890] text-center font-sans",children:"Loading…"}):T.length===0?v.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 v.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:()=>E(w.value),children:[v.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?"★":"☆"}),v.jsx("span",{className:"truncate flex-1",children:w.label})]},w.value)})})]}),document.body):null;return v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:s,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"}),k]})}const Mse={newrelic:"NR",gcp:"GCP",posthog:"PH",[wa]:"ALL"},XT={gcp:0,newrelic:1,posthog:2};function jse(e){return[...e].sort((t,r)=>(XT[t.type]??99)-(XT[r.type]??99))}function Dg({activeProvider:e,onToggle:t}){const{data:r,isLoading:n}=dt.provider.ping.useQuery(void 0,{staleTime:Ra.sessionStaleTimeMs}),{data:i}=dt.provider.getConfigs.useQuery(void 0,{staleTime:Ra.monitorPollingMs}),a=jse(r?.filter(f=>f.ok)??[]),s=a.map(f=>f.type).join(","),o=i?.find(f=>f.type==="gcp")?.config??null,u=o?.projectId??"";if(m.useEffect(()=>{if(a.length===0)return;e===wa||a.some(d=>d.type===e)||t(wa)},[e,s]),!r&&n||a.length===0)return null;const l=a.some(f=>f.type==="gcp")&&o!==null,c=[{type:wa,name:"Unified"},...a];return v.jsxs("div",{className:"flex items-center gap-1.5",children:[l&&v.jsx("span",{className:`mr-0.5 transition-opacity ${e==="gcp"?"opacity-100":"opacity-0 pointer-events-none"}`,children:v.jsx(Lse,{projectId:u,existingConfig:o})}),c.map(f=>{const d=e===f.type,h=f.type===wa;return v.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:[v.jsx("span",{className:`inline-block w-1.5 h-1.5 ${h?`rounded-[1px] ${d?"bg-[#2b5ea7]":"bg-[#b9c4d4]"}`:`rounded-full ${d?F.statusDot.connected:"bg-[#d4d0c8]"}`}`}),Mse[f.type]??f.type.toUpperCase()]},f.type)})]})}const Bse={create:{icon:"+",verb:"Saved"},update:{icon:"~",verb:"Updated"},delete:{icon:"-",verb:"Deleted"}};function Fse({sessionId:e,streaming:t,onCostDataReady:r}){const[n,i]=m.useState(!1),a=m.useRef(null),s=dt.useUtils(),o=dt.memory.bySession.useQuery({sessionId:e}),u=o.data,{startedCount:l,completedCount:c}=u?.reduce((E,k)=>(k.operation==="started"?E.startedCount++:k.operation==="completed"&&E.completedCount++,E),{startedCount:0,completedCount:0})??{startedCount:0,completedCount:0},f=l>0&&l===c,d=u?.filter(E=>E.operation!=="completed"&&E.operation!=="started")??[],[h,p]=m.useState(!1);m.useEffect(()=>{if(t){p(!1);return}const E=setTimeout(()=>p(!0),3e4);return()=>clearTimeout(E)},[t]);const b=m.useRef(t);m.useEffect(()=>{b.current&&!t&&s.memory.bySession.invalidate({sessionId:e}),b.current=t},[t,e,s]);const y=m.useRef(!1);m.useEffect(()=>{!y.current&&f&&r?.(),y.current=f},[f,r]);const x=!t&&!f&&!h&&o.status==="success"&&(u?.length??0)>0;rw(()=>s.memory.bySession.invalidate({sessionId:e}),3e3,x),nw(a,()=>i(!1));const T=h&&!f;return d.length?v.jsxs("div",{className:"relative",ref:a,children:[v.jsxs("button",{type:"button",onClick:()=>i(E=>!E),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:[v.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.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"}),v.jsx("line",{x1:"9",y1:"21",x2:"15",y2:"21"}),v.jsx("line",{x1:"10",y1:"24",x2:"14",y2:"24"})]}),v.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&&v.jsxs("div",{className:`right-0 top-full mt-1 ${F.popoverWide}`,children:[v.jsx("div",{className:F.popoverLabel,children:"Memory Log"}),d.map(E=>{const k=Bse[E.operation]??{icon:"?",verb:E.operation};return v.jsxs("div",{className:F.popoverRow,children:[v.jsx("span",{className:"shrink-0 w-4 h-4 rounded text-center leading-4 font-mono text-[10px] bg-[#e8e3da]/30",children:k.icon}),v.jsxs("span",{children:[v.jsx("span",{className:"font-medium",children:k.verb}),E.note&&v.jsxs("span",{className:"opacity-80",children:[": ",E.note]})]})]},E.id)})]})]}):null}function DN({chatId:e,hasMessages:t,isLoading:r,onPostMortem:n,onCompact:i,streaming:a,onCostDataReady:s,onTitleClick:o}){const u=dt.sessions.getTitle.useQuery({id:e}),l=u.data?.title,c=u.data?.titlePending??!0,f=dt.useUtils(),d=t&&c,[h,p]=m.useState(!1);m.useEffect(()=>{if(!d){p(!1);return}const y=setTimeout(()=>p(!0),6e4);return()=>clearTimeout(y)},[d]),rw(()=>f.sessions.getTitle.invalidate({id:e}),5e3,d&&!h);const b=m.useRef(c);return m.useEffect(()=>{b.current&&!c&&s?.(),b.current=c},[c,s]),v.jsx("div",{className:F.titleBar,children:v.jsxs("div",{className:"flex items-center justify-between",children:[(()=>{const y=!c&&l,x=`${F.titleText} transition-opacity duration-500 ${y?"opacity-100":"opacity-0"}`,T=y?l:" ";return o?v.jsx("button",{type:"button",onClick:o,title:"Scroll to top",className:`${x} text-left hover:opacity-80 cursor-pointer`,children:T}):v.jsx("h2",{className:x,children:T})})(),v.jsxs("div",{className:"flex items-center gap-3",children:[t&&v.jsx(Fse,{sessionId:e,streaming:a??!1,onCostDataReady:s}),a?v.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-[#9c9890] font-sans",children:[v.jsx("span",{className:F.streamingDot}),"Streaming"]}):t&&!r&&v.jsxs(v.Fragment,{children:[i&&v.jsxs("button",{type:"button",onClick:i,className:`flex items-center gap-1.5 ${F.metaLink}`,title:"Summarize older messages to free up context",children:[v.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M12 22v-6"}),v.jsx("path",{d:"M12 8V2"}),v.jsx("path",{d:"M4 12H2"}),v.jsx("path",{d:"M10 12H8"}),v.jsx("path",{d:"M16 12h-2"}),v.jsx("path",{d:"M22 12h-2"}),v.jsx("path",{d:"m15 19-3-3-3 3"}),v.jsx("path",{d:"m15 5-3 3-3-3"})]}),"Compact"]}),v.jsxs("button",{type:"button",onClick:n,className:`flex items-center gap-1.5 ${F.metaLink}`,children:[v.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),v.jsx("polyline",{points:"14 2 14 8 20 8"}),v.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),v.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),v.jsx("polyline",{points:"10 9 9 9 8 9"})]}),"Post-Mortem"]})]})]})]})})}function $se(e){const t=e.map(o=>({label:o.label,model:o.model,cost:Rg(o.model,o.input,o.output,o.cached,o.cacheWrite)}));let r=0,n=0,i=0;for(const o of e)r+=o.input,n+=o.output,i+=o.cached;const a=t.reduce((o,u)=>o+u.cost,0),s=e.reduce((o,u)=>o+Rg(u.model,u.input,u.output,0,0),0);return{agents:t,totalCost:a,totalCostWithoutCache:s,totalInput:r,totalOutput:n,totalCached:i}}function Use({breakdown:e,activeProvider:t,onToggle:r}){const[n,i]=m.useState(!1),a=m.useRef(null);return nw(a,()=>i(!1)),v.jsxs("div",{className:"relative px-10 pt-2",ref:a,children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("button",{type:"button",className:F.tokenSummary,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:()=>i(s=>!s),children:[e.totalInput.toLocaleString()," in · ",e.totalOutput.toLocaleString()," out",e.totalCost>0&&v.jsxs(v.Fragment,{children:[" · ",ou(e.totalCost)]})]}),v.jsx(Dg,{activeProvider:t,onToggle:r})]}),n&&e.agents.length>0&&v.jsxs("div",{className:`bottom-full left-10 mb-1 ${F.popoverWide}`,children:[v.jsx("div",{className:F.popoverLabel,children:"Cost Breakdown"}),e.agents.map((s,o)=>v.jsxs("div",{className:F.popoverItemRow,children:[v.jsxs("span",{className:"truncate mr-2",children:[s.label,s.model&&v.jsxs("span",{className:"text-[#9c9890] ml-1",children:["(",s.model,")"]})]}),v.jsx("span",{className:"shrink-0 tabular-nums",children:ou(s.cost)})]},o)),e.agents.length>1&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:F.popoverDivider}),v.jsxs("div",{className:"flex items-center justify-between text-[11px] text-[#4a4540] font-sans font-medium",children:[v.jsx("span",{children:"Total"}),v.jsx("span",{className:"tabular-nums",children:ou(e.totalCost)})]})]}),e.totalCached>0&&v.jsxs("div",{className:F.popoverFootnote,children:[e.totalCached.toLocaleString()," cached tokens",e.totalCostWithoutCache>e.totalCost&&v.jsxs(v.Fragment,{children:[" · saved ",ou(e.totalCostWithoutCache-e.totalCost)]})]})]})]})}function Hse({initialText:e,onSave:t,onCancel:r}){const[n,i]=m.useState(e);return v.jsxs(v.Fragment,{children:[v.jsx("textarea",{className:F.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}),v.jsxs("div",{className:F.chatEditActions,children:[v.jsx("button",{type:"button",onClick:()=>t(n),className:F.chatEditSave,disabled:!n.trim(),children:"Save & Send"}),v.jsx("button",{type:"button",onClick:r,className:F.chatEditCancel,children:"Cancel"})]})]})}function zse({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,s]=m.useState(null),o=dt.sessions.importAnalysis.useMutation(),u=dt.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"){s("Only single PNG files are supported.");return}const R=O[0];if(R.size>10*1024*1024){s("PNG is too large (>10 MB).");return}try{const C=new Uint8Array(await R.arrayBuffer());let M;try{M=await Ese(C)}catch{s("Not a valid PNG file.");return}if(!M){s("No analysis data found in this image.");return}let L;try{L=VN.parse(JSON.parse(new TextDecoder().decode(M)))}catch{s("Analysis data is malformed or from an incompatible version.");return}const{id:X}=await o.mutateAsync(L);u.sessions.list.setData(void 0,U=>{const $={id:X,title:L.sourceTitle.slice(0,80)||xh,status:"idle",kind:Lg.IMPORTED,updatedAt:Math.floor(Date.now()/1e3),titlePending:!1};return U?[$,...U]:[$]}),s(null),t(X)}catch{s("Couldn't import analysis.")}},[o,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?v.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:v.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?v.jsxs(Ku,{tone:"error",children:[v.jsx("span",{children:a}),v.jsx("button",{type:"button",onClick:()=>s(null),className:"text-xs underline shrink-0",children:"dismiss"})]}):null,[h,p]=m.useState(()=>localStorage.getItem("tracer:activeProvider")??wa),b=m.useCallback(S=>{localStorage.setItem("tracer:activeProvider",S),p(S)},[]),y=dt.useUtils(),x=dt.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)}),x.mutate({id:e}))},[e]);const T=dt.sessions.get.useQuery({id:r},{enabled:!!e,gcTime:0}),E=T.data?.messages,k=dt.sessions.getCost.useQuery({id:r},{enabled:!!e}),w=m.useMemo(()=>{const S=k.data;return S?.agents?.length?$se(S.agents):null},[k.data]);let A;if(e&&T.isLoading)A=v.jsx("div",{className:F.chatContainer,children:v.jsx("div",{className:"flex items-center justify-center h-full",children:v.jsx("span",{className:F.chatEmptyState,children:"Loading session..."})})});else if(T.data?.status==="streaming"){const S=T.data,O=E??[],R=S.summary&&S.summaryUpTo&&S.summaryUpTo<=O.length?S.summaryUpTo:0,C=R>0?O.slice(R):O;if(R>0&&C[0]?.role==="assistant"){const M=ew(C[0].parts);M&&(C[0]={...C[0],parts:M})}A=v.jsx(_se,{sessionId:r,initialMessages:C,onComplete:()=>T.refetch(),header:v.jsxs(v.Fragment,{children:[v.jsx(DN,{chatId:r,hasMessages:!0,isLoading:!1,onPostMortem:()=>{},streaming:!0}),R>0&&S.summary&&v.jsx("div",{className:"px-10",children:v.jsx(PN,{summary:S.summary,summarizedCount:R,createdAt:S.summaryCreatedAt,readOnly:!0})})]}),beforeInput:v.jsx("div",{className:"px-10 pt-2 flex justify-end",children:v.jsx(Dg,{activeProvider:h,onToggle:b})})},r)}else T.data?.kind===Lg.IMPORTED?A=v.jsx(qse,{sessionId:r,sessionTitle:T.data.title,initialMessages:E??[]},r):A=v.jsx(Wse,{chatId:r,initialMessages:E,costBreakdown:w,activeProvider:h,setActiveProvider:b,sessionTitle:T.data?.title,sessionUpdatedAt:T.data?.updatedAt,summary:T.data?.summary,summaryUpTo:T.data?.summaryUpTo,summaryCreatedAt:T.data?.summaryCreatedAt},r);return v.jsxs("div",{className:"relative h-full",...c,children:[A,d,f]})}function qse({sessionId:e,sessionTitle:t,initialMessages:r}){const n=m.useRef(null),i=r[0],a=i?.metadata?.sourceTitle??t,s=i?.metadata?.sourceCreatedAt,o=m.useMemo(()=>{if(!s)return"";try{return new Date(s*1e3).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}},[s]),u=v.jsxs("div",{className:F.titleBar,children:[a&&v.jsx("h2",{className:F.titleText,children:a}),v.jsxs("div",{className:"text-xs text-[#9c9890] mt-1",children:["Imported",o?` · originally ${o}`:""]})]});return v.jsx("div",{className:F.chatContainer,children:v.jsx(NN,{ref:n,chatId:e,apiEndpoint:"/api/chat",initialMessages:r,variant:"full",readOnly:!0,sourceTitle:a,sourceCreatedAt:s,scrollHeader:u})})}function Wse({chatId:e,initialMessages:t,costBreakdown:r,activeProvider:n,setActiveProvider:i,sessionTitle:a,sessionUpdatedAt:s,summary:o,summaryUpTo:u,summaryCreatedAt:l}){const[c,f]=m.useState(null),[d,h]=m.useState(""),[p,b]=m.useState(null),[y,x]=m.useState(!1),[T,E]=m.useState(!!t?.length),[k,w]=m.useState(()=>yh(t??[])),[A,S]=m.useState(()=>t?.length?t[t.length-1]?.role==="user":!1),[O,R]=m.useState(!1),[C,M]=m.useState(!1),[L,X]=m.useState(null),[U,$]=m.useState(null),q=L!==null,Y=m.useRef(null),V=m.useRef(!1),re=dt.useUtils(),N=dt.sessions.markViewed.useMutation(),ye=dt.sessions.truncateMessages.useMutation(),pe=dt.sessions.saveMessages.useMutation(),P=dt.sessions.compact.useMutation(),ge=dt.sessions.updateSummary.useMutation(),Oe=dt.sessions.clearSummary.useMutation(),he=()=>{re.sessions.get.setData({id:e},ee=>ee&&{...ee,summary:null,summaryUpTo:null,summaryCreatedAt:null}),R(!1)},Te=async ee=>{(await ye.mutateAsync({id:e,keepCount:ee})).summaryCleared&&he()},ve=m.useCallback(async()=>(await re.sessions.get.fetch({id:e}))?.title,[re,e]),J=async()=>{if(!Y.current)return;const ee=Y.current.messages,ae=ee[ee.length-1];if(!ae||ae.role!=="user")return;const Le=ae.parts.find(We=>We.type==="text");if(!(!Le||Le.type!=="text")){try{await Te(ee.length-1)}catch{return}Y.current.setMessages(ee.slice(0,-1)),Y.current.scrollToBottom({animation:"instant"}),Y.current.sendMessage({text:Le.text})}},Z=()=>{Y.current&&(Y.current.scrollToBottom({animation:"instant"}),Y.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.`}))},fe=ee=>{b(ee)},W=async()=>{if(p===null||!Y.current)return;await Te(p);const ee=Y.current.messages.slice(0,p);Y.current.setMessages(ee),w(yh(ee)),b(null)},Qe=ee=>{const Le=Y.current?.messages[ee]?.parts.find(We=>We.type==="text");!Le||Le.type!=="text"||(f(ee),h(Le.text))},we=()=>{f(null)},Ge=async ee=>{if(c===null||!ee.trim()||!Y.current||q)return;const ae=ee.trim();await Te(c),Y.current.setMessages(Y.current.messages.slice(0,c)),f(null),Y.current.scrollToBottom({animation:"instant"}),Y.current.sendMessage({text:ae})},ze=({messages:ee,progressStore:ae})=>{const Le=ee.map(We=>{if(We.role!=="assistant")return We;const it=We.parts.map(ut=>{const be=ut;if(be.toolCallId&&be.state!=="output-available"){const Se=ae.getSnapshot(be.toolCallId),bn=Se?.parts?.length?{parts:Se.parts}:{error:"Aborted"};return{...be,state:"output-available",output:bn}}return ut});return{...We,parts:it}});pe.mutate({id:e,messages:Le})},St=async ee=>{const ae=YN(Y.current?.messages??[],ee);if(ae===null){$("There are no messages to summarize before the analysis");return}M(!1),f(null);const Le=o&&u!=null&&u<ae?u:0;X({upTo:ae,count:ee+1-Le}),$(null);try{const We=await P.mutateAsync({id:e,upToIndex:ee});re.sessions.get.getData({id:e})?re.sessions.get.setData({id:e},it=>it&&{...it,...We}):re.sessions.get.invalidate({id:e}),re.sessions.getCost.invalidate({id:e}),R(!1)}catch(We){$(We instanceof Error?We.message:"Failed to summarize the conversation"),re.sessions.get.invalidate({id:e})}finally{X(null)}},xe=async ee=>{if(q)throw new Error("A summary is being generated");await ge.mutateAsync({id:e,summary:ee}),re.sessions.get.setData({id:e},ae=>ae&&{...ae,summary:ee})},Be=()=>{Oe.mutate({id:e},{onSuccess:()=>he(),onError:ee=>$(ee.message||"Failed to delete the summary")})};m.useEffect(()=>{if(!C)return;const ee=ae=>{ae.key==="Escape"&&M(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[C]);const pt=m.useRef(Qe);pt.current=Qe;const xt=m.useRef(fe);xt.current=fe;const kr=m.useRef(St);kr.current=St;const ia=m.useRef(Ge);ia.current=Ge;const aa=m.useRef(we);aa.current=we;const fs=m.useCallback((ee,ae,{label:Le,content:We})=>{const it=m.createRef(),ut=L!==null&&ae<L.upTo;return v.jsxs("div",{className:"relative group",children:[!y&&c===null&&!C&&L===null&&v.jsxs("div",{className:F.chatMessageActions,children:[v.jsx(hf,{contentRef:it,parts:ee.parts}),ee.role==="user"&&v.jsx("button",{type:"button",onClick:()=>pt.current(ae),className:F.chatActionButton,title:"Edit message","aria-label":"Edit message",children:v.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),v.jsx("path",{d:"m15 5 4 4"})]})}),v.jsx("button",{type:"button",onClick:()=>xt.current(ae),className:F.chatActionButton,title:"Delete this message and everything after it","aria-label":"Delete message",children:v.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("path",{d:"M18 6 6 18"}),v.jsx("path",{d:"m6 6 12 12"})]})})]}),c===ae?v.jsx(Hse,{initialText:d,onSave:be=>ia.current(be),onCancel:()=>aa.current()}):v.jsxs("div",{ref:it,className:`${F.chatMessageCard} transition-opacity${ut?" opacity-40 pointer-events-none":""}`,children:[Le,We]}),L?.upTo===ae+1&&v.jsx("div",{className:"flex justify-center mt-3",children:v.jsxs("div",{className:F.compactionPill,children:[v.jsx(ZT,{}),"Summarizing up to here…"]})}),C&&L===null&&RN(ee,ae)&&v.jsx("div",{className:"flex justify-center mt-3",children:v.jsx("button",{type:"button",onClick:()=>kr.current(ae),className:F.compactionButton,children:"Summarize up to here"})})]})},[y,c,L,C]),z=m.useCallback(()=>{re.sessions.getCost.invalidate({id:e})},[re,e]),te=v.jsx(DN,{chatId:e,hasMessages:T,isLoading:y||q,onPostMortem:Z,onCompact:k?()=>M(!0):void 0,streaming:y,onCostDataReady:z,onTitleClick:()=>Y.current?.scrollToTop({animation:"smooth"})}),me=v.jsxs("ul",{className:"max-w-md space-y-4 text-sm text-[#b8b5af] font-serif text-center",children:[v.jsxs("li",{children:[v.jsx("div",{className:"text-[#9c9890]",children:"Garbage in, garbage out."}),v.jsx("div",{children:"The clearer your question, the sharper the answer — vague ones can still work."})]}),v.jsxs("li",{children:[v.jsx("div",{className:"text-[#9c9890]",children:"Models hallucinate."}),v.jsx("div",{children:"Don't take every claim at face value — verify the parts that matter."})]}),v.jsxs("li",{children:[v.jsx("div",{className:"text-[#9c9890]",children:"Self-review still matters."}),v.jsx("div",{children:"Don't share findings with teammates until you've checked them yourself."})]})]});return v.jsxs("div",{className:`${F.chatContainer} relative`,children:[U&&v.jsxs(Ku,{tone:"error",children:[v.jsx("span",{children:U}),v.jsx("button",{type:"button",onClick:()=>$(null),className:"text-xs underline shrink-0",children:"dismiss"})]}),C&&v.jsxs(Ku,{tone:"compaction",children:[v.jsx("span",{children:"Pick where to compact — that message and everything above it will be summarized (analyses are kept)."}),v.jsx("button",{type:"button",onClick:()=>M(!1),className:"text-xs underline shrink-0",children:"cancel"})]}),L!==null&&v.jsxs(Ku,{tone:"compaction",children:[v.jsx(ZT,{}),v.jsxs("span",{children:["Summarizing ",L.count," message",L.count===1?"":"s","… Chat is paused until it finishes."]})]}),v.jsx(NN,{ref:Y,chatId:e,apiEndpoint:"/api/chat",placeholder:"Ask a debugging question...",initialMessages:t,variant:"full",sourceTitle:a,sourceCreatedAt:s,resolveSourceTitle:ve,scrollHeader:te,beforeMessages:o?v.jsx(PN,{summary:o,summarizedCount:u,createdAt:l,showOriginals:O,onToggleOriginals:()=>R(ee=>!ee),onSave:xe,onDelete:Be,readOnly:q},l??0):void 0,collapseCount:o&&!O&&u?u:void 0,analysisOnlyIndex:o&&!O&&u?u:void 0,inputDisabled:q,onRetryTruncate:Te,emptyStateExtras:me,onBeforeStop:ze,onStatusChange:(ee,ae)=>{const Le=ee==="submitted"||ee==="streaming";x(Le),Le&&(V.current=!1,M(!1)),ae.length>0&&E(!0),w(yh(ae));const We=ae[ae.length-1];if(S(!Le&&ae.length>0&&We?.role==="user"),ee==="submitted"){let it=!1;re.sessions.list.setData(void 0,ut=>!ut||ut.some(be=>be.id===e)?ut:(it=!0,[{id:e,title:xh,status:"streaming",kind:null,updatedAt:Math.floor(Date.now()/1e3),titlePending:!0},...ut])),it&&re.sessions.activeCount.setData(void 0,ut=>ut&&{...ut,streaming:ut.streaming+1})}ee==="ready"&&(V.current||(V.current=!0,N.mutate({id:e})),re.sessions.getCost.invalidate({id:e}),a===xh&&re.sessions.get.invalidate({id:e}))},extraBody:n?{activeProvider:n}:void 0,beforeInput:r&&(r.totalInput>0||r.totalOutput>0)?v.jsx(Use,{breakdown:r,activeProvider:n,onToggle:i}):v.jsx("div",{className:"px-10 pt-2 flex justify-end",children:v.jsx(Dg,{activeProvider:n,onToggle:i})}),afterMessages:A&&!q?v.jsx("div",{className:"flex justify-center mt-4",children:v.jsx("button",{type:"button",onClick:J,className:F.chatContinueButton,children:"Retry"})}):void 0,renderMessage:fs}),v.jsx(tw,{open:p!==null,title:"Delete messages",message:"This message and all messages after it will be removed. This cannot be undone.",confirmLabel:"Delete",onConfirm:W,onCancel:()=>b(null)})]})}function RN(e,t){return e.role==="assistant"&&(!KN(e)||t>=1)}function yh(e){return e.some(RN)}const Vse={error:"text-[#b33a2a] bg-[#b33a2a]/5 border-[#b33a2a]/20",compaction:"text-[#8a6d3b] bg-[#f5f1e6] border-[#8a6d3b]/25"};function Ku({tone:e,children:t}){return v.jsx("div",{className:`absolute top-2 left-1/2 -translate-x-1/2 z-40 text-sm border rounded px-4 py-2 flex items-center gap-3 shadow-sm font-sans ${Vse[e]}`,children:t})}function ZT(){return v.jsx("svg",{className:"animate-spin shrink-0",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:v.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})}const xoe=Object.freeze(Object.defineProperty({__proto__:null,Debug:zse},Symbol.toStringTag,{value:"Module"})),Yse=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Wk},Symbol.toStringTag,{value:"Module"}));export{b7 as A,xoe as D,Qse as L,Tr as R};